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

#include <spctr_tsr.h>

Inheritance diagram for CTF_int::spctr_virt:
Collaboration diagram for CTF_int::spctr_virt:

Public Member Functions

void print ()
 
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)
 iterates over the dense virtualization block grid and contracts More...
 
int64_t spmem_fp ()
 
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_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...
 
spctrclone ()
 
 ~spctr_virt ()
 deallocates spctr_virt object More...
 
 spctr_virt (spctr *other)
 copies spctr_virt object More...
 
 spctr_virt (contraction const *c, int num_tot, int *virt_dim, int64_t vrt_sz_A, int64_t vrt_sz_B, int64_t vrt_sz_C)
 
- Public Member Functions inherited from CTF_int::spctr
 ~spctr ()
 
 spctr (spctr *other)
 
virtual 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_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

spctrrec_ctr
 
int num_dim
 
int * virt_dim
 
int order_A
 
int64_t blk_sz_A
 
int const * idx_map_A
 
int order_B
 
int64_t blk_sz_B
 
int const * idx_map_B
 
int order_C
 
int64_t blk_sz_C
 
int const * idx_map_C
 
- 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 117 of file spctr_tsr.h.

Constructor & Destructor Documentation

CTF_int::spctr_virt::~spctr_virt ( )

deallocates spctr_virt object

Definition at line 606 of file spctr_tsr.cxx.

References CTF_int::cdealloc(), rec_ctr, and virt_dim.

CTF_int::spctr_virt::spctr_virt ( spctr other)
CTF_int::spctr_virt::spctr_virt ( contraction const *  c,
int  num_tot,
int *  virt_dim,
int64_t  vrt_sz_A,
int64_t  vrt_sz_B,
int64_t  vrt_sz_C 
)

Member Function Documentation

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

Reimplemented from CTF_int::spctr.

Definition at line 631 of file spctr_tsr.cxx.

References spctr_virt().

double CTF_int::spctr_virt::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 647 of file spctr_tsr.cxx.

References ctf.core::dim, CTF_int::spctr::est_time_rec(), num_dim, rec_ctr, and virt_dim.

void CTF_int::spctr_virt::print ( )
virtual

Reimplemented from CTF_int::ctr.

Definition at line 635 of file spctr_tsr.cxx.

References blk_sz_A, blk_sz_B, blk_sz_C, num_dim, CTF_int::ctr::print(), rec_ctr, and virt_dim.

void CTF_int::spctr_virt::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_virt::spmem_fp ( )

Definition at line 659 of file spctr_tsr.cxx.

References num_dim, order_A, order_B, order_C, and VIRT_NTD.

Referenced by run(), and spmem_rec().

int64_t CTF_int::spctr_virt::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 663 of file spctr_tsr.cxx.

References rec_ctr, spmem_fp(), and CTF_int::spctr::spmem_rec().

Field Documentation

int64_t CTF_int::spctr_virt::blk_sz_A

Definition at line 123 of file spctr_tsr.h.

Referenced by print(), run(), and spctr_virt().

int64_t CTF_int::spctr_virt::blk_sz_B

Definition at line 126 of file spctr_tsr.h.

Referenced by print(), run(), and spctr_virt().

int64_t CTF_int::spctr_virt::blk_sz_C

Definition at line 129 of file spctr_tsr.h.

Referenced by print(), run(), and spctr_virt().

int const* CTF_int::spctr_virt::idx_map_A

Definition at line 124 of file spctr_tsr.h.

Referenced by spctr_virt().

int const* CTF_int::spctr_virt::idx_map_B

Definition at line 127 of file spctr_tsr.h.

Referenced by spctr_virt().

int const* CTF_int::spctr_virt::idx_map_C

Definition at line 130 of file spctr_tsr.h.

Referenced by spctr_virt().

int CTF_int::spctr_virt::num_dim

Definition at line 120 of file spctr_tsr.h.

Referenced by est_time_rec(), print(), run(), spctr_virt(), and spmem_fp().

int CTF_int::spctr_virt::order_A

Definition at line 122 of file spctr_tsr.h.

Referenced by run(), spctr_virt(), and spmem_fp().

int CTF_int::spctr_virt::order_B

Definition at line 125 of file spctr_tsr.h.

Referenced by run(), spctr_virt(), and spmem_fp().

int CTF_int::spctr_virt::order_C

Definition at line 128 of file spctr_tsr.h.

Referenced by run(), spctr_virt(), and spmem_fp().

int* CTF_int::spctr_virt::virt_dim

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