Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
CTF::Typ_Idx_Tensor< dtype > Class Template Reference

#include <idx_tensor.h>

Inheritance diagram for CTF::Typ_Idx_Tensor< dtype >:
Collaboration diagram for CTF::Typ_Idx_Tensor< dtype >:

Public Member Functions

 ~Typ_Idx_Tensor ()
 
 Typ_Idx_Tensor (CTF_int::tensor *parent_, const char *idx_map_, int copy=0)
 constructor takes in a parent tensor and its indices More...
 
 Typ_Idx_Tensor (Typ_Idx_Tensor const &B, int copy=0, std::map< CTF_int::tensor *, CTF_int::tensor * > *remap=NULL)
 copy constructor More...
 
Typ_Idx_Tensor< dtype > * tclone () const
 
CTF_int::Termclone (std::map< CTF_int::tensor *, CTF_int::tensor * > *remap=NULL) const
 base classes must implement this copy function to retrieve pointer More...
 
void operator= (CTF_int::Term const &B)
 
void operator= (Idx_Tensor const &B)
 
void operator= (double scl)
 
void operator= (int64_t scl)
 
void operator= (int scl)
 
template<typename dtype_B >
Typ_Sum_Term< dtype, dtype_B > operator& (Typ_Idx_Tensor< dtype_B > B)
 
template<typename dtype_A , typename dtype_B >
Typ_Contract_Term< dtype_A, dtype_B, dtype > operator+= (Typ_Sum_Term< dtype_A, dtype_B > t)
 
template<typename dtype_A , typename dtype_B >
Typ_Contract_Term< dtype_A, dtype_B, dtype > operator= (Typ_Sum_Term< dtype_A, dtype_B > t)
 
Typ_AIdx_Tensor< dtype > operator~ ()
 
template<typename dtype_A >
Typ_Sum_Term< dtype_A, dtype > operator= (Typ_AIdx_Tensor< dtype_A > t)
 
template<typename dtype_A >
Typ_Sum_Term< dtype_A, dtype > operator+= (Typ_AIdx_Tensor< dtype_A > t)
 
void operator+= (CTF_int::Term const &B)
 
void operator+= (Idx_Tensor const &B)
 
void operator+= (double scl)
 
void operator+= (int64_t scl)
 
void operator+= (int scl)
 
void operator, (std::function< void(dtype &)> f)
 
void operator() (std::function< void(dtype &)> f)
 
- Public Member Functions inherited from CTF::Idx_Tensor
 Idx_Tensor (CTF_int::tensor *parent_, const char *idx_map_, int copy=0)
 constructor takes in a parent tensor and its indices More...
 
 Idx_Tensor (CTF::Idx_Tensor const &other, int copy=0, std::map< CTF_int::tensor *, CTF_int::tensor * > *remap=NULL)
 copy constructor More...
 
 Idx_Tensor (CTF_int::algstrct const *sr)
 constructor for scalar More...
 
 Idx_Tensor (CTF_int::algstrct const *sr, double scl)
 
 Idx_Tensor (CTF_int::algstrct const *sr, int64_t scl)
 
 ~Idx_Tensor ()
 
Idx_Tensor execute (std::vector< char > out_inds) const
 evalues the expression to produce an intermediate with all expression indices remaining More...
 
void execute (Idx_Tensor output) const
 evalues the expression, which just scales by default More...
 
double estimate_time (Idx_Tensor output) const
 estimates the cost of a contraction More...
 
Idx_Tensor estimate_time (double &cost, std::vector< char > out_inds) const
 estimates the cost the expression to produce an intermediate with all expression indices remaining More...
 
std::vector< char > get_uniq_inds () const
 find list of unique indices that are involved in this term More...
 
void get_inputs (std::set< Idx_Tensor *, CTF_int::tensor_name_less > *inputs_set) const
 appends the tensors this depends on to the input set More...
 
void operator= (CTF_int::Term const &B)
 A = B, compute any operations on operand B and set. More...
 
void operator= (Idx_Tensor const &B)
 
void operator= (double scl)
 
void operator+= (double scl)
 
void operator-= (double scl)
 
void operator*= (double scl)
 
void multeq (double scl)
 
void operator= (int64_t scl)
 
void operator+= (int64_t scl)
 
void operator-= (int64_t scl)
 
void operator*= (int64_t scl)
 
void operator= (int scl)
 
void operator+= (int scl)
 
void operator-= (int scl)
 
void operator*= (int scl)
 
void operator+= (CTF_int::Term const &B)
 A += B, compute any operations on operand B and add. More...
 
void operator-= (CTF_int::Term const &B)
 A += B, compute any operations on operand B and add. More...
 
void operator*= (CTF_int::Term const &B)
 negates term More...
 
Worldwhere_am_i () const
 figures out what world this term lives on More...
 
- Public Member Functions inherited from CTF_int::Term
 Term (algstrct const *sr)
 
virtual ~Term ()
 
virtual void get_inputs (std::set< CTF::Idx_Tensor *, tensor_name_less > *inputs_set) const =0
 appends the tensors this depends on to the input set More...
 
void mult_scl (char const *mulscl)
 multiply scaling factor by mulscl More...
 
Contract_Term operator* (Term const &A) const
 constructs a new term which multiplies by tensor A More...
 
Contract_Term operator* (int64_t scl) const
 multiples by a constant More...
 
Contract_Term operator* (double scl) const
 
Sum_Term operator+ (Term const &A) const
 constructs a new term by addition of two terms More...
 
Sum_Term operator+ (double scl) const
 
Sum_Term operator+ (int64_t scl) const
 
Sum_Term operator- (Term const &A) const
 constructs a new term by subtracting term A More...
 
Sum_Term operator- (double scl) const
 
Sum_Term operator- (int64_t scl) const
 
Termoperator- ()
 
void operator= (CTF::Idx_Tensor const &B)
 A = B, compute any operations on operand B and set. More...
 
void operator= (Term const &B)
 
void operator+= (Term const &B)
 
void operator-= (Term const &B)
 
void operator*= (Term const &B)
 
void operator= (double scl)
 
void operator+= (double scl)
 
void operator<< (CTF_int::Term const &B)
 
void operator<< (double scl)
 
void operator-= (double scl)
 
void operator*= (double scl)
 
void operator= (int64_t scl)
 
void operator+= (int64_t scl)
 
void operator-= (int64_t scl)
 
void operator*= (int64_t scl)
 
void operator= (int scl)
 
void operator+= (int scl)
 
void operator-= (int scl)
 
void operator*= (int scl)
 
 operator float () const
 cast to float (works only if tensor type is castable to float) allows a scalar output More...
 
 operator double () const
 cast to double (works only if tensor type is castable to double) allows a scalar output More...
 
 operator int64_t () const
 cast to int64_t (works only if tensor type is castable to int64_t) allows a scalar output More...
 
 operator int () const
 cast to int64_t (works only if tensor type is castable to int64_t) allows a scalar output More...
 

Additional Inherited Members

- Data Fields inherited from CTF::Idx_Tensor
CTF_int::tensorparent
 
char * idx_map
 
int is_intm
 
- Data Fields inherited from CTF_int::Term
char * scale
 
algstrctsr
 

Detailed Description

template<typename dtype>
class CTF::Typ_Idx_Tensor< dtype >

Definition at line 164 of file idx_tensor.h.

Constructor & Destructor Documentation

template<typename dtype>
CTF::Typ_Idx_Tensor< dtype >::~Typ_Idx_Tensor ( )
inline

Definition at line 229 of file idx_tensor.h.

template<typename dtype>
CTF::Typ_Idx_Tensor< dtype >::Typ_Idx_Tensor ( CTF_int::tensor parent_,
const char *  idx_map_,
int  copy = 0 
)
inline

constructor takes in a parent tensor and its indices

Parameters
[in]parent_the parent tensor
[in]idx_map_the indices assigned ot this tensor
[in]copyif set to 1, create copy of parent

Definition at line 237 of file idx_tensor.h.

template<typename dtype>
CTF::Typ_Idx_Tensor< dtype >::Typ_Idx_Tensor ( Typ_Idx_Tensor< dtype > const &  B,
int  copy = 0,
std::map< CTF_int::tensor *, CTF_int::tensor * > *  remap = NULL 
)
inline

copy constructor

Parameters
[in]Btensor to copy
[in]copyif 1 then copy the parent tensor of B into a new tensor
[in]remapredistribution dependency map

Definition at line 247 of file idx_tensor.h.

Member Function Documentation

template<typename dtype>
CTF_int::Term* CTF::Typ_Idx_Tensor< dtype >::clone ( std::map< CTF_int::tensor *, CTF_int::tensor * > *  remap = NULL) const
inlinevirtual

base classes must implement this copy function to retrieve pointer

Reimplemented from CTF::Idx_Tensor.

Definition at line 254 of file idx_tensor.h.

template<typename dtype>
template<typename dtype_B >
Typ_Sum_Term<dtype, dtype_B> CTF::Typ_Idx_Tensor< dtype >::operator& ( Typ_Idx_Tensor< dtype_B >  B)
inline

Definition at line 265 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator() ( std::function< void(dtype &)>  f)
inline

Definition at line 313 of file idx_tensor.h.

template<typename dtype>
template<typename dtype_A , typename dtype_B >
Typ_Contract_Term<dtype_A, dtype_B, dtype> CTF::Typ_Idx_Tensor< dtype >::operator+= ( Typ_Sum_Term< dtype_A, dtype_B >  t)
inline

Definition at line 270 of file idx_tensor.h.

template<typename dtype>
template<typename dtype_A >
Typ_Sum_Term<dtype_A, dtype> CTF::Typ_Idx_Tensor< dtype >::operator+= ( Typ_AIdx_Tensor< dtype_A >  t)
inline

Definition at line 298 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator+= ( CTF_int::Term const &  B)
inline

Definition at line 302 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator+= ( Idx_Tensor const &  B)
inline

Definition at line 303 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator+= ( double  scl)
inline

Definition at line 304 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator+= ( int64_t  scl)
inline

Definition at line 305 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator+= ( int  scl)
inline

Definition at line 306 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator, ( std::function< void(dtype &)>  f)
inline

Definition at line 309 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator= ( CTF_int::Term const &  B)
inline

Definition at line 256 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator= ( Idx_Tensor const &  B)
inline

Definition at line 257 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator= ( double  scl)
inline

Definition at line 258 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator= ( int64_t  scl)
inline

Definition at line 259 of file idx_tensor.h.

template<typename dtype>
void CTF::Typ_Idx_Tensor< dtype >::operator= ( int  scl)
inline

Definition at line 260 of file idx_tensor.h.

template<typename dtype>
template<typename dtype_A , typename dtype_B >
Typ_Contract_Term<dtype_A, dtype_B, dtype> CTF::Typ_Idx_Tensor< dtype >::operator= ( Typ_Sum_Term< dtype_A, dtype_B >  t)
inline

Definition at line 281 of file idx_tensor.h.

template<typename dtype>
template<typename dtype_A >
Typ_Sum_Term<dtype_A, dtype> CTF::Typ_Idx_Tensor< dtype >::operator= ( Typ_AIdx_Tensor< dtype_A >  t)
inline

Definition at line 292 of file idx_tensor.h.

template<typename dtype>
Typ_AIdx_Tensor<dtype> CTF::Typ_Idx_Tensor< dtype >::operator~ ( )
inline

Definition at line 286 of file idx_tensor.h.

template<typename dtype>
Typ_Idx_Tensor<dtype>* CTF::Typ_Idx_Tensor< dtype >::tclone ( ) const
inline

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