22#define VIENNALS_GPU_ABI_VERSION 1
27#define VIENNALS_GPU_ABI __declspec(dllexport)
29#define VIENNALS_GPU_ABI __attribute__((visibility("default")))
40 int useIlu0Preconditioner);
58 uint32_t n,
int nFaces);
63 const double *coeff, uint32_t diagLen,
64 std::size_t coeffLen);
73 double diagEps,
unsigned maxIter,
75 unsigned *outIterations,
#define VIENNALS_GPU_ABI
Definition lsOxidationBiCGSTABAbi.hpp:29
VIENNALS_GPU_ABI int viennalsGpuAbiVersion(void)
Returns the ABI version this library was built against.
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 const char * viennalsGpuGetLastErrorMessage(void)
Human-readable detail for the last failure on this thread.
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 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 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...
VIENNALS_GPU_ABI int viennalsGpuIsValid(const void *handle)
Non-zero if the handle is valid (non-null and successfully allocated).
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 ...
VIENNALS_GPU_ABI void viennalsGpuFreeBuffers(void *handle)
Free previously allocated buffers. Safe to call with nullptr.