libflame revision_anchor
Functions
FLA_Set_diag.c File Reference

(r)

Functions

FLA_Error FLA_Set_diag (FLA_Obj alpha, FLA_Obj A)
 

Function Documentation

◆ FLA_Set_diag()

FLA_Error FLA_Set_diag ( FLA_Obj  alpha,
FLA_Obj  A 
)
14{
15 FLA_Datatype datatype;
16 int m_A, n_A;
17 int rs_A, cs_A;
18
21
22 datatype = FLA_Obj_datatype( A );
23 m_A = FLA_Obj_length( A );
24 n_A = FLA_Obj_width( A );
27
28 switch ( datatype ){
29
30 case FLA_INT:
31 {
32 int *buff_A = ( int * ) FLA_INT_PTR( A );
33 int *buff_alpha = ( int * ) FLA_INT_PTR( alpha );
34
35 bl1_isetdiag( 0,
36 m_A,
37 n_A,
39 buff_A, rs_A, cs_A );
40
41 break;
42 }
43
44 case FLA_FLOAT:
45 {
46 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
47 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
48
49 bl1_ssetdiag( 0,
50 m_A,
51 n_A,
53 buff_A, rs_A, cs_A );
54
55 break;
56 }
57
58 case FLA_DOUBLE:
59 {
60 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
61 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
62
63 bl1_dsetdiag( 0,
64 m_A,
65 n_A,
67 buff_A, rs_A, cs_A );
68
69 break;
70 }
71
72 case FLA_COMPLEX:
73 {
76
77 bl1_csetdiag( 0,
78 m_A,
79 n_A,
81 buff_A, rs_A, cs_A );
82
83 break;
84 }
85
87 {
90
91 bl1_zsetdiag( 0,
92 m_A,
93 n_A,
95 buff_A, rs_A, cs_A );
96
97 break;
98 }
99
100 }
101
102 return FLA_SUCCESS;
103}
FLA_Error FLA_Set_diag_check(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Set_diag_check.c:13
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
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
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
int i
Definition bl1_axmyv2.c:145
void bl1_zsetdiag(int offset, int m, int n, dcomplex *sigma, dcomplex *a, int a_rs, int a_cs)
Definition bl1_setdiag.c:98
void bl1_isetdiag(int offset, int m, int n, int *sigma, int *a, int a_rs, int a_cs)
Definition bl1_setdiag.c:13
void bl1_csetdiag(int offset, int m, int n, scomplex *sigma, scomplex *a, int a_rs, int a_cs)
Definition bl1_setdiag.c:76
void bl1_dsetdiag(int offset, int m, int n, double *sigma, double *a, int a_rs, int a_cs)
Definition bl1_setdiag.c:55
void bl1_ssetdiag(int offset, int m, int n, float *sigma, float *a, int a_rs, int a_cs)
Definition bl1_setdiag.c:34
Definition blis_type_defs.h:138
Definition blis_type_defs.h:133

References bl1_csetdiag(), bl1_dsetdiag(), bl1_isetdiag(), bl1_ssetdiag(), bl1_zsetdiag(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Set_diag_check(), and i.

Referenced by FLA_QR_UT_form_Q(), and FLA_Set_to_identity().