Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
|
Data Structures | |
class | Bivar_Function |
custom bivariate function on two tensors: e.g. C["ij"] = f(A["ik"],B["kj"]) More... | |
class | Bivar_Kernel |
class | Bivar_Transform |
custom function f : (X * Y * Z) -> Z applied on three tensors as contraction: e.g. f(A["ij"],B["ij"],C["ij"]) More... | |
class | Decomposition |
struct | dtypePair |
pair for sorting More... | |
class | Endomorphism |
custom scalar function on tensor: e.g. A["ij"] = f(A["ij"]) More... | |
class | Flop_counter |
a term is an abstract object representing some expression of tensors More... | |
class | Function |
class | Function_timer |
times a specific symbol More... | |
class | Group |
Group is a Monoid with operator '-' defined special case (parent) of a ring. More... | |
class | HoSVD |
class | Idx_Partition |
class | Idx_Tensor |
a tensor with an index map associated with it (necessary for overloaded operators) More... | |
class | Matrix |
Matrix class which encapsulates a 2D tensor. More... | |
class | Monoid |
A Monoid is a Set equipped with a binary addition operator '+' or a custom function addition must have an identity and be associative, does not need to be commutative special case (parent) of a semiring, group, and ring. More... | |
class | Monoid_Kernel |
class | Pair |
index-value pair used for tensor data input More... | |
class | Partition |
struct | PartitionOps |
Data structure containing what each partition is going to do. More... | |
class | Ring |
Ring class defined by a datatype and addition and multiplicaton functions addition must have an identity, inverse, and be associative, does not need to be commutative multiplications must have an identity and be distributive. More... | |
class | Scalar |
Scalar class which encapsulates a 0D tensor. More... | |
class | Schedule |
class | ScheduleBase |
struct | ScheduleTimer |
class | Semiring |
Semiring is a Monoid with an addition multiplicaton function addition must have an identity and be associative, does not need to be commutative multiplications must have an identity as well as be distributive and associative special case (parent) of a Ring (which also has an additive inverse) More... | |
class | Set |
Set class defined by a datatype and a min/max function (if it is partially ordered i.e. is_ord=true) currently assumes min and max are given by numeric_limits (custom min/max not allowed) More... | |
class | Sparse_Tensor |
a sparse subset of a tensor More... | |
class | Tensor |
an instance of a tensor within a CTF world More... | |
class | TensorOperation |
A tensor operation, containing all the data (op, lhs, rhs) required to run it. Also provides methods to get a list of inputs and outputs, as well as successor and dependency information used in scheduling. More... | |
class | TensorOperationBase |
Provides a untemplated base class for tensor operations. More... | |
class | Timer |
local process walltime measurement More... | |
class | Timer_epoch |
epoch during which to measure timers More... | |
class | Transform |
class | Typ_AIdx_Tensor |
class | Typ_Contract_Term |
class | Typ_Idx_Tensor |
class | Typ_Sum_Term |
class | Univar_Function |
custom function f : X -> Y to be applied to tensor elemetns: e.g. B["ij"] = f(A["ij"]) More... | |
class | Univar_Transform |
custom function f : (X * Y) -> X applied on two tensors as summation: e.g. B["ij"] = f(A["ij"],B["ij"]) More... | |
class | Vector |
Vector class which encapsulates a 1D tensor. More... | |
class | World |
an instance of the CTF library (world) on a MPI communicator More... | |
Enumerations | |
enum | OP { OP_SUM, OP_SUMABS, OP_SUMSQ, OP_MAX, OP_MIN, OP_MAXABS, OP_MINABS } |
reduction types for tensor data deprecated types: OP_NORM1=OP_SUMABS, OP_NORM2=call norm2(), OP_NORM_INFTY=OP_MAXABS More... | |
enum | TensorOperationTypes { TENSOR_OP_NONE, TENSOR_OP_SET, TENSOR_OP_SUM, TENSOR_OP_SUBTRACT, TENSOR_OP_MULTIPLY } |
Functions | |
template<typename dtype > | |
void | fold_unfold (Tensor< dtype > &X, Tensor< dtype > &Y) |
template<typename dtype > | |
std::vector< Matrix< dtype > > | get_factor_matrices (Tensor< dtype > &T, int *ranks) |
template<typename dtype > | |
Tensor< dtype > | get_core_tensor (Tensor< dtype > &T, std::vector< Matrix< dtype > > factor_matrices, int *ranks) |
template<typename dtype > | |
void | default_monoid (dtype a, dtype &b) |
template<typename dtype > | |
void | get_my_kv_pair (int rank, int nrow, int ncol, int mb, int nb, int pr, int pc, int rsrc, int csrc, int64_t &nmyr, int64_t &nmyc, Pair< dtype > *&pairs) |
template<typename dtype > | |
int | get_int_fromreal (dtype r) |
template<> | |
int | get_int_fromreal< float > (float r) |
template<> | |
int | get_int_fromreal< double > (double r) |
template<> | |
int | get_int_fromreal< std::complex< float > > (std::complex< float > r) |
template<> | |
int | get_int_fromreal< std::complex< double > > (std::complex< double > r) |
bool | tensor_op_cost_greater (TensorOperation *A, TensorOperation *B) |
template<typename dtype > | |
void | read_sparse_from_file_base (const char *fpath, bool with_vals, Tensor< dtype > *T) |
template<typename dtype > | |
void | write_sparse_to_file_base (const char *fpath, bool with_vals, Tensor< dtype > *T) |
template<typename dtype > | |
void | real_norm1 (Tensor< dtype > &A, double &nrm) |
template<> | |
void | real_norm1< bool > (Tensor< bool > &A, double &nrm) |
template<typename dtype > | |
void | fill_random_base (dtype rmin, dtype rmax, Tensor< dtype > &T) |
template<typename dtype > | |
void | fill_sp_random_base (dtype rmin, dtype rmax, double frac_sp, Tensor< dtype > *T) |
template<typename dtype > | |
bool | comp_pair (Pair< dtype > i, Pair< dtype > j) |
World & | get_universe () |
bool | comp_name (Function_timer const &w1, Function_timer const &w2) |
void | print_timers (char const *name) |
void | set_main_args (int argc, const char *const *argv) |
void | set_context (MPI_Comm ctxt) |
Variables | |
int | DGTOG_SWITCH = 1 |
ScheduleBase * | global_schedule |
bool | universe_exists = false |
World | universe ("") |
int | main_argc = 0 |
const char *const * | main_argv |
MPI_Comm | comm |
double | excl_time |
double | complete_time |
int | set_contxt = 0 |
int | output_file_counter = 0 |
bool CTF::comp_name | ( | Function_timer const & | w1, |
Function_timer const & | w2 | ||
) |
Definition at line 101 of file int_timer.cxx.
References CTF::Function_timer::name.
Referenced by print_timers().
void CTF::default_monoid | ( | dtype | a, |
dtype & | b | ||
) |
Definition at line 112 of file kernel.h.
References ctf.core::b.
void CTF::fill_random_base | ( | dtype | rmin, |
dtype | rmax, | ||
Tensor< dtype > & | T | ||
) |
Definition at line 935 of file tensor.cxx.
References CTF_int::tensor::data, ctf.core::dtype, CTF_int::get_rand48(), CTF::Tensor< dtype >::i(), IASSERT, CTF_int::tensor::is_sparse, CTF_int::tensor::size, and CTF_int::tensor::zero_out_padding().
void CTF::fill_sp_random_base | ( | dtype | rmin, |
dtype | rmax, | ||
double | frac_sp, | ||
Tensor< dtype > * | T | ||
) |
Definition at line 976 of file tensor.cxx.
References ctf.core::dtype, CTF_int::get_rand48(), CTF::Tensor< dtype >::i(), CTF_int::tensor::lens, CTF::World::np, CTF_int::tensor::order, CTF::World::rank, CTF_int::tensor::sr, CTF::Tensor< dtype >::write(), and CTF_int::tensor::wrld.
Definition at line 8 of file decomposition.cxx.
References CTF::Tensor< dtype >::read_local(), and CTF::Tensor< dtype >::write().
Referenced by get_factor_matrices(), get_factor_matrices(), and neural().
Tensor<dtype> CTF::get_core_tensor | ( | Tensor< dtype > & | T, |
std::vector< Matrix< dtype > > | factor_matrices, | ||
int * | ranks | ||
) |
Definition at line 97 of file decomposition.cxx.
References CTF::HoSVD< dtype >::core_tensor, CTF::HoSVD< dtype >::factor_matrices, get_factor_matrices(), CTF::HoSVD< dtype >::HoSVD(), CTF_int::tensor::lens, CTF_int::tensor::order, ctf.core::transpose(), and CTF_int::tensor::wrld.
Referenced by hosvd().
std::vector< Matrix <dtype> > CTF::get_factor_matrices | ( | Tensor< dtype > & | T, |
int * | ranks | ||
) |
the rank[i] left singular columns of the i-mode unfoldings of a tensor
[in] | ranks | array of ints that denote number of leading columns of left singular matrix to store |
Definition at line 45 of file decomposition.cxx.
References CTF::HoSVD< dtype >::factor_matrices, fold_unfold(), CTF_int::tensor::lens, CTF_int::tensor::order, CTF::Matrix< dtype >::svd(), and CTF_int::tensor::wrld.
Referenced by get_core_tensor(), hooi(), and hosvd().
int CTF::get_int_fromreal | ( | dtype | r | ) |
Definition at line 399 of file matrix.cxx.
|
inline |
Definition at line 409 of file matrix.cxx.
|
inline |
Definition at line 405 of file matrix.cxx.
|
inline |
Definition at line 417 of file matrix.cxx.
|
inline |
Definition at line 413 of file matrix.cxx.
void CTF::get_my_kv_pair | ( | int | rank, |
int | nrow, | ||
int | ncol, | ||
int | mb, | ||
int | nb, | ||
int | pr, | ||
int | pc, | ||
int | rsrc, | ||
int | csrc, | ||
int64_t & | nmyr, | ||
int64_t & | nmyc, | ||
Pair< dtype > *& | pairs | ||
) |
Definition at line 161 of file matrix.cxx.
References CTF::Tensor< dtype >::i(), and CTF::Pair< dtype >::k.
Referenced by CTF::Matrix< dtype >::read_mat(), and CTF::Matrix< dtype >::write_mat().
void CTF::print_timers | ( | char const * | name | ) |
Definition at line 172 of file int_timer.cxx.
References CTF_int::alloc(), ASSERT, CTF_int::cdealloc(), comp_name(), main_argc, MAX_NAME_LENGTH, MAX_TOT_SYMBOLS_LEN, ctf.core::np(), CTF_int::print_all_models(), and ctf.core::rank().
Referenced by CTF::Timer::exit().
void CTF::read_sparse_from_file_base | ( | const char * | fpath, |
bool | with_vals, | ||
Tensor< dtype > * | T | ||
) |
Definition at line 467 of file tensor.cxx.
References CTF_int::cdealloc(), ctf.core::dtype, CTF_int::tensor::lens, CTF_int::tensor::order, CTF_int::tensor::sr, CTF::Tensor< dtype >::write(), and CTF_int::tensor::wrld.
void CTF::real_norm1 | ( | Tensor< dtype > & | A, |
double & | nrm | ||
) |
Definition at line 803 of file tensor.cxx.
References ctf.core::a, ctf.core::abs(), ctf.core::dtype, CTF::Tensor< dtype >::i(), and CTF_int::tensor::order.
|
inline |
Definition at line 812 of file tensor.cxx.
References CTF::Tensor< dtype >::i().
void CTF::set_context | ( | MPI_Comm | ctxt | ) |
Definition at line 314 of file int_timer.cxx.
Referenced by CTF::World::~World().
bool CTF::tensor_op_cost_greater | ( | TensorOperation * | A, |
TensorOperation * | B | ||
) |
Definition at line 27 of file schedule.cxx.
References CTF::TensorOperation::estimate_time().
Referenced by CTF::Schedule::partition_and_execute().
void CTF::write_sparse_to_file_base | ( | const char * | fpath, |
bool | with_vals, | ||
Tensor< dtype > * | T | ||
) |
Definition at line 506 of file tensor.cxx.
References CTF_int::cdealloc(), CTF::Tensor< dtype >::get_local_pairs(), CTF_int::tensor::lens, CTF_int::tensor::order, CTF_int::tensor::sr, and CTF_int::tensor::wrld.
MPI_Comm CTF::comm |
Definition at line 22 of file int_timer.cxx.
Referenced by Integrals::fill_rand(), Amplitudes::fill_rand(), CTF::World::World(), and CTF::World::~World().
double CTF::complete_time |
Definition at line 24 of file int_timer.cxx.
double CTF::excl_time |
Definition at line 23 of file int_timer.cxx.
Referenced by CTF::Timer_epoch::begin(), and CTF::Timer::start().
int CTF::main_argc = 0 |
Definition at line 20 of file int_timer.cxx.
Referenced by print_timers().
const char* const* CTF::main_argv |
Definition at line 21 of file int_timer.cxx.
int CTF::output_file_counter = 0 |
Definition at line 26 of file int_timer.cxx.
int CTF::set_contxt = 0 |
Definition at line 25 of file int_timer.cxx.
World CTF::universe("") |
Referenced by get_universe(), and CTF::World::~World().