libflame  revision_anchor
Functions
FLA_Copyt_n_blk_var4.c File Reference

(r)

Functions

FLA_Error FLA_Copyt_n_blk_var4 (FLA_Obj A, FLA_Obj B, fla_copyt_t *cntl)
 

Function Documentation

◆ FLA_Copyt_n_blk_var4()

FLA_Error FLA_Copyt_n_blk_var4 ( FLA_Obj  A,
FLA_Obj  B,
fla_copyt_t cntl 
)

References FLA_Cont_with_1x3_to_1x2(), FLA_Copyt_internal(), FLA_Determine_blocksize(), FLA_Obj_width(), FLA_Part_1x2(), and FLA_Repart_1x2_to_1x3().

Referenced by FLA_Copyt_n().

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_Part_1x2( A, &AL, &AR, 0, FLA_RIGHT );
22 
23  FLA_Part_1x2( B, &BL, &BR, 0, FLA_RIGHT );
24 
25  while ( FLA_Obj_width( AR ) < FLA_Obj_width( A ) ){
26 
27  b = FLA_Determine_blocksize( AL, FLA_LEFT, FLA_Cntl_blocksize( cntl ) );
28 
29  FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, &A1, /**/ &A2,
30  b, FLA_LEFT );
31 
32  FLA_Repart_1x2_to_1x3( BL, /**/ BR, &B0, &B1, /**/ &B2,
33  b, FLA_LEFT );
34 
35  /*------------------------------------------------------------*/
36 
37  FLA_Copyt_internal( FLA_NO_TRANSPOSE, A1, B1,
38  FLA_Cntl_sub_copyt( cntl ) );
39 
40  /*------------------------------------------------------------*/
41 
42  FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, /**/ A1, A2,
43  FLA_RIGHT );
44 
45  FLA_Cont_with_1x3_to_1x2( &BL, /**/ &BR, B0, /**/ B1, B2,
46  FLA_RIGHT );
47  }
48 
49  return FLA_SUCCESS;
50 }
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
FLA_Error FLA_Copyt_internal(FLA_Trans trans, FLA_Obj A, FLA_Obj B, fla_copyt_t *cntl)
Definition: FLA_Copyt_internal.c:16
unsigned long dim_t
Definition: FLA_type_defs.h:71
dim_t FLA_Determine_blocksize(FLA_Obj A_unproc, FLA_Quadrant to_dir, fla_blocksize_t *cntl_blocksizes)
Definition: FLA_Blocksize.c:234
Definition: FLA_type_defs.h:158
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
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
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