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 bl1_cher(), bl1_cscalv(), BLIS1_NO_CONJUGATE, BLIS1_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 ); bl1_cher( BLIS1_UPPER_TRIANGULAR, BLIS1_NO_CONJUGATE, mn_behind, buff_1, a01, rs_A, A00, rs_A, cs_A ); // FLA_Scal_external( alpha11, a01 ); bl1_cscalv( BLIS1_NO_CONJUGATE, mn_behind, alpha11, a01, rs_A ); // FLA_Absolute_square( alpha11 ); bl1_cabsqr( alpha11 ); /*------------------------------------------------------------*/ } return FLA_SUCCESS; }
FLA_Error FLA_Ttmm_u_opc_var2 | ( | int | mn_A, |
scomplex * | A, | ||
int | rs_A, | ||
int | cs_A | ||
) |
References bl1_cdots(), bl1_cgemv(), bl1_cscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_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 ); bl1_cscalv( BLIS1_NO_CONJUGATE, mn_behind, alpha11, a01, rs_A ); // FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 ); bl1_cgemv( BLIS1_NO_TRANSPOSE, BLIS1_CONJUGATE, mn_behind, mn_ahead, buff_1, A02, rs_A, cs_A, a12t, cs_A, buff_1, a01, rs_A ); // FLA_Absolute_square( alpha11 ); bl1_cabsqr( alpha11 ); // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 ); bl1_cdots( BLIS1_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 bl1_cdots(), bl1_ctrmv(), BLIS1_CONJ_NO_TRANSPOSE, BLIS1_CONJUGATE, BLIS1_NONUNIT_DIAG, BLIS1_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 ); bl1_cabsqr( alpha11 ); // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a12t, a12t, FLA_ONE, alpha11 ); bl1_cdots( BLIS1_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 ); bl1_ctrmv( BLIS1_UPPER_TRIANGULAR, BLIS1_CONJ_NO_TRANSPOSE, BLIS1_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 bl1_dscalv(), bl1_dsyr(), BLIS1_NO_CONJUGATE, BLIS1_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 ); bl1_dsyr( BLIS1_UPPER_TRIANGULAR, mn_behind, buff_1, a01, rs_A, A00, rs_A, cs_A ); // FLA_Scal_external( alpha11, a01 ); bl1_dscalv( BLIS1_NO_CONJUGATE, mn_behind, alpha11, a01, rs_A ); // FLA_Absolute_square( alpha11 ); bl1_dabsqr( alpha11 ); /*------------------------------------------------------------*/ } return FLA_SUCCESS; }
FLA_Error FLA_Ttmm_u_opd_var2 | ( | int | mn_A, |
double * | A, | ||
int | rs_A, | ||
int | cs_A | ||
) |
References bl1_ddots(), bl1_dgemv(), bl1_dscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_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 ); bl1_dscalv( BLIS1_NO_CONJUGATE, mn_behind, alpha11, a01, rs_A ); // FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 ); bl1_dgemv( BLIS1_NO_TRANSPOSE, BLIS1_CONJUGATE, mn_behind, mn_ahead, buff_1, A02, rs_A, cs_A, a12t, cs_A, buff_1, a01, rs_A ); // FLA_Absolute_square( alpha11 ); bl1_dabsqr( alpha11 ); // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 ); bl1_ddots( BLIS1_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 bl1_ddots(), bl1_dtrmv(), BLIS1_CONJ_NO_TRANSPOSE, BLIS1_CONJUGATE, BLIS1_NONUNIT_DIAG, BLIS1_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 ); bl1_dabsqr( alpha11 ); // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a12t, a12t, FLA_ONE, alpha11 ); bl1_ddots( BLIS1_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 ); bl1_dtrmv( BLIS1_UPPER_TRIANGULAR, BLIS1_CONJ_NO_TRANSPOSE, BLIS1_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 bl1_sscalv(), bl1_ssyr(), BLIS1_NO_CONJUGATE, BLIS1_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 ); bl1_ssyr( BLIS1_UPPER_TRIANGULAR, mn_behind, buff_1, a01, rs_A, A00, rs_A, cs_A ); // FLA_Scal_external( alpha11, a01 ); bl1_sscalv( BLIS1_NO_CONJUGATE, mn_behind, alpha11, a01, rs_A ); // FLA_Absolute_square( alpha11 ); bl1_sabsqr( alpha11 ); /*------------------------------------------------------------*/ } return FLA_SUCCESS; }
FLA_Error FLA_Ttmm_u_ops_var2 | ( | int | mn_A, |
float * | A, | ||
int | rs_A, | ||
int | cs_A | ||
) |
References bl1_sdots(), bl1_sgemv(), bl1_sscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_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 ); bl1_sscalv( BLIS1_NO_CONJUGATE, mn_behind, alpha11, a01, rs_A ); // FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 ); bl1_sgemv( BLIS1_NO_TRANSPOSE, BLIS1_CONJUGATE, mn_behind, mn_ahead, buff_1, A02, rs_A, cs_A, a12t, cs_A, buff_1, a01, rs_A ); // FLA_Absolute_square( alpha11 ); bl1_sabsqr( alpha11 ); // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 ); bl1_sdots( BLIS1_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 bl1_sdots(), bl1_strmv(), BLIS1_CONJ_NO_TRANSPOSE, BLIS1_CONJUGATE, BLIS1_NONUNIT_DIAG, BLIS1_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 ); bl1_sabsqr( alpha11 ); // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a12t, a12t, FLA_ONE, alpha11 ); bl1_sdots( BLIS1_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 ); bl1_strmv( BLIS1_UPPER_TRIANGULAR, BLIS1_CONJ_NO_TRANSPOSE, BLIS1_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 bl1_zher(), bl1_zscalv(), BLIS1_NO_CONJUGATE, BLIS1_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 ); bl1_zher( BLIS1_UPPER_TRIANGULAR, BLIS1_NO_CONJUGATE, mn_behind, buff_1, a01, rs_A, A00, rs_A, cs_A ); // FLA_Scal_external( alpha11, a01 ); bl1_zscalv( BLIS1_NO_CONJUGATE, mn_behind, alpha11, a01, rs_A ); // FLA_Absolute_square( alpha11 ); bl1_zabsqr( alpha11 ); /*------------------------------------------------------------*/ } return FLA_SUCCESS; }
FLA_Error FLA_Ttmm_u_opz_var2 | ( | int | mn_A, |
dcomplex * | A, | ||
int | rs_A, | ||
int | cs_A | ||
) |
References bl1_zdots(), bl1_zgemv(), bl1_zscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, BLIS1_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 ); bl1_zscalv( BLIS1_NO_CONJUGATE, mn_behind, alpha11, a01, rs_A ); // FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, A02, a12t, FLA_ONE, a01 ); bl1_zgemv( BLIS1_NO_TRANSPOSE, BLIS1_CONJUGATE, mn_behind, mn_ahead, buff_1, A02, rs_A, cs_A, a12t, cs_A, buff_1, a01, rs_A ); // FLA_Absolute_square( alpha11 ); bl1_zabsqr( alpha11 ); // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 ); bl1_zdots( BLIS1_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 bl1_zdots(), bl1_ztrmv(), BLIS1_CONJ_NO_TRANSPOSE, BLIS1_CONJUGATE, BLIS1_NONUNIT_DIAG, BLIS1_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 ); bl1_zabsqr( alpha11 ); // FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a12t, a12t, FLA_ONE, alpha11 ); bl1_zdots( BLIS1_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 ); bl1_ztrmv( BLIS1_UPPER_TRIANGULAR, BLIS1_CONJ_NO_TRANSPOSE, BLIS1_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; }