4 #include "../tensor/algstrct.h" 17 int64_t
get_csr_size(int64_t nnz,
int nrow,
int val_size);
83 static void csrmm(
char const * A,
algstrct const * sr_A,
int m,
int n,
int k,
char const * alpha,
char const * B,
algstrct const * sr_B,
char const * beta,
char * C,
algstrct const * sr_C,
bivar_function const * func,
bool do_offload);
88 static void csrmultd(
char const * A,
algstrct const * sr_A,
int m,
int n,
int k,
char const * alpha,
char const * B,
algstrct const * sr_B,
char const * beta,
char * C,
algstrct const * sr_C,
bivar_function const * func,
bool do_offload);
93 static void csrmultcsr(
char const * A,
algstrct const * sr_A,
int m,
int n,
int k,
char const * alpha,
char const * B,
algstrct const * sr_B,
char const * beta,
char *& C,
algstrct const * sr_C,
bivar_function const * func,
bool do_offload);
int * IA() const
retrieves prefix sum of number of nonzeros for each row (of size nrow()+1) out of all_data ...
static char * csr_add(char *cA, char *cB, accumulatable const *adder)
int bivar_function(int n, World &dw)
untyped internal class for triply-typed bivariate function
static void csrmultcsr(char const *A, algstrct const *sr_A, int m, int n, int k, char const *alpha, char const *B, algstrct const *sr_B, char const *beta, char *&C, algstrct const *sr_C, bivar_function const *func, bool do_offload)
computes C = beta*C + func(alpha*A*B) where A, B, and C are CSR_Matrices, while C is dense ...
static void compute_has_col(int const *JA, int const *IA, int const *JB, int const *IB, int i, int *has_col)
int ncol() const
retrieves number of columns out of all_data
void print(algstrct const *sr)
outputs matrix data to stdout, intended for debugging
int * JA() const
retrieves column indices of each value in vals stored in sorted form by row
int64_t nnz() const
retrieves number of nonzeros out of all_data
serialized matrix in coordinate format, meaning three arrays of dimension nnz are stored...
abstract class that knows how to add
abstraction for a serialized sparse matrix stored in column-sparse-row (CSR) layout ...
int nrow() const
retrieves number of rows out of all_data
char * all_data
serialized buffer containing all info, index, and values related to matrix
char * vals() const
retrieves array of values out of all_data
static void csrmm(char const *A, algstrct const *sr_A, int m, int n, int k, char const *alpha, char const *B, algstrct const *sr_B, char const *beta, char *C, algstrct const *sr_C, bivar_function const *func, bool do_offload)
computes C = beta*C + func(alpha*A*B) where A is a CSR_Matrix, while B and C are dense ...
algstrct (algebraic structure) defines the elementwise operations computed in each tensor contraction...
CSR_Matrix(CSR_Matrix const &other)
int64_t get_csr_size(int64_t nnz, int nrow_, int val_size)
computes the size of a serialized CSR matrix
void partition(int s, char **parts_buffer, CSR_Matrix **parts)
splits CSR matrix into s submatrices (returned) corresponding to subsets of rows, all parts allocated...
int val_size() const
retrieves matrix entry size out of all_data
int64_t size() const
retrieves buffer size out of all_data
static void csrmultd(char const *A, algstrct const *sr_A, int m, int n, int k, char const *alpha, char const *B, algstrct const *sr_B, char const *beta, char *C, algstrct const *sr_C, bivar_function const *func, bool do_offload)
computes C = beta*C + func(alpha*A*B) where A and B are CSR_Matrices, while C is dense ...