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

#include <spctr_2d_general.h>

Inheritance diagram for CTF_int::spctr_2d_general:
Collaboration diagram for CTF_int::spctr_2d_general:

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...
 
spctrclone ()
 
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
 
CommDatacdt_A
 
CommDatacdt_B
 
CommDatacdt_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 47 of file spctr_2d_general.h.

Constructor & Destructor Documentation

CTF_int::spctr_2d_general::spctr_2d_general ( spctr other)
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.

CTF_int::spctr_2d_general::spctr_2d_general ( contraction c)
inline

partial constructor, most of the logic is in the spctr_2d_gen_build function

Parameters
[in]ccontraction object to get info about spctr from

Definition at line 150 of file spctr_2d_general.h.

Member Function Documentation

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

Reimplemented from CTF_int::spctr.

Definition at line 64 of file spctr_2d_general.cxx.

References spctr_2d_general().

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

returns the time this kernel will take including calls to rec_ctr

Returns
seconds needed for recursive contraction

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

Parameters
[out]b_Ablock size of A if its communicated, 0 otherwise
[out]b_Bblock size of A if its communicated, 0 otherwise
[out]b_Cblock size of A if its communicated, 0 otherwise
[out]s_Atotal size of A if its communicated, 0 otherwise
[out]s_Btotal size of B if its communicated, 0 otherwise
[out]s_Ctotal size of C if its communicated, 0 otherwise
[out]aux_sizesize 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().

void CTF_int::spctr_2d_general::print ( )
virtual
void CTF_int::spctr_2d_general::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 
)
virtual
int64_t CTF_int::spctr_2d_general::spmem_fp ( double  nnz_frac_A,
double  nnz_frac_B,
double  nnz_frac_C 
)
int64_t CTF_int::spctr_2d_general::spmem_rec ( double  nnz_frac_A,
double  nnz_frac_B,
double  nnz_frac_C 
)
virtual

returns the number of bytes of buffer space we need recursively

Returns
bytes needed for recursive contraction

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

Field Documentation

CommData* CTF_int::spctr_2d_general::cdt_A
CommData* CTF_int::spctr_2d_general::cdt_B
CommData* CTF_int::spctr_2d_general::cdt_C
int64_t CTF_int::spctr_2d_general::ctr_lda_A
int64_t CTF_int::spctr_2d_general::ctr_lda_B
int64_t CTF_int::spctr_2d_general::ctr_lda_C
int64_t CTF_int::spctr_2d_general::ctr_sub_lda_A
int64_t CTF_int::spctr_2d_general::ctr_sub_lda_B
int64_t CTF_int::spctr_2d_general::ctr_sub_lda_C
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().

bool CTF_int::spctr_2d_general::move_A
bool CTF_int::spctr_2d_general::move_B
bool CTF_int::spctr_2d_general::move_C
spctr* CTF_int::spctr_2d_general::rec_ctr

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