libflame revision_anchor
|
Functions | |
void | bli_sher (char uplo, char conj, int m, float *alpha, float *x, int incx, float *a, int a_rs, int a_cs) |
void | bli_dher (char uplo, char conj, int m, double *alpha, double *x, int incx, double *a, int a_rs, int a_cs) |
void | bli_cher (char uplo, char conj, int m, float *alpha, scomplex *x, int incx, scomplex *a, int a_rs, int a_cs) |
void | bli_zher (char uplo, char conj, int m, double *alpha, dcomplex *x, int incx, dcomplex *a, int a_rs, int a_cs) |
void | bli_cher_blas (char uplo, int m, float *alpha, scomplex *x, int incx, scomplex *a, int lda) |
void | bli_zher_blas (char uplo, int m, double *alpha, dcomplex *x, int incx, dcomplex *a, int lda) |
void bli_cher | ( | char | uplo, |
char | conj, | ||
int | m, | ||
float * | alpha, | ||
scomplex * | x, | ||
int | incx, | ||
scomplex * | a, | ||
int | a_rs, | ||
int | a_cs | ||
) |
References bli_callocv(), bli_ccopyv(), bli_ccreate_contigmr(), bli_cfree(), bli_cfree_saved_contigm(), bli_cher_blas(), bli_is_conj(), bli_is_row_storage(), and bli_zero_dim1().
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().
{ int m_save = m; 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_conj( conj ); } // Initialize with values assuming no conjugation of ( x * x' ). x_conj = x; incx_conj = incx; // We want to handle the case where ( x * x' ) is conjugated, but // without explicitly conjugating the matrix. To do so, we leverage // the fact that computing the product conj( x * x' ) is equivalent // to computing ( conj(x) * conj(x)' ), since ( x * x' ) is Hermitian. if ( bli_is_conj( conj ) ) { x_conj = bli_callocv( m ); incx_conj = 1; bli_ccopyv( BLIS_CONJUGATE, m, x, incx, x_conj, incx_conj ); } bli_cher_blas( uplo, m, alpha, x_conj, incx_conj, a, lda ); // Free the temporary conjugated x vector. if ( bli_is_conj( conj ) ) bli_cfree( x_conj ); // Free the temporary contiguous matrix. bli_cfree_saved_contigm( m_save, m_save, a_save, a_rs_save, a_cs_save, &a, &a_rs, &a_cs ); }
void bli_cher_blas | ( | char | uplo, |
int | m, | ||
float * | alpha, | ||
scomplex * | x, | ||
int | incx, | ||
scomplex * | a, | ||
int | lda | ||
) |
References bli_param_map_to_netlib_uplo(), cblas_cher(), CblasColMajor, and F77_cher().
Referenced by bli_cher().
{ #ifdef BLIS_ENABLE_CBLAS_INTERFACES enum CBLAS_ORDER cblas_order = CblasColMajor; enum CBLAS_UPLO cblas_uplo; bli_param_map_to_netlib_uplo( uplo, &cblas_uplo ); cblas_cher( cblas_order, cblas_uplo, m, *alpha, x, incx, a, lda ); #else char blas_uplo; bli_param_map_to_netlib_uplo( uplo, &blas_uplo ); F77_cher( &uplo, &m, alpha, x, &incx, a, &lda ); #endif }
void bli_dher | ( | char | uplo, |
char | conj, | ||
int | m, | ||
double * | alpha, | ||
double * | x, | ||
int | incx, | ||
double * | a, | ||
int | a_rs, | ||
int | a_cs | ||
) |
References bli_dsyr().
{ bli_dsyr( uplo, m, alpha, x, incx, a, a_rs, a_cs ); }
void bli_sher | ( | char | uplo, |
char | conj, | ||
int | m, | ||
float * | alpha, | ||
float * | x, | ||
int | incx, | ||
float * | a, | ||
int | a_rs, | ||
int | a_cs | ||
) |
References bli_ssyr().
{ bli_ssyr( uplo, m, alpha, x, incx, a, a_rs, a_cs ); }
void bli_zher | ( | char | uplo, |
char | conj, | ||
int | m, | ||
double * | alpha, | ||
dcomplex * | x, | ||
int | incx, | ||
dcomplex * | a, | ||
int | a_rs, | ||
int | a_cs | ||
) |
References bli_is_conj(), bli_is_row_storage(), bli_zallocv(), bli_zcopyv(), bli_zcreate_contigmr(), bli_zero_dim1(), bli_zfree(), bli_zfree_saved_contigm(), and bli_zher_blas().
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().
{ int m_save = m; 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_conj( conj ); } // Initialize with values assuming no conjugation of ( x * x' ). x_conj = x; incx_conj = incx; // We want to handle the case where ( x * x' ) is conjugated, but // without explicitly conjugating the matrix. To do so, we leverage // the fact that computing the product conj( x * x' ) is equivalent // to computing ( conj(x) * conj(x)' ), since ( x * x' ) is Hermitian. if ( bli_is_conj( conj ) ) { x_conj = bli_zallocv( m ); incx_conj = 1; bli_zcopyv( BLIS_CONJUGATE, m, x, incx, x_conj, incx_conj ); } bli_zher_blas( uplo, m, alpha, x_conj, incx_conj, a, lda ); // Free the temporary conjugated x vector. if ( bli_is_conj( conj ) ) bli_zfree( x_conj ); // Free the temporary contiguous matrix. bli_zfree_saved_contigm( m_save, m_save, a_save, a_rs_save, a_cs_save, &a, &a_rs, &a_cs ); }
void bli_zher_blas | ( | char | uplo, |
int | m, | ||
double * | alpha, | ||
dcomplex * | x, | ||
int | incx, | ||
dcomplex * | a, | ||
int | lda | ||
) |
References bli_param_map_to_netlib_uplo(), cblas_zher(), CblasColMajor, and F77_zher().
Referenced by bli_zher().
{ #ifdef BLIS_ENABLE_CBLAS_INTERFACES enum CBLAS_ORDER cblas_order = CblasColMajor; enum CBLAS_UPLO cblas_uplo; bli_param_map_to_netlib_uplo( uplo, &cblas_uplo ); cblas_zher( cblas_order, cblas_uplo, m, *alpha, x, incx, a, lda ); #else char blas_uplo; bli_param_map_to_netlib_uplo( uplo, &blas_uplo ); F77_zher( &uplo, &m, alpha, x, &incx, a, &lda ); #endif }