libflame  revision_anchor
Functions
FLA_Axpyrt_external.c File Reference

(r)

Functions

FLA_Error FLA_Axpyrt_external (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 

Function Documentation

◆ FLA_Axpyrt_external()

FLA_Error FLA_Axpyrt_external ( FLA_Uplo  uplo,
FLA_Trans  trans,
FLA_Obj  alpha,
FLA_Obj  A,
FLA_Obj  B 
)
14 {
15  FLA_Datatype datatype;
16  int m_B, n_B;
17  int rs_A, cs_A;
18  int rs_B, cs_B;
19  uplo1_t blis_uplo;
20  trans1_t blis_trans;
21 
22  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23  FLA_Axpyrt_check( uplo, trans, alpha, A, B );
24 
25  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26 
27  datatype = FLA_Obj_datatype( A );
28 
29  rs_A = FLA_Obj_row_stride( A );
30  cs_A = FLA_Obj_col_stride( A );
31 
32  m_B = FLA_Obj_length( B );
33  n_B = FLA_Obj_width( B );
34  rs_B = FLA_Obj_row_stride( B );
35  cs_B = FLA_Obj_col_stride( B );
36 
37  FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
38  FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
39 
40  switch ( datatype ){
41 
42  case FLA_FLOAT:
43  {
44  float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
45  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
46  float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
47 
48  bl1_saxpymrt( blis_uplo,
49  blis_trans,
50  m_B,
51  n_B,
52  buff_alpha,
53  buff_A, rs_A, cs_A,
54  buff_B, rs_B, cs_B );
55 
56  break;
57  }
58 
59  case FLA_DOUBLE:
60  {
61  double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
62  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
63  double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
64 
65  bl1_daxpymrt( blis_uplo,
66  blis_trans,
67  m_B,
68  n_B,
69  buff_alpha,
70  buff_A, rs_A, cs_A,
71  buff_B, rs_B, cs_B );
72 
73  break;
74  }
75 
76  case FLA_COMPLEX:
77  {
78  scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
79  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
80  scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
81 
82  bl1_caxpymrt( blis_uplo,
83  blis_trans,
84  m_B,
85  n_B,
86  buff_alpha,
87  buff_A, rs_A, cs_A,
88  buff_B, rs_B, cs_B );
89 
90  break;
91  }
92 
93  case FLA_DOUBLE_COMPLEX:
94  {
95  dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
96  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
97  dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
98 
99  bl1_zaxpymrt( blis_uplo,
100  blis_trans,
101  m_B,
102  n_B,
103  buff_alpha,
104  buff_A, rs_A, cs_A,
105  buff_B, rs_B, cs_B );
106 
107  break;
108  }
109 
110  }
111 
112  return FLA_SUCCESS;
113 }
FLA_Error FLA_Axpyrt_check(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition: FLA_Axpyrt_check.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
void bl1_zaxpymrt(uplo1_t uplo, trans1_t trans, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition: bl1_axpymrt.c:334
void bl1_daxpymrt(uplo1_t uplo, trans1_t trans, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition: bl1_axpymrt.c:120
void bl1_saxpymrt(uplo1_t uplo, trans1_t trans, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition: bl1_axpymrt.c:13
void bl1_caxpymrt(uplo1_t uplo, trans1_t trans, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition: bl1_axpymrt.c:227
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_caxpymrt(), bl1_daxpymrt(), bl1_saxpymrt(), bl1_zaxpymrt(), FLA_Axpyrt_check(), 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(), and FLA_Param_map_flame_to_blis_uplo().

Referenced by FLA_Axpyrt().