|
libflame
revision_anchor
|
Go to the source code of this file.
| FLA_Error FLA_Ttmm_u_blk_var1 | ( | FLA_Obj | A, |
| fla_ttmm_t * | cntl | ||
| ) |
References FLA_Cont_with_3x3_to_2x2(), FLA_Determine_blocksize(), FLA_Herk_internal(), FLA_Obj_length(), FLA_ONE, FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), FLA_Trmm_internal(), and FLA_Ttmm_internal().
Referenced by FLA_Ttmm_u().
{
FLA_Obj ATL, ATR, A00, A01, A02,
ABL, ABR, A10, A11, A12,
A20, A21, A22;
dim_t b;
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_TL );
while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) ){
b = FLA_Determine_blocksize( ABR, FLA_BR, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02,
/* ************* */ /* ******************** */
&A10, /**/ &A11, &A12,
ABL, /**/ ABR, &A20, /**/ &A21, &A22,
b, b, FLA_BR );
/*------------------------------------------------------------*/
// A00 = A00 + A01 * A01'
FLA_Herk_internal( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE,
FLA_ONE, A01, FLA_ONE, A00,
FLA_Cntl_sub_herk( cntl ) );
// A01 = A01 * triu( A11 )'
FLA_Trmm_internal( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, FLA_NONUNIT_DIAG,
FLA_ONE, A11, A01,
FLA_Cntl_sub_trmm( cntl ) );
// A11 = triu( A11 ) * triu( A11 )'
FLA_Ttmm_internal( FLA_UPPER_TRIANGULAR, A11,
FLA_Cntl_sub_ttmm( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
A10, A11, /**/ A12,
/* ************** */ /* ****************** */
&ABL, /**/ &ABR, A20, A21, /**/ A22,
FLA_TL );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_blk_var2 | ( | FLA_Obj | A, |
| fla_ttmm_t * | cntl | ||
| ) |
References FLA_Cont_with_3x3_to_2x2(), FLA_Determine_blocksize(), FLA_Gemm_internal(), FLA_Herk_internal(), FLA_Obj_length(), FLA_ONE, FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), FLA_Trmm_internal(), and FLA_Ttmm_internal().
Referenced by FLA_Ttmm_u().
{
FLA_Obj ATL, ATR, A00, A01, A02,
ABL, ABR, A10, A11, A12,
A20, A21, A22;
dim_t b;
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_TL );
while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) ){
b = FLA_Determine_blocksize( ABR, FLA_BR, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02,
/* ************* */ /* ******************** */
&A10, /**/ &A11, &A12,
ABL, /**/ ABR, &A20, /**/ &A21, &A22,
b, b, FLA_BR );
/*------------------------------------------------------------*/
// A01 = A01 * triu( A11 )'
FLA_Trmm_internal( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, FLA_NONUNIT_DIAG,
FLA_ONE, A11, A01,
FLA_Cntl_sub_trmm( cntl ) );
// A01 = A01 + A02 * A12'
FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_CONJ_TRANSPOSE,
FLA_ONE, A02, A12, FLA_ONE, A01,
FLA_Cntl_sub_gemm( cntl ) );
// A11 = triu( A11 ) * triu( A11 )'
FLA_Ttmm_internal( FLA_UPPER_TRIANGULAR, A11,
FLA_Cntl_sub_ttmm( cntl ) );
// A11 = A11 + A12 * A12'
FLA_Herk_internal( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE,
FLA_ONE, A12, FLA_ONE, A11,
FLA_Cntl_sub_herk( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
A10, A11, /**/ A12,
/* ************** */ /* ****************** */
&ABL, /**/ &ABR, A20, A21, /**/ A22,
FLA_TL );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_blk_var3 | ( | FLA_Obj | A, |
| fla_ttmm_t * | cntl | ||
| ) |
References FLA_Cont_with_3x3_to_2x2(), FLA_Determine_blocksize(), FLA_Herk_internal(), FLA_Obj_length(), FLA_ONE, FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), FLA_Trmm_internal(), and FLA_Ttmm_internal().
Referenced by FLA_Ttmm_u().
{
FLA_Obj ATL, ATR, A00, A01, A02,
ABL, ABR, A10, A11, A12,
A20, A21, A22;
dim_t b;
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_TL );
while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) ){
b = FLA_Determine_blocksize( ABR, FLA_BR, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02,
/* ************* */ /* ******************** */
&A10, /**/ &A11, &A12,
ABL, /**/ ABR, &A20, /**/ &A21, &A22,
b, b, FLA_BR );
/*------------------------------------------------------------*/
// A11 = triu( A11 ) * triu( A11 )'
FLA_Ttmm_internal( FLA_UPPER_TRIANGULAR, A11,
FLA_Cntl_sub_ttmm( cntl ) );
// A11 = A11 + A12 * A12'
FLA_Herk_internal( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE,
FLA_ONE, A12, FLA_ONE, A11,
FLA_Cntl_sub_herk( cntl ) );
// A12 = A12 * triu( A22 )'
FLA_Trmm_internal( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, FLA_NONUNIT_DIAG,
FLA_ONE, A22, A12,
FLA_Cntl_sub_trmm( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
A10, A11, /**/ A12,
/* ************** */ /* ****************** */
&ABL, /**/ &ABR, A20, A21, /**/ A22,
FLA_TL );
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_opc_var1 | ( | int | mn_A, |
| scomplex * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_cher(), bli_cscalv(), BLIS_NO_CONJUGATE, BLIS_UPPER_TRIANGULAR, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var1().
{
float* buff_1 = FLA_FLOAT_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
scomplex* A00 = buff_A + (0 )*cs_A + (0 )*rs_A;
scomplex* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
scomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
int mn_behind = i;
/*------------------------------------------------------------*/
// FLA_Her_external( FLA_UPPER_TRIANGULAR, FLA_ONE, a01, A00 );
bli_cher( BLIS_UPPER_TRIANGULAR,
BLIS_NO_CONJUGATE,
mn_behind,
buff_1,
a01, rs_A,
A00, rs_A, cs_A );
// FLA_Scal_external( alpha11, a01 );
bli_cscalv( BLIS_NO_CONJUGATE,
mn_behind,
alpha11,
a01, rs_A );
// FLA_Absolute_square( alpha11 );
bli_cabsqr( alpha11 );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_opc_var2 | ( | int | mn_A, |
| scomplex * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_cdots(), bli_cgemv(), bli_cscalv(), BLIS_CONJUGATE, BLIS_NO_CONJUGATE, BLIS_NO_TRANSPOSE, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var2().
{
scomplex* buff_1 = FLA_COMPLEX_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
scomplex* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
scomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
scomplex* A02 = buff_A + (i+1)*cs_A + (0 )*rs_A;
scomplex* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
int mn_ahead = mn_A - i - 1;
int mn_behind = i;
/*------------------------------------------------------------*/
// FLA_Scal_external( alpha11, a01 );
bli_cscalv( BLIS_NO_CONJUGATE,
mn_behind,
alpha11,
a01, rs_A );
// FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 );
bli_cgemv( BLIS_NO_TRANSPOSE,
BLIS_CONJUGATE,
mn_behind,
mn_ahead,
buff_1,
A02, rs_A, cs_A,
a12t, cs_A,
buff_1,
a01, rs_A );
// FLA_Absolute_square( alpha11 );
bli_cabsqr( alpha11 );
// FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 );
bli_cdots( BLIS_CONJUGATE,
mn_ahead,
buff_1,
a12t, cs_A,
a12t, cs_A,
buff_1,
alpha11 );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_opc_var3 | ( | int | mn_A, |
| scomplex * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_cdots(), bli_ctrmv(), BLIS_CONJ_NO_TRANSPOSE, BLIS_CONJUGATE, BLIS_NONUNIT_DIAG, BLIS_UPPER_TRIANGULAR, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var3().
{
scomplex* buff_1 = FLA_COMPLEX_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
scomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
scomplex* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
scomplex* A22 = buff_A + (i+1)*cs_A + (i+1)*rs_A;
int mn_ahead = mn_A - i - 1;
/*------------------------------------------------------------*/
// FLA_Absolute_square( alpha11 );
bli_cabsqr( alpha11 );
// FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a12t, a12t, FLA_ONE, alpha11 );
bli_cdots( BLIS_CONJUGATE,
mn_ahead,
buff_1,
a12t, cs_A,
a12t, cs_A,
buff_1,
alpha11 );
// FLA_Trmv_external( FLA_UPPER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, FLA_NONUNIT_DIAG, A22, a12t );
bli_ctrmv( BLIS_UPPER_TRIANGULAR,
BLIS_CONJ_NO_TRANSPOSE,
BLIS_NONUNIT_DIAG,
mn_ahead,
A22, rs_A, cs_A,
a12t, cs_A );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_opd_var1 | ( | int | mn_A, |
| double * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_dscalv(), bli_dsyr(), BLIS_NO_CONJUGATE, BLIS_UPPER_TRIANGULAR, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var1().
{
double* buff_1 = FLA_DOUBLE_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
double* A00 = buff_A + (0 )*cs_A + (0 )*rs_A;
double* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
double* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
int mn_behind = i;
/*------------------------------------------------------------*/
// FLA_Her_external( FLA_UPPER_TRIANGULAR, FLA_ONE, a01, A00 );
bli_dsyr( BLIS_UPPER_TRIANGULAR,
mn_behind,
buff_1,
a01, rs_A,
A00, rs_A, cs_A );
// FLA_Scal_external( alpha11, a01 );
bli_dscalv( BLIS_NO_CONJUGATE,
mn_behind,
alpha11,
a01, rs_A );
// FLA_Absolute_square( alpha11 );
bli_dabsqr( alpha11 );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_opd_var2 | ( | int | mn_A, |
| double * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_ddots(), bli_dgemv(), bli_dscalv(), BLIS_CONJUGATE, BLIS_NO_CONJUGATE, BLIS_NO_TRANSPOSE, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var2().
{
double* buff_1 = FLA_DOUBLE_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
double* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
double* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
double* A02 = buff_A + (i+1)*cs_A + (0 )*rs_A;
double* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
int mn_ahead = mn_A - i - 1;
int mn_behind = i;
/*------------------------------------------------------------*/
// FLA_Scal_external( alpha11, a01 );
bli_dscalv( BLIS_NO_CONJUGATE,
mn_behind,
alpha11,
a01, rs_A );
// FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 );
bli_dgemv( BLIS_NO_TRANSPOSE,
BLIS_CONJUGATE,
mn_behind,
mn_ahead,
buff_1,
A02, rs_A, cs_A,
a12t, cs_A,
buff_1,
a01, rs_A );
// FLA_Absolute_square( alpha11 );
bli_dabsqr( alpha11 );
// FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 );
bli_ddots( BLIS_CONJUGATE,
mn_ahead,
buff_1,
a12t, cs_A,
a12t, cs_A,
buff_1,
alpha11 );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_opd_var3 | ( | int | mn_A, |
| double * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_ddots(), bli_dtrmv(), BLIS_CONJ_NO_TRANSPOSE, BLIS_CONJUGATE, BLIS_NONUNIT_DIAG, BLIS_UPPER_TRIANGULAR, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var3().
{
double* buff_1 = FLA_DOUBLE_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
double* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
double* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
double* A22 = buff_A + (i+1)*cs_A + (i+1)*rs_A;
int mn_ahead = mn_A - i - 1;
/*------------------------------------------------------------*/
// FLA_Absolute_square( alpha11 );
bli_dabsqr( alpha11 );
// FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a12t, a12t, FLA_ONE, alpha11 );
bli_ddots( BLIS_CONJUGATE,
mn_ahead,
buff_1,
a12t, cs_A,
a12t, cs_A,
buff_1,
alpha11 );
// FLA_Trmv_external( FLA_UPPER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, FLA_NONUNIT_DIAG, A22, a12t );
bli_dtrmv( BLIS_UPPER_TRIANGULAR,
BLIS_CONJ_NO_TRANSPOSE,
BLIS_NONUNIT_DIAG,
mn_ahead,
A22, rs_A, cs_A,
a12t, cs_A );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_ops_var1 | ( | int | mn_A, |
| float * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_sscalv(), bli_ssyr(), BLIS_NO_CONJUGATE, BLIS_UPPER_TRIANGULAR, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var1().
{
float* buff_1 = FLA_FLOAT_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
float* A00 = buff_A + (0 )*cs_A + (0 )*rs_A;
float* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
float* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
int mn_behind = i;
/*------------------------------------------------------------*/
// FLA_Her_external( FLA_UPPER_TRIANGULAR, FLA_ONE, a01, A00 );
bli_ssyr( BLIS_UPPER_TRIANGULAR,
mn_behind,
buff_1,
a01, rs_A,
A00, rs_A, cs_A );
// FLA_Scal_external( alpha11, a01 );
bli_sscalv( BLIS_NO_CONJUGATE,
mn_behind,
alpha11,
a01, rs_A );
// FLA_Absolute_square( alpha11 );
bli_sabsqr( alpha11 );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_ops_var2 | ( | int | mn_A, |
| float * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_sdots(), bli_sgemv(), bli_sscalv(), BLIS_CONJUGATE, BLIS_NO_CONJUGATE, BLIS_NO_TRANSPOSE, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var2().
{
float* buff_1 = FLA_FLOAT_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
float* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
float* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
float* A02 = buff_A + (i+1)*cs_A + (0 )*rs_A;
float* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
int mn_ahead = mn_A - i - 1;
int mn_behind = i;
/*------------------------------------------------------------*/
// FLA_Scal_external( alpha11, a01 );
bli_sscalv( BLIS_NO_CONJUGATE,
mn_behind,
alpha11,
a01, rs_A );
// FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 );
bli_sgemv( BLIS_NO_TRANSPOSE,
BLIS_CONJUGATE,
mn_behind,
mn_ahead,
buff_1,
A02, rs_A, cs_A,
a12t, cs_A,
buff_1,
a01, rs_A );
// FLA_Absolute_square( alpha11 );
bli_sabsqr( alpha11 );
// FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 );
bli_sdots( BLIS_CONJUGATE,
mn_ahead,
buff_1,
a12t, cs_A,
a12t, cs_A,
buff_1,
alpha11 );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_ops_var3 | ( | int | mn_A, |
| float * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_sdots(), bli_strmv(), BLIS_CONJ_NO_TRANSPOSE, BLIS_CONJUGATE, BLIS_NONUNIT_DIAG, BLIS_UPPER_TRIANGULAR, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var3().
{
float* buff_1 = FLA_FLOAT_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
float* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
float* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
float* A22 = buff_A + (i+1)*cs_A + (i+1)*rs_A;
int mn_ahead = mn_A - i - 1;
/*------------------------------------------------------------*/
// FLA_Absolute_square( alpha11 );
bli_sabsqr( alpha11 );
// FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a12t, a12t, FLA_ONE, alpha11 );
bli_sdots( BLIS_CONJUGATE,
mn_ahead,
buff_1,
a12t, cs_A,
a12t, cs_A,
buff_1,
alpha11 );
// FLA_Trmv_external( FLA_UPPER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, FLA_NONUNIT_DIAG, A22, a12t );
bli_strmv( BLIS_UPPER_TRIANGULAR,
BLIS_CONJ_NO_TRANSPOSE,
BLIS_NONUNIT_DIAG,
mn_ahead,
A22, rs_A, cs_A,
a12t, cs_A );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
References FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Ttmm_u_opc_var1(), FLA_Ttmm_u_opd_var1(), FLA_Ttmm_u_ops_var1(), and FLA_Ttmm_u_opz_var1().
Referenced by FLA_Ttmm_u().
{
FLA_Datatype datatype;
int mn_A;
int rs_A, cs_A;
datatype = FLA_Obj_datatype( A );
mn_A = FLA_Obj_length( A );
rs_A = FLA_Obj_row_stride( A );
cs_A = FLA_Obj_col_stride( A );
switch ( datatype )
{
case FLA_FLOAT:
{
float* buff_A = FLA_FLOAT_PTR( A );
FLA_Ttmm_u_ops_var1( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_DOUBLE:
{
double* buff_A = FLA_DOUBLE_PTR( A );
FLA_Ttmm_u_opd_var1( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = FLA_COMPLEX_PTR( A );
FLA_Ttmm_u_opc_var1( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = FLA_DOUBLE_COMPLEX_PTR( A );
FLA_Ttmm_u_opz_var1( mn_A,
buff_A, rs_A, cs_A );
break;
}
}
return FLA_SUCCESS;
}
References FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Ttmm_u_opc_var2(), FLA_Ttmm_u_opd_var2(), FLA_Ttmm_u_ops_var2(), and FLA_Ttmm_u_opz_var2().
Referenced by FLA_Ttmm_u().
{
FLA_Datatype datatype;
int mn_A;
int rs_A, cs_A;
datatype = FLA_Obj_datatype( A );
mn_A = FLA_Obj_length( A );
rs_A = FLA_Obj_row_stride( A );
cs_A = FLA_Obj_col_stride( A );
switch ( datatype )
{
case FLA_FLOAT:
{
float* buff_A = FLA_FLOAT_PTR( A );
FLA_Ttmm_u_ops_var2( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_DOUBLE:
{
double* buff_A = FLA_DOUBLE_PTR( A );
FLA_Ttmm_u_opd_var2( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = FLA_COMPLEX_PTR( A );
FLA_Ttmm_u_opc_var2( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = FLA_DOUBLE_COMPLEX_PTR( A );
FLA_Ttmm_u_opz_var2( mn_A,
buff_A, rs_A, cs_A );
break;
}
}
return FLA_SUCCESS;
}
References FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Ttmm_u_opc_var3(), FLA_Ttmm_u_opd_var3(), FLA_Ttmm_u_ops_var3(), and FLA_Ttmm_u_opz_var3().
Referenced by FLA_Ttmm_u().
{
FLA_Datatype datatype;
int mn_A;
int rs_A, cs_A;
datatype = FLA_Obj_datatype( A );
mn_A = FLA_Obj_length( A );
rs_A = FLA_Obj_row_stride( A );
cs_A = FLA_Obj_col_stride( A );
switch ( datatype )
{
case FLA_FLOAT:
{
float* buff_A = FLA_FLOAT_PTR( A );
FLA_Ttmm_u_ops_var3( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_DOUBLE:
{
double* buff_A = FLA_DOUBLE_PTR( A );
FLA_Ttmm_u_opd_var3( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = FLA_COMPLEX_PTR( A );
FLA_Ttmm_u_opc_var3( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = FLA_DOUBLE_COMPLEX_PTR( A );
FLA_Ttmm_u_opz_var3( mn_A,
buff_A, rs_A, cs_A );
break;
}
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_opz_var1 | ( | int | mn_A, |
| dcomplex * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_zher(), bli_zscalv(), BLIS_NO_CONJUGATE, BLIS_UPPER_TRIANGULAR, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var1().
{
double* buff_1 = FLA_DOUBLE_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
dcomplex* A00 = buff_A + (0 )*cs_A + (0 )*rs_A;
dcomplex* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
dcomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
int mn_behind = i;
/*------------------------------------------------------------*/
// FLA_Her_external( FLA_UPPER_TRIANGULAR, FLA_ONE, a01, A00 );
bli_zher( BLIS_UPPER_TRIANGULAR,
BLIS_NO_CONJUGATE,
mn_behind,
buff_1,
a01, rs_A,
A00, rs_A, cs_A );
// FLA_Scal_external( alpha11, a01 );
bli_zscalv( BLIS_NO_CONJUGATE,
mn_behind,
alpha11,
a01, rs_A );
// FLA_Absolute_square( alpha11 );
bli_zabsqr( alpha11 );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_opz_var2 | ( | int | mn_A, |
| dcomplex * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_zdots(), bli_zgemv(), bli_zscalv(), BLIS_CONJUGATE, BLIS_NO_CONJUGATE, BLIS_NO_TRANSPOSE, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var2().
{
dcomplex* buff_1 = FLA_DOUBLE_COMPLEX_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
dcomplex* a01 = buff_A + (i )*cs_A + (0 )*rs_A;
dcomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
dcomplex* A02 = buff_A + (i+1)*cs_A + (0 )*rs_A;
dcomplex* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
int mn_ahead = mn_A - i - 1;
int mn_behind = i;
/*------------------------------------------------------------*/
// FLA_Scal_external( alpha11, a01 );
bli_zscalv( BLIS_NO_CONJUGATE,
mn_behind,
alpha11,
a01, rs_A );
// FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 );
bli_zgemv( BLIS_NO_TRANSPOSE,
BLIS_CONJUGATE,
mn_behind,
mn_ahead,
buff_1,
A02, rs_A, cs_A,
a12t, cs_A,
buff_1,
a01, rs_A );
// FLA_Absolute_square( alpha11 );
bli_zabsqr( alpha11 );
// FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 );
bli_zdots( BLIS_CONJUGATE,
mn_ahead,
buff_1,
a12t, cs_A,
a12t, cs_A,
buff_1,
alpha11 );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
| FLA_Error FLA_Ttmm_u_opz_var3 | ( | int | mn_A, |
| dcomplex * | A, | ||
| int | rs_A, | ||
| int | cs_A | ||
| ) |
References bli_zdots(), bli_ztrmv(), BLIS_CONJ_NO_TRANSPOSE, BLIS_CONJUGATE, BLIS_NONUNIT_DIAG, BLIS_UPPER_TRIANGULAR, and FLA_ONE.
Referenced by FLA_Ttmm_u_opt_var3().
{
dcomplex* buff_1 = FLA_DOUBLE_COMPLEX_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
dcomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
dcomplex* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
dcomplex* A22 = buff_A + (i+1)*cs_A + (i+1)*rs_A;
int mn_ahead = mn_A - i - 1;
/*------------------------------------------------------------*/
// FLA_Absolute_square( alpha11 );
bli_zabsqr( alpha11 );
// FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a12t, a12t, FLA_ONE, alpha11 );
bli_zdots( BLIS_CONJUGATE,
mn_ahead,
buff_1,
a12t, cs_A,
a12t, cs_A,
buff_1,
alpha11 );
// FLA_Trmv_external( FLA_UPPER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, FLA_NONUNIT_DIAG, A22, a12t );
bli_ztrmv( BLIS_UPPER_TRIANGULAR,
BLIS_CONJ_NO_TRANSPOSE,
BLIS_NONUNIT_DIAG,
mn_ahead,
A22, rs_A, cs_A,
a12t, cs_A );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
References FLA_Absolute_square(), FLA_Cont_with_3x3_to_2x2(), FLA_Her_external(), FLA_Obj_length(), FLA_ONE, FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), and FLA_Scal_external().
Referenced by FLA_Ttmm_u().
{
FLA_Obj ATL, ATR, A00, a01, A02,
ABL, ABR, a10t, alpha11, a12t,
A20, a21, A22;
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_TL );
while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) ){
FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &a01, &A02,
/* ************* */ /* ************************** */
&a10t, /**/ &alpha11, &a12t,
ABL, /**/ ABR, &A20, /**/ &a21, &A22,
1, 1, FLA_BR );
/*------------------------------------------------------------*/
// A00 = A00 + a01 * a01'
FLA_Her_external( FLA_UPPER_TRIANGULAR, FLA_ONE, a01, A00 );
// a10t = alpha11 * a01
FLA_Scal_external( alpha11, a01 );
// alpha11 = alpha11 * alpha11'
FLA_Absolute_square( alpha11 );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, a01, /**/ A02,
a10t, alpha11, /**/ a12t,
/* ************** */ /* ************************ */
&ABL, /**/ &ABR, A20, a21, /**/ A22,
FLA_TL );
}
return FLA_SUCCESS;
}
References FLA_Absolute_square(), FLA_Cont_with_3x3_to_2x2(), FLA_Dotcs_external(), FLA_Gemvc_external(), FLA_Obj_length(), FLA_ONE, FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), and FLA_Scal_external().
Referenced by FLA_Ttmm_u().
{
FLA_Obj ATL, ATR, A00, a01, A02,
ABL, ABR, a10t, alpha11, a12t,
A20, a21, A22;
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_TL );
while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) ){
FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &a01, &A02,
/* ************* */ /* ************************** */
&a10t, /**/ &alpha11, &a12t,
ABL, /**/ ABR, &A20, /**/ &a21, &A22,
1, 1, FLA_BR );
/*------------------------------------------------------------*/
// a10t = alpha11 * a01
FLA_Scal_external( alpha11, a01 );
// a01 = a01 + A02 * a12t'
FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 );
// alpha11 = alpha11 * alpha11'
FLA_Absolute_square( alpha11 );
// alpha11 = alpha11 + a12t * a12t'
FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a12t, a12t, FLA_ONE, alpha11 );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, a01, /**/ A02,
a10t, alpha11, /**/ a12t,
/* ************** */ /* ************************ */
&ABL, /**/ &ABR, A20, a21, /**/ A22,
FLA_TL );
}
return FLA_SUCCESS;
}
References FLA_Absolute_square(), FLA_Cont_with_3x3_to_2x2(), FLA_Dotcs_external(), FLA_Obj_length(), FLA_ONE, FLA_Part_2x2(), FLA_Repart_2x2_to_3x3(), and FLA_Trmv_external().
Referenced by FLA_Ttmm_u().
{
FLA_Obj ATL, ATR, A00, a01, A02,
ABL, ABR, a10t, alpha11, a12t,
A20, a21, A22;
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_TL );
while ( FLA_Obj_length( ATL ) < FLA_Obj_length( A ) ){
FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &a01, &A02,
/* ************* */ /* ************************** */
&a10t, /**/ &alpha11, &a12t,
ABL, /**/ ABR, &A20, /**/ &a21, &A22,
1, 1, FLA_BR );
/*------------------------------------------------------------*/
// alpha11 = alpha11 * alpha11'
FLA_Absolute_square( alpha11 );
// alpha11 = alpha11 + a12t * a12t'
FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a12t, a12t, FLA_ONE, alpha11 );
// a12t = a12t * triu( A22 )'
// a12t' = triu( A22 ) * a12t'
FLA_Trmv_external( FLA_UPPER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, FLA_NONUNIT_DIAG, A22, a12t );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, a01, /**/ A02,
a10t, alpha11, /**/ a12t,
/* ************** */ /* ************************ */
&ABL, /**/ &ABR, A20, a21, /**/ A22,
FLA_TL );
}
return FLA_SUCCESS;
}
1.7.6.1