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)
 
Worldget_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
 
ScheduleBaseglobal_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
 

Function Documentation

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

template<typename dtype >
void CTF::default_monoid ( dtype  a,
dtype &  b 
)

Definition at line 112 of file kernel.h.

References ctf.core::b.

template<typename dtype >
void CTF::fill_random_base ( dtype  rmin,
dtype  rmax,
Tensor< dtype > &  T 
)
template<typename dtype >
void CTF::fill_sp_random_base ( dtype  rmin,
dtype  rmax,
double  frac_sp,
Tensor< dtype > *  T 
)
template<typename dtype >
void CTF::fold_unfold ( Tensor< dtype > &  X,
Tensor< dtype > &  Y 
)
template<typename dtype >
Tensor<dtype> CTF::get_core_tensor ( Tensor< dtype > &  T,
std::vector< Matrix< dtype > >  factor_matrices,
int *  ranks 
)
template<typename dtype >
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

Parameters
[in]ranksarray 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().

template<typename dtype >
int CTF::get_int_fromreal ( dtype  r)

Definition at line 399 of file matrix.cxx.

template<>
int CTF::get_int_fromreal< double > ( double  r)
inline

Definition at line 409 of file matrix.cxx.

template<>
int CTF::get_int_fromreal< float > ( float  r)
inline

Definition at line 405 of file matrix.cxx.

template<>
int CTF::get_int_fromreal< std::complex< double > > ( std::complex< double >  r)
inline

Definition at line 417 of file matrix.cxx.

template<>
int CTF::get_int_fromreal< std::complex< float > > ( std::complex< float >  r)
inline

Definition at line 413 of file matrix.cxx.

template<typename dtype >
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 
)
void CTF::print_timers ( char const *  name)
template<typename dtype >
void CTF::read_sparse_from_file_base ( const char *  fpath,
bool  with_vals,
Tensor< dtype > *  T 
)
template<typename dtype >
void CTF::real_norm1 ( Tensor< dtype > &  A,
double &  nrm 
)
template<>
void CTF::real_norm1< bool > ( Tensor< bool > &  A,
double &  nrm 
)
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().

template<typename dtype >
void CTF::write_sparse_to_file_base ( const char *  fpath,
bool  with_vals,
Tensor< dtype > *  T 
)

Variable Documentation

MPI_Comm CTF::comm
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().

bool CTF::universe_exists = false

Definition at line 31 of file world.cxx.