ViennaLS
Loading...
Searching...
No Matches
lsOxidationBiCGSTABAbi.hpp File Reference
#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.

Macro Definition Documentation

◆ VIENNALS_GPU_ABI

#define VIENNALS_GPU_ABI   __attribute__((visibility("default")))

◆ VIENNALS_GPU_ABI_VERSION

#define VIENNALS_GPU_ABI_VERSION   1

Function Documentation

◆ viennalsGpuAbiVersion()

VIENNALS_GPU_ABI int viennalsGpuAbiVersion ( void )

Returns the ABI version this library was built against.

◆ viennalsGpuAllocBuffers()

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.

◆ viennalsGpuFreeBuffers()

VIENNALS_GPU_ABI void viennalsGpuFreeBuffers ( void * handle)

Free previously allocated buffers. Safe to call with nullptr.

◆ viennalsGpuGetLastErrorMessage()

VIENNALS_GPU_ABI const char * viennalsGpuGetLastErrorMessage ( void )

Human-readable detail for the last failure on this thread.

◆ viennalsGpuIsValid()

VIENNALS_GPU_ABI int viennalsGpuIsValid ( const void * handle)

Non-zero if the handle is valid (non-null and successfully allocated).

◆ viennalsGpuSetupCSR()

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.

◆ viennalsGpuSolveBiCGSTAB()

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.

◆ viennalsGpuUploadNeighborIds()

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.

◆ viennalsGpuUploadRhs()

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.

◆ viennalsGpuUploadSolverArrays()

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).