libflame revision_anchor
FLASH_lapack_prototypes.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLASH_Chol (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLASH_Chol_solve (FLA_Uplo uplo, FLA_Obj A, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLASH_LU_nopiv (FLA_Obj A)
 
FLA_Error FLASH_LU_nopiv_solve (FLA_Obj A, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLASH_LU_piv (FLA_Obj A, FLA_Obj p)
 
FLA_Error FLASH_LU_piv_solve (FLA_Obj A, FLA_Obj p, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLASH_LU_incpiv (FLA_Obj A, FLA_Obj p, FLA_Obj L)
 
FLA_Error FLASH_FS_incpiv (FLA_Obj A, FLA_Obj p, FLA_Obj L, FLA_Obj b)
 
FLA_Error FLASH_Trinv (FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
 
FLA_Error FLASH_Ttmm (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLASH_SPDinv (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLASH_Sylv (FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLASH_Apply_Q_UT (FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B)
 
FLA_Error FLASH_Apply_Q2_UT (FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj D, FLA_Obj T, FLA_Obj W, FLA_Obj C, FLA_Obj E)
 
FLA_Error FLASH_QR2_UT (FLA_Obj B, FLA_Obj D, FLA_Obj T)
 
FLA_Error FLASH_QR_UT (FLA_Obj A, FLA_Obj TW)
 
FLA_Error FLASH_QR_UT_solve (FLA_Obj A, FLA_Obj T, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLASH_QR_UT_inc (FLA_Obj A, FLA_Obj TW)
 
FLA_Error FLASH_QR_UT_inc_solve (FLA_Obj A, FLA_Obj TW, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLASH_Apply_Q_UT_inc (FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj TW, FLA_Obj W1, FLA_Obj B)
 
FLA_Error FLASH_Apply_pivots (FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
 
FLA_Error FLASH_Eig_gest (FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLASH_LQ_UT_inv (FLA_Obj A, FLA_Obj TW)
 
FLA_Error FLASH_LQ2_UT (FLA_Obj B, FLA_Obj C, FLA_Obj T)
 

Function Documentation

◆ FLASH_Apply_pivots()

FLA_Error FLASH_Apply_pivots ( FLA_Side side,
FLA_Trans trans,
FLA_Obj p,
FLA_Obj A )
17{
18 FLA_Error r_val;
19 FLA_Bool enable_supermatrix;
20
21 // Check parameters.
22
23 // *** The current Apply_pivots algorithm implemented assumes that
24 // the matrix has a hierarchical depth of 1. We check for that here, because
25 // we anticipate that we'll use a more general algorithm in the future, and
26 // we don't want to forget to remove the constraint. ***
27 if ( FLASH_Obj_depth( A ) != 1 )
28 {
29 FLA_Print_message( "FLASH_Apply_pivots() currently only supports matrices of depth 1",
30 __FILE__, __LINE__ );
31 FLA_Abort();
32 }
33
34 // Find the status of SuperMatrix.
35 enable_supermatrix = FLASH_Queue_get_enabled();
36
37 // Temporarily disable SuperMatrix.
39
40 // Invoke FLA_Apply_pivots_internal() with large control tree.
41 r_val = FLA_Apply_pivots_internal( side, trans, p, A, flash_appiv_cntl );
42
43 // Restore SuperMatrix to its previous status.
44 if ( enable_supermatrix )
46
47 return r_val;
48}
fla_appiv_t * flash_appiv_cntl
Definition FLASH_Apply_pivots_cntl_init.c:15
FLA_Bool FLASH_Queue_get_enabled(void)
Definition FLASH_Queue.c:171
FLA_Error FLASH_Queue_enable(void)
Definition FLASH_Queue.c:117
FLA_Error FLASH_Queue_disable(void)
Definition FLASH_Queue.c:144
dim_t FLASH_Obj_depth(FLA_Obj H)
Definition FLASH_Obj.c:20
FLA_Error FLA_Apply_pivots_internal(FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A, fla_appiv_t *cntl)
Definition FLA_Apply_pivots_internal.c:13
void FLA_Abort(void)
Definition FLA_Error.c:248
void FLA_Print_message(char *str, char *file, int line)
Definition FLA_Error.c:234
int FLA_Error
Definition FLA_type_defs.h:47
int FLA_Bool
Definition FLA_type_defs.h:46

References FLA_Abort(), FLA_Apply_pivots_internal(), FLA_Print_message(), flash_appiv_cntl, FLASH_Obj_depth(), FLASH_Queue_disable(), FLASH_Queue_enable(), and FLASH_Queue_get_enabled().

Referenced by FLASH_LU_piv_solve().

◆ FLASH_Apply_Q2_UT()

FLA_Error FLASH_Apply_Q2_UT ( FLA_Side side,
FLA_Trans trans,
FLA_Direct direct,
FLA_Store storev,
FLA_Obj D,
FLA_Obj T,
FLA_Obj W,
FLA_Obj C,
FLA_Obj E )
20{
21 FLA_Error r_val;
22
23 // Check parameters.
24 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
25 FLA_Apply_Q2_UT_check( side, trans, direct, storev, D, T, W, C, E );
26
27 // Begin a parallel region.
29
30 // Invoke FLA_Apply_Q2_UT_internal() with the standard control tree.
31 r_val = FLA_Apply_Q2_UT_internal( side, trans, direct, storev, D, T, W, C, E, flash_apq2ut_cntl );
32
33 // End the parallel region.
35
36 return r_val;
37}
fla_apq2ut_t * flash_apq2ut_cntl
Definition FLASH_Apply_Q2_UT_cntl_init.c:15
void FLASH_Queue_begin(void)
Definition FLASH_Queue.c:59
void FLASH_Queue_end(void)
Definition FLASH_Queue.c:81
FLA_Error FLA_Apply_Q2_UT_internal(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj D, FLA_Obj T, FLA_Obj W, FLA_Obj C, FLA_Obj E, fla_apq2ut_t *cntl)
Definition FLA_Apply_Q2_UT_internal.c:17
FLA_Error FLA_Apply_Q2_UT_check(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj D, FLA_Obj T, FLA_Obj W, FLA_Obj C, FLA_Obj E)
Definition FLA_Apply_Q2_UT_check.c:13
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18

References FLA_Apply_Q2_UT_check(), FLA_Apply_Q2_UT_internal(), FLA_Check_error_level(), flash_apq2ut_cntl, FLASH_Queue_begin(), and FLASH_Queue_end().

◆ FLASH_Apply_Q_UT()

FLA_Error FLASH_Apply_Q_UT ( FLA_Side side,
FLA_Trans trans,
FLA_Direct direct,
FLA_Store storev,
FLA_Obj A,
FLA_Obj T,
FLA_Obj W,
FLA_Obj B )
17{
18 FLA_Error r_val;
19 dim_t b_alg;
20
21 // Check parameters.
22 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
23 FLA_Apply_Q_UT_check( side, trans, direct, storev, A, T, W, B );
24
25 // Inspect the length of TTL to get the blocksize used by the QR/LQ
26 // factorization, which will be our inner blocksize for Apply_Q_UT.
27 b_alg = FLASH_Obj_scalar_length_tl( T );
28
29 // The traditional (non-incremental) Apply_Q_UT algorithm-by-blocks
30 // requires that the algorithmic blocksize be equal to the storage
31 // blocksize.
32 if ( b_alg != FLASH_Obj_scalar_width_tl( T ) )
33 {
34 FLA_Print_message( "FLASH_Apply_Q_UT() requires that b_alg == b_store",
35 __FILE__, __LINE__ );
36 FLA_Abort();
37 }
38
39 // Adjust the blocksize of the control tree node for the flat subproblem.
40 if ( FLA_Cntl_blocksize( fla_apqut_cntl_leaf ) != NULL )
41 FLA_Blocksize_set( FLA_Cntl_blocksize( fla_apqut_cntl_leaf ),
42 b_alg, b_alg, b_alg, b_alg );
43
44 // Begin a parallel region.
46
47 // Invoke FLA_Apply_Q_UT_internal() with the standard control tree.
48 r_val = FLA_Apply_Q_UT_internal( side, trans, direct, storev, A, T, W, B,
50
51 // End the parallel region.
53
54 return r_val;
55}
fla_apqut_t * fla_apqut_cntl_leaf
Definition FLA_Apply_Q_UT_cntl_init.c:19
fla_apqut_t * flash_apqut_cntl_blas
Definition FLASH_Apply_Q_UT_cntl_init.c:23
dim_t FLASH_Obj_scalar_length_tl(FLA_Obj H)
Definition FLASH_View.c:723
dim_t FLASH_Obj_scalar_width_tl(FLA_Obj H)
Definition FLASH_View.c:737
FLA_Error FLA_Apply_Q_UT_internal(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
Definition FLA_Apply_Q_UT_internal.c:17
FLA_Error FLA_Apply_Q_UT_check(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B)
Definition FLA_Apply_Q_UT_check.c:13
void FLA_Blocksize_set(fla_blocksize_t *bp, dim_t b_s, dim_t b_d, dim_t b_c, dim_t b_z)
Definition FLA_Blocksize.c:54
unsigned long dim_t
Definition FLA_type_defs.h:71

References FLA_Abort(), FLA_Apply_Q_UT_check(), FLA_Apply_Q_UT_internal(), fla_apqut_cntl_leaf, FLA_Blocksize_set(), FLA_Check_error_level(), FLA_Print_message(), flash_apqut_cntl_blas, FLASH_Obj_scalar_length_tl(), FLASH_Obj_scalar_width_tl(), FLASH_Queue_begin(), and FLASH_Queue_end().

Referenced by FLASH_LQ_UT_solve(), and FLASH_QR_UT_solve().

◆ FLASH_Apply_Q_UT_inc()

FLA_Error FLASH_Apply_Q_UT_inc ( FLA_Side side,
FLA_Trans trans,
FLA_Direct direct,
FLA_Store storev,
FLA_Obj A,
FLA_Obj TW,
FLA_Obj W1,
FLA_Obj B )
20{
21 FLA_Error r_val;
22
23 // Check parameters.
24 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
25 FLA_Apply_Q_UT_inc_check( side, trans, direct, storev, A, TW, W1, B );
26
27 // Begin a parallel region.
29
30 // Invoke FLA_Apply_Q_UT_inc_internal() with the standard control tree.
31 r_val = FLA_Apply_Q_UT_inc_internal( side, trans, direct, storev, A, TW, W1, B, flash_apqutinc_cntl );
32
33 // End the parallel region.
35
36 return r_val;
37}
fla_apqutinc_t * flash_apqutinc_cntl
Definition FLASH_Apply_Q_UT_inc_cntl_init.c:16
FLA_Error FLA_Apply_Q_UT_inc_internal(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj TW, FLA_Obj W1, FLA_Obj B, fla_apqutinc_t *cntl)
Definition FLA_Apply_Q_UT_inc_internal.c:13
FLA_Error FLA_Apply_Q_UT_inc_check(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj TW, FLA_Obj W1, FLA_Obj B)
Definition FLA_Apply_Q_UT_inc_check.c:13

References FLA_Apply_Q_UT_inc_check(), FLA_Apply_Q_UT_inc_internal(), FLA_Check_error_level(), flash_apqutinc_cntl, FLASH_Queue_begin(), and FLASH_Queue_end().

Referenced by FLA_Apply_CAQ_UT_inc_apply_panels(), and FLASH_QR_UT_inc_solve().

◆ FLASH_Chol()

FLA_Error FLASH_Chol ( FLA_Uplo uplo,
FLA_Obj A )
16{
17 FLA_Error r_val;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Chol_check( uplo, A );
22
23 // Begin a parallel region.
25
26 // Enqueue tasks via a SuperMatrix-aware control tree.
27 r_val = FLA_Chol_internal( uplo, A, flash_chol_cntl );
28
29 // End the parallel region.
31
32 return r_val;
33}
fla_chol_t * flash_chol_cntl
Definition FLASH_Chol_cntl_init.c:17
FLA_Error FLA_Chol_internal(FLA_Uplo uplo, FLA_Obj A, fla_chol_t *cntl)
Definition FLA_Chol_internal.c:16
FLA_Error FLA_Chol_check(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Chol_check.c:13

References FLA_Check_error_level(), FLA_Chol_check(), FLA_Chol_internal(), flash_chol_cntl, FLASH_Queue_begin(), and FLASH_Queue_end().

◆ FLASH_Chol_solve()

FLA_Error FLASH_Chol_solve ( FLA_Uplo uplo,
FLA_Obj A,
FLA_Obj B,
FLA_Obj X )
14{
15 // Check parameters.
16 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
17 FLA_Chol_solve_check( uplo, A, B, X );
18
19 FLASH_Copy( B, X );
20
21 if ( uplo == FLA_LOWER_TRIANGULAR )
22 {
23 FLASH_Trsm( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE,
24 FLA_NONUNIT_DIAG, FLA_ONE, A, X );
25 FLASH_Trsm( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_CONJ_TRANSPOSE,
26 FLA_NONUNIT_DIAG, FLA_ONE, A, X );
27 }
28 else // if ( uplo == FLA_UPPER_TRIANGULAR )
29 {
30 FLASH_Trsm( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE,
31 FLA_NONUNIT_DIAG, FLA_ONE, A, X );
32 FLASH_Trsm( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE,
33 FLA_NONUNIT_DIAG, FLA_ONE, A, X );
34 }
35
36 return FLA_SUCCESS;
37}
FLA_Error FLASH_Copy(FLA_Obj A, FLA_Obj B)
Definition FLASH_Copy.c:15
FLA_Error FLASH_Trsm(FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLASH_Trsm.c:15
FLA_Error FLA_Chol_solve_check(FLA_Uplo uplo, FLA_Obj A, FLA_Obj B, FLA_Obj X)
Definition FLA_Chol_solve_check.c:13
FLA_Obj FLA_ONE
Definition FLA_Init.c:18

References FLA_Check_error_level(), FLA_Chol_solve_check(), FLA_ONE, FLASH_Copy(), and FLASH_Trsm().

◆ FLASH_Eig_gest()

FLA_Error FLASH_Eig_gest ( FLA_Inv inv,
FLA_Uplo uplo,
FLA_Obj A,
FLA_Obj B )
16{
17 FLA_Obj Y;
18 FLA_Error r_val;
19
20 // Check parameters.
21 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22 FLA_Eig_gest_check( inv, uplo, A, B );
23
24 // The temporary matrix object Y must exist when execution occurs, NOT just
25 // when enqueuing occurs. So if the SuperMatrix stack depth is positive, then
26 // it means the user has declared a "parallel region" in his code, and thus
27 // execution won't occur until sometime after FLASH_Eig_gest() returns, at
28 // which time Y will have been deallocated. Thus, we disallow this scenario
29 // for now, until we can think of a more general solution.
30 if ( FLASH_Queue_stack_depth() > 0 )
31 {
32 FLA_Print_message( "FLASH_Eig_gest() MUST be invoked with standalone parallelism, and may not be called from within a user-level parallel region",
33 __FILE__, __LINE__ );
34 FLA_Abort();
35 }
36
37
38 FLASH_Obj_create_conf_to( FLA_NO_TRANSPOSE, A, &Y );
39
40 // Begin a parallel region.
42
43 // Enqueue tasks via a SuperMatrix-aware control tree.
44 r_val = FLA_Eig_gest_internal( inv, uplo, A, Y, B, flash_eig_gest_cntl );
45
46 // End the parallel region.
48
49 FLASH_Obj_free( &Y );
50
51 return r_val;
52}
fla_eig_gest_t * flash_eig_gest_cntl
Definition FLASH_Eig_gest_cntl_init.c:21
unsigned int FLASH_Queue_stack_depth(void)
Definition FLASH_Queue.c:106
void FLASH_Obj_free(FLA_Obj *H)
Definition FLASH_Obj.c:638
FLA_Error FLASH_Obj_create_conf_to(FLA_Trans trans, FLA_Obj H_cur, FLA_Obj *H_new)
Definition FLASH_Obj.c:406
FLA_Error FLA_Eig_gest_internal(FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj Y, FLA_Obj B, fla_eig_gest_t *cntl)
Definition FLA_Eig_gest_internal.c:17
FLA_Error FLA_Eig_gest_check(FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition FLA_Eig_gest_check.c:13
Definition FLA_type_defs.h:159

References FLA_Abort(), FLA_Check_error_level(), FLA_Eig_gest_check(), FLA_Eig_gest_internal(), FLA_Print_message(), flash_eig_gest_cntl, FLASH_Obj_create_conf_to(), FLASH_Obj_free(), FLASH_Queue_begin(), FLASH_Queue_end(), and FLASH_Queue_stack_depth().

◆ FLASH_FS_incpiv()

FLA_Error FLASH_FS_incpiv ( FLA_Obj A,
FLA_Obj p,
FLA_Obj L,
FLA_Obj b )
14{
15 dim_t nb_alg;
16 FLA_Error r_val;
17 FLA_Bool enable_supermatrix;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_FS_incpiv_check( A, p, L, b );
22
23 // *** The current forward substitution algorithm implemented assumes that
24 // the matrix has a hierarchical depth of 1. We check for that here, because
25 // we anticipate that we'll use a more general algorithm in the future, and
26 // we don't want to forget to remove the constraint. ***
27 if ( FLASH_Obj_depth( A ) != 1 )
28 {
29 FLA_Print_message( "FLASH_FS_incpiv() currently only supports matrices of depth 1",
30 __FILE__, __LINE__ );
31 FLA_Abort();
32 }
33
34 // Inspect the width of a the top-left element of L to get the algorithmic
35 // blocksize we'll use throughout the LU_incpiv algorithm.
36 nb_alg = FLASH_Obj_scalar_width_tl( L );
37
38 // Find the status of SuperMatrix.
39 enable_supermatrix = FLASH_Queue_get_enabled();
40
41 // Temporarily disable SuperMatrix.
43
44 // Execute tasks.
45 r_val = FLASH_FS_incpiv_aux1( A, p, L, b, nb_alg );
46
47 // Restore SuperMatrix to its previous status.
48 if ( enable_supermatrix )
50
51 return r_val;
52}
FLA_Error FLA_FS_incpiv_check(FLA_Obj A, FLA_Obj p, FLA_Obj L, FLA_Obj B)
Definition FLA_FS_incpiv_check.c:13
FLA_Error FLASH_FS_incpiv_aux1(FLA_Obj A, FLA_Obj p, FLA_Obj L, FLA_Obj b, dim_t nb_alg)
Definition FLASH_FS_incpiv_aux1.c:13

References FLA_Abort(), FLA_Check_error_level(), FLA_FS_incpiv_check(), FLA_Print_message(), FLASH_FS_incpiv_aux1(), FLASH_Obj_depth(), FLASH_Obj_scalar_width_tl(), FLASH_Queue_disable(), FLASH_Queue_enable(), and FLASH_Queue_get_enabled().

Referenced by FLASH_LU_incpiv_solve().

◆ FLASH_LQ2_UT()

FLA_Error FLASH_LQ2_UT ( FLA_Obj B,
FLA_Obj C,
FLA_Obj T )

◆ FLASH_LQ_UT_inv()

FLA_Error FLASH_LQ_UT_inv ( FLA_Obj A,
FLA_Obj TW )

◆ FLASH_LU_incpiv()

FLA_Error FLASH_LU_incpiv ( FLA_Obj A,
FLA_Obj p,
FLA_Obj L )
14{
15 FLA_Error r_val;
16
17 // Check parameters.
18 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
19 FLA_LU_incpiv_check( A, p, L );
20
21 // *** The current LU_incpiv algorithm implemented assumes that
22 // the matrix has a hierarchical depth of 1. We check for that here, because
23 // we anticipate that we'll use a more general algorithm in the future, and
24 // we don't want to forget to remove the constraint. ***
25 if ( FLASH_Obj_depth( A ) != 1 )
26 {
27 FLA_Print_message( "FLASH_LU_incpiv() currently only supports matrices of depth 1",
28 __FILE__, __LINE__ );
29 FLA_Abort();
30 }
31
32 if ( FLASH_Queue_stack_depth() == 0 )
33 r_val = FLASH_LU_incpiv_opt1( A, p, L );
34 else
35 r_val = FLASH_LU_incpiv_noopt( A, p, L );
36
37 return r_val;
38}
FLA_Error FLASH_LU_incpiv_noopt(FLA_Obj A, FLA_Obj p, FLA_Obj L)
Definition FLASH_LU_incpiv_noopt.c:15
FLA_Error FLASH_LU_incpiv_opt1(FLA_Obj A, FLA_Obj p, FLA_Obj L)
Definition FLASH_LU_incpiv_opt1.c:15
FLA_Error FLA_LU_incpiv_check(FLA_Obj A, FLA_Obj p, FLA_Obj L)
Definition FLA_LU_incpiv_check.c:13

References FLA_Abort(), FLA_Check_error_level(), FLA_LU_incpiv_check(), FLA_Print_message(), FLASH_LU_incpiv_noopt(), FLASH_LU_incpiv_opt1(), FLASH_Obj_depth(), and FLASH_Queue_stack_depth().

◆ FLASH_LU_nopiv()

FLA_Error FLASH_LU_nopiv ( FLA_Obj A)
16{
17 FLA_Error r_val;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22
23 // Begin a parallel region.
25
26 // Enqueue tasks via a SuperMatrix-aware control tree.
28
29 // End the parallel region.
31
32 // Check for singularity.
33 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
35
36 return r_val;
37}
fla_lu_t * flash_lu_nopiv_cntl
Definition FLASH_LU_nopiv_cntl_init.c:17
FLA_Error FLASH_LU_find_zero_on_diagonal(FLA_Obj A)
Definition FLASH_LU_find_zero_on_diagonal.c:13
FLA_Error FLA_LU_nopiv_internal(FLA_Obj A, fla_lu_t *cntl)
Definition FLA_LU_nopiv_internal.c:16
FLA_Error FLA_LU_nopiv_check(FLA_Obj A)
Definition FLA_LU_nopiv_check.c:13

References FLA_Check_error_level(), FLA_LU_nopiv_check(), FLA_LU_nopiv_internal(), FLASH_LU_find_zero_on_diagonal(), flash_lu_nopiv_cntl, FLASH_Queue_begin(), and FLASH_Queue_end().

◆ FLASH_LU_nopiv_solve()

FLA_Error FLASH_LU_nopiv_solve ( FLA_Obj A,
FLA_Obj B,
FLA_Obj X )
14{
15 // Check parameters.
16 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
17 FLA_LU_nopiv_solve_check( A, B, X );
18
19 FLASH_Copy( B, X );
20
21 FLASH_Trsm( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE,
22 FLA_UNIT_DIAG, FLA_ONE, A, X );
23 FLASH_Trsm( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE,
24 FLA_NONUNIT_DIAG, FLA_ONE, A, X );
25
26 return FLA_SUCCESS;
27}
FLA_Error FLA_LU_nopiv_solve_check(FLA_Obj A, FLA_Obj B, FLA_Obj X)
Definition FLA_LU_nopiv_solve_check.c:13

References FLA_Check_error_level(), FLA_LU_nopiv_solve_check(), FLA_ONE, FLASH_Copy(), and FLASH_Trsm().

◆ FLASH_LU_piv()

FLA_Error FLASH_LU_piv ( FLA_Obj A,
FLA_Obj p )
16{
17 FLA_Error r_val = FLA_SUCCESS;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_LU_piv_check( A, p );
22
23 // *** The current LU_piv algorithm implemented assumes that
24 // the matrix has a hierarchical depth of 1. We check for that here, because
25 // we anticipate that we'll use a more general algorithm in the future, and
26 // we don't want to forget to remove the constraint. ***
27 if ( FLASH_Obj_depth( A ) != 1 )
28 {
29 FLA_Print_message( "FLASH_LU_piv() currently only supports matrices of depth 1",
30 __FILE__, __LINE__ );
31 FLA_Abort();
32 }
33
34 // Begin a parallel region.
36
37 // Invoke FLA_LU_piv_internal() with large control tree.
39
40 // End the parallel region.
42
43 // Check for singularity.
44 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
46
47 return r_val;
48}
fla_lu_t * flash_lu_piv_cntl
Definition FLASH_LU_piv_cntl_init.c:18
FLA_Error FLA_LU_piv_internal(FLA_Obj A, FLA_Obj p, fla_lu_t *cntl)
Definition FLA_LU_piv_internal.c:15
FLA_Error FLA_LU_piv_check(FLA_Obj A, FLA_Obj p)
Definition FLA_LU_piv_check.c:13

References FLA_Abort(), FLA_Check_error_level(), FLA_LU_piv_check(), FLA_LU_piv_internal(), FLA_Print_message(), FLASH_LU_find_zero_on_diagonal(), flash_lu_piv_cntl, FLASH_Obj_depth(), FLASH_Queue_begin(), and FLASH_Queue_end().

◆ FLASH_LU_piv_solve()

FLA_Error FLASH_LU_piv_solve ( FLA_Obj A,
FLA_Obj p,
FLA_Obj B,
FLA_Obj X )
14{
15 // Check parameters.
16 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
17 FLA_LU_piv_solve_check( A, p, B, X );
18
19 FLASH_Copy( B, X );
20
21 FLASH_Apply_pivots( FLA_LEFT, FLA_NO_TRANSPOSE, p, X );
22
23 FLASH_Trsm( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE,
24 FLA_UNIT_DIAG, FLA_ONE, A, X );
25 FLASH_Trsm( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE,
26 FLA_NONUNIT_DIAG, FLA_ONE, A, X );
27
28 return FLA_SUCCESS;
29}
FLA_Error FLASH_Apply_pivots(FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
Definition FLASH_Apply_pivots.c:15
FLA_Error FLA_LU_piv_solve_check(FLA_Obj A, FLA_Obj p, FLA_Obj B, FLA_Obj X)
Definition FLA_LU_piv_solve_check.c:13

References FLA_Check_error_level(), FLA_LU_piv_solve_check(), FLA_ONE, FLASH_Apply_pivots(), FLASH_Copy(), and FLASH_Trsm().

◆ FLASH_QR2_UT()

FLA_Error FLASH_QR2_UT ( FLA_Obj B,
FLA_Obj D,
FLA_Obj T )
18{
19 FLA_Error r_val;
20
21 // Check parameters.
22 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
23 FLA_QR2_UT_check( B, D, T );
24
25 // Begin a parallel region.
27
28 // Invoke FLA_QR2_UT_internal() with the standard control tree.
29 r_val = FLA_QR2_UT_internal( B, D, T, flash_qr2ut_cntl );
30
31 // End the parallel region.
33
34 return r_val;
35}
fla_qr2ut_t * flash_qr2ut_cntl
Definition FLASH_QR2_UT_cntl_init.c:14
FLA_Error FLA_QR2_UT_internal(FLA_Obj U, FLA_Obj D, FLA_Obj T, fla_qr2ut_t *cntl)
Definition FLA_QR2_UT_internal.c:16
FLA_Error FLA_QR2_UT_check(FLA_Obj B, FLA_Obj D, FLA_Obj T)
Definition FLA_QR2_UT_check.c:13

References FLA_Check_error_level(), FLA_QR2_UT_check(), FLA_QR2_UT_internal(), flash_qr2ut_cntl, FLASH_Queue_begin(), and FLASH_Queue_end().

◆ 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
dim_t FLASH_Obj_scalar_min_dim(FLA_Obj H)
Definition FLASH_View.c:675
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

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().

◆ FLASH_QR_UT_inc()

FLA_Error FLASH_QR_UT_inc ( FLA_Obj A,
FLA_Obj TW )
14{
15 FLA_Error r_val;
16
17 if ( FLASH_Queue_stack_depth() == 0 )
18 r_val = FLASH_QR_UT_inc_opt1( A, TW );
19 else
20 r_val = FLASH_QR_UT_inc_noopt( A, TW );
21
22 return r_val;
23}
FLA_Error FLASH_QR_UT_inc_noopt(FLA_Obj A, FLA_Obj TW)
Definition FLASH_QR_UT_inc_noopt.c:20
FLA_Error FLASH_QR_UT_inc_opt1(FLA_Obj A, FLA_Obj TW)
Definition FLASH_QR_UT_inc_opt1.c:20

References FLASH_QR_UT_inc_noopt(), FLASH_QR_UT_inc_opt1(), and FLASH_Queue_stack_depth().

Referenced by FLA_CAQR_UT_inc_factorize_panels().

◆ FLASH_QR_UT_inc_solve()

FLA_Error FLASH_QR_UT_inc_solve ( FLA_Obj A,
FLA_Obj TW,
FLA_Obj B,
FLA_Obj X )
14{
15 FLA_Obj W, Y;
16 FLA_Obj AT, AB;
17 FLA_Obj YT, YB;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_QR_UT_inc_solve_check( A, TW, B, X );
22
24
25 FLASH_Obj_create_copy_of( FLA_NO_TRANSPOSE, B, &Y );
26
27 FLASH_Apply_Q_UT_inc( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
28 A, TW, W, Y );
29
30 // Create a temporary hierarchical view of only the top n-by-n part of A in
31 // case m > n so that AT captures the upper triangular factor R. We do the
32 // same for Y to ensure conformality.
33 FLASH_Part_create_2x1( A, &AT,
34 &AB, FLASH_Obj_scalar_width( A ), FLA_TOP );
35 FLASH_Part_create_2x1( Y, &YT,
36 &YB, FLASH_Obj_scalar_width( A ), FLA_TOP );
37
38 FLASH_Trsm( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, FLA_NONUNIT_DIAG,
39 FLA_ONE, AT, YT );
40
41 FLASH_Copy( YT, X );
42
43 // Free the temporary hierarchical views.
45 &AB );
47 &YB );
48
49 FLASH_Obj_free( &Y );
50 FLASH_Obj_free( &W );
51
52 return FLA_SUCCESS;
53}
FLA_Error FLASH_Apply_Q_UT_inc(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj TW, FLA_Obj W1, FLA_Obj B)
Definition FLASH_Apply_Q_UT_inc.c:18
FLA_Error FLASH_Obj_create_copy_of(FLA_Trans trans, FLA_Obj H_cur, FLA_Obj *H_new)
Definition FLASH_Obj.c:561
dim_t FLASH_Obj_scalar_width(FLA_Obj H)
Definition FLASH_View.c:641
FLA_Error FLASH_Part_create_2x1(FLA_Obj A, FLA_Obj *AT, FLA_Obj *AB, dim_t n_rows, FLA_Side side)
Definition FLASH_View.c:13
FLA_Error FLASH_Part_free_2x1(FLA_Obj *AT, FLA_Obj *AB)
Definition FLASH_View.c:572
FLA_Error FLASH_Apply_Q_UT_inc_create_workspace(FLA_Obj TW, FLA_Obj B, FLA_Obj *W)
Definition FLASH_Apply_Q_UT_inc_create_workspace.c:13
FLA_Error FLA_QR_UT_inc_solve_check(FLA_Obj A, FLA_Obj TW, FLA_Obj B, FLA_Obj X)
Definition FLA_QR_UT_inc_solve_check.c:13

References FLA_Check_error_level(), FLA_ONE, FLA_QR_UT_inc_solve_check(), FLASH_Apply_Q_UT_inc(), FLASH_Apply_Q_UT_inc_create_workspace(), FLASH_Copy(), FLASH_Obj_create_copy_of(), FLASH_Obj_free(), FLASH_Obj_scalar_width(), FLASH_Part_create_2x1(), FLASH_Part_free_2x1(), and FLASH_Trsm().

◆ FLASH_QR_UT_solve()

FLA_Error FLASH_QR_UT_solve ( FLA_Obj A,
FLA_Obj T,
FLA_Obj B,
FLA_Obj X )
14{
15 FLA_Obj W, Y;
16 FLA_Obj AT, AB;
17 FLA_Obj YT, YB;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_QR_UT_solve_check( A, TW, B, X );
22
24
25 FLASH_Obj_create_copy_of( FLA_NO_TRANSPOSE, B, &Y );
26
27 FLASH_Apply_Q_UT( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
28 A, TW, W, Y );
29
30 FLA_Part_2x1( A, &AT,
31 &AB, FLA_Obj_width( A ), FLA_TOP );
32 FLA_Part_2x1( Y, &YT,
33 &YB, FLA_Obj_width( A ), FLA_TOP );
34
35 FLASH_Trsm( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, FLA_NONUNIT_DIAG,
36 FLA_ONE, AT, YT );
37
38 FLASH_Copy( YT, X );
39
40 FLASH_Obj_free( &Y );
41 FLASH_Obj_free( &W );
42
43 return FLA_SUCCESS;
44}
FLA_Error FLASH_Apply_Q_UT(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B)
Definition FLASH_Apply_Q_UT.c:16
FLA_Error FLASH_Apply_Q_UT_create_workspace(FLA_Obj TW, FLA_Obj B, FLA_Obj *W)
Definition FLASH_Apply_Q_UT_create_workspace.c:13
FLA_Error FLA_QR_UT_solve_check(FLA_Obj A, FLA_Obj T, FLA_Obj B, FLA_Obj X)
Definition FLA_QR_UT_solve_check.c:13
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
FLA_Error FLA_Part_2x1(FLA_Obj A, FLA_Obj *A1, FLA_Obj *A2, dim_t mb, FLA_Side side)
Definition FLA_View.c:76

References FLA_Check_error_level(), FLA_Obj_width(), FLA_ONE, FLA_Part_2x1(), FLA_QR_UT_solve_check(), FLASH_Apply_Q_UT(), FLASH_Apply_Q_UT_create_workspace(), FLASH_Copy(), FLASH_Obj_create_copy_of(), FLASH_Obj_free(), and FLASH_Trsm().

◆ FLASH_SPDinv()

FLA_Error FLASH_SPDinv ( FLA_Uplo uplo,
FLA_Obj A )
16{
17 FLA_Error r_val;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_SPDinv_check( uplo, A );
22
23 // Begin a parallel region.
25
26 // Enqueue tasks via a SuperMatrix-aware control tree.
27 r_val = FLA_SPDinv_internal( uplo, A, flash_spdinv_cntl );
28
29 // End the parallel region.
31
32 return r_val;
33}
fla_spdinv_t * flash_spdinv_cntl
Definition FLASH_SPDinv_cntl_init.c:17
FLA_Error FLA_SPDinv_internal(FLA_Uplo uplo, FLA_Obj A, fla_spdinv_t *cntl)
Definition FLA_SPDinv_internal.c:13
FLA_Error FLA_SPDinv_check(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_SPDinv_check.c:13

References FLA_Check_error_level(), FLA_SPDinv_check(), FLA_SPDinv_internal(), FLASH_Queue_begin(), FLASH_Queue_end(), and flash_spdinv_cntl.

◆ FLASH_Sylv()

FLA_Error FLASH_Sylv ( FLA_Trans transa,
FLA_Trans transb,
FLA_Obj isgn,
FLA_Obj A,
FLA_Obj B,
FLA_Obj C,
FLA_Obj scale )
16{
17 FLA_Error r_val;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Sylv_check( transa, transb, isgn, A, B, C, scale );
22
23 // Begin a parallel region.
25
26 // Enqueue tasks via a SuperMatrix-aware control tree.
27 r_val = FLA_Sylv_internal( transa, transb, isgn, A, B, C, scale, flash_sylv_cntl );
28
29 // End the parallel region.
31
32 return r_val;
33}
fla_sylv_t * flash_sylv_cntl
Definition FLASH_Sylv_cntl_init.c:18
FLA_Error FLA_Sylv_internal(FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale, fla_sylv_t *cntl)
Definition FLA_Sylv_internal.c:16
FLA_Error FLA_Sylv_check(FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
Definition FLA_Sylv_check.c:13

References FLA_Check_error_level(), FLA_Sylv_check(), FLA_Sylv_internal(), FLASH_Queue_begin(), FLASH_Queue_end(), and flash_sylv_cntl.

◆ FLASH_Trinv()

FLA_Error FLASH_Trinv ( FLA_Uplo uplo,
FLA_Diag diag,
FLA_Obj A )
16{
17 FLA_Error r_val;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Trinv_check( uplo, diag, A );
22
23 // Begin a parallel region.
25
26 // Enqueue tasks via a SuperMatrix-aware control tree.
27 r_val = FLA_Trinv_internal( uplo, diag, A, flash_trinv_cntl );
28
29 // End the parallel region.
31
32 return r_val;
33}
fla_trinv_t * flash_trinv_cntl
Definition FLASH_Trinv_cntl_init.c:17
FLA_Error FLA_Trinv_internal(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A, fla_trinv_t *cntl)
Definition FLA_Trinv_internal.c:16
FLA_Error FLA_Trinv_check(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition FLA_Trinv_check.c:13

References FLA_Check_error_level(), FLA_Trinv_check(), FLA_Trinv_internal(), FLASH_Queue_begin(), FLASH_Queue_end(), and flash_trinv_cntl.

◆ FLASH_Ttmm()

FLA_Error FLASH_Ttmm ( FLA_Uplo uplo,
FLA_Obj A )
16{
17 FLA_Error r_val;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Ttmm_check( uplo, A );
22
23 // Begin a parallel region.
25
26 // Enqueue tasks via a SuperMatrix-aware control tree.
27 r_val = FLA_Ttmm_internal( uplo, A, flash_ttmm_cntl );
28
29 // End the parallel region.
31
32 return r_val;
33}
fla_ttmm_t * flash_ttmm_cntl
Definition FLASH_Ttmm_cntl_init.c:17
FLA_Error FLA_Ttmm_internal(FLA_Uplo uplo, FLA_Obj A, fla_ttmm_t *cntl)
Definition FLA_Ttmm_internal.c:16
FLA_Error FLA_Ttmm_check(FLA_Uplo uplo, FLA_Obj A)
Definition FLA_Ttmm_check.c:13

References FLA_Check_error_level(), FLA_Ttmm_check(), FLA_Ttmm_internal(), FLASH_Queue_begin(), FLASH_Queue_end(), and flash_ttmm_cntl.