Functions | |
FLA_Error | FLA_Gemm_nn_blk_var5 (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl) |
FLA_Error FLA_Gemm_nn_blk_var5 | ( | FLA_Obj | alpha, | |
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | beta, | |||
FLA_Obj | C, | |||
fla_gemm_t * | cntl | |||
) |
References FLA_Cont_with_1x3_to_1x2(), FLA_Cont_with_3x1_to_2x1(), FLA_Determine_blocksize(), FLA_Gemm_internal(), FLA_Obj_width(), FLA_Part_1x2(), FLA_Part_2x1(), FLA_Repart_1x2_to_1x3(), and FLA_Repart_2x1_to_3x1().
Referenced by FLA_Gemm_nn().
00036 { 00037 FLA_Obj AL, AR, A0, A1, A2; 00038 00039 FLA_Obj BT, B0, 00040 BB, B1, 00041 B2; 00042 00043 dim_t b; 00044 00045 FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT ); 00046 00047 FLA_Part_2x1( B, &BT, 00048 &BB, 0, FLA_TOP ); 00049 00050 while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){ 00051 00052 b = FLA_Determine_blocksize( AR, FLA_RIGHT, FLA_Cntl_blocksize( cntl ) ); 00053 00054 FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &A1, &A2, 00055 b, FLA_RIGHT ); 00056 00057 FLA_Repart_2x1_to_3x1( BT, &B0, 00058 /* ** */ /* ** */ 00059 &B1, 00060 BB, &B2, b, FLA_BOTTOM ); 00061 00062 /*------------------------------------------------------------*/ 00063 00064 /* C = alpha * A1 * B1 + C; */ 00065 FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, 00066 alpha, A1, B1, beta, C, 00067 FLA_Cntl_sub_gemm( cntl ) ); 00068 00069 /*------------------------------------------------------------*/ 00070 00071 FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, A1, /**/ A2, 00072 FLA_LEFT ); 00073 00074 FLA_Cont_with_3x1_to_2x1( &BT, B0, 00075 B1, 00076 /* ** */ /* ** */ 00077 &BB, B2, FLA_TOP ); 00078 00079 } 00080 00081 return FLA_SUCCESS; 00082 }