libflame  revision_anchor
Functions
FLA_Gemm_nt_blk_var5.c File Reference

(r)

Functions

FLA_Error FLA_Gemm_nt_blk_var5 (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 

Function Documentation

◆ FLA_Gemm_nt_blk_var5()

FLA_Error FLA_Gemm_nt_blk_var5 ( FLA_Obj  alpha,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  beta,
FLA_Obj  C,
fla_gemm_t cntl 
)
14 {
15  FLA_Obj AL, AR, A0, A1, A2;
16 
17  FLA_Obj BL, BR, B0, B1, B2;
18 
19  dim_t b;
20 
21  FLA_Scal_internal( beta, C,
22  FLA_Cntl_sub_scal( cntl ) );
23 
24  FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
25 
26  FLA_Part_1x2( B, &BL, &BR, 0, FLA_LEFT );
27 
28  while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){
29 
30  b = FLA_Determine_blocksize( AR, FLA_RIGHT, FLA_Cntl_blocksize( cntl ) );
31 
32  FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &A1, &A2,
33  b, FLA_RIGHT );
34 
35  FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, /**/ &B1, &B2,
36  b, FLA_RIGHT );
37 
38  /*------------------------------------------------------------*/
39 
40  /* C = alpha * A1 * B1' + C; */
41  FLA_Gemm_internal( FLA_NO_TRANSPOSE, FLA_TRANSPOSE,
42  alpha, A1, B1, FLA_ONE, C,
43  FLA_Cntl_sub_gemm( cntl ) );
44 
45  /*------------------------------------------------------------*/
46 
47  FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, A1, /**/ A2,
48  FLA_LEFT );
49 
50  FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, B1, /**/ B2,
51  FLA_LEFT );
52 
53  }
54 
55  return FLA_SUCCESS;
56 }
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)
Definition: FLA_Gemm_internal.c:16
FLA_Error FLA_Scal_internal(FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
Definition: FLA_Scal_internal.c:16
FLA_Obj FLA_ONE
Definition: FLA_Init.c:18
FLA_Error FLA_Cont_with_1x3_to_1x2(FLA_Obj *AL, FLA_Obj *AR, FLA_Obj A0, FLA_Obj A1, FLA_Obj A2, FLA_Side side)
Definition: FLA_View.c:475
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Part_1x2(FLA_Obj A, FLA_Obj *A1, FLA_Obj *A2, dim_t nb, FLA_Side side)
Definition: FLA_View.c:110
FLA_Error FLA_Repart_1x2_to_1x3(FLA_Obj AL, FLA_Obj AR, FLA_Obj *A0, FLA_Obj *A1, FLA_Obj *A2, dim_t nb, FLA_Side side)
Definition: FLA_View.c:267
dim_t FLA_Determine_blocksize(FLA_Obj A_unproc, FLA_Quadrant to_dir, fla_blocksize_t *cntl_blocksizes)
Definition: FLA_Blocksize.c:234
unsigned long dim_t
Definition: FLA_type_defs.h:71
Definition: FLA_type_defs.h:159

References FLA_Cont_with_1x3_to_1x2(), FLA_Determine_blocksize(), FLA_Gemm_internal(), FLA_Obj_width(), FLA_ONE, FLA_Part_1x2(), FLA_Repart_1x2_to_1x3(), and FLA_Scal_internal().

Referenced by FLA_Gemm_nt().