Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
|
custom scalar function on tensor: e.g. A["ij"] = f(A["ij"]) More...
#include <functions.h>
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... | |
custom scalar function on tensor: e.g. A["ij"] = f(A["ij"])
Definition at line 23 of file functions.h.
|
inline |
constructor takes function pointer
[in] | f_ | scalar function: (type) -> (type) |
Definition at line 35 of file functions.h.
|
inline |
default constructor
Definition at line 39 of file functions.h.
|
inlinevirtual |
apply function f to value stored at a
[in,out] | a | pointer 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.
std::function<void(dtype&)> CTF::Endomorphism< dtype >::f |
function signature for element-wise operation a=f(a)
Definition at line 29 of file functions.h.
Referenced by CTF::Univar_Function< dtype_A, dtype_B >::acc_f(), CTF::Univar_Transform< dtype_A, dtype_B >::acc_f(), CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >::acc_f(), CTF::Bivar_Transform< dtype_A, dtype_B, dtype_C >::acc_f(), CTF::Endomorphism< dtype_A >::apply_f(), CTF::Univar_Function< dtype_A, dtype_B >::apply_f(), CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >::apply_f(), CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >::csrmm(), CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >::csrmultcsr(), and CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >::csrmultd().