libflame  revision_anchor
Functions
FLA_Scal_vars.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLA_Scal_blk_var1 (FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
 
FLA_Error FLA_Scal_blk_var2 (FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
 
FLA_Error FLA_Scal_blk_var3 (FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
 
FLA_Error FLA_Scal_blk_var4 (FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
 

Function Documentation

◆ FLA_Scal_blk_var1()

FLA_Error FLA_Scal_blk_var1 ( FLA_Obj  alpha,
FLA_Obj  A,
fla_scal_t cntl 
)

References FLA_Cont_with_3x1_to_2x1(), FLA_Determine_blocksize(), FLA_Obj_length(), FLA_Part_2x1(), FLA_Repart_2x1_to_3x1(), and FLA_Scal_internal().

Referenced by FLA_Scal_internal().

14 {
15  FLA_Obj AT, A0,
16  AB, A1,
17  A2;
18 
19  dim_t b;
20 
21  FLA_Part_2x1( A, &AT,
22  &AB, 0, FLA_TOP );
23 
24  while ( FLA_Obj_length( AT ) < FLA_Obj_length( A ) ){
25 
26  b = FLA_Determine_blocksize( AB, FLA_BOTTOM, FLA_Cntl_blocksize( cntl ) );
27 
28  FLA_Repart_2x1_to_3x1( AT, &A0,
29  /* ** */ /* ** */
30  &A1,
31  AB, &A2, b, FLA_BOTTOM );
32 
33  /*------------------------------------------------------------*/
34 
35  FLA_Scal_internal( alpha, A1,
36  FLA_Cntl_sub_scal( cntl ) );
37 
38  /*------------------------------------------------------------*/
39 
40  FLA_Cont_with_3x1_to_2x1( &AT, A0,
41  A1,
42  /* ** */ /* ** */
43  &AB, A2, FLA_TOP );
44  }
45 
46  return FLA_SUCCESS;
47 }
FLA_Error FLA_Repart_2x1_to_3x1(FLA_Obj AT, FLA_Obj *A0, FLA_Obj *A1, FLA_Obj AB, FLA_Obj *A2, dim_t mb, FLA_Side side)
Definition: FLA_View.c:226
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
FLA_Error FLA_Cont_with_3x1_to_2x1(FLA_Obj *AT, FLA_Obj A0, FLA_Obj A1, FLA_Obj *AB, FLA_Obj A2, FLA_Side side)
Definition: FLA_View.c:428
Definition: FLA_type_defs.h:158
FLA_Error FLA_Part_2x1(FLA_Obj A, FLA_Obj *A1, FLA_Obj *A2, dim_t mb, FLA_Side side)
Definition: FLA_View.c:76
FLA_Error FLA_Scal_internal(FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
Definition: FLA_Scal_internal.c:16
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Scal_blk_var2()

FLA_Error FLA_Scal_blk_var2 ( FLA_Obj  alpha,
FLA_Obj  A,
fla_scal_t cntl 
)

References FLA_Cont_with_3x1_to_2x1(), FLA_Determine_blocksize(), FLA_Obj_length(), FLA_Part_2x1(), FLA_Repart_2x1_to_3x1(), and FLA_Scal_internal().

Referenced by FLA_Scal_internal().

14 {
15  FLA_Obj AT, A0,
16  AB, A1,
17  A2;
18 
19  dim_t b;
20 
21  FLA_Part_2x1( A, &AT,
22  &AB, 0, FLA_BOTTOM );
23 
24  while ( FLA_Obj_length( AB ) < FLA_Obj_length( A ) ){
25 
26  b = FLA_Determine_blocksize( AT, FLA_TOP, FLA_Cntl_blocksize( cntl ) );
27 
28  FLA_Repart_2x1_to_3x1( AT, &A0,
29  &A1,
30  /* ** */ /* ** */
31  AB, &A2, b, FLA_TOP );
32 
33  /*------------------------------------------------------------*/
34 
35  FLA_Scal_internal( alpha, A1,
36  FLA_Cntl_sub_scal( cntl ) );
37 
38  /*------------------------------------------------------------*/
39 
40  FLA_Cont_with_3x1_to_2x1( &AT, A0,
41  /* ** */ /* ** */
42  A1,
43  &AB, A2, FLA_BOTTOM );
44  }
45 
46  return FLA_SUCCESS;
47 }
FLA_Error FLA_Repart_2x1_to_3x1(FLA_Obj AT, FLA_Obj *A0, FLA_Obj *A1, FLA_Obj AB, FLA_Obj *A2, dim_t mb, FLA_Side side)
Definition: FLA_View.c:226
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
FLA_Error FLA_Cont_with_3x1_to_2x1(FLA_Obj *AT, FLA_Obj A0, FLA_Obj A1, FLA_Obj *AB, FLA_Obj A2, FLA_Side side)
Definition: FLA_View.c:428
Definition: FLA_type_defs.h:158
FLA_Error FLA_Part_2x1(FLA_Obj A, FLA_Obj *A1, FLA_Obj *A2, dim_t mb, FLA_Side side)
Definition: FLA_View.c:76
FLA_Error FLA_Scal_internal(FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
Definition: FLA_Scal_internal.c:16
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Scal_blk_var3()

FLA_Error FLA_Scal_blk_var3 ( FLA_Obj  alpha,
FLA_Obj  A,
fla_scal_t cntl 
)

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

Referenced by FLA_Scal_internal().

14 {
15  FLA_Obj AL, AR, A0, A1, A2;
16 
17  dim_t b;
18 
19  FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
20 
21  while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){
22 
23  b = FLA_Determine_blocksize( AR, FLA_RIGHT, FLA_Cntl_blocksize( cntl ) );
24 
25  FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &A1, &A2,
26  b, FLA_RIGHT );
27 
28  /*------------------------------------------------------------*/
29 
30  FLA_Scal_internal( alpha, A1,
31  FLA_Cntl_sub_scal( cntl ) );
32 
33  /*------------------------------------------------------------*/
34 
35  FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, A1, /**/ A2,
36  FLA_LEFT );
37  }
38 
39  return FLA_SUCCESS;
40 }
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
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
FLA_Error FLA_Scal_internal(FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
Definition: FLA_Scal_internal.c:16

◆ FLA_Scal_blk_var4()

FLA_Error FLA_Scal_blk_var4 ( FLA_Obj  alpha,
FLA_Obj  A,
fla_scal_t cntl 
)

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

Referenced by FLA_Scal_internal().

14 {
15  FLA_Obj AL, AR, A0, A1, A2;
16 
17  dim_t b;
18 
19  FLA_Part_1x2( A, &AL, &AR, 0, FLA_RIGHT );
20 
21  while ( FLA_Obj_width( AR ) < FLA_Obj_width( A ) ){
22 
23  b = FLA_Determine_blocksize( AL, FLA_LEFT, FLA_Cntl_blocksize( cntl ) );
24 
25  FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, &A1, /**/ &A2,
26  b, FLA_LEFT );
27 
28  /*------------------------------------------------------------*/
29 
30  FLA_Scal_internal( alpha, A1,
31  FLA_Cntl_sub_scal( cntl ) );
32 
33  /*------------------------------------------------------------*/
34 
35  FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, /**/ A1, A2,
36  FLA_RIGHT );
37  }
38 
39  return FLA_SUCCESS;
40 }
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
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
FLA_Error FLA_Scal_internal(FLA_Obj alpha, FLA_Obj A, fla_scal_t *cntl)
Definition: FLA_Scal_internal.c:16