Context#
- group Context
Functions
- cuestStatus_t cuestCreate(
- cuestHandleParameters_t params,
- cuestHandle_t *handle
Creates a new cuEST handle and its associated resources from a parameter structure.
Ownership of handles or pointers passed into the structure is NOT transferred. Default parameters will construct a generic GPU context.
Requirements:
A cudaStream alone may be provided, all others may be left NULL.
If cuBLAS or cuSolver handles are specified, a cudaStream must also be specified.
When cuBLAS or cuSolver handles are specified, these handles must be set to operate on the provided cudaStream. (i.e. by calling
cublasSetStreamorcusolverDnSetStreamwith the provided cudaStream);
- Parameters:
params – [in] Parameter structure handle (must not be NULL).
handle – [out] Pointer to opaque cuEST handle for output.
- Returns:
CUEST_STATUS_SUCCESSon success,CUEST_STATUS_NULL_POINTERifparamsorhandleis NULL,CUEST_STATUS_INVALID_TYPEifparamsis not of thecuestHandleParameters_ttype,CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
-
cuestStatus_t cuestDestroy(cuestHandle_t handle)#
Destroys a cuEST handle and all associated resources.
Frees memory for GPU resources, quadrature data, solid harmonics coefficients, and rys table.
- Parameters:
handle – [in] Opaque cuEST handle to destroy (must not be NULL).
- Returns:
CUEST_STATUS_SUCCESSon success,CUEST_STATUS_NULL_POINTERif handle is NULL,CUEST_STATUS_INVALID_TYPEif handle is not of thecuestHandle_ttype,CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestSetMathMode(
- cuestHandle_t handle,
- cuestMathMode_t mode
Sets the math mode used when cuEST functions are called with this handle.
CUEST_DEFAULT_MATH_MODEcuEST will use algorithms that are determined heuristically to maximize performance. Some results may use mixed precision arithmetic.CUEST_NATIVE_FP64_MATH_MODEcuEST will use FP64 arithmetic everywhere.
- Parameters:
handle – [in] Opaque cuEST handle (must not be NULL).
mode – [in] Math mode enum.
- Returns:
CUEST_STATUS_SUCCESSon success,CUEST_STATUS_INVALID_HANDLEif handle is NULL,CUEST_STATUS_INVALID_TYPEif handle is not of thecuestHandle_ttype,CUEST_STATUS_INVALID_ARGUMENTif thecuestMathMode_tis invalid.CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestGetMathMode(
- cuestHandle_t handle,
- cuestMathMode_t *mode
Gets the math mode associated with this handle.
- Parameters:
handle – [in] Opaque cuEST handle (must not be NULL).
mode – [out] Math mode enum (must not be NULL).
- Returns:
CUEST_STATUS_SUCCESSon success,CUEST_STATUS_INVALID_HANDLEif handle is NULL,CUEST_STATUS_NULL_POINTERif mode is NULL,CUEST_STATUS_INVALID_TYPEif handle is not of thecuestHandle_ttype,CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestSetComputeCapabilityTarget(
- cuestHandle_t handle,
- uint32_t targetMajorVersion,
- uint32_t targetMinorVersion
Sets the compute capability used in heuristics to determined the most performant code path.
Notes:
Manually setting the compute capability target is not recommended for production calculations. This option is intended only compare numerical performance of the same algorithm on different architectures.
Not all algorithms may be available on all architectures. Changing the compute capability target may result in exceptions during subsequent calls to cuEST.
The compute capability target only affects heuristics. It does not affect kernel execution or JIT compilation.
- Parameters:
handle – [in] Opaque cuEST handle (must not be NULL).
targetMajorVersion – [in] Compute capability target major version.
targetMinorVersion – [in] Compute capability target minor version.
- Returns:
CUEST_STATUS_SUCCESSon success,CUEST_STATUS_INVALID_HANDLEif handle is NULL,CUEST_STATUS_INVALID_TYPEif handle is not of thecuestHandle_ttype,CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestGetComputeCapabilityTarget(
- cuestHandle_t handle,
- uint32_t *targetMajorVersion,
- uint32_t *targetMinorVersion
Gets the compute capability used in heuristics to determined the most performant code path.
- Parameters:
handle – [in] Opaque cuEST handle (must not be NULL).
targetMajorVersion – [out] Compute capability target major version (must not be NULL).
targetMinorVersion – [out] Compute capability target minor version (must not be NULL).
- Returns:
CUEST_STATUS_SUCCESSon success,CUEST_STATUS_INVALID_HANDLEif handle is NULL,CUEST_STATUS_INVALID_TYPEif handle is not of thecuestHandle_ttype,CUEST_STATUS_NULL_POINTERif targetMajorVersion or targetMinorVersion is NULL,CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestGetMajorVersion(
- cuestHandle_t handle,
- uint32_t *majorVersion
Gets the major version of the cuEST library.
- Parameters:
handle – [in] Opaque cuEST handle (must not be NULL).
majorVersion – [out] Major version of the cuEST library (must not be NULL).
- Returns:
CUEST_STATUS_SUCCESSon success,CUEST_STATUS_INVALID_HANDLEif handle is NULL,CUEST_STATUS_INVALID_TYPEif handle is not of thecuestHandle_ttype,CUEST_STATUS_NULL_POINTERif majorVersion is NULL,CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.
- cuestStatus_t cuestGetMinorVersion(
- cuestHandle_t handle,
- uint32_t *minorVersion
Gets the minor version of the cuEST library.
- Parameters:
handle – [in] Opaque cuEST handle (must not be NULL).
minorVersion – [out] Minor version of the cuEST library (must not be NULL).
- Returns:
CUEST_STATUS_SUCCESSon success,CUEST_STATUS_INVALID_HANDLEif handle is NULL,CUEST_STATUS_INVALID_TYPEif handle is not of thecuestHandle_ttype,CUEST_STATUS_NULL_POINTERif minorVersion is NULL,CUEST_STATUS_EXCEPTIONorCUEST_STATUS_UNKNOWN_ERRORotherwise.