|
| static void | initialize () |
| | Initialize the AMGX library.
|
| |
| static void | finalize () |
| | Finalize the AMGX library.
|
| |
| static AMGX_config_handle | createConfig (const std::string &config_string) |
| | Create an AMGX config handle from a configuration string.
|
| |
| static AMGX_resources_handle | createResources (AMGX_config_handle config) |
| | Create AMGX resources from a config.
|
| |
| static AMGX_solver_handle | createSolver (AMGX_resources_handle resources, AMGX_Mode mode, AMGX_config_handle config) |
| | Create an AMGX solver.
|
| |
| static AMGX_matrix_handle | createMatrix (AMGX_resources_handle resources, AMGX_Mode mode) |
| | Create an AMGX matrix.
|
| |
| static AMGX_vector_handle | createVector (AMGX_resources_handle resources, AMGX_Mode mode) |
| | Create an AMGX vector.
|
| |
| static void | destroyConfig (AMGX_config_handle config) |
| | Destroy an AMGX config handle.
|
| |
| static void | destroyResources (AMGX_resources_handle resources) |
| | Destroy an AMGX resources handle.
|
| |
| static void | destroySolver (AMGX_solver_handle solver) |
| | Destroy an AMGX solver handle.
|
| |
| template<typename MatrixType > |
| static void | destroyMatrix (AMGX_matrix_handle amgx_matrix, const MatrixType &matrix) |
| | Destroy an AMGX matrix handle.
|
| |
| static void | destroyVector (AMGX_vector_handle vector) |
| | Destroy an AMGX vector handle.
|
| |
| template<typename T > |
| static void | updateAmgxFromGpuVector (const GpuVector< T > &gpu_vec, AMGX_vector_handle amgx_vec) |
| | Update an AMGX vector from a GpuVector (device-to-device transfer)
|
| |
| template<typename T > |
| static void | updateGpuVectorFromAmgx (AMGX_vector_handle amgx_vec, GpuVector< T > &gpu_vec) |
| | Update a GpuVector from an AMGX vector (device-to-device transfer)
|
| |
| template<typename VectorType > |
| static void | transferVectorToAmgx (const VectorType &vec, AMGX_vector_handle amgx_vec) |
| | Transfer vector to AMGX from any vector type (CPU or GPU)
|
| |
| template<typename VectorType > |
| static void | transferVectorFromAmgx (AMGX_vector_handle amgx_vec, VectorType &vec) |
| | Transfer vector from AMGX to any vector type (CPU or GPU)
|
| |
| template<typename T > |
| static void | updateAmgxMatrixFromGpuSparseMatrix (const GpuSparseMatrixWrapper< T > &gpuSparseMatrix, AMGX_matrix_handle amgxMatrix) |
| | Update an AMGX matrix from a GpuSparseMatrixWrapper (device-to-device transfer)
|
| |
| template<typename T > |
| static void | updateAmgxMatrixCoefficientsFromGpuSparseMatrix (const GpuSparseMatrixWrapper< T > &gpuSparseMatrix, AMGX_matrix_handle amgxMatrix) |
| | Update only the coefficient values of an AMGX matrix from a GpuSparseMatrix.
|
| |
| template<typename T > |
| static void | updateGpuSparseMatrixFromAmgxMatrix (AMGX_matrix_handle amgxMatrix, GpuSparseMatrixWrapper< T > &gpuSparseMatrix) |
| | Update a GpuSparseMatrixWrapper from an AMGX matrix (device-to-device transfer)
|
| |
| template<typename MatrixType > |
| static void | initializeMatrix (const MatrixType &matrix, AMGX_matrix_handle amgx_matrix) |
| | Initialize an AMGX matrix from any matrix type (CPU or GPU)
|
| |
| static void | initializeVector (int N, int block_size, AMGX_vector_handle amgx_vector) |
| | Initialize an AMGX vector with zeros.
|
| |
| template<typename MatrixType > |
| static void | updateMatrixValues (const MatrixType &matrix, AMGX_matrix_handle amgx_matrix) |
| | Update matrix values in AMGX.
|
| |
| template<typename MatrixFieldType , typename VectorFieldType > |
| static AMGX_Mode | determineAmgxMode () |
| | Determine the appropriate AMGX mode based on matrix and vector field types.
|
| |
Unified 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:
- For GPU types: Device-to-device transfers
- For CPU types: Host-to-device transfers with memory pinning
- Note
- Error handling: All methods throw AmgxError exceptions when AMGX operations fail.