libflame  revision_anchor
Functions
FLA_Copyr_u_blk_var1.c File Reference

(r)

Functions

FLA_Error FLA_Copyr_u_blk_var1 (FLA_Obj A, FLA_Obj B, fla_copyr_t *cntl)
 

Function Documentation

◆ FLA_Copyr_u_blk_var1()

FLA_Error FLA_Copyr_u_blk_var1 ( FLA_Obj  A,
FLA_Obj  B,
fla_copyr_t cntl 
)
14 {
15  FLA_Obj ATL, ATR, A00, A01, A02,
16  ABL, ABR, A10, A11, A12,
17  A20, A21, A22;
18 
19  FLA_Obj BTL, BTR, B00, B01, B02,
20  BBL, BBR, B10, B11, B12,
21  B20, B21, B22;
22 
23  dim_t b;
24 
25  FLA_Part_2x2( A, &ATL, &ATR,
26  &ABL, &ABR, 0, 0, FLA_TL );
27 
28  FLA_Part_2x2( B, &BTL, &BTR,
29  &BBL, &BBR, 0, 0, FLA_TL );
30 
31  while ( FLA_Obj_min_dim( ABR ) > 0 ){
32 
33  b = FLA_Determine_blocksize( ABR, FLA_BR, FLA_Cntl_blocksize( cntl ) );
34 
35  FLA_Repart_2x2_to_3x3( ATL, /**/ ATR, &A00, /**/ &A01, &A02,
36  /* ************* */ /* ******************** */
37  &A10, /**/ &A11, &A12,
38  ABL, /**/ ABR, &A20, /**/ &A21, &A22,
39  b, b, FLA_BR );
40 
41  FLA_Repart_2x2_to_3x3( BTL, /**/ BTR, &B00, /**/ &B01, &B02,
42  /* ************* */ /* ******************** */
43  &B10, /**/ &B11, &B12,
44  BBL, /**/ BBR, &B20, /**/ &B21, &B22,
45  b, b, FLA_BR );
46 
47  /*------------------------------------------------------------*/
48 
49  // B11 = triu( A11 );
50  FLA_Copyr_internal( FLA_UPPER_TRIANGULAR, A11, B11,
51  FLA_Cntl_sub_copyr( cntl ) );
52 
53  // B12 = A12;
54  FLA_Copy_internal( A12, B12,
55  FLA_Cntl_sub_copy( cntl ) );
56 
57  /*------------------------------------------------------------*/
58 
59  FLA_Cont_with_3x3_to_2x2( &ATL, /**/ &ATR, A00, A01, /**/ A02,
60  A10, A11, /**/ A12,
61  /* ************** */ /* ****************** */
62  &ABL, /**/ &ABR, A20, A21, /**/ A22,
63  FLA_TL );
64 
65  FLA_Cont_with_3x3_to_2x2( &BTL, /**/ &BTR, B00, B01, /**/ B02,
66  B10, B11, /**/ B12,
67  /* ************** */ /* ****************** */
68  &BBL, /**/ &BBR, B20, B21, /**/ B22,
69  FLA_TL );
70  }
71 
72  return FLA_SUCCESS;
73 }
FLA_Error FLA_Copy_internal(FLA_Obj A, FLA_Obj B, fla_copy_t *cntl)
Definition: FLA_Copy_internal.c:16
FLA_Error FLA_Copyr_internal(FLA_Uplo uplo, FLA_Obj A, FLA_Obj B, fla_copyr_t *cntl)
Definition: FLA_Copyr_internal.c:16
FLA_Error FLA_Cont_with_3x3_to_2x2(FLA_Obj *ATL, FLA_Obj *ATR, FLA_Obj A00, FLA_Obj A01, FLA_Obj A02, FLA_Obj A10, FLA_Obj A11, FLA_Obj A12, FLA_Obj *ABL, FLA_Obj *ABR, FLA_Obj A20, FLA_Obj A21, FLA_Obj A22, FLA_Quadrant quadrant)
Definition: FLA_View.c:304
FLA_Error FLA_Part_2x2(FLA_Obj A, FLA_Obj *A11, FLA_Obj *A12, FLA_Obj *A21, FLA_Obj *A22, dim_t mb, dim_t nb, FLA_Quadrant quadrant)
Definition: FLA_View.c:17
FLA_Error FLA_Repart_2x2_to_3x3(FLA_Obj ATL, FLA_Obj ATR, FLA_Obj *A00, FLA_Obj *A01, FLA_Obj *A02, FLA_Obj *A10, FLA_Obj *A11, FLA_Obj *A12, FLA_Obj ABL, FLA_Obj ABR, FLA_Obj *A20, FLA_Obj *A21, FLA_Obj *A22, dim_t mb, dim_t nb, FLA_Quadrant quadrant)
Definition: FLA_View.c:142
dim_t FLA_Determine_blocksize(FLA_Obj A_unproc, FLA_Quadrant to_dir, fla_blocksize_t *cntl_blocksizes)
Definition: FLA_Blocksize.c:234
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153
unsigned long dim_t
Definition: FLA_type_defs.h:71
Definition: FLA_type_defs.h:159

References FLA_Cont_with_3x3_to_2x2(), FLA_Copy_internal(), FLA_Copyr_internal(), FLA_Determine_blocksize(), FLA_Obj_min_dim(), FLA_Part_2x2(), and FLA_Repart_2x2_to_3x3().

Referenced by FLA_Copyr_u().