libflame revision_anchor
FLASH_QR_UT.c File Reference

(r)

Functions

FLA_Error FLASH_QR_UT (FLA_Obj A, FLA_Obj TW)
 

Variables

fla_qrut_t * flash_qrut_cntl
 
fla_qrut_t * fla_qrut_cntl_leaf
 

Function Documentation

◆ FLASH_QR_UT()

FLA_Error FLASH_QR_UT ( FLA_Obj A,
FLA_Obj TW )
17{
18 FLA_Error r_val;
19 dim_t b_alg, b_flash;
20
21 // Check parameters.
22 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
23 FLA_QR_UT_check( A, TW );
24
25 // *** The current hierarchical QR_UT algorithm assumes that the matrix
26 // has a hierarchical depth of 1. We check for that here, because we
27 // anticipate that we'll use a more general algorithm in the future, and
28 // we don't want to forget to remove the constraint. ***
29 if ( FLASH_Obj_depth( A ) != 1 )
30 {
31 FLA_Print_message( "FLASH_QR_UT() currently only supports matrices of depth 1",
32 __FILE__, __LINE__ );
33 FLA_Abort();
34 }
35
36 // Inspect the length of TTL to get the blocksize used by the QR
37 // factorization, which will be our inner blocksize for Apply_Q_UT.
38 b_alg = FLASH_Obj_scalar_length_tl( TW );
39 b_flash = FLASH_Obj_scalar_width_tl( TW );
40
41 // The traditional (non-incremental) QR_UT algorithm-by-blocks requires
42 // that the algorithmic blocksize be equal to the storage blocksize.
43 if ( b_alg != b_flash )
44 {
45 FLA_Print_message( "FLASH_QR_UT() requires that b_alg == b_store",
46 __FILE__, __LINE__ );
47 FLA_Abort();
48 }
49
50 // The traditional (non-incremental) QR_UT algorithm-by-blocks requires
51 // that min_dim(A) % b_flash == 0.
52 if ( FLASH_Obj_scalar_min_dim( A ) % b_flash != 0 )
53 {
54 FLA_Print_message( "FLASH_QR_UT() requires that min_dim( A ) %% b_store == 0",
55 __FILE__, __LINE__ );
56 FLA_Abort();
57 }
58
59 // Begin a parallel region.
61
62 // Invoke FLA_QR_UT_internal() with hierarchical control tree.
63 r_val = FLA_QR_UT_internal( A, TW, flash_qrut_cntl );
64
65 // End the parallel region.
67
68 return r_val;
69}
fla_qrut_t * flash_qrut_cntl
Definition FLASH_QR_UT_cntl_init.c:16
void FLASH_Queue_begin(void)
Definition FLASH_Queue.c:59
void FLASH_Queue_end(void)
Definition FLASH_Queue.c:81
dim_t FLASH_Obj_scalar_length_tl(FLA_Obj H)
Definition FLASH_View.c:723
dim_t FLASH_Obj_depth(FLA_Obj H)
Definition FLASH_Obj.c:20
dim_t FLASH_Obj_scalar_min_dim(FLA_Obj H)
Definition FLASH_View.c:675
dim_t FLASH_Obj_scalar_width_tl(FLA_Obj H)
Definition FLASH_View.c:737
FLA_Error FLA_QR_UT_internal(FLA_Obj A, FLA_Obj T, fla_qrut_t *cntl)
Definition FLA_QR_UT_internal.c:17
FLA_Error FLA_QR_UT_check(FLA_Obj A, FLA_Obj T)
Definition FLA_QR_UT_check.c:13
void FLA_Abort(void)
Definition FLA_Error.c:248
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18
void FLA_Print_message(char *str, char *file, int line)
Definition FLA_Error.c:234
int FLA_Error
Definition FLA_type_defs.h:47
unsigned long dim_t
Definition FLA_type_defs.h:71

References FLA_Abort(), FLA_Check_error_level(), FLA_Print_message(), FLA_QR_UT_check(), FLA_QR_UT_internal(), FLASH_Obj_depth(), FLASH_Obj_scalar_length_tl(), FLASH_Obj_scalar_min_dim(), FLASH_Obj_scalar_width_tl(), flash_qrut_cntl, FLASH_Queue_begin(), and FLASH_Queue_end().

Variable Documentation

◆ fla_qrut_cntl_leaf

fla_qrut_t* fla_qrut_cntl_leaf
extern

◆ flash_qrut_cntl

fla_qrut_t* flash_qrut_cntl
extern