MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / ExportCAPI

Function ExportCAPI

python/mod_cvcuda/nvcv/CAPI.cpp:414–449  ·  view source on GitHub ↗

Note these functions will set a PyError if an exception is thrown, this must be then checked by calling CheckCAPIError() before returning to Python.

Source from the content-addressed store, hash-verified

412// Note these functions will set a PyError if an exception is thrown, this must be then checked by calling
413// CheckCAPIError() before returning to Python.
414void ExportCAPI(py::module &m)
415{
416 static CAPI capi = {
417 .DataType_ToPython = &ImplDataType_ToPython,
418 .DataType_FromPython = &ImplDataType_FromPython,
419 .ImageFormat_ToPython = &ImplImageFormat_ToPython,
420 .ImageFormat_FromPython = &ImplImageFormat_FromPython,
421 .Resource_SubmitSync = &ImplResource_SubmitSync,
422 .Stream_HoldResources = &ImplStream_HoldResources,
423 .Stream_GetCurrent = &ImplStream_GetCurrent,
424 .Stream_GetCudaHandle = &ImplStream_GetCudaHandle,
425 .Tensor_GetHandle = &ImplTensor_GetHandle,
426 .Tensor_Create = &ImplTensor_Create,
427 .Tensor_CreateForImageBatch = &ImplTensor_CreateForImageBatch,
428 .Array_GetHandle = &ImplArray_GetHandle,
429 .Array_Create = &ImplArray_Create,
430 .ImageBatchVarShape_Create = &ImplImageBatchVarShape_Create,
431 .ImageBatchVarShape_GetHandle = &ImplImageBatchVarShape_GetHandle,
432 .ImageBatchVarShape_PushBack = &ImplImageBatchVarShape_PushBack,
433 .ImageBatchVarShape_PopBack = &ImplImageBatchVarShape_PopBack,
434 .ImageBatchVarShape_Clear = &ImplImageBatchVarShape_Clear,
435 .Cache_Add = &ImplCache_Add,
436 .Cache_Fetch = &ImplCache_Fetch,
437 .Image_Create = &ImplImage_Create,
438 .Image_GetHandle = &ImplImage_GetHandle,
439 .Container_Create = &ImplContainer_Create,
440 .Cache_RemoveAllNotInUseMatching = &ImplCache_RemoveAllNotInUseMatching,
441 .TensorBatch_Create = &ImplTensorBatch_Create,
442 .TensorBatch_GetHandle = &ImplTensorBatch_GetHandle,
443 .TensorBatch_PushBack = &ImplTensorBatch_PushBack,
444 .TensorBatch_PopBack = &ImplTensorBatch_PopBack,
445 .TensorBatch_Clear = &ImplTensorBatch_Clear,
446 };
447
448 m.add_object("_C_API", py::capsule(&capi, "cvcuda._C_API"));
449}
450
451} // namespace nvcvpy::priv

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected