Functions | |
FLA_Error | FLA_Gemm_nn_blk_var1 (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_var1 | ( | FLA_Obj | alpha, | |
FLA_Obj | A, | |||
FLA_Obj | B, | |||
FLA_Obj | beta, | |||
FLA_Obj | C, | |||
fla_gemm_t * | cntl | |||
) |
References FLA_Cont_with_3x1_to_2x1(), FLA_Determine_blocksize(), FLA_Gemm_internal(), FLA_Obj_length(), FLA_Part_2x1(), and FLA_Repart_2x1_to_3x1().
Referenced by FLA_Gemm_nn().
00036 { 00037 FLA_Obj AT, A0, 00038 AB, A1, 00039 A2; 00040 00041 FLA_Obj CT, C0, 00042 CB, C1, 00043 C2; 00044 00045 dim_t b; 00046 00047 FLA_Part_2x1( A, &AT, 00048 &AB, 0, FLA_TOP ); 00049 00050 FLA_Part_2x1( C, &CT, 00051 &CB, 0, FLA_TOP ); 00052 00053 while ( FLA_Obj_length( AT ) < FLA_Obj_length( A ) ){ 00054 00055 b = FLA_Determine_blocksize( AB, FLA_BOTTOM, FLA_Cntl_blocksize( cntl ) ); 00056 00057 FLA_Repart_2x1_to_3x1( AT, &A0, 00058 /* ** */ /* ** */ 00059 &A1, 00060 AB, &A2, b, FLA_BOTTOM ); 00061 00062 FLA_Repart_2x1_to_3x1( CT, &C0, 00063 /* ** */ /* ** */ 00064 &C1, 00065 CB, &C2, b, FLA_BOTTOM ); 00066 00067 /*------------------------------------------------------------*/ 00068 00069 /* C1 = alpha * A1 * B + C1; */ 00070 FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, 00071 alpha, A1, B, beta, C1, 00072 FLA_Cntl_sub_gemm( cntl ) ); 00073 00074 /*------------------------------------------------------------*/ 00075 00076 FLA_Cont_with_3x1_to_2x1( &AT, A0, 00077 A1, 00078 /* ** */ /* ** */ 00079 &AB, A2, FLA_TOP ); 00080 00081 FLA_Cont_with_3x1_to_2x1( &CT, C0, 00082 C1, 00083 /* ** */ /* ** */ 00084 &CB, C2, FLA_TOP ); 00085 00086 } 00087 00088 return FLA_SUCCESS; 00089 }