libflame  revision_anchor
Functions
FLASH_QR_UT_create_hier_matrices.c File Reference

(r)

Functions

FLA_Error FLASH_QR_UT_create_hier_matrices (FLA_Obj A_flat, dim_t depth, dim_t *b_flash, FLA_Obj *A, FLA_Obj *TW)
 

Function Documentation

◆ FLASH_QR_UT_create_hier_matrices()

FLA_Error FLASH_QR_UT_create_hier_matrices ( FLA_Obj  A_flat,
dim_t  depth,
dim_t b_flash,
FLA_Obj A,
FLA_Obj TW 
)
14 {
15  FLA_Datatype datatype;
16  dim_t m, n;
17  dim_t min_m_n;
18 
19  // *** The current QR_UT algorithm implemented assumes that
20  // the matrix has a hierarchical depth of 1. We check for that here
21  // because we anticipate that we'll use a more general algorithm in the
22  // future, and we don't want to forget to remove the constraint. ***
23  if ( depth != 1 )
24  {
25  FLA_Print_message( "FLASH_QR_UT() currently only supports matrices of depth 1",
26  __FILE__, __LINE__ );
27  FLA_Abort();
28  }
29 
30  // Create hierarchical copy of matrix A_flat.
31  FLASH_Obj_create_hier_copy_of_flat( A_flat, depth, b_flash, A );
32 
33  // Query the datatype of matrix A_flat.
34  datatype = FLA_Obj_datatype( A_flat );
35 
36  // Query the minimum dimension of A_flat.
37  min_m_n = FLA_Obj_min_dim( A_flat );
38 
39  // Set the m and n dimensions of TW to be min_m_n.
40  m = min_m_n;
41  n = min_m_n;
42 
43  // Create hierarchical matrices T and W.
44  FLASH_Obj_create_ext( datatype, m, n,
45  depth, b_flash, b_flash,
46  TW );
47 
48  return FLA_SUCCESS;
49 }
FLA_Error FLASH_Obj_create_ext(FLA_Datatype datatype, dim_t m, dim_t n, dim_t depth, dim_t *b_m, dim_t *b_n, FLA_Obj *H)
Definition: FLASH_Obj.c:151
FLA_Error FLASH_Obj_create_hier_copy_of_flat(FLA_Obj F, dim_t depth, dim_t *b_mn, FLA_Obj *H)
Definition: FLASH_Obj.c:591
void FLA_Abort(void)
Definition: FLA_Error.c:248
void FLA_Print_message(char *str, char *file, int line)
Definition: FLA_Error.c:234
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

References FLA_Abort(), FLA_Obj_datatype(), FLA_Obj_min_dim(), FLA_Print_message(), FLASH_Obj_create_ext(), and FLASH_Obj_create_hier_copy_of_flat().