|
Public Types |
Public Member Functions |
Static Public Member Functions |
Static Public Attributes |
List of all members
Opm::gpuistl::GpuSparseMatrixWrapper< T, ForceLegacy > Class Template Reference The GpuSparseMatrixWrapper Checks CUDA/HIP version and dispatches a version either using the old or the generic CUDA API. More...
Inheritance diagram for Opm::gpuistl::GpuSparseMatrixWrapper< T, ForceLegacy >:
![]()
Detailed Descriptiontemplate<typename T, bool ForceLegacy = false> class Opm::gpuistl::GpuSparseMatrixWrapper< T, ForceLegacy > The GpuSparseMatrixWrapper Checks CUDA/HIP version and dispatches a version either using the old or the generic CUDA API.
Member Typedef Documentation◆ field_type
template<typename T , bool ForceLegacy = false>
◆ matrix_type
template<typename T , bool ForceLegacy = false>
Constructor & Destructor Documentation◆ GpuSparseMatrixWrapper() [1/4]
template<typename T , bool ForceLegacy = false>
Create the sparse matrix specified by the raw data.
References Opm::gpuistl::GpuSparseMatrixWrapper< T, ForceLegacy >::blockSize(). ◆ GpuSparseMatrixWrapper() [2/4]
template<typename T , bool ForceLegacy = false>
Create a sparse matrix by copying the sparsity structure of another matrix, not filling in the values
References Opm::gpuistl::GpuSparseMatrixWrapper< T, ForceLegacy >::blockSize(). ◆ GpuSparseMatrixWrapper() [3/4]
template<typename T , bool ForceLegacy = false>
◆ ~GpuSparseMatrixWrapper()
template<typename T , bool ForceLegacy = false>
◆ GpuSparseMatrixWrapper() [4/4]
template<typename T , bool ForceLegacy = false>
Member Function Documentation◆ blockSize()
template<typename T , bool ForceLegacy = false>
blockSize size of the blocks Referenced by Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::GpuSeqILU0(), Opm::gpuistl::GpuSparseMatrixWrapper< T, ForceLegacy >::GpuSparseMatrixWrapper(), and Opm::gpuistl::AmgxInterface::updateAmgxMatrixFromGpuSparseMatrix(). ◆ dim()
template<typename T , bool ForceLegacy = false>
dim returns the dimension of the vector space on which this matrix acts This is equivalent to matrix.N() * matrix.blockSize()
Referenced by Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::GpuSeqILU0(). ◆ dispatchOnBlocksize()
template<typename T , bool ForceLegacy = false>
template<class FunctionType >
Dispatches a function based on the block size of the matrix. This method allows executing different code paths depending on the block size of the matrix, up to the maximum block size specified by max_block_size. Use this function if you need the block size to be known at compile time.
You can use this function as matrix.dispatchOnBlocksize([](auto val) {
});
std::size_t blockSize() const blockSize size of the blocks Definition: GpuSparseMatrixWrapper.hpp:320 ◆ fromMatrix()
template<typename T , bool ForceLegacy = false>
template<class MatrixType >
fromMatrix creates a new matrix with the same block size and values as the given matrix
References Opm::gpuistl::GpuSparseMatrix< T >::fromMatrix(). ◆ get()
template<typename T , bool ForceLegacy = false>
◆ getColumnIndices() [1/2]
template<typename T , bool ForceLegacy = false>
getColumnIndices returns the column indices used to represent the BSR structure.
Referenced by Opm::gpuistl::AmgxInterface::updateAmgxMatrixFromGpuSparseMatrix(). ◆ getColumnIndices() [2/2]
template<typename T , bool ForceLegacy = false>
getColumnIndices returns the column indices used to represent the BSR structure.
◆ getDescription()
template<typename T , bool ForceLegacy = false>
getDescription the cusparse matrix description. This description is needed for most calls to the CuSparse library ◆ getNonZeroValues() [1/2]
template<typename T , bool ForceLegacy = false>
getNonZeroValues returns the GPU vector containing the non-zero values (ordered by block)
Referenced by Opm::gpuistl::AmgxInterface::updateAmgxMatrixCoefficientsFromGpuSparseMatrix(), Opm::gpuistl::AmgxInterface::updateAmgxMatrixFromGpuSparseMatrix(), and Opm::gpuistl::AmgxInterface::updateGpuSparseMatrixFromAmgxMatrix(). ◆ getNonZeroValues() [2/2]
template<typename T , bool ForceLegacy = false>
getNonZeroValues returns the GPU vector containing the non-zero values (ordered by block)
◆ getRowIndices() [1/2]
template<typename T , bool ForceLegacy = false>
getRowIndices returns the row indices used to represent the BSR structure.
Referenced by Opm::gpuistl::AmgxInterface::updateAmgxMatrixFromGpuSparseMatrix(). ◆ getRowIndices() [2/2]
template<typename T , bool ForceLegacy = false>
getRowIndices returns the row indices used to represent the BSR structure.
◆ mv()
template<typename T , bool ForceLegacy = false>
mv performs matrix vector multiply y = Ax
◆ N()
template<typename T , bool ForceLegacy = false>
N returns the number of rows (which is equal to the number of columns) Referenced by Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::GpuSeqILU0(), Opm::gpuistl::AmgxInterface::updateAmgxMatrixCoefficientsFromGpuSparseMatrix(), and Opm::gpuistl::AmgxInterface::updateAmgxMatrixFromGpuSparseMatrix(). ◆ nonzeroes()
template<typename T , bool ForceLegacy = false>
nonzeroes behaves as the Dune::BCRSMatrix::nonzeros() function and returns the number of non zero blocks
Referenced by Opm::gpuistl::GpuSeqILU0< M, X, Y, l >::GpuSeqILU0(), Opm::gpuistl::AmgxInterface::updateAmgxMatrixCoefficientsFromGpuSparseMatrix(), and Opm::gpuistl::AmgxInterface::updateAmgxMatrixFromGpuSparseMatrix(). ◆ operator->() [1/2]
template<typename T , bool ForceLegacy = false>
◆ operator->() [2/2]
template<typename T , bool ForceLegacy = false>
◆ operator=()
template<typename T , bool ForceLegacy = false>
◆ setLowerTriangular()
template<typename T , bool ForceLegacy = false>
template<class M = matrix_type, typename = std::enable_if_t<std::is_same_v<M, GpuSparseMatrix<T>>>>
setLowerTriangular sets the CuSparse flag that this is an lower diagonal (with non-unit diagonal) matrix. ◆ setNonUnitDiagonal()
template<typename T , bool ForceLegacy = false>
template<class M = matrix_type, typename = std::enable_if_t<std::is_same_v<M, GpuSparseMatrix<T>>>>
setNonUnitDiagonal sets the CuSparse flag that this has non-unit diagional. ◆ setUnitDiagonal()
template<typename T , bool ForceLegacy = false>
template<class M = matrix_type, typename = std::enable_if_t<std::is_same_v<M, GpuSparseMatrix<T>>>>
setUnitDiagonal sets the CuSparse flag that this has unit diagional. ◆ setUpperTriangular()
template<typename T , bool ForceLegacy = false>
template<class M = matrix_type, typename = std::enable_if_t<std::is_same_v<M, GpuSparseMatrix<T>>>>
◆ umv()
template<typename T , bool ForceLegacy = false>
umv computes y=Ax+y
◆ updateNonzeroValues() [1/2]
template<typename T , bool ForceLegacy = false>
template<bool OtherForceLegacy>
updateNonzeroValues updates the non-zero values by using the non-zero values of the supplied matrix
References Opm::gpuistl::GpuSparseMatrixWrapper< T, ForceLegacy >::get(). ◆ updateNonzeroValues() [2/2]
template<typename T , bool ForceLegacy = false>
template<class MatrixType >
updateNonzeroValues updates the non-zero values by using the non-zero values of the supplied matrix
Referenced by Opm::gpuistl::SolverAdapter< Operator, UnderlyingSolver, X >::apply(), and Opm::gpuistl::PreconditionerCPUMatrixToGPUMatrix< X, Y, CudaPreconditionerType, CPUMatrixType >::update(). ◆ usmv()
template<typename T , bool ForceLegacy = false>
umv computes y=alpha * Ax + y
Member Data Documentation◆ max_block_size
template<typename T , bool ForceLegacy = false>
Maximum block size supported by this implementation. This constant defines an upper bound on the block size to ensure reasonable compilation times. While this class itself could support larger values, functions that call dispatchOnBlocksize() might have limitations. This value can be increased if needed, but will increase compilation time due to template instantiations. The documentation for this class was generated from the following files: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||