Cyclops Tensor Framework
parallel arithmetic on multidimensional arrays
Matrix multiplication

Multiplication of two matrices with user-defined attributes of symmetry and sparsity. More...

Collaboration diagram for Matrix multiplication:

Functions

int matmul (int m, int n, int k, World &dw, int sym_A=NS, int sym_B=NS, int sym_C=NS, double sp_A=1., double sp_B=1., double sp_C=1., bool test=true, bool bench=false, int niter=10)
 (if test) tests and (if bench) benchmarks m*n*k matrix multiplication with matrices of specified symmetry and sparsity fraction More...
 
char * getCmdOption (char **begin, char **end, const std::string &option)
 
int main (int argc, char **argv)
 

Detailed Description

Multiplication of two matrices with user-defined attributes of symmetry and sparsity.

Function Documentation

char* getCmdOption ( char **  begin,
char **  end,
const std::string &  option 
)

Definition at line 162 of file matmul.cxx.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 173 of file matmul.cxx.

References AS, getCmdOption(), matmul(), ctf.core::np(), NS, ctf.core::rank(), SH, and SY.

int matmul ( int  m,
int  n,
int  k,
World dw,
int  sym_A = NS,
int  sym_B = NS,
int  sym_C = NS,
double  sp_A = 1.,
double  sp_B = 1.,
double  sp_C = 1.,
bool  test = true,
bool  bench = false,
int  niter = 10 
)

(if test) tests and (if bench) benchmarks m*n*k matrix multiplication with matrices of specified symmetry and sparsity fraction

Parameters
[in]mnumber of rows in C, A
[in]nnumber of cols in C, B
[in]knumber of rows in A, cols in B
[in]dwset of processors on which to execute matmul
[in]sym_Ain {NS, SY, AS, SH} symmetry attributes of A
[in]sym_Bin {NS, SY, AS, SH} symmetry attributes of B
[in]sym_Cin {NS, SY, AS, SH} symmetry attributes of C
[in]sp_Afraction of nonzeros in A (if 1. A stored as dense)
[in]sp_Bfraction of nonzeros in B (if 1. B stored as dense)
[in]sp_Cfraction of nonzeros in C (if 1. C stored as dense)
[in]testwhether to test
[in]benchwhether to benchmark
[in]niterhow many iterations to compute

Definition at line 28 of file matmul.cxx.

References AS, CTF::Timer_epoch::begin(), CTF::Timer_epoch::end(), CTF::Tensor< dtype >::fill_random(), CTF::Tensor< dtype >::fill_sp_random(), CTF::Tensor< dtype >::norm2(), NS, CTF::World::rank, SH, SP, and SY.

Referenced by main().