Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
CTF::Typ_Sum_Term< dtype_A, dtype_B > Class Template Reference

#include <idx_tensor.h>

Inheritance diagram for CTF::Typ_Sum_Term< dtype_A, dtype_B >:
Collaboration diagram for CTF::Typ_Sum_Term< dtype_A, dtype_B >:

Public Member Functions

 Typ_Sum_Term (Typ_Idx_Tensor< dtype_A > *A, Typ_Idx_Tensor< dtype_B > *B)
 
void operator() (std::function< void(dtype_A, dtype_B &)> f)
 
void operator, (std::function< void(dtype_A, dtype_B &)> f)
 
void operator() (std::function< dtype_B(dtype_A)> f)
 
void operator, (std::function< dtype_B(dtype_A)> f)
 
template<typename dtype_C >
Typ_Contract_Term< dtype_A, dtype_B, dtype_C > operator& (Typ_Idx_Tensor< dtype_C > C)
 
- Public Member Functions inherited from CTF_int::Sum_Term
 Sum_Term (Term *B, Term *A)
 creates sum term for B+A More...
 
 ~Sum_Term ()
 
 Sum_Term (Sum_Term const &other, std::map< tensor *, tensor * > *remap=NULL)
 
Termclone (std::map< tensor *, tensor * > *remap=NULL) const
 base classes must implement this copy function to retrieve pointer More...
 
void execute (CTF::Idx_Tensor output) const
 evalues the expression by summing operands into output More...
 
CTF::Idx_Tensor execute (std::vector< char > out_inds) const
 evalues the expression to produce an intermediate with all expression indices remaining More...
 
double estimate_time (CTF::Idx_Tensor output) const
 estimates the cost of a sum term More...
 
CTF::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< CTF::Idx_Tensor *, tensor_name_less > *inputs_set) const
 appends the tensors this depends on to the input set More...
 
Sum_Term operator+ (Term const &A) const
 constructs a new term by addition of two terms More...
 
Sum_Term operator- (Term const &A) const
 constructs a new term by subtracting term A More...
 
CTF::Worldwhere_am_i () const
 negates term More...
 
- Public Member Functions inherited from CTF_int::Term
 Term (algstrct const *sr)
 
virtual ~Term ()
 
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_int::Sum_Term
std::vector< Term * > operands
 
- Data Fields inherited from CTF_int::Term
char * scale
 
algstrctsr
 

Detailed Description

template<typename dtype_A, typename dtype_B>
class CTF::Typ_Sum_Term< dtype_A, dtype_B >

Definition at line 174 of file idx_tensor.h.

Constructor & Destructor Documentation

template<typename dtype_A, typename dtype_B>
CTF::Typ_Sum_Term< dtype_A, dtype_B >::Typ_Sum_Term ( Typ_Idx_Tensor< dtype_A > *  A,
Typ_Idx_Tensor< dtype_B > *  B 
)
inline

Definition at line 177 of file idx_tensor.h.

Member Function Documentation

template<typename dtype_A, typename dtype_B>
template<typename dtype_C >
Typ_Contract_Term<dtype_A,dtype_B,dtype_C> CTF::Typ_Sum_Term< dtype_A, dtype_B >::operator& ( Typ_Idx_Tensor< dtype_C >  C)
inline

Definition at line 197 of file idx_tensor.h.

template<typename dtype_A, typename dtype_B>
void CTF::Typ_Sum_Term< dtype_A, dtype_B >::operator() ( std::function< void(dtype_A, dtype_B &)>  f)
inline

Definition at line 179 of file idx_tensor.h.

template<typename dtype_A, typename dtype_B>
void CTF::Typ_Sum_Term< dtype_A, dtype_B >::operator() ( std::function< dtype_B(dtype_A)>  f)
inline

Definition at line 187 of file idx_tensor.h.

References CTF::Idx_Tensor::execute(), and CTF::Idx_Tensor::get_uniq_inds().

template<typename dtype_A, typename dtype_B>
void CTF::Typ_Sum_Term< dtype_A, dtype_B >::operator, ( std::function< void(dtype_A, dtype_B &)>  f)
inline

Definition at line 183 of file idx_tensor.h.

template<typename dtype_A, typename dtype_B>
void CTF::Typ_Sum_Term< dtype_A, dtype_B >::operator, ( std::function< dtype_B(dtype_A)>  f)
inline

Definition at line 191 of file idx_tensor.h.

References CTF::Idx_Tensor::execute(), and CTF::Idx_Tensor::get_uniq_inds().


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