Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
|
#include <spctr_2d_general.h>
Public Member Functions | |
void | print () |
print ctr object More... | |
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) |
Basically doing SUMMA, except assumes equal block size on each processor. Performs rank-b updates where b is the smallest blocking factor among A and B or A and C or B and C. More... | |
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 of buffer space we need recursively More... | |
double | est_time_fp (int nlyr, double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
returns the time this kernel will take including calls to rec_ctr More... | |
double | est_time_rec (int nlyr, double nnz_frac_A, double nnz_frac_B, double nnz_frac_C) |
returns the time this kernel will take including calls to rec_ctr More... | |
spctr * | clone () |
void | find_bsizes (int64_t &b_A, int64_t &b_B, int64_t &b_C, int64_t &s_A, int64_t &s_B, int64_t &s_C, int64_t &aux_size) |
determines buffer and block sizes needed for spctr_2d_general More... | |
spctr_2d_general (spctr *other) | |
copies spctr object More... | |
~spctr_2d_general () | |
deallocs spctr_2d_general object More... | |
spctr_2d_general (contraction *c) | |
partial constructor, most of the logic is in the spctr_2d_gen_build function More... | |
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 | edge_len |
int64_t | ctr_lda_A |
int64_t | ctr_sub_lda_A |
int64_t | ctr_lda_B |
int64_t | ctr_sub_lda_B |
int64_t | ctr_lda_C |
int64_t | ctr_sub_lda_C |
int64_t | dns_vrt_sz_A |
int64_t | dns_vrt_sz_B |
int64_t | dns_vrt_sz_C |
bool | move_A |
bool | move_B |
bool | move_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 47 of file spctr_2d_general.h.
CTF_int::spctr_2d_general::spctr_2d_general | ( | spctr * | other | ) |
copies spctr object
Definition at line 19 of file spctr_2d_general.cxx.
References cdt_A, cdt_B, cdt_C, CTF_int::spctr::clone(), ctr_lda_A, ctr_lda_B, ctr_lda_C, ctr_sub_lda_A, ctr_sub_lda_B, ctr_sub_lda_C, dns_vrt_sz_A, dns_vrt_sz_B, dns_vrt_sz_C, edge_len, move_A, move_B, move_C, and rec_ctr.
Referenced by clone().
CTF_int::spctr_2d_general::~spctr_2d_general | ( | ) |
deallocs spctr_2d_general object
Definition at line 11 of file spctr_2d_general.cxx.
References rec_ctr.
|
inline |
partial constructor, most of the logic is in the spctr_2d_gen_build function
[in] | c | contraction object to get info about spctr from |
Definition at line 150 of file spctr_2d_general.h.
|
virtual |
Reimplemented from CTF_int::spctr.
Definition at line 64 of file spctr_2d_general.cxx.
References spctr_2d_general().
|
virtual |
returns the time this kernel will take including calls to rec_ctr
Reimplemented from CTF_int::spctr.
Definition at line 92 of file spctr_2d_general.cxx.
References CTF_int::algstrct::addmop(), cdt_A, cdt_B, cdt_C, dns_vrt_sz_A, dns_vrt_sz_B, dns_vrt_sz_C, edge_len, CTF_int::accumulatable::el_size, CTF_int::CommData::estimate_bcast_time(), CTF_int::algstrct::estimate_csr_red_time(), CTF_int::CommData::estimate_red_time(), find_bsizes(), CTF_int::spctr::is_sparse_A, CTF_int::spctr::is_sparse_B, CTF_int::spctr::is_sparse_C, MIN, move_A, move_B, move_C, CTF_int::algstrct::pair_size(), CTF_int::ctr::sr_A, CTF_int::ctr::sr_B, and CTF_int::ctr::sr_C.
Referenced by est_time_rec().
|
virtual |
returns the time this kernel will take including calls to rec_ctr
Reimplemented from CTF_int::spctr.
Definition at line 117 of file spctr_2d_general.cxx.
References edge_len, est_time_fp(), CTF_int::spctr::est_time_rec(), MIN, and rec_ctr.
void CTF_int::spctr_2d_general::find_bsizes | ( | int64_t & | b_A, |
int64_t & | b_B, | ||
int64_t & | b_C, | ||
int64_t & | s_A, | ||
int64_t & | s_B, | ||
int64_t & | s_C, | ||
int64_t & | aux_size | ||
) |
determines buffer and block sizes needed for spctr_2d_general
[out] | b_A | block size of A if its communicated, 0 otherwise |
[out] | b_B | block size of A if its communicated, 0 otherwise |
[out] | b_C | block size of A if its communicated, 0 otherwise |
[out] | s_A | total size of A if its communicated, 0 otherwise |
[out] | s_B | total size of B if its communicated, 0 otherwise |
[out] | s_C | total size of C if its communicated, 0 otherwise |
[out] | aux_size | size of auxillary buffer needed |
Definition at line 68 of file spctr_2d_general.cxx.
References cdt_A, cdt_B, cdt_C, ctr_lda_A, ctr_lda_B, ctr_lda_C, ctr_sub_lda_A, ctr_sub_lda_B, ctr_sub_lda_C, edge_len, CTF_int::accumulatable::el_size, MAX, move_A, move_B, move_C, CTF_int::CommData::np, CTF_int::ctr::sr_A, CTF_int::ctr::sr_B, and CTF_int::ctr::sr_C.
Referenced by est_time_fp(), run(), and spmem_fp().
|
virtual |
print ctr object
Reimplemented from CTF_int::ctr.
Definition at line 44 of file spctr_2d_general.cxx.
References cdt_A, cdt_B, cdt_C, ctr_lda_A, ctr_lda_B, ctr_lda_C, ctr_sub_lda_A, ctr_sub_lda_B, ctr_sub_lda_C, edge_len, move_A, move_B, move_C, CTF_int::CommData::np, CTF_int::ctr::print(), and rec_ctr.
|
virtual |
Basically doing SUMMA, except assumes equal block size on each processor. Performs rank-b updates where b is the smallest blocking factor among A and B or A and C or B and C.
Reimplemented from CTF_int::spctr.
Definition at line 365 of file spctr_2d_general.cxx.
References CTF_int::alloc(), CTF_int::alloc_ptr(), ASSERT, CTF_int::bcast_step(), CTF_int::ctr::beta, CTF_int::cdealloc(), cdt_A, cdt_B, cdt_C, CTF_int::algstrct::csr_add(), ctr_lda_A, ctr_lda_B, ctr_lda_C, ctr_sub_lda_A, ctr_sub_lda_B, ctr_sub_lda_C, edge_len, CTF_int::accumulatable::el_size, find_bsizes(), CTF_int::host_pinned_alloc(), CTF_int::host_pinned_free(), CTF_int::ctr::idx_lyr, CTF_int::spctr::is_sparse_A, CTF_int::spctr::is_sparse_B, CTF_int::spctr::is_sparse_C, move_A, move_B, move_C, CTF_int::mst_alloc_ptr(), CTF_int::CommData::np, CTF_int::ctr::num_lyr, CTF_int::CommData::rank, rec_ctr, CTF_int::reduce_step_post(), CTF_int::reduce_step_pre(), CTF_int::spctr::run(), CTF_int::spcopy(), 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_2d_general::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 121 of file spctr_2d_general.cxx.
References CTF_int::accumulatable::el_size, find_bsizes(), CTF_int::spctr::is_sparse_A, CTF_int::spctr::is_sparse_B, CTF_int::spctr::is_sparse_C, CTF_int::algstrct::pair_size(), 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 of buffer space we need recursively
Reimplemented from CTF_int::spctr.
Definition at line 134 of file spctr_2d_general.cxx.
References rec_ctr, spmem_fp(), and CTF_int::spctr::spmem_rec().
CommData* CTF_int::spctr_2d_general::cdt_A |
Definition at line 71 of file spctr_2d_general.h.
Referenced by est_time_fp(), find_bsizes(), CTF_int::get_len_ordering(), print(), run(), and spctr_2d_general().
CommData* CTF_int::spctr_2d_general::cdt_B |
Definition at line 72 of file spctr_2d_general.h.
Referenced by est_time_fp(), find_bsizes(), CTF_int::get_len_ordering(), print(), run(), and spctr_2d_general().
CommData* CTF_int::spctr_2d_general::cdt_C |
Definition at line 73 of file spctr_2d_general.h.
Referenced by est_time_fp(), find_bsizes(), CTF_int::get_len_ordering(), print(), run(), and spctr_2d_general().
int64_t CTF_int::spctr_2d_general::ctr_lda_A |
Definition at line 51 of file spctr_2d_general.h.
Referenced by find_bsizes(), CTF_int::get_len_ordering(), print(), run(), and spctr_2d_general().
int64_t CTF_int::spctr_2d_general::ctr_lda_B |
Definition at line 54 of file spctr_2d_general.h.
Referenced by find_bsizes(), CTF_int::get_len_ordering(), print(), run(), and spctr_2d_general().
int64_t CTF_int::spctr_2d_general::ctr_lda_C |
Definition at line 57 of file spctr_2d_general.h.
Referenced by find_bsizes(), CTF_int::get_len_ordering(), print(), CTF_int::reduce_step_post(), run(), and spctr_2d_general().
int64_t CTF_int::spctr_2d_general::ctr_sub_lda_A |
Definition at line 52 of file spctr_2d_general.h.
Referenced by CTF_int::bcast_step(), find_bsizes(), CTF_int::get_len_ordering(), print(), run(), and spctr_2d_general().
int64_t CTF_int::spctr_2d_general::ctr_sub_lda_B |
Definition at line 55 of file spctr_2d_general.h.
Referenced by find_bsizes(), CTF_int::get_len_ordering(), print(), run(), and spctr_2d_general().
int64_t CTF_int::spctr_2d_general::ctr_sub_lda_C |
Definition at line 58 of file spctr_2d_general.h.
Referenced by find_bsizes(), CTF_int::get_len_ordering(), print(), CTF_int::reduce_step_post(), CTF_int::reduce_step_pre(), run(), and spctr_2d_general().
int64_t CTF_int::spctr_2d_general::dns_vrt_sz_A |
Definition at line 60 of file spctr_2d_general.h.
Referenced by est_time_fp(), CTF_int::get_len_ordering(), and spctr_2d_general().
int64_t CTF_int::spctr_2d_general::dns_vrt_sz_B |
Definition at line 61 of file spctr_2d_general.h.
Referenced by est_time_fp(), CTF_int::get_len_ordering(), and spctr_2d_general().
int64_t CTF_int::spctr_2d_general::dns_vrt_sz_C |
Definition at line 62 of file spctr_2d_general.h.
Referenced by est_time_fp(), CTF_int::get_len_ordering(), and spctr_2d_general().
int CTF_int::spctr_2d_general::edge_len |
Definition at line 49 of file spctr_2d_general.h.
Referenced by CTF_int::bcast_step(), est_time_fp(), est_time_rec(), find_bsizes(), CTF_int::get_len_ordering(), print(), CTF_int::reduce_step_post(), CTF_int::reduce_step_pre(), run(), and spctr_2d_general().
bool CTF_int::spctr_2d_general::move_A |
Definition at line 67 of file spctr_2d_general.h.
Referenced by est_time_fp(), find_bsizes(), CTF_int::get_len_ordering(), print(), run(), and spctr_2d_general().
bool CTF_int::spctr_2d_general::move_B |
Definition at line 68 of file spctr_2d_general.h.
Referenced by est_time_fp(), find_bsizes(), CTF_int::get_len_ordering(), print(), run(), and spctr_2d_general().
bool CTF_int::spctr_2d_general::move_C |
Definition at line 69 of file spctr_2d_general.h.
Referenced by est_time_fp(), find_bsizes(), CTF_int::get_len_ordering(), print(), run(), and spctr_2d_general().
spctr* CTF_int::spctr_2d_general::rec_ctr |
Definition at line 75 of file spctr_2d_general.h.
Referenced by est_time_rec(), CTF_int::get_len_ordering(), print(), run(), spctr_2d_general(), spmem_rec(), and ~spctr_2d_general().