GpuSparseMatrixWrapper.hpp
Go to the documentation of this file.
67 Since the generic API for CUDA/HIP is primaryly supported on CUDA 13 (and not yet HIP) for blocked
68 matrices, places wanting to use blocked matrices can invoke this class which handles which API to use.
179 static GpuSparseMatrixWrapper<T> fromMatrix(const MatrixType& matrix, bool copyNonZeroElementsDirectly = false)
The GpuSparseMatrixGeneric class uses cuSPARSE Generic API for sparse matrix operations. Definition: GpuSparseMatrixGeneric.hpp:51 The GpuSparseMatrix class simple wrapper class for a CuSparse matrix. Definition: GpuSparseMatrix.hpp:60 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 The GpuSparseMatrixWrapper Checks CUDA/HIP version and dispatches a version either using the old or t... Definition: GpuSparseMatrixWrapper.hpp:61 GpuVector< int > & getRowIndices() getRowIndices returns the row indices used to represent the BSR structure. Definition: GpuSparseMatrixWrapper.hpp:267 virtual void usmv(T alpha, const GpuVector< T > &x, GpuVector< T > &y) const umv computes y=alpha * Ax + y Definition: GpuSparseMatrixWrapper.hpp:357 GpuSparseMatrixWrapper & operator=(const GpuSparseMatrixWrapper &)=delete GpuSparseMatrixWrapper()=default auto dispatchOnBlocksize(FunctionType function) const Dispatches a function based on the block size of the matrix. Definition: GpuSparseMatrixWrapper.hpp:410 matrix_type * operator->() Definition: GpuSparseMatrixWrapper.hpp:78 ~GpuSparseMatrixWrapper()=default void updateNonzeroValues(const GpuSparseMatrixWrapper< T > &matrix) updateNonzeroValues updates the non-zero values by using the non-zero values of the supplied matrix Definition: GpuSparseMatrixWrapper.hpp:383 detail::GpuSparseMatrixDescription & getDescription() getDescription the cusparse matrix description. Definition: GpuSparseMatrixWrapper.hpp:326 GpuSparseMatrix< T > matrix_type Definition: GpuSparseMatrixWrapper.hpp:72 static GpuSparseMatrixWrapper< T > fromMatrix(const MatrixType &matrix, bool copyNonZeroElementsDirectly=false) fromMatrix creates a new matrix with the same block size and values as the given matrix Definition: GpuSparseMatrixWrapper.hpp:179 GpuVector< int > & getColumnIndices() getColumnIndices returns the column indices used to represent the BSR structure. Definition: GpuSparseMatrixWrapper.hpp:287 virtual void mv(const GpuVector< T > &x, GpuVector< T > &y) const mv performs matrix vector multiply y = Ax Definition: GpuSparseMatrixWrapper.hpp:336 void setUnitDiagonal() setUnitDiagonal sets the CuSparse flag that this has unit diagional. Definition: GpuSparseMatrixWrapper.hpp:210 GpuVector< T > & getNonZeroValues() getNonZeroValues returns the GPU vector containing the non-zero values (ordered by block) Definition: GpuSparseMatrixWrapper.hpp:247 void setLowerTriangular() setLowerTriangular sets the CuSparse flag that this is an lower diagonal (with non-unit diagonal) mat... Definition: GpuSparseMatrixWrapper.hpp:200 GpuSparseMatrixWrapper(const GpuSparseMatrixWrapper &other) Definition: GpuSparseMatrixWrapper.hpp:146 size_t blockSize() const blockSize size of the blocks Definition: GpuSparseMatrixWrapper.hpp:316 const GpuVector< int > & getRowIndices() const getRowIndices returns the row indices used to represent the BSR structure. Definition: GpuSparseMatrixWrapper.hpp:277 void setUpperTriangular() Definition: GpuSparseMatrixWrapper.hpp:190 size_t nonzeroes() const nonzeroes behaves as the Dune::BCRSMatrix::nonzeros() function and returns the number of non zero blo... Definition: GpuSparseMatrixWrapper.hpp:237 const GpuVector< T > & getNonZeroValues() const getNonZeroValues returns the GPU vector containing the non-zero values (ordered by block) Definition: GpuSparseMatrixWrapper.hpp:257 GpuSparseMatrixWrapper(const T *nonZeroElements, const int *rowIndices, const int *columnIndices, size_t numberOfNonzeroBlocks, size_t blockSize, size_t numberOfRows) Definition: GpuSparseMatrixWrapper.hpp:114 const GpuVector< int > & getColumnIndices() const getColumnIndices returns the column indices used to represent the BSR structure. Definition: GpuSparseMatrixWrapper.hpp:297 virtual void umv(const GpuVector< T > &x, GpuVector< T > &y) const umv computes y=Ax+y Definition: GpuSparseMatrixWrapper.hpp:346 const matrix_type * operator->() const Definition: GpuSparseMatrixWrapper.hpp:84 void updateNonzeroValues(const MatrixType &matrix, bool copyNonZeroElementsDirectly=false) updateNonzeroValues updates the non-zero values by using the non-zero values of the supplied matrix Definition: GpuSparseMatrixWrapper.hpp:373 void setNonUnitDiagonal() setNonUnitDiagonal sets the CuSparse flag that this has non-unit diagional. Definition: GpuSparseMatrixWrapper.hpp:220 const matrix_type & get() const Definition: GpuSparseMatrixWrapper.hpp:162 static constexpr int max_block_size Maximum block size supported by this implementation. Definition: GpuSparseMatrixWrapper.hpp:99 size_t N() const N returns the number of rows (which is equal to the number of columns) Definition: GpuSparseMatrixWrapper.hpp:228 T field_type Definition: GpuSparseMatrixWrapper.hpp:63 GpuSparseMatrixWrapper(const GpuVector< int > &rowIndices, const GpuVector< int > &columnIndices, size_t blockSize) Definition: GpuSparseMatrixWrapper.hpp:139 size_t dim() const dim returns the dimension of the vector space on which this matrix acts Definition: GpuSparseMatrixWrapper.hpp:308 The CuSparseResource class wraps a CuSparse resource in a proper RAII pattern. Definition: CuSparseResource.hpp:55 Definition: AmgxInterface.hpp:38 |