libflame revision_anchor
Functions
FLA_Hess_UT_create_T.c File Reference

(r)

Functions

FLA_Error FLA_Hess_UT_create_T (FLA_Obj A, FLA_Obj *T)
 

Function Documentation

◆ FLA_Hess_UT_create_T()

FLA_Error FLA_Hess_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_HESS_INNER_TO_OUTER_B_RATIO );
27
28 // Query the minimum dimension of A.
29 k = FLA_Obj_min_dim( A );
30
31 // Figure out whether T should be row-major or column-major.
32 if ( FLA_Obj_row_stride( A ) == 1 )
33 {
34 rs_T = 1;
35 cs_T = b_alg;
36 }
37 else // if ( FLA_Obj_col_stride( A ) == 1 )
38 {
39 rs_T = k;
40 cs_T = 1;
41 }
42
43 // Create a b_alg x k matrix to hold the block Householder transforms that
44 // will be accumulated within the Hessenberg reduction algorithm.
45 FLA_Obj_create( datatype, b_alg, k, rs_T, cs_T, T );
46
47 return FLA_SUCCESS;
48}
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.