libflame  revision_anchor
Functions
FLA_lapack_prototypes.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLA_Chol (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_LU_nopiv (FLA_Obj A)
 
FLA_Error FLA_LU_piv (FLA_Obj A, FLA_Obj p)
 
FLA_Error FLA_QR_UT (FLA_Obj A, FLA_Obj T)
 
FLA_Error FLA_QR_UT_piv (FLA_Obj A, FLA_Obj T, FLA_Obj w, FLA_Obj p)
 
FLA_Error FLA_LQ_UT (FLA_Obj A, FLA_Obj S)
 
FLA_Error FLA_Trinv (FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
 
FLA_Error FLA_Ttmm (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Sylv (FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_SPDinv (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Hess_UT (FLA_Obj A, FLA_Obj T)
 
FLA_Error FLA_Eig_gest (FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Accum_T_UT (FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj tau, FLA_Obj T)
 
FLA_Error FLA_Apply_H2_UT (FLA_Side side, FLA_Obj tau, FLA_Obj u2, FLA_Obj a1, FLA_Obj A2)
 
FLA_Error FLA_Apply_HUD_UT (FLA_Side side, FLA_Obj tau, FLA_Obj w12t, FLA_Obj u2, FLA_Obj v2, FLA_Obj r12t, FLA_Obj C2, FLA_Obj D2)
 
FLA_Error FLA_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 FLA_Apply_pivots (FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
 
FLA_Error FLA_Chol_task (FLA_Uplo uplo, FLA_Obj A, fla_chol_t *cntl)
 
FLA_Error FLA_Chol_l_task (FLA_Obj A, fla_chol_t *cntl)
 
FLA_Error FLA_Chol_u_task (FLA_Obj A, fla_chol_t *cntl)
 
FLA_Error FLA_LU_piv_macro_task (FLA_Obj A, FLA_Obj p, fla_lu_t *cntl)
 
FLA_Error FLA_Apply_pivots_task (FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A, fla_appiv_t *cntl)
 
FLA_Error FLA_Apply_pivots_ln_task (FLA_Obj p, FLA_Obj A, fla_appiv_t *cntl)
 
FLA_Error FLA_Apply_pivots_macro_task (FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A, fla_appiv_t *cntl)
 
FLA_Error FLA_LU_nopiv_task (FLA_Obj A, fla_lu_t *cntl)
 
FLA_Error FLA_LU_piv_task (FLA_Obj A, FLA_Obj p, fla_lu_t *cntl)
 
FLA_Error FLA_LU_piv_copy_task (FLA_Obj A, FLA_Obj p, FLA_Obj U, fla_lu_t *cntl)
 
FLA_Error FLA_Trsm_piv_task (FLA_Obj A, FLA_Obj B, FLA_Obj p, fla_trsm_t *cntl)
 
FLA_Error FLA_SA_LU_task (FLA_Obj U, FLA_Obj D, FLA_Obj p, FLA_Obj L, dim_t nb_alg, fla_lu_t *cntl)
 
FLA_Error FLA_SA_FS_task (FLA_Obj L, FLA_Obj D, FLA_Obj p, FLA_Obj C, FLA_Obj E, dim_t nb_alg, fla_gemm_t *cntl)
 
FLA_Error FLA_Trinv_task (FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A, fla_trinv_t *cntl)
 
FLA_Error FLA_Trinv_ln_task (FLA_Obj A, fla_trinv_t *cntl)
 
FLA_Error FLA_Trinv_lu_task (FLA_Obj A, fla_trinv_t *cntl)
 
FLA_Error FLA_Trinv_un_task (FLA_Obj A, fla_trinv_t *cntl)
 
FLA_Error FLA_Trinv_uu_task (FLA_Obj A, fla_trinv_t *cntl)
 
FLA_Error FLA_Ttmm_task (FLA_Uplo uplo, FLA_Obj A, fla_ttmm_t *cntl)
 
FLA_Error FLA_Ttmm_l_task (FLA_Obj A, fla_ttmm_t *cntl)
 
FLA_Error FLA_Ttmm_u_task (FLA_Obj A, fla_ttmm_t *cntl)
 
FLA_Error FLA_Sylv_task (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)
 
FLA_Error FLA_Sylv_nn_task (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale, fla_sylv_t *cntl)
 
FLA_Error FLA_Sylv_nh_task (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale, fla_sylv_t *cntl)
 
FLA_Error FLA_Sylv_hn_task (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale, fla_sylv_t *cntl)
 
FLA_Error FLA_Sylv_hh_task (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale, fla_sylv_t *cntl)
 
FLA_Error FLA_Lyap_task (FLA_Trans trans, FLA_Obj isgn, FLA_Obj A, FLA_Obj C, FLA_Obj scale, fla_lyap_t *cntl)
 
FLA_Error FLA_Lyap_n_task (FLA_Obj isgn, FLA_Obj A, FLA_Obj C, FLA_Obj scale, fla_lyap_t *cntl)
 
FLA_Error FLA_Lyap_h_task (FLA_Obj isgn, FLA_Obj A, FLA_Obj C, FLA_Obj scale, fla_lyap_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_task (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)
 
FLA_Error FLA_Apply_Q_UT_lhbc_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_lhbr_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_lhfc_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_lhfr_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_lnbc_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_lnbr_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_lnfc_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_lnfr_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_rhbc_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_rhbr_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_rhfc_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_rhfr_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_rnbc_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_rnbr_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_rnfc_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_rnfr_task (FLA_Obj A, FLA_Obj T, FLA_Obj W, FLA_Obj B, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q2_UT_task (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)
 
FLA_Error FLA_Apply_Q2_UT_lhfc_task (FLA_Obj D, FLA_Obj T, FLA_Obj W, FLA_Obj C, FLA_Obj E, fla_apq2ut_t *cntl)
 
FLA_Error FLA_Apply_CAQ2_UT_task (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_apcaq2ut_t *cntl)
 
FLA_Error FLA_Apply_CAQ2_UT_lhfc_task (FLA_Obj D, FLA_Obj T, FLA_Obj W, FLA_Obj C, FLA_Obj E, fla_apcaq2ut_t *cntl)
 
FLA_Error FLA_QR2_UT_task (FLA_Obj B, FLA_Obj D, FLA_Obj T, fla_qr2ut_t *cntl)
 
FLA_Error FLA_CAQR2_UT_task (FLA_Obj B, FLA_Obj D, FLA_Obj T, fla_caqr2ut_t *cntl)
 
FLA_Error FLA_QR_UT_macro_task (FLA_Obj A, FLA_Obj T, fla_qrut_t *cntl)
 
FLA_Error FLA_QR_UT_task (FLA_Obj A, FLA_Obj T, fla_qrut_t *cntl)
 
FLA_Error FLA_QR_UT_copy_task (FLA_Obj A, FLA_Obj T, FLA_Obj U, fla_qrut_t *cntl)
 
FLA_Error FLA_LQ_UT_macro_task (FLA_Obj A, FLA_Obj T, fla_lqut_t *cntl)
 
FLA_Error FLA_LQ_UT_task (FLA_Obj A, FLA_Obj T, fla_lqut_t *cntl)
 
FLA_Error FLA_UDdate_UT_task (FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, fla_uddateut_t *cntl)
 
FLA_Error FLA_Apply_QUD_UT_task (FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
 
FLA_Error FLA_Apply_QUD_UT_lhfc_task (FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
 
FLA_Error FLA_Eig_gest_task (FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj Y, FLA_Obj B, fla_eig_gest_t *cntl)
 
FLA_Error FLA_Eig_gest_il_task (FLA_Obj A, FLA_Obj Y, FLA_Obj B, fla_eig_gest_t *cntl)
 
FLA_Error FLA_Eig_gest_iu_task (FLA_Obj A, FLA_Obj Y, FLA_Obj B, fla_eig_gest_t *cntl)
 
FLA_Error FLA_Eig_gest_nl_task (FLA_Obj A, FLA_Obj Y, FLA_Obj B, fla_eig_gest_t *cntl)
 
FLA_Error FLA_Eig_gest_nu_task (FLA_Obj A, FLA_Obj Y, FLA_Obj B, fla_eig_gest_t *cntl)
 
FLA_Error FLA_Apply_Q_blk_external (FLA_Side side, FLA_Trans trans, FLA_Store storev, FLA_Obj A, FLA_Obj t, FLA_Obj B)
 
FLA_Error FLA_Apply_pivots_unb_external (FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
 
FLA_Error FLA_Apply_pivots_ln_unb_ext (FLA_Obj p, FLA_Obj A)
 
FLA_Error FLA_Apply_pivots_macro_external (FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
 
FLA_Error FLA_Chol_blk_external (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Chol_l_blk_ext (FLA_Obj A)
 
FLA_Error FLA_Chol_u_blk_ext (FLA_Obj A)
 
FLA_Error FLA_Chol_unb_external (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Chol_l_unb_ext (FLA_Obj A)
 
FLA_Error FLA_Chol_u_unb_ext (FLA_Obj A)
 
FLA_Error FLA_LU_piv_blk_external (FLA_Obj A, FLA_Obj p)
 
FLA_Error FLA_LU_piv_blk_ext (FLA_Obj A, FLA_Obj p)
 
FLA_Error FLA_LU_piv_unb_external (FLA_Obj A, FLA_Obj p)
 
FLA_Error FLA_LU_piv_unb_ext (FLA_Obj A, FLA_Obj p)
 
FLA_Error FLA_QR_blk_external (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_QR_unb_external (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_LQ_blk_external (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_LQ_unb_external (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Hess_blk_external (FLA_Obj A, FLA_Obj t, int ilo, int ihi)
 
FLA_Error FLA_Hess_unb_external (FLA_Obj A, FLA_Obj t, int ilo, int ihi)
 
FLA_Error FLA_Tridiag_blk_external (FLA_Uplo uplo, FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Tridiag_unb_external (FLA_Uplo uplo, FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Bidiag_blk_external (FLA_Obj A, FLA_Obj tu, FLA_Obj tv)
 
FLA_Error FLA_Bidiag_unb_external (FLA_Obj A, FLA_Obj tu, FLA_Obj tv)
 
FLA_Error FLA_QR_form_Q_external (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Tridiag_form_Q_external (FLA_Uplo uplo, FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Tridiag_apply_Q_external (FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Obj A, FLA_Obj t, FLA_Obj B)
 
FLA_Error FLA_Bidiag_form_U_external (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Bidiag_form_V_external (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Bidiag_apply_U_external (FLA_Side side, FLA_Trans trans, FLA_Obj A, FLA_Obj t, FLA_Obj B)
 
FLA_Error FLA_Bidiag_apply_V_external (FLA_Side side, FLA_Trans trans, FLA_Obj A, FLA_Obj t, FLA_Obj B)
 
FLA_Error FLA_Trinv_blk_external (FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
 
FLA_Error FLA_Trinv_ln_blk_ext (FLA_Obj A)
 
FLA_Error FLA_Trinv_lu_blk_ext (FLA_Obj A)
 
FLA_Error FLA_Trinv_un_blk_ext (FLA_Obj A)
 
FLA_Error FLA_Trinv_uu_blk_ext (FLA_Obj A)
 
FLA_Error FLA_Trinv_unb_external (FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
 
FLA_Error FLA_Trinv_ln_unb_ext (FLA_Obj A)
 
FLA_Error FLA_Trinv_lu_unb_ext (FLA_Obj A)
 
FLA_Error FLA_Trinv_un_unb_ext (FLA_Obj A)
 
FLA_Error FLA_Trinv_uu_unb_ext (FLA_Obj A)
 
FLA_Error FLA_Ttmm_blk_external (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Ttmm_l_blk_ext (FLA_Obj A)
 
FLA_Error FLA_Ttmm_u_blk_ext (FLA_Obj A)
 
FLA_Error FLA_Ttmm_unb_external (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Ttmm_l_unb_ext (FLA_Obj A)
 
FLA_Error FLA_Ttmm_u_unb_ext (FLA_Obj A)
 
FLA_Error FLA_Sylv_blk_external (FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_Sylv_nn_blk_ext (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_Sylv_nh_blk_ext (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_Sylv_hn_blk_ext (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_Sylv_hh_blk_ext (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_Sylv_unb_external (FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_Sylv_nn_unb_ext (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_Sylv_nh_unb_ext (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_Sylv_hn_unb_ext (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_Sylv_hh_unb_ext (FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_SPDinv_blk_external (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Eig_gest_blk_external (FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Eig_gest_il_blk_ext (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Eig_gest_iu_blk_ext (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Eig_gest_nl_blk_ext (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Eig_gest_nu_blk_ext (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Eig_gest_unb_external (FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Eig_gest_il_unb_ext (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Eig_gest_iu_unb_ext (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Eig_gest_nl_unb_ext (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Eig_gest_nu_unb_ext (FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Tevd_external (FLA_Evd_type jobz, FLA_Obj d, FLA_Obj e, FLA_Obj A)
 
FLA_Error FLA_Tevdd_external (FLA_Evd_type jobz, FLA_Obj d, FLA_Obj e, FLA_Obj A)
 
FLA_Error FLA_Tevdr_external (FLA_Evd_type jobz, FLA_Obj d, FLA_Obj e, FLA_Obj l, FLA_Obj A)
 
FLA_Error FLA_Hevd_external (FLA_Evd_type jobz, FLA_Uplo uplo, FLA_Obj A, FLA_Obj l)
 
FLA_Error FLA_Hevdd_external (FLA_Evd_type jobz, FLA_Uplo uplo, FLA_Obj A, FLA_Obj l)
 
FLA_Error FLA_Hevdr_external (FLA_Evd_type jobz, FLA_Uplo uplo, FLA_Obj A, FLA_Obj l, FLA_Obj Z)
 
FLA_Error FLA_Bsvd_external (FLA_Uplo uplo, FLA_Obj d, FLA_Obj e, FLA_Obj U, FLA_Obj V)
 
FLA_Error FLA_Bsvdd_external (FLA_Uplo uplo, FLA_Obj d, FLA_Obj e, FLA_Obj U, FLA_Obj V)
 
FLA_Error FLA_Svd_external (FLA_Svd_type jobu, FLA_Svd_type jobv, FLA_Obj A, FLA_Obj s, FLA_Obj U, FLA_Obj V)
 
FLA_Error FLA_Svdd_external (FLA_Svd_type jobz, FLA_Obj A, FLA_Obj s, FLA_Obj U, FLA_Obj V)
 
FLA_Error FLA_Chol_check (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Chol_solve_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLA_LU_nopiv_check (FLA_Obj A)
 
FLA_Error FLA_LU_nopiv_solve_check (FLA_Obj A, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLA_LU_piv_check (FLA_Obj A, FLA_Obj p)
 
FLA_Error FLA_LU_piv_solve_check (FLA_Obj A, FLA_Obj p, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLA_LU_incpiv_check (FLA_Obj A, FLA_Obj p, FLA_Obj L)
 
FLA_Error FLA_LU_incpiv_solve_check (FLA_Obj A, FLA_Obj p, FLA_Obj L, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLA_FS_incpiv_check (FLA_Obj A, FLA_Obj p, FLA_Obj L, FLA_Obj b)
 
FLA_Error FLA_QR_check (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_QR_UT_check (FLA_Obj A, FLA_Obj T)
 
FLA_Error FLA_QR_UT_solve_check (FLA_Obj A, FLA_Obj T, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLA_QR_UT_recover_tau_check (FLA_Obj T, FLA_Obj tau)
 
FLA_Error FLA_QR_UT_form_Q_check (FLA_Obj A, FLA_Obj T, FLA_Obj Q)
 
FLA_Error FLA_LQ_check (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_LQ_UT_check (FLA_Obj A, FLA_Obj T)
 
FLA_Error FLA_LQ_UT_solve_check (FLA_Obj A, FLA_Obj T, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLA_LQ_UT_recover_tau_check (FLA_Obj T, FLA_Obj tau)
 
FLA_Error FLA_LQ_UT_form_Q_check (FLA_Obj A, FLA_Obj T, FLA_Obj Q)
 
FLA_Error FLA_Hess_check (FLA_Obj A, FLA_Obj t, int ilo, int ihi)
 
FLA_Error FLA_Hess_UT_check (FLA_Obj A, FLA_Obj T)
 
FLA_Error FLA_Hess_UT_recover_tau_check (FLA_Obj T, FLA_Obj tau)
 
FLA_Error FLA_Tridiag_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Tridiag_UT_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj T)
 
FLA_Error FLA_Tridiag_UT_recover_tau_check (FLA_Obj T, FLA_Obj tau)
 
FLA_Error FLA_Tridiag_UT_scale_diagonals_check (FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Tridiag_UT_extract_diagonals_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj d, FLA_Obj e)
 
FLA_Error FLA_Tridiag_UT_extract_real_diagonals_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj d, FLA_Obj e)
 
FLA_Error FLA_Tridiag_UT_realify_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj d)
 
FLA_Error FLA_Tridiag_UT_realify_subdiagonal_check (FLA_Obj b, FLA_Obj d)
 
FLA_Error FLA_Tridiag_UT_shift_U_check (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Tridiag_UT_form_Q_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj T, FLA_Obj Q)
 
FLA_Error FLA_Trinv_check (FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
 
FLA_Error FLA_Bidiag_check (FLA_Obj A, FLA_Obj tu, FLA_Obj tv)
 
FLA_Error FLA_Bidiag_UT_check (FLA_Obj A, FLA_Obj TU, FLA_Obj TV)
 
FLA_Error FLA_Bidiag_UT_recover_tau_check (FLA_Obj TU, FLA_Obj TV, FLA_Obj tu, FLA_Obj tv)
 
FLA_Error FLA_Bidiag_UT_extract_diagonals_check (FLA_Obj A, FLA_Obj d, FLA_Obj e)
 
FLA_Error FLA_Bidiag_UT_extract_real_diagonals_check (FLA_Obj A, FLA_Obj d, FLA_Obj e)
 
FLA_Error FLA_Bidiag_UT_scale_diagonals_check (FLA_Obj alpha, FLA_Obj A)
 
FLA_Error FLA_Bidiag_UT_realify_check (FLA_Obj A, FLA_Obj d, FLA_Obj e)
 
FLA_Error FLA_Bidiag_UT_realify_diagonals_check (FLA_Uplo uplo, FLA_Obj a, FLA_Obj b, FLA_Obj d, FLA_Obj e)
 
FLA_Error FLA_Bidiag_UT_form_U_check (FLA_Obj A, FLA_Obj T, FLA_Obj U)
 
FLA_Error FLA_Bidiag_UT_form_V_check (FLA_Obj A, FLA_Obj S, FLA_Obj V)
 
FLA_Error FLA_Ttmm_check (FLA_Uplo uplo, FLA_Obj A)
 
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)
 
FLA_Error FLA_Lyap_check (FLA_Trans trans, FLA_Obj isgn, FLA_Obj A, FLA_Obj C, FLA_Obj scale)
 
FLA_Error FLA_SPDinv_check (FLA_Uplo uplo, FLA_Obj A)
 
FLA_Error FLA_Eig_gest_check (FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Apply_Q_check (FLA_Side side, FLA_Trans trans, FLA_Store storev, FLA_Obj A, FLA_Obj t, FLA_Obj B)
 
FLA_Error FLA_QR_form_Q_check (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Tridiag_form_Q_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Tridiag_apply_Q_check (FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Obj A, FLA_Obj t, FLA_Obj B)
 
FLA_Error FLA_Bidiag_form_U_check (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Bidiag_form_V_check (FLA_Obj A, FLA_Obj t)
 
FLA_Error FLA_Bidiag_apply_U_check (FLA_Side side, FLA_Trans trans, FLA_Obj A, FLA_Obj t, FLA_Obj B)
 
FLA_Error FLA_Bidiag_apply_V_check (FLA_Side side, FLA_Trans trans, FLA_Obj A, FLA_Obj t, FLA_Obj B)
 
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)
 
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)
 
FLA_Error FLA_Apply_QUD_UT_check (FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D)
 
FLA_Error FLA_Apply_pivots_check (FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
 
FLA_Error FLA_QR2_UT_check (FLA_Obj B, FLA_Obj D, FLA_Obj T)
 
FLA_Error FLA_CAQR2_UT_check (FLA_Obj B, FLA_Obj D, FLA_Obj T)
 
FLA_Error FLA_QR_UT_inc_check (FLA_Obj A, FLA_Obj TW)
 
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)
 
FLA_Error FLA_Apply_CAQ_UT_inc_check (FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj ATW, FLA_Obj R, FLA_Obj RTW, FLA_Obj W1, FLA_Obj B)
 
FLA_Error FLA_QR_UT_inc_solve_check (FLA_Obj A, FLA_Obj TW, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLA_CAQR_UT_inc_solve_check (dim_t p, FLA_Obj A, FLA_Obj ATW, FLA_Obj R, FLA_Obj RTW, FLA_Obj B, FLA_Obj X)
 
FLA_Error FLA_UDdate_UT_check (FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T)
 
FLA_Error FLA_UDdate_UT_update_rhs_check (FLA_Obj T, FLA_Obj bR, FLA_Obj C, FLA_Obj bC, FLA_Obj D, FLA_Obj bD)
 
FLA_Error FLA_UDdate_UT_solve_check (FLA_Obj R, FLA_Obj bR, FLA_Obj x)
 
FLA_Error FLA_UDdate_UT_inc_check (FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, FLA_Obj W)
 
FLA_Error FLA_UDdate_UT_inc_update_rhs_check (FLA_Obj T, FLA_Obj bR, FLA_Obj C, FLA_Obj bC, FLA_Obj D, FLA_Obj bD)
 
FLA_Error FLA_UDdate_UT_inc_solve_check (FLA_Obj R, FLA_Obj bR, FLA_Obj x)
 
FLA_Error FLA_CAQR_UT_inc_check (dim_t p, FLA_Obj A, FLA_Obj ATW, FLA_Obj R, FLA_Obj RTW)
 
FLA_Error FLA_Apply_QUD_UT_inc_check (FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D)
 
FLA_Error FLA_Apply_H2_UT_check (FLA_Side side, FLA_Obj tau, FLA_Obj u2, FLA_Obj a1t, FLA_Obj A2)
 
FLA_Error FLA_Apply_HUD_UT_check (FLA_Side side, FLA_Obj tau, FLA_Obj w12t, FLA_Obj u2, FLA_Obj v2, FLA_Obj r12t, FLA_Obj C2, FLA_Obj D2)
 
FLA_Error FLA_Accum_T_UT_check (FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj tau, FLA_Obj T)
 
FLA_Error FLA_Tevd_compute_scaling_check (FLA_Obj d, FLA_Obj e, FLA_Obj sigma)
 
FLA_Error FLA_Hevd_compute_scaling_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj sigma)
 
FLA_Error FLA_Hevd_check (FLA_Evd_type jobz, FLA_Uplo uplo, FLA_Obj A, FLA_Obj l)
 
FLA_Error FLA_Hevdd_check (FLA_Evd_type jobz, FLA_Uplo uplo, FLA_Obj A, FLA_Obj l)
 
FLA_Error FLA_Hevdr_check (FLA_Evd_type jobz, FLA_Uplo uplo, FLA_Obj A, FLA_Obj l, FLA_Obj Z)
 
FLA_Error FLA_Bsvd_check (FLA_Uplo uplo, FLA_Obj d, FLA_Obj e, FLA_Obj G, FLA_Obj H, FLA_Svd_type jobu, FLA_Obj U, FLA_Svd_type jobv, FLA_Obj V)
 
FLA_Error FLA_Bsvd_ext_check (FLA_Uplo uplo, FLA_Obj d, FLA_Obj e, FLA_Obj G, FLA_Obj H, FLA_Svd_type jobu, FLA_Obj U, FLA_Svd_type jobv, FLA_Obj V, FLA_Bool apply_Uh2C, FLA_Obj C)
 
FLA_Error FLA_Bsvd_compute_scaling_check (FLA_Obj d, FLA_Obj e, FLA_Obj sigma)
 
FLA_Error FLA_Svd_compute_scaling_check (FLA_Obj A, FLA_Obj sigma)
 
FLA_Error FLA_Svd_check (FLA_Svd_type jobu, FLA_Svd_type jobv, FLA_Obj A, FLA_Obj s, FLA_Obj U, FLA_Obj V)
 
FLA_Error FLA_Svd_ext_check (FLA_Svd_type jobu, FLA_Trans transu, FLA_Svd_type jobv, FLA_Trans transv, FLA_Obj A, FLA_Obj s, FLA_Obj U, FLA_Obj V)
 
FLA_Error FLA_Svdd_check (FLA_Svd_type jobz, FLA_Obj A, FLA_Obj s, FLA_Obj U, FLA_Obj V)
 
FLA_Error FLA_Chol_internal_check (FLA_Uplo uplo, FLA_Obj A, fla_chol_t *cntl)
 
FLA_Error FLA_LU_nopiv_internal_check (FLA_Obj A, fla_lu_t *cntl)
 
FLA_Error FLA_Trinv_internal_check (FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A, fla_trinv_t *cntl)
 
FLA_Error FLA_Ttmm_internal_check (FLA_Uplo uplo, FLA_Obj A, fla_ttmm_t *cntl)
 
FLA_Error FLA_SPDinv_internal_check (FLA_Uplo uplo, FLA_Obj A, fla_spdinv_t *cntl)
 
FLA_Error FLA_Sylv_internal_check (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)
 
FLA_Error FLA_Lyap_internal_check (FLA_Trans trans, FLA_Obj isgn, FLA_Obj A, FLA_Obj C, FLA_Obj scale, fla_lyap_t *cntl)
 
FLA_Error FLA_QR_UT_internal_check (FLA_Obj A, FLA_Obj T, fla_qrut_t *cntl)
 
FLA_Error FLA_QR_UT_copy_internal_check (FLA_Obj A, FLA_Obj T, FLA_Obj U, fla_qrut_t *cntl)
 
FLA_Error FLA_QR2_UT_internal_check (FLA_Obj B, FLA_Obj D, FLA_Obj T, fla_qr2ut_t *cntl)
 
FLA_Error FLA_CAQR2_UT_internal_check (FLA_Obj B, FLA_Obj D, FLA_Obj T, fla_caqr2ut_t *cntl)
 
FLA_Error FLA_LQ_UT_internal_check (FLA_Obj A, FLA_Obj T, fla_lqut_t *cntl)
 
FLA_Error FLA_Hess_UT_internal_check (FLA_Obj A, FLA_Obj T, fla_hessut_t *cntl)
 
FLA_Error FLA_Tridiag_UT_internal_check (FLA_Uplo uplo, FLA_Obj A, FLA_Obj T, fla_tridiagut_t *cntl)
 
FLA_Error FLA_Bidiag_UT_internal_check (FLA_Obj A, FLA_Obj TU, FLA_Obj TV, fla_bidiagut_t *cntl)
 
FLA_Error FLA_UDdate_UT_internal_check (FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, fla_uddateut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_internal_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, fla_apqut_t *cntl)
 
FLA_Error FLA_Apply_Q2_UT_internal_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, fla_apq2ut_t *cntl)
 
FLA_Error FLA_Apply_CAQ2_UT_internal_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, fla_apcaq2ut_t *cntl)
 
FLA_Error FLA_Apply_QUD_UT_internal_check (FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
 
FLA_Error FLA_Apply_Q_UT_inc_internal_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, fla_apqutinc_t *cntl)
 
FLA_Error FLA_Apply_CAQ_UT_inc_internal_check (FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj R, FLA_Obj TW, FLA_Obj W, FLA_Obj B, fla_apcaqutinc_t *cntl)
 
FLA_Error FLA_Apply_QUD_UT_inc_internal_check (FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudutinc_t *cntl)
 
FLA_Error FLA_Eig_gest_internal_check (FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj Y, FLA_Obj B, fla_eig_gest_t *cntl)
 

Function Documentation

◆ FLA_Accum_T_UT()

FLA_Error FLA_Accum_T_UT ( FLA_Direct  direct,
FLA_Store  storev,
FLA_Obj  A,
FLA_Obj  tau,
FLA_Obj  T 
)

References FLA_Accum_T_UT_check(), FLA_Accum_T_UT_internal(), and FLA_Check_error_level().

14 {
15  FLA_Error r_val;
16 
17  // Check parameters.
18  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
19  FLA_Accum_T_UT_check( direct, storev, A, tau, T );
20 
21  // Invoke FLA_Accum_T_UT_internal().
22  r_val = FLA_Accum_T_UT_internal( direct, storev, A, tau, T );
23 
24  return r_val;
25 }
FLA_Error FLA_Accum_T_UT_check(FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj tau, FLA_Obj T)
Definition: FLA_Accum_T_UT_check.c:13
FLA_Error FLA_Accum_T_UT_internal(FLA_Direct direct, FLA_Store storev, FLA_Obj A, FLA_Obj tau, FLA_Obj T)
Definition: FLA_Accum_T_UT_internal.c:13
int FLA_Error
Definition: FLA_type_defs.h:47
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18

◆ FLA_Accum_T_UT_check()

FLA_Error FLA_Accum_T_UT_check ( FLA_Direct  direct,
FLA_Store  storev,
FLA_Obj  A,
FLA_Obj  tau,
FLA_Obj  T 
)

References FLA_Check_col_vector(), FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_valid_direct(), FLA_Check_valid_storev(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().

Referenced by FLA_Accum_T_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_direct( direct );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_storev( storev );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_floating_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_consistent_object_datatype( A, tau );
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_col_vector( tau );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_vector_dim( tau, FLA_Obj_min_dim( A ) );
36  FLA_Check_error_code( e_val );
37 
38  // This is not valid.
39  // The width of T can match to either length of width of A,
40  // which depends on how house-holder vectors are accumulated.
41  // e_val = FLA_Check_object_width_equals( T, FLA_Obj_min_dim( A ) );
42  // FLA_Check_error_code( e_val );
43 
44  return FLA_SUCCESS;
45 }
FLA_Error FLA_Check_valid_direct(FLA_Conj direct)
Definition: FLA_Check.c:123
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_col_vector(FLA_Obj x)
Definition: FLA_Check.c:1233
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
FLA_Error FLA_Check_valid_storev(FLA_Conj storev)
Definition: FLA_Check.c:134
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153
FLA_Error FLA_Check_consistent_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:339

◆ FLA_Apply_CAQ2_UT_internal_check()

FLA_Error FLA_Apply_CAQ2_UT_internal_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,
fla_apcaq2ut_t cntl 
)

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_elemtype(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Apply_CAQ2_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
29  FLA_Check_error_code( e_val );
30 
32  FLA_Check_error_code( e_val );
33 
34  // Verify conformality between all the objects.
35  if ( side == FLA_LEFT )
36  {
37  if ( FLA_Obj_elemtype( D ) == FLA_MATRIX )
38  {
39  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, D, T );
40  FLA_Check_error_code( e_val );
41 
42  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, C, W );
43  FLA_Check_error_code( e_val );
44  }
45  else // if ( FLA_Obj_elemtype( D ) == FLA_SCALAR )
46  {
47  //e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, E, C, D );
48  //FLA_Check_error_code( e_val );
49 
51  FLA_Check_error_code( e_val );
52 
54  FLA_Check_error_code( e_val );
55  }
56 
57  //e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E );
58  //FLA_Check_error_code( e_val );
59 
60  }
61  else
62  {
63  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
64  }
65 
66  return FLA_SUCCESS;
67 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039
FLA_Elemtype FLA_Obj_elemtype(FLA_Obj obj)
Definition: FLA_Query.c:51

◆ FLA_Apply_CAQ2_UT_lhfc_task()

FLA_Error FLA_Apply_CAQ2_UT_lhfc_task ( FLA_Obj  D,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  C,
FLA_Obj  E,
fla_apcaq2ut_t cntl 
)

References FLA_Apply_CAQ2_UT_internal().

26 {
27  return FLA_Apply_CAQ2_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
28  D, T, W, C, E,
30 }
fla_apcaq2ut_t * fla_apcaq2ut_cntl_leaf
Definition: FLA_Apply_CAQ2_UT_cntl_init.c:19
FLA_Error FLA_Apply_CAQ2_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_apcaq2ut_t *cntl)
Definition: FLA_Apply_CAQ2_UT_internal.c:17

◆ FLA_Apply_CAQ2_UT_task()

FLA_Error FLA_Apply_CAQ2_UT_task ( 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_apcaq2ut_t cntl 
)

References FLA_Apply_CAQ2_UT_internal().

Referenced by FLASH_Queue_exec_task().

18 {
19  return FLA_Apply_CAQ2_UT_internal( side, trans, direct, storev,
20  D, T, W, C, E,
22 }
fla_apcaq2ut_t * fla_apcaq2ut_cntl_leaf
Definition: FLA_Apply_CAQ2_UT_cntl_init.c:19
FLA_Error FLA_Apply_CAQ2_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_apcaq2ut_t *cntl)
Definition: FLA_Apply_CAQ2_UT_internal.c:17

◆ FLA_Apply_CAQ_UT_inc_check()

FLA_Error FLA_Apply_CAQ_UT_inc_check ( FLA_Side  side,
FLA_Trans  trans,
FLA_Direct  direct,
FLA_Store  storev,
FLA_Obj  A,
FLA_Obj  ATW,
FLA_Obj  R,
FLA_Obj  RTW,
FLA_Obj  W1,
FLA_Obj  B 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), and FLA_Obj_length().

Referenced by FLASH_Apply_CAQ_UT_inc().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_leftright_side( side );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_trans( trans );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_valid_direct( direct );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_valid_storev( storev );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_floating_object( A );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_nonconstant_object( A );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_identical_object_datatype( A, ATW );
36  FLA_Check_error_code( e_val );
37 
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_identical_object_datatype( A, RTW );
42  FLA_Check_error_code( e_val );
43 
45  FLA_Check_error_code( e_val );
46 
48  FLA_Check_error_code( e_val );
49 
50  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, ATW );
51  FLA_Check_error_code( e_val );
52 
53  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, R );
54  FLA_Check_error_code( e_val );
55 
56  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, RTW );
57  FLA_Check_error_code( e_val );
58 
59  if ( side == FLA_LEFT )
60  {
62  FLA_Check_error_code( e_val );
63  }
64  else
65  {
66  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
67  }
68 
69  return FLA_SUCCESS;
70 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition: FLA_Check.c:87
FLA_Error FLA_Check_valid_direct(FLA_Conj direct)
Definition: FLA_Check.c:123
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_valid_storev(FLA_Conj storev)
Definition: FLA_Check.c:134
FLA_Error FLA_Check_valid_leftright_side(FLA_Side side)
Definition: FLA_Check.c:1124
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Apply_CAQ_UT_inc_internal_check()

FLA_Error FLA_Apply_CAQ_UT_inc_internal_check ( FLA_Side  side,
FLA_Trans  trans,
FLA_Direct  direct,
FLA_Store  storev,
FLA_Obj  R,
FLA_Obj  TW,
FLA_Obj  W,
FLA_Obj  B,
fla_apcaqutinc_t cntl 
)

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Apply_CAQ_UT_inc_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
22  e_val = FLA_Check_identical_object_elemtype( R, TW );
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
29  FLA_Check_error_code( e_val );
30 
31  // Verify conformality between all the objects. This check works regardless
32  // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
33  // element length and width are used instead of scalar length and width.
34  if ( side == FLA_LEFT )
35  {
36  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, R, TW );
37  FLA_Check_error_code( e_val );
38 
40  FLA_Check_error_code( e_val );
41 
43  FLA_Check_error_code( e_val );
44  }
45  else
46  {
47  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
48  }
49 
50  return FLA_SUCCESS;
51 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Apply_H2_UT()

FLA_Error FLA_Apply_H2_UT ( FLA_Side  side,
FLA_Obj  tau,
FLA_Obj  u2,
FLA_Obj  a1,
FLA_Obj  A2 
)

References FLA_Apply_H2_UT_check(), FLA_Apply_H2_UT_internal(), FLA_Check_error_level(), and FLA_Obj_has_zero_dim().

Referenced by FLA_Bidiag_UT_u_step_unb_var1(), FLA_CAQR2_UT_unb_var1(), FLA_Hess_UT_step_unb_var1(), FLA_LQ_UT_unb_var1(), FLA_LQ_UT_unb_var2(), FLA_QR2_UT_unb_var1(), FLA_QR_UT_piv_unb_var1(), FLA_QR_UT_unb_var1(), and FLA_QR_UT_unb_var2().

14 {
15  FLA_Error r_val;
16 
17  // Check parameters.
18  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
19  FLA_Apply_H2_UT_check( side, tau, u2, a1, A2 );
20 
21  if ( FLA_Obj_has_zero_dim( a1 ) ) return FLA_SUCCESS;
22 
23  // Invoke FLA_Apply_H2_UT_internal() to parse parameters.
24  r_val = FLA_Apply_H2_UT_internal( side, tau, u2, a1, A2 );
25 
26  return r_val;
27 }
FLA_Error FLA_Apply_H2_UT_internal(FLA_Side side, FLA_Obj tau, FLA_Obj u2, FLA_Obj a1, FLA_Obj A2)
Definition: FLA_Apply_H2_UT_internal.c:13
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
FLA_Error FLA_Apply_H2_UT_check(FLA_Side side, FLA_Obj tau, FLA_Obj u2, FLA_Obj a1, FLA_Obj A2)
Definition: FLA_Apply_H2_UT_check.c:13
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18

◆ FLA_Apply_H2_UT_check()

FLA_Error FLA_Apply_H2_UT_check ( FLA_Side  side,
FLA_Obj  tau,
FLA_Obj  u2,
FLA_Obj  a1t,
FLA_Obj  A2 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_leftright_side(), and FLA_Obj_vector_dim().

Referenced by FLA_Apply_H2_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_leftright_side( side );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( tau );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( tau );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_identical_object_datatype( tau, u2 );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_identical_object_datatype( tau, a1 );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_identical_object_datatype( tau, A2 );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_if_scalar( tau );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_if_vector( u2 );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_if_vector( a1 );
42  FLA_Check_error_code( e_val );
43 
44  if ( side == FLA_LEFT )
45  {
47  FLA_Check_error_code( e_val );
48 
50  FLA_Check_error_code( e_val );
51  }
52  else // if ( side == FLA_RIGHT )
53  {
55  FLA_Check_error_code( e_val );
56 
58  FLA_Check_error_code( e_val );
59  }
60 
61  // if columnwise
62  //e_val = FLA_Check_matrix_vector_dims( FLA_TRANSPOSE, A2, u2, a1t );
63  //FLA_Check_error_code( e_val );
64 
65  // if rowwise
66  //e_val = FLA_Check_matrix_vector_dims( ... );
67  //FLA_Check_error_code( e_val );
68 
69  return FLA_SUCCESS;
70 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
FLA_Error FLA_Check_if_scalar(FLA_Obj A)
Definition: FLA_Check.c:373
FLA_Error FLA_Check_valid_leftright_side(FLA_Side side)
Definition: FLA_Check.c:1124
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Apply_HUD_UT()

FLA_Error FLA_Apply_HUD_UT ( FLA_Side  side,
FLA_Obj  tau,
FLA_Obj  w12t,
FLA_Obj  u2,
FLA_Obj  v2,
FLA_Obj  r12t,
FLA_Obj  C2,
FLA_Obj  D2 
)

References FLA_Apply_HUD_UT_check(), FLA_Apply_HUD_UT_internal(), and FLA_Check_error_level().

Referenced by FLA_UDdate_UT_unb_var1().

18 {
19  FLA_Error r_val;
20 
21  // Check parameters.
22  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
23  FLA_Apply_HUD_UT_check( side, tau, w12t, r12t, u1, C2, v1, D2 );
24 
25  // Invoke FLA_Apply_HUD_UT_internal() to parse parameters.
26  r_val = FLA_Apply_HUD_UT_internal( side, tau, w12t, r12t, u1, C2, v1, D2 );
27 
28  return r_val;
29 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Apply_HUD_UT_internal(FLA_Side side, FLA_Obj tau, FLA_Obj w12t, FLA_Obj r12t, FLA_Obj u1, FLA_Obj C2, FLA_Obj v1, FLA_Obj D2)
Definition: FLA_Apply_HUD_UT_internal.c:13
FLA_Error FLA_Apply_HUD_UT_check(FLA_Side side, FLA_Obj tau, FLA_Obj w12t, FLA_Obj r12t, FLA_Obj u1, FLA_Obj C2, FLA_Obj v1, FLA_Obj D2)
Definition: FLA_Apply_HUD_UT_check.c:13
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18

◆ FLA_Apply_HUD_UT_check()

FLA_Error FLA_Apply_HUD_UT_check ( FLA_Side  side,
FLA_Obj  tau,
FLA_Obj  w12t,
FLA_Obj  u2,
FLA_Obj  v2,
FLA_Obj  r12t,
FLA_Obj  C2,
FLA_Obj  D2 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_if_vector(), FLA_Check_matrix_vector_dims(), FLA_Check_nonconstant_object(), and FLA_Check_valid_leftright_side().

Referenced by FLA_Apply_HUD_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_leftright_side( side );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( tau );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( tau );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_identical_object_datatype( tau, w12t );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_identical_object_datatype( tau, r12t );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_identical_object_datatype( tau, u1 );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_identical_object_datatype( tau, C2 );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_identical_object_datatype( tau, v1 );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_identical_object_datatype( tau, D2 );
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_if_scalar( tau );
45  FLA_Check_error_code( e_val );
46 
47  e_val = FLA_Check_if_vector( w12t );
48  FLA_Check_error_code( e_val );
49 
50  e_val = FLA_Check_if_vector( r12t );
51  FLA_Check_error_code( e_val );
52 
53  e_val = FLA_Check_if_vector( u1 );
54  FLA_Check_error_code( e_val );
55 
56  e_val = FLA_Check_if_vector( v1 );
57  FLA_Check_error_code( e_val );
58 
59  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, w12t, r12t );
60  FLA_Check_error_code( e_val );
61 
62  e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, C2, r12t, u1 );
63  FLA_Check_error_code( e_val );
64 
65  e_val = FLA_Check_matrix_vector_dims( FLA_NO_TRANSPOSE, D2, r12t, v1 );
66  FLA_Check_error_code( e_val );
67 
68  return FLA_SUCCESS;
69 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_matrix_vector_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj x, FLA_Obj y)
Definition: FLA_Check.c:453
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_if_scalar(FLA_Obj A)
Definition: FLA_Check.c:373
FLA_Error FLA_Check_valid_leftright_side(FLA_Side side)
Definition: FLA_Check.c:1124

◆ FLA_Apply_pivots()

FLA_Error FLA_Apply_pivots ( FLA_Side  side,
FLA_Trans  trans,
FLA_Obj  p,
FLA_Obj  A 
)

References FLA_Apply_pivots_internal().

Referenced by FLA_Bidiag_UT_form_U_ext(), FLA_Bidiag_UT_form_V_ext(), FLA_Form_perm_matrix(), FLA_LU_piv_solve(), FLA_LU_piv_unb_var3(), FLA_LU_piv_unb_var3b(), FLA_LU_piv_unb_var4(), FLA_LU_piv_unb_var5(), FLA_QR_UT_piv_blk_var1(), FLA_QR_UT_piv_blk_var2(), FLA_QR_UT_piv_unb_var1(), FLA_QR_UT_piv_unb_var2(), FLA_Trsm_piv_task(), and FLASH_FS_incpiv_aux1().

16 {
17  FLA_Error r_val;
18 
19  // Check parameters.
20 
21  r_val = FLA_Apply_pivots_internal( side, trans, p, A, fla_appiv_cntl_leaf );
22 
23  return r_val;
24 }
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
int FLA_Error
Definition: FLA_type_defs.h:47
fla_appiv_t * fla_appiv_cntl_leaf
Definition: FLA_Apply_pivots_cntl_init.c:13

◆ FLA_Apply_pivots_check()

FLA_Error FLA_Apply_pivots_check ( FLA_Side  side,
FLA_Trans  trans,
FLA_Obj  p,
FLA_Obj  A 
)

References FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_valid_leftright_side(), and FLA_Check_valid_trans().

Referenced by FLA_Apply_pivots_unb_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_leftright_side( side );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_trans( trans );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_floating_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_int_object( p );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_nonconstant_object( p );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_if_vector( p );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_nonconstant_object( A );
36  FLA_Check_error_code( e_val );
37 
38  if ( trans == FLA_NO_TRANSPOSE )
39  {
40  if ( side == FLA_RIGHT )
41  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
42  }
43  else if ( trans == FLA_TRANSPOSE )
44  {
45  if ( side == FLA_LEFT )
46  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
47  else if ( side == FLA_RIGHT )
48  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
49  }
50 
51  return FLA_SUCCESS;
52 }
FLA_Error FLA_Check_int_object(FLA_Obj A)
Definition: FLA_Check.c:245
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition: FLA_Check.c:87
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_valid_leftright_side(FLA_Side side)
Definition: FLA_Check.c:1124

◆ FLA_Apply_pivots_ln_task()

FLA_Error FLA_Apply_pivots_ln_task ( FLA_Obj  p,
FLA_Obj  A,
fla_appiv_t cntl 
)

References FLA_Apply_pivots_internal().

24 {
25  //return FLA_Apply_pivots_unb_external( FLA_LEFT, FLA_NO_TRANSPOSE, p, A );
26  return FLA_Apply_pivots_internal( FLA_LEFT, FLA_NO_TRANSPOSE,
27  p, A,
29 }
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
fla_appiv_t * fla_appiv_cntl_leaf
Definition: FLA_Apply_pivots_cntl_init.c:13

◆ FLA_Apply_pivots_ln_unb_ext()

FLA_Error FLA_Apply_pivots_ln_unb_ext ( FLA_Obj  p,
FLA_Obj  A 
)

References FLA_Apply_pivots_unb_external().

Referenced by FLA_Apply_pivots_ln().

122 {
123  return FLA_Apply_pivots_unb_external( FLA_LEFT, FLA_NO_TRANSPOSE, p, A );
124 }
FLA_Error FLA_Apply_pivots_unb_external(FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
Definition: FLA_Apply_pivots_unb_external.c:13

◆ FLA_Apply_pivots_macro_external()

FLA_Error FLA_Apply_pivots_macro_external ( FLA_Side  side,
FLA_Trans  trans,
FLA_Obj  p,
FLA_Obj  A 
)

References bl1_cswapv(), bl1_dswapv(), bl1_sswapv(), bl1_zswapv(), FLA_Obj_buffer_at_view(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_width(), and i.

Referenced by FLA_Apply_pivots_macro_task().

14 {
15  int i, j;
16  int ipiv;
17  int* buf_p = ( int* ) FLA_Obj_buffer_at_view( p );
18  FLA_Obj* blocks = FLASH_OBJ_PTR_AT( A );
19  int m_blocks = FLA_Obj_length( A );
20  int m_A = FLA_Obj_length( *blocks );
21  int n_A = FLA_Obj_width( *blocks );
22  FLA_Datatype datatype = FLA_Obj_datatype( A );
23 
24 #ifdef FLA_ENABLE_WINDOWS_BUILD
25  int* m = ( int* ) _alloca( m_blocks * sizeof( int ) );
26  int* cs = ( int* ) _alloca( m_blocks * sizeof( int ) );
27 #else
28  int* m = ( int* ) malloc( m_blocks * sizeof( int ) );
29  int* cs = ( int* ) malloc( m_blocks * sizeof( int ) );
30  //int m[m_blocks];
31  //int cs[m_blocks];
32 #endif
33 
34  if ( side != FLA_LEFT || trans != FLA_NO_TRANSPOSE )
35  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
36 
37  switch ( datatype )
38  {
39  case FLA_FLOAT:
40  {
41 #ifdef FLA_ENABLE_WINDOWS_BUILD
42  float** buffer = ( float** ) _alloca( m_blocks * sizeof( float* ) );
43 #else
44  float** buffer = ( float** ) malloc( m_blocks * sizeof( float* ) );
45  //float* buffer[m_blocks];
46 #endif
47  for ( i = 0; i < m_blocks; i++ )
48  {
49  buffer[i] = ( float* ) FLA_Obj_buffer_at_view( blocks[i] );
50 
51  m[i] = FLA_Obj_length( blocks[i] );
52  cs[i] = FLA_Obj_col_stride( blocks[i] );
53  }
54 
55  for ( j = 0; j < m_A; j++ )
56  {
57  ipiv = buf_p[j] + j;
58 
59  if ( ipiv != j )
60  {
61  i = 0;
62 
63  while ( ipiv >= m[i] )
64  {
65  ipiv = ipiv - m[i];
66  i++;
67  }
68 
69  bl1_sswapv( n_A,
70  buffer[0] + j, cs[0],
71  buffer[i] + ipiv, cs[i] );
72  }
73  }
74 #ifdef FLA_ENABLE_WINDOWS_BUILD
75 #else
76  free( buffer );
77 #endif
78  break;
79  }
80  case FLA_DOUBLE:
81  {
82 #ifdef FLA_ENABLE_WINDOWS_BUILD
83  double** buffer = ( double** ) _alloca( m_blocks * sizeof( double* ) );
84 #else
85  double** buffer = ( double** ) malloc( m_blocks * sizeof( double* ) );
86  //double* buffer[m_blocks];
87 #endif
88  for ( i = 0; i < m_blocks; i++ )
89  {
90  buffer[i] = ( double* ) FLA_Obj_buffer_at_view( blocks[i] );
91 
92  m[i] = FLA_Obj_length( blocks[i] );
93  cs[i] = FLA_Obj_col_stride( blocks[i] );
94  }
95 
96  for ( j = 0; j < m_A; j++ )
97  {
98  ipiv = buf_p[j] + j;
99 
100  if ( ipiv != j )
101  {
102  i = 0;
103 
104  while ( ipiv >= m[i] )
105  {
106  ipiv = ipiv - m[i];
107  i++;
108  }
109 
110  bl1_dswapv( n_A,
111  buffer[0] + j, cs[0],
112  buffer[i] + ipiv, cs[i] );
113  }
114  }
115 #ifdef FLA_ENABLE_WINDOWS_BUILD
116 #else
117  free( buffer );
118 #endif
119  break;
120  }
121  case FLA_COMPLEX:
122  {
123 #ifdef FLA_ENABLE_WINDOWS_BUILD
124  scomplex** buffer = ( scomplex** ) _alloca( m_blocks * sizeof( scomplex* ) );
125 #else
126  scomplex** buffer = ( scomplex** ) malloc( m_blocks * sizeof( scomplex* ) );
127  //scomplex* buffer[m_blocks];
128 #endif
129  for ( i = 0; i < m_blocks; i++ )
130  {
131  buffer[i] = ( scomplex* ) FLA_Obj_buffer_at_view( blocks[i] );
132 
133  m[i] = FLA_Obj_length( blocks[i] );
134  cs[i] = FLA_Obj_col_stride( blocks[i] );
135  }
136 
137  for ( j = 0; j < m_A; j++ )
138  {
139  ipiv = buf_p[j] + j;
140 
141  if ( ipiv != j )
142  {
143  i = 0;
144 
145  while ( ipiv >= m[i] )
146  {
147  ipiv = ipiv - m[i];
148  i++;
149  }
150 
151  bl1_cswapv( n_A,
152  buffer[0] + j, cs[0],
153  buffer[i] + ipiv, cs[i] );
154  }
155  }
156 #ifdef FLA_ENABLE_WINDOWS_BUILD
157 #else
158  free( buffer );
159 #endif
160  break;
161  }
162  case FLA_DOUBLE_COMPLEX:
163  {
164 #ifdef FLA_ENABLE_WINDOWS_BUILD
165  dcomplex** buffer = ( dcomplex** ) _alloca( m_blocks * sizeof( dcomplex* ) );
166 #else
167  dcomplex** buffer = ( dcomplex** ) malloc( m_blocks * sizeof( dcomplex* ) );
168  //dcomplex* buffer[m_blocks];
169 #endif
170  for ( i = 0; i < m_blocks; i++ )
171  {
172  buffer[i] = ( dcomplex* ) FLA_Obj_buffer_at_view( blocks[i] );
173 
174  m[i] = FLA_Obj_length( blocks[i] );
175  cs[i] = FLA_Obj_col_stride( blocks[i] );
176  }
177 
178  for ( j = 0; j < m_A; j++ )
179  {
180  ipiv = buf_p[j] + j;
181 
182  if ( ipiv != j )
183  {
184  i = 0;
185 
186  while ( ipiv >= m[i] )
187  {
188  ipiv = ipiv - m[i];
189  i++;
190  }
191 
192  bl1_zswapv( n_A,
193  buffer[0] + j, cs[0],
194  buffer[i] + ipiv, cs[i] );
195  }
196  }
197 #ifdef FLA_ENABLE_WINDOWS_BUILD
198 #else
199  free( buffer );
200 #endif
201  break;
202  }
203  }
204 
205 #ifdef FLA_ENABLE_WINDOWS_BUILD
206 #else
207  free( m );
208  free( cs );
209 #endif
210 
211  return FLA_SUCCESS;
212 }
void bl1_sswapv(int n, float *x, int incx, float *y, int incy)
Definition: bl1_swapv.c:13
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
void * FLA_Obj_buffer_at_view(FLA_Obj obj)
Definition: FLA_Query.c:215
void bl1_dswapv(int n, double *x, int incx, double *y, int incy)
Definition: bl1_swapv.c:23
Definition: FLA_type_defs.h:158
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
void bl1_cswapv(int n, scomplex *x, int incx, scomplex *y, int incy)
Definition: bl1_swapv.c:33
Definition: blis_type_defs.h:132
int FLA_Datatype
Definition: FLA_type_defs.h:49
void bl1_zswapv(int n, dcomplex *x, int incx, dcomplex *y, int incy)
Definition: bl1_swapv.c:43
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_Apply_pivots_macro_task()

FLA_Error FLA_Apply_pivots_macro_task ( FLA_Side  side,
FLA_Trans  trans,
FLA_Obj  p,
FLA_Obj  A,
fla_appiv_t cntl 
)

References FLA_Apply_pivots_internal(), FLA_Apply_pivots_macro_external(), and FLA_Obj_length().

Referenced by FLA_Apply_pivots_internal(), and FLASH_Queue_exec_task().

16 {
17  FLA_Error r_val;
18 /*
19  FLA_Obj A_flat;
20 
21  FLASH_Obj_create_flat_copy_of_hier( A, &A_flat );
22 
23  r_val = FLA_Apply_pivots_unb_external( side, trans, p, A_flat );
24 
25  FLASH_Copy_flat_to_hier( A_flat, 0, 0, A );
26 
27  FLA_Obj_free( &A_flat );
28 */
29  if ( FLA_Obj_length( A ) > 1 )
30  {
31  r_val = FLA_Apply_pivots_macro_external( side, trans, p, A );
32  }
33  else
34  {
35  //r_val = FLA_Apply_pivots_unb_external( side, trans, p,
36  // *FLASH_OBJ_PTR_AT( A ) );
37  r_val = FLA_Apply_pivots_internal( side, trans, p,
38  *FLASH_OBJ_PTR_AT( A ),
40  }
41 
42  return r_val;
43 }
fla_appiv_t * fla_appiv_cntl_leaf
Definition: FLA_Apply_pivots_cntl_init.c:13
FLA_Error FLA_Apply_pivots_macro_external(FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
Definition: FLA_Apply_pivots_macro_external.c:13
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
int FLA_Error
Definition: FLA_type_defs.h:47
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Apply_pivots_task()

FLA_Error FLA_Apply_pivots_task ( FLA_Side  side,
FLA_Trans  trans,
FLA_Obj  p,
FLA_Obj  A,
fla_appiv_t cntl 
)

References FLA_Apply_pivots_internal().

16 {
17  //return FLA_Apply_pivots_unb_external( side, trans, p, A );
18  return FLA_Apply_pivots_internal( side, trans,
19  p, A,
21 }
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
fla_appiv_t * fla_appiv_cntl_leaf
Definition: FLA_Apply_pivots_cntl_init.c:13

◆ FLA_Apply_pivots_unb_external()

FLA_Error FLA_Apply_pivots_unb_external ( FLA_Side  side,
FLA_Trans  trans,
FLA_Obj  p,
FLA_Obj  A 
)

References F77_claswp(), F77_dlaswp(), F77_slaswp(), F77_zlaswp(), FLA_Apply_pivots_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), FLA_Obj_width(), and i.

Referenced by FLA_Apply_pivots_ln_unb_ext().

14 {
15 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
16  FLA_Datatype datatype;
17  int n_A, cs_A;
18  int m_p;
19  int inc_p;
20  int* buff_p;
21  int k1_1, k2_1;
22  int* pivots_lapack;
23  int i;
24 
25  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
26  FLA_Apply_pivots_check( side, trans, p, A );
27 
28  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
29 
30  datatype = FLA_Obj_datatype( A );
31 
32  n_A = FLA_Obj_width( A );
33  cs_A = FLA_Obj_col_stride( A );
34 
35  inc_p = FLA_Obj_vector_inc( p );
36  m_p = FLA_Obj_vector_dim( p );
37 
38  buff_p = FLA_INT_PTR( p );
39 
40  // Use one-based indices for LAPACK.
41  k1_1 = 1;
42  k2_1 = m_p;
43 
44  // Translate FLAME pivot indices to LAPACK-compatible indices. It is
45  // important to note that this conversion, unlike the one done by
46  // FLA_Shift_pivots_to(), is NOT in-place, but rather done separately
47  // in a temporary buffer.
48 #ifdef FLA_ENABLE_WINDOWS_BUILD
49  pivots_lapack = ( int * ) _alloca( m_p * sizeof( int ) );
50 #else
51  pivots_lapack = ( int * ) alloca( m_p * sizeof( int ) );
52 #endif
53 
54  for ( i = 0; i < m_p; i++ )
55  {
56  pivots_lapack[ i ] = buff_p[ i ] + i + 1;
57  }
58 
59  switch ( datatype ){
60 
61  case FLA_FLOAT:
62  {
63  float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
64 
65  F77_slaswp( &n_A,
66  buff_A, &cs_A,
67  &k1_1,
68  &k2_1,
69  pivots_lapack,
70  &inc_p );
71  break;
72  }
73 
74  case FLA_DOUBLE:
75  {
76  double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
77 
78  F77_dlaswp( &n_A,
79  buff_A, &cs_A,
80  &k1_1,
81  &k2_1,
82  pivots_lapack,
83  &inc_p );
84  break;
85  }
86 
87  case FLA_COMPLEX:
88  {
89  scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
90 
91  F77_claswp( &n_A,
92  buff_A, &cs_A,
93  &k1_1,
94  &k2_1,
95  pivots_lapack,
96  &inc_p );
97  break;
98  }
99 
100  case FLA_DOUBLE_COMPLEX:
101  {
102  dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
103 
104  F77_zlaswp( &n_A,
105  buff_A, &cs_A,
106  &k1_1,
107  &k2_1,
108  pivots_lapack,
109  &inc_p );
110  break;
111  }
112 
113  }
114 #else
115  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
116 #endif
117 
118  return FLA_SUCCESS;
119 }
int F77_zlaswp(int *n, dcomplex *a, int *lda, int *k1, int *k2, int *ipiv, int *incx)
int F77_slaswp(int *n, float *a, int *lda, int *k1, int *k2, int *ipiv, int *incx)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
Definition: blis_type_defs.h:132
FLA_Error FLA_Apply_pivots_check(FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
Definition: FLA_Apply_pivots_check.c:13
int F77_dlaswp(int *n, double *a, int *lda, int *k1, int *k2, int *ipiv, int *incx)
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition: FLA_Query.c:145
int F77_claswp(int *n, scomplex *a, int *lda, int *k1, int *k2, int *ipiv, int *incx)
Definition: blis_type_defs.h:137

◆ FLA_Apply_Q2_UT_check()

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 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), and FLA_Check_valid_trans().

Referenced by FLASH_Apply_Q2_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_leftright_side( side );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_trans( trans );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_valid_direct( direct );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_valid_storev( storev );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_floating_object( D );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_nonconstant_object( D );
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
45  FLA_Check_error_code( e_val );
46 
47  e_val = FLA_Check_square( E );
48  FLA_Check_error_code( e_val );
49 
50  if ( side == FLA_LEFT )
51  {
52  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, D, T );
53  FLA_Check_error_code( e_val );
54 
55  e_val = FLA_Check_conformal_dims( FLA_TRANSPOSE, T, W );
56  FLA_Check_error_code( e_val );
57 
58  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E );
59  FLA_Check_error_code( e_val );
60  }
61  else
62  {
63  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, C, T );
64  FLA_Check_error_code( e_val );
65 
66  e_val = FLA_Check_conformal_dims( FLA_TRANSPOSE, T, W );
67  FLA_Check_error_code( e_val );
68 
69  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E );
70  FLA_Check_error_code( e_val );
71  }
72 
73  return FLA_SUCCESS;
74 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition: FLA_Check.c:87
FLA_Error FLA_Check_valid_direct(FLA_Conj direct)
Definition: FLA_Check.c:123
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_valid_storev(FLA_Conj storev)
Definition: FLA_Check.c:134
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417
FLA_Error FLA_Check_valid_leftright_side(FLA_Side side)
Definition: FLA_Check.c:1124

◆ FLA_Apply_Q2_UT_internal_check()

FLA_Error FLA_Apply_Q2_UT_internal_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,
fla_apq2ut_t cntl 
)

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_elemtype(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Apply_Q2_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
29  FLA_Check_error_code( e_val );
30 
32  FLA_Check_error_code( e_val );
33 
34  // Verify conformality between all the objects.
35  if ( side == FLA_LEFT )
36  {
37  if ( FLA_Obj_elemtype( D ) == FLA_MATRIX )
38  {
39  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, D, T );
40  FLA_Check_error_code( e_val );
41 
42  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, C, W );
43  FLA_Check_error_code( e_val );
44  }
45  else // if ( FLA_Obj_elemtype( D ) == FLA_SCALAR )
46  {
47  //e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, E, C, D );
48  //FLA_Check_error_code( e_val );
49 
51  FLA_Check_error_code( e_val );
52 
54  FLA_Check_error_code( e_val );
55  }
56 
57  //e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, C, E );
58  //FLA_Check_error_code( e_val );
59 
60  }
61  else
62  {
63  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
64  }
65 
66  return FLA_SUCCESS;
67 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039
FLA_Elemtype FLA_Obj_elemtype(FLA_Obj obj)
Definition: FLA_Query.c:51

◆ FLA_Apply_Q2_UT_lhfc_task()

FLA_Error FLA_Apply_Q2_UT_lhfc_task ( FLA_Obj  D,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  C,
FLA_Obj  E,
fla_apq2ut_t cntl 
)

References FLA_Apply_Q2_UT_internal().

26 {
27  return FLA_Apply_Q2_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
28  D, T, W, C, E,
30 }
fla_apq2ut_t * fla_apq2ut_cntl_leaf
Definition: FLA_Apply_Q2_UT_cntl_init.c:18
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_Apply_Q2_UT_task()

FLA_Error FLA_Apply_Q2_UT_task ( 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 
)

References FLA_Apply_Q2_UT_internal().

Referenced by FLA_Apply_CAQ2_UT_internal(), and FLASH_Queue_exec_task().

18 {
19  return FLA_Apply_Q2_UT_internal( side, trans, direct, storev,
20  D, T, W, C, E,
22 }
fla_apq2ut_t * fla_apq2ut_cntl_leaf
Definition: FLA_Apply_Q2_UT_cntl_init.c:18
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_Apply_Q_blk_external()

FLA_Error FLA_Apply_Q_blk_external ( FLA_Side  side,
FLA_Trans  trans,
FLA_Store  storev,
FLA_Obj  A,
FLA_Obj  t,
FLA_Obj  B 
)

References F77_cunmlq(), F77_cunmqr(), F77_dormlq(), F77_dormqr(), F77_sormlq(), F77_sormqr(), F77_zunmlq(), F77_zunmqr(), FLA_Apply_Q_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_side(), FLA_Param_map_flame_to_netlib_trans(), and FLA_Query_blocksize().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  // int m_A, n_A;
19  int m_B, n_B;
20  int cs_A;
21  int cs_B;
22  int k_t;
23  int lwork;
24  char blas_side;
25  char blas_trans;
26  FLA_Obj work_obj;
27 
28  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
29  FLA_Apply_Q_check( side, trans, storev, A, t, B );
30 
31  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
32 
33  datatype = FLA_Obj_datatype( A );
34 
35  // m_A = FLA_Obj_length( A );
36  // n_A = FLA_Obj_width( A );
37  cs_A = FLA_Obj_col_stride( A );
38 
39  m_B = FLA_Obj_length( B );
40  n_B = FLA_Obj_width( B );
41  cs_B = FLA_Obj_col_stride( B );
42 
43  k_t = FLA_Obj_vector_dim( t );
44 
45  FLA_Param_map_flame_to_netlib_side( side, &blas_side );
46  FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
47 
48  if ( side == FLA_LEFT )
49  lwork = n_B * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
50  else
51  lwork = m_B * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
52 
53  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
54 
55 
56  switch( datatype ){
57 
58  case FLA_FLOAT:
59  {
60  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
61  float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
62  float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
63  float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
64 
65  if ( storev == FLA_COLUMNWISE )
66  F77_sormqr( &blas_side,
67  &blas_trans,
68  &m_B,
69  &n_B,
70  &k_t,
71  buff_A, &cs_A,
72  buff_t,
73  buff_B, &cs_B,
74  buff_work, &lwork,
75  &info );
76  else // storev == FLA_ROWWISE
77  F77_sormlq( &blas_side,
78  &blas_trans,
79  &m_B,
80  &n_B,
81  &k_t,
82  buff_A, &cs_A,
83  buff_t,
84  buff_B, &cs_B,
85  buff_work, &lwork,
86  &info );
87 
88  break;
89  }
90 
91  case FLA_DOUBLE:
92  {
93  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
94  double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
95  double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
96  double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
97 
98  if ( storev == FLA_COLUMNWISE )
99  F77_dormqr( &blas_side,
100  &blas_trans,
101  &m_B,
102  &n_B,
103  &k_t,
104  buff_A, &cs_A,
105  buff_t,
106  buff_B, &cs_B,
107  buff_work, &lwork,
108  &info );
109  else // storev == FLA_ROWWISE
110  F77_dormlq( &blas_side,
111  &blas_trans,
112  &m_B,
113  &n_B,
114  &k_t,
115  buff_A, &cs_A,
116  buff_t,
117  buff_B, &cs_B,
118  buff_work, &lwork,
119  &info );
120 
121  break;
122  }
123 
124  case FLA_COMPLEX:
125  {
126  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
127  scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
128  scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
129  scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
130 
131  if ( storev == FLA_COLUMNWISE )
132  F77_cunmqr( &blas_side,
133  &blas_trans,
134  &m_B,
135  &n_B,
136  &k_t,
137  buff_A, &cs_A,
138  buff_t,
139  buff_B, &cs_B,
140  buff_work, &lwork,
141  &info );
142  else // storev == FLA_ROWWISE
143  F77_cunmlq( &blas_side,
144  &blas_trans,
145  &m_B,
146  &n_B,
147  &k_t,
148  buff_A, &cs_A,
149  buff_t,
150  buff_B, &cs_B,
151  buff_work, &lwork,
152  &info );
153 
154  break;
155  }
156 
157  case FLA_DOUBLE_COMPLEX:
158  {
159  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
160  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
161  dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
162  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
163 
164  if ( storev == FLA_COLUMNWISE )
165  F77_zunmqr( &blas_side,
166  &blas_trans,
167  &m_B,
168  &n_B,
169  &k_t,
170  buff_A, &cs_A,
171  buff_t,
172  buff_B, &cs_B,
173  buff_work, &lwork,
174  &info );
175  else // storev == FLA_ROWWISE
176  F77_zunmlq( &blas_side,
177  &blas_trans,
178  &m_B,
179  &n_B,
180  &k_t,
181  buff_A, &cs_A,
182  buff_t,
183  buff_B, &cs_B,
184  buff_work, &lwork,
185  &info );
186 
187  break;
188  }
189 
190  }
191 
192  FLA_Obj_free( &work_obj );
193 #else
194  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
195 #endif
196 
197  return info;
198 }
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
int F77_zunmqr(char *side, char *trans, int *m, int *n, int *k, dcomplex *a, int *lda, dcomplex *tau, dcomplex *c, int *ldc, dcomplex *work, int *lwork, int *info)
int F77_cunmqr(char *side, char *trans, int *m, int *n, int *k, scomplex *a, int *lda, scomplex *tau, scomplex *c, int *ldc, scomplex *work, int *lwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
void FLA_Param_map_flame_to_netlib_side(FLA_Uplo side, void *blas_side)
Definition: FLA_Param.c:71
void FLA_Param_map_flame_to_netlib_trans(FLA_Trans trans, void *blas_trans)
Definition: FLA_Param.c:15
dim_t FLA_Query_blocksize(FLA_Datatype dt, FLA_Dimension dim)
Definition: FLA_Blocksize.c:161
int F77_zunmlq(char *side, char *trans, int *m, int *n, int *k, dcomplex *a, int *lda, dcomplex *tau, dcomplex *c, int *ldc, dcomplex *work, int *lwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Error FLA_Apply_Q_check(FLA_Side side, FLA_Trans trans, FLA_Store storev, FLA_Obj A, FLA_Obj t, FLA_Obj B)
Definition: FLA_Apply_Q_check.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
Definition: blis_type_defs.h:132
int F77_sormlq(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info)
int F77_cunmlq(char *side, char *trans, int *m, int *n, int *k, scomplex *a, int *lda, scomplex *tau, scomplex *c, int *ldc, scomplex *work, int *lwork, int *info)
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_sormqr(char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
int F77_dormlq(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info)
Definition: blis_type_defs.h:137
int F77_dormqr(char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info)

◆ FLA_Apply_Q_check()

FLA_Error FLA_Apply_Q_check ( FLA_Side  side,
FLA_Trans  trans,
FLA_Store  storev,
FLA_Obj  A,
FLA_Obj  t,
FLA_Obj  B 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_complex_trans(), FLA_Check_valid_leftright_side(), FLA_Check_valid_real_trans(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), FLA_Obj_is_real(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Apply_Q_blk_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_leftright_side( side );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_trans( trans );
21  FLA_Check_error_code( e_val );
22 
23  if ( FLA_Obj_is_real( A ) )
24  {
25  e_val = FLA_Check_valid_real_trans( trans );
26  FLA_Check_error_code( e_val );
27  }
28  else
29  {
30  e_val = FLA_Check_valid_complex_trans( trans );
31  FLA_Check_error_code( e_val );
32  }
33 
34  e_val = FLA_Check_valid_storev( storev );
35  FLA_Check_error_code( e_val );
36 
37  e_val = FLA_Check_floating_object( A );
38  FLA_Check_error_code( e_val );
39 
40  e_val = FLA_Check_nonconstant_object( A );
41  FLA_Check_error_code( e_val );
42 
44  FLA_Check_error_code( e_val );
45 
47  FLA_Check_error_code( e_val );
48 
49  if ( side == FLA_LEFT )
50  {
51  if ( storev == FLA_COLUMNWISE )
52  {
54  FLA_Check_error_code( e_val );
55  }
56  else // if ( storev == FLA_ROWWISE )
57  {
59  FLA_Check_error_code( e_val );
60  }
61  }
62  else
63  {
64  if ( storev == FLA_COLUMNWISE )
65  {
67  FLA_Check_error_code( e_val );
68  }
69  else // if ( storev == FLA_ROWWISE )
70  {
72  FLA_Check_error_code( e_val );
73  }
74  }
75 
76  return FLA_SUCCESS;
77 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition: FLA_Check.c:87
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_valid_complex_trans(FLA_Trans trans)
Definition: FLA_Check.c:906
FLA_Error FLA_Check_valid_storev(FLA_Conj storev)
Definition: FLA_Check.c:134
FLA_Error FLA_Check_valid_real_trans(FLA_Trans trans)
Definition: FLA_Check.c:917
FLA_Bool FLA_Obj_is_real(FLA_Obj A)
Definition: FLA_Query.c:307
FLA_Error FLA_Check_valid_leftright_side(FLA_Side side)
Definition: FLA_Check.c:1124
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Apply_Q_UT()

FLA_Error FLA_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 
)

References FLA_Apply_Q_UT_check(), FLA_Apply_Q_UT_internal(), and FLA_Check_error_level().

Referenced by FLA_Hess_UT_blk_var5(), FLA_LQ_UT_solve(), FLA_QR_UT_form_Q(), FLA_QR_UT_form_Q_blk_var1(), and FLA_QR_UT_solve().

17 {
18  FLA_Error r_val;
19 
20  // Check parameters.
21  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22  FLA_Apply_Q_UT_check( side, trans, direct, storev, A, T, W, B );
23 
24  // Invoke FLA_Apply_Q_UT_internal() with the standard control tree.
25  r_val = FLA_Apply_Q_UT_internal( side, trans, direct, storev, A, T, W, B, fla_apqut_cntl_leaf );
26 
27  return r_val;
28 }
int FLA_Error
Definition: FLA_type_defs.h:47
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
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
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
fla_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_check()

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 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Apply_Q_UT(), and FLASH_Apply_Q_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_leftright_side( side );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_trans( trans );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_valid_direct( direct );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_valid_storev( storev );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_floating_object( A );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_nonconstant_object( A );
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
44  if ( side == FLA_LEFT )
45  {
46  //e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( A ) );
47  //FLA_Check_error_code( e_val );
48  //e_val = FLA_Check_object_width_equals( T, FLA_Obj_min_dim( A ) );
49  //FLA_Check_error_code( e_val );
50 
51  if ( storev == FLA_COLUMNWISE )
52  {
54  FLA_Check_error_code( e_val );
55  }
56  else // if ( storev == FLA_ROWWISE )
57  {
59  FLA_Check_error_code( e_val );
60  }
61  }
62  else // if ( side == FLA_RIGHT )
63  {
64  //e_val = FLA_Check_object_width_equals( T, FLA_Obj_min_dim( A ) );
65  //FLA_Check_error_code( e_val );
66 
67  if ( storev == FLA_COLUMNWISE )
68  {
70  FLA_Check_error_code( e_val );
71  }
72  else // if ( storev == FLA_ROWWISE )
73  {
75  FLA_Check_error_code( e_val );
76  }
77  }
78 
79  return FLA_SUCCESS;
80 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition: FLA_Check.c:87
FLA_Error FLA_Check_valid_direct(FLA_Conj direct)
Definition: FLA_Check.c:123
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_valid_storev(FLA_Conj storev)
Definition: FLA_Check.c:134
FLA_Error FLA_Check_valid_leftright_side(FLA_Side side)
Definition: FLA_Check.c:1124
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Apply_Q_UT_inc_check()

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 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLASH_Apply_Q_UT_inc().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_leftright_side( side );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_trans( trans );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_valid_direct( direct );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_valid_storev( storev );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_floating_object( A );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_nonconstant_object( A );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_identical_object_datatype( A, TW );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_identical_object_datatype( A, W1 );
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
44  //e_val = FLA_Check_square( A );
45  //FLA_Check_error_code( e_val );
46 
47  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW );
48  FLA_Check_error_code( e_val );
49 
50  if ( side == FLA_LEFT )
51  {
53  FLA_Check_error_code( e_val );
54  }
55  else
56  {
58  FLA_Check_error_code( e_val );
59  }
60 
61  return FLA_SUCCESS;
62 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition: FLA_Check.c:87
FLA_Error FLA_Check_valid_direct(FLA_Conj direct)
Definition: FLA_Check.c:123
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_valid_storev(FLA_Conj storev)
Definition: FLA_Check.c:134
FLA_Error FLA_Check_valid_leftright_side(FLA_Side side)
Definition: FLA_Check.c:1124
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Apply_Q_UT_inc_internal_check()

FLA_Error FLA_Apply_Q_UT_inc_internal_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,
fla_apqutinc_t cntl 
)

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Apply_Q_UT_inc_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
22  e_val = FLA_Check_identical_object_elemtype( A, TW );
23  FLA_Check_error_code( e_val );
24 
25  e_val = FLA_Check_identical_object_elemtype( A, W1 );
26  FLA_Check_error_code( e_val );
27 
29  FLA_Check_error_code( e_val );
30 
31  // Verify conformality between all the objects. This check works regardless
32  // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
33  // element length and width are used instead of scalar length and width.
34  if ( side == FLA_LEFT )
35  {
36  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW );
37  FLA_Check_error_code( e_val );
38 
40  FLA_Check_error_code( e_val );
41 
42  e_val = FLA_Check_object_width_equals( W1, FLA_Obj_width( B ) );
43  FLA_Check_error_code( e_val );
44  }
45  else
46  {
47  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW );
48  FLA_Check_error_code( e_val );
49 
51  FLA_Check_error_code( e_val );
52 
54  FLA_Check_error_code( e_val );
55  }
56 
57  return FLA_SUCCESS;
58 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Apply_Q_UT_internal_check()

FLA_Error FLA_Apply_Q_UT_internal_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,
fla_apqut_t cntl 
)

References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Apply_Q_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
29  FLA_Check_error_code( e_val );
30 
31  // Verify conformality between all the objects. This check works regardless
32  // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
33  // element length and width are used instead of scalar length and width.
34  if ( side == FLA_LEFT )
35  {
36  if ( storev == FLA_COLUMNWISE )
37  {
39  FLA_Check_error_code( e_val );
40  }
41  else // if ( storev == FLA_ROWWISE )
42  {
44  FLA_Check_error_code( e_val );
45  }
46  }
47  else // if ( side == FLA_RIGHT )
48  {
49  if ( storev == FLA_COLUMNWISE )
50  {
52  FLA_Check_error_code( e_val );
53  }
54  else // if ( storev == FLA_ROWWISE )
55  {
57  FLA_Check_error_code( e_val );
58  }
59  }
60 
61  return FLA_SUCCESS;
62 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Apply_Q_UT_lhbc_task()

FLA_Error FLA_Apply_Q_UT_lhbc_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

23 {
24  return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_BACKWARD, FLA_COLUMNWISE,
25  A, T, W, B,
27 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_lhbr_task()

FLA_Error FLA_Apply_Q_UT_lhbr_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

30 {
31  return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_BACKWARD, FLA_ROWWISE,
32  A, T, W, B,
34 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_lhfc_task()

FLA_Error FLA_Apply_Q_UT_lhfc_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

37 {
38  return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
39  A, T, W, B,
41 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_lhfr_task()

FLA_Error FLA_Apply_Q_UT_lhfr_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

44 {
45  return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_ROWWISE,
46  A, T, W, B,
48 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_lnbc_task()

FLA_Error FLA_Apply_Q_UT_lnbc_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

51 {
52  return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_NO_TRANSPOSE, FLA_BACKWARD, FLA_COLUMNWISE,
53  A, T, W, B,
55 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_lnbr_task()

FLA_Error FLA_Apply_Q_UT_lnbr_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

58 {
59  return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_NO_TRANSPOSE, FLA_BACKWARD, FLA_ROWWISE,
60  A, T, W, B,
62 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_lnfc_task()

FLA_Error FLA_Apply_Q_UT_lnfc_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

65 {
66  return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_NO_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
67  A, T, W, B,
69 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_lnfr_task()

FLA_Error FLA_Apply_Q_UT_lnfr_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

72 {
73  return FLA_Apply_Q_UT_internal( FLA_LEFT, FLA_NO_TRANSPOSE, FLA_FORWARD, FLA_ROWWISE,
74  A, T, W, B,
76 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_rhbc_task()

FLA_Error FLA_Apply_Q_UT_rhbc_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

79 {
80  return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_CONJ_TRANSPOSE, FLA_BACKWARD, FLA_COLUMNWISE,
81  A, T, W, B,
83 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_rhbr_task()

FLA_Error FLA_Apply_Q_UT_rhbr_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

86 {
87  return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_CONJ_TRANSPOSE, FLA_BACKWARD, FLA_ROWWISE,
88  A, T, W, B,
90 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_rhfc_task()

FLA_Error FLA_Apply_Q_UT_rhfc_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

93 {
94  return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
95  A, T, W, B,
97 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_rhfr_task()

FLA_Error FLA_Apply_Q_UT_rhfr_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

100 {
101  return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_ROWWISE,
102  A, T, W, B,
104 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_rnbc_task()

FLA_Error FLA_Apply_Q_UT_rnbc_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

107 {
108  return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_NO_TRANSPOSE, FLA_BACKWARD, FLA_COLUMNWISE,
109  A, T, W, B,
111 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_rnbr_task()

FLA_Error FLA_Apply_Q_UT_rnbr_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

114 {
115  return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_NO_TRANSPOSE, FLA_BACKWARD, FLA_ROWWISE,
116  A, T, W, B,
118 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_rnfc_task()

FLA_Error FLA_Apply_Q_UT_rnfc_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

121 {
122  return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_NO_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
123  A, T, W, B,
125 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_rnfr_task()

FLA_Error FLA_Apply_Q_UT_rnfr_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  B,
fla_apqut_t cntl 
)

References FLA_Apply_Q_UT_internal().

128 {
129  return FLA_Apply_Q_UT_internal( FLA_RIGHT, FLA_NO_TRANSPOSE, FLA_FORWARD, FLA_ROWWISE,
130  A, T, W, B,
132 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_Q_UT_task()

FLA_Error FLA_Apply_Q_UT_task ( 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 
)

References FLA_Apply_Q_UT_internal().

Referenced by FLASH_Queue_exec_task().

16 {
17  return FLA_Apply_Q_UT_internal( side, trans, direct, storev,
18  A, T, W, B,
20 }
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_apqut_t * fla_apqut_cntl_leaf
Definition: FLA_Apply_Q_UT_cntl_init.c:19

◆ FLA_Apply_QUD_UT_check()

FLA_Error FLA_Apply_QUD_UT_check ( FLA_Side  side,
FLA_Trans  trans,
FLA_Direct  direct,
FLA_Store  storev,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  R,
FLA_Obj  U,
FLA_Obj  C,
FLA_Obj  V,
FLA_Obj  D 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), and FLA_Obj_width().

Referenced by FLA_Apply_QUD_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_leftright_side( side );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_trans( trans );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_valid_direct( direct );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_valid_storev( storev );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_floating_object( R );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_nonconstant_object( R );
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
45  FLA_Check_error_code( e_val );
46 
48  FLA_Check_error_code( e_val );
49 
51  FLA_Check_error_code( e_val );
52 
53  if ( side == FLA_LEFT )
54  {
56  FLA_Check_error_code( e_val );
57 
59  FLA_Check_error_code( e_val );
60 
61  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, U, R, C );
62  FLA_Check_error_code( e_val );
63 
64  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, V, R, D );
65  FLA_Check_error_code( e_val );
66  }
67  else
68  {
69  }
70 
71  return FLA_SUCCESS;
72 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition: FLA_Check.c:87
FLA_Error FLA_Check_valid_direct(FLA_Conj direct)
Definition: FLA_Check.c:123
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_valid_storev(FLA_Conj storev)
Definition: FLA_Check.c:134
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417
FLA_Error FLA_Check_valid_leftright_side(FLA_Side side)
Definition: FLA_Check.c:1124

◆ FLA_Apply_QUD_UT_inc_check()

FLA_Error FLA_Apply_QUD_UT_inc_check ( FLA_Side  side,
FLA_Trans  trans,
FLA_Direct  direct,
FLA_Store  storev,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  R,
FLA_Obj  U,
FLA_Obj  C,
FLA_Obj  V,
FLA_Obj  D 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_direct(), FLA_Check_valid_leftright_side(), FLA_Check_valid_storev(), FLA_Check_valid_trans(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLASH_Apply_QUD_UT_inc().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_leftright_side( side );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_trans( trans );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_valid_direct( direct );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_valid_storev( storev );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_floating_object( R );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_nonconstant_object( R );
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
45  FLA_Check_error_code( e_val );
46 
48  FLA_Check_error_code( e_val );
49 
51  FLA_Check_error_code( e_val );
52 
53  if ( side == FLA_LEFT )
54  {
56  FLA_Check_error_code( e_val );
57 
58  e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( U ),
59  FLA_Obj_length( V ) ) );
60  FLA_Check_error_code( e_val );
61 
62  e_val = FLA_Check_conformal_dims( FLA_TRANSPOSE, W, R );
63  FLA_Check_error_code( e_val );
64 
65  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, U, R, C );
66  FLA_Check_error_code( e_val );
67 
68  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, V, R, D );
69  FLA_Check_error_code( e_val );
70  }
71  else
72  {
73  }
74 
75  return FLA_SUCCESS;
76 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition: FLA_Check.c:87
FLA_Error FLA_Check_valid_direct(FLA_Conj direct)
Definition: FLA_Check.c:123
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_valid_storev(FLA_Conj storev)
Definition: FLA_Check.c:134
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417
FLA_Error FLA_Check_valid_leftright_side(FLA_Side side)
Definition: FLA_Check.c:1124
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Apply_QUD_UT_inc_internal_check()

FLA_Error FLA_Apply_QUD_UT_inc_internal_check ( FLA_Side  side,
FLA_Trans  trans,
FLA_Direct  direct,
FLA_Store  storev,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  R,
FLA_Obj  U,
FLA_Obj  C,
FLA_Obj  V,
FLA_Obj  D,
fla_apqudutinc_t cntl 
)

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_matrix_matrix_dims(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Apply_QUD_UT_inc_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
29  FLA_Check_error_code( e_val );
30 
32  FLA_Check_error_code( e_val );
33 
35  FLA_Check_error_code( e_val );
36 
38  FLA_Check_error_code( e_val );
39 
40  // Verify conformality between all the objects.
41  if ( side == FLA_LEFT )
42  {
44  FLA_Check_error_code( e_val );
45 
46  e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( U ),
47  FLA_Obj_length( V ) ) );
48  FLA_Check_error_code( e_val );
49 
50  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, W, R );
51  FLA_Check_error_code( e_val );
52 
53  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, U, R, C );
54  FLA_Check_error_code( e_val );
55 
56  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, V, R, D );
57  FLA_Check_error_code( e_val );
58  }
59  else
60  {
61  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
62  }
63 
64  return FLA_SUCCESS;
65 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Apply_QUD_UT_internal_check()

FLA_Error FLA_Apply_QUD_UT_internal_check ( FLA_Side  side,
FLA_Trans  trans,
FLA_Direct  direct,
FLA_Store  storev,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  R,
FLA_Obj  U,
FLA_Obj  C,
FLA_Obj  V,
FLA_Obj  D,
fla_apqudut_t cntl 
)

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_matrix_matrix_dims(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_elemtype(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Apply_QUD_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
29  FLA_Check_error_code( e_val );
30 
32  FLA_Check_error_code( e_val );
33 
35  FLA_Check_error_code( e_val );
36 
38  FLA_Check_error_code( e_val );
39 
40  // Verify conformality between all the objects.
41  if ( side == FLA_LEFT )
42  {
43  if ( FLA_Obj_elemtype( R ) == FLA_MATRIX )
44  {
46  FLA_Check_error_code( e_val );
47 
48  e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( U ),
49  FLA_Obj_length( V ) ) );
50  FLA_Check_error_code( e_val );
51 
52  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, W, R );
53  FLA_Check_error_code( e_val );
54  }
55  else // FLA_Obj_elemtype( R ) == FLA_SCALAR
56  {
57  }
58 
59  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, U, R, C );
60  FLA_Check_error_code( e_val );
61 
62  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, V, R, D );
63  FLA_Check_error_code( e_val );
64 
65  }
66  else
67  {
68  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
69  }
70 
71  return FLA_SUCCESS;
72 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039
FLA_Elemtype FLA_Obj_elemtype(FLA_Obj obj)
Definition: FLA_Query.c:51

◆ FLA_Apply_QUD_UT_lhfc_task()

FLA_Error FLA_Apply_QUD_UT_lhfc_task ( FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  R,
FLA_Obj  U,
FLA_Obj  C,
FLA_Obj  V,
FLA_Obj  D,
fla_apqudut_t cntl 
)

References FLA_Apply_QUD_UT_internal().

30 {
31  return FLA_Apply_QUD_UT_internal( FLA_LEFT, FLA_CONJ_TRANSPOSE, FLA_FORWARD, FLA_COLUMNWISE,
32  T, W, R, U, C, V, D,
34 }
fla_apqudut_t * fla_apqudut_cntl_leaf
Definition: FLA_Apply_QUD_UT_cntl_init.c:18
FLA_Error FLA_Apply_QUD_UT_internal(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
Definition: FLA_Apply_QUD_UT_internal.c:17

◆ FLA_Apply_QUD_UT_task()

FLA_Error FLA_Apply_QUD_UT_task ( FLA_Side  side,
FLA_Trans  trans,
FLA_Direct  direct,
FLA_Store  storev,
FLA_Obj  T,
FLA_Obj  W,
FLA_Obj  R,
FLA_Obj  U,
FLA_Obj  C,
FLA_Obj  V,
FLA_Obj  D,
fla_apqudut_t cntl 
)

References FLA_Apply_QUD_UT_internal().

Referenced by FLASH_Queue_exec_task().

20 {
21  return FLA_Apply_QUD_UT_internal( side, trans, direct, storev,
22  T, W, R, U, C, V, D,
24 }
fla_apqudut_t * fla_apqudut_cntl_leaf
Definition: FLA_Apply_QUD_UT_cntl_init.c:18
FLA_Error FLA_Apply_QUD_UT_internal(FLA_Side side, FLA_Trans trans, FLA_Direct direct, FLA_Store storev, FLA_Obj T, FLA_Obj W, FLA_Obj R, FLA_Obj U, FLA_Obj C, FLA_Obj V, FLA_Obj D, fla_apqudut_t *cntl)
Definition: FLA_Apply_QUD_UT_internal.c:17

◆ FLA_Bidiag_apply_U_check()

FLA_Error FLA_Bidiag_apply_U_check ( FLA_Side  side,
FLA_Trans  trans,
FLA_Obj  A,
FLA_Obj  t,
FLA_Obj  B 
)

◆ FLA_Bidiag_apply_U_external()

FLA_Error FLA_Bidiag_apply_U_external ( FLA_Side  side,
FLA_Trans  trans,
FLA_Obj  A,
FLA_Obj  t,
FLA_Obj  B 
)

References F77_cunmbr(), F77_dormbr(), F77_sormbr(), F77_zunmbr(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_real(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_side(), FLA_Param_map_flame_to_netlib_trans(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  // int m_A, n_A;
19  int m_B, n_B;
20  int cs_A;
21  int cs_B;
22  int k_t;
23  int lwork;
24  FLA_Obj work;
25  char blas_side;
26  char blas_vect = 'Q';
27  char blas_trans;
28  int i;
29 
30  //if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
31  // FLA_Apply_Q_check( side, trans, storev, A, t, B );
32 
33  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
34 
35  datatype = FLA_Obj_datatype( A );
36 
37  // m_A = FLA_Obj_length( A );
38  // n_A = FLA_Obj_width( A );
39  cs_A = FLA_Obj_col_stride( A );
40 
41  m_B = FLA_Obj_length( B );
42  n_B = FLA_Obj_width( B );
43  cs_B = FLA_Obj_col_stride( B );
44 
45  if ( blas_vect == 'Q' ) k_t = FLA_Obj_vector_dim( t );
46  else k_t = FLA_Obj_vector_dim( t ) + 1;
47 
48  if ( FLA_Obj_is_real( A ) && trans == FLA_CONJ_TRANSPOSE )
49  trans = FLA_TRANSPOSE;
50 
51  FLA_Param_map_flame_to_netlib_side( side, &blas_side );
52  FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
53 
54 
55  // Make a workspace query the first time through. This will provide us with
56  // and ideal workspace size based on an internal block size.
57  lwork = -1;
58  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
59 
60  for ( i = 0; i < 2; ++i )
61  {
62  if ( i == 1 )
63  {
64  // Grab the queried ideal workspace size from the work array, free the
65  // work object, and then re-allocate the workspace with the ideal size.
66  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
67  lwork = ( int ) *FLA_FLOAT_PTR( work );
68  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
69  lwork = ( int ) *FLA_DOUBLE_PTR( work );
70 
71  FLA_Obj_free( &work );
72  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
73  }
74 
75  switch( datatype ){
76 
77  case FLA_FLOAT:
78  {
79  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
80  float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
81  float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
82  float *buff_work = ( float * ) FLA_FLOAT_PTR( work );
83 
84  F77_sormbr( &blas_vect,
85  &blas_side,
86  &blas_trans,
87  &m_B,
88  &n_B,
89  &k_t,
90  buff_A, &cs_A,
91  buff_t,
92  buff_B, &cs_B,
93  buff_work, &lwork,
94  &info );
95 
96  break;
97  }
98 
99  case FLA_DOUBLE:
100  {
101  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
102  double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
103  double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
104  double *buff_work = ( double * ) FLA_DOUBLE_PTR( work );
105 
106  F77_dormbr( &blas_vect,
107  &blas_side,
108  &blas_trans,
109  &m_B,
110  &n_B,
111  &k_t,
112  buff_A, &cs_A,
113  buff_t,
114  buff_B, &cs_B,
115  buff_work, &lwork,
116  &info );
117 
118  break;
119  }
120 
121  case FLA_COMPLEX:
122  {
123  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
124  scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
125  scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
126  scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
127 
128  F77_cunmbr( &blas_vect,
129  &blas_side,
130  &blas_trans,
131  &m_B,
132  &n_B,
133  &k_t,
134  buff_A, &cs_A,
135  buff_t,
136  buff_B, &cs_B,
137  buff_work, &lwork,
138  &info );
139 
140  break;
141  }
142 
143  case FLA_DOUBLE_COMPLEX:
144  {
145  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
146  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
147  dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
148  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
149 
150  F77_zunmbr( &blas_vect,
151  &blas_side,
152  &blas_trans,
153  &m_B,
154  &n_B,
155  &k_t,
156  buff_A, &cs_A,
157  buff_t,
158  buff_B, &cs_B,
159  buff_work, &lwork,
160  &info );
161 
162  break;
163  }
164 
165  }
166  }
167 
168  FLA_Obj_free( &work );
169 #else
170  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
171 #endif
172 
173  return info;
174 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
void FLA_Param_map_flame_to_netlib_side(FLA_Uplo side, void *blas_side)
Definition: FLA_Param.c:71
void FLA_Param_map_flame_to_netlib_trans(FLA_Trans trans, void *blas_trans)
Definition: FLA_Param.c:15
int F77_zunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, dcomplex *a, int *lda, dcomplex *tau, dcomplex *c, int *ldc, dcomplex *work, int *lwork, int *info)
int F77_dormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info)
int F77_cunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, scomplex *a, int *lda, scomplex *tau, scomplex *c, int *ldc, scomplex *work, int *lwork, int *info)
int F77_sormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
Definition: blis_type_defs.h:132
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
FLA_Bool FLA_Obj_is_real(FLA_Obj A)
Definition: FLA_Query.c:307
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_Bidiag_apply_V_check()

FLA_Error FLA_Bidiag_apply_V_check ( FLA_Side  side,
FLA_Trans  trans,
FLA_Obj  A,
FLA_Obj  t,
FLA_Obj  B 
)

◆ FLA_Bidiag_apply_V_external()

FLA_Error FLA_Bidiag_apply_V_external ( FLA_Side  side,
FLA_Trans  trans,
FLA_Obj  A,
FLA_Obj  t,
FLA_Obj  B 
)

References F77_cunmbr(), F77_dormbr(), F77_sormbr(), F77_zunmbr(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_real(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_side(), FLA_Param_map_flame_to_netlib_trans(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  // int m_A, n_A;
19  int m_B, n_B;
20  int cs_A;
21  int cs_B;
22  int k_t;
23  int lwork;
24  FLA_Obj work;
25  char blas_side;
26  char blas_vect = 'P';
27  char blas_trans;
28  int i;
29 
30  //if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
31  // FLA_Apply_Q_check( side, trans, storev, A, t, B );
32 
33  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
34 
35  datatype = FLA_Obj_datatype( A );
36 
37  // m_A = FLA_Obj_length( A );
38  // n_A = FLA_Obj_width( A );
39  cs_A = FLA_Obj_col_stride( A );
40 
41  m_B = FLA_Obj_length( B );
42  n_B = FLA_Obj_width( B );
43  cs_B = FLA_Obj_col_stride( B );
44 
45  if ( blas_vect == 'Q' ) k_t = FLA_Obj_vector_dim( t );
46  else k_t = FLA_Obj_vector_dim( t ) + 1;
47 
48  if ( FLA_Obj_is_real( A ) && trans == FLA_CONJ_TRANSPOSE )
49  trans = FLA_TRANSPOSE;
50 
51  FLA_Param_map_flame_to_netlib_side( side, &blas_side );
52  FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
53 
54 
55  // Make a workspace query the first time through. This will provide us with
56  // and ideal workspace size based on an internal block size.
57  lwork = -1;
58  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
59 
60  for ( i = 0; i < 2; ++i )
61  {
62  if ( i == 1 )
63  {
64  // Grab the queried ideal workspace size from the work array, free the
65  // work object, and then re-allocate the workspace with the ideal size.
66  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
67  lwork = ( int ) *FLA_FLOAT_PTR( work );
68  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
69  lwork = ( int ) *FLA_DOUBLE_PTR( work );
70 
71  FLA_Obj_free( &work );
72  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
73  }
74 
75  switch( datatype ){
76 
77  case FLA_FLOAT:
78  {
79  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
80  float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
81  float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
82  float *buff_work = ( float * ) FLA_FLOAT_PTR( work );
83 
84  F77_sormbr( &blas_vect,
85  &blas_side,
86  &blas_trans,
87  &m_B,
88  &n_B,
89  &k_t,
90  buff_A, &cs_A,
91  buff_t,
92  buff_B, &cs_B,
93  buff_work, &lwork,
94  &info );
95 
96  break;
97  }
98 
99  case FLA_DOUBLE:
100  {
101  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
102  double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
103  double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
104  double *buff_work = ( double * ) FLA_DOUBLE_PTR( work );
105 
106  F77_dormbr( &blas_vect,
107  &blas_side,
108  &blas_trans,
109  &m_B,
110  &n_B,
111  &k_t,
112  buff_A, &cs_A,
113  buff_t,
114  buff_B, &cs_B,
115  buff_work, &lwork,
116  &info );
117 
118  break;
119  }
120 
121  case FLA_COMPLEX:
122  {
123  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
124  scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
125  scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
126  scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
127 
128  F77_cunmbr( &blas_vect,
129  &blas_side,
130  &blas_trans,
131  &m_B,
132  &n_B,
133  &k_t,
134  buff_A, &cs_A,
135  buff_t,
136  buff_B, &cs_B,
137  buff_work, &lwork,
138  &info );
139 
140  break;
141  }
142 
143  case FLA_DOUBLE_COMPLEX:
144  {
145  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
146  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
147  dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
148  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
149 
150  F77_zunmbr( &blas_vect,
151  &blas_side,
152  &blas_trans,
153  &m_B,
154  &n_B,
155  &k_t,
156  buff_A, &cs_A,
157  buff_t,
158  buff_B, &cs_B,
159  buff_work, &lwork,
160  &info );
161 
162  break;
163  }
164 
165  }
166  }
167 
168  FLA_Obj_free( &work );
169 #else
170  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
171 #endif
172 
173  return info;
174 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
void FLA_Param_map_flame_to_netlib_side(FLA_Uplo side, void *blas_side)
Definition: FLA_Param.c:71
void FLA_Param_map_flame_to_netlib_trans(FLA_Trans trans, void *blas_trans)
Definition: FLA_Param.c:15
int F77_zunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, dcomplex *a, int *lda, dcomplex *tau, dcomplex *c, int *ldc, dcomplex *work, int *lwork, int *info)
int F77_dormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info)
int F77_cunmbr(char *vect, char *side, char *trans, int *m, int *n, int *k, scomplex *a, int *lda, scomplex *tau, scomplex *c, int *ldc, scomplex *work, int *lwork, int *info)
int F77_sormbr(char *vect, char *side, char *trans, int *m, int *n, int *k, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
Definition: blis_type_defs.h:132
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
FLA_Bool FLA_Obj_is_real(FLA_Obj A)
Definition: FLA_Query.c:307
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_Bidiag_blk_external()

FLA_Error FLA_Bidiag_blk_external ( FLA_Obj  A,
FLA_Obj  tu,
FLA_Obj  tv 
)

References F77_cgebrd(), F77_dgebrd(), F77_sgebrd(), F77_zgebrd(), FLA_Bidiag_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_max_dim(), FLA_Obj_min_dim(), FLA_Obj_width(), and FLA_Query_blocksize().

Referenced by FLA_Bidiag_blk_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A, n_A, cs_A;
19  int min_m_n, max_m_n;
20  int lwork;
21  FLA_Obj d, e, work_obj;
22 
23  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
24  FLA_Bidiag_check( A, tu, tv );
25 
26  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
27 
28  datatype = FLA_Obj_datatype( A );
29 
30  m_A = FLA_Obj_length( A );
31  n_A = FLA_Obj_width( A );
32  min_m_n = FLA_Obj_min_dim( A );
33  max_m_n = FLA_Obj_max_dim( A );
34  cs_A = FLA_Obj_col_stride( A );
35 
36  FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), min_m_n, 1, 0, 0, &d );
37  FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), min_m_n - 1, 1, 0, 0, &e );
38 
39  lwork = (m_A + n_A) * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
40  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
41 
42 
43  switch( datatype ){
44 
45  case FLA_FLOAT:
46  {
47  float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
48  float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
49  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
50  float* buff_tu = ( float * ) FLA_FLOAT_PTR( tu );
51  float* buff_tv = ( float * ) FLA_FLOAT_PTR( tv );
52  float* buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
53 
54  F77_sgebrd( &m_A,
55  &n_A,
56  buff_A, &cs_A,
57  buff_d,
58  buff_e,
59  buff_tu,
60  buff_tv,
61  buff_work,
62  &lwork,
63  &info );
64 
65  break;
66  }
67 
68  case FLA_DOUBLE:
69  {
70  double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
71  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
72  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
73  double* buff_tu = ( double * ) FLA_DOUBLE_PTR( tu );
74  double* buff_tv = ( double * ) FLA_DOUBLE_PTR( tv );
75  double* buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
76 
77  F77_dgebrd( &m_A,
78  &n_A,
79  buff_A, &cs_A,
80  buff_d,
81  buff_e,
82  buff_tu,
83  buff_tv,
84  buff_work,
85  &lwork,
86  &info );
87 
88  break;
89  }
90 
91  case FLA_COMPLEX:
92  {
93  scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
94  float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
95  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
96  scomplex* buff_tu = ( scomplex * ) FLA_COMPLEX_PTR( tu );
97  scomplex* buff_tv = ( scomplex * ) FLA_COMPLEX_PTR( tv );
98  scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
99 
100  F77_cgebrd( &m_A,
101  &n_A,
102  buff_A, &cs_A,
103  buff_d,
104  buff_e,
105  buff_tu,
106  buff_tv,
107  buff_work,
108  &lwork,
109  &info );
110 
111  break;
112  }
113 
114  case FLA_DOUBLE_COMPLEX:
115  {
116  dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
117  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
118  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
119  dcomplex* buff_tu = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( tu );
120  dcomplex* buff_tv = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( tv );
121  dcomplex* buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
122 
123  F77_zgebrd( &m_A,
124  &n_A,
125  buff_A, &cs_A,
126  buff_d,
127  buff_e,
128  buff_tu,
129  buff_tv,
130  buff_work,
131  &lwork,
132  &info );
133 
134  break;
135  }
136 
137  }
138 
139  FLA_Obj_free( &d );
140  FLA_Obj_free( &e );
141  FLA_Obj_free( &work_obj );
142 #else
143  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
144 #endif
145 
146  return info;
147 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_cgebrd(int *m, int *n, scomplex *a, int *lda, float *d, float *e, scomplex *tauq, scomplex *taup, scomplex *work, int *lwork, int *info)
int F77_dgebrd(int *m, int *n, double *a, int *lda, double *d, double *e, double *tauq, double *taup, double *work, int *lwork, int *info)
dim_t FLA_Query_blocksize(FLA_Datatype dt, FLA_Dimension dim)
Definition: FLA_Blocksize.c:161
FLA_Error FLA_Bidiag_check(FLA_Obj A, FLA_Obj tu, FLA_Obj tv)
Definition: FLA_Bidiag_check.c:13
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
int F77_zgebrd(int *m, int *n, dcomplex *a, int *lda, double *d, double *e, dcomplex *tauq, dcomplex *taup, dcomplex *work, int *lwork, int *info)
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_max_dim(FLA_Obj obj)
Definition: FLA_Query.c:160
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_sgebrd(int *m, int *n, float *a, int *lda, float *d, float *e, float *tauq, float *taup, float *work, int *lwork, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Bidiag_check()

FLA_Error FLA_Bidiag_check ( FLA_Obj  A,
FLA_Obj  tu,
FLA_Obj  tv 
)

References FLA_Check_col_storage(), FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().

Referenced by FLA_Bidiag_blk_external(), and FLA_Bidiag_unb_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_identical_object_datatype( A, tu );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_identical_object_datatype( A, tv );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_col_vector( tu );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_col_storage( tu );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_col_vector( tv );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_col_storage( tv );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_vector_dim( tu, FLA_Obj_min_dim( A ) );
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_vector_dim( tv, FLA_Obj_min_dim( A ) );
45  FLA_Check_error_code( e_val );
46 
47  return FLA_SUCCESS;
48 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_col_storage(FLA_Obj A)
Definition: FLA_Check.c:1325
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_col_vector(FLA_Obj x)
Definition: FLA_Check.c:1233
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Bidiag_form_U_check()

FLA_Error FLA_Bidiag_form_U_check ( FLA_Obj  A,
FLA_Obj  t 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim_min(), and FLA_Obj_length().

Referenced by FLA_Bidiag_form_U_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
26  //e_val = FLA_Check_square( A );
27  //FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_if_vector( t );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
33  FLA_Check_error_code( e_val );
34 
35  return FLA_SUCCESS;
36 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_vector_dim_min(FLA_Obj x, dim_t min_dim)
Definition: FLA_Check.c:740
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Bidiag_form_U_external()

FLA_Error FLA_Bidiag_form_U_external ( FLA_Obj  A,
FLA_Obj  t 
)

References F77_cungbr(), F77_dorgbr(), F77_sorgbr(), F77_zungbr(), FLA_Bidiag_form_U_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_min_dim(), FLA_Obj_vector_dim(), FLA_Obj_width(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A, n_A, k_A;
19  int cs_A;
20  int min_m_n;
21  int lwork;
22  FLA_Obj work;
23  char blas_vect = 'Q';
24  int i;
25 
26  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
28 
29  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
30 
31  datatype = FLA_Obj_datatype( A );
32 
33  m_A = FLA_Obj_length( A );
34  n_A = FLA_Obj_width( A );
35  cs_A = FLA_Obj_col_stride( A );
36 
37  min_m_n = FLA_Obj_min_dim( A );
38 
39  if ( blas_vect == 'Q' ) k_A = FLA_Obj_vector_dim( t );
40  else k_A = FLA_Obj_vector_dim( t ) + 1;
41 
42  // Make a workspace query the first time through. This will provide us with
43  // and ideal workspace size based on an internal block size.
44  lwork = -1;
45  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
46 
47  for ( i = 0; i < 2; ++i )
48  {
49  if ( i == 1 )
50  {
51  // Grab the queried ideal workspace size from the work array, free the
52  // work object, and then re-allocate the workspace with the ideal size.
53  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
54  lwork = ( int ) *FLA_FLOAT_PTR( work );
55  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
56  lwork = ( int ) *FLA_DOUBLE_PTR( work );
57 
58  FLA_Obj_free( &work );
59  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
60  }
61 
62  switch( datatype ){
63 
64  case FLA_FLOAT:
65  {
66  float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
67  float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
68  float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
69 
70  F77_sorgbr( &blas_vect,
71  &m_A,
72  &n_A,
73  &k_A,
74  buff_A, &cs_A,
75  buff_t,
76  buff_work, &lwork,
77  &info );
78 
79  break;
80  }
81 
82  case FLA_DOUBLE:
83  {
84  double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
85  double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
86  double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
87 
88  F77_dorgbr( &blas_vect,
89  &m_A,
90  &n_A,
91  &k_A,
92  buff_A, &cs_A,
93  buff_t,
94  buff_work, &lwork,
95  &info );
96 
97  break;
98  }
99 
100  case FLA_COMPLEX:
101  {
102  scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
103  scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
104  scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
105 
106  F77_cungbr( &blas_vect,
107  &m_A,
108  &n_A,
109  &k_A,
110  buff_A, &cs_A,
111  buff_t,
112  buff_work, &lwork,
113  &info );
114 
115  break;
116  }
117 
118  case FLA_DOUBLE_COMPLEX:
119  {
120  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
121  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
122  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
123 
124  F77_zungbr( &blas_vect,
125  &m_A,
126  &n_A,
127  &k_A,
128  buff_A, &cs_A,
129  buff_t,
130  buff_work, &lwork,
131  &info );
132 
133  break;
134  }
135 
136  }
137 
138  }
139 
140  FLA_Obj_free( &work );
141 #else
142  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
143 #endif
144 
145  return info;
146 }
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
int F77_cungbr(char *vect, int *m, int *n, int *k, scomplex *a, int *lda, scomplex *tau, scomplex *work, int *lwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
int F77_sorgbr(char *vect, int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info)
FLA_Error FLA_Bidiag_form_U_check(FLA_Obj A, FLA_Obj t)
Definition: FLA_Bidiag_form_U_check.c:13
Definition: blis_type_defs.h:132
int F77_zungbr(char *vect, int *m, int *n, int *k, dcomplex *a, int *lda, dcomplex *tau, dcomplex *work, int *lwork, int *info)
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
int F77_dorgbr(char *vect, int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Bidiag_form_V_check()

FLA_Error FLA_Bidiag_form_V_check ( FLA_Obj  A,
FLA_Obj  t 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim_min(), and FLA_Obj_length().

Referenced by FLA_Bidiag_form_V_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
26  //e_val = FLA_Check_square( A );
27  //FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_if_vector( t );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
33  FLA_Check_error_code( e_val );
34 
35  return FLA_SUCCESS;
36 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_vector_dim_min(FLA_Obj x, dim_t min_dim)
Definition: FLA_Check.c:740
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Bidiag_form_V_external()

FLA_Error FLA_Bidiag_form_V_external ( FLA_Obj  A,
FLA_Obj  t 
)

References F77_cungbr(), F77_dorgbr(), F77_sorgbr(), F77_zungbr(), FLA_Bidiag_form_V_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_min_dim(), FLA_Obj_vector_dim(), FLA_Obj_width(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A, n_A, k_A;
19  int cs_A;
20  int min_m_n;
21  int lwork;
22  FLA_Obj work;
23  char blas_vect = 'P';
24  int i;
25 
26  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
28 
29  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
30 
31  datatype = FLA_Obj_datatype( A );
32 
33  m_A = FLA_Obj_length( A );
34  n_A = FLA_Obj_width( A );
35  cs_A = FLA_Obj_col_stride( A );
36 
37  min_m_n = FLA_Obj_min_dim( A );
38 
39  if ( blas_vect == 'Q' ) k_A = FLA_Obj_vector_dim( t );
40  else k_A = FLA_Obj_vector_dim( t ) + 1;
41 
42  // Make a workspace query the first time through. This will provide us with
43  // and ideal workspace size based on an internal block size.
44  lwork = -1;
45  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
46 
47  for ( i = 0; i < 2; ++i )
48  {
49  if ( i == 1 )
50  {
51  // Grab the queried ideal workspace size from the work array, free the
52  // work object, and then re-allocate the workspace with the ideal size.
53  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
54  lwork = ( int ) *FLA_FLOAT_PTR( work );
55  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
56  lwork = ( int ) *FLA_DOUBLE_PTR( work );
57 
58  FLA_Obj_free( &work );
59  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
60  }
61 
62  switch( datatype ){
63 
64  case FLA_FLOAT:
65  {
66  float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
67  float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
68  float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
69 
70  F77_sorgbr( &blas_vect,
71  &m_A,
72  &n_A,
73  &k_A,
74  buff_A, &cs_A,
75  buff_t,
76  buff_work, &lwork,
77  &info );
78 
79  break;
80  }
81 
82  case FLA_DOUBLE:
83  {
84  double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
85  double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
86  double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
87 
88  F77_dorgbr( &blas_vect,
89  &m_A,
90  &n_A,
91  &k_A,
92  buff_A, &cs_A,
93  buff_t,
94  buff_work, &lwork,
95  &info );
96 
97  break;
98  }
99 
100  case FLA_COMPLEX:
101  {
102  scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
103  scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
104  scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
105 
106  F77_cungbr( &blas_vect,
107  &m_A,
108  &n_A,
109  &k_A,
110  buff_A, &cs_A,
111  buff_t,
112  buff_work, &lwork,
113  &info );
114 
115  break;
116  }
117 
118  case FLA_DOUBLE_COMPLEX:
119  {
120  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
121  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
122  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
123 
124  F77_zungbr( &blas_vect,
125  &m_A,
126  &n_A,
127  &k_A,
128  buff_A, &cs_A,
129  buff_t,
130  buff_work, &lwork,
131  &info );
132 
133  break;
134  }
135 
136  }
137 
138  }
139 
140  FLA_Obj_free( &work );
141 #else
142  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
143 #endif
144 
145  return info;
146 }
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
int F77_cungbr(char *vect, int *m, int *n, int *k, scomplex *a, int *lda, scomplex *tau, scomplex *work, int *lwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
FLA_Error FLA_Bidiag_form_V_check(FLA_Obj A, FLA_Obj t)
Definition: FLA_Bidiag_form_V_check.c:13
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
int F77_sorgbr(char *vect, int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info)
Definition: blis_type_defs.h:132
int F77_zungbr(char *vect, int *m, int *n, int *k, dcomplex *a, int *lda, dcomplex *tau, dcomplex *work, int *lwork, int *info)
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
int F77_dorgbr(char *vect, int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Bidiag_unb_external()

FLA_Error FLA_Bidiag_unb_external ( FLA_Obj  A,
FLA_Obj  tu,
FLA_Obj  tv 
)

References F77_cgebd2(), F77_dgebd2(), F77_sgebd2(), F77_zgebd2(), FLA_Bidiag_check(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_max_dim(), FLA_Obj_min_dim(), and FLA_Obj_width().

Referenced by FLA_Bidiag_unb_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A, n_A, cs_A;
19  int min_m_n, max_m_n;
20  int lwork;
21  FLA_Obj d, e, work_obj;
22 
23  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
24  FLA_Bidiag_check( A, tu, tv );
25 
26  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
27 
28  datatype = FLA_Obj_datatype( A );
29 
30  m_A = FLA_Obj_length( A );
31  n_A = FLA_Obj_width( A );
32  min_m_n = FLA_Obj_min_dim( A );
33  max_m_n = FLA_Obj_max_dim( A );
34  cs_A = FLA_Obj_col_stride( A );
35 
36  FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), min_m_n, 1, 0, 0, &d );
37  FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), min_m_n - 1, 1, 0, 0, &e );
38 
39  lwork = max_m_n;
40  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
41 
42 
43  switch( datatype ){
44 
45  case FLA_FLOAT:
46  {
47  float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
48  float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
49  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
50  float* buff_tu = ( float * ) FLA_FLOAT_PTR( tu );
51  float* buff_tv = ( float * ) FLA_FLOAT_PTR( tv );
52  float* buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
53 
54  F77_sgebd2( &m_A,
55  &n_A,
56  buff_A, &cs_A,
57  buff_d,
58  buff_e,
59  buff_tu,
60  buff_tv,
61  buff_work,
62  &info );
63 
64  break;
65  }
66 
67  case FLA_DOUBLE:
68  {
69  double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
70  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
71  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
72  double* buff_tu = ( double * ) FLA_DOUBLE_PTR( tu );
73  double* buff_tv = ( double * ) FLA_DOUBLE_PTR( tv );
74  double* buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
75 
76  F77_dgebd2( &m_A,
77  &n_A,
78  buff_A, &cs_A,
79  buff_d,
80  buff_e,
81  buff_tu,
82  buff_tv,
83  buff_work,
84  &info );
85 
86  break;
87  }
88 
89  case FLA_COMPLEX:
90  {
91  scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
92  float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
93  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
94  scomplex* buff_tu = ( scomplex * ) FLA_COMPLEX_PTR( tu );
95  scomplex* buff_tv = ( scomplex * ) FLA_COMPLEX_PTR( tv );
96  scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
97 
98  F77_cgebd2( &m_A,
99  &n_A,
100  buff_A, &cs_A,
101  buff_d,
102  buff_e,
103  buff_tu,
104  buff_tv,
105  buff_work,
106  &info );
107 
108  break;
109  }
110 
111  case FLA_DOUBLE_COMPLEX:
112  {
113  dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
114  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
115  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
116  dcomplex* buff_tu = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( tu );
117  dcomplex* buff_tv = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( tv );
118  dcomplex* buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
119 
120  F77_zgebd2( &m_A,
121  &n_A,
122  buff_A, &cs_A,
123  buff_d,
124  buff_e,
125  buff_tu,
126  buff_tv,
127  buff_work,
128  &info );
129 
130  break;
131  }
132 
133  }
134 
135  FLA_Obj_free( &d );
136  FLA_Obj_free( &e );
137  FLA_Obj_free( &work_obj );
138 #else
139  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
140 #endif
141 
142  return info;
143 }
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
int F77_cgebd2(int *m, int *n, scomplex *a, int *lda, float *d, float *e, scomplex *tauq, scomplex *taup, scomplex *work, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
FLA_Error FLA_Bidiag_check(FLA_Obj A, FLA_Obj tu, FLA_Obj tv)
Definition: FLA_Bidiag_check.c:13
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
int F77_zgebd2(int *m, int *n, dcomplex *a, int *lda, double *d, double *e, dcomplex *tauq, dcomplex *taup, dcomplex *work, int *info)
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
int F77_sgebd2(int *m, int *n, float *a, int *lda, float *d, float *e, float *tauq, float *taup, float *work, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_max_dim(FLA_Obj obj)
Definition: FLA_Query.c:160
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_dgebd2(int *m, int *n, double *a, int *lda, double *d, double *e, double *tauq, double *taup, double *work, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Bidiag_UT_check()

FLA_Error FLA_Bidiag_UT_check ( FLA_Obj  A,
FLA_Obj  TU,
FLA_Obj  TV 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_min_dim().

Referenced by FLA_Bidiag_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_identical_object_datatype( A, TU );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_identical_object_datatype( A, TV );
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
38  return FLA_SUCCESS;
39 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Bidiag_UT_extract_diagonals_check()

FLA_Error FLA_Bidiag_UT_extract_diagonals_check ( FLA_Obj  A,
FLA_Obj  d,
FLA_Obj  e 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().

Referenced by FLA_Bidiag_UT_extract_diagonals().

14 {
15  FLA_Error e_val;
16  dim_t min_m_n;
17 
18  e_val = FLA_Check_floating_object( A );
19  FLA_Check_error_code( e_val );
20 
21  e_val = FLA_Check_nonconstant_object( A );
22  FLA_Check_error_code( e_val );
23 
24  min_m_n = FLA_Obj_min_dim( A );
25 
26  e_val = FLA_Check_nonconstant_object( d );
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_if_vector( d );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_vector_dim( d, min_m_n );
36  FLA_Check_error_code( e_val );
37 
38  if ( min_m_n > 1 )
39  {
40  e_val = FLA_Check_nonconstant_object( e );
41  FLA_Check_error_code( e_val );
42 
44  FLA_Check_error_code( e_val );
45 
46  e_val = FLA_Check_if_vector( e );
47  FLA_Check_error_code( e_val );
48 
49  e_val = FLA_Check_vector_dim( e, min_m_n - 1 );
50  FLA_Check_error_code( e_val );
51  }
52 
53  return FLA_SUCCESS;
54 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
unsigned long dim_t
Definition: FLA_type_defs.h:71
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Bidiag_UT_extract_real_diagonals_check()

FLA_Error FLA_Bidiag_UT_extract_real_diagonals_check ( FLA_Obj  A,
FLA_Obj  d,
FLA_Obj  e 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().

Referenced by FLA_Bidiag_UT_extract_real_diagonals().

14 {
15  FLA_Error e_val;
16  dim_t min_m_n;
17 
18  e_val = FLA_Check_floating_object( A );
19  FLA_Check_error_code( e_val );
20 
21  e_val = FLA_Check_nonconstant_object( A );
22  FLA_Check_error_code( e_val );
23 
24  min_m_n = FLA_Obj_min_dim( A );
25 
26  e_val = FLA_Check_nonconstant_object( d );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_real_object( d );
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_if_vector( d );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_vector_dim( d, min_m_n );
39  FLA_Check_error_code( e_val );
40 
41  if ( min_m_n != 1 )
42  {
43  e_val = FLA_Check_nonconstant_object( e );
44  FLA_Check_error_code( e_val );
45 
46  e_val = FLA_Check_real_object( e );
47  FLA_Check_error_code( e_val );
48 
50  FLA_Check_error_code( e_val );
51 
52  e_val = FLA_Check_if_vector( e );
53  FLA_Check_error_code( e_val );
54 
55  e_val = FLA_Check_vector_dim( e, min_m_n - 1 );
56  FLA_Check_error_code( e_val );
57  }
58 
59  return FLA_SUCCESS;
60 }
unsigned long dim_t
Definition: FLA_type_defs.h:71
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Bidiag_UT_form_U_check()

FLA_Error FLA_Bidiag_UT_form_U_check ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  U 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Bidiag_UT_form_U().

14 {
15  FLA_Error e_val;
16  dim_t m_A, n_A;
17 
18  e_val = FLA_Check_floating_object( A );
19  FLA_Check_error_code( e_val );
20 
21  e_val = FLA_Check_nonconstant_object( A );
22  FLA_Check_error_code( e_val );
23 
25  FLA_Check_error_code( e_val );
26 
28  FLA_Check_error_code( e_val );
29 
30  // U is not necessary to be square.
31  // e_val = FLA_Check_square( U );
32  // FLA_Check_error_code( e_val );
33 
34  m_A = FLA_Obj_length( A );
35  n_A = FLA_Obj_width( A );
36 
37  // Form U has no problem in overwriting on A which contains house holder vectors
38  // on the lower triangular of the diagonal or subdiagonal.
39  if ( m_A >= n_A )
40  {
41  e_val = FLA_Check_object_width_equals( T, n_A );
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_object_length_equals( U, m_A );
45  FLA_Check_error_code( e_val );
46  }
47  else
48  {
49  e_val = FLA_Check_object_width_equals( T, m_A );
50  FLA_Check_error_code( e_val );
51 
52  e_val = FLA_Check_object_length_equals( U, m_A );
53  FLA_Check_error_code( e_val );
54  }
55 
56  return FLA_SUCCESS;
57 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
unsigned long dim_t
Definition: FLA_type_defs.h:71
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Bidiag_UT_form_V_check()

FLA_Error FLA_Bidiag_UT_form_V_check ( FLA_Obj  A,
FLA_Obj  S,
FLA_Obj  V 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Bidiag_UT_form_V().

14 {
15  FLA_Error e_val;
16  dim_t m_A, n_A;
17 
18  e_val = FLA_Check_floating_object( A );
19  FLA_Check_error_code( e_val );
20 
21  e_val = FLA_Check_nonconstant_object( A );
22  FLA_Check_error_code( e_val );
23 
25  FLA_Check_error_code( e_val );
26 
28  FLA_Check_error_code( e_val );
29 
30  // U is not necessary to be square.
31  // e_val = FLA_Check_square( V );
32  // FLA_Check_error_code( e_val );
33 
34 
35  m_A = FLA_Obj_length( A );
36  n_A = FLA_Obj_width( A );
37 
38  // Form V (not V^H) has a problem that dimensions are mismatched
39  // when it overwrites on A that contains house holder vectors on
40  // the uppper triangular of the diagonal or subdiagonal.
41  if ( m_A >= n_A )
42  {
43  e_val = FLA_Check_object_width_equals( T, n_A );
44  FLA_Check_error_code( e_val );
45 
46  e_val = FLA_Check_object_width_equals( V, n_A );
47  FLA_Check_error_code( e_val );
48  }
49  else
50  {
51  e_val = FLA_Check_object_width_equals( T, m_A );
52  FLA_Check_error_code( e_val );
53 
54  e_val = FLA_Check_object_length_equals( V, n_A );
55  FLA_Check_error_code( e_val );
56  }
57 
58  return FLA_SUCCESS;
59 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
unsigned long dim_t
Definition: FLA_type_defs.h:71
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Bidiag_UT_internal_check()

FLA_Error FLA_Bidiag_UT_internal_check ( FLA_Obj  A,
FLA_Obj  TU,
FLA_Obj  TV,
fla_bidiagut_t cntl 
)

References FLA_Check_identical_object_elemtype(), and FLA_Check_null_pointer().

Referenced by FLA_Bidiag_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
22  e_val = FLA_Check_identical_object_elemtype( A, TU );
23  FLA_Check_error_code( e_val );
24 
25  e_val = FLA_Check_identical_object_elemtype( A, TV );
26  FLA_Check_error_code( e_val );
27 
28  return FLA_SUCCESS;
29 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_Bidiag_UT_realify_check()

FLA_Error FLA_Bidiag_UT_realify_check ( FLA_Obj  A,
FLA_Obj  d,
FLA_Obj  e 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().

Referenced by FLA_Bidiag_UT_realify().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_if_vector( d );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_if_vector( e );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_vector_dim( d, FLA_Obj_min_dim( A ) );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_vector_dim( e, FLA_Obj_min_dim( A ) );
39  FLA_Check_error_code( e_val );
40 
41  return FLA_SUCCESS;
42 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Bidiag_UT_realify_diagonals_check()

FLA_Error FLA_Bidiag_UT_realify_diagonals_check ( FLA_Uplo  uplo,
FLA_Obj  a,
FLA_Obj  b,
FLA_Obj  d,
FLA_Obj  e 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_vector_dim().

Referenced by FLA_Bidiag_UT_realify_diagonals().

14 {
15  FLA_Error e_val;
16  dim_t m_a;
17 
18  e_val = FLA_Check_valid_uplo( uplo );
19  FLA_Check_error_code( e_val );
20 
21  e_val = FLA_Check_floating_object( a );
22  FLA_Check_error_code( e_val );
23 
24  e_val = FLA_Check_if_vector( a );
25  FLA_Check_error_code( e_val );
26 
27  m_a = FLA_Obj_vector_dim( a );
28 
29  if ( m_a > 1 )
30  {
31  e_val = FLA_Check_floating_object( b );
32  FLA_Check_error_code( e_val );
33 
34  e_val = FLA_Check_if_vector( b );
35  FLA_Check_error_code( e_val );
36  }
37 
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_if_vector( d );
42  FLA_Check_error_code( e_val );
43 
45  FLA_Check_error_code( e_val );
46 
47  e_val = FLA_Check_if_vector( e );
48  FLA_Check_error_code( e_val );
49 
50  e_val = FLA_Check_vector_dim( d, m_a );
51  FLA_Check_error_code( e_val );
52 
53  e_val = FLA_Check_vector_dim( e, m_a );
54  FLA_Check_error_code( e_val );
55 
56  return FLA_SUCCESS;
57 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
unsigned long dim_t
Definition: FLA_type_defs.h:71
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Bidiag_UT_recover_tau_check()

FLA_Error FLA_Bidiag_UT_recover_tau_check ( FLA_Obj  TU,
FLA_Obj  TV,
FLA_Obj  tu,
FLA_Obj  tv 
)

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_object_width_equals(), FLA_Obj_vector_dim(), and FLA_Obj_width().

Referenced by FLA_Bidiag_UT_recover_tau().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( TU );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_consistent_object_datatype( TU, TV );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_consistent_object_datatype( TU, tu );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_consistent_object_datatype( TU, tv );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_if_vector( tu );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_if_vector( tv );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_object_width_equals( TU, FLA_Obj_width( TV ) );
36  FLA_Check_error_code( e_val );
37 
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
44  return FLA_SUCCESS;
45 }
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
FLA_Error FLA_Check_consistent_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:339

◆ FLA_Bidiag_UT_scale_diagonals_check()

FLA_Error FLA_Bidiag_UT_scale_diagonals_check ( FLA_Obj  alpha,
FLA_Obj  A 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), and FLA_Check_real_object().

Referenced by FLA_Bidiag_UT_scale_diagonals().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_real_object( alpha );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_if_scalar( alpha );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_identical_object_precision( A, alpha );
30  FLA_Check_error_code( e_val );
31 
32  return FLA_SUCCESS;
33 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_if_scalar(FLA_Obj A)
Definition: FLA_Check.c:373

◆ FLA_Bsvd_check()

FLA_Error FLA_Bsvd_check ( FLA_Uplo  uplo,
FLA_Obj  d,
FLA_Obj  e,
FLA_Obj  G,
FLA_Obj  H,
FLA_Svd_type  jobu,
FLA_Obj  U,
FLA_Svd_type  jobv,
FLA_Obj  V 
)

References FLA_Check_complex_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_real_object(), FLA_Check_valid_svd_type(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), FLA_Obj_has_zero_dim(), and FLA_Obj_vector_dim().

Referenced by FLA_Bsvd(), and FLA_Bsvd_ext_check().

17 {
18  FLA_Error e_val = FLA_SUCCESS;
19  dim_t m_d, m_e;
20 
21  e_val = FLA_Check_valid_uplo( uplo );
22  FLA_Check_error_code( e_val );
23 
24  e_val = FLA_Check_real_object( d );
25  FLA_Check_error_code( e_val );
26 
27  e_val = FLA_Check_nonconstant_object( d );
28  FLA_Check_error_code( e_val );
29 
30  m_d = FLA_Obj_vector_dim( d );
31  m_e = ( m_d - 1 );
32 
33  if ( m_e > 0 )
34  {
35  e_val = FLA_Check_real_object( e );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_nonconstant_object( e );
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_vector_dim( e, m_e );
45  FLA_Check_error_code( e_val );
46  }
47 
48  if ( m_e > 0 )
49  {
50  e_val = FLA_Check_complex_object( G );
51  FLA_Check_error_code( e_val );
52 
54  FLA_Check_error_code( e_val );
55 
56  e_val = FLA_Check_object_length_equals( G, m_e );
57  FLA_Check_error_code( e_val );
58  }
59 
60  if ( m_e > 0 )
61  {
62  e_val = FLA_Check_complex_object( H );
63  FLA_Check_error_code( e_val );
64 
66  FLA_Check_error_code( e_val );
67 
68  e_val = FLA_Check_object_length_equals( H, m_e );
69  FLA_Check_error_code( e_val );
70  }
71 
73  FLA_Check_error_code( e_val );
74 
76  FLA_Check_error_code( e_val );
77 
78  if ( jobu != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( U ) == FALSE )
79  {
81  FLA_Check_error_code( e_val );
82  }
83 
84  if ( jobv != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( V ) == FALSE )
85  {
87  FLA_Check_error_code( e_val );
88  }
89 
90  return FLA_SUCCESS;
91 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
unsigned long dim_t
Definition: FLA_type_defs.h:71
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
FLA_Error FLA_Check_valid_svd_type(FLA_Svd_type svd_type)
Definition: FLA_Check.c:1254
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
FLA_Error FLA_Check_complex_object(FLA_Obj A)
Definition: FLA_Check.c:285
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Bsvd_compute_scaling_check()

FLA_Error FLA_Bsvd_compute_scaling_check ( FLA_Obj  d,
FLA_Obj  e,
FLA_Obj  sigma 
)

◆ FLA_Bsvd_ext_check()

FLA_Error FLA_Bsvd_ext_check ( FLA_Uplo  uplo,
FLA_Obj  d,
FLA_Obj  e,
FLA_Obj  G,
FLA_Obj  H,
FLA_Svd_type  jobu,
FLA_Obj  U,
FLA_Svd_type  jobv,
FLA_Obj  V,
FLA_Bool  apply_Uh2C,
FLA_Obj  C 
)

References FLA_Bsvd_check(), FLA_Check_identical_object_datatype(), FLA_Check_object_length_equals(), and FLA_Obj_length().

Referenced by FLA_Bsvd_ext().

18 {
19  FLA_Error e_val = FLA_SUCCESS;
20 
21  FLA_Bsvd_check( uplo, d, e, G, H, jobu, U, jobv, V );
22 
23  if ( apply_Uh2C != FALSE )
24  {
26  FLA_Check_error_code( e_val );
27 
29  FLA_Check_error_code( e_val );
30  }
31 
32  return FLA_SUCCESS;
33 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Bsvd_check(FLA_Uplo uplo, FLA_Obj d, FLA_Obj e, FLA_Obj G, FLA_Obj H, FLA_Svd_type jobu, FLA_Obj U, FLA_Svd_type jobv, FLA_Obj V)
Definition: FLA_Bsvd_check.c:13
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Bsvd_external()

FLA_Error FLA_Bsvd_external ( FLA_Uplo  uplo,
FLA_Obj  d,
FLA_Obj  e,
FLA_Obj  U,
FLA_Obj  V 
)

References F77_cbdsqr(), F77_dbdsqr(), F77_sbdsqr(), F77_zbdsqr(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), and FLA_Param_map_flame_to_netlib_uplo().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  FLA_Datatype dt_real;
19  int m_U, cs_U;
20  int n_V, cs_V;
21  int n_C, cs_C;
22  int min_m_n;
23  int inc_d, inc_e;
24  int lrwork;
25  FLA_Obj rwork;
26  char blas_uplo;
27 
28  //if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
29  // FLA_Hevd_check( jobz, uplo, A, e );
30 
31  if ( FLA_Obj_has_zero_dim( d ) ) return FLA_SUCCESS;
32 
33  datatype = FLA_Obj_datatype( U );
34  dt_real = FLA_Obj_datatype_proj_to_real( U );
35 
36  m_U = FLA_Obj_length( U );
37  cs_U = FLA_Obj_col_stride( U );
38 
39  n_V = FLA_Obj_length( V );
40  cs_V = FLA_Obj_col_stride( V );
41 
42  n_C = 0;
43  cs_C = 1;
44 
45  min_m_n = FLA_Obj_vector_dim( d );
46 
47  inc_d = FLA_Obj_vector_inc( d );
48  inc_e = FLA_Obj_vector_inc( e );
49 
50  lrwork = max( 1, 4 * min_m_n - 4 );
51  FLA_Obj_create( dt_real, lrwork, 1, 0, 0, &rwork );
52 
53  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
54 
55  switch( datatype ) {
56 
57  case FLA_FLOAT:
58  {
59  float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
60  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
61  float* buff_U = ( float * ) FLA_FLOAT_PTR( U );
62  float* buff_V = ( float * ) FLA_FLOAT_PTR( V );
63  float* buff_C = ( float * ) NULL;
64  float* buff_rwork = ( float * ) FLA_FLOAT_PTR( rwork );
65 
66  F77_sbdsqr( &blas_uplo,
67  &min_m_n,
68  &n_V,
69  &m_U,
70  &n_C,
71  buff_d,
72  buff_e,
73  buff_V, &cs_V,
74  buff_U, &cs_U,
75  buff_C, &cs_C,
76  buff_rwork,
77  &info );
78 
79  break;
80  }
81 
82  case FLA_DOUBLE:
83  {
84  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
85  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
86  double* buff_U = ( double * ) FLA_DOUBLE_PTR( U );
87  double* buff_V = ( double * ) FLA_DOUBLE_PTR( V );
88  double* buff_C = ( double * ) NULL;
89  double* buff_rwork = ( double * ) FLA_DOUBLE_PTR( rwork );
90 
91  F77_dbdsqr( &blas_uplo,
92  &min_m_n,
93  &n_V,
94  &m_U,
95  &n_C,
96  buff_d,
97  buff_e,
98  buff_V, &cs_V,
99  buff_U, &cs_U,
100  buff_C, &cs_C,
101  buff_rwork,
102  &info );
103 
104  break;
105  }
106 
107  case FLA_COMPLEX:
108  {
109  float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
110  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
111  scomplex* buff_U = ( scomplex * ) FLA_COMPLEX_PTR( U );
112  scomplex* buff_V = ( scomplex * ) FLA_COMPLEX_PTR( V );
113  scomplex* buff_C = ( scomplex * ) NULL;
114  float* buff_rwork = ( float * ) FLA_FLOAT_PTR( rwork );
115 
116  F77_cbdsqr( &blas_uplo,
117  &min_m_n,
118  &n_V,
119  &m_U,
120  &n_C,
121  buff_d,
122  buff_e,
123  buff_V, &cs_V,
124  buff_U, &cs_U,
125  buff_C, &cs_C,
126  buff_rwork,
127  &info );
128 
129  break;
130  }
131 
132  case FLA_DOUBLE_COMPLEX:
133  {
134  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
135  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
136  dcomplex* buff_U = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( U );
137  dcomplex* buff_V = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( V );
138  dcomplex* buff_C = ( dcomplex * ) NULL;
139  double* buff_rwork = ( double * ) FLA_DOUBLE_PTR( rwork );
140 
141  F77_zbdsqr( &blas_uplo,
142  &min_m_n,
143  &n_V,
144  &m_U,
145  &n_C,
146  buff_d,
147  buff_e,
148  buff_V, &cs_V,
149  buff_U, &cs_U,
150  buff_C, &cs_C,
151  buff_rwork,
152  &info );
153 
154  break;
155  }
156 
157  }
158 
159  FLA_Obj_free( &rwork );
160 
161 #else
162  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
163 #endif
164 
165  return info;
166 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
int F77_zbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, double *d, double *e, dcomplex *vt, int *ldvt, dcomplex *u, int *ldu, dcomplex *c, int *ldc, double *rwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
int F77_sbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, float *d, float *e, float *vt, int *ldvt, float *u, int *ldu, float *c, int *ldc, float *rwork, int *info)
Definition: blis_type_defs.h:132
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_cbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, float *d, float *e, scomplex *vt, int *ldvt, scomplex *u, int *ldu, scomplex *c, int *ldc, float *rwork, int *info)
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition: FLA_Query.c:145
int F77_dbdsqr(char *uplo, int *n, int *ncvt, int *nru, int *ncc, double *d, double *e, double *vt, int *ldvt, double *u, int *ldu, double *c, int *ldc, double *rwork, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_Bsvdd_external()

FLA_Error FLA_Bsvdd_external ( FLA_Uplo  uplo,
FLA_Obj  d,
FLA_Obj  e,
FLA_Obj  U,
FLA_Obj  V 
)

References F77_dbdsdc(), F77_sbdsdc(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), and FLA_Param_map_flame_to_netlib_uplo().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  FLA_Datatype dt_real;
19  int m_U, cs_U;
20  int n_V, cs_V;
21  int n_C, cs_C;
22  int min_m_n;
23  int inc_d, inc_e;
24  int lwork, liwork;
25  FLA_Obj work, iwork;
26  char blas_uplo;
27  char blas_compq = 'I';
28 
29  //if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
30  // FLA_Bsvd_check( uplo, d, e, U, V );
31 
32  if ( FLA_Obj_has_zero_dim( d ) ) return FLA_SUCCESS;
33 
34  datatype = FLA_Obj_datatype( U );
35  dt_real = FLA_Obj_datatype_proj_to_real( U );
36 
37  m_U = FLA_Obj_length( U );
38  cs_U = FLA_Obj_col_stride( U );
39 
40  n_V = FLA_Obj_length( V );
41  cs_V = FLA_Obj_col_stride( V );
42 
43  n_C = 0;
44  cs_C = 1;
45 
46  min_m_n = FLA_Obj_vector_dim( d );
47 
48  inc_d = FLA_Obj_vector_inc( d );
49  inc_e = FLA_Obj_vector_inc( e );
50 
51  lwork = max( 1, 3*min_m_n*min_m_n + 4*min_m_n );
52  liwork = 8*min_m_n;
53 
54  FLA_Obj_create( dt_real, lwork, 1, 0, 0, &work );
55  FLA_Obj_create( FLA_INT, liwork, 1, 0, 0, &iwork );
56 
57  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
58 
59  switch( datatype ) {
60 
61  case FLA_FLOAT:
62  {
63  float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
64  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
65  float* buff_U = ( float * ) FLA_FLOAT_PTR( U );
66  float* buff_V = ( float * ) FLA_FLOAT_PTR( V );
67  float* buff_Q = ( float * ) NULL;
68  float* buff_IQ = ( float * ) NULL;
69  float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
70  int* buff_iwork = ( int * ) FLA_INT_PTR( iwork );
71 
72  F77_sbdsdc( &blas_uplo,
73  &blas_compq,
74  &min_m_n,
75  buff_d,
76  buff_e,
77  buff_U, &cs_U,
78  buff_V, &cs_V,
79  buff_Q,
80  buff_IQ,
81  buff_work,
82  buff_iwork,
83  &info );
84 
85  break;
86  }
87 
88  case FLA_DOUBLE:
89  {
90  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
91  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
92  double* buff_U = ( double * ) FLA_DOUBLE_PTR( U );
93  double* buff_V = ( double * ) FLA_DOUBLE_PTR( V );
94  double* buff_Q = ( double * ) NULL;
95  double* buff_IQ = ( double * ) NULL;
96  double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
97  int* buff_iwork = ( int * ) FLA_INT_PTR( iwork );
98 
99  F77_dbdsdc( &blas_uplo,
100  &blas_compq,
101  &min_m_n,
102  buff_d,
103  buff_e,
104  buff_U, &cs_U,
105  buff_V, &cs_V,
106  buff_Q,
107  buff_IQ,
108  buff_work,
109  buff_iwork,
110  &info );
111 
112  break;
113  }
114 
115  }
116 
117  FLA_Obj_free( &work );
118  FLA_Obj_free( &iwork );
119 
120 #else
121  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
122 #endif
123 
124  return info;
125 }
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
int F77_dbdsdc(char *uplo, char *compq, int *n, double *d, double *e, double *u, int *ldu, double *vt, int *ldvt, double *q, double *iq, double *work, int *iwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
int F77_sbdsdc(char *uplo, char *compq, int *n, float *d, float *e, float *u, int *ldu, float *vt, int *ldvt, float *q, float *iq, float *work, int *iwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition: FLA_Query.c:145
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_CAQR2_UT_check()

FLA_Error FLA_CAQR2_UT_check ( FLA_Obj  B,
FLA_Obj  D,
FLA_Obj  T 
)

◆ FLA_CAQR2_UT_internal_check()

FLA_Error FLA_CAQR2_UT_internal_check ( FLA_Obj  B,
FLA_Obj  D,
FLA_Obj  T,
fla_caqr2ut_t cntl 
)

References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_equals(), and FLA_Obj_width().

Referenced by FLA_CAQR2_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
28  // Verify conformality between all the objects. This check works regardless
29  // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
30  // element length and width are used instead of scalar length and width.
32  FLA_Check_error_code( e_val );
33 
35  FLA_Check_error_code( e_val );
36 
37  return FLA_SUCCESS;
38 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_CAQR2_UT_task()

FLA_Error FLA_CAQR2_UT_task ( FLA_Obj  B,
FLA_Obj  D,
FLA_Obj  T,
fla_caqr2ut_t cntl 
)

References FLA_CAQR2_UT_internal().

Referenced by FLASH_Queue_exec_task().

16 {
17  return FLA_CAQR2_UT_internal( B, D, T,
19 }
FLA_Error FLA_CAQR2_UT_internal(FLA_Obj U, FLA_Obj D, FLA_Obj T, fla_caqr2ut_t *cntl)
Definition: FLA_CAQR2_UT_internal.c:16
fla_caqr2ut_t * fla_caqr2ut_cntl_leaf
Definition: FLA_CAQR2_UT_cntl_init.c:20

◆ FLA_CAQR_UT_inc_check()

FLA_Error FLA_CAQR_UT_inc_check ( dim_t  p,
FLA_Obj  A,
FLA_Obj  ATW,
FLA_Obj  R,
FLA_Obj  RTW 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_min(), and FLA_Obj_width().

Referenced by FLASH_CAQR_UT_inc_noopt().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_identical_object_datatype( A, ATW );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_identical_object_datatype( A, RTW );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, ATW );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, R );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, RTW );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_object_length_min( A, FLA_Obj_width( A ) * p );
42  FLA_Check_error_code( e_val );
43 
44  return FLA_SUCCESS;
45 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_object_length_min(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1059

◆ FLA_CAQR_UT_inc_solve_check()

FLA_Error FLA_CAQR_UT_inc_solve_check ( dim_t  p,
FLA_Obj  A,
FLA_Obj  ATW,
FLA_Obj  R,
FLA_Obj  RTW,
FLA_Obj  B,
FLA_Obj  X 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_length_min(), and FLA_Obj_width().

Referenced by FLASH_CAQR_UT_inc_solve().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_identical_object_datatype( A, ATW );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_identical_object_datatype( A, RTW );
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, ATW );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, R );
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, RTW );
45  FLA_Check_error_code( e_val );
46 
47  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
48  FLA_Check_error_code( e_val );
49 
50  e_val = FLA_Check_object_length_min( A, FLA_Obj_width( A ) * p );
51  FLA_Check_error_code( e_val );
52 
53  return FLA_SUCCESS;
54 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_object_length_min(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1059
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417

◆ FLA_Chol()

FLA_Error FLA_Chol ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References FLA_Check_error_level(), FLA_Chol_check(), and FLA_Chol_internal().

17 {
18  FLA_Error r_val;
19 
20  // Check parameters.
21  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22  FLA_Chol_check( uplo, A );
23 
24  // Invoke FLA_Chol_internal() with the appropriate control tree.
25  r_val = FLA_Chol_internal( uplo, A, fla_chol_cntl2 );
26  //r_val = FLA_Chol_internal( uplo, A, fla_chol_cntl );
27 
28  return r_val;
29 }
int FLA_Error
Definition: FLA_type_defs.h:47
fla_chol_t * fla_chol_cntl2
Definition: FLA_Chol_cntl_init.c:17
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
FLA_Error FLA_Chol_check(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Chol_check.c:13
FLA_Error FLA_Chol_internal(FLA_Uplo uplo, FLA_Obj A, fla_chol_t *cntl)
Definition: FLA_Chol_internal.c:16

◆ FLA_Chol_blk_external()

FLA_Error FLA_Chol_blk_external ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References F77_cpotrf(), F77_dpotrf(), F77_spotrf(), F77_zpotrf(), FLA_Check_error_level(), FLA_Chol_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), and FLA_Param_map_flame_to_netlib_uplo().

Referenced by FLA_Chol_l_blk_ext(), FLA_Chol_u_blk_ext(), and FLA_SPDinv_blk_external().

14 {
15  FLA_Error r_val = FLA_SUCCESS;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  int info;
18  FLA_Datatype datatype;
19  int m_A, cs_A;
20  char blas_uplo;
21 
22  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23  FLA_Chol_check( uplo, A );
24 
25  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26 
27  datatype = FLA_Obj_datatype( A );
28 
29  m_A = FLA_Obj_length( A );
30  cs_A = FLA_Obj_col_stride( A );
31 
32  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
33 
34 
35  switch( datatype ){
36 
37  case FLA_FLOAT:
38  {
39  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
40 
41  F77_spotrf( &blas_uplo,
42  &m_A,
43  buff_A, &cs_A,
44  &info );
45 
46  break;
47  }
48 
49  case FLA_DOUBLE:
50  {
51  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
52 
53  F77_dpotrf( &blas_uplo,
54  &m_A,
55  buff_A, &cs_A,
56  &info );
57 
58  break;
59  }
60 
61  case FLA_COMPLEX:
62  {
63  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
64 
65  F77_cpotrf( &blas_uplo,
66  &m_A,
67  buff_A, &cs_A,
68  &info );
69 
70  break;
71  }
72 
73  case FLA_DOUBLE_COMPLEX:
74  {
75  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
76 
77  F77_zpotrf( &blas_uplo,
78  &m_A,
79  buff_A, &cs_A,
80  &info );
81 
82  break;
83  }
84 
85  }
86 
87  // Convert to zero-based indexing, if an index was reported.
88  if ( info > 0 ) r_val = info - 1;
89  else r_val = FLA_SUCCESS;
90 
91 #else
92  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
93 #endif
94 
95  return r_val;
96 }
int F77_cpotrf(char *uplo, int *n, scomplex *a, int *lda, int *info)
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
Definition: blis_type_defs.h:132
int F77_zpotrf(char *uplo, int *n, dcomplex *a, int *lda, int *info)
int F77_spotrf(char *uplo, int *n, float *a, int *lda, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
FLA_Error FLA_Chol_check(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Chol_check.c:13
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_dpotrf(char *uplo, int *n, double *a, int *lda, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_Chol_check()

FLA_Error FLA_Chol_check ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().

Referenced by FLA_Chol(), FLA_Chol_blk_external(), FLA_Chol_unb_external(), and FLASH_Chol().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_square( A );
27  FLA_Check_error_code( e_val );
28 
29  return FLA_SUCCESS;
30 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Chol_internal_check()

FLA_Error FLA_Chol_internal_check ( FLA_Uplo  uplo,
FLA_Obj  A,
fla_chol_t cntl 
)

References FLA_Check_null_pointer().

Referenced by FLA_Chol_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  return FLA_SUCCESS;
22 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_Chol_l_blk_ext()

FLA_Error FLA_Chol_l_blk_ext ( FLA_Obj  A)

References FLA_Chol_blk_external().

Referenced by FLA_Chol_l().

99 {
100  return FLA_Chol_blk_external( FLA_LOWER_TRIANGULAR, A );
101 }
FLA_Error FLA_Chol_blk_external(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Chol_blk_external.c:13

◆ FLA_Chol_l_task()

FLA_Error FLA_Chol_l_task ( FLA_Obj  A,
fla_chol_t cntl 
)

References FLA_Chol_internal().

22 {
23  //return FLA_Chol_unb_external( FLA_LOWER_TRIANGULAR, A );
24  return FLA_Chol_internal( FLA_LOWER_TRIANGULAR, A,
26 }
fla_chol_t * fla_chol_cntl_leaf
Definition: FLA_Chol_cntl_init.c:20
FLA_Error FLA_Chol_internal(FLA_Uplo uplo, FLA_Obj A, fla_chol_t *cntl)
Definition: FLA_Chol_internal.c:16

◆ FLA_Chol_l_unb_ext()

FLA_Error FLA_Chol_l_unb_ext ( FLA_Obj  A)

References FLA_Chol_unb_external().

Referenced by FLA_Chol_l().

99 {
100  return FLA_Chol_unb_external( FLA_LOWER_TRIANGULAR, A );
101 }
FLA_Error FLA_Chol_unb_external(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Chol_unb_external.c:13

◆ FLA_Chol_solve_check()

FLA_Error FLA_Chol_solve_check ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  X 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().

Referenced by FLA_Chol_solve(), and FLASH_Chol_solve().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_square( A );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
36  FLA_Check_error_code( e_val );
37 
38  return FLA_SUCCESS;
39 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Chol_task()

FLA_Error FLA_Chol_task ( FLA_Uplo  uplo,
FLA_Obj  A,
fla_chol_t cntl 
)

References FLA_Chol_internal().

Referenced by FLASH_Queue_exec_task().

16 {
17  return FLA_Chol_internal( uplo, A,
19 }
fla_chol_t * fla_chol_cntl_leaf
Definition: FLA_Chol_cntl_init.c:20
FLA_Error FLA_Chol_internal(FLA_Uplo uplo, FLA_Obj A, fla_chol_t *cntl)
Definition: FLA_Chol_internal.c:16

◆ FLA_Chol_u_blk_ext()

FLA_Error FLA_Chol_u_blk_ext ( FLA_Obj  A)

References FLA_Chol_blk_external().

Referenced by FLA_Chol_u().

104 {
105  return FLA_Chol_blk_external( FLA_UPPER_TRIANGULAR, A );
106 }
FLA_Error FLA_Chol_blk_external(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Chol_blk_external.c:13

◆ FLA_Chol_u_task()

FLA_Error FLA_Chol_u_task ( FLA_Obj  A,
fla_chol_t cntl 
)

References FLA_Chol_internal().

29 {
30  //return FLA_Chol_unb_external( FLA_UPPER_TRIANGULAR, A );
31  return FLA_Chol_internal( FLA_UPPER_TRIANGULAR, A,
33 }
fla_chol_t * fla_chol_cntl_leaf
Definition: FLA_Chol_cntl_init.c:20
FLA_Error FLA_Chol_internal(FLA_Uplo uplo, FLA_Obj A, fla_chol_t *cntl)
Definition: FLA_Chol_internal.c:16

◆ FLA_Chol_u_unb_ext()

FLA_Error FLA_Chol_u_unb_ext ( FLA_Obj  A)

References FLA_Chol_unb_external().

Referenced by FLA_Chol_u().

104 {
105  return FLA_Chol_unb_external( FLA_UPPER_TRIANGULAR, A );
106 }
FLA_Error FLA_Chol_unb_external(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Chol_unb_external.c:13

◆ FLA_Chol_unb_external()

FLA_Error FLA_Chol_unb_external ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References F77_cpotf2(), F77_dpotf2(), F77_spotf2(), F77_zpotf2(), FLA_Check_error_level(), FLA_Chol_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), and FLA_Param_map_flame_to_netlib_uplo().

Referenced by FLA_Chol_l_unb_ext(), and FLA_Chol_u_unb_ext().

14 {
15  FLA_Error r_val = FLA_SUCCESS;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  int info;
18  FLA_Datatype datatype;
19  int m_A, cs_A;
20  char blas_uplo;
21 
22  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23  FLA_Chol_check( uplo, A );
24 
25  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26 
27  datatype = FLA_Obj_datatype( A );
28 
29  m_A = FLA_Obj_length( A );
30  cs_A = FLA_Obj_col_stride( A );
31 
32  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
33 
34 
35  switch( datatype ){
36 
37  case FLA_FLOAT:
38  {
39  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
40 
41  F77_spotf2( &blas_uplo,
42  &m_A,
43  buff_A, &cs_A,
44  &info );
45 
46  break;
47  }
48 
49  case FLA_DOUBLE:
50  {
51  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
52 
53  F77_dpotf2( &blas_uplo,
54  &m_A,
55  buff_A, &cs_A,
56  &info );
57 
58  break;
59  }
60 
61  case FLA_COMPLEX:
62  {
63  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
64 
65  F77_cpotf2( &blas_uplo,
66  &m_A,
67  buff_A, &cs_A,
68  &info );
69 
70  break;
71  }
72 
73  case FLA_DOUBLE_COMPLEX:
74  {
75  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
76 
77  F77_zpotf2( &blas_uplo,
78  &m_A,
79  buff_A, &cs_A,
80  &info );
81 
82  break;
83  }
84 
85  }
86 
87  // Convert to zero-based indexing, if an index was reported.
88  if ( info > 0 ) r_val = info - 1;
89  else r_val = FLA_SUCCESS;
90 
91 #else
92  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
93 #endif
94 
95  return r_val;
96 }
int F77_zpotf2(char *uplo, int *n, dcomplex *a, int *lda, int *info)
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
int F77_dpotf2(char *uplo, int *n, double *a, int *lda, int *info)
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
Definition: blis_type_defs.h:132
int F77_spotf2(char *uplo, int *n, float *a, int *lda, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
FLA_Error FLA_Chol_check(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Chol_check.c:13
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_cpotf2(char *uplo, int *n, scomplex *a, int *lda, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_Eig_gest()

FLA_Error FLA_Eig_gest ( FLA_Inv  inv,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Check_error_level(), FLA_Eig_gest_check(), FLA_Eig_gest_internal(), FLA_Obj_create_conf_to(), and FLA_Obj_free().

17 {
18  FLA_Obj Y;
19  FLA_Error r_val;
20 
21  // Check parameters.
22  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
23  FLA_Eig_gest_check( inv, uplo, A, B );
24 
25  FLA_Obj_create_conf_to( FLA_NO_TRANSPOSE, A, &Y );
26 
27  // Invoke FLA_Eig_gest_internal() with the appropriate control tree.
28  if ( inv == FLA_INVERSE )
29  r_val = FLA_Eig_gest_internal( inv, uplo, A, Y, B, fla_eig_gest_ix_cntl );
30  else
31  r_val = FLA_Eig_gest_internal( inv, uplo, A, Y, B, fla_eig_gest_nx_cntl );
32 
33  FLA_Obj_free( &Y );
34 
35  return r_val;
36 }
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
fla_eig_gest_t * fla_eig_gest_ix_cntl
Definition: FLA_Eig_gest_cntl_init.c:20
fla_eig_gest_t * fla_eig_gest_nx_cntl
Definition: FLA_Eig_gest_cntl_init.c:21
int FLA_Error
Definition: FLA_type_defs.h:47
Definition: FLA_type_defs.h:158
FLA_Error FLA_Obj_create_conf_to(FLA_Trans trans, FLA_Obj old, FLA_Obj *obj)
Definition: FLA_Obj.c:286
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
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

◆ FLA_Eig_gest_blk_external()

FLA_Error FLA_Eig_gest_blk_external ( FLA_Inv  inv,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  B 
)

References F77_chegst(), F77_dsygst(), F77_ssygst(), F77_zhegst(), FLA_Check_error_level(), FLA_Eig_gest_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), and FLA_Param_map_flame_to_netlib_uplo().

Referenced by FLA_Eig_gest_il_blk_ext(), FLA_Eig_gest_iu_blk_ext(), FLA_Eig_gest_nl_blk_ext(), and FLA_Eig_gest_nu_blk_ext().

14 {
15  FLA_Error r_val = FLA_SUCCESS;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  int itype;
18  int info;
19  FLA_Datatype datatype;
20  int m_A, cs_A;
21  int cs_B;
22  char blas_uplo;
23 
24  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
25  FLA_Eig_gest_check( inv, uplo, A, B );
26 
27 // if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
28 
29  if ( inv == FLA_INVERSE )
30  itype = 1;
31  else
32  itype = 2;
33 
34  datatype = FLA_Obj_datatype( A );
35 
36  m_A = FLA_Obj_length( A );
37  cs_A = FLA_Obj_col_stride( A );
38  cs_B = FLA_Obj_col_stride( B );
39 
40  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
41 
42 
43  switch( datatype ){
44 
45  case FLA_FLOAT:
46  {
47  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
48  float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
49 
50  F77_ssygst( &itype,
51  &blas_uplo,
52  &m_A,
53  buff_A, &cs_A,
54  buff_B, &cs_B,
55  &info );
56 
57  break;
58  }
59 
60  case FLA_DOUBLE:
61  {
62  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
63  double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
64 
65  F77_dsygst( &itype,
66  &blas_uplo,
67  &m_A,
68  buff_A, &cs_A,
69  buff_B, &cs_B,
70  &info );
71 
72  break;
73  }
74 
75  case FLA_COMPLEX:
76  {
77  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
78  scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
79 
80  F77_chegst( &itype,
81  &blas_uplo,
82  &m_A,
83  buff_A, &cs_A,
84  buff_B, &cs_B,
85  &info );
86 
87  break;
88  }
89 
90  case FLA_DOUBLE_COMPLEX:
91  {
92  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
93  dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
94 
95  F77_zhegst( &itype,
96  &blas_uplo,
97  &m_A,
98  buff_A, &cs_A,
99  buff_B, &cs_B,
100  &info );
101 
102  break;
103  }
104 
105  }
106 
107 #else
108  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
109 #endif
110 
111  return r_val;
112 }
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
int F77_ssygst(int *itype, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, int *info)
int F77_dsygst(int *itype, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, int *info)
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
int F77_chegst(int *itype, char *uplo, int *n, scomplex *a, int *lda, scomplex *b, int *ldb, int *info)
Definition: blis_type_defs.h:132
int F77_zhegst(int *itype, char *uplo, int *n, dcomplex *a, int *lda, dcomplex *b, int *ldb, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137
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

◆ FLA_Eig_gest_check()

FLA_Error FLA_Eig_gest_check ( FLA_Inv  inv,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_inverse(), and FLA_Check_valid_uplo().

Referenced by FLA_Eig_gest(), FLA_Eig_gest_blk_external(), FLA_Eig_gest_unb_external(), and FLASH_Eig_gest().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_inverse( inv );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_uplo( uplo );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_floating_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_nonconstant_object( A );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_square( A );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_floating_object( B );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_nonconstant_object( B );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_square( B );
39  FLA_Check_error_code( e_val );
40 
41  return FLA_SUCCESS;
42 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_valid_inverse(FLA_Inv inv)
Definition: FLA_Check.c:145
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Eig_gest_il_blk_ext()

FLA_Error FLA_Eig_gest_il_blk_ext ( FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Eig_gest_blk_external().

Referenced by FLA_Eig_gest_il().

115 {
116  return FLA_Eig_gest_blk_external( FLA_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
117 }
FLA_Error FLA_Eig_gest_blk_external(FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition: FLA_Eig_gest_blk_external.c:13

◆ FLA_Eig_gest_il_task()

FLA_Error FLA_Eig_gest_il_task ( FLA_Obj  A,
FLA_Obj  Y,
FLA_Obj  B,
fla_eig_gest_t cntl 
)

References FLA_Eig_gest_internal().

30 {
31  //return FLA_Eig_gest_unb_external( FLA_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
32  return FLA_Eig_gest_internal( FLA_INVERSE, FLA_LOWER_TRIANGULAR, A, Y, B,
34 }
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_eig_gest_t * fla_eig_gest_ix_cntl_leaf
Definition: FLA_Eig_gest_cntl_init.c:22

◆ FLA_Eig_gest_il_unb_ext()

FLA_Error FLA_Eig_gest_il_unb_ext ( FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Eig_gest_unb_external().

Referenced by FLA_Eig_gest_il().

115 {
116  return FLA_Eig_gest_unb_external( FLA_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
117 }
FLA_Error FLA_Eig_gest_unb_external(FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition: FLA_Eig_gest_unb_external.c:13

◆ FLA_Eig_gest_internal_check()

FLA_Error FLA_Eig_gest_internal_check ( FLA_Inv  inv,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  Y,
FLA_Obj  B,
fla_eig_gest_t cntl 
)

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_Eig_gest_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
28  // Verify conformality between all the objects. This check works regardless
29  // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
30  // element length and width are used instead of scalar length and width.
31  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, B );
32  FLA_Check_error_code( e_val );
33 
34  if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT1 ||
35  FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT2 )
36  {
38  FLA_Check_error_code( e_val );
39  }
40  else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT4 ||
41  FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT5 )
42  {
44  FLA_Check_error_code( e_val );
45  }
46  else if ( FLA_Cntl_variant( cntl ) == FLA_BLOCKED_VARIANT3 )
47  {
48  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, Y, A );
49  FLA_Check_error_code( e_val );
50  }
51 
52  return FLA_SUCCESS;
53 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Eig_gest_iu_blk_ext()

FLA_Error FLA_Eig_gest_iu_blk_ext ( FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Eig_gest_blk_external().

Referenced by FLA_Eig_gest_iu().

120 {
121  return FLA_Eig_gest_blk_external( FLA_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
122 }
FLA_Error FLA_Eig_gest_blk_external(FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition: FLA_Eig_gest_blk_external.c:13

◆ FLA_Eig_gest_iu_task()

FLA_Error FLA_Eig_gest_iu_task ( FLA_Obj  A,
FLA_Obj  Y,
FLA_Obj  B,
fla_eig_gest_t cntl 
)

References FLA_Eig_gest_internal().

37 {
38  //return FLA_Eig_gest_unb_external( FLA_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
39  return FLA_Eig_gest_internal( FLA_INVERSE, FLA_UPPER_TRIANGULAR, A, Y, B,
41 }
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_eig_gest_t * fla_eig_gest_ix_cntl_leaf
Definition: FLA_Eig_gest_cntl_init.c:22

◆ FLA_Eig_gest_iu_unb_ext()

FLA_Error FLA_Eig_gest_iu_unb_ext ( FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Eig_gest_unb_external().

Referenced by FLA_Eig_gest_iu().

120 {
121  return FLA_Eig_gest_unb_external( FLA_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
122 }
FLA_Error FLA_Eig_gest_unb_external(FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition: FLA_Eig_gest_unb_external.c:13

◆ FLA_Eig_gest_nl_blk_ext()

FLA_Error FLA_Eig_gest_nl_blk_ext ( FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Eig_gest_blk_external().

Referenced by FLA_Eig_gest_nl().

125 {
126  return FLA_Eig_gest_blk_external( FLA_NO_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
127 }
FLA_Error FLA_Eig_gest_blk_external(FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition: FLA_Eig_gest_blk_external.c:13

◆ FLA_Eig_gest_nl_task()

FLA_Error FLA_Eig_gest_nl_task ( FLA_Obj  A,
FLA_Obj  Y,
FLA_Obj  B,
fla_eig_gest_t cntl 
)

References FLA_Eig_gest_internal().

44 {
45  //return FLA_Eig_gest_unb_external( FLA_NO_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
46  return FLA_Eig_gest_internal( FLA_NO_INVERSE, FLA_LOWER_TRIANGULAR, A, Y, B,
48 }
fla_eig_gest_t * fla_eig_gest_nx_cntl_leaf
Definition: FLA_Eig_gest_cntl_init.c:23
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_Eig_gest_nl_unb_ext()

FLA_Error FLA_Eig_gest_nl_unb_ext ( FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Eig_gest_unb_external().

Referenced by FLA_Eig_gest_nl().

125 {
126  return FLA_Eig_gest_unb_external( FLA_NO_INVERSE, FLA_LOWER_TRIANGULAR, A, B );
127 }
FLA_Error FLA_Eig_gest_unb_external(FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition: FLA_Eig_gest_unb_external.c:13

◆ FLA_Eig_gest_nu_blk_ext()

FLA_Error FLA_Eig_gest_nu_blk_ext ( FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Eig_gest_blk_external().

Referenced by FLA_Eig_gest_nu().

130 {
131  return FLA_Eig_gest_blk_external( FLA_NO_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
132 }
FLA_Error FLA_Eig_gest_blk_external(FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition: FLA_Eig_gest_blk_external.c:13

◆ FLA_Eig_gest_nu_task()

FLA_Error FLA_Eig_gest_nu_task ( FLA_Obj  A,
FLA_Obj  Y,
FLA_Obj  B,
fla_eig_gest_t cntl 
)

References FLA_Eig_gest_internal().

51 {
52  //return FLA_Eig_gest_unb_external( FLA_NO_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
53  return FLA_Eig_gest_internal( FLA_NO_INVERSE, FLA_UPPER_TRIANGULAR, A, Y, B,
55 }
fla_eig_gest_t * fla_eig_gest_nx_cntl_leaf
Definition: FLA_Eig_gest_cntl_init.c:23
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_Eig_gest_nu_unb_ext()

FLA_Error FLA_Eig_gest_nu_unb_ext ( FLA_Obj  A,
FLA_Obj  B 
)

References FLA_Eig_gest_unb_external().

Referenced by FLA_Eig_gest_nu().

130 {
131  return FLA_Eig_gest_unb_external( FLA_NO_INVERSE, FLA_UPPER_TRIANGULAR, A, B );
132 }
FLA_Error FLA_Eig_gest_unb_external(FLA_Inv inv, FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition: FLA_Eig_gest_unb_external.c:13

◆ FLA_Eig_gest_task()

FLA_Error FLA_Eig_gest_task ( FLA_Inv  inv,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  Y,
FLA_Obj  B,
fla_eig_gest_t cntl 
)

References FLA_Eig_gest_internal(), fla_eig_gest_ix_cntl_leaf, and fla_eig_gest_nx_cntl_leaf.

Referenced by FLASH_Queue_exec_task().

17 {
18  fla_eig_gest_t* cntl_leaf;
19 
20  if ( inv == FLA_INVERSE )
21  cntl_leaf = fla_eig_gest_ix_cntl_leaf;
22  else
23  cntl_leaf = fla_eig_gest_nx_cntl_leaf;
24 
25  return FLA_Eig_gest_internal( inv, uplo, A, Y, B,
26  cntl_leaf );
27 }
fla_eig_gest_t * fla_eig_gest_nx_cntl_leaf
Definition: FLA_Eig_gest_cntl_init.c:23
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_eig_gest_t * fla_eig_gest_ix_cntl_leaf
Definition: FLA_Eig_gest_cntl_init.c:22
Definition: FLA_Cntl_lapack.h:355

◆ FLA_Eig_gest_unb_external()

FLA_Error FLA_Eig_gest_unb_external ( FLA_Inv  inv,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  B 
)

References F77_chegs2(), F77_dsygs2(), F77_ssygs2(), F77_zhegs2(), FLA_Check_error_level(), FLA_Eig_gest_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), and FLA_Param_map_flame_to_netlib_uplo().

Referenced by FLA_Eig_gest_il_unb_ext(), FLA_Eig_gest_iu_unb_ext(), FLA_Eig_gest_nl_unb_ext(), and FLA_Eig_gest_nu_unb_ext().

14 {
15  FLA_Error r_val = FLA_SUCCESS;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  int itype;
18  int info;
19  FLA_Datatype datatype;
20  int m_A, cs_A;
21  int cs_B;
22  char blas_uplo;
23 
24  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
25  FLA_Eig_gest_check( inv, uplo, A, B );
26 
27 // if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
28 
29  if ( inv == FLA_INVERSE )
30  itype = 1;
31  else
32  itype = 2;
33 
34  datatype = FLA_Obj_datatype( A );
35 
36  m_A = FLA_Obj_length( A );
37  cs_A = FLA_Obj_col_stride( A );
38  cs_B = FLA_Obj_col_stride( B );
39 
40  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
41 
42 
43  switch( datatype ){
44 
45  case FLA_FLOAT:
46  {
47  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
48  float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
49 
50  F77_ssygs2( &itype,
51  &blas_uplo,
52  &m_A,
53  buff_A, &cs_A,
54  buff_B, &cs_B,
55  &info );
56 
57  break;
58  }
59 
60  case FLA_DOUBLE:
61  {
62  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
63  double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
64 
65  F77_dsygs2( &itype,
66  &blas_uplo,
67  &m_A,
68  buff_A, &cs_A,
69  buff_B, &cs_B,
70  &info );
71 
72  break;
73  }
74 
75  case FLA_COMPLEX:
76  {
77  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
78  scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
79 
80  F77_chegs2( &itype,
81  &blas_uplo,
82  &m_A,
83  buff_A, &cs_A,
84  buff_B, &cs_B,
85  &info );
86 
87  break;
88  }
89 
90  case FLA_DOUBLE_COMPLEX:
91  {
92  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
93  dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
94 
95  F77_zhegs2( &itype,
96  &blas_uplo,
97  &m_A,
98  buff_A, &cs_A,
99  buff_B, &cs_B,
100  &info );
101 
102  break;
103  }
104 
105  }
106 
107 #else
108  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
109 #endif
110 
111  return r_val;
112 }
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: blis_type_defs.h:132
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
int F77_zhegs2(int *itype, char *uplo, int *n, dcomplex *a, int *lda, dcomplex *b, int *ldb, int *info)
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137
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
int F77_ssygs2(int *itype, char *uplo, int *n, float *a, int *lda, float *b, int *ldb, int *info)
int F77_dsygs2(int *itype, char *uplo, int *n, double *a, int *lda, double *b, int *ldb, int *info)
int F77_chegs2(int *itype, char *uplo, int *n, scomplex *a, int *lda, scomplex *b, int *ldb, int *info)

◆ FLA_FS_incpiv_check()

FLA_Error FLA_FS_incpiv_check ( FLA_Obj  A,
FLA_Obj  p,
FLA_Obj  L,
FLA_Obj  b 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_square(), and FLA_Obj_length().

Referenced by FLASH_FS_incpiv().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_int_object( p );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_nonconstant_object( p );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_square( A );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, p );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, L );
42  FLA_Check_error_code( e_val );
43 
44  //e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B );
45  //FLA_Check_error_code( e_val );
46 
47  // Until we update FS_incpiv to support multiple right-hand sides, we force B
48  // to have only one column (ie: we force B to be a vector).
50  FLA_Check_error_code( e_val );
51 
52  e_val = FLA_Check_object_width_equals( B, 1 );
53  FLA_Check_error_code( e_val );
54 
55 
56  return FLA_SUCCESS;
57 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_int_object(FLA_Obj A)
Definition: FLA_Check.c:245
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Hess_blk_external()

FLA_Error FLA_Hess_blk_external ( FLA_Obj  A,
FLA_Obj  t,
int  ilo,
int  ihi 
)

References F77_cgehrd(), F77_dgehrd(), F77_sgehrd(), F77_zgehrd(), FLA_Check_error_level(), FLA_Hess_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_width(), and FLA_Query_blocksize().

Referenced by FLA_Hess_blk_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int n_A, cs_A;
19  int lwork;
20  FLA_Obj work_obj;
21 
22  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23  FLA_Hess_check( A, t, ilo, ihi );
24 
25  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26 
27  datatype = FLA_Obj_datatype( A );
28 
29  n_A = FLA_Obj_width( A );
30  cs_A = FLA_Obj_col_stride( A );
31 
32  lwork = n_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
33 
34  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
35 
36  // Shift ilo and ihi from zero-based indexing to one-based indexing.
37  ilo += 1;
38  ihi += 1;
39 
40  switch( datatype ){
41 
42  case FLA_FLOAT:
43  {
44  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
45  float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
46  float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
47 
48  F77_sgehrd( &n_A,
49  &ilo,
50  &ihi,
51  buff_A, &cs_A,
52  buff_t,
53  buff_work,
54  &lwork,
55  &info );
56 
57  break;
58  }
59 
60  case FLA_DOUBLE:
61  {
62  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
63  double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
64  double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
65 
66  F77_dgehrd( &n_A,
67  &ilo,
68  &ihi,
69  buff_A, &cs_A,
70  buff_t,
71  buff_work,
72  &lwork,
73  &info );
74 
75  break;
76  }
77 
78  case FLA_COMPLEX:
79  {
80  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
81  scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
82  scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
83 
84  F77_cgehrd( &n_A,
85  &ilo,
86  &ihi,
87  buff_A, &cs_A,
88  buff_t,
89  buff_work,
90  &lwork,
91  &info );
92 
93  break;
94  }
95 
96  case FLA_DOUBLE_COMPLEX:
97  {
98  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
99  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
100  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
101 
102  F77_zgehrd( &n_A,
103  &ilo,
104  &ihi,
105  buff_A, &cs_A,
106  buff_t,
107  buff_work,
108  &lwork,
109  &info );
110 
111  break;
112  }
113 
114  }
115 
116  FLA_Obj_free( &work_obj );
117 #else
118  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
119 #endif
120 
121  return info;
122 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_dgehrd(int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *work, int *lwork, int *info)
dim_t FLA_Query_blocksize(FLA_Datatype dt, FLA_Dimension dim)
Definition: FLA_Blocksize.c:161
int F77_zgehrd(int *n, int *ilo, int *ihi, dcomplex *a, int *lda, dcomplex *tau, dcomplex *work, int *lwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
Definition: blis_type_defs.h:132
FLA_Error FLA_Hess_check(FLA_Obj A, FLA_Obj t, int ilo, int ihi)
Definition: FLA_Hess_check.c:13
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int F77_cgehrd(int *n, int *ilo, int *ihi, scomplex *a, int *lda, scomplex *tau, scomplex *work, int *lwork, int *info)
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
Definition: blis_type_defs.h:137
int F77_sgehrd(int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *work, int *lwork, int *info)

◆ FLA_Hess_check()

FLA_Error FLA_Hess_check ( FLA_Obj  A,
FLA_Obj  t,
int  ilo,
int  ihi 
)

References FLA_Check_col_storage(), FLA_Check_floating_object(), FLA_Check_hess_indices(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim_min(), and FLA_Obj_length().

Referenced by FLA_Hess_blk_external(), and FLA_Hess_unb_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_col_storage( t );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_hess_indices( A, ilo, ihi );
33  FLA_Check_error_code( e_val );
34 
35  return FLA_SUCCESS;
36 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_col_storage(FLA_Obj A)
Definition: FLA_Check.c:1325
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_hess_indices(FLA_Obj A, int ilo, int ihi)
Definition: FLA_Check.c:499
FLA_Error FLA_Check_vector_dim_min(FLA_Obj x, dim_t min_dim)
Definition: FLA_Check.c:740
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Hess_unb_external()

FLA_Error FLA_Hess_unb_external ( FLA_Obj  A,
FLA_Obj  t,
int  ilo,
int  ihi 
)

References F77_cgehd2(), F77_dgehd2(), F77_sgehd2(), F77_zgehd2(), FLA_Check_error_level(), FLA_Hess_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), and FLA_Obj_width().

Referenced by FLA_Hess_unb_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int n_A, cs_A;
19  FLA_Obj work_obj;
20 
21  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22  FLA_Hess_check( A, t, ilo, ihi );
23 
24  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25 
26  datatype = FLA_Obj_datatype( A );
27 
28  n_A = FLA_Obj_width( A );
29  cs_A = FLA_Obj_col_stride( A );
30 
31  FLA_Obj_create( datatype, n_A, 1, 0, 0, &work_obj );
32 
33  // Shift ilo and ihi from zero-based indexing to one-based indexing.
34  ilo += 1;
35  ihi += 1;
36 
37  switch( datatype ){
38 
39  case FLA_FLOAT:
40  {
41  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
42  float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
43  float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
44 
45  F77_sgehd2( &n_A,
46  &ilo,
47  &ihi,
48  buff_A, &cs_A,
49  buff_t,
50  buff_work,
51  &info );
52 
53  break;
54  }
55 
56  case FLA_DOUBLE:
57  {
58  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
59  double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
60  double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
61 
62  F77_dgehd2( &n_A,
63  &ilo,
64  &ihi,
65  buff_A, &cs_A,
66  buff_t,
67  buff_work,
68  &info );
69 
70  break;
71  }
72 
73  case FLA_COMPLEX:
74  {
75  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
76  scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
77  scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
78 
79  F77_cgehd2( &n_A,
80  &ilo,
81  &ihi,
82  buff_A, &cs_A,
83  buff_t,
84  buff_work,
85  &info );
86 
87  break;
88  }
89 
90  case FLA_DOUBLE_COMPLEX:
91  {
92  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
93  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
94  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
95 
96  F77_zgehd2( &n_A,
97  &ilo,
98  &ihi,
99  buff_A, &cs_A,
100  buff_t,
101  buff_work,
102  &info );
103 
104  break;
105  }
106 
107  }
108 
109  FLA_Obj_free( &work_obj );
110 #else
111  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
112 #endif
113 
114  return info;
115 }
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
int F77_cgehd2(int *n, int *ilo, int *ihi, scomplex *a, int *lda, scomplex *tau, scomplex *work, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_zgehd2(int *n, int *ilo, int *ihi, dcomplex *a, int *lda, dcomplex *tau, dcomplex *work, int *info)
int F77_sgehd2(int *n, int *ilo, int *ihi, float *a, int *lda, float *tau, float *work, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
Definition: blis_type_defs.h:132
int F77_dgehd2(int *n, int *ilo, int *ihi, double *a, int *lda, double *tau, double *work, int *info)
FLA_Error FLA_Hess_check(FLA_Obj A, FLA_Obj t, int ilo, int ihi)
Definition: FLA_Hess_check.c:13
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
Definition: blis_type_defs.h:137

◆ FLA_Hess_UT()

FLA_Error FLA_Hess_UT ( FLA_Obj  A,
FLA_Obj  T 
)
16 {
17  FLA_Error r_val;
18 
19  // Check parameters.
20  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21  FLA_Hess_UT_check( A, T );
22 
23  // Invoke FLA_Hess_UT_internal() with the standard control tree.
25 
26  return r_val;
27 }
FLA_Error FLA_Hess_UT_check(FLA_Obj A, FLA_Obj T)
Definition: FLA_Hess_UT_check.c:13
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Hess_UT_internal(FLA_Obj A, FLA_Obj T, fla_hessut_t *cntl)
Definition: FLA_Hess_UT_internal.c:13
fla_hessut_t * fla_hessut_cntl_leaf
Definition: FLA_Hess_UT_cntl_init.c:13
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18

◆ FLA_Hess_UT_check()

FLA_Error FLA_Hess_UT_check ( FLA_Obj  A,
FLA_Obj  T 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_square(), and FLA_Obj_width().

Referenced by FLA_Hess_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_square( A );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
32  return FLA_SUCCESS;
33 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363

◆ FLA_Hess_UT_internal_check()

FLA_Error FLA_Hess_UT_internal_check ( FLA_Obj  A,
FLA_Obj  T,
fla_hessut_t cntl 
)

References FLA_Check_identical_object_elemtype(), and FLA_Check_null_pointer().

Referenced by FLA_Hess_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
25  return FLA_SUCCESS;
26 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_Hess_UT_recover_tau_check()

FLA_Error FLA_Hess_UT_recover_tau_check ( FLA_Obj  T,
FLA_Obj  tau 
)

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_object_width_equals(), and FLA_Obj_vector_dim().

Referenced by FLA_Hess_UT_recover_tau().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( T );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_consistent_object_datatype( T, tau );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_if_vector( tau );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_object_width_equals( T, FLA_Obj_vector_dim( tau ) + 1 );
27  FLA_Check_error_code( e_val );
28 
29  return FLA_SUCCESS;
30 }
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
FLA_Error FLA_Check_consistent_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:339

◆ FLA_Hevd_check()

FLA_Error FLA_Hevd_check ( FLA_Evd_type  jobz,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  l 
)

References FLA_Check_col_storage(), FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_square(), FLA_Check_valid_evd_type(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_length().

Referenced by FLA_Hevd(), and FLA_Hevd_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_evd_type( jobz );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_uplo( uplo );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_floating_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_nonconstant_object( A );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_real_object( e );
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_square( A );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_vector_dim( e, FLA_Obj_length( A ) );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_col_storage( e );
42  FLA_Check_error_code( e_val );
43 
44  return FLA_SUCCESS;
45 }
FLA_Error FLA_Check_valid_evd_type(FLA_Evd_type evd_type)
Definition: FLA_Check.c:1243
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_col_storage(FLA_Obj A)
Definition: FLA_Check.c:1325
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Hevd_compute_scaling_check()

FLA_Error FLA_Hevd_compute_scaling_check ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  sigma 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), and FLA_Check_valid_uplo().

Referenced by FLA_Hevd_compute_scaling().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_real_object( sigma );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_nonconstant_object( sigma );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_identical_object_precision( A, sigma );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_if_scalar( sigma );
36  FLA_Check_error_code( e_val );
37 
38  return FLA_SUCCESS;
39 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_if_scalar(FLA_Obj A)
Definition: FLA_Check.c:373
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Hevd_external()

FLA_Error FLA_Hevd_external ( FLA_Evd_type  jobz,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  l 
)

References F77_cheev(), F77_dsyev(), F77_ssyev(), F77_zheev(), FLA_Check_error_level(), FLA_Hevd_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_evd_type(), FLA_Param_map_flame_to_netlib_uplo(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  FLA_Datatype dt_real;
19  int n_A, cs_A;
20  int lwork, lrwork;
21  FLA_Obj work, rwork;
22  char blas_jobz;
23  char blas_uplo;
24  int i;
25 
26  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
27  FLA_Hevd_check( jobz, uplo, A, e );
28 
29  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
30 
31  datatype = FLA_Obj_datatype( A );
32  dt_real = FLA_Obj_datatype_proj_to_real( A );
33 
34  n_A = FLA_Obj_width( A );
35  cs_A = FLA_Obj_col_stride( A );
36 
37  // Allocate the rwork array up front since its size is not dependent on
38  // internal block sizes.
39  lrwork = max( 1, 3 * n_A - 2 );
40  FLA_Obj_create( dt_real, lrwork, 1, 0, 0, &rwork );
41 
42  FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
43  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
44 
45  // Make a workspace query the first time through. This will provide us with
46  // and ideal workspace size based on an internal block size.
47  lwork = -1;
48  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
49 
50  for ( i = 0; i < 2; ++i )
51  {
52  if ( i == 1 )
53  {
54  // Grab the queried ideal workspace size from the work array, free the
55  // work object, and then re-allocate the workspace with the ideal size.
56  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
57  lwork = ( int ) *FLA_FLOAT_PTR( work );
58  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
59  lwork = ( int ) *FLA_DOUBLE_PTR( work );
60 
61  FLA_Obj_free( &work );
62  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
63  }
64 
65  switch( datatype ) {
66 
67  case FLA_FLOAT:
68  {
69  float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
70  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
71  float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
72  float* buff_rwork = ( float * ) FLA_FLOAT_PTR( rwork );
73 
74  F77_ssyev( &blas_jobz,
75  &blas_uplo,
76  &n_A,
77  buff_A, &cs_A,
78  buff_e,
79  buff_work, &lwork,
80  buff_rwork,
81  &info );
82 
83  break;
84  }
85 
86  case FLA_DOUBLE:
87  {
88  double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
89  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
90  double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
91  double* buff_rwork = ( double * ) FLA_DOUBLE_PTR( rwork );
92 
93  F77_dsyev( &blas_jobz,
94  &blas_uplo,
95  &n_A,
96  buff_A, &cs_A,
97  buff_e,
98  buff_work, &lwork,
99  buff_rwork,
100  &info );
101 
102  break;
103  }
104 
105  case FLA_COMPLEX:
106  {
107  scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
108  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
109  scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
110  float* buff_rwork = ( float * ) FLA_FLOAT_PTR( rwork );
111 
112  F77_cheev( &blas_jobz,
113  &blas_uplo,
114  &n_A,
115  buff_A, &cs_A,
116  buff_e,
117  buff_work, &lwork,
118  buff_rwork,
119  &info );
120 
121  break;
122  }
123 
124  case FLA_DOUBLE_COMPLEX:
125  {
126  dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
127  double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
128  dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
129  double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
130 
131  F77_zheev( &blas_jobz,
132  &blas_uplo,
133  &n_A,
134  buff_A, &cs_A,
135  buff_e,
136  buff_work, &lwork,
137  buff_rwork,
138  &info );
139 
140  break;
141  }
142 
143  }
144  }
145 
146  FLA_Obj_free( &work );
147  FLA_Obj_free( &rwork );
148 #else
149  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
150 #endif
151 
152  return info;
153 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
int F77_ssyev(char *jobz, char *uplo, int *n, float *a, int *lda, float *w, float *work, int *lwork, float *rwork, int *info)
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
int F77_zheev(char *jobz, char *uplo, int *n, dcomplex *a, int *lda, double *w, dcomplex *work, int *lwork, double *rwork, int *info)
FLA_Error FLA_Hevd_check(FLA_Evd_type jobz, FLA_Uplo uplo, FLA_Obj A, FLA_Obj e)
Definition: FLA_Hevd_check.c:13
void FLA_Param_map_flame_to_netlib_evd_type(FLA_Evd_type evd_type, void *lapack_evd_type)
Definition: FLA_Param.c:151
int F77_cheev(char *jobz, char *uplo, int *n, scomplex *a, int *lda, float *w, scomplex *work, int *lwork, float *rwork, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
int F77_dsyev(char *jobz, char *uplo, int *n, double *a, int *lda, double *w, double *work, int *lwork, double *rwork, int *info)
Definition: blis_type_defs.h:137

◆ FLA_Hevdd_check()

FLA_Error FLA_Hevdd_check ( FLA_Evd_type  jobz,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  l 
)

References FLA_Check_col_storage(), FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_square(), FLA_Check_valid_evd_type(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_length().

Referenced by FLA_Hevdd_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_evd_type( jobz );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_uplo( uplo );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_floating_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_nonconstant_object( A );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_real_object( e );
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_square( A );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_vector_dim( e, FLA_Obj_length( A ) );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_col_storage( e );
42  FLA_Check_error_code( e_val );
43 
44  return FLA_SUCCESS;
45 }
FLA_Error FLA_Check_valid_evd_type(FLA_Evd_type evd_type)
Definition: FLA_Check.c:1243
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_col_storage(FLA_Obj A)
Definition: FLA_Check.c:1325
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Hevdd_external()

FLA_Error FLA_Hevdd_external ( FLA_Evd_type  jobz,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  l 
)

References F77_cheevd(), F77_dsyevd(), F77_ssyevd(), F77_zheevd(), FLA_Check_error_level(), FLA_Hevdd_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_complex(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_evd_type(), FLA_Param_map_flame_to_netlib_uplo(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  FLA_Datatype dt_real;
19  int n_A, cs_A;
20  int lwork, lrwork, liwork;
21  FLA_Obj work, rwork, iwork;
22  char blas_jobz;
23  char blas_uplo;
24  int i;
25 
26  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
27  FLA_Hevdd_check( jobz, uplo, A, e );
28 
29  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
30 
31  datatype = FLA_Obj_datatype( A );
32  dt_real = FLA_Obj_datatype_proj_to_real( A );
33 
34  n_A = FLA_Obj_width( A );
35  cs_A = FLA_Obj_col_stride( A );
36 
37  FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
38  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
39 
40  // Make a workspace query the first time through. This will provide us with
41  // and ideal workspace size.
42  lwork = -1;
43  lrwork = -1;
44  liwork = -1;
45  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
46  FLA_Obj_create( datatype, 1, 1, 0, 0, &rwork );
47  FLA_Obj_create( FLA_INT, 1, 1, 0, 0, &iwork );
48 
49  for ( i = 0; i < 2; ++i )
50  {
51  if ( i == 1 )
52  {
53  // Grab the queried ideal workspace size from the work arrays, free the
54  // work object, and then re-allocate the workspace with the ideal size.
55  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
56  {
57  lwork = ( int ) *FLA_FLOAT_PTR( work );
58  lrwork = ( int ) *FLA_FLOAT_PTR( rwork );
59  liwork = ( int ) *FLA_INT_PTR( iwork );
60  }
61  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
62  {
63  lwork = ( int ) *FLA_DOUBLE_PTR( work );
64  lrwork = ( int ) *FLA_DOUBLE_PTR( rwork );
65  liwork = ( int ) *FLA_INT_PTR( iwork );
66  }
67 //printf( "ideal workspace for n = %d\n", n_A );
68 //printf( " lwork = %d\n", lwork );
69 //printf( " lrwork = %d\n", lrwork );
70 //printf( " liwork = %d\n", liwork );
71  lwork = 2*lwork;
72  FLA_Obj_free( &work );
73  FLA_Obj_free( &iwork );
74  FLA_Obj_free( &rwork );
75  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
76  FLA_Obj_create( datatype, liwork, 1, 0, 0, &iwork );
77  if ( FLA_Obj_is_complex( A ) )
78  FLA_Obj_create( datatype, lrwork, 1, 0, 0, &rwork );
79  }
80 
81  switch( datatype ) {
82 
83  case FLA_FLOAT:
84  {
85  float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
86  float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
87  float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
88  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
89 
90  F77_ssyevd( &blas_jobz,
91  &blas_uplo,
92  &n_A,
93  buff_A, &cs_A,
94  buff_e,
95  buff_work, &lwork,
96  buff_iwork, &liwork,
97  &info );
98 
99  break;
100  }
101 
102  case FLA_DOUBLE:
103  {
104  double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
105  double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
106  double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
107  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
108 
109  F77_dsyevd( &blas_jobz,
110  &blas_uplo,
111  &n_A,
112  buff_A, &cs_A,
113  buff_e,
114  buff_work, &lwork,
115  buff_iwork, &liwork,
116  &info );
117 
118  break;
119  }
120 
121  case FLA_COMPLEX:
122  {
123  scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
124  float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
125  scomplex* buff_work = ( scomplex* ) FLA_COMPLEX_PTR( work );
126  float* buff_rwork = ( float* ) FLA_FLOAT_PTR( rwork );
127  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
128 
129  F77_cheevd( &blas_jobz,
130  &blas_uplo,
131  &n_A,
132  buff_A, &cs_A,
133  buff_e,
134  buff_work, &lwork,
135  buff_rwork, &lrwork,
136  buff_iwork, &liwork,
137  &info );
138 
139  break;
140  }
141 
142  case FLA_DOUBLE_COMPLEX:
143  {
144  dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
145  double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
146  dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
147  double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
148  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
149 
150  F77_zheevd( &blas_jobz,
151  &blas_uplo,
152  &n_A,
153  buff_A, &cs_A,
154  buff_e,
155  buff_work, &lwork,
156  buff_rwork, &lrwork,
157  buff_iwork, &liwork,
158  &info );
159 
160  break;
161  }
162 
163  }
164  }
165 
166  FLA_Obj_free( &work );
167  FLA_Obj_free( &iwork );
168  if ( FLA_Obj_is_complex( A ) )
169  FLA_Obj_free( &rwork );
170 #else
171  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
172 #endif
173 
174  return info;
175 }
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
int F77_dsyevd(char *jobz, char *uplo, int *n, double *a, int *lda, double *w, double *work, int *lwork, int *iwork, int *liwork, int *info)
int F77_zheevd(char *jobz, char *uplo, int *n, dcomplex *a, int *lda, double *w, dcomplex *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
FLA_Error FLA_Hevdd_check(FLA_Evd_type jobz, FLA_Uplo uplo, FLA_Obj A, FLA_Obj e)
Definition: FLA_Hevdd_check.c:13
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
void FLA_Param_map_flame_to_netlib_evd_type(FLA_Evd_type evd_type, void *lapack_evd_type)
Definition: FLA_Param.c:151
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
int F77_ssyevd(char *jobz, char *uplo, int *n, float *a, int *lda, float *w, float *work, int *lwork, int *iwork, int *liwork, int *info)
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
FLA_Bool FLA_Obj_is_complex(FLA_Obj A)
Definition: FLA_Query.c:324
int F77_cheevd(char *jobz, char *uplo, int *n, scomplex *a, int *lda, float *w, scomplex *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info)
Definition: blis_type_defs.h:137

◆ FLA_Hevdr_check()

FLA_Error FLA_Hevdr_check ( FLA_Evd_type  jobz,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  l,
FLA_Obj  Z 
)

References FLA_Check_col_storage(), FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_square(), FLA_Check_valid_evd_type(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_length().

Referenced by FLA_Hevdr_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_evd_type( jobz );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_uplo( uplo );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_floating_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_nonconstant_object( A );
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_real_object( l );
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_square( A );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, Z );
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_vector_dim( l, FLA_Obj_length( A ) );
45  FLA_Check_error_code( e_val );
46 
47  e_val = FLA_Check_col_storage( l );
48  FLA_Check_error_code( e_val );
49 
50  return FLA_SUCCESS;
51 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_valid_evd_type(FLA_Evd_type evd_type)
Definition: FLA_Check.c:1243
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_col_storage(FLA_Obj A)
Definition: FLA_Check.c:1325
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Hevdr_external()

FLA_Error FLA_Hevdr_external ( FLA_Evd_type  jobz,
FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  l,
FLA_Obj  Z 
)

References F77_cheevr(), F77_dsyevr(), F77_ssyevr(), F77_zheevr(), FLA_Check_error_level(), FLA_Hevdr_check(), FLA_Mach_params(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_complex(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_evd_type(), FLA_Param_map_flame_to_netlib_uplo(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  FLA_Datatype dt_real;
19  int n_A, cs_A;
20  int cs_Z;
21  int lwork, lrwork, liwork, lisuppz;
22  FLA_Obj work, rwork, iwork, isuppz, abstol;
23  char blas_jobz;
24  char blas_uplo;
25  int i;
26 
27  char blas_range = 'A';
28  int il, iu;
29  int eigs_found;
30 
31  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
32  FLA_Hevdr_check( jobz, uplo, A, l, Z );
33 
34  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
35 
36  datatype = FLA_Obj_datatype( A );
37  dt_real = FLA_Obj_datatype_proj_to_real( A );
38 
39  n_A = FLA_Obj_width( A );
40  cs_A = FLA_Obj_col_stride( A );
41  cs_Z = FLA_Obj_col_stride( Z );
42 
43  FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
44  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
45 
46  lisuppz = 2 * n_A;
47  FLA_Obj_create( FLA_INT, lisuppz, 1, 0, 0, &isuppz );
48  FLA_Obj_create( dt_real, 1, 1, 0, 0, &abstol );
49 
50  // Query the safe minimum to use as the abstol parameter.
51  FLA_Mach_params( FLA_MACH_SFMIN, abstol );
52 
53  // Make a workspace query the first time through. This will provide us with
54  // and ideal workspace size.
55  lwork = -1;
56  lrwork = -1;
57  liwork = -1;
58  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
59  FLA_Obj_create( dt_real, 1, 1, 0, 0, &rwork );
60  FLA_Obj_create( FLA_INT, 1, 1, 0, 0, &iwork );
61 
62  for ( i = 0; i < 2; ++i )
63  {
64  if ( i == 1 )
65  {
66  // Grab the queried ideal workspace size from the work arrays, free the
67  // work object, and then re-allocate the workspace with the ideal size.
68  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
69  {
70  lwork = ( int ) *FLA_FLOAT_PTR( work );
71  lrwork = ( int ) *FLA_FLOAT_PTR( rwork );
72  liwork = ( int ) *FLA_INT_PTR( iwork );
73  }
74  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
75  {
76  lwork = ( int ) *FLA_DOUBLE_PTR( work );
77  lrwork = ( int ) *FLA_DOUBLE_PTR( rwork );
78  liwork = ( int ) *FLA_INT_PTR( iwork );
79  }
80 
81  FLA_Obj_free( &work );
82  FLA_Obj_free( &iwork );
83  FLA_Obj_free( &rwork );
84  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
85  FLA_Obj_create( FLA_INT, liwork, 1, 0, 0, &iwork );
86  if ( FLA_Obj_is_complex( A ) )
87  FLA_Obj_create( dt_real, lrwork, 1, 0, 0, &rwork );
88  }
89 
90  switch( datatype ) {
91 
92  case FLA_FLOAT:
93  {
94  float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
95  float* buff_l = ( float* ) FLA_FLOAT_PTR( l );
96  float* buff_Z = ( float* ) FLA_FLOAT_PTR( Z );
97  float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
98  float* buff_abstol = ( float* ) FLA_FLOAT_PTR( abstol );
99  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
100  int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
101  float vl, vu;
102 
103  F77_ssyevr( &blas_jobz,
104  &blas_range,
105  &blas_uplo,
106  &n_A,
107  buff_A, &cs_A,
108  &vl, &vu,
109  &il, &iu,
110  buff_abstol,
111  &eigs_found,
112  buff_l,
113  buff_Z, &cs_Z,
114  buff_isuppz,
115  buff_work, &lwork,
116  buff_iwork, &liwork,
117  &info );
118  break;
119  }
120 
121  case FLA_DOUBLE:
122  {
123  double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
124  double* buff_l = ( double* ) FLA_DOUBLE_PTR( l );
125  double* buff_Z = ( double* ) FLA_DOUBLE_PTR( Z );
126  double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
127  double* buff_abstol = ( double* ) FLA_DOUBLE_PTR( abstol );
128  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
129  int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
130  double vl, vu;
131 
132  F77_dsyevr( &blas_jobz,
133  &blas_range,
134  &blas_uplo,
135  &n_A,
136  buff_A, &cs_A,
137  &vl, &vu,
138  &il, &iu,
139  buff_abstol,
140  &eigs_found,
141  buff_l,
142  buff_Z, &cs_Z,
143  buff_isuppz,
144  buff_work, &lwork,
145  buff_iwork, &liwork,
146  &info );
147  break;
148  }
149 
150  case FLA_COMPLEX:
151  {
152  scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
153  float* buff_l = ( float* ) FLA_FLOAT_PTR( l );
154  scomplex* buff_Z = ( scomplex* ) FLA_COMPLEX_PTR( Z );
155  scomplex* buff_work = ( scomplex* ) FLA_COMPLEX_PTR( work );
156  float* buff_rwork = ( float* ) FLA_FLOAT_PTR( rwork );
157  float* buff_abstol = ( float* ) FLA_FLOAT_PTR( abstol );
158  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
159  int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
160  float vl, vu;
161 
162  F77_cheevr( &blas_jobz,
163  &blas_range,
164  &blas_uplo,
165  &n_A,
166  buff_A, &cs_A,
167  &vl, &vu,
168  &il, &iu,
169  buff_abstol,
170  &eigs_found,
171  buff_l,
172  buff_Z, &cs_Z,
173  buff_isuppz,
174  buff_work, &lwork,
175  buff_rwork, &lrwork,
176  buff_iwork, &liwork,
177  &info );
178  break;
179  }
180 
181  case FLA_DOUBLE_COMPLEX:
182  {
183  dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
184  double* buff_l = ( double* ) FLA_DOUBLE_PTR( l );
185  dcomplex* buff_Z = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( Z );
186  dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
187  double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
188  double* buff_abstol = ( double* ) FLA_DOUBLE_PTR( abstol );
189  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
190  int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
191  double vl, vu;
192 
193  F77_zheevr( &blas_jobz,
194  &blas_range,
195  &blas_uplo,
196  &n_A,
197  buff_A, &cs_A,
198  &vl, &vu,
199  &il, &iu,
200  buff_abstol,
201  &eigs_found,
202  buff_l,
203  buff_Z, &cs_Z,
204  buff_isuppz,
205  buff_work, &lwork,
206  buff_rwork, &lrwork,
207  buff_iwork, &liwork,
208  &info );
209  break;
210  }
211 
212  }
213  }
214 
215  FLA_Obj_free( &work );
216  FLA_Obj_free( &iwork );
217  FLA_Obj_free( &isuppz );
218  FLA_Obj_free( &abstol );
219  if ( FLA_Obj_is_complex( A ) )
220  FLA_Obj_free( &rwork );
221 #else
222  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
223 #endif
224 
225  return info;
226 }
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
int F77_cheevr(char *jobz, char *range, char *uplo, int *n, scomplex *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, scomplex *z, int *ldz, int *isuppz, scomplex *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_dsyevr(char *jobz, char *range, char *uplo, int *n, double *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, double *z, int *ldz, int *isuppz, double *work, int *lwork, int *iwork, int *liwork, int *info)
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Error FLA_Mach_params(FLA_Machval machval, FLA_Obj val)
Definition: FLA_Mach_params.c:13
int F77_zheevr(char *jobz, char *range, char *uplo, int *n, dcomplex *a, int *lda, double *vl, double *vu, int *il, int *iu, double *abstol, int *m, double *w, dcomplex *z, int *ldz, int *isuppz, dcomplex *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info)
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
void FLA_Param_map_flame_to_netlib_evd_type(FLA_Evd_type evd_type, void *lapack_evd_type)
Definition: FLA_Param.c:151
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
FLA_Bool FLA_Obj_is_complex(FLA_Obj A)
Definition: FLA_Query.c:324
int F77_ssyevr(char *jobz, char *range, char *uplo, int *n, float *a, int *lda, float *vl, float *vu, int *il, int *iu, float *abstol, int *m, float *w, float *z, int *ldz, int *isuppz, float *work, int *lwork, int *iwork, int *liwork, int *info)
FLA_Error FLA_Hevdr_check(FLA_Evd_type jobz, FLA_Uplo uplo, FLA_Obj A, FLA_Obj l, FLA_Obj Z)
Definition: FLA_Hevdr_check.c:13
Definition: blis_type_defs.h:137

◆ FLA_LQ_blk_external()

FLA_Error FLA_LQ_blk_external ( FLA_Obj  A,
FLA_Obj  t 
)

References F77_cgelqf(), F77_dgelqf(), F77_sgelqf(), F77_zgelqf(), FLA_Check_error_level(), FLA_LQ_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), and FLA_Query_blocksize().

Referenced by FLA_LQ_blk_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A, n_A, cs_A;
19  int lwork;
20  FLA_Obj work_obj;
21 
22  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23  FLA_LQ_check( A, t );
24 
25  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26 
27  datatype = FLA_Obj_datatype( A );
28 
29  m_A = FLA_Obj_length( A );
30  n_A = FLA_Obj_width( A );
31  cs_A = FLA_Obj_col_stride( A );
32  lwork = m_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
33 
34  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
35 
36  switch( datatype ){
37 
38  case FLA_FLOAT:
39  {
40  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
41  float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
42  float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
43 
44  F77_sgelqf( &m_A,
45  &n_A,
46  buff_A, &cs_A,
47  buff_t,
48  buff_work, &lwork,
49  &info );
50 
51  break;
52  }
53 
54  case FLA_DOUBLE:
55  {
56  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
57  double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
58  double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
59 
60  F77_dgelqf( &m_A,
61  &n_A,
62  buff_A, &cs_A,
63  buff_t,
64  buff_work, &lwork,
65  &info );
66 
67  break;
68  }
69 
70  case FLA_COMPLEX:
71  {
72  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
73  scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
74  scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
75 
76  F77_cgelqf( &m_A,
77  &n_A,
78  buff_A, &cs_A,
79  buff_t,
80  buff_work, &lwork,
81  &info );
82 
83  break;
84  }
85 
86  case FLA_DOUBLE_COMPLEX:
87  {
88  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
89  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
90  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
91 
92  F77_zgelqf( &m_A,
93  &n_A,
94  buff_A, &cs_A,
95  buff_t,
96  buff_work, &lwork,
97  &info );
98 
99  break;
100  }
101 
102  }
103 
104  FLA_Obj_free( &work_obj );
105 #else
106  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
107 #endif
108 
109  return info;
110 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_zgelqf(int *m, int *n, dcomplex *a, int *lda, dcomplex *tau, dcomplex *work, int *lwork, int *info)
int F77_cgelqf(int *m, int *n, scomplex *a, int *lda, scomplex *tau, scomplex *work, int *lwork, int *info)
FLA_Error FLA_LQ_check(FLA_Obj A, FLA_Obj t)
Definition: FLA_LQ_check.c:13
dim_t FLA_Query_blocksize(FLA_Datatype dt, FLA_Dimension dim)
Definition: FLA_Blocksize.c:161
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
int F77_sgelqf(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info)
Definition: blis_type_defs.h:132
int F77_dgelqf(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_LQ_check()

FLA_Error FLA_LQ_check ( FLA_Obj  A,
FLA_Obj  t 
)

References FLA_Check_col_storage(), FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().

Referenced by FLA_LQ_blk_external(), and FLA_LQ_unb_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_col_vector( t );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_col_storage( t );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_vector_dim( t, FLA_Obj_min_dim( A ) );
33  FLA_Check_error_code( e_val );
34 
35  return FLA_SUCCESS;
36 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_col_storage(FLA_Obj A)
Definition: FLA_Check.c:1325
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_col_vector(FLA_Obj x)
Definition: FLA_Check.c:1233
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_LQ_unb_external()

FLA_Error FLA_LQ_unb_external ( FLA_Obj  A,
FLA_Obj  t 
)

References F77_cgelq2(), F77_dgelq2(), F77_sgelq2(), F77_zgelq2(), FLA_Check_error_level(), FLA_LQ_check(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_LQ_unb_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A, n_A, cs_A;
19  FLA_Obj work_obj;
20 
21  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22  FLA_LQ_check( A, t );
23 
24  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25 
26  datatype = FLA_Obj_datatype( A );
27 
28  m_A = FLA_Obj_length( A );
29  n_A = FLA_Obj_width( A );
30  cs_A = FLA_Obj_col_stride( A );
31 
32  FLA_Obj_create( datatype, m_A, 1, 0, 0, &work_obj );
33 
34  switch( datatype ){
35 
36  case FLA_FLOAT:
37  {
38  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
39  float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
40  float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
41 
42  F77_sgelq2( &m_A,
43  &n_A,
44  buff_A, &cs_A,
45  buff_t,
46  buff_work,
47  &info );
48 
49  break;
50  }
51 
52  case FLA_DOUBLE:
53  {
54  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
55  double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
56  double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
57 
58  F77_dgelq2( &m_A,
59  &n_A,
60  buff_A, &cs_A,
61  buff_t,
62  buff_work,
63  &info );
64 
65  break;
66  }
67 
68  case FLA_COMPLEX:
69  {
70  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
71  scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
72  scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
73 
74  F77_cgelq2( &m_A,
75  &n_A,
76  buff_A, &cs_A,
77  buff_t,
78  buff_work,
79  &info );
80 
81  break;
82  }
83 
84  case FLA_DOUBLE_COMPLEX:
85  {
86  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
87  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
88  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
89 
90  F77_zgelq2( &m_A,
91  &n_A,
92  buff_A, &cs_A,
93  buff_t,
94  buff_work,
95  &info );
96 
97  break;
98  }
99 
100  }
101 
102  FLA_Obj_free( &work_obj );
103 #else
104  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
105 #endif
106 
107  return info;
108 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_cgelq2(int *m, int *n, scomplex *a, int *lda, scomplex *tau, scomplex *work, int *info)
FLA_Error FLA_LQ_check(FLA_Obj A, FLA_Obj t)
Definition: FLA_LQ_check.c:13
int F77_zgelq2(int *m, int *n, dcomplex *a, int *lda, dcomplex *tau, dcomplex *work, int *info)
int F77_sgelq2(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
Definition: blis_type_defs.h:132
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int F77_dgelq2(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info)
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_LQ_UT()

FLA_Error FLA_LQ_UT ( FLA_Obj  A,
FLA_Obj  S 
)
16 {
17  FLA_Error r_val;
18 
19  // Check parameters.
20  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21  FLA_LQ_UT_check( A, T );
22 
23  // Invoke FLA_LQ_UT_internal() with the standard control tree.
24  //r_val = FLA_LQ_UT_blk_var1( A, T, fla_lqut_cntl_leaf );
25  r_val = FLA_LQ_UT_internal( A, T, fla_lqut_cntl_leaf );
26 
27  return r_val;
28 }
FLA_Error FLA_LQ_UT_check(FLA_Obj A, FLA_Obj T)
Definition: FLA_LQ_UT_check.c:13
fla_lqut_t * fla_lqut_cntl_leaf
Definition: FLA_LQ_UT_cntl_init.c:16
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_LQ_UT_internal(FLA_Obj A, FLA_Obj T, fla_lqut_t *cntl)
Definition: FLA_LQ_UT_internal.c:17
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18

◆ FLA_LQ_UT_check()

FLA_Error FLA_LQ_UT_check ( FLA_Obj  A,
FLA_Obj  T 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), and FLA_Obj_length().

Referenced by FLA_LQ_UT(), and FLASH_LQ_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  return FLA_SUCCESS;
30 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_LQ_UT_form_Q_check()

FLA_Error FLA_LQ_UT_form_Q_check ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  Q 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), and FLA_Obj_width().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  // - the width of T represents the number of applied house-holder vectors.
30  // - the length of A may represent the same number of those vectors.
31  // - however, if A and Q share the same buffer (in-place operation),
32  // then the length of A should match to the length of the maximum length
33  // of the applied house-holder vectors.
34  //if ( FLA_Obj_is_overlapped( A, Q ) == FALSE )
35  //{
36  // e_val = FLA_Check_object_width_equals( T, FLA_Obj_length( A ) );
37  // FLA_Check_error_code( e_val );
38  //}
39 
41  FLA_Check_error_code( e_val );
42 
43  // Q matrix should not be restricted to be a square matrix
44  // e_val = FLA_Check_square( Q );
45  // FLA_Check_error_code( e_val );
46 
47  return FLA_SUCCESS;
48 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123

◆ FLA_LQ_UT_internal_check()

FLA_Error FLA_LQ_UT_internal_check ( FLA_Obj  A,
FLA_Obj  T,
fla_lqut_t cntl 
)

References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_min(), and FLA_Obj_min_dim().

Referenced by FLA_LQ_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
25  // Verify conformality between all the objects. This check works regardless
26  // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
27  // element length and width are used instead of scalar length and width.
29  FLA_Check_error_code( e_val );
30 
31  return FLA_SUCCESS;
32 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_min(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1069
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_LQ_UT_macro_task()

FLA_Error FLA_LQ_UT_macro_task ( FLA_Obj  A,
FLA_Obj  T,
fla_lqut_t cntl 
)

References FLA_LQ_UT_internal(), FLA_LQ_UT_task(), FLA_Obj_free(), FLA_Obj_width(), FLASH_Copy_flat_to_hier(), and FLASH_Obj_create_flat_copy_of_hier().

Referenced by FLA_LQ_UT_internal(), and FLASH_Queue_exec_task().

16 {
17  FLA_Error r_val;
18  FLA_Obj A_flat;
19  FLA_Obj T_flat;
20 
21  if ( FLA_Obj_width( A ) > 1 )
22  {
25 
26  r_val = FLA_LQ_UT_internal( A_flat, T_flat,
28 
29  FLASH_Copy_flat_to_hier( A_flat, 0, 0, A );
30  FLASH_Copy_flat_to_hier( T_flat, 0, 0, T );
31 
32  FLA_Obj_free( &A_flat );
33  FLA_Obj_free( &T_flat );
34  }
35  else
36  {
37  r_val = FLA_LQ_UT_task( *FLASH_OBJ_PTR_AT( A ),
38  *FLASH_OBJ_PTR_AT( T ),
39  cntl );
40  }
41 
42  return r_val;
43 }
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
fla_lqut_t * fla_lqut_cntl_leaf
Definition: FLA_LQ_UT_cntl_init.c:16
FLA_Error FLA_LQ_UT_task(FLA_Obj A, FLA_Obj T, fla_lqut_t *cntl)
Definition: FLA_LQ_UT_task.c:15
int FLA_Error
Definition: FLA_type_defs.h:47
Definition: FLA_type_defs.h:158
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_LQ_UT_internal(FLA_Obj A, FLA_Obj T, fla_lqut_t *cntl)
Definition: FLA_LQ_UT_internal.c:17
FLA_Error FLASH_Copy_flat_to_hier(FLA_Obj F, dim_t i, dim_t j, FLA_Obj H)
Definition: FLASH_Copy_other.c:81
FLA_Error FLASH_Obj_create_flat_copy_of_hier(FLA_Obj H, FLA_Obj *F)
Definition: FLASH_Obj.c:623

◆ FLA_LQ_UT_recover_tau_check()

FLA_Error FLA_LQ_UT_recover_tau_check ( FLA_Obj  T,
FLA_Obj  tau 
)

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), and FLA_Check_if_vector().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( T );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_consistent_object_datatype( T, tau );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_if_vector( tau );
24  FLA_Check_error_code( e_val );
25 
26  // This is not valid anymore as T is created with a conforming width to A.
27  //e_val = FLA_Check_object_width_equals( T, FLA_Obj_vector_dim( tau ) );
28  //FLA_Check_error_code( e_val );
29 
30  return FLA_SUCCESS;
31 }
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_consistent_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:339

◆ FLA_LQ_UT_solve_check()

FLA_Error FLA_LQ_UT_solve_check ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  B,
FLA_Obj  X 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), and FLA_Obj_min_dim().

Referenced by FLA_LQ_UT_solve(), and FLASH_LQ_UT_solve().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
36  FLA_Check_error_code( e_val );
37 
38  return FLA_SUCCESS;
39 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_LQ_UT_task()

FLA_Error FLA_LQ_UT_task ( FLA_Obj  A,
FLA_Obj  T,
fla_lqut_t cntl 
)

References FLA_LQ_UT_internal().

Referenced by FLA_LQ_UT_macro_task().

16 {
17  return FLA_LQ_UT_internal( A, T,
19 }
fla_lqut_t * fla_lqut_cntl_leaf
Definition: FLA_LQ_UT_cntl_init.c:16
FLA_Error FLA_LQ_UT_internal(FLA_Obj A, FLA_Obj T, fla_lqut_t *cntl)
Definition: FLA_LQ_UT_internal.c:17

◆ FLA_LU_incpiv_check()

FLA_Error FLA_LU_incpiv_check ( FLA_Obj  A,
FLA_Obj  p,
FLA_Obj  L 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_square(), and FLA_Obj_length().

Referenced by FLASH_LU_incpiv().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_int_object( p );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_nonconstant_object( p );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_square( A );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, p );
36  FLA_Check_error_code( e_val );
37 
39  FLA_Check_error_code( e_val );
40 
41  return FLA_SUCCESS;
42 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_int_object(FLA_Obj A)
Definition: FLA_Check.c:245
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_LU_incpiv_solve_check()

FLA_Error FLA_LU_incpiv_solve_check ( FLA_Obj  A,
FLA_Obj  p,
FLA_Obj  L,
FLA_Obj  B,
FLA_Obj  X 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_int_object(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_square().

Referenced by FLASH_LU_incpiv_solve().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_square( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_int_object( p );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_nonconstant_object( p );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_square( A );
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
45  FLA_Check_error_code( e_val );
46 
47  return FLA_SUCCESS;
48 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_int_object(FLA_Obj A)
Definition: FLA_Check.c:245
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417

◆ FLA_LU_nopiv()

FLA_Error FLA_LU_nopiv ( FLA_Obj  A)

References FLA_Check_error_level(), FLA_LU_find_zero_on_diagonal(), FLA_LU_nopiv_check(), and FLA_LU_nopiv_internal().

17 {
18  FLA_Error r_val;
19 
20  // Check parameters.
21  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22  FLA_LU_nopiv_check( A );
23 
24  // Invoke FLA_LU_nopiv_internal() with large control tree.
26 
27  // Check for singularity.
28  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
29  r_val = FLA_LU_find_zero_on_diagonal( A );
30 
31  return r_val;
32 }
int FLA_Error
Definition: FLA_type_defs.h:47
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
FLA_Error FLA_LU_find_zero_on_diagonal(FLA_Obj A)
Definition: FLA_LU_find_zero_on_diagonal.c:13
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
fla_lu_t * fla_lu_nopiv_cntl2
Definition: FLA_LU_nopiv_cntl_init.c:17

◆ FLA_LU_nopiv_check()

FLA_Error FLA_LU_nopiv_check ( FLA_Obj  A)

References FLA_Check_floating_object(), and FLA_Check_nonconstant_object().

Referenced by FLA_LU_nopiv(), and FLASH_LU_nopiv().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
23  return FLA_SUCCESS;
24 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232

◆ FLA_LU_nopiv_internal_check()

FLA_Error FLA_LU_nopiv_internal_check ( FLA_Obj  A,
fla_lu_t cntl 
)

References FLA_Check_null_pointer().

Referenced by FLA_LU_nopiv_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  return FLA_SUCCESS;
22 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_LU_nopiv_solve_check()

FLA_Error FLA_LU_nopiv_solve_check ( FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  X 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_square().

Referenced by FLA_LU_nopiv_solve(), and FLASH_LU_nopiv_solve().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_square( A );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
33  FLA_Check_error_code( e_val );
34 
35  return FLA_SUCCESS;
36 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417

◆ FLA_LU_nopiv_task()

FLA_Error FLA_LU_nopiv_task ( FLA_Obj  A,
fla_lu_t cntl 
)

References FLA_LU_nopiv_internal().

Referenced by FLASH_Queue_exec_task().

16 {
17  return FLA_LU_nopiv_internal( A,
19 }
fla_lu_t * fla_lu_nopiv_cntl_leaf
Definition: FLA_LU_nopiv_cntl_init.c:20
FLA_Error FLA_LU_nopiv_internal(FLA_Obj A, fla_lu_t *cntl)
Definition: FLA_LU_nopiv_internal.c:16

◆ FLA_LU_piv()

FLA_Error FLA_LU_piv ( FLA_Obj  A,
FLA_Obj  p 
)

References FLA_Check_error_level(), FLA_LU_piv_check(), and FLA_LU_piv_internal().

17 {
18  FLA_Error r_val = FLA_SUCCESS;
19 
20  // Check parameters.
21  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
22  FLA_LU_piv_check( A, p );
23 
24  // Invoke FLA_LU_piv_internal() with large control tree.
25  r_val = FLA_LU_piv_internal( A, p, fla_lu_piv_cntl2 );
26 
27  // This is invalid as FLA_LU_piv_internal returns a null pivot index.
28  // Check for singularity.
29  //if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
30  // r_val = FLA_LU_find_zero_on_diagonal( A );
31 
32  return r_val;
33 }
FLA_Error FLA_LU_piv_check(FLA_Obj A, FLA_Obj p)
Definition: FLA_LU_piv_check.c:13
FLA_Error FLA_LU_piv_internal(FLA_Obj A, FLA_Obj p, fla_lu_t *cntl)
Definition: FLA_LU_piv_internal.c:15
int FLA_Error
Definition: FLA_type_defs.h:47
fla_lu_t * fla_lu_piv_cntl2
Definition: FLA_LU_piv_cntl_init.c:18
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18

◆ FLA_LU_piv_blk_ext()

FLA_Error FLA_LU_piv_blk_ext ( FLA_Obj  A,
FLA_Obj  p 
)

References FLA_LU_piv_blk_external().

Referenced by FLA_LU_piv_internal().

107 {
108  return FLA_LU_piv_blk_external( A, p );
109 }
FLA_Error FLA_LU_piv_blk_external(FLA_Obj A, FLA_Obj p)
Definition: FLA_LU_piv_blk_external.c:13

◆ FLA_LU_piv_blk_external()

FLA_Error FLA_LU_piv_blk_external ( FLA_Obj  A,
FLA_Obj  p 
)

References F77_cgetrf(), F77_dgetrf(), F77_sgetrf(), F77_zgetrf(), FLA_Check_error_level(), FLA_LU_piv_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), and FLA_Shift_pivots_to().

Referenced by FLA_LU_piv_blk_ext().

14 {
15  FLA_Error r_val = FLA_SUCCESS;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  int info;
18  FLA_Datatype datatype;
19  int m_A, n_A, cs_A;
20 
21  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22  FLA_LU_piv_check( A, p );
23 
24  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25 
26  datatype = FLA_Obj_datatype( A );
27 
28  m_A = FLA_Obj_length( A );
29  n_A = FLA_Obj_width( A );
30  cs_A = FLA_Obj_col_stride( A );
31 
32 
33  switch( datatype ){
34 
35  case FLA_FLOAT:
36  {
37  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
38  int *buff_p = ( int * ) FLA_INT_PTR( p );
39 
40  F77_sgetrf( &m_A,
41  &n_A,
42  buff_A, &cs_A,
43  buff_p,
44  &info );
45 
46  break;
47  }
48 
49  case FLA_DOUBLE:
50  {
51  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
52  int *buff_p = ( int * ) FLA_INT_PTR( p );
53 
54  F77_dgetrf( &m_A,
55  &n_A,
56  buff_A, &cs_A,
57  buff_p,
58  &info );
59 
60  break;
61  }
62 
63  case FLA_COMPLEX:
64  {
65  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
66  int *buff_p = ( int * ) FLA_INT_PTR( p );
67 
68  F77_cgetrf( &m_A,
69  &n_A,
70  buff_A, &cs_A,
71  buff_p,
72  &info );
73 
74  break;
75  }
76 
77  case FLA_DOUBLE_COMPLEX:
78  {
79  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
80  int *buff_p = ( int * ) FLA_INT_PTR( p );
81 
82  F77_zgetrf( &m_A,
83  &n_A,
84  buff_A, &cs_A,
85  buff_p,
86  &info );
87 
88  break;
89  }
90 
91  }
92 
93  FLA_Shift_pivots_to( FLA_NATIVE_PIVOTS, p );
94 
95  // Convert to zero-based indexing, if an index was reported.
96  if ( info > 0 ) r_val = info - 1;
97  else r_val = FLA_SUCCESS;
98 
99 #else
100  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
101 #endif
102 
103  return r_val;
104 }
int F77_sgetrf(int *m, int *n, float *a, int *lda, int *ipiv, int *info)
FLA_Error FLA_LU_piv_check(FLA_Obj A, FLA_Obj p)
Definition: FLA_LU_piv_check.c:13
int F77_zgetrf(int *m, int *n, dcomplex *a, int *lda, int *ipiv, int *info)
int F77_cgetrf(int *m, int *n, scomplex *a, int *lda, int *ipiv, int *info)
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Shift_pivots_to(FLA_Pivot_type ptype, FLA_Obj p)
Definition: FLA_Shift_pivots_to.c:13
Definition: blis_type_defs.h:132
int F77_dgetrf(int *m, int *n, double *a, int *lda, int *ipiv, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_LU_piv_check()

FLA_Error FLA_LU_piv_check ( FLA_Obj  A,
FLA_Obj  p 
)

References FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim_min(), and FLA_Obj_min_dim().

Referenced by FLA_LU_piv(), FLA_LU_piv_blk_external(), FLA_LU_piv_unb_external(), and FLASH_LU_piv().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_int_object( p );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_col_vector( p );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_vector_dim_min( p, FLA_Obj_min_dim( A ) );
30  FLA_Check_error_code( e_val );
31 
32  return FLA_SUCCESS;
33 }
FLA_Error FLA_Check_int_object(FLA_Obj A)
Definition: FLA_Check.c:245
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_col_vector(FLA_Obj x)
Definition: FLA_Check.c:1233
FLA_Error FLA_Check_vector_dim_min(FLA_Obj x, dim_t min_dim)
Definition: FLA_Check.c:740
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_LU_piv_copy_task()

FLA_Error FLA_LU_piv_copy_task ( FLA_Obj  A,
FLA_Obj  p,
FLA_Obj  U,
fla_lu_t cntl 
)

References FLA_Copy_external(), and FLA_LU_piv_task().

Referenced by FLASH_LU_incpiv_var2(), and FLASH_Queue_exec_task().

14 {
15  FLA_Error r_val;
16 
17  r_val = FLA_LU_piv_task( A, p, cntl );
18 
19  FLA_Copy_external( A, U );
20 
21  return r_val;
22 }
FLA_Error FLA_LU_piv_task(FLA_Obj A, FLA_Obj p, fla_lu_t *cntl)
Definition: FLA_LU_piv_task.c:15
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Copy_external(FLA_Obj A, FLA_Obj B)
Definition: FLA_Copy_external.c:13

◆ FLA_LU_piv_macro_task()

FLA_Error FLA_LU_piv_macro_task ( FLA_Obj  A,
FLA_Obj  p,
fla_lu_t cntl 
)

References FLA_LU_piv_task(), FLA_Obj_free(), FLA_Obj_length(), FLASH_Copy_flat_to_hier(), and FLASH_Obj_create_flat_copy_of_hier().

Referenced by FLA_LU_piv_internal(), and FLASH_Queue_exec_task().

14 {
15  FLA_Error r_val;
16  FLA_Obj A_flat;
17 
18  if ( FLA_Obj_length( A ) > 1 )
19  {
21 
22  r_val = FLA_LU_piv_task( A_flat, p, cntl );
23 
24  FLASH_Copy_flat_to_hier( A_flat, 0, 0, A );
25 
26  FLA_Obj_free( &A_flat );
27  }
28  else
29  {
30  r_val = FLA_LU_piv_task( *FLASH_OBJ_PTR_AT( A ), p, cntl );
31  }
32 
33  return r_val;
34 }
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
FLA_Error FLA_LU_piv_task(FLA_Obj A, FLA_Obj p, fla_lu_t *cntl)
Definition: FLA_LU_piv_task.c:15
int FLA_Error
Definition: FLA_type_defs.h:47
Definition: FLA_type_defs.h:158
FLA_Error FLASH_Copy_flat_to_hier(FLA_Obj F, dim_t i, dim_t j, FLA_Obj H)
Definition: FLASH_Copy_other.c:81
FLA_Error FLASH_Obj_create_flat_copy_of_hier(FLA_Obj H, FLA_Obj *F)
Definition: FLASH_Obj.c:623
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_LU_piv_solve_check()

FLA_Error FLA_LU_piv_solve_check ( FLA_Obj  A,
FLA_Obj  p,
FLA_Obj  B,
FLA_Obj  X 
)

References FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_int_object(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_vector_dim_min(), and FLA_Obj_min_dim().

Referenced by FLA_LU_piv_solve(), and FLASH_LU_piv_solve().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_int_object( p );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_square( A );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_col_vector( p );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_vector_dim_min( p, FLA_Obj_min_dim( A ) );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
42  FLA_Check_error_code( e_val );
43 
44  return FLA_SUCCESS;
45 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_int_object(FLA_Obj A)
Definition: FLA_Check.c:245
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_col_vector(FLA_Obj x)
Definition: FLA_Check.c:1233
FLA_Error FLA_Check_vector_dim_min(FLA_Obj x, dim_t min_dim)
Definition: FLA_Check.c:740
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_LU_piv_task()

FLA_Error FLA_LU_piv_task ( FLA_Obj  A,
FLA_Obj  p,
fla_lu_t cntl 
)

References FLA_LU_piv_internal().

Referenced by FLA_LU_piv_copy_task(), FLA_LU_piv_macro_task(), FLASH_LU_incpiv_var1(), and FLASH_Queue_exec_task().

16 {
17  return FLA_LU_piv_internal( A, p,
19 }
fla_lu_t * fla_lu_piv_cntl_leaf
Definition: FLA_LU_piv_cntl_init.c:21
FLA_Error FLA_LU_piv_internal(FLA_Obj A, FLA_Obj p, fla_lu_t *cntl)
Definition: FLA_LU_piv_internal.c:15

◆ FLA_LU_piv_unb_ext()

FLA_Error FLA_LU_piv_unb_ext ( FLA_Obj  A,
FLA_Obj  p 
)

References FLA_LU_piv_unb_external().

Referenced by FLA_LU_piv_internal().

107 {
108  return FLA_LU_piv_unb_external( A, p );
109 }
FLA_Error FLA_LU_piv_unb_external(FLA_Obj A, FLA_Obj p)
Definition: FLA_LU_piv_unb_external.c:13

◆ FLA_LU_piv_unb_external()

FLA_Error FLA_LU_piv_unb_external ( FLA_Obj  A,
FLA_Obj  p 
)

References F77_cgetf2(), F77_dgetf2(), F77_sgetf2(), F77_zgetf2(), FLA_Check_error_level(), FLA_LU_piv_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), and FLA_Shift_pivots_to().

Referenced by FLA_LU_piv_unb_ext().

14 {
15  FLA_Error r_val = FLA_SUCCESS;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  int info;
18  FLA_Datatype datatype;
19  int m_A, n_A, cs_A;
20 
21  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22  FLA_LU_piv_check( A, p );
23 
24  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25 
26  datatype = FLA_Obj_datatype( A );
27 
28  m_A = FLA_Obj_length( A );
29  n_A = FLA_Obj_width( A );
30  cs_A = FLA_Obj_col_stride( A );
31 
32 
33  switch( datatype ){
34 
35  case FLA_FLOAT:
36  {
37  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
38  int *buff_p = ( int * ) FLA_INT_PTR( p );
39 
40  F77_sgetf2( &m_A,
41  &n_A,
42  buff_A, &cs_A,
43  buff_p,
44  &info );
45 
46  break;
47  }
48 
49  case FLA_DOUBLE:
50  {
51  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
52  int *buff_p = ( int * ) FLA_INT_PTR( p );
53 
54  F77_dgetf2( &m_A,
55  &n_A,
56  buff_A, &cs_A,
57  buff_p,
58  &info );
59 
60  break;
61  }
62 
63  case FLA_COMPLEX:
64  {
65  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
66  int *buff_p = ( int * ) FLA_INT_PTR( p );
67 
68  F77_cgetf2( &m_A,
69  &n_A,
70  buff_A, &cs_A,
71  buff_p,
72  &info );
73 
74  break;
75  }
76 
77  case FLA_DOUBLE_COMPLEX:
78  {
79  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
80  int *buff_p = ( int * ) FLA_INT_PTR( p );
81 
82  F77_zgetf2( &m_A,
83  &n_A,
84  buff_A, &cs_A,
85  buff_p,
86  &info );
87 
88  break;
89  }
90 
91  }
92 
93  FLA_Shift_pivots_to( FLA_NATIVE_PIVOTS, p );
94 
95  // Convert to zero-based indexing, if an index was reported.
96  if ( info > 0 ) r_val = info - 1;
97  else r_val = FLA_SUCCESS;
98 
99 #else
100  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
101 #endif
102 
103  return r_val;
104 }
int F77_dgetf2(int *m, int *n, double *a, int *lda, int *ipiv, int *info)
FLA_Error FLA_LU_piv_check(FLA_Obj A, FLA_Obj p)
Definition: FLA_LU_piv_check.c:13
int FLA_Error
Definition: FLA_type_defs.h:47
int F77_zgetf2(int *m, int *n, dcomplex *a, int *lda, int *ipiv, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Shift_pivots_to(FLA_Pivot_type ptype, FLA_Obj p)
Definition: FLA_Shift_pivots_to.c:13
Definition: blis_type_defs.h:132
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
int F77_cgetf2(int *m, int *n, scomplex *a, int *lda, int *ipiv, int *info)
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
int F77_sgetf2(int *m, int *n, float *a, int *lda, int *ipiv, int *info)
Definition: blis_type_defs.h:137

◆ FLA_Lyap_check()

FLA_Error FLA_Lyap_check ( FLA_Trans  trans,
FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  C,
FLA_Obj  scale 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_blas_trans(), and FLA_Check_valid_isgn_value().

Referenced by FLA_Lyap(), and FLASH_Lyap().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_blas_trans( trans );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_if_scalar( isgn );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_int_object( isgn );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_valid_isgn_value( isgn );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_floating_object( A );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_nonconstant_object( A );
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_square( A );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_square( C );
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_if_scalar( scale );
45  FLA_Check_error_code( e_val );
46 
47  e_val = FLA_Check_identical_object_precision( C, scale );
48  FLA_Check_error_code( e_val );
49 
50  return FLA_SUCCESS;
51 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_int_object(FLA_Obj A)
Definition: FLA_Check.c:245
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_valid_isgn_value(FLA_Obj isgn)
Definition: FLA_Check.c:770
FLA_Error FLA_Check_valid_blas_trans(FLA_Trans trans)
Definition: FLA_Check.c:928
FLA_Error FLA_Check_if_scalar(FLA_Obj A)
Definition: FLA_Check.c:373
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363

◆ FLA_Lyap_h_task()

FLA_Error FLA_Lyap_h_task ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  C,
FLA_Obj  scale,
fla_lyap_t cntl 
)

References FLA_Lyap_internal().

28 {
29  return FLA_Lyap_internal( FLA_CONJ_TRANSPOSE, isgn, A, C, scale,
31 }
fla_lyap_t * fla_lyap_cntl_leaf
Definition: FLA_Lyap_cntl_init.c:19
FLA_Error FLA_Lyap_internal(FLA_Trans trans, FLA_Obj isgn, FLA_Obj A, FLA_Obj C, FLA_Obj scale, fla_lyap_t *cntl)
Definition: FLA_Lyap_internal.c:16

◆ FLA_Lyap_internal_check()

FLA_Error FLA_Lyap_internal_check ( FLA_Trans  trans,
FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  C,
FLA_Obj  scale,
fla_lyap_t cntl 
)

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), and FLA_Check_square().

Referenced by FLA_Lyap_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
25  // Verify conformality between all the objects. This check works regardless
26  // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
27  // element length and width are used instead of scalar length and width.
28  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, C );
29  FLA_Check_error_code( e_val );
30 
31  e_val = FLA_Check_square( A );
32  FLA_Check_error_code( e_val );
33 
34  e_val = FLA_Check_square( C );
35  FLA_Check_error_code( e_val );
36 
37  return FLA_SUCCESS;
38 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_Lyap_n_task()

FLA_Error FLA_Lyap_n_task ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  C,
FLA_Obj  scale,
fla_lyap_t cntl 
)

References FLA_Lyap_internal().

22 {
23  return FLA_Lyap_internal( FLA_NO_TRANSPOSE, isgn, A, C, scale,
25 }
fla_lyap_t * fla_lyap_cntl_leaf
Definition: FLA_Lyap_cntl_init.c:19
FLA_Error FLA_Lyap_internal(FLA_Trans trans, FLA_Obj isgn, FLA_Obj A, FLA_Obj C, FLA_Obj scale, fla_lyap_t *cntl)
Definition: FLA_Lyap_internal.c:16

◆ FLA_Lyap_task()

FLA_Error FLA_Lyap_task ( FLA_Trans  trans,
FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  C,
FLA_Obj  scale,
fla_lyap_t cntl 
)

References FLA_Lyap_internal().

Referenced by FLASH_Queue_exec_task().

16 {
17  return FLA_Lyap_internal( trans, isgn, A, C, scale,
19 }
fla_lyap_t * fla_lyap_cntl_leaf
Definition: FLA_Lyap_cntl_init.c:19
FLA_Error FLA_Lyap_internal(FLA_Trans trans, FLA_Obj isgn, FLA_Obj A, FLA_Obj C, FLA_Obj scale, fla_lyap_t *cntl)
Definition: FLA_Lyap_internal.c:16

◆ FLA_QR2_UT_check()

FLA_Error FLA_QR2_UT_check ( FLA_Obj  B,
FLA_Obj  D,
FLA_Obj  T 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_square().

Referenced by FLASH_QR2_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( B );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( B );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_square( B );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, B, D );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, T, B, T );
36  FLA_Check_error_code( e_val );
37 
38  return FLA_SUCCESS;
39 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417

◆ FLA_QR2_UT_internal_check()

FLA_Error FLA_QR2_UT_internal_check ( FLA_Obj  B,
FLA_Obj  D,
FLA_Obj  T,
fla_qr2ut_t cntl 
)

References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_equals(), and FLA_Obj_width().

Referenced by FLA_QR2_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
28  // Verify conformality between all the objects. This check works regardless
29  // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
30  // element length and width are used instead of scalar length and width.
31  //e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, B, D );
32  //FLA_Check_error_code( e_val );
34  FLA_Check_error_code( e_val );
35 
36  //e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, T, B, T );
37  //FLA_Check_error_code( e_val );
39  FLA_Check_error_code( e_val );
40 
41  return FLA_SUCCESS;
42 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_QR2_UT_task()

FLA_Error FLA_QR2_UT_task ( FLA_Obj  B,
FLA_Obj  D,
FLA_Obj  T,
fla_qr2ut_t cntl 
)

References FLA_QR2_UT_internal().

Referenced by FLA_CAQR2_UT_internal(), and FLASH_Queue_exec_task().

16 {
17  return FLA_QR2_UT_internal( B, D, T,
19 }
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_qr2ut_t * fla_qr2ut_cntl_leaf
Definition: FLA_QR2_UT_cntl_init.c:19

◆ FLA_QR_blk_external()

FLA_Error FLA_QR_blk_external ( FLA_Obj  A,
FLA_Obj  t 
)

References F77_cgeqrf(), F77_dgeqrf(), F77_sgeqrf(), F77_zgeqrf(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_QR_check(), and FLA_Query_blocksize().

Referenced by FLA_QR_blk_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A, n_A, cs_A;
19  int lwork;
20  FLA_Obj work_obj;
21 
22  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23  FLA_QR_check( A, t );
24 
25  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26 
27  datatype = FLA_Obj_datatype( A );
28 
29  m_A = FLA_Obj_length( A );
30  n_A = FLA_Obj_width( A );
31  cs_A = FLA_Obj_col_stride( A );
32 
33  lwork = n_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
34  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
35 
36  switch( datatype ){
37 
38  case FLA_FLOAT:
39  {
40  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
41  float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
42  float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
43 
44  F77_sgeqrf( &m_A,
45  &n_A,
46  buff_A, &cs_A,
47  buff_t,
48  buff_work, &lwork,
49  &info );
50 
51  break;
52  }
53 
54  case FLA_DOUBLE:
55  {
56  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
57  double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
58  double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
59 
60  F77_dgeqrf( &m_A,
61  &n_A,
62  buff_A, &cs_A,
63  buff_t,
64  buff_work, &lwork,
65  &info );
66 
67  break;
68  }
69 
70  case FLA_COMPLEX:
71  {
72  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
73  scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
74  scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
75 
76  F77_cgeqrf( &m_A,
77  &n_A,
78  buff_A, &cs_A,
79  buff_t,
80  buff_work, &lwork,
81  &info );
82 
83  break;
84  }
85 
86  case FLA_DOUBLE_COMPLEX:
87  {
88  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
89  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
90  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
91 
92  F77_zgeqrf( &m_A,
93  &n_A,
94  buff_A, &cs_A,
95  buff_t,
96  buff_work, &lwork,
97  &info );
98 
99  break;
100  }
101 
102  }
103 
104  FLA_Obj_free( &work_obj );
105 #else
106  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
107 #endif
108 
109  return info;
110 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
dim_t FLA_Query_blocksize(FLA_Datatype dt, FLA_Dimension dim)
Definition: FLA_Blocksize.c:161
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Error FLA_QR_check(FLA_Obj A, FLA_Obj t)
Definition: FLA_QR_check.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
int F77_dgeqrf(int *m, int *n, double *a, int *lda, double *tau, double *work, int *lwork, int *info)
Definition: blis_type_defs.h:132
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int F77_zgeqrf(int *m, int *n, dcomplex *a, int *lda, dcomplex *tau, dcomplex *work, int *lwork, int *info)
int FLA_Datatype
Definition: FLA_type_defs.h:49
int F77_cgeqrf(int *m, int *n, scomplex *a, int *lda, scomplex *tau, scomplex *work, int *lwork, int *info)
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137
int F77_sgeqrf(int *m, int *n, float *a, int *lda, float *tau, float *work, int *lwork, int *info)

◆ FLA_QR_check()

FLA_Error FLA_QR_check ( FLA_Obj  A,
FLA_Obj  t 
)

References FLA_Check_col_storage(), FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_vector_dim(), and FLA_Obj_min_dim().

Referenced by FLA_QR_blk_external(), and FLA_QR_unb_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_col_vector( t );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_col_storage( t );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_vector_dim( t, FLA_Obj_min_dim( A ) );
33  FLA_Check_error_code( e_val );
34 
35  return FLA_SUCCESS;
36 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_col_storage(FLA_Obj A)
Definition: FLA_Check.c:1325
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_col_vector(FLA_Obj x)
Definition: FLA_Check.c:1233
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_QR_form_Q_check()

FLA_Error FLA_QR_form_Q_check ( FLA_Obj  A,
FLA_Obj  t 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), and FLA_Check_nonconstant_object().

Referenced by FLA_QR_form_Q_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_if_vector( t );
27  FLA_Check_error_code( e_val );
28 
29  return FLA_SUCCESS;
30 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232

◆ FLA_QR_form_Q_external()

FLA_Error FLA_QR_form_Q_external ( FLA_Obj  A,
FLA_Obj  t 
)

References F77_cungqr(), F77_dorgqr(), F77_sorgqr(), F77_zungqr(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), FLA_QR_form_Q_check(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A, n_A, k_A;
19  int cs_A;
20  int lwork;
21  FLA_Obj work;
22  int i;
23 
24  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
25  FLA_QR_form_Q_check( A, t );
26 
27  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
28 
29  datatype = FLA_Obj_datatype( A );
30 
31  m_A = FLA_Obj_length( A );
32  n_A = FLA_Obj_width( A );
33  cs_A = FLA_Obj_col_stride( A );
34 
35  k_A = FLA_Obj_vector_dim( t );
36 
37  // Make a workspace query the first time through. This will provide us with
38  // and ideal workspace size based on an internal block size.
39  lwork = -1;
40  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
41 
42  for ( i = 0; i < 2; ++i )
43  {
44  if ( i == 1 )
45  {
46  // Grab the queried ideal workspace size from the work array, free the
47  // work object, and then re-allocate the workspace with the ideal size.
48  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
49  lwork = ( int ) *FLA_FLOAT_PTR( work );
50  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
51  lwork = ( int ) *FLA_DOUBLE_PTR( work );
52 
53  FLA_Obj_free( &work );
54  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
55  }
56 
57  switch( datatype ){
58 
59  case FLA_FLOAT:
60  {
61  float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
62  float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
63  float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
64 
65  F77_sorgqr( &m_A,
66  &n_A,
67  &k_A,
68  buff_A, &cs_A,
69  buff_t,
70  buff_work, &lwork,
71  &info );
72 
73  break;
74  }
75 
76  case FLA_DOUBLE:
77  {
78  double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
79  double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
80  double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
81 
82  F77_dorgqr( &m_A,
83  &n_A,
84  &k_A,
85  buff_A, &cs_A,
86  buff_t,
87  buff_work, &lwork,
88  &info );
89 
90  break;
91  }
92 
93  case FLA_COMPLEX:
94  {
95  scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
96  scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
97  scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
98 
99  F77_cungqr( &m_A,
100  &n_A,
101  &k_A,
102  buff_A, &cs_A,
103  buff_t,
104  buff_work, &lwork,
105  &info );
106 
107  break;
108  }
109 
110  case FLA_DOUBLE_COMPLEX:
111  {
112  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
113  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
114  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
115 
116  F77_zungqr( &m_A,
117  &n_A,
118  &k_A,
119  buff_A, &cs_A,
120  buff_t,
121  buff_work, &lwork,
122  &info );
123 
124  break;
125  }
126 
127  }
128 
129  }
130 
131  FLA_Obj_free( &work );
132 #else
133  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
134 #endif
135 
136  return info;
137 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
FLA_Error FLA_QR_form_Q_check(FLA_Obj A, FLA_Obj t)
Definition: FLA_QR_form_Q_check.c:13
int F77_sorgqr(int *m, int *n, int *k, float *a, int *lda, float *tau, float *work, int *lwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
int F77_dorgqr(int *m, int *n, int *k, double *a, int *lda, double *tau, double *work, int *lwork, int *info)
int F77_cungqr(int *m, int *n, int *k, scomplex *a, int *lda, scomplex *tau, scomplex *work, int *lwork, int *info)
Definition: blis_type_defs.h:132
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
int F77_zungqr(int *m, int *n, int *k, dcomplex *a, int *lda, dcomplex *tau, dcomplex *work, int *lwork, int *info)
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_QR_unb_external()

FLA_Error FLA_QR_unb_external ( FLA_Obj  A,
FLA_Obj  t 
)

References F77_cgeqr2(), F77_dgeqr2(), F77_sgeqr2(), F77_zgeqr2(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), and FLA_QR_check().

Referenced by FLA_QR_unb_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A, n_A, cs_A;
19  FLA_Obj work_obj;
20 
21  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22  FLA_QR_check( A, t );
23 
24  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25 
26  datatype = FLA_Obj_datatype( A );
27 
28  m_A = FLA_Obj_length( A );
29  n_A = FLA_Obj_width( A );
30  cs_A = FLA_Obj_col_stride( A );
31 
32  FLA_Obj_create( datatype, n_A, 1, 0, 0, &work_obj );
33 
34  switch( datatype ){
35 
36  case FLA_FLOAT:
37  {
38  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
39  float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
40  float *buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
41 
42  F77_sgeqr2( &m_A,
43  &n_A,
44  buff_A, &cs_A,
45  buff_t,
46  buff_work,
47  &info );
48 
49  break;
50  }
51 
52  case FLA_DOUBLE:
53  {
54  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
55  double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
56  double *buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
57 
58  F77_dgeqr2( &m_A,
59  &n_A,
60  buff_A, &cs_A,
61  buff_t,
62  buff_work,
63  &info );
64 
65  break;
66  }
67 
68  case FLA_COMPLEX:
69  {
70  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
71  scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
72  scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
73 
74  F77_cgeqr2( &m_A,
75  &n_A,
76  buff_A, &cs_A,
77  buff_t,
78  buff_work,
79  &info );
80 
81  break;
82  }
83 
84  case FLA_DOUBLE_COMPLEX:
85  {
86  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
87  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
88  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
89 
90  F77_zgeqr2( &m_A,
91  &n_A,
92  buff_A, &cs_A,
93  buff_t,
94  buff_work,
95  &info );
96 
97  break;
98  }
99 
100  }
101 
102  FLA_Obj_free( &work_obj );
103 #else
104  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
105 #endif
106 
107  return info;
108 }
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
int F77_zgeqr2(int *m, int *n, dcomplex *a, int *lda, dcomplex *tau, dcomplex *work, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_cgeqr2(int *m, int *n, scomplex *a, int *lda, scomplex *tau, scomplex *work, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Error FLA_QR_check(FLA_Obj A, FLA_Obj t)
Definition: FLA_QR_check.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
int F77_dgeqr2(int *m, int *n, double *a, int *lda, double *tau, double *work, int *info)
Definition: blis_type_defs.h:132
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_sgeqr2(int *m, int *n, float *a, int *lda, float *tau, float *work, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_QR_UT()

FLA_Error FLA_QR_UT ( FLA_Obj  A,
FLA_Obj  T 
)

Referenced by FLA_Random_unitary_matrix(), FLA_Svd_ext_u_unb_var1(), FLA_Svd_uv_unb_var1(), and FLA_Svd_uv_unb_var2().

16 {
17  FLA_Error r_val;
18 
19  // Check parameters.
20  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21  FLA_QR_UT_check( A, T );
22 
23  // Invoke FLA_QR_UT_internal() with the standard control tree.
24  //r_val = FLA_QR_UT_internal( A, T, fla_qrut_cntl2 );
25  r_val = FLA_QR_UT_internal( A, T, fla_qrut_cntl_leaf );
26 
27  return r_val;
28 }
fla_qrut_t * fla_qrut_cntl_leaf
Definition: FLA_QR_UT_cntl_init.c:16
FLA_Error FLA_QR_UT_check(FLA_Obj A, FLA_Obj T)
Definition: FLA_QR_UT_check.c:13
int FLA_Error
Definition: FLA_type_defs.h:47
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
FLA_Error FLA_QR_UT_internal(FLA_Obj A, FLA_Obj T, fla_qrut_t *cntl)
Definition: FLA_QR_UT_internal.c:17

◆ FLA_QR_UT_check()

FLA_Error FLA_QR_UT_check ( FLA_Obj  A,
FLA_Obj  T 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), and FLA_Obj_width().

Referenced by FLA_QR_UT(), and FLASH_QR_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  return FLA_SUCCESS;
30 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123

◆ FLA_QR_UT_copy_internal_check()

FLA_Error FLA_QR_UT_copy_internal_check ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  U,
fla_qrut_t cntl 
)

References FLA_Check_conformal_dims(), FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_equals(), and FLA_Obj_width().

Referenced by FLA_QR_UT_copy_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
28  // Verify conformality between all the objects. This check works regardless
29  // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
30  // element length and width are used instead of scalar length and width.
32  FLA_Check_error_code( e_val );
33 
34  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, U );
35  FLA_Check_error_code( e_val );
36 
37  return FLA_SUCCESS;
38 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_QR_UT_copy_task()

FLA_Error FLA_QR_UT_copy_task ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  U,
fla_qrut_t cntl 
)

References FLA_Copyr_external(), FLA_Obj_min_dim(), FLA_Part_2x1(), and FLA_QR_UT_internal().

Referenced by FLA_QR_UT_copy_internal(), and FLASH_Queue_exec_task().

16 {
17  FLA_Error r_val;
18  FLA_Obj AT,
19  AB;
20 
21  // Perform a QR factorization as we normally would.
22  r_val = FLA_QR_UT_internal( A, T,
24 
25  // Partition away the bottom part of the matrix, if there is any, so that
26  // the dimensions match that of U. This step is only necessary so that
27  // the copyr operation below works normally for the last iteration of
28  // incremental QR. The whole point of making a copy of the lower triangle
29  // of A is to allow stage 2 to proceed without a dependency leading into
30  // stage 3. But the last iteration does not perform stage 2, and thus U
31  // is never read and so the copyr does not need to happen.
32  FLA_Part_2x1( A, &AT,
33  &AB, FLA_Obj_min_dim( A ), FLA_TOP );
34 
35  // Copy the Householder vectors into U.
36  FLA_Copyr_external( FLA_LOWER_TRIANGULAR, AT, U );
37 
38  return r_val;
39 }
fla_qrut_t * fla_qrut_cntl_leaf
Definition: FLA_QR_UT_cntl_init.c:16
int FLA_Error
Definition: FLA_type_defs.h:47
Definition: FLA_type_defs.h:158
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
FLA_Error FLA_Copyr_external(FLA_Uplo uplo, FLA_Obj A, FLA_Obj B)
Definition: FLA_Copyr_external.c:13
FLA_Error FLA_QR_UT_internal(FLA_Obj A, FLA_Obj T, fla_qrut_t *cntl)
Definition: FLA_QR_UT_internal.c:17
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_QR_UT_form_Q_check()

FLA_Error FLA_QR_UT_form_Q_check ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  Q 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), and FLA_Obj_length().

Referenced by FLA_QR_UT_form_Q().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  // The width of T is the loop guard, not A. This should not be checked.
30  //e_val = FLA_Check_object_width_equals( T, FLA_Obj_width( A ) );
31  //FLA_Check_error_code( e_val );
32 
34  FLA_Check_error_code( e_val );
35 
36  // Q matrix should not be restricted to be a square matrix
37  // e_val = FLA_Check_square( Q );
38  // FLA_Check_error_code( e_val );
39 
40  return FLA_SUCCESS;
41 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_QR_UT_inc_check()

FLA_Error FLA_QR_UT_inc_check ( FLA_Obj  A,
FLA_Obj  TW 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), and FLA_Check_nonconstant_object().

Referenced by FLASH_QR_UT_inc_noopt(), and FLASH_QR_UT_inc_opt1().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_identical_object_datatype( A, TW );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW );
27  FLA_Check_error_code( e_val );
28 
29  return FLA_SUCCESS;
30 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393

◆ FLA_QR_UT_inc_solve_check()

FLA_Error FLA_QR_UT_inc_solve_check ( FLA_Obj  A,
FLA_Obj  TW,
FLA_Obj  B,
FLA_Obj  X 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_length_min(), and FLA_Obj_width().

Referenced by FLASH_QR_UT_inc_solve().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_identical_object_datatype( A, TW );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, A, TW );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_object_length_min( A, FLA_Obj_width( A ) );
39  FLA_Check_error_code( e_val );
40 
41  return FLA_SUCCESS;
42 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_object_length_min(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1059
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417

◆ FLA_QR_UT_internal_check()

FLA_Error FLA_QR_UT_internal_check ( FLA_Obj  A,
FLA_Obj  T,
fla_qrut_t cntl 
)

References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_width_min(), and FLA_Obj_min_dim().

Referenced by FLA_QR_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
25  // Verify conformality between all the objects. This check works regardless
26  // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
27  // element length and width are used instead of scalar length and width.
29  FLA_Check_error_code( e_val );
30 
31  return FLA_SUCCESS;
32 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_min(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1069
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_QR_UT_macro_task()

FLA_Error FLA_QR_UT_macro_task ( FLA_Obj  A,
FLA_Obj  T,
fla_qrut_t cntl 
)

References FLA_Obj_free(), FLA_Obj_length(), FLA_QR_UT_internal(), FLA_QR_UT_task(), FLASH_Copy_flat_to_hier(), and FLASH_Obj_create_flat_copy_of_hier().

Referenced by FLA_QR_UT_internal(), and FLASH_Queue_exec_task().

16 {
17  FLA_Error r_val;
18  FLA_Obj A_flat;
19 
20  if ( FLA_Obj_length( A ) > 1 )
21  {
23 
24  r_val = FLA_QR_UT_internal( A_flat, T, fla_qrut_cntl_leaf );
25 
26  FLASH_Copy_flat_to_hier( A_flat, 0, 0, A );
27 
28  FLA_Obj_free( &A_flat );
29  }
30  else
31  {
32  r_val = FLA_QR_UT_task( *FLASH_OBJ_PTR_AT( A ), T, cntl );
33  }
34 
35  return r_val;
36 }
FLA_Error FLA_QR_UT_task(FLA_Obj A, FLA_Obj T, fla_qrut_t *cntl)
Definition: FLA_QR_UT_task.c:15
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
fla_qrut_t * fla_qrut_cntl_leaf
Definition: FLA_QR_UT_cntl_init.c:16
int FLA_Error
Definition: FLA_type_defs.h:47
Definition: FLA_type_defs.h:158
FLA_Error FLASH_Copy_flat_to_hier(FLA_Obj F, dim_t i, dim_t j, FLA_Obj H)
Definition: FLASH_Copy_other.c:81
FLA_Error FLASH_Obj_create_flat_copy_of_hier(FLA_Obj H, FLA_Obj *F)
Definition: FLASH_Obj.c:623
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_QR_UT_internal(FLA_Obj A, FLA_Obj T, fla_qrut_t *cntl)
Definition: FLA_QR_UT_internal.c:17

◆ FLA_QR_UT_piv()

FLA_Error FLA_QR_UT_piv ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  w,
FLA_Obj  p 
)
16 {
17  FLA_Error r_val;
18 
19  // Check parameters.
20  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21  FLA_QR_UT_piv_check( A, T, w, p );
22 
23  FLA_Set( FLA_ZERO, w );
25 
26  r_val = FLA_QR_UT_piv_internal( A, T, w, p, fla_qrut_piv_cntl_leaf );
27 
28  return r_val;
29 }
FLA_Error FLA_QR_UT_piv_colnorm(FLA_Obj alpha, FLA_Obj A, FLA_Obj b)
Definition: FLA_QR_UT_piv_colnorm.c:13
FLA_Obj FLA_ONE
Definition: FLA_Init.c:18
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_QR_UT_piv_check(FLA_Obj A, FLA_Obj T, FLA_Obj w, FLA_Obj p)
Definition: FLA_QR_UT_piv_check.c:13
fla_qrut_t * fla_qrut_piv_cntl_leaf
Definition: FLA_QR_UT_cntl_init.c:19
FLA_Error FLA_Set(FLA_Obj alpha, FLA_Obj A)
Definition: FLA_Set.c:13
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
FLA_Error FLA_QR_UT_piv_internal(FLA_Obj A, FLA_Obj T, FLA_Obj w, FLA_Obj p, fla_qrut_t *cntl)
Definition: FLA_QR_UT_piv_internal.c:13
FLA_Obj FLA_ZERO
Definition: FLA_Init.c:20

◆ FLA_QR_UT_recover_tau_check()

FLA_Error FLA_QR_UT_recover_tau_check ( FLA_Obj  T,
FLA_Obj  tau 
)

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), and FLA_Check_if_vector().

Referenced by FLA_QR_UT_recover_tau().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( T );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_consistent_object_datatype( T, tau );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_if_vector( tau );
24  FLA_Check_error_code( e_val );
25 
26  // This is not valid anymore as T is created with a conforming width to A.
27  //e_val = FLA_Check_object_width_equals( T, FLA_Obj_vector_dim( tau ) );
28  //FLA_Check_error_code( e_val );
29 
30  return FLA_SUCCESS;
31 }
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_consistent_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:339

◆ FLA_QR_UT_solve_check()

FLA_Error FLA_QR_UT_solve_check ( FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  B,
FLA_Obj  X 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_length_min(), FLA_Check_object_width_equals(), FLA_Obj_min_dim(), and FLA_Obj_width().

Referenced by FLA_QR_UT_solve(), and FLASH_QR_UT_solve().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, X, B );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_object_length_min( A, FLA_Obj_width( A ) );
39  FLA_Check_error_code( e_val );
40 
41  return FLA_SUCCESS;
42 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_object_length_min(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1059
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_QR_UT_task()

FLA_Error FLA_QR_UT_task ( FLA_Obj  A,
FLA_Obj  T,
fla_qrut_t cntl 
)

References FLA_QR_UT_internal().

Referenced by FLA_QR_UT_macro_task(), and FLASH_Queue_exec_task().

16 {
17  return FLA_QR_UT_internal( A, T,
19 }
fla_qrut_t * fla_qrut_cntl_leaf
Definition: FLA_QR_UT_cntl_init.c:16
FLA_Error FLA_QR_UT_internal(FLA_Obj A, FLA_Obj T, fla_qrut_t *cntl)
Definition: FLA_QR_UT_internal.c:17

◆ FLA_SA_FS_task()

FLA_Error FLA_SA_FS_task ( FLA_Obj  L,
FLA_Obj  D,
FLA_Obj  p,
FLA_Obj  C,
FLA_Obj  E,
dim_t  nb_alg,
fla_gemm_t cntl 
)

References FLA_SA_FS_blk().

Referenced by FLASH_Queue_exec_task(), and FLASH_SA_FS().

17 {
18  FLA_Error info;
19 
20  info = FLA_SA_FS_blk( L,
21  D, p, C,
22  E, nb_alg );
23 
24  return info;
25 }
FLA_Error FLA_SA_FS_blk(FLA_Obj L, FLA_Obj D, FLA_Obj p, FLA_Obj C, FLA_Obj E, dim_t nb_alg)
Definition: FLA_SA_FS_blk.c:13
int FLA_Error
Definition: FLA_type_defs.h:47

◆ FLA_SA_LU_task()

FLA_Error FLA_SA_LU_task ( FLA_Obj  U,
FLA_Obj  D,
FLA_Obj  p,
FLA_Obj  L,
dim_t  nb_alg,
fla_lu_t cntl 
)

References FLA_SA_LU_blk().

Referenced by FLASH_Queue_exec_task(), and FLASH_SA_LU().

16 {
17  FLA_Error info;
18 
19  info = FLA_SA_LU_blk( U,
20  D, p, L, nb_alg );
21 
22  return info;
23 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_SA_LU_blk(FLA_Obj U, FLA_Obj D, FLA_Obj p, FLA_Obj L, dim_t nb_alg)
Definition: FLA_SA_LU_blk.c:13

◆ FLA_SPDinv()

FLA_Error FLA_SPDinv ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References FLA_Check_error_level(), FLA_SPDinv_check(), and FLA_SPDinv_internal().

16 {
17  FLA_Error r_val = FLA_SUCCESS;
18 
19  // Check parameters.
20  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21  FLA_SPDinv_check( uplo, A );
22 
23  // Invoke FLA_SPDinv_internal() with an appropriate control tree.
24  r_val = FLA_SPDinv_internal( uplo, A, fla_spdinv_cntl );
25 
26  return r_val;
27 }
FLA_Error FLA_SPDinv_check(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_SPDinv_check.c:13
FLA_Error FLA_SPDinv_internal(FLA_Uplo uplo, FLA_Obj A, fla_spdinv_t *cntl)
Definition: FLA_SPDinv_internal.c:13
int FLA_Error
Definition: FLA_type_defs.h:47
fla_spdinv_t * fla_spdinv_cntl
Definition: FLA_SPDinv_cntl_init.c:17
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18

◆ FLA_SPDinv_blk_external()

FLA_Error FLA_SPDinv_blk_external ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References FLA_Check_error_level(), FLA_Chol_blk_external(), FLA_SPDinv_check(), FLA_Trinv_blk_external(), and FLA_Ttmm_blk_external().

Referenced by FLA_SPDinv_blk_ext().

14 {
15 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
16  FLA_Error e_val;
17 
18  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
19  FLA_SPDinv_check( uplo, A );
20 
21  e_val = FLA_Chol_blk_external( uplo, A );
22 
23  if ( e_val != FLA_SUCCESS )
24  return e_val;
25 
26  e_val = FLA_Trinv_blk_external( uplo, FLA_NONUNIT_DIAG, A );
27 
28  if ( e_val != FLA_SUCCESS )
29  return e_val;
30 
31  FLA_Ttmm_blk_external( uplo, A );
32 #else
33  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
34 #endif
35 
36  return FLA_SUCCESS;
37 }
FLA_Error FLA_Ttmm_blk_external(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Ttmm_blk_external.c:13
FLA_Error FLA_SPDinv_check(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_SPDinv_check.c:13
int FLA_Error
Definition: FLA_type_defs.h:47
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
FLA_Error FLA_Trinv_blk_external(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition: FLA_Trinv_blk_external.c:13
FLA_Error FLA_Chol_blk_external(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Chol_blk_external.c:13

◆ FLA_SPDinv_check()

FLA_Error FLA_SPDinv_check ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().

Referenced by FLA_SPDinv(), FLA_SPDinv_blk_external(), and FLASH_SPDinv().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_square( A );
27  FLA_Check_error_code( e_val );
28 
29  return FLA_SUCCESS;
30 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_SPDinv_internal_check()

FLA_Error FLA_SPDinv_internal_check ( FLA_Uplo  uplo,
FLA_Obj  A,
fla_spdinv_t cntl 
)

References FLA_Check_null_pointer().

Referenced by FLA_SPDinv_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  return FLA_SUCCESS;
22 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_Svd_check()

FLA_Error FLA_Svd_check ( FLA_Svd_type  jobu,
FLA_Svd_type  jobv,
FLA_Obj  A,
FLA_Obj  s,
FLA_Obj  U,
FLA_Obj  V 
)

References FLA_Check_col_storage(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_real_object(), FLA_Check_valid_svd_type(), FLA_Check_vector_dim(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_min_dim(), and FLA_Obj_width().

Referenced by FLA_Svd(), and FLA_Svd_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_svd_type( jobu );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_svd_type( jobv );
21  FLA_Check_error_code( e_val );
22 
23  // FLA_Svd does not allow FLA_SVD_VECTORS_MIN_OVERWRITE
24  // for both jobu and jobv as V cannot be overwritten on A.
25  // Use FLA_Svd_ext to allow OVERWRITE options.
26  if ( jobu == FLA_SVD_VECTORS_MIN_OVERWRITE ||
27  jobv == FLA_SVD_VECTORS_MIN_OVERWRITE )
28  FLA_Check_error_code( FLA_NOT_YET_IMPLEMENTED );
29 
30  // Do not check the jobu and jobv OVERWRITE combination.
31  //e_val = FLA_Check_valid_svd_type_combination( jobu, jobv );
32  //FLA_Check_error_code( e_val );
33 
34  e_val = FLA_Check_floating_object( A );
35  FLA_Check_error_code( e_val );
36 
37  e_val = FLA_Check_nonconstant_object( A );
38  FLA_Check_error_code( e_val );
39 
40  e_val = FLA_Check_real_object( s );
41  FLA_Check_error_code( e_val );
42 
44  FLA_Check_error_code( e_val );
45 
46  e_val = FLA_Check_vector_dim( s, FLA_Obj_min_dim( A ) );
47  FLA_Check_error_code( e_val );
48 
49  e_val = FLA_Check_col_storage( s );
50  FLA_Check_error_code( e_val );
51 
52  // When jobu is FLA_SVD_VECTORS_NONE, U may be given without a base object allocated.
53  if ( jobu != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( U ) == FALSE )
54  {
56  FLA_Check_error_code( e_val );
57 
59  FLA_Check_error_code( e_val );
60 
61  // No need to be square.
62  //e_val = FLA_Check_square( U );
63  //FLA_Check_error_code( e_val );
64  }
65 
66  // When jobv is FLA_SVD_VECTORS_NONE, V may be given without a base object allocated.
67  if ( jobv != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( V ) == FALSE )
68  {
70  FLA_Check_error_code( e_val );
71 
73  FLA_Check_error_code( e_val );
74 
75  // No need to be square.
76  //e_val = FLA_Check_square( V );
77  //FLA_Check_error_code( e_val );
78  }
79 
80  return FLA_SUCCESS;
81 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_col_storage(FLA_Obj A)
Definition: FLA_Check.c:1325
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_valid_svd_type(FLA_Svd_type svd_type)
Definition: FLA_Check.c:1254
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Svd_compute_scaling_check()

FLA_Error FLA_Svd_compute_scaling_check ( FLA_Obj  A,
FLA_Obj  sigma 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), and FLA_Check_real_object().

Referenced by FLA_Svd_compute_scaling().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( A );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_real_object( sigma );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_nonconstant_object( sigma );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_identical_object_precision( A, sigma );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_if_scalar( sigma );
33  FLA_Check_error_code( e_val );
34 
35  return FLA_SUCCESS;
36 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_if_scalar(FLA_Obj A)
Definition: FLA_Check.c:373

◆ FLA_Svd_ext_check()

FLA_Error FLA_Svd_ext_check ( FLA_Svd_type  jobu,
FLA_Trans  transu,
FLA_Svd_type  jobv,
FLA_Trans  transv,
FLA_Obj  A,
FLA_Obj  s,
FLA_Obj  U,
FLA_Obj  V 
)

References FLA_Check_col_storage(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_real_object(), FLA_Check_valid_svd_type(), FLA_Check_valid_svd_type_and_trans_combination(), FLA_Check_valid_svd_type_combination(), FLA_Check_valid_trans(), FLA_Check_vector_dim(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_min_dim(), and FLA_Obj_width().

Referenced by FLA_Svd_ext().

16 {
17  FLA_Error e_val;
18 
19  e_val = FLA_Check_valid_svd_type( jobu );
20  FLA_Check_error_code( e_val );
21 
22  e_val = FLA_Check_valid_svd_type( jobv );
23  FLA_Check_error_code( e_val );
24 
25  e_val = FLA_Check_valid_svd_type_combination( jobu, jobv );
26  FLA_Check_error_code( e_val );
27 
28  e_val = FLA_Check_valid_trans( transu );
29  FLA_Check_error_code( e_val );
30 
31  e_val = FLA_Check_valid_trans( transv );
32  FLA_Check_error_code( e_val );
33 
34  e_val = FLA_Check_valid_svd_type_and_trans_combination( jobu, transu, jobv, transv );
35  FLA_Check_error_code( e_val );
36 
37  e_val = FLA_Check_floating_object( A );
38  FLA_Check_error_code( e_val );
39 
40  e_val = FLA_Check_nonconstant_object( A );
41  FLA_Check_error_code( e_val );
42 
43  e_val = FLA_Check_real_object( s );
44  FLA_Check_error_code( e_val );
45 
47  FLA_Check_error_code( e_val );
48 
49  e_val = FLA_Check_vector_dim( s, FLA_Obj_min_dim( A ) );
50  FLA_Check_error_code( e_val );
51 
52  e_val = FLA_Check_col_storage( s );
53  FLA_Check_error_code( e_val );
54 
55  if ( jobu != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( U ) == FALSE )
56  {
58  FLA_Check_error_code( e_val );
59 
60  if ( transu == FLA_NO_TRANSPOSE || transu == FLA_CONJ_NO_TRANSPOSE )
61  {
63  FLA_Check_error_code( e_val );
64  }
65  else
66  {
68  FLA_Check_error_code( e_val );
69  }
70  }
71 
72  if ( jobv != FLA_SVD_VECTORS_NONE && FLA_Obj_has_zero_dim( V ) == FALSE )
73  {
75  FLA_Check_error_code( e_val );
76 
77  if ( transv == FLA_NO_TRANSPOSE || transv == FLA_CONJ_NO_TRANSPOSE )
78  {
80  FLA_Check_error_code( e_val );
81  }
82  else
83  {
85  FLA_Check_error_code( e_val );
86  }
87  }
88 
89  return FLA_SUCCESS;
90 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition: FLA_Check.c:87
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_col_storage(FLA_Obj A)
Definition: FLA_Check.c:1325
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_valid_svd_type(FLA_Svd_type svd_type)
Definition: FLA_Check.c:1254
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_valid_svd_type_combination(FLA_Svd_type svd_type_u, FLA_Svd_type svd_type_v)
Definition: FLA_Check.c:1267
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
FLA_Error FLA_Check_valid_svd_type_and_trans_combination(FLA_Svd_type svd_type_u, FLA_Trans transu, FLA_Svd_type svd_type_v, FLA_Trans transv)
Definition: FLA_Check.c:1278
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Svd_external()

FLA_Error FLA_Svd_external ( FLA_Svd_type  jobu,
FLA_Svd_type  jobv,
FLA_Obj  A,
FLA_Obj  s,
FLA_Obj  U,
FLA_Obj  V 
)

References F77_cgesvd(), F77_dgesvd(), F77_sgesvd(), F77_zgesvd(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_complex(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_svd_type(), FLA_Svd_check(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  FLA_Datatype dt_real;
19  int m_A, n_A, cs_A;
20  int cs_U;
21  int cs_V;
22  int min_m_n;
23  int lwork, lrwork;
24  FLA_Obj work, rwork;
25  char blas_jobu;
26  char blas_jobv;
27  int i;
28 
29  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
30  FLA_Svd_check( jobu, jobv, A, s, U, V );
31 
32  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
33 
34  datatype = FLA_Obj_datatype( A );
35  dt_real = FLA_Obj_datatype_proj_to_real( A );
36 
37  m_A = FLA_Obj_length( A );
38  n_A = FLA_Obj_width( A );
39  cs_A = FLA_Obj_col_stride( A );
40 
41  cs_U = FLA_Obj_col_stride( U );
42 
43  cs_V = FLA_Obj_col_stride( V );
44 
45  min_m_n = min( m_A, n_A );
46 
47  // Allocate the rwork array up front since its size is not dependent on
48  // internal block sizes.
49  lrwork = 5 * min_m_n;
50  if ( FLA_Obj_is_complex( A ) )
51  FLA_Obj_create( dt_real, lrwork, 1, 0, 0, &rwork );
52 
53  FLA_Param_map_flame_to_netlib_svd_type( jobu, &blas_jobu );
54  FLA_Param_map_flame_to_netlib_svd_type( jobv, &blas_jobv );
55 
56  // Make a workspace query the first time through. This will provide us with
57  // and ideal workspace size based on an internal block size.
58  lwork = -1;
59  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
60 
61  for ( i = 0; i < 2; ++i )
62  {
63  if ( i == 1 )
64  {
65  // Grab the queried ideal workspace size from the work array, free the
66  // work object, and then re-allocate the workspace with the ideal size.
67  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
68  lwork = ( int ) *FLA_FLOAT_PTR( work );
69  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
70  lwork = ( int ) *FLA_DOUBLE_PTR( work );
71 
72  FLA_Obj_free( &work );
73  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
74  }
75 
76  switch( datatype ) {
77 
78  case FLA_FLOAT:
79  {
80  float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
81  float* buff_s = ( float* ) FLA_FLOAT_PTR( s );
82  float* buff_U = ( float* ) FLA_FLOAT_PTR( U );
83  float* buff_V = ( float* ) FLA_FLOAT_PTR( V );
84  float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
85 
86  F77_sgesvd( &blas_jobu,
87  &blas_jobv,
88  &m_A,
89  &n_A,
90  buff_A, &cs_A,
91  buff_s,
92  buff_U, &cs_U,
93  buff_V, &cs_V,
94  buff_work, &lwork,
95  &info );
96 
97  break;
98  }
99 
100  case FLA_DOUBLE:
101  {
102  double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
103  double* buff_s = ( double* ) FLA_DOUBLE_PTR( s );
104  double* buff_U = ( double* ) FLA_DOUBLE_PTR( U );
105  double* buff_V = ( double* ) FLA_DOUBLE_PTR( V );
106  double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
107 
108  F77_dgesvd( &blas_jobu,
109  &blas_jobv,
110  &m_A,
111  &n_A,
112  buff_A, &cs_A,
113  buff_s,
114  buff_U, &cs_U,
115  buff_V, &cs_V,
116  buff_work, &lwork,
117  &info );
118 
119  break;
120  }
121 
122  case FLA_COMPLEX:
123  {
124  scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
125  float* buff_s = ( float* ) FLA_FLOAT_PTR( s );
126  scomplex* buff_U = ( scomplex* ) FLA_COMPLEX_PTR( U );
127  scomplex* buff_V = ( scomplex* ) FLA_COMPLEX_PTR( V );
128  scomplex* buff_work = ( scomplex* ) FLA_COMPLEX_PTR( work );
129  float* buff_rwork = ( float* ) FLA_FLOAT_PTR( rwork );
130 
131  F77_cgesvd( &blas_jobu,
132  &blas_jobv,
133  &m_A,
134  &n_A,
135  buff_A, &cs_A,
136  buff_s,
137  buff_U, &cs_U,
138  buff_V, &cs_V,
139  buff_work, &lwork,
140  buff_rwork,
141  &info );
142 
143  break;
144  }
145 
146  case FLA_DOUBLE_COMPLEX:
147  {
148  dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
149  double* buff_s = ( double* ) FLA_DOUBLE_PTR( s );
150  dcomplex* buff_U = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( U );
151  dcomplex* buff_V = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( V );
152  dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
153  double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
154 
155  F77_zgesvd( &blas_jobu,
156  &blas_jobv,
157  &m_A,
158  &n_A,
159  buff_A, &cs_A,
160  buff_s,
161  buff_U, &cs_U,
162  buff_V, &cs_V,
163  buff_work, &lwork,
164  buff_rwork,
165  &info );
166 
167  break;
168  }
169 
170  }
171  }
172 
173  FLA_Obj_free( &work );
174  if ( FLA_Obj_is_complex( A ) )
175  FLA_Obj_free( &rwork );
176 #else
177  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
178 #endif
179 
180  return info;
181 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_zgesvd(char *jobu, char *jobv, int *m, int *n, dcomplex *a, int *lda, double *s, dcomplex *u, int *ldu, dcomplex *vt, int *ldvt, dcomplex *work, int *lwork, double *rwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
int F77_sgesvd(char *jobu, char *jobv, int *m, int *n, float *a, int *lda, float *s, float *u, int *ldu, float *vt, int *ldvt, float *work, int *lwork, int *info)
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
void FLA_Param_map_flame_to_netlib_svd_type(FLA_Svd_type svd_type, void *lapack_svd_type)
Definition: FLA_Param.c:171
FLA_Error FLA_Svd_check(FLA_Svd_type jobu, FLA_Svd_type jobv, FLA_Obj A, FLA_Obj s, FLA_Obj U, FLA_Obj V)
Definition: FLA_Svd_check.c:13
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
FLA_Bool FLA_Obj_is_complex(FLA_Obj A)
Definition: FLA_Query.c:324
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
int F77_dgesvd(char *jobu, char *jobv, int *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork, int *info)
Definition: blis_type_defs.h:137
int F77_cgesvd(char *jobu, char *jobv, int *m, int *n, scomplex *a, int *lda, float *s, scomplex *u, int *ldu, scomplex *vt, int *ldvt, scomplex *work, int *lwork, float *rwork, int *info)

◆ FLA_Svdd_check()

FLA_Error FLA_Svdd_check ( FLA_Svd_type  jobz,
FLA_Obj  A,
FLA_Obj  s,
FLA_Obj  U,
FLA_Obj  V 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_real_object(), FLA_Check_square(), FLA_Check_valid_svd_type(), FLA_Check_vector_dim(), FLA_Obj_length(), FLA_Obj_min_dim(), and FLA_Obj_width().

Referenced by FLA_Svdd_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_svd_type( jobz );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_real_object( s );
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_vector_dim( s, FLA_Obj_min_dim( A ) );
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_square( U );
45  FLA_Check_error_code( e_val );
46 
48  FLA_Check_error_code( e_val );
49 
50  e_val = FLA_Check_square( V );
51  FLA_Check_error_code( e_val );
52 
53  return FLA_SUCCESS;
54 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_valid_svd_type(FLA_Svd_type svd_type)
Definition: FLA_Check.c:1254
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039
dim_t FLA_Obj_min_dim(FLA_Obj obj)
Definition: FLA_Query.c:153

◆ FLA_Svdd_external()

FLA_Error FLA_Svdd_external ( FLA_Svd_type  jobz,
FLA_Obj  A,
FLA_Obj  s,
FLA_Obj  U,
FLA_Obj  V 
)

References F77_cgesdd(), F77_dgesdd(), F77_sgesdd(), F77_zgesdd(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_complex(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_svd_type(), FLA_Svdd_check(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  FLA_Datatype dt_real;
19  FLA_Datatype dt_int;
20  int m_A, n_A, cs_A;
21  int cs_U;
22  int cs_V;
23  int min_m_n;
24  int lwork, lrwork, liwork;
25  FLA_Obj work, rwork, iwork;
26  char blas_jobz;
27  int i;
28 
29  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
30  FLA_Svdd_check( jobz, A, s, U, V );
31 
32  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
33 
34  datatype = FLA_Obj_datatype( A );
35  dt_real = FLA_Obj_datatype_proj_to_real( A );
36  dt_int = FLA_INT;
37 
38  m_A = FLA_Obj_length( A );
39  n_A = FLA_Obj_width( A );
40  cs_A = FLA_Obj_col_stride( A );
41 
42  cs_U = FLA_Obj_col_stride( U );
43 
44  cs_V = FLA_Obj_col_stride( V );
45 
46  min_m_n = min( m_A, n_A );
47 
48  // Allocate the rwork and iwork arrays up front.
49  if ( jobz == FLA_SVD_VECTORS_NONE ) lrwork = 5 * min_m_n;
50  else lrwork = 5 * min_m_n * min_m_n +
51  7 * min_m_n;
52  liwork = 8 * min_m_n;
53 
54  FLA_Obj_create( dt_int, liwork, 1, 0, 0, &iwork );
55  if ( FLA_Obj_is_complex( A ) )
56  FLA_Obj_create( dt_real, lrwork, 1, 0, 0, &rwork );
57 
58  FLA_Param_map_flame_to_netlib_svd_type( jobz, &blas_jobz );
59 
60  // Make a workspace query the first time through. This will provide us with
61  // and ideal workspace size based on an internal block size.
62  lwork = -1;
63  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
64 
65  for ( i = 0; i < 2; ++i )
66  {
67  if ( i == 1 )
68  {
69  // Grab the queried ideal workspace size from the work array, free the
70  // work object, and then re-allocate the workspace with the ideal size.
71  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
72  lwork = ( int ) *FLA_FLOAT_PTR( work );
73  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
74  lwork = ( int ) *FLA_DOUBLE_PTR( work );
75 
76  FLA_Obj_free( &work );
77  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
78  }
79 
80  switch( datatype ) {
81 
82  case FLA_FLOAT:
83  {
84  float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
85  float* buff_s = ( float* ) FLA_FLOAT_PTR( s );
86  float* buff_U = ( float* ) FLA_FLOAT_PTR( U );
87  float* buff_V = ( float* ) FLA_FLOAT_PTR( V );
88  float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
89  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
90 
91  F77_sgesdd( &blas_jobz,
92  &m_A,
93  &n_A,
94  buff_A, &cs_A,
95  buff_s,
96  buff_U, &cs_U,
97  buff_V, &cs_V,
98  buff_work, &lwork,
99  buff_iwork,
100  &info );
101 
102  break;
103  }
104 
105  case FLA_DOUBLE:
106  {
107  double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
108  double* buff_s = ( double* ) FLA_DOUBLE_PTR( s );
109  double* buff_U = ( double* ) FLA_DOUBLE_PTR( U );
110  double* buff_V = ( double* ) FLA_DOUBLE_PTR( V );
111  double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
112  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
113 
114  F77_dgesdd( &blas_jobz,
115  &m_A,
116  &n_A,
117  buff_A, &cs_A,
118  buff_s,
119  buff_U, &cs_U,
120  buff_V, &cs_V,
121  buff_work, &lwork,
122  buff_iwork,
123  &info );
124 
125  break;
126  }
127 
128  case FLA_COMPLEX:
129  {
130  scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
131  float* buff_s = ( float* ) FLA_FLOAT_PTR( s );
132  scomplex* buff_U = ( scomplex* ) FLA_COMPLEX_PTR( U );
133  scomplex* buff_V = ( scomplex* ) FLA_COMPLEX_PTR( V );
134  scomplex* buff_work = ( scomplex* ) FLA_COMPLEX_PTR( work );
135  float* buff_rwork = ( float* ) FLA_FLOAT_PTR( rwork );
136  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
137 
138  F77_cgesdd( &blas_jobz,
139  &m_A,
140  &n_A,
141  buff_A, &cs_A,
142  buff_s,
143  buff_U, &cs_U,
144  buff_V, &cs_V,
145  buff_work, &lwork,
146  buff_rwork,
147  buff_iwork,
148  &info );
149 
150  break;
151  }
152 
153  case FLA_DOUBLE_COMPLEX:
154  {
155  dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
156  double* buff_s = ( double* ) FLA_DOUBLE_PTR( s );
157  dcomplex* buff_U = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( U );
158  dcomplex* buff_V = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( V );
159  dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
160  double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
161  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
162 
163  F77_zgesdd( &blas_jobz,
164  &m_A,
165  &n_A,
166  buff_A, &cs_A,
167  buff_s,
168  buff_U, &cs_U,
169  buff_V, &cs_V,
170  buff_work, &lwork,
171  buff_rwork,
172  buff_iwork,
173  &info );
174 
175  break;
176  }
177 
178  }
179  }
180 
181  FLA_Obj_free( &work );
182  FLA_Obj_free( &iwork );
183  if ( FLA_Obj_is_complex( A ) )
184  FLA_Obj_free( &rwork );
185 #else
186  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
187 #endif
188 
189  return info;
190 }
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
int F77_dgesdd(char *jobz, int *m, int *n, double *a, int *lda, double *s, double *u, int *ldu, double *vt, int *ldvt, double *work, int *lwork, int *iwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_cgesdd(char *jobz, int *m, int *n, scomplex *a, int *lda, float *s, scomplex *u, int *ldu, scomplex *vt, int *ldvt, scomplex *work, int *lwork, float *rwork, int *iwork, int *info)
int F77_zgesdd(char *jobz, int *m, int *n, dcomplex *a, int *lda, double *s, dcomplex *u, int *ldu, dcomplex *vt, int *ldvt, dcomplex *work, int *lwork, double *rwork, int *iwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
int F77_sgesdd(char *jobz, int *m, int *n, float *a, int *lda, float *s, float *u, int *ldu, float *vt, int *ldvt, float *work, int *lwork, int *iwork, int *info)
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
void FLA_Param_map_flame_to_netlib_svd_type(FLA_Svd_type svd_type, void *lapack_svd_type)
Definition: FLA_Param.c:171
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
FLA_Bool FLA_Obj_is_complex(FLA_Obj A)
Definition: FLA_Query.c:324
FLA_Error FLA_Svdd_check(FLA_Svd_type jobz, FLA_Obj A, FLA_Obj s, FLA_Obj U, FLA_Obj V)
Definition: FLA_Svdd_check.c:13
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_Sylv()

FLA_Error FLA_Sylv ( FLA_Trans  transa,
FLA_Trans  transb,
FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale 
)

References FLA_Check_error_level(), FLA_Sylv_check(), and FLA_Sylv_internal().

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  // Invoke FLA_Sylv_internal() with the appropriate control tree.
24  r_val = FLA_Sylv_internal( transa, transb, isgn, A, B, C, scale, fla_sylv_cntl );
25 
26  return r_val;
27 }
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
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
int FLA_Error
Definition: FLA_type_defs.h:47
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
fla_sylv_t * fla_sylv_cntl
Definition: FLA_Sylv_cntl_init.c:17

◆ FLA_Sylv_blk_external()

FLA_Error FLA_Sylv_blk_external ( FLA_Trans  transa,
FLA_Trans  transb,
FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale 
)

References FLA_Sylv_unb_external().

Referenced by FLA_Sylv_hh_blk_ext(), FLA_Sylv_hn_blk_ext(), FLA_Sylv_nh_blk_ext(), and FLA_Sylv_nn_blk_ext().

14 {
15  FLA_Error e_val = FLA_FAILURE;
16 
17 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
18  e_val = FLA_Sylv_unb_external( transa, transb, isgn, A, B, C, scale );
19 #else
20  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
21 #endif
22 
23  return e_val;
24 }
FLA_Error FLA_Sylv_unb_external(FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
Definition: FLA_Sylv_unb_external.c:13
int FLA_Error
Definition: FLA_type_defs.h:47

◆ FLA_Sylv_check()

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 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_int_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_sylv_matrix_dims(), FLA_Check_valid_blas_trans(), and FLA_Check_valid_isgn_value().

Referenced by FLA_Sylv(), FLA_Sylv_unb_external(), and FLASH_Sylv().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_blas_trans( transa );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_blas_trans( transb );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_if_scalar( isgn );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_int_object( isgn );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_valid_isgn_value( isgn );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_floating_object( A );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_nonconstant_object( A );
36  FLA_Check_error_code( e_val );
37 
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_square( A );
45  FLA_Check_error_code( e_val );
46 
47  e_val = FLA_Check_square( B );
48  FLA_Check_error_code( e_val );
49 
50  e_val = FLA_Check_sylv_matrix_dims( A, B, C );
51  FLA_Check_error_code( e_val );
52 
53  e_val = FLA_Check_if_scalar( scale );
54  FLA_Check_error_code( e_val );
55 
56  e_val = FLA_Check_identical_object_precision( C, scale );
57  FLA_Check_error_code( e_val );
58 
59  return FLA_SUCCESS;
60 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_int_object(FLA_Obj A)
Definition: FLA_Check.c:245
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_sylv_matrix_dims(FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:781
FLA_Error FLA_Check_valid_isgn_value(FLA_Obj isgn)
Definition: FLA_Check.c:770
FLA_Error FLA_Check_valid_blas_trans(FLA_Trans trans)
Definition: FLA_Check.c:928
FLA_Error FLA_Check_if_scalar(FLA_Obj A)
Definition: FLA_Check.c:373
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363

◆ FLA_Sylv_hh_blk_ext()

FLA_Error FLA_Sylv_hh_blk_ext ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale 
)

References FLA_Sylv_blk_external().

Referenced by FLA_Sylv_hh().

42 {
43  return FLA_Sylv_blk_external( FLA_CONJ_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
44 }
FLA_Error FLA_Sylv_blk_external(FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
Definition: FLA_Sylv_blk_external.c:13

◆ FLA_Sylv_hh_task()

FLA_Error FLA_Sylv_hh_task ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale,
fla_sylv_t cntl 
)

References FLA_Sylv_internal().

47 {
48  //return FLA_Sylv_unb_external( FLA_CONJ_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
49  return FLA_Sylv_internal( FLA_CONJ_TRANSPOSE, FLA_CONJ_TRANSPOSE,
50  isgn, A, B, C, scale,
52 }
fla_sylv_t * fla_sylv_cntl_leaf
Definition: FLA_Sylv_cntl_init.c:15
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_Sylv_hh_unb_ext()

FLA_Error FLA_Sylv_hh_unb_ext ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale 
)

References FLA_Sylv_unb_external().

Referenced by FLA_Sylv_hh().

163 {
164  return FLA_Sylv_unb_external( FLA_CONJ_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
165 }
FLA_Error FLA_Sylv_unb_external(FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
Definition: FLA_Sylv_unb_external.c:13

◆ FLA_Sylv_hn_blk_ext()

FLA_Error FLA_Sylv_hn_blk_ext ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale 
)

References FLA_Sylv_blk_external().

Referenced by FLA_Sylv_hn().

37 {
38  return FLA_Sylv_blk_external( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
39 }
FLA_Error FLA_Sylv_blk_external(FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
Definition: FLA_Sylv_blk_external.c:13

◆ FLA_Sylv_hn_task()

FLA_Error FLA_Sylv_hn_task ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale,
fla_sylv_t cntl 
)

References FLA_Sylv_internal().

39 {
40  //return FLA_Sylv_unb_external( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
41  return FLA_Sylv_internal( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE,
42  isgn, A, B, C, scale,
44 }
fla_sylv_t * fla_sylv_cntl_leaf
Definition: FLA_Sylv_cntl_init.c:15
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_Sylv_hn_unb_ext()

FLA_Error FLA_Sylv_hn_unb_ext ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale 
)

References FLA_Sylv_unb_external().

Referenced by FLA_Sylv_hn().

158 {
159  return FLA_Sylv_unb_external( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
160 }
FLA_Error FLA_Sylv_unb_external(FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
Definition: FLA_Sylv_unb_external.c:13

◆ FLA_Sylv_internal_check()

FLA_Error FLA_Sylv_internal_check ( 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 
)

References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), and FLA_Check_sylv_matrix_dims().

Referenced by FLA_Sylv_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
28  // Verify conformality between all the objects. This check works regardless
29  // of whether the element type is FLA_MATRIX or FLA_SCALAR because the
30  // element length and width are used instead of scalar length and width.
31  e_val = FLA_Check_sylv_matrix_dims( A, B, C );
32  FLA_Check_error_code( e_val );
33 
34  return FLA_SUCCESS;
35 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_sylv_matrix_dims(FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:781
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_Sylv_nh_blk_ext()

FLA_Error FLA_Sylv_nh_blk_ext ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale 
)

References FLA_Sylv_blk_external().

Referenced by FLA_Sylv_nh().

32 {
33  return FLA_Sylv_blk_external( FLA_NO_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
34 }
FLA_Error FLA_Sylv_blk_external(FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
Definition: FLA_Sylv_blk_external.c:13

◆ FLA_Sylv_nh_task()

FLA_Error FLA_Sylv_nh_task ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale,
fla_sylv_t cntl 
)

References FLA_Sylv_internal().

31 {
32  //return FLA_Sylv_unb_external( FLA_NO_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
33  return FLA_Sylv_internal( FLA_NO_TRANSPOSE, FLA_CONJ_TRANSPOSE,
34  isgn, A, B, C, scale,
36 }
fla_sylv_t * fla_sylv_cntl_leaf
Definition: FLA_Sylv_cntl_init.c:15
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_Sylv_nh_unb_ext()

FLA_Error FLA_Sylv_nh_unb_ext ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale 
)

References FLA_Sylv_unb_external().

Referenced by FLA_Sylv_nh().

153 {
154  return FLA_Sylv_unb_external( FLA_NO_TRANSPOSE, FLA_CONJ_TRANSPOSE, isgn, A, B, C, scale );
155 }
FLA_Error FLA_Sylv_unb_external(FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
Definition: FLA_Sylv_unb_external.c:13

◆ FLA_Sylv_nn_blk_ext()

FLA_Error FLA_Sylv_nn_blk_ext ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale 
)

References FLA_Sylv_blk_external().

Referenced by FLA_Sylv_nn().

27 {
28  return FLA_Sylv_blk_external( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
29 }
FLA_Error FLA_Sylv_blk_external(FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
Definition: FLA_Sylv_blk_external.c:13

◆ FLA_Sylv_nn_task()

FLA_Error FLA_Sylv_nn_task ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale,
fla_sylv_t cntl 
)

References FLA_Sylv_internal().

23 {
24  //return FLA_Sylv_unb_external( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
25  return FLA_Sylv_internal( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE,
26  isgn, A, B, C, scale,
28 }
fla_sylv_t * fla_sylv_cntl_leaf
Definition: FLA_Sylv_cntl_init.c:15
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_Sylv_nn_unb_ext()

FLA_Error FLA_Sylv_nn_unb_ext ( FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale 
)

References FLA_Sylv_unb_external().

Referenced by FLA_Sylv_nn().

148 {
149  return FLA_Sylv_unb_external( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, isgn, A, B, C, scale );
150 }
FLA_Error FLA_Sylv_unb_external(FLA_Trans transa, FLA_Trans transb, FLA_Obj isgn, FLA_Obj A, FLA_Obj B, FLA_Obj C, FLA_Obj scale)
Definition: FLA_Sylv_unb_external.c:13

◆ FLA_Sylv_task()

FLA_Error FLA_Sylv_task ( 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 
)

References FLA_Sylv_internal().

Referenced by FLASH_Queue_exec_task().

16 {
17  return FLA_Sylv_internal( transa, transb,
18  isgn, A, B, C, scale,
20 }
fla_sylv_t * fla_sylv_cntl_leaf
Definition: FLA_Sylv_cntl_init.c:15
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_Sylv_unb_external()

FLA_Error FLA_Sylv_unb_external ( FLA_Trans  transa,
FLA_Trans  transb,
FLA_Obj  isgn,
FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  C,
FLA_Obj  scale 
)

References F77_ctrsyl(), F77_dtrsyl(), F77_strsyl(), F77_ztrsyl(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_ONE, FLA_Param_map_flame_to_netlib_trans(), FLA_Set(), and FLA_Sylv_check().

Referenced by FLA_Sylv_blk_external(), FLA_Sylv_hh_unb_ext(), FLA_Sylv_hn_unb_ext(), FLA_Sylv_nh_unb_ext(), and FLA_Sylv_nn_unb_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int cs_A;
19  int cs_B;
20  int m_C, n_C, cs_C;
21  char blas_transa;
22  char blas_transb;
23 
24  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
25  FLA_Sylv_check( transa, transb, isgn, A, B, C, scale );
26 
27  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
28  if ( FLA_Obj_has_zero_dim( B ) ) return FLA_SUCCESS;
29  if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
30 
31  datatype = FLA_Obj_datatype( A );
32 
33  m_C = FLA_Obj_length( C );
34  n_C = FLA_Obj_width( C );
35  cs_C = FLA_Obj_col_stride( C );
36 
37  cs_A = FLA_Obj_col_stride( A );
38 
39  cs_B = FLA_Obj_col_stride( B );
40 
41  FLA_Param_map_flame_to_netlib_trans( transa, &blas_transa );
42  FLA_Param_map_flame_to_netlib_trans( transb, &blas_transb );
43 
44 
45  switch( datatype ){
46 
47  case FLA_FLOAT:
48  {
49  int *buff_isgn = ( int * ) FLA_INT_PTR( isgn );
50  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
51  float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
52  float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
53  float *buff_scale = ( float * ) FLA_FLOAT_PTR( scale );
54 
55  F77_strsyl( &blas_transa,
56  &blas_transb,
57  buff_isgn,
58  &m_C,
59  &n_C,
60  buff_A, &cs_A,
61  buff_B, &cs_B,
62  buff_C, &cs_C,
63  buff_scale,
64  &info );
65 
66  break;
67  }
68 
69  case FLA_DOUBLE:
70  {
71  int *buff_isgn = ( int * ) FLA_INT_PTR( isgn );
72  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
73  double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
74  double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
75  double *buff_scale = ( double * ) FLA_DOUBLE_PTR( scale );
76 
77  F77_dtrsyl( &blas_transa,
78  &blas_transb,
79  buff_isgn,
80  &m_C,
81  &n_C,
82  buff_A, &cs_A,
83  buff_B, &cs_B,
84  buff_C, &cs_C,
85  buff_scale,
86  &info );
87 
88  break;
89  }
90 
91  case FLA_COMPLEX:
92  {
93  int *buff_isgn = ( int * ) FLA_INT_PTR( isgn );
94  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
95  scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
96  scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
97  float *buff_scale = ( float * ) FLA_COMPLEX_PTR( scale );
98 
99  F77_ctrsyl( &blas_transa,
100  &blas_transb,
101  buff_isgn,
102  &m_C,
103  &n_C,
104  buff_A, &cs_A,
105  buff_B, &cs_B,
106  buff_C, &cs_C,
107  buff_scale,
108  &info );
109 
110  break;
111  }
112 
113  case FLA_DOUBLE_COMPLEX:
114  {
115  int *buff_isgn = ( int * ) FLA_INT_PTR( isgn );
116  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
117  dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
118  dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C );
119  double *buff_scale = ( double * ) FLA_DOUBLE_COMPLEX_PTR( scale );
120 
121  F77_ztrsyl( &blas_transa,
122  &blas_transb,
123  buff_isgn,
124  &m_C,
125  &n_C,
126  buff_A, &cs_A,
127  buff_B, &cs_B,
128  buff_C, &cs_C,
129  buff_scale,
130  &info );
131 
132  break;
133  }
134 
135  }
136 
137  // We don't provide a comprehensive strategy for handing scaling to avoid
138  // overflow, so we just force the scale argument to 1.0.
139  FLA_Set( FLA_ONE, scale );
140 #else
141  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
142 #endif
143 
144  return info;
145 }
int F77_ztrsyl(char *transa, char *transb, int *isgn, int *m, int *n, dcomplex *a, int *lda, dcomplex *b, int *ldb, dcomplex *c, int *ldc, double *scale, int *info)
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
void FLA_Param_map_flame_to_netlib_trans(FLA_Trans trans, void *blas_trans)
Definition: FLA_Param.c:15
int F77_ctrsyl(char *transa, char *transb, int *isgn, int *m, int *n, scomplex *a, int *lda, scomplex *b, int *ldb, scomplex *c, int *ldc, float *scale, int *info)
FLA_Obj FLA_ONE
Definition: FLA_Init.c:18
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Set(FLA_Obj alpha, FLA_Obj A)
Definition: FLA_Set.c:13
Definition: blis_type_defs.h:132
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_strsyl(char *transa, char *transb, int *isgn, int *m, int *n, float *a, int *lda, float *b, int *ldb, float *c, int *ldc, float *scale, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137
int F77_dtrsyl(char *transa, char *transb, int *isgn, int *m, int *n, double *a, int *lda, double *b, int *ldb, double *c, int *ldc, double *scale, int *info)

◆ FLA_Tevd_compute_scaling_check()

FLA_Error FLA_Tevd_compute_scaling_check ( FLA_Obj  d,
FLA_Obj  e,
FLA_Obj  sigma 
)

◆ FLA_Tevd_external()

FLA_Error FLA_Tevd_external ( FLA_Evd_type  jobz,
FLA_Obj  d,
FLA_Obj  e,
FLA_Obj  A 
)

References F77_csteqr(), F77_dsteqr(), F77_ssteqr(), F77_zsteqr(), FLA_Copy(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_vector_dim(), FLA_Obj_vector_inc(), and FLA_Param_map_flame_to_netlib_evd_type().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  FLA_Datatype dt_real;
19  int n_A, cs_A;
20  int inc_d, inc_e;
21  int lwork;
22  FLA_Obj work, d_use, e_use;
23  char blas_jobz;
24 
25  //if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
26  // FLA_Hevd_check( jobz, uplo, A, e );
27 
28  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
29 
30  datatype = FLA_Obj_datatype( A );
31  dt_real = FLA_Obj_datatype_proj_to_real( A );
32 
33  n_A = FLA_Obj_vector_dim( d );
34  cs_A = FLA_Obj_col_stride( A );
35 
36  if ( FLA_Obj_vector_inc( d ) != 1 )
37  {
38  FLA_Obj_create( dt_real, n_A, 1, 0, 0, &d_use );
39  FLA_Copy( d, d_use );
40  }
41  else { d_use = d; }
42 
43  if ( FLA_Obj_vector_inc( e ) != 1 )
44  {
45  FLA_Obj_create( dt_real, n_A-1, 1, 0, 0, &e_use );
46  FLA_Copy( e, e_use );
47  }
48  else { e_use = e; }
49 
50  inc_d = FLA_Obj_vector_inc( d_use );
51  inc_e = FLA_Obj_vector_inc( e_use );
52 
53  // Allocate thw work array up front.
54  lwork = max( 1.0, 2.0 * n_A - 2 );
55  FLA_Obj_create( dt_real, lwork, 1, 0, 0, &work );
56 
57  FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
58 
59  switch( datatype ) {
60 
61  case FLA_FLOAT:
62  {
63  float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
64  float* buff_d = ( float * ) FLA_FLOAT_PTR( d_use );
65  float* buff_e = ( float * ) FLA_FLOAT_PTR( e_use );
66  float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
67 
68  F77_ssteqr( &blas_jobz,
69  &n_A,
70  buff_d,
71  buff_e,
72  buff_A, &cs_A,
73  buff_work,
74  &info );
75 
76  break;
77  }
78 
79  case FLA_DOUBLE:
80  {
81  double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
82  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d_use );
83  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e_use );
84  double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
85 
86  F77_dsteqr( &blas_jobz,
87  &n_A,
88  buff_d,
89  buff_e,
90  buff_A, &cs_A,
91  buff_work,
92  &info );
93 
94  break;
95  }
96 
97  case FLA_COMPLEX:
98  {
99  scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
100  float* buff_d = ( float * ) FLA_FLOAT_PTR( d_use );
101  float* buff_e = ( float * ) FLA_FLOAT_PTR( e_use );
102  float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
103 
104  F77_csteqr( &blas_jobz,
105  &n_A,
106  buff_d,
107  buff_e,
108  buff_A, &cs_A,
109  buff_work,
110  &info );
111 
112  break;
113  }
114 
115  case FLA_DOUBLE_COMPLEX:
116  {
117  dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
118  double* buff_d = ( double* ) FLA_DOUBLE_PTR( d_use );
119  double* buff_e = ( double* ) FLA_DOUBLE_PTR( e_use );
120  double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
121 
122  F77_zsteqr( &blas_jobz,
123  &n_A,
124  buff_d,
125  buff_e,
126  buff_A, &cs_A,
127  buff_work,
128  &info );
129 
130  break;
131  }
132 
133  }
134 
135  if ( FLA_Obj_vector_inc( d ) != 1 )
136  {
137  FLA_Copy( d_use, d );
138  FLA_Obj_free( &d_use );
139  }
140  if ( FLA_Obj_vector_inc( e ) != 1 )
141  {
142  FLA_Copy( e_use, e );
143  FLA_Obj_free( &e_use );
144  }
145 
146  FLA_Obj_free( &work );
147 
148 #else
149  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
150 #endif
151 
152  return info;
153 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
FLA_Error FLA_Copy(FLA_Obj A, FLA_Obj B)
Definition: FLA_Copy.c:15
int F77_csteqr(char *jobz, int *n, float *d, float *e, scomplex *z, int *ldz, float *work, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
int F77_ssteqr(char *jobz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *info)
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
void FLA_Param_map_flame_to_netlib_evd_type(FLA_Evd_type evd_type, void *lapack_evd_type)
Definition: FLA_Param.c:151
int F77_dsteqr(char *jobz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *info)
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition: FLA_Query.c:145
Definition: blis_type_defs.h:137
int F77_zsteqr(char *jobz, int *n, double *d, double *e, dcomplex *z, int *ldz, double *work, int *info)

◆ FLA_Tevdd_external()

FLA_Error FLA_Tevdd_external ( FLA_Evd_type  jobz,
FLA_Obj  d,
FLA_Obj  e,
FLA_Obj  A 
)

References F77_cstedc(), F77_dstedc(), F77_sstedc(), F77_zstedc(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_is_complex(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_evd_type(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  FLA_Datatype dt_real;
19  int n_A, cs_A;
20  int lwork, lrwork, liwork;
21  FLA_Obj work, rwork, iwork;
22  char blas_jobz;
23  int i;
24 
25  //if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
26  // FLA_Tevdd_check( jobz, d, e, A );
27 
28  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
29 
30  datatype = FLA_Obj_datatype( A );
31  dt_real = FLA_Obj_datatype_proj_to_real( A );
32 
33  n_A = FLA_Obj_width( A );
34  cs_A = FLA_Obj_col_stride( A );
35 
36  FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
37 
38  // Make a workspace query the first time through. This will provide us with
39  // and ideal workspace size.
40  lwork = -1;
41  lrwork = -1;
42  liwork = -1;
43  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
44  FLA_Obj_create( datatype, 1, 1, 0, 0, &rwork );
45  FLA_Obj_create( FLA_INT, 1, 1, 0, 0, &iwork );
46 
47  for ( i = 0; i < 2; ++i )
48  {
49  if ( i == 1 )
50  {
51  // Grab the queried ideal workspace size from the work arrays, free the
52  // work object, and then re-allocate the workspace with the ideal size.
53  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
54  {
55  lwork = ( int ) *FLA_FLOAT_PTR( work );
56  lrwork = ( int ) *FLA_FLOAT_PTR( rwork );
57  liwork = ( int ) *FLA_INT_PTR( iwork );
58  }
59  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
60  {
61  lwork = ( int ) *FLA_DOUBLE_PTR( work );
62  lrwork = ( int ) *FLA_DOUBLE_PTR( rwork );
63  liwork = ( int ) *FLA_INT_PTR( iwork );
64  }
65 
66 //printf( "ideal workspace for n = %d\n", n_A );
67 //printf( " lwork = %d\n", lwork );
68 //printf( " lrwork = %d\n", lrwork );
69 //printf( " liwork = %d\n", liwork );
70 
71  FLA_Obj_free( &work );
72  FLA_Obj_free( &iwork );
73  FLA_Obj_free( &rwork );
74  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
75  FLA_Obj_create( datatype, liwork, 1, 0, 0, &iwork );
76  if ( FLA_Obj_is_complex( A ) )
77  FLA_Obj_create( datatype, lrwork, 1, 0, 0, &rwork );
78  }
79 
80  switch( datatype ) {
81 
82  case FLA_FLOAT:
83  {
84  float* buff_d = ( float* ) FLA_FLOAT_PTR( d );
85  float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
86  float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
87  float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
88  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
89 
90  F77_sstedc( &blas_jobz,
91  &n_A,
92  buff_d,
93  buff_e,
94  buff_A, &cs_A,
95  buff_work, &lwork,
96  buff_iwork, &liwork,
97  &info );
98 
99  break;
100  }
101 
102  case FLA_DOUBLE:
103  {
104  double* buff_d = ( double* ) FLA_DOUBLE_PTR( d );
105  double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
106  double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
107  double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
108  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
109 
110  F77_dstedc( &blas_jobz,
111  &n_A,
112  buff_d,
113  buff_e,
114  buff_A, &cs_A,
115  buff_work, &lwork,
116  buff_iwork, &liwork,
117  &info );
118 
119  break;
120  }
121 
122  case FLA_COMPLEX:
123  {
124  float* buff_d = ( float* ) FLA_FLOAT_PTR( d );
125  float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
126  scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
127  scomplex* buff_work = ( scomplex* ) FLA_COMPLEX_PTR( work );
128  float* buff_rwork = ( float* ) FLA_FLOAT_PTR( rwork );
129  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
130 
131  F77_cstedc( &blas_jobz,
132  &n_A,
133  buff_d,
134  buff_e,
135  buff_A, &cs_A,
136  buff_work, &lwork,
137  buff_rwork, &lrwork,
138  buff_iwork, &liwork,
139  &info );
140 
141  break;
142  }
143 
144  case FLA_DOUBLE_COMPLEX:
145  {
146  double* buff_d = ( double* ) FLA_DOUBLE_PTR( d );
147  double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
148  dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
149  dcomplex* buff_work = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( work );
150  double* buff_rwork = ( double* ) FLA_DOUBLE_PTR( rwork );
151  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
152 
153  F77_zstedc( &blas_jobz,
154  &n_A,
155  buff_d,
156  buff_e,
157  buff_A, &cs_A,
158  buff_work, &lwork,
159  buff_rwork, &lrwork,
160  buff_iwork, &liwork,
161  &info );
162 
163  break;
164  }
165 
166  }
167  }
168 
169  FLA_Obj_free( &work );
170  FLA_Obj_free( &iwork );
171  if ( FLA_Obj_is_complex( A ) )
172  FLA_Obj_free( &rwork );
173 #else
174  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
175 #endif
176 
177  return info;
178 }
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
int F77_sstedc(char *compz, int *n, float *d, float *e, float *z, int *ldz, float *work, int *lwork, int *iwork, int *liwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
int F77_cstedc(char *compz, int *n, float *d, float *e, scomplex *z, int *ldz, scomplex *work, int *lwork, float *rwork, int *lrwork, int *iwork, int *liwork, int *info)
void FLA_Param_map_flame_to_netlib_evd_type(FLA_Evd_type evd_type, void *lapack_evd_type)
Definition: FLA_Param.c:151
int F77_zstedc(char *compz, int *n, double *d, double *e, dcomplex *z, int *ldz, dcomplex *work, int *lwork, double *rwork, int *lrwork, int *iwork, int *liwork, int *info)
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
int F77_dstedc(char *compz, int *n, double *d, double *e, double *z, int *ldz, double *work, int *lwork, int *iwork, int *liwork, int *info)
FLA_Bool FLA_Obj_is_complex(FLA_Obj A)
Definition: FLA_Query.c:324
Definition: blis_type_defs.h:137

◆ FLA_Tevdr_external()

FLA_Error FLA_Tevdr_external ( FLA_Evd_type  jobz,
FLA_Obj  d,
FLA_Obj  e,
FLA_Obj  l,
FLA_Obj  A 
)

References F77_cstemr(), F77_dstemr(), F77_sstemr(), F77_zstemr(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_evd_type(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  FLA_Datatype dt_real;
19  int n_A, cs_A;
20  int lisuppz, lwork, liwork;
21  FLA_Obj isuppz, work, iwork;
22  char blas_jobz;
23  char blas_range;
24  int i;
25  int vl, vu;
26  int il, iu;
27  int nzc;
28  int try_rac;
29  int n_eig_found;
30 
31  //if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
32  // FLA_Tevdd_check( jobz, d, e, A );
33 
34  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
35 
36  datatype = FLA_Obj_datatype( A );
37  dt_real = FLA_Obj_datatype_proj_to_real( A );
38 
39  n_A = FLA_Obj_width( A );
40  cs_A = FLA_Obj_col_stride( A );
41 
42  FLA_Param_map_flame_to_netlib_evd_type( jobz, &blas_jobz );
43 
44  // Hard-code some parameters.
45  blas_range = 'A';
46  nzc = n_A;
47  try_rac = TRUE;
48 
49  // Allocate space for the isuppz array.
50  lisuppz = 2 * n_A;
51  FLA_Obj_create( FLA_INT, lisuppz, 1, 0, 0, &isuppz );
52 
53  // Make a workspace query the first time through. This will provide us with
54  // and ideal workspace size.
55  lwork = -1;
56  liwork = -1;
57  FLA_Obj_create( dt_real, 1, 1, 0, 0, &work );
58  FLA_Obj_create( FLA_INT, 1, 1, 0, 0, &iwork );
59 
60  for ( i = 0; i < 2; ++i )
61  {
62  if ( i == 1 )
63  {
64  // Grab the queried ideal workspace size from the work arrays, free the
65  // work object, and then re-allocate the workspace with the ideal size.
66  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
67  {
68  lwork = ( int ) *FLA_FLOAT_PTR( work );
69  liwork = ( int ) *FLA_INT_PTR( iwork );
70  }
71  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
72  {
73  lwork = ( int ) *FLA_DOUBLE_PTR( work );
74  liwork = ( int ) *FLA_INT_PTR( iwork );
75  }
76 //printf( "ideal workspace for n = %d\n", n_A );
77 //printf( " lwork = %d\n", lwork );
78 //printf( " liwork = %d\n", liwork );
79  FLA_Obj_free( &work );
80  FLA_Obj_free( &iwork );
81  FLA_Obj_create( dt_real, lwork, 1, 0, 0, &work );
82  FLA_Obj_create( FLA_INT, liwork, 1, 0, 0, &iwork );
83  }
84 
85  switch( datatype ) {
86 
87  case FLA_FLOAT:
88  {
89  float* buff_d = ( float* ) FLA_FLOAT_PTR( d );
90  float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
91  float* buff_l = ( float* ) FLA_FLOAT_PTR( l );
92  float* buff_A = ( float* ) FLA_FLOAT_PTR( A );
93  int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
94  float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
95  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
96 
97  F77_sstemr( &blas_jobz,
98  &blas_range,
99  &n_A,
100  buff_d,
101  buff_e,
102  &vl, &vu,
103  &il, &iu,
104  &n_eig_found,
105  buff_l,
106  buff_A, &cs_A,
107  &nzc,
108  buff_isuppz,
109  &try_rac,
110  buff_work, &lwork,
111  buff_iwork, &liwork,
112  &info );
113 
114  break;
115  }
116 
117  case FLA_DOUBLE:
118  {
119  double* buff_d = ( double* ) FLA_DOUBLE_PTR( d );
120  double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
121  double* buff_l = ( double* ) FLA_DOUBLE_PTR( l );
122  double* buff_A = ( double* ) FLA_DOUBLE_PTR( A );
123  int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
124  double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
125  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
126 
127  F77_dstemr( &blas_jobz,
128  &blas_range,
129  &n_A,
130  buff_d,
131  buff_e,
132  &vl, &vu,
133  &il, &iu,
134  &n_eig_found,
135  buff_l,
136  buff_A, &cs_A,
137  &nzc,
138  buff_isuppz,
139  &try_rac,
140  buff_work, &lwork,
141  buff_iwork, &liwork,
142  &info );
143 
144  break;
145  }
146 
147  case FLA_COMPLEX:
148  {
149  float* buff_d = ( float* ) FLA_FLOAT_PTR( d );
150  float* buff_e = ( float* ) FLA_FLOAT_PTR( e );
151  float* buff_l = ( float* ) FLA_FLOAT_PTR( l );
152  scomplex* buff_A = ( scomplex* ) FLA_COMPLEX_PTR( A );
153  int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
154  float* buff_work = ( float* ) FLA_FLOAT_PTR( work );
155  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
156 
157  F77_cstemr( &blas_jobz,
158  &blas_range,
159  &n_A,
160  buff_d,
161  buff_e,
162  &vl, &vu,
163  &il, &iu,
164  &n_eig_found,
165  buff_l,
166  buff_A, &cs_A,
167  &nzc,
168  buff_isuppz,
169  &try_rac,
170  buff_work, &lwork,
171  buff_iwork, &liwork,
172  &info );
173 
174  break;
175  }
176 
177  case FLA_DOUBLE_COMPLEX:
178  {
179  double* buff_d = ( double* ) FLA_DOUBLE_PTR( d );
180  double* buff_e = ( double* ) FLA_DOUBLE_PTR( e );
181  double* buff_l = ( double* ) FLA_DOUBLE_PTR( l );
182  dcomplex* buff_A = ( dcomplex* ) FLA_DOUBLE_COMPLEX_PTR( A );
183  int* buff_isuppz = ( int* ) FLA_INT_PTR( isuppz );
184  double* buff_work = ( double* ) FLA_DOUBLE_PTR( work );
185  int* buff_iwork = ( int* ) FLA_INT_PTR( iwork );
186 
187  F77_zstemr( &blas_jobz,
188  &blas_range,
189  &n_A,
190  buff_d,
191  buff_e,
192  &vl, &vu,
193  &il, &iu,
194  &n_eig_found,
195  buff_l,
196  buff_A, &cs_A,
197  &nzc,
198  buff_isuppz,
199  &try_rac,
200  buff_work, &lwork,
201  buff_iwork, &liwork,
202  &info );
203 
204  break;
205  }
206 
207  }
208  }
209 
210  FLA_Obj_free( &isuppz );
211  FLA_Obj_free( &work );
212  FLA_Obj_free( &iwork );
213 #else
214  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
215 #endif
216 
217  return info;
218 }
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
int F77_cstemr(char *jobz, char *range, int *n, float *d, float *e, int *vl, int *vu, int *il, int *iu, int *m, float *w, scomplex *z, int *ldz, int *nzc, int *isuppz, int *tryrac, float *work, int *lwork, int *iwork, int *liwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_dstemr(char *jobz, char *range, int *n, double *d, double *e, int *vl, int *vu, int *il, int *iu, int *m, double *w, double *z, int *ldz, int *nzc, int *isuppz, int *tryrac, double *work, int *lwork, int *iwork, int *liwork, int *info)
int F77_sstemr(char *jobz, char *range, int *n, float *d, float *e, int *vl, int *vu, int *il, int *iu, int *m, float *w, float *z, int *ldz, int *nzc, int *isuppz, int *tryrac, float *work, int *lwork, int *iwork, int *liwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
void FLA_Param_map_flame_to_netlib_evd_type(FLA_Evd_type evd_type, void *lapack_evd_type)
Definition: FLA_Param.c:151
int F77_zstemr(char *jobz, char *range, int *n, double *d, double *e, int *vl, int *vu, int *il, int *iu, int *m, double *w, dcomplex *z, int *ldz, int *nzc, int *isuppz, int *tryrac, double *work, int *lwork, int *iwork, int *liwork, int *info)
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
Definition: blis_type_defs.h:137

◆ FLA_Tridiag_apply_Q_check()

FLA_Error FLA_Tridiag_apply_Q_check ( FLA_Side  side,
FLA_Uplo  uplo,
FLA_Trans  trans,
FLA_Obj  A,
FLA_Obj  t,
FLA_Obj  B 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_valid_complex_trans(), FLA_Check_valid_leftright_side(), FLA_Check_valid_real_trans(), FLA_Check_valid_trans(), FLA_Check_valid_uplo(), FLA_Check_vector_dim_min(), FLA_Obj_is_real(), FLA_Obj_length(), and FLA_Obj_width().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_leftright_side( side );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_uplo( uplo );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_valid_trans( trans );
24  FLA_Check_error_code( e_val );
25 
26  if ( FLA_Obj_is_real( A ) )
27  {
28  e_val = FLA_Check_valid_real_trans( trans );
29  FLA_Check_error_code( e_val );
30  }
31  else
32  {
33  e_val = FLA_Check_valid_complex_trans( trans );
34  FLA_Check_error_code( e_val );
35  }
36 
37  e_val = FLA_Check_floating_object( A );
38  FLA_Check_error_code( e_val );
39 
40  e_val = FLA_Check_nonconstant_object( A );
41  FLA_Check_error_code( e_val );
42 
44  FLA_Check_error_code( e_val );
45 
47  FLA_Check_error_code( e_val );
48 
49  if ( side == FLA_LEFT )
50  {
52  FLA_Check_error_code( e_val );
53 
54  e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
55  FLA_Check_error_code( e_val );
56  }
57  else
58  {
60  FLA_Check_error_code( e_val );
61 
62  e_val = FLA_Check_vector_dim_min( t, FLA_Obj_width( A ) - 1 );
63  FLA_Check_error_code( e_val );
64  }
65 
66  return FLA_SUCCESS;
67 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition: FLA_Check.c:87
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_valid_complex_trans(FLA_Trans trans)
Definition: FLA_Check.c:906
FLA_Error FLA_Check_valid_real_trans(FLA_Trans trans)
Definition: FLA_Check.c:917
FLA_Error FLA_Check_vector_dim_min(FLA_Obj x, dim_t min_dim)
Definition: FLA_Check.c:740
FLA_Bool FLA_Obj_is_real(FLA_Obj A)
Definition: FLA_Query.c:307
FLA_Error FLA_Check_valid_leftright_side(FLA_Side side)
Definition: FLA_Check.c:1124
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_Tridiag_apply_Q_external()

FLA_Error FLA_Tridiag_apply_Q_external ( FLA_Side  side,
FLA_Uplo  uplo,
FLA_Trans  trans,
FLA_Obj  A,
FLA_Obj  t,
FLA_Obj  B 
)

References F77_cunmtr(), F77_dormtr(), F77_sormtr(), F77_zunmtr(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_vector_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_side(), FLA_Param_map_flame_to_netlib_trans(), FLA_Param_map_flame_to_netlib_uplo(), and i.

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  // int m_A, n_A;
19  int m_B, n_B;
20  int cs_A;
21  int cs_B;
22  int k_t;
23  int lwork;
24  char blas_side;
25  char blas_uplo;
26  char blas_trans;
27  FLA_Obj work;
28  int i;
29 
30  //if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
31  // FLA_Apply_Q_check( side, trans, storev, A, t, B );
32 
33  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
34 
35  datatype = FLA_Obj_datatype( A );
36 
37  // m_A = FLA_Obj_length( A );
38  // n_A = FLA_Obj_width( A );
39  cs_A = FLA_Obj_col_stride( A );
40 
41  m_B = FLA_Obj_length( B );
42  n_B = FLA_Obj_width( B );
43  cs_B = FLA_Obj_col_stride( B );
44 
45  k_t = FLA_Obj_vector_dim( t );
46 
47  FLA_Param_map_flame_to_netlib_side( side, &blas_side );
48  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
49  FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
50 
51 
52  // Make a workspace query the first time through. This will provide us with
53  // and ideal workspace size based on an internal block size.
54  lwork = -1;
55  FLA_Obj_create( datatype, 1, 1, 0, 0, &work );
56 
57  for ( i = 0; i < 2; ++i )
58  {
59  if ( i == 1 )
60  {
61  // Grab the queried ideal workspace size from the work array, free the
62  // work object, and then re-allocate the workspace with the ideal size.
63  if ( datatype == FLA_FLOAT || datatype == FLA_COMPLEX )
64  lwork = ( int ) *FLA_FLOAT_PTR( work );
65  else if ( datatype == FLA_DOUBLE || datatype == FLA_DOUBLE_COMPLEX )
66  lwork = ( int ) *FLA_DOUBLE_PTR( work );
67 
68  FLA_Obj_free( &work );
69  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
70  }
71 
72  switch( datatype ){
73 
74  case FLA_FLOAT:
75  {
76  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
77  float *buff_t = ( float * ) FLA_FLOAT_PTR( t );
78  float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
79  float *buff_work = ( float * ) FLA_FLOAT_PTR( work );
80 
81  F77_sormtr( &blas_side,
82  &blas_uplo,
83  &blas_trans,
84  &m_B,
85  &n_B,
86  buff_A, &cs_A,
87  buff_t,
88  buff_B, &cs_B,
89  buff_work, &lwork,
90  &info );
91 
92  break;
93  }
94 
95  case FLA_DOUBLE:
96  {
97  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
98  double *buff_t = ( double * ) FLA_DOUBLE_PTR( t );
99  double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
100  double *buff_work = ( double * ) FLA_DOUBLE_PTR( work );
101 
102  F77_dormtr( &blas_side,
103  &blas_uplo,
104  &blas_trans,
105  &m_B,
106  &n_B,
107  buff_A, &cs_A,
108  buff_t,
109  buff_B, &cs_B,
110  buff_work, &lwork,
111  &info );
112 
113  break;
114  }
115 
116  case FLA_COMPLEX:
117  {
118  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
119  scomplex *buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
120  scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
121  scomplex *buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
122 
123  F77_cunmtr( &blas_side,
124  &blas_uplo,
125  &blas_trans,
126  &m_B,
127  &n_B,
128  buff_A, &cs_A,
129  buff_t,
130  buff_B, &cs_B,
131  buff_work, &lwork,
132  &info );
133 
134  break;
135  }
136 
137  case FLA_DOUBLE_COMPLEX:
138  {
139  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
140  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
141  dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
142  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
143 
144  F77_zunmtr( &blas_side,
145  &blas_uplo,
146  &blas_trans,
147  &m_B,
148  &n_B,
149  buff_A, &cs_A,
150  buff_t,
151  buff_B, &cs_B,
152  buff_work, &lwork,
153  &info );
154 
155  break;
156  }
157 
158  }
159  }
160 
161  FLA_Obj_free( &work );
162 #else
163  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
164 #endif
165 
166  return info;
167 }
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
int F77_cunmtr(char *side, char *uplo, char *trans, int *m, int *n, scomplex *a, int *lda, scomplex *tau, scomplex *c, int *ldc, scomplex *work, int *lwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
int F77_dormtr(char *side, char *uplo, char *trans, int *m, int *n, double *a, int *lda, double *tau, double *c, int *ldc, double *work, int *lwork, int *info)
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
void FLA_Param_map_flame_to_netlib_side(FLA_Uplo side, void *blas_side)
Definition: FLA_Param.c:71
void FLA_Param_map_flame_to_netlib_trans(FLA_Trans trans, void *blas_trans)
Definition: FLA_Param.c:15
int F77_sormtr(char *side, char *uplo, char *trans, int *m, int *n, float *a, int *lda, float *tau, float *c, int *ldc, float *work, int *lwork, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
int F77_zunmtr(char *side, char *uplo, char *trans, int *m, int *n, dcomplex *a, int *lda, dcomplex *tau, dcomplex *c, int *ldc, dcomplex *work, int *lwork, int *info)
Definition: blis_type_defs.h:132
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int i
Definition: bl1_axmyv2.c:145
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_Tridiag_blk_external()

FLA_Error FLA_Tridiag_blk_external ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  t 
)

References F77_chetrd(), F77_dsytrd(), F77_ssytrd(), F77_zhetrd(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_uplo(), FLA_Query_blocksize(), and FLA_Tridiag_check().

Referenced by FLA_Tridiag_blk_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int n_A, cs_A;
19  int lwork;
20  FLA_Obj d, e, work_obj;
21  char blas_uplo;
22 
23  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
24  FLA_Tridiag_check( uplo, A, t );
25 
26  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
27 
28  datatype = FLA_Obj_datatype( A );
29 
30  n_A = FLA_Obj_width( A );
31  cs_A = FLA_Obj_col_stride( A );
32 
33  FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), n_A, 1, 0, 0, &d );
34  FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), n_A - 1, 1, 0, 0, &e );
35 
36  lwork = n_A * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
37  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work_obj );
38 
39  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
40 
41 
42  switch( datatype ){
43 
44  case FLA_FLOAT:
45  {
46  float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
47  float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
48  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
49  float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
50  float* buff_work = ( float * ) FLA_FLOAT_PTR( work_obj );
51 
52  F77_ssytrd( &blas_uplo,
53  &n_A,
54  buff_A, &cs_A,
55  buff_d,
56  buff_e,
57  buff_t,
58  buff_work,
59  &lwork,
60  &info );
61 
62  break;
63  }
64 
65  case FLA_DOUBLE:
66  {
67  double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
68  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
69  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
70  double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
71  double* buff_work = ( double * ) FLA_DOUBLE_PTR( work_obj );
72 
73  F77_dsytrd( &blas_uplo,
74  &n_A,
75  buff_A, &cs_A,
76  buff_d,
77  buff_e,
78  buff_t,
79  buff_work,
80  &lwork,
81  &info );
82 
83  break;
84  }
85 
86  case FLA_COMPLEX:
87  {
88  scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
89  float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
90  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
91  scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
92  scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work_obj );
93 
94  F77_chetrd( &blas_uplo,
95  &n_A,
96  buff_A, &cs_A,
97  buff_d,
98  buff_e,
99  buff_t,
100  buff_work,
101  &lwork,
102  &info );
103 
104  break;
105  }
106 
107  case FLA_DOUBLE_COMPLEX:
108  {
109  dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
110  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
111  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
112  dcomplex* buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
113  dcomplex* buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work_obj );
114 
115  F77_zhetrd( &blas_uplo,
116  &n_A,
117  buff_A, &cs_A,
118  buff_d,
119  buff_e,
120  buff_t,
121  buff_work,
122  &lwork,
123  &info );
124 
125  break;
126  }
127 
128  }
129 
130  FLA_Obj_free( &d );
131  FLA_Obj_free( &e );
132  FLA_Obj_free( &work_obj );
133 #else
134  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
135 #endif
136 
137  return info;
138 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
int F77_chetrd(char *uplo, int *n, scomplex *a, int *lda, float *d, float *e, scomplex *tau, scomplex *work, int *lwork, int *info)
int F77_dsytrd(char *uplo, int *n, double *a, int *lda, double *d, double *e, double *tau, double *work, int *lwork, int *info)
dim_t FLA_Query_blocksize(FLA_Datatype dt, FLA_Dimension dim)
Definition: FLA_Blocksize.c:161
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Tridiag_check(FLA_Uplo uplo, FLA_Obj A, FLA_Obj t)
Definition: FLA_Tridiag_check.c:13
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
int F77_ssytrd(char *uplo, int *n, float *a, int *lda, float *d, float *e, float *tau, float *work, int *lwork, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_zhetrd(char *uplo, int *n, dcomplex *a, int *lda, double *d, double *e, dcomplex *tau, dcomplex *work, int *lwork, int *info)
Definition: blis_type_defs.h:137

◆ FLA_Tridiag_check()

FLA_Error FLA_Tridiag_check ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  t 
)

References FLA_Check_col_storage(), FLA_Check_col_vector(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_uplo(), FLA_Check_vector_dim_min(), and FLA_Obj_length().

Referenced by FLA_Tridiag_blk_external(), and FLA_Tridiag_unb_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_square( A );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_col_vector( t );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_col_storage( t );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
39  FLA_Check_error_code( e_val );
40 
41  return FLA_SUCCESS;
42 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_col_storage(FLA_Obj A)
Definition: FLA_Check.c:1325
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_col_vector(FLA_Obj x)
Definition: FLA_Check.c:1233
FLA_Error FLA_Check_vector_dim_min(FLA_Obj x, dim_t min_dim)
Definition: FLA_Check.c:740
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Tridiag_form_Q_check()

FLA_Error FLA_Tridiag_form_Q_check ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  t 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_uplo(), FLA_Check_vector_dim_min(), and FLA_Obj_length().

Referenced by FLA_Tridiag_form_Q_external().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_square( A );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_if_vector( t );
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_vector_dim_min( t, FLA_Obj_length( A ) - 1 );
36  FLA_Check_error_code( e_val );
37 
38  return FLA_SUCCESS;
39 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_vector_dim_min(FLA_Obj x, dim_t min_dim)
Definition: FLA_Check.c:740
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Tridiag_form_Q_external()

FLA_Error FLA_Tridiag_form_Q_external ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  t 
)

References F77_cungtr(), F77_dorgtr(), F77_sorgtr(), F77_zungtr(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Param_map_flame_to_netlib_uplo(), FLA_Query_blocksize(), and FLA_Tridiag_form_Q_check().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A;
19  int cs_A;
20  int lwork;
21  char blas_uplo;
22  FLA_Obj work;
23 
24  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
25  FLA_Tridiag_form_Q_check( uplo, A, t );
26 
27  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
28 
29  datatype = FLA_Obj_datatype( A );
30 
31  m_A = FLA_Obj_length( A );
32  cs_A = FLA_Obj_col_stride( A );
33 
34  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
35 
36  lwork = max( 1, ( m_A - 1 ) ) * FLA_Query_blocksize( datatype, FLA_DIMENSION_MIN );
37 
38  FLA_Obj_create( datatype, lwork, 1, 0, 0, &work );
39 
40 
41  switch( datatype ){
42 
43  case FLA_FLOAT:
44  {
45  float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
46  float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
47  float* buff_work = ( float * ) FLA_FLOAT_PTR( work );
48 
49  F77_sorgtr( &blas_uplo,
50  &m_A,
51  buff_A, &cs_A,
52  buff_t,
53  buff_work, &lwork,
54  &info );
55 
56  break;
57  }
58 
59  case FLA_DOUBLE:
60  {
61  double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
62  double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
63  double* buff_work = ( double * ) FLA_DOUBLE_PTR( work );
64 
65  F77_dorgtr( &blas_uplo,
66  &m_A,
67  buff_A, &cs_A,
68  buff_t,
69  buff_work, &lwork,
70  &info );
71 
72  break;
73  }
74 
75  case FLA_COMPLEX:
76  {
77  scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
78  scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
79  scomplex* buff_work = ( scomplex * ) FLA_COMPLEX_PTR( work );
80 
81  F77_cungtr( &blas_uplo,
82  &m_A,
83  buff_A, &cs_A,
84  buff_t,
85  buff_work, &lwork,
86  &info );
87 
88  break;
89  }
90 
91  case FLA_DOUBLE_COMPLEX:
92  {
93  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
94  dcomplex *buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
95  dcomplex *buff_work = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( work );
96 
97  F77_zungtr( &blas_uplo,
98  &m_A,
99  buff_A, &cs_A,
100  buff_t,
101  buff_work, &lwork,
102  &info );
103 
104  break;
105  }
106 
107  }
108 
109  FLA_Obj_free( &work );
110 #else
111  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
112 #endif
113 
114  return info;
115 }
FLA_Error FLA_Tridiag_form_Q_check(FLA_Uplo uplo, FLA_Obj A, FLA_Obj t)
Definition: FLA_Tridiag_form_Q_check.c:13
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
int F77_zungtr(char *uplo, int *m, dcomplex *a, int *lda, dcomplex *tau, dcomplex *work, int *lwork, int *info)
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
dim_t FLA_Query_blocksize(FLA_Datatype dt, FLA_Dimension dim)
Definition: FLA_Blocksize.c:161
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
int F77_cungtr(char *uplo, int *m, scomplex *a, int *lda, scomplex *tau, scomplex *work, int *lwork, int *info)
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
int F77_sorgtr(char *uplo, int *m, float *a, int *lda, float *tau, float *work, int *lwork, int *info)
Definition: blis_type_defs.h:132
int F77_dorgtr(char *uplo, int *m, double *a, int *lda, double *tau, double *work, int *lwork, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_Tridiag_unb_external()

FLA_Error FLA_Tridiag_unb_external ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  t 
)

References F77_chetd2(), F77_dsytd2(), F77_ssytd2(), F77_zhetd2(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_datatype_proj_to_real(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Tridiag_check().

Referenced by FLA_Tridiag_unb_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int n_A, cs_A;
19  FLA_Obj d, e;
20  char blas_uplo;
21 
22  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
23  FLA_Tridiag_check( uplo, A, t );
24 
25  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
26 
27  datatype = FLA_Obj_datatype( A );
28 
29  n_A = FLA_Obj_width( A );
30  cs_A = FLA_Obj_col_stride( A );
31 
32  FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), n_A, 1, 0, 0, &d );
33  FLA_Obj_create( FLA_Obj_datatype_proj_to_real( A ), n_A - 1, 1, 0, 0, &e );
34 
35  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
36 
37 
38  switch( datatype ){
39 
40  case FLA_FLOAT:
41  {
42  float* buff_A = ( float * ) FLA_FLOAT_PTR( A );
43  float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
44  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
45  float* buff_t = ( float * ) FLA_FLOAT_PTR( t );
46 
47  F77_ssytd2( &blas_uplo,
48  &n_A,
49  buff_A, &cs_A,
50  buff_d,
51  buff_e,
52  buff_t,
53  &info );
54 
55  break;
56  }
57 
58  case FLA_DOUBLE:
59  {
60  double* buff_A = ( double * ) FLA_DOUBLE_PTR( A );
61  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
62  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
63  double* buff_t = ( double * ) FLA_DOUBLE_PTR( t );
64 
65  F77_dsytd2( &blas_uplo,
66  &n_A,
67  buff_A, &cs_A,
68  buff_d,
69  buff_e,
70  buff_t,
71  &info );
72 
73  break;
74  }
75 
76  case FLA_COMPLEX:
77  {
78  scomplex* buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
79  float* buff_d = ( float * ) FLA_FLOAT_PTR( d );
80  float* buff_e = ( float * ) FLA_FLOAT_PTR( e );
81  scomplex* buff_t = ( scomplex * ) FLA_COMPLEX_PTR( t );
82 
83  F77_chetd2( &blas_uplo,
84  &n_A,
85  buff_A, &cs_A,
86  buff_d,
87  buff_e,
88  buff_t,
89  &info );
90 
91  break;
92  }
93 
94  case FLA_DOUBLE_COMPLEX:
95  {
96  dcomplex* buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
97  double* buff_d = ( double * ) FLA_DOUBLE_PTR( d );
98  double* buff_e = ( double * ) FLA_DOUBLE_PTR( e );
99  dcomplex* buff_t = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( t );
100 
101  F77_zhetd2( &blas_uplo,
102  &n_A,
103  buff_A, &cs_A,
104  buff_d,
105  buff_e,
106  buff_t,
107  &info );
108 
109  break;
110  }
111 
112  }
113 
114  FLA_Obj_free( &d );
115  FLA_Obj_free( &e );
116 #else
117  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
118 #endif
119 
120  return info;
121 }
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
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
int F77_ssytd2(char *uplo, int *n, float *a, int *lda, float *d, float *e, float *tau, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: FLA_type_defs.h:158
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Tridiag_check(FLA_Uplo uplo, FLA_Obj A, FLA_Obj t)
Definition: FLA_Tridiag_check.c:13
FLA_Datatype FLA_Obj_datatype_proj_to_real(FLA_Obj A)
Definition: FLA_Query.c:23
Definition: blis_type_defs.h:132
int F77_chetd2(char *uplo, int *n, scomplex *a, int *lda, float *d, float *e, scomplex *tau, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
int F77_zhetd2(char *uplo, int *n, dcomplex *a, int *lda, double *d, double *e, dcomplex *tau, int *info)
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_dsytd2(char *uplo, int *n, double *a, int *lda, double *d, double *e, double *tau, int *info)
Definition: blis_type_defs.h:137

◆ FLA_Tridiag_UT_check()

FLA_Error FLA_Tridiag_UT_check ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  T 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_square(), FLA_Check_valid_uplo(), and FLA_Obj_width().

Referenced by FLA_Tridiag_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_square( A );
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
35  return FLA_SUCCESS;
36 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Tridiag_UT_extract_diagonals_check()

FLA_Error FLA_Tridiag_UT_extract_diagonals_check ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  d,
FLA_Obj  e 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_length().

Referenced by FLA_Tridiag_UT_extract_diagonals().

14 {
15  FLA_Error e_val;
16  dim_t m_A;
17 
18  e_val = FLA_Check_valid_uplo( uplo );
19  FLA_Check_error_code( e_val );
20 
21  e_val = FLA_Check_floating_object( A );
22  FLA_Check_error_code( e_val );
23 
24  e_val = FLA_Check_nonconstant_object( A );
25  FLA_Check_error_code( e_val );
26 
27  e_val = FLA_Check_square( A );
28  FLA_Check_error_code( e_val );
29 
30  m_A = FLA_Obj_length( A );
31 
32  e_val = FLA_Check_nonconstant_object( d );
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_if_vector( d );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_vector_dim( d, m_A );
42  FLA_Check_error_code( e_val );
43 
44  if ( m_A > 1 )
45  {
46  e_val = FLA_Check_nonconstant_object( e );
47  FLA_Check_error_code( e_val );
48 
50  FLA_Check_error_code( e_val );
51 
52  e_val = FLA_Check_if_vector( e );
53  FLA_Check_error_code( e_val );
54 
55  e_val = FLA_Check_vector_dim( e, m_A - 1 );
56  FLA_Check_error_code( e_val );
57  }
58 
59  return FLA_SUCCESS;
60 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
unsigned long dim_t
Definition: FLA_type_defs.h:71
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Tridiag_UT_extract_real_diagonals_check()

FLA_Error FLA_Tridiag_UT_extract_real_diagonals_check ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  d,
FLA_Obj  e 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_uplo(), FLA_Check_vector_dim(), and FLA_Obj_length().

Referenced by FLA_Tridiag_UT_extract_real_diagonals().

14 {
15  FLA_Error e_val;
16  dim_t m_A;
17 
18  e_val = FLA_Check_valid_uplo( uplo );
19  FLA_Check_error_code( e_val );
20 
21  e_val = FLA_Check_floating_object( A );
22  FLA_Check_error_code( e_val );
23 
24  e_val = FLA_Check_nonconstant_object( A );
25  FLA_Check_error_code( e_val );
26 
27  e_val = FLA_Check_square( A );
28  FLA_Check_error_code( e_val );
29 
30  m_A = FLA_Obj_length( A );
31 
32  e_val = FLA_Check_nonconstant_object( d );
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_if_vector( d );
39  FLA_Check_error_code( e_val );
40 
41  e_val = FLA_Check_vector_dim( d, m_A );
42  FLA_Check_error_code( e_val );
43 
44  if ( m_A > 1 )
45  {
46  e_val = FLA_Check_nonconstant_object( e );
47  FLA_Check_error_code( e_val );
48 
50  FLA_Check_error_code( e_val );
51 
52  e_val = FLA_Check_if_vector( e );
53  FLA_Check_error_code( e_val );
54 
55  e_val = FLA_Check_vector_dim( e, m_A - 1 );
56  FLA_Check_error_code( e_val );
57  }
58 
59  return FLA_SUCCESS;
60 }
unsigned long dim_t
Definition: FLA_type_defs.h:71
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Tridiag_UT_form_Q_check()

FLA_Error FLA_Tridiag_UT_form_Q_check ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  T,
FLA_Obj  Q 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_square(), FLA_Check_valid_uplo(), and FLA_Obj_width().

Referenced by FLA_Tridiag_UT_form_Q().

14 {
15  FLA_Error e_val;
16  dim_t n_T;
17 
18  e_val = FLA_Check_valid_uplo( uplo );
19  FLA_Check_error_code( e_val );
20 
21  e_val = FLA_Check_floating_object( A );
22  FLA_Check_error_code( e_val );
23 
24  e_val = FLA_Check_nonconstant_object( A );
25  FLA_Check_error_code( e_val );
26 
27  e_val = FLA_Check_square( A );
28  FLA_Check_error_code( e_val );
29 
30  e_val = FLA_Check_floating_object( T );
31  FLA_Check_error_code( e_val );
32 
33  e_val = FLA_Check_nonconstant_object( T );
34  FLA_Check_error_code( e_val );
35 
37  FLA_Check_error_code( e_val );
38 
39  n_T = FLA_Obj_width( T );
40 
41  e_val = FLA_Check_object_width_equals( A, n_T );
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_floating_object( Q );
45  FLA_Check_error_code( e_val );
46 
47  e_val = FLA_Check_nonconstant_object( Q );
48  FLA_Check_error_code( e_val );
49 
50  e_val = FLA_Check_square( Q );
51  FLA_Check_error_code( e_val );
52 
54  FLA_Check_error_code( e_val );
55 
56  e_val = FLA_Check_object_width_equals( Q, n_T );
57  FLA_Check_error_code( e_val );
58 
59  return FLA_SUCCESS;
60 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
unsigned long dim_t
Definition: FLA_type_defs.h:71
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Tridiag_UT_internal_check()

FLA_Error FLA_Tridiag_UT_internal_check ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  T,
fla_tridiagut_t cntl 
)

References FLA_Check_identical_object_elemtype(), and FLA_Check_null_pointer().

Referenced by FLA_Tridiag_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
25  return FLA_SUCCESS;
26 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_Tridiag_UT_realify_check()

FLA_Error FLA_Tridiag_UT_realify_check ( FLA_Uplo  uplo,
FLA_Obj  A,
FLA_Obj  d 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_square(), FLA_Check_valid_uplo(), and FLA_Obj_vector_dim().

Referenced by FLA_Tridiag_UT_realify().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_square( A );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_if_vector( d );
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
38  return FLA_SUCCESS;
39 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Tridiag_UT_realify_subdiagonal_check()

FLA_Error FLA_Tridiag_UT_realify_subdiagonal_check ( FLA_Obj  b,
FLA_Obj  d 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_vector(), FLA_Check_vector_dim(), and FLA_Obj_vector_dim().

Referenced by FLA_Tridiag_UT_realify_subdiagonal().

14 {
15  FLA_Error e_val;
16  dim_t m_d;
17 
18  e_val = FLA_Check_floating_object( d );
19  FLA_Check_error_code( e_val );
20 
21  e_val = FLA_Check_if_vector( d );
22  FLA_Check_error_code( e_val );
23 
24  m_d = FLA_Obj_vector_dim( d );
25 
26  if ( m_d > 1 )
27  {
29  FLA_Check_error_code( e_val );
30 
31  e_val = FLA_Check_if_vector( b );
32  FLA_Check_error_code( e_val );
33 
34  e_val = FLA_Check_vector_dim( b, m_d - 1 );
35  FLA_Check_error_code( e_val );
36  }
37 
38  return FLA_SUCCESS;
39 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
unsigned long dim_t
Definition: FLA_type_defs.h:71
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_vector_dim(FLA_Obj x, dim_t expected_length)
Definition: FLA_Check.c:1213
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137

◆ FLA_Tridiag_UT_recover_tau_check()

FLA_Error FLA_Tridiag_UT_recover_tau_check ( FLA_Obj  T,
FLA_Obj  tau 
)

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_if_vector(), FLA_Check_object_width_equals(), and FLA_Obj_vector_dim().

Referenced by FLA_Tridiag_UT_recover_tau().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( T );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_consistent_object_datatype( T, tau );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_if_vector( tau );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_object_width_equals( T, FLA_Obj_vector_dim( tau ) + 1 );
27  FLA_Check_error_code( e_val );
28 
29  return FLA_SUCCESS;
30 }
FLA_Error FLA_Check_if_vector(FLA_Obj A)
Definition: FLA_Check.c:383
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
FLA_Error FLA_Check_consistent_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:339

◆ FLA_Tridiag_UT_scale_diagonals_check()

FLA_Error FLA_Tridiag_UT_scale_diagonals_check ( FLA_Uplo  uplo,
FLA_Obj  alpha,
FLA_Obj  A 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), and FLA_Check_valid_uplo().

Referenced by FLA_Tridiag_UT_scale_diagonals().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_real_object( alpha );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_if_scalar( alpha );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_identical_object_precision( A, alpha );
33  FLA_Check_error_code( e_val );
34 
35  return FLA_SUCCESS;
36 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:298
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition: FLA_Check.c:258
FLA_Error FLA_Check_if_scalar(FLA_Obj A)
Definition: FLA_Check.c:373
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Tridiag_UT_shift_U_check()

FLA_Error FLA_Tridiag_UT_shift_U_check ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().

Referenced by FLA_Tridiag_UT_shift_U().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_square( A );
27  FLA_Check_error_code( e_val );
28 
29  return FLA_SUCCESS;
30 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Trinv()

FLA_Error FLA_Trinv ( FLA_Uplo  uplo,
FLA_Diag  diag,
FLA_Obj  A 
)

References FLA_Blocksize_extract(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Trinv_check(), and FLA_Trinv_internal().

18 {
19  FLA_Datatype datatype;
20  int m_A, r_val = 0;
21  int FLA_TRINV_VAR3_BLOCKSIZE;
22 
23  // Check parameters.
24  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
25  FLA_Trinv_check( uplo, diag, A );
26 
27  // Determine the datatype of the operation.
28  datatype = FLA_Obj_datatype( A );
29 
30  // Extract the appropriate blocksize for the given datatype.
31  FLA_TRINV_VAR3_BLOCKSIZE = FLA_Blocksize_extract( datatype, fla_trinv_var3_bsize );
32 
33  // Determine the dimension of A.
34  m_A = FLA_Obj_length( A );
35 
36  // Invoke FLA_Trinv_internal() with the appropriate control tree.
37  if ( m_A <= FLA_TRINV_VAR3_BLOCKSIZE )
38  {
39  r_val = FLA_Trinv_internal( uplo, diag, A, fla_trinv_cntl_leaf );
40  }
41  else if ( FLA_TRINV_VAR3_BLOCKSIZE < m_A )
42  {
43  r_val = FLA_Trinv_internal( uplo, diag, A, fla_trinv_cntl );
44  }
45 
46  return r_val;
47 }
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
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
fla_trinv_t * fla_trinv_cntl
Definition: FLA_Trinv_cntl_init.c:18
fla_trinv_t * fla_trinv_cntl_leaf
Definition: FLA_Trinv_cntl_init.c:17
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Blocksize_extract(FLA_Datatype dt, fla_blocksize_t *bp)
Definition: FLA_Blocksize.c:116
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
fla_blocksize_t * fla_trinv_var3_bsize
Definition: FLA_Trinv_cntl_init.c:19

◆ FLA_Trinv_blk_external()

FLA_Error FLA_Trinv_blk_external ( FLA_Uplo  uplo,
FLA_Diag  diag,
FLA_Obj  A 
)

References F77_ctrtri(), F77_dtrtri(), F77_strtri(), F77_ztrtri(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Param_map_flame_to_netlib_diag(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Trinv_check().

Referenced by FLA_SPDinv_blk_external(), FLA_Trinv_ln_blk_ext(), FLA_Trinv_lu_blk_ext(), FLA_Trinv_un_blk_ext(), and FLA_Trinv_uu_blk_ext().

14 {
15  FLA_Error r_val = FLA_SUCCESS;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  int info;
18  FLA_Datatype datatype;
19  int m_A, cs_A;
20  char blas_uplo;
21  char blas_diag;
22 
23  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
24  FLA_Trinv_check( uplo, diag, A );
25 
26  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
27 
28  datatype = FLA_Obj_datatype( A );
29 
30  m_A = FLA_Obj_length( A );
31  cs_A = FLA_Obj_col_stride( A );
32 
33  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
34  FLA_Param_map_flame_to_netlib_diag( diag, &blas_diag );
35 
36 
37  switch( datatype ){
38 
39  case FLA_FLOAT:
40  {
41  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
42 
43  F77_strtri( &blas_uplo,
44  &blas_diag,
45  &m_A,
46  buff_A, &cs_A,
47  &info );
48 
49  break;
50  }
51 
52  case FLA_DOUBLE:
53  {
54  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
55 
56  F77_dtrtri( &blas_uplo,
57  &blas_diag,
58  &m_A,
59  buff_A, &cs_A,
60  &info );
61 
62  break;
63  }
64 
65  case FLA_COMPLEX:
66  {
67  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
68 
69  F77_ctrtri( &blas_uplo,
70  &blas_diag,
71  &m_A,
72  buff_A, &cs_A,
73  &info );
74 
75  break;
76  }
77 
78  case FLA_DOUBLE_COMPLEX:
79  {
80  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
81 
82  F77_ztrtri( &blas_uplo,
83  &blas_diag,
84  &m_A,
85  buff_A, &cs_A,
86  &info );
87 
88  break;
89  }
90 
91  }
92 
93  // Convert to zero-based indexing, if an index was reported.
94  if ( info > 0 ) r_val = info - 1;
95  else r_val = FLA_SUCCESS;
96 
97 #else
98  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
99 #endif
100 
101  return r_val;
102 }
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
int F77_ztrtri(char *uplo, char *diag, int *n, dcomplex *a, int *lda, int *info)
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Trinv_check(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition: FLA_Trinv_check.c:13
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
void FLA_Param_map_flame_to_netlib_diag(FLA_Diag diag, void *blas_diag)
Definition: FLA_Param.c:95
int F77_dtrtri(char *uplo, char *diag, int *n, double *a, int *lda, int *info)
Definition: blis_type_defs.h:132
int F77_strtri(char *uplo, char *diag, int *n, float *a, int *lda, int *info)
int F77_ctrtri(char *uplo, char *diag, int *n, scomplex *a, int *lda, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137

◆ FLA_Trinv_check()

FLA_Error FLA_Trinv_check ( FLA_Uplo  uplo,
FLA_Diag  diag,
FLA_Obj  A 
)

References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_diag(), and FLA_Check_valid_uplo().

Referenced by FLA_Trinv(), FLA_Trinv_blk_external(), FLA_Trinv_unb_external(), and FLASH_Trinv().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_valid_diag( diag );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_floating_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_nonconstant_object( A );
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_square( A );
30  FLA_Check_error_code( e_val );
31 
32  return FLA_SUCCESS;
33 }
FLA_Error FLA_Check_valid_diag(FLA_Diag diag)
Definition: FLA_Check.c:100
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Trinv_internal_check()

FLA_Error FLA_Trinv_internal_check ( FLA_Uplo  uplo,
FLA_Diag  diag,
FLA_Obj  A,
fla_trinv_t cntl 
)

References FLA_Check_null_pointer().

Referenced by FLA_Trinv_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  return FLA_SUCCESS;
22 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_Trinv_ln_blk_ext()

FLA_Error FLA_Trinv_ln_blk_ext ( FLA_Obj  A)

References FLA_Trinv_blk_external().

Referenced by FLA_Trinv_ln().

105 {
106  return FLA_Trinv_blk_external( FLA_LOWER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
107 }
FLA_Error FLA_Trinv_blk_external(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition: FLA_Trinv_blk_external.c:13

◆ FLA_Trinv_ln_task()

FLA_Error FLA_Trinv_ln_task ( FLA_Obj  A,
fla_trinv_t cntl 
)

References FLA_Trinv_internal().

22 {
23  //return FLA_Trinv_unb_external( FLA_LOWER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
24  return FLA_Trinv_internal( FLA_LOWER_TRIANGULAR, FLA_NONUNIT_DIAG, A,
26 }
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_trinv_t * fla_trinv_cntl_leaf
Definition: FLA_Trinv_cntl_init.c:17

◆ FLA_Trinv_ln_unb_ext()

FLA_Error FLA_Trinv_ln_unb_ext ( FLA_Obj  A)

References FLA_Trinv_unb_external().

Referenced by FLA_Trinv_ln().

105 {
106  return FLA_Trinv_unb_external( FLA_LOWER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
107 }
FLA_Error FLA_Trinv_unb_external(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition: FLA_Trinv_unb_external.c:13

◆ FLA_Trinv_lu_blk_ext()

FLA_Error FLA_Trinv_lu_blk_ext ( FLA_Obj  A)

References FLA_Trinv_blk_external().

Referenced by FLA_Trinv_lu().

110 {
111  return FLA_Trinv_blk_external( FLA_LOWER_TRIANGULAR, FLA_UNIT_DIAG, A );
112 }
FLA_Error FLA_Trinv_blk_external(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition: FLA_Trinv_blk_external.c:13

◆ FLA_Trinv_lu_task()

FLA_Error FLA_Trinv_lu_task ( FLA_Obj  A,
fla_trinv_t cntl 
)

References FLA_Trinv_internal().

29 {
30  //return FLA_Trinv_unb_external( FLA_LOWER_TRIANGULAR, FLA_UNIT_DIAG, A );
31  return FLA_Trinv_internal( FLA_LOWER_TRIANGULAR, FLA_UNIT_DIAG, A,
33 }
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_trinv_t * fla_trinv_cntl_leaf
Definition: FLA_Trinv_cntl_init.c:17

◆ FLA_Trinv_lu_unb_ext()

FLA_Error FLA_Trinv_lu_unb_ext ( FLA_Obj  A)

References FLA_Trinv_unb_external().

Referenced by FLA_Trinv_lu().

110 {
111  return FLA_Trinv_unb_external( FLA_LOWER_TRIANGULAR, FLA_UNIT_DIAG, A );
112 }
FLA_Error FLA_Trinv_unb_external(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition: FLA_Trinv_unb_external.c:13

◆ FLA_Trinv_task()

FLA_Error FLA_Trinv_task ( FLA_Uplo  uplo,
FLA_Diag  diag,
FLA_Obj  A,
fla_trinv_t cntl 
)

References FLA_Trinv_internal().

Referenced by FLASH_Queue_exec_task().

16 {
17  return FLA_Trinv_internal( uplo, diag, A,
19 }
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_trinv_t * fla_trinv_cntl_leaf
Definition: FLA_Trinv_cntl_init.c:17

◆ FLA_Trinv_un_blk_ext()

FLA_Error FLA_Trinv_un_blk_ext ( FLA_Obj  A)

References FLA_Trinv_blk_external().

Referenced by FLA_Trinv_un().

115 {
116  return FLA_Trinv_blk_external( FLA_UPPER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
117 }
FLA_Error FLA_Trinv_blk_external(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition: FLA_Trinv_blk_external.c:13

◆ FLA_Trinv_un_task()

FLA_Error FLA_Trinv_un_task ( FLA_Obj  A,
fla_trinv_t cntl 
)

References FLA_Trinv_internal().

36 {
37  //return FLA_Trinv_unb_external( FLA_UPPER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
38  return FLA_Trinv_internal( FLA_UPPER_TRIANGULAR, FLA_NONUNIT_DIAG, A,
40 }
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_trinv_t * fla_trinv_cntl_leaf
Definition: FLA_Trinv_cntl_init.c:17

◆ FLA_Trinv_un_unb_ext()

FLA_Error FLA_Trinv_un_unb_ext ( FLA_Obj  A)

References FLA_Trinv_unb_external().

Referenced by FLA_Trinv_un().

115 {
116  return FLA_Trinv_unb_external( FLA_UPPER_TRIANGULAR, FLA_NONUNIT_DIAG, A );
117 }
FLA_Error FLA_Trinv_unb_external(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition: FLA_Trinv_unb_external.c:13

◆ FLA_Trinv_unb_external()

FLA_Error FLA_Trinv_unb_external ( FLA_Uplo  uplo,
FLA_Diag  diag,
FLA_Obj  A 
)

References F77_ctrti2(), F77_dtrti2(), F77_strti2(), F77_ztrti2(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Param_map_flame_to_netlib_diag(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Trinv_check().

Referenced by FLA_Trinv_ln_unb_ext(), FLA_Trinv_lu_unb_ext(), FLA_Trinv_un_unb_ext(), and FLA_Trinv_uu_unb_ext().

14 {
15  FLA_Error r_val = FLA_SUCCESS;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  int info;
18  FLA_Datatype datatype;
19  int m_A, cs_A;
20  char blas_uplo;
21  char blas_diag;
22 
23  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
24  FLA_Trinv_check( uplo, diag, A );
25 
26  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
27 
28  datatype = FLA_Obj_datatype( A );
29 
30  m_A = FLA_Obj_length( A );
31  cs_A = FLA_Obj_col_stride( A );
32 
33  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
34  FLA_Param_map_flame_to_netlib_diag( diag, &blas_diag );
35 
36 
37  switch( datatype ){
38 
39  case FLA_FLOAT:
40  {
41  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
42 
43  F77_strti2( &blas_uplo,
44  &blas_diag,
45  &m_A,
46  buff_A, &cs_A,
47  &info );
48 
49  break;
50  }
51 
52  case FLA_DOUBLE:
53  {
54  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
55 
56  F77_dtrti2( &blas_uplo,
57  &blas_diag,
58  &m_A,
59  buff_A, &cs_A,
60  &info );
61 
62  break;
63  }
64 
65  case FLA_COMPLEX:
66  {
67  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
68 
69  F77_ctrti2( &blas_uplo,
70  &blas_diag,
71  &m_A,
72  buff_A, &cs_A,
73  &info );
74 
75  break;
76  }
77 
78  case FLA_DOUBLE_COMPLEX:
79  {
80  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
81 
82  F77_ztrti2( &blas_uplo,
83  &blas_diag,
84  &m_A,
85  buff_A, &cs_A,
86  &info );
87 
88  break;
89  }
90 
91  }
92 
93  // Convert to zero-based indexing, if an index was reported.
94  if ( info > 0 ) r_val = info - 1;
95  else r_val = FLA_SUCCESS;
96 
97 #else
98  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
99 #endif
100 
101  return r_val;
102 }
int F77_dtrti2(char *uplo, char *diag, int *n, double *a, int *lda, int *info)
int F77_ztrti2(char *uplo, char *diag, int *n, dcomplex *a, int *lda, int *info)
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Trinv_check(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition: FLA_Trinv_check.c:13
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
void FLA_Param_map_flame_to_netlib_diag(FLA_Diag diag, void *blas_diag)
Definition: FLA_Param.c:95
Definition: blis_type_defs.h:132
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_ctrti2(char *uplo, char *diag, int *n, scomplex *a, int *lda, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137
int F77_strti2(char *uplo, char *diag, int *n, float *a, int *lda, int *info)

◆ FLA_Trinv_uu_blk_ext()

FLA_Error FLA_Trinv_uu_blk_ext ( FLA_Obj  A)

References FLA_Trinv_blk_external().

Referenced by FLA_Trinv_uu().

120 {
121  return FLA_Trinv_blk_external( FLA_UPPER_TRIANGULAR, FLA_UNIT_DIAG, A );
122 }
FLA_Error FLA_Trinv_blk_external(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition: FLA_Trinv_blk_external.c:13

◆ FLA_Trinv_uu_task()

FLA_Error FLA_Trinv_uu_task ( FLA_Obj  A,
fla_trinv_t cntl 
)

References FLA_Trinv_internal().

43 {
44  //return FLA_Trinv_unb_external( FLA_UPPER_TRIANGULAR, FLA_UNIT_DIAG, A );
45  return FLA_Trinv_internal( FLA_UPPER_TRIANGULAR, FLA_UNIT_DIAG, A,
47 }
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_trinv_t * fla_trinv_cntl_leaf
Definition: FLA_Trinv_cntl_init.c:17

◆ FLA_Trinv_uu_unb_ext()

FLA_Error FLA_Trinv_uu_unb_ext ( FLA_Obj  A)

References FLA_Trinv_unb_external().

Referenced by FLA_Trinv_uu().

120 {
121  return FLA_Trinv_unb_external( FLA_UPPER_TRIANGULAR, FLA_UNIT_DIAG, A );
122 }
FLA_Error FLA_Trinv_unb_external(FLA_Uplo uplo, FLA_Diag diag, FLA_Obj A)
Definition: FLA_Trinv_unb_external.c:13

◆ FLA_Trsm_piv_task()

FLA_Error FLA_Trsm_piv_task ( FLA_Obj  A,
FLA_Obj  B,
FLA_Obj  p,
fla_trsm_t cntl 
)

References FLA_Apply_pivots(), FLA_ONE, and FLA_Trsm_external().

Referenced by FLASH_Queue_exec_task(), and FLASH_Trsm_piv().

14 {
15  FLA_Apply_pivots( FLA_LEFT, FLA_NO_TRANSPOSE,
16  p, B );
17 
18  FLA_Trsm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR,
19  FLA_NO_TRANSPOSE, FLA_UNIT_DIAG,
20  FLA_ONE, A, B );
21 
22  return FLA_SUCCESS;
23 }
FLA_Obj FLA_ONE
Definition: FLA_Init.c:18
FLA_Error FLA_Apply_pivots(FLA_Side side, FLA_Trans trans, FLA_Obj p, FLA_Obj A)
Definition: FLA_Apply_pivots.c:15
FLA_Error FLA_Trsm_external(FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition: FLA_Trsm_external.c:13

◆ FLA_Ttmm()

FLA_Error FLA_Ttmm ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References FLA_Blocksize_extract(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Ttmm_check(), and FLA_Ttmm_internal().

18 {
19  FLA_Datatype datatype;
20  int m_A, r_val = 0;
21  int FLA_TTMM_VAR1_BLOCKSIZE;
22 
23  // Check parameters.
24  if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
25  FLA_Ttmm_check( uplo, A );
26 
27  // Determine the datatype of the operation.
28  datatype = FLA_Obj_datatype( A );
29 
30  // Extract the appropriate blocksize for the given datatype.
31  FLA_TTMM_VAR1_BLOCKSIZE = FLA_Blocksize_extract( datatype, fla_ttmm_var1_bsize );
32 
33  // Determine the dimension of A.
34  m_A = FLA_Obj_length( A );
35 
36  // Invoke FLA_Ttmm_internal() with the appropriate control tree.
37  if ( m_A <= FLA_TTMM_VAR1_BLOCKSIZE )
38  {
39  r_val = FLA_Ttmm_internal( uplo, A, fla_ttmm_cntl_leaf );
40  }
41  else if ( FLA_TTMM_VAR1_BLOCKSIZE < m_A )
42  {
43  r_val = FLA_Ttmm_internal( uplo, A, fla_ttmm_cntl );
44  }
45 
46  return r_val;
47 }
fla_ttmm_t * fla_ttmm_cntl
Definition: FLA_Ttmm_cntl_init.c:18
fla_blocksize_t * fla_ttmm_var1_bsize
Definition: FLA_Ttmm_cntl_init.c:19
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Error FLA_Ttmm_check(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Ttmm_check.c:13
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
fla_ttmm_t * fla_ttmm_cntl_leaf
Definition: FLA_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
dim_t FLA_Blocksize_extract(FLA_Datatype dt, fla_blocksize_t *bp)
Definition: FLA_Blocksize.c:116
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116

◆ FLA_Ttmm_blk_external()

FLA_Error FLA_Ttmm_blk_external ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References F77_clauum(), F77_dlauum(), F77_slauum(), F77_zlauum(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Ttmm_check().

Referenced by FLA_SPDinv_blk_external(), FLA_Ttmm_l_blk_ext(), and FLA_Ttmm_u_blk_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A, cs_A;
19  char blas_uplo;
20 
21  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22  FLA_Ttmm_check( uplo, A );
23 
24  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25 
26  datatype = FLA_Obj_datatype( A );
27 
28  m_A = FLA_Obj_length( A );
29  cs_A = FLA_Obj_col_stride( A );
30 
31  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
32 
33 
34  switch( datatype ){
35 
36  case FLA_FLOAT:
37  {
38  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
39 
40  F77_slauum( &blas_uplo,
41  &m_A,
42  buff_A, &cs_A,
43  &info );
44 
45  break;
46  }
47 
48  case FLA_DOUBLE:
49  {
50  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
51 
52  F77_dlauum( &blas_uplo,
53  &m_A,
54  buff_A, &cs_A,
55  &info );
56 
57  break;
58  }
59 
60  case FLA_COMPLEX:
61  {
62  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
63 
64  F77_clauum( &blas_uplo,
65  &m_A,
66  buff_A, &cs_A,
67  &info );
68 
69  break;
70  }
71 
72  case FLA_DOUBLE_COMPLEX:
73  {
74  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
75 
76  F77_zlauum( &blas_uplo,
77  &m_A,
78  buff_A, &cs_A,
79  &info );
80 
81  break;
82  }
83 
84  }
85 #else
86  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
87 #endif
88 
89  return info;
90 }
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
int F77_zlauum(char *uplo, int *n, dcomplex *a, int *lda, int *info)
Definition: blis_type_defs.h:132
FLA_Error FLA_Ttmm_check(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Ttmm_check.c:13
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int F77_slauum(char *uplo, int *n, float *a, int *lda, int *info)
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
int F77_dlauum(char *uplo, int *n, double *a, int *lda, int *info)
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137
int F77_clauum(char *uplo, int *n, scomplex *a, int *lda, int *info)

◆ FLA_Ttmm_check()

FLA_Error FLA_Ttmm_check ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References FLA_Check_floating_object(), FLA_Check_nonconstant_object(), FLA_Check_square(), and FLA_Check_valid_uplo().

Referenced by FLA_Ttmm(), FLA_Ttmm_blk_external(), FLA_Ttmm_unb_external(), and FLASH_Ttmm().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_valid_uplo( uplo );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_floating_object( A );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_nonconstant_object( A );
24  FLA_Check_error_code( e_val );
25 
26  e_val = FLA_Check_square( A );
27  FLA_Check_error_code( e_val );
28 
29  return FLA_SUCCESS;
30 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_valid_uplo(FLA_Uplo uplo)
Definition: FLA_Check.c:76

◆ FLA_Ttmm_internal_check()

FLA_Error FLA_Ttmm_internal_check ( FLA_Uplo  uplo,
FLA_Obj  A,
fla_ttmm_t cntl 
)

References FLA_Check_null_pointer().

Referenced by FLA_Ttmm_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  return FLA_SUCCESS;
22 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518

◆ FLA_Ttmm_l_blk_ext()

FLA_Error FLA_Ttmm_l_blk_ext ( FLA_Obj  A)

References FLA_Ttmm_blk_external().

Referenced by FLA_Ttmm_l().

93 {
94  return FLA_Ttmm_blk_external( FLA_LOWER_TRIANGULAR, A );
95 }
FLA_Error FLA_Ttmm_blk_external(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Ttmm_blk_external.c:13

◆ FLA_Ttmm_l_task()

FLA_Error FLA_Ttmm_l_task ( FLA_Obj  A,
fla_ttmm_t cntl 
)

References FLA_Ttmm_internal().

22 {
23  //return FLA_Ttmm_unb_external( FLA_LOWER_TRIANGULAR, A );
24  return FLA_Ttmm_internal( FLA_LOWER_TRIANGULAR, A,
26 }
fla_ttmm_t * fla_ttmm_cntl_leaf
Definition: FLA_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_Ttmm_l_unb_ext()

FLA_Error FLA_Ttmm_l_unb_ext ( FLA_Obj  A)

References FLA_Ttmm_unb_external().

Referenced by FLA_Ttmm_l().

93 {
94  return FLA_Ttmm_unb_external( FLA_LOWER_TRIANGULAR, A );
95 }
FLA_Error FLA_Ttmm_unb_external(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Ttmm_unb_external.c:13

◆ FLA_Ttmm_task()

FLA_Error FLA_Ttmm_task ( FLA_Uplo  uplo,
FLA_Obj  A,
fla_ttmm_t cntl 
)

References FLA_Ttmm_internal().

Referenced by FLASH_Queue_exec_task().

16 {
17  return FLA_Ttmm_internal( uplo, A,
19 }
fla_ttmm_t * fla_ttmm_cntl_leaf
Definition: FLA_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_Ttmm_u_blk_ext()

FLA_Error FLA_Ttmm_u_blk_ext ( FLA_Obj  A)

References FLA_Ttmm_blk_external().

Referenced by FLA_Ttmm_u().

98 {
99  return FLA_Ttmm_blk_external( FLA_UPPER_TRIANGULAR, A );
100 }
FLA_Error FLA_Ttmm_blk_external(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Ttmm_blk_external.c:13

◆ FLA_Ttmm_u_task()

FLA_Error FLA_Ttmm_u_task ( FLA_Obj  A,
fla_ttmm_t cntl 
)

References FLA_Ttmm_internal().

29 {
30  //return FLA_Ttmm_unb_external( FLA_UPPER_TRIANGULAR, A );
31  return FLA_Ttmm_internal( FLA_UPPER_TRIANGULAR, A,
33 }
fla_ttmm_t * fla_ttmm_cntl_leaf
Definition: FLA_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_Ttmm_u_unb_ext()

FLA_Error FLA_Ttmm_u_unb_ext ( FLA_Obj  A)

References FLA_Ttmm_unb_external().

Referenced by FLA_Ttmm_u().

98 {
99  return FLA_Ttmm_unb_external( FLA_UPPER_TRIANGULAR, A );
100 }
FLA_Error FLA_Ttmm_unb_external(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Ttmm_unb_external.c:13

◆ FLA_Ttmm_unb_external()

FLA_Error FLA_Ttmm_unb_external ( FLA_Uplo  uplo,
FLA_Obj  A 
)

References F77_clauu2(), F77_dlauu2(), F77_slauu2(), F77_zlauu2(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Ttmm_check().

Referenced by FLA_Ttmm_l_unb_ext(), and FLA_Ttmm_u_unb_ext().

14 {
15  int info = 0;
16 #ifdef FLA_ENABLE_EXTERNAL_LAPACK_INTERFACES
17  FLA_Datatype datatype;
18  int m_A, cs_A;
19  char blas_uplo;
20 
21  if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
22  FLA_Ttmm_check( uplo, A );
23 
24  if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
25 
26  datatype = FLA_Obj_datatype( A );
27 
28  m_A = FLA_Obj_length( A );
29  cs_A = FLA_Obj_col_stride( A );
30 
31  FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
32 
33 
34  switch( datatype ){
35 
36  case FLA_FLOAT:
37  {
38  float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
39 
40  F77_slauu2( &blas_uplo,
41  &m_A,
42  buff_A, &cs_A,
43  &info );
44 
45  break;
46  }
47 
48  case FLA_DOUBLE:
49  {
50  double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
51 
52  F77_dlauu2( &blas_uplo,
53  &m_A,
54  buff_A, &cs_A,
55  &info );
56 
57  break;
58  }
59 
60  case FLA_COMPLEX:
61  {
62  scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
63 
64  F77_clauu2( &blas_uplo,
65  &m_A,
66  buff_A, &cs_A,
67  &info );
68 
69  break;
70  }
71 
72  case FLA_DOUBLE_COMPLEX:
73  {
74  dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
75 
76  F77_zlauu2( &blas_uplo,
77  &m_A,
78  buff_A, &cs_A,
79  &info );
80 
81  break;
82  }
83 
84  }
85 #else
86  FLA_Check_error_code( FLA_EXTERNAL_LAPACK_NOT_IMPLEMENTED );
87 #endif
88 
89  return info;
90 }
void FLA_Param_map_flame_to_netlib_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition: FLA_Param.c:47
int F77_clauu2(char *uplo, int *n, scomplex *a, int *lda, int *info)
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
int F77_dlauu2(char *uplo, int *n, double *a, int *lda, int *info)
Definition: blis_type_defs.h:132
FLA_Error FLA_Ttmm_check(FLA_Uplo uplo, FLA_Obj A)
Definition: FLA_Ttmm_check.c:13
int F77_slauu2(char *uplo, int *n, float *a, int *lda, int *info)
unsigned int FLA_Check_error_level(void)
Definition: FLA_Check.c:18
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
int F77_zlauu2(char *uplo, int *n, dcomplex *a, int *lda, int *info)
Definition: blis_type_defs.h:137

◆ FLA_UDdate_UT_check()

FLA_Error FLA_UDdate_UT_check ( FLA_Obj  R,
FLA_Obj  C,
FLA_Obj  D,
FLA_Obj  T 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), FLA_Check_square(), and FLA_Obj_width().

Referenced by FLA_UDdate_UT().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( R );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( R );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_square( R );
33  FLA_Check_error_code( e_val );
34 
36  FLA_Check_error_code( e_val );
37 
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
44  return FLA_SUCCESS;
45 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363

◆ FLA_UDdate_UT_inc_check()

FLA_Error FLA_UDdate_UT_inc_check ( FLA_Obj  R,
FLA_Obj  C,
FLA_Obj  D,
FLA_Obj  T,
FLA_Obj  W 
)

References FLA_Check_conformal_dims(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_square(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLASH_UDdate_UT_inc().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( R );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( R );
21  FLA_Check_error_code( e_val );
22 
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_square( R );
36  FLA_Check_error_code( e_val );
37 
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
45  FLA_Check_error_code( e_val );
46 
47  e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( C ),
48  FLA_Obj_length( D ) ) );
49  FLA_Check_error_code( e_val );
50 
51  e_val = FLA_Check_conformal_dims( FLA_NO_TRANSPOSE, R, W );
52  FLA_Check_error_code( e_val );
53 
54  return FLA_SUCCESS;
55 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_conformal_dims(FLA_Trans trans, FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:393
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_UDdate_UT_inc_solve_check()

FLA_Error FLA_UDdate_UT_inc_solve_check ( FLA_Obj  R,
FLA_Obj  bR,
FLA_Obj  x 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_square().

Referenced by FLASH_UDdate_UT_inc_solve().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( R );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( R );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_identical_object_datatype( R, bR );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_square( R );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, R, x, bR );
33  FLA_Check_error_code( e_val );
34 
35  return FLA_SUCCESS;
36 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417

◆ FLA_UDdate_UT_inc_update_rhs_check()

FLA_Error FLA_UDdate_UT_inc_update_rhs_check ( FLA_Obj  T,
FLA_Obj  bR,
FLA_Obj  C,
FLA_Obj  bC,
FLA_Obj  D,
FLA_Obj  bD 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLASH_UDdate_UT_inc_update_rhs().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( T );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( T );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_identical_object_datatype( T, bR );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_identical_object_datatype( T, bC );
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_identical_object_datatype( T, bD );
36  FLA_Check_error_code( e_val );
37 
38  e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( C ),
39  FLA_Obj_length( D ) ) );
40  FLA_Check_error_code( e_val );
41 
43  FLA_Check_error_code( e_val );
44 
46  FLA_Check_error_code( e_val );
47 
48  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, C, bR, bC );
49  FLA_Check_error_code( e_val );
50 
51  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, bR, bD );
52  FLA_Check_error_code( e_val );
53 
54  return FLA_SUCCESS;
55 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039

◆ FLA_UDdate_UT_internal_check()

FLA_Error FLA_UDdate_UT_internal_check ( FLA_Obj  R,
FLA_Obj  C,
FLA_Obj  D,
FLA_Obj  T,
fla_uddateut_t cntl 
)

References FLA_Check_identical_object_elemtype(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), FLA_Check_object_width_equals(), FLA_Check_square(), FLA_Obj_elemtype(), FLA_Obj_length(), and FLA_Obj_width().

Referenced by FLA_UDdate_UT_internal().

14 {
15  FLA_Error e_val;
16 
17  // Abort if the control structure is NULL.
18  e_val = FLA_Check_null_pointer( ( void* ) cntl );
19  FLA_Check_error_code( e_val );
20 
21  // Verify that the object element types are identical.
23  FLA_Check_error_code( e_val );
24 
26  FLA_Check_error_code( e_val );
27 
29  FLA_Check_error_code( e_val );
30 
31  e_val = FLA_Check_square( R );
32  FLA_Check_error_code( e_val );
33 
34  if ( FLA_Obj_elemtype( R ) == FLA_MATRIX )
35  {
37  FLA_Check_error_code( e_val );
38 
40  FLA_Check_error_code( e_val );
41 
43  FLA_Check_error_code( e_val );
44 
45  e_val = FLA_Check_object_length_equals( T, max( FLA_Obj_length( C ),
46  FLA_Obj_length( D ) ) );
47  FLA_Check_error_code( e_val );
48  }
49  else
50  {
51 
52  }
53 
54  return FLA_SUCCESS;
55 }
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:987
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition: FLA_Check.c:518
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition: FLA_Check.c:1039
FLA_Elemtype FLA_Obj_elemtype(FLA_Obj obj)
Definition: FLA_Query.c:51

◆ FLA_UDdate_UT_solve_check()

FLA_Error FLA_UDdate_UT_solve_check ( FLA_Obj  R,
FLA_Obj  bR,
FLA_Obj  x 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_square().

Referenced by FLA_UDdate_UT_solve().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( R );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( R );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_identical_object_datatype( R, bR );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_square( R );
30  FLA_Check_error_code( e_val );
31 
32  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, R, x, bR );
33  FLA_Check_error_code( e_val );
34 
35  return FLA_SUCCESS;
36 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_square(FLA_Obj A)
Definition: FLA_Check.c:363
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417

◆ FLA_UDdate_UT_task()

FLA_Error FLA_UDdate_UT_task ( FLA_Obj  R,
FLA_Obj  C,
FLA_Obj  D,
FLA_Obj  T,
fla_uddateut_t cntl 
)

References FLA_UDdate_UT_internal().

Referenced by FLASH_Queue_exec_task().

16 {
17  return FLA_UDdate_UT_internal( R, C, D, T,
19 }
fla_uddateut_t * fla_uddateut_cntl_leaf
Definition: FLA_UDdate_UT_cntl_init.c:16
FLA_Error FLA_UDdate_UT_internal(FLA_Obj R, FLA_Obj C, FLA_Obj D, FLA_Obj T, fla_uddateut_t *cntl)
Definition: FLA_UDdate_UT_internal.c:16

◆ FLA_UDdate_UT_update_rhs_check()

FLA_Error FLA_UDdate_UT_update_rhs_check ( FLA_Obj  T,
FLA_Obj  bR,
FLA_Obj  C,
FLA_Obj  bC,
FLA_Obj  D,
FLA_Obj  bD 
)

References FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_object_width_equals(), and FLA_Obj_width().

Referenced by FLA_UDdate_UT_update_rhs().

14 {
15  FLA_Error e_val;
16 
17  e_val = FLA_Check_floating_object( T );
18  FLA_Check_error_code( e_val );
19 
20  e_val = FLA_Check_nonconstant_object( T );
21  FLA_Check_error_code( e_val );
22 
23  e_val = FLA_Check_identical_object_datatype( T, bR );
24  FLA_Check_error_code( e_val );
25 
27  FLA_Check_error_code( e_val );
28 
29  e_val = FLA_Check_identical_object_datatype( T, bC );
30  FLA_Check_error_code( e_val );
31 
33  FLA_Check_error_code( e_val );
34 
35  e_val = FLA_Check_identical_object_datatype( T, bD );
36  FLA_Check_error_code( e_val );
37 
39  FLA_Check_error_code( e_val );
40 
42  FLA_Check_error_code( e_val );
43 
44  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, C, bR, bC );
45  FLA_Check_error_code( e_val );
46 
47  e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, D, bR, bD );
48  FLA_Check_error_code( e_val );
49 
50  return FLA_SUCCESS;
51 }
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition: FLA_Check.c:967
int FLA_Error
Definition: FLA_type_defs.h:47
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition: FLA_Check.c:954
FLA_Error FLA_Check_floating_object(FLA_Obj A)
Definition: FLA_Check.c:232
FLA_Error FLA_Check_object_width_equals(FLA_Obj A, dim_t n)
Definition: FLA_Check.c:1049
dim_t FLA_Obj_width(FLA_Obj obj)
Definition: FLA_Query.c:123
FLA_Error FLA_Check_matrix_matrix_dims(FLA_Trans transa, FLA_Trans transb, FLA_Obj A, FLA_Obj B, FLA_Obj C)
Definition: FLA_Check.c:417