|
libflame
revision_anchor
|
Functions | |
| void | bli_ssyrk (uplo_t uplo, trans_t trans, int m, int k, float *alpha, float *a, int a_rs, int a_cs, float *beta, float *c, int c_rs, int c_cs) |
| void | bli_dsyrk (uplo_t uplo, trans_t trans, int m, int k, double *alpha, double *a, int a_rs, int a_cs, double *beta, double *c, int c_rs, int c_cs) |
| void | bli_csyrk (uplo_t uplo, trans_t trans, int m, int k, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *beta, scomplex *c, int c_rs, int c_cs) |
| void | bli_zsyrk (uplo_t uplo, trans_t trans, int m, int k, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *beta, dcomplex *c, int c_rs, int c_cs) |
| void | bli_ssyrk_blas (uplo_t uplo, trans_t trans, int m, int k, float *alpha, float *a, int lda, float *beta, float *c, int ldc) |
| void | bli_dsyrk_blas (uplo_t uplo, trans_t trans, int m, int k, double *alpha, double *a, int lda, double *beta, double *c, int ldc) |
| void | bli_csyrk_blas (uplo_t uplo, trans_t trans, int m, int k, scomplex *alpha, scomplex *a, int lda, scomplex *beta, scomplex *c, int ldc) |
| void | bli_zsyrk_blas (uplo_t uplo, trans_t trans, int m, int k, dcomplex *alpha, dcomplex *a, int lda, dcomplex *beta, dcomplex *c, int ldc) |
| void bli_csyrk | ( | uplo_t | uplo, |
| trans_t | trans, | ||
| int | m, | ||
| int | k, | ||
| scomplex * | alpha, | ||
| scomplex * | a, | ||
| int | a_rs, | ||
| int | a_cs, | ||
| scomplex * | beta, | ||
| scomplex * | c, | ||
| int | c_rs, | ||
| int | c_cs | ||
| ) |
References bli_ccreate_contigmr(), bli_ccreate_contigmt(), bli_cfree_contigm(), bli_cfree_saved_contigmr(), bli_csyrk_blas(), bli_is_col_storage(), and bli_zero_dim2().
Referenced by FLA_Syrk_external().
{
uplo_t uplo_save = uplo;
int m_save = m;
scomplex* a_save = a;
scomplex* c_save = c;
int a_rs_save = a_rs;
int a_cs_save = a_cs;
int c_rs_save = c_rs;
int c_cs_save = c_cs;
int lda, inca;
int ldc, incc;
// Return early if possible.
if ( bli_zero_dim2( m, k ) ) return;
// If necessary, allocate, initialize, and use a temporary contiguous
// copy of each matrix rather than the original matrices.
bli_ccreate_contigmt( trans,
m,
k,
a_save, a_rs_save, a_cs_save,
&a, &a_rs, &a_cs );
bli_ccreate_contigmr( uplo,
m,
m,
c_save, c_rs_save, c_cs_save,
&c, &c_rs, &c_cs );
// Initialize with values assuming column-major storage.
lda = a_cs;
inca = a_rs;
ldc = c_cs;
incc = c_rs;
// Adjust the parameters based on the storage of each matrix.
if ( bli_is_col_storage( c_rs, c_cs ) )
{
if ( bli_is_col_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_c ) += A_c * A_c^T
// effective operation: uplo( C_c ) += A_c * A_c^T
}
else // if ( bli_is_row_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_c ) += A_r * A_r^T
// effective operation: uplo( C_c ) += A_c^T * A_c
bli_swap_ints( lda, inca );
bli_toggle_trans( trans );
}
}
else // if ( bli_is_row_storage( c_rs, c_cs ) )
{
if ( bli_is_col_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_r ) += A_c * A_c^T
// effective operation: ~uplo( C_c ) += A_c * A_c^T
bli_swap_ints( ldc, incc );
bli_toggle_uplo( uplo );
}
else // if ( bli_is_row_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_r ) += A_r * A_r^T
// effective operation: ~uplo( C_c ) += A_c^T * A_c
bli_swap_ints( ldc, incc );
bli_swap_ints( lda, inca );
bli_toggle_uplo( uplo );
bli_toggle_trans( trans );
}
}
bli_csyrk_blas( uplo,
trans,
m,
k,
alpha,
a, lda,
beta,
c, ldc );
// Free any temporary contiguous matrices, copying the result back to
// the original matrix.
bli_cfree_contigm( a_save, a_rs_save, a_cs_save,
&a, &a_rs, &a_cs );
bli_cfree_saved_contigmr( uplo_save,
m_save,
m_save,
c_save, c_rs_save, c_cs_save,
&c, &c_rs, &c_cs );
}
| void bli_csyrk_blas | ( | uplo_t | uplo, |
| trans_t | trans, | ||
| int | m, | ||
| int | k, | ||
| scomplex * | alpha, | ||
| scomplex * | a, | ||
| int | lda, | ||
| scomplex * | beta, | ||
| scomplex * | c, | ||
| int | ldc | ||
| ) |
References bli_param_map_to_netlib_trans(), bli_param_map_to_netlib_uplo(), cblas_csyrk(), CblasColMajor, and F77_csyrk().
Referenced by bli_csyrk().
{
#ifdef BLIS_ENABLE_CBLAS_INTERFACES
enum CBLAS_ORDER cblas_order = CblasColMajor;
enum CBLAS_UPLO cblas_uplo;
enum CBLAS_TRANSPOSE cblas_trans;
bli_param_map_to_netlib_uplo( uplo, &cblas_uplo );
bli_param_map_to_netlib_trans( trans, &cblas_trans );
cblas_csyrk( cblas_order,
cblas_uplo,
cblas_trans,
m,
k,
alpha,
a, lda,
beta,
c, ldc );
#else
char blas_uplo;
char blas_trans;
bli_param_map_to_netlib_uplo( uplo, &blas_uplo );
bli_param_map_to_netlib_trans( trans, &blas_trans );
F77_csyrk( &blas_uplo,
&blas_trans,
&m,
&k,
alpha,
a, &lda,
beta,
c, &ldc );
#endif
}
| void bli_dsyrk | ( | uplo_t | uplo, |
| trans_t | trans, | ||
| int | m, | ||
| int | k, | ||
| double * | alpha, | ||
| double * | a, | ||
| int | a_rs, | ||
| int | a_cs, | ||
| double * | beta, | ||
| double * | c, | ||
| int | c_rs, | ||
| int | c_cs | ||
| ) |
References bli_dcreate_contigmr(), bli_dcreate_contigmt(), bli_dfree_contigm(), bli_dfree_saved_contigmr(), bli_dsyrk_blas(), bli_is_col_storage(), and bli_zero_dim2().
Referenced by bli_dherk(), FLA_Herk_external(), FLA_Syrk_external(), and FLA_UDdate_UT_opd_var1().
{
uplo_t uplo_save = uplo;
int m_save = m;
double* a_save = a;
double* c_save = c;
int a_rs_save = a_rs;
int a_cs_save = a_cs;
int c_rs_save = c_rs;
int c_cs_save = c_cs;
int lda, inca;
int ldc, incc;
// Return early if possible.
if ( bli_zero_dim2( m, k ) ) return;
// If necessary, allocate, initialize, and use a temporary contiguous
// copy of each matrix rather than the original matrices.
bli_dcreate_contigmt( trans,
m,
k,
a_save, a_rs_save, a_cs_save,
&a, &a_rs, &a_cs );
bli_dcreate_contigmr( uplo,
m,
m,
c_save, c_rs_save, c_cs_save,
&c, &c_rs, &c_cs );
// Initialize with values assuming column-major storage.
lda = a_cs;
inca = a_rs;
ldc = c_cs;
incc = c_rs;
// Adjust the parameters based on the storage of each matrix.
if ( bli_is_col_storage( c_rs, c_cs ) )
{
if ( bli_is_col_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_c ) += A_c * A_c^T
// effective operation: uplo( C_c ) += A_c * A_c^T
}
else // if ( bli_is_row_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_c ) += A_r * A_r^T
// effective operation: uplo( C_c ) += A_c^T * A_c
bli_swap_ints( lda, inca );
bli_toggle_trans( trans );
}
}
else // if ( bli_is_row_storage( c_rs, c_cs ) )
{
if ( bli_is_col_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_r ) += A_c * A_c^T
// effective operation: ~uplo( C_c ) += A_c * A_c^T
bli_swap_ints( ldc, incc );
bli_toggle_uplo( uplo );
}
else // if ( bli_is_row_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_r ) += A_r * A_r^T
// effective operation: ~uplo( C_c ) += A_c^T * A_c
bli_swap_ints( ldc, incc );
bli_swap_ints( lda, inca );
bli_toggle_uplo( uplo );
bli_toggle_trans( trans );
}
}
bli_dsyrk_blas( uplo,
trans,
m,
k,
alpha,
a, lda,
beta,
c, ldc );
// Free any temporary contiguous matrices, copying the result back to
// the original matrix.
bli_dfree_contigm( a_save, a_rs_save, a_cs_save,
&a, &a_rs, &a_cs );
bli_dfree_saved_contigmr( uplo_save,
m_save,
m_save,
c_save, c_rs_save, c_cs_save,
&c, &c_rs, &c_cs );
}
| void bli_dsyrk_blas | ( | uplo_t | uplo, |
| trans_t | trans, | ||
| int | m, | ||
| int | k, | ||
| double * | alpha, | ||
| double * | a, | ||
| int | lda, | ||
| double * | beta, | ||
| double * | c, | ||
| int | ldc | ||
| ) |
References bli_param_map_to_netlib_trans(), bli_param_map_to_netlib_uplo(), cblas_dsyrk(), CblasColMajor, and F77_dsyrk().
Referenced by bli_dsyrk().
{
#ifdef BLIS_ENABLE_CBLAS_INTERFACES
enum CBLAS_ORDER cblas_order = CblasColMajor;
enum CBLAS_UPLO cblas_uplo;
enum CBLAS_TRANSPOSE cblas_trans;
bli_param_map_to_netlib_uplo( uplo, &cblas_uplo );
bli_param_map_to_netlib_trans( trans, &cblas_trans );
cblas_dsyrk( cblas_order,
cblas_uplo,
cblas_trans,
m,
k,
*alpha,
a, lda,
*beta,
c, ldc );
#else
char blas_uplo;
char blas_trans;
bli_param_map_to_netlib_uplo( uplo, &blas_uplo );
bli_param_map_to_netlib_trans( trans, &blas_trans );
F77_dsyrk( &blas_uplo,
&blas_trans,
&m,
&k,
alpha,
a, &lda,
beta,
c, &ldc );
#endif
}
| void bli_ssyrk | ( | uplo_t | uplo, |
| trans_t | trans, | ||
| int | m, | ||
| int | k, | ||
| float * | alpha, | ||
| float * | a, | ||
| int | a_rs, | ||
| int | a_cs, | ||
| float * | beta, | ||
| float * | c, | ||
| int | c_rs, | ||
| int | c_cs | ||
| ) |
References bli_is_col_storage(), bli_screate_contigmr(), bli_screate_contigmt(), bli_sfree_contigm(), bli_sfree_saved_contigmr(), bli_ssyrk_blas(), and bli_zero_dim2().
Referenced by bli_sherk(), FLA_Herk_external(), FLA_Syrk_external(), and FLA_UDdate_UT_ops_var1().
{
uplo_t uplo_save = uplo;
int m_save = m;
float* a_save = a;
float* c_save = c;
int a_rs_save = a_rs;
int a_cs_save = a_cs;
int c_rs_save = c_rs;
int c_cs_save = c_cs;
int lda, inca;
int ldc, incc;
// Return early if possible.
if ( bli_zero_dim2( m, k ) ) return;
// If necessary, allocate, initialize, and use a temporary contiguous
// copy of each matrix rather than the original matrices.
bli_screate_contigmt( trans,
m,
k,
a_save, a_rs_save, a_cs_save,
&a, &a_rs, &a_cs );
bli_screate_contigmr( uplo,
m,
m,
c_save, c_rs_save, c_cs_save,
&c, &c_rs, &c_cs );
// Initialize with values assuming column-major storage.
lda = a_cs;
inca = a_rs;
ldc = c_cs;
incc = c_rs;
// Adjust the parameters based on the storage of each matrix.
if ( bli_is_col_storage( c_rs, c_cs ) )
{
if ( bli_is_col_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_c ) += A_c * A_c^T
// effective operation: uplo( C_c ) += A_c * A_c^T
}
else // if ( bli_is_row_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_c ) += A_r * A_r^T
// effective operation: uplo( C_c ) += A_c^T * A_c
bli_swap_ints( lda, inca );
bli_toggle_trans( trans );
}
}
else // if ( bli_is_row_storage( c_rs, c_cs ) )
{
if ( bli_is_col_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_r ) += A_c * A_c^T
// effective operation: ~uplo( C_c ) += A_c * A_c^T
bli_swap_ints( ldc, incc );
bli_toggle_uplo( uplo );
}
else // if ( bli_is_row_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_r ) += A_r * A_r^T
// effective operation: ~uplo( C_c ) += A_c^T * A_c
bli_swap_ints( ldc, incc );
bli_swap_ints( lda, inca );
bli_toggle_uplo( uplo );
bli_toggle_trans( trans );
}
}
bli_ssyrk_blas( uplo,
trans,
m,
k,
alpha,
a, lda,
beta,
c, ldc );
// Free any temporary contiguous matrices, copying the result back to
// the original matrix.
bli_sfree_contigm( a_save, a_rs_save, a_cs_save,
&a, &a_rs, &a_cs );
bli_sfree_saved_contigmr( uplo_save,
m_save,
m_save,
c_save, c_rs_save, c_cs_save,
&c, &c_rs, &c_cs );
}
| void bli_ssyrk_blas | ( | uplo_t | uplo, |
| trans_t | trans, | ||
| int | m, | ||
| int | k, | ||
| float * | alpha, | ||
| float * | a, | ||
| int | lda, | ||
| float * | beta, | ||
| float * | c, | ||
| int | ldc | ||
| ) |
References bli_param_map_to_netlib_trans(), bli_param_map_to_netlib_uplo(), cblas_ssyrk(), CblasColMajor, and F77_ssyrk().
Referenced by bli_ssyrk().
{
#ifdef BLIS_ENABLE_CBLAS_INTERFACES
enum CBLAS_ORDER cblas_order = CblasColMajor;
enum CBLAS_UPLO cblas_uplo;
enum CBLAS_TRANSPOSE cblas_trans;
bli_param_map_to_netlib_uplo( uplo, &cblas_uplo );
bli_param_map_to_netlib_trans( trans, &cblas_trans );
cblas_ssyrk( cblas_order,
cblas_uplo,
cblas_trans,
m,
k,
*alpha,
a, lda,
*beta,
c, ldc );
#else
char blas_uplo;
char blas_trans;
bli_param_map_to_netlib_uplo( uplo, &blas_uplo );
bli_param_map_to_netlib_trans( trans, &blas_trans );
F77_ssyrk( &blas_uplo,
&blas_trans,
&m,
&k,
alpha,
a, &lda,
beta,
c, &ldc );
#endif
}
| void bli_zsyrk | ( | uplo_t | uplo, |
| trans_t | trans, | ||
| int | m, | ||
| int | k, | ||
| dcomplex * | alpha, | ||
| dcomplex * | a, | ||
| int | a_rs, | ||
| int | a_cs, | ||
| dcomplex * | beta, | ||
| dcomplex * | c, | ||
| int | c_rs, | ||
| int | c_cs | ||
| ) |
References bli_is_col_storage(), bli_zcreate_contigmr(), bli_zcreate_contigmt(), bli_zero_dim2(), bli_zfree_contigm(), bli_zfree_saved_contigmr(), and bli_zsyrk_blas().
Referenced by FLA_Syrk_external().
{
uplo_t uplo_save = uplo;
int m_save = m;
dcomplex* a_save = a;
dcomplex* c_save = c;
int a_rs_save = a_rs;
int a_cs_save = a_cs;
int c_rs_save = c_rs;
int c_cs_save = c_cs;
int lda, inca;
int ldc, incc;
// Return early if possible.
if ( bli_zero_dim2( m, k ) ) return;
// If necessary, allocate, initialize, and use a temporary contiguous
// copy of each matrix rather than the original matrices.
bli_zcreate_contigmt( trans,
m,
k,
a_save, a_rs_save, a_cs_save,
&a, &a_rs, &a_cs );
bli_zcreate_contigmr( uplo,
m,
m,
c_save, c_rs_save, c_cs_save,
&c, &c_rs, &c_cs );
// Initialize with values assuming column-major storage.
lda = a_cs;
inca = a_rs;
ldc = c_cs;
incc = c_rs;
// Adjust the parameters based on the storage of each matrix.
if ( bli_is_col_storage( c_rs, c_cs ) )
{
if ( bli_is_col_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_c ) += A_c * A_c^T
// effective operation: uplo( C_c ) += A_c * A_c^T
}
else // if ( bli_is_row_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_c ) += A_r * A_r^T
// effective operation: uplo( C_c ) += A_c^T * A_c
bli_swap_ints( lda, inca );
bli_toggle_trans( trans );
}
}
else // if ( bli_is_row_storage( c_rs, c_cs ) )
{
if ( bli_is_col_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_r ) += A_c * A_c^T
// effective operation: ~uplo( C_c ) += A_c * A_c^T
bli_swap_ints( ldc, incc );
bli_toggle_uplo( uplo );
}
else // if ( bli_is_row_storage( a_rs, a_cs ) )
{
// requested operation: uplo( C_r ) += A_r * A_r^T
// effective operation: ~uplo( C_c ) += A_c^T * A_c
bli_swap_ints( ldc, incc );
bli_swap_ints( lda, inca );
bli_toggle_uplo( uplo );
bli_toggle_trans( trans );
}
}
bli_zsyrk_blas( uplo,
trans,
m,
k,
alpha,
a, lda,
beta,
c, ldc );
// Free any temporary contiguous matrices, copying the result back to
// the original matrix.
bli_zfree_contigm( a_save, a_rs_save, a_cs_save,
&a, &a_rs, &a_cs );
bli_zfree_saved_contigmr( uplo_save,
m_save,
m_save,
c_save, c_rs_save, c_cs_save,
&c, &c_rs, &c_cs );
}
| void bli_zsyrk_blas | ( | uplo_t | uplo, |
| trans_t | trans, | ||
| int | m, | ||
| int | k, | ||
| dcomplex * | alpha, | ||
| dcomplex * | a, | ||
| int | lda, | ||
| dcomplex * | beta, | ||
| dcomplex * | c, | ||
| int | ldc | ||
| ) |
References bli_param_map_to_netlib_trans(), bli_param_map_to_netlib_uplo(), cblas_zsyrk(), CblasColMajor, and F77_zsyrk().
Referenced by bli_zsyrk().
{
#ifdef BLIS_ENABLE_CBLAS_INTERFACES
enum CBLAS_ORDER cblas_order = CblasColMajor;
enum CBLAS_UPLO cblas_uplo;
enum CBLAS_TRANSPOSE cblas_trans;
bli_param_map_to_netlib_uplo( uplo, &cblas_uplo );
bli_param_map_to_netlib_trans( trans, &cblas_trans );
cblas_zsyrk( cblas_order,
cblas_uplo,
cblas_trans,
m,
k,
alpha,
a, lda,
beta,
c, ldc );
#else
char blas_uplo;
char blas_trans;
bli_param_map_to_netlib_uplo( uplo, &blas_uplo );
bli_param_map_to_netlib_trans( trans, &blas_trans );
F77_zsyrk( &blas_uplo,
&blas_trans,
&m,
&k,
alpha,
a, &lda,
beta,
c, &ldc );
#endif
}
1.7.6.1