libflame revision_anchor
Functions
blis_prototypes_level2.h File Reference

(r)

Go to the source code of this file.

Functions

void bl1_sgemv (trans1_t transa, conj1_t conjx, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
 
void bl1_dgemv (trans1_t transa, conj1_t conjx, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
 
void bl1_cgemv (trans1_t transa, conj1_t conjx, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
 
void bl1_zgemv (trans1_t transa, conj1_t conjx, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
 
void bl1_sgemv_blas (trans1_t transa, int m, int n, float *alpha, float *a, int lda, float *x, int incx, float *beta, float *y, int incy)
 
void bl1_dgemv_blas (trans1_t transa, int m, int n, double *alpha, double *a, int lda, double *x, int incx, double *beta, double *y, int incy)
 
void bl1_cgemv_blas (trans1_t transa, int m, int n, scomplex *alpha, scomplex *a, int lda, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
 
void bl1_zgemv_blas (trans1_t transa, int m, int n, dcomplex *alpha, dcomplex *a, int lda, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
 
void bl1_sger (conj1_t conjx, conj1_t conjy, int m, int n, float *alpha, float *x, int incx, float *y, int incy, float *a, int a_rs, int a_cs)
 
void bl1_dger (conj1_t conjx, conj1_t conjy, int m, int n, double *alpha, double *x, int incx, double *y, int incy, double *a, int a_rs, int a_cs)
 
void bl1_cger (conj1_t conjx, conj1_t conjy, int m, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int a_rs, int a_cs)
 
void bl1_zger (conj1_t conjx, conj1_t conjy, int m, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int a_rs, int a_cs)
 
void bl1_sger_blas (int m, int n, float *alpha, float *x, int incx, float *y, int incy, float *a, int lda)
 
void bl1_dger_blas (int m, int n, double *alpha, double *x, int incx, double *y, int incy, double *a, int lda)
 
void bl1_cgerc_blas (int m, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
 
void bl1_cgeru_blas (int m, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
 
void bl1_zgerc_blas (int m, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
 
void bl1_zgeru_blas (int m, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
 
void bl1_shemv (uplo1_t uplo, conj1_t conj, int m, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
 
void bl1_dhemv (uplo1_t uplo, conj1_t conj, int m, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
 
void bl1_chemv (uplo1_t uplo, conj1_t conj, int m, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
 
void bl1_zhemv (uplo1_t uplo, conj1_t conj, int m, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
 
void bl1_chemv_blas (uplo1_t uplo, int m, scomplex *alpha, scomplex *a, int lda, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
 
void bl1_zhemv_blas (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *a, int lda, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
 
void bl1_sher (uplo1_t uplo, conj1_t conj, int m, float *alpha, float *x, int incx, float *a, int a_rs, int a_cs)
 
void bl1_dher (uplo1_t uplo, conj1_t conj, int m, double *alpha, double *x, int incx, double *a, int a_rs, int a_cs)
 
void bl1_cher (uplo1_t uplo, conj1_t conj, int m, float *alpha, scomplex *x, int incx, scomplex *a, int a_rs, int a_cs)
 
void bl1_zher (uplo1_t uplo, conj1_t conj, int m, double *alpha, dcomplex *x, int incx, dcomplex *a, int a_rs, int a_cs)
 
void bl1_cher_blas (uplo1_t uplo, int m, float *alpha, scomplex *x, int incx, scomplex *a, int lda)
 
void bl1_zher_blas (uplo1_t uplo, int m, double *alpha, dcomplex *x, int incx, dcomplex *a, int lda)
 
void bl1_sher2 (uplo1_t uplo, conj1_t conj, int m, float *alpha, float *x, int incx, float *y, int incy, float *a, int a_rs, int a_cs)
 
void bl1_dher2 (uplo1_t uplo, conj1_t conj, int m, double *alpha, double *x, int incx, double *y, int incy, double *a, int a_rs, int a_cs)
 
void bl1_cher2 (uplo1_t uplo, conj1_t conj, int m, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int a_rs, int a_cs)
 
void bl1_zher2 (uplo1_t uplo, conj1_t conj, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int a_rs, int a_cs)
 
void bl1_cher2_blas (uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
 
void bl1_zher2_blas (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
 
void bl1_ssymv (uplo1_t uplo, int m, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
 
void bl1_dsymv (uplo1_t uplo, int m, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
 
void bl1_csymv (uplo1_t uplo, int m, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
 
void bl1_zsymv (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
 
void bl1_ssymv_blas (uplo1_t uplo, int m, float *alpha, float *a, int lda, float *x, int incx, float *beta, float *y, int incy)
 
void bl1_dsymv_blas (uplo1_t uplo, int m, double *alpha, double *a, int lda, double *x, int incx, double *beta, double *y, int incy)
 
void bl1_csymv_blas (uplo1_t uplo, int m, scomplex *alpha, scomplex *a, int lda, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
 
void bl1_zsymv_blas (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *a, int lda, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
 
void bl1_ssyr (uplo1_t uplo, int m, float *alpha, float *x, int incx, float *a, int a_rs, int a_cs)
 
void bl1_dsyr (uplo1_t uplo, int m, double *alpha, double *x, int incx, double *a, int a_rs, int a_cs)
 
void bl1_csyr (uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *a, int a_rs, int a_cs)
 
void bl1_zsyr (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *a, int a_rs, int a_cs)
 
void bl1_ssyr_blas (uplo1_t uplo, int m, float *alpha, float *x, int incx, float *a, int lda)
 
void bl1_dsyr_blas (uplo1_t uplo, int m, double *alpha, double *x, int incx, double *a, int lda)
 
void bl1_csyr_blas (uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *a, int lda)
 
void bl1_zsyr_blas (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *a, int lda)
 
void bl1_ssyr2 (uplo1_t uplo, int m, float *alpha, float *x, int incx, float *y, int incy, float *a, int a_rs, int a_cs)
 
void bl1_dsyr2 (uplo1_t uplo, int m, double *alpha, double *x, int incx, double *y, int incy, double *a, int a_rs, int a_cs)
 
void bl1_csyr2 (uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int a_rs, int a_cs)
 
void bl1_zsyr2 (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int a_rs, int a_cs)
 
void bl1_ssyr2_blas (uplo1_t uplo, int m, float *alpha, float *x, int incx, float *y, int incy, float *a, int lda)
 
void bl1_dsyr2_blas (uplo1_t uplo, int m, double *alpha, double *x, int incx, double *y, int incy, double *a, int lda)
 
void bl1_csyr2_blas (uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
 
void bl1_zsyr2_blas (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
 
void bl1_strmv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int a_rs, int a_cs, float *x, int incx)
 
void bl1_dtrmv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int a_rs, int a_cs, double *x, int incx)
 
void bl1_ctrmv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx)
 
void bl1_ztrmv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx)
 
void bl1_strmv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int lda, float *x, int incx)
 
void bl1_dtrmv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int lda, double *x, int incx)
 
void bl1_ctrmv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int lda, scomplex *x, int incx)
 
void bl1_ztrmv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int lda, dcomplex *x, int incx)
 
void bl1_strsv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int a_rs, int a_cs, float *x, int incx)
 
void bl1_dtrsv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int a_rs, int a_cs, double *x, int incx)
 
void bl1_ctrsv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx)
 
void bl1_ztrsv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx)
 
void bl1_strsv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int lda, float *x, int incx)
 
void bl1_dtrsv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int lda, double *x, int incx)
 
void bl1_ctrsv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int lda, scomplex *x, int incx)
 
void bl1_ztrsv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int lda, dcomplex *x, int incx)
 
void bl1_strmvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
 
void bl1_dtrmvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
 
void bl1_ctrmvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
 
void bl1_ztrmvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
 
void bl1_strsvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
 
void bl1_dtrsvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
 
void bl1_ctrsvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
 
void bl1_ztrsvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
 

Function Documentation

◆ bl1_cgemv()

void bl1_cgemv ( trans1_t  transa,
conj1_t  conjx,
int  m,
int  n,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)
126{
127 scomplex* a_save = a;
128 int a_rs_save = a_rs;
129 int a_cs_save = a_cs;
130 scomplex zero = bl1_c0();
131 scomplex one = bl1_c1();
133 scomplex* ax;
134 int lda, inca;
135 int n_x;
136 int incx_conj;
137 int incax;
138
139 // Return early if possible.
140 if ( bl1_zero_dim2( m, n ) )
141 {
142 int n_elem;
143
144 if ( bl1_does_trans( transa ) ) n_elem = n;
145 else n_elem = m;
146
148 n_elem,
149 beta,
150 y, incy );
151 return;
152 }
153
154 // If necessary, allocate, initialize, and use a temporary contiguous
155 // copy of the matrix rather than the original matrix.
157 n,
159 &a, &a_rs, &a_cs );
160
161 // Initialize with values assuming column-major storage.
162 lda = a_cs;
163 inca = a_rs;
164
165 // If A is a row-major matrix, then we can use the underlying column-major
166 // BLAS implementation by fiddling with the parameters.
167 if ( bl1_is_row_storage( a_rs, a_cs ) )
168 {
169 bl1_swap_ints( m, n );
172 }
173
174 // Initialize with values assuming no conjugation of x.
175 x_conj = x;
176 incx_conj = incx;
177
178 // We need a temporary vector for the cases when x is conjugated, and
179 // also for the cases where A is conjugated.
181 {
182 if ( bl1_does_trans( transa ) ) n_x = m;
183 else n_x = n;
184
186 incx_conj = 1;
187
189 n_x,
190 x, incx,
191 x_conj, incx_conj );
192 }
193
194 // We want to handle the conjnotrans case, but without explicitly
195 // conjugating A. To do so, we leverage the fact that computing the
196 // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
197 if ( bl1_is_conjnotrans( transa ) )
198 {
199 // We need a temporary vector for the product A * conj(x), which is
200 // conformal to y. We know we are not transposing, so y is length m.
201 ax = bl1_callocv( m );
202 incax = 1;
203
204 // Start by conjugating the contents of the temporary copy of x.
205 bl1_cconjv( n,
206 x_conj, incx_conj );
207
208 // Compute A * conj(x) where x is the temporary copy of x created above.
210 m,
211 n,
212 &one,
213 a, lda,
215 &zero,
216 ax, incax );
217
218 // Scale y by beta.
220 m,
221 beta,
222 y, incy );
223
224 // And finally, accumulate alpha * conj( A * conj(x) ) into y.
226 m,
227 alpha,
228 ax, incax,
229 y, incy);
230
231 // Free the temporary vector for Ax.
232 bl1_cfree( ax );
233 }
234 else // notrans, trans, or conjtrans
235 {
237 m,
238 n,
239 alpha,
240 a, lda,
242 beta,
243 y, incy );
244 }
245
246 // Free the temporary conjugated x vector.
248 bl1_cfree( x_conj );
249
250 // Free the temporary contiguous matrix.
252 &a, &a_rs, &a_cs );
253}
int i
Definition bl1_axmyv2.c:145
void bl1_caxpyv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy)
Definition bl1_axpyv.c:29
void bl1_cconjv(int m, scomplex *x, int incx)
Definition bl1_conjv.c:23
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition bl1_copyv.c:49
void bl1_cgemv_blas(trans1_t transa, int m, int n, scomplex *alpha, scomplex *a, int lda, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
Definition bl1_gemv.c:453
void bl1_cscalv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx)
Definition bl1_scalv.c:46
int bl1_is_row_storage(int rs, int cs)
Definition bl1_is.c:95
int bl1_is_conjnotrans(trans1_t trans)
Definition bl1_is.c:25
int bl1_is_conj(conj1_t conj)
Definition bl1_is.c:42
int bl1_zero_dim2(int m, int n)
Definition bl1_is.c:118
int bl1_does_trans(trans1_t trans)
Definition bl1_does.c:13
void bl1_cfree_contigm(scomplex *a_save, int a_rs_save, int a_cs_save, scomplex **a, int *a_rs, int *a_cs)
Definition bl1_free_contigm.c:45
scomplex bl1_c1(void)
Definition bl1_constants.c:61
void bl1_cfree(scomplex *p)
Definition bl1_free.c:40
void bl1_ccreate_contigm(int m, int n, scomplex *a_save, int a_rs_save, int a_cs_save, scomplex **a, int *a_rs, int *a_cs)
Definition bl1_create_contigm.c:81
scomplex bl1_c0(void)
Definition bl1_constants.c:125
scomplex * bl1_callocv(unsigned int n_elem)
Definition bl1_allocv.c:40
@ BLIS1_NO_TRANSPOSE
Definition blis_type_defs.h:54
@ BLIS1_CONJUGATE
Definition blis_type_defs.h:82
@ BLIS1_NO_CONJUGATE
Definition blis_type_defs.h:81
Definition blis_type_defs.h:133

References bl1_c0(), bl1_c1(), bl1_callocv(), bl1_caxpyv(), bl1_cconjv(), bl1_ccopyv(), bl1_ccreate_contigm(), bl1_cfree(), bl1_cfree_contigm(), bl1_cgemv_blas(), bl1_cscalv(), bl1_does_trans(), bl1_is_conj(), bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_zero_dim2(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Accum_T_UT_fc_opc_var1(), FLA_Accum_T_UT_fr_opc_var1(), FLA_Apply_H2_UT_l_opc_var1(), FLA_Apply_H2_UT_r_opc_var1(), FLA_Apply_HUD_UT_l_opc_var1(), FLA_Bidiag_UT_u_step_ofc_var2(), FLA_Bidiag_UT_u_step_ofc_var3(), FLA_Bidiag_UT_u_step_ofc_var4(), FLA_Bidiag_UT_u_step_opc_var1(), FLA_Bidiag_UT_u_step_opc_var2(), FLA_Bidiag_UT_u_step_opc_var3(), FLA_Bidiag_UT_u_step_opc_var4(), FLA_Bidiag_UT_u_step_opc_var5(), FLA_CAQR2_UT_opc_var1(), FLA_Chol_l_opc_var2(), FLA_Chol_u_opc_var2(), FLA_Eig_gest_il_opc_var2(), FLA_Eig_gest_il_opc_var3(), FLA_Eig_gest_iu_opc_var2(), FLA_Eig_gest_iu_opc_var3(), FLA_Eig_gest_nl_opc_var2(), FLA_Eig_gest_nu_opc_var2(), FLA_Gemv_external(), FLA_Gemvc_external(), FLA_Hess_UT_step_ofc_var2(), FLA_Hess_UT_step_ofc_var3(), FLA_Hess_UT_step_ofc_var4(), FLA_Hess_UT_step_opc_var1(), FLA_Hess_UT_step_opc_var2(), FLA_Hess_UT_step_opc_var3(), FLA_Hess_UT_step_opc_var4(), FLA_Hess_UT_step_opc_var5(), FLA_LQ_UT_opc_var2(), FLA_LU_nopiv_opc_var2(), FLA_LU_nopiv_opc_var3(), FLA_LU_nopiv_opc_var4(), FLA_LU_piv_opc_var3(), FLA_LU_piv_opc_var4(), FLA_Lyap_h_opc_var2(), FLA_Lyap_h_opc_var3(), FLA_Lyap_n_opc_var2(), FLA_Lyap_n_opc_var3(), FLA_QR2_UT_opc_var1(), FLA_QR_UT_opc_var2(), FLA_Tridiag_UT_l_step_ofc_var2(), FLA_Tridiag_UT_l_step_ofc_var3(), FLA_Tridiag_UT_l_step_opc_var1(), FLA_Tridiag_UT_l_step_opc_var2(), FLA_Tridiag_UT_l_step_opc_var3(), FLA_Ttmm_l_opc_var2(), and FLA_Ttmm_u_opc_var2().

◆ bl1_cgemv_blas()

void bl1_cgemv_blas ( trans1_t  transa,
int  m,
int  n,
scomplex alpha,
scomplex a,
int  lda,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)
454{
455#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
458
460
463 m,
464 n,
465 alpha,
466 a, lda,
467 x, incx,
468 beta,
469 y, incy );
470#else
471 char blas_transa;
472
474
476 &m,
477 &n,
478 alpha,
479 a, &lda,
480 x, &incx,
481 beta,
482 y, &incy );
483#endif
484}
void F77_cgemv(char *transa, int *m, int *n, scomplex *alpha, scomplex *a, int *lda, scomplex *x, int *incx, scomplex *beta, scomplex *y, int *incy)
CBLAS_ORDER
Definition blis_prototypes_cblas.h:17
@ CblasColMajor
Definition blis_prototypes_cblas.h:17
void cblas_cgemv(const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)
CBLAS_TRANSPOSE
Definition blis_prototypes_cblas.h:18
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition bl1_param_map.c:15

References bl1_param_map_to_netlib_trans(), cblas_cgemv(), CblasColMajor, and F77_cgemv().

Referenced by bl1_cgemv().

◆ bl1_cger()

void bl1_cger ( conj1_t  conjx,
conj1_t  conjy,
int  m,
int  n,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  a_rs,
int  a_cs 
)
112{
113 int m_save = m;
114 int n_save = n;
115 scomplex* a_save = a;
116 int a_rs_save = a_rs;
117 int a_cs_save = a_cs;
119 int incx_conj;
120 int lda, inca;
121
122 // Return early if possible.
123 if ( bl1_zero_dim2( m, n ) ) return;
124
125 // If necessary, allocate, initialize, and use a temporary contiguous
126 // copy of the matrix rather than the original matrix.
128 n,
130 &a, &a_rs, &a_cs );
131
132 // Initialize with values assuming column-major storage.
133 lda = a_cs;
134 inca = a_rs;
135
136 // If A is a row-major matrix, then we can use the underlying column-major
137 // BLAS implementation by fiddling with the parameters.
138 if ( bl1_is_row_storage( a_rs, a_cs ) )
139 {
140 bl1_swap_ints( m, n );
145 }
146
147 // Initialize with values assuming no conjugation of x.
148 x_conj = x;
149 incx_conj = incx;
150
151 // We need a temporary vector for the cases when x is conjugated.
152 if ( bl1_is_conj( conjx ) )
153 {
154 x_conj = bl1_callocv( m );
155 incx_conj = 1;
156
158 m,
159 x, incx,
160 x_conj, incx_conj );
161 }
162
163 // Conjugation of y is supported in the BLAS.
164 if ( bl1_is_conj( conjy ) )
165 {
167 n,
168 alpha,
170 y, incy,
171 a, lda );
172 }
173 else
174 {
176 n,
177 alpha,
179 y, incy,
180 a, lda );
181 }
182
183 // Free the temporary conjugated x vector.
184 if ( bl1_is_conj( conjx ) )
185 bl1_cfree( x_conj );
186
187 // Free the temporary contiguous matrix.
189 n_save,
191 &a, &a_rs, &a_cs );
192}
void bl1_cgerc_blas(int m, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
Definition bl1_ger.c:323
void bl1_cgeru_blas(int m, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
Definition bl1_ger.c:345
void bl1_cfree_saved_contigm(int m, int n, scomplex *a_save, int a_rs_save, int a_cs_save, scomplex **a, int *a_rs, int *a_cs)
Definition bl1_free_saved_contigm.c:59

References bl1_callocv(), bl1_ccopyv(), bl1_ccreate_contigm(), bl1_cfree(), bl1_cfree_saved_contigm(), bl1_cgerc_blas(), bl1_cgeru_blas(), bl1_is_conj(), bl1_is_row_storage(), bl1_zero_dim2(), and BLIS1_CONJUGATE.

Referenced by FLA_Apply_H2_UT_l_opc_var1(), FLA_Apply_H2_UT_r_opc_var1(), FLA_Apply_HUD_UT_l_opc_var1(), FLA_Bidiag_UT_u_step_ofc_var3(), FLA_Bidiag_UT_u_step_opc_var2(), FLA_Bidiag_UT_u_step_opc_var3(), FLA_Eig_gest_il_opc_var3(), FLA_Eig_gest_il_opc_var4(), FLA_Eig_gest_iu_opc_var3(), FLA_Eig_gest_iu_opc_var4(), FLA_Eig_gest_nl_opc_var4(), FLA_Eig_gest_nu_opc_var4(), FLA_Ger_external(), FLA_Gerc_external(), FLA_Hess_UT_step_ofc_var2(), FLA_Hess_UT_step_ofc_var3(), FLA_Hess_UT_step_ofc_var4(), FLA_Hess_UT_step_opc_var2(), FLA_Hess_UT_step_opc_var3(), FLA_Hess_UT_step_opc_var4(), FLA_LU_nopiv_opc_var5(), FLA_LU_piv_opc_var5(), FLA_Lyap_h_opc_var2(), FLA_Lyap_n_opc_var2(), FLA_SA_LU_unb(), FLA_Trinv_ln_opc_var3(), FLA_Trinv_ln_opc_var4(), FLA_Trinv_lu_opc_var3(), FLA_Trinv_lu_opc_var4(), FLA_Trinv_un_opc_var3(), FLA_Trinv_un_opc_var4(), FLA_Trinv_uu_opc_var3(), and FLA_Trinv_uu_opc_var4().

◆ bl1_cgerc_blas()

void bl1_cgerc_blas ( int  m,
int  n,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  lda 
)
324{
325#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
327
329 m,
330 n,
331 alpha,
332 x, incx,
333 y, incy,
334 a, lda );
335#else
336 F77_cgerc ( &m,
337 &n,
338 alpha,
339 x, &incx,
340 y, &incy,
341 a, &lda );
342#endif
343}
void F77_cgerc(int *m, int *n, scomplex *alpha, scomplex *x, int *incx, scomplex *y, int *incy, scomplex *a, int *lda)
void cblas_cgerc(const enum CBLAS_ORDER order, const int M, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)

References cblas_cgerc(), CblasColMajor, and F77_cgerc().

Referenced by bl1_cger().

◆ bl1_cgeru_blas()

void bl1_cgeru_blas ( int  m,
int  n,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  lda 
)
346{
347#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
349
351 m,
352 n,
353 alpha,
354 x, incx,
355 y, incy,
356 a, lda );
357#else
358 F77_cgeru ( &m,
359 &n,
360 alpha,
361 x, &incx,
362 y, &incy,
363 a, &lda );
364#endif
365}
void F77_cgeru(int *m, int *n, scomplex *alpha, scomplex *x, int *incx, scomplex *y, int *incy, scomplex *a, int *lda)
void cblas_cgeru(const enum CBLAS_ORDER order, const int M, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)

References cblas_cgeru(), CblasColMajor, and F77_cgeru().

Referenced by bl1_cger().

◆ bl1_chemv()

void bl1_chemv ( uplo1_t  uplo,
conj1_t  conj,
int  m,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)
36{
37 scomplex* a_save = a;
38 int a_rs_save = a_rs;
39 int a_cs_save = a_cs;
43 scomplex* ax;
44 int lda, inca;
45 int incx_conj;
46 int incax;
47
48 // Return early if possible.
49 if ( bl1_zero_dim1( m ) ) return;
50
51 // If necessary, allocate, initialize, and use a temporary contiguous
52 // copy of the matrix rather than the original matrix.
54 m,
55 m,
57 &a, &a_rs, &a_cs );
58
59 // Initialize with values assuming column-major storage.
60 lda = a_cs;
61 inca = a_rs;
62
63 // If A is a row-major matrix, then we can use the underlying column-major
64 // BLAS implementation by fiddling with the parameters.
66 {
68 bl1_toggle_uplo( uplo );
70 }
71
72 // We want to handle the case where A is conjugated, but without
73 // explicitly or conjugating A. To do so, we leverage the fact that
74 // computing the product conj(A) * x is equivalent to computing
75 // conj( A * conj(x) ).
76 if ( bl1_is_conj( conj ) )
77 {
78 // We need a temporary vector so we can create a conjugated copy of x.
79 x_conj = bl1_callocv( m );
80 incx_conj = 1;
81
83 m,
84 x, incx,
86
87 // We need a temporary vector for the product A * conj(x), which is
88 // conformal to y (and x).
89 ax = bl1_callocv( m );
90 incax = 1;
91
92 // Compute A * conj(x) where x is the temporary copy of x created above.
93 bl1_chemv_blas( uplo,
94 m,
95 &one,
96 a, lda,
98 &zero,
99 ax, incax );
100
101 // Scale y by beta.
103 m,
104 beta,
105 y, incy );
106
107 // And finally, accumulate alpha * conj( A * conj(x) ) into y.
109 m,
110 alpha,
111 ax, incax,
112 y, incy);
113
114 // Free the temporary vectors for x and Ax.
115 bl1_cfree( x_conj );
116 bl1_cfree( ax );
117 }
118 else // noconj
119 {
120 bl1_chemv_blas( uplo,
121 m,
122 alpha,
123 a, lda,
124 x, incx,
125 beta,
126 y, incy );
127 }
128
129 // Free the temporary contiguous matrix.
131 &a, &a_rs, &a_cs );
132}
void bl1_chemv_blas(uplo1_t uplo, int m, scomplex *alpha, scomplex *a, int lda, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
Definition bl1_hemv.c:235
int bl1_zero_dim1(int m)
Definition bl1_is.c:113
void bl1_ccreate_contigmr(uplo1_t uplo, int m, int n, scomplex *a_save, int a_rs_save, int a_cs_save, scomplex **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmr.c:77

References bl1_c0(), bl1_c1(), bl1_callocv(), bl1_caxpyv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_contigm(), bl1_chemv_blas(), bl1_cscalv(), bl1_is_conj(), bl1_is_row_storage(), bl1_zero_dim1(), BLIS1_CONJUGATE, and BLIS1_NO_CONJUGATE.

Referenced by FLA_Eig_gest_il_opc_var1(), FLA_Eig_gest_il_opc_var2(), FLA_Eig_gest_iu_opc_var1(), FLA_Eig_gest_iu_opc_var2(), FLA_Eig_gest_nl_opc_var1(), FLA_Eig_gest_nl_opc_var2(), FLA_Eig_gest_nu_opc_var1(), FLA_Eig_gest_nu_opc_var2(), FLA_Hemv_external(), FLA_Hemvc_external(), FLA_Lyap_h_opc_var1(), FLA_Lyap_n_opc_var1(), FLA_Tridiag_UT_l_step_ofc_var2(), FLA_Tridiag_UT_l_step_ofc_var3(), FLA_Tridiag_UT_l_step_opc_var1(), FLA_Tridiag_UT_l_step_opc_var2(), and FLA_Tridiag_UT_l_step_opc_var3().

◆ bl1_chemv_blas()

void bl1_chemv_blas ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex a,
int  lda,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)
236{
237#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
240
242
245 m,
246 alpha,
247 a, lda,
248 x, incx,
249 beta,
250 y, incy );
251#else
252 char blas_uplo;
253
255
257 &m,
258 alpha,
259 a, &lda,
260 x, &incx,
261 beta,
262 y, &incy );
263#endif
264}
void F77_chemv(char *uplo, int *n, scomplex *alpha, scomplex *a, int *lda, scomplex *x, int *incx, scomplex *beta, scomplex *y, int *incy)
CBLAS_UPLO
Definition blis_prototypes_cblas.h:19
void cblas_chemv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition bl1_param_map.c:47

References bl1_param_map_to_netlib_uplo(), cblas_chemv(), CblasColMajor, and F77_chemv().

Referenced by bl1_chemv().

◆ bl1_cher()

void bl1_cher ( uplo1_t  uplo,
conj1_t  conj,
int  m,
float alpha,
scomplex x,
int  incx,
scomplex a,
int  a_rs,
int  a_cs 
)
32{
33 int m_save = m;
34 scomplex* a_save = a;
35 int a_rs_save = a_rs;
36 int a_cs_save = a_cs;
38 int incx_conj;
39 int lda, inca;
40
41 // Return early if possible.
42 if ( bl1_zero_dim1( m ) ) return;
43
44 // If necessary, allocate, initialize, and use a temporary contiguous
45 // copy of the matrix rather than the original matrix.
47 m,
48 m,
50 &a, &a_rs, &a_cs );
51
52 // Initialize with values assuming column-major storage.
53 lda = a_cs;
54 inca = a_rs;
55
56 // If A is a row-major matrix, then we can use the underlying column-major
57 // BLAS implementation by fiddling with the parameters.
59 {
61 bl1_toggle_uplo( uplo );
63 }
64
65 // Initialize with values assuming no conjugation of ( x * x' ).
66 x_conj = x;
68
69 // We want to handle the case where ( x * x' ) is conjugated, but
70 // without explicitly conjugating the matrix. To do so, we leverage
71 // the fact that computing the product conj( x * x' ) is equivalent
72 // to computing ( conj(x) * conj(x)' ), since ( x * x' ) is Hermitian.
73 if ( bl1_is_conj( conj ) )
74 {
75 x_conj = bl1_callocv( m );
76 incx_conj = 1;
77
79 m,
80 x, incx,
82 }
83
84 bl1_cher_blas( uplo,
85 m,
86 alpha,
88 a, lda );
89
90 // Free the temporary conjugated x vector.
91 if ( bl1_is_conj( conj ) )
93
94 // Free the temporary contiguous matrix.
96 m_save,
98 &a, &a_rs, &a_cs );
99}
void bl1_cher_blas(uplo1_t uplo, int m, float *alpha, scomplex *x, int incx, scomplex *a, int lda)
Definition bl1_her.c:173

References bl1_callocv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_saved_contigm(), bl1_cher_blas(), bl1_is_conj(), bl1_is_row_storage(), bl1_zero_dim1(), and BLIS1_CONJUGATE.

Referenced by FLA_Chol_l_opc_var3(), FLA_Chol_u_opc_var3(), FLA_Her_external(), FLA_Herc_external(), FLA_Ttmm_l_opc_var1(), and FLA_Ttmm_u_opc_var1().

◆ bl1_cher2()

void bl1_cher2 ( uplo1_t  uplo,
conj1_t  conj,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  a_rs,
int  a_cs 
)
34{
35 int m_save = m;
36 scomplex* a_save = a;
37 int a_rs_save = a_rs;
38 int a_cs_save = a_cs;
41 int incx_conj;
42 int incy_conj;
43 int lda, inca;
44
45 // Return early if possible.
46 if ( bl1_zero_dim1( m ) ) return;
47
48 // If necessary, allocate, initialize, and use a temporary contiguous
49 // copy of the matrix rather than the original matrix.
51 m,
52 m,
54 &a, &a_rs, &a_cs );
55
56 // Initialize with values assuming column-major storage.
57 lda = a_cs;
58 inca = a_rs;
59
60 // If A is a row-major matrix, then we can use the underlying column-major
61 // BLAS implementation by fiddling with the parameters.
63 {
65 bl1_toggle_uplo( uplo );
67 }
68
69 // Initialize with values assuming no conjugation of ( x * y' ) or
70 // ( y * x' ).
71 x_conj = x;
73 y_conj = y;
75
76 // We want to handle the case where ( x * y' ) and ( y * x' ) are
77 // conjugated, but without explicitly conjugating the matrices. To do
78 // so, we leverage the fact that computing the products conj( x * y' )
79 // and conj( y * x' ) is equivalent to computing ( conj(x) * conj(y)' )
80 // and ( conj(y) * conj(x)' ), respectively.
81 if ( bl1_is_conj( conj ) )
82 {
83 x_conj = bl1_callocv( m );
84 incx_conj = 1;
85
86 y_conj = bl1_callocv( m );
87 incy_conj = 1;
88
90 m,
91 x, incx,
93
95 m,
96 y, incy,
98 }
99
100 bl1_cher2_blas( uplo,
101 m,
102 alpha,
105 a, lda );
106
107 // Free the temporary conjugated x and y vectors.
108 if ( bl1_is_conj( conj ) )
109 {
110 bl1_cfree( x_conj );
111 bl1_cfree( y_conj );
112 }
113
114 // Free the temporary contiguous matrix.
116 m_save,
118 &a, &a_rs, &a_cs );
119}
void bl1_cher2_blas(uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
Definition bl1_her2.c:211

References bl1_callocv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_saved_contigm(), bl1_cher2_blas(), bl1_is_conj(), bl1_is_row_storage(), bl1_zero_dim1(), and BLIS1_CONJUGATE.

Referenced by FLA_Eig_gest_il_opc_var4(), FLA_Eig_gest_il_opc_var5(), FLA_Eig_gest_iu_opc_var4(), FLA_Eig_gest_iu_opc_var5(), FLA_Eig_gest_nl_opc_var4(), FLA_Eig_gest_nl_opc_var5(), FLA_Eig_gest_nu_opc_var4(), FLA_Eig_gest_nu_opc_var5(), FLA_Her2_external(), FLA_Her2c_external(), FLA_Lyap_h_opc_var4(), FLA_Lyap_n_opc_var4(), FLA_Tridiag_UT_l_step_ofc_var2(), FLA_Tridiag_UT_l_step_opc_var1(), and FLA_Tridiag_UT_l_step_opc_var2().

◆ bl1_cher2_blas()

void bl1_cher2_blas ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  lda 
)
212{
213#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
216
218
221 m,
222 alpha,
223 x, incx,
224 y, incy,
225 a, lda );
226#else
227 char blas_uplo;
228
230
232 &m,
233 alpha,
234 x, &incx,
235 y, &incy,
236 a, &lda );
237#endif
238}
void F77_cher2(char *uplo, int *n, scomplex *alpha, scomplex *x, int *incx, scomplex *y, int *incy, scomplex *a, int *lda)
void cblas_cher2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)

References bl1_param_map_to_netlib_uplo(), cblas_cher2(), CblasColMajor, and F77_cher2().

Referenced by bl1_cher2().

◆ bl1_cher_blas()

void bl1_cher_blas ( uplo1_t  uplo,
int  m,
float alpha,
scomplex x,
int  incx,
scomplex a,
int  lda 
)
174{
175#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
178
180
183 m,
184 *alpha,
185 x, incx,
186 a, lda );
187#else
188 char blas_uplo;
189
191
193 &m,
194 alpha,
195 x, &incx,
196 a, &lda );
197#endif
198}
void F77_cher(char *uplo, int *n, float *alpha, scomplex *x, int *incx, scomplex *a, int *lda)
void cblas_cher(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const void *X, const int incX, void *A, const int lda)

References bl1_param_map_to_netlib_uplo(), cblas_cher(), CblasColMajor, and F77_cher().

Referenced by bl1_cher().

◆ bl1_csymv()

void bl1_csymv ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)
100{
101 scomplex* a_save = a;
102 int a_rs_save = a_rs;
103 int a_cs_save = a_cs;
104 int lda, inca;
105
106 // Return early if possible.
107 if ( bl1_zero_dim1( m ) ) return;
108
109 // If necessary, allocate, initialize, and use a temporary contiguous
110 // copy of the matrix rather than the original matrix.
112 m,
113 m,
115 &a, &a_rs, &a_cs );
116
117 // Initialize with values assuming column-major storage.
118 lda = a_cs;
119 inca = a_rs;
120
121 // If A is a row-major matrix, then we can use the underlying column-major
122 // BLAS implementation by fiddling with the parameters.
123 if ( bl1_is_row_storage( a_rs, a_cs ) )
124 {
126 bl1_toggle_uplo( uplo );
127 }
128
129 bl1_csymv_blas( uplo,
130 m,
131 alpha,
132 a, lda,
133 x, incx,
134 beta,
135 y, incy );
136
137 // Free the temporary contiguous matrix.
139 &a, &a_rs, &a_cs );
140}
void bl1_csymv_blas(uplo1_t uplo, int m, scomplex *alpha, scomplex *a, int lda, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
Definition bl1_symv.c:249

References bl1_ccreate_contigmr(), bl1_cfree_contigm(), bl1_csymv_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by FLA_Symv_external().

◆ bl1_csymv_blas()

void bl1_csymv_blas ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex a,
int  lda,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)
250{
253 int n = 1;
254 int ldx = m;
255 int ldy = m;
256
257#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
261
264
265 x_copy = bl1_callocv( m );
266 y_copy = bl1_callocv( m );
267
269 m,
270 x, incx,
271 x_copy, 1 );
272
274 m,
275 y, incy,
276 y_copy, 1 );
277
281 m,
282 n,
283 alpha,
284 a, lda,
285 x_copy, ldx,
286 beta,
287 y_copy, ldy );
288
290 m,
291 y_copy, 1,
292 y, incy );
293
294 bl1_cfree( x_copy );
295 bl1_cfree( y_copy );
296
297#else
298 char blas_side;
299 char blas_uplo;
300
303
304 x_copy = bl1_callocv( m );
305 y_copy = bl1_callocv( m );
306
308 m,
309 x, incx,
310 x_copy, 1 );
311
313 m,
314 y, incy,
315 y_copy, 1 );
316
318 &blas_uplo,
319 &m,
320 &n,
321 alpha,
322 a, &lda,
323 x_copy, &ldx,
324 beta,
325 y_copy, &ldy );
326
328 m,
329 y_copy, 1,
330 y, incy );
331
332 bl1_cfree( x_copy );
333 bl1_cfree( y_copy );
334#endif
335}
void F77_csymm(char *side, char *uplo, int *m, int *n, scomplex *alpha, scomplex *a, int *lda, scomplex *b, int *ldb, scomplex *beta, scomplex *c, int *ldc)
CBLAS_SIDE
Definition blis_prototypes_cblas.h:21
void cblas_csymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const int M, const int N, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)
void bl1_param_map_to_netlib_side(side1_t blis_side, void *blas_side)
Definition bl1_param_map.c:71
@ BLIS1_LEFT
Definition blis_type_defs.h:68

References bl1_callocv(), bl1_ccopyv(), bl1_cfree(), bl1_param_map_to_netlib_side(), bl1_param_map_to_netlib_uplo(), BLIS1_LEFT, BLIS1_NO_CONJUGATE, cblas_csymm(), CblasColMajor, and F77_csymm().

Referenced by bl1_csymv().

◆ bl1_csyr()

void bl1_csyr ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex a,
int  a_rs,
int  a_cs 
)
102{
103 int m_save = m;
104 scomplex* a_save = a;
105 int a_rs_save = a_rs;
106 int a_cs_save = a_cs;
107 int lda, inca;
108
109 // Return early if possible.
110 if ( bl1_zero_dim1( m ) ) return;
111
112 // If necessary, allocate, initialize, and use a temporary contiguous
113 // copy of the matrix rather than the original matrix.
115 m,
116 m,
118 &a, &a_rs, &a_cs );
119
120 // Initialize with values assuming column-major storage.
121 lda = a_cs;
122 inca = a_rs;
123
124 // If A is a row-major matrix, then we can use the underlying column-major
125 // BLAS implementation by fiddling with the parameters.
126 if ( bl1_is_row_storage( a_rs, a_cs ) )
127 {
129 bl1_toggle_uplo( uplo );
130 }
131
132 bl1_csyr_blas( uplo,
133 m,
134 alpha,
135 x, incx,
136 a, lda );
137
138 // Free the temporary contiguous matrix.
140 m_save,
142 &a, &a_rs, &a_cs );
143}
void bl1_csyr_blas(uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *a, int lda)
Definition bl1_syr.c:247

References bl1_ccreate_contigmr(), bl1_cfree_saved_contigm(), bl1_csyr_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by FLA_Syr_external().

◆ bl1_csyr2()

void bl1_csyr2 ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  a_rs,
int  a_cs 
)
104{
105 int m_save = m;
106 scomplex* a_save = a;
107 int a_rs_save = a_rs;
108 int a_cs_save = a_cs;
109 int lda, inca;
110
111 // Return early if possible.
112 if ( bl1_zero_dim1( m ) ) return;
113
114 // If necessary, allocate, initialize, and use a temporary contiguous
115 // copy of the matrix rather than the original matrix.
117 m,
118 m,
120 &a, &a_rs, &a_cs );
121
122 // Initialize with values assuming column-major storage.
123 lda = a_cs;
124 inca = a_rs;
125
126 // If A is a row-major matrix, then we can use the underlying column-major
127 // BLAS implementation by fiddling with the parameters.
128 if ( bl1_is_row_storage( a_rs, a_cs ) )
129 {
131 bl1_toggle_uplo( uplo );
132 }
133
134 bl1_csyr2_blas( uplo,
135 m,
136 alpha,
137 x, incx,
138 y, incy,
139 a, lda );
140
141 // Free the temporary contiguous matrix.
143 m_save,
145 &a, &a_rs, &a_cs );
146}
void bl1_csyr2_blas(uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
Definition bl1_syr2.c:253

References bl1_ccreate_contigmr(), bl1_cfree_saved_contigm(), bl1_csyr2_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by FLA_Syr2_external().

◆ bl1_csyr2_blas()

void bl1_csyr2_blas ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  lda 
)
254{
258 int k = 1;
259 int ldx = m;
260 int ldy = m;
261
262#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
266
269
270 x_copy = bl1_callocv( m );
271 y_copy = bl1_callocv( m );
272
274 m,
275 x, incx,
276 x_copy, 1 );
277
279 m,
280 y, incy,
281 y_copy, 1 );
282
283 beta.real = 1.0;
284 beta.imag = 0.0;
285
289 m,
290 k,
291 alpha,
292 x_copy, ldx,
293 y_copy, ldy,
294 &beta,
295 a, lda );
296
297 bl1_cfree( x_copy );
298 bl1_cfree( y_copy );
299#else
300 char blas_uplo;
301 char blas_trans;
302
305
306 x_copy = bl1_callocv( m );
307 y_copy = bl1_callocv( m );
308
310 m,
311 x, incx,
312 x_copy, 1 );
313
315 m,
316 y, incy,
317 y_copy, 1 );
318
319 beta.real = 1.0;
320 beta.imag = 0.0;
321
323 &blas_trans,
324 &m,
325 &k,
326 alpha,
327 x_copy, &ldx,
328 y_copy, &ldy,
329 &beta,
330 a, &lda );
331
332 bl1_cfree( x_copy );
333 bl1_cfree( y_copy );
334#endif
335}
void F77_csyr2k(char *uplo, char *transa, int *n, int *k, scomplex *alpha, scomplex *a, int *lda, scomplex *b, int *ldb, scomplex *beta, scomplex *c, int *ldc)
void cblas_csyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)

References bl1_callocv(), bl1_ccopyv(), bl1_cfree(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, cblas_csyr2k(), CblasColMajor, F77_csyr2k(), scomplex::imag, and scomplex::real.

Referenced by bl1_csyr2().

◆ bl1_csyr_blas()

void bl1_csyr_blas ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex a,
int  lda 
)
248{
251 int k = 1;
252 int ldx = m;
253
254#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
258
261
262 x_copy = bl1_callocv( m );
263
265 m,
266 x, incx,
267 x_copy, 1 );
268
269 beta.real = 1.0;
270 beta.imag = 0.0;
271
275 m,
276 k,
277 alpha,
278 x_copy, ldx,
279 &beta,
280 a, lda );
281
282 bl1_cfree( x_copy );
283#else
284 char blas_uplo;
285 char blas_trans;
286
289
290 x_copy = bl1_callocv( m );
291
293 m,
294 x, incx,
295 x_copy, 1 );
296
297 beta.real = 1.0;
298 beta.imag = 0.0;
299
301 &blas_trans,
302 &m,
303 &k,
304 alpha,
305 x_copy, &ldx,
306 &beta,
307 a, &lda );
308
309 bl1_cfree( x_copy );
310#endif
311}
void F77_csyrk(char *uplo, char *transa, int *n, int *k, scomplex *alpha, scomplex *a, int *lda, scomplex *beta, scomplex *c, int *ldc)
void cblas_csyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *beta, void *C, const int ldc)

References bl1_callocv(), bl1_ccopyv(), bl1_cfree(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, cblas_csyrk(), CblasColMajor, F77_csyrk(), scomplex::imag, and scomplex::real.

Referenced by bl1_csyr().

◆ bl1_ctrmv()

void bl1_ctrmv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx 
)
100{
101 scomplex* a_save = a;
102 int a_rs_save = a_rs;
103 int a_cs_save = a_cs;
105 int incx_conj;
106 int lda, inca;
107
108 // Return early if possible.
109 if ( bl1_zero_dim1( m ) ) return;
110
111 // If necessary, allocate, initialize, and use a temporary contiguous
112 // copy of the matrix rather than the original matrix.
114 m,
115 m,
117 &a, &a_rs, &a_cs );
118
119 // Initialize with values assuming column-major storage.
120 lda = a_cs;
121 inca = a_rs;
122
123 // If A is a row-major matrix, then we can use the underlying column-major
124 // BLAS implementation by fiddling with the parameters.
125 if ( bl1_is_row_storage( a_rs, a_cs ) )
126 {
128 bl1_toggle_uplo( uplo );
130 }
131
132 // Initialize with values assuming that trans is not conjnotrans.
133 x_conj = x;
134 incx_conj = incx;
135
136 // We want to handle the conjnotrans case, but without explicitly
137 // conjugating A. To do so, we leverage the fact that computing the
138 // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
139 // Note: strictly speaking, we don't need to create a copy of x since
140 // the operation is simpler than, say, gemv. However, we create a copy
141 // anyway since in practice it performs better due to increased spatial
142 // locality.
143 if ( bl1_is_conjnotrans( trans ) )
144 {
145 x_conj = bl1_callocv( m );
146 incx_conj = 1;
147
149 m,
150 x, incx,
151 x_conj, incx_conj );
152 }
153
154 bl1_ctrmv_blas( uplo,
155 trans,
156 diag,
157 m,
158 a, lda,
159 x_conj, incx_conj );
160
161 // Save the contents of and then free the temporary conjugated x vector.
162 if ( bl1_is_conjnotrans( trans ) )
163 {
165 m,
167 x, incx );
168
169 bl1_cfree( x_conj );
170 }
171
172 // Free the temporary contiguous matrix.
174 &a, &a_rs, &a_cs );
175}
void bl1_ctrmv_blas(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int lda, scomplex *x, int incx)
Definition bl1_trmv.c:331

References bl1_callocv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_contigm(), bl1_ctrmv_blas(), bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_zero_dim1(), and BLIS1_CONJUGATE.

Referenced by bl1_ctrmvsx(), FLA_CAQR2_UT_opc_var1(), FLA_Eig_gest_nl_opc_var1(), FLA_Eig_gest_nl_opc_var5(), FLA_Eig_gest_nu_opc_var1(), FLA_Eig_gest_nu_opc_var5(), FLA_Hess_UT_step_opc_var5(), FLA_Trinv_ln_opc_var1(), FLA_Trinv_ln_opc_var4(), FLA_Trinv_lu_opc_var1(), FLA_Trinv_lu_opc_var4(), FLA_Trinv_un_opc_var1(), FLA_Trinv_un_opc_var4(), FLA_Trinv_uu_opc_var1(), FLA_Trinv_uu_opc_var4(), FLA_Trmv_external(), FLA_Ttmm_l_opc_var3(), and FLA_Ttmm_u_opc_var3().

◆ bl1_ctrmv_blas()

void bl1_ctrmv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex a,
int  lda,
scomplex x,
int  incx 
)
332{
333#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
338
342
347 m,
348 a, lda,
349 x, incx );
350#else
351 char blas_uplo;
352 char blas_trans;
353 char blas_diag;
354
358
360 &blas_trans,
361 &blas_diag,
362 &m,
363 a, &lda,
364 x, &incx );
365#endif
366}
void F77_ctrmv(char *uplo, char *transa, char *diag, int *n, scomplex *a, int *lda, scomplex *y, int *incy)
void cblas_ctrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *A, const int lda, void *X, const int incX)
CBLAS_DIAG
Definition blis_prototypes_cblas.h:20
void bl1_param_map_to_netlib_diag(diag1_t blis_diag, void *blas_diag)
Definition bl1_param_map.c:95

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_ctrmv(), CblasColMajor, and F77_ctrmv().

Referenced by bl1_ctrmv().

◆ bl1_ctrmvsx()

void bl1_ctrmvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)
130{
131 scomplex* a_save = a;
132 int a_rs_save = a_rs;
133 int a_cs_save = a_cs;
135 int incx_temp;
136
137 // Return early if possible.
138 if ( bl1_zero_dim1( m ) ) return;
139
140 // If necessary, allocate, initialize, and use a temporary contiguous
141 // copy of the matrix rather than the original matrix.
143 m,
144 m,
146 &a, &a_rs, &a_cs );
147
148 // Allocate a temporary vector conformal to x.
149 x_temp = bl1_callocv( m );
150 incx_temp = 1;
151
152 // Copy x to a temporary vector.
154 m,
155 x, incx,
156 x_temp, incx_temp );
157
158 // Perform the operation, storing the result to x_temp.
159 bl1_ctrmv( uplo,
160 trans,
161 diag,
162 m,
163 a, a_rs, a_cs,
164 x_temp, incx_temp );
165
166 // Scale y by beta.
168 m,
169 beta,
170 y, incy );
171
172 // Axpy the partial result in x_temp into y.
174 m,
175 alpha,
177 y, incy );
178
179 // Free the temporary vector.
180 bl1_cfree( x_temp );
181
182 // Free the temporary contiguous matrix.
184 &a, &a_rs, &a_cs );
185}
void bl1_ctrmv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx)
Definition bl1_trmv.c:99

References bl1_callocv(), bl1_caxpyv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_contigm(), bl1_cscalv(), bl1_ctrmv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Hess_UT_step_opc_var5().

◆ bl1_ctrsv()

void bl1_ctrsv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx 
)
100{
101 scomplex* a_save = a;
102 int a_rs_save = a_rs;
103 int a_cs_save = a_cs;
105 int incx_conj;
106 int lda, inca;
107
108 // Return early if possible.
109 if ( bl1_zero_dim1( m ) ) return;
110
111 // If necessary, allocate, initialize, and use a temporary contiguous
112 // copy of the matrix rather than the original matrix.
114 m,
115 m,
117 &a, &a_rs, &a_cs );
118
119 // Initialize with values assuming column-major storage.
120 lda = a_cs;
121 inca = a_rs;
122
123 // If A is a row-major matrix, then we can use the underlying column-major
124 // BLAS implementation by fiddling with the parameters.
125 if ( bl1_is_row_storage( a_rs, a_cs ) )
126 {
128 bl1_toggle_uplo( uplo );
130 }
131
132 // Initialize with values assuming that trans is not conjnotrans.
133 x_conj = x;
134 incx_conj = incx;
135
136 // We want to handle the conjnotrans case, but without explicitly
137 // conjugating A. To do so, we leverage the fact that computing the
138 // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
139 // Note: strictly speaking, we don't need to create a copy of x since
140 // the operation is simpler than, say, gemv. However, we create a copy
141 // anyway since in practice it performs better due to increased spatial
142 // locality.
143 if ( bl1_is_conjnotrans( trans ) )
144 {
145 x_conj = bl1_callocv( m );
146 incx_conj = 1;
147
149 m,
150 x, incx,
151 x_conj, incx_conj );
152 }
153
154 bl1_ctrsv_blas( uplo,
155 trans,
156 diag,
157 m,
158 a, lda,
159 x_conj, incx_conj );
160
161 // Save the contents of and then free the temporary conjugated x vector.
162 if ( bl1_is_conjnotrans( trans ) )
163 {
165 m,
167 x, incx );
168
169 bl1_cfree( x_conj );
170 }
171
172 // Free the temporary contiguous matrix.
174 &a, &a_rs, &a_cs );
175}
void bl1_ctrsv_blas(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int lda, scomplex *x, int incx)
Definition bl1_trsv.c:331

References bl1_callocv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_contigm(), bl1_ctrsv_blas(), bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_zero_dim1(), and BLIS1_CONJUGATE.

Referenced by bl1_ctrsvsx(), FLA_Chol_l_opc_var1(), FLA_Chol_u_opc_var1(), FLA_Eig_gest_il_opc_var1(), FLA_Eig_gest_il_opc_var5(), FLA_Eig_gest_iu_opc_var1(), FLA_Eig_gest_iu_opc_var5(), FLA_Hess_UT_step_opc_var5(), FLA_LU_nopiv_opc_var1(), FLA_LU_nopiv_opc_var2(), FLA_LU_nopiv_opc_var3(), FLA_LU_piv_opc_var3(), FLA_Lyap_h_opc_var1(), FLA_Lyap_h_opc_var2(), FLA_Lyap_h_opc_var3(), FLA_Lyap_h_opc_var4(), FLA_Lyap_n_opc_var1(), FLA_Lyap_n_opc_var2(), FLA_Lyap_n_opc_var3(), FLA_Lyap_n_opc_var4(), FLA_Trinv_ln_opc_var2(), FLA_Trinv_ln_opc_var4(), FLA_Trinv_lu_opc_var2(), FLA_Trinv_lu_opc_var4(), FLA_Trinv_un_opc_var2(), FLA_Trinv_un_opc_var4(), FLA_Trinv_uu_opc_var2(), FLA_Trinv_uu_opc_var4(), and FLA_Trsv_external().

◆ bl1_ctrsv_blas()

void bl1_ctrsv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex a,
int  lda,
scomplex x,
int  incx 
)
332{
333#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
338
342
347 m,
348 a, lda,
349 x, incx );
350#else
351 char blas_uplo;
352 char blas_trans;
353 char blas_diag;
354
358
360 &blas_trans,
361 &blas_diag,
362 &m,
363 a, &lda,
364 x, &incx );
365#endif
366}
void F77_ctrsv(char *uplo, char *transa, char *diag, int *n, scomplex *a, int *lda, scomplex *y, int *incy)
void cblas_ctrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *A, const int lda, void *X, const int incX)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_ctrsv(), CblasColMajor, and F77_ctrsv().

Referenced by bl1_ctrsv().

◆ bl1_ctrsvsx()

void bl1_ctrsvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)
130{
131 scomplex* a_save = a;
132 int a_rs_save = a_rs;
133 int a_cs_save = a_cs;
135 int incx_temp;
136
137 // Return early if possible.
138 if ( bl1_zero_dim1( m ) ) return;
139
140 // If necessary, allocate, initialize, and use a temporary contiguous
141 // copy of the matrix rather than the original matrix.
143 m,
144 m,
146 &a, &a_rs, &a_cs );
147
148 // Allocate a temporary vector conformal to x.
149 x_temp = bl1_callocv( m );
150 incx_temp = 1;
151
152 // Copy x to a temporary vector.
154 m,
155 x, incx,
156 x_temp, incx_temp );
157
158 // Perform the operation, storing the result to x_temp.
159 bl1_ctrsv( uplo,
160 trans,
161 diag,
162 m,
163 a, a_rs, a_cs,
164 x_temp, incx_temp );
165
166 // Scale y by beta.
168 m,
169 beta,
170 y, incy );
171
172 // Axpy the partial result in x_temp into y.
174 m,
175 alpha,
177 y, incy );
178
179 // Free the temporary vector.
180 bl1_cfree( x_temp );
181
182 // Free the temporary contiguous matrix.
184 &a, &a_rs, &a_cs );
185}
void bl1_ctrsv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx)
Definition bl1_trsv.c:99

References bl1_callocv(), bl1_caxpyv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_contigm(), bl1_cscalv(), bl1_ctrsv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

◆ bl1_dgemv()

void bl1_dgemv ( trans1_t  transa,
conj1_t  conjx,
int  m,
int  n,
double alpha,
double a,
int  a_rs,
int  a_cs,
double x,
int  incx,
double beta,
double y,
int  incy 
)
70{
71 double* a_save = a;
72 int a_rs_save = a_rs;
73 int a_cs_save = a_cs;
74 int lda, inca;
75
76 // Return early if possible.
77 if ( bl1_zero_dim2( m, n ) )
78 {
79 int n_elem;
80
81 if ( bl1_does_trans( transa ) ) n_elem = n;
82 else n_elem = m;
83
85 n_elem,
86 beta,
87 y, incy );
88 return;
89 }
90
91 // If necessary, allocate, initialize, and use a temporary contiguous
92 // copy of the matrix rather than the original matrix.
94 n,
96 &a, &a_rs, &a_cs );
97
98 // Initialize with values assuming column-major storage.
99 lda = a_cs;
100 inca = a_rs;
101
102 // If A is a row-major matrix, then we can use the underlying column-major
103 // BLAS implementation by fiddling with the parameters.
104 if ( bl1_is_row_storage( a_rs, a_cs ) )
105 {
106 bl1_swap_ints( m, n );
109 }
110
112 m,
113 n,
114 alpha,
115 a, lda,
116 x, incx,
117 beta,
118 y, incy );
119
120 // Free the temporary contiguous matrix.
122 &a, &a_rs, &a_cs );
123}
void bl1_dgemv_blas(trans1_t transa, int m, int n, double *alpha, double *a, int lda, double *x, int incx, double *beta, double *y, int incy)
Definition bl1_gemv.c:420
void bl1_dscalv(conj1_t conj, int n, double *alpha, double *x, int incx)
Definition bl1_scalv.c:24
void bl1_dfree_contigm(double *a_save, int a_rs_save, int a_cs_save, double **a, int *a_rs, int *a_cs)
Definition bl1_free_contigm.c:29
void bl1_dcreate_contigm(int m, int n, double *a_save, int a_rs_save, int a_cs_save, double **a, int *a_rs, int *a_cs)
Definition bl1_create_contigm.c:47

References bl1_dcreate_contigm(), bl1_dfree_contigm(), bl1_dgemv_blas(), bl1_does_trans(), bl1_dscalv(), bl1_is_row_storage(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Accum_T_UT_fc_opd_var1(), FLA_Accum_T_UT_fr_opd_var1(), FLA_Apply_H2_UT_l_opd_var1(), FLA_Apply_H2_UT_r_opd_var1(), FLA_Apply_HUD_UT_l_opd_var1(), FLA_Bidiag_UT_u_step_ofd_var2(), FLA_Bidiag_UT_u_step_ofd_var3(), FLA_Bidiag_UT_u_step_ofd_var4(), FLA_Bidiag_UT_u_step_opd_var1(), FLA_Bidiag_UT_u_step_opd_var2(), FLA_Bidiag_UT_u_step_opd_var3(), FLA_Bidiag_UT_u_step_opd_var4(), FLA_Bidiag_UT_u_step_opd_var5(), FLA_CAQR2_UT_opd_var1(), FLA_Chol_l_opd_var2(), FLA_Chol_u_opd_var2(), FLA_Eig_gest_il_opd_var2(), FLA_Eig_gest_il_opd_var3(), FLA_Eig_gest_iu_opd_var2(), FLA_Eig_gest_iu_opd_var3(), FLA_Eig_gest_nl_opd_var2(), FLA_Eig_gest_nu_opd_var2(), FLA_Gemv_external(), FLA_Gemvc_external(), FLA_Hess_UT_step_ofd_var2(), FLA_Hess_UT_step_ofd_var3(), FLA_Hess_UT_step_ofd_var4(), FLA_Hess_UT_step_opd_var1(), FLA_Hess_UT_step_opd_var2(), FLA_Hess_UT_step_opd_var3(), FLA_Hess_UT_step_opd_var4(), FLA_Hess_UT_step_opd_var5(), FLA_LQ_UT_opd_var2(), FLA_LU_nopiv_opd_var2(), FLA_LU_nopiv_opd_var3(), FLA_LU_nopiv_opd_var4(), FLA_LU_piv_opd_var3(), FLA_LU_piv_opd_var4(), FLA_Lyap_h_opd_var2(), FLA_Lyap_h_opd_var3(), FLA_Lyap_n_opd_var2(), FLA_Lyap_n_opd_var3(), FLA_QR2_UT_opd_var1(), FLA_QR_UT_opd_var2(), FLA_Tridiag_UT_l_step_ofd_var2(), FLA_Tridiag_UT_l_step_ofd_var3(), FLA_Tridiag_UT_l_step_opd_var1(), FLA_Tridiag_UT_l_step_opd_var2(), FLA_Tridiag_UT_l_step_opd_var3(), FLA_Ttmm_l_opd_var2(), and FLA_Ttmm_u_opd_var2().

◆ bl1_dgemv_blas()

void bl1_dgemv_blas ( trans1_t  transa,
int  m,
int  n,
double alpha,
double a,
int  lda,
double x,
int  incx,
double beta,
double y,
int  incy 
)
421{
422#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
425
427
430 m,
431 n,
432 *alpha,
433 a, lda,
434 x, incx,
435 *beta,
436 y, incy );
437#else
438 char blas_transa;
439
441
443 &m,
444 &n,
445 alpha,
446 a, &lda,
447 x, &incx,
448 beta,
449 y, &incy );
450#endif
451}
void F77_dgemv(char *transa, int *m, int *n, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy)
void cblas_dgemv(const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const double alpha, const double *A, const int lda, const double *X, const int incX, const double beta, double *Y, const int incY)

References bl1_param_map_to_netlib_trans(), cblas_dgemv(), CblasColMajor, and F77_dgemv().

Referenced by bl1_dgemv().

◆ bl1_dger()

void bl1_dger ( conj1_t  conjx,
conj1_t  conjy,
int  m,
int  n,
double alpha,
double x,
int  incx,
double y,
int  incy,
double a,
int  a_rs,
int  a_cs 
)
63{
64 int m_save = m;
65 int n_save = n;
66 double* a_save = a;
67 int a_rs_save = a_rs;
68 int a_cs_save = a_cs;
69 int lda, inca;
70
71 // Return early if possible.
72 if ( bl1_zero_dim2( m, n ) ) return;
73
74 // If necessary, allocate, initialize, and use a temporary contiguous
75 // copy of the matrix rather than the original matrix.
77 n,
79 &a, &a_rs, &a_cs );
80
81 // Initialize with values assuming column-major storage.
82 lda = a_cs;
83 inca = a_rs;
84
85 // If A is a row-major matrix, then we can use the underlying column-major
86 // BLAS implementation by fiddling with the parameters.
88 {
89 bl1_swap_ints( m, n );
94 }
95
96 // Initialize with values assuming no conjugation of x.
98 n,
99 alpha,
100 x, incx,
101 y, incy,
102 a, lda );
103
104 // Free the temporary contiguous matrix.
106 n_save,
108 &a, &a_rs, &a_cs );
109}
void bl1_dger_blas(int m, int n, double *alpha, double *x, int incx, double *y, int incy, double *a, int lda)
Definition bl1_ger.c:301
void bl1_dfree_saved_contigm(int m, int n, double *a_save, int a_rs_save, int a_cs_save, double **a, int *a_rs, int *a_cs)
Definition bl1_free_saved_contigm.c:36

References bl1_dcreate_contigm(), bl1_dfree_saved_contigm(), bl1_dger_blas(), bl1_is_row_storage(), and bl1_zero_dim2().

Referenced by FLA_Apply_H2_UT_l_opd_var1(), FLA_Apply_H2_UT_r_opd_var1(), FLA_Apply_HUD_UT_l_opd_var1(), FLA_Bidiag_UT_u_step_ofd_var3(), FLA_Bidiag_UT_u_step_opd_var2(), FLA_Bidiag_UT_u_step_opd_var3(), FLA_Eig_gest_il_opd_var3(), FLA_Eig_gest_il_opd_var4(), FLA_Eig_gest_iu_opd_var3(), FLA_Eig_gest_iu_opd_var4(), FLA_Eig_gest_nl_opd_var4(), FLA_Eig_gest_nu_opd_var4(), FLA_Ger_external(), FLA_Gerc_external(), FLA_Hess_UT_step_ofd_var2(), FLA_Hess_UT_step_ofd_var3(), FLA_Hess_UT_step_ofd_var4(), FLA_Hess_UT_step_opd_var2(), FLA_Hess_UT_step_opd_var3(), FLA_Hess_UT_step_opd_var4(), FLA_LU_nopiv_opd_var5(), FLA_LU_piv_opd_var5(), FLA_Lyap_h_opd_var2(), FLA_Lyap_n_opd_var2(), FLA_SA_LU_unb(), FLA_Trinv_ln_opd_var3(), FLA_Trinv_ln_opd_var4(), FLA_Trinv_lu_opd_var3(), FLA_Trinv_lu_opd_var4(), FLA_Trinv_un_opd_var3(), FLA_Trinv_un_opd_var4(), FLA_Trinv_uu_opd_var3(), and FLA_Trinv_uu_opd_var4().

◆ bl1_dger_blas()

void bl1_dger_blas ( int  m,
int  n,
double alpha,
double x,
int  incx,
double y,
int  incy,
double a,
int  lda 
)
302{
303#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
305
307 m,
308 n,
309 *alpha,
310 x, incx,
311 y, incy,
312 a, lda );
313#else
314 F77_dger( &m,
315 &n,
316 alpha,
317 x, &incx,
318 y, &incy,
319 a, &lda );
320#endif
321}
void F77_dger(int *m, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda)
void cblas_dger(const enum CBLAS_ORDER order, const int M, const int N, const double alpha, const double *X, const int incX, const double *Y, const int incY, double *A, const int lda)

References cblas_dger(), CblasColMajor, and F77_dger().

Referenced by bl1_dger().

◆ bl1_dhemv()

void bl1_dhemv ( uplo1_t  uplo,
conj1_t  conj,
int  m,
double alpha,
double a,
int  a_rs,
int  a_cs,
double x,
int  incx,
double beta,
double y,
int  incy 
)
25{
26 bl1_dsymv( uplo,
27 m,
28 alpha,
29 a, a_rs, a_cs,
30 x, incx,
31 beta,
32 y, incy );
33}
void bl1_dsymv(uplo1_t uplo, int m, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
Definition bl1_symv.c:56

References bl1_dsymv().

Referenced by FLA_Eig_gest_il_opd_var1(), FLA_Eig_gest_il_opd_var2(), FLA_Eig_gest_iu_opd_var1(), FLA_Eig_gest_iu_opd_var2(), FLA_Eig_gest_nl_opd_var1(), FLA_Eig_gest_nl_opd_var2(), FLA_Eig_gest_nu_opd_var1(), FLA_Eig_gest_nu_opd_var2(), FLA_Lyap_h_opd_var1(), and FLA_Lyap_n_opd_var1().

◆ bl1_dher()

void bl1_dher ( uplo1_t  uplo,
conj1_t  conj,
int  m,
double alpha,
double x,
int  incx,
double a,
int  a_rs,
int  a_cs 
)
23{
24 bl1_dsyr( uplo,
25 m,
26 alpha,
27 x, incx,
28 a, a_rs, a_cs );
29}
void bl1_dsyr(uplo1_t uplo, int m, double *alpha, double *x, int incx, double *a, int a_rs, int a_cs)
Definition bl1_syr.c:57

References bl1_dsyr().

◆ bl1_dher2()

void bl1_dher2 ( uplo1_t  uplo,
conj1_t  conj,
int  m,
double alpha,
double x,
int  incx,
double y,
int  incy,
double a,
int  a_rs,
int  a_cs 
)
24{
25 bl1_dsyr2( uplo,
26 m,
27 alpha,
28 x, incx,
29 y, incy,
30 a, a_rs, a_cs );
31}
void bl1_dsyr2(uplo1_t uplo, int m, double *alpha, double *x, int incx, double *y, int incy, double *a, int a_rs, int a_cs)
Definition bl1_syr2.c:58

References bl1_dsyr2().

Referenced by FLA_Eig_gest_il_opd_var4(), FLA_Eig_gest_il_opd_var5(), FLA_Eig_gest_iu_opd_var4(), FLA_Eig_gest_iu_opd_var5(), FLA_Eig_gest_nl_opd_var4(), FLA_Eig_gest_nl_opd_var5(), FLA_Eig_gest_nu_opd_var4(), FLA_Eig_gest_nu_opd_var5(), FLA_Lyap_h_opd_var4(), and FLA_Lyap_n_opd_var4().

◆ bl1_dsymv()

void bl1_dsymv ( uplo1_t  uplo,
int  m,
double alpha,
double a,
int  a_rs,
int  a_cs,
double x,
int  incx,
double beta,
double y,
int  incy 
)
57{
58 double* a_save = a;
59 int a_rs_save = a_rs;
60 int a_cs_save = a_cs;
61 int lda, inca;
62
63 // Return early if possible.
64 if ( bl1_zero_dim1( m ) ) return;
65
66 // If necessary, allocate, initialize, and use a temporary contiguous
67 // copy of the matrix rather than the original matrix.
69 m,
70 m,
72 &a, &a_rs, &a_cs );
73
74 // Initialize with values assuming column-major storage.
75 lda = a_cs;
76 inca = a_rs;
77
78 // If A is a row-major matrix, then we can use the underlying column-major
79 // BLAS implementation by fiddling with the parameters.
81 {
83 bl1_toggle_uplo( uplo );
84 }
85
86 bl1_dsymv_blas( uplo,
87 m,
88 alpha,
89 a, lda,
90 x, incx,
91 beta,
92 y, incy );
93
94 // Free the temporary contiguous matrix.
96 &a, &a_rs, &a_cs );
97}
void bl1_dsymv_blas(uplo1_t uplo, int m, double *alpha, double *a, int lda, double *x, int incx, double *beta, double *y, int incy)
Definition bl1_symv.c:218
void bl1_dcreate_contigmr(uplo1_t uplo, int m, int n, double *a_save, int a_rs_save, int a_cs_save, double **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmr.c:45

References bl1_dcreate_contigmr(), bl1_dfree_contigm(), bl1_dsymv_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by bl1_dhemv(), FLA_Hemv_external(), FLA_Hemvc_external(), FLA_Symv_external(), FLA_Tridiag_UT_l_step_ofd_var2(), FLA_Tridiag_UT_l_step_ofd_var3(), FLA_Tridiag_UT_l_step_opd_var1(), FLA_Tridiag_UT_l_step_opd_var2(), and FLA_Tridiag_UT_l_step_opd_var3().

◆ bl1_dsymv_blas()

void bl1_dsymv_blas ( uplo1_t  uplo,
int  m,
double alpha,
double a,
int  lda,
double x,
int  incx,
double beta,
double y,
int  incy 
)
219{
220#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
223
225
228 m,
229 *alpha,
230 a, lda,
231 x, incx,
232 *beta,
233 y, incy );
234#else
235 char blas_uplo;
236
238
240 &m,
241 alpha,
242 a, &lda,
243 x, &incx,
244 beta,
245 y, &incy );
246#endif
247}
void F77_dsymv(char *uplo, int *n, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy)
void cblas_dsymv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const double *A, const int lda, const double *X, const int incX, const double beta, double *Y, const int incY)

References bl1_param_map_to_netlib_uplo(), cblas_dsymv(), CblasColMajor, and F77_dsymv().

Referenced by bl1_dsymv().

◆ bl1_dsyr()

void bl1_dsyr ( uplo1_t  uplo,
int  m,
double alpha,
double x,
int  incx,
double a,
int  a_rs,
int  a_cs 
)
58{
59 int m_save = m;
60 double* a_save = a;
61 int a_rs_save = a_rs;
62 int a_cs_save = a_cs;
63 int lda, inca;
64
65 // Return early if possible.
66 if ( bl1_zero_dim1( m ) ) return;
67
68 // If necessary, allocate, initialize, and use a temporary contiguous
69 // copy of the matrix rather than the original matrix.
71 m,
72 m,
74 &a, &a_rs, &a_cs );
75
76 // Initialize with values assuming column-major storage.
77 lda = a_cs;
78 inca = a_rs;
79
80 // If A is a row-major matrix, then we can use the underlying column-major
81 // BLAS implementation by fiddling with the parameters.
83 {
85 bl1_toggle_uplo( uplo );
86 }
87
88 bl1_dsyr_blas( uplo,
89 m,
90 alpha,
91 x, incx,
92 a, lda );
93
94 // Free the temporary contiguous matrix.
96 m_save,
98 &a, &a_rs, &a_cs );
99}
void bl1_dsyr_blas(uplo1_t uplo, int m, double *alpha, double *x, int incx, double *a, int lda)
Definition bl1_syr.c:220

References bl1_dcreate_contigmr(), bl1_dfree_saved_contigm(), bl1_dsyr_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by bl1_dher(), FLA_Chol_l_opd_var3(), FLA_Chol_u_opd_var3(), FLA_Her_external(), FLA_Herc_external(), FLA_Syr_external(), FLA_Ttmm_l_opd_var1(), and FLA_Ttmm_u_opd_var1().

◆ bl1_dsyr2()

void bl1_dsyr2 ( uplo1_t  uplo,
int  m,
double alpha,
double x,
int  incx,
double y,
int  incy,
double a,
int  a_rs,
int  a_cs 
)
59{
60 int m_save = m;
61 double* a_save = a;
62 int a_rs_save = a_rs;
63 int a_cs_save = a_cs;
64 int lda, inca;
65
66 // Return early if possible.
67 if ( bl1_zero_dim1( m ) ) return;
68
69 // If necessary, allocate, initialize, and use a temporary contiguous
70 // copy of the matrix rather than the original matrix.
72 m,
73 m,
75 &a, &a_rs, &a_cs );
76
77 // Initialize with values assuming column-major storage.
78 lda = a_cs;
79 inca = a_rs;
80
81 // If A is a row-major matrix, then we can use the underlying column-major
82 // BLAS implementation by fiddling with the parameters.
84 {
86 bl1_toggle_uplo( uplo );
87 }
88
89 bl1_dsyr2_blas( uplo,
90 m,
91 alpha,
92 x, incx,
93 y, incy,
94 a, lda );
95
96 // Free the temporary contiguous matrix.
98 m_save,
100 &a, &a_rs, &a_cs );
101}
void bl1_dsyr2_blas(uplo1_t uplo, int m, double *alpha, double *x, int incx, double *y, int incy, double *a, int lda)
Definition bl1_syr2.c:224

References bl1_dcreate_contigmr(), bl1_dfree_saved_contigm(), bl1_dsyr2_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by bl1_dher2(), FLA_Her2_external(), FLA_Her2c_external(), FLA_Syr2_external(), FLA_Tridiag_UT_l_step_ofd_var2(), FLA_Tridiag_UT_l_step_opd_var1(), and FLA_Tridiag_UT_l_step_opd_var2().

◆ bl1_dsyr2_blas()

void bl1_dsyr2_blas ( uplo1_t  uplo,
int  m,
double alpha,
double x,
int  incx,
double y,
int  incy,
double a,
int  lda 
)
225{
226#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
229
231
234 m,
235 *alpha,
236 x, incx,
237 y, incy,
238 a, lda );
239#else
240 char blas_uplo;
241
243
245 &m,
246 alpha,
247 x, &incx,
248 y, &incy,
249 a, &lda );
250#endif
251}
void F77_dsyr2(char *uplo, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda)
void cblas_dsyr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const double *X, const int incX, const double *Y, const int incY, double *A, const int lda)

References bl1_param_map_to_netlib_uplo(), cblas_dsyr2(), CblasColMajor, and F77_dsyr2().

Referenced by bl1_dsyr2().

◆ bl1_dsyr_blas()

void bl1_dsyr_blas ( uplo1_t  uplo,
int  m,
double alpha,
double x,
int  incx,
double a,
int  lda 
)
221{
222#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
225
227
230 m,
231 *alpha,
232 x, incx,
233 a, lda );
234#else
235 char blas_uplo;
236
238
240 &m,
241 alpha,
242 x, &incx,
243 a, &lda );
244#endif
245}
void F77_dsyr(char *uplo, int *n, double *alpha, double *x, int *incx, double *a, int *lda)
void cblas_dsyr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const double *X, const int incX, double *A, const int lda)

References bl1_param_map_to_netlib_uplo(), cblas_dsyr(), CblasColMajor, and F77_dsyr().

Referenced by bl1_dsyr().

◆ bl1_dtrmv()

void bl1_dtrmv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double a,
int  a_rs,
int  a_cs,
double x,
int  incx 
)
57{
58 double* a_save = a;
59 int a_rs_save = a_rs;
60 int a_cs_save = a_cs;
61 int lda, inca;
62
63 // Return early if possible.
64 if ( bl1_zero_dim1( m ) ) return;
65
66 // If necessary, allocate, initialize, and use a temporary contiguous
67 // copy of the matrix rather than the original matrix.
69 m,
70 m,
72 &a, &a_rs, &a_cs );
73
74 // Initialize with values assuming column-major storage.
75 lda = a_cs;
76 inca = a_rs;
77
78 // If A is a row-major matrix, then we can use the underlying column-major
79 // BLAS implementation by fiddling with the parameters.
81 {
83 bl1_toggle_uplo( uplo );
85 }
86
87 bl1_dtrmv_blas( uplo,
88 trans,
89 diag,
90 m,
91 a, lda,
92 x, incx );
93
94 // Free the temporary contiguous matrix.
96 &a, &a_rs, &a_cs );
97}
void bl1_dtrmv_blas(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int lda, double *x, int incx)
Definition bl1_trmv.c:294

References bl1_dcreate_contigmr(), bl1_dfree_contigm(), bl1_dtrmv_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by bl1_dtrmvsx(), FLA_CAQR2_UT_opd_var1(), FLA_Eig_gest_nl_opd_var1(), FLA_Eig_gest_nl_opd_var5(), FLA_Eig_gest_nu_opd_var1(), FLA_Eig_gest_nu_opd_var5(), FLA_Hess_UT_step_opd_var5(), FLA_Trinv_ln_opd_var1(), FLA_Trinv_ln_opd_var4(), FLA_Trinv_lu_opd_var1(), FLA_Trinv_lu_opd_var4(), FLA_Trinv_un_opd_var1(), FLA_Trinv_un_opd_var4(), FLA_Trinv_uu_opd_var1(), FLA_Trinv_uu_opd_var4(), FLA_Trmv_external(), FLA_Ttmm_l_opd_var3(), and FLA_Ttmm_u_opd_var3().

◆ bl1_dtrmv_blas()

void bl1_dtrmv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double a,
int  lda,
double x,
int  incx 
)
295{
296#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
301
305
310 m,
311 a, lda,
312 x, incx );
313#else
314 char blas_uplo;
315 char blas_trans;
316 char blas_diag;
317
321
323 &blas_trans,
324 &blas_diag,
325 &m,
326 a, &lda,
327 x, &incx );
328#endif
329}
void F77_dtrmv(char *uplo, char *transa, char *diag, int *n, double *a, int *lda, double *y, int *incy)
void cblas_dtrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const double *A, const int lda, double *X, const int incX)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_dtrmv(), CblasColMajor, and F77_dtrmv().

Referenced by bl1_dtrmv().

◆ bl1_dtrmvsx()

void bl1_dtrmvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double alpha,
double a,
int  a_rs,
int  a_cs,
double x,
int  incx,
double beta,
double y,
int  incy 
)
72{
73 double* a_save = a;
74 int a_rs_save = a_rs;
75 int a_cs_save = a_cs;
76 double* x_temp;
77 int incx_temp;
78
79 // Return early if possible.
80 if ( bl1_zero_dim1( m ) ) return;
81
82 // If necessary, allocate, initialize, and use a temporary contiguous
83 // copy of the matrix rather than the original matrix.
85 m,
86 m,
88 &a, &a_rs, &a_cs );
89
90 // Allocate a temporary vector conformal to x.
91 x_temp = bl1_dallocv( m );
92 incx_temp = 1;
93
94 // Copy x to a temporary vector.
96 m,
97 x, incx,
99
100 // Perform the operation, storing the result to x_temp.
101 bl1_dtrmv( uplo,
102 trans,
103 diag,
104 m,
105 a, a_rs, a_cs,
106 x_temp, incx_temp );
107
108 // Scale y by beta.
110 m,
111 beta,
112 y, incy );
113
114 // Axpy the partial result in x_temp into y.
116 m,
117 alpha,
119 y, incy );
120
121 // Free the temporary vector.
122 bl1_dfree( x_temp );
123
124 // Free the temporary contiguous matrix.
126 &a, &a_rs, &a_cs );
127}
void bl1_daxpyv(conj1_t conj, int n, double *alpha, double *x, int incx, double *y, int incy)
Definition bl1_axpyv.c:21
void bl1_dcopyv(conj1_t conj, int m, double *x, int incx, double *y, int incy)
Definition bl1_copyv.c:42
void bl1_dtrmv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int a_rs, int a_cs, double *x, int incx)
Definition bl1_trmv.c:56
double * bl1_dallocv(unsigned int n_elem)
Definition bl1_allocv.c:35
void bl1_dfree(double *p)
Definition bl1_free.c:35

References bl1_dallocv(), bl1_daxpyv(), bl1_dcopyv(), bl1_dcreate_contigmr(), bl1_dfree(), bl1_dfree_contigm(), bl1_dscalv(), bl1_dtrmv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Hess_UT_step_opd_var5().

◆ bl1_dtrsv()

void bl1_dtrsv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double a,
int  a_rs,
int  a_cs,
double x,
int  incx 
)
57{
58 double* a_save = a;
59 int a_rs_save = a_rs;
60 int a_cs_save = a_cs;
61 int lda, inca;
62
63 // Return early if possible.
64 if ( bl1_zero_dim1( m ) ) return;
65
66 // If necessary, allocate, initialize, and use a temporary contiguous
67 // copy of the matrix rather than the original matrix.
69 m,
70 m,
72 &a, &a_rs, &a_cs );
73
74 // Initialize with values assuming column-major storage.
75 lda = a_cs;
76 inca = a_rs;
77
78 // If A is a row-major matrix, then we can use the underlying column-major
79 // BLAS implementation by fiddling with the parameters.
81 {
83 bl1_toggle_uplo( uplo );
85 }
86
87 bl1_dtrsv_blas( uplo,
88 trans,
89 diag,
90 m,
91 a, lda,
92 x, incx );
93
94 // Free the temporary contiguous matrix.
96 &a, &a_rs, &a_cs );
97}
void bl1_dtrsv_blas(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int lda, double *x, int incx)
Definition bl1_trsv.c:294

References bl1_dcreate_contigmr(), bl1_dfree_contigm(), bl1_dtrsv_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by bl1_dtrsvsx(), FLA_Chol_l_opd_var1(), FLA_Chol_u_opd_var1(), FLA_Eig_gest_il_opd_var1(), FLA_Eig_gest_il_opd_var5(), FLA_Eig_gest_iu_opd_var1(), FLA_Eig_gest_iu_opd_var5(), FLA_Hess_UT_step_opd_var5(), FLA_LU_nopiv_opd_var1(), FLA_LU_nopiv_opd_var2(), FLA_LU_nopiv_opd_var3(), FLA_LU_piv_opd_var3(), FLA_Lyap_h_opd_var1(), FLA_Lyap_h_opd_var2(), FLA_Lyap_h_opd_var3(), FLA_Lyap_h_opd_var4(), FLA_Lyap_n_opd_var1(), FLA_Lyap_n_opd_var2(), FLA_Lyap_n_opd_var3(), FLA_Lyap_n_opd_var4(), FLA_Trinv_ln_opd_var2(), FLA_Trinv_ln_opd_var4(), FLA_Trinv_lu_opd_var2(), FLA_Trinv_lu_opd_var4(), FLA_Trinv_un_opd_var2(), FLA_Trinv_un_opd_var4(), FLA_Trinv_uu_opd_var2(), FLA_Trinv_uu_opd_var4(), and FLA_Trsv_external().

◆ bl1_dtrsv_blas()

void bl1_dtrsv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double a,
int  lda,
double x,
int  incx 
)
295{
296#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
301
305
310 m,
311 a, lda,
312 x, incx );
313#else
314 char blas_uplo;
315 char blas_trans;
316 char blas_diag;
317
321
323 &blas_trans,
324 &blas_diag,
325 &m,
326 a, &lda,
327 x, &incx );
328#endif
329}
void F77_dtrsv(char *uplo, char *transa, char *diag, int *n, double *a, int *lda, double *y, int *incy)
void cblas_dtrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const double *A, const int lda, double *X, const int incX)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_dtrsv(), CblasColMajor, and F77_dtrsv().

Referenced by bl1_dtrsv().

◆ bl1_dtrsvsx()

void bl1_dtrsvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double alpha,
double a,
int  a_rs,
int  a_cs,
double x,
int  incx,
double beta,
double y,
int  incy 
)
72{
73 double* a_save = a;
74 int a_rs_save = a_rs;
75 int a_cs_save = a_cs;
76 double* x_temp;
77 int incx_temp;
78
79 // Return early if possible.
80 if ( bl1_zero_dim1( m ) ) return;
81
82 // If necessary, allocate, initialize, and use a temporary contiguous
83 // copy of the matrix rather than the original matrix.
85 m,
86 m,
88 &a, &a_rs, &a_cs );
89
90 // Allocate a temporary vector conformal to x.
91 x_temp = bl1_dallocv( m );
92 incx_temp = 1;
93
94 // Copy x to a temporary vector.
96 m,
97 x, incx,
99
100 // Perform the operation, storing the result to x_temp.
101 bl1_dtrsv( uplo,
102 trans,
103 diag,
104 m,
105 a, a_rs, a_cs,
106 x_temp, incx_temp );
107
108 // Scale y by beta.
110 m,
111 beta,
112 y, incy );
113
114 // Axpy the partial result in x_temp into y.
116 m,
117 alpha,
119 y, incy );
120
121 // Free the temporary vector.
122 bl1_dfree( x_temp );
123
124 // Free the temporary contiguous matrix.
126 &a, &a_rs, &a_cs );
127}
void bl1_dtrsv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int a_rs, int a_cs, double *x, int incx)
Definition bl1_trsv.c:56

References bl1_dallocv(), bl1_daxpyv(), bl1_dcopyv(), bl1_dcreate_contigmr(), bl1_dfree(), bl1_dfree_contigm(), bl1_dscalv(), bl1_dtrsv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

◆ bl1_sgemv()

void bl1_sgemv ( trans1_t  transa,
conj1_t  conjx,
int  m,
int  n,
float alpha,
float a,
int  a_rs,
int  a_cs,
float x,
int  incx,
float beta,
float y,
int  incy 
)
14{
15 float* a_save = a;
16 int a_rs_save = a_rs;
17 int a_cs_save = a_cs;
18 int lda, inca;
19
20 // Return early if possible.
21 if ( bl1_zero_dim2( m, n ) )
22 {
23 int n_elem;
24
25 if ( bl1_does_trans( transa ) ) n_elem = n;
26 else n_elem = m;
27
29 n_elem,
30 beta,
31 y, incy );
32 return;
33 }
34
35 // If necessary, allocate, initialize, and use a temporary contiguous
36 // copy of the matrix rather than the original matrix.
38 n,
40 &a, &a_rs, &a_cs );
41
42 // Initialize with values assuming column-major storage.
43 lda = a_cs;
44 inca = a_rs;
45
46 // If A is a row-major matrix, then we can use the underlying column-major
47 // BLAS implementation by fiddling with the parameters.
49 {
50 bl1_swap_ints( m, n );
53 }
54
56 m,
57 n,
58 alpha,
59 a, lda,
60 x, incx,
61 beta,
62 y, incy );
63
64 // Free the temporary contiguous matrix.
66 &a, &a_rs, &a_cs );
67}
void bl1_sgemv_blas(trans1_t transa, int m, int n, float *alpha, float *a, int lda, float *x, int incx, float *beta, float *y, int incy)
Definition bl1_gemv.c:387
void bl1_sscalv(conj1_t conj, int n, float *alpha, float *x, int incx)
Definition bl1_scalv.c:13
void bl1_sfree_contigm(float *a_save, int a_rs_save, int a_cs_save, float **a, int *a_rs, int *a_cs)
Definition bl1_free_contigm.c:13
void bl1_screate_contigm(int m, int n, float *a_save, int a_rs_save, int a_cs_save, float **a, int *a_rs, int *a_cs)
Definition bl1_create_contigm.c:13

References bl1_does_trans(), bl1_is_row_storage(), bl1_screate_contigm(), bl1_sfree_contigm(), bl1_sgemv_blas(), bl1_sscalv(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Accum_T_UT_fc_ops_var1(), FLA_Accum_T_UT_fr_ops_var1(), FLA_Apply_H2_UT_l_ops_var1(), FLA_Apply_H2_UT_r_ops_var1(), FLA_Apply_HUD_UT_l_ops_var1(), FLA_Bidiag_UT_u_step_ofs_var2(), FLA_Bidiag_UT_u_step_ofs_var3(), FLA_Bidiag_UT_u_step_ofs_var4(), FLA_Bidiag_UT_u_step_ops_var1(), FLA_Bidiag_UT_u_step_ops_var2(), FLA_Bidiag_UT_u_step_ops_var3(), FLA_Bidiag_UT_u_step_ops_var4(), FLA_Bidiag_UT_u_step_ops_var5(), FLA_CAQR2_UT_ops_var1(), FLA_Chol_l_ops_var2(), FLA_Chol_u_ops_var2(), FLA_Eig_gest_il_ops_var2(), FLA_Eig_gest_il_ops_var3(), FLA_Eig_gest_iu_ops_var2(), FLA_Eig_gest_iu_ops_var3(), FLA_Eig_gest_nl_ops_var2(), FLA_Eig_gest_nu_ops_var2(), FLA_Gemv_external(), FLA_Gemvc_external(), FLA_Hess_UT_step_ofs_var2(), FLA_Hess_UT_step_ofs_var3(), FLA_Hess_UT_step_ofs_var4(), FLA_Hess_UT_step_ops_var1(), FLA_Hess_UT_step_ops_var2(), FLA_Hess_UT_step_ops_var3(), FLA_Hess_UT_step_ops_var4(), FLA_Hess_UT_step_ops_var5(), FLA_LQ_UT_ops_var2(), FLA_LU_nopiv_ops_var2(), FLA_LU_nopiv_ops_var3(), FLA_LU_nopiv_ops_var4(), FLA_LU_piv_ops_var3(), FLA_LU_piv_ops_var4(), FLA_Lyap_h_ops_var2(), FLA_Lyap_h_ops_var3(), FLA_Lyap_n_ops_var2(), FLA_Lyap_n_ops_var3(), FLA_QR2_UT_ops_var1(), FLA_QR_UT_ops_var2(), FLA_Tridiag_UT_l_step_ofs_var2(), FLA_Tridiag_UT_l_step_ofs_var3(), FLA_Tridiag_UT_l_step_ops_var1(), FLA_Tridiag_UT_l_step_ops_var2(), FLA_Tridiag_UT_l_step_ops_var3(), FLA_Ttmm_l_ops_var2(), and FLA_Ttmm_u_ops_var2().

◆ bl1_sgemv_blas()

void bl1_sgemv_blas ( trans1_t  transa,
int  m,
int  n,
float alpha,
float a,
int  lda,
float x,
int  incx,
float beta,
float y,
int  incy 
)
388{
389#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
392
394
397 m,
398 n,
399 *alpha,
400 a, lda,
401 x, incx,
402 *beta,
403 y, incy );
404#else
405 char blas_transa;
406
408
410 &m,
411 &n,
412 alpha,
413 a, &lda,
414 x, &incx,
415 beta,
416 y, &incy );
417#endif
418}
void F77_sgemv(char *transa, int *m, int *n, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy)
void cblas_sgemv(const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const float alpha, const float *A, const int lda, const float *X, const int incX, const float beta, float *Y, const int incY)

References bl1_param_map_to_netlib_trans(), cblas_sgemv(), CblasColMajor, and F77_sgemv().

Referenced by bl1_sgemv().

◆ bl1_sger()

void bl1_sger ( conj1_t  conjx,
conj1_t  conjy,
int  m,
int  n,
float alpha,
float x,
int  incx,
float y,
int  incy,
float a,
int  a_rs,
int  a_cs 
)
14{
15 int m_save = m;
16 int n_save = n;
17 float* a_save = a;
18 int a_rs_save = a_rs;
19 int a_cs_save = a_cs;
20 int lda, inca;
21
22 // Return early if possible.
23 if ( bl1_zero_dim2( m, n ) ) return;
24
25 // If necessary, allocate, initialize, and use a temporary contiguous
26 // copy of the matrix rather than the original matrix.
28 n,
30 &a, &a_rs, &a_cs );
31
32 // Initialize with values assuming column-major storage.
33 lda = a_cs;
34 inca = a_rs;
35
36 // If A is a row-major matrix, then we can use the underlying column-major
37 // BLAS implementation by fiddling with the parameters.
39 {
40 bl1_swap_ints( m, n );
45 }
46
47 // Initialize with values assuming no conjugation of x.
49 n,
50 alpha,
51 x, incx,
52 y, incy,
53 a, lda );
54
55 // Free the temporary contiguous matrix.
57 n_save,
59 &a, &a_rs, &a_cs );
60}
void bl1_sger_blas(int m, int n, float *alpha, float *x, int incx, float *y, int incy, float *a, int lda)
Definition bl1_ger.c:279
void bl1_sfree_saved_contigm(int m, int n, float *a_save, int a_rs_save, int a_cs_save, float **a, int *a_rs, int *a_cs)
Definition bl1_free_saved_contigm.c:13

References bl1_is_row_storage(), bl1_screate_contigm(), bl1_sfree_saved_contigm(), bl1_sger_blas(), and bl1_zero_dim2().

Referenced by FLA_Apply_H2_UT_l_ops_var1(), FLA_Apply_H2_UT_r_ops_var1(), FLA_Apply_HUD_UT_l_ops_var1(), FLA_Bidiag_UT_u_step_ofs_var3(), FLA_Bidiag_UT_u_step_ops_var2(), FLA_Bidiag_UT_u_step_ops_var3(), FLA_Eig_gest_il_ops_var3(), FLA_Eig_gest_il_ops_var4(), FLA_Eig_gest_iu_ops_var3(), FLA_Eig_gest_iu_ops_var4(), FLA_Eig_gest_nl_ops_var4(), FLA_Eig_gest_nu_ops_var4(), FLA_Ger_external(), FLA_Gerc_external(), FLA_Hess_UT_step_ofs_var2(), FLA_Hess_UT_step_ofs_var3(), FLA_Hess_UT_step_ofs_var4(), FLA_Hess_UT_step_ops_var2(), FLA_Hess_UT_step_ops_var3(), FLA_Hess_UT_step_ops_var4(), FLA_LU_nopiv_ops_var5(), FLA_LU_piv_ops_var5(), FLA_Lyap_h_ops_var2(), FLA_Lyap_n_ops_var2(), FLA_SA_LU_unb(), FLA_Trinv_ln_ops_var3(), FLA_Trinv_ln_ops_var4(), FLA_Trinv_lu_ops_var3(), FLA_Trinv_lu_ops_var4(), FLA_Trinv_un_ops_var3(), FLA_Trinv_un_ops_var4(), FLA_Trinv_uu_ops_var3(), and FLA_Trinv_uu_ops_var4().

◆ bl1_sger_blas()

void bl1_sger_blas ( int  m,
int  n,
float alpha,
float x,
int  incx,
float y,
int  incy,
float a,
int  lda 
)
280{
281#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
283
285 m,
286 n,
287 *alpha,
288 x, incx,
289 y, incy,
290 a, lda );
291#else
292 F77_sger( &m,
293 &n,
294 alpha,
295 x, &incx,
296 y, &incy,
297 a, &lda );
298#endif
299}
void F77_sger(int *m, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda)
void cblas_sger(const enum CBLAS_ORDER order, const int M, const int N, const float alpha, const float *X, const int incX, const float *Y, const int incY, float *A, const int lda)

References cblas_sger(), CblasColMajor, and F77_sger().

Referenced by bl1_sger().

◆ bl1_shemv()

void bl1_shemv ( uplo1_t  uplo,
conj1_t  conj,
int  m,
float alpha,
float a,
int  a_rs,
int  a_cs,
float x,
int  incx,
float beta,
float y,
int  incy 
)
14{
15 bl1_ssymv( uplo,
16 m,
17 alpha,
18 a, a_rs, a_cs,
19 x, incx,
20 beta,
21 y, incy );
22}
void bl1_ssymv(uplo1_t uplo, int m, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
Definition bl1_symv.c:13

References bl1_ssymv().

Referenced by FLA_Eig_gest_il_ops_var1(), FLA_Eig_gest_il_ops_var2(), FLA_Eig_gest_iu_ops_var1(), FLA_Eig_gest_iu_ops_var2(), FLA_Eig_gest_nl_ops_var1(), FLA_Eig_gest_nl_ops_var2(), FLA_Eig_gest_nu_ops_var1(), FLA_Eig_gest_nu_ops_var2(), FLA_Lyap_h_ops_var1(), and FLA_Lyap_n_ops_var1().

◆ bl1_sher()

void bl1_sher ( uplo1_t  uplo,
conj1_t  conj,
int  m,
float alpha,
float x,
int  incx,
float a,
int  a_rs,
int  a_cs 
)
14{
15 bl1_ssyr( uplo,
16 m,
17 alpha,
18 x, incx,
19 a, a_rs, a_cs );
20}
void bl1_ssyr(uplo1_t uplo, int m, float *alpha, float *x, int incx, float *a, int a_rs, int a_cs)
Definition bl1_syr.c:13

References bl1_ssyr().

◆ bl1_sher2()

void bl1_sher2 ( uplo1_t  uplo,
conj1_t  conj,
int  m,
float alpha,
float x,
int  incx,
float y,
int  incy,
float a,
int  a_rs,
int  a_cs 
)
14{
15 bl1_ssyr2( uplo,
16 m,
17 alpha,
18 x, incx,
19 y, incy,
20 a, a_rs, a_cs );
21}
void bl1_ssyr2(uplo1_t uplo, int m, float *alpha, float *x, int incx, float *y, int incy, float *a, int a_rs, int a_cs)
Definition bl1_syr2.c:13

References bl1_ssyr2().

Referenced by FLA_Eig_gest_il_ops_var4(), FLA_Eig_gest_il_ops_var5(), FLA_Eig_gest_iu_ops_var4(), FLA_Eig_gest_iu_ops_var5(), FLA_Eig_gest_nl_ops_var4(), FLA_Eig_gest_nl_ops_var5(), FLA_Eig_gest_nu_ops_var4(), FLA_Eig_gest_nu_ops_var5(), FLA_Lyap_h_ops_var4(), and FLA_Lyap_n_ops_var4().

◆ bl1_ssymv()

void bl1_ssymv ( uplo1_t  uplo,
int  m,
float alpha,
float a,
int  a_rs,
int  a_cs,
float x,
int  incx,
float beta,
float y,
int  incy 
)
14{
15 float* a_save = a;
16 int a_rs_save = a_rs;
17 int a_cs_save = a_cs;
18 int lda, inca;
19
20 // Return early if possible.
21 if ( bl1_zero_dim1( m ) ) return;
22
23 // If necessary, allocate, initialize, and use a temporary contiguous
24 // copy of the matrix rather than the original matrix.
26 m,
27 m,
29 &a, &a_rs, &a_cs );
30
31 // Initialize with values assuming column-major storage.
32 lda = a_cs;
33 inca = a_rs;
34
35 // If A is a row-major matrix, then we can use the underlying column-major
36 // BLAS implementation by fiddling with the parameters.
38 {
40 bl1_toggle_uplo( uplo );
41 }
42
43 bl1_ssymv_blas( uplo,
44 m,
45 alpha,
46 a, lda,
47 x, incx,
48 beta,
49 y, incy );
50
51 // Free the temporary contiguous matrix.
53 &a, &a_rs, &a_cs );
54}
void bl1_ssymv_blas(uplo1_t uplo, int m, float *alpha, float *a, int lda, float *x, int incx, float *beta, float *y, int incy)
Definition bl1_symv.c:187
void bl1_screate_contigmr(uplo1_t uplo, int m, int n, float *a_save, int a_rs_save, int a_cs_save, float **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmr.c:13

References bl1_is_row_storage(), bl1_screate_contigmr(), bl1_sfree_contigm(), bl1_ssymv_blas(), and bl1_zero_dim1().

Referenced by bl1_shemv(), FLA_Hemv_external(), FLA_Hemvc_external(), FLA_Symv_external(), FLA_Tridiag_UT_l_step_ofs_var2(), FLA_Tridiag_UT_l_step_ofs_var3(), FLA_Tridiag_UT_l_step_ops_var1(), FLA_Tridiag_UT_l_step_ops_var2(), and FLA_Tridiag_UT_l_step_ops_var3().

◆ bl1_ssymv_blas()

void bl1_ssymv_blas ( uplo1_t  uplo,
int  m,
float alpha,
float a,
int  lda,
float x,
int  incx,
float beta,
float y,
int  incy 
)
188{
189#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
192
194
197 m,
198 *alpha,
199 a, lda,
200 x, incx,
201 *beta,
202 y, incy );
203#else
204 char blas_uplo;
205
207
209 &m,
210 alpha,
211 a, &lda,
212 x, &incx,
213 beta,
214 y, &incy );
215#endif
216}
void F77_ssymv(char *uplo, int *n, float *alpha, float *a, int *lda, float *x, int *incx, float *beta, float *y, int *incy)
void cblas_ssymv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const float *A, const int lda, const float *X, const int incX, const float beta, float *Y, const int incY)

References bl1_param_map_to_netlib_uplo(), cblas_ssymv(), CblasColMajor, and F77_ssymv().

Referenced by bl1_ssymv().

◆ bl1_ssyr()

void bl1_ssyr ( uplo1_t  uplo,
int  m,
float alpha,
float x,
int  incx,
float a,
int  a_rs,
int  a_cs 
)
14{
15 int m_save = m;
16 float* a_save = a;
17 int a_rs_save = a_rs;
18 int a_cs_save = a_cs;
19 int lda, inca;
20
21 // Return early if possible.
22 if ( bl1_zero_dim1( m ) ) return;
23
24 // If necessary, allocate, initialize, and use a temporary contiguous
25 // copy of the matrix rather than the original matrix.
27 m,
28 m,
30 &a, &a_rs, &a_cs );
31
32 // Initialize with values assuming column-major storage.
33 lda = a_cs;
34 inca = a_rs;
35
36 // If A is a row-major matrix, then we can use the underlying column-major
37 // BLAS implementation by fiddling with the parameters.
39 {
41 bl1_toggle_uplo( uplo );
42 }
43
44 bl1_ssyr_blas( uplo,
45 m,
46 alpha,
47 x, incx,
48 a, lda );
49
50 // Free the temporary contiguous matrix.
52 m_save,
54 &a, &a_rs, &a_cs );
55}
void bl1_ssyr_blas(uplo1_t uplo, int m, float *alpha, float *x, int incx, float *a, int lda)
Definition bl1_syr.c:193

References bl1_is_row_storage(), bl1_screate_contigmr(), bl1_sfree_saved_contigm(), bl1_ssyr_blas(), and bl1_zero_dim1().

Referenced by bl1_sher(), FLA_Chol_l_ops_var3(), FLA_Chol_u_ops_var3(), FLA_Her_external(), FLA_Herc_external(), FLA_Syr_external(), FLA_Ttmm_l_ops_var1(), and FLA_Ttmm_u_ops_var1().

◆ bl1_ssyr2()

void bl1_ssyr2 ( uplo1_t  uplo,
int  m,
float alpha,
float x,
int  incx,
float y,
int  incy,
float a,
int  a_rs,
int  a_cs 
)
14{
15 int m_save = m;
16 float* a_save = a;
17 int a_rs_save = a_rs;
18 int a_cs_save = a_cs;
19 int lda, inca;
20
21 // Return early if possible.
22 if ( bl1_zero_dim1( m ) ) return;
23
24 // If necessary, allocate, initialize, and use a temporary contiguous
25 // copy of the matrix rather than the original matrix.
27 m,
28 m,
30 &a, &a_rs, &a_cs );
31
32 // Initialize with values assuming column-major storage.
33 lda = a_cs;
34 inca = a_rs;
35
36 // If A is a row-major matrix, then we can use the underlying column-major
37 // BLAS implementation by fiddling with the parameters.
39 {
41 bl1_toggle_uplo( uplo );
42 }
43
44 bl1_ssyr2_blas( uplo,
45 m,
46 alpha,
47 x, incx,
48 y, incy,
49 a, lda );
50
51 // Free the temporary contiguous matrix.
53 m_save,
55 &a, &a_rs, &a_cs );
56}
void bl1_ssyr2_blas(uplo1_t uplo, int m, float *alpha, float *x, int incx, float *y, int incy, float *a, int lda)
Definition bl1_syr2.c:195

References bl1_is_row_storage(), bl1_screate_contigmr(), bl1_sfree_saved_contigm(), bl1_ssyr2_blas(), and bl1_zero_dim1().

Referenced by bl1_sher2(), FLA_Her2_external(), FLA_Her2c_external(), FLA_Syr2_external(), FLA_Tridiag_UT_l_step_ofs_var2(), FLA_Tridiag_UT_l_step_ops_var1(), and FLA_Tridiag_UT_l_step_ops_var2().

◆ bl1_ssyr2_blas()

void bl1_ssyr2_blas ( uplo1_t  uplo,
int  m,
float alpha,
float x,
int  incx,
float y,
int  incy,
float a,
int  lda 
)
196{
197#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
200
202
205 m,
206 *alpha,
207 x, incx,
208 y, incy,
209 a, lda );
210#else
211 char blas_uplo;
212
214
216 &m,
217 alpha,
218 x, &incx,
219 y, &incy,
220 a, &lda );
221#endif
222}
void F77_ssyr2(char *uplo, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda)
void cblas_ssyr2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const float *X, const int incX, const float *Y, const int incY, float *A, const int lda)

References bl1_param_map_to_netlib_uplo(), cblas_ssyr2(), CblasColMajor, and F77_ssyr2().

Referenced by bl1_ssyr2().

◆ bl1_ssyr_blas()

void bl1_ssyr_blas ( uplo1_t  uplo,
int  m,
float alpha,
float x,
int  incx,
float a,
int  lda 
)
194{
195#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
198
200
203 m,
204 *alpha,
205 x, incx,
206 a, lda );
207#else
208 char blas_uplo;
209
211
213 &m,
214 alpha,
215 x, &incx,
216 a, &lda );
217#endif
218}
void F77_ssyr(char *uplo, int *n, float *alpha, float *x, int *incx, float *a, int *lda)
void cblas_ssyr(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const float alpha, const float *X, const int incX, float *A, const int lda)

References bl1_param_map_to_netlib_uplo(), cblas_ssyr(), CblasColMajor, and F77_ssyr().

Referenced by bl1_ssyr().

◆ bl1_strmv()

void bl1_strmv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float a,
int  a_rs,
int  a_cs,
float x,
int  incx 
)
14{
15 float* a_save = a;
16 int a_rs_save = a_rs;
17 int a_cs_save = a_cs;
18 int lda, inca;
19
20 // Return early if possible.
21 if ( bl1_zero_dim1( m ) ) return;
22
23 // If necessary, allocate, initialize, and use a temporary contiguous
24 // copy of the matrix rather than the original matrix.
26 m,
27 m,
29 &a, &a_rs, &a_cs );
30
31 // Initialize with values assuming column-major storage.
32 lda = a_cs;
33 inca = a_rs;
34
35 // If A is a row-major matrix, then we can use the underlying column-major
36 // BLAS implementation by fiddling with the parameters.
38 {
40 bl1_toggle_uplo( uplo );
42 }
43
44 bl1_strmv_blas( uplo,
45 trans,
46 diag,
47 m,
48 a, lda,
49 x, incx );
50
51 // Free the temporary contiguous matrix.
53 &a, &a_rs, &a_cs );
54}
void bl1_strmv_blas(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int lda, float *x, int incx)
Definition bl1_trmv.c:257

References bl1_is_row_storage(), bl1_screate_contigmr(), bl1_sfree_contigm(), bl1_strmv_blas(), and bl1_zero_dim1().

Referenced by bl1_strmvsx(), FLA_CAQR2_UT_ops_var1(), FLA_Eig_gest_nl_ops_var1(), FLA_Eig_gest_nl_ops_var5(), FLA_Eig_gest_nu_ops_var1(), FLA_Eig_gest_nu_ops_var5(), FLA_Hess_UT_step_ops_var5(), FLA_Trinv_ln_ops_var1(), FLA_Trinv_ln_ops_var4(), FLA_Trinv_lu_ops_var1(), FLA_Trinv_lu_ops_var4(), FLA_Trinv_un_ops_var1(), FLA_Trinv_un_ops_var4(), FLA_Trinv_uu_ops_var1(), FLA_Trinv_uu_ops_var4(), FLA_Trmv_external(), FLA_Ttmm_l_ops_var3(), and FLA_Ttmm_u_ops_var3().

◆ bl1_strmv_blas()

void bl1_strmv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float a,
int  lda,
float x,
int  incx 
)
258{
259#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
264
268
273 m,
274 a, lda,
275 x, incx );
276#else
277 char blas_uplo;
278 char blas_trans;
279 char blas_diag;
280
284
286 &blas_trans,
287 &blas_diag,
288 &m,
289 a, &lda,
290 x, &incx );
291#endif
292}
void F77_strmv(char *uplo, char *transa, char *diag, int *n, float *a, int *lda, float *y, int *incy)
void cblas_strmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const float *A, const int lda, float *X, const int incX)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_strmv(), CblasColMajor, and F77_strmv().

Referenced by bl1_strmv().

◆ bl1_strmvsx()

void bl1_strmvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float alpha,
float a,
int  a_rs,
int  a_cs,
float x,
int  incx,
float beta,
float y,
int  incy 
)
14{
15 float* a_save = a;
16 int a_rs_save = a_rs;
17 int a_cs_save = a_cs;
18 float* x_temp;
19 int incx_temp;
20
21 // Return early if possible.
22 if ( bl1_zero_dim1( m ) ) return;
23
24 // If necessary, allocate, initialize, and use a temporary contiguous
25 // copy of the matrix rather than the original matrix.
27 m,
28 m,
30 &a, &a_rs, &a_cs );
31
32 // Allocate a temporary vector conformal to x.
33 x_temp = bl1_sallocv( m );
34 incx_temp = 1;
35
36 // Copy x to a temporary vector.
38 m,
39 x, incx,
41
42 // Perform the operation, storing the result to x_temp.
43 bl1_strmv( uplo,
44 trans,
45 diag,
46 m,
47 a, a_rs, a_cs,
49
50 // Scale y by beta.
52 m,
53 beta,
54 y, incy );
55
56 // Axpy the partial result in x_temp into y.
58 m,
59 alpha,
61 y, incy );
62
63 // Free the temporary vector.
65
66 // Free the temporary contiguous matrix.
68 &a, &a_rs, &a_cs );
69}
void bl1_saxpyv(conj1_t conj, int n, float *alpha, float *x, int incx, float *y, int incy)
Definition bl1_axpyv.c:13
void bl1_scopyv(conj1_t conj, int m, float *x, int incx, float *y, int incy)
Definition bl1_copyv.c:35
void bl1_strmv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int a_rs, int a_cs, float *x, int incx)
Definition bl1_trmv.c:13
float * bl1_sallocv(unsigned int n_elem)
Definition bl1_allocv.c:30
void bl1_sfree(float *p)
Definition bl1_free.c:30

References bl1_sallocv(), bl1_saxpyv(), bl1_scopyv(), bl1_screate_contigmr(), bl1_sfree(), bl1_sfree_contigm(), bl1_sscalv(), bl1_strmv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Hess_UT_step_ops_var5().

◆ bl1_strsv()

void bl1_strsv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float a,
int  a_rs,
int  a_cs,
float x,
int  incx 
)
14{
15 float* a_save = a;
16 int a_rs_save = a_rs;
17 int a_cs_save = a_cs;
18 int lda, inca;
19
20 // Return early if possible.
21 if ( bl1_zero_dim1( m ) ) return;
22
23 // If necessary, allocate, initialize, and use a temporary contiguous
24 // copy of the matrix rather than the original matrix.
26 m,
27 m,
29 &a, &a_rs, &a_cs );
30
31 // Initialize with values assuming column-major storage.
32 lda = a_cs;
33 inca = a_rs;
34
35 // If A is a row-major matrix, then we can use the underlying column-major
36 // BLAS implementation by fiddling with the parameters.
38 {
40 bl1_toggle_uplo( uplo );
42 }
43
44 bl1_strsv_blas( uplo,
45 trans,
46 diag,
47 m,
48 a, lda,
49 x, incx );
50
51 // Free the temporary contiguous matrix.
53 &a, &a_rs, &a_cs );
54}
void bl1_strsv_blas(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int lda, float *x, int incx)
Definition bl1_trsv.c:257

References bl1_is_row_storage(), bl1_screate_contigmr(), bl1_sfree_contigm(), bl1_strsv_blas(), and bl1_zero_dim1().

Referenced by bl1_strsvsx(), FLA_Chol_l_ops_var1(), FLA_Chol_u_ops_var1(), FLA_Eig_gest_il_ops_var1(), FLA_Eig_gest_il_ops_var5(), FLA_Eig_gest_iu_ops_var1(), FLA_Eig_gest_iu_ops_var5(), FLA_Hess_UT_step_ops_var5(), FLA_LU_nopiv_ops_var1(), FLA_LU_nopiv_ops_var2(), FLA_LU_nopiv_ops_var3(), FLA_LU_piv_ops_var3(), FLA_Lyap_h_ops_var1(), FLA_Lyap_h_ops_var2(), FLA_Lyap_h_ops_var3(), FLA_Lyap_h_ops_var4(), FLA_Lyap_n_ops_var1(), FLA_Lyap_n_ops_var2(), FLA_Lyap_n_ops_var3(), FLA_Lyap_n_ops_var4(), FLA_Trinv_ln_ops_var2(), FLA_Trinv_ln_ops_var4(), FLA_Trinv_lu_ops_var2(), FLA_Trinv_lu_ops_var4(), FLA_Trinv_un_ops_var2(), FLA_Trinv_un_ops_var4(), FLA_Trinv_uu_ops_var2(), FLA_Trinv_uu_ops_var4(), and FLA_Trsv_external().

◆ bl1_strsv_blas()

void bl1_strsv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float a,
int  lda,
float x,
int  incx 
)
258{
259#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
264
268
273 m,
274 a, lda,
275 x, incx );
276#else
277 char blas_uplo;
278 char blas_trans;
279 char blas_diag;
280
284
286 &blas_trans,
287 &blas_diag,
288 &m,
289 a, &lda,
290 x, &incx );
291#endif
292}
void F77_strsv(char *uplo, char *transa, char *diag, int *n, float *a, int *lda, float *y, int *incy)
void cblas_strsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const float *A, const int lda, float *X, const int incX)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_strsv(), CblasColMajor, and F77_strsv().

Referenced by bl1_strsv().

◆ bl1_strsvsx()

void bl1_strsvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float alpha,
float a,
int  a_rs,
int  a_cs,
float x,
int  incx,
float beta,
float y,
int  incy 
)
14{
15 float* a_save = a;
16 int a_rs_save = a_rs;
17 int a_cs_save = a_cs;
18 float* x_temp;
19 int incx_temp;
20
21 // Return early if possible.
22 if ( bl1_zero_dim1( m ) ) return;
23
24 // If necessary, allocate, initialize, and use a temporary contiguous
25 // copy of the matrix rather than the original matrix.
27 m,
28 m,
30 &a, &a_rs, &a_cs );
31
32 // Allocate a temporary vector conformal to x.
33 x_temp = bl1_sallocv( m );
34 incx_temp = 1;
35
36 // Copy x to a temporary vector.
38 m,
39 x, incx,
41
42 // Perform the operation, storing the result to x_temp.
43 bl1_strsv( uplo,
44 trans,
45 diag,
46 m,
47 a, a_rs, a_cs,
49
50 // Scale y by beta.
52 m,
53 beta,
54 y, incy );
55
56 // Axpy the partial result in x_temp into y.
58 m,
59 alpha,
61 y, incy );
62
63 // Free the temporary vector.
65
66 // Free the temporary contiguous matrix.
68 &a, &a_rs, &a_cs );
69}
void bl1_strsv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int a_rs, int a_cs, float *x, int incx)
Definition bl1_trsv.c:13

References bl1_sallocv(), bl1_saxpyv(), bl1_scopyv(), bl1_screate_contigmr(), bl1_sfree(), bl1_sfree_contigm(), bl1_sscalv(), bl1_strsv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

◆ bl1_zgemv()

void bl1_zgemv ( trans1_t  transa,
conj1_t  conjx,
int  m,
int  n,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)
256{
257 dcomplex* a_save = a;
258 int a_rs_save = a_rs;
259 int a_cs_save = a_cs;
260 dcomplex zero = bl1_z0();
261 dcomplex one = bl1_z1();
263 dcomplex* ax;
264 int lda, inca;
265 int n_x;
266 int incx_conj;
267 int incax;
268
269 // Return early if possible.
270 if ( bl1_zero_dim2( m, n ) )
271 {
272 int n_elem;
273
274 if ( bl1_does_trans( transa ) ) n_elem = n;
275 else n_elem = m;
276
278 n_elem,
279 beta,
280 y, incy );
281 return;
282 }
283
284 // If necessary, allocate, initialize, and use a temporary contiguous
285 // copy of the matrix rather than the original matrix.
287 n,
289 &a, &a_rs, &a_cs );
290
291 // Initialize with values assuming column-major storage.
292 lda = a_cs;
293 inca = a_rs;
294
295 // If A is a row-major matrix, then we can use the underlying column-major
296 // BLAS implementation by fiddling with the parameters.
297 if ( bl1_is_row_storage( a_rs, a_cs ) )
298 {
299 bl1_swap_ints( m, n );
302 }
303
304 // Initialize with values assuming no conjugation of x.
305 x_conj = x;
306 incx_conj = incx;
307
308 // We need a temporary vector for the cases when x is conjugated, and
309 // also for the cases where A is conjugated.
311 {
312 if ( bl1_does_trans( transa ) ) n_x = m;
313 else n_x = n;
314
316 incx_conj = 1;
317
319 n_x,
320 x, incx,
321 x_conj, incx_conj );
322 }
323
324 // We want to handle the conjnotrans case, but without explicitly
325 // conjugating A. To do so, we leverage the fact that computing the
326 // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
327 if ( bl1_is_conjnotrans( transa ) )
328 {
329 // We need a temporary vector for the product A * conj(x), which is
330 // conformal to y. We know we are not transposing, so y is length m.
331 ax = bl1_zallocv( m );
332 incax = 1;
333
334 // Start by conjugating the contents of the temporary copy of x.
335 bl1_zconjv( n,
336 x_conj, incx_conj );
337
338 // Compute A * conj(x) where x is the temporary copy of x created above.
340 m,
341 n,
342 &one,
343 a, lda,
345 &zero,
346 ax, incax );
347
348 // Scale y by beta.
350 m,
351 beta,
352 y, incy );
353
354 // And finally, accumulate alpha * conj( A * conj(x) ) into y.
356 m,
357 alpha,
358 ax, incax,
359 y, incy);
360
361 // Free the temporary vector for Ax.
362 bl1_zfree( ax );
363 }
364 else // notrans, trans, or conjtrans
365 {
367 m,
368 n,
369 alpha,
370 a, lda,
372 beta,
373 y, incy );
374 }
375
376 // Free the temporary conjugated x vector.
378 bl1_zfree( x_conj );
379
380 // Free the temporary contiguous matrix.
382 &a, &a_rs, &a_cs );
383}
void bl1_zaxpyv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy)
Definition bl1_axpyv.c:60
void bl1_zconjv(int m, dcomplex *x, int incx)
Definition bl1_conjv.c:34
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition bl1_copyv.c:63
void bl1_zgemv_blas(trans1_t transa, int m, int n, dcomplex *alpha, dcomplex *a, int lda, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
Definition bl1_gemv.c:486
void bl1_zscalv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx)
Definition bl1_scalv.c:72
dcomplex bl1_z0(void)
Definition bl1_constants.c:133
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition bl1_allocv.c:45
dcomplex bl1_z1(void)
Definition bl1_constants.c:69
void bl1_zcreate_contigm(int m, int n, dcomplex *a_save, int a_rs_save, int a_cs_save, dcomplex **a, int *a_rs, int *a_cs)
Definition bl1_create_contigm.c:115
void bl1_zfree(dcomplex *p)
Definition bl1_free.c:45
void bl1_zfree_contigm(dcomplex *a_save, int a_rs_save, int a_cs_save, dcomplex **a, int *a_rs, int *a_cs)
Definition bl1_free_contigm.c:61
Definition blis_type_defs.h:138

References bl1_does_trans(), bl1_is_conj(), bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_z0(), bl1_z1(), bl1_zallocv(), bl1_zaxpyv(), bl1_zconjv(), bl1_zcopyv(), bl1_zcreate_contigm(), bl1_zero_dim2(), bl1_zfree(), bl1_zfree_contigm(), bl1_zgemv_blas(), bl1_zscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Accum_T_UT_fc_opz_var1(), FLA_Accum_T_UT_fr_opz_var1(), FLA_Apply_H2_UT_l_opz_var1(), FLA_Apply_H2_UT_r_opz_var1(), FLA_Apply_HUD_UT_l_opz_var1(), FLA_Bidiag_UT_u_step_ofz_var2(), FLA_Bidiag_UT_u_step_ofz_var3(), FLA_Bidiag_UT_u_step_ofz_var4(), FLA_Bidiag_UT_u_step_opz_var1(), FLA_Bidiag_UT_u_step_opz_var2(), FLA_Bidiag_UT_u_step_opz_var3(), FLA_Bidiag_UT_u_step_opz_var4(), FLA_Bidiag_UT_u_step_opz_var5(), FLA_CAQR2_UT_opz_var1(), FLA_Chol_l_opz_var2(), FLA_Chol_u_opz_var2(), FLA_Eig_gest_il_opz_var2(), FLA_Eig_gest_il_opz_var3(), FLA_Eig_gest_iu_opz_var2(), FLA_Eig_gest_iu_opz_var3(), FLA_Eig_gest_nl_opz_var2(), FLA_Eig_gest_nu_opz_var2(), FLA_Gemv_external(), FLA_Gemvc_external(), FLA_Hess_UT_step_ofz_var2(), FLA_Hess_UT_step_ofz_var3(), FLA_Hess_UT_step_ofz_var4(), FLA_Hess_UT_step_opz_var1(), FLA_Hess_UT_step_opz_var2(), FLA_Hess_UT_step_opz_var3(), FLA_Hess_UT_step_opz_var4(), FLA_Hess_UT_step_opz_var5(), FLA_LQ_UT_opz_var2(), FLA_LU_nopiv_opz_var2(), FLA_LU_nopiv_opz_var3(), FLA_LU_nopiv_opz_var4(), FLA_LU_piv_opz_var3(), FLA_LU_piv_opz_var4(), FLA_Lyap_h_opz_var2(), FLA_Lyap_h_opz_var3(), FLA_Lyap_n_opz_var2(), FLA_Lyap_n_opz_var3(), FLA_QR2_UT_opz_var1(), FLA_QR_UT_opz_var2(), FLA_Tridiag_UT_l_step_ofz_var2(), FLA_Tridiag_UT_l_step_ofz_var3(), FLA_Tridiag_UT_l_step_opz_var1(), FLA_Tridiag_UT_l_step_opz_var2(), FLA_Tridiag_UT_l_step_opz_var3(), FLA_Ttmm_l_opz_var2(), and FLA_Ttmm_u_opz_var2().

◆ bl1_zgemv_blas()

void bl1_zgemv_blas ( trans1_t  transa,
int  m,
int  n,
dcomplex alpha,
dcomplex a,
int  lda,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)
487{
488#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
491
493
496 m,
497 n,
498 alpha,
499 a, lda,
500 x, incx,
501 beta,
502 y, incy );
503#else
504 char blas_transa;
505
507
509 &m,
510 &n,
511 alpha,
512 a, &lda,
513 x, &incx,
514 beta,
515 y, &incy );
516#endif
517}
void F77_zgemv(char *transa, int *m, int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *x, int *incx, dcomplex *beta, dcomplex *y, int *incy)
void cblas_zgemv(const enum CBLAS_ORDER order, const enum CBLAS_TRANSPOSE TransA, const int M, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)

References bl1_param_map_to_netlib_trans(), cblas_zgemv(), CblasColMajor, and F77_zgemv().

Referenced by bl1_zgemv().

◆ bl1_zger()

void bl1_zger ( conj1_t  conjx,
conj1_t  conjy,
int  m,
int  n,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  a_rs,
int  a_cs 
)
195{
196 int m_save = m;
197 int n_save = n;
198 dcomplex* a_save = a;
199 int a_rs_save = a_rs;
200 int a_cs_save = a_cs;
202 int incx_conj;
203 int lda, inca;
204
205 // Return early if possible.
206 if ( bl1_zero_dim2( m, n ) ) return;
207
208 // If necessary, allocate, initialize, and use a temporary contiguous
209 // copy of the matrix rather than the original matrix.
211 n,
213 &a, &a_rs, &a_cs );
214
215 // Initialize with values assuming column-major storage.
216 lda = a_cs;
217 inca = a_rs;
218
219 // If A is a row-major matrix, then we can use the underlying column-major
220 // BLAS implementation by fiddling with the parameters.
221 if ( bl1_is_row_storage( a_rs, a_cs ) )
222 {
223 bl1_swap_ints( m, n );
228 }
229
230 // Initialize with values assuming no conjugation of x.
231 x_conj = x;
232 incx_conj = incx;
233
234 // We need a temporary vector for the cases when x is conjugated.
235 if ( bl1_is_conj( conjx ) )
236 {
237 x_conj = bl1_zallocv( m );
238 incx_conj = 1;
239
241 m,
242 x, incx,
243 x_conj, incx_conj );
244 }
245
246 // Conjugation of y is supported in the BLAS.
247 if ( bl1_is_conj( conjy ) )
248 {
250 n,
251 alpha,
253 y, incy,
254 a, lda );
255 }
256 else
257 {
259 n,
260 alpha,
262 y, incy,
263 a, lda );
264 }
265
266 // Free the temporary conjugated x vector.
267 if ( bl1_is_conj( conjx ) )
268 bl1_zfree( x_conj );
269
270 // Free the temporary contiguous matrix.
272 n_save,
274 &a, &a_rs, &a_cs );
275}
void bl1_zgeru_blas(int m, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
Definition bl1_ger.c:389
void bl1_zgerc_blas(int m, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
Definition bl1_ger.c:367
void bl1_zfree_saved_contigm(int m, int n, dcomplex *a_save, int a_rs_save, int a_cs_save, dcomplex **a, int *a_rs, int *a_cs)
Definition bl1_free_saved_contigm.c:82

References bl1_is_conj(), bl1_is_row_storage(), bl1_zallocv(), bl1_zcopyv(), bl1_zcreate_contigm(), bl1_zero_dim2(), bl1_zfree(), bl1_zfree_saved_contigm(), bl1_zgerc_blas(), bl1_zgeru_blas(), and BLIS1_CONJUGATE.

Referenced by FLA_Apply_H2_UT_l_opz_var1(), FLA_Apply_H2_UT_r_opz_var1(), FLA_Apply_HUD_UT_l_opz_var1(), FLA_Bidiag_UT_u_step_ofz_var3(), FLA_Bidiag_UT_u_step_opz_var2(), FLA_Bidiag_UT_u_step_opz_var3(), FLA_Eig_gest_il_opz_var3(), FLA_Eig_gest_il_opz_var4(), FLA_Eig_gest_iu_opz_var3(), FLA_Eig_gest_iu_opz_var4(), FLA_Eig_gest_nl_opz_var4(), FLA_Eig_gest_nu_opz_var4(), FLA_Ger_external(), FLA_Gerc_external(), FLA_Hess_UT_step_ofz_var2(), FLA_Hess_UT_step_ofz_var3(), FLA_Hess_UT_step_ofz_var4(), FLA_Hess_UT_step_opz_var2(), FLA_Hess_UT_step_opz_var3(), FLA_Hess_UT_step_opz_var4(), FLA_LU_nopiv_opz_var5(), FLA_LU_piv_opz_var5(), FLA_Lyap_h_opz_var2(), FLA_Lyap_n_opz_var2(), FLA_SA_LU_unb(), FLA_Trinv_ln_opz_var3(), FLA_Trinv_ln_opz_var4(), FLA_Trinv_lu_opz_var3(), FLA_Trinv_lu_opz_var4(), FLA_Trinv_un_opz_var3(), FLA_Trinv_un_opz_var4(), FLA_Trinv_uu_opz_var3(), and FLA_Trinv_uu_opz_var4().

◆ bl1_zgerc_blas()

void bl1_zgerc_blas ( int  m,
int  n,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  lda 
)
368{
369#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
371
373 m,
374 n,
375 alpha,
376 x, incx,
377 y, incy,
378 a, lda );
379#else
380 F77_zgerc ( &m,
381 &n,
382 alpha,
383 x, &incx,
384 y, &incy,
385 a, &lda );
386#endif
387}
void F77_zgerc(int *m, int *n, dcomplex *alpha, dcomplex *x, int *incx, dcomplex *y, int *incy, dcomplex *a, int *lda)
void cblas_zgerc(const enum CBLAS_ORDER order, const int M, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)

References cblas_zgerc(), CblasColMajor, and F77_zgerc().

Referenced by bl1_zger().

◆ bl1_zgeru_blas()

void bl1_zgeru_blas ( int  m,
int  n,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  lda 
)
390{
391#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
393
395 m,
396 n,
397 alpha,
398 x, incx,
399 y, incy,
400 a, lda );
401#else
402 F77_zgeru ( &m,
403 &n,
404 alpha,
405 x, &incx,
406 y, &incy,
407 a, &lda );
408#endif
409}
void F77_zgeru(int *m, int *n, dcomplex *alpha, dcomplex *x, int *incx, dcomplex *y, int *incy, dcomplex *a, int *lda)
void cblas_zgeru(const enum CBLAS_ORDER order, const int M, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)

References cblas_zgeru(), CblasColMajor, and F77_zgeru().

Referenced by bl1_zger().

◆ bl1_zhemv()

void bl1_zhemv ( uplo1_t  uplo,
conj1_t  conj,
int  m,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)
135{
136 dcomplex* a_save = a;
137 int a_rs_save = a_rs;
138 int a_cs_save = a_cs;
139 dcomplex zero = bl1_z0();
140 dcomplex one = bl1_z1();
142 dcomplex* ax;
143 int lda, inca;
144 int incx_conj;
145 int incax;
146
147 // Return early if possible.
148 if ( bl1_zero_dim1( m ) ) return;
149
150 // If necessary, allocate, initialize, and use a temporary contiguous
151 // copy of the matrix rather than the original matrix.
153 m,
154 m,
156 &a, &a_rs, &a_cs );
157
158 // Initialize with values assuming column-major storage.
159 lda = a_cs;
160 inca = a_rs;
161
162 // If A is a row-major matrix, then we can use the underlying column-major
163 // BLAS implementation by fiddling with the parameters.
164 if ( bl1_is_row_storage( a_rs, a_cs ) )
165 {
167 bl1_toggle_uplo( uplo );
169 }
170
171 // We want to handle the case where A is conjugated, but without
172 // explicitly or conjugating A. To do so, we leverage the fact that
173 // computing the product conj(A) * x is equivalent to computing
174 // conj( A * conj(x) ).
175 if ( bl1_is_conj( conj ) )
176 {
177 // We need a temporary vector so we can create a conjugated copy of x.
178 x_conj = bl1_zallocv( m );
179 incx_conj = 1;
180
182 m,
183 x, incx,
184 x_conj, incx_conj );
185
186 // We need a temporary vector for the product A * conj(x), which is
187 // conformal to y (and x).
188 ax = bl1_zallocv( m );
189 incax = 1;
190
191 // Compute A * conj(x) where x is the temporary copy of x created above.
192 bl1_zhemv_blas( uplo,
193 m,
194 &one,
195 a, lda,
197 &zero,
198 ax, incax );
199
200 // Scale y by beta.
202 m,
203 beta,
204 y, incy );
205
206 // And finally, accumulate alpha * conj( A * conj(x) ) into y.
208 m,
209 alpha,
210 ax, incax,
211 y, incy);
212
213 // Free the temporary vectors for x and Ax.
214 bl1_zfree( x_conj );
215 bl1_zfree( ax );
216 }
217 else // noconj
218 {
219 bl1_zhemv_blas( uplo,
220 m,
221 alpha,
222 a, lda,
223 x, incx,
224 beta,
225 y, incy );
226 }
227
228 // Free the temporary contiguous matrix.
230 &a, &a_rs, &a_cs );
231}
void bl1_zhemv_blas(uplo1_t uplo, int m, dcomplex *alpha, dcomplex *a, int lda, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
Definition bl1_hemv.c:266
void bl1_zcreate_contigmr(uplo1_t uplo, int m, int n, dcomplex *a_save, int a_rs_save, int a_cs_save, dcomplex **a, int *a_rs, int *a_cs)
Definition bl1_create_contigmr.c:109

References bl1_is_conj(), bl1_is_row_storage(), bl1_z0(), bl1_z1(), bl1_zallocv(), bl1_zaxpyv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_contigm(), bl1_zhemv_blas(), bl1_zscalv(), BLIS1_CONJUGATE, and BLIS1_NO_CONJUGATE.

Referenced by FLA_Eig_gest_il_opz_var1(), FLA_Eig_gest_il_opz_var2(), FLA_Eig_gest_iu_opz_var1(), FLA_Eig_gest_iu_opz_var2(), FLA_Eig_gest_nl_opz_var1(), FLA_Eig_gest_nl_opz_var2(), FLA_Eig_gest_nu_opz_var1(), FLA_Eig_gest_nu_opz_var2(), FLA_Hemv_external(), FLA_Hemvc_external(), FLA_Lyap_h_opz_var1(), FLA_Lyap_n_opz_var1(), FLA_Tridiag_UT_l_step_ofz_var2(), FLA_Tridiag_UT_l_step_ofz_var3(), FLA_Tridiag_UT_l_step_opz_var1(), FLA_Tridiag_UT_l_step_opz_var2(), and FLA_Tridiag_UT_l_step_opz_var3().

◆ bl1_zhemv_blas()

void bl1_zhemv_blas ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex a,
int  lda,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)
267{
268#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
271
273
276 m,
277 alpha,
278 a, lda,
279 x, incx,
280 beta,
281 y, incy );
282#else
283 char blas_uplo;
284
286
288 &m,
289 alpha,
290 a, &lda,
291 x, &incx,
292 beta,
293 y, &incy );
294#endif
295}
void F77_zhemv(char *uplo, int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *x, int *incx, dcomplex *beta, dcomplex *y, int *incy)
void cblas_zhemv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *A, const int lda, const void *X, const int incX, const void *beta, void *Y, const int incY)

References bl1_param_map_to_netlib_uplo(), cblas_zhemv(), CblasColMajor, and F77_zhemv().

Referenced by bl1_zhemv().

◆ bl1_zher()

void bl1_zher ( uplo1_t  uplo,
conj1_t  conj,
int  m,
double alpha,
dcomplex x,
int  incx,
dcomplex a,
int  a_rs,
int  a_cs 
)
102{
103 int m_save = m;
104 dcomplex* a_save = a;
105 int a_rs_save = a_rs;
106 int a_cs_save = a_cs;
108 int incx_conj;
109 int lda, inca;
110
111 // Return early if possible.
112 if ( bl1_zero_dim1( m ) ) return;
113
114 // If necessary, allocate, initialize, and use a temporary contiguous
115 // copy of the matrix rather than the original matrix.
117 m,
118 m,
120 &a, &a_rs, &a_cs );
121
122 // Initialize with values assuming column-major storage.
123 lda = a_cs;
124 inca = a_rs;
125
126 // If A is a row-major matrix, then we can use the underlying column-major
127 // BLAS implementation by fiddling with the parameters.
128 if ( bl1_is_row_storage( a_rs, a_cs ) )
129 {
131 bl1_toggle_uplo( uplo );
133 }
134
135 // Initialize with values assuming no conjugation of ( x * x' ).
136 x_conj = x;
137 incx_conj = incx;
138
139 // We want to handle the case where ( x * x' ) is conjugated, but
140 // without explicitly conjugating the matrix. To do so, we leverage
141 // the fact that computing the product conj( x * x' ) is equivalent
142 // to computing ( conj(x) * conj(x)' ), since ( x * x' ) is Hermitian.
143 if ( bl1_is_conj( conj ) )
144 {
145 x_conj = bl1_zallocv( m );
146 incx_conj = 1;
147
149 m,
150 x, incx,
151 x_conj, incx_conj );
152 }
153
154 bl1_zher_blas( uplo,
155 m,
156 alpha,
158 a, lda );
159
160 // Free the temporary conjugated x vector.
161 if ( bl1_is_conj( conj ) )
162 bl1_zfree( x_conj );
163
164 // Free the temporary contiguous matrix.
166 m_save,
168 &a, &a_rs, &a_cs );
169}
void bl1_zher_blas(uplo1_t uplo, int m, double *alpha, dcomplex *x, int incx, dcomplex *a, int lda)
Definition bl1_her.c:200

References bl1_is_conj(), bl1_is_row_storage(), bl1_zallocv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_saved_contigm(), bl1_zher_blas(), and BLIS1_CONJUGATE.

Referenced by FLA_Chol_l_opz_var3(), FLA_Chol_u_opz_var3(), FLA_Her_external(), FLA_Herc_external(), FLA_Ttmm_l_opz_var1(), and FLA_Ttmm_u_opz_var1().

◆ bl1_zher2()

void bl1_zher2 ( uplo1_t  uplo,
conj1_t  conj,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  a_rs,
int  a_cs 
)
122{
123 int m_save = m;
124 dcomplex* a_save = a;
125 int a_rs_save = a_rs;
126 int a_cs_save = a_cs;
129 int incx_conj;
130 int incy_conj;
131 int lda, inca;
132
133 // Return early if possible.
134 if ( bl1_zero_dim1( m ) ) return;
135
136 // If necessary, allocate, initialize, and use a temporary contiguous
137 // copy of the matrix rather than the original matrix.
139 m,
140 m,
142 &a, &a_rs, &a_cs );
143
144 // Initialize with values assuming column-major storage.
145 lda = a_cs;
146 inca = a_rs;
147
148 // If A is a row-major matrix, then we can use the underlying column-major
149 // BLAS implementation by fiddling with the parameters.
150 if ( bl1_is_row_storage( a_rs, a_cs ) )
151 {
153 bl1_toggle_uplo( uplo );
155 }
156
157 // Initialize with values assuming no conjugation of ( x * y' ) or
158 // ( y * x' ).
159 x_conj = x;
160 incx_conj = incx;
161 y_conj = y;
162 incy_conj = incy;
163
164 // We want to handle the case where ( x * y' ) and ( y * x' ) are
165 // conjugated, but without explicitly conjugating the matrices. To do
166 // so, we leverage the fact that computing the products conj( x * y' )
167 // and conj( y * x' ) is equivalent to computing ( conj(x) * conj(y)' )
168 // and ( conj(y) * conj(x)' ), respectively.
169 if ( bl1_is_conj( conj ) )
170 {
171 x_conj = bl1_zallocv( m );
172 incx_conj = 1;
173
174 y_conj = bl1_zallocv( m );
175 incy_conj = 1;
176
178 m,
179 x, incx,
180 x_conj, incx_conj );
181
183 m,
184 y, incy,
185 y_conj, incy_conj );
186 }
187
188 bl1_zher2_blas( uplo,
189 m,
190 alpha,
193 a, lda );
194
195 // Free the temporary conjugated x and y vectors.
196 if ( bl1_is_conj( conj ) )
197 {
198 bl1_zfree( x_conj );
199 bl1_zfree( y_conj );
200 }
201
202 // Free the temporary contiguous matrix.
204 m_save,
206 &a, &a_rs, &a_cs );
207}
void bl1_zher2_blas(uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
Definition bl1_her2.c:240

References bl1_is_conj(), bl1_is_row_storage(), bl1_zallocv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_saved_contigm(), bl1_zher2_blas(), and BLIS1_CONJUGATE.

Referenced by FLA_Eig_gest_il_opz_var4(), FLA_Eig_gest_il_opz_var5(), FLA_Eig_gest_iu_opz_var4(), FLA_Eig_gest_iu_opz_var5(), FLA_Eig_gest_nl_opz_var4(), FLA_Eig_gest_nl_opz_var5(), FLA_Eig_gest_nu_opz_var4(), FLA_Eig_gest_nu_opz_var5(), FLA_Her2_external(), FLA_Her2c_external(), FLA_Lyap_h_opz_var4(), FLA_Lyap_n_opz_var4(), FLA_Tridiag_UT_l_step_ofz_var2(), FLA_Tridiag_UT_l_step_opz_var1(), and FLA_Tridiag_UT_l_step_opz_var2().

◆ bl1_zher2_blas()

void bl1_zher2_blas ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  lda 
)
241{
242#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
245
247
250 m,
251 alpha,
252 x, incx,
253 y, incy,
254 a, lda );
255#else
256 char blas_uplo;
257
259
261 &m,
262 alpha,
263 x, &incx,
264 y, &incy,
265 a, &lda );
266#endif
267}
void F77_zher2(char *uplo, int *n, dcomplex *alpha, dcomplex *x, int *incx, dcomplex *y, int *incy, dcomplex *a, int *lda)
void cblas_zher2(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const void *alpha, const void *X, const int incX, const void *Y, const int incY, void *A, const int lda)

References bl1_param_map_to_netlib_uplo(), cblas_zher2(), CblasColMajor, and F77_zher2().

Referenced by bl1_zher2().

◆ bl1_zher_blas()

void bl1_zher_blas ( uplo1_t  uplo,
int  m,
double alpha,
dcomplex x,
int  incx,
dcomplex a,
int  lda 
)
201{
202#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
205
207
210 m,
211 *alpha,
212 x, incx,
213 a, lda );
214#else
215 char blas_uplo;
216
218
220 &m,
221 alpha,
222 x, &incx,
223 a, &lda );
224#endif
225}
void F77_zher(char *uplo, int *n, double *alpha, dcomplex *x, int *incx, dcomplex *a, int *lda)
void cblas_zher(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const int N, const double alpha, const void *X, const int incX, void *A, const int lda)

References bl1_param_map_to_netlib_uplo(), cblas_zher(), CblasColMajor, and F77_zher().

Referenced by bl1_zher().

◆ bl1_zsymv()

void bl1_zsymv ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)
143{
144 dcomplex* a_save = a;
145 int a_rs_save = a_rs;
146 int a_cs_save = a_cs;
147 int lda, inca;
148
149 // Return early if possible.
150 if ( bl1_zero_dim1( m ) ) return;
151
152 // If necessary, allocate, initialize, and use a temporary contiguous
153 // copy of the matrix rather than the original matrix.
155 m,
156 m,
158 &a, &a_rs, &a_cs );
159
160 // Initialize with values assuming column-major storage.
161 lda = a_cs;
162 inca = a_rs;
163
164 // If A is a row-major matrix, then we can use the underlying column-major
165 // BLAS implementation by fiddling with the parameters.
166 if ( bl1_is_row_storage( a_rs, a_cs ) )
167 {
169 bl1_toggle_uplo( uplo );
170 }
171
172 bl1_zsymv_blas( uplo,
173 m,
174 alpha,
175 a, lda,
176 x, incx,
177 beta,
178 y, incy );
179
180 // Free the temporary contiguous matrix.
182 &a, &a_rs, &a_cs );
183}
void bl1_zsymv_blas(uplo1_t uplo, int m, dcomplex *alpha, dcomplex *a, int lda, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
Definition bl1_symv.c:337

References bl1_is_row_storage(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree_contigm(), and bl1_zsymv_blas().

Referenced by FLA_Symv_external().

◆ bl1_zsymv_blas()

void bl1_zsymv_blas ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex a,
int  lda,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)
338{
341 int n = 1;
342 int ldx = m;
343 int ldy = m;
344
345#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
349
352
353 x_copy = bl1_zallocv( m );
354 y_copy = bl1_zallocv( m );
355
357 m,
358 x, incx,
359 x_copy, 1 );
360
362 m,
363 y, incy,
364 y_copy, 1 );
365
369 m,
370 n,
371 alpha,
372 a, lda,
373 x_copy, ldx,
374 beta,
375 y_copy, ldy );
376
378 m,
379 y_copy, 1,
380 y, incy );
381
382 bl1_zfree( x_copy );
383 bl1_zfree( y_copy );
384
385#else
386 char blas_side;
387 char blas_uplo;
388
391
392 x_copy = bl1_zallocv( m );
393 y_copy = bl1_zallocv( m );
394
396 m,
397 x, incx,
398 x_copy, 1 );
399
401 m,
402 y, incy,
403 y_copy, 1 );
404
406 &blas_uplo,
407 &m,
408 &n,
409 alpha,
410 a, &lda,
411 x_copy, &ldx,
412 beta,
413 y_copy, &ldy );
414
416 m,
417 y_copy, 1,
418 y, incy );
419
420 bl1_zfree( x_copy );
421 bl1_zfree( y_copy );
422#endif
423}
void F77_zsymm(char *side, char *uplo, int *m, int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b, int *ldb, dcomplex *beta, dcomplex *c, int *ldc)
void cblas_zsymm(const enum CBLAS_ORDER Order, const enum CBLAS_SIDE Side, const enum CBLAS_UPLO Uplo, const int M, const int N, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)

References bl1_param_map_to_netlib_side(), bl1_param_map_to_netlib_uplo(), bl1_zallocv(), bl1_zcopyv(), bl1_zfree(), BLIS1_LEFT, BLIS1_NO_CONJUGATE, cblas_zsymm(), CblasColMajor, and F77_zsymm().

Referenced by bl1_zsymv().

◆ bl1_zsyr()

void bl1_zsyr ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex a,
int  a_rs,
int  a_cs 
)
146{
147 int m_save = m;
148 dcomplex* a_save = a;
149 int a_rs_save = a_rs;
150 int a_cs_save = a_cs;
151 int lda, inca;
152
153 // Return early if possible.
154 if ( bl1_zero_dim1( m ) ) return;
155
156 // If necessary, allocate, initialize, and use a temporary contiguous
157 // copy of the matrix rather than the original matrix.
159 m,
160 m,
162 &a, &a_rs, &a_cs );
163
164 // Initialize with values assuming column-major storage.
165 lda = a_cs;
166 inca = a_rs;
167
168 // If A is a row-major matrix, then we can use the underlying column-major
169 // BLAS implementation by fiddling with the parameters.
170 if ( bl1_is_row_storage( a_rs, a_cs ) )
171 {
173 bl1_toggle_uplo( uplo );
174 }
175
176 bl1_zsyr_blas( uplo,
177 m,
178 alpha,
179 x, incx,
180 a, lda );
181
182 // Free the temporary contiguous matrix.
184 m_save,
186 &a, &a_rs, &a_cs );
187}
void bl1_zsyr_blas(uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *a, int lda)
Definition bl1_syr.c:313

References bl1_is_row_storage(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree_saved_contigm(), and bl1_zsyr_blas().

Referenced by FLA_Syr_external().

◆ bl1_zsyr2()

void bl1_zsyr2 ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  a_rs,
int  a_cs 
)
149{
150 int m_save = m;
151 dcomplex* a_save = a;
152 int a_rs_save = a_rs;
153 int a_cs_save = a_cs;
154 int lda, inca;
155
156 // Return early if possible.
157 if ( bl1_zero_dim1( m ) ) return;
158
159 // If necessary, allocate, initialize, and use a temporary contiguous
160 // copy of the matrix rather than the original matrix.
162 m,
163 m,
165 &a, &a_rs, &a_cs );
166
167 // Initialize with values assuming column-major storage.
168 lda = a_cs;
169 inca = a_rs;
170
171 // If A is a row-major matrix, then we can use the underlying column-major
172 // BLAS implementation by fiddling with the parameters.
173 if ( bl1_is_row_storage( a_rs, a_cs ) )
174 {
176 bl1_toggle_uplo( uplo );
177 }
178
179 bl1_zsyr2_blas( uplo,
180 m,
181 alpha,
182 x, incx,
183 y, incy,
184 a, lda );
185
186 // Free the temporary contiguous matrix.
188 m_save,
190 &a, &a_rs, &a_cs );
191}
void bl1_zsyr2_blas(uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
Definition bl1_syr2.c:337

References bl1_is_row_storage(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree_saved_contigm(), and bl1_zsyr2_blas().

Referenced by FLA_Syr2_external().

◆ bl1_zsyr2_blas()

void bl1_zsyr2_blas ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  lda 
)
338{
342 int k = 1;
343 int ldx = m;
344 int ldy = m;
345
346#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
350
353
354 x_copy = bl1_zallocv( m );
355 y_copy = bl1_zallocv( m );
356
358 m,
359 x, incx,
360 x_copy, 1 );
361
363 m,
364 y, incy,
365 y_copy, 1 );
366
367 beta.real = 1.0;
368 beta.imag = 0.0;
369
373 m,
374 k,
375 alpha,
376 x_copy, ldx,
377 y_copy, ldy,
378 &beta,
379 a, lda );
380
381 bl1_zfree( x_copy );
382 bl1_zfree( y_copy );
383#else
384 char blas_uplo;
385 char blas_trans;
386
389
390 x_copy = bl1_zallocv( m );
391 y_copy = bl1_zallocv( m );
392
394 m,
395 x, incx,
396 x_copy, 1 );
397
399 m,
400 y, incy,
401 y_copy, 1 );
402
403 beta.real = 1.0;
404 beta.imag = 0.0;
405
407 &blas_trans,
408 &m,
409 &k,
410 alpha,
411 x_copy, &ldx,
412 y_copy, &ldy,
413 &beta,
414 a, &lda );
415
416 bl1_zfree( x_copy );
417 bl1_zfree( y_copy );
418#endif
419}
void F77_zsyr2k(char *uplo, char *transa, int *n, int *k, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *b, int *ldb, dcomplex *beta, dcomplex *c, int *ldc)
void cblas_zsyr2k(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *B, const int ldb, const void *beta, void *C, const int ldc)

References bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), bl1_zallocv(), bl1_zcopyv(), bl1_zfree(), BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, cblas_zsyr2k(), CblasColMajor, F77_zsyr2k(), dcomplex::imag, and dcomplex::real.

Referenced by bl1_zsyr2().

◆ bl1_zsyr_blas()

void bl1_zsyr_blas ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex a,
int  lda 
)
314{
317 int k = 1;
318 int ldx = m;
319
320#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
324
327
328 x_copy = bl1_zallocv( m );
329
331 m,
332 x, incx,
333 x_copy, 1 );
334
335 beta.real = 1.0;
336 beta.imag = 0.0;
337
341 m,
342 k,
343 alpha,
344 x_copy, ldx,
345 &beta,
346 a, lda );
347
348 bl1_zfree( x_copy );
349#else
350 char blas_uplo;
351 char blas_trans;
352
355
356 x_copy = bl1_zallocv( m );
357
359 m,
360 x, incx,
361 x_copy, 1 );
362
363 beta.real = 1.0;
364 beta.imag = 0.0;
365
367 &blas_trans,
368 &m,
369 &k,
370 alpha,
371 x_copy, &ldx,
372 &beta,
373 a, &lda );
374
375 bl1_zfree( x_copy );
376#endif
377}
void F77_zsyrk(char *uplo, char *transa, int *n, int *k, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *beta, dcomplex *c, int *ldc)
void cblas_zsyrk(const enum CBLAS_ORDER Order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE Trans, const int N, const int K, const void *alpha, const void *A, const int lda, const void *beta, void *C, const int ldc)

References bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), bl1_zallocv(), bl1_zcopyv(), bl1_zfree(), BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, cblas_zsyrk(), CblasColMajor, F77_zsyrk(), dcomplex::imag, and dcomplex::real.

Referenced by bl1_zsyr().

◆ bl1_ztrmv()

void bl1_ztrmv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx 
)
178{
179 dcomplex* a_save = a;
180 int a_rs_save = a_rs;
181 int a_cs_save = a_cs;
183 int incx_conj;
184 int lda, inca;
185
186 // Return early if possible.
187 if ( bl1_zero_dim1( m ) ) return;
188
189 // If necessary, allocate, initialize, and use a temporary contiguous
190 // copy of the matrix rather than the original matrix.
192 m,
193 m,
195 &a, &a_rs, &a_cs );
196
197 // Initialize with values assuming column-major storage.
198 lda = a_cs;
199 inca = a_rs;
200
201 // If A is a row-major matrix, then we can use the underlying column-major
202 // BLAS implementation by fiddling with the parameters.
203 if ( bl1_is_row_storage( a_rs, a_cs ) )
204 {
206 bl1_toggle_uplo( uplo );
208 }
209
210 // Initialize with values assuming that trans is not conjnotrans.
211 x_conj = x;
212 incx_conj = incx;
213
214 // We want to handle the conjnotrans case, but without explicitly
215 // conjugating A. To do so, we leverage the fact that computing the
216 // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
217 // Note: strictly speaking, we don't need to create a copy of x since
218 // the operation is simpler than, say, gemv. However, we create a copy
219 // anyway since in practice it performs better due to increased spatial
220 // locality.
221 if ( bl1_is_conjnotrans( trans ) )
222 {
223 x_conj = bl1_zallocv( m );
224 incx_conj = 1;
225
227 m,
228 x, incx,
229 x_conj, incx_conj );
230 }
231
232 bl1_ztrmv_blas( uplo,
233 trans,
234 diag,
235 m,
236 a, lda,
237 x_conj, incx_conj );
238
239 // Save the contents of and then free the temporary conjugated x vector.
240 if ( bl1_is_conjnotrans( trans ) )
241 {
243 m,
245 x, incx );
246
247 bl1_zfree( x_conj );
248 }
249
250 // Free the temporary contiguous matrix.
252 &a, &a_rs, &a_cs );
253}
void bl1_ztrmv_blas(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int lda, dcomplex *x, int incx)
Definition bl1_trmv.c:368

References bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_zallocv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_contigm(), bl1_ztrmv_blas(), and BLIS1_CONJUGATE.

Referenced by bl1_ztrmvsx(), FLA_CAQR2_UT_opz_var1(), FLA_Eig_gest_nl_opz_var1(), FLA_Eig_gest_nl_opz_var5(), FLA_Eig_gest_nu_opz_var1(), FLA_Eig_gest_nu_opz_var5(), FLA_Hess_UT_step_opz_var5(), FLA_Trinv_ln_opz_var1(), FLA_Trinv_ln_opz_var4(), FLA_Trinv_lu_opz_var1(), FLA_Trinv_lu_opz_var4(), FLA_Trinv_un_opz_var1(), FLA_Trinv_un_opz_var4(), FLA_Trinv_uu_opz_var1(), FLA_Trinv_uu_opz_var4(), FLA_Trmv_external(), FLA_Ttmm_l_opz_var3(), and FLA_Ttmm_u_opz_var3().

◆ bl1_ztrmv_blas()

void bl1_ztrmv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex a,
int  lda,
dcomplex x,
int  incx 
)
369{
370#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
375
379
384 m,
385 a, lda,
386 x, incx );
387#else
388 char blas_uplo;
389 char blas_trans;
390 char blas_diag;
391
395
397 &blas_trans,
398 &blas_diag,
399 &m,
400 a, &lda,
401 x, &incx );
402#endif
403}
void F77_ztrmv(char *uplo, char *transa, char *diag, int *n, dcomplex *a, int *lda, dcomplex *y, int *incy)
void cblas_ztrmv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *A, const int lda, void *X, const int incX)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_ztrmv(), CblasColMajor, and F77_ztrmv().

Referenced by bl1_ztrmv().

◆ bl1_ztrmvsx()

void bl1_ztrmvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)
188{
189 dcomplex* a_save = a;
190 int a_rs_save = a_rs;
191 int a_cs_save = a_cs;
193 int incx_temp;
194
195 // Return early if possible.
196 if ( bl1_zero_dim1( m ) ) return;
197
198 // If necessary, allocate, initialize, and use a temporary contiguous
199 // copy of the matrix rather than the original matrix.
201 m,
202 m,
204 &a, &a_rs, &a_cs );
205
206 // Allocate a temporary vector conformal to x.
207 x_temp = bl1_zallocv( m );
208 incx_temp = 1;
209
210 // Copy x to a temporary vector.
212 m,
213 x, incx,
214 x_temp, incx_temp );
215
216 // Perform the operation, storing the result to x_temp.
217 bl1_ztrmv( uplo,
218 trans,
219 diag,
220 m,
221 a, a_rs, a_cs,
222 x_temp, incx_temp );
223
224 // Scale y by beta.
226 m,
227 beta,
228 y, incy );
229
230 // Axpy the partial result in x_temp into y.
232 m,
233 alpha,
235 y, incy );
236
237 // Free the temporary vector.
238 bl1_zfree( x_temp );
239
240 // Free the temporary contiguous matrix.
242 &a, &a_rs, &a_cs );
243}
void bl1_ztrmv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx)
Definition bl1_trmv.c:177

References bl1_zallocv(), bl1_zaxpyv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_contigm(), bl1_zscalv(), bl1_ztrmv(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Hess_UT_step_opz_var5().

◆ bl1_ztrsv()

void bl1_ztrsv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx 
)
178{
179 dcomplex* a_save = a;
180 int a_rs_save = a_rs;
181 int a_cs_save = a_cs;
183 int incx_conj;
184 int lda, inca;
185
186 // Return early if possible.
187 if ( bl1_zero_dim1( m ) ) return;
188
189 // If necessary, allocate, initialize, and use a temporary contiguous
190 // copy of the matrix rather than the original matrix.
192 m,
193 m,
195 &a, &a_rs, &a_cs );
196
197 // Initialize with values assuming column-major storage.
198 lda = a_cs;
199 inca = a_rs;
200
201 // If A is a row-major matrix, then we can use the underlying column-major
202 // BLAS implementation by fiddling with the parameters.
203 if ( bl1_is_row_storage( a_rs, a_cs ) )
204 {
206 bl1_toggle_uplo( uplo );
208 }
209
210 // Initialize with values assuming that trans is not conjnotrans.
211 x_conj = x;
212 incx_conj = incx;
213
214 // We want to handle the conjnotrans case, but without explicitly
215 // conjugating A. To do so, we leverage the fact that computing the
216 // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
217 // Note: strictly speaking, we don't need to create a copy of x since
218 // the operation is simpler than, say, gemv. However, we create a copy
219 // anyway since in practice it performs better due to increased spatial
220 // locality.
221 if ( bl1_is_conjnotrans( trans ) )
222 {
223 x_conj = bl1_zallocv( m );
224 incx_conj = 1;
225
227 m,
228 x, incx,
229 x_conj, incx_conj );
230 }
231
232 bl1_ztrsv_blas( uplo,
233 trans,
234 diag,
235 m,
236 a, lda,
237 x_conj, incx_conj );
238
239 // Save the contents of and then free the temporary conjugated x vector.
240 if ( bl1_is_conjnotrans( trans ) )
241 {
243 m,
245 x, incx );
246
247 bl1_zfree( x_conj );
248 }
249
250 // Free the temporary contiguous matrix.
252 &a, &a_rs, &a_cs );
253}
void bl1_ztrsv_blas(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int lda, dcomplex *x, int incx)
Definition bl1_trsv.c:368

References bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_zallocv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_contigm(), bl1_ztrsv_blas(), and BLIS1_CONJUGATE.

Referenced by bl1_ztrsvsx(), FLA_Chol_l_opz_var1(), FLA_Chol_u_opz_var1(), FLA_Eig_gest_il_opz_var1(), FLA_Eig_gest_il_opz_var5(), FLA_Eig_gest_iu_opz_var1(), FLA_Eig_gest_iu_opz_var5(), FLA_Hess_UT_step_opz_var5(), FLA_LU_nopiv_opz_var1(), FLA_LU_nopiv_opz_var2(), FLA_LU_nopiv_opz_var3(), FLA_LU_piv_opz_var3(), FLA_Lyap_h_opz_var1(), FLA_Lyap_h_opz_var2(), FLA_Lyap_h_opz_var3(), FLA_Lyap_h_opz_var4(), FLA_Lyap_n_opz_var1(), FLA_Lyap_n_opz_var2(), FLA_Lyap_n_opz_var3(), FLA_Lyap_n_opz_var4(), FLA_Trinv_ln_opz_var2(), FLA_Trinv_ln_opz_var4(), FLA_Trinv_lu_opz_var2(), FLA_Trinv_lu_opz_var4(), FLA_Trinv_un_opz_var2(), FLA_Trinv_un_opz_var4(), FLA_Trinv_uu_opz_var2(), FLA_Trinv_uu_opz_var4(), and FLA_Trsv_external().

◆ bl1_ztrsv_blas()

void bl1_ztrsv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex a,
int  lda,
dcomplex x,
int  incx 
)
369{
370#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
375
379
384 m,
385 a, lda,
386 x, incx );
387#else
388 char blas_uplo;
389 char blas_trans;
390 char blas_diag;
391
395
397 &blas_trans,
398 &blas_diag,
399 &m,
400 a, &lda,
401 x, &incx );
402#endif
403}
void F77_ztrsv(char *uplo, char *transa, char *diag, int *n, dcomplex *a, int *lda, dcomplex *y, int *incy)
void cblas_ztrsv(const enum CBLAS_ORDER order, const enum CBLAS_UPLO Uplo, const enum CBLAS_TRANSPOSE TransA, const enum CBLAS_DIAG Diag, const int N, const void *A, const int lda, void *X, const int incX)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_ztrsv(), CblasColMajor, and F77_ztrsv().

Referenced by bl1_ztrsv().

◆ bl1_ztrsvsx()

void bl1_ztrsvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)
188{
189 dcomplex* a_save = a;
190 int a_rs_save = a_rs;
191 int a_cs_save = a_cs;
193 int incx_temp;
194
195 // Return early if possible.
196 if ( bl1_zero_dim1( m ) ) return;
197
198 // If necessary, allocate, initialize, and use a temporary contiguous
199 // copy of the matrix rather than the original matrix.
201 m,
202 m,
204 &a, &a_rs, &a_cs );
205
206 // Allocate a temporary vector conformal to x.
207 x_temp = bl1_zallocv( m );
208 incx_temp = 1;
209
210 // Copy x to a temporary vector.
212 m,
213 x, incx,
214 x_temp, incx_temp );
215
216 // Perform the operation, storing the result to x_temp.
217 bl1_ztrsv( uplo,
218 trans,
219 diag,
220 m,
221 a, a_rs, a_cs,
222 x_temp, incx_temp );
223
224 // Scale y by beta.
226 m,
227 beta,
228 y, incy );
229
230 // Axpy the partial result in x_temp into y.
232 m,
233 alpha,
235 y, incy );
236
237 // Free the temporary vector.
238 bl1_zfree( x_temp );
239
240 // Free the temporary contiguous matrix.
242 &a, &a_rs, &a_cs );
243}
void bl1_ztrsv(uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx)
Definition bl1_trsv.c:177

References bl1_zallocv(), bl1_zaxpyv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_contigm(), bl1_zscalv(), bl1_ztrsv(), and BLIS1_NO_CONJUGATE.