libflame
revision_anchor
|
Functions | |
void | bli_strmv (uplo_t uplo, trans_t trans, diag_t diag, int m, float *a, int a_rs, int a_cs, float *x, int incx) |
void | bli_dtrmv (uplo_t uplo, trans_t trans, diag_t diag, int m, double *a, int a_rs, int a_cs, double *x, int incx) |
void | bli_ctrmv (uplo_t uplo, trans_t trans, diag_t diag, int m, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx) |
void | bli_ztrmv (uplo_t uplo, trans_t trans, diag_t diag, int m, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx) |
void | bli_strmv_blas (uplo_t uplo, trans_t trans, diag_t diag, int m, float *a, int lda, float *x, int incx) |
void | bli_dtrmv_blas (uplo_t uplo, trans_t trans, diag_t diag, int m, double *a, int lda, double *x, int incx) |
void | bli_ctrmv_blas (uplo_t uplo, trans_t trans, diag_t diag, int m, scomplex *a, int lda, scomplex *x, int incx) |
void | bli_ztrmv_blas (uplo_t uplo, trans_t trans, diag_t diag, int m, dcomplex *a, int lda, dcomplex *x, int incx) |
void bli_ctrmv | ( | uplo_t | uplo, |
trans_t | trans, | ||
diag_t | diag, | ||
int | m, | ||
scomplex * | a, | ||
int | a_rs, | ||
int | a_cs, | ||
scomplex * | x, | ||
int | incx | ||
) |
References bli_callocv(), bli_ccopyv(), bli_ccreate_contigmr(), bli_cfree(), bli_cfree_contigm(), bli_ctrmv_blas(), bli_is_conjnotrans(), bli_is_row_storage(), bli_zero_dim1(), and BLIS_CONJUGATE.
Referenced by bli_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().
{ scomplex* a_save = a; int a_rs_save = a_rs; int a_cs_save = a_cs; scomplex* x_conj; int incx_conj; int lda, inca; // Return early if possible. if ( bli_zero_dim1( m ) ) return; // If necessary, allocate, initialize, and use a temporary contiguous // copy of the matrix rather than the original matrix. bli_ccreate_contigmr( uplo, m, m, a_save, a_rs_save, a_cs_save, &a, &a_rs, &a_cs ); // Initialize with values assuming column-major storage. lda = a_cs; inca = a_rs; // If A is a row-major matrix, then we can use the underlying column-major // BLAS implementation by fiddling with the parameters. if ( bli_is_row_storage( a_rs, a_cs ) ) { bli_swap_ints( lda, inca ); bli_toggle_uplo( uplo ); bli_toggle_trans( trans ); } // Initialize with values assuming that trans is not conjnotrans. x_conj = x; incx_conj = incx; // We want to handle the conjnotrans case, but without explicitly // conjugating A. To do so, we leverage the fact that computing the // product conj(A) * x is equivalent to computing conj( A * conj(x) ). // Note: strictly speaking, we don't need to create a copy of x since // the operation is simpler than, say, gemv. However, we create a copy // anyway since in practice it performs better due to increased spatial // locality. if ( bli_is_conjnotrans( trans ) ) { x_conj = bli_callocv( m ); incx_conj = 1; bli_ccopyv( BLIS_CONJUGATE, m, x, incx, x_conj, incx_conj ); } bli_ctrmv_blas( uplo, trans, diag, m, a, lda, x_conj, incx_conj ); // Save the contents of and then free the temporary conjugated x vector. if ( bli_is_conjnotrans( trans ) ) { bli_ccopyv( BLIS_CONJUGATE, m, x_conj, incx_conj, x, incx ); bli_cfree( x_conj ); } // Free the temporary contiguous matrix. bli_cfree_contigm( a_save, a_rs_save, a_cs_save, &a, &a_rs, &a_cs ); }
void bli_ctrmv_blas | ( | uplo_t | uplo, |
trans_t | trans, | ||
diag_t | diag, | ||
int | m, | ||
scomplex * | a, | ||
int | lda, | ||
scomplex * | x, | ||
int | incx | ||
) |
References bli_param_map_to_netlib_diag(), bli_param_map_to_netlib_trans(), bli_param_map_to_netlib_uplo(), cblas_ctrmv(), CblasColMajor, and F77_ctrmv().
Referenced by bli_ctrmv().
{ #ifdef BLIS_ENABLE_CBLAS_INTERFACES enum CBLAS_ORDER cblas_order = CblasColMajor; enum CBLAS_UPLO cblas_uplo; enum CBLAS_TRANSPOSE cblas_trans; enum CBLAS_DIAG cblas_diag; bli_param_map_to_netlib_uplo( uplo, &cblas_uplo ); bli_param_map_to_netlib_trans( trans, &cblas_trans ); bli_param_map_to_netlib_diag( diag, &cblas_diag ); cblas_ctrmv( cblas_order, cblas_uplo, cblas_trans, cblas_diag, m, a, lda, x, incx ); #else char blas_uplo; char blas_trans; char blas_diag; bli_param_map_to_netlib_uplo( uplo, &blas_uplo ); bli_param_map_to_netlib_trans( trans, &blas_trans ); bli_param_map_to_netlib_diag( diag, &blas_diag ); F77_ctrmv( &blas_uplo, &blas_trans, &blas_diag, &m, a, &lda, x, &incx ); #endif }
void bli_dtrmv | ( | uplo_t | uplo, |
trans_t | trans, | ||
diag_t | diag, | ||
int | m, | ||
double * | a, | ||
int | a_rs, | ||
int | a_cs, | ||
double * | x, | ||
int | incx | ||
) |
References bli_dcreate_contigmr(), bli_dfree_contigm(), bli_dtrmv_blas(), bli_is_row_storage(), and bli_zero_dim1().
Referenced by bli_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().
{ double* a_save = a; int a_rs_save = a_rs; int a_cs_save = a_cs; int lda, inca; // Return early if possible. if ( bli_zero_dim1( m ) ) return; // If necessary, allocate, initialize, and use a temporary contiguous // copy of the matrix rather than the original matrix. bli_dcreate_contigmr( uplo, m, m, a_save, a_rs_save, a_cs_save, &a, &a_rs, &a_cs ); // Initialize with values assuming column-major storage. lda = a_cs; inca = a_rs; // If A is a row-major matrix, then we can use the underlying column-major // BLAS implementation by fiddling with the parameters. if ( bli_is_row_storage( a_rs, a_cs ) ) { bli_swap_ints( lda, inca ); bli_toggle_uplo( uplo ); bli_toggle_trans( trans ); } bli_dtrmv_blas( uplo, trans, diag, m, a, lda, x, incx ); // Free the temporary contiguous matrix. bli_dfree_contigm( a_save, a_rs_save, a_cs_save, &a, &a_rs, &a_cs ); }
void bli_dtrmv_blas | ( | uplo_t | uplo, |
trans_t | trans, | ||
diag_t | diag, | ||
int | m, | ||
double * | a, | ||
int | lda, | ||
double * | x, | ||
int | incx | ||
) |
References bli_param_map_to_netlib_diag(), bli_param_map_to_netlib_trans(), bli_param_map_to_netlib_uplo(), cblas_dtrmv(), CblasColMajor, and F77_dtrmv().
Referenced by bli_dtrmv().
{ #ifdef BLIS_ENABLE_CBLAS_INTERFACES enum CBLAS_ORDER cblas_order = CblasColMajor; enum CBLAS_UPLO cblas_uplo; enum CBLAS_TRANSPOSE cblas_trans; enum CBLAS_DIAG cblas_diag; bli_param_map_to_netlib_uplo( uplo, &cblas_uplo ); bli_param_map_to_netlib_trans( trans, &cblas_trans ); bli_param_map_to_netlib_diag( diag, &cblas_diag ); cblas_dtrmv( cblas_order, cblas_uplo, cblas_trans, cblas_diag, m, a, lda, x, incx ); #else char blas_uplo; char blas_trans; char blas_diag; bli_param_map_to_netlib_uplo( uplo, &blas_uplo ); bli_param_map_to_netlib_trans( trans, &blas_trans ); bli_param_map_to_netlib_diag( diag, &blas_diag ); F77_dtrmv( &blas_uplo, &blas_trans, &blas_diag, &m, a, &lda, x, &incx ); #endif }
void bli_strmv | ( | uplo_t | uplo, |
trans_t | trans, | ||
diag_t | diag, | ||
int | m, | ||
float * | a, | ||
int | a_rs, | ||
int | a_cs, | ||
float * | x, | ||
int | incx | ||
) |
References bli_is_row_storage(), bli_screate_contigmr(), bli_sfree_contigm(), bli_strmv_blas(), and bli_zero_dim1().
Referenced by bli_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().
{ float* a_save = a; int a_rs_save = a_rs; int a_cs_save = a_cs; int lda, inca; // Return early if possible. if ( bli_zero_dim1( m ) ) return; // If necessary, allocate, initialize, and use a temporary contiguous // copy of the matrix rather than the original matrix. bli_screate_contigmr( uplo, m, m, a_save, a_rs_save, a_cs_save, &a, &a_rs, &a_cs ); // Initialize with values assuming column-major storage. lda = a_cs; inca = a_rs; // If A is a row-major matrix, then we can use the underlying column-major // BLAS implementation by fiddling with the parameters. if ( bli_is_row_storage( a_rs, a_cs ) ) { bli_swap_ints( lda, inca ); bli_toggle_uplo( uplo ); bli_toggle_trans( trans ); } bli_strmv_blas( uplo, trans, diag, m, a, lda, x, incx ); // Free the temporary contiguous matrix. bli_sfree_contigm( a_save, a_rs_save, a_cs_save, &a, &a_rs, &a_cs ); }
void bli_strmv_blas | ( | uplo_t | uplo, |
trans_t | trans, | ||
diag_t | diag, | ||
int | m, | ||
float * | a, | ||
int | lda, | ||
float * | x, | ||
int | incx | ||
) |
References bli_param_map_to_netlib_diag(), bli_param_map_to_netlib_trans(), bli_param_map_to_netlib_uplo(), cblas_strmv(), CblasColMajor, and F77_strmv().
Referenced by bli_strmv().
{ #ifdef BLIS_ENABLE_CBLAS_INTERFACES enum CBLAS_ORDER cblas_order = CblasColMajor; enum CBLAS_UPLO cblas_uplo; enum CBLAS_TRANSPOSE cblas_trans; enum CBLAS_DIAG cblas_diag; bli_param_map_to_netlib_uplo( uplo, &cblas_uplo ); bli_param_map_to_netlib_trans( trans, &cblas_trans ); bli_param_map_to_netlib_diag( diag, &cblas_diag ); cblas_strmv( cblas_order, cblas_uplo, cblas_trans, cblas_diag, m, a, lda, x, incx ); #else char blas_uplo; char blas_trans; char blas_diag; bli_param_map_to_netlib_uplo( uplo, &blas_uplo ); bli_param_map_to_netlib_trans( trans, &blas_trans ); bli_param_map_to_netlib_diag( diag, &blas_diag ); F77_strmv( &blas_uplo, &blas_trans, &blas_diag, &m, a, &lda, x, &incx ); #endif }
void bli_ztrmv | ( | uplo_t | uplo, |
trans_t | trans, | ||
diag_t | diag, | ||
int | m, | ||
dcomplex * | a, | ||
int | a_rs, | ||
int | a_cs, | ||
dcomplex * | x, | ||
int | incx | ||
) |
References bli_is_conjnotrans(), bli_is_row_storage(), bli_zallocv(), bli_zcopyv(), bli_zcreate_contigmr(), bli_zero_dim1(), bli_zfree(), bli_zfree_contigm(), bli_ztrmv_blas(), and BLIS_CONJUGATE.
Referenced by bli_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().
{ dcomplex* a_save = a; int a_rs_save = a_rs; int a_cs_save = a_cs; dcomplex* x_conj; int incx_conj; int lda, inca; // Return early if possible. if ( bli_zero_dim1( m ) ) return; // If necessary, allocate, initialize, and use a temporary contiguous // copy of the matrix rather than the original matrix. bli_zcreate_contigmr( uplo, m, m, a_save, a_rs_save, a_cs_save, &a, &a_rs, &a_cs ); // Initialize with values assuming column-major storage. lda = a_cs; inca = a_rs; // If A is a row-major matrix, then we can use the underlying column-major // BLAS implementation by fiddling with the parameters. if ( bli_is_row_storage( a_rs, a_cs ) ) { bli_swap_ints( lda, inca ); bli_toggle_uplo( uplo ); bli_toggle_trans( trans ); } // Initialize with values assuming that trans is not conjnotrans. x_conj = x; incx_conj = incx; // We want to handle the conjnotrans case, but without explicitly // conjugating A. To do so, we leverage the fact that computing the // product conj(A) * x is equivalent to computing conj( A * conj(x) ). // Note: strictly speaking, we don't need to create a copy of x since // the operation is simpler than, say, gemv. However, we create a copy // anyway since in practice it performs better due to increased spatial // locality. if ( bli_is_conjnotrans( trans ) ) { x_conj = bli_zallocv( m ); incx_conj = 1; bli_zcopyv( BLIS_CONJUGATE, m, x, incx, x_conj, incx_conj ); } bli_ztrmv_blas( uplo, trans, diag, m, a, lda, x_conj, incx_conj ); // Save the contents of and then free the temporary conjugated x vector. if ( bli_is_conjnotrans( trans ) ) { bli_zcopyv( BLIS_CONJUGATE, m, x_conj, incx_conj, x, incx ); bli_zfree( x_conj ); } // Free the temporary contiguous matrix. bli_zfree_contigm( a_save, a_rs_save, a_cs_save, &a, &a_rs, &a_cs ); }
void bli_ztrmv_blas | ( | uplo_t | uplo, |
trans_t | trans, | ||
diag_t | diag, | ||
int | m, | ||
dcomplex * | a, | ||
int | lda, | ||
dcomplex * | x, | ||
int | incx | ||
) |
References bli_param_map_to_netlib_diag(), bli_param_map_to_netlib_trans(), bli_param_map_to_netlib_uplo(), cblas_ztrmv(), CblasColMajor, and F77_ztrmv().
Referenced by bli_ztrmv().
{ #ifdef BLIS_ENABLE_CBLAS_INTERFACES enum CBLAS_ORDER cblas_order = CblasColMajor; enum CBLAS_UPLO cblas_uplo; enum CBLAS_TRANSPOSE cblas_trans; enum CBLAS_DIAG cblas_diag; bli_param_map_to_netlib_uplo( uplo, &cblas_uplo ); bli_param_map_to_netlib_trans( trans, &cblas_trans ); bli_param_map_to_netlib_diag( diag, &cblas_diag ); cblas_ztrmv( cblas_order, cblas_uplo, cblas_trans, cblas_diag, m, a, lda, x, incx ); #else char blas_uplo; char blas_trans; char blas_diag; bli_param_map_to_netlib_uplo( uplo, &blas_uplo ); bli_param_map_to_netlib_trans( trans, &blas_trans ); bli_param_map_to_netlib_diag( diag, &blas_diag ); F77_ztrmv( &blas_uplo, &blas_trans, &blas_diag, &m, a, &lda, x, &incx ); #endif }