Core Routines#

#include <cuvs/core/c_api.h>

Resources Handle#

typedef uintptr_t cuvsResources_t#

An opaque C handle for C++ type raft::resources

cuvsError_t cuvsResourcesCreate(cuvsResources_t *res)#

Create an Initialized opaque C handle for C++ type raft::resources

Parameters:

res[in] cuvsResources_t opaque C handle

Returns:

cuvsError_t

cuvsError_t cuvsResourcesDestroy(cuvsResources_t res)#

Destroy and de-allocate opaque C handle for C++ type raft::resources

Parameters:

res[in] cuvsResources_t opaque C handle

Returns:

cuvsError_t

cuvsError_t cuvsStreamSet(cuvsResources_t res, cudaStream_t stream)#

Set cudaStream_t on cuvsResources_t to queue CUDA kernels on APIs that accept a cuvsResources_t handle.

Parameters:
  • res[in] cuvsResources_t opaque C handle

  • stream[in] cudaStream_t stream to queue CUDA kernels

Returns:

cuvsError_t

cuvsError_t cuvsStreamGet(cuvsResources_t res, cudaStream_t *stream)#

Get the cudaStream_t from a cuvsResources_t t.

Parameters:
  • res[in] cuvsResources_t opaque C handle

  • stream[out] cudaStream_t stream to queue CUDA kernels

Returns:

cuvsError_t

cuvsError_t cuvsStreamSync(cuvsResources_t res)#

Syncs the current CUDA stream on the resources object.

Parameters:

res[in] cuvsResources_t opaque C handle

Returns:

cuvsError_t

Error Handling#

enum cuvsError_t#

An enum denoting return values for function calls.

Values:

enumerator CUVS_ERROR#
enumerator CUVS_SUCCESS#
const char *cuvsGetLastErrorText()#

Returns a string describing the last seen error on this thread, or NULL if the last function succeeded.

void cuvsSetLastErrorText(const char *error)#

Sets a string describing an error seen on the thread. Passing NULL clears any previously seen error message.