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

#include <ctr_2d_general.h>

Inheritance diagram for CTF_int::ctr_2d_general:
Collaboration diagram for CTF_int::ctr_2d_general:

Public Member Functions

void print ()
 print ctr object More...
 
void run (char *A, char *B, char *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 mem_fp ()
 returns the number of bytes of buffer space we need More...
 
int64_t mem_rec ()
 returns the number of bytes of buffer space we need recursively More...
 
double est_time_fp (int nlyr)
 returns the number of bytes this kernel will send per processor More...
 
double est_time_rec (int nlyr)
 returns the number of bytes send by each proc recursively More...
 
ctrclone ()
 
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 ctr_2d_general More...
 
 ctr_2d_general (ctr *other)
 copies ctr object More...
 
 ~ctr_2d_general ()
 deallocs ctr_2d_general object More...
 
 ctr_2d_general (contraction *c)
 partial constructor, most of the logic is in the ctr_2d_gen_build function More...
 
- Public Member Functions inherited from CTF_int::ctr
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
 
bool move_A
 
bool move_B
 
bool move_C
 
CommDatacdt_A
 
CommDatacdt_B
 
CommDatacdt_C
 
ctrrec_ctr
 
- 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 ctr_2d_general.h.

Constructor & Destructor Documentation

CTF_int::ctr_2d_general::ctr_2d_general ( ctr other)

copies ctr object

Definition at line 179 of file ctr_2d_general.cxx.

References cdt_A, cdt_B, cdt_C, CTF_int::ctr::clone(), 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, and rec_ctr.

Referenced by clone().

CTF_int::ctr_2d_general::~ctr_2d_general ( )

deallocs ctr_2d_general object

Definition at line 171 of file ctr_2d_general.cxx.

References rec_ctr.

CTF_int::ctr_2d_general::ctr_2d_general ( contraction c)
inline

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

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

Definition at line 137 of file ctr_2d_general.h.

Member Function Documentation

ctr * CTF_int::ctr_2d_general::clone ( )
virtual

Reimplemented from CTF_int::ctr.

Definition at line 220 of file ctr_2d_general.cxx.

References ctr_2d_general().

double CTF_int::ctr_2d_general::est_time_fp ( int  nlyr)
virtual

returns the number of bytes this kernel will send per processor

Returns
bytes sent

Reimplemented from CTF_int::ctr.

Definition at line 248 of file ctr_2d_general.cxx.

References CTF_int::algstrct::addmop(), cdt_A, cdt_B, cdt_C, edge_len, CTF_int::accumulatable::el_size, CTF_int::CommData::estimate_bcast_time(), CTF_int::CommData::estimate_red_time(), find_bsizes(), MIN, move_A, move_B, move_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::ctr_2d_general::est_time_rec ( int  nlyr)
virtual

returns the number of bytes send by each proc recursively

Returns
bytes needed for recursive contraction

Reimplemented from CTF_int::ctr.

Definition at line 261 of file ctr_2d_general.cxx.

References edge_len, est_time_fp(), CTF_int::ctr::est_time_rec(), MIN, and rec_ctr.

void CTF_int::ctr_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 ctr_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 224 of file ctr_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(), mem_fp(), and run().

int64_t CTF_int::ctr_2d_general::mem_fp ( )
virtual

returns the number of bytes of buffer space we need

Returns
bytes needed

Reimplemented from CTF_int::ctr.

Definition at line 265 of file ctr_2d_general.cxx.

References CTF_int::accumulatable::el_size, find_bsizes(), CTF_int::ctr::sr_A, CTF_int::ctr::sr_B, and CTF_int::ctr::sr_C.

Referenced by mem_rec().

int64_t CTF_int::ctr_2d_general::mem_rec ( )
virtual

returns the number of bytes of buffer space we need recursively

Returns
bytes needed for recursive contraction

Reimplemented from CTF_int::ctr.

Definition at line 271 of file ctr_2d_general.cxx.

References mem_fp(), CTF_int::ctr::mem_rec(), and rec_ctr.

void CTF_int::ctr_2d_general::print ( )
virtual

Field Documentation

CommData* CTF_int::ctr_2d_general::cdt_A
CommData* CTF_int::ctr_2d_general::cdt_B
CommData* CTF_int::ctr_2d_general::cdt_C
int64_t CTF_int::ctr_2d_general::ctr_lda_A

Definition at line 51 of file ctr_2d_general.h.

Referenced by ctr_2d_general(), find_bsizes(), CTF_int::get_len_ordering(), print(), and run().

int64_t CTF_int::ctr_2d_general::ctr_lda_B

Definition at line 54 of file ctr_2d_general.h.

Referenced by ctr_2d_general(), find_bsizes(), CTF_int::get_len_ordering(), print(), and run().

int64_t CTF_int::ctr_2d_general::ctr_lda_C

Definition at line 57 of file ctr_2d_general.h.

Referenced by ctr_2d_general(), find_bsizes(), CTF_int::get_len_ordering(), print(), and run().

int64_t CTF_int::ctr_2d_general::ctr_sub_lda_A

Definition at line 52 of file ctr_2d_general.h.

Referenced by ctr_2d_general(), find_bsizes(), CTF_int::get_len_ordering(), print(), and run().

int64_t CTF_int::ctr_2d_general::ctr_sub_lda_B

Definition at line 55 of file ctr_2d_general.h.

Referenced by ctr_2d_general(), find_bsizes(), CTF_int::get_len_ordering(), print(), and run().

int64_t CTF_int::ctr_2d_general::ctr_sub_lda_C

Definition at line 58 of file ctr_2d_general.h.

Referenced by ctr_2d_general(), find_bsizes(), CTF_int::get_len_ordering(), print(), and run().

int CTF_int::ctr_2d_general::edge_len
bool CTF_int::ctr_2d_general::move_A
bool CTF_int::ctr_2d_general::move_B
bool CTF_int::ctr_2d_general::move_C
ctr* CTF_int::ctr_2d_general::rec_ctr

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