libflame revision_anchor
Functions
FLA_Syr2k_external.c File Reference

(r)

Functions

FLA_Error FLA_Syr2k_external (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 

Function Documentation

◆ FLA_Syr2k_external()

FLA_Error FLA_Syr2k_external ( FLA_Uplo  uplo,
FLA_Trans  trans,
FLA_Obj  alpha,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  beta,
FLA_Obj  C 
)
14{
15 FLA_Datatype datatype;
16 int k_AB;
17 int m_A, n_A;
18 int m_C;
19 int rs_A, cs_A;
20 int rs_B, cs_B;
21 int rs_C, cs_C;
24
26 FLA_Syr2k_check( uplo, trans, alpha, A, B, beta, C );
27
28 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
29
31 {
33 return FLA_SUCCESS;
34 }
35
36 datatype = FLA_Obj_datatype( A );
37
38 m_A = FLA_Obj_length( A );
39 n_A = FLA_Obj_width( A );
42
45
46 m_C = FLA_Obj_length( C );
49
50 if ( trans == FLA_NO_TRANSPOSE )
51 k_AB = n_A;
52 else
53 k_AB = m_A;
54
57
58
59 switch( datatype ){
60
61 case FLA_FLOAT:
62 {
63 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
64 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
65 float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
66 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
67 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
68
71 m_C,
72 k_AB,
74 buff_A, rs_A, cs_A,
75 buff_B, rs_B, cs_B,
76 buff_beta,
77 buff_C, rs_C, cs_C );
78
79 break;
80 }
81
82 case FLA_DOUBLE:
83 {
84 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
85 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
86 double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
87 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
88 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
89
92 m_C,
93 k_AB,
95 buff_A, rs_A, cs_A,
96 buff_B, rs_B, cs_B,
97 buff_beta,
98 buff_C, rs_C, cs_C );
99
100 break;
101 }
102
103 case FLA_COMPLEX:
104 {
110
113 m_C,
114 k_AB,
116 buff_A, rs_A, cs_A,
117 buff_B, rs_B, cs_B,
118 buff_beta,
119 buff_C, rs_C, cs_C );
120
121 break;
122 }
124 {
130
133 m_C,
134 k_AB,
136 buff_A, rs_A, cs_A,
137 buff_B, rs_B, cs_B,
138 buff_beta,
139 buff_C, rs_C, cs_C );
140
141 break;
142 }
143
144 }
145
146 return FLA_SUCCESS;
147}
FLA_Error FLA_Syr2k_check(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Syr2k_check.c:13
FLA_Error FLA_Scal_external(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Scal_external.c:13
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition FLA_Query.c:400
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition FLA_Query.c:167
dim_t FLA_Obj_length(FLA_Obj obj)
Definition FLA_Query.c:116
void FLA_Param_map_flame_to_blis_trans(FLA_Trans trans, trans1_t *blis_trans)
Definition FLA_Param.c:245
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition FLA_Query.c:174
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18
void FLA_Param_map_flame_to_blis_uplo(FLA_Uplo uplo, uplo1_t *blis_uplo)
Definition FLA_Param.c:285
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
int i
Definition bl1_axmyv2.c:145
void bl1_csyr2k(uplo1_t uplo, trans1_t trans, int m, int k, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs, scomplex *beta, scomplex *c, int c_rs, int c_cs)
Definition bl1_syr2k.c:465
void bl1_ssyr2k(uplo1_t uplo, trans1_t trans, int m, int k, float *alpha, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs, float *beta, float *c, int c_rs, int c_cs)
Definition bl1_syr2k.c:13
void bl1_dsyr2k(uplo1_t uplo, trans1_t trans, int m, int k, double *alpha, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs, double *beta, double *c, int c_rs, int c_cs)
Definition bl1_syr2k.c:239
void bl1_zsyr2k(uplo1_t uplo, trans1_t trans, int m, int k, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs, dcomplex *beta, dcomplex *c, int c_rs, int c_cs)
Definition bl1_syr2k.c:691
uplo1_t
Definition blis_type_defs.h:61
trans1_t
Definition blis_type_defs.h:53
Definition blis_type_defs.h:138
Definition blis_type_defs.h:133

References bl1_csyr2k(), bl1_dsyr2k(), bl1_ssyr2k(), bl1_zsyr2k(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_trans(), FLA_Param_map_flame_to_blis_uplo(), FLA_Scal_external(), FLA_Syr2k_check(), and i.

Referenced by FLA_Syr2k(), FLA_Syr2k_ln_task(), FLA_Syr2k_lt_task(), FLA_Syr2k_task(), FLA_Syr2k_un_task(), and FLA_Syr2k_ut_task().