libflame  revision_anchor
Functions
FLA_UDdate_UT_create_T.c File Reference

(r)

Functions

FLA_Error FLA_UDdate_UT_create_T (FLA_Obj R, FLA_Obj *T)
 

Function Documentation

◆ FLA_UDdate_UT_create_T()

FLA_Error FLA_UDdate_UT_create_T ( FLA_Obj  R,
FLA_Obj T 
)
14 {
15  FLA_Datatype datatype;
16  dim_t b_alg, k;
17  dim_t rs_T, cs_T;
18 
19  // Query the datatype of R.
20  datatype = FLA_Obj_datatype( R );
21 
22  // Query the blocksize from the library.
23  b_alg = FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
24 
25  // We want the width of R, which is the same as that of C and D. Also,
26  // R should be square, so we could grab either dimension.
27  k = FLA_Obj_width( R );
28 
29  // Figure out whether T should be row-major or column-major.
30  if ( FLA_Obj_row_stride( R ) == 1 )
31  {
32  rs_T = 1;
33  cs_T = b_alg;
34  }
35  else // if ( FLA_Obj_col_stride( R ) == 1 )
36  {
37  rs_T = k;
38  cs_T = 1;
39  }
40 
41  // Create a b_alg x k matrix to hold the block Householder transforms that
42  // will be accumulated within the UDdate operation algorithm.
43  FLA_Obj_create( datatype, b_alg, k, rs_T, cs_T, T );
44 
45  return FLA_SUCCESS;
46 }
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Obj_create(FLA_Datatype datatype, dim_t m, dim_t n, dim_t rs, dim_t cs, FLA_Obj *obj)
Definition: FLA_Obj.c:55
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition: FLA_Query.c:167
dim_t FLA_Query_blocksize(FLA_Datatype dt, FLA_Dimension dim)
Definition: FLA_Blocksize.c:161
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
int FLA_Datatype
Definition: FLA_type_defs.h:49
unsigned long dim_t
Definition: FLA_type_defs.h:71

References FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_row_stride(), FLA_Obj_width(), and FLA_Query_blocksize().