| Cyclops Tensor Framework
    parallel arithmetic on multidimensional arrays | 
custom bivariate function on two tensors: e.g. C["ij"] = f(A["ik"],B["kj"]) More...
#include <functions.h>


| Public Member Functions | |
| Bivar_Function (std::function< dtype_C(dtype_A, dtype_B)> f_) | |
| constructor takes function pointers to compute C=f(A,B);  More... | |
| Bivar_Function (std::function< dtype_C(dtype_A, dtype_B)> f_, bool is_comm) | |
| constructor takes function pointers to compute C=f(A,B);  More... | |
| Bivar_Function () | |
| default constructor sets function pointer to NULL  More... | |
| void | apply_f (char const *a, char const *b, char *c) const | 
| compute c = f(a,b)  More... | |
| void | acc_f (char const *a, char const *b, char *c, CTF_int::algstrct const *sr_C) const | 
| compute c = c+ f(a,b)  More... | |
| void | csrmm (int m, int n, int k, dtype_A const *A, int const *JA, int const *IA, int64_t nnz_A, dtype_B const *B, dtype_C *C, CTF_int::algstrct const *sr_C) const | 
| void | csrmultd (int m, int n, int k, dtype_A const *A, int const *JA, int const *IA, int nnz_A, dtype_B const *B, int const *JB, int const *IB, int nnz_B, dtype_C *C, CTF_int::algstrct const *sr_C) const | 
| void | csrmultcsr (int m, int n, int k, dtype_A const *A, int const *JA, int const *IA, int nnz_A, dtype_B const *B, int const *JB, int const *IB, int nnz_B, char *&C_CSR, CTF_int::algstrct const *sr_C) const | 
| void | ccsrmm (int m, int n, int k, char const *A, int const *JA, int const *IA, int64_t nnz_A, char const *B, char *C, CTF_int::algstrct const *sr_C) const | 
| void | ccsrmultd (int m, int n, int k, char const *A, int const *JA, int const *IA, int nnz_A, char const *B, int const *JB, int const *IB, int nnz_B, char *C, CTF_int::algstrct const *sr_C) const | 
| void | ccsrmultcsr (int m, int n, int k, char const *A, int const *JA, int const *IA, int nnz_A, char const *B, int const *JB, int const *IB, int nnz_B, char *&C_CSR, CTF_int::algstrct const *sr_C) const | 
|  Public Member Functions inherited from CTF_int::bivar_function | |
| void | operator() (Term const &A, Term const &B, Term const &C) const | 
| evaluate C+=f(A,B) or f(A,B,C) if transform  More... | |
| Bifun_Term | operator() (Term const &A, Term const &B) const | 
| evaluate f(A,B)  More... | |
| bivar_function (bool is_comm=false, bool is_left_dist=false, bool is_right_dist=false) | |
| constructor sets function properties, pessimistic defaults  More... | |
| virtual | ~bivar_function () | 
| virtual bool | is_accumulator () const | 
| virtual void | cgemm (char tA, char tB, int m, int n, int k, char const *A, char const *B, char *C) const | 
| virtual void | coffload_gemm (char tA, char tB, int m, int n, int k, char const *A, char const *B, char *C) const | 
| virtual void | ccoomm (int m, int n, int k, char const *A, int const *rows_A, int const *cols_A, int64_t nnz_A, char const *B, char *C) const | 
| virtual void | coffload_csrmm (int m, int n, int k, char const *all_data, char const *B, char *C) const | 
| Data Fields | |
| std::function< dtype_C(dtype_A, dtype_B)> | f | 
| function signature for element-wise multiplication, compute C=f(A,B)  More... | |
|  Data Fields inherited from CTF_int::bivar_function | |
| bool | has_kernel | 
| bool | has_off_gemm | 
| bool | commutative | 
| bool | left_distributive | 
| bool | right_distributive | 
custom bivariate function on two tensors: e.g. C["ij"] = f(A["ik"],B["kj"])
Definition at line 137 of file functions.h.
| 
 | inline | 
constructor takes function pointers to compute C=f(A,B);
| [in] | f_ | bivariate function (type_A,type_B)->(type_C) | 
Definition at line 149 of file functions.h.
| 
 | inline | 
constructor takes function pointers to compute C=f(A,B);
| [in] | f_ | bivariate function (type_A,type_B)->(type_C) | 
| [in] | is_comm | whether function is commutative | 
Definition at line 159 of file functions.h.
| CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >::Bivar_Function | ( | ) | 
default constructor sets function pointer to NULL
| 
 | inlinevirtual | 
compute c = c+ f(a,b)
| [in] | a | pointer to operand that will be cast to dtype | 
| [in] | b | pointer to operand that will be cast to dtype | 
| [in,out] | c | result c+f(*a,b) of applying f on value of (different type) on a | 
| [in] | sr_C | algebraic structure for b, needed to do add | 
Implements CTF_int::bivar_function.
Definition at line 188 of file functions.h.
References CTF_int::algstrct::add(), and CTF::Endomorphism< dtype >::f.
| 
 | inlinevirtual | 
compute c = f(a,b)
| [in] | a | pointer to operand that will be cast to dtype | 
| [in] | b | pointer to operand that will be cast to dtype | 
| [in,out] | c | result c+f(*a,b) of applying f on value of (different type) on a | 
Implements CTF_int::bivar_function.
Definition at line 177 of file functions.h.
References CTF::Endomorphism< dtype >::f.
| 
 | inlinevirtual | 
Reimplemented from CTF_int::bivar_function.
Reimplemented in CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >.
Definition at line 328 of file functions.h.
| 
 | inlinevirtual | 
Reimplemented from CTF_int::bivar_function.
Reimplemented in CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >.
Definition at line 359 of file functions.h.
| 
 | inlinevirtual | 
Reimplemented from CTF_int::bivar_function.
Reimplemented in CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >.
Definition at line 342 of file functions.h.
| 
 | inline | 
Definition at line 196 of file functions.h.
References CTF_int::algstrct::add(), and CTF::Endomorphism< dtype >::f.
| 
 | inline | 
Definition at line 258 of file functions.h.
References CTF_int::algstrct::add(), CTF_int::CSR_Matrix::all_data, CTF_int::alloc(), CTF_int::cdealloc(), CTF_int::CSR_Matrix::compute_has_col(), CTF_int::CSR_Matrix::csr_add(), CTF::Endomorphism< dtype >::f, CTF_int::CSR_Matrix::IA(), CTF_int::CSR_Matrix::JA(), CTF_int::CSR_Matrix::nnz(), and CTF_int::CSR_Matrix::vals().
| 
 | inline | 
Definition at line 228 of file functions.h.
References CTF_int::algstrct::add(), and CTF::Endomorphism< dtype >::f.
| std::function<dtype_C (dtype_A, dtype_B)> CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >::f | 
function signature for element-wise multiplication, compute C=f(A,B)
Definition at line 143 of file functions.h.