libflame revision_anchor
Functions
FLA_Copy_external.c File Reference

(r)

Functions

FLA_Error FLA_Copy_external (FLA_Obj A, FLA_Obj B)
 

Function Documentation

◆ FLA_Copy_external()

FLA_Error FLA_Copy_external ( FLA_Obj  A,
FLA_Obj  B 
)
14{
17 int m_B, n_B;
18 int rs_A, cs_A;
19 int rs_B, cs_B;
21
23 FLA_Copy_check( A, B );
24
25 if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26
29
32
33 m_B = FLA_Obj_length( B );
34 n_B = FLA_Obj_width( B );
37
40 else // if ( FLA_Obj_is_conformal_to( FLA_TRANSPOSE, A, B ) )
42
43 // If A is of type FLA_CONSTANT, then we have to proceed based on the
44 // datatype of B.
45 if ( dt_A == FLA_CONSTANT )
46 {
47 if ( dt_B == FLA_FLOAT )
48 {
49 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
50 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
51
53 m_B,
54 n_B,
56 buff_B, rs_B, cs_B );
57 }
58 else if ( dt_B == FLA_DOUBLE )
59 {
60 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
61 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
62
64 m_B,
65 n_B,
67 buff_B, rs_B, cs_B );
68 }
69 else if ( dt_B == FLA_COMPLEX )
70 {
73
75 m_B,
76 n_B,
78 buff_B, rs_B, cs_B );
79 }
80 else if ( dt_B == FLA_DOUBLE_COMPLEX )
81 {
84
86 m_B,
87 n_B,
89 buff_B, rs_B, cs_B );
90 }
91 }
92 else if ( dt_A == FLA_INT )
93 {
94 int* buff_A = ( int * ) FLA_INT_PTR( A );
95 int* buff_B = ( int * ) FLA_INT_PTR( B );
96
98 m_B,
99 n_B,
100 buff_A, rs_A, cs_A,
101 buff_B, rs_B, cs_B );
102 }
103 else if ( dt_A == FLA_FLOAT )
104 {
105 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
106
107 if ( dt_B == FLA_FLOAT )
108 {
109 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
110
112 m_B,
113 n_B,
114 buff_A, rs_A, cs_A,
115 buff_B, rs_B, cs_B );
116 }
117 else if ( dt_B == FLA_DOUBLE )
118 {
119 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
120
122 m_B,
123 n_B,
124 buff_A, rs_A, cs_A,
125 buff_B, rs_B, cs_B );
126 }
127 else if ( dt_B == FLA_COMPLEX )
128 {
130
132 m_B,
133 n_B,
134 buff_A, rs_A, cs_A,
135 buff_B, rs_B, cs_B );
136 }
137 else if ( dt_B == FLA_DOUBLE_COMPLEX )
138 {
140
142 m_B,
143 n_B,
144 buff_A, rs_A, cs_A,
145 buff_B, rs_B, cs_B );
146 }
147 }
148 else if ( dt_A == FLA_DOUBLE )
149 {
150 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
151
152 if ( dt_B == FLA_FLOAT )
153 {
154 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
155
157 m_B,
158 n_B,
159 buff_A, rs_A, cs_A,
160 buff_B, rs_B, cs_B );
161 }
162 else if ( dt_B == FLA_DOUBLE )
163 {
164 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
165
167 m_B,
168 n_B,
169 buff_A, rs_A, cs_A,
170 buff_B, rs_B, cs_B );
171 }
172 else if ( dt_B == FLA_COMPLEX )
173 {
175
177 m_B,
178 n_B,
179 buff_A, rs_A, cs_A,
180 buff_B, rs_B, cs_B );
181 }
182 else if ( dt_B == FLA_DOUBLE_COMPLEX )
183 {
185
187 m_B,
188 n_B,
189 buff_A, rs_A, cs_A,
190 buff_B, rs_B, cs_B );
191 }
192 }
193 else if ( dt_A == FLA_COMPLEX )
194 {
196
197 if ( dt_B == FLA_FLOAT )
198 {
199 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
200
202 m_B,
203 n_B,
204 buff_A, rs_A, cs_A,
205 buff_B, rs_B, cs_B );
206 }
207 else if ( dt_B == FLA_DOUBLE )
208 {
209 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
210
212 m_B,
213 n_B,
214 buff_A, rs_A, cs_A,
215 buff_B, rs_B, cs_B );
216 }
217 else if ( dt_B == FLA_COMPLEX )
218 {
220
222 m_B,
223 n_B,
224 buff_A, rs_A, cs_A,
225 buff_B, rs_B, cs_B );
226 }
227 else if ( dt_B == FLA_DOUBLE_COMPLEX )
228 {
230
232 m_B,
233 n_B,
234 buff_A, rs_A, cs_A,
235 buff_B, rs_B, cs_B );
236 }
237 }
238 else if ( dt_A == FLA_DOUBLE_COMPLEX )
239 {
241
242 if ( dt_B == FLA_FLOAT )
243 {
244 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
245
247 m_B,
248 n_B,
249 buff_A, rs_A, cs_A,
250 buff_B, rs_B, cs_B );
251 }
252 else if ( dt_B == FLA_DOUBLE )
253 {
254 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
255
257 m_B,
258 n_B,
259 buff_A, rs_A, cs_A,
260 buff_B, rs_B, cs_B );
261 }
262 else if ( dt_B == FLA_COMPLEX )
263 {
265
267 m_B,
268 n_B,
269 buff_A, rs_A, cs_A,
270 buff_B, rs_B, cs_B );
271 }
272 else if ( dt_B == FLA_DOUBLE_COMPLEX )
273 {
275
277 m_B,
278 n_B,
279 buff_A, rs_A, cs_A,
280 buff_B, rs_B, cs_B );
281 }
282 }
283
284 return FLA_SUCCESS;
285}
FLA_Error FLA_Copy_check(FLA_Obj A, FLA_Obj B)
Definition FLA_Copy_check.c:13
FLA_Bool FLA_Obj_is_conformal_to(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition FLA_Query.c:438
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
void FLA_Param_map_flame_to_blis_trans(FLA_Trans trans, trans1_t *blis_trans)
Definition FLA_Param.c:245
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_zccopymt(trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:1300
void bl1_dccopymt(trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:898
void bl1_czcopymt(trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:1234
void bl1_dcopymt(trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymt.c:148
void bl1_zscopymt(trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymt.c:762
void bl1_ccopymt(trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:215
void bl1_cdcopymt(trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymt.c:964
void bl1_szcopymt(trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:696
void bl1_zdcopymt(trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymt.c:1098
void bl1_dzcopymt(trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:1032
void bl1_sccopymt(trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:562
void bl1_sdcopymt(trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_copymt.c:428
void bl1_dscopymt(trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymt.c:494
void bl1_icopymt(trans1_t trans, int m, int n, int *a, int a_rs, int a_cs, int *b, int b_rs, int b_cs)
Definition bl1_copymt.c:13
void bl1_zcopymt(trans1_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_copymt.c:286
void bl1_scopymt(trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymt.c:81
void bl1_cscopymt(trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_copymt.c:628
trans1_t
Definition blis_type_defs.h:53
Definition blis_type_defs.h:138
Definition blis_type_defs.h:133

References bl1_ccopymt(), bl1_cdcopymt(), bl1_cscopymt(), bl1_czcopymt(), bl1_dccopymt(), bl1_dcopymt(), bl1_dscopymt(), bl1_dzcopymt(), bl1_icopymt(), bl1_sccopymt(), bl1_scopymt(), bl1_sdcopymt(), bl1_szcopymt(), bl1_zccopymt(), bl1_zcopymt(), bl1_zdcopymt(), bl1_zscopymt(), FLA_Check_error_level(), FLA_Copy_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_is_conformal_to(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_trans(), and i.

Referenced by FLA_Accum_T_UT_fc_unb_var1(), FLA_Accum_T_UT_fr_unb_var1(), FLA_Apply_H2_UT_l_unb_var1(), FLA_Apply_H2_UT_piv_row(), FLA_Apply_H2_UT_r_unb_var1(), FLA_Apply_HUD_UT_lh_unb_var1(), FLA_Bidiag_UT_recover_tau_submatrix(), FLA_CAQR2_UT_unb_var1(), FLA_Chol_solve(), FLA_Copy(), FLA_Copy_task(), FLA_Eig_gest_il_unb_var3(), FLA_Eig_gest_il_unb_var4(), FLA_Eig_gest_il_unb_var5(), FLA_Eig_gest_iu_unb_var3(), FLA_Eig_gest_iu_unb_var4(), FLA_Eig_gest_iu_unb_var5(), FLA_Eig_gest_nl_unb_var4(), FLA_Eig_gest_nl_unb_var5(), FLA_Eig_gest_nu_unb_var4(), FLA_Eig_gest_nu_unb_var5(), FLA_Hess_UT_blf_var2(), FLA_Hess_UT_blf_var3(), FLA_Hess_UT_blf_var4(), FLA_Hess_UT_blk_var1(), FLA_Hess_UT_blk_var2(), FLA_Hess_UT_blk_var3(), FLA_Hess_UT_blk_var4(), FLA_Hess_UT_recover_tau_submatrix(), FLA_LQ_UT_solve(), FLA_LU_nopiv_solve(), FLA_LU_piv_copy_task(), FLA_LU_piv_solve(), FLA_QR_UT_recover_tau_submatrix(), FLA_QR_UT_solve(), FLA_SA_LU_unb(), FLA_Tridiag_UT_l_blf_var3(), FLA_Tridiag_UT_l_blk_var3(), FLA_Tridiag_UT_recover_tau_submatrix(), FLA_Trmvsx_external(), FLA_Trsvsx_external(), FLA_UDdate_UT_solve(), and FLASH_Copy_hierarchy().