29#ifndef _DENSE_PAR_MAT_H_
30#define _DENSE_PAR_MAT_H_
45template <
class IU,
class NU,
class DER>
48template <
class IT,
class NT>
59 array = SpHelper::allocate2D<double>(
rows,
cols);
60 for(
int i=0; i<
rows; ++i)
62 std::fill_n(array[i],
cols, value);
75 array = SpHelper::allocate2D<NT>(m, n);
76 for(
int i=0; i< m; ++i)
78 std::copy(array[i], array[i]+n,
rhs.array[i]);
86 template <
typename DER>
89 template <
typename _BinaryOperation>
115 std::shared_ptr<CommGrid> commGrid;
119 template <
class IU,
class NU,
class DER>
DenseParMat< IT, NT > & operator=(const DenseParMat< IT, NT > &rhs)
DenseParMat(NT value, std::shared_ptr< CommGrid > grid, IT rows, IT cols)
DenseParMat< IT, NT > & operator+=(const SpParMat< IT, NT, DER > &rhs)
DenseParMat(const DenseParMat< IT, NT > &rhs)
std::shared_ptr< CommGrid > getcommgrid()
DenseParMat(NT **seqarr, std::shared_ptr< CommGrid > grid, IT rows, IT cols)
FullyDistVec< IT, NT > Reduce(Dim dim, _BinaryOperation __binary_op, NT identity) const
std::shared_ptr< CommGrid > commGrid
static void deallocate2D(T **array, I m)