libflame revision_anchor
FLA_blas3_prototypes.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLA_Gemm (FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Hemm (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Herk (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Her2k (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Symm (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Syrk (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Syr2k (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Trmm (FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Trmmsx (FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Trsm (FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Trsmsx (FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Gemp (FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Gepm (FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Gepp (FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Gemm_task (FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Hemm_task (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_hemm_t *cntl)
 
FLA_Error FLA_Herk_task (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_herk_t *cntl)
 
FLA_Error FLA_Her2k_task (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_her2k_t *cntl)
 
FLA_Error FLA_Symm_task (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_symm_t *cntl)
 
FLA_Error FLA_Syrk_task (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_syrk_t *cntl)
 
FLA_Error FLA_Syr2k_task (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_syr2k_t *cntl)
 
FLA_Error FLA_Trmm_task (FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trsm_task (FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Gemm_cc_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_ch_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_cn_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_ct_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_hc_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_hh_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_hn_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_ht_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_nc_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_nh_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_nn_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_nt_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_tc_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_th_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_tn_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Gemm_tt_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Hemm_ll_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_hemm_t *cntl)
 
FLA_Error FLA_Hemm_lu_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_hemm_t *cntl)
 
FLA_Error FLA_Hemm_rl_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_hemm_t *cntl)
 
FLA_Error FLA_Hemm_ru_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_hemm_t *cntl)
 
FLA_Error FLA_Her2k_ln_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_her2k_t *cntl)
 
FLA_Error FLA_Her2k_lh_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_her2k_t *cntl)
 
FLA_Error FLA_Her2k_un_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_her2k_t *cntl)
 
FLA_Error FLA_Her2k_uh_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_her2k_t *cntl)
 
FLA_Error FLA_Herk_ln_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_herk_t *cntl)
 
FLA_Error FLA_Herk_lh_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_herk_t *cntl)
 
FLA_Error FLA_Herk_un_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_herk_t *cntl)
 
FLA_Error FLA_Herk_uh_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_herk_t *cntl)
 
FLA_Error FLA_Symm_ll_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_symm_t *cntl)
 
FLA_Error FLA_Symm_lu_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_symm_t *cntl)
 
FLA_Error FLA_Symm_rl_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_symm_t *cntl)
 
FLA_Error FLA_Symm_ru_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_symm_t *cntl)
 
FLA_Error FLA_Syr2k_ln_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_syr2k_t *cntl)
 
FLA_Error FLA_Syr2k_lt_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_syr2k_t *cntl)
 
FLA_Error FLA_Syr2k_un_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_syr2k_t *cntl)
 
FLA_Error FLA_Syr2k_ut_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_syr2k_t *cntl)
 
FLA_Error FLA_Syrk_ln_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_syrk_t *cntl)
 
FLA_Error FLA_Syrk_lt_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_syrk_t *cntl)
 
FLA_Error FLA_Syrk_un_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_syrk_t *cntl)
 
FLA_Error FLA_Syrk_ut_task (FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_syrk_t *cntl)
 
FLA_Error FLA_Trmm_llc_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_llh_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_lln_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_llt_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_luc_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_luh_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_lun_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_lut_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_rlc_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_rlh_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_rln_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_rlt_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_ruc_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_ruh_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_run_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trmm_rut_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trsm_llc_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_llh_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_lln_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_llt_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_luc_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_luh_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_lun_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_lut_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_rlc_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_rlh_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_rln_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_rlt_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_ruc_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_ruh_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_run_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Trsm_rut_task (FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 
FLA_Error FLA_Gemm_external (FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Hemm_external (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Herk_external (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Her2k_external (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Symm_external (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Syrk_external (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Syr2k_external (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Trmm_external (FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
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)
 
FLA_Error FLA_Trmmsx_external (FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Trsmsx_external (FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Gemm_external_gpu (FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, void *A_gpu, FLA_Obj B, void *B_gpu, FLA_Obj beta, FLA_Obj C, void *C_gpu)
 
FLA_Error FLA_Hemm_external_gpu (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, void *A_gpu, FLA_Obj B, void *B_gpu, FLA_Obj beta, FLA_Obj C, void *C_gpu)
 
FLA_Error FLA_Herk_external_gpu (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, void *A_gpu, FLA_Obj beta, FLA_Obj C, void *C_gpu)
 
FLA_Error FLA_Her2k_external_gpu (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, void *A_gpu, FLA_Obj B, void *B_gpu, FLA_Obj beta, FLA_Obj C, void *C_gpu)
 
FLA_Error FLA_Symm_external_gpu (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, void *A_gpu, FLA_Obj B, void *B_gpu, FLA_Obj beta, FLA_Obj C, void *C_gpu)
 
FLA_Error FLA_Syrk_external_gpu (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, void *A_gpu, FLA_Obj beta, FLA_Obj C, void *C_gpu)
 
FLA_Error FLA_Syr2k_external_gpu (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, void *A_gpu, FLA_Obj B, void *B_gpu, FLA_Obj beta, FLA_Obj C, void *C_gpu)
 
FLA_Error FLA_Trmm_external_gpu (FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, void *A_gpu, FLA_Obj B, void *B_gpu)
 
FLA_Error FLA_Trsm_external_gpu (FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, void *A_gpu, FLA_Obj B, void *B_gpu)
 
FLA_Error FLA_Gemm_check (FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Hemm_check (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Her2k_check (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Herk_check (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Symm_check (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Syr2k_check (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Syrk_check (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Trmm_check (FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Trmmsx_check (FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Trsm_check (FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
 
FLA_Error FLA_Trsmsx_check (FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
 
FLA_Error FLA_Gemm_internal_check (FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
 
FLA_Error FLA_Hemm_internal_check (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_hemm_t *cntl)
 
FLA_Error FLA_Herk_internal_check (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_herk_t *cntl)
 
FLA_Error FLA_Her2k_internal_check (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_her2k_t *cntl)
 
FLA_Error FLA_Symm_internal_check (FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_symm_t *cntl)
 
FLA_Error FLA_Syrk_internal_check (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_syrk_t *cntl)
 
FLA_Error FLA_Syr2k_internal_check (FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_syr2k_t *cntl)
 
FLA_Error FLA_Trmm_internal_check (FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
 
FLA_Error FLA_Trsm_internal_check (FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
 

Function Documentation

◆ FLA_Gemm()

FLA_Error FLA_Gemm ( FLA_Trans transa,
FLA_Trans transb,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
16{
17 FLA_Error r_val = FLA_SUCCESS;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Gemm_check( transa, transb, alpha, A, B, beta, C );
22
23#ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
24 r_val = FLA_Gemm_internal( transa, transb, alpha, A, B, beta, C, fla_gemm_cntl_mm_op );
25#else
26 r_val = FLA_Gemm_external( transa, transb, alpha, A, B, beta, C );
27#endif
28
29 return r_val;
30}
fla_gemm_t * fla_gemm_cntl_mm_op
Definition FLA_Gemm_cntl_init.c:40
FLA_Error FLA_Gemm_internal(FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_gemm_t *cntl)
Definition FLA_Gemm_internal.c:16
FLA_Error FLA_Gemm_check(FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Gemm_check.c:13
FLA_Error FLA_Gemm_external(FLA_Trans transa, FLA_Trans transb, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Gemm_external.c:13
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18
int FLA_Error
Definition FLA_type_defs.h:47

References FLA_Check_error_level(), FLA_Gemm_check(), fla_gemm_cntl_mm_op, FLA_Gemm_external(), and FLA_Gemm_internal().

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

◆ FLA_Gemm_cc_task()

FLA_Error FLA_Gemm_cc_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
19{
20 return FLA_Gemm_external( FLA_CONJ_NO_TRANSPOSE, FLA_CONJ_NO_TRANSPOSE, alpha, A, B, beta, C );
21}

References FLA_Gemm_external().

Referenced by FLA_Gemm_cc().

◆ FLA_Gemm_ch_task()

FLA_Error FLA_Gemm_ch_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
24{
25 return FLA_Gemm_external( FLA_CONJ_NO_TRANSPOSE, FLA_CONJ_TRANSPOSE, alpha, A, B, beta, C );
26}

References FLA_Gemm_external().

Referenced by FLA_Gemm_ch().

◆ FLA_Gemm_check()

FLA_Error FLA_Gemm_check ( FLA_Trans transa,
FLA_Trans transb,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
14{
15 FLA_Error e_val;
16
17 e_val = FLA_Check_valid_trans( transa );
18 FLA_Check_error_code( e_val );
19
20 e_val = FLA_Check_valid_trans( transb );
21 FLA_Check_error_code( e_val );
22
23 e_val = FLA_Check_floating_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_consistent_object_datatype( A, alpha );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_consistent_object_datatype( A, beta );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( alpha );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_if_scalar( beta );
45 FLA_Check_error_code( e_val );
46
47 e_val = FLA_Check_matrix_matrix_dims( transa, transb, A, B, C );
48 FLA_Check_error_code( e_val );
49
50 return FLA_SUCCESS;
51}
FLA_Error FLA_Check_if_scalar(FLA_Obj A)
Definition FLA_Check.c:373
FLA_Error FLA_Check_consistent_object_datatype(FLA_Obj A, FLA_Obj B)
Definition FLA_Check.c:339
FLA_Error FLA_Check_valid_trans(FLA_Trans trans)
Definition FLA_Check.c:87
FLA_Error FLA_Check_nonconstant_object(FLA_Obj A)
Definition FLA_Check.c:954
FLA_Error FLA_Check_identical_object_datatype(FLA_Obj A, FLA_Obj B)
Definition FLA_Check.c:967
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_floating_object(FLA_Obj A)
Definition FLA_Check.c:232

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), and FLA_Check_valid_trans().

Referenced by FLA_Gemm(), FLA_Gemm_external(), FLA_Gemm_external_gpu(), and FLASH_Gemm().

◆ FLA_Gemm_cn_task()

FLA_Error FLA_Gemm_cn_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
29{
30 return FLA_Gemm_external( FLA_CONJ_NO_TRANSPOSE, FLA_NO_TRANSPOSE, alpha, A, B, beta, C );
31}

References FLA_Gemm_external().

Referenced by FLA_Gemm_cn().

◆ FLA_Gemm_ct_task()

FLA_Error FLA_Gemm_ct_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
34{
35 return FLA_Gemm_external( FLA_CONJ_NO_TRANSPOSE, FLA_TRANSPOSE, alpha, A, B, beta, C );
36}

References FLA_Gemm_external().

Referenced by FLA_Gemm_ct().

◆ FLA_Gemm_external()

FLA_Error FLA_Gemm_external ( FLA_Trans transa,
FLA_Trans transb,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
14{
15 FLA_Datatype datatype;
16 int k_AB;
17 int m_A, n_A;
18 int m_C, n_C;
19 int rs_A, cs_A;
20 int rs_B, cs_B;
21 int rs_C, cs_C;
22 trans1_t blis_transa;
23 trans1_t blis_transb;
24
25 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
26 FLA_Gemm_check( transa, transb, alpha, A, B, beta, C );
27
28 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
29
31 {
32 FLA_Scal_external( beta, C );
33 return FLA_SUCCESS;
34 }
35
36 datatype = FLA_Obj_datatype( A );
37
38 m_A = FLA_Obj_length( A );
39 n_A = FLA_Obj_width( A );
40 rs_A = FLA_Obj_row_stride( A );
41 cs_A = FLA_Obj_col_stride( A );
42
43 rs_B = FLA_Obj_row_stride( B );
44 cs_B = FLA_Obj_col_stride( B );
45
46 m_C = FLA_Obj_length( C );
47 n_C = FLA_Obj_width( C );
48 rs_C = FLA_Obj_row_stride( C );
49 cs_C = FLA_Obj_col_stride( C );
50
51 if ( transa == FLA_NO_TRANSPOSE || transa == FLA_CONJ_NO_TRANSPOSE )
52 k_AB = n_A;
53 else
54 k_AB = m_A;
55
56 FLA_Param_map_flame_to_blis_trans( transa, &blis_transa );
57 FLA_Param_map_flame_to_blis_trans( transb, &blis_transb );
58
59
60 switch( datatype ){
61
62 case FLA_FLOAT:
63 {
64 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
65 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
66 float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
67 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
68 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
69
70 bl1_sgemm( blis_transa,
71 blis_transb,
72 m_C,
73 k_AB,
74 n_C,
75 buff_alpha,
76 buff_A, rs_A, cs_A,
77 buff_B, rs_B, cs_B,
78 buff_beta,
79 buff_C, rs_C, cs_C );
80
81 break;
82 }
83
84 case FLA_DOUBLE:
85 {
86 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
87 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
88 double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
89 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
90 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
91
92 bl1_dgemm( blis_transa,
93 blis_transb,
94 m_C,
95 k_AB,
96 n_C,
97 buff_alpha,
98 buff_A, rs_A, cs_A,
99 buff_B, rs_B, cs_B,
100 buff_beta,
101 buff_C, rs_C, cs_C );
102
103 break;
104 }
105
106 case FLA_COMPLEX:
107 {
108 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
109 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
110 scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
111 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
112 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
113
114 bl1_cgemm( blis_transa,
115 blis_transb,
116 m_C,
117 k_AB,
118 n_C,
119 buff_alpha,
120 buff_A, rs_A, cs_A,
121 buff_B, rs_B, cs_B,
122 buff_beta,
123 buff_C, rs_C, cs_C );
124
125 break;
126 }
127
128 case FLA_DOUBLE_COMPLEX:
129 {
130 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
131 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
132 dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C );
133 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
134 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
135
136 bl1_zgemm( blis_transa,
137 blis_transb,
138 m_C,
139 k_AB,
140 n_C,
141 buff_alpha,
142 buff_A, rs_A, cs_A,
143 buff_B, rs_B, cs_B,
144 buff_beta,
145 buff_C, rs_C, cs_C );
146
147 break;
148 }
149
150 }
151
152 return FLA_SUCCESS;
153}
FLA_Error FLA_Scal_external(FLA_Obj alpha, FLA_Obj A)
Definition FLA_Scal_external.c:13
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition FLA_Query.c:400
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition FLA_Query.c:167
dim_t FLA_Obj_length(FLA_Obj obj)
Definition FLA_Query.c:116
void FLA_Param_map_flame_to_blis_trans(FLA_Trans trans, trans1_t *blis_trans)
Definition FLA_Param.c:245
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition FLA_Query.c:174
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
int FLA_Datatype
Definition FLA_type_defs.h:49
void bl1_dgemm(trans1_t transa, trans1_t transb, int m, int k, int n, double *alpha, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs, double *beta, double *c, int c_rs, int c_cs)
Definition bl1_gemm.c:274
void bl1_sgemm(trans1_t transa, trans1_t transb, int m, int k, int n, float *alpha, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs, float *beta, float *c, int c_rs, int c_cs)
Definition bl1_gemm.c:13
void bl1_zgemm(trans1_t transa, trans1_t transb, int m, int k, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs, dcomplex *beta, dcomplex *c, int c_rs, int c_cs)
Definition bl1_gemm.c:873
void bl1_cgemm(trans1_t transa, trans1_t transb, int m, int k, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs, scomplex *beta, scomplex *c, int c_rs, int c_cs)
Definition bl1_gemm.c:535
trans1_t
Definition blis_type_defs.h:53
Definition blis_type_defs.h:138
Definition blis_type_defs.h:133

References bl1_cgemm(), bl1_dgemm(), bl1_sgemm(), bl1_zgemm(), FLA_Check_error_level(), FLA_Gemm_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_trans(), and FLA_Scal_external().

Referenced by FLA_Bidiag_UT_u_blf_var4(), FLA_Bidiag_UT_u_blk_var4(), FLA_Bidiag_UT_u_blk_var5(), FLA_Gemm(), FLA_Gemm_cc_task(), FLA_Gemm_ch_task(), FLA_Gemm_cn_task(), FLA_Gemm_ct_task(), FLA_Gemm_hc_task(), FLA_Gemm_hh_task(), FLA_Gemm_hn_task(), FLA_Gemm_ht_task(), FLA_Gemm_nc_task(), FLA_Gemm_nh_task(), FLA_Gemm_nn_task(), FLA_Gemm_nt_task(), FLA_Gemm_task(), FLA_Gemm_tc_task(), FLA_Gemm_th_task(), FLA_Gemm_tn_task(), FLA_Gemm_tt_task(), FLA_Hess_UT_blf_var2(), FLA_Hess_UT_blf_var3(), FLA_Hess_UT_blf_var4(), FLA_Hess_UT_blk_var1(), FLA_Hess_UT_blk_var2(), FLA_Hess_UT_blk_var3(), FLA_Hess_UT_blk_var4(), FLA_Hess_UT_blk_var5(), FLA_LQ_UT_blk_var2(), FLA_QR_UT_blk_var2(), FLA_QR_UT_piv_blk_var2(), FLA_SA_FS_blk(), and FLA_SA_LU_blk().

◆ FLA_Gemm_external_gpu()

FLA_Error FLA_Gemm_external_gpu ( FLA_Trans transa,
FLA_Trans transb,
FLA_Obj alpha,
FLA_Obj A,
void * A_gpu,
FLA_Obj B,
void * B_gpu,
FLA_Obj beta,
FLA_Obj C,
void * C_gpu )
18{
19 FLA_Datatype datatype;
20 int k_AB;
21 int m_A, n_A;
22 int m_C, n_C;
23 int ldim_A;
24 int ldim_B;
25 int ldim_C;
26 char blas_transa;
27 char blas_transb;
28
29 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
30 FLA_Gemm_check( transa, transb, alpha, A, B, beta, C );
31
32 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
33
35 {
36 FLA_Scal_external_gpu( beta, C, C_gpu );
37 return FLA_SUCCESS;
38 }
39
40 datatype = FLA_Obj_datatype( A );
41
42 m_A = FLA_Obj_length( A );
43 n_A = FLA_Obj_width( A );
44 ldim_A = FLA_Obj_length( A );
45
46 ldim_B = FLA_Obj_length( B );
47
48 m_C = FLA_Obj_length( C );
49 n_C = FLA_Obj_width( C );
50 ldim_C = FLA_Obj_length( C );
51
52 if ( transa == FLA_NO_TRANSPOSE || transa == FLA_CONJ_NO_TRANSPOSE )
53 k_AB = n_A;
54 else
55 k_AB = m_A;
56
57 FLA_Param_map_flame_to_netlib_trans( transa, &blas_transa );
58 FLA_Param_map_flame_to_netlib_trans( transb, &blas_transb );
59
60
61 switch( datatype ){
62
63 case FLA_FLOAT:
64 {
65 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
66 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
67
68 cublasSgemm( blas_transa,
69 blas_transb,
70 m_C,
71 n_C,
72 k_AB,
73 *buff_alpha,
74 ( float * ) A_gpu, ldim_A,
75 ( float * ) B_gpu, ldim_B,
76 *buff_beta,
77 ( float * ) C_gpu, ldim_C );
78
79 break;
80 }
81
82 case FLA_DOUBLE:
83 {
84 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
85 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
86
87 cublasDgemm( blas_transa,
88 blas_transb,
89 m_C,
90 n_C,
91 k_AB,
92 *buff_alpha,
93 ( double * ) A_gpu, ldim_A,
94 ( double * ) B_gpu, ldim_B,
95 *buff_beta,
96 ( double * ) C_gpu, ldim_C );
97
98 break;
99 }
100
101 case FLA_COMPLEX:
102 {
103 cuComplex *buff_alpha = ( cuComplex * ) FLA_COMPLEX_PTR( alpha );
104 cuComplex *buff_beta = ( cuComplex * ) FLA_COMPLEX_PTR( beta );
105
106 cublasCgemm( blas_transa,
107 blas_transb,
108 m_C,
109 n_C,
110 k_AB,
111 *buff_alpha,
112 ( cuComplex * ) A_gpu, ldim_A,
113 ( cuComplex * ) B_gpu, ldim_B,
114 *buff_beta,
115 ( cuComplex * ) C_gpu, ldim_C );
116
117 break;
118 }
119
120 case FLA_DOUBLE_COMPLEX:
121 {
122 cuDoubleComplex *buff_alpha = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
123 cuDoubleComplex *buff_beta = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
124
125 cublasZgemm( blas_transa,
126 blas_transb,
127 m_C,
128 n_C,
129 k_AB,
130 *buff_alpha,
131 ( cuDoubleComplex * ) A_gpu, ldim_A,
132 ( cuDoubleComplex * ) B_gpu, ldim_B,
133 *buff_beta,
134 ( cuDoubleComplex * ) C_gpu, ldim_C );
135
136 break;
137 }
138
139 }
140
141 return FLA_SUCCESS;
142}
FLA_Error FLA_Scal_external_gpu(FLA_Obj alpha, FLA_Obj A, void *A_gpu)
Definition FLA_Scal_external_gpu.c:17
void FLA_Param_map_flame_to_netlib_trans(FLA_Trans trans, void *blas_trans)
Definition FLA_Param.c:15

References FLA_Check_error_level(), FLA_Gemm_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_trans(), and FLA_Scal_external_gpu().

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Gemm_hc_task()

FLA_Error FLA_Gemm_hc_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
39{
40 return FLA_Gemm_external( FLA_CONJ_TRANSPOSE, FLA_CONJ_NO_TRANSPOSE, alpha, A, B, beta, C );
41}

References FLA_Gemm_external().

Referenced by FLA_Gemm_hc().

◆ FLA_Gemm_hh_task()

FLA_Error FLA_Gemm_hh_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
44{
45 return FLA_Gemm_external( FLA_CONJ_TRANSPOSE, FLA_CONJ_TRANSPOSE, alpha, A, B, beta, C );
46}

References FLA_Gemm_external().

Referenced by FLA_Gemm_hh().

◆ FLA_Gemm_hn_task()

FLA_Error FLA_Gemm_hn_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
49{
50 return FLA_Gemm_external( FLA_CONJ_TRANSPOSE, FLA_NO_TRANSPOSE, alpha, A, B, beta, C );
51}

References FLA_Gemm_external().

Referenced by FLA_Gemm_hn().

◆ FLA_Gemm_ht_task()

FLA_Error FLA_Gemm_ht_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
54{
55 return FLA_Gemm_external( FLA_CONJ_TRANSPOSE, FLA_TRANSPOSE, alpha, A, B, beta, C );
56}

References FLA_Gemm_external().

Referenced by FLA_Gemm_ht().

◆ FLA_Gemm_internal_check()

FLA_Error FLA_Gemm_internal_check ( FLA_Trans transa,
FLA_Trans transb,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
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( transa, transb, A, B, C );
32 FLA_Check_error_code( e_val );
33
34 return FLA_SUCCESS;
35}
FLA_Error FLA_Check_null_pointer(void *ptr)
Definition FLA_Check.c:518
FLA_Error FLA_Check_identical_object_elemtype(FLA_Obj A, FLA_Obj B)
Definition FLA_Check.c:987

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

Referenced by FLA_Gemm_internal().

◆ FLA_Gemm_nc_task()

FLA_Error FLA_Gemm_nc_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
59{
60 return FLA_Gemm_external( FLA_NO_TRANSPOSE, FLA_CONJ_NO_TRANSPOSE, alpha, A, B, beta, C );
61}

References FLA_Gemm_external().

Referenced by FLA_Gemm_nc().

◆ FLA_Gemm_nh_task()

FLA_Error FLA_Gemm_nh_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
64{
65 return FLA_Gemm_external( FLA_NO_TRANSPOSE, FLA_CONJ_TRANSPOSE, alpha, A, B, beta, C );
66}

References FLA_Gemm_external().

Referenced by FLA_Gemm_nh().

◆ FLA_Gemm_nn_task()

FLA_Error FLA_Gemm_nn_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
69{
70 return FLA_Gemm_external( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, alpha, A, B, beta, C );
71}

References FLA_Gemm_external().

Referenced by FLA_Gemm_nn().

◆ FLA_Gemm_nt_task()

FLA_Error FLA_Gemm_nt_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
74{
75 return FLA_Gemm_external( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, alpha, A, B, beta, C );
76}

References FLA_Gemm_external().

Referenced by FLA_Gemm_nt().

◆ FLA_Gemm_task()

FLA_Error FLA_Gemm_task ( FLA_Trans transa,
FLA_Trans transb,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
14{
15 return FLA_Gemm_external( transa, transb, alpha, A, B, beta, C );
16}

References FLA_Gemm_external().

Referenced by FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Gemm_tc_task()

FLA_Error FLA_Gemm_tc_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
79{
80 return FLA_Gemm_external( FLA_TRANSPOSE, FLA_CONJ_NO_TRANSPOSE, alpha, A, B, beta, C );
81}

References FLA_Gemm_external().

Referenced by FLA_Gemm_tc().

◆ FLA_Gemm_th_task()

FLA_Error FLA_Gemm_th_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
84{
85 return FLA_Gemm_external( FLA_TRANSPOSE, FLA_CONJ_TRANSPOSE, alpha, A, B, beta, C );
86}

References FLA_Gemm_external().

Referenced by FLA_Gemm_th().

◆ FLA_Gemm_tn_task()

FLA_Error FLA_Gemm_tn_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
89{
90 return FLA_Gemm_external( FLA_TRANSPOSE, FLA_NO_TRANSPOSE, alpha, A, B, beta, C );
91}

References FLA_Gemm_external().

Referenced by FLA_Gemm_tn().

◆ FLA_Gemm_tt_task()

FLA_Error FLA_Gemm_tt_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_gemm_t * cntl )
94{
95 return FLA_Gemm_external( FLA_TRANSPOSE, FLA_TRANSPOSE, alpha, A, B, beta, C );
96}

References FLA_Gemm_external().

Referenced by FLA_Gemm_tt().

◆ FLA_Gemp()

FLA_Error FLA_Gemp ( FLA_Trans transa,
FLA_Trans transb,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )

◆ FLA_Gepm()

FLA_Error FLA_Gepm ( FLA_Trans transa,
FLA_Trans transb,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )

◆ FLA_Gepp()

FLA_Error FLA_Gepp ( FLA_Trans transa,
FLA_Trans transb,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )

◆ FLA_Hemm()

FLA_Error FLA_Hemm ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
16{
17 FLA_Error r_val = FLA_SUCCESS;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Hemm_check( side, uplo, alpha, A, B, beta, C );
22
23#ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
24 r_val = FLA_Hemm_internal( side, uplo, alpha, A, B, beta, C, fla_hemm_cntl_mm );
25#else
26 r_val = FLA_Hemm_external( side, uplo, alpha, A, B, beta, C );
27#endif
28
29 return r_val;
30}
fla_hemm_t * fla_hemm_cntl_mm
Definition FLA_Hemm_cntl_init.c:19
FLA_Error FLA_Hemm_internal(FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_hemm_t *cntl)
Definition FLA_Hemm_internal.c:16
FLA_Error FLA_Hemm_check(FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Hemm_check.c:13
FLA_Error FLA_Hemm_external(FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Hemm_external.c:13

References FLA_Check_error_level(), FLA_Hemm_check(), fla_hemm_cntl_mm, FLA_Hemm_external(), and FLA_Hemm_internal().

◆ FLA_Hemm_check()

FLA_Error FLA_Hemm_check ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
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
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_consistent_object_datatype( A, alpha );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_consistent_object_datatype( A, beta );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_if_scalar( alpha );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( beta );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_square( A );
45 FLA_Check_error_code( e_val );
46
47 if ( side == FLA_LEFT )
48 {
49 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, C );
50 FLA_Check_error_code( e_val );
51 }
52 else
53 {
54 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, C );
55 FLA_Check_error_code( e_val );
56 }
57
58 return FLA_SUCCESS;
59}
FLA_Error FLA_Check_square(FLA_Obj A)
Definition FLA_Check.c:363
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

References FLA_Check_consistent_object_datatype(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_leftright_side(), and FLA_Check_valid_uplo().

Referenced by FLA_Hemm(), FLA_Hemm_external(), FLA_Hemm_external_gpu(), and FLASH_Hemm().

◆ FLA_Hemm_external()

FLA_Error FLA_Hemm_external ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
14{
15 FLA_Datatype datatype;
16 int m_C, n_C;
17 int rs_A, cs_A;
18 int rs_B, cs_B;
19 int rs_C, cs_C;
20 side1_t blis_side;
21 uplo1_t blis_uplo;
22
23 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
24 FLA_Hemm_check( side, uplo, alpha, A, B, beta, C );
25
26 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
27
28 datatype = FLA_Obj_datatype( A );
29
30 rs_A = FLA_Obj_row_stride( A );
31 cs_A = FLA_Obj_col_stride( A );
32
33 rs_B = FLA_Obj_row_stride( B );
34 cs_B = FLA_Obj_col_stride( B );
35
36 m_C = FLA_Obj_length( C );
37 n_C = FLA_Obj_width( C );
38 rs_C = FLA_Obj_row_stride( C );
39 cs_C = FLA_Obj_col_stride( C );
40
41 FLA_Param_map_flame_to_blis_side( side, &blis_side );
42 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
43
44
45 switch( datatype ){
46
47 case FLA_FLOAT:
48 {
49 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
50 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
51 float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
52 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
53 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
54
55 bl1_ssymm( blis_side,
56 blis_uplo,
57 m_C,
58 n_C,
59 buff_alpha,
60 buff_A, rs_A, cs_A,
61 buff_B, rs_B, cs_B,
62 buff_beta,
63 buff_C, rs_C, cs_C );
64
65 break;
66 }
67
68 case FLA_DOUBLE:
69 {
70 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
71 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
72 double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
73 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
74 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
75
76 bl1_dsymm( blis_side,
77 blis_uplo,
78 m_C,
79 n_C,
80 buff_alpha,
81 buff_A, rs_A, cs_A,
82 buff_B, rs_B, cs_B,
83 buff_beta,
84 buff_C, rs_C, cs_C );
85
86 break;
87 }
88
89 case FLA_COMPLEX:
90 {
91 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
92 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
93 scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
94 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
95 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
96
97 bl1_chemm( blis_side,
98 blis_uplo,
99 m_C,
100 n_C,
101 buff_alpha,
102 buff_A, rs_A, cs_A,
103 buff_B, rs_B, cs_B,
104 buff_beta,
105 buff_C, rs_C, cs_C );
106
107 break;
108 }
109
110 case FLA_DOUBLE_COMPLEX:
111 {
112 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
113 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
114 dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C );
115 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
116 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
117
118 bl1_zhemm( blis_side,
119 blis_uplo,
120 m_C,
121 n_C,
122 buff_alpha,
123 buff_A, rs_A, cs_A,
124 buff_B, rs_B, cs_B,
125 buff_beta,
126 buff_C, rs_C, cs_C );
127
128 break;
129 }
130
131 }
132
133 return FLA_SUCCESS;
134}
void FLA_Param_map_flame_to_blis_side(FLA_Uplo side, side1_t *blis_side)
Definition FLA_Param.c:301
void FLA_Param_map_flame_to_blis_uplo(FLA_Uplo uplo, uplo1_t *blis_uplo)
Definition FLA_Param.c:285
void bl1_chemm(side1_t side, uplo1_t uplo, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs, scomplex *beta, scomplex *c, int c_rs, int c_cs)
Definition bl1_hemm.c:38
void bl1_zhemm(side1_t side, uplo1_t uplo, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs, dcomplex *beta, dcomplex *c, int c_rs, int c_cs)
Definition bl1_hemm.c:348
void bl1_ssymm(side1_t side, uplo1_t uplo, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs, float *beta, float *c, int c_rs, int c_cs)
Definition bl1_symm.c:13
void bl1_dsymm(side1_t side, uplo1_t uplo, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs, double *beta, double *c, int c_rs, int c_cs)
Definition bl1_symm.c:274
uplo1_t
Definition blis_type_defs.h:61
side1_t
Definition blis_type_defs.h:67

References bl1_chemm(), bl1_dsymm(), bl1_ssymm(), bl1_zhemm(), FLA_Check_error_level(), FLA_Hemm_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_side(), and FLA_Param_map_flame_to_blis_uplo().

Referenced by FLA_Hemm(), FLA_Hemm_ll_task(), FLA_Hemm_lu_task(), FLA_Hemm_rl_task(), FLA_Hemm_ru_task(), and FLA_Hemm_task().

◆ FLA_Hemm_external_gpu()

FLA_Error FLA_Hemm_external_gpu ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
void * A_gpu,
FLA_Obj B,
void * B_gpu,
FLA_Obj beta,
FLA_Obj C,
void * C_gpu )
18{
19 FLA_Datatype datatype;
20 int m_C, n_C;
21 int ldim_A;
22 int ldim_B;
23 int ldim_C;
24 char blas_side;
25 char blas_uplo;
26
27 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
28 FLA_Hemm_check( side, uplo, alpha, A, B, beta, C );
29
30 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
31
32 datatype = FLA_Obj_datatype( A );
33
34 ldim_A = FLA_Obj_length( A );
35
36 ldim_B = FLA_Obj_length( B );
37
38 m_C = FLA_Obj_length( C );
39 n_C = FLA_Obj_width( C );
40 ldim_C = FLA_Obj_length( C );
41
42 FLA_Param_map_flame_to_netlib_side( side, &blas_side );
43 FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
44
45
46 switch( datatype ){
47
48 case FLA_FLOAT:
49 {
50 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
51 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
52
53 cublasSsymm( blas_side,
54 blas_uplo,
55 m_C,
56 n_C,
57 *buff_alpha,
58 ( float * ) A_gpu, ldim_A,
59 ( float * ) B_gpu, ldim_B,
60 *buff_beta,
61 ( float * ) C_gpu, ldim_C );
62
63 break;
64 }
65
66 case FLA_DOUBLE:
67 {
68 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
69 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
70
71 cublasDsymm( blas_side,
72 blas_uplo,
73 m_C,
74 n_C,
75 *buff_alpha,
76 ( double * ) A_gpu, ldim_A,
77 ( double * ) B_gpu, ldim_B,
78 *buff_beta,
79 ( double * ) C_gpu, ldim_C );
80
81 break;
82 }
83
84 case FLA_COMPLEX:
85 {
86 cuComplex *buff_alpha = ( cuComplex * ) FLA_COMPLEX_PTR( alpha );
87 cuComplex *buff_beta = ( cuComplex * ) FLA_COMPLEX_PTR( beta );
88
89 cublasChemm( blas_side,
90 blas_uplo,
91 m_C,
92 n_C,
93 *buff_alpha,
94 ( cuComplex * ) A_gpu, ldim_A,
95 ( cuComplex * ) B_gpu, ldim_B,
96 *buff_beta,
97 ( cuComplex * ) C_gpu, ldim_C );
98
99 break;
100 }
101
102 case FLA_DOUBLE_COMPLEX:
103 {
104 cuDoubleComplex *buff_alpha = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
105 cuDoubleComplex *buff_beta = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
106
107 cublasZhemm( blas_side,
108 blas_uplo,
109 m_C,
110 n_C,
111 *buff_alpha,
112 ( cuDoubleComplex * ) A_gpu, ldim_A,
113 ( cuDoubleComplex * ) B_gpu, ldim_B,
114 *buff_beta,
115 ( cuDoubleComplex * ) C_gpu, ldim_C );
116
117 break;
118 }
119
120 }
121
122 return FLA_SUCCESS;
123}
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_uplo(FLA_Uplo uplo, void *blas_uplo)
Definition FLA_Param.c:47

References FLA_Check_error_level(), FLA_Hemm_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_side(), and FLA_Param_map_flame_to_netlib_uplo().

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Hemm_internal_check()

FLA_Error FLA_Hemm_internal_check ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_hemm_t * cntl )
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 if ( side == FLA_LEFT )
32 {
33 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, C );
34 FLA_Check_error_code( e_val );
35 }
36 else
37 {
38 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, C );
39 FLA_Check_error_code( e_val );
40 }
41
42 return FLA_SUCCESS;
43}

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

Referenced by FLA_Hemm_internal().

◆ FLA_Hemm_ll_task()

FLA_Error FLA_Hemm_ll_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_hemm_t * cntl )
19{
20 return FLA_Hemm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR, alpha, A, B, beta, C );
21}

References FLA_Hemm_external().

Referenced by FLA_Hemm_ll().

◆ FLA_Hemm_lu_task()

FLA_Error FLA_Hemm_lu_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_hemm_t * cntl )
24{
25 return FLA_Hemm_external( FLA_LEFT, FLA_UPPER_TRIANGULAR, alpha, A, B, beta, C );
26}

References FLA_Hemm_external().

Referenced by FLA_Hemm_lu().

◆ FLA_Hemm_rl_task()

FLA_Error FLA_Hemm_rl_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_hemm_t * cntl )
29{
30 return FLA_Hemm_external( FLA_RIGHT, FLA_LOWER_TRIANGULAR, alpha, A, B, beta, C );
31}

References FLA_Hemm_external().

Referenced by FLA_Hemm_rl().

◆ FLA_Hemm_ru_task()

FLA_Error FLA_Hemm_ru_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_hemm_t * cntl )
34{
35 return FLA_Hemm_external( FLA_RIGHT, FLA_UPPER_TRIANGULAR, alpha, A, B, beta, C );
36}

References FLA_Hemm_external().

Referenced by FLA_Hemm_ru().

◆ FLA_Hemm_task()

FLA_Error FLA_Hemm_task ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_hemm_t * cntl )
14{
15 return FLA_Hemm_external( side, uplo, alpha, A, B, beta, C );
16}

References FLA_Hemm_external().

Referenced by FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Her2k()

FLA_Error FLA_Her2k ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
16{
17 FLA_Error r_val = FLA_SUCCESS;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Her2k_check( uplo, trans, alpha, A, B, beta, C );
22
23#ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
24 r_val = FLA_Her2k_internal( uplo, trans, alpha, A, B, beta, C, fla_her2k_cntl_mm );
25#else
26 r_val = FLA_Her2k_external( uplo, trans, alpha, A, B, beta, C );
27#endif
28
29 return r_val;
30}
fla_her2k_t * fla_her2k_cntl_mm
Definition FLA_Her2k_cntl_init.c:19
FLA_Error FLA_Her2k_internal(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_her2k_t *cntl)
Definition FLA_Her2k_internal.c:16
FLA_Error FLA_Her2k_check(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Her2k_check.c:13
FLA_Error FLA_Her2k_external(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Her2k_external.c:13

References FLA_Check_error_level(), FLA_Her2k_check(), fla_her2k_cntl_mm, FLA_Her2k_external(), and FLA_Her2k_internal().

◆ FLA_Her2k_check()

FLA_Error FLA_Her2k_check ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
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_complex_trans( trans );
21 FLA_Check_error_code( e_val );
22
24 FLA_Check_error_code( e_val );
25
26 e_val = FLA_Check_real_object( beta );
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_consistent_object_datatype( A, alpha );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_identical_object_precision( A, beta );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( alpha );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_if_scalar( beta );
45 FLA_Check_error_code( e_val );
46
47 e_val = FLA_Check_square( C );
48 FLA_Check_error_code( e_val );
49
50 if ( trans == FLA_NO_TRANSPOSE )
51 {
52 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, A, B, C );
53 FLA_Check_error_code( e_val );
54 }
55 else
56 {
57 e_val = FLA_Check_matrix_matrix_dims( FLA_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, C );
58 FLA_Check_error_code( e_val );
59 }
60
61 return FLA_SUCCESS;
62}
FLA_Error FLA_Check_real_object(FLA_Obj A)
Definition FLA_Check.c:258
FLA_Error FLA_Check_identical_object_precision(FLA_Obj A, FLA_Obj B)
Definition FLA_Check.c:298
FLA_Error FLA_Check_valid_complex_trans(FLA_Trans trans)
Definition FLA_Check.c:906

References FLA_Check_consistent_object_datatype(), FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_square(), FLA_Check_valid_complex_trans(), and FLA_Check_valid_uplo().

Referenced by FLA_Her2k(), FLA_Her2k_external(), FLA_Her2k_external_gpu(), and FLASH_Her2k().

◆ FLA_Her2k_external()

FLA_Error FLA_Her2k_external ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
14{
15 FLA_Datatype datatype;
16 int k_AB;
17 int m_A, n_A;
18 int m_C;
19 int rs_A, cs_A;
20 int rs_B, cs_B;
21 int rs_C, cs_C;
22 uplo1_t blis_uplo;
23 trans1_t blis_trans;
24
25 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
26 FLA_Her2k_check( uplo, trans, alpha, A, B, beta, C );
27
28 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
29
31 {
32 FLA_Scal_external( beta, C );
33 return FLA_SUCCESS;
34 }
35
36 datatype = FLA_Obj_datatype( A );
37
38 m_A = FLA_Obj_length( A );
39 n_A = FLA_Obj_width( A );
40 rs_A = FLA_Obj_row_stride( A );
41 cs_A = FLA_Obj_col_stride( A );
42
43 rs_B = FLA_Obj_row_stride( B );
44 cs_B = FLA_Obj_col_stride( B );
45
46 m_C = FLA_Obj_length( C );
47 rs_C = FLA_Obj_row_stride( C );
48 cs_C = FLA_Obj_col_stride( C );
49
50 if ( trans == FLA_NO_TRANSPOSE )
51 k_AB = n_A;
52 else
53 k_AB = m_A;
54
55 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
56 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
57
58
59 switch( datatype ){
60
61 case FLA_FLOAT:
62 {
63 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
64 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
65 float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
66 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
67 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
68
69 bl1_ssyr2k( blis_uplo,
70 blis_trans,
71 m_C,
72 k_AB,
73 buff_alpha,
74 buff_A, rs_A, cs_A,
75 buff_B, rs_B, cs_B,
76 buff_beta,
77 buff_C, rs_C, cs_C );
78
79 break;
80 }
81
82 case FLA_DOUBLE:
83 {
84 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
85 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
86 double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
87 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
88 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
89
90 bl1_dsyr2k( blis_uplo,
91 blis_trans,
92 m_C,
93 k_AB,
94 buff_alpha,
95 buff_A, rs_A, cs_A,
96 buff_B, rs_B, cs_B,
97 buff_beta,
98 buff_C, rs_C, cs_C );
99
100 break;
101 }
102
103 case FLA_COMPLEX:
104 {
105 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
106 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
107 scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
108 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
109 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
110
111 bl1_cher2k( blis_uplo,
112 blis_trans,
113 m_C,
114 k_AB,
115 buff_alpha,
116 buff_A, rs_A, cs_A,
117 buff_B, rs_B, cs_B,
118 buff_beta,
119 buff_C, rs_C, cs_C );
120
121 break;
122 }
123
124 case FLA_DOUBLE_COMPLEX:
125 {
126 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
127 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
128 dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C );
129 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
130 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
131
132 bl1_zher2k( blis_uplo,
133 blis_trans,
134 m_C,
135 k_AB,
136 buff_alpha,
137 buff_A, rs_A, cs_A,
138 buff_B, rs_B, cs_B,
139 buff_beta,
140 buff_C, rs_C, cs_C );
141
142 break;
143 }
144
145 }
146
147 return FLA_SUCCESS;
148}
void bl1_zher2k(uplo1_t uplo, trans1_t trans, int m, int k, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs, double *beta, dcomplex *c, int c_rs, int c_cs)
Definition bl1_her2k.c:334
void bl1_cher2k(uplo1_t uplo, trans1_t trans, int m, int k, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs, float *beta, scomplex *c, int c_rs, int c_cs)
Definition bl1_her2k.c:39
void bl1_ssyr2k(uplo1_t uplo, trans1_t trans, int m, int k, float *alpha, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs, float *beta, float *c, int c_rs, int c_cs)
Definition bl1_syr2k.c:13
void bl1_dsyr2k(uplo1_t uplo, trans1_t trans, int m, int k, double *alpha, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs, double *beta, double *c, int c_rs, int c_cs)
Definition bl1_syr2k.c:239

References bl1_cher2k(), bl1_dsyr2k(), bl1_ssyr2k(), bl1_zher2k(), FLA_Check_error_level(), FLA_Her2k_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_trans(), FLA_Param_map_flame_to_blis_uplo(), and FLA_Scal_external().

Referenced by FLA_Her2k(), FLA_Her2k_lh_task(), FLA_Her2k_ln_task(), FLA_Her2k_task(), FLA_Her2k_uh_task(), FLA_Her2k_un_task(), FLA_Tridiag_UT_l_blf_var3(), and FLA_Tridiag_UT_l_blk_var3().

◆ FLA_Her2k_external_gpu()

FLA_Error FLA_Her2k_external_gpu ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
void * A_gpu,
FLA_Obj B,
void * B_gpu,
FLA_Obj beta,
FLA_Obj C,
void * C_gpu )
18{
19 FLA_Datatype datatype;
20 int k_AB;
21 int m_A, n_A;
22 int m_C;
23 int ldim_A;
24 int ldim_B;
25 int ldim_C;
26 char blas_uplo;
27 char blas_trans;
28
29 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
30 FLA_Her2k_check( uplo, trans, alpha, A, B, beta, C );
31
32 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
33
34 datatype = FLA_Obj_datatype( A );
35
36 m_A = FLA_Obj_length( A );
37 n_A = FLA_Obj_width( A );
38 ldim_A = FLA_Obj_length( A );
39
40 ldim_B = FLA_Obj_length( B );
41
42 m_C = FLA_Obj_length( C );
43 ldim_C = FLA_Obj_length( C );
44
45 if ( trans == FLA_NO_TRANSPOSE )
46 k_AB = n_A;
47 else
48 k_AB = m_A;
49
50 FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
51 FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
52
53
54 switch( datatype ){
55
56 case FLA_FLOAT:
57 {
58 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
59 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
60
61 cublasSsyr2k( blas_uplo,
62 blas_trans,
63 m_C,
64 k_AB,
65 *buff_alpha,
66 ( float * ) A_gpu, ldim_A,
67 ( float * ) B_gpu, ldim_B,
68 *buff_beta,
69 ( float * ) C_gpu, ldim_C );
70
71 break;
72 }
73
74 case FLA_DOUBLE:
75 {
76 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
77 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
78
79 cublasDsyr2k( blas_uplo,
80 blas_trans,
81 m_C,
82 k_AB,
83 *buff_alpha,
84 ( double * ) A_gpu, ldim_A,
85 ( double * ) B_gpu, ldim_B,
86 *buff_beta,
87 ( double * ) C_gpu, ldim_C );
88
89 break;
90 }
91
92 case FLA_COMPLEX:
93 {
94 cuComplex *buff_alpha = ( cuComplex * ) FLA_COMPLEX_PTR( alpha );
95 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
96
97 cublasCher2k( blas_uplo,
98 blas_trans,
99 m_C,
100 k_AB,
101 *buff_alpha,
102 ( cuComplex * ) A_gpu, ldim_A,
103 ( cuComplex * ) B_gpu, ldim_B,
104 *buff_beta,
105 ( cuComplex * ) C_gpu, ldim_C );
106
107 break;
108 }
109
110 case FLA_DOUBLE_COMPLEX:
111 {
112 cuDoubleComplex *buff_alpha = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
113 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
114
115 cublasZher2k( blas_uplo,
116 blas_trans,
117 m_C,
118 k_AB,
119 *buff_alpha,
120 ( cuDoubleComplex * ) A_gpu, ldim_A,
121 ( cuDoubleComplex * ) B_gpu, ldim_B,
122 *buff_beta,
123 ( cuDoubleComplex * ) C_gpu, ldim_C );
124
125 break;
126 }
127
128 }
129
130 return FLA_SUCCESS;
131}

References FLA_Check_error_level(), FLA_Her2k_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_trans(), and FLA_Param_map_flame_to_netlib_uplo().

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Her2k_internal_check()

FLA_Error FLA_Her2k_internal_check ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_her2k_t * cntl )
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 if ( trans == FLA_NO_TRANSPOSE )
32 {
33 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, A, B, C );
34 FLA_Check_error_code( e_val );
35 }
36 else
37 {
38 e_val = FLA_Check_matrix_matrix_dims( FLA_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, C );
39 FLA_Check_error_code( e_val );
40 }
41
42 return FLA_SUCCESS;
43}

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

Referenced by FLA_Her2k_internal().

◆ FLA_Her2k_lh_task()

FLA_Error FLA_Her2k_lh_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_her2k_t * cntl )
24{
25 return FLA_Her2k_external( FLA_LOWER_TRIANGULAR, FLA_CONJ_TRANSPOSE, alpha, A, B, beta, C );
26}

References FLA_Her2k_external().

Referenced by FLA_Her2k_lh().

◆ FLA_Her2k_ln_task()

FLA_Error FLA_Her2k_ln_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_her2k_t * cntl )
19{
20 return FLA_Her2k_external( FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE, alpha, A, B, beta, C );
21}

References FLA_Her2k_external().

Referenced by FLA_Her2k_ln().

◆ FLA_Her2k_task()

FLA_Error FLA_Her2k_task ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_her2k_t * cntl )
14{
15 return FLA_Her2k_external( uplo, trans, alpha, A, B, beta, C );
16}

References FLA_Her2k_external().

Referenced by FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Her2k_uh_task()

FLA_Error FLA_Her2k_uh_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_her2k_t * cntl )
34{
35 return FLA_Her2k_external( FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, alpha, A, B, beta, C );
36}

References FLA_Her2k_external().

Referenced by FLA_Her2k_uh().

◆ FLA_Her2k_un_task()

FLA_Error FLA_Her2k_un_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_her2k_t * cntl )
29{
30 return FLA_Her2k_external( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, alpha, A, B, beta, C );
31}

References FLA_Her2k_external().

Referenced by FLA_Her2k_un().

◆ FLA_Herk()

FLA_Error FLA_Herk ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C )
16{
17 FLA_Error r_val = FLA_SUCCESS;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Herk_check( uplo, trans, alpha, A, beta, C );
22
23#ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
24 r_val = FLA_Herk_internal( uplo, trans, alpha, A, beta, C, fla_herk_cntl_mm );
25#else
26 r_val = FLA_Herk_external( uplo, trans, alpha, A, beta, C );
27#endif
28
29 return r_val;
30}
fla_herk_t * fla_herk_cntl_mm
Definition FLA_Herk_cntl_init.c:19
FLA_Error FLA_Herk_internal(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_herk_t *cntl)
Definition FLA_Herk_internal.c:16
FLA_Error FLA_Herk_check(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
Definition FLA_Herk_check.c:13
FLA_Error FLA_Herk_external(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
Definition FLA_Herk_external.c:13

References FLA_Check_error_level(), FLA_Herk_check(), fla_herk_cntl_mm, FLA_Herk_external(), and FLA_Herk_internal().

◆ FLA_Herk_check()

FLA_Error FLA_Herk_check ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C )
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_complex_trans( trans );
21 FLA_Check_error_code( e_val );
22
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_real_object( beta );
30 FLA_Check_error_code( e_val );
31
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_identical_object_precision( A, alpha );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_identical_object_precision( A, beta );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( alpha );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_if_scalar( beta );
45 FLA_Check_error_code( e_val );
46
47 e_val = FLA_Check_square( C );
48 FLA_Check_error_code( e_val );
49
50 if ( trans == FLA_NO_TRANSPOSE )
51 {
52 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, A, A, C );
53 FLA_Check_error_code( e_val );
54 }
55 else
56 {
57 e_val = FLA_Check_matrix_matrix_dims( FLA_TRANSPOSE, FLA_NO_TRANSPOSE, A, A, C );
58 FLA_Check_error_code( e_val );
59 }
60
61 return FLA_SUCCESS;
62}

References FLA_Check_identical_object_datatype(), FLA_Check_identical_object_precision(), FLA_Check_if_scalar(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_real_object(), FLA_Check_square(), FLA_Check_valid_complex_trans(), and FLA_Check_valid_uplo().

Referenced by FLA_Herk(), FLA_Herk_external(), FLA_Herk_external_gpu(), and FLASH_Herk().

◆ FLA_Herk_external()

FLA_Error FLA_Herk_external ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C )
14{
15 FLA_Datatype datatype;
16 int k_A;
17 int m_A, n_A;
18 int m_C;
19 int rs_A, cs_A;
20 int rs_C, cs_C;
21 uplo1_t blis_uplo;
22 trans1_t blis_trans;
23
24 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
25 FLA_Herk_check( uplo, trans, alpha, A, beta, C );
26
27 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
28
29 if ( FLA_Obj_has_zero_dim( A ) )
30 {
31 FLA_Scal_external( beta, C );
32 return FLA_SUCCESS;
33 }
34
35 datatype = FLA_Obj_datatype( A );
36
37 m_A = FLA_Obj_length( A );
38 n_A = FLA_Obj_width( A );
39 rs_A = FLA_Obj_row_stride( A );
40 cs_A = FLA_Obj_col_stride( A );
41
42 m_C = FLA_Obj_length( C );
43 rs_C = FLA_Obj_row_stride( C );
44 cs_C = FLA_Obj_col_stride( C );
45
46 if ( trans == FLA_NO_TRANSPOSE )
47 k_A = n_A;
48 else
49 k_A = m_A;
50
51 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
52 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
53
54
55 switch( datatype ){
56
57 case FLA_FLOAT:
58 {
59 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
60 float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
61 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
62 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
63
64 bl1_ssyrk( blis_uplo,
65 blis_trans,
66 m_C,
67 k_A,
68 buff_alpha,
69 buff_A, rs_A, cs_A,
70 buff_beta,
71 buff_C, rs_C, cs_C );
72
73 break;
74 }
75
76 case FLA_DOUBLE:
77 {
78 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
79 double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
80 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
81 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
82
83 bl1_dsyrk( blis_uplo,
84 blis_trans,
85 m_C,
86 k_A,
87 buff_alpha,
88 buff_A, rs_A, cs_A,
89 buff_beta,
90 buff_C, rs_C, cs_C );
91
92 break;
93 }
94
95 case FLA_COMPLEX:
96 {
97 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
98 scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
99 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
100 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
101
102 bl1_cherk( blis_uplo,
103 blis_trans,
104 m_C,
105 k_A,
106 buff_alpha,
107 buff_A, rs_A, cs_A,
108 buff_beta,
109 buff_C, rs_C, cs_C );
110
111 break;
112 }
113
114 case FLA_DOUBLE_COMPLEX:
115 {
116 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
117 dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C );
118 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
119 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
120
121 bl1_zherk( blis_uplo,
122 blis_trans,
123 m_C,
124 k_A,
125 buff_alpha,
126 buff_A, rs_A, cs_A,
127 buff_beta,
128 buff_C, rs_C, cs_C );
129
130 break;
131 }
132
133 }
134
135 return FLA_SUCCESS;
136}
void bl1_cherk(uplo1_t uplo, trans1_t trans, int m, int k, float *alpha, scomplex *a, int a_rs, int a_cs, float *beta, scomplex *c, int c_rs, int c_cs)
Definition bl1_herk.c:36
void bl1_zherk(uplo1_t uplo, trans1_t trans, int m, int k, double *alpha, dcomplex *a, int a_rs, int a_cs, double *beta, dcomplex *c, int c_rs, int c_cs)
Definition bl1_herk.c:184
void bl1_dsyrk(uplo1_t uplo, trans1_t trans, int m, int k, double *alpha, double *a, int a_rs, int a_cs, double *beta, double *c, int c_rs, int c_cs)
Definition bl1_syrk.c:109
void bl1_ssyrk(uplo1_t uplo, trans1_t trans, int m, int k, float *alpha, float *a, int a_rs, int a_cs, float *beta, float *c, int c_rs, int c_cs)
Definition bl1_syrk.c:13

References bl1_cherk(), bl1_dsyrk(), bl1_ssyrk(), bl1_zherk(), FLA_Check_error_level(), FLA_Herk_check(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_trans(), FLA_Param_map_flame_to_blis_uplo(), and FLA_Scal_external().

Referenced by FLA_Herk(), FLA_Herk_lh_task(), FLA_Herk_ln_task(), FLA_Herk_task(), FLA_Herk_uh_task(), FLA_Herk_un_task(), FLA_Random_spd_matrix(), and FLA_UDdate_UT_unb_var1().

◆ FLA_Herk_external_gpu()

FLA_Error FLA_Herk_external_gpu ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
void * A_gpu,
FLA_Obj beta,
FLA_Obj C,
void * C_gpu )
18{
19 FLA_Datatype datatype;
20 int k_A;
21 int m_A, n_A;
22 int m_C;
23 int ldim_A;
24 int ldim_C;
25 char blas_uplo;
26 char blas_trans;
27
28 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
29 FLA_Herk_check( uplo, trans, alpha, A, beta, C );
30
31 if ( FLA_Obj_has_zero_dim( C ) ) 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 ldim_A = FLA_Obj_length( A );
38
39 m_C = FLA_Obj_length( C );
40 ldim_C = FLA_Obj_length( C );
41
42 if ( trans == FLA_NO_TRANSPOSE )
43 k_A = n_A;
44 else
45 k_A = m_A;
46
47 FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
48 FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
49
50
51 switch( datatype ){
52
53 case FLA_FLOAT:
54 {
55 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
56 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
57
58 cublasSsyrk( blas_uplo,
59 blas_trans,
60 m_C,
61 k_A,
62 *buff_alpha,
63 ( float * ) A_gpu, ldim_A,
64 *buff_beta,
65 ( float * ) C_gpu, ldim_C );
66
67 break;
68 }
69
70 case FLA_DOUBLE:
71 {
72 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
73 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
74
75 cublasDsyrk( blas_uplo,
76 blas_trans,
77 m_C,
78 k_A,
79 *buff_alpha,
80 ( double * ) A_gpu, ldim_A,
81 *buff_beta,
82 ( double * ) C_gpu, ldim_C );
83
84 break;
85 }
86
87 case FLA_COMPLEX:
88 {
89 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
90 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
91
92 cublasCherk( blas_uplo,
93 blas_trans,
94 m_C,
95 k_A,
96 *buff_alpha,
97 ( cuComplex * ) A_gpu, ldim_A,
98 *buff_beta,
99 ( cuComplex * ) C_gpu, ldim_C );
100
101 break;
102 }
103
104 case FLA_DOUBLE_COMPLEX:
105 {
106 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
107 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
108
109 cublasZherk( blas_uplo,
110 blas_trans,
111 m_C,
112 k_A,
113 *buff_alpha,
114 ( cuDoubleComplex * ) A_gpu, ldim_A,
115 *buff_beta,
116 ( cuDoubleComplex * ) C_gpu, ldim_C );
117
118 break;
119 }
120
121 }
122
123 return FLA_SUCCESS;
124}

References FLA_Check_error_level(), FLA_Herk_check(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_trans(), and FLA_Param_map_flame_to_netlib_uplo().

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Herk_internal_check()

FLA_Error FLA_Herk_internal_check ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_herk_t * cntl )
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 if ( trans == FLA_NO_TRANSPOSE )
29 {
30 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, A, A, C );
31 FLA_Check_error_code( e_val );
32 }
33 else
34 {
35 e_val = FLA_Check_matrix_matrix_dims( FLA_TRANSPOSE, FLA_NO_TRANSPOSE, A, A, C );
36 FLA_Check_error_code( e_val );
37 }
38
39 return FLA_SUCCESS;
40}

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

Referenced by FLA_Herk_internal().

◆ FLA_Herk_lh_task()

FLA_Error FLA_Herk_lh_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_herk_t * cntl )
24{
25 return FLA_Herk_external( FLA_LOWER_TRIANGULAR, FLA_CONJ_TRANSPOSE, alpha, A, beta, C );
26}

References FLA_Herk_external().

Referenced by FLA_Herk_lh().

◆ FLA_Herk_ln_task()

FLA_Error FLA_Herk_ln_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_herk_t * cntl )
19{
20 return FLA_Herk_external( FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE, alpha, A, beta, C );
21}

References FLA_Herk_external().

Referenced by FLA_Herk_ln().

◆ FLA_Herk_task()

FLA_Error FLA_Herk_task ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_herk_t * cntl )
14{
15 return FLA_Herk_external( uplo, trans, alpha, A, beta, C );
16}

References FLA_Herk_external().

Referenced by FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Herk_uh_task()

FLA_Error FLA_Herk_uh_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_herk_t * cntl )
34{
35 return FLA_Herk_external( FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, alpha, A, beta, C );
36}

References FLA_Herk_external().

Referenced by FLA_Herk_uh().

◆ FLA_Herk_un_task()

FLA_Error FLA_Herk_un_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_herk_t * cntl )
29{
30 return FLA_Herk_external( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, alpha, A, beta, C );
31}

References FLA_Herk_external().

Referenced by FLA_Herk_un().

◆ FLA_Symm()

FLA_Error FLA_Symm ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
16{
17 FLA_Error r_val = FLA_SUCCESS;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Symm_check( side, uplo, alpha, A, B, beta, C );
22
23#ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
24 r_val = FLA_Symm_internal( side, uplo, alpha, A, B, beta, C, fla_symm_cntl_mm );
25#else
26 r_val = FLA_Symm_external( side, uplo, alpha, A, B, beta, C );
27#endif
28
29 return r_val;
30}
fla_symm_t * fla_symm_cntl_mm
Definition FLA_Symm_cntl_init.c:19
FLA_Error FLA_Symm_internal(FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_symm_t *cntl)
Definition FLA_Symm_internal.c:16
FLA_Error FLA_Symm_check(FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Symm_check.c:13
FLA_Error FLA_Symm_external(FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Symm_external.c:13

References FLA_Check_error_level(), FLA_Symm_check(), fla_symm_cntl_mm, FLA_Symm_external(), and FLA_Symm_internal().

◆ FLA_Symm_check()

FLA_Error FLA_Symm_check ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
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_floating_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_consistent_object_datatype( A, alpha );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_consistent_object_datatype( A, beta );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( alpha );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_if_scalar( beta );
45 FLA_Check_error_code( e_val );
46
47 e_val = FLA_Check_square( A );
48 FLA_Check_error_code( e_val );
49
50 if ( side == FLA_LEFT )
51 {
52 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, C );
53 FLA_Check_error_code( e_val );
54 }
55 else
56 {
57 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, C );
58 FLA_Check_error_code( e_val );
59 }
60
61 return FLA_SUCCESS;
62}

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

Referenced by FLA_Symm(), FLA_Symm_external(), FLA_Symm_external_gpu(), and FLASH_Symm().

◆ FLA_Symm_external()

FLA_Error FLA_Symm_external ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
14{
15 FLA_Datatype datatype;
16 int m_C, n_C;
17 int rs_A, cs_A;
18 int rs_B, cs_B;
19 int rs_C, cs_C;
20 side1_t blis_side;
21 uplo1_t blis_uplo;
22
23 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
24 FLA_Symm_check( side, uplo, alpha, A, B, beta, C );
25
26 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
27
28 datatype = FLA_Obj_datatype( A );
29
30 rs_A = FLA_Obj_row_stride( A );
31 cs_A = FLA_Obj_col_stride( A );
32
33 rs_B = FLA_Obj_row_stride( B );
34 cs_B = FLA_Obj_col_stride( B );
35
36 m_C = FLA_Obj_length( C );
37 n_C = FLA_Obj_width( C );
38 rs_C = FLA_Obj_row_stride( C );
39 cs_C = FLA_Obj_col_stride( C );
40
41 FLA_Param_map_flame_to_blis_side( side, &blis_side );
42 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
43
44
45 switch( datatype ){
46
47 case FLA_FLOAT:
48 {
49 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
50 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
51 float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
52 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
53 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
54
55 bl1_ssymm( blis_side,
56 blis_uplo,
57 m_C,
58 n_C,
59 buff_alpha,
60 buff_A, rs_A, cs_A,
61 buff_B, rs_B, cs_B,
62 buff_beta,
63 buff_C, rs_C, cs_C );
64
65 break;
66 }
67
68 case FLA_DOUBLE:
69 {
70 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
71 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
72 double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
73 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
74 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
75
76 bl1_dsymm( blis_side,
77 blis_uplo,
78 m_C,
79 n_C,
80 buff_alpha,
81 buff_A, rs_A, cs_A,
82 buff_B, rs_B, cs_B,
83 buff_beta,
84 buff_C, rs_C, cs_C );
85
86 break;
87 }
88
89 case FLA_COMPLEX:
90 {
91 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
92 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
93 scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
94 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
95 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
96
97 bl1_csymm( blis_side,
98 blis_uplo,
99 m_C,
100 n_C,
101 buff_alpha,
102 buff_A, rs_A, cs_A,
103 buff_B, rs_B, cs_B,
104 buff_beta,
105 buff_C, rs_C, cs_C );
106
107 break;
108 }
109
110 case FLA_DOUBLE_COMPLEX:
111 {
112 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
113 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
114 dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C );
115 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
116 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
117
118 bl1_zsymm( blis_side,
119 blis_uplo,
120 m_C,
121 n_C,
122 buff_alpha,
123 buff_A, rs_A, cs_A,
124 buff_B, rs_B, cs_B,
125 buff_beta,
126 buff_C, rs_C, cs_C );
127
128 break;
129 }
130
131 }
132
133 return FLA_SUCCESS;
134}
void bl1_zsymm(side1_t side, uplo1_t uplo, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs, dcomplex *beta, dcomplex *c, int c_rs, int c_cs)
Definition bl1_symm.c:796
void bl1_csymm(side1_t side, uplo1_t uplo, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs, scomplex *beta, scomplex *c, int c_rs, int c_cs)
Definition bl1_symm.c:535

References bl1_csymm(), bl1_dsymm(), bl1_ssymm(), bl1_zsymm(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_side(), FLA_Param_map_flame_to_blis_uplo(), and FLA_Symm_check().

Referenced by FLA_Symm(), FLA_Symm_ll_task(), FLA_Symm_lu_task(), FLA_Symm_rl_task(), FLA_Symm_ru_task(), and FLA_Symm_task().

◆ FLA_Symm_external_gpu()

FLA_Error FLA_Symm_external_gpu ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
void * A_gpu,
FLA_Obj B,
void * B_gpu,
FLA_Obj beta,
FLA_Obj C,
void * C_gpu )
18{
19 FLA_Datatype datatype;
20 int m_C, n_C;
21 int ldim_A;
22 int ldim_B;
23 int ldim_C;
24 char blas_side;
25 char blas_uplo;
26
27 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
28 FLA_Symm_check( side, uplo, alpha, A, B, beta, C );
29
30 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
31
32 datatype = FLA_Obj_datatype( A );
33
34 ldim_A = FLA_Obj_length( A );
35
36 ldim_B = FLA_Obj_length( B );
37
38 m_C = FLA_Obj_length( C );
39 n_C = FLA_Obj_width( C );
40 ldim_C = FLA_Obj_length( C );
41
42 FLA_Param_map_flame_to_netlib_side( side, &blas_side );
43 FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
44
45
46 switch( datatype ){
47
48 case FLA_FLOAT:
49 {
50 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
51 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
52
53 cublasSsymm( blas_side,
54 blas_uplo,
55 m_C,
56 n_C,
57 *buff_alpha,
58 ( float * ) A_gpu, ldim_A,
59 ( float * ) B_gpu, ldim_B,
60 *buff_beta,
61 ( float * ) C_gpu, ldim_C );
62
63 break;
64 }
65
66 case FLA_DOUBLE:
67 {
68 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
69 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
70
71 cublasDsymm( blas_side,
72 blas_uplo,
73 m_C,
74 n_C,
75 *buff_alpha,
76 ( double * ) A_gpu, ldim_A,
77 ( double * ) B_gpu, ldim_B,
78 *buff_beta,
79 ( double * ) C_gpu, ldim_C );
80
81 break;
82 }
83
84 case FLA_COMPLEX:
85 {
86 cuComplex *buff_alpha = ( cuComplex * ) FLA_COMPLEX_PTR( alpha );
87 cuComplex *buff_beta = ( cuComplex * ) FLA_COMPLEX_PTR( beta );
88
89 cublasCsymm( blas_side,
90 blas_uplo,
91 m_C,
92 n_C,
93 *buff_alpha,
94 ( cuComplex * ) A_gpu, ldim_A,
95 ( cuComplex * ) B_gpu, ldim_B,
96 *buff_beta,
97 ( cuComplex * ) C_gpu, ldim_C );
98
99 break;
100 }
101
102 case FLA_DOUBLE_COMPLEX:
103 {
104 cuDoubleComplex *buff_alpha = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
105 cuDoubleComplex *buff_beta = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
106
107 cublasZsymm( blas_side,
108 blas_uplo,
109 m_C,
110 n_C,
111 *buff_alpha,
112 ( cuDoubleComplex * ) A_gpu, ldim_A,
113 ( cuDoubleComplex * ) B_gpu, ldim_B,
114 *buff_beta,
115 ( cuDoubleComplex * ) C_gpu, ldim_C );
116
117 break;
118 }
119
120 }
121
122 return FLA_SUCCESS;
123}

References FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_side(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Symm_check().

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Symm_internal_check()

FLA_Error FLA_Symm_internal_check ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_symm_t * cntl )
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 if ( side == FLA_LEFT )
32 {
33 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, C );
34 FLA_Check_error_code( e_val );
35 }
36 else
37 {
38 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, C );
39 FLA_Check_error_code( e_val );
40 }
41
42 return FLA_SUCCESS;
43}

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

Referenced by FLA_Symm_internal().

◆ FLA_Symm_ll_task()

FLA_Error FLA_Symm_ll_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_symm_t * cntl )
19{
20 return FLA_Symm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR, alpha, A, B, beta, C );
21}

References FLA_Symm_external().

Referenced by FLA_Symm_ll().

◆ FLA_Symm_lu_task()

FLA_Error FLA_Symm_lu_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_symm_t * cntl )
24{
25 return FLA_Symm_external( FLA_LEFT, FLA_UPPER_TRIANGULAR, alpha, A, B, beta, C );
26}

References FLA_Symm_external().

Referenced by FLA_Symm_lu().

◆ FLA_Symm_rl_task()

FLA_Error FLA_Symm_rl_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_symm_t * cntl )
29{
30 return FLA_Symm_external( FLA_RIGHT, FLA_LOWER_TRIANGULAR, alpha, A, B, beta, C );
31}

References FLA_Symm_external().

Referenced by FLA_Symm_rl().

◆ FLA_Symm_ru_task()

FLA_Error FLA_Symm_ru_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_symm_t * cntl )
34{
35 return FLA_Symm_external( FLA_RIGHT, FLA_UPPER_TRIANGULAR, alpha, A, B, beta, C );
36}

References FLA_Symm_external().

Referenced by FLA_Symm_ru().

◆ FLA_Symm_task()

FLA_Error FLA_Symm_task ( FLA_Side side,
FLA_Uplo uplo,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_symm_t * cntl )
14{
15 return FLA_Symm_external( side, uplo, alpha, A, B, beta, C );
16}

References FLA_Symm_external().

Referenced by FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Syr2k()

FLA_Error FLA_Syr2k ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
16{
17 FLA_Error r_val = FLA_SUCCESS;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Syr2k_check( uplo, trans, alpha, A, B, beta, C );
22
23#ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
24 r_val = FLA_Syr2k_internal( uplo, trans, alpha, A, B, beta, C, fla_syr2k_cntl_mm );
25#else
26 r_val = FLA_Syr2k_external( uplo, trans, alpha, A, B, beta, C );
27#endif
28
29 return r_val;
30}
fla_syr2k_t * fla_syr2k_cntl_mm
Definition FLA_Syr2k_cntl_init.c:19
FLA_Error FLA_Syr2k_internal(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C, fla_syr2k_t *cntl)
Definition FLA_Syr2k_internal.c:16
FLA_Error FLA_Syr2k_check(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Syr2k_check.c:13
FLA_Error FLA_Syr2k_external(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Syr2k_external.c:13

References FLA_Check_error_level(), FLA_Syr2k_check(), fla_syr2k_cntl_mm, FLA_Syr2k_external(), and FLA_Syr2k_internal().

◆ FLA_Syr2k_check()

FLA_Error FLA_Syr2k_check ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
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_real_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
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_consistent_object_datatype( A, alpha );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_consistent_object_datatype( A, beta );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( alpha );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_if_scalar( beta );
45 FLA_Check_error_code( e_val );
46
47 e_val = FLA_Check_square( C );
48 FLA_Check_error_code( e_val );
49
50 if ( trans == FLA_NO_TRANSPOSE )
51 {
52 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, A, B, C );
53 FLA_Check_error_code( e_val );
54 }
55 else
56 {
57 e_val = FLA_Check_matrix_matrix_dims( FLA_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, C );
58 FLA_Check_error_code( e_val );
59 }
60
61 return FLA_SUCCESS;
62}
FLA_Error FLA_Check_valid_real_trans(FLA_Trans trans)
Definition FLA_Check.c:917

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

Referenced by FLA_Syr2k(), FLA_Syr2k_external(), FLA_Syr2k_external_gpu(), and FLASH_Syr2k().

◆ FLA_Syr2k_external()

FLA_Error FLA_Syr2k_external ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
14{
15 FLA_Datatype datatype;
16 int k_AB;
17 int m_A, n_A;
18 int m_C;
19 int rs_A, cs_A;
20 int rs_B, cs_B;
21 int rs_C, cs_C;
22 uplo1_t blis_uplo;
23 trans1_t blis_trans;
24
25 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
26 FLA_Syr2k_check( uplo, trans, alpha, A, B, beta, C );
27
28 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
29
31 {
32 FLA_Scal_external( beta, C );
33 return FLA_SUCCESS;
34 }
35
36 datatype = FLA_Obj_datatype( A );
37
38 m_A = FLA_Obj_length( A );
39 n_A = FLA_Obj_width( A );
40 rs_A = FLA_Obj_row_stride( A );
41 cs_A = FLA_Obj_col_stride( A );
42
43 rs_B = FLA_Obj_row_stride( B );
44 cs_B = FLA_Obj_col_stride( B );
45
46 m_C = FLA_Obj_length( C );
47 rs_C = FLA_Obj_row_stride( C );
48 cs_C = FLA_Obj_col_stride( C );
49
50 if ( trans == FLA_NO_TRANSPOSE )
51 k_AB = n_A;
52 else
53 k_AB = m_A;
54
55 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
56 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
57
58
59 switch( datatype ){
60
61 case FLA_FLOAT:
62 {
63 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
64 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
65 float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
66 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
67 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
68
69 bl1_ssyr2k( blis_uplo,
70 blis_trans,
71 m_C,
72 k_AB,
73 buff_alpha,
74 buff_A, rs_A, cs_A,
75 buff_B, rs_B, cs_B,
76 buff_beta,
77 buff_C, rs_C, cs_C );
78
79 break;
80 }
81
82 case FLA_DOUBLE:
83 {
84 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
85 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
86 double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
87 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
88 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
89
90 bl1_dsyr2k( blis_uplo,
91 blis_trans,
92 m_C,
93 k_AB,
94 buff_alpha,
95 buff_A, rs_A, cs_A,
96 buff_B, rs_B, cs_B,
97 buff_beta,
98 buff_C, rs_C, cs_C );
99
100 break;
101 }
102
103 case FLA_COMPLEX:
104 {
105 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
106 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
107 scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
108 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
109 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
110
111 bl1_csyr2k( blis_uplo,
112 blis_trans,
113 m_C,
114 k_AB,
115 buff_alpha,
116 buff_A, rs_A, cs_A,
117 buff_B, rs_B, cs_B,
118 buff_beta,
119 buff_C, rs_C, cs_C );
120
121 break;
122 }
123 case FLA_DOUBLE_COMPLEX:
124 {
125 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
126 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
127 dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C );
128 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
129 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
130
131 bl1_zsyr2k( blis_uplo,
132 blis_trans,
133 m_C,
134 k_AB,
135 buff_alpha,
136 buff_A, rs_A, cs_A,
137 buff_B, rs_B, cs_B,
138 buff_beta,
139 buff_C, rs_C, cs_C );
140
141 break;
142 }
143
144 }
145
146 return FLA_SUCCESS;
147}
void bl1_csyr2k(uplo1_t uplo, trans1_t trans, int m, int k, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs, scomplex *beta, scomplex *c, int c_rs, int c_cs)
Definition bl1_syr2k.c:465
void bl1_zsyr2k(uplo1_t uplo, trans1_t trans, int m, int k, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs, dcomplex *beta, dcomplex *c, int c_rs, int c_cs)
Definition bl1_syr2k.c:691

References bl1_csyr2k(), bl1_dsyr2k(), bl1_ssyr2k(), bl1_zsyr2k(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_trans(), FLA_Param_map_flame_to_blis_uplo(), FLA_Scal_external(), and FLA_Syr2k_check().

Referenced by FLA_Syr2k(), FLA_Syr2k_ln_task(), FLA_Syr2k_lt_task(), FLA_Syr2k_task(), FLA_Syr2k_un_task(), and FLA_Syr2k_ut_task().

◆ FLA_Syr2k_external_gpu()

FLA_Error FLA_Syr2k_external_gpu ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
void * A_gpu,
FLA_Obj B,
void * B_gpu,
FLA_Obj beta,
FLA_Obj C,
void * C_gpu )
18{
19 FLA_Datatype datatype;
20 int k_AB;
21 int m_A, n_A;
22 int m_C;
23 int ldim_A;
24 int ldim_B;
25 int ldim_C;
26 char blas_uplo;
27 char blas_trans;
28
29 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
30 FLA_Syr2k_check( uplo, trans, alpha, A, B, beta, C );
31
32 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
33
34 datatype = FLA_Obj_datatype( A );
35
36 m_A = FLA_Obj_length( A );
37 n_A = FLA_Obj_width( A );
38 ldim_A = FLA_Obj_length( A );
39
40 ldim_B = FLA_Obj_length( B );
41
42 m_C = FLA_Obj_length( C );
43 ldim_C = FLA_Obj_length( C );
44
45 if ( trans == FLA_NO_TRANSPOSE )
46 k_AB = n_A;
47 else
48 k_AB = m_A;
49
50 FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
51 FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
52
53
54 switch( datatype ){
55
56 case FLA_FLOAT:
57 {
58 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
59 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
60
61 cublasSsyr2k( blas_uplo,
62 blas_trans,
63 m_C,
64 k_AB,
65 *buff_alpha,
66 ( float * ) A_gpu, ldim_A,
67 ( float * ) B_gpu, ldim_B,
68 *buff_beta,
69 ( float * ) C_gpu, ldim_C );
70
71 break;
72 }
73
74 case FLA_DOUBLE:
75 {
76 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
77 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
78
79 cublasDsyr2k( blas_uplo,
80 blas_trans,
81 m_C,
82 k_AB,
83 *buff_alpha,
84 ( double * ) A_gpu, ldim_A,
85 ( double * ) B_gpu, ldim_B,
86 *buff_beta,
87 ( double * ) C_gpu, ldim_C );
88
89 break;
90 }
91
92 case FLA_COMPLEX:
93 {
94 cuComplex *buff_alpha = ( cuComplex * ) FLA_COMPLEX_PTR( alpha );
95 cuComplex *buff_beta = ( cuComplex * ) FLA_COMPLEX_PTR( beta );
96
97 cublasCsyr2k( blas_uplo,
98 blas_trans,
99 m_C,
100 k_AB,
101 *buff_alpha,
102 ( cuComplex * ) A_gpu, ldim_A,
103 ( cuComplex * ) B_gpu, ldim_B,
104 *buff_beta,
105 ( cuComplex * ) C_gpu, ldim_C );
106
107 break;
108 }
109
110 case FLA_DOUBLE_COMPLEX:
111 {
112 cuDoubleComplex *buff_alpha = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
113 cuDoubleComplex *buff_beta = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
114
115 cublasZsyr2k( blas_uplo,
116 blas_trans,
117 m_C,
118 k_AB,
119 *buff_alpha,
120 ( cuDoubleComplex * ) A_gpu, ldim_A,
121 ( cuDoubleComplex * ) B_gpu, ldim_B,
122 *buff_beta,
123 ( cuDoubleComplex * ) C_gpu, ldim_C );
124
125 break;
126 }
127
128 }
129
130 return FLA_SUCCESS;
131}

References FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_trans(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Syr2k_check().

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Syr2k_internal_check()

FLA_Error FLA_Syr2k_internal_check ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_syr2k_t * cntl )
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 if ( trans == FLA_NO_TRANSPOSE )
32 {
33 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, A, B, C );
34 FLA_Check_error_code( e_val );
35 }
36 else
37 {
38 e_val = FLA_Check_matrix_matrix_dims( FLA_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, C );
39 FLA_Check_error_code( e_val );
40 }
41
42 return FLA_SUCCESS;
43}

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

Referenced by FLA_Syr2k_internal().

◆ FLA_Syr2k_ln_task()

FLA_Error FLA_Syr2k_ln_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_syr2k_t * cntl )
19{
20 return FLA_Syr2k_external( FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE, alpha, A, B, beta, C );
21}

References FLA_Syr2k_external().

Referenced by FLA_Syr2k_ln().

◆ FLA_Syr2k_lt_task()

FLA_Error FLA_Syr2k_lt_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_syr2k_t * cntl )
24{
25 return FLA_Syr2k_external( FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, alpha, A, B, beta, C );
26}

References FLA_Syr2k_external().

Referenced by FLA_Syr2k_lt().

◆ FLA_Syr2k_task()

FLA_Error FLA_Syr2k_task ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_syr2k_t * cntl )
14{
15 return FLA_Syr2k_external( uplo, trans, alpha, A, B, beta, C );
16}

References FLA_Syr2k_external().

Referenced by FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Syr2k_un_task()

FLA_Error FLA_Syr2k_un_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_syr2k_t * cntl )
29{
30 return FLA_Syr2k_external( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, alpha, A, B, beta, C );
31}

References FLA_Syr2k_external().

Referenced by FLA_Syr2k_un().

◆ FLA_Syr2k_ut_task()

FLA_Error FLA_Syr2k_ut_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C,
fla_syr2k_t * cntl )
34{
35 return FLA_Syr2k_external( FLA_UPPER_TRIANGULAR, FLA_TRANSPOSE, alpha, A, B, beta, C );
36}

References FLA_Syr2k_external().

Referenced by FLA_Syr2k_ut().

◆ FLA_Syrk()

FLA_Error FLA_Syrk ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C )
16{
17 FLA_Error r_val = FLA_SUCCESS;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Syrk_check( uplo, trans, alpha, A, beta, C );
22
23#ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
24 r_val = FLA_Syrk_internal( uplo, trans, alpha, A, beta, C, fla_syrk_cntl_mm );
25#else
26 r_val = FLA_Syrk_external( uplo, trans, alpha, A, beta, C );
27#endif
28
29 return r_val;
30}
fla_syrk_t * fla_syrk_cntl_mm
Definition FLA_Syrk_cntl_init.c:19
FLA_Error FLA_Syrk_internal(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C, fla_syrk_t *cntl)
Definition FLA_Syrk_internal.c:16
FLA_Error FLA_Syrk_check(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
Definition FLA_Syrk_check.c:13
FLA_Error FLA_Syrk_external(FLA_Uplo uplo, FLA_Trans trans, FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C)
Definition FLA_Syrk_external.c:13

References FLA_Check_error_level(), FLA_Syrk_check(), fla_syrk_cntl_mm, FLA_Syrk_external(), and FLA_Syrk_internal().

◆ FLA_Syrk_check()

FLA_Error FLA_Syrk_check ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C )
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_real_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
27 FLA_Check_error_code( e_val );
28
30 FLA_Check_error_code( e_val );
31
32 e_val = FLA_Check_consistent_object_datatype( A, alpha );
33 FLA_Check_error_code( e_val );
34
35 e_val = FLA_Check_consistent_object_datatype( A, beta );
36 FLA_Check_error_code( e_val );
37
38 e_val = FLA_Check_if_scalar( alpha );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( beta );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_square( C );
45 FLA_Check_error_code( e_val );
46
47 if ( trans == FLA_NO_TRANSPOSE )
48 {
49 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, A, A, C );
50 FLA_Check_error_code( e_val );
51 }
52 else
53 {
54 e_val = FLA_Check_matrix_matrix_dims( FLA_TRANSPOSE, FLA_NO_TRANSPOSE, A, A, C );
55 FLA_Check_error_code( e_val );
56 }
57
58 return FLA_SUCCESS;
59}

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

Referenced by FLA_Syrk(), FLA_Syrk_external(), FLA_Syrk_external_gpu(), and FLASH_Syrk().

◆ FLA_Syrk_external()

FLA_Error FLA_Syrk_external ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C )
14{
15 FLA_Datatype datatype;
16 int k_A;
17 int m_A, n_A;
18 int m_C;
19 int rs_A, cs_A;
20 int rs_C, cs_C;
21 uplo1_t blis_uplo;
22 trans1_t blis_trans;
23
24 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
25 FLA_Syrk_check( uplo, trans, alpha, A, beta, C );
26
27 if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
28
29 if ( FLA_Obj_has_zero_dim( A ) )
30 {
31 FLA_Scal_external( beta, C );
32 return FLA_SUCCESS;
33 }
34
35 datatype = FLA_Obj_datatype( A );
36
37 m_A = FLA_Obj_length( A );
38 n_A = FLA_Obj_width( A );
39 rs_A = FLA_Obj_row_stride( A );
40 cs_A = FLA_Obj_col_stride( A );
41
42 m_C = FLA_Obj_length( C );
43 rs_C = FLA_Obj_row_stride( C );
44 cs_C = FLA_Obj_col_stride( C );
45
46 if ( trans == FLA_NO_TRANSPOSE )
47 k_A = n_A;
48 else
49 k_A = m_A;
50
51 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
52 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
53
54
55 switch( datatype ){
56
57 case FLA_FLOAT:
58 {
59 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
60 float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
61 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
62 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
63
64 bl1_ssyrk( blis_uplo,
65 blis_trans,
66 m_C,
67 k_A,
68 buff_alpha,
69 buff_A, rs_A, cs_A,
70 buff_beta,
71 buff_C, rs_C, cs_C );
72
73 break;
74 }
75
76 case FLA_DOUBLE:
77 {
78 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
79 double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
80 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
81 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
82
83 bl1_dsyrk( blis_uplo,
84 blis_trans,
85 m_C,
86 k_A,
87 buff_alpha,
88 buff_A, rs_A, cs_A,
89 buff_beta,
90 buff_C, rs_C, cs_C );
91
92 break;
93 }
94
95 case FLA_COMPLEX:
96 {
97 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
98 scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
99 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
100 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
101
102 bl1_csyrk( blis_uplo,
103 blis_trans,
104 m_C,
105 k_A,
106 buff_alpha,
107 buff_A, rs_A, cs_A,
108 buff_beta,
109 buff_C, rs_C, cs_C );
110
111 break;
112 }
113
114 case FLA_DOUBLE_COMPLEX:
115 {
116 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
117 dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C );
118 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
119 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
120
121 bl1_zsyrk( blis_uplo,
122 blis_trans,
123 m_C,
124 k_A,
125 buff_alpha,
126 buff_A, rs_A, cs_A,
127 buff_beta,
128 buff_C, rs_C, cs_C );
129
130 break;
131 }
132
133 }
134
135 return FLA_SUCCESS;
136}
void bl1_csyrk(uplo1_t uplo, trans1_t trans, int m, int k, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *beta, scomplex *c, int c_rs, int c_cs)
Definition bl1_syrk.c:205
void bl1_zsyrk(uplo1_t uplo, trans1_t trans, int m, int k, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *beta, dcomplex *c, int c_rs, int c_cs)
Definition bl1_syrk.c:301

References bl1_csyrk(), bl1_dsyrk(), bl1_ssyrk(), bl1_zsyrk(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_trans(), FLA_Param_map_flame_to_blis_uplo(), FLA_Scal_external(), and FLA_Syrk_check().

Referenced by FLA_Syrk(), FLA_Syrk_ln_task(), FLA_Syrk_lt_task(), FLA_Syrk_task(), FLA_Syrk_un_task(), and FLA_Syrk_ut_task().

◆ FLA_Syrk_external_gpu()

FLA_Error FLA_Syrk_external_gpu ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
void * A_gpu,
FLA_Obj beta,
FLA_Obj C,
void * C_gpu )
18{
19 FLA_Datatype datatype;
20 int k_A;
21 int m_A, n_A;
22 int m_C;
23 int ldim_A;
24 int ldim_C;
25 char blas_uplo;
26 char blas_trans;
27
28 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
29 FLA_Syrk_check( uplo, trans, alpha, A, beta, C );
30
31 if ( FLA_Obj_has_zero_dim( C ) ) 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 ldim_A = FLA_Obj_length( A );
38
39 m_C = FLA_Obj_length( C );
40 ldim_C = FLA_Obj_length( C );
41
42 if ( trans == FLA_NO_TRANSPOSE )
43 k_A = n_A;
44 else
45 k_A = m_A;
46
47 FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
48 FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
49
50
51 switch( datatype ){
52
53 case FLA_FLOAT:
54 {
55 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
56 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
57
58 cublasSsyrk( blas_uplo,
59 blas_trans,
60 m_C,
61 k_A,
62 *buff_alpha,
63 ( float * ) A_gpu, ldim_A,
64 *buff_beta,
65 ( float * ) C_gpu, ldim_C );
66
67 break;
68 }
69
70 case FLA_DOUBLE:
71 {
72 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
73 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
74
75 cublasDsyrk( blas_uplo,
76 blas_trans,
77 m_C,
78 k_A,
79 *buff_alpha,
80 ( double * ) A_gpu, ldim_A,
81 *buff_beta,
82 ( double * ) C_gpu, ldim_C );
83
84 break;
85 }
86
87 case FLA_COMPLEX:
88 {
89 cuComplex *buff_alpha = ( cuComplex * ) FLA_COMPLEX_PTR( alpha );
90 cuComplex *buff_beta = ( cuComplex * ) FLA_COMPLEX_PTR( beta );
91
92 cublasCsyrk( blas_uplo,
93 blas_trans,
94 m_C,
95 k_A,
96 *buff_alpha,
97 ( cuComplex * ) A_gpu, ldim_A,
98 *buff_beta,
99 ( cuComplex * ) C_gpu, ldim_C );
100
101 break;
102 }
103
104 case FLA_DOUBLE_COMPLEX:
105 {
106 cuDoubleComplex *buff_alpha = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
107 cuDoubleComplex *buff_beta = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
108
109 cublasZsyrk( blas_uplo,
110 blas_trans,
111 m_C,
112 k_A,
113 *buff_alpha,
114 ( cuDoubleComplex * ) A_gpu, ldim_A,
115 *buff_beta,
116 ( cuDoubleComplex * ) C_gpu, ldim_C );
117
118 break;
119 }
120
121 }
122
123 return FLA_SUCCESS;
124}

References FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_trans(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Syrk_check().

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Syrk_internal_check()

FLA_Error FLA_Syrk_internal_check ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_syrk_t * cntl )
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 if ( trans == FLA_NO_TRANSPOSE )
29 {
30 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_TRANSPOSE, A, A, C );
31 FLA_Check_error_code( e_val );
32 }
33 else
34 {
35 e_val = FLA_Check_matrix_matrix_dims( FLA_TRANSPOSE, FLA_NO_TRANSPOSE, A, A, C );
36 FLA_Check_error_code( e_val );
37 }
38
39 return FLA_SUCCESS;
40}

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

Referenced by FLA_Syrk_internal().

◆ FLA_Syrk_ln_task()

FLA_Error FLA_Syrk_ln_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_syrk_t * cntl )
19{
20 return FLA_Syrk_external( FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE, alpha, A, beta, C );
21}

References FLA_Syrk_external().

Referenced by FLA_Syrk_ln().

◆ FLA_Syrk_lt_task()

FLA_Error FLA_Syrk_lt_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_syrk_t * cntl )
24{
25 return FLA_Syrk_external( FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, alpha, A, beta, C );
26}

References FLA_Syrk_external().

Referenced by FLA_Syrk_lt().

◆ FLA_Syrk_task()

FLA_Error FLA_Syrk_task ( FLA_Uplo uplo,
FLA_Trans trans,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_syrk_t * cntl )
14{
15 return FLA_Syrk_external( uplo, trans, alpha, A, beta, C );
16}

References FLA_Syrk_external().

Referenced by FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Syrk_un_task()

FLA_Error FLA_Syrk_un_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_syrk_t * cntl )
29{
30 return FLA_Syrk_external( FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, alpha, A, beta, C );
31}

References FLA_Syrk_external().

Referenced by FLA_Syrk_un().

◆ FLA_Syrk_ut_task()

FLA_Error FLA_Syrk_ut_task ( FLA_Obj alpha,
FLA_Obj A,
FLA_Obj beta,
FLA_Obj C,
fla_syrk_t * cntl )
34{
35 return FLA_Syrk_external( FLA_UPPER_TRIANGULAR, FLA_TRANSPOSE, alpha, A, beta, C );
36}

References FLA_Syrk_external().

Referenced by FLA_Syrk_ut().

◆ FLA_Trmm()

FLA_Error FLA_Trmm ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans trans,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B )
16{
17 FLA_Error r_val = FLA_SUCCESS;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Trmm_check( side, uplo, trans, diag, alpha, A, B );
22
23#ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
24 r_val = FLA_Trmm_internal( side, uplo, trans, diag, alpha, A, B, fla_trmm_cntl_mm );
25#else
26 r_val = FLA_Trmm_external( side, uplo, trans, diag, alpha, A, B );
27#endif
28
29 return r_val;
30}
fla_trmm_t * fla_trmm_cntl_mm
Definition FLA_Trmm_cntl_init.c:19
FLA_Error FLA_Trmm_internal(FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trmm_t *cntl)
Definition FLA_Trmm_internal.c:16
FLA_Error FLA_Trmm_check(FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Trmm_check.c:13
FLA_Error FLA_Trmm_external(FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Trmm_external.c:13

References FLA_Check_error_level(), FLA_Trmm_check(), fla_trmm_cntl_mm, FLA_Trmm_external(), and FLA_Trmm_internal().

◆ FLA_Trmm_check()

FLA_Error FLA_Trmm_check ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans transa,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B )
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 e_val = FLA_Check_valid_diag( diag );
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_floating_object( A );
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_consistent_object_datatype( A, alpha );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( alpha );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_square( A );
45 FLA_Check_error_code( e_val );
46
47 if ( side == FLA_LEFT )
48 {
49 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B );
50 FLA_Check_error_code( e_val );
51 }
52 else
53 {
54 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, B );
55 FLA_Check_error_code( e_val );
56 }
57
58 return FLA_SUCCESS;
59}
FLA_Error FLA_Check_valid_diag(FLA_Diag diag)
Definition FLA_Check.c:100

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_diag(), FLA_Check_valid_leftright_side(), FLA_Check_valid_trans(), and FLA_Check_valid_uplo().

Referenced by FLA_Trmm(), FLA_Trmm_external(), FLA_Trmm_external_gpu(), and FLASH_Trmm().

◆ FLA_Trmm_external()

FLA_Error FLA_Trmm_external ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans trans,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B )
14{
15 FLA_Datatype datatype;
16 int m_B, n_B;
17 int rs_A, cs_A;
18 int rs_B, cs_B;
19 side1_t blis_side;
20 uplo1_t blis_uplo;
21 trans1_t blis_trans;
22 diag1_t blis_diag;
23
24 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
25 FLA_Trmm_check( side, uplo, trans, diag, alpha, A, B );
26
27 if ( FLA_Obj_has_zero_dim( B ) ) return FLA_SUCCESS;
28
29 datatype = FLA_Obj_datatype( A );
30
31 rs_A = FLA_Obj_row_stride( A );
32 cs_A = FLA_Obj_col_stride( A );
33
34 m_B = FLA_Obj_length( B );
35 n_B = FLA_Obj_width( B );
36 rs_B = FLA_Obj_row_stride( B );
37 cs_B = FLA_Obj_col_stride( B );
38
39 FLA_Param_map_flame_to_blis_side( side, &blis_side );
40 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
41 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
42 FLA_Param_map_flame_to_blis_diag( diag, &blis_diag );
43
44
45 switch( datatype ){
46
47 case FLA_FLOAT:
48 {
49 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
50 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
51 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
52
53 bl1_strmm( blis_side,
54 blis_uplo,
55 blis_trans,
56 blis_diag,
57 m_B,
58 n_B,
59 buff_alpha,
60 buff_A, rs_A, cs_A,
61 buff_B, rs_B, cs_B );
62
63 break;
64 }
65
66 case FLA_DOUBLE:
67 {
68 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
69 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
70 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
71
72 bl1_dtrmm( blis_side,
73 blis_uplo,
74 blis_trans,
75 blis_diag,
76 m_B,
77 n_B,
78 buff_alpha,
79 buff_A, rs_A, cs_A,
80 buff_B, rs_B, cs_B );
81
82 break;
83 }
84
85 case FLA_COMPLEX:
86 {
87 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
88 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
89 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
90
91 bl1_ctrmm( blis_side,
92 blis_uplo,
93 blis_trans,
94 blis_diag,
95 m_B,
96 n_B,
97 buff_alpha,
98 buff_A, rs_A, cs_A,
99 buff_B, rs_B, cs_B );
100
101 break;
102 }
103
104
105 case FLA_DOUBLE_COMPLEX:
106 {
107 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
108 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
109 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
110
111 bl1_ztrmm( blis_side,
112 blis_uplo,
113 blis_trans,
114 blis_diag,
115 m_B,
116 n_B,
117 buff_alpha,
118 buff_A, rs_A, cs_A,
119 buff_B, rs_B, cs_B );
120
121 break;
122 }
123
124 }
125
126 return FLA_SUCCESS;
127}
void FLA_Param_map_flame_to_blis_diag(FLA_Diag diag, diag1_t *blis_diag)
Definition FLA_Param.c:317
void bl1_strmm(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_trmm.c:13
void bl1_ctrmm(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_trmm.c:219
void bl1_ztrmm(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_trmm.c:369
void bl1_dtrmm(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_trmm.c:116
diag1_t
Definition blis_type_defs.h:73

References bl1_ctrmm(), bl1_dtrmm(), bl1_strmm(), bl1_ztrmm(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_diag(), FLA_Param_map_flame_to_blis_side(), FLA_Param_map_flame_to_blis_trans(), FLA_Param_map_flame_to_blis_uplo(), and FLA_Trmm_check().

Referenced by FLA_LQ_UT_blk_var2(), FLA_QR_UT_blk_var2(), FLA_Trmm(), FLA_Trmm_llc_task(), FLA_Trmm_llh_task(), FLA_Trmm_lln_task(), FLA_Trmm_llt_task(), FLA_Trmm_luc_task(), FLA_Trmm_luh_task(), FLA_Trmm_lun_task(), FLA_Trmm_lut_task(), FLA_Trmm_rlc_task(), FLA_Trmm_rlh_task(), FLA_Trmm_rln_task(), FLA_Trmm_rlt_task(), FLA_Trmm_ruc_task(), FLA_Trmm_ruh_task(), FLA_Trmm_run_task(), FLA_Trmm_rut_task(), and FLA_Trmm_task().

◆ FLA_Trmm_external_gpu()

FLA_Error FLA_Trmm_external_gpu ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans trans,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
void * A_gpu,
FLA_Obj B,
void * B_gpu )
18{
19 FLA_Datatype datatype;
20 int m_B, n_B;
21 int ldim_A;
22 int ldim_B;
23 char blas_side;
24 char blas_uplo;
25 char blas_trans;
26 char blas_diag;
27
28 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
29 FLA_Trmm_check( side, uplo, trans, diag, alpha, A, B );
30
31 if ( FLA_Obj_has_zero_dim( B ) ) return FLA_SUCCESS;
32
33 datatype = FLA_Obj_datatype( A );
34
35 ldim_A = FLA_Obj_length( A );
36
37 m_B = FLA_Obj_length( B );
38 n_B = FLA_Obj_width( B );
39 ldim_B = FLA_Obj_length( B );
40
41 FLA_Param_map_flame_to_netlib_side( side, &blas_side );
42 FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
43 FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
44 FLA_Param_map_flame_to_netlib_diag( diag, &blas_diag );
45
46
47 switch( datatype ){
48
49 case FLA_FLOAT:
50 {
51 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
52
53 cublasStrmm( blas_side,
54 blas_uplo,
55 blas_trans,
56 blas_diag,
57 m_B,
58 n_B,
59 *buff_alpha,
60 ( float * ) A_gpu, ldim_A,
61 ( float * ) B_gpu, ldim_B );
62
63 break;
64 }
65
66 case FLA_DOUBLE:
67 {
68 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
69
70 cublasDtrmm( blas_side,
71 blas_uplo,
72 blas_trans,
73 blas_diag,
74 m_B,
75 n_B,
76 *buff_alpha,
77 ( double * ) A_gpu, ldim_A,
78 ( double * ) B_gpu, ldim_B );
79
80 break;
81 }
82
83 case FLA_COMPLEX:
84 {
85 cuComplex *buff_alpha = ( cuComplex * ) FLA_COMPLEX_PTR( alpha );
86
87 cublasCtrmm( blas_side,
88 blas_uplo,
89 blas_trans,
90 blas_diag,
91 m_B,
92 n_B,
93 *buff_alpha,
94 ( cuComplex * ) A_gpu, ldim_A,
95 ( cuComplex * ) B_gpu, ldim_B );
96
97 break;
98 }
99
100 case FLA_DOUBLE_COMPLEX:
101 {
102 cuDoubleComplex *buff_alpha = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
103
104 cublasZtrmm( blas_side,
105 blas_uplo,
106 blas_trans,
107 blas_diag,
108 m_B,
109 n_B,
110 *buff_alpha,
111 ( cuDoubleComplex * ) A_gpu, ldim_A,
112 ( cuDoubleComplex * ) B_gpu, ldim_B );
113
114 break;
115 }
116
117 }
118
119 return FLA_SUCCESS;
120}
void FLA_Param_map_flame_to_netlib_diag(FLA_Diag diag, void *blas_diag)
Definition FLA_Param.c:95

References FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_diag(), FLA_Param_map_flame_to_netlib_side(), FLA_Param_map_flame_to_netlib_trans(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Trmm_check().

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Trmm_internal_check()

FLA_Error FLA_Trmm_internal_check ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans trans,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
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 if ( side == FLA_LEFT )
29 {
30 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B );
31 FLA_Check_error_code( e_val );
32 }
33 else
34 {
35 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, B );
36 FLA_Check_error_code( e_val );
37 }
38
39 return FLA_SUCCESS;
40}

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

Referenced by FLA_Trmm_internal().

◆ FLA_Trmm_llc_task()

FLA_Error FLA_Trmm_llc_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
19{
20 return FLA_Trmm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, diag, alpha, A, B );
21}

References FLA_Trmm_external().

Referenced by FLA_Trmm_llc().

◆ FLA_Trmm_llh_task()

FLA_Error FLA_Trmm_llh_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
24{
25 return FLA_Trmm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_CONJ_TRANSPOSE, diag, alpha, A, B );
26}

References FLA_Trmm_external().

Referenced by FLA_Trmm_llh().

◆ FLA_Trmm_lln_task()

FLA_Error FLA_Trmm_lln_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
29{
30 return FLA_Trmm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE, diag, alpha, A, B );
31}

References FLA_Trmm_external().

Referenced by FLA_Trmm_lln().

◆ FLA_Trmm_llt_task()

FLA_Error FLA_Trmm_llt_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
34{
35 return FLA_Trmm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, diag, alpha, A, B );
36}

References FLA_Trmm_external().

Referenced by FLA_Trmm_llt().

◆ FLA_Trmm_luc_task()

FLA_Error FLA_Trmm_luc_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
39{
40 return FLA_Trmm_external( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, diag, alpha, A, B );
41}

References FLA_Trmm_external().

Referenced by FLA_Trmm_luc().

◆ FLA_Trmm_luh_task()

FLA_Error FLA_Trmm_luh_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
44{
45 return FLA_Trmm_external( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, diag, alpha, A, B );
46}

References FLA_Trmm_external().

Referenced by FLA_Trmm_luh().

◆ FLA_Trmm_lun_task()

FLA_Error FLA_Trmm_lun_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
49{
50 return FLA_Trmm_external( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, diag, alpha, A, B );
51}

References FLA_Trmm_external().

Referenced by FLA_Trmm_lun().

◆ FLA_Trmm_lut_task()

FLA_Error FLA_Trmm_lut_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
54{
55 return FLA_Trmm_external( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_TRANSPOSE, diag, alpha, A, B );
56}

References FLA_Trmm_external().

Referenced by FLA_Trmm_lut().

◆ FLA_Trmm_rlc_task()

FLA_Error FLA_Trmm_rlc_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
59{
60 return FLA_Trmm_external( FLA_RIGHT, FLA_LOWER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, diag, alpha, A, B );
61}

References FLA_Trmm_external().

Referenced by FLA_Trmm_rlc().

◆ FLA_Trmm_rlh_task()

FLA_Error FLA_Trmm_rlh_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
64{
65 return FLA_Trmm_external( FLA_RIGHT, FLA_LOWER_TRIANGULAR, FLA_CONJ_TRANSPOSE, diag, alpha, A, B );
66}

References FLA_Trmm_external().

Referenced by FLA_Trmm_rlh().

◆ FLA_Trmm_rln_task()

FLA_Error FLA_Trmm_rln_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
69{
70 return FLA_Trmm_external( FLA_RIGHT, FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE, diag, alpha, A, B );
71}

References FLA_Trmm_external().

Referenced by FLA_Trmm_rln().

◆ FLA_Trmm_rlt_task()

FLA_Error FLA_Trmm_rlt_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
74{
75 return FLA_Trmm_external( FLA_RIGHT, FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, diag, alpha, A, B );
76}

References FLA_Trmm_external().

Referenced by FLA_Trmm_rlt().

◆ FLA_Trmm_ruc_task()

FLA_Error FLA_Trmm_ruc_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
79{
80 return FLA_Trmm_external( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, diag, alpha, A, B );
81}

References FLA_Trmm_external().

Referenced by FLA_Trmm_ruc().

◆ FLA_Trmm_ruh_task()

FLA_Error FLA_Trmm_ruh_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
84{
85 return FLA_Trmm_external( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, diag, alpha, A, B );
86}

References FLA_Trmm_external().

Referenced by FLA_Trmm_ruh().

◆ FLA_Trmm_run_task()

FLA_Error FLA_Trmm_run_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
89{
90 return FLA_Trmm_external( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, diag, alpha, A, B );
91}

References FLA_Trmm_external().

Referenced by FLA_Trmm_run().

◆ FLA_Trmm_rut_task()

FLA_Error FLA_Trmm_rut_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
94{
95 return FLA_Trmm_external( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_TRANSPOSE, diag, alpha, A, B );
96}

References FLA_Trmm_external().

Referenced by FLA_Trmm_rut().

◆ FLA_Trmm_task()

FLA_Error FLA_Trmm_task ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans trans,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trmm_t * cntl )
14{
15 return FLA_Trmm_external( side, uplo, trans, diag, alpha, A, B );
16}

References FLA_Trmm_external().

Referenced by FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Trmmsx()

FLA_Error FLA_Trmmsx ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans transa,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
14{
15 return FLA_Trmmsx_external( side, uplo, trans, diag, alpha, A, B, beta, C );
16}
FLA_Error FLA_Trmmsx_external(FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Trmmsx_external.c:13

References FLA_Trmmsx_external().

◆ FLA_Trmmsx_check()

FLA_Error FLA_Trmmsx_check ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans transa,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
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 e_val = FLA_Check_valid_diag( diag );
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_floating_object( A );
30 FLA_Check_error_code( e_val );
31
33 FLA_Check_error_code( e_val );
34
36 FLA_Check_error_code( e_val );
37
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_consistent_object_datatype( A, alpha );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_consistent_object_datatype( A, beta );
45 FLA_Check_error_code( e_val );
46
47 e_val = FLA_Check_if_scalar( alpha );
48 FLA_Check_error_code( e_val );
49
50 e_val = FLA_Check_if_scalar( beta );
51 FLA_Check_error_code( e_val );
52
53 e_val = FLA_Check_square( A );
54 FLA_Check_error_code( e_val );
55
56 if ( side == FLA_LEFT )
57 {
58 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, C );
59 FLA_Check_error_code( e_val );
60 }
61 else
62 {
63 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, C );
64 FLA_Check_error_code( e_val );
65 }
66
67 return FLA_SUCCESS;
68}

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_diag(), FLA_Check_valid_leftright_side(), FLA_Check_valid_trans(), and FLA_Check_valid_uplo().

Referenced by FLA_Trmmsx_external().

◆ FLA_Trmmsx_external()

FLA_Error FLA_Trmmsx_external ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans transa,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
14{
15 FLA_Datatype datatype;
16 int m_B, n_B;
17 int rs_A, cs_A;
18 int rs_B, cs_B;
19 int rs_C, cs_C;
20 side1_t blis_side;
21 uplo1_t blis_uplo;
22 trans1_t blis_trans;
23 diag1_t blis_diag;
24
25 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
26 FLA_Trmmsx_check( side, uplo, trans, diag, alpha, A, B, beta, C );
27
28 if ( FLA_Obj_has_zero_dim( B ) ) return FLA_SUCCESS;
29
30 datatype = FLA_Obj_datatype( A );
31
32 rs_A = FLA_Obj_row_stride( A );
33 cs_A = FLA_Obj_col_stride( A );
34
35 m_B = FLA_Obj_length( B );
36 n_B = FLA_Obj_width( B );
37 rs_B = FLA_Obj_row_stride( B );
38 cs_B = FLA_Obj_col_stride( B );
39
40 rs_C = FLA_Obj_row_stride( C );
41 cs_C = FLA_Obj_col_stride( C );
42
43 FLA_Param_map_flame_to_blis_side( side, &blis_side );
44 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
45 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
46 FLA_Param_map_flame_to_blis_diag( diag, &blis_diag );
47
48
49 switch( datatype ){
50
51 case FLA_FLOAT:
52 {
53 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
54 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
55 float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
56 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
57 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
58
59 bl1_strmmsx( blis_side,
60 blis_uplo,
61 blis_trans,
62 blis_diag,
63 m_B,
64 n_B,
65 buff_alpha,
66 buff_A, rs_A, cs_A,
67 buff_B, rs_B, cs_B,
68 buff_beta,
69 buff_C, rs_C, cs_C );
70
71 break;
72 }
73
74 case FLA_DOUBLE:
75 {
76 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
77 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
78 double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
79 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
80 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
81
82 bl1_dtrmmsx( blis_side,
83 blis_uplo,
84 blis_trans,
85 blis_diag,
86 m_B,
87 n_B,
88 buff_alpha,
89 buff_A, rs_A, cs_A,
90 buff_B, rs_B, cs_B,
91 buff_beta,
92 buff_C, rs_C, cs_C );
93
94 break;
95 }
96
97 case FLA_COMPLEX:
98 {
99 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
100 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
101 scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
102 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
103 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
104
105 bl1_ctrmmsx( blis_side,
106 blis_uplo,
107 blis_trans,
108 blis_diag,
109 m_B,
110 n_B,
111 buff_alpha,
112 buff_A, rs_A, cs_A,
113 buff_B, rs_B, cs_B,
114 buff_beta,
115 buff_C, rs_C, cs_C );
116
117 break;
118 }
119
120
121 case FLA_DOUBLE_COMPLEX:
122 {
123 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
124 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
125 dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C );
126 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
127 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
128
129 bl1_ztrmmsx( blis_side,
130 blis_uplo,
131 blis_trans,
132 blis_diag,
133 m_B,
134 n_B,
135 buff_alpha,
136 buff_A, rs_A, cs_A,
137 buff_B, rs_B, cs_B,
138 buff_beta,
139 buff_C, rs_C, cs_C );
140
141 break;
142 }
143
144 }
145
146 return FLA_SUCCESS;
147}
FLA_Error FLA_Trmmsx_check(FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Trmmsx_check.c:13
void bl1_strmmsx(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs, float *beta, float *c, int c_rs, int c_cs)
Definition bl1_trmmsx.c:13
void bl1_ztrmmsx(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs, dcomplex *beta, dcomplex *c, int c_rs, int c_cs)
Definition bl1_trmmsx.c:331
void bl1_dtrmmsx(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs, double *beta, double *c, int c_rs, int c_cs)
Definition bl1_trmmsx.c:119
void bl1_ctrmmsx(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs, scomplex *beta, scomplex *c, int c_rs, int c_cs)
Definition bl1_trmmsx.c:225

References bl1_ctrmmsx(), bl1_dtrmmsx(), bl1_strmmsx(), bl1_ztrmmsx(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_diag(), FLA_Param_map_flame_to_blis_side(), FLA_Param_map_flame_to_blis_trans(), FLA_Param_map_flame_to_blis_uplo(), and FLA_Trmmsx_check().

Referenced by FLA_Trmmsx().

◆ FLA_Trsm()

FLA_Error FLA_Trsm ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans trans,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B )
16{
17 FLA_Error r_val = FLA_SUCCESS;
18
19 // Check parameters.
20 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
21 FLA_Trsm_check( side, uplo, trans, diag, alpha, A, B );
22
23#ifdef FLA_ENABLE_BLAS3_FRONT_END_CNTL_TREES
24 r_val = FLA_Trsm_internal( side, uplo, trans, diag, alpha, A, B, fla_trsm_cntl_mm );
25#else
26 r_val = FLA_Trsm_external( side, uplo, trans, diag, alpha, A, B );
27#endif
28
29 return r_val;
30}
fla_trsm_t * fla_trsm_cntl_mm
Definition FLA_Trsm_cntl_init.c:19
FLA_Error FLA_Trsm_internal(FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, fla_trsm_t *cntl)
Definition FLA_Trsm_internal.c:16
FLA_Error FLA_Trsm_check(FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B)
Definition FLA_Trsm_check.c:13
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

References FLA_Check_error_level(), FLA_Trsm_check(), fla_trsm_cntl_mm, FLA_Trsm_external(), and FLA_Trsm_internal().

◆ FLA_Trsm_check()

FLA_Error FLA_Trsm_check ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans transa,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B )
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 e_val = FLA_Check_valid_diag( diag );
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_floating_object( A );
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_consistent_object_datatype( A, alpha );
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_if_scalar( alpha );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_square( A );
45 FLA_Check_error_code( e_val );
46
47 if ( side == FLA_LEFT )
48 {
49 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B );
50 FLA_Check_error_code( e_val );
51 }
52 else
53 {
54 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, B );
55 FLA_Check_error_code( e_val );
56 }
57
58 return FLA_SUCCESS;
59}

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_diag(), FLA_Check_valid_leftright_side(), FLA_Check_valid_trans(), and FLA_Check_valid_uplo().

Referenced by FLA_Trsm(), FLA_Trsm_external(), FLA_Trsm_external_gpu(), and FLASH_Trsm().

◆ FLA_Trsm_external()

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 )
14{
15 FLA_Datatype datatype;
16 int m_B, n_B;
17 int rs_A, cs_A;
18 int rs_B, cs_B;
19 side1_t blis_side;
20 uplo1_t blis_uplo;
21 trans1_t blis_trans;
22 diag1_t blis_diag;
23
24 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
25 FLA_Trsm_check( side, uplo, trans, diag, alpha, A, B );
26
27 if ( FLA_Obj_has_zero_dim( B ) ) return FLA_SUCCESS;
28
29 datatype = FLA_Obj_datatype( A );
30
31 rs_A = FLA_Obj_row_stride( A );
32 cs_A = FLA_Obj_col_stride( A );
33
34 m_B = FLA_Obj_length( B );
35 n_B = FLA_Obj_width( B );
36 rs_B = FLA_Obj_row_stride( B );
37 cs_B = FLA_Obj_col_stride( B );
38
39 FLA_Param_map_flame_to_blis_side( side, &blis_side );
40 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
41 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
42 FLA_Param_map_flame_to_blis_diag( diag, &blis_diag );
43
44
45 switch( datatype ){
46
47 case FLA_FLOAT:
48 {
49 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
50 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
51 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
52
53 bl1_strsm( blis_side,
54 blis_uplo,
55 blis_trans,
56 blis_diag,
57 m_B,
58 n_B,
59 buff_alpha,
60 buff_A, rs_A, cs_A,
61 buff_B, rs_B, cs_B );
62
63 break;
64 }
65
66 case FLA_DOUBLE:
67 {
68 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
69 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
70 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
71
72 bl1_dtrsm( blis_side,
73 blis_uplo,
74 blis_trans,
75 blis_diag,
76 m_B,
77 n_B,
78 buff_alpha,
79 buff_A, rs_A, cs_A,
80 buff_B, rs_B, cs_B );
81
82 break;
83 }
84
85 case FLA_COMPLEX:
86 {
87 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
88 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
89 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
90
91 bl1_ctrsm( blis_side,
92 blis_uplo,
93 blis_trans,
94 blis_diag,
95 m_B,
96 n_B,
97 buff_alpha,
98 buff_A, rs_A, cs_A,
99 buff_B, rs_B, cs_B );
100
101 break;
102 }
103
104
105 case FLA_DOUBLE_COMPLEX:
106 {
107 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
108 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
109 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
110
111 bl1_ztrsm( blis_side,
112 blis_uplo,
113 blis_trans,
114 blis_diag,
115 m_B,
116 n_B,
117 buff_alpha,
118 buff_A, rs_A, cs_A,
119 buff_B, rs_B, cs_B );
120
121 break;
122 }
123
124 }
125
126 return FLA_SUCCESS;
127}
void bl1_dtrsm(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition bl1_trsm.c:116
void bl1_ztrsm(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition bl1_trsm.c:369
void bl1_ctrsm(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition bl1_trsm.c:219
void bl1_strsm(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition bl1_trsm.c:13

References bl1_ctrsm(), bl1_dtrsm(), bl1_strsm(), bl1_ztrsm(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_diag(), FLA_Param_map_flame_to_blis_side(), FLA_Param_map_flame_to_blis_trans(), FLA_Param_map_flame_to_blis_uplo(), and FLA_Trsm_check().

Referenced by FLA_Chol_solve(), FLA_Hess_UT_blf_var2(), FLA_Hess_UT_blf_var3(), FLA_Hess_UT_blf_var4(), FLA_Hess_UT_blk_var1(), FLA_Hess_UT_blk_var2(), FLA_Hess_UT_blk_var3(), FLA_Hess_UT_blk_var4(), FLA_Hess_UT_blk_var5(), FLA_LQ_UT_solve(), FLA_LU_nopiv_blk_var1(), FLA_LU_nopiv_blk_var2(), FLA_LU_nopiv_blk_var3(), FLA_LU_nopiv_solve(), FLA_LU_nopiv_unb_var1(), FLA_LU_nopiv_unb_var2(), FLA_LU_nopiv_unb_var3(), FLA_LU_piv_blk_var3(), FLA_LU_piv_solve(), FLA_LU_piv_unb_var3(), FLA_LU_piv_unb_var3b(), FLA_QR_UT_solve(), FLA_SA_FS_blk(), FLA_SA_LU_blk(), FLA_Trsm(), FLA_Trsm_llc_task(), FLA_Trsm_llh_task(), FLA_Trsm_lln_task(), FLA_Trsm_llt_task(), FLA_Trsm_luc_task(), FLA_Trsm_luh_task(), FLA_Trsm_lun_task(), FLA_Trsm_lut_task(), FLA_Trsm_piv_task(), FLA_Trsm_rlc_task(), FLA_Trsm_rlh_task(), FLA_Trsm_rln_task(), FLA_Trsm_rlt_task(), FLA_Trsm_ruc_task(), FLA_Trsm_ruh_task(), FLA_Trsm_run_task(), FLA_Trsm_rut_task(), FLA_Trsm_task(), and FLA_UDdate_UT_solve().

◆ FLA_Trsm_external_gpu()

FLA_Error FLA_Trsm_external_gpu ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans trans,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
void * A_gpu,
FLA_Obj B,
void * B_gpu )
18{
19 FLA_Datatype datatype;
20 int m_B, n_B;
21 int ldim_A;
22 int ldim_B;
23 char blas_side;
24 char blas_uplo;
25 char blas_trans;
26 char blas_diag;
27
28 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
29 FLA_Trsm_check( side, uplo, trans, diag, alpha, A, B );
30
31 if ( FLA_Obj_has_zero_dim( B ) ) return FLA_SUCCESS;
32
33 datatype = FLA_Obj_datatype( A );
34
35 ldim_A = FLA_Obj_length( A );
36
37 m_B = FLA_Obj_length( B );
38 n_B = FLA_Obj_width( B );
39 ldim_B = FLA_Obj_length( B );
40
41 FLA_Param_map_flame_to_netlib_side( side, &blas_side );
42 FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
43 FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
44 FLA_Param_map_flame_to_netlib_diag( diag, &blas_diag );
45
46
47 switch( datatype ){
48
49 case FLA_FLOAT:
50 {
51 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
52
53 cublasStrsm( blas_side,
54 blas_uplo,
55 blas_trans,
56 blas_diag,
57 m_B,
58 n_B,
59 *buff_alpha,
60 ( float * ) A_gpu, ldim_A,
61 ( float * ) B_gpu, ldim_B );
62
63 break;
64 }
65
66 case FLA_DOUBLE:
67 {
68 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
69
70 cublasDtrsm( blas_side,
71 blas_uplo,
72 blas_trans,
73 blas_diag,
74 m_B,
75 n_B,
76 *buff_alpha,
77 ( double * ) A_gpu, ldim_A,
78 ( double * ) B_gpu, ldim_B );
79
80 break;
81 }
82
83 case FLA_COMPLEX:
84 {
85 cuComplex *buff_alpha = ( cuComplex * ) FLA_COMPLEX_PTR( alpha );
86
87 cublasCtrsm( blas_side,
88 blas_uplo,
89 blas_trans,
90 blas_diag,
91 m_B,
92 n_B,
93 *buff_alpha,
94 ( cuComplex * ) A_gpu, ldim_A,
95 ( cuComplex * ) B_gpu, ldim_B );
96
97 break;
98 }
99
100 case FLA_DOUBLE_COMPLEX:
101 {
102 cuDoubleComplex *buff_alpha = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
103
104 cublasZtrsm( blas_side,
105 blas_uplo,
106 blas_trans,
107 blas_diag,
108 m_B,
109 n_B,
110 *buff_alpha,
111 ( cuDoubleComplex * ) A_gpu, ldim_A,
112 ( cuDoubleComplex * ) B_gpu, ldim_B );
113
114 break;
115 }
116
117 }
118
119 return FLA_SUCCESS;
120}

References FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_width(), FLA_Param_map_flame_to_netlib_diag(), FLA_Param_map_flame_to_netlib_side(), FLA_Param_map_flame_to_netlib_trans(), FLA_Param_map_flame_to_netlib_uplo(), and FLA_Trsm_check().

Referenced by FLASH_Queue_exec_task_gpu().

◆ FLA_Trsm_internal_check()

FLA_Error FLA_Trsm_internal_check ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans trans,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
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 if ( side == FLA_LEFT )
29 {
30 //e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, B );
31 //FLA_Check_error_code( e_val );
33 FLA_Check_error_code( e_val );
34 }
35 else
36 {
37 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, B );
38 FLA_Check_error_code( e_val );
39 }
40
41 return FLA_SUCCESS;
42}
FLA_Error FLA_Check_object_length_equals(FLA_Obj A, dim_t m)
Definition FLA_Check.c:1039

References FLA_Check_identical_object_elemtype(), FLA_Check_matrix_matrix_dims(), FLA_Check_null_pointer(), FLA_Check_object_length_equals(), and FLA_Obj_length().

Referenced by FLA_Trsm_internal().

◆ FLA_Trsm_llc_task()

FLA_Error FLA_Trsm_llc_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
19{
20 return FLA_Trsm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, diag, alpha, A, B );
21}

References FLA_Trsm_external().

Referenced by FLA_Trsm_llc().

◆ FLA_Trsm_llh_task()

FLA_Error FLA_Trsm_llh_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
24{
25 return FLA_Trsm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_CONJ_TRANSPOSE, diag, alpha, A, B );
26}

References FLA_Trsm_external().

Referenced by FLA_Trsm_llh().

◆ FLA_Trsm_lln_task()

FLA_Error FLA_Trsm_lln_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
29{
30 return FLA_Trsm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE, diag, alpha, A, B );
31}

References FLA_Trsm_external().

Referenced by FLA_Trsm_lln().

◆ FLA_Trsm_llt_task()

FLA_Error FLA_Trsm_llt_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
34{
35 return FLA_Trsm_external( FLA_LEFT, FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, diag, alpha, A, B );
36}

References FLA_Trsm_external().

Referenced by FLA_Trsm_llt().

◆ FLA_Trsm_luc_task()

FLA_Error FLA_Trsm_luc_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
39{
40 return FLA_Trsm_external( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, diag, alpha, A, B );
41}

References FLA_Trsm_external().

Referenced by FLA_Trsm_luc().

◆ FLA_Trsm_luh_task()

FLA_Error FLA_Trsm_luh_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
44{
45 return FLA_Trsm_external( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, diag, alpha, A, B );
46}

References FLA_Trsm_external().

Referenced by FLA_Trsm_luh().

◆ FLA_Trsm_lun_task()

FLA_Error FLA_Trsm_lun_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
49{
50 return FLA_Trsm_external( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, diag, alpha, A, B );
51}

References FLA_Trsm_external().

Referenced by FLA_Trsm_lun().

◆ FLA_Trsm_lut_task()

FLA_Error FLA_Trsm_lut_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
54{
55 return FLA_Trsm_external( FLA_LEFT, FLA_UPPER_TRIANGULAR, FLA_TRANSPOSE, diag, alpha, A, B );
56}

References FLA_Trsm_external().

Referenced by FLA_Trsm_lut().

◆ FLA_Trsm_rlc_task()

FLA_Error FLA_Trsm_rlc_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
59{
60 return FLA_Trsm_external( FLA_RIGHT, FLA_LOWER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, diag, alpha, A, B );
61}

References FLA_Trsm_external().

Referenced by FLA_Trsm_rlc().

◆ FLA_Trsm_rlh_task()

FLA_Error FLA_Trsm_rlh_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
64{
65 return FLA_Trsm_external( FLA_RIGHT, FLA_LOWER_TRIANGULAR, FLA_CONJ_TRANSPOSE, diag, alpha, A, B );
66}

References FLA_Trsm_external().

Referenced by FLA_Trsm_rlh().

◆ FLA_Trsm_rln_task()

FLA_Error FLA_Trsm_rln_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
69{
70 return FLA_Trsm_external( FLA_RIGHT, FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE, diag, alpha, A, B );
71}

References FLA_Trsm_external().

Referenced by FLA_Trsm_rln().

◆ FLA_Trsm_rlt_task()

FLA_Error FLA_Trsm_rlt_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
74{
75 return FLA_Trsm_external( FLA_RIGHT, FLA_LOWER_TRIANGULAR, FLA_TRANSPOSE, diag, alpha, A, B );
76}

References FLA_Trsm_external().

Referenced by FLA_Trsm_rlt().

◆ FLA_Trsm_ruc_task()

FLA_Error FLA_Trsm_ruc_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
79{
80 return FLA_Trsm_external( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_CONJ_NO_TRANSPOSE, diag, alpha, A, B );
81}

References FLA_Trsm_external().

Referenced by FLA_Trsm_ruc().

◆ FLA_Trsm_ruh_task()

FLA_Error FLA_Trsm_ruh_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
84{
85 return FLA_Trsm_external( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_CONJ_TRANSPOSE, diag, alpha, A, B );
86}

References FLA_Trsm_external().

Referenced by FLA_Trsm_ruh().

◆ FLA_Trsm_run_task()

FLA_Error FLA_Trsm_run_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
89{
90 return FLA_Trsm_external( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_NO_TRANSPOSE, diag, alpha, A, B );
91}

References FLA_Trsm_external().

Referenced by FLA_Trsm_run().

◆ FLA_Trsm_rut_task()

FLA_Error FLA_Trsm_rut_task ( FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
94{
95 return FLA_Trsm_external( FLA_RIGHT, FLA_UPPER_TRIANGULAR, FLA_TRANSPOSE, diag, alpha, A, B );
96}

References FLA_Trsm_external().

Referenced by FLA_Trsm_rut().

◆ FLA_Trsm_task()

FLA_Error FLA_Trsm_task ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans trans,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
fla_trsm_t * cntl )
14{
15 return FLA_Trsm_external( side, uplo, trans, diag, alpha, A, B );
16}

References FLA_Trsm_external().

Referenced by FLASH_Queue_exec_task(), and FLASH_Queue_exec_task_gpu().

◆ FLA_Trsmsx()

FLA_Error FLA_Trsmsx ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans transa,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
14{
15 return FLA_Trsmsx_external( side, uplo, trans, diag, alpha, A, B, beta, C );
16}
FLA_Error FLA_Trsmsx_external(FLA_Side side, FLA_Uplo uplo, FLA_Trans transa, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Trsmsx_external.c:13

References FLA_Trsmsx_external().

◆ FLA_Trsmsx_check()

FLA_Error FLA_Trsmsx_check ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans transa,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
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 e_val = FLA_Check_valid_diag( diag );
27 FLA_Check_error_code( e_val );
28
29 e_val = FLA_Check_floating_object( A );
30 FLA_Check_error_code( e_val );
31
33 FLA_Check_error_code( e_val );
34
36 FLA_Check_error_code( e_val );
37
39 FLA_Check_error_code( e_val );
40
41 e_val = FLA_Check_consistent_object_datatype( A, alpha );
42 FLA_Check_error_code( e_val );
43
44 e_val = FLA_Check_consistent_object_datatype( A, beta );
45 FLA_Check_error_code( e_val );
46
47 e_val = FLA_Check_if_scalar( alpha );
48 FLA_Check_error_code( e_val );
49
50 e_val = FLA_Check_if_scalar( beta );
51 FLA_Check_error_code( e_val );
52
53 e_val = FLA_Check_square( A );
54 FLA_Check_error_code( e_val );
55
56 if ( side == FLA_LEFT )
57 {
58 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, A, B, C );
59 FLA_Check_error_code( e_val );
60 }
61 else
62 {
63 e_val = FLA_Check_matrix_matrix_dims( FLA_NO_TRANSPOSE, FLA_NO_TRANSPOSE, B, A, C );
64 FLA_Check_error_code( e_val );
65 }
66
67 return FLA_SUCCESS;
68}

References FLA_Check_consistent_object_datatype(), FLA_Check_floating_object(), FLA_Check_identical_object_datatype(), FLA_Check_if_scalar(), FLA_Check_matrix_matrix_dims(), FLA_Check_nonconstant_object(), FLA_Check_square(), FLA_Check_valid_diag(), FLA_Check_valid_leftright_side(), FLA_Check_valid_trans(), and FLA_Check_valid_uplo().

Referenced by FLA_Trsmsx_external().

◆ FLA_Trsmsx_external()

FLA_Error FLA_Trsmsx_external ( FLA_Side side,
FLA_Uplo uplo,
FLA_Trans transa,
FLA_Diag diag,
FLA_Obj alpha,
FLA_Obj A,
FLA_Obj B,
FLA_Obj beta,
FLA_Obj C )
14{
15 FLA_Datatype datatype;
16 int m_B, n_B;
17 int rs_A, cs_A;
18 int rs_B, cs_B;
19 int rs_C, cs_C;
20 side1_t blis_side;
21 uplo1_t blis_uplo;
22 trans1_t blis_trans;
23 diag1_t blis_diag;
24
25 if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
26 FLA_Trsmsx_check( side, uplo, trans, diag, alpha, A, B, beta, C );
27
28 if ( FLA_Obj_has_zero_dim( B ) ) return FLA_SUCCESS;
29
30 datatype = FLA_Obj_datatype( A );
31
32 rs_A = FLA_Obj_row_stride( A );
33 cs_A = FLA_Obj_col_stride( A );
34
35 m_B = FLA_Obj_length( B );
36 n_B = FLA_Obj_width( B );
37 rs_B = FLA_Obj_row_stride( B );
38 cs_B = FLA_Obj_col_stride( B );
39
40 rs_C = FLA_Obj_row_stride( C );
41 cs_C = FLA_Obj_col_stride( C );
42
43 FLA_Param_map_flame_to_blis_side( side, &blis_side );
44 FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
45 FLA_Param_map_flame_to_blis_trans( trans, &blis_trans );
46 FLA_Param_map_flame_to_blis_diag( diag, &blis_diag );
47
48
49 switch( datatype ){
50
51 case FLA_FLOAT:
52 {
53 float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
54 float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
55 float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
56 float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
57 float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
58
59 bl1_strsmsx( blis_side,
60 blis_uplo,
61 blis_trans,
62 blis_diag,
63 m_B,
64 n_B,
65 buff_alpha,
66 buff_A, rs_A, cs_A,
67 buff_B, rs_B, cs_B,
68 buff_beta,
69 buff_C, rs_C, cs_C );
70
71 break;
72 }
73
74 case FLA_DOUBLE:
75 {
76 double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
77 double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
78 double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
79 double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
80 double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
81
82 bl1_dtrsmsx( blis_side,
83 blis_uplo,
84 blis_trans,
85 blis_diag,
86 m_B,
87 n_B,
88 buff_alpha,
89 buff_A, rs_A, cs_A,
90 buff_B, rs_B, cs_B,
91 buff_beta,
92 buff_C, rs_C, cs_C );
93
94 break;
95 }
96
97 case FLA_COMPLEX:
98 {
99 scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
100 scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
101 scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
102 scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
103 scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
104
105 bl1_ctrsmsx( blis_side,
106 blis_uplo,
107 blis_trans,
108 blis_diag,
109 m_B,
110 n_B,
111 buff_alpha,
112 buff_A, rs_A, cs_A,
113 buff_B, rs_B, cs_B,
114 buff_beta,
115 buff_C, rs_C, cs_C );
116
117 break;
118 }
119
120
121 case FLA_DOUBLE_COMPLEX:
122 {
123 dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
124 dcomplex *buff_B = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( B );
125 dcomplex *buff_C = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( C );
126 dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
127 dcomplex *buff_beta = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( beta );
128
129 bl1_ztrsmsx( blis_side,
130 blis_uplo,
131 blis_trans,
132 blis_diag,
133 m_B,
134 n_B,
135 buff_alpha,
136 buff_A, rs_A, cs_A,
137 buff_B, rs_B, cs_B,
138 buff_beta,
139 buff_C, rs_C, cs_C );
140
141 break;
142 }
143
144 }
145
146 return FLA_SUCCESS;
147}
FLA_Error FLA_Trsmsx_check(FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C)
Definition FLA_Trsmsx_check.c:13
void bl1_dtrsmsx(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs, double *beta, double *c, int c_rs, int c_cs)
Definition bl1_trsmsx.c:119
void bl1_ztrsmsx(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs, dcomplex *beta, dcomplex *c, int c_rs, int c_cs)
Definition bl1_trsmsx.c:331
void bl1_strsmsx(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs, float *beta, float *c, int c_rs, int c_cs)
Definition bl1_trsmsx.c:13
void bl1_ctrsmsx(side1_t side, uplo1_t uplo, trans1_t trans, diag1_t diag, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs, scomplex *beta, scomplex *c, int c_rs, int c_cs)
Definition bl1_trsmsx.c:225

References bl1_ctrsmsx(), bl1_dtrsmsx(), bl1_strsmsx(), bl1_ztrsmsx(), FLA_Check_error_level(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_has_zero_dim(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_width(), FLA_Param_map_flame_to_blis_diag(), FLA_Param_map_flame_to_blis_side(), FLA_Param_map_flame_to_blis_trans(), FLA_Param_map_flame_to_blis_uplo(), and FLA_Trsmsx_check().

Referenced by FLA_Trsmsx().