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 
)

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().

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();
132  scomplex* x_conj;
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,
158  a_save, a_rs_save, a_cs_save,
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 );
170  bl1_swap_ints( lda, inca );
171  bl1_toggle_trans( transa );
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.
180  if ( bl1_is_conj( conjx ) || bl1_is_conjnotrans( transa ) )
181  {
182  if ( bl1_does_trans( transa ) ) n_x = m;
183  else n_x = n;
184 
185  x_conj = bl1_callocv( n_x );
186  incx_conj = 1;
187 
188  bl1_ccopyv( conjx,
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,
214  x_conj, incx_conj,
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  {
236  bl1_cgemv_blas( transa,
237  m,
238  n,
239  alpha,
240  a, lda,
241  x_conj, incx_conj,
242  beta,
243  y, incy );
244  }
245 
246  // Free the temporary conjugated x vector.
247  if ( bl1_is_conj( conjx ) || bl1_is_conjnotrans( transa ) )
248  bl1_cfree( x_conj );
249 
250  // Free the temporary contiguous matrix.
251  bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
252  &a, &a_rs, &a_cs );
253 }
void bl1_cscalv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx)
Definition: bl1_scalv.c:46
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_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
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
Definition: blis_type_defs.h:81
int bl1_zero_dim2(int m, int n)
Definition: bl1_is.c:118
scomplex bl1_c1(void)
Definition: bl1_constants.c:61
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
int bl1_is_conjnotrans(trans1_t trans)
Definition: bl1_is.c:25
Definition: blis_type_defs.h:82
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
void bl1_cconjv(int m, scomplex *x, int incx)
Definition: bl1_conjv.c:23
Definition: blis_type_defs.h:54
Definition: blis_type_defs.h:132
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
int bl1_does_trans(trans1_t trans)
Definition: bl1_does.c:13
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49
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

◆ 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 
)

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

Referenced by bl1_cgemv().

454 {
455 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
456  enum CBLAS_ORDER cblas_order = CblasColMajor;
457  enum CBLAS_TRANSPOSE cblas_transa;
458 
459  bl1_param_map_to_netlib_trans( transa, &cblas_transa );
460 
461  cblas_cgemv( cblas_order,
462  cblas_transa,
463  m,
464  n,
465  alpha,
466  a, lda,
467  x, incx,
468  beta,
469  y, incy );
470 #else
471  char blas_transa;
472 
473  bl1_param_map_to_netlib_trans( transa, &blas_transa );
474 
475  F77_cgemv( &blas_transa,
476  &m,
477  &n,
478  alpha,
479  a, &lda,
480  x, &incx,
481  beta,
482  y, &incy );
483 #endif
484 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_TRANSPOSE
Definition: blis_prototypes_cblas.h:18
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)
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition: bl1_param_map.c:15
Definition: blis_prototypes_cblas.h:17
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)

◆ 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 
)

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().

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;
118  scomplex* x_conj;
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,
129  a_save, a_rs_save, a_cs_save,
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 );
141  bl1_swap_ints( lda, inca );
142  bl1_swap_ints( incx, incy );
143  bl1_swap_conj( conjx, conjy );
144  bl1_cswap_pointers( x, y );
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  {
166  bl1_cgerc_blas( m,
167  n,
168  alpha,
169  x_conj, incx_conj,
170  y, incy,
171  a, lda );
172  }
173  else
174  {
175  bl1_cgeru_blas( m,
176  n,
177  alpha,
178  x_conj, incx_conj,
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.
188  bl1_cfree_saved_contigm( m_save,
189  n_save,
190  a_save, a_rs_save, a_cs_save,
191  &a, &a_rs, &a_cs );
192 }
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
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
int bl1_zero_dim2(int m, int n)
Definition: bl1_is.c:118
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
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
Definition: blis_type_defs.h:82
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
Definition: blis_type_defs.h:132
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(scomplex *p)
Definition: bl1_free.c:40
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49

◆ 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 
)

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

Referenced by bl1_cger().

324 {
325 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
326  enum CBLAS_ORDER cblas_order = CblasColMajor;
327 
328  cblas_cgerc( cblas_order,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
Definition: blis_prototypes_cblas.h:17
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)

◆ 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 
)

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

Referenced by bl1_cger().

346 {
347 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
348  enum CBLAS_ORDER cblas_order = CblasColMajor;
349 
350  cblas_cgeru( cblas_order,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
void F77_cgeru(int *m, int *n, scomplex *alpha, scomplex *x, int *incx, scomplex *y, int *incy, scomplex *a, int *lda)
Definition: blis_prototypes_cblas.h:17
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)

◆ 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 
)

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().

36 {
37  scomplex* a_save = a;
38  int a_rs_save = a_rs;
39  int a_cs_save = a_cs;
40  scomplex zero = bl1_c0();
41  scomplex one = bl1_c1();
42  scomplex* x_conj;
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,
56  a_save, a_rs_save, a_cs_save,
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.
65  if ( bl1_is_row_storage( a_rs, a_cs ) )
66  {
67  bl1_swap_ints( lda, inca );
68  bl1_toggle_uplo( uplo );
69  bl1_toggle_conj( conj );
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,
85  x_conj, incx_conj );
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,
97  x_conj, incx_conj,
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.
130  bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
131  &a, &a_rs, &a_cs );
132 }
void bl1_cscalv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx)
Definition: bl1_scalv.c:46
void bl1_caxpyv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_axpyv.c:29
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
Definition: blis_type_defs.h:81
scomplex bl1_c1(void)
Definition: bl1_constants.c:61
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
scomplex bl1_c0(void)
Definition: bl1_constants.c:125
Definition: blis_type_defs.h:82
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
Definition: blis_type_defs.h: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
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49
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

◆ 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 
)

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

Referenced by bl1_chemv().

236 {
237 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
238  enum CBLAS_ORDER cblas_order = CblasColMajor;
239  enum CBLAS_UPLO cblas_uplo;
240 
241  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
242 
243  cblas_chemv( cblas_order,
244  cblas_uplo,
245  m,
246  alpha,
247  a, lda,
248  x, incx,
249  beta,
250  y, incy );
251 #else
252  char blas_uplo;
253 
254  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
255 
256  F77_chemv( &blas_uplo,
257  &m,
258  alpha,
259  a, &lda,
260  x, &incx,
261  beta,
262  y, &incy );
263 #endif
264 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
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 F77_chemv(char *uplo, int *n, scomplex *alpha, scomplex *a, int *lda, scomplex *x, int *incx, scomplex *beta, scomplex *y, int *incy)

◆ 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 
)

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().

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;
37  scomplex* x_conj;
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,
49  a_save, a_rs_save, a_cs_save,
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.
58  if ( bl1_is_row_storage( a_rs, a_cs ) )
59  {
60  bl1_swap_ints( lda, inca );
61  bl1_toggle_uplo( uplo );
62  bl1_toggle_conj( conj );
63  }
64 
65  // Initialize with values assuming no conjugation of ( x * x' ).
66  x_conj = x;
67  incx_conj = incx;
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,
81  x_conj, incx_conj );
82  }
83 
84  bl1_cher_blas( uplo,
85  m,
86  alpha,
87  x_conj, incx_conj,
88  a, lda );
89 
90  // Free the temporary conjugated x vector.
91  if ( bl1_is_conj( conj ) )
92  bl1_cfree( x_conj );
93 
94  // Free the temporary contiguous matrix.
96  m_save,
97  a_save, a_rs_save, a_cs_save,
98  &a, &a_rs, &a_cs );
99 }
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
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
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
Definition: blis_type_defs.h:82
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
void bl1_cher_blas(uplo1_t uplo, int m, float *alpha, scomplex *x, int incx, scomplex *a, int lda)
Definition: bl1_her.c:173
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
Definition: blis_type_defs.h:132
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49

◆ 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 
)

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().

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;
39  scomplex* x_conj;
40  scomplex* y_conj;
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,
53  a_save, a_rs_save, a_cs_save,
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.
62  if ( bl1_is_row_storage( a_rs, a_cs ) )
63  {
64  bl1_swap_ints( lda, inca );
65  bl1_toggle_uplo( uplo );
66  bl1_toggle_conj( conj );
67  }
68 
69  // Initialize with values assuming no conjugation of ( x * y' ) or
70  // ( y * x' ).
71  x_conj = x;
72  incx_conj = incx;
73  y_conj = y;
74  incy_conj = incy;
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,
92  x_conj, incx_conj );
93 
95  m,
96  y, incy,
97  y_conj, incy_conj );
98  }
99 
100  bl1_cher2_blas( uplo,
101  m,
102  alpha,
103  x_conj, incx_conj,
104  y_conj, incy_conj,
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.
115  bl1_cfree_saved_contigm( m_save,
116  m_save,
117  a_save, a_rs_save, a_cs_save,
118  &a, &a_rs, &a_cs );
119 }
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
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
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
Definition: blis_type_defs.h:82
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
Definition: blis_type_defs.h:132
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
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
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49

◆ 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 
)

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

Referenced by bl1_cher2().

212 {
213 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
214  enum CBLAS_ORDER cblas_order = CblasColMajor;
215  enum CBLAS_UPLO cblas_uplo;
216 
217  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
218 
219  cblas_cher2( cblas_order,
220  cblas_uplo,
221  m,
222  alpha,
223  x, incx,
224  y, incy,
225  a, lda );
226 #else
227  char blas_uplo;
228 
229  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
230 
231  F77_cher2( &blas_uplo,
232  &m,
233  alpha,
234  x, &incx,
235  y, &incy,
236  a, &lda );
237 #endif
238 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
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)
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void F77_cher2(char *uplo, int *n, scomplex *alpha, scomplex *x, int *incx, scomplex *y, int *incy, scomplex *a, int *lda)

◆ bl1_cher_blas()

void bl1_cher_blas ( uplo1_t  uplo,
int  m,
float *  alpha,
scomplex x,
int  incx,
scomplex a,
int  lda 
)

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

Referenced by bl1_cher().

174 {
175 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
176  enum CBLAS_ORDER cblas_order = CblasColMajor;
177  enum CBLAS_UPLO cblas_uplo;
178 
179  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
180 
181  cblas_cher( cblas_order,
182  cblas_uplo,
183  m,
184  *alpha,
185  x, incx,
186  a, lda );
187 #else
188  char blas_uplo;
189 
190  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
191 
192  F77_cher( &blas_uplo,
193  &m,
194  alpha,
195  x, &incx,
196  a, &lda );
197 #endif
198 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
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)
Definition: blis_prototypes_cblas.h:17
void F77_cher(char *uplo, int *n, float *alpha, scomplex *x, int *incx, scomplex *a, int *lda)
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47

◆ 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 
)

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

Referenced by FLA_Symv_external().

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.
111  bl1_ccreate_contigmr( uplo,
112  m,
113  m,
114  a_save, a_rs_save, a_cs_save,
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  {
125  bl1_swap_ints( lda, inca );
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.
138  bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
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
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
Definition: blis_type_defs.h:132
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

◆ 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 
)

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().

250 {
251  scomplex* x_copy;
252  scomplex* y_copy;
253  int n = 1;
254  int ldx = m;
255  int ldy = m;
256 
257 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
258  enum CBLAS_ORDER cblas_order = CblasColMajor;
259  enum CBLAS_SIDE cblas_side;
260  enum CBLAS_UPLO cblas_uplo;
261 
263  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
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 
278  cblas_csymm( cblas_order,
279  cblas_side,
280  cblas_uplo,
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 
302  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
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 
317  F77_csymm ( &blas_side,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
Definition: blis_type_defs.h:81
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)
void bl1_param_map_to_netlib_side(side1_t blis_side, void *blas_side)
Definition: bl1_param_map.c:71
Definition: blis_type_defs.h:68
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_type_defs.h:132
Definition: blis_prototypes_cblas.h:17
CBLAS_SIDE
Definition: blis_prototypes_cblas.h:21
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49

◆ bl1_csyr()

void bl1_csyr ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex a,
int  a_rs,
int  a_cs 
)

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

Referenced by FLA_Syr_external().

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.
114  bl1_ccreate_contigmr( uplo,
115  m,
116  m,
117  a_save, a_rs_save, a_cs_save,
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  {
128  bl1_swap_ints( lda, inca );
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.
139  bl1_cfree_saved_contigm( m_save,
140  m_save,
141  a_save, a_rs_save, a_cs_save,
142  &a, &a_rs, &a_cs );
143 }
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
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
Definition: blis_type_defs.h:132
void bl1_csyr_blas(uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *a, int lda)
Definition: bl1_syr.c:247

◆ 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 
)

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

Referenced by FLA_Syr2_external().

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.
116  bl1_ccreate_contigmr( uplo,
117  m,
118  m,
119  a_save, a_rs_save, a_cs_save,
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  {
130  bl1_swap_ints( lda, inca );
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.
142  bl1_cfree_saved_contigm( m_save,
143  m_save,
144  a_save, a_rs_save, a_cs_save,
145  &a, &a_rs, &a_cs );
146 }
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
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
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
Definition: blis_type_defs.h:132

◆ 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 
)

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().

254 {
255  scomplex* x_copy;
256  scomplex* y_copy;
257  scomplex beta;
258  int k = 1;
259  int ldx = m;
260  int ldy = m;
261 
262 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
263  enum CBLAS_ORDER cblas_order = CblasColMajor;
264  enum CBLAS_UPLO cblas_uplo;
265  enum CBLAS_TRANSPOSE cblas_trans;
266 
267  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
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 
286  cblas_csyr2k( cblas_order,
287  cblas_uplo,
288  cblas_trans,
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 
303  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
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 
322  F77_csyr2k ( &blas_uplo,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
float real
Definition: blis_type_defs.h:134
CBLAS_TRANSPOSE
Definition: blis_prototypes_cblas.h:18
Definition: blis_type_defs.h:81
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition: bl1_param_map.c:15
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)
Definition: blis_type_defs.h:54
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_type_defs.h:132
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
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 bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49
float imag
Definition: blis_type_defs.h:134

◆ bl1_csyr_blas()

void bl1_csyr_blas ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex a,
int  lda 
)

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().

248 {
249  scomplex* x_copy;
250  scomplex beta;
251  int k = 1;
252  int ldx = m;
253 
254 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
255  enum CBLAS_ORDER cblas_order = CblasColMajor;
256  enum CBLAS_UPLO cblas_uplo;
257  enum CBLAS_TRANSPOSE cblas_trans;
258 
259  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
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 
272  cblas_csyrk( cblas_order,
273  cblas_uplo,
274  cblas_trans,
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 
287  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
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 
300  F77_csyrk ( &blas_uplo,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
float real
Definition: blis_type_defs.h:134
void F77_csyrk(char *uplo, char *transa, int *n, int *k, scomplex *alpha, scomplex *a, int *lda, scomplex *beta, scomplex *c, int *ldc)
CBLAS_TRANSPOSE
Definition: blis_prototypes_cblas.h:18
Definition: blis_type_defs.h:81
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition: bl1_param_map.c:15
Definition: blis_type_defs.h:54
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_type_defs.h:132
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40
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)
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49
float imag
Definition: blis_type_defs.h:134

◆ 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 
)

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().

100 {
101  scomplex* a_save = a;
102  int a_rs_save = a_rs;
103  int a_cs_save = a_cs;
104  scomplex* x_conj;
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.
113  bl1_ccreate_contigmr( uplo,
114  m,
115  m,
116  a_save, a_rs_save, a_cs_save,
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  {
127  bl1_swap_ints( lda, inca );
128  bl1_toggle_uplo( uplo );
129  bl1_toggle_trans( trans );
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,
166  x_conj, incx_conj,
167  x, incx );
168 
169  bl1_cfree( x_conj );
170  }
171 
172  // Free the temporary contiguous matrix.
173  bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
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
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
int bl1_is_conjnotrans(trans1_t trans)
Definition: bl1_is.c:25
Definition: blis_type_defs.h:82
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
Definition: blis_type_defs.h:132
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49
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

◆ 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 
)

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().

332 {
333 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
334  enum CBLAS_ORDER cblas_order = CblasColMajor;
335  enum CBLAS_UPLO cblas_uplo;
336  enum CBLAS_TRANSPOSE cblas_trans;
337  enum CBLAS_DIAG cblas_diag;
338 
339  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
340  bl1_param_map_to_netlib_trans( trans, &cblas_trans );
341  bl1_param_map_to_netlib_diag( diag, &cblas_diag );
342 
343  cblas_ctrmv( cblas_order,
344  cblas_uplo,
345  cblas_trans,
346  cblas_diag,
347  m,
348  a, lda,
349  x, incx );
350 #else
351  char blas_uplo;
352  char blas_trans;
353  char blas_diag;
354 
355  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
356  bl1_param_map_to_netlib_trans( trans, &blas_trans );
357  bl1_param_map_to_netlib_diag( diag, &blas_diag );
358 
359  F77_ctrmv( &blas_uplo,
360  &blas_trans,
361  &blas_diag,
362  &m,
363  a, &lda,
364  x, &incx );
365 #endif
366 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_DIAG
Definition: blis_prototypes_cblas.h:20
CBLAS_TRANSPOSE
Definition: blis_prototypes_cblas.h:18
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)
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition: bl1_param_map.c:15
void F77_ctrmv(char *uplo, char *transa, char *diag, int *n, scomplex *a, int *lda, scomplex *y, int *incy)
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void bl1_param_map_to_netlib_diag(diag1_t blis_diag, void *blas_diag)
Definition: bl1_param_map.c:95

◆ 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 
)

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().

130 {
131  scomplex* a_save = a;
132  int a_rs_save = a_rs;
133  int a_cs_save = a_cs;
134  scomplex* x_temp;
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.
142  bl1_ccreate_contigmr( uplo,
143  m,
144  m,
145  a_save, a_rs_save, a_cs_save,
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,
176  x_temp, incx_temp,
177  y, incy );
178 
179  // Free the temporary vector.
180  bl1_cfree( x_temp );
181 
182  // Free the temporary contiguous matrix.
183  bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
184  &a, &a_rs, &a_cs );
185 }
void bl1_cscalv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx)
Definition: bl1_scalv.c:46
void bl1_caxpyv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_axpyv.c:29
Definition: blis_type_defs.h:81
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
Definition: blis_type_defs.h:132
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
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
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49
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

◆ 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 
)

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().

100 {
101  scomplex* a_save = a;
102  int a_rs_save = a_rs;
103  int a_cs_save = a_cs;
104  scomplex* x_conj;
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.
113  bl1_ccreate_contigmr( uplo,
114  m,
115  m,
116  a_save, a_rs_save, a_cs_save,
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  {
127  bl1_swap_ints( lda, inca );
128  bl1_toggle_uplo( uplo );
129  bl1_toggle_trans( trans );
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,
166  x_conj, incx_conj,
167  x, incx );
168 
169  bl1_cfree( x_conj );
170  }
171 
172  // Free the temporary contiguous matrix.
173  bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
174  &a, &a_rs, &a_cs );
175 }
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
int bl1_is_conjnotrans(trans1_t trans)
Definition: bl1_is.c:25
Definition: blis_type_defs.h:82
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
Definition: blis_type_defs.h:132
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49
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

◆ 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 
)

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().

332 {
333 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
334  enum CBLAS_ORDER cblas_order = CblasColMajor;
335  enum CBLAS_UPLO cblas_uplo;
336  enum CBLAS_TRANSPOSE cblas_trans;
337  enum CBLAS_DIAG cblas_diag;
338 
339  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
340  bl1_param_map_to_netlib_trans( trans, &cblas_trans );
341  bl1_param_map_to_netlib_diag( diag, &cblas_diag );
342 
343  cblas_ctrsv( cblas_order,
344  cblas_uplo,
345  cblas_trans,
346  cblas_diag,
347  m,
348  a, lda,
349  x, incx );
350 #else
351  char blas_uplo;
352  char blas_trans;
353  char blas_diag;
354 
355  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
356  bl1_param_map_to_netlib_trans( trans, &blas_trans );
357  bl1_param_map_to_netlib_diag( diag, &blas_diag );
358 
359  F77_ctrsv( &blas_uplo,
360  &blas_trans,
361  &blas_diag,
362  &m,
363  a, &lda,
364  x, &incx );
365 #endif
366 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
void F77_ctrsv(char *uplo, char *transa, char *diag, int *n, scomplex *a, int *lda, scomplex *y, int *incy)
CBLAS_DIAG
Definition: blis_prototypes_cblas.h:20
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
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)
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void bl1_param_map_to_netlib_diag(diag1_t blis_diag, void *blas_diag)
Definition: bl1_param_map.c:95

◆ 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 
)

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.

130 {
131  scomplex* a_save = a;
132  int a_rs_save = a_rs;
133  int a_cs_save = a_cs;
134  scomplex* x_temp;
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.
142  bl1_ccreate_contigmr( uplo,
143  m,
144  m,
145  a_save, a_rs_save, a_cs_save,
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,
176  x_temp, incx_temp,
177  y, incy );
178 
179  // Free the temporary vector.
180  bl1_cfree( x_temp );
181 
182  // Free the temporary contiguous matrix.
183  bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
184  &a, &a_rs, &a_cs );
185 }
void bl1_cscalv(conj1_t conj, int n, scomplex *alpha, scomplex *x, int incx)
Definition: bl1_scalv.c:46
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_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
Definition: blis_type_defs.h:81
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
Definition: blis_type_defs.h:132
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40
scomplex * bl1_callocv(unsigned int n_elem)
Definition: bl1_allocv.c:40
void bl1_ccopyv(conj1_t conj, int m, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_copyv.c:49
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

◆ 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 
)

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().

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,
95  a_save, a_rs_save, a_cs_save,
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 );
107  bl1_swap_ints( lda, inca );
108  bl1_toggle_trans( transa );
109  }
110 
111  bl1_dgemv_blas( transa,
112  m,
113  n,
114  alpha,
115  a, lda,
116  x, incx,
117  beta,
118  y, incy );
119 
120  // Free the temporary contiguous matrix.
121  bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
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
Definition: blis_type_defs.h:81
int bl1_zero_dim2(int m, int n)
Definition: bl1_is.c:118
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
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
int bl1_does_trans(trans1_t trans)
Definition: bl1_does.c:13

◆ 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 
)

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

Referenced by bl1_dgemv().

421 {
422 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
423  enum CBLAS_ORDER cblas_order = CblasColMajor;
424  enum CBLAS_TRANSPOSE cblas_transa;
425 
426  bl1_param_map_to_netlib_trans( transa, &cblas_transa );
427 
428  cblas_dgemv( cblas_order,
429  cblas_transa,
430  m,
431  n,
432  *alpha,
433  a, lda,
434  x, incx,
435  *beta,
436  y, incy );
437 #else
438  char blas_transa;
439 
440  bl1_param_map_to_netlib_trans( transa, &blas_transa );
441 
442  F77_dgemv( &blas_transa,
443  &m,
444  &n,
445  alpha,
446  a, &lda,
447  x, &incx,
448  beta,
449  y, &incy );
450 #endif
451 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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
Definition: blis_prototypes_cblas.h:17
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)
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)

◆ 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 
)

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().

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,
78  a_save, a_rs_save, a_cs_save,
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.
87  if ( bl1_is_row_storage( a_rs, a_cs ) )
88  {
89  bl1_swap_ints( m, n );
90  bl1_swap_ints( lda, inca );
91  bl1_swap_ints( incx, incy );
92  bl1_swap_conj( conjx, conjy );
93  bl1_dswap_pointers( x, y );
94  }
95 
96  // Initialize with values assuming no conjugation of x.
97  bl1_dger_blas( m,
98  n,
99  alpha,
100  x, incx,
101  y, incy,
102  a, lda );
103 
104  // Free the temporary contiguous matrix.
105  bl1_dfree_saved_contigm( m_save,
106  n_save,
107  a_save, a_rs_save, a_cs_save,
108  &a, &a_rs, &a_cs );
109 }
int bl1_zero_dim2(int m, int n)
Definition: bl1_is.c:118
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
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
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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

◆ 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 
)

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

Referenced by bl1_dger().

302 {
303 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
304  enum CBLAS_ORDER cblas_order = CblasColMajor;
305 
306  cblas_dger( cblas_order,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
void F77_dger(int *m, int *n, double *alpha, double *x, int *incx, double *y, int *incy, double *a, int *lda)
Definition: blis_prototypes_cblas.h:17
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)

◆ 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 
)

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().

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

◆ 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 
)

References bl1_dsyr().

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

◆ 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 
)

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().

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

◆ 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 
)

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().

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,
71  a_save, a_rs_save, a_cs_save,
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.
80  if ( bl1_is_row_storage( a_rs, a_cs ) )
81  {
82  bl1_swap_ints( lda, inca );
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.
95  bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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_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

◆ 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 
)

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

Referenced by bl1_dsymv().

219 {
220 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
221  enum CBLAS_ORDER cblas_order = CblasColMajor;
222  enum CBLAS_UPLO cblas_uplo;
223 
224  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
225 
226  cblas_dsymv( cblas_order,
227  cblas_uplo,
228  m,
229  *alpha,
230  a, lda,
231  x, incx,
232  *beta,
233  y, incy );
234 #else
235  char blas_uplo;
236 
237  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
238 
239  F77_dsymv( &blas_uplo,
240  &m,
241  alpha,
242  a, &lda,
243  x, &incx,
244  beta,
245  y, &incy );
246 #endif
247 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
void F77_dsymv(char *uplo, int *n, double *alpha, double *a, int *lda, double *x, int *incx, double *beta, double *y, int *incy)
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47

◆ bl1_dsyr()

void bl1_dsyr ( uplo1_t  uplo,
int  m,
double *  alpha,
double *  x,
int  incx,
double *  a,
int  a_rs,
int  a_cs 
)

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().

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,
73  a_save, a_rs_save, a_cs_save,
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.
82  if ( bl1_is_row_storage( a_rs, a_cs ) )
83  {
84  bl1_swap_ints( lda, inca );
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,
97  a_save, a_rs_save, a_cs_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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
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

◆ 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 
)

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().

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,
74  a_save, a_rs_save, a_cs_save,
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.
83  if ( bl1_is_row_storage( a_rs, a_cs ) )
84  {
85  bl1_swap_ints( lda, inca );
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,
99  a_save, a_rs_save, a_cs_save,
100  &a, &a_rs, &a_cs );
101 }
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
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
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

◆ 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 
)

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

Referenced by bl1_dsyr2().

225 {
226 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
227  enum CBLAS_ORDER cblas_order = CblasColMajor;
228  enum CBLAS_UPLO cblas_uplo;
229 
230  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
231 
232  cblas_dsyr2( cblas_order,
233  cblas_uplo,
234  m,
235  *alpha,
236  x, incx,
237  y, incy,
238  a, lda );
239 #else
240  char blas_uplo;
241 
242  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
243 
244  F77_dsyr2( &blas_uplo,
245  &m,
246  alpha,
247  x, &incx,
248  y, &incy,
249  a, &lda );
250 #endif
251 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47

◆ bl1_dsyr_blas()

void bl1_dsyr_blas ( uplo1_t  uplo,
int  m,
double *  alpha,
double *  x,
int  incx,
double *  a,
int  lda 
)

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

Referenced by bl1_dsyr().

221 {
222 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
223  enum CBLAS_ORDER cblas_order = CblasColMajor;
224  enum CBLAS_UPLO cblas_uplo;
225 
226  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
227 
228  cblas_dsyr( cblas_order,
229  cblas_uplo,
230  m,
231  *alpha,
232  x, incx,
233  a, lda );
234 #else
235  char blas_uplo;
236 
237  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
238 
239  F77_dsyr( &blas_uplo,
240  &m,
241  alpha,
242  x, &incx,
243  a, &lda );
244 #endif
245 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
void F77_dsyr(char *uplo, int *n, double *alpha, double *x, int *incx, double *a, int *lda)
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47

◆ 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 
)

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().

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,
71  a_save, a_rs_save, a_cs_save,
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.
80  if ( bl1_is_row_storage( a_rs, a_cs ) )
81  {
82  bl1_swap_ints( lda, inca );
83  bl1_toggle_uplo( uplo );
84  bl1_toggle_trans( trans );
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.
95  bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
96  &a, &a_rs, &a_cs );
97 }
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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_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
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

◆ 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 
)

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().

295 {
296 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
297  enum CBLAS_ORDER cblas_order = CblasColMajor;
298  enum CBLAS_UPLO cblas_uplo;
299  enum CBLAS_TRANSPOSE cblas_trans;
300  enum CBLAS_DIAG cblas_diag;
301 
302  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
303  bl1_param_map_to_netlib_trans( trans, &cblas_trans );
304  bl1_param_map_to_netlib_diag( diag, &cblas_diag );
305 
306  cblas_dtrmv( cblas_order,
307  cblas_uplo,
308  cblas_trans,
309  cblas_diag,
310  m,
311  a, lda,
312  x, incx );
313 #else
314  char blas_uplo;
315  char blas_trans;
316  char blas_diag;
317 
318  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
319  bl1_param_map_to_netlib_trans( trans, &blas_trans );
320  bl1_param_map_to_netlib_diag( diag, &blas_diag );
321 
322  F77_dtrmv( &blas_uplo,
323  &blas_trans,
324  &blas_diag,
325  &m,
326  a, &lda,
327  x, &incx );
328 #endif
329 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_DIAG
Definition: blis_prototypes_cblas.h:20
CBLAS_TRANSPOSE
Definition: blis_prototypes_cblas.h:18
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)
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition: bl1_param_map.c:15
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void bl1_param_map_to_netlib_diag(diag1_t blis_diag, void *blas_diag)
Definition: bl1_param_map.c:95
void F77_dtrmv(char *uplo, char *transa, char *diag, int *n, double *a, int *lda, double *y, int *incy)

◆ 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 
)

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().

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,
87  a_save, a_rs_save, a_cs_save,
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,
98  x_temp, incx_temp );
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,
118  x_temp, incx_temp,
119  y, incy );
120 
121  // Free the temporary vector.
122  bl1_dfree( x_temp );
123 
124  // Free the temporary contiguous matrix.
125  bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
126  &a, &a_rs, &a_cs );
127 }
Definition: blis_type_defs.h:81
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
void bl1_dfree(double *p)
Definition: bl1_free.c:35
double * bl1_dallocv(unsigned int n_elem)
Definition: bl1_allocv.c:35
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
void bl1_dscalv(conj1_t conj, int n, double *alpha, double *x, int incx)
Definition: bl1_scalv.c:24
void bl1_dcopyv(conj1_t conj, int m, double *x, int incx, double *y, int incy)
Definition: bl1_copyv.c:42
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_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
void bl1_daxpyv(conj1_t conj, int n, double *alpha, double *x, int incx, double *y, int incy)
Definition: bl1_axpyv.c:21

◆ 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 
)

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().

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,
71  a_save, a_rs_save, a_cs_save,
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.
80  if ( bl1_is_row_storage( a_rs, a_cs ) )
81  {
82  bl1_swap_ints( lda, inca );
83  bl1_toggle_uplo( uplo );
84  bl1_toggle_trans( trans );
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.
95  bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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_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

◆ 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 
)

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().

295 {
296 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
297  enum CBLAS_ORDER cblas_order = CblasColMajor;
298  enum CBLAS_UPLO cblas_uplo;
299  enum CBLAS_TRANSPOSE cblas_trans;
300  enum CBLAS_DIAG cblas_diag;
301 
302  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
303  bl1_param_map_to_netlib_trans( trans, &cblas_trans );
304  bl1_param_map_to_netlib_diag( diag, &cblas_diag );
305 
306  cblas_dtrsv( cblas_order,
307  cblas_uplo,
308  cblas_trans,
309  cblas_diag,
310  m,
311  a, lda,
312  x, incx );
313 #else
314  char blas_uplo;
315  char blas_trans;
316  char blas_diag;
317 
318  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
319  bl1_param_map_to_netlib_trans( trans, &blas_trans );
320  bl1_param_map_to_netlib_diag( diag, &blas_diag );
321 
322  F77_dtrsv( &blas_uplo,
323  &blas_trans,
324  &blas_diag,
325  &m,
326  a, &lda,
327  x, &incx );
328 #endif
329 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_DIAG
Definition: blis_prototypes_cblas.h:20
CBLAS_TRANSPOSE
Definition: blis_prototypes_cblas.h:18
void F77_dtrsv(char *uplo, char *transa, char *diag, int *n, double *a, int *lda, double *y, int *incy)
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition: bl1_param_map.c:15
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
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)
void bl1_param_map_to_netlib_diag(diag1_t blis_diag, void *blas_diag)
Definition: bl1_param_map.c:95

◆ 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 
)

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.

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,
87  a_save, a_rs_save, a_cs_save,
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,
98  x_temp, incx_temp );
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,
118  x_temp, incx_temp,
119  y, incy );
120 
121  // Free the temporary vector.
122  bl1_dfree( x_temp );
123 
124  // Free the temporary contiguous matrix.
125  bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
126  &a, &a_rs, &a_cs );
127 }
Definition: blis_type_defs.h:81
void bl1_dfree(double *p)
Definition: bl1_free.c:35
double * bl1_dallocv(unsigned int n_elem)
Definition: bl1_allocv.c:35
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
void bl1_dscalv(conj1_t conj, int n, double *alpha, double *x, int incx)
Definition: bl1_scalv.c:24
void bl1_dcopyv(conj1_t conj, int m, double *x, int incx, double *y, int incy)
Definition: bl1_copyv.c:42
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
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_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
void bl1_daxpyv(conj1_t conj, int n, double *alpha, double *x, int incx, double *y, int incy)
Definition: bl1_axpyv.c:21

◆ 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 
)

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().

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,
39  a_save, a_rs_save, a_cs_save,
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.
48  if ( bl1_is_row_storage( a_rs, a_cs ) )
49  {
50  bl1_swap_ints( m, n );
51  bl1_swap_ints( lda, inca );
52  bl1_toggle_trans( transa );
53  }
54 
55  bl1_sgemv_blas( transa,
56  m,
57  n,
58  alpha,
59  a, lda,
60  x, incx,
61  beta,
62  y, incy );
63 
64  // Free the temporary contiguous matrix.
65  bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
66  &a, &a_rs, &a_cs );
67 }
Definition: blis_type_defs.h:81
int bl1_zero_dim2(int m, int n)
Definition: bl1_is.c:118
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
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
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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_sscalv(conj1_t conj, int n, float *alpha, float *x, int incx)
Definition: bl1_scalv.c:13
int bl1_does_trans(trans1_t trans)
Definition: bl1_does.c:13

◆ 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 
)

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

Referenced by bl1_sgemv().

388 {
389 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
390  enum CBLAS_ORDER cblas_order = CblasColMajor;
391  enum CBLAS_TRANSPOSE cblas_transa;
392 
393  bl1_param_map_to_netlib_trans( transa, &cblas_transa );
394 
395  cblas_sgemv( cblas_order,
396  cblas_transa,
397  m,
398  n,
399  *alpha,
400  a, lda,
401  x, incx,
402  *beta,
403  y, incy );
404 #else
405  char blas_transa;
406 
407  bl1_param_map_to_netlib_trans( transa, &blas_transa );
408 
409  F77_sgemv( &blas_transa,
410  &m,
411  &n,
412  alpha,
413  a, &lda,
414  x, &incx,
415  beta,
416  y, &incy );
417 #endif
418 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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
Definition: blis_prototypes_cblas.h:17
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)
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)

◆ 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 
)

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().

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,
29  a_save, a_rs_save, a_cs_save,
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.
38  if ( bl1_is_row_storage( a_rs, a_cs ) )
39  {
40  bl1_swap_ints( m, n );
41  bl1_swap_ints( lda, inca );
42  bl1_swap_ints( incx, incy );
43  bl1_swap_conj( conjx, conjy );
44  bl1_sswap_pointers( x, y );
45  }
46 
47  // Initialize with values assuming no conjugation of x.
48  bl1_sger_blas( m,
49  n,
50  alpha,
51  x, incx,
52  y, incy,
53  a, lda );
54 
55  // Free the temporary contiguous matrix.
57  n_save,
58  a_save, a_rs_save, a_cs_save,
59  &a, &a_rs, &a_cs );
60 }
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
int bl1_zero_dim2(int m, int n)
Definition: bl1_is.c:118
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
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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

◆ 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 
)

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

Referenced by bl1_sger().

280 {
281 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
282  enum CBLAS_ORDER cblas_order = CblasColMajor;
283 
284  cblas_sger( cblas_order,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
void F77_sger(int *m, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda)
Definition: blis_prototypes_cblas.h:17

◆ 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 
)

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().

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

◆ 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 
)

References bl1_ssyr().

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

◆ 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 
)

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().

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

◆ 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 
)

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().

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,
28  a_save, a_rs_save, a_cs_save,
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.
37  if ( bl1_is_row_storage( a_rs, a_cs ) )
38  {
39  bl1_swap_ints( lda, inca );
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.
52  bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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_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

◆ 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 
)

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

Referenced by bl1_ssymv().

188 {
189 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
190  enum CBLAS_ORDER cblas_order = CblasColMajor;
191  enum CBLAS_UPLO cblas_uplo;
192 
193  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
194 
195  cblas_ssymv( cblas_order,
196  cblas_uplo,
197  m,
198  *alpha,
199  a, lda,
200  x, incx,
201  *beta,
202  y, incy );
203 #else
204  char blas_uplo;
205 
206  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
207 
208  F77_ssymv( &blas_uplo,
209  &m,
210  alpha,
211  a, &lda,
212  x, &incx,
213  beta,
214  y, &incy );
215 #endif
216 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47

◆ bl1_ssyr()

void bl1_ssyr ( uplo1_t  uplo,
int  m,
float *  alpha,
float *  x,
int  incx,
float *  a,
int  a_rs,
int  a_cs 
)

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().

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,
29  a_save, a_rs_save, a_cs_save,
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.
38  if ( bl1_is_row_storage( a_rs, a_cs ) )
39  {
40  bl1_swap_ints( lda, inca );
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,
53  a_save, a_rs_save, a_cs_save,
54  &a, &a_rs, &a_cs );
55 }
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
void bl1_ssyr_blas(uplo1_t uplo, int m, float *alpha, float *x, int incx, float *a, int lda)
Definition: bl1_syr.c:193
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

◆ 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 
)

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().

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,
29  a_save, a_rs_save, a_cs_save,
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.
38  if ( bl1_is_row_storage( a_rs, a_cs ) )
39  {
40  bl1_swap_ints( lda, inca );
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,
54  a_save, a_rs_save, a_cs_save,
55  &a, &a_rs, &a_cs );
56 }
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
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

◆ 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 
)

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

Referenced by bl1_ssyr2().

196 {
197 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
198  enum CBLAS_ORDER cblas_order = CblasColMajor;
199  enum CBLAS_UPLO cblas_uplo;
200 
201  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
202 
203  cblas_ssyr2( cblas_order,
204  cblas_uplo,
205  m,
206  *alpha,
207  x, incx,
208  y, incy,
209  a, lda );
210 #else
211  char blas_uplo;
212 
213  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
214 
215  F77_ssyr2( &blas_uplo,
216  &m,
217  alpha,
218  x, &incx,
219  y, &incy,
220  a, &lda );
221 #endif
222 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void F77_ssyr2(char *uplo, int *n, float *alpha, float *x, int *incx, float *y, int *incy, float *a, int *lda)

◆ bl1_ssyr_blas()

void bl1_ssyr_blas ( uplo1_t  uplo,
int  m,
float *  alpha,
float *  x,
int  incx,
float *  a,
int  lda 
)

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

Referenced by bl1_ssyr().

194 {
195 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
196  enum CBLAS_ORDER cblas_order = CblasColMajor;
197  enum CBLAS_UPLO cblas_uplo;
198 
199  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
200 
201  cblas_ssyr( cblas_order,
202  cblas_uplo,
203  m,
204  *alpha,
205  x, incx,
206  a, lda );
207 #else
208  char blas_uplo;
209 
210  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
211 
212  F77_ssyr( &blas_uplo,
213  &m,
214  alpha,
215  x, &incx,
216  a, &lda );
217 #endif
218 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47

◆ 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 
)

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().

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,
28  a_save, a_rs_save, a_cs_save,
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.
37  if ( bl1_is_row_storage( a_rs, a_cs ) )
38  {
39  bl1_swap_ints( lda, inca );
40  bl1_toggle_uplo( uplo );
41  bl1_toggle_trans( trans );
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.
52  bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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_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

◆ 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 
)

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().

258 {
259 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
260  enum CBLAS_ORDER cblas_order = CblasColMajor;
261  enum CBLAS_UPLO cblas_uplo;
262  enum CBLAS_TRANSPOSE cblas_trans;
263  enum CBLAS_DIAG cblas_diag;
264 
265  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
266  bl1_param_map_to_netlib_trans( trans, &cblas_trans );
267  bl1_param_map_to_netlib_diag( diag, &cblas_diag );
268 
269  cblas_strmv( cblas_order,
270  cblas_uplo,
271  cblas_trans,
272  cblas_diag,
273  m,
274  a, lda,
275  x, incx );
276 #else
277  char blas_uplo;
278  char blas_trans;
279  char blas_diag;
280 
281  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
282  bl1_param_map_to_netlib_trans( trans, &blas_trans );
283  bl1_param_map_to_netlib_diag( diag, &blas_diag );
284 
285  F77_strmv( &blas_uplo,
286  &blas_trans,
287  &blas_diag,
288  &m,
289  a, &lda,
290  x, &incx );
291 #endif
292 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_DIAG
Definition: blis_prototypes_cblas.h:20
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
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void bl1_param_map_to_netlib_diag(diag1_t blis_diag, void *blas_diag)
Definition: bl1_param_map.c:95
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)

◆ 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 
)

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().

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,
29  a_save, a_rs_save, a_cs_save,
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,
40  x_temp, incx_temp );
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,
48  x_temp, incx_temp );
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,
60  x_temp, incx_temp,
61  y, incy );
62 
63  // Free the temporary vector.
64  bl1_sfree( x_temp );
65 
66  // Free the temporary contiguous matrix.
67  bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
68  &a, &a_rs, &a_cs );
69 }
Definition: blis_type_defs.h:81
void bl1_sfree(float *p)
Definition: bl1_free.c:30
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
float * bl1_sallocv(unsigned int n_elem)
Definition: bl1_allocv.c:30
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_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
void bl1_sscalv(conj1_t conj, int n, float *alpha, float *x, int incx)
Definition: bl1_scalv.c:13
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

◆ 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 
)

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().

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,
28  a_save, a_rs_save, a_cs_save,
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.
37  if ( bl1_is_row_storage( a_rs, a_cs ) )
38  {
39  bl1_swap_ints( lda, inca );
40  bl1_toggle_uplo( uplo );
41  bl1_toggle_trans( trans );
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.
52  bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
53  &a, &a_rs, &a_cs );
54 }
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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_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
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

◆ 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 
)

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().

258 {
259 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
260  enum CBLAS_ORDER cblas_order = CblasColMajor;
261  enum CBLAS_UPLO cblas_uplo;
262  enum CBLAS_TRANSPOSE cblas_trans;
263  enum CBLAS_DIAG cblas_diag;
264 
265  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
266  bl1_param_map_to_netlib_trans( trans, &cblas_trans );
267  bl1_param_map_to_netlib_diag( diag, &cblas_diag );
268 
269  cblas_strsv( cblas_order,
270  cblas_uplo,
271  cblas_trans,
272  cblas_diag,
273  m,
274  a, lda,
275  x, incx );
276 #else
277  char blas_uplo;
278  char blas_trans;
279  char blas_diag;
280 
281  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
282  bl1_param_map_to_netlib_trans( trans, &blas_trans );
283  bl1_param_map_to_netlib_diag( diag, &blas_diag );
284 
285  F77_strsv( &blas_uplo,
286  &blas_trans,
287  &blas_diag,
288  &m,
289  a, &lda,
290  x, &incx );
291 #endif
292 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_DIAG
Definition: blis_prototypes_cblas.h:20
CBLAS_TRANSPOSE
Definition: blis_prototypes_cblas.h:18
void F77_strsv(char *uplo, char *transa, char *diag, int *n, float *a, int *lda, float *y, int *incy)
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition: bl1_param_map.c:15
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
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)
void bl1_param_map_to_netlib_diag(diag1_t blis_diag, void *blas_diag)
Definition: bl1_param_map.c:95

◆ 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 
)

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.

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,
29  a_save, a_rs_save, a_cs_save,
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,
40  x_temp, incx_temp );
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,
48  x_temp, incx_temp );
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,
60  x_temp, incx_temp,
61  y, incy );
62 
63  // Free the temporary vector.
64  bl1_sfree( x_temp );
65 
66  // Free the temporary contiguous matrix.
67  bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
68  &a, &a_rs, &a_cs );
69 }
Definition: blis_type_defs.h:81
void bl1_sfree(float *p)
Definition: bl1_free.c:30
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
float * bl1_sallocv(unsigned int n_elem)
Definition: bl1_allocv.c:30
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_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_sscalv(conj1_t conj, int n, float *alpha, float *x, int incx)
Definition: bl1_scalv.c:13
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

◆ 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 
)

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().

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();
262  dcomplex* x_conj;
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,
288  a_save, a_rs_save, a_cs_save,
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 );
300  bl1_swap_ints( lda, inca );
301  bl1_toggle_trans( transa );
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.
310  if ( bl1_is_conj( conjx ) || bl1_is_conjnotrans( transa ) )
311  {
312  if ( bl1_does_trans( transa ) ) n_x = m;
313  else n_x = n;
314 
315  x_conj = bl1_zallocv( n_x );
316  incx_conj = 1;
317 
318  bl1_zcopyv( conjx,
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,
344  x_conj, incx_conj,
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  {
366  bl1_zgemv_blas( transa,
367  m,
368  n,
369  alpha,
370  a, lda,
371  x_conj, incx_conj,
372  beta,
373  y, incy );
374  }
375 
376  // Free the temporary conjugated x vector.
377  if ( bl1_is_conj( conjx ) || bl1_is_conjnotrans( transa ) )
378  bl1_zfree( x_conj );
379 
380  // Free the temporary contiguous matrix.
381  bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
382  &a, &a_rs, &a_cs );
383 }
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
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
dcomplex bl1_z0(void)
Definition: bl1_constants.c:133
void bl1_zscalv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx)
Definition: bl1_scalv.c:72
Definition: blis_type_defs.h:81
int bl1_zero_dim2(int m, int n)
Definition: bl1_is.c:118
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45
int bl1_is_conjnotrans(trans1_t trans)
Definition: bl1_is.c:25
Definition: blis_type_defs.h:82
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
Definition: blis_type_defs.h:54
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.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
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
int bl1_does_trans(trans1_t trans)
Definition: bl1_does.c:13
Definition: blis_type_defs.h:137
dcomplex bl1_z1(void)
Definition: bl1_constants.c:69
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

◆ 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 
)

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

Referenced by bl1_zgemv().

487 {
488 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
489  enum CBLAS_ORDER cblas_order = CblasColMajor;
490  enum CBLAS_TRANSPOSE cblas_transa;
491 
492  bl1_param_map_to_netlib_trans( transa, &cblas_transa );
493 
494  cblas_zgemv( cblas_order,
495  cblas_transa,
496  m,
497  n,
498  alpha,
499  a, lda,
500  x, incx,
501  beta,
502  y, incy );
503 #else
504  char blas_transa;
505 
506  bl1_param_map_to_netlib_trans( transa, &blas_transa );
507 
508  F77_zgemv( &blas_transa,
509  &m,
510  &n,
511  alpha,
512  a, &lda,
513  x, &incx,
514  beta,
515  y, &incy );
516 #endif
517 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
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)
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
Definition: blis_prototypes_cblas.h:17

◆ 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 
)

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().

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;
201  dcomplex* x_conj;
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,
212  a_save, a_rs_save, a_cs_save,
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 );
224  bl1_swap_ints( lda, inca );
225  bl1_swap_ints( incx, incy );
226  bl1_swap_conj( conjx, conjy );
227  bl1_zswap_pointers( x, y );
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  {
249  bl1_zgerc_blas( m,
250  n,
251  alpha,
252  x_conj, incx_conj,
253  y, incy,
254  a, lda );
255  }
256  else
257  {
258  bl1_zgeru_blas( m,
259  n,
260  alpha,
261  x_conj, incx_conj,
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.
271  bl1_zfree_saved_contigm( m_save,
272  n_save,
273  a_save, a_rs_save, a_cs_save,
274  &a, &a_rs, &a_cs );
275 }
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
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
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
int bl1_zero_dim2(int m, int n)
Definition: bl1_is.c:118
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45
Definition: blis_type_defs.h:82
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.c:45
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_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
Definition: blis_type_defs.h:137

◆ 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 
)

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

Referenced by bl1_zger().

368 {
369 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
370  enum CBLAS_ORDER cblas_order = CblasColMajor;
371 
372  cblas_zgerc( cblas_order,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
Definition: blis_prototypes_cblas.h:17
void F77_zgerc(int *m, int *n, dcomplex *alpha, dcomplex *x, int *incx, dcomplex *y, int *incy, dcomplex *a, int *lda)

◆ 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 
)

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

Referenced by bl1_zger().

390 {
391 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
392  enum CBLAS_ORDER cblas_order = CblasColMajor;
393 
394  cblas_zgeru( cblas_order,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
void F77_zgeru(int *m, int *n, dcomplex *alpha, dcomplex *x, int *incx, dcomplex *y, int *incy, dcomplex *a, int *lda)
Definition: blis_prototypes_cblas.h:17
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)

◆ 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 
)

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().

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();
141  dcomplex* x_conj;
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.
152  bl1_zcreate_contigmr( uplo,
153  m,
154  m,
155  a_save, a_rs_save, a_cs_save,
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  {
166  bl1_swap_ints( lda, inca );
167  bl1_toggle_uplo( uplo );
168  bl1_toggle_conj( conj );
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,
196  x_conj, incx_conj,
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.
229  bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
230  &a, &a_rs, &a_cs );
231 }
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
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
dcomplex bl1_z0(void)
Definition: bl1_constants.c:133
void bl1_zscalv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx)
Definition: bl1_scalv.c:72
Definition: blis_type_defs.h:81
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_zfree(dcomplex *p)
Definition: bl1_free.c:45
Definition: blis_type_defs.h:82
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.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
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
Definition: blis_type_defs.h:137
dcomplex bl1_z1(void)
Definition: bl1_constants.c:69
void bl1_zaxpyv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_axpyv.c:60

◆ 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 
)

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

Referenced by bl1_zhemv().

267 {
268 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
269  enum CBLAS_ORDER cblas_order = CblasColMajor;
270  enum CBLAS_UPLO cblas_uplo;
271 
272  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
273 
274  cblas_zhemv( cblas_order,
275  cblas_uplo,
276  m,
277  alpha,
278  a, lda,
279  x, incx,
280  beta,
281  y, incy );
282 #else
283  char blas_uplo;
284 
285  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
286 
287  F77_zhemv( &blas_uplo,
288  &m,
289  alpha,
290  a, &lda,
291  x, &incx,
292  beta,
293  y, &incy );
294 #endif
295 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
void F77_zhemv(char *uplo, int *n, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *x, int *incx, dcomplex *beta, dcomplex *y, int *incy)
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47

◆ 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 
)

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().

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;
107  dcomplex* x_conj;
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.
116  bl1_zcreate_contigmr( uplo,
117  m,
118  m,
119  a_save, a_rs_save, a_cs_save,
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  {
130  bl1_swap_ints( lda, inca );
131  bl1_toggle_uplo( uplo );
132  bl1_toggle_conj( conj );
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,
157  x_conj, incx_conj,
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.
165  bl1_zfree_saved_contigm( m_save,
166  m_save,
167  a_save, a_rs_save, a_cs_save,
168  &a, &a_rs, &a_cs );
169 }
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
void bl1_zher_blas(uplo1_t uplo, int m, double *alpha, dcomplex *x, int incx, dcomplex *a, int lda)
Definition: bl1_her.c:200
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45
Definition: blis_type_defs.h:82
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.c:45
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
Definition: blis_type_defs.h:137

◆ 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 
)

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().

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;
127  dcomplex* x_conj;
128  dcomplex* y_conj;
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.
138  bl1_zcreate_contigmr( uplo,
139  m,
140  m,
141  a_save, a_rs_save, a_cs_save,
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  {
152  bl1_swap_ints( lda, inca );
153  bl1_toggle_uplo( uplo );
154  bl1_toggle_conj( conj );
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,
191  x_conj, incx_conj,
192  y_conj, incy_conj,
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.
203  bl1_zfree_saved_contigm( m_save,
204  m_save,
205  a_save, a_rs_save, a_cs_save,
206  &a, &a_rs, &a_cs );
207 }
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
int bl1_is_conj(conj1_t conj)
Definition: bl1_is.c:42
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
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45
Definition: blis_type_defs.h:82
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.c:45
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
Definition: blis_type_defs.h:137

◆ 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 
)

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

Referenced by bl1_zher2().

241 {
242 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
243  enum CBLAS_ORDER cblas_order = CblasColMajor;
244  enum CBLAS_UPLO cblas_uplo;
245 
246  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
247 
248  cblas_zher2( cblas_order,
249  cblas_uplo,
250  m,
251  alpha,
252  x, incx,
253  y, incy,
254  a, lda );
255 #else
256  char blas_uplo;
257 
258  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
259 
260  F77_zher2( &blas_uplo,
261  &m,
262  alpha,
263  x, &incx,
264  y, &incy,
265  a, &lda );
266 #endif
267 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
void F77_zher2(char *uplo, int *n, dcomplex *alpha, dcomplex *x, int *incx, dcomplex *y, int *incy, dcomplex *a, int *lda)
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
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)

◆ bl1_zher_blas()

void bl1_zher_blas ( uplo1_t  uplo,
int  m,
double *  alpha,
dcomplex x,
int  incx,
dcomplex a,
int  lda 
)

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

Referenced by bl1_zher().

201 {
202 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
203  enum CBLAS_ORDER cblas_order = CblasColMajor;
204  enum CBLAS_UPLO cblas_uplo;
205 
206  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
207 
208  cblas_zher( cblas_order,
209  cblas_uplo,
210  m,
211  *alpha,
212  x, incx,
213  a, lda );
214 #else
215  char blas_uplo;
216 
217  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
218 
219  F77_zher( &blas_uplo,
220  &m,
221  alpha,
222  x, &incx,
223  a, &lda );
224 #endif
225 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
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)
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void F77_zher(char *uplo, int *n, double *alpha, dcomplex *x, int *incx, dcomplex *a, int *lda)

◆ 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 
)

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

Referenced by FLA_Symv_external().

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.
154  bl1_zcreate_contigmr( uplo,
155  m,
156  m,
157  a_save, a_rs_save, a_cs_save,
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  {
168  bl1_swap_ints( lda, inca );
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.
181  bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
182  &a, &a_rs, &a_cs );
183 }
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
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:137

◆ 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 
)

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().

338 {
339  dcomplex* x_copy;
340  dcomplex* y_copy;
341  int n = 1;
342  int ldx = m;
343  int ldy = m;
344 
345 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
346  enum CBLAS_ORDER cblas_order = CblasColMajor;
347  enum CBLAS_SIDE cblas_side;
348  enum CBLAS_UPLO cblas_uplo;
349 
351  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
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 
366  cblas_zsymm( cblas_order,
367  cblas_side,
368  cblas_uplo,
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 
390  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
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 
405  F77_zsymm ( &blas_side,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
Definition: blis_type_defs.h:81
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)
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45
void bl1_param_map_to_netlib_side(side1_t blis_side, void *blas_side)
Definition: bl1_param_map.c:71
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)
Definition: blis_type_defs.h:68
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.c:45
Definition: blis_prototypes_cblas.h:17
CBLAS_SIDE
Definition: blis_prototypes_cblas.h:21
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
Definition: blis_type_defs.h:137

◆ bl1_zsyr()

void bl1_zsyr ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex a,
int  a_rs,
int  a_cs 
)

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

Referenced by FLA_Syr_external().

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.
158  bl1_zcreate_contigmr( uplo,
159  m,
160  m,
161  a_save, a_rs_save, a_cs_save,
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  {
172  bl1_swap_ints( lda, inca );
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.
183  bl1_zfree_saved_contigm( m_save,
184  m_save,
185  a_save, a_rs_save, a_cs_save,
186  &a, &a_rs, &a_cs );
187 }
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
void bl1_zsyr_blas(uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *a, int lda)
Definition: bl1_syr.c:313
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
Definition: blis_type_defs.h:137

◆ 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 
)

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

Referenced by FLA_Syr2_external().

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.
161  bl1_zcreate_contigmr( uplo,
162  m,
163  m,
164  a_save, a_rs_save, a_cs_save,
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  {
175  bl1_swap_ints( lda, inca );
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.
187  bl1_zfree_saved_contigm( m_save,
188  m_save,
189  a_save, a_rs_save, a_cs_save,
190  &a, &a_rs, &a_cs );
191 }
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
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
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
Definition: blis_type_defs.h:137

◆ 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 
)

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().

338 {
339  dcomplex* x_copy;
340  dcomplex* y_copy;
341  dcomplex beta;
342  int k = 1;
343  int ldx = m;
344  int ldy = m;
345 
346 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
347  enum CBLAS_ORDER cblas_order = CblasColMajor;
348  enum CBLAS_UPLO cblas_uplo;
349  enum CBLAS_TRANSPOSE cblas_trans;
350 
351  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
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 
370  cblas_zsyr2k( cblas_order,
371  cblas_uplo,
372  cblas_trans,
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 
387  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
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 
406  F77_zsyr2k ( &blas_uplo,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_TRANSPOSE
Definition: blis_prototypes_cblas.h:18
double imag
Definition: blis_type_defs.h:139
Definition: blis_type_defs.h:81
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition: bl1_param_map.c:15
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45
double real
Definition: blis_type_defs.h:139
Definition: blis_type_defs.h:54
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.c:45
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
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 bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
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)
Definition: blis_type_defs.h:137

◆ bl1_zsyr_blas()

void bl1_zsyr_blas ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex a,
int  lda 
)

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().

314 {
315  dcomplex* x_copy;
316  dcomplex beta;
317  int k = 1;
318  int ldx = m;
319 
320 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
321  enum CBLAS_ORDER cblas_order = CblasColMajor;
322  enum CBLAS_UPLO cblas_uplo;
323  enum CBLAS_TRANSPOSE cblas_trans;
324 
325  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
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 
338  cblas_zsyrk( cblas_order,
339  cblas_uplo,
340  cblas_trans,
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 
353  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
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 
366  F77_zsyrk ( &blas_uplo,
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 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_TRANSPOSE
Definition: blis_prototypes_cblas.h:18
double imag
Definition: blis_type_defs.h:139
Definition: blis_type_defs.h:81
void F77_zsyrk(char *uplo, char *transa, int *n, int *k, dcomplex *alpha, dcomplex *a, int *lda, dcomplex *beta, dcomplex *c, int *ldc)
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition: bl1_param_map.c:15
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45
double real
Definition: blis_type_defs.h:139
Definition: blis_type_defs.h:54
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.c:45
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
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)
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
Definition: blis_type_defs.h:137

◆ 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 
)

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().

178 {
179  dcomplex* a_save = a;
180  int a_rs_save = a_rs;
181  int a_cs_save = a_cs;
182  dcomplex* x_conj;
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.
191  bl1_zcreate_contigmr( uplo,
192  m,
193  m,
194  a_save, a_rs_save, a_cs_save,
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  {
205  bl1_swap_ints( lda, inca );
206  bl1_toggle_uplo( uplo );
207  bl1_toggle_trans( trans );
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,
244  x_conj, incx_conj,
245  x, incx );
246 
247  bl1_zfree( x_conj );
248  }
249 
250  // Free the temporary contiguous matrix.
251  bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
252  &a, &a_rs, &a_cs );
253 }
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
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45
int bl1_is_conjnotrans(trans1_t trans)
Definition: bl1_is.c:25
Definition: blis_type_defs.h:82
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.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
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
Definition: blis_type_defs.h:137

◆ 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 
)

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().

369 {
370 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
371  enum CBLAS_ORDER cblas_order = CblasColMajor;
372  enum CBLAS_UPLO cblas_uplo;
373  enum CBLAS_TRANSPOSE cblas_trans;
374  enum CBLAS_DIAG cblas_diag;
375 
376  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
377  bl1_param_map_to_netlib_trans( trans, &cblas_trans );
378  bl1_param_map_to_netlib_diag( diag, &cblas_diag );
379 
380  cblas_ztrmv( cblas_order,
381  cblas_uplo,
382  cblas_trans,
383  cblas_diag,
384  m,
385  a, lda,
386  x, incx );
387 #else
388  char blas_uplo;
389  char blas_trans;
390  char blas_diag;
391 
392  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
393  bl1_param_map_to_netlib_trans( trans, &blas_trans );
394  bl1_param_map_to_netlib_diag( diag, &blas_diag );
395 
396  F77_ztrmv( &blas_uplo,
397  &blas_trans,
398  &blas_diag,
399  &m,
400  a, &lda,
401  x, &incx );
402 #endif
403 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_DIAG
Definition: blis_prototypes_cblas.h:20
void F77_ztrmv(char *uplo, char *transa, char *diag, int *n, dcomplex *a, int *lda, dcomplex *y, int *incy)
CBLAS_TRANSPOSE
Definition: blis_prototypes_cblas.h:18
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)
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition: bl1_param_map.c:15
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void bl1_param_map_to_netlib_diag(diag1_t blis_diag, void *blas_diag)
Definition: bl1_param_map.c:95

◆ 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 
)

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().

188 {
189  dcomplex* a_save = a;
190  int a_rs_save = a_rs;
191  int a_cs_save = a_cs;
192  dcomplex* x_temp;
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.
200  bl1_zcreate_contigmr( uplo,
201  m,
202  m,
203  a_save, a_rs_save, a_cs_save,
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,
234  x_temp, incx_temp,
235  y, incy );
236 
237  // Free the temporary vector.
238  bl1_zfree( x_temp );
239 
240  // Free the temporary contiguous matrix.
241  bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
242  &a, &a_rs, &a_cs );
243 }
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
void bl1_zscalv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx)
Definition: bl1_scalv.c:72
Definition: blis_type_defs.h:81
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.c:45
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
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
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
Definition: blis_type_defs.h:137
void bl1_zaxpyv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_axpyv.c:60

◆ 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 
)

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().

178 {
179  dcomplex* a_save = a;
180  int a_rs_save = a_rs;
181  int a_cs_save = a_cs;
182  dcomplex* x_conj;
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.
191  bl1_zcreate_contigmr( uplo,
192  m,
193  m,
194  a_save, a_rs_save, a_cs_save,
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  {
205  bl1_swap_ints( lda, inca );
206  bl1_toggle_uplo( uplo );
207  bl1_toggle_trans( trans );
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,
244  x_conj, incx_conj,
245  x, incx );
246 
247  bl1_zfree( x_conj );
248  }
249 
250  // Free the temporary contiguous matrix.
251  bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
252  &a, &a_rs, &a_cs );
253 }
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
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45
int bl1_is_conjnotrans(trans1_t trans)
Definition: bl1_is.c:25
Definition: blis_type_defs.h:82
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
int bl1_is_row_storage(int rs, int cs)
Definition: bl1_is.c:95
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
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.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
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
Definition: blis_type_defs.h:137

◆ 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 
)

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().

369 {
370 #ifdef BLIS1_ENABLE_CBLAS_INTERFACES
371  enum CBLAS_ORDER cblas_order = CblasColMajor;
372  enum CBLAS_UPLO cblas_uplo;
373  enum CBLAS_TRANSPOSE cblas_trans;
374  enum CBLAS_DIAG cblas_diag;
375 
376  bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
377  bl1_param_map_to_netlib_trans( trans, &cblas_trans );
378  bl1_param_map_to_netlib_diag( diag, &cblas_diag );
379 
380  cblas_ztrsv( cblas_order,
381  cblas_uplo,
382  cblas_trans,
383  cblas_diag,
384  m,
385  a, lda,
386  x, incx );
387 #else
388  char blas_uplo;
389  char blas_trans;
390  char blas_diag;
391 
392  bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
393  bl1_param_map_to_netlib_trans( trans, &blas_trans );
394  bl1_param_map_to_netlib_diag( diag, &blas_diag );
395 
396  F77_ztrsv( &blas_uplo,
397  &blas_trans,
398  &blas_diag,
399  &m,
400  a, &lda,
401  x, &incx );
402 #endif
403 }
CBLAS_ORDER
Definition: blis_prototypes_cblas.h:17
CBLAS_DIAG
Definition: blis_prototypes_cblas.h:20
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)
CBLAS_TRANSPOSE
Definition: blis_prototypes_cblas.h:18
void F77_ztrsv(char *uplo, char *transa, char *diag, int *n, dcomplex *a, int *lda, dcomplex *y, int *incy)
void bl1_param_map_to_netlib_trans(trans1_t blis_trans, void *blas_trans)
Definition: bl1_param_map.c:15
CBLAS_UPLO
Definition: blis_prototypes_cblas.h:19
Definition: blis_prototypes_cblas.h:17
void bl1_param_map_to_netlib_uplo(uplo1_t blis_uplo, void *blas_uplo)
Definition: bl1_param_map.c:47
void bl1_param_map_to_netlib_diag(diag1_t blis_diag, void *blas_diag)
Definition: bl1_param_map.c:95

◆ 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 
)

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.

188 {
189  dcomplex* a_save = a;
190  int a_rs_save = a_rs;
191  int a_cs_save = a_cs;
192  dcomplex* x_temp;
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.
200  bl1_zcreate_contigmr( uplo,
201  m,
202  m,
203  a_save, a_rs_save, a_cs_save,
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,
234  x_temp, incx_temp,
235  y, incy );
236 
237  // Free the temporary vector.
238  bl1_zfree( x_temp );
239 
240  // Free the temporary contiguous matrix.
241  bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
242  &a, &a_rs, &a_cs );
243 }
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
void bl1_zscalv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx)
Definition: bl1_scalv.c:72
Definition: blis_type_defs.h:81
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45
int bl1_zero_dim1(int m)
Definition: bl1_is.c:113
dcomplex * bl1_zallocv(unsigned int n_elem)
Definition: bl1_allocv.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
void bl1_zcopyv(conj1_t conj, int m, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_copyv.c:63
Definition: blis_type_defs.h:137
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
void bl1_zaxpyv(conj1_t conj, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_axpyv.c:60