Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
|
#include <spctr_comm.h>
Public Member Functions | |
void | run (char *A, int nblk_A, int64_t const *size_blk_A, char *B, int nblk_B, int64_t const *size_blk_B, char *C, int nblk_C, int64_t *size_blk_C, char *&new_C) |
int64_t | spmem_fp (double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
returns the number of bytes of buffer space we need More... | |
int64_t | spmem_rec (double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
returns the number of bytes need by each processor in this kernel and its recursive calls More... | |
double | est_time_fp (int nlyr, double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
returns the execution time the local part this kernel is estimated to take More... | |
double | est_time_rec (int nlyr, double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
returns the execution time this kernel and its recursive calls are estimated to take More... | |
void | print () |
spctr * | clone () |
spctr_replicate (spctr *other) | |
~spctr_replicate () | |
spctr_replicate (contraction const *c, int const *phys_mapped, int64_t blk_sz_A, int64_t blk_sz_B, int64_t blk_sz_C) | |
Public Member Functions inherited from CTF_int::spctr | |
~spctr () | |
spctr (spctr *other) | |
double | est_time_fp (int nlyr) |
double | est_time_rec (int nlyr) |
void | run (char *A, char *B, char *C) |
spctr (contraction const *c) | |
Public Member Functions inherited from CTF_int::ctr | |
virtual int64_t | mem_fp () |
virtual int64_t | mem_rec () |
virtual | ~ctr () |
deallocates generic ctr object More... | |
ctr (ctr *other) | |
copies generic ctr object More... | |
ctr (contraction const *c) | |
main constructor, defines variable based on contraction class More... | |
Data Fields | |
int | ncdt_A |
int | ncdt_B |
int | ncdt_C |
int64_t | size_A |
int64_t | size_B |
int64_t | size_C |
CommData ** | cdt_A |
CommData ** | cdt_B |
CommData ** | cdt_C |
spctr * | rec_ctr |
Data Fields inherited from CTF_int::spctr | |
bool | is_sparse_A |
bool | is_sparse_B |
bool | is_sparse_C |
char * | new_C |
Data Fields inherited from CTF_int::ctr | |
algstrct const * | sr_A |
algstrct const * | sr_B |
algstrct const * | sr_C |
char const * | beta |
int | num_lyr |
int | idx_lyr |
Definition at line 11 of file spctr_comm.h.
CTF_int::spctr_replicate::spctr_replicate | ( | spctr * | other | ) |
CTF_int::spctr_replicate::~spctr_replicate | ( | ) |
Definition at line 85 of file spctr_comm.cxx.
References CTF_int::cdealloc(), cdt_A, cdt_B, cdt_C, ncdt_A, ncdt_B, ncdt_C, and rec_ctr.
CTF_int::spctr_replicate::spctr_replicate | ( | contraction const * | c, |
int const * | phys_mapped, | ||
int64_t | blk_sz_A, | ||
int64_t | blk_sz_B, | ||
int64_t | blk_sz_C | ||
) |
Definition at line 10 of file spctr_comm.cxx.
References CTF_int::contraction::A, CTF_int::alloc_ptr(), CTF_int::contraction::B, CTF_int::contraction::C, cdt_A, cdt_B, cdt_C, CTF_int::topology::dim_comm, ncdt_A, ncdt_B, ncdt_C, CTF_int::topology::order, size_A, size_B, size_C, and CTF_int::tensor::topo.
|
virtual |
Reimplemented from CTF_int::spctr.
Definition at line 115 of file spctr_comm.cxx.
References spctr_replicate().
|
virtual |
returns the execution time the local part this kernel is estimated to take
[in] | nlyr | amount of replication |
[in] | nnz_frac_A | percentage of nonzeros in tensor A |
[in] | nnz_frac_B | percentage of nonzeros in tensor B |
[in] | nnz_frac_C | percentage of nonzeros in tensor C |
Reimplemented from CTF_int::spctr.
Definition at line 140 of file spctr_comm.cxx.
References CTF_int::algstrct::addmop(), ASSERT, cdt_A, cdt_B, cdt_C, CTF_int::accumulatable::el_size, CTF_int::CommData::estimate_bcast_time(), CTF_int::algstrct::estimate_csr_red_time(), CTF_int::CommData::estimate_red_time(), CTF_int::spctr::is_sparse_A, CTF_int::spctr::is_sparse_B, CTF_int::spctr::is_sparse_C, ncdt_A, ncdt_B, ncdt_C, ctf.core::np(), CTF_int::algstrct::pair_size(), size_A, size_B, size_C, CTF_int::ctr::sr_A, CTF_int::ctr::sr_B, and CTF_int::ctr::sr_C.
Referenced by est_time_rec().
|
virtual |
returns the execution time this kernel and its recursive calls are estimated to take
[in] | nlyr | amount of replication |
[in] | nnz_frac_A | percentage of nonzeros in tensor A |
[in] | nnz_frac_B | percentage of nonzeros in tensor B |
[in] | nnz_frac_C | percentage of nonzeros in tensor C |
Reimplemented from CTF_int::spctr.
Definition at line 169 of file spctr_comm.cxx.
References est_time_fp(), CTF_int::spctr::est_time_rec(), and rec_ctr.
|
virtual |
Reimplemented from CTF_int::ctr.
Definition at line 119 of file spctr_comm.cxx.
References cdt_A, cdt_B, cdt_C, ncdt_A, ncdt_B, ncdt_C, ctf.core::np(), CTF_int::ctr::print(), rec_ctr, size_A, size_B, and size_C.
|
virtual |
Reimplemented from CTF_int::spctr.
Definition at line 186 of file spctr_comm.cxx.
References CTF_int::algstrct::addid(), CTF_int::algstrct::addmop(), CTF_int::alloc(), CTF_int::alloc_ptr(), ASSERT, CTF_int::CommData::bcast(), CTF_int::ctr::beta, CTF_int::cdealloc(), cdt_A, cdt_B, cdt_C, CTF_int::algstrct::csr_reduce(), CTF_int::ctr::idx_lyr, CTF_int::spctr::is_sparse_A, CTF_int::spctr::is_sparse_B, CTF_int::spctr::is_sparse_C, CTF_int::algstrct::isequal(), CTF_int::algstrct::mdtype(), CTF_int::algstrct::mulid(), ncdt_A, ncdt_B, ncdt_C, CTF_int::ctr::num_lyr, CTF_int::CommData::rank, ctf.core::rank(), rec_ctr, CTF_int::CommData::red(), CTF_int::spctr::run(), CTF_int::algstrct::scal(), CTF_int::algstrct::set(), size_A, size_B, size_C, CTF_int::ctr::sr_A, CTF_int::ctr::sr_B, CTF_int::ctr::sr_C, TAU_FSTART, and TAU_FSTOP.
int64_t CTF_int::spctr_replicate::spmem_fp | ( | double | nnz_frac_A, |
double | nnz_frac_B, | ||
double | nnz_frac_C | ||
) |
returns the number of bytes of buffer space we need
Definition at line 173 of file spctr_comm.cxx.
References CTF_int::spctr::is_sparse_A, CTF_int::spctr::is_sparse_B, CTF_int::spctr::is_sparse_C, CTF_int::algstrct::pair_size(), size_A, size_B, size_C, CTF_int::ctr::sr_A, CTF_int::ctr::sr_B, and CTF_int::ctr::sr_C.
Referenced by spmem_rec().
|
virtual |
returns the number of bytes need by each processor in this kernel and its recursive calls
Reimplemented from CTF_int::spctr.
Definition at line 181 of file spctr_comm.cxx.
References rec_ctr, spmem_fp(), and CTF_int::spctr::spmem_rec().
CommData** CTF_int::spctr_replicate::cdt_A |
Definition at line 20 of file spctr_comm.h.
Referenced by est_time_fp(), print(), run(), spctr_replicate(), and ~spctr_replicate().
CommData** CTF_int::spctr_replicate::cdt_B |
Definition at line 21 of file spctr_comm.h.
Referenced by est_time_fp(), print(), run(), spctr_replicate(), and ~spctr_replicate().
CommData** CTF_int::spctr_replicate::cdt_C |
Definition at line 22 of file spctr_comm.h.
Referenced by est_time_fp(), print(), run(), spctr_replicate(), and ~spctr_replicate().
int CTF_int::spctr_replicate::ncdt_A |
Definition at line 13 of file spctr_comm.h.
Referenced by est_time_fp(), print(), run(), spctr_replicate(), and ~spctr_replicate().
int CTF_int::spctr_replicate::ncdt_B |
Definition at line 14 of file spctr_comm.h.
Referenced by est_time_fp(), print(), run(), spctr_replicate(), and ~spctr_replicate().
int CTF_int::spctr_replicate::ncdt_C |
Definition at line 15 of file spctr_comm.h.
Referenced by est_time_fp(), print(), run(), spctr_replicate(), and ~spctr_replicate().
spctr* CTF_int::spctr_replicate::rec_ctr |
Definition at line 24 of file spctr_comm.h.
Referenced by est_time_rec(), CTF_int::get_len_ordering(), print(), run(), spctr_replicate(), spmem_rec(), and ~spctr_replicate().
int64_t CTF_int::spctr_replicate::size_A |
Definition at line 16 of file spctr_comm.h.
Referenced by est_time_fp(), print(), run(), spctr_replicate(), and spmem_fp().
int64_t CTF_int::spctr_replicate::size_B |
Definition at line 17 of file spctr_comm.h.
Referenced by est_time_fp(), print(), run(), spctr_replicate(), and spmem_fp().
int64_t CTF_int::spctr_replicate::size_C |
Definition at line 18 of file spctr_comm.h.
Referenced by est_time_fp(), print(), run(), spctr_replicate(), and spmem_fp().