Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g > Class Template Reference

#include <kernel.h>

Inheritance diagram for CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >:
Collaboration diagram for CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >:

Public Member Functions

 Bivar_Kernel ()
 
 Bivar_Kernel (bool is_comm)
 
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
 
void cgemm (char tA, char tB, int m, int n, int k, char const *A, char const *B, char *C) const
 
void csrmultcsr_old (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) 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) 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
 
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 coffload_gemm (char tA, char tB, int m, int n, int k, char const *A, char const *B, char *C) const
 
void coffload_csrmm (int m, int n, int k, char const *all_data, char const *B, char *C) const
 
- Public Member Functions inherited from CTF::Monoid_Kernel< dtype_C, g >
 Monoid_Kernel ()
 
void accum (char const *a, char *b) const
 b+=a More...
 
virtual void init_shell (int64_t n, char *arr) const
 initialize n objects to zero More...
 
- Public Member Functions inherited from CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >
 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
 
- 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
 

Static Public Member Functions

static void gemm (char tA, char tB, int m, int n, int k, dtype_A const *A, dtype_B const *B, dtype_C *C)
 
static void coomm (int m, int n, int k, dtype_A const *A, int const *rows_A, int const *cols_A, int nnz_A, dtype_B const *B, dtype_C *C)
 
static 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)
 
static 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)
 
static void offload_gemm (char tA, char tB, int m, int n, int k, dtype_A const *A, dtype_B const *B, dtype_C *C)
 
- Static Public Member Functions inherited from CTF::Monoid_Kernel< dtype_C, g >
static MPI_Op get_MPI_Op ()
 
static void xpy (int n, dtype_C const *X, int incX, dtype_C *Y, int incY)
 

Additional Inherited Members

- Data Fields inherited from CTF_int::accumulatable
int el_size
 size of each element of algstrct in bytes More...
 
- Data Fields inherited from CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >
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
 

Detailed Description

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
class CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >

Definition at line 166 of file kernel.h.

Constructor & Destructor Documentation

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::Bivar_Kernel ( )
inline

Definition at line 168 of file kernel.h.

References CTF_int::accumulatable::el_size.

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::Bivar_Kernel ( bool  is_comm)
inline

Definition at line 176 of file kernel.h.

Member Function Documentation

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::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
inlinevirtual

Reimplemented from CTF_int::bivar_function.

Definition at line 235 of file kernel.h.

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::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
inlinevirtual

Reimplemented from CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >.

Definition at line 527 of file kernel.h.

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::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
inlinevirtual

Reimplemented from CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >.

Definition at line 511 of file kernel.h.

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::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
inlinevirtual

Reimplemented from CTF::Bivar_Function< dtype_A, dtype_B, dtype_C >.

Definition at line 494 of file kernel.h.

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::cgemm ( char  tA,
char  tB,
int  m,
int  n,
int  k,
char const *  A,
char const *  B,
char *  C 
) const
inlinevirtual

Reimplemented from CTF_int::bivar_function.

Definition at line 274 of file kernel.h.

References CTF_int::gemm().

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::coffload_csrmm ( int  m,
int  n,
int  k,
char const *  all_data,
char const *  B,
char *  C 
) const
inlinevirtual

Reimplemented from CTF_int::bivar_function.

Definition at line 588 of file kernel.h.

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::coffload_gemm ( char  tA,
char  tB,
int  m,
int  n,
int  k,
char const *  A,
char const *  B,
char *  C 
) const
inlinevirtual

Reimplemented from CTF_int::bivar_function.

Definition at line 564 of file kernel.h.

References CTF_int::offload_gemm().

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
static void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::coomm ( int  m,
int  n,
int  k,
dtype_A const *  A,
int const *  rows_A,
int const *  cols_A,
int  nnz_A,
dtype_B const *  B,
dtype_C *  C 
)
inlinestatic

Definition at line 215 of file kernel.h.

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
static void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::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 
)
inlinestatic

Definition at line 248 of file kernel.h.

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::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 
) const
inline
template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::csrmultcsr_old ( 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 
) const
inline
template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
static void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::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 
)
inlinestatic

Definition at line 289 of file kernel.h.

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
static void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::gemm ( char  tA,
char  tB,
int  m,
int  n,
int  k,
dtype_A const *  A,
dtype_B const *  B,
dtype_C *  C 
)
inlinestatic

Definition at line 185 of file kernel.h.

template<typename dtype_A, typename dtype_B, typename dtype_C, dtype_C(*)(dtype_A, dtype_B) f, void(*)(dtype_C, dtype_C &) g = default_monoid<dtype_C>>
static void CTF::Bivar_Kernel< dtype_A, dtype_B, dtype_C, f, g >::offload_gemm ( char  tA,
char  tB,
int  m,
int  n,
int  k,
dtype_A const *  A,
dtype_B const *  B,
dtype_C *  C 
)
inlinestatic

Definition at line 542 of file kernel.h.


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