本文整理汇总了C++中FLA_Scal_external函数的典型用法代码示例。如果您正苦于以下问题:C++ FLA_Scal_external函数的具体用法?C++ FLA_Scal_external怎么用?C++ FLA_Scal_external使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FLA_Scal_external函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FLA_Trmm_ruh_unb_var4
FLA_Error FLA_Trmm_ruh_unb_var4( FLA_Diag diagA, FLA_Obj alpha, FLA_Obj A, FLA_Obj B )
{
FLA_Obj BT, B0,
BB, b1t,
B2;
FLA_Scal_external( alpha, B );
FLA_Part_2x1( B, &BT,
&BB, 0, FLA_BOTTOM );
while ( FLA_Obj_length( BB ) < FLA_Obj_length( B ) ){
FLA_Repart_2x1_to_3x1( BT, &B0,
&b1t,
/* ** */ /* *** */
BB, &B2, 1, FLA_TOP );
/*------------------------------------------------------------*/
/* b1t = b1t * triu( A )'; */
FLA_Trmv_external( FLA_UPPER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, diagA, A, b1t );
/*------------------------------------------------------------*/
FLA_Cont_with_3x1_to_2x1( &BT, B0,
/* ** */ /* *** */
b1t,
&BB, B2, FLA_BOTTOM );
}
return FLA_SUCCESS;
}
示例2: FLA_Trsm_rlh_unb_var3
FLA_Error FLA_Trsm_rlh_unb_var3( FLA_Diag diagA, FLA_Obj alpha, FLA_Obj A, FLA_Obj B )
{
FLA_Obj BT, B0,
BB, b1t,
B2;
FLA_Scal_external( alpha, B );
FLA_Part_2x1( B, &BT,
&BB, 0, FLA_TOP );
while ( FLA_Obj_length( BT ) < FLA_Obj_length( B ) ){
FLA_Repart_2x1_to_3x1( BT, &B0,
/* ** */ /* *** */
&b1t,
BB, &B2, 1, FLA_BOTTOM );
/*------------------------------------------------------------*/
/* b1t = b1t / tril( A' ); */
FLA_Trsv_external( FLA_LOWER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, diagA, A, b1t );
/*------------------------------------------------------------*/
FLA_Cont_with_3x1_to_2x1( &BT, B0,
b1t,
/* ** */ /* *** */
&BB, B2, FLA_TOP );
}
return FLA_SUCCESS;
}
示例3: FLA_Trsm_luh_unb_var3
FLA_Error FLA_Trsm_luh_unb_var3( FLA_Diag diagA, FLA_Obj alpha, FLA_Obj A, FLA_Obj B )
{
FLA_Obj BL, BR, B0, b1, B2;
FLA_Scal_external( alpha, B );
FLA_Part_1x2( B, &BL, &BR, 0, FLA_LEFT );
while ( FLA_Obj_width( BL ) < FLA_Obj_width( B ) ){
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, /**/ &b1, &B2,
1, FLA_RIGHT );
/*------------------------------------------------------------*/
/* b1 = triu( A' ) \ b1 */
FLA_Trsv_external( FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, diagA, A, b1 );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, b1, /**/ B2,
FLA_LEFT );
}
return FLA_SUCCESS;
}
示例4: FLA_Trmm_llt_unb_var4
FLA_Error FLA_Trmm_llt_unb_var4( FLA_Diag diagA, FLA_Obj alpha, FLA_Obj A, FLA_Obj B )
{
FLA_Obj BL, BR, B0, b1, B2;
FLA_Scal_external( alpha, B );
FLA_Part_1x2( B, &BL, &BR, 0, FLA_RIGHT );
while ( FLA_Obj_width( BR ) < FLA_Obj_width( B ) ){
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, &b1, /**/ &B2,
1, FLA_LEFT );
/*------------------------------------------------------------*/
/* b1 = tril( A )' * b1 */
FLA_Trmv_external( FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, diagA, A, b1 );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, /**/ b1, B2,
FLA_RIGHT );
}
return FLA_SUCCESS;
}
示例5: FLA_Trsm_luc_unb_var1
FLA_Error FLA_Trsm_luc_unb_var1( FLA_Diag diagA, FLA_Obj alpha, FLA_Obj A, FLA_Obj B )
{
FLA_Obj ATL, ATR, A00, a01, A02,
ABL, ABR, a10t, alpha11, a12t,
A20, a21, A22;
FLA_Obj BT, B0,
BB, b1t,
B2;
FLA_Scal_external( alpha, B );
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_BR );
FLA_Part_2x1( B, &BT,
&BB, 0, FLA_BOTTOM );
while ( FLA_Obj_length( ABR ) < 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_TL );
FLA_Repart_2x1_to_3x1( BT, &B0,
&b1t,
/* ** */ /* *** */
BB, &B2, 1, FLA_TOP );
/*------------------------------------------------------------*/
/* b1t = b1t - a12t * B2; */
FLA_Gemvc_external( FLA_TRANSPOSE, FLA_CONJUGATE, FLA_MINUS_ONE, B2, a12t, FLA_ONE, b1t );
/* b1t = b1t / alpha11; */
if ( diagA != FLA_UNIT_DIAG )
FLA_Inv_scalc_external( FLA_CONJUGATE, alpha11, b1t );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, /**/ a01, A02,
/* ************** */ /* ************************ */
a10t, /**/ alpha11, a12t,
&ABL, /**/ &ABR, A20, /**/ a21, A22,
FLA_BR );
FLA_Cont_with_3x1_to_2x1( &BT, B0,
/* ** */ /* *** */
b1t,
&BB, B2, FLA_BOTTOM );
}
return FLA_SUCCESS;
}
示例6: FLA_Gemm_nh_unb_var1
FLA_Error FLA_Gemm_nh_unb_var1( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C )
{
FLA_Obj AT, A0,
AB, a1t,
A2;
FLA_Obj CT, C0,
CB, c1t,
C2;
FLA_Scal_external( beta, C );
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 ) ){
FLA_Repart_2x1_to_3x1( AT, &A0,
/* ** */ /* *** */
&a1t,
AB, &A2, 1, FLA_BOTTOM );
FLA_Repart_2x1_to_3x1( CT, &C0,
/* ** */ /* *** */
&c1t,
CB, &C2, 1, FLA_BOTTOM );
/*------------------------------------------------------------*/
/* c1t = a1t * B' + c1t */
/* c1t' = B * a1t' + c1t' */
FLA_Gemv_external( FLA_CONJ_NO_TRANSPOSE, alpha, B, a1t, FLA_ONE, c1t );
/*------------------------------------------------------------*/
FLA_Cont_with_3x1_to_2x1( &AT, A0,
a1t,
/* ** */ /* *** */
&AB, A2, FLA_TOP );
FLA_Cont_with_3x1_to_2x1( &CT, C0,
c1t,
/* ** */ /* *** */
&CB, C2, FLA_TOP );
}
return FLA_SUCCESS;
}
示例7: FLA_Gemm_tn_unb_var5
FLA_Error FLA_Gemm_tn_unb_var5( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C )
{
FLA_Obj AT, A0,
AB, a1t,
A2;
FLA_Obj BT, B0,
BB, b1t,
B2;
FLA_Scal_external( beta, C );
FLA_Part_2x1( A, &AT,
&AB, 0, FLA_TOP );
FLA_Part_2x1( B, &BT,
&BB, 0, FLA_TOP );
while ( FLA_Obj_length( AT ) < FLA_Obj_length( A ) ){
FLA_Repart_2x1_to_3x1( AT, &A0,
/* ** */ /* *** */
&a1t,
AB, &A2, 1, FLA_BOTTOM );
FLA_Repart_2x1_to_3x1( BT, &B0,
/* ** */ /* *** */
&b1t,
BB, &B2, 1, FLA_BOTTOM );
/*------------------------------------------------------------*/
/* C = a1t' * b1t + C */
FLA_Ger_external( alpha, a1t, b1t, C );
/*------------------------------------------------------------*/
FLA_Cont_with_3x1_to_2x1( &AT, A0,
a1t,
/* ** */ /* *** */
&AB, A2, FLA_TOP );
FLA_Cont_with_3x1_to_2x1( &BT, B0,
b1t,
/* ** */ /* *** */
&BB, B2, FLA_TOP );
}
return FLA_SUCCESS;
}
示例8: FLA_Trmm_ruh_unb_var1
FLA_Error FLA_Trmm_ruh_unb_var1( FLA_Diag diagA, FLA_Obj alpha, FLA_Obj A, FLA_Obj B )
{
FLA_Obj ATL, ATR, A00, a01, A02,
ABL, ABR, a10t, alpha11, a12t,
A20, a21, A22;
FLA_Obj BL, BR, B0, b1, B2;
FLA_Scal_external( alpha, B );
FLA_Part_2x2( A, &ATL, &ATR,
&ABL, &ABR, 0, 0, FLA_TL );
FLA_Part_1x2( B, &BL, &BR, 0, FLA_LEFT );
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 );
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, /**/ &b1, &B2,
1, FLA_RIGHT );
/*------------------------------------------------------------*/
/* b1 = b1 * alpha11; */
if ( diagA != FLA_UNIT_DIAG )
FLA_Scalc_external( FLA_CONJUGATE, alpha11, b1 );
/* b1 = b1 + B2 * a12t'; */
FLA_Gemvc_external( FLA_NO_TRANSPOSE, FLA_CONJUGATE, FLA_ONE, B2, a12t, FLA_ONE, b1 );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, a01, /**/ A02,
a10t, alpha11, /**/ a12t,
/* ************** */ /* ************************ */
&ABL, /**/ &ABR, A20, a21, /**/ A22,
FLA_TL );
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, b1, /**/ B2,
FLA_LEFT );
}
return FLA_SUCCESS;
}
示例9: FLA_Trsm_ruh_unb_var2
FLA_Error FLA_Trsm_ruh_unb_var2( FLA_Diag diagA, FLA_Obj alpha, FLA_Obj A, FLA_Obj B )
{
FLA_Obj ATL, ATR, A00, a01, A02,
ABL, ABR, a10t, alpha11, a12t,
A20, a21, A22;
FLA_Obj BL, BR, B0, b1, B2;
FLA_Scal_external( alpha, B );
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 ) ){
FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, &a01, /**/ &A02,
&a10t, &alpha11, /**/ &a12t,
/* ************* */ /* ************************** */
ABL, /**/ ABR, &A20, &a21, /**/ &A22,
1, 1, FLA_TL );
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, &b1, /**/ &B2,
1, FLA_LEFT );
/*------------------------------------------------------------*/
/* b1 = b1 / alpha11'; */
if ( diagA != FLA_UNIT_DIAG )
FLA_Inv_scalc_external( FLA_CONJUGATE, alpha11, b1 );
/* B0 = B0 - b1 * a01'; */
FLA_Gerc_external( FLA_NO_CONJUGATE, FLA_CONJUGATE, FLA_MINUS_ONE, b1, a01, B0 );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, /**/ a01, A02,
/* ************** */ /* ************************ */
a10t, /**/ alpha11, a12t,
&ABL, /**/ &ABR, A20, /**/ a21, A22,
FLA_BR );
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, /**/ b1, B2,
FLA_RIGHT );
}
return FLA_SUCCESS;
}
示例10: FLA_Gemm_nt_unb_var3
FLA_Error FLA_Gemm_nt_unb_var3( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C )
{
FLA_Obj BT, B0,
BB, b1t,
B2;
FLA_Obj CL, CR, C0, c1, C2;
FLA_Scal_external( beta, C );
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 ) ){
FLA_Repart_2x1_to_3x1( BT, &B0,
/* ** */ /* *** */
&b1t,
BB, &B2, 1, FLA_BOTTOM );
FLA_Repart_1x2_to_1x3( CL, /**/ CR, &C0, /**/ &c1, &C2,
1, FLA_RIGHT );
/*------------------------------------------------------------*/
/* c1 = A * b1t + c1 */
FLA_Gemv_external( FLA_NO_TRANSPOSE, alpha, A, b1t, FLA_ONE, c1 );
/*------------------------------------------------------------*/
FLA_Cont_with_3x1_to_2x1( &BT, B0,
b1t,
/* ** */ /* *** */
&BB, B2, FLA_TOP );
FLA_Cont_with_1x3_to_1x2( &CL, /**/ &CR, C0, c1, /**/ C2,
FLA_LEFT );
}
return FLA_SUCCESS;
}
示例11: FLA_Gemm_hh_unb_var1
FLA_Error FLA_Gemm_hh_unb_var1( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C )
{
FLA_Obj AL, AR, A0, a1, A2;
FLA_Obj CT, C0,
CB, c1t,
C2;
FLA_Scal_external( beta, C );
FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
FLA_Part_2x1( C, &CT,
&CB, 0, FLA_TOP );
while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){
FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &a1, &A2,
1, FLA_RIGHT );
FLA_Repart_2x1_to_3x1( CT, &C0,
/* ** */ /* *** */
&c1t,
CB, &C2, 1, FLA_BOTTOM );
/*------------------------------------------------------------*/
/* c1t = a1' * B' + c1t */
/* c1t' = B * a1 + c1t' */
FLA_Gemvc_external( FLA_CONJ_NO_TRANSPOSE, FLA_CONJUGATE, alpha, B, a1, FLA_ONE, c1t );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, a1, /**/ A2,
FLA_LEFT );
FLA_Cont_with_3x1_to_2x1( &CT, C0,
c1t,
/* ** */ /* *** */
&CB, C2, FLA_TOP );
}
return FLA_SUCCESS;
}
示例12: FLA_Gemm_tt_unb_var5
FLA_Error FLA_Gemm_tt_unb_var5( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C )
{
FLA_Obj AT, A0,
AB, a1t,
A2;
FLA_Obj BL, BR, B0, b1, B2;
FLA_Scal_external( beta, C );
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 ) ){
FLA_Repart_2x1_to_3x1( AT, &A0,
/* ** */ /* *** */
&a1t,
AB, &A2, 1, FLA_BOTTOM );
FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, /**/ &b1, &B2,
1, FLA_RIGHT );
/*------------------------------------------------------------*/
/* C = a1t' * b1' + C */
FLA_Ger_external( alpha, a1t, b1, C );
/*------------------------------------------------------------*/
FLA_Cont_with_3x1_to_2x1( &AT, A0,
a1t,
/* ** */ /* *** */
&AB, A2, FLA_TOP );
FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, b1, /**/ B2,
FLA_LEFT );
}
return FLA_SUCCESS;
}
示例13: FLA_Gemm_nc_unb_var5
FLA_Error FLA_Gemm_nc_unb_var5( FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C )
{
FLA_Obj AL, AR, A0, a1, A2;
FLA_Obj BT, B0,
BB, b1t,
B2;
FLA_Scal_external( beta, C );
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 ) ){
FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &a1, &A2,
1, FLA_RIGHT );
FLA_Repart_2x1_to_3x1( BT, &B0,
/* ** */ /* *** */
&b1t,
BB, &B2, 1, FLA_BOTTOM );
/*------------------------------------------------------------*/
/* C = a1 * b1t + C */
FLA_Gerc_external( FLA_NO_CONJUGATE, FLA_CONJUGATE, alpha, a1, b1t, C );
/*------------------------------------------------------------*/
FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, a1, /**/ A2,
FLA_LEFT );
FLA_Cont_with_3x1_to_2x1( &BT, B0,
b1t,
/* ** */ /* *** */
&BB, B2, FLA_TOP );
}
return FLA_SUCCESS;
}
示例14: FLA_Trinv_ln_unb_var3
FLA_Error FLA_Trinv_ln_unb_var3( FLA_Obj A )
{
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 );
/*------------------------------------------------------------*/
// a21 = -a21 / alpha11;
FLA_Scal_external( FLA_MINUS_ONE, a21 );
FLA_Inv_scal_external( alpha11, a21 );
// A20 = a21 * a10t + A20;
FLA_Ger_external( FLA_ONE, a21, a10t, A20 );
// a10t = a10t / alpha11;
FLA_Inv_scal_external( alpha11, a10t );
// alpha11 = 1.0 / alpha11;
FLA_Invert( FLA_NO_CONJUGATE, 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;
}
示例15: FLA_Trinv_lu_unb_var4
FLA_Error FLA_Trinv_lu_unb_var4( FLA_Obj A )
{
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 );
/*------------------------------------------------------------*/
// a21 = -trilu( A22 ) \ a21;
FLA_Scal_external( FLA_MINUS_ONE, a21 );
FLA_Trsv_external( FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE, FLA_UNIT_DIAG, A22, a21 );
// A20 = -a21 * a10t + A20;
FLA_Ger_external( FLA_MINUS_ONE, a21, a10t, A20 );
// a10t' = trilu( A00' ) * a10t';
FLA_Trmv_external( FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, FLA_UNIT_DIAG, A00, a10t );
/*------------------------------------------------------------*/
FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, a01, /**/ A02,
a10t, alpha11, /**/ a12t,
/* ************** */ /* ************************ */
&ABL, /**/ &ABR, A20, a21, /**/ A22,
FLA_TL );
}
return FLA_SUCCESS;
}