libflame  revision_anchor
Functions | Variables
FLASH_LQ_UT.c File Reference

(r)

Functions

FLA_Error FLASH_LQ_UT (FLA_Obj A, FLA_Obj TW)
 

Variables

fla_lqut_tflash_lqut_cntl
 
fla_lqut_tfla_lqut_cntl_leaf
 

Function Documentation

◆ FLASH_LQ_UT()

FLA_Error FLASH_LQ_UT ( FLA_Obj  A,
FLA_Obj  TW 
)

References FLA_Abort(), FLA_Check_error_level(), FLA_LQ_UT_check(), FLA_LQ_UT_internal(), FLA_Print_message(), FLASH_Obj_depth(), FLASH_Obj_scalar_length_tl(), FLASH_Obj_scalar_min_dim(), FLASH_Obj_scalar_width_tl(), FLASH_Queue_begin(), and FLASH_Queue_end().

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_LQ_UT_check( A, TW );
24 
25  // *** The current hierarchical LQ_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_LQ_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 LQ
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) LQ_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_LQ_UT() requires that b_alg == b_store",
46  __FILE__, __LINE__ );
47  FLA_Abort();
48  }
49 
50  // The traditional (non-incremental) LQ_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_LQ_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_LQ_UT_internal() with hierarchical control tree.
63  r_val = FLA_LQ_UT_internal( A, TW, flash_lqut_cntl );
64 
65  // End the parallel region.
67 
68  return r_val;
69 }
FLA_Error FLA_LQ_UT_check(FLA_Obj A, FLA_Obj T)
Definition: FLA_LQ_UT_check.c:13
void FLASH_Queue_end(void)
Definition: FLASH_Queue.c:81
unsigned long dim_t
Definition: FLA_type_defs.h:71
dim_t FLASH_Obj_depth(FLA_Obj H)
Definition: FLASH_Obj.c:20
int FLA_Error
Definition: FLA_type_defs.h:47
void FLASH_Queue_begin(void)
Definition: FLASH_Queue.c:59
dim_t FLASH_Obj_scalar_width_tl(FLA_Obj H)
Definition: FLASH_View.c:737
FLA_Error FLA_LQ_UT_internal(FLA_Obj A, FLA_Obj T, fla_lqut_t *cntl)
Definition: FLA_LQ_UT_internal.c:17
fla_lqut_t * flash_lqut_cntl
Definition: FLASH_LQ_UT_cntl_init.c:16
void FLA_Abort(void)
Definition: FLA_Error.c:248
void FLA_Print_message(char *str, char *file, int line)
Definition: FLA_Error.c:234
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
dim_t FLASH_Obj_scalar_min_dim(FLA_Obj H)
Definition: FLASH_View.c:675
dim_t FLASH_Obj_scalar_length_tl(FLA_Obj H)
Definition: FLASH_View.c:723

Variable Documentation

◆ fla_lqut_cntl_leaf

fla_lqut_t* fla_lqut_cntl_leaf

◆ flash_lqut_cntl

fla_lqut_t* flash_lqut_cntl