libflame  revision_anchor
Functions
FLA_Axpyt_external.c File Reference

(r)

Functions

FLA_Error FLA_Axpyt_external (FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 

Function Documentation

◆ FLA_Axpyt_external()

FLA_Error FLA_Axpyt_external ( 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  trans1_t blis_trans;
20 
21  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22  FLA_Axpyt_check( trans, alpha, A, B );
23 
24  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25 
26  datatype = FLA_Obj_datatype( A );
27 
28  rs_A = FLA_Obj_row_stride( A );
29  cs_A = FLA_Obj_col_stride( A );
30 
31  m_B = FLA_Obj_length( B );
32  n_B = FLA_Obj_width( B );
33  rs_B = FLA_Obj_row_stride( B );
34  cs_B = FLA_Obj_col_stride( B );
35 
36  FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
37 
38  switch ( datatype ){
39 
40  case FLA_FLOAT:
41  {
42  float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
43  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
44  float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
45 
46  bl1_saxpymt( blis_trans,
47  m_B,
48  n_B,
49  buff_alpha,
50  buff_A, rs_A, cs_A,
51  buff_B, rs_B, cs_B );
52 
53  break;
54  }
55 
56  case FLA_DOUBLE:
57  {
58  double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
59  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
60  double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
61 
62  bl1_daxpymt( blis_trans,
63  m_B,
64  n_B,
65  buff_alpha,
66  buff_A, rs_A, cs_A,
67  buff_B, rs_B, cs_B );
68 
69  break;
70  }
71 
72  case FLA_COMPLEX:
73  {
74  scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
75  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
76  scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
77 
78  bl1_caxpymt( blis_trans,
79  m_B,
80  n_B,
81  buff_alpha,
82  buff_A, rs_A, cs_A,
83  buff_B, rs_B, cs_B );
84 
85  break;
86  }
87 
88  case FLA_DOUBLE_COMPLEX:
89  {
90  dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
91  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
92  dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
93 
94  bl1_zaxpymt( blis_trans,
95  m_B,
96  n_B,
97  buff_alpha,
98  buff_A, rs_A, cs_A,
99  buff_B, rs_B, cs_B );
100 
101  break;
102  }
103 
104  }
105 
106  return FLA_SUCCESS;
107 }
FLA_Error FLA_Axpyt_check(FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition: FLA_Axpyt_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
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
int FLA_Datatype
Definition: FLA_type_defs.h:49
void bl1_zaxpymt(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_axpymt.c:248
void bl1_daxpymt(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_axpymt.c:81
void bl1_saxpymt(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_axpymt.c:13
void bl1_caxpymt(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_axpymt.c:149
trans1_t
Definition: blis_type_defs.h:53
Definition: blis_type_defs.h:138
Definition: blis_type_defs.h:133

References bl1_caxpymt(), bl1_daxpymt(), bl1_saxpymt(), bl1_zaxpymt(), FLA_Axpyt_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(), and FLA_Param_map_flame_to_blis_trans().

Referenced by FLA_Axpy_buffer_to_object(), FLA_Axpy_object_to_buffer(), FLA_Axpyt(), FLA_Axpyt_c_task(), FLA_Axpyt_h_task(), FLA_Axpyt_n_task(), FLA_Axpyt_t_task(), and FLA_Axpyt_task().