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

custom scalar function on tensor: e.g. A["ij"] = f(A["ij"]) More...

#include <functions.h>

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

Public Member Functions

 Endomorphism (std::function< void(dtype &)> f_)
 constructor takes function pointer More...
 
 Endomorphism ()
 default constructor More...
 
void apply_f (char *a) const
 apply function f to value stored at a More...
 
- Public Member Functions inherited from CTF_int::endomorphism
void operator() (Term const &A) const
 apply f to A More...
 
virtual ~endomorphism ()
 

Data Fields

std::function< void(dtype &)> f
 function signature for element-wise operation a=f(a) More...
 

Detailed Description

template<typename dtype = double>
class CTF::Endomorphism< dtype >

custom scalar function on tensor: e.g. A["ij"] = f(A["ij"])

Definition at line 23 of file functions.h.

Constructor & Destructor Documentation

template<typename dtype = double>
CTF::Endomorphism< dtype >::Endomorphism ( std::function< void(dtype &)>  f_)
inline

constructor takes function pointer

Parameters
[in]f_scalar function: (type) -> (type)

Definition at line 35 of file functions.h.

template<typename dtype = double>
CTF::Endomorphism< dtype >::Endomorphism ( )
inline

default constructor

Definition at line 39 of file functions.h.

Member Function Documentation

template<typename dtype = double>
void CTF::Endomorphism< dtype >::apply_f ( char *  a) const
inlinevirtual

apply function f to value stored at a

Parameters
[in,out]apointer to operand that will be cast to dtype is set to result of applying f on value at a

Reimplemented from CTF_int::endomorphism.

Definition at line 46 of file functions.h.

Field Documentation


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