|
GpuSparseMatrix.hpp
Go to the documentation of this file.
127 static GpuSparseMatrix<T> fromMatrix(const MatrixType& matrix, bool copyNonZeroElementsDirectly = false);
158 // We don't believe this will yield any performance penality (it's used too far away from the inner loop),
172 // We don't believe this will yield any performance penality (it's used too far away from the inner loop),
266 // We don't believe this will yield any performance penality (it's used too far away from the inner loop),
279 // We don't believe this will yield any performance penality (it's used too far away from the inner loop),
The GpuSparseMatrixGeneric class uses cuSPARSE Generic API for sparse matrix operations. Definition: GpuSparseMatrixGeneric.hpp:48 The GpuSparseMatrix class simple wrapper class for a CuSparse matrix. Definition: GpuSparseMatrix.hpp:61 GpuSparseMatrix & operator=(const GpuSparseMatrix &)=delete virtual void mv(const GpuVector< T > &x, GpuVector< T > &y) const mv performs matrix vector multiply y = Ax const GpuVector< int > & getRowIndices() const getRowIndices returns the row indices used to represent the BSR structure. Definition: GpuSparseMatrix.hpp:221 std::size_t blockSize() const blockSize size of the blocks Definition: GpuSparseMatrix.hpp:274 std::size_t nonzeroes() const nonzeroes behaves as the Dune::BCRSMatrix::nonzeros() function and returns the number of non zero blo... Definition: GpuSparseMatrix.hpp:167 const GpuVector< int > & getColumnIndices() const getColumnIndices returns the column indices used to represent the BSR structure. Definition: GpuSparseMatrix.hpp:247 void setNonUnitDiagonal() setNonUnitDiagonal sets the CuSparse flag that this has non-unit diagional. void updateNonzeroValues(const MatrixType &matrix, bool copyNonZeroElementsDirectly=false) updateNonzeroValues updates the non-zero values by using the non-zero values of the supplied matrix void updateNonzeroValues(const GpuSparseMatrix< T > &matrix) updateNonzeroValues updates the non-zero values by using the non-zero values of the supplied matrix GpuSparseMatrix(const GpuVector< int > &rowIndices, const GpuVector< int > &columnIndices, std::size_t blockSize) std::size_t dim() const dim returns the dimension of the vector space on which this matrix acts Definition: GpuSparseMatrix.hpp:261 detail::GpuSparseMatrixDescription & getDescription() getDescription the cusparse matrix description. Definition: GpuSparseMatrix.hpp:289 GpuSparseMatrix(const GpuSparseMatrix &) GpuVector< int > & getRowIndices() getRowIndices returns the row indices used to represent the BSR structure. Definition: GpuSparseMatrix.hpp:208 const GpuVector< T > & getNonZeroValues() const getNonZeroValues returns the GPU vector containing the non-zero values (ordered by block) Definition: GpuSparseMatrix.hpp:195 void updateNonzeroValues(const GpuSparseMatrixGeneric< T > &matrix) updateNonzeroValues updates the non-zero values by using the non-zero values of the supplied matrix void setUpperTriangular() setUpperTriangular sets the CuSparse flag that this is an upper diagonal (with unit diagonal) matrix. virtual void umv(const GpuVector< T > &x, GpuVector< T > &y) const umv computes y=Ax+y virtual ~GpuSparseMatrix() void setLowerTriangular() setLowerTriangular sets the CuSparse flag that this is an lower diagonal (with non-unit diagonal) mat... static GpuSparseMatrix< T > fromMatrix(const MatrixType &matrix, bool copyNonZeroElementsDirectly=false) fromMatrix creates a new matrix with the same block size and values as the given matrix static constexpr int max_block_size Maximum block size supported by this implementation. Definition: GpuSparseMatrix.hpp:73 auto dispatchOnBlocksize(FunctionType function) const Dispatches a function based on the block size of the matrix. Definition: GpuSparseMatrix.hpp:365 void setUnitDiagonal() setUnitDiagonal sets the CuSparse flag that this has unit diagional. virtual void usmv(T alpha, const GpuVector< T > &x, GpuVector< T > &y) const umv computes y=alpha * Ax + y GpuVector< int > & getColumnIndices() getColumnIndices returns the column indices used to represent the BSR structure. Definition: GpuSparseMatrix.hpp:234 std::size_t N() const N returns the number of rows (which is equal to the number of columns) Definition: GpuSparseMatrix.hpp:153 GpuVector< T > & getNonZeroValues() getNonZeroValues returns the GPU vector containing the non-zero values (ordered by block) Definition: GpuSparseMatrix.hpp:182 GpuSparseMatrix(const T *nonZeroElements, const int *rowIndices, const int *columnIndices, std::size_t numberOfNonzeroBlocks, std::size_t blockSize, std::size_t numberOfRows) The CuSparseHandle class provides a singleton for the simulator universal cuSparseHandle. Definition: CuSparseHandle.hpp:41 The CuSparseResource class wraps a CuSparse resource in a proper RAII pattern. Definition: CuSparseResource.hpp:55 std::shared_ptr< CuSparseResource< cusparseMatDescr_t > > GpuSparseMatrixDescriptionPtr Definition: CuMatrixDescription.hpp:35 __host__ __device__ std::size_t to_size_t(int i) to_size_t converts a (on most relevant platforms) a 32 bit signed int to a 64 bits unsigned int Definition: safe_conversion.hpp:86 A small, fixed‑dimension MiniVector class backed by std::array that can be used in both host and CUDA... Definition: AmgxInterface.hpp:38 |