本文整理汇总了C++中FLA_Gemm_internal函数的典型用法代码示例。如果您正苦于以下问题:C++ FLA_Gemm_internal函数的具体用法?C++ FLA_Gemm_internal怎么用?C++ FLA_Gemm_internal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FLA_Gemm_internal函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: FLA_Gemm_tn_blk_var6
FLA_Error FLA_Gemm_tn_blk_var6( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t* cntl )
{
FLA_Obj AT, A0,
AB, A1,
A2;
FLA_Obj BT, B0,
BB, B1,
B2;
dim_t b;
FLA_Scal_internal( beta, C,
FLA_Cntl_sub_scal( cntl ) );
FLA_Part_2x1( A, &AT,
&AB, 0, FLA_BOTTOM );
FLA_Part_2x1( B, &BT,
&BB, 0, FLA_BOTTOM );
while ( FLA_Obj_length( AB ) < FLA_Obj_length( A ) ){
b = FLA_Determine_blocksize( AT, FLA_TOP, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_2x1_to_3x1( AT, &A0,
&A1,
/* ** */ /* ** */
AB, &A2, b, FLA_TOP );
FLA_Repart_2x1_to_3x1( BT, &B0,
&B1,
/* ** */ /* ** */
BB, &B2, b, FLA_TOP );
/*------------------------------------------------------------*/
/* C = alpha * A1' * B1 + C; */
FLA_Gemm_internal( FLA_TRANSPOSE, FLA_NO_TRANSPOSE,
alpha, A1, B1, FLA_ONE, C,
FLA_Cntl_sub_gemm( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_3x1_to_2x1( &AT, A0,
/* ** */ /* ** */
A1,
&AB, A2, FLA_BOTTOM );
FLA_Cont_with_3x1_to_2x1( &BT, B0,
/* ** */ /* ** */
B1,
&BB, B2, FLA_BOTTOM );
}
return FLA_SUCCESS;
}
开发者ID:pgawron,项目名称:tlash,代码行数:58,代码来源:FLA_Gemm_tn_blk_var6.c
示例2: FLA_Trmm_rlt_blk_var2
FLA_Error FLA_Trmm_rlt_blk_var2( FLA_Diag diagA, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t* cntl )
{
FLA_Obj ATL, ATR, A00, A01, A02,
ABL, ABR, A10, A11, A12,
A20, A21, A22;
FLA_Obj BL, BR, B0, B1, B2;
dim_t b;
FLA_Scal_internal( alpha, B,
FLA_Cntl_sub_scal( cntl ) );
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_BR );
FLA_Part_1x2( B, &BL, &BR, 0, FLA_RIGHT );
while ( FLA_Obj_length( ABR ) < FLA_Obj_length( A ) ){
b = FLA_Determine_blocksize( ATL, FLA_TL, 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_TL );
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, &B1, /**/ &B2,
b, FLA_LEFT );
/*------------------------------------------------------------*/
/* B2 = B2 + B1 * A21'; */
FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_TRANSPOSE,
FLA_ONE, B1, A21, FLA_ONE, B2,
FLA_Cntl_sub_gemm( cntl ) );
/* B1 = B1 * tril( A11 )'; */
FLA_Trmm_internal( FLA_RIGHT, FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, diagA,
FLA_ONE, A11, B1,
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_BR );
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, /**/ B1, B2,
FLA_RIGHT );
}
return FLA_SUCCESS;
}
开发者ID:anaptyxis,项目名称:libflame,代码行数:58,代码来源:FLA_Trmm_rlt_blk_var2.c
示例3: FLA_Sylv_nn_blk_var17
FLA_Error FLA_Sylv_nn_blk_var17( FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale, fla_sylv_t* cntl )
{
FLA_Obj BTL, BTR, B00, B01, B02,
BBL, BBR, B10, B11, B12,
B20, B21, B22;
FLA_Obj CL, CR, C0, C1, C2;
dim_t b;
FLA_Part_2x2( B, &BTL, &BTR,
&BBL, &BBR, 0, 0, FLA_TL );
FLA_Part_1x2( C, &CL, &CR, 0, FLA_LEFT );
while ( FLA_Obj_length( BTL ) < FLA_Obj_length( B ) ){
b = FLA_Determine_blocksize( CR, FLA_RIGHT, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_2x2_to_3x3( BTL, /**/ BTR, &B00, /**/ &B01, &B02,
/* ************* */ /* ******************** */
&B10, /**/ &B11, &B12,
BBL, /**/ BBR, &B20, /**/ &B21, &B22,
b, b, FLA_BR );
FLA_Repart_1x2_to_1x3( CL, /**/ CR, &C0, /**/ &C1, &C2,
b, FLA_RIGHT );
// Loop Invariant:
// CL =
// CR =
/*------------------------------------------------------------*/
// C1 = sylv( A, B11, C1 -/+ C0 * B01 );
FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE,
FLA_NEGATE( isgn ), C0, B01, FLA_ONE, C1,
FLA_Cntl_sub_gemm1( cntl ) );
FLA_Sylv_internal( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE,
isgn, A, B11, C1, scale,
FLA_Cntl_sub_sylv1( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &BTL, /**/ &BTR, B00, B01, /**/ B02,
B10, B11, /**/ B12,
/* ************** */ /* ****************** */
&BBL, /**/ &BBR, B20, B21, /**/ B22,
FLA_TL );
FLA_Cont_with_1x3_to_1x2( &CL, /**/ &CR, C0, C1, /**/ C2,
FLA_LEFT );
}
return FLA_SUCCESS;
}
开发者ID:anaptyxis,项目名称:libflame,代码行数:57,代码来源:FLA_Sylv_nn_blk_var17.c
示例4: FLA_Gemm_ct_blk_var1
FLA_Error FLA_Gemm_ct_blk_var1( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t* cntl )
{
FLA_Obj AT, A0,
AB, A1,
A2;
FLA_Obj CT, C0,
CB, C1,
C2;
dim_t b;
FLA_Part_2x1( A, &AT,
&AB, 0, FLA_TOP );
FLA_Part_2x1( C, &CT,
&CB, 0, FLA_TOP );
while ( FLA_Obj_length( AT ) < FLA_Obj_length( A ) ){
b = FLA_Determine_blocksize( AB, FLA_BOTTOM, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_2x1_to_3x1( AT, &A0,
/* ** */ /* ** */
&A1,
AB, &A2, b, FLA_BOTTOM );
FLA_Repart_2x1_to_3x1( CT, &C0,
/* ** */ /* ** */
&C1,
CB, &C2, b, FLA_BOTTOM );
/*------------------------------------------------------------*/
/* C1 = alpha * A1 * B' + C1; */
FLA_Gemm_internal( FLA_CONJ_NO_TRANSPOSE, FLA_TRANSPOSE,
alpha, A1, B, beta, C1,
FLA_Cntl_sub_gemm( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_3x1_to_2x1( &AT, A0,
A1,
/* ** */ /* ** */
&AB, A2, FLA_TOP );
FLA_Cont_with_3x1_to_2x1( &CT, C0,
C1,
/* ** */ /* ** */
&CB, C2, FLA_TOP );
}
return FLA_SUCCESS;
}
开发者ID:pgawron,项目名称:tlash,代码行数:55,代码来源:FLA_Gemm_ct_blk_var1.c
示例5: FLA_Syrk_ut_blk_var1
FLA_Error FLA_Syrk_ut_blk_var1( FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_syrk_t* cntl )
{
FLA_Obj AL, AR, A0, A1, A2;
FLA_Obj CTL, CTR, C00, C01, C02,
CBL, CBR, C10, C11, C12,
C20, C21, C22;
dim_t b;
FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
FLA_Part_2x2( C, &CTL, &CTR,
&CBL, &CBR, 0, 0, FLA_TL );
while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){
b = FLA_Determine_blocksize( AR, FLA_RIGHT, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &A1, &A2,
b, FLA_RIGHT );
FLA_Repart_2x2_to_3x3( CTL, /**/ CTR, &C00, /**/ &C01, &C02,
/* ************* */ /* ******************** */
&C10, /**/ &C11, &C12,
CBL, /**/ CBR, &C20, /**/ &C21, &C22,
b, b, FLA_BR );
/*------------------------------------------------------------*/
/* C12 = C12 + A1' * A2 */
FLA_Gemm_internal( FLA_TRANSPOSE, FLA_NO_TRANSPOSE,
alpha, A1, A2, beta, C12,
FLA_Cntl_sub_gemm( cntl ) );
/* C11 = C11 + A1' * A1 */
FLA_Syrk_internal( FLA_UPPER_TRIANGULAR, FLA_TRANSPOSE,
alpha, A1, beta, C11,
FLA_Cntl_sub_syrk( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, A1, /**/ A2,
FLA_LEFT );
FLA_Cont_with_3x3_to_2x2( &CTL, /**/ &CTR, C00, C01, /**/ C02,
C10, C11, /**/ C12,
/* ************** */ /* ****************** */
&CBL, /**/ &CBR, C20, C21, /**/ C22,
FLA_TL );
}
return FLA_SUCCESS;
}
开发者ID:anaptyxis,项目名称:libflame,代码行数:55,代码来源:FLA_Syrk_ut_blk_var1.c
示例6: FLA_Trinv_uu_blk_var3
FLA_Error FLA_Trinv_uu_blk_var3( FLA_Obj A, fla_trinv_t* cntl )
{
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 );
/*------------------------------------------------------------*/
// A12 = -triuu( A11 ) \ A12;
FLA_Trsm_internal( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, FLA_NONUNIT_DIAG,
FLA_MINUS_ONE, A11, A12,
FLA_Cntl_sub_trsm1( cntl ) );
// A02 = A01 * A12 + A02;
FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE,
FLA_ONE, A01, A12, FLA_ONE, A02,
FLA_Cntl_sub_gemm( cntl ) );
// A01 = A01 / triuu( A11 );
FLA_Trsm_internal( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, FLA_NONUNIT_DIAG,
FLA_ONE, A11, A01,
FLA_Cntl_sub_trsm2( cntl ) );
// A11 = inv( A11 );
FLA_Trinv_internal( FLA_UPPER_TRIANGULAR, FLA_NONUNIT_DIAG, A11,
FLA_Cntl_sub_trinv( 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;
}
开发者ID:fmarrabal,项目名称:libflame,代码行数:54,代码来源:FLA_Trinv_uu_blk_var3.c
示例7: FLA_Gemm_tt_blk_var5
FLA_Error FLA_Gemm_tt_blk_var5( FLA_Obj alpha, FLA_Obj A , FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t* cntl )
{
FLA_Obj AT, A0,
AB, A1,
A2;
FLA_Obj BL, BR, B0, B1, B2;
dim_t b;
FLA_Scal_internal( beta, C,
FLA_Cntl_sub_scal( cntl ) );
FLA_Part_2x1( A, &AT,
&AB, 0, FLA_TOP );
FLA_Part_1x2( B, &BL, &BR, 0, FLA_LEFT );
while ( FLA_Obj_length( AT ) < FLA_Obj_length( A ) ){
b = FLA_Determine_blocksize( AB, FLA_BOTTOM, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_2x1_to_3x1( AT, &A0,
/* ** */ /* ** */
&A1,
AB, &A2, b, FLA_BOTTOM );
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, /**/ &B1, &B2,
b, FLA_RIGHT );
/*------------------------------------------------------------*/
/* C = alpha * A1' * B1' + C; */
FLA_Gemm_internal( FLA_TRANSPOSE, FLA_TRANSPOSE,
alpha, A1, B1, FLA_ONE, C,
FLA_Cntl_sub_gemm( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_3x1_to_2x1( &AT, A0,
A1,
/* ** */ /* ** */
&AB, A2, FLA_TOP );
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, B1, /**/ B2,
FLA_LEFT );
}
return FLA_SUCCESS;
}
开发者ID:pgawron,项目名称:tlash,代码行数:51,代码来源:FLA_Gemm_tt_blk_var5.c
示例8: FLA_Gemm_cn_blk_var5
FLA_Error FLA_Gemm_cn_blk_var5( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t* cntl )
{
FLA_Obj AL, AR, A0, A1, A2;
FLA_Obj BT, B0,
BB, B1,
B2;
dim_t b;
FLA_Scal_internal( beta, C,
FLA_Cntl_sub_scal( cntl ) );
FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
FLA_Part_2x1( B, &BT,
&BB, 0, FLA_TOP );
while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){
b = FLA_Determine_blocksize( AR, FLA_RIGHT, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &A1, &A2,
b, FLA_RIGHT );
FLA_Repart_2x1_to_3x1( BT, &B0,
/* ** */ /* ** */
&B1,
BB, &B2, b, FLA_BOTTOM );
/*------------------------------------------------------------*/
/* C = alpha * A1 * B1 + C; */
FLA_Gemm_internal( FLA_CONJ_NO_TRANSPOSE, FLA_NO_TRANSPOSE,
alpha, A1, B1, FLA_ONE, C,
FLA_Cntl_sub_gemm( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, A1, /**/ A2,
FLA_LEFT );
FLA_Cont_with_3x1_to_2x1( &BT, B0,
B1,
/* ** */ /* ** */
&BB, B2, FLA_TOP );
}
return FLA_SUCCESS;
}
开发者ID:anaptyxis,项目名称:libflame,代码行数:51,代码来源:FLA_Gemm_cn_blk_var5.c
示例9: FLA_Gemm_hh_blk_var3
FLA_Error FLA_Gemm_hh_blk_var3( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t* cntl )
{
FLA_Obj BT, B0,
BB, B1,
B2;
FLA_Obj CL, CR, C0, C1, C2;
dim_t b;
FLA_Part_2x1( B, &BT,
&BB, 0, FLA_TOP );
FLA_Part_1x2( C, &CL, &CR, 0, FLA_LEFT );
while ( FLA_Obj_length( BT ) < FLA_Obj_length( B ) ){
b = FLA_Determine_blocksize( BB, FLA_BOTTOM, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_2x1_to_3x1( BT, &B0,
/* ** */ /* ** */
&B1,
BB, &B2, b, FLA_BOTTOM );
FLA_Repart_1x2_to_1x3( CL, /**/ CR, &C0, /**/ &C1, &C2,
b, FLA_RIGHT );
/*------------------------------------------------------------*/
/* C1 = alpha * A' * B1' + C1; */
FLA_Gemm_internal( FLA_CONJ_TRANSPOSE, FLA_CONJ_TRANSPOSE,
alpha, A, B1, beta, C1,
FLA_Cntl_sub_gemm( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_3x1_to_2x1( &BT, B0,
B1,
/* ** */ /* ** */
&BB, B2, FLA_TOP );
FLA_Cont_with_1x3_to_1x2( &CL, /**/ &CR, C0, C1, /**/ C2,
FLA_LEFT );
}
return FLA_SUCCESS;
}
开发者ID:pgawron,项目名称:tlash,代码行数:48,代码来源:FLA_Gemm_hh_blk_var3.c
示例10: FLA_Gemm_hn_blk_var2
FLA_Error FLA_Gemm_hn_blk_var2( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t* cntl )
{
FLA_Obj AL, AR, A0, A1, A2;
FLA_Obj CT, C0,
CB, C1,
C2;
dim_t b;
FLA_Part_1x2( A, &AL, &AR, 0, FLA_RIGHT );
FLA_Part_2x1( C, &CT,
&CB, 0, FLA_BOTTOM );
while ( FLA_Obj_width( AR ) < FLA_Obj_width( A ) ){
b = FLA_Determine_blocksize( AL, FLA_LEFT, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, &A1, /**/ &A2,
b, FLA_LEFT );
FLA_Repart_2x1_to_3x1( CT, &C0,
&C1,
/* ** */ /* ** */
CB, &C2, b, FLA_TOP );
/*------------------------------------------------------------*/
/* C1 = alpha * A1' * B + C1; */
FLA_Gemm_internal( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE,
alpha, A1, B, beta, C1,
FLA_Cntl_sub_gemm( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, /**/ A1, A2,
FLA_RIGHT );
FLA_Cont_with_3x1_to_2x1( &CT, C0,
/* ** */ /* ** */
C1,
&CB, C2, FLA_BOTTOM );
}
return FLA_SUCCESS;
}
开发者ID:anaptyxis,项目名称:libflame,代码行数:48,代码来源:FLA_Gemm_hn_blk_var2.c
示例11: FLA_Gemm
FLA_Error FLA_Gemm( FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C )
{
FLA_Error r_val = FLA_SUCCESS;
// Check parameters.
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Gemm_check( transa, transb, alpha, A, B, beta, C );
#ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
r_val = FLA_Gemm_internal( transa, transb, alpha, A, B, beta, C, fla_gemm_cntl_mm_op );
#else
r_val = FLA_Gemm_external( transa, transb, alpha, A, B, beta, C );
#endif
return r_val;
}
开发者ID:pgawron,项目名称:tlash,代码行数:16,代码来源:FLA_Gemm.c
示例12: FLA_Gemm_nt_blk_var6
FLA_Error FLA_Gemm_nt_blk_var6( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t* cntl )
{
FLA_Obj AL, AR, A0, A1, A2;
FLA_Obj BL, BR, B0, B1, B2;
dim_t b;
FLA_Scal_internal( beta, C,
FLA_Cntl_sub_scal( cntl ) );
FLA_Part_1x2( A, &AL, &AR, 0, FLA_RIGHT );
FLA_Part_1x2( B, &BL, &BR, 0, FLA_RIGHT );
while ( FLA_Obj_width( AR ) < FLA_Obj_width( A ) ){
b = FLA_Determine_blocksize( AL, FLA_LEFT, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, &A1, /**/ &A2,
b, FLA_LEFT );
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, &B1, /**/ &B2,
b, FLA_LEFT );
/*------------------------------------------------------------*/
/* C = alpha * A1 * B1' + C; */
FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_TRANSPOSE,
alpha, A1, B1, FLA_ONE, C,
FLA_Cntl_sub_gemm( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, /**/ A1, A2,
FLA_RIGHT );
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, /**/ B1, B2,
FLA_RIGHT );
}
return FLA_SUCCESS;
}
开发者ID:pgawron,项目名称:tlash,代码行数:44,代码来源:FLA_Gemm_nt_blk_var6.c
示例13: FLA_Gemm_tc_blk_var4
FLA_Error FLA_Gemm_tc_blk_var4( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t* cntl )
{
FLA_Obj BL, BR, B0, B1, B2;
FLA_Obj CL, CR, C0, C1, C2;
dim_t b;
FLA_Part_1x2( B, &BL, &BR, 0, FLA_RIGHT );
FLA_Part_1x2( C, &CL, &CR, 0, FLA_RIGHT );
while ( FLA_Obj_width( BR ) < FLA_Obj_width( B ) ){
b = FLA_Determine_blocksize( BL, FLA_LEFT, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, &B1, /**/ &B2,
b, FLA_LEFT );
FLA_Repart_1x2_to_1x3( CL, /**/ CR, &C0, &C1, /**/ &C2,
b, FLA_LEFT );
/*------------------------------------------------------------*/
/* C1 = alpha * A' * B1 + C1; */
FLA_Gemm_internal( FLA_TRANSPOSE, FLA_CONJ_NO_TRANSPOSE,
alpha, A, B1, beta, C1,
FLA_Cntl_sub_gemm( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, /**/ B1, B2,
FLA_RIGHT );
FLA_Cont_with_1x3_to_1x2( &CL, /**/ &CR, C0, /**/ C1, C2,
FLA_RIGHT );
}
return FLA_SUCCESS;
}
开发者ID:anaptyxis,项目名称:libflame,代码行数:41,代码来源:FLA_Gemm_tc_blk_var4.c
示例14: FLA_Hemm_lu_blk_var3
FLA_Error FLA_Hemm_lu_blk_var3( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_hemm_t* cntl )
{
FLA_Obj ATL, ATR, A00, A01, A02,
ABL, ABR, A10, A11, A12,
A20, A21, A22;
FLA_Obj BT, B0,
BB, B1,
B2;
FLA_Obj CT, C0,
CB, C1,
C2;
dim_t b;
FLA_Scal_internal( beta, C,
FLA_Cntl_sub_scal( cntl ) );
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_TL );
FLA_Part_2x1( B, &BT,
&BB, 0, FLA_TOP );
FLA_Part_2x1( C, &CT,
&CB, 0, FLA_TOP );
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 );
FLA_Repart_2x1_to_3x1( BT, &B0,
/* ** */ /* ** */
&B1,
BB, &B2, b, FLA_BOTTOM );
FLA_Repart_2x1_to_3x1( CT, &C0,
/* ** */ /* ** */
&C1,
CB, &C2, b, FLA_BOTTOM );
/*------------------------------------------------------------*/
/* C1 = C1 + A11 * B1 */
FLA_Hemm_internal( FLA_LEFT, FLA_UPPER_TRIANGULAR,
alpha, A11, B1, FLA_ONE, C1,
FLA_Cntl_sub_hemm( cntl ) );
/* C1 = C1 + A12 * B2 */
FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE,
alpha, A12, B2, FLA_ONE, C1,
FLA_Cntl_sub_gemm1( cntl ) );
/* C2 = C2 + A12' * B1 */
FLA_Gemm_internal( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE,
alpha, A12, B1, FLA_ONE, C2,
FLA_Cntl_sub_gemm2( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
A10, A11, /**/ A12,
/* ************** */ /* ****************** */
&ABL, /**/ &ABR, A20, A21, /**/ A22,
FLA_TL );
FLA_Cont_with_3x1_to_2x1( &BT, B0,
B1,
/* ** */ /* ** */
&BB, B2, FLA_TOP );
FLA_Cont_with_3x1_to_2x1( &CT, C0,
C1,
/* ** */ /* ** */
&CB, C2, FLA_TOP );
}
return FLA_SUCCESS;
}
开发者ID:pgawron,项目名称:tlash,代码行数:87,代码来源:FLA_Hemm_lu_blk_var3.c
示例15: FLA_Her2k_uh_blk_var7
FLA_Error FLA_Her2k_uh_blk_var7( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_her2k_t* cntl )
{
FLA_Obj AL, AR, A0, A1, A2;
FLA_Obj BL, BR, B0, B1, B2;
FLA_Obj CTL, CTR, C00, C01, C02,
CBL, CBR, C10, C11, C12,
C20, C21, C22;
dim_t b;
FLA_Scalr_internal( FLA_UPPER_TRIANGULAR, beta, C,
FLA_Cntl_sub_scalr( cntl ) );
FLA_Part_1x2( A, &AL, &AR, 0, FLA_RIGHT );
FLA_Part_1x2( B, &BL, &BR, 0, FLA_RIGHT );
FLA_Part_2x2( C, &CTL, &CTR,
&CBL, &CBR, 0, 0, FLA_BR );
while ( FLA_Obj_width( AR ) < FLA_Obj_width( A ) ){
b = FLA_Determine_blocksize( AL, FLA_LEFT, FLA_Cntl_blocksize( cntl ) );
FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, &A1, /**/ &A2,
b, FLA_LEFT );
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, &B1, /**/ &B2,
b, FLA_LEFT );
FLA_Repart_2x2_to_3x3( CTL, /**/ CTR, &C00, &C01, /**/ &C02,
&C10, &C11, /**/ &C12,
/* ************* */ /* ******************** */
CBL, /**/ CBR, &C20, &C21, /**/ &C22,
b, b, FLA_TL );
/*------------------------------------------------------------*/
/* C01 = C01 + B0' * A1 */
FLA_Gemm_internal( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE,
alpha, B0, A1, FLA_ONE, C01,
FLA_Cntl_sub_gemm1( cntl ) );
/* C12 = C12 + A1' * B2 */
FLA_Gemm_internal( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE,
alpha, A1, B2, FLA_ONE, C12,
FLA_Cntl_sub_gemm2( cntl ) );
/* C11 = C11 + A1' * B1 + B1' * A1 */
FLA_Her2k_internal( FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE,
alpha, A1, B1, FLA_ONE, C11,
FLA_Cntl_sub_her2k( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, /**/ A1, A2,
FLA_RIGHT );
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, /**/ B1, B2,
FLA_RIGHT );
FLA_Cont_with_3x3_to_2x2( &CTL, /**/ &CTR, C00, /**/ C01, C02,
/* ************** */ /* ****************** */
C10, /**/ C11, C12,
&CBL, /**/ &CBR, C20, /**/ C21, C22,
FLA_BR );
}
return FLA_SUCCESS;
}
开发者ID:anaptyxis,项目名称:libflame,代码行数:73,代码来源:FLA_Her2k_uh_blk_var7.c
示例16: FLA_Trmm_llt_blk_var1
FLA_Error FLA_Trmm_llt_blk_var1( FLA_Diag diagA, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t* cntl )
{
FLA_Obj ATL, ATR, A00, A01, A02,
ABL, ABR, A10, A11, A12,
A20, A21, A22;
FLA_Obj BT, B0,
BB, B1,
B2;
dim_t b;
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_TL );
FLA_Part_2x1( B, &BT,
&BB, 0, FLA_TOP );
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 );
FLA_Repart_2x1_to_3x1( BT, &B0,
/* ** */ /* ** */
&B1,
BB, &B2, b, FLA_BOTTOM );
/*------------------------------------------------------------*/
/* B1 = tril( A11 )' * B1; */
FLA_Trmm_internal( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, diagA,
alpha, A11, B1,
FLA_Cntl_sub_trmm( cntl ) );
/* B1 = B1 + A21' * B2; */
FLA_Gemm_internal( FLA_TRANSPOSE, FLA_NO_TRANSPOSE,
alpha, A21, B2, FLA_ONE, B1,
FLA_Cntl_sub_gemm( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
A10, A11, /**/ A12,
/* ************** */ /* ****************** */
&ABL, /**/ &ABR, A20, A21, /**/ A22,
FLA_TL );
FLA_Cont_with_3x1_to_2x1( &BT, B0,
B1,
/* ** */ /* ** */
&BB, B2, FLA_TOP );
}
return FLA_SUCCESS;
}
开发者ID:anaptyxis,项目名称:libflame,代码行数:62,代码来源:FLA_Trmm_llt_blk_var1.c
示例17: FLA_Apply_QUD_UT_lhfc_blk_var1
FLA_Error FLA_Apply_QUD_UT_lhfc_blk_var1( FLA_Obj T, FLA_Obj W,
FLA_Obj R,
FLA_Obj U, FLA_Obj C,
FLA_Obj V, FLA_Obj D, fla_apqudut_t* cntl )
{
FLA_Obj TL, TR, T0, T1, T2;
FLA_Obj UL, UR, U0, U1, U2;
FLA_Obj VL, VR, V0, V1, V2;
FLA_Obj RT, R0,
RB, R1,
R2;
FLA_Obj T1T,
T1B;
FLA_Obj W1TL, W1TR,
W1BL, W1BR;
dim_t b_alg, b;
// Query the algorithmic blocksize by inspecting the length of T.
b_alg = FLA_Obj_length( T );
FLA_Part_1x2( T, &TL, &TR, 0, FLA_LEFT );
FLA_Part_1x2( U, &UL, &UR, 0, FLA_LEFT );
FLA_Part_1x2( V, &VL, &VR, 0, FLA_LEFT );
FLA_Part_2x1( R, &RT,
&RB, 0, FLA_TOP );
while ( FLA_Obj_width( UL ) < FLA_Obj_width( U ) ){
b = min( b_alg, FLA_Obj_width( UR ) );
FLA_Repart_1x2_to_1x3( TL, /**/ TR, &T0, /**/ &T1, &T2,
b, FLA_RIGHT );
FLA_Repart_1x2_to_1x3( UL, /**/ UR, &U0, /**/ &U1, &U2,
b, FLA_RIGHT );
FLA_Repart_1x2_to_1x3( VL, /**/ VR, &V0, /**/ &V1, &V2,
b, FLA_RIGHT );
FLA_Repart_2x1_to_3x1( RT, &R0,
/* ** */ /* ** */
&R1,
RB, &R2, b, FLA_BOTTOM );
/*------------------------------------------------------------*/
FLA_Part_2x1( T1, &T1T,
&T1B, b, FLA_TOP );
FLA_Part_2x2( W, &W1TL, &W1TR,
&W1BL, &W1BR, b, FLA_Obj_width( R1 ), FLA_TL );
// W1TL = R1;
FLA_Copyt_internal( FLA_NO_TRANSPOSE, R1, W1TL,
FLA_Cntl_sub_copyt( cntl ) );
// W1TL = inv( triu( T1T ) )' * ( R1 + U1' * C + V1' * D );
FLA_Gemm_internal( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE,
FLA_ONE, U1, C, FLA_ONE, W1TL,
FLA_Cntl_sub_gemm1( cntl ) );
FLA_Gemm_internal( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE,
FLA_ONE, V1, D, FLA_ONE, W1TL,
FLA_Cntl_sub_gemm2( cntl ) );
FLA_Trsm_internal( FLA_LEFT, FLA_UPPER_TRIANGULAR,
FLA_CONJ_TRANSPOSE, FLA_NONUNIT_DIAG,
FLA_ONE, T1T, W1TL,
FLA_Cntl_sub_trsm( cntl ) );
// R1 = R1 - W1TL;
// C = C - U1 * W1TL;
// D = D + V1 * W1TL;
FLA_Axpyt_internal( FLA_NO_TRANSPOSE, FLA_MINUS_ONE, W1TL, R1,
FLA_Cntl_sub_axpyt( cntl ) );
FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE,
FLA_MINUS_ONE, U1, W1TL, FLA_ONE, C,
FLA_Cntl_sub_gemm3( cntl ) );
FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE,
FLA_ONE, V1, W1TL, FLA_ONE, D,
FLA_Cntl_sub_gemm4( cntl ) );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &TL, /**/ &TR, T0, T1, /**/ T2,
FLA_LEFT );
//.........这里部分代码省略.........
开发者ID:anaptyxis,项目名称:libflame,代码行数:101,代码来源:FLA_Apply_QUD_UT_lhfc_blk_var1.c
示例18: FLA_Gemm_internal
FLA_Error FLA_Gemm_internal( FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t* cntl )
{
FLA_Error r_val = FLA_SUCCESS;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Gemm_internal_check( transa, transb, alpha, A, B, beta, C, cntl );
if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
(FLA_Obj_elemtype( A ) == FLA_TENSOR || FLA_Obj_elemtype( A ) == FLA_MATRIX) &&
FLA_Cntl_variant( cntl ) == FLA_SUBPROBLEM )
{
// Recurse
r_val = FLA_Gemm_internal( transa,
transb,
alpha,
*FLASH_OBJ_PTR_AT( A ),
*FLASH_OBJ_PTR_AT( B ),
beta,
*FLASH_OBJ_PTR_AT( C ),
flash_gemm_cntl_mm_op );
}
else if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
FLA_Obj_elemtype( A ) == FLA_SCALAR &&
FLASH_Queue_get_enabled( ) )
{
// Enqueue
ENQUEUE_FLASH_Gemm( transa, transb, alpha, A, B, beta, C, cntl );
}
else
{
if ( FLA_Cntl_matrix_type( cntl ) == FLA_HIER &&
FLA_Obj_elemtype( A ) == FLA_SCALAR &&
!FLASH_Queue_get_enabled( ) )
{
// Execute leaf
cntl = flash_gemm_cntl_blas;
}
// Parameter combinations
if ( transa == FLA_NO_TRANSPOSE )
{
if ( transb == FLA_NO_TRANSPOSE )
r_val = FLA_Gemm_nn( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_TRANSPOSE )
r_val = FLA_Gemm_nt( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_CONJ_NO_TRANSPOSE )
r_val = FLA_Gemm_nc( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_CONJ_TRANSPOSE )
r_val = FLA_Gemm_nh( alpha, A, B, beta, C, cntl );
}
else if ( transa == FLA_TRANSPOSE )
{
if ( transb == FLA_NO_TRANSPOSE )
r_val = FLA_Gemm_tn( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_TRANSPOSE )
r_val = FLA_Gemm_tt( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_CONJ_NO_TRANSPOSE )
r_val = FLA_Gemm_tc( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_CONJ_TRANSPOSE )
r_val = FLA_Gemm_th( alpha, A, B, beta, C, cntl );
}
else if ( transa == FLA_CONJ_NO_TRANSPOSE )
{
if ( transb == FLA_NO_TRANSPOSE )
r_val = FLA_Gemm_cn( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_TRANSPOSE )
r_val = FLA_Gemm_ct( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_CONJ_NO_TRANSPOSE )
r_val = FLA_Gemm_cc( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_CONJ_TRANSPOSE )
r_val = FLA_Gemm_ch( alpha, A, B, beta, C, cntl );
}
else if ( transa == FLA_CONJ_TRANSPOSE )
{
if ( transb == FLA_NO_TRANSPOSE )
r_val = FLA_Gemm_hn( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_TRANSPOSE )
r_val = FLA_Gemm_ht( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_CONJ_NO_TRANSPOSE )
r_val = FLA_Gemm_hc( alpha, A, B, beta, C, cntl );
else if ( transb == FLA_CONJ_TRANSPOSE )
r_val = FLA_Gemm_hh( alpha, A, B, beta, C, cntl );
}
}
return r_val;
}
开发者ID:pgawron,项目名称:tlash,代码行数:87,代码来源:FLA_Gemm_internal.c
示例19: FLA_Sylv_nn_blk_var8
-
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:18311|2023-10-27
-
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9694|2022-11-06
-
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8191|2022-11-06
-
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8557|2022-11-06
-
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8467|2022-11-06
-
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9408|2022-11-06
-
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8441|2022-11-06
-
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:7873|2022-11-06
-
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8425|2022-11-06
-
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7402|2022-11-06
|
请发表评论