libflame
revision_anchor
|
Functions | |
void | bli_strsv (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_dtrsv (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_ctrsv (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_ztrsv (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_strsv_blas (uplo_t uplo, trans_t trans, diag_t diag, int m, float *a, int lda, float *x, int incx) |
void | bli_dtrsv_blas (uplo_t uplo, trans_t trans, diag_t diag, int m, double *a, int lda, double *x, int incx) |
void | bli_ctrsv_blas (uplo_t uplo, trans_t trans, diag_t diag, int m, scomplex *a, int lda, scomplex *x, int incx) |
void | bli_ztrsv_blas (uplo_t uplo, trans_t trans, diag_t diag, int m, dcomplex *a, int lda, dcomplex *x, int incx) |
void bli_ctrsv | ( | 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_ctrsv_blas(), bli_is_conjnotrans(), bli_is_row_storage(), bli_zero_dim1(), and BLIS_CONJUGATE.
Referenced by bli_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().
{ 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_ctrsv_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_ctrsv_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_ctrsv(), CblasColMajor, and F77_ctrsv().
Referenced by bli_ctrsv().
{ #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_ctrsv( 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_ctrsv( &blas_uplo, &blas_trans, &blas_diag, &m, a, &lda, x, &incx ); #endif }
void bli_dtrsv | ( | 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_dtrsv_blas(), bli_is_row_storage(), and bli_zero_dim1().
Referenced by bli_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().
{ 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_dtrsv_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_dtrsv_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_dtrsv(), CblasColMajor, and F77_dtrsv().
Referenced by bli_dtrsv().
{ #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_dtrsv( 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_dtrsv( &blas_uplo, &blas_trans, &blas_diag, &m, a, &lda, x, &incx ); #endif }
void bli_strsv | ( | 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_strsv_blas(), and bli_zero_dim1().
Referenced by bli_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().
{ 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_strsv_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_strsv_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_strsv(), CblasColMajor, and F77_strsv().
Referenced by bli_strsv().
{ #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_strsv( 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_strsv( &blas_uplo, &blas_trans, &blas_diag, &m, a, &lda, x, &incx ); #endif }
void bli_ztrsv | ( | 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_ztrsv_blas(), and BLIS_CONJUGATE.
Referenced by bli_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().
{ 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_ztrsv_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_ztrsv_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_ztrsv(), CblasColMajor, and F77_ztrsv().
Referenced by bli_ztrsv().
{ #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_ztrsv( 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_ztrsv( &blas_uplo, &blas_trans, &blas_diag, &m, a, &lda, x, &incx ); #endif }