libflame revision_anchor
Functions
FLA_Amax_external.c File Reference

(r)

Functions

FLA_Error FLA_Amax_external (FLA_Obj x, FLA_Obj index)
 

Function Documentation

◆ FLA_Amax_external()

FLA_Error FLA_Amax_external ( FLA_Obj  x,
FLA_Obj  index 
)
14{
15 FLA_Datatype datatype;
16 int num_elem;
17 int inc_x;
18 int *buff_index;
19
22
23 buff_index = ( int * ) FLA_INT_PTR( index );
24
25 if ( FLA_Obj_has_zero_dim( x ) )
26 {
27 *buff_index = 0;
28 return FLA_SUCCESS;
29 }
30
31 datatype = FLA_Obj_datatype( x );
32
35
36
37 switch ( datatype ){
38
39 case FLA_FLOAT:
40 {
41 float* buff_x = ( float * ) FLA_FLOAT_PTR( x );
42
45 buff_index );
46
47 break;
48 }
49
50 case FLA_DOUBLE:
51 {
52 double* buff_x = ( double * ) FLA_DOUBLE_PTR( x );
53
56 buff_index );
57
58 break;
59 }
60
61 case FLA_COMPLEX:
62 {
64
67 buff_index );
68
69 break;
70 }
71
73 {
75
78 buff_index );
79
80 break;
81 }
82
83 }
84
85 return FLA_SUCCESS;
86}
FLA_Error FLA_Amax_check(FLA_Obj x, FLA_Obj index)
Definition FLA_Amax_check.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition FLA_Query.c:400
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition FLA_Query.c:145
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition FLA_Query.c:137
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
void bl1_samax(int n, float *x, int incx, int *index)
Definition bl1_amax.c:13
void bl1_zamax(int n, dcomplex *x, int incx, int *index)
Definition bl1_amax.c:46
void bl1_damax(int n, double *x, int incx, int *index)
Definition bl1_amax.c:24
void bl1_camax(int n, scomplex *x, int incx, int *index)
Definition bl1_amax.c:35
int i
Definition bl1_axmyv2.c:145
Definition blis_type_defs.h:138
Definition blis_type_defs.h:133

References bl1_camax(), bl1_damax(), bl1_samax(), bl1_zamax(), FLA_Amax_check(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), and i.

Referenced by FLA_Amax(), FLA_LU_piv_unb_var3(), FLA_LU_piv_unb_var3b(), FLA_LU_piv_unb_var4(), FLA_LU_piv_unb_var5(), FLA_QR_UT_piv_unb_var1(), and FLA_QR_UT_piv_unb_var2().