37 #ifndef NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_STORAGE_SMV_BSR_HPP
38 #define NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_STORAGE_SMV_BSR_HPP
48 #include <boost/call_traits.hpp>
100 const DataVectorType& val,
101 const IndexVectorType& indx,
102 const IndexVectorType& pntr);
161 DataVectorType &out);
163 DataVectorType &out);
177 void Multiply_1x1(
const int mb,
const int kb,
const double* val,
178 const int* bindx,
const int* bpntrb,
const int* bpntre,
179 const double* b,
double* c);
181 void Multiply_2x2(
const int mb,
const int kb,
const double* val,
182 const int* bindx,
const int* bpntrb,
const int* bpntre,
183 const double* b,
double* c);
185 void Multiply_3x3(
const int mb,
const int kb,
const double* val,
186 const int* bindx,
const int* bpntrb,
const int* bpntre,
187 const double* b,
double* c);
189 void Multiply_4x4(
const int mb,
const int kb,
const double* val,
190 const int* bindx,
const int* bpntrb,
const int* bpntre,
191 const double* b,
double* c);
194 const int* bindx,
const int* bpntrb,
const int* bpntre,
195 const double* b,
double* c);
197 #ifdef NEKTAR_USING_SMV
198 void Multiply_libsmv(
const int mb,
const int kb,
const double* val,
199 const int* bindx,
const int* bpntrb,
const int* bpntre,
200 const double* b,
double* c);
228 #endif //NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_STORAGE_SMV_BSR_HPP
Array< OneD, DataType > DataVectorType
size_t GetMemoryUsage(IndexType nnz, IndexType nRows) const
Array< OneD, const DataType > ConstDataVectorType
const IterType & operator*()
const DataVectorType & m_val
StorageSmvBsr(const IndexType blkRows, const IndexType blkCols, const IndexType blkDim, const BCOMatType &bcoMat, const MatrixStorage matType=eFULL)
DataType GetFillInRatio() const
const_iterator begin() const
void Multiply_1x1(const int mb, const int kb, const double *val, const int *bindx, const int *bpntrb, const int *bpntre, const double *b, double *c)
Zero-based CSR multiply. Essentially this is slightly modified copy-paste from NIST Sparse Blas 0...
const IndexVectorType & m_pntr
bool operator==(const const_iterator &rhs)
IndexType GetNumStoredDoubles() const
Array< OneD, IndexType > IndexVectorType
const_iterator & operator++()
void Multiply(const DataType *in, DataType *out)
IndexType GetColumns() const
void(* MultiplyKernel)(const double *, const double *, double *)
void Multiply_4x4(const int mb, const int kb, const double *val, const int *bindx, const int *bpntrb, const int *bpntre, const double *b, double *c)
Zero-based BSR multiply unrolled for 4x4 blocks.
const IterType * operator->()
std::map< CoordType, BCOEntryType > BCOMatType
#define LIB_UTILITIES_EXPORT
const boost::call_traits< DataType >::const_reference GetValue(IndexType row, IndexType column) const
void Multiply_2x2(const int mb, const int kb, const double *val, const int *bindx, const int *bpntrb, const int *bpntre, const double *b, double *c)
Zero-based BSR multiply unrolled for 2x2 blocks. Essentially this is slightly optimised copy-paste fr...
void processBcoInput(const IndexType blkRows, const IndexType blkColumns, const IndexType blkDim, const BCOMatType &bcoMat)
void Multiply_generic(const int mb, const int kb, const double *val, const int *bindx, const int *bpntrb, const int *bpntre, const double *b, double *c)
Generic zero-based BSR multiply for higher matrix ranks.
IndexType GetBlkSize() const
const IndexVectorType & m_indx
CoordType storageIndexToFullCoord(IndexType storageIndex)
const_iterator(MatrixStorage matType, IndexType begin, IndexType end, IndexType blkDim, const DataVectorType &val, const IndexVectorType &indx, const IndexVectorType &pntr)
const_iterator end() const
MultiplyKernel m_mvKernel
bool operator!=(const const_iterator &rhs)
void Multiply_3x3(const int mb, const int kb, const double *val, const int *bindx, const int *bpntrb, const int *bpntre, const double *b, double *c)
Zero-based BSR multiply unrolled for 3x3 blocks.
IndexType GetRows() const
std::pair< IndexType, IndexType > CoordType
1D Array of constant elements with garbage collection and bounds checking.
void MultiplyLight(const DataVectorType &in, DataVectorType &out)
IndexType GetNumNonZeroEntries() const