libflame revision_anchor
Functions
FLA_Tridiag_UT_create_T.c File Reference

(r)

Functions

FLA_Error FLA_Tridiag_UT_create_T (FLA_Obj A, FLA_Obj *T)
 

Function Documentation

◆ FLA_Tridiag_UT_create_T()

FLA_Error FLA_Tridiag_UT_create_T ( FLA_Obj  A,
FLA_Obj T 
)
14{
15 FLA_Datatype datatype;
16 dim_t b_alg, k;
18
19 // Query the datatype of A.
20 datatype = FLA_Obj_datatype( A );
21
22 // Query the blocksize from the library.
24
25 // Scale the blocksize by a pre-set global constant.
26 b_alg = ( dim_t )( ( ( double ) b_alg ) * FLA_TRIDIAG_INNER_TO_OUTER_B_RATIO );
27
28 // Query the minimum dimension of A.
29 k = FLA_Obj_min_dim( A );
30
31 // Adjust the blocksize with respect to the min-dim of A.
32 b_alg = min( b_alg, k );
33
34 // Figure out whether T should be row-major or column-major.
35 if ( FLA_Obj_row_stride( A ) == 1 )
36 {
37 rs_T = 1;
38 cs_T = b_alg;
39 }
40 else // if ( FLA_Obj_col_stride( A ) == 1 )
41 {
42 rs_T = k;
43 cs_T = 1;
44 }
45
46 // Create a b_alg x k matrix to hold the block Householder transforms that
47 // will be accumulated within the tridiagonal reduction algorithm.
48 FLA_Obj_create( datatype, b_alg, k, rs_T, cs_T, T );
49
50 return FLA_SUCCESS;
51}
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
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition FLA_Query.c:153
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
int i
Definition bl1_axmyv2.c:145

References FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_min_dim(), FLA_Obj_row_stride(), FLA_Query_blocksize(), and i.

Referenced by FLA_Hevd_lv_unb_var1(), and FLA_Hevd_lv_unb_var2().