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

untyped internal class for doubly-typed univariate function More...

#include <sum_tsr.h>

Inheritance diagram for CTF_int::univar_function:

Public Member Functions

virtual void apply_f (char const *a, char *b) const
 apply function f to value stored at a More...
 
virtual void acc_f (char const *a, char *b, CTF_int::algstrct const *sr_B) const
 compute b = b+f(a) More...
 
virtual bool is_transform () const
 
 univar_function (void(*f_)(char const *, char *))
 
 univar_function (void(*f_)(char const *, char *), bool is_dist)
 
 univar_function ()
 
 univar_function (univar_function const &other)
 
Unifun_Term operator() (Term const &A) const
 evaluate B=f(A) More...
 
void operator() (Term const &A, Term const &B) const
 evaluate B+=f(A) or f(A,B) if transform More...
 
virtual ~univar_function ()
 
virtual bool is_accumulator () const
 

Data Fields

void(* f )(char const *, char *)
 
bool is_distributive = false
 

Detailed Description

untyped internal class for doubly-typed univariate function

Definition at line 14 of file sum_tsr.h.

Constructor & Destructor Documentation

CTF_int::univar_function::univar_function ( void(*)(char const *, char *)  f_)
inline

Definition at line 42 of file sum_tsr.h.

References f.

CTF_int::univar_function::univar_function ( void(*)(char const *, char *)  f_,
bool  is_dist 
)
inline

Definition at line 43 of file sum_tsr.h.

References f.

CTF_int::univar_function::univar_function ( )
inline

Definition at line 44 of file sum_tsr.h.

CTF_int::univar_function::univar_function ( univar_function const &  other)
inline

Definition at line 45 of file sum_tsr.h.

References f, is_distributive, and operator()().

virtual CTF_int::univar_function::~univar_function ( )
inlinevirtual

Definition at line 61 of file sum_tsr.h.

Member Function Documentation

virtual void CTF_int::univar_function::acc_f ( char const *  a,
char *  b,
CTF_int::algstrct const *  sr_B 
) const
inlinevirtual

compute b = b+f(a)

Parameters
[in]apointer to operand that will be cast to dtype
[in,out]bresult &f(*a) of applying f on value of (different type) on a
[in]sr_Balgebraic structure for b, needed to do add

Reimplemented in CTF::Univar_Transform< dtype_A, dtype_B >, and CTF::Univar_Function< dtype_A, dtype_B >.

Definition at line 33 of file sum_tsr.h.

References CTF_int::algstrct::add(), CTF_int::accumulatable::el_size, and f.

Referenced by CTF_int::spA_dnB_seq_sum(), CTF_int::spspsum(), and CTF_int::sym_seq_sum_cust().

virtual void CTF_int::univar_function::apply_f ( char const *  a,
char *  b 
) const
inlinevirtual

apply function f to value stored at a

Parameters
[in]apointer to operand that will be cast to type by extending class
[in,out]bresult &f(*a) of applying f on value of (different type) on a

Reimplemented in CTF::Univar_Transform< dtype_A, dtype_B >, and CTF::Univar_Function< dtype_A, dtype_B >.

Definition at line 25 of file sum_tsr.h.

References f.

Referenced by CTF_int::spspsum().

virtual bool CTF_int::univar_function::is_accumulator ( ) const
inlinevirtual

Reimplemented in CTF::Univar_Transform< dtype_A, dtype_B >.

Definition at line 63 of file sum_tsr.h.

Referenced by CTF_int::spspsum().

virtual bool CTF_int::univar_function::is_transform ( ) const
inlinevirtual

Definition at line 40 of file sum_tsr.h.

Unifun_Term CTF_int::univar_function::operator() ( Term const &  A) const

evaluate B=f(A)

Parameters
[in]Aoperand tensor with pre-defined indices
Returns
Unifun_Term that evaluates f(A)

Definition at line 10 of file sum_tsr.cxx.

References CTF_int::Term::clone().

Referenced by univar_function().

void CTF_int::univar_function::operator() ( Term const &  A,
Term const &  B 
) const

evaluate B+=f(A) or f(A,B) if transform

Parameters
[in]Aoperand tensor with pre-defined indices
[in]Boutput tensor with pre-defined indices

Definition at line 14 of file sum_tsr.cxx.

References CTF_int::Term::clone(), CTF_int::Unifun_Term::execute(), CTF_int::Term::execute(), and CTF_int::Term::get_uniq_inds().

Field Documentation

void(* CTF_int::univar_function::f) (char const *, char *)

Definition at line 16 of file sum_tsr.h.

Referenced by acc_f(), apply_f(), and univar_function().

bool CTF_int::univar_function::is_distributive = false

Definition at line 18 of file sum_tsr.h.

Referenced by univar_function().


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