Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
CTF_int::spctr_replicate Class Reference

#include <spctr_comm.h>

Inheritance diagram for CTF_int::spctr_replicate:
Collaboration diagram for CTF_int::spctr_replicate:

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 ()
 
spctrclone ()
 
 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
 
spctrrec_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
 

Detailed Description

Definition at line 11 of file spctr_comm.h.

Constructor & Destructor Documentation

CTF_int::spctr_replicate::spctr_replicate ( spctr other)

Definition at line 104 of file spctr_comm.cxx.

References CTF_int::spctr::clone(), ncdt_A, ncdt_B, ncdt_C, rec_ctr, size_A, size_B, and size_C.

Referenced by clone().

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 
)

Member Function Documentation

spctr * CTF_int::spctr_replicate::clone ( )
virtual

Reimplemented from CTF_int::spctr.

Definition at line 115 of file spctr_comm.cxx.

References spctr_replicate().

double CTF_int::spctr_replicate::est_time_fp ( int  nlyr,
double  nnz_frac_A,
double  nnz_frac_B,
double  nnz_frac_C 
)
virtual

returns the execution time the local part this kernel is estimated to take

Parameters
[in]nlyramount of replication
[in]nnz_frac_Apercentage of nonzeros in tensor A
[in]nnz_frac_Bpercentage of nonzeros in tensor B
[in]nnz_frac_Cpercentage of nonzeros in tensor C
Returns
time in sec

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

double CTF_int::spctr_replicate::est_time_rec ( int  nlyr,
double  nnz_frac_A,
double  nnz_frac_B,
double  nnz_frac_C 
)
virtual

returns the execution time this kernel and its recursive calls are estimated to take

Parameters
[in]nlyramount of replication
[in]nnz_frac_Apercentage of nonzeros in tensor A
[in]nnz_frac_Bpercentage of nonzeros in tensor B
[in]nnz_frac_Cpercentage of nonzeros in tensor C
Returns
time in sec

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.

void CTF_int::spctr_replicate::print ( )
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.

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

Returns
bytes needed returns the number of bytes need by each processor in this kernel
bytes needed for contraction

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

int64_t CTF_int::spctr_replicate::spmem_rec ( double  nnz_frac_A,
double  nnz_frac_B,
double  nnz_frac_C 
)
virtual

returns the number of bytes need by each processor in this kernel and its recursive calls

Returns
bytes needed for recursive contraction

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

Field Documentation

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


The documentation for this class was generated from the following files: