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

class for execution distributed scaling of a tensor More...

#include <scaling.h>

Collaboration diagram for CTF_int::scaling:

Public Member Functions

 scaling (tensor *A, int const *idx_map, char const *alpha)
 constructor definining contraction with C's mul and add ops More...
 
 scaling (tensor *A, char const *idx_map, char const *alpha)
 
 scaling (tensor *A, int const *idx_map, char const *alpha, endomorphism const *func)
 constructor definining scaling with custom function More...
 
 scaling (tensor *A, char const *idx_map, char const *alpha, endomorphism const *func)
 
 ~scaling ()
 destructor More...
 
int execute ()
 run scaling More...
 
double estimate_time ()
 predicts execution time in seconds using performance models More...
 
void sp_scl ()
 scales a sparse tensor More...
 

Data Fields

tensorA
 operand/output More...
 
char const * alpha
 scaling of A More...
 
int * idx_map
 indices of A More...
 
bool is_custom
 whether there is a elementwise custom function More...
 
endomorphism const * func
 function to execute on elementwise elements More...
 

Detailed Description

class for execution distributed scaling of a tensor

Definition at line 14 of file scaling.h.

Constructor & Destructor Documentation

CTF_int::scaling::scaling ( tensor A,
int const *  idx_map,
char const *  alpha 
)

constructor definining contraction with C's mul and add ops

Parameters
[in]Aleft operand tensor
[in]idx_mapindices of left operand
[in]alphascaling factor alpha * A[idx_map]; A[idx_map] = alpha * A[idx_map]

Definition at line 14 of file scaling.cxx.

References CTF_int::alloc().

CTF_int::scaling::scaling ( tensor A,
char const *  idx_map,
char const *  alpha 
)

Definition at line 25 of file scaling.cxx.

References CTF_int::conv_idx().

CTF_int::scaling::scaling ( tensor A,
int const *  idx_map,
char const *  alpha,
endomorphism const *  func 
)

constructor definining scaling with custom function

Parameters
[in]Aleft operand tensor
[in]idx_mapindices of left operand func(&A[idx_map])
[in]alphascaling factor alpha * A[idx_map]; A[idx_map] = alpha * func(A[idx_map])
[in]funcelementwise function

Definition at line 35 of file scaling.cxx.

References CTF_int::alloc().

CTF_int::scaling::scaling ( tensor A,
char const *  idx_map,
char const *  alpha,
endomorphism const *  func 
)

Definition at line 48 of file scaling.cxx.

References CTF_int::conv_idx().

CTF_int::scaling::~scaling ( )

destructor

Definition at line 60 of file scaling.cxx.

References CTF_int::cdealloc().

Member Function Documentation

double CTF_int::scaling::estimate_time ( )

predicts execution time in seconds using performance models

int CTF_int::scaling::execute ( )

run scaling

Returns
whether success or error

Definition at line 64 of file scaling.cxx.

References CTF_int::scl::A, ABORT, CTF_int::alloc_ptr(), CTF_int::scl::alpha, ASSERT, CTF_int::scl_virt::blk_sz_A, CTF_int::scl::buffer, CTF_int::calc_dim(), CTF_int::tensor::calc_nvirt(), CTF_int::cdealloc(), CTF::World::cdt, CTF_int::check_self_mapping(), CTF_int::mapping::child, CTF_int::tensor::clear_mapping(), CTF_int::algstrct::copy(), CTF_int::copy_mapping(), CTF_int::tensor::data, CTF_int::algstrct::dealloc(), CTF_int::topology::dim_comm, DPRINTF, CTF_int::seq_tsr_scl::edge_len, CTF_int::tensor::edge_map, CTF_int::ERROR, CTF_int::seq_tsr_scl::func, CTF_int::get_best_topo(), CTF_int::mapping::has_child, CTF_int::tensor::has_home, CTF_int::tensor::has_zero_edge_len, CTF_int::tensor::home_buffer, CTF_int::seq_tsr_scl::idx_map, CTF_int::scl_virt::idx_map_A, CTF_int::inv_idx(), CTF_int::seq_tsr_scl::is_custom, CTF_int::tensor::is_cyclic, CTF_int::tensor::is_data_aliased, CTF_int::tensor::is_home, CTF_int::tensor::is_mapped, CTF_int::tensor::is_sparse, CTF_int::map_self_indices(), CTF_int::tensor::map_tensor_rem(), CTF_int::tensor::name, CTF_int::tensor::nnz_blk, CTF_int::mapping::np, CTF_int::CommData::np, CTF_int::scl_virt::num_dim, CTF_int::topology::order, CTF_int::seq_tsr_scl::order, CTF_int::tensor::order, CTF_int::scl_virt::order_A, CTF_int::tensor::pad_edge_len, CTF_int::algstrct::pair_dealloc(), CTF_int::tensor::print_map(), CTF_int::proc_bytes_available(), CTF_int::CommData::rank, CTF_int::scl_virt::rec_scl, CTF_int::strp_scl::rec_scl, CTF_int::strp_scl::rec_strp, CTF_int::tensor::redistribute(), CTF_int::scl::run(), CTF_int::tensor::set_new_nnz_glb(), CTF_int::tensor::set_padding(), CTF_int::tensor::size, CTF_int::tensor::sr, CTF_int::scl::sr_A, CTF_int::strip_diag(), CTF_int::strp_tsr::strip_dim, CTF_int::SUCCESS, CTF_int::seq_tsr_scl::sym, CTF_int::tensor::sym, TAU_FSTART, TAU_FSTOP, CTF_int::tensor::topo, CTF::World::topovec, ctf.core::tsr, CTF_int::mapping::type, CTF_int::tensor::unfold(), CTF_int::scl_virt::virt_dim, CTF_int::VIRTUAL_MAP, and CTF_int::tensor::wrld.

Referenced by CTF_int::desymmetrize(), CTF_int::summation::estimate_time(), CTF::Tensor< dtype >::fill_sp_random(), CTF_int::get_len_ordering(), CTF_int::endomorphism::operator()(), CTF_int::summation::sum_tensors(), and CTF_int::symmetrize().

void CTF_int::scaling::sp_scl ( )

scales a sparse tensor

Definition at line 347 of file scaling.cxx.

References CTF_int::PairIterator::k(), TAU_FSTART, and TAU_FSTOP.

Field Documentation

tensor* CTF_int::scaling::A

operand/output

Definition at line 17 of file scaling.h.

char const* CTF_int::scaling::alpha

scaling of A

Definition at line 20 of file scaling.h.

endomorphism const* CTF_int::scaling::func

function to execute on elementwise elements

Definition at line 29 of file scaling.h.

int* CTF_int::scaling::idx_map

indices of A

Definition at line 23 of file scaling.h.

bool CTF_int::scaling::is_custom

whether there is a elementwise custom function

Definition at line 26 of file scaling.h.


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