libflame  revision_anchor
Functions
FLA_Dot_external.c File Reference

(r)

Functions

FLA_Error FLA_Dot_external (FLA_Obj x, FLA_Obj y, FLA_Obj rho)
 

Function Documentation

◆ FLA_Dot_external()

FLA_Error FLA_Dot_external ( FLA_Obj  x,
FLA_Obj  y,
FLA_Obj  rho 
)

References bl1_cdot(), bl1_ddot(), bl1_sdot(), bl1_zdot(), FLA_Check_error_level(), FLA_Dot_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), and FLA_Param_map_flame_to_blis_conj().

Referenced by FLA_Dot().

14 {
15  FLA_Datatype datatype;
16  int num_elem;
17  int inc_x;
18  int inc_y;
19  conj1_t blis_conj;
20 
21  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22  FLA_Dot_check( x, y, rho );
23 
24  if ( FLA_Obj_has_zero_dim( x ) ) return FLA_SUCCESS;
25 
26  datatype = FLA_Obj_datatype( x );
27 
28  inc_x = FLA_Obj_vector_inc( x );
29  inc_y = FLA_Obj_vector_inc( y );
30  num_elem = FLA_Obj_vector_dim( x );
31 
32  FLA_Param_map_flame_to_blis_conj( FLA_NO_CONJUGATE, &blis_conj );
33 
34  switch ( datatype ){
35 
36  case FLA_FLOAT:
37  {
38  float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
39  float *buff_y = ( float * ) FLA_FLOAT_PTR( y );
40  float *buff_rho = ( float * ) FLA_FLOAT_PTR( rho );
41 
42  bl1_sdot( blis_conj,
43  num_elem,
44  buff_x, inc_x,
45  buff_y, inc_y,
46  buff_rho );
47 
48  break;
49  }
50 
51  case FLA_DOUBLE:
52  {
53  double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
54  double *buff_y = ( double * ) FLA_DOUBLE_PTR( y );
55  double *buff_rho = ( double * ) FLA_DOUBLE_PTR( rho );
56 
57  bl1_ddot( blis_conj,
58  num_elem,
59  buff_x, inc_x,
60  buff_y, inc_y,
61  buff_rho );
62 
63  break;
64  }
65 
66  case FLA_COMPLEX:
67  {
68  scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
69  scomplex *buff_y = ( scomplex * ) FLA_COMPLEX_PTR( y );
70  scomplex *buff_rho = ( scomplex * ) FLA_COMPLEX_PTR( rho );
71 
72  bl1_cdot( blis_conj,
73  num_elem,
74  buff_x, inc_x,
75  buff_y, inc_y,
76  buff_rho );
77 
78  break;
79  }
80 
81  case FLA_DOUBLE_COMPLEX:
82  {
83  dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
84  dcomplex *buff_y = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( y );
85  dcomplex *buff_rho = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( rho );
86 
87  bl1_zdot( blis_conj,
88  num_elem,
89  buff_x, inc_x,
90  buff_y, inc_y,
91  buff_rho );
92 
93  break;
94  }
95 
96  }
97 
98  return FLA_SUCCESS;
99 }
FLA_Error FLA_Dot_check(FLA_Obj x, FLA_Obj y, FLA_Obj rho)
Definition: FLA_Dot_check.c:13
void bl1_cdot(conj1_t conj, int n, scomplex *x, int incx, scomplex *y, int incy, scomplex *rho)
Definition: bl1_dot.c:39
conj1_t
Definition: blis_type_defs.h:79
void bl1_zdot(conj1_t conj, int n, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *rho)
Definition: bl1_dot.c:65
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
void bl1_ddot(conj1_t conj, int n, double *x, int incx, double *y, int incy, double *rho)
Definition: bl1_dot.c:26
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
Definition: blis_type_defs.h:132
void bl1_sdot(conj1_t conj, int n, float *x, int incx, float *y, int incy, float *rho)
Definition: bl1_dot.c:13
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
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
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition: FLA_Query.c:145
Definition: blis_type_defs.h:137