libflame  revision_anchor
Functions
FLA_Her2_external.c File Reference

(r)

Functions

FLA_Error FLA_Her2_external (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj A)
 

Function Documentation

◆ FLA_Her2_external()

FLA_Error FLA_Her2_external ( FLA_Uplo  uplo,
FLA_Obj  alpha,
FLA_Obj  x,
FLA_Obj  y,
FLA_Obj  A 
)

References bl1_cher2(), bl1_dsyr2(), bl1_ssyr2(), bl1_zher2(), FLA_Check_error_level(), FLA_Her2_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_vector_inc(), FLA_Param_map_flame_to_blis_conj(), and FLA_Param_map_flame_to_blis_uplo().

Referenced by FLA_Her2(), FLA_Her2k_ln_unb_var10(), FLA_Her2k_ln_unb_var9(), FLA_Her2k_un_unb_var10(), and FLA_Her2k_un_unb_var9().

14 {
15  FLA_Datatype datatype;
16  int m_A;
17  int rs_A, cs_A;
18  int inc_x;
19  int inc_y;
20  uplo1_t blis_uplo;
21  conj1_t blis_conj;
22 
23  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
24  FLA_Her2_check( uplo, alpha, x, y, A );
25 
26  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
27 
28  datatype = FLA_Obj_datatype( A );
29 
30  m_A = FLA_Obj_length( A );
31  rs_A = FLA_Obj_row_stride( A );
32  cs_A = FLA_Obj_col_stride( A );
33 
34  inc_x = FLA_Obj_vector_inc( x );
35  inc_y = FLA_Obj_vector_inc( y );
36 
37  FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
38  FLA_Param_map_flame_to_blis_conj( FLA_NO_CONJUGATE, &blis_conj );
39 
40 
41  switch( datatype ){
42 
43  case FLA_FLOAT:
44  {
45  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
46  float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
47  float *buff_y = ( float * ) FLA_FLOAT_PTR( y );
48  float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
49 
50  bl1_ssyr2( blis_uplo,
51  m_A,
52  buff_alpha,
53  buff_x, inc_x,
54  buff_y, inc_y,
55  buff_A, rs_A, cs_A );
56 
57  break;
58  }
59 
60  case FLA_DOUBLE:
61  {
62  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
63  double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
64  double *buff_y = ( double * ) FLA_DOUBLE_PTR( y );
65  double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
66 
67  bl1_dsyr2( blis_uplo,
68  m_A,
69  buff_alpha,
70  buff_x, inc_x,
71  buff_y, inc_y,
72  buff_A, rs_A, cs_A );
73 
74  break;
75  }
76 
77  case FLA_COMPLEX:
78  {
79  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
80  scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
81  scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y );
82  scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
83 
84  bl1_cher2( blis_uplo,
85  blis_conj,
86  m_A,
87  buff_alpha,
88  buff_x, inc_x,
89  buff_y, inc_y,
90  buff_A, rs_A, cs_A );
91 
92  break;
93  }
94 
95  case FLA_DOUBLE_COMPLEX:
96  {
97  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
98  dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
99  dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y );
100  dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
101 
102  bl1_zher2( blis_uplo,
103  blis_conj,
104  m_A,
105  buff_alpha,
106  buff_x, inc_x,
107  buff_y, inc_y,
108  buff_A, rs_A, cs_A );
109 
110  break;
111  }
112 
113  }
114 
115  return FLA_SUCCESS;
116 }
uplo1_t
Definition: blis_type_defs.h:60
conj1_t
Definition: blis_type_defs.h:79
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition: FLA_Query.c:167
void bl1_ssyr2(uplo1_t uplo, int m, float *alpha, float *x, int incx, float *y, int incy, float *a, int a_rs, int a_cs)
Definition: bl1_syr2.c:13
void bl1_dsyr2(uplo1_t uplo, int m, double *alpha, double *x, int incx, double *y, int incy, double *a, int a_rs, int a_cs)
Definition: bl1_syr2.c:58
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
void bl1_cher2(uplo1_t uplo, conj1_t conj, int m, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int a_rs, int a_cs)
Definition: bl1_her2.c:33
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
void FLA_Param_map_flame_to_blis_uplo(FLA_Uplo uplo, uplo1_t *blis_uplo)
Definition: FLA_Param.c:285
Definition: blis_type_defs.h:132
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
void FLA_Param_map_flame_to_blis_conj(FLA_Conj conj, conj1_t *blis_conj)
Definition: FLA_Param.c:269
int FLA_Datatype
Definition: FLA_type_defs.h:49
FLA_Error FLA_Her2_check(FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj x, FLA_Obj y, FLA_Obj A)
Definition: FLA_Her2_check.c:13
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition: FLA_Query.c:145
void bl1_zher2(uplo1_t uplo, conj1_t conj, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int a_rs, int a_cs)
Definition: bl1_her2.c:121
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137