|
ViennaLS
|
#include <cstddef>#include <cstdint>Go to the source code of this file.
Macros | |
| #define | VIENNALS_GPU_ABI_VERSION 1 |
| #define | VIENNALS_GPU_ABI __attribute__((visibility("default"))) |
Functions | |
| VIENNALS_GPU_ABI int | viennalsGpuAbiVersion (void) |
| Returns the ABI version this library was built against. | |
| VIENNALS_GPU_ABI void * | viennalsGpuAllocBuffers (uint32_t n, int nFaces, int useIlu0Preconditioner) |
| Allocate GPU buffers for n nodes and nFaces (2*D) faces. Returns nullptr if no usable CUDA device or context is available. | |
| VIENNALS_GPU_ABI void | viennalsGpuFreeBuffers (void *handle) |
| Free previously allocated buffers. Safe to call with nullptr. | |
| VIENNALS_GPU_ABI int | viennalsGpuIsValid (const void *handle) |
| Non-zero if the handle is valid (non-null and successfully allocated). | |
| VIENNALS_GPU_ABI const char * | viennalsGpuGetLastErrorMessage (void) |
| Human-readable detail for the last failure on this thread. | |
| VIENNALS_GPU_ABI int | viennalsGpuUploadNeighborIds (void *handle, const uint32_t *nb, std::size_t count) |
| Upload the geometry-fixed neighbor-ID array; count must equal nFaces*n. | |
| VIENNALS_GPU_ABI int | viennalsGpuSetupCSR (void *handle, const uint32_t *hNb, uint32_t n, int nFaces) |
| Build the CSR sparsity pattern and run the cuSPARSE symbolic analysis. | |
| VIENNALS_GPU_ABI int | viennalsGpuUploadSolverArrays (void *handle, const double *diag, const double *b, const double *coeff, uint32_t diagLen, std::size_t coeffLen) |
| Upload per-solve arrays (diag, b, faceCoeffs) and re-factorize ILU(0). | |
| VIENNALS_GPU_ABI int | viennalsGpuUploadRhs (void *handle, const double *b, uint32_t n) |
| Upload only the RHS vector, when the matrix geometry is already resident. | |
| VIENNALS_GPU_ABI int | viennalsGpuSolveBiCGSTAB (void *handle, double *x, double diagEps, unsigned maxIter, double tolerance, unsigned *outIterations, double *outResidual) |
| Run GPU BiCGSTAB. x is the initial guess on entry, the solution on exit. Non-zero only when the solve converged and produced finite values. | |
| #define VIENNALS_GPU_ABI __attribute__((visibility("default"))) |
| #define VIENNALS_GPU_ABI_VERSION 1 |
| VIENNALS_GPU_ABI int viennalsGpuAbiVersion | ( | void | ) |
Returns the ABI version this library was built against.
| VIENNALS_GPU_ABI void * viennalsGpuAllocBuffers | ( | uint32_t | n, |
| int | nFaces, | ||
| int | useIlu0Preconditioner ) |
Allocate GPU buffers for n nodes and nFaces (2*D) faces. Returns nullptr if no usable CUDA device or context is available.
| VIENNALS_GPU_ABI void viennalsGpuFreeBuffers | ( | void * | handle | ) |
Free previously allocated buffers. Safe to call with nullptr.
| VIENNALS_GPU_ABI const char * viennalsGpuGetLastErrorMessage | ( | void | ) |
Human-readable detail for the last failure on this thread.
| VIENNALS_GPU_ABI int viennalsGpuIsValid | ( | const void * | handle | ) |
Non-zero if the handle is valid (non-null and successfully allocated).
| VIENNALS_GPU_ABI int viennalsGpuSetupCSR | ( | void * | handle, |
| const uint32_t * | hNb, | ||
| uint32_t | n, | ||
| int | nFaces ) |
Build the CSR sparsity pattern and run the cuSPARSE symbolic analysis.
| VIENNALS_GPU_ABI int viennalsGpuSolveBiCGSTAB | ( | void * | handle, |
| double * | x, | ||
| double | diagEps, | ||
| unsigned | maxIter, | ||
| double | tolerance, | ||
| unsigned * | outIterations, | ||
| double * | outResidual ) |
Run GPU BiCGSTAB. x is the initial guess on entry, the solution on exit. Non-zero only when the solve converged and produced finite values.
| VIENNALS_GPU_ABI int viennalsGpuUploadNeighborIds | ( | void * | handle, |
| const uint32_t * | nb, | ||
| std::size_t | count ) |
Upload the geometry-fixed neighbor-ID array; count must equal nFaces*n.
| VIENNALS_GPU_ABI int viennalsGpuUploadRhs | ( | void * | handle, |
| const double * | b, | ||
| uint32_t | n ) |
Upload only the RHS vector, when the matrix geometry is already resident.
| VIENNALS_GPU_ABI int viennalsGpuUploadSolverArrays | ( | void * | handle, |
| const double * | diag, | ||
| const double * | b, | ||
| const double * | coeff, | ||
| uint32_t | diagLen, | ||
| std::size_t | coeffLen ) |
Upload per-solve arrays (diag, b, faceCoeffs) and re-factorize ILU(0).