GpuSparseMatrixGeneric.hpp
Go to the documentation of this file.
77 GpuSparseMatrixGeneric(const GpuVector<int>& rowIndices, const GpuVector<int>& columnIndices, size_t blockSize);
104 static GpuSparseMatrixGeneric<T> fromMatrix(const MatrixType& matrix, bool copyNonZeroElementsDirectly = false);
123 // We don't believe this will yield any performance penality (it's used too far away from the inner loop),
199 // We don't believe this will yield any performance penality (it's used too far away from the inner loop),
212 // We don't believe this will yield any performance penality (it's used too far away from the inner loop),
297 static_assert(std::is_same_v<T, float> || std::is_same_v<T, double>, "Only float and double are supported");
The GpuSparseMatrixGeneric class uses cuSPARSE Generic API for sparse matrix operations. Definition: GpuSparseMatrixGeneric.hpp:51 size_t dim() const dim returns the dimension of the vector space on which this matrix acts Definition: GpuSparseMatrixGeneric.hpp:194 GpuSparseMatrixGeneric & operator=(const GpuSparseMatrixGeneric &)=delete GpuSparseMatrixGeneric(const GpuVector< int > &rowIndices, const GpuVector< int > &columnIndices, size_t blockSize) const GpuVector< int > & getColumnIndices() const getColumnIndices returns the column indices used to represent the BSR structure. Definition: GpuSparseMatrixGeneric.hpp:183 size_t blockSize() const blockSize size of the blocks Definition: GpuSparseMatrixGeneric.hpp:207 virtual void umv(const GpuVector< T > &x, GpuVector< T > &y) const umv computes y=Ax+y virtual ~GpuSparseMatrixGeneric() virtual void mv(const GpuVector< T > &x, GpuVector< T > &y) const mv performs matrix vector multiply y = Ax GpuSparseMatrixGeneric(const GpuSparseMatrixGeneric &) void updateNonzeroValues(const MatrixType &matrix, bool copyNonZeroElementsDirectly=false) updateNonzeroValues updates the non-zero values by using the non-zero values of the supplied matrix GpuVector< int > & getColumnIndices() getColumnIndices returns the column indices used to represent the BSR structure. Definition: GpuSparseMatrixGeneric.hpp:173 const GpuVector< T > & getNonZeroValues() const getNonZeroValues returns the GPU vector containing the non-zero values (ordered by block) Definition: GpuSparseMatrixGeneric.hpp:143 T field_type Definition: GpuSparseMatrixGeneric.hpp:53 GpuVector< T > & getNonZeroValues() getNonZeroValues returns the GPU vector containing the non-zero values (ordered by block) Definition: GpuSparseMatrixGeneric.hpp:133 void updateNonzeroValues(const GpuSparseMatrixGeneric< T > &matrix) updateNonzeroValues updates the non-zero values by using the non-zero values of the supplied matrix GpuVector< int > & getRowIndices() getRowIndices returns the row indices used to represent the BSR structure. Definition: GpuSparseMatrixGeneric.hpp:153 size_t nonzeroes() const nonzeroes behaves as the Dune::BCRSMatrix::nonzeros() function and returns the number of non zero blo... Definition: GpuSparseMatrixGeneric.hpp:118 GpuSparseMatrixGeneric(const T *nonZeroElements, const int *rowIndices, const int *columnIndices, size_t numberOfNonzeroBlocks, size_t blockSize, size_t numberOfRows) void preprocessSpMV() Preprocess SpMV operation to optimize for sparsity pattern. static GpuSparseMatrixGeneric< T > fromMatrix(const MatrixType &matrix, bool copyNonZeroElementsDirectly=false) fromMatrix creates a new matrix with the same block size and values as the given matrix size_t N() const N returns the number of rows (which is equal to the number of columns) Definition: GpuSparseMatrixGeneric.hpp:109 const GpuVector< int > & getRowIndices() const getRowIndices returns the row indices used to represent the BSR structure. Definition: GpuSparseMatrixGeneric.hpp:163 virtual void usmv(T alpha, const GpuVector< T > &x, GpuVector< T > &y) const umv computes y=alpha * Ax + y The CuSparseHandle class provides a singleton for the simulator universal cuSparseHandle. Definition: CuSparseHandle.hpp:41 auto makeSafeMatrixDescriptor() Create RAII-managed cuSPARSE sparse matrix descriptor. Definition: gpusparse_matrix_utilities.hpp:56 __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 Definition: AmgxInterface.hpp:38 |