libflame revision_anchor
FLA_Setr.c File Reference

(r)

Functions

FLA_Error FLA_Setr (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A)
 

Function Documentation

◆ FLA_Setr()

FLA_Error FLA_Setr ( FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A )
14{
15 FLA_Datatype datatype;
16 int m_A, n_A;
17 int rs_A, cs_A;
18 uplo1_t blis_uplo;
19
20 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
21 FLA_Setr_check( uplo, alpha, A );
22
23 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
24
25 datatype = FLA_Obj_datatype( A );
26
27 m_A = FLA_Obj_length( A );
28 n_A = FLA_Obj_width( A );
29
30 rs_A = FLA_Obj_row_stride( A );
31 cs_A = FLA_Obj_col_stride( A );
32
33 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
34
35 switch ( datatype ){
36
37 case FLA_FLOAT:
38 {
39 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
40 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
41
42 bl1_ssetmr( blis_uplo,
43 m_A,
44 n_A,
45 buff_alpha,
46 buff_A, rs_A, cs_A );
47
48 break;
49 }
50
51 case FLA_DOUBLE:
52 {
53 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
54 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
55
56 bl1_dsetmr( blis_uplo,
57 m_A,
58 n_A,
59 buff_alpha,
60 buff_A, rs_A, cs_A );
61
62 break;
63 }
64
65 case FLA_COMPLEX:
66 {
67 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
68 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
69
70 bl1_csetmr( blis_uplo,
71 m_A,
72 n_A,
73 buff_alpha,
74 buff_A, rs_A, cs_A );
75
76 break;
77 }
78
79 case FLA_DOUBLE_COMPLEX:
80 {
81 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
82 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
83
84 bl1_zsetmr( blis_uplo,
85 m_A,
86 n_A,
87 buff_alpha,
88 buff_A, rs_A, cs_A );
89
90 break;
91 }
92
93 }
94
95 return FLA_SUCCESS;
96}
FLA_Error FLA_Setr_check(FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A)
Definition FLA_Setr_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
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_csetmr(uplo1_t uplo, int m, int n, scomplex *sigma, scomplex *a, int a_rs, int a_cs)
Definition bl1_setmr.c:119
void bl1_dsetmr(uplo1_t uplo, int m, int n, double *sigma, double *a, int a_rs, int a_cs)
Definition bl1_setmr.c:66
void bl1_zsetmr(uplo1_t uplo, int m, int n, dcomplex *sigma, dcomplex *a, int a_rs, int a_cs)
Definition bl1_setmr.c:172
void bl1_ssetmr(uplo1_t uplo, int m, int n, float *sigma, float *a, int a_rs, int a_cs)
Definition bl1_setmr.c:13
uplo1_t
Definition blis_type_defs.h:61
Definition blis_type_defs.h:138
Definition blis_type_defs.h:133

References bl1_csetmr(), bl1_dsetmr(), bl1_ssetmr(), bl1_zsetmr(), 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_uplo(), and FLA_Setr_check().

Referenced by FLA_QR_UT_form_Q(), FLA_Svd_ext_u_unb_var1(), FLA_Svd_uv_unb_var1(), and FLA_Svd_uv_unb_var2().