Opm::gpuistl::AmgxInterface Class Reference Unified interface for AMGX operations with both CPU and GPU data structures. More...
Detailed DescriptionUnified interface for AMGX operations with both CPU and GPU data structures. This class provides utilities for working with AMGX resources and transferring data between CPU/GPU data structures and AMGX handles. It handles type detection and automatically chooses the most efficient transfer method:
Member Function Documentation◆ createConfig()
Create an AMGX config handle from a configuration string.
References OPM_AMGX_SAFE_CALL. Referenced by Amgx::AmgxPreconditioner< M, X, Y >::AmgxPreconditioner(). ◆ createMatrix()
Create an AMGX matrix.
References OPM_AMGX_SAFE_CALL. Referenced by Amgx::AmgxPreconditioner< M, X, Y >::AmgxPreconditioner(). ◆ createResources()
Create AMGX resources from a config.
References OPM_AMGX_SAFE_CALL. Referenced by Amgx::AmgxPreconditioner< M, X, Y >::AmgxPreconditioner(). ◆ createSolver()
Create an AMGX solver.
References OPM_AMGX_SAFE_CALL. Referenced by Amgx::AmgxPreconditioner< M, X, Y >::AmgxPreconditioner(). ◆ createVector()
Create an AMGX vector.
References OPM_AMGX_SAFE_CALL. Referenced by Amgx::AmgxPreconditioner< M, X, Y >::AmgxPreconditioner(). ◆ destroyConfig()
Destroy an AMGX config handle.
References OPM_AMGX_SAFE_CALL. Referenced by Amgx::AmgxPreconditioner< M, X, Y >::~AmgxPreconditioner(). ◆ destroyMatrix()
template<typename MatrixType >
Destroy an AMGX matrix handle.
References OPM_AMGX_SAFE_CALL. Referenced by Amgx::AmgxPreconditioner< M, X, Y >::~AmgxPreconditioner(). ◆ destroyResources()
Destroy an AMGX resources handle.
References OPM_AMGX_SAFE_CALL. Referenced by Amgx::AmgxPreconditioner< M, X, Y >::~AmgxPreconditioner(). ◆ destroySolver()
Destroy an AMGX solver handle.
References OPM_AMGX_SAFE_CALL. Referenced by Amgx::AmgxPreconditioner< M, X, Y >::~AmgxPreconditioner(). ◆ destroyVector()
Destroy an AMGX vector handle.
References OPM_AMGX_SAFE_CALL. Referenced by Amgx::AmgxPreconditioner< M, X, Y >::~AmgxPreconditioner(). ◆ determineAmgxMode()
template<typename MatrixFieldType , typename VectorFieldType >
Determine the appropriate AMGX mode based on matrix and vector field types.
◆ finalize()
Finalize the AMGX library. This should be called once at the end of the program to release AMGX resources.
References OPM_AMGX_SAFE_CALL. ◆ initialize()
Initialize the AMGX library. This should be called once at the start of the program before using any AMGX functionality.
References OPM_AMGX_SAFE_CALL. ◆ initializeMatrix()
template<typename MatrixType >
Initialize an AMGX matrix from any matrix type (CPU or GPU) Selects the transfer method based on the matrix type.
References OPM_AMGX_SAFE_CALL, Opm::gpuistl::detail::to_int(), and updateAmgxMatrixFromGpuSparseMatrix(). Referenced by Amgx::AmgxPreconditioner< M, X, Y >::AmgxPreconditioner(). ◆ initializeVector()
Initialize an AMGX vector with zeros. Creates a zero-initialized vector of the appropriate size.
References OPM_AMGX_SAFE_CALL. Referenced by Amgx::AmgxPreconditioner< M, X, Y >::AmgxPreconditioner(). ◆ transferVectorFromAmgx()
template<typename VectorType >
Transfer vector from AMGX to any vector type (CPU or GPU) Selects the transfer method based on the vector type.
References OPM_AMGX_SAFE_CALL, and updateGpuVectorFromAmgx(). Referenced by Amgx::AmgxPreconditioner< M, X, Y >::apply(). ◆ transferVectorToAmgx()
template<typename VectorType >
Transfer vector to AMGX from any vector type (CPU or GPU) Selects the transfer method based on the vector type.
References OPM_AMGX_SAFE_CALL, and updateAmgxFromGpuVector(). Referenced by Amgx::AmgxPreconditioner< M, X, Y >::apply(). ◆ updateAmgxFromGpuVector()
template<typename T >
Update an AMGX vector from a GpuVector (device-to-device transfer) Updates the AMGX vector with the contents of the GpuVector using direct device memory access. The AMGX vector must already be created with appropriate resources and mode.
References OPM_AMGX_SAFE_CALL. Referenced by transferVectorToAmgx(). ◆ updateAmgxMatrixCoefficientsFromGpuSparseMatrix()
template<typename T >
Update only the coefficient values of an AMGX matrix from a GpuSparseMatrix. Updates just the coefficient values of an AMGX matrix without changing its sparsity pattern. This is more efficient when the matrix structure remains the same.
References Opm::gpuistl::GpuSparseMatrix< T >::getNonZeroValues(), Opm::gpuistl::GpuSparseMatrix< T >::N(), Opm::gpuistl::GpuSparseMatrix< T >::nonzeroes(), OPM_AMGX_SAFE_CALL, and Opm::gpuistl::detail::to_int(). Referenced by updateMatrixValues(). ◆ updateAmgxMatrixFromGpuSparseMatrix()
template<typename T >
Update an AMGX matrix from a GpuSparseMatrix (device-to-device transfer) Uploads the entire matrix structure and values from GpuSparseMatrix to AMGX.
References Opm::gpuistl::GpuSparseMatrix< T >::blockSize(), Opm::gpuistl::GpuSparseMatrix< T >::getColumnIndices(), Opm::gpuistl::GpuSparseMatrix< T >::getNonZeroValues(), Opm::gpuistl::GpuSparseMatrix< T >::getRowIndices(), Opm::gpuistl::GpuSparseMatrix< T >::N(), Opm::gpuistl::GpuSparseMatrix< T >::nonzeroes(), OPM_AMGX_SAFE_CALL, and Opm::gpuistl::detail::to_int(). Referenced by initializeMatrix(). ◆ updateGpuSparseMatrixFromAmgxMatrix()
template<typename T >
Update a GpuSparseMatrix from an AMGX matrix (device-to-device transfer) Downloads the matrix data from AMGX and updates the GpuSparseMatrix with the values. The sparsity pattern is assumed to be identical, so only values are updated.
References Opm::gpuistl::GpuSparseMatrix< T >::getNonZeroValues(), OPM_AMGX_SAFE_CALL, and OPM_GPU_SAFE_CALL. ◆ updateGpuVectorFromAmgx()
template<typename T >
Update a GpuVector from an AMGX vector (device-to-device transfer) Updates the GpuVector with the contents of the AMGX vector using direct device memory access.
References OPM_AMGX_SAFE_CALL. Referenced by transferVectorFromAmgx(). ◆ updateMatrixValues()
template<typename MatrixType >
Update matrix values in AMGX. Selects the update method based on the matrix type. Updates the coefficients of an AMGX matrix, without changing its sparsity pattern.
References OPM_AMGX_SAFE_CALL, and updateAmgxMatrixCoefficientsFromGpuSparseMatrix(). Referenced by Amgx::AmgxPreconditioner< M, X, Y >::update(). The documentation for this class was generated from the following file: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||