From 68721654d8e6a9460272102276fd2ae33442c2d3 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Wed, 18 Feb 2026 11:33:58 -0500 Subject: [PATCH] Fix #1638: Faster returning of results --- cuda_bindings/cuda/bindings/driver.pyx.in | 1484 ++++++++++---------- cuda_bindings/cuda/bindings/nvrtc.pyx.in | 78 +- cuda_bindings/cuda/bindings/runtime.pyx.in | 1026 +++++++------- 3 files changed, 1303 insertions(+), 1285 deletions(-) diff --git a/cuda_bindings/cuda/bindings/driver.pyx.in b/cuda_bindings/cuda/bindings/driver.pyx.in index 9a4535c1c7..2dc2b2b0f9 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx.in +++ b/cuda_bindings/cuda/bindings/driver.pyx.in @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE -# This code was automatically generated with version 13.1.0. Do not modify it directly. +# This code was automatically generated with version 13.1.0, generator version 0d24f4f. Do not modify it directly. from typing import Any, Optional import cython import ctypes @@ -7802,6 +7802,12 @@ class CUGLmap_flags(_FastEnum): CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD = cydriver.CUGLmap_flags_enum.CU_GL_MAP_RESOURCE_FLAGS_WRITE_DISCARD{{endif}} {{endif}} + +cdef object _CUresult = CUresult +cdef object _CUresult_SUCCESS = CUresult.CUDA_SUCCESS + + + {{if 'CUdeviceptr' in found_types}} cdef class CUdeviceptr: @@ -25621,8 +25627,8 @@ def cuGetErrorString(error not None : CUresult): with nogil: err = cydriver.cuGetErrorString(cyerror, &pStr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pStr if pStr != NULL else None) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pStr if pStr != NULL else None) {{endif}} {{if 'cuGetErrorName' in found_functions}} @@ -25657,8 +25663,8 @@ def cuGetErrorName(error not None : CUresult): with nogil: err = cydriver.cuGetErrorName(cyerror, &pStr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pStr if pStr != NULL else None) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pStr if pStr != NULL else None) {{endif}} {{if 'cuInit' in found_functions}} @@ -25685,7 +25691,7 @@ def cuInit(unsigned int Flags): """ with nogil: err = cydriver.cuInit(Flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuDriverGetVersion' in found_functions}} @@ -25716,8 +25722,8 @@ def cuDriverGetVersion(): with nogil: err = cydriver.cuDriverGetVersion(&driverVersion) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), driverVersion) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, driverVersion) {{endif}} {{if 'cuDeviceGet' in found_functions}} @@ -25749,8 +25755,8 @@ def cuDeviceGet(int ordinal): with nogil: err = cydriver.cuDeviceGet(device._pvt_ptr, ordinal) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), device) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, device) {{endif}} {{if 'cuDeviceGetCount' in found_functions}} @@ -25778,8 +25784,8 @@ def cuDeviceGetCount(): with nogil: err = cydriver.cuDeviceGetCount(&count) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), count) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, count) {{endif}} {{if 'cuDeviceGetName' in found_functions}} @@ -25824,8 +25830,8 @@ def cuDeviceGetName(int length, dev): with nogil: err = cydriver.cuDeviceGetName(name, length, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pyname) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pyname) {{endif}} {{if 'cuDeviceGetUuid_v2' in found_functions}} @@ -25866,8 +25872,8 @@ def cuDeviceGetUuid(dev): with nogil: err = cydriver.cuDeviceGetUuid(uuid._pvt_ptr, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), uuid) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, uuid) {{endif}} {{if 'cuDeviceGetLuid' in found_functions}} @@ -25910,8 +25916,8 @@ def cuDeviceGetLuid(dev): with nogil: err = cydriver.cuDeviceGetLuid(luid, &deviceNodeMask, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), luid, deviceNodeMask) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, luid, deviceNodeMask) {{endif}} {{if 'cuDeviceTotalMem_v2' in found_functions}} @@ -25951,8 +25957,8 @@ def cuDeviceTotalMem(dev): with nogil: err = cydriver.cuDeviceTotalMem(&numbytes, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), numbytes) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, numbytes) {{endif}} {{if 'cuDeviceGetTexture1DLinearMaxWidth' in found_functions}} @@ -25999,8 +26005,8 @@ def cuDeviceGetTexture1DLinearMaxWidth(pformat not None : CUarray_format, unsign with nogil: err = cydriver.cuDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cypformat, numChannels, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), maxWidthInElements) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, maxWidthInElements) {{endif}} {{if 'cuDeviceGetAttribute' in found_functions}} @@ -26043,8 +26049,8 @@ def cuDeviceGetAttribute(attrib not None : CUdevice_attribute, dev): with nogil: err = cydriver.cuDeviceGetAttribute(&pi, cyattrib, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pi) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pi) {{endif}} {{if 'cuDeviceGetHostAtomicCapabilities' in found_functions}} @@ -26114,8 +26120,8 @@ def cuDeviceGetHostAtomicCapabilities(operations : Optional[tuple[CUatomicOperat if cycapabilities is not NULL: free(cycapabilities) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pycapabilities) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pycapabilities) {{endif}} {{if 'cuDeviceGetNvSciSyncAttributes' in found_functions}} @@ -26213,7 +26219,7 @@ def cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, int flags): cdef void* cynvSciSyncAttrList_ptr = cynvSciSyncAttrList.cptr with nogil: err = cydriver.cuDeviceGetNvSciSyncAttributes(cynvSciSyncAttrList_ptr, cydev, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuDeviceSetMemPool' in found_functions}} @@ -26265,7 +26271,7 @@ def cuDeviceSetMemPool(dev, pool): cydev = pdev with nogil: err = cydriver.cuDeviceSetMemPool(cydev, cypool) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuDeviceGetMemPool' in found_functions}} @@ -26308,8 +26314,8 @@ def cuDeviceGetMemPool(dev): with nogil: err = cydriver.cuDeviceGetMemPool(pool._pvt_ptr, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pool) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pool) {{endif}} {{if 'cuDeviceGetDefaultMemPool' in found_functions}} @@ -26349,8 +26355,8 @@ def cuDeviceGetDefaultMemPool(dev): with nogil: err = cydriver.cuDeviceGetDefaultMemPool(pool_out._pvt_ptr, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pool_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pool_out) {{endif}} {{if 'cuDeviceGetExecAffinitySupport' in found_functions}} @@ -26397,8 +26403,8 @@ def cuDeviceGetExecAffinitySupport(typename not None : CUexecAffinityType, dev): with nogil: err = cydriver.cuDeviceGetExecAffinitySupport(&pi, cytypename, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pi) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pi) {{endif}} {{if 'cuFlushGPUDirectRDMAWrites' in found_functions}} @@ -26449,7 +26455,7 @@ def cuFlushGPUDirectRDMAWrites(target not None : CUflushGPUDirectRDMAWritesTarge cdef cydriver.CUflushGPUDirectRDMAWritesScope cyscope = int(scope) with nogil: err = cydriver.cuFlushGPUDirectRDMAWrites(cytarget, cyscope) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuDeviceGetProperties' in found_functions}} @@ -26528,8 +26534,8 @@ def cuDeviceGetProperties(dev): with nogil: err = cydriver.cuDeviceGetProperties(prop._pvt_ptr, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), prop) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, prop) {{endif}} {{if 'cuDeviceComputeCapability' in found_functions}} @@ -26577,8 +26583,8 @@ def cuDeviceComputeCapability(dev): with nogil: err = cydriver.cuDeviceComputeCapability(&major, &minor, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), major, minor) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, major, minor) {{endif}} {{if 'cuDevicePrimaryCtxRetain' in found_functions}} @@ -26635,8 +26641,8 @@ def cuDevicePrimaryCtxRetain(dev): with nogil: err = cydriver.cuDevicePrimaryCtxRetain(pctx._pvt_ptr, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pctx) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pctx) {{endif}} {{if 'cuDevicePrimaryCtxRelease_v2' in found_functions}} @@ -26682,7 +26688,7 @@ def cuDevicePrimaryCtxRelease(dev): cydev = pdev with nogil: err = cydriver.cuDevicePrimaryCtxRelease(cydev) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuDevicePrimaryCtxSetFlags_v2' in found_functions}} @@ -26796,7 +26802,7 @@ def cuDevicePrimaryCtxSetFlags(dev, unsigned int flags): cydev = pdev with nogil: err = cydriver.cuDevicePrimaryCtxSetFlags(cydev, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuDevicePrimaryCtxGetState' in found_functions}} @@ -26840,8 +26846,8 @@ def cuDevicePrimaryCtxGetState(dev): with nogil: err = cydriver.cuDevicePrimaryCtxGetState(cydev, &flags, &active) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), flags, active) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, flags, active) {{endif}} {{if 'cuDevicePrimaryCtxReset_v2' in found_functions}} @@ -26886,7 +26892,7 @@ def cuDevicePrimaryCtxReset(dev): cydev = pdev with nogil: err = cydriver.cuDevicePrimaryCtxReset(cydev) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxCreate_v4' in found_functions}} @@ -27068,8 +27074,8 @@ def cuCtxCreate(ctxCreateParams : Optional[CUctxCreateParams], unsigned int flag with nogil: err = cydriver.cuCtxCreate(pctx._pvt_ptr, cyctxCreateParams_ptr, flags, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pctx) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pctx) {{endif}} {{if 'cuCtxDestroy_v2' in found_functions}} @@ -27132,7 +27138,7 @@ def cuCtxDestroy(ctx): cyctx = pctx with nogil: err = cydriver.cuCtxDestroy(cyctx) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxPushCurrent_v2' in found_functions}} @@ -27173,7 +27179,7 @@ def cuCtxPushCurrent(ctx): cyctx = pctx with nogil: err = cydriver.cuCtxPushCurrent(cyctx) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxPopCurrent_v2' in found_functions}} @@ -27205,8 +27211,8 @@ def cuCtxPopCurrent(): with nogil: err = cydriver.cuCtxPopCurrent(pctx._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pctx) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pctx) {{endif}} {{if 'cuCtxSetCurrent' in found_functions}} @@ -27249,7 +27255,7 @@ def cuCtxSetCurrent(ctx): cyctx = pctx with nogil: err = cydriver.cuCtxSetCurrent(cyctx) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxGetCurrent' in found_functions}} @@ -27277,8 +27283,8 @@ def cuCtxGetCurrent(): with nogil: err = cydriver.cuCtxGetCurrent(pctx._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pctx) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pctx) {{endif}} {{if 'cuCtxGetDevice' in found_functions}} @@ -27304,8 +27310,8 @@ def cuCtxGetDevice(): with nogil: err = cydriver.cuCtxGetDevice(device._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), device) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, device) {{endif}} {{if 'cuCtxGetDevice_v2' in found_functions}} @@ -27346,8 +27352,8 @@ def cuCtxGetDevice_v2(ctx): with nogil: err = cydriver.cuCtxGetDevice_v2(device._pvt_ptr, cyctx) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), device) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, device) {{endif}} {{if 'cuCtxGetFlags' in found_functions}} @@ -27374,8 +27380,8 @@ def cuCtxGetFlags(): with nogil: err = cydriver.cuCtxGetFlags(&flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), flags) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, flags) {{endif}} {{if 'cuCtxSetFlags' in found_functions}} @@ -27403,7 +27409,7 @@ def cuCtxSetFlags(unsigned int flags): """ with nogil: err = cydriver.cuCtxSetFlags(flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxGetId' in found_functions}} @@ -27445,8 +27451,8 @@ def cuCtxGetId(ctx): with nogil: err = cydriver.cuCtxGetId(cyctx, &ctxId) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), ctxId) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, ctxId) {{endif}} {{if 'cuCtxSynchronize' in found_functions}} @@ -27474,7 +27480,7 @@ def cuCtxSynchronize(): """ with nogil: err = cydriver.cuCtxSynchronize() - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxSynchronize_v2' in found_functions}} @@ -27519,7 +27525,7 @@ def cuCtxSynchronize_v2(ctx): cyctx = pctx with nogil: err = cydriver.cuCtxSynchronize_v2(cyctx) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxSetLimit' in found_functions}} @@ -27626,7 +27632,7 @@ def cuCtxSetLimit(limit not None : CUlimit, size_t value): cdef cydriver.CUlimit cylimit = int(limit) with nogil: err = cydriver.cuCtxSetLimit(cylimit, value) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxGetLimit' in found_functions}} @@ -27684,8 +27690,8 @@ def cuCtxGetLimit(limit not None : CUlimit): with nogil: err = cydriver.cuCtxGetLimit(&pvalue, cylimit) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pvalue) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pvalue) {{endif}} {{if 'cuCtxGetCacheConfig' in found_functions}} @@ -27732,8 +27738,8 @@ def cuCtxGetCacheConfig(): with nogil: err = cydriver.cuCtxGetCacheConfig(&pconfig) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUfunc_cache(pconfig)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUfunc_cache(pconfig)) {{endif}} {{if 'cuCtxSetCacheConfig' in found_functions}} @@ -27791,7 +27797,7 @@ def cuCtxSetCacheConfig(config not None : CUfunc_cache): cdef cydriver.CUfunc_cache cyconfig = int(config) with nogil: err = cydriver.cuCtxSetCacheConfig(cyconfig) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxGetApiVersion' in found_functions}} @@ -27838,8 +27844,8 @@ def cuCtxGetApiVersion(ctx): with nogil: err = cydriver.cuCtxGetApiVersion(cyctx, &version) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), version) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, version) {{endif}} {{if 'cuCtxGetStreamPriorityRange' in found_functions}} @@ -27884,8 +27890,8 @@ def cuCtxGetStreamPriorityRange(): with nogil: err = cydriver.cuCtxGetStreamPriorityRange(&leastPriority, &greatestPriority) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), leastPriority, greatestPriority) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, leastPriority, greatestPriority) {{endif}} {{if 'cuCtxResetPersistingL2Cache' in found_functions}} @@ -27908,7 +27914,7 @@ def cuCtxResetPersistingL2Cache(): """ with nogil: err = cydriver.cuCtxResetPersistingL2Cache() - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxGetExecAffinity' in found_functions}} @@ -27944,8 +27950,8 @@ def cuCtxGetExecAffinity(typename not None : CUexecAffinityType): with nogil: err = cydriver.cuCtxGetExecAffinity(pExecAffinity._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pExecAffinity) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pExecAffinity) {{endif}} {{if 'cuCtxRecordEvent' in found_functions}} @@ -28005,7 +28011,7 @@ def cuCtxRecordEvent(hCtx, hEvent): cyhCtx = phCtx with nogil: err = cydriver.cuCtxRecordEvent(cyhCtx, cyhEvent) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxWaitEvent' in found_functions}} @@ -28064,7 +28070,7 @@ def cuCtxWaitEvent(hCtx, hEvent): cyhCtx = phCtx with nogil: err = cydriver.cuCtxWaitEvent(cyhCtx, cyhEvent) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxAttach' in found_functions}} @@ -28104,8 +28110,8 @@ def cuCtxAttach(unsigned int flags): with nogil: err = cydriver.cuCtxAttach(pctx._pvt_ptr, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pctx) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pctx) {{endif}} {{if 'cuCtxDetach' in found_functions}} @@ -28147,7 +28153,7 @@ def cuCtxDetach(ctx): cyctx = pctx with nogil: err = cydriver.cuCtxDetach(cyctx) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxGetSharedMemConfig' in found_functions}} @@ -28189,8 +28195,8 @@ def cuCtxGetSharedMemConfig(): with nogil: err = cydriver.cuCtxGetSharedMemConfig(&pConfig) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUsharedconfig(pConfig)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUsharedconfig(pConfig)) {{endif}} {{if 'cuCtxSetSharedMemConfig' in found_functions}} @@ -28245,7 +28251,7 @@ def cuCtxSetSharedMemConfig(config not None : CUsharedconfig): cdef cydriver.CUsharedconfig cyconfig = int(config) with nogil: err = cydriver.cuCtxSetSharedMemConfig(cyconfig) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuModuleLoad' in found_functions}} @@ -28283,8 +28289,8 @@ def cuModuleLoad(char* fname): with nogil: err = cydriver.cuModuleLoad(module._pvt_ptr, fname) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), module) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, module) {{endif}} {{if 'cuModuleLoadData' in found_functions}} @@ -28320,8 +28326,8 @@ def cuModuleLoadData(image): with nogil: err = cydriver.cuModuleLoadData(module._pvt_ptr, cyimage_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), module) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, module) {{endif}} {{if 'cuModuleLoadDataEx' in found_functions}} @@ -28373,8 +28379,8 @@ def cuModuleLoadDataEx(image, unsigned int numOptions, options : Optional[tuple[ with nogil: err = cydriver.cuModuleLoadDataEx(module._pvt_ptr, cyimage_ptr, numOptions, cyoptions.data(), cyoptionValues_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), module) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, module) {{endif}} {{if 'cuModuleLoadFatBinary' in found_functions}} @@ -28416,8 +28422,8 @@ def cuModuleLoadFatBinary(fatCubin): with nogil: err = cydriver.cuModuleLoadFatBinary(module._pvt_ptr, cyfatCubin_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), module) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, module) {{endif}} {{if 'cuModuleUnload' in found_functions}} @@ -28455,7 +28461,7 @@ def cuModuleUnload(hmod): cyhmod = phmod with nogil: err = cydriver.cuModuleUnload(cyhmod) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuModuleGetLoadingMode' in found_functions}} @@ -28482,8 +28488,8 @@ def cuModuleGetLoadingMode(): with nogil: err = cydriver.cuModuleGetLoadingMode(&mode) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUmoduleLoadingMode(mode)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUmoduleLoadingMode(mode)) {{endif}} {{if 'cuModuleGetFunction' in found_functions}} @@ -28527,8 +28533,8 @@ def cuModuleGetFunction(hmod, char* name): with nogil: err = cydriver.cuModuleGetFunction(hfunc._pvt_ptr, cyhmod, name) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), hfunc) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, hfunc) {{endif}} {{if 'cuModuleGetFunctionCount' in found_functions}} @@ -28563,8 +28569,8 @@ def cuModuleGetFunctionCount(mod): with nogil: err = cydriver.cuModuleGetFunctionCount(&count, cymod) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), count) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, count) {{endif}} {{if 'cuModuleEnumerateFunctions' in found_functions}} @@ -28622,8 +28628,8 @@ def cuModuleEnumerateFunctions(unsigned int numFunctions, mod): if cyfunctions is not NULL: free(cyfunctions) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pyfunctions) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pyfunctions) {{endif}} {{if 'cuModuleGetGlobal_v2' in found_functions}} @@ -28671,8 +28677,8 @@ def cuModuleGetGlobal(hmod, char* name): with nogil: err = cydriver.cuModuleGetGlobal(dptr._pvt_ptr, &numbytes, cyhmod, name) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), dptr, numbytes) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, dptr, numbytes) {{endif}} {{if 'cuLinkCreate_v2' in found_functions}} @@ -28745,8 +28751,8 @@ def cuLinkCreate(unsigned int numOptions, options : Optional[tuple[CUjit_option] for option in pylist: stateOut._keepalive.append(option) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), stateOut) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, stateOut) {{endif}} {{if 'cuLinkAddData_v2' in found_functions}} @@ -28820,7 +28826,7 @@ def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size, cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr with nogil: err = cydriver.cuLinkAddData(cystate, cytypename, cydata_ptr, size, name, numOptions, cyoptions.data(), cyoptionValues_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLinkAddFile_v2' in found_functions}} @@ -28890,7 +28896,7 @@ def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigne cdef void** cyoptionValues_ptr = voidStarHelperoptionValues.cptr with nogil: err = cydriver.cuLinkAddFile(cystate, cytypename, path, numOptions, cyoptions.data(), cyoptionValues_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLinkComplete' in found_functions}} @@ -28936,8 +28942,8 @@ def cuLinkComplete(state): with nogil: err = cydriver.cuLinkComplete(cystate, &cubinOut, &sizeOut) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), cubinOut, sizeOut) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, cubinOut, sizeOut) {{endif}} {{if 'cuLinkDestroy' in found_functions}} @@ -28970,7 +28976,7 @@ def cuLinkDestroy(state): cystate = pstate with nogil: err = cydriver.cuLinkDestroy(cystate) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuModuleGetTexRef' in found_functions}} @@ -29018,8 +29024,8 @@ def cuModuleGetTexRef(hmod, char* name): with nogil: err = cydriver.cuModuleGetTexRef(pTexRef._pvt_ptr, cyhmod, name) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pTexRef) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pTexRef) {{endif}} {{if 'cuModuleGetSurfRef' in found_functions}} @@ -29065,8 +29071,8 @@ def cuModuleGetSurfRef(hmod, char* name): with nogil: err = cydriver.cuModuleGetSurfRef(pSurfRef._pvt_ptr, cyhmod, name) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pSurfRef) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pSurfRef) {{endif}} {{if 'cuLibraryLoadData' in found_functions}} @@ -29164,8 +29170,8 @@ def cuLibraryLoadData(code, jitOptions : Optional[tuple[CUjit_option] | list[CUj with nogil: err = cydriver.cuLibraryLoadData(library._pvt_ptr, cycode_ptr, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), library) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, library) {{endif}} {{if 'cuLibraryLoadFromFile' in found_functions}} @@ -29261,8 +29267,8 @@ def cuLibraryLoadFromFile(char* fileName, jitOptions : Optional[tuple[CUjit_opti with nogil: err = cydriver.cuLibraryLoadFromFile(library._pvt_ptr, fileName, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), library) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, library) {{endif}} {{if 'cuLibraryUnload' in found_functions}} @@ -29297,7 +29303,7 @@ def cuLibraryUnload(library): cylibrary = plibrary with nogil: err = cydriver.cuLibraryUnload(cylibrary) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLibraryGetKernel' in found_functions}} @@ -29340,8 +29346,8 @@ def cuLibraryGetKernel(library, char* name): with nogil: err = cydriver.cuLibraryGetKernel(pKernel._pvt_ptr, cylibrary, name) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pKernel) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pKernel) {{endif}} {{if 'cuLibraryGetKernelCount' in found_functions}} @@ -29376,8 +29382,8 @@ def cuLibraryGetKernelCount(lib): with nogil: err = cydriver.cuLibraryGetKernelCount(&count, cylib) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), count) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, count) {{endif}} {{if 'cuLibraryEnumerateKernels' in found_functions}} @@ -29429,8 +29435,8 @@ def cuLibraryEnumerateKernels(unsigned int numKernels, lib): if cykernels is not NULL: free(cykernels) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pykernels) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pykernels) {{endif}} {{if 'cuLibraryGetModule' in found_functions}} @@ -29471,8 +29477,8 @@ def cuLibraryGetModule(library): with nogil: err = cydriver.cuLibraryGetModule(pMod._pvt_ptr, cylibrary) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pMod) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pMod) {{endif}} {{if 'cuKernelGetFunction' in found_functions}} @@ -29513,8 +29519,8 @@ def cuKernelGetFunction(kernel): with nogil: err = cydriver.cuKernelGetFunction(pFunc._pvt_ptr, cykernel) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pFunc) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pFunc) {{endif}} {{if 'cuKernelGetLibrary' in found_functions}} @@ -29554,8 +29560,8 @@ def cuKernelGetLibrary(kernel): with nogil: err = cydriver.cuKernelGetLibrary(pLib._pvt_ptr, cykernel) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pLib) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pLib) {{endif}} {{if 'cuLibraryGetGlobal' in found_functions}} @@ -29603,8 +29609,8 @@ def cuLibraryGetGlobal(library, char* name): with nogil: err = cydriver.cuLibraryGetGlobal(dptr._pvt_ptr, &numbytes, cylibrary, name) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), dptr, numbytes) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, dptr, numbytes) {{endif}} {{if 'cuLibraryGetManaged' in found_functions}} @@ -29654,8 +29660,8 @@ def cuLibraryGetManaged(library, char* name): with nogil: err = cydriver.cuLibraryGetManaged(dptr._pvt_ptr, &numbytes, cylibrary, name) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), dptr, numbytes) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, dptr, numbytes) {{endif}} {{if 'cuLibraryGetUnifiedFunction' in found_functions}} @@ -29701,8 +29707,8 @@ def cuLibraryGetUnifiedFunction(library, char* symbol): with nogil: err = cydriver.cuLibraryGetUnifiedFunction(&fptr, cylibrary, symbol) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), fptr) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, fptr) {{endif}} {{if 'cuKernelGetAttribute' in found_functions}} @@ -29836,8 +29842,8 @@ def cuKernelGetAttribute(attrib not None : CUfunction_attribute, kernel, dev): with nogil: err = cydriver.cuKernelGetAttribute(&pi, cyattrib, cykernel, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pi) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pi) {{endif}} {{if 'cuKernelSetAttribute' in found_functions}} @@ -29952,7 +29958,7 @@ def cuKernelSetAttribute(attrib not None : CUfunction_attribute, int val, kernel cdef cydriver.CUfunction_attribute cyattrib = int(attrib) with nogil: err = cydriver.cuKernelSetAttribute(cyattrib, val, cykernel, cydev) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuKernelSetCacheConfig' in found_functions}} @@ -30036,7 +30042,7 @@ def cuKernelSetCacheConfig(kernel, config not None : CUfunc_cache, dev): cdef cydriver.CUfunc_cache cyconfig = int(config) with nogil: err = cydriver.cuKernelSetCacheConfig(cykernel, cyconfig, cydev) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuKernelGetName' in found_functions}} @@ -30077,8 +30083,8 @@ def cuKernelGetName(hfunc): with nogil: err = cydriver.cuKernelGetName(&name, cyhfunc) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), name if name != NULL else None) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, name if name != NULL else None) {{endif}} {{if 'cuKernelGetParamInfo' in found_functions}} @@ -30132,8 +30138,8 @@ def cuKernelGetParamInfo(kernel, size_t paramIndex): with nogil: err = cydriver.cuKernelGetParamInfo(cykernel, paramIndex, ¶mOffset, ¶mSize) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), paramOffset, paramSize) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, paramOffset, paramSize) {{endif}} {{if 'cuMemGetInfo_v2' in found_functions}} @@ -30177,8 +30183,8 @@ def cuMemGetInfo(): with nogil: err = cydriver.cuMemGetInfo(&free, &total) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), free, total) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, free, total) {{endif}} {{if 'cuMemAlloc_v2' in found_functions}} @@ -30213,8 +30219,8 @@ def cuMemAlloc(size_t bytesize): with nogil: err = cydriver.cuMemAlloc(dptr._pvt_ptr, bytesize) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), dptr) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, dptr) {{endif}} {{if 'cuMemAllocPitch_v2' in found_functions}} @@ -30282,8 +30288,8 @@ def cuMemAllocPitch(size_t WidthInBytes, size_t Height, unsigned int ElementSize with nogil: err = cydriver.cuMemAllocPitch(dptr._pvt_ptr, &pPitch, WidthInBytes, Height, ElementSizeBytes) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), dptr, pPitch) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, dptr, pPitch) {{endif}} {{if 'cuMemFree_v2' in found_functions}} @@ -30331,7 +30337,7 @@ def cuMemFree(dptr): cydptr = pdptr with nogil: err = cydriver.cuMemFree(cydptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemGetAddressRange_v2' in found_functions}} @@ -30376,8 +30382,8 @@ def cuMemGetAddressRange(dptr): with nogil: err = cydriver.cuMemGetAddressRange(pbase._pvt_ptr, &psize, cydptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), pbase, psize) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, pbase, psize) {{endif}} {{if 'cuMemAllocHost_v2' in found_functions}} @@ -30433,8 +30439,8 @@ def cuMemAllocHost(size_t bytesize): with nogil: err = cydriver.cuMemAllocHost(&pp, bytesize) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pp) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pp) {{endif}} {{if 'cuMemFreeHost' in found_functions}} @@ -30464,7 +30470,7 @@ def cuMemFreeHost(p): cdef void* cyp_ptr = cyp.cptr with nogil: err = cydriver.cuMemFreeHost(cyp_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemHostAlloc' in found_functions}} @@ -30556,8 +30562,8 @@ def cuMemHostAlloc(size_t bytesize, unsigned int Flags): with nogil: err = cydriver.cuMemHostAlloc(&pp, bytesize, Flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pp) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pp) {{endif}} {{if 'cuMemHostGetDevicePointer_v2' in found_functions}} @@ -30619,8 +30625,8 @@ def cuMemHostGetDevicePointer(p, unsigned int Flags): with nogil: err = cydriver.cuMemHostGetDevicePointer(pdptr._pvt_ptr, cyp_ptr, Flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pdptr) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pdptr) {{endif}} {{if 'cuMemHostGetFlags' in found_functions}} @@ -30658,8 +30664,8 @@ def cuMemHostGetFlags(p): with nogil: err = cydriver.cuMemHostGetFlags(&pFlags, cyp_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pFlags) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pFlags) {{endif}} {{if 'cuMemAllocManaged' in found_functions}} @@ -30795,8 +30801,8 @@ def cuMemAllocManaged(size_t bytesize, unsigned int flags): with nogil: err = cydriver.cuMemAllocManaged(dptr._pvt_ptr, bytesize, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), dptr) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, dptr) {{endif}} {{if 'cuDeviceRegisterAsyncNotification' in found_functions}} @@ -30890,8 +30896,8 @@ def cuDeviceRegisterAsyncNotification(device, callbackFunc, userData): else: m_global._allocated[int(callback)] = cbData if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), callback) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, callback) {{endif}} {{if 'cuDeviceUnregisterAsyncNotification' in found_functions}} @@ -30941,7 +30947,7 @@ def cuDeviceUnregisterAsyncNotification(device, callback): if err == cydriver.CUDA_SUCCESS: free(m_global._allocated[pcallback]) m_global._allocated.erase(pcallback) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuDeviceGetByPCIBusId' in found_functions}} @@ -30975,8 +30981,8 @@ def cuDeviceGetByPCIBusId(char* pciBusId): with nogil: err = cydriver.cuDeviceGetByPCIBusId(dev._pvt_ptr, pciBusId) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), dev) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, dev) {{endif}} {{if 'cuDeviceGetPCIBusId' in found_functions}} @@ -31024,8 +31030,8 @@ def cuDeviceGetPCIBusId(int length, dev): with nogil: err = cydriver.cuDeviceGetPCIBusId(pciBusId, length, cydev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pypciBusId) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pypciBusId) {{endif}} {{if 'cuIpcGetEventHandle' in found_functions}} @@ -31085,8 +31091,8 @@ def cuIpcGetEventHandle(event): with nogil: err = cydriver.cuIpcGetEventHandle(pHandle._pvt_ptr, cyevent) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pHandle) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pHandle) {{endif}} {{if 'cuIpcOpenEventHandle' in found_functions}} @@ -31132,8 +31138,8 @@ def cuIpcOpenEventHandle(handle not None : CUipcEventHandle): with nogil: err = cydriver.cuIpcOpenEventHandle(phEvent._pvt_ptr, handle._pvt_ptr[0]) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phEvent) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phEvent) {{endif}} {{if 'cuIpcGetMemHandle' in found_functions}} @@ -31188,8 +31194,8 @@ def cuIpcGetMemHandle(dptr): with nogil: err = cydriver.cuIpcGetMemHandle(pHandle._pvt_ptr, cydptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pHandle) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pHandle) {{endif}} {{if 'cuIpcOpenMemHandle_v2' in found_functions}} @@ -31257,8 +31263,8 @@ def cuIpcOpenMemHandle(handle not None : CUipcMemHandle, unsigned int Flags): with nogil: err = cydriver.cuIpcOpenMemHandle(pdptr._pvt_ptr, handle._pvt_ptr[0], Flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pdptr) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pdptr) {{endif}} {{if 'cuIpcCloseMemHandle' in found_functions}} @@ -31307,7 +31313,7 @@ def cuIpcCloseMemHandle(dptr): cydptr = pdptr with nogil: err = cydriver.cuIpcCloseMemHandle(cydptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemHostRegister_v2' in found_functions}} @@ -31412,7 +31418,7 @@ def cuMemHostRegister(p, size_t bytesize, unsigned int Flags): cdef void* cyp_ptr = cyp.cptr with nogil: err = cydriver.cuMemHostRegister(cyp_ptr, bytesize, Flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemHostUnregister' in found_functions}} @@ -31445,7 +31451,7 @@ def cuMemHostUnregister(p): cdef void* cyp_ptr = cyp.cptr with nogil: err = cydriver.cuMemHostUnregister(cyp_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpy' in found_functions}} @@ -31497,7 +31503,7 @@ def cuMemcpy(dst, src, size_t ByteCount): cydst = pdst with nogil: err = cydriver.cuMemcpy(cydst, cysrc, ByteCount) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyPeer' in found_functions}} @@ -31568,7 +31574,7 @@ def cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount) cydstDevice = pdstDevice with nogil: err = cydriver.cuMemcpyPeer(cydstDevice, cydstContext, cysrcDevice, cysrcContext, ByteCount) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyHtoD_v2' in found_functions}} @@ -31611,7 +31617,7 @@ def cuMemcpyHtoD(dstDevice, srcHost, size_t ByteCount): cdef void* cysrcHost_ptr = cysrcHost.cptr with nogil: err = cydriver.cuMemcpyHtoD(cydstDevice, cysrcHost_ptr, ByteCount) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyDtoH_v2' in found_functions}} @@ -31654,7 +31660,7 @@ def cuMemcpyDtoH(dstHost, srcDevice, size_t ByteCount): cdef void* cydstHost_ptr = cydstHost.cptr with nogil: err = cydriver.cuMemcpyDtoH(cydstHost_ptr, cysrcDevice, ByteCount) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyDtoD_v2' in found_functions}} @@ -31703,7 +31709,7 @@ def cuMemcpyDtoD(dstDevice, srcDevice, size_t ByteCount): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemcpyDtoD(cydstDevice, cysrcDevice, ByteCount) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyDtoA_v2' in found_functions}} @@ -31755,7 +31761,7 @@ def cuMemcpyDtoA(dstArray, size_t dstOffset, srcDevice, size_t ByteCount): cydstArray = pdstArray with nogil: err = cydriver.cuMemcpyDtoA(cydstArray, dstOffset, cysrcDevice, ByteCount) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyAtoD_v2' in found_functions}} @@ -31809,7 +31815,7 @@ def cuMemcpyAtoD(dstDevice, srcArray, size_t srcOffset, size_t ByteCount): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemcpyAtoD(cydstDevice, cysrcArray, srcOffset, ByteCount) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyHtoA_v2' in found_functions}} @@ -31855,7 +31861,7 @@ def cuMemcpyHtoA(dstArray, size_t dstOffset, srcHost, size_t ByteCount): cdef void* cysrcHost_ptr = cysrcHost.cptr with nogil: err = cydriver.cuMemcpyHtoA(cydstArray, dstOffset, cysrcHost_ptr, ByteCount) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyAtoH_v2' in found_functions}} @@ -31901,7 +31907,7 @@ def cuMemcpyAtoH(dstHost, srcArray, size_t srcOffset, size_t ByteCount): cdef void* cydstHost_ptr = cydstHost.cptr with nogil: err = cydriver.cuMemcpyAtoH(cydstHost_ptr, cysrcArray, srcOffset, ByteCount) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyAtoA_v2' in found_functions}} @@ -31958,7 +31964,7 @@ def cuMemcpyAtoA(dstArray, size_t dstOffset, srcArray, size_t srcOffset, size_t cydstArray = pdstArray with nogil: err = cydriver.cuMemcpyAtoA(cydstArray, dstOffset, cysrcArray, srcOffset, ByteCount) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpy2D_v2' in found_functions}} @@ -32085,7 +32091,7 @@ def cuMemcpy2D(pCopy : Optional[CUDA_MEMCPY2D]): cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy2D(cypCopy_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpy2DUnaligned_v2' in found_functions}} @@ -32212,7 +32218,7 @@ def cuMemcpy2DUnaligned(pCopy : Optional[CUDA_MEMCPY2D]): cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy2DUnaligned(cypCopy_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpy3D_v2' in found_functions}} @@ -32342,7 +32348,7 @@ def cuMemcpy3D(pCopy : Optional[CUDA_MEMCPY3D]): cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3D(cypCopy_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpy3DPeer' in found_functions}} @@ -32372,7 +32378,7 @@ def cuMemcpy3DPeer(pCopy : Optional[CUDA_MEMCPY3D_PEER]): cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3DPeer(cypCopy_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyAsync' in found_functions}} @@ -32434,7 +32440,7 @@ def cuMemcpyAsync(dst, src, size_t ByteCount, hStream): cydst = pdst with nogil: err = cydriver.cuMemcpyAsync(cydst, cysrc, ByteCount, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyPeerAsync' in found_functions}} @@ -32515,7 +32521,7 @@ def cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, size_t ByteC cydstDevice = pdstDevice with nogil: err = cydriver.cuMemcpyPeerAsync(cydstDevice, cydstContext, cysrcDevice, cysrcContext, ByteCount, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyHtoDAsync_v2' in found_functions}} @@ -32568,7 +32574,7 @@ def cuMemcpyHtoDAsync(dstDevice, srcHost, size_t ByteCount, hStream): cdef void* cysrcHost_ptr = cysrcHost.cptr with nogil: err = cydriver.cuMemcpyHtoDAsync(cydstDevice, cysrcHost_ptr, ByteCount, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyDtoHAsync_v2' in found_functions}} @@ -32621,7 +32627,7 @@ def cuMemcpyDtoHAsync(dstHost, srcDevice, size_t ByteCount, hStream): cdef void* cydstHost_ptr = cydstHost.cptr with nogil: err = cydriver.cuMemcpyDtoHAsync(cydstHost_ptr, cysrcDevice, ByteCount, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyDtoDAsync_v2' in found_functions}} @@ -32680,7 +32686,7 @@ def cuMemcpyDtoDAsync(dstDevice, srcDevice, size_t ByteCount, hStream): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemcpyDtoDAsync(cydstDevice, cysrcDevice, ByteCount, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyHtoAAsync_v2' in found_functions}} @@ -32736,7 +32742,7 @@ def cuMemcpyHtoAAsync(dstArray, size_t dstOffset, srcHost, size_t ByteCount, hSt cdef void* cysrcHost_ptr = cysrcHost.cptr with nogil: err = cydriver.cuMemcpyHtoAAsync(cydstArray, dstOffset, cysrcHost_ptr, ByteCount, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyAtoHAsync_v2' in found_functions}} @@ -32792,7 +32798,7 @@ def cuMemcpyAtoHAsync(dstHost, srcArray, size_t srcOffset, size_t ByteCount, hSt cdef void* cydstHost_ptr = cydstHost.cptr with nogil: err = cydriver.cuMemcpyAtoHAsync(cydstHost_ptr, cysrcArray, srcOffset, ByteCount, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpy2DAsync_v2' in found_functions}} @@ -32936,7 +32942,7 @@ def cuMemcpy2DAsync(pCopy : Optional[CUDA_MEMCPY2D], hStream): cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy2DAsync(cypCopy_ptr, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}} @@ -33076,7 +33082,7 @@ def cuMemcpy3DAsync(pCopy : Optional[CUDA_MEMCPY3D], hStream): cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3DAsync(cypCopy_ptr, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}} @@ -33116,7 +33122,7 @@ def cuMemcpy3DPeerAsync(pCopy : Optional[CUDA_MEMCPY3D_PEER], hStream): cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy is not None else NULL with nogil: err = cydriver.cuMemcpy3DPeerAsync(cypCopy_ptr, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpyBatchAsync_v2' in found_functions}} @@ -33288,7 +33294,7 @@ def cuMemcpyBatchAsync(dsts : Optional[tuple[CUdeviceptr] | list[CUdeviceptr]], free(cysrcs) if len(attrs) > 1 and cyattrs is not NULL: free(cyattrs) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemcpy3DBatchAsync_v2' in found_functions}} @@ -33419,7 +33425,7 @@ def cuMemcpy3DBatchAsync(size_t numOps, opList : Optional[tuple[CUDA_MEMCPY3D_BA err = cydriver.cuMemcpy3DBatchAsync(numOps, cyopList, flags, cyhStream) if len(opList) > 1 and cyopList is not NULL: free(cyopList) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} @@ -33458,7 +33464,7 @@ def cuMemsetD8(dstDevice, unsigned char uc, size_t N): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD8(cydstDevice, uc, N) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD16_v2' in found_functions}} @@ -33498,7 +33504,7 @@ def cuMemsetD16(dstDevice, unsigned short us, size_t N): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD16(cydstDevice, us, N) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD32_v2' in found_functions}} @@ -33538,7 +33544,7 @@ def cuMemsetD32(dstDevice, unsigned int ui, size_t N): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD32(cydstDevice, ui, N) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD2D8_v2' in found_functions}} @@ -33585,7 +33591,7 @@ def cuMemsetD2D8(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, siz cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D8(cydstDevice, dstPitch, uc, Width, Height) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD2D16_v2' in found_functions}} @@ -33633,7 +33639,7 @@ def cuMemsetD2D16(dstDevice, size_t dstPitch, unsigned short us, size_t Width, s cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D16(cydstDevice, dstPitch, us, Width, Height) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD2D32_v2' in found_functions}} @@ -33681,7 +33687,7 @@ def cuMemsetD2D32(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, siz cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D32(cydstDevice, dstPitch, ui, Width, Height) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD8Async' in found_functions}} @@ -33730,7 +33736,7 @@ def cuMemsetD8Async(dstDevice, unsigned char uc, size_t N, hStream): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD8Async(cydstDevice, uc, N, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD16Async' in found_functions}} @@ -33780,7 +33786,7 @@ def cuMemsetD16Async(dstDevice, unsigned short us, size_t N, hStream): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD16Async(cydstDevice, us, N, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD32Async' in found_functions}} @@ -33830,7 +33836,7 @@ def cuMemsetD32Async(dstDevice, unsigned int ui, size_t N, hStream): cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD32Async(cydstDevice, ui, N, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD2D8Async' in found_functions}} @@ -33887,7 +33893,7 @@ def cuMemsetD2D8Async(dstDevice, size_t dstPitch, unsigned char uc, size_t Width cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D8Async(cydstDevice, dstPitch, uc, Width, Height, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD2D16Async' in found_functions}} @@ -33945,7 +33951,7 @@ def cuMemsetD2D16Async(dstDevice, size_t dstPitch, unsigned short us, size_t Wid cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D16Async(cydstDevice, dstPitch, us, Width, Height, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemsetD2D32Async' in found_functions}} @@ -34003,7 +34009,7 @@ def cuMemsetD2D32Async(dstDevice, size_t dstPitch, unsigned int ui, size_t Width cydstDevice = pdstDevice with nogil: err = cydriver.cuMemsetD2D32Async(cydstDevice, dstPitch, ui, Width, Height, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuArrayCreate_v2' in found_functions}} @@ -34073,8 +34079,8 @@ def cuArrayCreate(pAllocateArray : Optional[CUDA_ARRAY_DESCRIPTOR]): with nogil: err = cydriver.cuArrayCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pHandle) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pHandle) {{endif}} {{if 'cuArrayGetDescriptor_v2' in found_functions}} @@ -34116,8 +34122,8 @@ def cuArrayGetDescriptor(hArray): with nogil: err = cydriver.cuArrayGetDescriptor(pArrayDescriptor._pvt_ptr, cyhArray) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pArrayDescriptor) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pArrayDescriptor) {{endif}} {{if 'cuArrayGetSparseProperties' in found_functions}} @@ -34172,8 +34178,8 @@ def cuArrayGetSparseProperties(array): with nogil: err = cydriver.cuArrayGetSparseProperties(sparseProperties._pvt_ptr, cyarray) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), sparseProperties) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, sparseProperties) {{endif}} {{if 'cuMipmappedArrayGetSparseProperties' in found_functions}} @@ -34230,8 +34236,8 @@ def cuMipmappedArrayGetSparseProperties(mipmap): with nogil: err = cydriver.cuMipmappedArrayGetSparseProperties(sparseProperties._pvt_ptr, cymipmap) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), sparseProperties) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, sparseProperties) {{endif}} {{if 'cuArrayGetMemoryRequirements' in found_functions}} @@ -34288,8 +34294,8 @@ def cuArrayGetMemoryRequirements(array, device): with nogil: err = cydriver.cuArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cyarray, cydevice) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), memoryRequirements) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, memoryRequirements) {{endif}} {{if 'cuMipmappedArrayGetMemoryRequirements' in found_functions}} @@ -34347,8 +34353,8 @@ def cuMipmappedArrayGetMemoryRequirements(mipmap, device): with nogil: err = cydriver.cuMipmappedArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cymipmap, cydevice) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), memoryRequirements) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, memoryRequirements) {{endif}} {{if 'cuArrayGetPlane' in found_functions}} @@ -34403,8 +34409,8 @@ def cuArrayGetPlane(hArray, unsigned int planeIdx): with nogil: err = cydriver.cuArrayGetPlane(pPlaneArray._pvt_ptr, cyhArray, planeIdx) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pPlaneArray) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pPlaneArray) {{endif}} {{if 'cuArrayDestroy' in found_functions}} @@ -34439,7 +34445,7 @@ def cuArrayDestroy(hArray): cyhArray = phArray with nogil: err = cydriver.cuArrayDestroy(cyhArray) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuArray3DCreate_v2' in found_functions}} @@ -34573,8 +34579,8 @@ def cuArray3DCreate(pAllocateArray : Optional[CUDA_ARRAY3D_DESCRIPTOR]): with nogil: err = cydriver.cuArray3DCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pHandle) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pHandle) {{endif}} {{if 'cuArray3DGetDescriptor_v2' in found_functions}} @@ -34620,8 +34626,8 @@ def cuArray3DGetDescriptor(hArray): with nogil: err = cydriver.cuArray3DGetDescriptor(pArrayDescriptor._pvt_ptr, cyhArray) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pArrayDescriptor) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pArrayDescriptor) {{endif}} {{if 'cuMipmappedArrayCreate' in found_functions}} @@ -34743,8 +34749,8 @@ def cuMipmappedArrayCreate(pMipmappedArrayDesc : Optional[CUDA_ARRAY3D_DESCRIPTO with nogil: err = cydriver.cuMipmappedArrayCreate(pHandle._pvt_ptr, cypMipmappedArrayDesc_ptr, numMipmapLevels) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pHandle) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pHandle) {{endif}} {{if 'cuMipmappedArrayGetLevel' in found_functions}} @@ -34789,8 +34795,8 @@ def cuMipmappedArrayGetLevel(hMipmappedArray, unsigned int level): with nogil: err = cydriver.cuMipmappedArrayGetLevel(pLevelArray._pvt_ptr, cyhMipmappedArray, level) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pLevelArray) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pLevelArray) {{endif}} {{if 'cuMipmappedArrayDestroy' in found_functions}} @@ -34825,7 +34831,7 @@ def cuMipmappedArrayDestroy(hMipmappedArray): cyhMipmappedArray = phMipmappedArray with nogil: err = cydriver.cuMipmappedArrayDestroy(cyhMipmappedArray) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemGetHandleForAddressRange' in found_functions}} @@ -34906,8 +34912,8 @@ def cuMemGetHandleForAddressRange(dptr, size_t size, handleType not None : CUmem with nogil: err = cydriver.cuMemGetHandleForAddressRange(cyhandle_ptr, cydptr, size, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), handle) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, handle) {{endif}} {{if 'cuMemBatchDecompressAsync' in found_functions}} @@ -34991,8 +34997,8 @@ def cuMemBatchDecompressAsync(paramsArray : Optional[CUmemDecompressParams], siz with nogil: err = cydriver.cuMemBatchDecompressAsync(cyparamsArray_ptr, count, flags, &errorIndex, cystream) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), errorIndex) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, errorIndex) {{endif}} {{if 'cuMemAddressReserve' in found_functions}} @@ -35044,8 +35050,8 @@ def cuMemAddressReserve(size_t size, size_t alignment, addr, unsigned long long with nogil: err = cydriver.cuMemAddressReserve(ptr._pvt_ptr, size, alignment, cyaddr, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), ptr) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, ptr) {{endif}} {{if 'cuMemAddressFree' in found_functions}} @@ -35084,7 +35090,7 @@ def cuMemAddressFree(ptr, size_t size): cyptr = pptr with nogil: err = cydriver.cuMemAddressFree(cyptr, size) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemCreate' in found_functions}} @@ -35176,8 +35182,8 @@ def cuMemCreate(size_t size, prop : Optional[CUmemAllocationProp], unsigned long with nogil: err = cydriver.cuMemCreate(handle._pvt_ptr, size, cyprop_ptr, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), handle) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, handle) {{endif}} {{if 'cuMemRelease' in found_functions}} @@ -35221,7 +35227,7 @@ def cuMemRelease(handle): cyhandle = phandle with nogil: err = cydriver.cuMemRelease(cyhandle) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemMap' in found_functions}} @@ -35304,7 +35310,7 @@ def cuMemMap(ptr, size_t size, size_t offset, handle, unsigned long long flags): cyptr = pptr with nogil: err = cydriver.cuMemMap(cyptr, size, offset, cyhandle, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} @@ -35478,7 +35484,7 @@ def cuMemMapArrayAsync(mapInfoList : Optional[tuple[CUarrayMapInfo] | list[CUarr err = cydriver.cuMemMapArrayAsync(cymapInfoList, count, cyhStream) if len(mapInfoList) > 1 and cymapInfoList is not NULL: free(cymapInfoList) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemUnmap' in found_functions}} @@ -35526,7 +35532,7 @@ def cuMemUnmap(ptr, size_t size): cyptr = pptr with nogil: err = cydriver.cuMemUnmap(cyptr, size) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemSetAccess' in found_functions}} @@ -35599,7 +35605,7 @@ def cuMemSetAccess(ptr, size_t size, desc : Optional[tuple[CUmemAccessDesc] | li err = cydriver.cuMemSetAccess(cyptr, size, cydesc, count) if len(desc) > 1 and cydesc is not NULL: free(cydesc) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemGetAccess' in found_functions}} @@ -35639,8 +35645,8 @@ def cuMemGetAccess(location : Optional[CUmemLocation], ptr): with nogil: err = cydriver.cuMemGetAccess(&flags, cylocation_ptr, cyptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), flags) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, flags) {{endif}} {{if 'cuMemExportToShareableHandle' in found_functions}} @@ -35699,8 +35705,8 @@ def cuMemExportToShareableHandle(handle, handleType not None : CUmemAllocationHa with nogil: err = cydriver.cuMemExportToShareableHandle(cyshareableHandle_ptr, cyhandle, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), cyshareableHandle.pyObj()) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, cyshareableHandle.pyObj()) {{endif}} {{if 'cuMemImportFromShareableHandle' in found_functions}} @@ -35749,8 +35755,8 @@ def cuMemImportFromShareableHandle(osHandle, shHandleType not None : CUmemAlloca with nogil: err = cydriver.cuMemImportFromShareableHandle(handle._pvt_ptr, cyosHandle_ptr, cyshHandleType) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), handle) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, handle) {{endif}} {{if 'cuMemGetAllocationGranularity' in found_functions}} @@ -35788,8 +35794,8 @@ def cuMemGetAllocationGranularity(prop : Optional[CUmemAllocationProp], option n with nogil: err = cydriver.cuMemGetAllocationGranularity(&granularity, cyprop_ptr, cyoption) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), granularity) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, granularity) {{endif}} {{if 'cuMemGetAllocationPropertiesFromHandle' in found_functions}} @@ -35827,8 +35833,8 @@ def cuMemGetAllocationPropertiesFromHandle(handle): with nogil: err = cydriver.cuMemGetAllocationPropertiesFromHandle(prop._pvt_ptr, cyhandle) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), prop) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, prop) {{endif}} {{if 'cuMemRetainAllocationHandle' in found_functions}} @@ -35868,8 +35874,8 @@ def cuMemRetainAllocationHandle(addr): with nogil: err = cydriver.cuMemRetainAllocationHandle(handle._pvt_ptr, cyaddr_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), handle) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, handle) {{endif}} {{if 'cuMemFreeAsync' in found_functions}} @@ -35917,7 +35923,7 @@ def cuMemFreeAsync(dptr, hStream): cydptr = pdptr with nogil: err = cydriver.cuMemFreeAsync(cydptr, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemAllocAsync' in found_functions}} @@ -35970,8 +35976,8 @@ def cuMemAllocAsync(size_t bytesize, hStream): with nogil: err = cydriver.cuMemAllocAsync(dptr._pvt_ptr, bytesize, cyhStream) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), dptr) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, dptr) {{endif}} {{if 'cuMemPoolTrimTo' in found_functions}} @@ -36021,7 +36027,7 @@ def cuMemPoolTrimTo(pool, size_t minBytesToKeep): cypool = ppool with nogil: err = cydriver.cuMemPoolTrimTo(cypool, minBytesToKeep) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemPoolSetAttribute' in found_functions}} @@ -36096,7 +36102,7 @@ def cuMemPoolSetAttribute(pool, attr not None : CUmemPool_attribute, value): cdef void* cyvalue_ptr = cyvalue.cptr with nogil: err = cydriver.cuMemPoolSetAttribute(cypool, cyattr, cyvalue_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemPoolGetAttribute' in found_functions}} @@ -36179,8 +36185,8 @@ def cuMemPoolGetAttribute(pool, attr not None : CUmemPool_attribute): with nogil: err = cydriver.cuMemPoolGetAttribute(cypool, cyattr, cyvalue_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), cyvalue.pyObj()) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, cyvalue.pyObj()) {{endif}} {{if 'cuMemPoolSetAccess' in found_functions}} @@ -36233,7 +36239,7 @@ def cuMemPoolSetAccess(pool, map : Optional[tuple[CUmemAccessDesc] | list[CUmemA err = cydriver.cuMemPoolSetAccess(cypool, cymap, count) if len(map) > 1 and cymap is not NULL: free(cymap) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemPoolGetAccess' in found_functions}} @@ -36276,8 +36282,8 @@ def cuMemPoolGetAccess(memPool, location : Optional[CUmemLocation]): with nogil: err = cydriver.cuMemPoolGetAccess(&flags, cymemPool, cylocation_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUmemAccess_flags(flags)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUmemAccess_flags(flags)) {{endif}} {{if 'cuMemPoolCreate' in found_functions}} @@ -36375,8 +36381,8 @@ def cuMemPoolCreate(poolProps : Optional[CUmemPoolProps]): with nogil: err = cydriver.cuMemPoolCreate(pool._pvt_ptr, cypoolProps_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pool) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pool) {{endif}} {{if 'cuMemPoolDestroy' in found_functions}} @@ -36422,7 +36428,7 @@ def cuMemPoolDestroy(pool): cypool = ppool with nogil: err = cydriver.cuMemPoolDestroy(cypool) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemGetDefaultMemPool' in found_functions}} @@ -36466,8 +36472,8 @@ def cuMemGetDefaultMemPool(location : Optional[CUmemLocation], typename not None with nogil: err = cydriver.cuMemGetDefaultMemPool(pool_out._pvt_ptr, cylocation_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pool_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pool_out) {{endif}} {{if 'cuMemGetMemPool' in found_functions}} @@ -36519,8 +36525,8 @@ def cuMemGetMemPool(location : Optional[CUmemLocation], typename not None : CUme with nogil: err = cydriver.cuMemGetMemPool(pool._pvt_ptr, cylocation_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pool) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pool) {{endif}} {{if 'cuMemSetMemPool' in found_functions}} @@ -36586,7 +36592,7 @@ def cuMemSetMemPool(location : Optional[CUmemLocation], typename not None : CUme cdef cydriver.CUmemAllocationType cytypename = int(typename) with nogil: err = cydriver.cuMemSetMemPool(cylocation_ptr, cytypename, cypool) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemAllocFromPoolAsync' in found_functions}} @@ -36644,8 +36650,8 @@ def cuMemAllocFromPoolAsync(size_t bytesize, pool, hStream): with nogil: err = cydriver.cuMemAllocFromPoolAsync(dptr._pvt_ptr, bytesize, cypool, cyhStream) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), dptr) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, dptr) {{endif}} {{if 'cuMemPoolExportToShareableHandle' in found_functions}} @@ -36701,8 +36707,8 @@ def cuMemPoolExportToShareableHandle(pool, handleType not None : CUmemAllocation with nogil: err = cydriver.cuMemPoolExportToShareableHandle(cyhandle_out_ptr, cypool, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), cyhandle_out.pyObj()) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, cyhandle_out.pyObj()) {{endif}} {{if 'cuMemPoolImportFromShareableHandle' in found_functions}} @@ -36750,8 +36756,8 @@ def cuMemPoolImportFromShareableHandle(handle, handleType not None : CUmemAlloca with nogil: err = cydriver.cuMemPoolImportFromShareableHandle(pool_out._pvt_ptr, cyhandle_ptr, cyhandleType, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pool_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pool_out) {{endif}} {{if 'cuMemPoolExportPointer' in found_functions}} @@ -36793,8 +36799,8 @@ def cuMemPoolExportPointer(ptr): with nogil: err = cydriver.cuMemPoolExportPointer(shareData_out._pvt_ptr, cyptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), shareData_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, shareData_out) {{endif}} {{if 'cuMemPoolImportPointer' in found_functions}} @@ -36846,8 +36852,8 @@ def cuMemPoolImportPointer(pool, shareData : Optional[CUmemPoolPtrExportData]): with nogil: err = cydriver.cuMemPoolImportPointer(ptr_out._pvt_ptr, cypool, cyshareData_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), ptr_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, ptr_out) {{endif}} {{if 'cuMulticastCreate' in found_functions}} @@ -36909,8 +36915,8 @@ def cuMulticastCreate(prop : Optional[CUmulticastObjectProp]): with nogil: err = cydriver.cuMulticastCreate(mcHandle._pvt_ptr, cyprop_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), mcHandle) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, mcHandle) {{endif}} {{if 'cuMulticastAddDevice' in found_functions}} @@ -36967,7 +36973,7 @@ def cuMulticastAddDevice(mcHandle, dev): cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastAddDevice(cymcHandle, cydev) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMulticastBindMem' in found_functions}} @@ -37049,7 +37055,7 @@ def cuMulticastBindMem(mcHandle, size_t mcOffset, memHandle, size_t memOffset, s cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastBindMem(cymcHandle, mcOffset, cymemHandle, memOffset, size, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMulticastBindMem_v2' in found_functions}} @@ -37150,7 +37156,7 @@ def cuMulticastBindMem_v2(mcHandle, dev, size_t mcOffset, memHandle, size_t memO cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastBindMem_v2(cymcHandle, cydev, mcOffset, cymemHandle, memOffset, size, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMulticastBindAddr' in found_functions}} @@ -37228,7 +37234,7 @@ def cuMulticastBindAddr(mcHandle, size_t mcOffset, memptr, size_t size, unsigned cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastBindAddr(cymcHandle, mcOffset, cymemptr, size, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMulticastBindAddr_v2' in found_functions}} @@ -37323,7 +37329,7 @@ def cuMulticastBindAddr_v2(mcHandle, dev, size_t mcOffset, memptr, size_t size, cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastBindAddr_v2(cymcHandle, cydev, mcOffset, cymemptr, size, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMulticastUnbind' in found_functions}} @@ -37384,7 +37390,7 @@ def cuMulticastUnbind(mcHandle, dev, size_t mcOffset, size_t size): cymcHandle = pmcHandle with nogil: err = cydriver.cuMulticastUnbind(cymcHandle, cydev, mcOffset, size) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMulticastGetGranularity' in found_functions}} @@ -37424,8 +37430,8 @@ def cuMulticastGetGranularity(prop : Optional[CUmulticastObjectProp], option not with nogil: err = cydriver.cuMulticastGetGranularity(&granularity, cyprop_ptr, cyoption) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), granularity) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, granularity) {{endif}} {{if 'cuPointerGetAttribute' in found_functions}} @@ -37637,8 +37643,8 @@ def cuPointerGetAttribute(attribute not None : CUpointer_attribute, ptr): with nogil: err = cydriver.cuPointerGetAttribute(cydata_ptr, cyattribute, cyptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), cydata.pyObj()) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, cydata.pyObj()) {{endif}} {{if 'cuMemPrefetchAsync_v2' in found_functions}} @@ -37761,7 +37767,7 @@ def cuMemPrefetchAsync(devPtr, size_t count, location not None : CUmemLocation, cydevPtr = pdevPtr with nogil: err = cydriver.cuMemPrefetchAsync(cydevPtr, count, location._pvt_ptr[0], flags, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemAdvise_v2' in found_functions}} @@ -37966,7 +37972,7 @@ def cuMemAdvise(devPtr, size_t count, advice not None : CUmem_advise, location n cdef cydriver.CUmem_advise cyadvice = int(advice) with nogil: err = cydriver.cuMemAdvise(cydevPtr, count, cyadvice, location._pvt_ptr[0]) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemPrefetchBatchAsync' in found_functions}} @@ -38086,7 +38092,7 @@ def cuMemPrefetchBatchAsync(dptrs : Optional[tuple[CUdeviceptr] | list[CUdevicep free(cydptrs) if len(prefetchLocs) > 1 and cyprefetchLocs is not NULL: free(cyprefetchLocs) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemDiscardBatchAsync' in found_functions}} @@ -38171,7 +38177,7 @@ def cuMemDiscardBatchAsync(dptrs : Optional[tuple[CUdeviceptr] | list[CUdevicept err = cydriver.cuMemDiscardBatchAsync(cydptrs, cysizes.data(), count, flags, cyhStream) if len(dptrs) > 1 and cydptrs is not NULL: free(cydptrs) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemDiscardAndPrefetchBatchAsync' in found_functions}} @@ -38299,7 +38305,7 @@ def cuMemDiscardAndPrefetchBatchAsync(dptrs : Optional[tuple[CUdeviceptr] | list free(cydptrs) if len(prefetchLocs) > 1 and cyprefetchLocs is not NULL: free(cyprefetchLocs) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuMemRangeGetAttribute' in found_functions}} @@ -38456,8 +38462,8 @@ def cuMemRangeGetAttribute(size_t dataSize, attribute not None : CUmem_range_att with nogil: err = cydriver.cuMemRangeGetAttribute(cydata_ptr, dataSize, cyattribute, cydevPtr, count) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), cydata.pyObj()) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, cydata.pyObj()) {{endif}} {{if 'cuMemRangeGetAttributes' in found_functions}} @@ -38543,8 +38549,8 @@ def cuMemRangeGetAttributes(dataSizes : tuple[int] | list[int], attributes : Opt with nogil: err = cydriver.cuMemRangeGetAttributes(cyvoidStarHelper_ptr, cydataSizes.data(), cyattributes.data(), numAttributes, cydevPtr, count) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), [obj.pyObj() for obj in pylist]) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, [obj.pyObj() for obj in pylist]) {{endif}} {{if 'cuPointerSetAttribute' in found_functions}} @@ -38600,7 +38606,7 @@ def cuPointerSetAttribute(value, attribute not None : CUpointer_attribute, ptr): cdef cydriver.CUpointer_attribute cyattribute = int(attribute) with nogil: err = cydriver.cuPointerSetAttribute(cyvalue_ptr, cyattribute, cyptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuPointerGetAttributes' in found_functions}} @@ -38693,8 +38699,8 @@ def cuPointerGetAttributes(unsigned int numAttributes, attributes : Optional[tup with nogil: err = cydriver.cuPointerGetAttributes(numAttributes, cyattributes.data(), cyvoidStarHelper_ptr, cyptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), [obj.pyObj() for obj in pylist]) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, [obj.pyObj() for obj in pylist]) {{endif}} {{if 'cuStreamCreate' in found_functions}} @@ -38735,8 +38741,8 @@ def cuStreamCreate(unsigned int Flags): with nogil: err = cydriver.cuStreamCreate(phStream._pvt_ptr, Flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phStream) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phStream) {{endif}} {{if 'cuStreamCreateWithPriority' in found_functions}} @@ -38790,8 +38796,8 @@ def cuStreamCreateWithPriority(unsigned int flags, int priority): with nogil: err = cydriver.cuStreamCreateWithPriority(phStream._pvt_ptr, flags, priority) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phStream) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phStream) {{endif}} {{if 'cuStreamGetPriority' in found_functions}} @@ -38838,8 +38844,8 @@ def cuStreamGetPriority(hStream): with nogil: err = cydriver.cuStreamGetPriority(cyhStream, &priority) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), priority) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, priority) {{endif}} {{if 'cuStreamGetDevice' in found_functions}} @@ -38878,8 +38884,8 @@ def cuStreamGetDevice(hStream): with nogil: err = cydriver.cuStreamGetDevice(cyhStream, device._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), device) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, device) {{endif}} {{if 'cuStreamGetFlags' in found_functions}} @@ -38923,8 +38929,8 @@ def cuStreamGetFlags(hStream): with nogil: err = cydriver.cuStreamGetFlags(cyhStream, &flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), flags) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, flags) {{endif}} {{if 'cuStreamGetId' in found_functions}} @@ -38980,8 +38986,8 @@ def cuStreamGetId(hStream): with nogil: err = cydriver.cuStreamGetId(cyhStream, &streamId) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), streamId) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, streamId) {{endif}} {{if 'cuStreamGetCtx' in found_functions}} @@ -39045,8 +39051,8 @@ def cuStreamGetCtx(hStream): with nogil: err = cydriver.cuStreamGetCtx(cyhStream, pctx._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pctx) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pctx) {{endif}} {{if 'cuStreamGetCtx_v2' in found_functions}} @@ -39123,8 +39129,8 @@ def cuStreamGetCtx_v2(hStream): with nogil: err = cydriver.cuStreamGetCtx_v2(cyhStream, pCtx._pvt_ptr, pGreenCtx._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), pCtx, pGreenCtx) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, pCtx, pGreenCtx) {{endif}} {{if 'cuStreamWaitEvent' in found_functions}} @@ -39183,7 +39189,7 @@ def cuStreamWaitEvent(hStream, hEvent, unsigned int Flags): cyhStream = phStream with nogil: err = cydriver.cuStreamWaitEvent(cyhStream, cyhEvent, Flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamAddCallback' in found_functions}} @@ -39300,7 +39306,7 @@ def cuStreamAddCallback(hStream, callback, userData, unsigned int flags): err = cydriver.cuStreamAddCallback(cyhStream, cuStreamCallbackWrapper, cbData, flags) if err != cydriver.CUDA_SUCCESS: free(cbData) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamBeginCapture_v2' in found_functions}} @@ -39356,7 +39362,7 @@ def cuStreamBeginCapture(hStream, mode not None : CUstreamCaptureMode): cdef cydriver.CUstreamCaptureMode cymode = int(mode) with nogil: err = cydriver.cuStreamBeginCapture(cyhStream, cymode) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamBeginCaptureToGraph' in found_functions}} @@ -39462,7 +39468,7 @@ def cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies : Optional[tuple[C free(cydependencies) if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuThreadExchangeStreamCaptureMode' in found_functions}} @@ -39535,8 +39541,8 @@ def cuThreadExchangeStreamCaptureMode(mode not None : CUstreamCaptureMode): with nogil: err = cydriver.cuThreadExchangeStreamCaptureMode(&cymode) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUstreamCaptureMode(cymode)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUstreamCaptureMode(cymode)) {{endif}} {{if 'cuStreamEndCapture' in found_functions}} @@ -39583,8 +39589,8 @@ def cuStreamEndCapture(hStream): with nogil: err = cydriver.cuStreamEndCapture(cyhStream, phGraph._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraph) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraph) {{endif}} {{if 'cuStreamIsCapturing' in found_functions}} @@ -39646,8 +39652,8 @@ def cuStreamIsCapturing(hStream): with nogil: err = cydriver.cuStreamIsCapturing(cyhStream, &captureStatus) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUstreamCaptureStatus(captureStatus)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUstreamCaptureStatus(captureStatus)) {{endif}} {{if 'cuStreamGetCaptureInfo_v3' in found_functions}} @@ -39746,8 +39752,8 @@ def cuStreamGetCaptureInfo(hStream): if CUresult(err) == CUresult(0): pyedgeData_out = [CUgraphEdgeData(_ptr=&cyedgeData_out[idx]) for idx in range(numDependencies_out)] if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None, None, None, None, None) - return (CUresult(err), CUstreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, pyedgeData_out, numDependencies_out) + return (_CUresult(err), None, None, None, None, None, None) + return (_CUresult_SUCCESS, CUstreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, pyedgeData_out, numDependencies_out) {{endif}} {{if 'cuStreamUpdateCaptureDependencies_v2' in found_functions}} @@ -39834,7 +39840,7 @@ def cuStreamUpdateCaptureDependencies(hStream, dependencies : Optional[tuple[CUg free(cydependencies) if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamAttachMemAsync' in found_functions}} @@ -39947,7 +39953,7 @@ def cuStreamAttachMemAsync(hStream, dptr, size_t length, unsigned int flags): cyhStream = phStream with nogil: err = cydriver.cuStreamAttachMemAsync(cyhStream, cydptr, length, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamQuery' in found_functions}} @@ -39988,7 +39994,7 @@ def cuStreamQuery(hStream): cyhStream = phStream with nogil: err = cydriver.cuStreamQuery(cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamSynchronize' in found_functions}} @@ -40028,7 +40034,7 @@ def cuStreamSynchronize(hStream): cyhStream = phStream with nogil: err = cydriver.cuStreamSynchronize(cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamDestroy_v2' in found_functions}} @@ -40069,7 +40075,7 @@ def cuStreamDestroy(hStream): cyhStream = phStream with nogil: err = cydriver.cuStreamDestroy(cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamCopyAttributes' in found_functions}} @@ -40115,7 +40121,7 @@ def cuStreamCopyAttributes(dst, src): cydst = pdst with nogil: err = cydriver.cuStreamCopyAttributes(cydst, cysrc) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamGetAttribute' in found_functions}} @@ -40158,8 +40164,8 @@ def cuStreamGetAttribute(hStream, attr not None : CUstreamAttrID): with nogil: err = cydriver.cuStreamGetAttribute(cyhStream, cyattr, value_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), value_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, value_out) {{endif}} {{if 'cuStreamSetAttribute' in found_functions}} @@ -40202,7 +40208,7 @@ def cuStreamSetAttribute(hStream, attr not None : CUstreamAttrID, value : Option cdef cydriver.CUstreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cydriver.cuStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuEventCreate' in found_functions}} @@ -40252,8 +40258,8 @@ def cuEventCreate(unsigned int Flags): with nogil: err = cydriver.cuEventCreate(phEvent._pvt_ptr, Flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phEvent) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phEvent) {{endif}} {{if 'cuEventRecord' in found_functions}} @@ -40313,7 +40319,7 @@ def cuEventRecord(hEvent, hStream): cyhEvent = phEvent with nogil: err = cydriver.cuEventRecord(cyhEvent, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuEventRecordWithFlags' in found_functions}} @@ -40383,7 +40389,7 @@ def cuEventRecordWithFlags(hEvent, hStream, unsigned int flags): cyhEvent = phEvent with nogil: err = cydriver.cuEventRecordWithFlags(cyhEvent, cyhStream, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuEventQuery' in found_functions}} @@ -40428,7 +40434,7 @@ def cuEventQuery(hEvent): cyhEvent = phEvent with nogil: err = cydriver.cuEventQuery(cyhEvent) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuEventSynchronize' in found_functions}} @@ -40472,7 +40478,7 @@ def cuEventSynchronize(hEvent): cyhEvent = phEvent with nogil: err = cydriver.cuEventSynchronize(cyhEvent) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuEventDestroy_v2' in found_functions}} @@ -40513,7 +40519,7 @@ def cuEventDestroy(hEvent): cyhEvent = phEvent with nogil: err = cydriver.cuEventDestroy(cyhEvent) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuEventElapsedTime_v2' in found_functions}} @@ -40585,8 +40591,8 @@ def cuEventElapsedTime(hStart, hEnd): with nogil: err = cydriver.cuEventElapsedTime(&pMilliseconds, cyhStart, cyhEnd) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pMilliseconds) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pMilliseconds) {{endif}} {{if 'cuImportExternalMemory' in found_functions}} @@ -40751,8 +40757,8 @@ def cuImportExternalMemory(memHandleDesc : Optional[CUDA_EXTERNAL_MEMORY_HANDLE_ with nogil: err = cydriver.cuImportExternalMemory(extMem_out._pvt_ptr, cymemHandleDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), extMem_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, extMem_out) {{endif}} {{if 'cuExternalMemoryGetMappedBuffer' in found_functions}} @@ -40821,8 +40827,8 @@ def cuExternalMemoryGetMappedBuffer(extMem, bufferDesc : Optional[CUDA_EXTERNAL_ with nogil: err = cydriver.cuExternalMemoryGetMappedBuffer(devPtr._pvt_ptr, cyextMem, cybufferDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), devPtr) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, devPtr) {{endif}} {{if 'cuExternalMemoryGetMappedMipmappedArray' in found_functions}} @@ -40897,8 +40903,8 @@ def cuExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : Optional[CUDA_E with nogil: err = cydriver.cuExternalMemoryGetMappedMipmappedArray(mipmap._pvt_ptr, cyextMem, cymipmapDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), mipmap) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, mipmap) {{endif}} {{if 'cuDestroyExternalMemory' in found_functions}} @@ -40936,7 +40942,7 @@ def cuDestroyExternalMemory(extMem): cyextMem = pextMem with nogil: err = cydriver.cuDestroyExternalMemory(cyextMem) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuImportExternalSemaphore' in found_functions}} @@ -41086,8 +41092,8 @@ def cuImportExternalSemaphore(semHandleDesc : Optional[CUDA_EXTERNAL_SEMAPHORE_H with nogil: err = cydriver.cuImportExternalSemaphore(extSem_out._pvt_ptr, cysemHandleDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), extSem_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, extSem_out) {{endif}} {{if 'cuSignalExternalSemaphoresAsync' in found_functions}} @@ -41240,7 +41246,7 @@ def cuSignalExternalSemaphoresAsync(extSemArray : Optional[tuple[CUexternalSemap free(cyextSemArray) if len(paramsArray) > 1 and cyparamsArray is not NULL: free(cyparamsArray) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuWaitExternalSemaphoresAsync' in found_functions}} @@ -41370,7 +41376,7 @@ def cuWaitExternalSemaphoresAsync(extSemArray : Optional[tuple[CUexternalSemapho free(cyextSemArray) if len(paramsArray) > 1 and cyparamsArray is not NULL: free(cyparamsArray) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuDestroyExternalSemaphore' in found_functions}} @@ -41407,7 +41413,7 @@ def cuDestroyExternalSemaphore(extSem): cyextSem = pextSem with nogil: err = cydriver.cuDestroyExternalSemaphore(cyextSem) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamWaitValue32_v2' in found_functions}} @@ -41481,7 +41487,7 @@ def cuStreamWaitValue32(stream, addr, value, unsigned int flags): cystream = pstream with nogil: err = cydriver.cuStreamWaitValue32(cystream, cyaddr, cyvalue, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamWaitValue64_v2' in found_functions}} @@ -41553,7 +41559,7 @@ def cuStreamWaitValue64(stream, addr, value, unsigned int flags): cystream = pstream with nogil: err = cydriver.cuStreamWaitValue64(cystream, cyaddr, cyvalue, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamWriteValue32_v2' in found_functions}} @@ -41615,7 +41621,7 @@ def cuStreamWriteValue32(stream, addr, value, unsigned int flags): cystream = pstream with nogil: err = cydriver.cuStreamWriteValue32(cystream, cyaddr, cyvalue, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamWriteValue64_v2' in found_functions}} @@ -41679,7 +41685,7 @@ def cuStreamWriteValue64(stream, addr, value, unsigned int flags): cystream = pstream with nogil: err = cydriver.cuStreamWriteValue64(cystream, cyaddr, cyvalue, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamBatchMemOp_v2' in found_functions}} @@ -41752,7 +41758,7 @@ def cuStreamBatchMemOp(stream, unsigned int count, paramArray : Optional[tuple[C err = cydriver.cuStreamBatchMemOp(cystream, count, cyparamArray, flags) if len(paramArray) > 1 and cyparamArray is not NULL: free(cyparamArray) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuFuncGetAttribute' in found_functions}} @@ -41887,8 +41893,8 @@ def cuFuncGetAttribute(attrib not None : CUfunction_attribute, hfunc): with nogil: err = cydriver.cuFuncGetAttribute(&pi, cyattrib, cyhfunc) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pi) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pi) {{endif}} {{if 'cuFuncSetAttribute' in found_functions}} @@ -41982,7 +41988,7 @@ def cuFuncSetAttribute(hfunc, attrib not None : CUfunction_attribute, int value) cdef cydriver.CUfunction_attribute cyattrib = int(attrib) with nogil: err = cydriver.cuFuncSetAttribute(cyhfunc, cyattrib, value) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuFuncSetCacheConfig' in found_functions}} @@ -42048,7 +42054,7 @@ def cuFuncSetCacheConfig(hfunc, config not None : CUfunc_cache): cdef cydriver.CUfunc_cache cyconfig = int(config) with nogil: err = cydriver.cuFuncSetCacheConfig(cyhfunc, cyconfig) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuFuncGetModule' in found_functions}} @@ -42091,8 +42097,8 @@ def cuFuncGetModule(hfunc): with nogil: err = cydriver.cuFuncGetModule(hmod._pvt_ptr, cyhfunc) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), hmod) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, hmod) {{endif}} {{if 'cuFuncGetName' in found_functions}} @@ -42133,8 +42139,8 @@ def cuFuncGetName(hfunc): with nogil: err = cydriver.cuFuncGetName(&name, cyhfunc) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), name if name != NULL else None) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, name if name != NULL else None) {{endif}} {{if 'cuFuncGetParamInfo' in found_functions}} @@ -42188,8 +42194,8 @@ def cuFuncGetParamInfo(func, size_t paramIndex): with nogil: err = cydriver.cuFuncGetParamInfo(cyfunc, paramIndex, ¶mOffset, ¶mSize) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), paramOffset, paramSize) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, paramOffset, paramSize) {{endif}} {{if 'cuFuncIsLoaded' in found_functions}} @@ -42228,8 +42234,8 @@ def cuFuncIsLoaded(function): with nogil: err = cydriver.cuFuncIsLoaded(&state, cyfunction) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUfunctionLoadingState(state)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUfunctionLoadingState(state)) {{endif}} {{if 'cuFuncLoad' in found_functions}} @@ -42265,7 +42271,7 @@ def cuFuncLoad(function): cyfunction = pfunction with nogil: err = cydriver.cuFuncLoad(cyfunction) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLaunchKernel' in found_functions}} @@ -42398,7 +42404,7 @@ def cuLaunchKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int cdef void** cykernelParams_ptr = cykernelParams.ckernelParams with nogil: err = cydriver.cuLaunchKernel(cyf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, cyhStream, cykernelParams_ptr, extra) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLaunchKernelEx' in found_functions}} @@ -42639,7 +42645,7 @@ def cuLaunchKernelEx(config : Optional[CUlaunchConfig], f, kernelParams, void_pt cdef void** cykernelParams_ptr = cykernelParams.ckernelParams with nogil: err = cydriver.cuLaunchKernelEx(cyconfig_ptr, cyf, cykernelParams_ptr, extra) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLaunchCooperativeKernel' in found_functions}} @@ -42752,7 +42758,7 @@ def cuLaunchCooperativeKernel(f, unsigned int gridDimX, unsigned int gridDimY, u cdef void** cykernelParams_ptr = cykernelParams.ckernelParams with nogil: err = cydriver.cuLaunchCooperativeKernel(cyf, gridDimX, gridDimY, gridDimZ, blockDimX, blockDimY, blockDimZ, sharedMemBytes, cyhStream, cykernelParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLaunchCooperativeKernelMultiDevice' in found_functions}} @@ -42926,7 +42932,7 @@ def cuLaunchCooperativeKernelMultiDevice(launchParamsList : Optional[tuple[CUDA_ err = cydriver.cuLaunchCooperativeKernelMultiDevice(cylaunchParamsList, numDevices, flags) if len(launchParamsList) > 1 and cylaunchParamsList is not NULL: free(cylaunchParamsList) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLaunchHostFunc' in found_functions}} @@ -43035,7 +43041,7 @@ def cuLaunchHostFunc(hStream, fn, userData): err = cydriver.cuLaunchHostFunc(cyhStream, cuHostCallbackWrapper, cbData) if err != cydriver.CUDA_SUCCESS: free(cbData) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuFuncSetBlockShape' in found_functions}} @@ -43079,7 +43085,7 @@ def cuFuncSetBlockShape(hfunc, int x, int y, int z): cyhfunc = phfunc with nogil: err = cydriver.cuFuncSetBlockShape(cyhfunc, x, y, z) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuFuncSetSharedSize' in found_functions}} @@ -43120,7 +43126,7 @@ def cuFuncSetSharedSize(hfunc, unsigned int numbytes): cyhfunc = phfunc with nogil: err = cydriver.cuFuncSetSharedSize(cyhfunc, numbytes) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuParamSetSize' in found_functions}} @@ -43160,7 +43166,7 @@ def cuParamSetSize(hfunc, unsigned int numbytes): cyhfunc = phfunc with nogil: err = cydriver.cuParamSetSize(cyhfunc, numbytes) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuParamSeti' in found_functions}} @@ -43203,7 +43209,7 @@ def cuParamSeti(hfunc, int offset, unsigned int value): cyhfunc = phfunc with nogil: err = cydriver.cuParamSeti(cyhfunc, offset, value) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuParamSetf' in found_functions}} @@ -43246,7 +43252,7 @@ def cuParamSetf(hfunc, int offset, float value): cyhfunc = phfunc with nogil: err = cydriver.cuParamSetf(cyhfunc, offset, value) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuParamSetv' in found_functions}} @@ -43293,7 +43299,7 @@ def cuParamSetv(hfunc, int offset, ptr, unsigned int numbytes): cdef void* cyptr_ptr = cyptr.cptr with nogil: err = cydriver.cuParamSetv(cyhfunc, offset, cyptr_ptr, numbytes) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLaunch' in found_functions}} @@ -43344,7 +43350,7 @@ def cuLaunch(f): cyf = pf with nogil: err = cydriver.cuLaunch(cyf) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLaunchGrid' in found_functions}} @@ -43399,7 +43405,7 @@ def cuLaunchGrid(f, int grid_width, int grid_height): cyf = pf with nogil: err = cydriver.cuLaunchGrid(cyf, grid_width, grid_height) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLaunchGridAsync' in found_functions}} @@ -43470,7 +43476,7 @@ def cuLaunchGridAsync(f, int grid_width, int grid_height, hStream): cyf = pf with nogil: err = cydriver.cuLaunchGridAsync(cyf, grid_width, grid_height, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuParamSetTexRef' in found_functions}} @@ -43519,7 +43525,7 @@ def cuParamSetTexRef(hfunc, int texunit, hTexRef): cyhfunc = phfunc with nogil: err = cydriver.cuParamSetTexRef(cyhfunc, texunit, cyhTexRef) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuFuncSetSharedMemConfig' in found_functions}} @@ -43592,7 +43598,7 @@ def cuFuncSetSharedMemConfig(hfunc, config not None : CUsharedconfig): cdef cydriver.CUsharedconfig cyconfig = int(config) with nogil: err = cydriver.cuFuncSetSharedMemConfig(cyhfunc, cyconfig) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphCreate' in found_functions}} @@ -43623,8 +43629,8 @@ def cuGraphCreate(unsigned int flags): with nogil: err = cydriver.cuGraphCreate(phGraph._pvt_ptr, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraph) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraph) {{endif}} {{if 'cuGraphAddKernelNode_v2' in found_functions}} @@ -43747,8 +43753,8 @@ def cuGraphAddKernelNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphKernelNodeGetParams_v2' in found_functions}} @@ -43796,8 +43802,8 @@ def cuGraphKernelNodeGetParams(hNode): with nogil: err = cydriver.cuGraphKernelNodeGetParams(cyhNode, nodeParams._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), nodeParams) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, nodeParams) {{endif}} {{if 'cuGraphKernelNodeSetParams_v2' in found_functions}} @@ -43835,7 +43841,7 @@ def cuGraphKernelNodeSetParams(hNode, nodeParams : Optional[CUDA_KERNEL_NODE_PAR cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphKernelNodeSetParams(cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphAddMemcpyNode' in found_functions}} @@ -43925,8 +43931,8 @@ def cuGraphAddMemcpyNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphMemcpyNodeGetParams' in found_functions}} @@ -43965,8 +43971,8 @@ def cuGraphMemcpyNodeGetParams(hNode): with nogil: err = cydriver.cuGraphMemcpyNodeGetParams(cyhNode, nodeParams._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), nodeParams) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, nodeParams) {{endif}} {{if 'cuGraphMemcpyNodeSetParams' in found_functions}} @@ -44004,7 +44010,7 @@ def cuGraphMemcpyNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMCPY3D]): cdef cydriver.CUDA_MEMCPY3D* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphMemcpyNodeSetParams(cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphAddMemsetNode' in found_functions}} @@ -44084,8 +44090,8 @@ def cuGraphAddMemsetNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | li if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphMemsetNodeGetParams' in found_functions}} @@ -44124,8 +44130,8 @@ def cuGraphMemsetNodeGetParams(hNode): with nogil: err = cydriver.cuGraphMemsetNodeGetParams(cyhNode, nodeParams._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), nodeParams) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, nodeParams) {{endif}} {{if 'cuGraphMemsetNodeSetParams' in found_functions}} @@ -44163,7 +44169,7 @@ def cuGraphMemsetNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMSET_NODE_PAR cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphMemsetNodeSetParams(cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphAddHostNode' in found_functions}} @@ -44233,8 +44239,8 @@ def cuGraphAddHostNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphHostNodeGetParams' in found_functions}} @@ -44273,8 +44279,8 @@ def cuGraphHostNodeGetParams(hNode): with nogil: err = cydriver.cuGraphHostNodeGetParams(cyhNode, nodeParams._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), nodeParams) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, nodeParams) {{endif}} {{if 'cuGraphHostNodeSetParams' in found_functions}} @@ -44312,7 +44318,7 @@ def cuGraphHostNodeSetParams(hNode, nodeParams : Optional[CUDA_HOST_NODE_PARAMS] cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphHostNodeSetParams(cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphAddChildGraphNode' in found_functions}} @@ -44392,8 +44398,8 @@ def cuGraphAddChildGraphNode(hGraph, dependencies : Optional[tuple[CUgraphNode] if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphChildGraphNodeGetGraph' in found_functions}} @@ -44437,8 +44443,8 @@ def cuGraphChildGraphNodeGetGraph(hNode): with nogil: err = cydriver.cuGraphChildGraphNodeGetGraph(cyhNode, phGraph._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraph) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraph) {{endif}} {{if 'cuGraphAddEmptyNode' in found_functions}} @@ -44508,8 +44514,8 @@ def cuGraphAddEmptyNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | lis if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphAddEventRecordNode' in found_functions}} @@ -44586,8 +44592,8 @@ def cuGraphAddEventRecordNode(hGraph, dependencies : Optional[tuple[CUgraphNode] if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphEventRecordNodeGetEvent' in found_functions}} @@ -44626,8 +44632,8 @@ def cuGraphEventRecordNodeGetEvent(hNode): with nogil: err = cydriver.cuGraphEventRecordNodeGetEvent(cyhNode, event_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), event_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, event_out) {{endif}} {{if 'cuGraphEventRecordNodeSetEvent' in found_functions}} @@ -44672,7 +44678,7 @@ def cuGraphEventRecordNodeSetEvent(hNode, event): cyhNode = phNode with nogil: err = cydriver.cuGraphEventRecordNodeSetEvent(cyhNode, cyevent) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphAddEventWaitNode' in found_functions}} @@ -44751,8 +44757,8 @@ def cuGraphAddEventWaitNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphEventWaitNodeGetEvent' in found_functions}} @@ -44791,8 +44797,8 @@ def cuGraphEventWaitNodeGetEvent(hNode): with nogil: err = cydriver.cuGraphEventWaitNodeGetEvent(cyhNode, event_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), event_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, event_out) {{endif}} {{if 'cuGraphEventWaitNodeSetEvent' in found_functions}} @@ -44837,7 +44843,7 @@ def cuGraphEventWaitNodeSetEvent(hNode, event): cyhNode = phNode with nogil: err = cydriver.cuGraphEventWaitNodeSetEvent(cyhNode, cyevent) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphAddExternalSemaphoresSignalNode' in found_functions}} @@ -44908,8 +44914,8 @@ def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : Optional[tuple if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeGetParams' in found_functions}} @@ -44954,8 +44960,8 @@ def cuGraphExternalSemaphoresSignalNodeGetParams(hNode): with nogil: err = cydriver.cuGraphExternalSemaphoresSignalNodeGetParams(cyhNode, params_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), params_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, params_out) {{endif}} {{if 'cuGraphExternalSemaphoresSignalNodeSetParams' in found_functions}} @@ -44994,7 +45000,7 @@ def cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : Optional[CU cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExternalSemaphoresSignalNodeSetParams(cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphAddExternalSemaphoresWaitNode' in found_functions}} @@ -45065,8 +45071,8 @@ def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : Optional[tuple[C if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeGetParams' in found_functions}} @@ -45111,8 +45117,8 @@ def cuGraphExternalSemaphoresWaitNodeGetParams(hNode): with nogil: err = cydriver.cuGraphExternalSemaphoresWaitNodeGetParams(cyhNode, params_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), params_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, params_out) {{endif}} {{if 'cuGraphExternalSemaphoresWaitNodeSetParams' in found_functions}} @@ -45151,7 +45157,7 @@ def cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : Optional[CUDA cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExternalSemaphoresWaitNodeSetParams(cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphAddBatchMemOpNode' in found_functions}} @@ -45225,8 +45231,8 @@ def cuGraphAddBatchMemOpNode(hGraph, dependencies : Optional[tuple[CUgraphNode] if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphBatchMemOpNodeGetParams' in found_functions}} @@ -45270,8 +45276,8 @@ def cuGraphBatchMemOpNodeGetParams(hNode): with nogil: err = cydriver.cuGraphBatchMemOpNodeGetParams(cyhNode, nodeParams_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), nodeParams_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, nodeParams_out) {{endif}} {{if 'cuGraphBatchMemOpNodeSetParams' in found_functions}} @@ -45312,7 +45318,7 @@ def cuGraphBatchMemOpNodeSetParams(hNode, nodeParams : Optional[CUDA_BATCH_MEM_O cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphBatchMemOpNodeSetParams(cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecBatchMemOpNodeSetParams' in found_functions}} @@ -45383,7 +45389,7 @@ def cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams : Optional[ cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecBatchMemOpNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphAddMemAllocNode' in found_functions}} @@ -45494,8 +45500,8 @@ def cuGraphAddMemAllocNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphMemAllocNodeGetParams' in found_functions}} @@ -45537,8 +45543,8 @@ def cuGraphMemAllocNodeGetParams(hNode): with nogil: err = cydriver.cuGraphMemAllocNodeGetParams(cyhNode, params_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), params_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, params_out) {{endif}} {{if 'cuGraphAddMemFreeNode' in found_functions}} @@ -45633,8 +45639,8 @@ def cuGraphAddMemFreeNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | l if len(dependencies) > 1 and cydependencies is not NULL: free(cydependencies) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphMemFreeNodeGetParams' in found_functions}} @@ -45673,8 +45679,8 @@ def cuGraphMemFreeNodeGetParams(hNode): with nogil: err = cydriver.cuGraphMemFreeNodeGetParams(cyhNode, dptr_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), dptr_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, dptr_out) {{endif}} {{if 'cuDeviceGraphMemTrim' in found_functions}} @@ -45711,7 +45717,7 @@ def cuDeviceGraphMemTrim(device): cydevice = pdevice with nogil: err = cydriver.cuDeviceGraphMemTrim(cydevice) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuDeviceGetGraphMemAttribute' in found_functions}} @@ -45769,8 +45775,8 @@ def cuDeviceGetGraphMemAttribute(device, attr not None : CUgraphMem_attribute): with nogil: err = cydriver.cuDeviceGetGraphMemAttribute(cydevice, cyattr, cyvalue_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), cyvalue.pyObj()) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, cyvalue.pyObj()) {{endif}} {{if 'cuDeviceSetGraphMemAttribute' in found_functions}} @@ -45820,7 +45826,7 @@ def cuDeviceSetGraphMemAttribute(device, attr not None : CUgraphMem_attribute, v cdef void* cyvalue_ptr = cyvalue.cptr with nogil: err = cydriver.cuDeviceSetGraphMemAttribute(cydevice, cyattr, cyvalue_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphClone' in found_functions}} @@ -45869,8 +45875,8 @@ def cuGraphClone(originalGraph): with nogil: err = cydriver.cuGraphClone(phGraphClone._pvt_ptr, cyoriginalGraph) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphClone) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphClone) {{endif}} {{if 'cuGraphNodeFindInClone' in found_functions}} @@ -45926,8 +45932,8 @@ def cuGraphNodeFindInClone(hOriginalNode, hClonedGraph): with nogil: err = cydriver.cuGraphNodeFindInClone(phNode._pvt_ptr, cyhOriginalNode, cyhClonedGraph) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phNode) {{endif}} {{if 'cuGraphNodeGetType' in found_functions}} @@ -45966,8 +45972,8 @@ def cuGraphNodeGetType(hNode): with nogil: err = cydriver.cuGraphNodeGetType(cyhNode, &typename) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUgraphNodeType(typename)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUgraphNodeType(typename)) {{endif}} {{if 'cuGraphNodeGetContainingGraph' in found_functions}} @@ -46007,8 +46013,8 @@ def cuGraphNodeGetContainingGraph(hNode): with nogil: err = cydriver.cuGraphNodeGetContainingGraph(cyhNode, phGraph._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraph) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraph) {{endif}} {{if 'cuGraphNodeGetLocalId' in found_functions}} @@ -46049,8 +46055,8 @@ def cuGraphNodeGetLocalId(hNode): with nogil: err = cydriver.cuGraphNodeGetLocalId(cyhNode, &nodeId) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), nodeId) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, nodeId) {{endif}} {{if 'cuGraphNodeGetToolsId' in found_functions}} @@ -46087,8 +46093,8 @@ def cuGraphNodeGetToolsId(hNode): with nogil: err = cydriver.cuGraphNodeGetToolsId(cyhNode, &toolsNodeId) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), toolsNodeId) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, toolsNodeId) {{endif}} {{if 'cuGraphGetId' in found_functions}} @@ -46128,8 +46134,8 @@ def cuGraphGetId(hGraph): with nogil: err = cydriver.cuGraphGetId(cyhGraph, &graphId) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), graphId) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, graphId) {{endif}} {{if 'cuGraphExecGetId' in found_functions}} @@ -46169,8 +46175,8 @@ def cuGraphExecGetId(hGraphExec): with nogil: err = cydriver.cuGraphExecGetId(cyhGraphExec, &graphId) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), graphId) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, graphId) {{endif}} {{if 'cuGraphGetNodes' in found_functions}} @@ -46228,8 +46234,8 @@ def cuGraphGetNodes(hGraph, size_t numNodes = 0): if cynodes is not NULL: free(cynodes) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), pynodes, numNodes) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, pynodes, numNodes) {{endif}} {{if 'cuGraphGetRootNodes' in found_functions}} @@ -46287,8 +46293,8 @@ def cuGraphGetRootNodes(hGraph, size_t numRootNodes = 0): if cyrootNodes is not NULL: free(cyrootNodes) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), pyrootNodes, numRootNodes) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, pyrootNodes, numRootNodes) {{endif}} {{if 'cuGraphGetEdges_v2' in found_functions}} @@ -46377,8 +46383,8 @@ def cuGraphGetEdges(hGraph, size_t numEdges = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None, None, None) - return (CUresult(err), pyfrom_, pyto, pyedgeData, numEdges) + return (_CUresult(err), None, None, None, None) + return (_CUresult_SUCCESS, pyfrom_, pyto, pyedgeData, numEdges) {{endif}} {{if 'cuGraphNodeGetDependencies_v2' in found_functions}} @@ -46454,8 +46460,8 @@ def cuGraphNodeGetDependencies(hNode, size_t numDependencies = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None, None) - return (CUresult(err), pydependencies, pyedgeData, numDependencies) + return (_CUresult(err), None, None, None) + return (_CUresult_SUCCESS, pydependencies, pyedgeData, numDependencies) {{endif}} {{if 'cuGraphNodeGetDependentNodes_v2' in found_functions}} @@ -46531,8 +46537,8 @@ def cuGraphNodeGetDependentNodes(hNode, size_t numDependentNodes = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None, None) - return (CUresult(err), pydependentNodes, pyedgeData, numDependentNodes) + return (_CUresult(err), None, None, None) + return (_CUresult_SUCCESS, pydependentNodes, pyedgeData, numDependentNodes) {{endif}} {{if 'cuGraphAddDependencies_v2' in found_functions}} @@ -46625,7 +46631,7 @@ def cuGraphAddDependencies(hGraph, from_ : Optional[tuple[CUgraphNode] | list[CU free(cyto) if len(edgeData) > 1 and cyedgeData is not NULL: free(cyedgeData) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphRemoveDependencies_v2' in found_functions}} @@ -46724,7 +46730,7 @@ def cuGraphRemoveDependencies(hGraph, from_ : Optional[tuple[CUgraphNode] | list free(cyto) if len(edgeData) > 1 and cyedgeData is not NULL: free(cyedgeData) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphDestroyNode' in found_functions}} @@ -46763,7 +46769,7 @@ def cuGraphDestroyNode(hNode): cyhNode = phNode with nogil: err = cydriver.cuGraphDestroyNode(cyhNode) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphInstantiateWithFlags' in found_functions}} @@ -46867,8 +46873,8 @@ def cuGraphInstantiate(hGraph, unsigned long long flags): with nogil: err = cydriver.cuGraphInstantiate(phGraphExec._pvt_ptr, cyhGraph, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphExec) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphExec) {{endif}} {{if 'cuGraphInstantiateWithParams' in found_functions}} @@ -47013,8 +47019,8 @@ def cuGraphInstantiateWithParams(hGraph, instantiateParams : Optional[CUDA_GRAPH with nogil: err = cydriver.cuGraphInstantiateWithParams(phGraphExec._pvt_ptr, cyhGraph, cyinstantiateParams_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphExec) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphExec) {{endif}} {{if 'cuGraphExecGetFlags' in found_functions}} @@ -47056,8 +47062,8 @@ def cuGraphExecGetFlags(hGraphExec): with nogil: err = cydriver.cuGraphExecGetFlags(cyhGraphExec, flags._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), flags) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, flags) {{endif}} {{if 'cuGraphExecKernelNodeSetParams_v2' in found_functions}} @@ -47138,7 +47144,7 @@ def cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecKernelNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecMemcpyNodeSetParams' in found_functions}} @@ -47213,7 +47219,7 @@ def cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams : Optional[CUDA cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams is not None else NULL with nogil: err = cydriver.cuGraphExecMemcpyNodeSetParams(cyhGraphExec, cyhNode, cycopyParams_ptr, cyctx) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecMemsetNodeSetParams' in found_functions}} @@ -47293,7 +47299,7 @@ def cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams : Optional[CU cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams is not None else NULL with nogil: err = cydriver.cuGraphExecMemsetNodeSetParams(cyhGraphExec, cyhNode, cymemsetParams_ptr, cyctx) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecHostNodeSetParams' in found_functions}} @@ -47348,7 +47354,7 @@ def cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA_H cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecHostNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecChildGraphNodeSetParams' in found_functions}} @@ -47418,7 +47424,7 @@ def cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphExecChildGraphNodeSetParams(cyhGraphExec, cyhNode, cychildGraph) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecEventRecordNodeSetEvent' in found_functions}} @@ -47481,7 +47487,7 @@ def cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphExecEventRecordNodeSetEvent(cyhGraphExec, cyhNode, cyevent) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecEventWaitNodeSetEvent' in found_functions}} @@ -47544,7 +47550,7 @@ def cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphExecEventWaitNodeSetEvent(cyhGraphExec, cyhNode, cyevent) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecExternalSemaphoresSignalNodeSetParams' in found_functions}} @@ -47604,7 +47610,7 @@ def cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodePara cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecExternalSemaphoresSignalNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecExternalSemaphoresWaitNodeSetParams' in found_functions}} @@ -47664,7 +47670,7 @@ def cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecExternalSemaphoresWaitNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphNodeSetEnabled' in found_functions}} @@ -47733,7 +47739,7 @@ def cuGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphNodeSetEnabled(cyhGraphExec, cyhNode, isEnabled) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphNodeGetEnabled' in found_functions}} @@ -47793,8 +47799,8 @@ def cuGraphNodeGetEnabled(hGraphExec, hNode): with nogil: err = cydriver.cuGraphNodeGetEnabled(cyhGraphExec, cyhNode, &isEnabled) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), isEnabled) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, isEnabled) {{endif}} {{if 'cuGraphUpload' in found_functions}} @@ -47843,7 +47849,7 @@ def cuGraphUpload(hGraphExec, hStream): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphUpload(cyhGraphExec, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphLaunch' in found_functions}} @@ -47897,7 +47903,7 @@ def cuGraphLaunch(hGraphExec, hStream): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphLaunch(cyhGraphExec, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecDestroy' in found_functions}} @@ -47934,7 +47940,7 @@ def cuGraphExecDestroy(hGraphExec): cyhGraphExec = phGraphExec with nogil: err = cydriver.cuGraphExecDestroy(cyhGraphExec) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphDestroy' in found_functions}} @@ -47969,7 +47975,7 @@ def cuGraphDestroy(hGraph): cyhGraph = phGraph with nogil: err = cydriver.cuGraphDestroy(cyhGraph) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecUpdate_v2' in found_functions}} @@ -48148,8 +48154,8 @@ def cuGraphExecUpdate(hGraphExec, hGraph): with nogil: err = cydriver.cuGraphExecUpdate(cyhGraphExec, cyhGraph, resultInfo._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), resultInfo) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, resultInfo) {{endif}} {{if 'cuGraphKernelNodeCopyAttributes' in found_functions}} @@ -48196,7 +48202,7 @@ def cuGraphKernelNodeCopyAttributes(dst, src): cydst = pdst with nogil: err = cydriver.cuGraphKernelNodeCopyAttributes(cydst, cysrc) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphKernelNodeGetAttribute' in found_functions}} @@ -48239,8 +48245,8 @@ def cuGraphKernelNodeGetAttribute(hNode, attr not None : CUkernelNodeAttrID): with nogil: err = cydriver.cuGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), value_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, value_out) {{endif}} {{if 'cuGraphKernelNodeSetAttribute' in found_functions}} @@ -48282,7 +48288,7 @@ def cuGraphKernelNodeSetAttribute(hNode, attr not None : CUkernelNodeAttrID, val cdef cydriver.CUkernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cydriver.cuGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphDebugDotPrint' in found_functions}} @@ -48322,7 +48328,7 @@ def cuGraphDebugDotPrint(hGraph, char* path, unsigned int flags): cyhGraph = phGraph with nogil: err = cydriver.cuGraphDebugDotPrint(cyhGraph, path, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuUserObjectCreate' in found_functions}} @@ -48383,8 +48389,8 @@ def cuUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int with nogil: err = cydriver.cuUserObjectCreate(object_out._pvt_ptr, cyptr_ptr, cydestroy, initialRefcount, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), object_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, object_out) {{endif}} {{if 'cuUserObjectRetain' in found_functions}} @@ -48426,7 +48432,7 @@ def cuUserObjectRetain(object, unsigned int count): cyobject = pobject with nogil: err = cydriver.cuUserObjectRetain(cyobject, count) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuUserObjectRelease' in found_functions}} @@ -48471,7 +48477,7 @@ def cuUserObjectRelease(object, unsigned int count): cyobject = pobject with nogil: err = cydriver.cuUserObjectRelease(cyobject, count) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphRetainUserObject' in found_functions}} @@ -48527,7 +48533,7 @@ def cuGraphRetainUserObject(graph, object, unsigned int count, unsigned int flag cygraph = pgraph with nogil: err = cydriver.cuGraphRetainUserObject(cygraph, cyobject, count, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphReleaseUserObject' in found_functions}} @@ -48578,7 +48584,7 @@ def cuGraphReleaseUserObject(graph, object, unsigned int count): cygraph = pgraph with nogil: err = cydriver.cuGraphReleaseUserObject(cygraph, cyobject, count) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphAddNode_v2' in found_functions}} @@ -48673,8 +48679,8 @@ def cuGraphAddNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUg if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phGraphNode) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) {{endif}} {{if 'cuGraphNodeSetParams' in found_functions}} @@ -48718,7 +48724,7 @@ def cuGraphNodeSetParams(hNode, nodeParams : Optional[CUgraphNodeParams]): cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphNodeSetParams(cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphExecNodeSetParams' in found_functions}} @@ -48778,7 +48784,7 @@ def cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUgraphNod cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cydriver.cuGraphExecNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphConditionalHandleCreate' in found_functions}} @@ -48842,8 +48848,8 @@ def cuGraphConditionalHandleCreate(hGraph, ctx, unsigned int defaultLaunchValue, with nogil: err = cydriver.cuGraphConditionalHandleCreate(pHandle_out._pvt_ptr, cyhGraph, cyctx, defaultLaunchValue, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pHandle_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pHandle_out) {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessor' in found_functions}} @@ -48893,8 +48899,8 @@ def cuOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dyna with nogil: err = cydriver.cuOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, cyfunc, blockSize, dynamicSMemSize) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), numBlocks) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, numBlocks) {{endif}} {{if 'cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' in found_functions}} @@ -48962,8 +48968,8 @@ def cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, si with nogil: err = cydriver.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(&numBlocks, cyfunc, blockSize, dynamicSMemSize, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), numBlocks) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, numBlocks) {{endif}} {{if 'cuOccupancyMaxPotentialBlockSize' in found_functions}} @@ -49049,8 +49055,8 @@ def cuOccupancyMaxPotentialBlockSize(func, blockSizeToDynamicSMemSize, size_t dy with nogil: err = cydriver.cuOccupancyMaxPotentialBlockSize(&minGridSize, &blockSize, cyfunc, cyblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), minGridSize, blockSize) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, minGridSize, blockSize) {{endif}} {{if 'cuOccupancyMaxPotentialBlockSizeWithFlags' in found_functions}} @@ -49135,8 +49141,8 @@ def cuOccupancyMaxPotentialBlockSizeWithFlags(func, blockSizeToDynamicSMemSize, with nogil: err = cydriver.cuOccupancyMaxPotentialBlockSizeWithFlags(&minGridSize, &blockSize, cyfunc, cyblockSizeToDynamicSMemSize, dynamicSMemSize, blockSizeLimit, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), minGridSize, blockSize) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, minGridSize, blockSize) {{endif}} {{if 'cuOccupancyAvailableDynamicSMemPerBlock' in found_functions}} @@ -49182,8 +49188,8 @@ def cuOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize): with nogil: err = cydriver.cuOccupancyAvailableDynamicSMemPerBlock(&dynamicSmemSize, cyfunc, numBlocks, blockSize) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), dynamicSmemSize) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, dynamicSmemSize) {{endif}} {{if 'cuOccupancyMaxPotentialClusterSize' in found_functions}} @@ -49242,8 +49248,8 @@ def cuOccupancyMaxPotentialClusterSize(func, config : Optional[CUlaunchConfig]): with nogil: err = cydriver.cuOccupancyMaxPotentialClusterSize(&clusterSize, cyfunc, cyconfig_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), clusterSize) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, clusterSize) {{endif}} {{if 'cuOccupancyMaxActiveClusters' in found_functions}} @@ -49302,8 +49308,8 @@ def cuOccupancyMaxActiveClusters(func, config : Optional[CUlaunchConfig]): with nogil: err = cydriver.cuOccupancyMaxActiveClusters(&numClusters, cyfunc, cyconfig_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), numClusters) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, numClusters) {{endif}} {{if 'cuTexRefSetArray' in found_functions}} @@ -49356,7 +49362,7 @@ def cuTexRefSetArray(hTexRef, hArray, unsigned int Flags): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetArray(cyhTexRef, cyhArray, Flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefSetMipmappedArray' in found_functions}} @@ -49409,7 +49415,7 @@ def cuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, unsigned int Flags): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetMipmappedArray(cyhTexRef, cyhMipmappedArray, Flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefSetAddress_v2' in found_functions}} @@ -49483,8 +49489,8 @@ def cuTexRefSetAddress(hTexRef, dptr, size_t numbytes): with nogil: err = cydriver.cuTexRefSetAddress(&ByteOffset, cyhTexRef, cydptr, numbytes) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), ByteOffset) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, ByteOffset) {{endif}} {{if 'cuTexRefSetAddress2D_v3' in found_functions}} @@ -49565,7 +49571,7 @@ def cuTexRefSetAddress2D(hTexRef, desc : Optional[CUDA_ARRAY_DESCRIPTOR], dptr, cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cydesc_ptr = desc._pvt_ptr if desc is not None else NULL with nogil: err = cydriver.cuTexRefSetAddress2D(cyhTexRef, cydesc_ptr, cydptr, Pitch) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefSetFormat' in found_functions}} @@ -49611,7 +49617,7 @@ def cuTexRefSetFormat(hTexRef, fmt not None : CUarray_format, int NumPackedCompo cdef cydriver.CUarray_format cyfmt = int(fmt) with nogil: err = cydriver.cuTexRefSetFormat(cyhTexRef, cyfmt, NumPackedComponents) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefSetAddressMode' in found_functions}} @@ -49664,7 +49670,7 @@ def cuTexRefSetAddressMode(hTexRef, int dim, am not None : CUaddress_mode): cdef cydriver.CUaddress_mode cyam = int(am) with nogil: err = cydriver.cuTexRefSetAddressMode(cyhTexRef, dim, cyam) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefSetFilterMode' in found_functions}} @@ -49711,7 +49717,7 @@ def cuTexRefSetFilterMode(hTexRef, fm not None : CUfilter_mode): cdef cydriver.CUfilter_mode cyfm = int(fm) with nogil: err = cydriver.cuTexRefSetFilterMode(cyhTexRef, cyfm) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefSetMipmapFilterMode' in found_functions}} @@ -49758,7 +49764,7 @@ def cuTexRefSetMipmapFilterMode(hTexRef, fm not None : CUfilter_mode): cdef cydriver.CUfilter_mode cyfm = int(fm) with nogil: err = cydriver.cuTexRefSetMipmapFilterMode(cyhTexRef, cyfm) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefSetMipmapLevelBias' in found_functions}} @@ -49802,7 +49808,7 @@ def cuTexRefSetMipmapLevelBias(hTexRef, float bias): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetMipmapLevelBias(cyhTexRef, bias) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefSetMipmapLevelClamp' in found_functions}} @@ -49848,7 +49854,7 @@ def cuTexRefSetMipmapLevelClamp(hTexRef, float minMipmapLevelClamp, float maxMip cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetMipmapLevelClamp(cyhTexRef, minMipmapLevelClamp, maxMipmapLevelClamp) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefSetMaxAnisotropy' in found_functions}} @@ -49891,7 +49897,7 @@ def cuTexRefSetMaxAnisotropy(hTexRef, unsigned int maxAniso): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetMaxAnisotropy(cyhTexRef, maxAniso) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefSetBorderColor' in found_functions}} @@ -49939,7 +49945,7 @@ def cuTexRefSetBorderColor(hTexRef, float pBorderColor): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetBorderColor(cyhTexRef, &pBorderColor) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefSetFlags' in found_functions}} @@ -49997,7 +50003,7 @@ def cuTexRefSetFlags(hTexRef, unsigned int Flags): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefSetFlags(cyhTexRef, Flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexRefGetAddress_v2' in found_functions}} @@ -50040,8 +50046,8 @@ def cuTexRefGetAddress(hTexRef): with nogil: err = cydriver.cuTexRefGetAddress(pdptr._pvt_ptr, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pdptr) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pdptr) {{endif}} {{if 'cuTexRefGetArray' in found_functions}} @@ -50084,8 +50090,8 @@ def cuTexRefGetArray(hTexRef): with nogil: err = cydriver.cuTexRefGetArray(phArray._pvt_ptr, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phArray) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phArray) {{endif}} {{if 'cuTexRefGetMipmappedArray' in found_functions}} @@ -50129,8 +50135,8 @@ def cuTexRefGetMipmappedArray(hTexRef): with nogil: err = cydriver.cuTexRefGetMipmappedArray(phMipmappedArray._pvt_ptr, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phMipmappedArray) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phMipmappedArray) {{endif}} {{if 'cuTexRefGetAddressMode' in found_functions}} @@ -50175,8 +50181,8 @@ def cuTexRefGetAddressMode(hTexRef, int dim): with nogil: err = cydriver.cuTexRefGetAddressMode(&pam, cyhTexRef, dim) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUaddress_mode(pam)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUaddress_mode(pam)) {{endif}} {{if 'cuTexRefGetFilterMode' in found_functions}} @@ -50218,8 +50224,8 @@ def cuTexRefGetFilterMode(hTexRef): with nogil: err = cydriver.cuTexRefGetFilterMode(&pfm, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUfilter_mode(pfm)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUfilter_mode(pfm)) {{endif}} {{if 'cuTexRefGetFormat' in found_functions}} @@ -50265,8 +50271,8 @@ def cuTexRefGetFormat(hTexRef): with nogil: err = cydriver.cuTexRefGetFormat(&pFormat, &pNumChannels, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), CUarray_format(pFormat), pNumChannels) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, CUarray_format(pFormat), pNumChannels) {{endif}} {{if 'cuTexRefGetMipmapFilterMode' in found_functions}} @@ -50308,8 +50314,8 @@ def cuTexRefGetMipmapFilterMode(hTexRef): with nogil: err = cydriver.cuTexRefGetMipmapFilterMode(&pfm, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUfilter_mode(pfm)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUfilter_mode(pfm)) {{endif}} {{if 'cuTexRefGetMipmapLevelBias' in found_functions}} @@ -50352,8 +50358,8 @@ def cuTexRefGetMipmapLevelBias(hTexRef): with nogil: err = cydriver.cuTexRefGetMipmapLevelBias(&pbias, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pbias) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pbias) {{endif}} {{if 'cuTexRefGetMipmapLevelClamp' in found_functions}} @@ -50399,8 +50405,8 @@ def cuTexRefGetMipmapLevelClamp(hTexRef): with nogil: err = cydriver.cuTexRefGetMipmapLevelClamp(&pminMipmapLevelClamp, &pmaxMipmapLevelClamp, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), pminMipmapLevelClamp, pmaxMipmapLevelClamp) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, pminMipmapLevelClamp, pmaxMipmapLevelClamp) {{endif}} {{if 'cuTexRefGetMaxAnisotropy' in found_functions}} @@ -50442,8 +50448,8 @@ def cuTexRefGetMaxAnisotropy(hTexRef): with nogil: err = cydriver.cuTexRefGetMaxAnisotropy(&pmaxAniso, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pmaxAniso) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pmaxAniso) {{endif}} {{if 'cuTexRefGetBorderColor' in found_functions}} @@ -50488,8 +50494,8 @@ def cuTexRefGetBorderColor(hTexRef): with nogil: err = cydriver.cuTexRefGetBorderColor(&pBorderColor, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pBorderColor) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pBorderColor) {{endif}} {{if 'cuTexRefGetFlags' in found_functions}} @@ -50530,8 +50536,8 @@ def cuTexRefGetFlags(hTexRef): with nogil: err = cydriver.cuTexRefGetFlags(&pFlags, cyhTexRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pFlags) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pFlags) {{endif}} {{if 'cuTexRefCreate' in found_functions}} @@ -50564,8 +50570,8 @@ def cuTexRefCreate(): with nogil: err = cydriver.cuTexRefCreate(pTexRef._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pTexRef) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pTexRef) {{endif}} {{if 'cuTexRefDestroy' in found_functions}} @@ -50602,7 +50608,7 @@ def cuTexRefDestroy(hTexRef): cyhTexRef = phTexRef with nogil: err = cydriver.cuTexRefDestroy(cyhTexRef) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuSurfRefSetArray' in found_functions}} @@ -50656,7 +50662,7 @@ def cuSurfRefSetArray(hSurfRef, hArray, unsigned int Flags): cyhSurfRef = phSurfRef with nogil: err = cydriver.cuSurfRefSetArray(cyhSurfRef, cyhArray, Flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuSurfRefGetArray' in found_functions}} @@ -50699,8 +50705,8 @@ def cuSurfRefGetArray(hSurfRef): with nogil: err = cydriver.cuSurfRefGetArray(phArray._pvt_ptr, cyhSurfRef) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phArray) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phArray) {{endif}} {{if 'cuTexObjectCreate' in found_functions}} @@ -50939,8 +50945,8 @@ def cuTexObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC], pTexDesc : Option with nogil: err = cydriver.cuTexObjectCreate(pTexObject._pvt_ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pTexObject) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pTexObject) {{endif}} {{if 'cuTexObjectDestroy' in found_functions}} @@ -50975,7 +50981,7 @@ def cuTexObjectDestroy(texObject): cytexObject = ptexObject with nogil: err = cydriver.cuTexObjectDestroy(cytexObject) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuTexObjectGetResourceDesc' in found_functions}} @@ -51015,8 +51021,8 @@ def cuTexObjectGetResourceDesc(texObject): with nogil: err = cydriver.cuTexObjectGetResourceDesc(pResDesc._pvt_ptr, cytexObject) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pResDesc) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pResDesc) {{endif}} {{if 'cuTexObjectGetTextureDesc' in found_functions}} @@ -51056,8 +51062,8 @@ def cuTexObjectGetTextureDesc(texObject): with nogil: err = cydriver.cuTexObjectGetTextureDesc(pTexDesc._pvt_ptr, cytexObject) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pTexDesc) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pTexDesc) {{endif}} {{if 'cuTexObjectGetResourceViewDesc' in found_functions}} @@ -51098,8 +51104,8 @@ def cuTexObjectGetResourceViewDesc(texObject): with nogil: err = cydriver.cuTexObjectGetResourceViewDesc(pResViewDesc._pvt_ptr, cytexObject) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pResViewDesc) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pResViewDesc) {{endif}} {{if 'cuSurfObjectCreate' in found_functions}} @@ -51141,8 +51147,8 @@ def cuSurfObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC]): with nogil: err = cydriver.cuSurfObjectCreate(pSurfObject._pvt_ptr, cypResDesc_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pSurfObject) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pSurfObject) {{endif}} {{if 'cuSurfObjectDestroy' in found_functions}} @@ -51177,7 +51183,7 @@ def cuSurfObjectDestroy(surfObject): cysurfObject = psurfObject with nogil: err = cydriver.cuSurfObjectDestroy(cysurfObject) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuSurfObjectGetResourceDesc' in found_functions}} @@ -51217,8 +51223,8 @@ def cuSurfObjectGetResourceDesc(surfObject): with nogil: err = cydriver.cuSurfObjectGetResourceDesc(pResDesc._pvt_ptr, cysurfObject) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pResDesc) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pResDesc) {{endif}} {{if 'cuTensorMapEncodeTiled' in found_functions}} @@ -51524,8 +51530,8 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor with nogil: err = cydriver.cuTensorMapEncodeTiled(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, cyboxDim, cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), tensorMap) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, tensorMap) {{endif}} {{if 'cuTensorMapEncodeIm2col' in found_functions}} @@ -51868,8 +51874,8 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso with nogil: err = cydriver.cuTensorMapEncodeIm2col(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, cypixelBoxLowerCorner.data(), cypixelBoxUpperCorner.data(), cychannelsPerPixel, cypixelsPerColumn, cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), tensorMap) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, tensorMap) {{endif}} {{if 'cuTensorMapEncodeIm2colWide' in found_functions}} @@ -52192,8 +52198,8 @@ def cuTensorMapEncodeIm2colWide(tensorDataType not None : CUtensorMapDataType, t with nogil: err = cydriver.cuTensorMapEncodeIm2colWide(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, cyglobalDim, cyglobalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, cychannelsPerPixel, cypixelsPerColumn, cyelementStrides, cyinterleave, cymode, cyswizzle, cyl2Promotion, cyoobFill) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), tensorMap) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, tensorMap) {{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}} @@ -52231,7 +52237,7 @@ def cuTensorMapReplaceAddress(tensorMap : Optional[CUtensorMap], globalAddress): cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr with nogil: err = cydriver.cuTensorMapReplaceAddress(cytensorMap_ptr, cyglobalAddress_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuDeviceCanAccessPeer' in found_functions}} @@ -52286,8 +52292,8 @@ def cuDeviceCanAccessPeer(dev, peerDev): with nogil: err = cydriver.cuDeviceCanAccessPeer(&canAccessPeer, cydev, cypeerDev) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), canAccessPeer) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, canAccessPeer) {{endif}} {{if 'cuCtxEnablePeerAccess' in found_functions}} @@ -52357,7 +52363,7 @@ def cuCtxEnablePeerAccess(peerContext, unsigned int Flags): cypeerContext = ppeerContext with nogil: err = cydriver.cuCtxEnablePeerAccess(cypeerContext, Flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxDisablePeerAccess' in found_functions}} @@ -52397,7 +52403,7 @@ def cuCtxDisablePeerAccess(peerContext): cypeerContext = ppeerContext with nogil: err = cydriver.cuCtxDisablePeerAccess(cypeerContext) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuDeviceGetP2PAttribute' in found_functions}} @@ -52475,8 +52481,8 @@ def cuDeviceGetP2PAttribute(attrib not None : CUdevice_P2PAttribute, srcDevice, with nogil: err = cydriver.cuDeviceGetP2PAttribute(&value, cyattrib, cysrcDevice, cydstDevice) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), value) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, value) {{endif}} {{if 'cuDeviceGetP2PAtomicCapabilities' in found_functions}} @@ -52558,8 +52564,8 @@ def cuDeviceGetP2PAtomicCapabilities(operations : Optional[tuple[CUatomicOperati if cycapabilities is not NULL: free(cycapabilities) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pycapabilities) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pycapabilities) {{endif}} {{if 'cuGraphicsUnregisterResource' in found_functions}} @@ -52598,7 +52604,7 @@ def cuGraphicsUnregisterResource(resource): cyresource = presource with nogil: err = cydriver.cuGraphicsUnregisterResource(cyresource) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphicsSubResourceGetMappedArray' in found_functions}} @@ -52655,8 +52661,8 @@ def cuGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsig with nogil: err = cydriver.cuGraphicsSubResourceGetMappedArray(pArray._pvt_ptr, cyresource, arrayIndex, mipLevel) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pArray) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pArray) {{endif}} {{if 'cuGraphicsResourceGetMappedMipmappedArray' in found_functions}} @@ -52702,8 +52708,8 @@ def cuGraphicsResourceGetMappedMipmappedArray(resource): with nogil: err = cydriver.cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray._pvt_ptr, cyresource) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pMipmappedArray) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pMipmappedArray) {{endif}} {{if 'cuGraphicsResourceGetMappedPointer_v2' in found_functions}} @@ -52749,8 +52755,8 @@ def cuGraphicsResourceGetMappedPointer(resource): with nogil: err = cydriver.cuGraphicsResourceGetMappedPointer(pDevPtr._pvt_ptr, &pSize, cyresource) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), pDevPtr, pSize) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, pDevPtr, pSize) {{endif}} {{if 'cuGraphicsResourceSetMapFlags_v2' in found_functions}} @@ -52809,7 +52815,7 @@ def cuGraphicsResourceSetMapFlags(resource, unsigned int flags): cyresource = presource with nogil: err = cydriver.cuGraphicsResourceSetMapFlags(cyresource, flags) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphicsMapResources' in found_functions}} @@ -52872,7 +52878,7 @@ def cuGraphicsMapResources(unsigned int count, resources, hStream): raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) with nogil: err = cydriver.cuGraphicsMapResources(count, cyresources, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGraphicsUnmapResources' in found_functions}} @@ -52933,7 +52939,7 @@ def cuGraphicsUnmapResources(unsigned int count, resources, hStream): raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) with nogil: err = cydriver.cuGraphicsUnmapResources(count, cyresources, cyhStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGetProcAddress_v2' in found_functions}} @@ -53038,8 +53044,8 @@ def cuGetProcAddress(char* symbol, int cudaVersion, flags): with nogil: err = cydriver.cuGetProcAddress(symbol, &pfn, cudaVersion, cyflags, &symbolStatus) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), pfn, CUdriverProcAddressQueryResult(symbolStatus)) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, pfn, CUdriverProcAddressQueryResult(symbolStatus)) {{endif}} {{if 'cuCoredumpGetAttribute' in found_functions}} @@ -53158,8 +53164,8 @@ def cuCoredumpGetAttribute(attrib not None : CUcoredumpSettings): with nogil: err = cydriver.cuCoredumpGetAttribute(cyattrib, cyvalue_ptr, &size) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), cyvalue.pyObj()) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, cyvalue.pyObj()) {{endif}} {{if 'cuCoredumpGetAttributeGlobal' in found_functions}} @@ -53274,8 +53280,8 @@ def cuCoredumpGetAttributeGlobal(attrib not None : CUcoredumpSettings): with nogil: err = cydriver.cuCoredumpGetAttributeGlobal(cyattrib, cyvalue_ptr, &size) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), cyvalue.pyObj()) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, cyvalue.pyObj()) {{endif}} {{if 'cuCoredumpSetAttribute' in found_functions}} @@ -53396,7 +53402,7 @@ def cuCoredumpSetAttribute(attrib not None : CUcoredumpSettings, value): cdef size_t size = cyvalue.size() with nogil: err = cydriver.cuCoredumpSetAttribute(cyattrib, cyvalue_ptr, &size) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCoredumpSetAttributeGlobal' in found_functions}} @@ -53522,7 +53528,7 @@ def cuCoredumpSetAttributeGlobal(attrib not None : CUcoredumpSettings, value): cdef size_t size = cyvalue.size() with nogil: err = cydriver.cuCoredumpSetAttributeGlobal(cyattrib, cyvalue_ptr, &size) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGetExportTable' in found_functions}} @@ -53548,8 +53554,8 @@ def cuGetExportTable(pExportTableId : Optional[CUuuid]): with nogil: err = cydriver.cuGetExportTable(&ppExportTable, cypExportTableId_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), ppExportTable) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, ppExportTable) {{endif}} {{if 'cuGreenCtxCreate' in found_functions}} @@ -53624,8 +53630,8 @@ def cuGreenCtxCreate(desc, dev, unsigned int flags): with nogil: err = cydriver.cuGreenCtxCreate(phCtx._pvt_ptr, cydesc, cydev, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phCtx) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phCtx) {{endif}} {{if 'cuGreenCtxDestroy' in found_functions}} @@ -53675,7 +53681,7 @@ def cuGreenCtxDestroy(hCtx): cyhCtx = phCtx with nogil: err = cydriver.cuGreenCtxDestroy(cyhCtx) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCtxFromGreenCtx' in found_functions}} @@ -53723,8 +53729,8 @@ def cuCtxFromGreenCtx(hCtx): with nogil: err = cydriver.cuCtxFromGreenCtx(pContext._pvt_ptr, cyhCtx) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pContext) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pContext) {{endif}} {{if 'cuDeviceGetDevResource' in found_functions}} @@ -53770,8 +53776,8 @@ def cuDeviceGetDevResource(device, typename not None : CUdevResourceType): with nogil: err = cydriver.cuDeviceGetDevResource(cydevice, resource._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), resource) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, resource) {{endif}} {{if 'cuCtxGetDevResource' in found_functions}} @@ -53814,8 +53820,8 @@ def cuCtxGetDevResource(hCtx, typename not None : CUdevResourceType): with nogil: err = cydriver.cuCtxGetDevResource(cyhCtx, resource._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), resource) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, resource) {{endif}} {{if 'cuGreenCtxGetDevResource' in found_functions}} @@ -53858,8 +53864,8 @@ def cuGreenCtxGetDevResource(hCtx, typename not None : CUdevResourceType): with nogil: err = cydriver.cuGreenCtxGetDevResource(cyhCtx, resource._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), resource) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, resource) {{endif}} {{if 'cuDevSmResourceSplitByCount' in found_functions}} @@ -53982,8 +53988,8 @@ def cuDevSmResourceSplitByCount(unsigned int nbGroups, input_ : Optional[CUdevRe if cyresult is not NULL: free(cyresult) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None, None) - return (CUresult(err), pyresult, cynbGroups, remainder) + return (_CUresult(err), None, None, None) + return (_CUresult_SUCCESS, pyresult, cynbGroups, remainder) {{endif}} {{if 'cuDevSmResourceSplit' in found_functions}} @@ -54143,8 +54149,8 @@ def cuDevSmResourceSplit(unsigned int nbGroups, input_ : Optional[CUdevResource] if cyresult is not NULL: free(cyresult) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), pyresult, remainder) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, pyresult, remainder) {{endif}} {{if 'cuDevResourceGenerateDesc' in found_functions}} @@ -54211,8 +54217,8 @@ def cuDevResourceGenerateDesc(resources : Optional[tuple[CUdevResource] | list[C if len(resources) > 1 and cyresources is not NULL: free(cyresources) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phDesc) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phDesc) {{endif}} {{if 'cuGreenCtxRecordEvent' in found_functions}} @@ -54267,7 +54273,7 @@ def cuGreenCtxRecordEvent(hCtx, hEvent): cyhCtx = phCtx with nogil: err = cydriver.cuGreenCtxRecordEvent(cyhCtx, cyhEvent) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuGreenCtxWaitEvent' in found_functions}} @@ -54322,7 +54328,7 @@ def cuGreenCtxWaitEvent(hCtx, hEvent): cyhCtx = phCtx with nogil: err = cydriver.cuGreenCtxWaitEvent(cyhCtx, cyhEvent) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuStreamGetGreenCtx' in found_functions}} @@ -54381,8 +54387,8 @@ def cuStreamGetGreenCtx(hStream): with nogil: err = cydriver.cuStreamGetGreenCtx(cyhStream, phCtx._pvt_ptr) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phCtx) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phCtx) {{endif}} {{if 'cuGreenCtxStreamCreate' in found_functions}} @@ -54456,8 +54462,8 @@ def cuGreenCtxStreamCreate(greenCtx, unsigned int flags, int priority): with nogil: err = cydriver.cuGreenCtxStreamCreate(phStream._pvt_ptr, cygreenCtx, flags, priority) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phStream) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phStream) {{endif}} {{if 'cuGreenCtxGetId' in found_functions}} @@ -54500,8 +54506,8 @@ def cuGreenCtxGetId(greenCtx): with nogil: err = cydriver.cuGreenCtxGetId(cygreenCtx, &greenCtxId) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), greenCtxId) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, greenCtxId) {{endif}} {{if 'cuStreamGetDevResource' in found_functions}} @@ -54548,8 +54554,8 @@ def cuStreamGetDevResource(hStream, typename not None : CUdevResourceType): with nogil: err = cydriver.cuStreamGetDevResource(cyhStream, resource._pvt_ptr, cytypename) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), resource) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, resource) {{endif}} {{if 'cuLogsRegisterCallback' in found_functions}} @@ -54612,8 +54618,8 @@ def cuLogsRegisterCallback(callbackFunc, userData): else: m_global._allocated[int(callback_out)] = cbData if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), callback_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, callback_out) {{endif}} {{if 'cuLogsUnregisterCallback' in found_functions}} @@ -54645,7 +54651,7 @@ def cuLogsUnregisterCallback(callback): if err == cydriver.CUDA_SUCCESS: free(m_global._allocated[pcallback]) m_global._allocated.erase(pcallback) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuLogsCurrent' in found_functions}} @@ -54670,8 +54676,8 @@ def cuLogsCurrent(unsigned int flags): with nogil: err = cydriver.cuLogsCurrent(iterator_out._pvt_ptr, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), iterator_out) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, iterator_out) {{endif}} {{if 'cuLogsDumpToFile' in found_functions}} @@ -54714,8 +54720,8 @@ def cuLogsDumpToFile(iterator : Optional[CUlogIterator], char* pathToFile, unsig with nogil: err = cydriver.cuLogsDumpToFile(cyiterator, pathToFile, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), iterator) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, iterator) {{endif}} {{if 'cuLogsDumpToMemory' in found_functions}} @@ -54772,8 +54778,8 @@ def cuLogsDumpToMemory(iterator : Optional[CUlogIterator], char* buffer, size_t with nogil: err = cydriver.cuLogsDumpToMemory(cyiterator, buffer, &size, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), iterator, size) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, iterator, size) {{endif}} {{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}} @@ -54801,8 +54807,8 @@ def cuCheckpointProcessGetRestoreThreadId(int pid): with nogil: err = cydriver.cuCheckpointProcessGetRestoreThreadId(pid, &tid) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), tid) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, tid) {{endif}} {{if 'cuCheckpointProcessGetState' in found_functions}} @@ -54830,8 +54836,8 @@ def cuCheckpointProcessGetState(int pid): with nogil: err = cydriver.cuCheckpointProcessGetState(pid, &state) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), CUprocessState(state)) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, CUprocessState(state)) {{endif}} {{if 'cuCheckpointProcessLock' in found_functions}} @@ -54863,7 +54869,7 @@ def cuCheckpointProcessLock(int pid, args : Optional[CUcheckpointLockArgs]): cdef cydriver.CUcheckpointLockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessLock(pid, cyargs_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCheckpointProcessCheckpoint' in found_functions}} @@ -54894,7 +54900,7 @@ def cuCheckpointProcessCheckpoint(int pid, args : Optional[CUcheckpointCheckpoin cdef cydriver.CUcheckpointCheckpointArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessCheckpoint(pid, cyargs_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCheckpointProcessRestore' in found_functions}} @@ -54935,7 +54941,7 @@ def cuCheckpointProcessRestore(int pid, args : Optional[CUcheckpointRestoreArgs] cdef cydriver.CUcheckpointRestoreArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessRestore(pid, cyargs_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuCheckpointProcessUnlock' in found_functions}} @@ -54964,7 +54970,7 @@ def cuCheckpointProcessUnlock(int pid, args : Optional[CUcheckpointUnlockArgs]): cdef cydriver.CUcheckpointUnlockArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: err = cydriver.cuCheckpointProcessUnlock(pid, cyargs_ptr) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuProfilerStart' in found_functions}} @@ -54992,7 +54998,7 @@ def cuProfilerStart(): """ with nogil: err = cydriver.cuProfilerStart() - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if 'cuProfilerStop' in found_functions}} @@ -55020,7 +55026,7 @@ def cuProfilerStop(): """ with nogil: err = cydriver.cuProfilerStop() - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if True}} @@ -55095,8 +55101,8 @@ def cuGraphicsEGLRegisterImage(image, unsigned int flags): with nogil: err = cydriver.cuGraphicsEGLRegisterImage(pCudaResource._pvt_ptr, cyimage, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pCudaResource) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pCudaResource) {{endif}} {{if True}} @@ -55138,8 +55144,8 @@ def cuEGLStreamConsumerConnect(stream): with nogil: err = cydriver.cuEGLStreamConsumerConnect(conn._pvt_ptr, cystream) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), conn) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, conn) {{endif}} {{if True}} @@ -55185,8 +55191,8 @@ def cuEGLStreamConsumerConnectWithFlags(stream, unsigned int flags): with nogil: err = cydriver.cuEGLStreamConsumerConnectWithFlags(conn._pvt_ptr, cystream, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), conn) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, conn) {{endif}} {{if True}} @@ -55223,7 +55229,7 @@ def cuEGLStreamConsumerDisconnect(conn): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cydriver.cuEGLStreamConsumerDisconnect(cyconn) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if True}} @@ -55295,7 +55301,7 @@ def cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int t raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cydriver.cuEGLStreamConsumerAcquireFrame(cyconn, cypCudaResource, cypStream, timeout) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if True}} @@ -55358,7 +55364,7 @@ def cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cydriver.cuEGLStreamConsumerReleaseFrame(cyconn, cypCudaResource, cypStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if True}} @@ -55420,8 +55426,8 @@ def cuEGLStreamProducerConnect(stream, width, height): with nogil: err = cydriver.cuEGLStreamProducerConnect(conn._pvt_ptr, cystream, cywidth, cyheight) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), conn) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, conn) {{endif}} {{if True}} @@ -55458,7 +55464,7 @@ def cuEGLStreamProducerDisconnect(conn): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cydriver.cuEGLStreamProducerDisconnect(cyconn) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if True}} @@ -55528,7 +55534,7 @@ def cuEGLStreamProducerPresentFrame(conn, eglframe not None : CUeglFrame, pStrea raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cydriver.cuEGLStreamProducerPresentFrame(cyconn, eglframe._pvt_ptr[0], cypStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if True}} @@ -55583,7 +55589,7 @@ def cuEGLStreamProducerReturnFrame(conn, eglframe : Optional[CUeglFrame], pStrea cdef cydriver.CUeglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe is not None else NULL with nogil: err = cydriver.cuEGLStreamProducerReturnFrame(cyconn, cyeglframe_ptr, cypStream) - return (CUresult(err),) + return (_CUresult(err),) {{endif}} {{if True}} @@ -55631,8 +55637,8 @@ def cuGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned i with nogil: err = cydriver.cuGraphicsResourceGetMappedEglFrame(eglFrame._pvt_ptr, cyresource, index, mipLevel) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), eglFrame) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, eglFrame) {{endif}} {{if True}} @@ -55690,8 +55696,8 @@ def cuEventCreateFromEGLSync(eglSync, unsigned int flags): with nogil: err = cydriver.cuEventCreateFromEGLSync(phEvent._pvt_ptr, cyeglSync, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), phEvent) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phEvent) {{endif}} {{if True}} @@ -55747,8 +55753,8 @@ def cuGraphicsGLRegisterBuffer(buffer, unsigned int Flags): with nogil: err = cydriver.cuGraphicsGLRegisterBuffer(pCudaResource._pvt_ptr, cybuffer, Flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pCudaResource) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pCudaResource) {{endif}} {{if True}} @@ -55847,8 +55853,8 @@ def cuGraphicsGLRegisterImage(image, target, unsigned int Flags): with nogil: err = cydriver.cuGraphicsGLRegisterImage(pCudaResource._pvt_ptr, cyimage, cytarget, Flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pCudaResource) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pCudaResource) {{endif}} {{if True}} @@ -55916,8 +55922,8 @@ def cuGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : CUGLDevic if cypCudaDevices is not NULL: free(cypCudaDevices) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None, None) - return (CUresult(err), pCudaDeviceCount, pypCudaDevices) + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, pCudaDeviceCount, pypCudaDevices) {{endif}} {{if True}} @@ -55969,8 +55975,8 @@ def cuVDPAUGetDevice(vdpDevice, vdpGetProcAddress): with nogil: err = cydriver.cuVDPAUGetDevice(pDevice._pvt_ptr, cyvdpDevice, cyvdpGetProcAddress) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pDevice) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pDevice) {{endif}} {{if True}} @@ -56037,8 +56043,8 @@ def cuVDPAUCtxCreate(unsigned int flags, device, vdpDevice, vdpGetProcAddress): with nogil: err = cydriver.cuVDPAUCtxCreate(pCtx._pvt_ptr, flags, cydevice, cyvdpDevice, cyvdpGetProcAddress) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pCtx) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pCtx) {{endif}} {{if True}} @@ -56100,8 +56106,8 @@ def cuGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags): with nogil: err = cydriver.cuGraphicsVDPAURegisterVideoSurface(pCudaResource._pvt_ptr, cyvdpSurface, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pCudaResource) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pCudaResource) {{endif}} {{if True}} @@ -56163,8 +56169,8 @@ def cuGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags): with nogil: err = cydriver.cuGraphicsVDPAURegisterOutputSurface(pCudaResource._pvt_ptr, cyvdpSurface, flags) if err != cydriver.CUDA_SUCCESS: - return (CUresult(err), None) - return (CUresult(err), pCudaResource) + return (_CUresult(err), None) + return (_CUresult_SUCCESS, pCudaResource) {{endif}} diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx.in b/cuda_bindings/cuda/bindings/nvrtc.pyx.in index 9f5949f4b5..3766813b1b 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx.in +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx.in @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE -# This code was automatically generated with version 13.1.0. Do not modify it directly. +# This code was automatically generated with version 13.1.0, generator version 0d24f4f. Do not modify it directly. from typing import Any, Optional import cython import ctypes @@ -89,6 +89,12 @@ class nvrtcResult(_FastEnum): NVRTC_ERROR_TIME_TRACE_FILE_WRITE_FAILED = cynvrtc.nvrtcResult.NVRTC_ERROR_TIME_TRACE_FILE_WRITE_FAILED{{endif}} {{endif}} + +cdef object _nvrtcResult = nvrtcResult +cdef object _nvrtcResult_SUCCESS = nvrtcResult.NVRTC_SUCCESS + + + {{if 'nvrtcProgram' in found_types}} cdef class nvrtcProgram: @@ -171,8 +177,8 @@ def nvrtcVersion(): with nogil: err = cynvrtc.nvrtcVersion(&major, &minor) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None, None) - return (nvrtcResult(err), major, minor) + return (_nvrtcResult(err), None, None) + return (_nvrtcResult_SUCCESS, major, minor) {{endif}} {{if 'nvrtcGetNumSupportedArchs' in found_functions}} @@ -195,8 +201,8 @@ def nvrtcGetNumSupportedArchs(): with nogil: err = cynvrtc.nvrtcGetNumSupportedArchs(&numArchs) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None) - return (nvrtcResult(err), numArchs) + return (_nvrtcResult(err), None) + return (_nvrtcResult_SUCCESS, numArchs) {{endif}} {{if 'nvrtcGetSupportedArchs' in found_functions}} @@ -222,8 +228,8 @@ def nvrtcGetSupportedArchs(): with nogil: err = cynvrtc.nvrtcGetSupportedArchs(supportedArchs.data()) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None) - return (nvrtcResult(err), supportedArchs) + return (_nvrtcResult(err), None) + return (_nvrtcResult_SUCCESS, supportedArchs) {{endif}} {{if 'nvrtcCreateProgram' in found_functions}} @@ -280,8 +286,8 @@ def nvrtcCreateProgram(char* src, char* name, int numHeaders, headers : Optional with nogil: err = cynvrtc.nvrtcCreateProgram(prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None) - return (nvrtcResult(err), prog) + return (_nvrtcResult(err), None) + return (_nvrtcResult_SUCCESS, prog) {{endif}} {{if 'nvrtcDestroyProgram' in found_functions}} @@ -317,7 +323,7 @@ def nvrtcDestroyProgram(prog): raise TypeError("Argument 'prog' is not instance of type (expected , found " + str(type(prog))) with nogil: err = cynvrtc.nvrtcDestroyProgram(cyprog) - return (nvrtcResult(err),) + return (_nvrtcResult(err),) {{endif}} {{if 'nvrtcCompileProgram' in found_functions}} @@ -367,7 +373,7 @@ def nvrtcCompileProgram(prog, int numOptions, options : Optional[tuple[bytes] | cdef vector[const char*] cyoptions = options with nogil: err = cynvrtc.nvrtcCompileProgram(cyprog, numOptions, cyoptions.data()) - return (nvrtcResult(err),) + return (_nvrtcResult(err),) {{endif}} {{if 'nvrtcGetPTXSize' in found_functions}} @@ -406,8 +412,8 @@ def nvrtcGetPTXSize(prog): with nogil: err = cynvrtc.nvrtcGetPTXSize(cyprog, &ptxSizeRet) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None) - return (nvrtcResult(err), ptxSizeRet) + return (_nvrtcResult(err), None) + return (_nvrtcResult_SUCCESS, ptxSizeRet) {{endif}} {{if 'nvrtcGetPTX' in found_functions}} @@ -444,7 +450,7 @@ def nvrtcGetPTX(prog, char* ptx): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetPTX(cyprog, ptx) - return (nvrtcResult(err),) + return (_nvrtcResult(err),) {{endif}} {{if 'nvrtcGetCUBINSize' in found_functions}} @@ -483,8 +489,8 @@ def nvrtcGetCUBINSize(prog): with nogil: err = cynvrtc.nvrtcGetCUBINSize(cyprog, &cubinSizeRet) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None) - return (nvrtcResult(err), cubinSizeRet) + return (_nvrtcResult(err), None) + return (_nvrtcResult_SUCCESS, cubinSizeRet) {{endif}} {{if 'nvrtcGetCUBIN' in found_functions}} @@ -521,7 +527,7 @@ def nvrtcGetCUBIN(prog, char* cubin): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetCUBIN(cyprog, cubin) - return (nvrtcResult(err),) + return (_nvrtcResult(err),) {{endif}} {{if 'nvrtcGetLTOIRSize' in found_functions}} @@ -560,8 +566,8 @@ def nvrtcGetLTOIRSize(prog): with nogil: err = cynvrtc.nvrtcGetLTOIRSize(cyprog, <OIRSizeRet) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None) - return (nvrtcResult(err), LTOIRSizeRet) + return (_nvrtcResult(err), None) + return (_nvrtcResult_SUCCESS, LTOIRSizeRet) {{endif}} {{if 'nvrtcGetLTOIR' in found_functions}} @@ -598,7 +604,7 @@ def nvrtcGetLTOIR(prog, char* LTOIR): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetLTOIR(cyprog, LTOIR) - return (nvrtcResult(err),) + return (_nvrtcResult(err),) {{endif}} {{if 'nvrtcGetOptiXIRSize' in found_functions}} @@ -637,8 +643,8 @@ def nvrtcGetOptiXIRSize(prog): with nogil: err = cynvrtc.nvrtcGetOptiXIRSize(cyprog, &optixirSizeRet) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None) - return (nvrtcResult(err), optixirSizeRet) + return (_nvrtcResult(err), None) + return (_nvrtcResult_SUCCESS, optixirSizeRet) {{endif}} {{if 'nvrtcGetOptiXIR' in found_functions}} @@ -675,7 +681,7 @@ def nvrtcGetOptiXIR(prog, char* optixir): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetOptiXIR(cyprog, optixir) - return (nvrtcResult(err),) + return (_nvrtcResult(err),) {{endif}} {{if 'nvrtcGetProgramLogSize' in found_functions}} @@ -717,8 +723,8 @@ def nvrtcGetProgramLogSize(prog): with nogil: err = cynvrtc.nvrtcGetProgramLogSize(cyprog, &logSizeRet) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None) - return (nvrtcResult(err), logSizeRet) + return (_nvrtcResult(err), None) + return (_nvrtcResult_SUCCESS, logSizeRet) {{endif}} {{if 'nvrtcGetProgramLog' in found_functions}} @@ -755,7 +761,7 @@ def nvrtcGetProgramLog(prog, char* log): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetProgramLog(cyprog, log) - return (nvrtcResult(err),) + return (_nvrtcResult(err),) {{endif}} {{if 'nvrtcAddNameExpression' in found_functions}} @@ -797,7 +803,7 @@ def nvrtcAddNameExpression(prog, char* name_expression): cyprog = pprog with nogil: err = cynvrtc.nvrtcAddNameExpression(cyprog, name_expression) - return (nvrtcResult(err),) + return (_nvrtcResult(err),) {{endif}} {{if 'nvrtcGetLoweredName' in found_functions}} @@ -841,8 +847,8 @@ def nvrtcGetLoweredName(prog, char* name_expression): with nogil: err = cynvrtc.nvrtcGetLoweredName(cyprog, name_expression, &lowered_name) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None) - return (nvrtcResult(err), lowered_name if lowered_name != NULL else None) + return (_nvrtcResult(err), None) + return (_nvrtcResult_SUCCESS, lowered_name if lowered_name != NULL else None) {{endif}} {{if 'nvrtcGetPCHHeapSize' in found_functions}} @@ -863,8 +869,8 @@ def nvrtcGetPCHHeapSize(): with nogil: err = cynvrtc.nvrtcGetPCHHeapSize(&ret) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None) - return (nvrtcResult(err), ret) + return (_nvrtcResult(err), None) + return (_nvrtcResult_SUCCESS, ret) {{endif}} {{if 'nvrtcSetPCHHeapSize' in found_functions}} @@ -889,7 +895,7 @@ def nvrtcSetPCHHeapSize(size_t size): """ with nogil: err = cynvrtc.nvrtcSetPCHHeapSize(size) - return (nvrtcResult(err),) + return (_nvrtcResult(err),) {{endif}} {{if 'nvrtcGetPCHCreateStatus' in found_functions}} @@ -937,7 +943,7 @@ def nvrtcGetPCHCreateStatus(prog): cyprog = pprog with nogil: err = cynvrtc.nvrtcGetPCHCreateStatus(cyprog) - return (nvrtcResult(err),) + return (_nvrtcResult(err),) {{endif}} {{if 'nvrtcGetPCHHeapSizeRequired' in found_functions}} @@ -973,8 +979,8 @@ def nvrtcGetPCHHeapSizeRequired(prog): with nogil: err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size) if err != cynvrtc.NVRTC_SUCCESS: - return (nvrtcResult(err), None) - return (nvrtcResult(err), size) + return (_nvrtcResult(err), None) + return (_nvrtcResult_SUCCESS, size) {{endif}} {{if 'nvrtcSetFlowCallback' in found_functions}} @@ -1035,7 +1041,7 @@ def nvrtcSetFlowCallback(prog, callback, payload): cdef void* cypayload_ptr = cypayload.cptr with nogil: err = cynvrtc.nvrtcSetFlowCallback(cyprog, cycallback_ptr, cypayload_ptr) - return (nvrtcResult(err),) + return (_nvrtcResult(err),) {{endif}} @cython.embedsignature(True) diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index fac1de4ff9..3fab3b7afc 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -1,7 +1,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE -# This code was automatically generated with version 13.1.0. Do not modify it directly. +# This code was automatically generated with version 13.1.0, generator version 0d24f4f. Do not modify it directly. from typing import Any, Optional import cython import ctypes @@ -6258,6 +6258,12 @@ class cudaGLMapFlags(_FastEnum): ){{endif}} {{endif}} + +cdef object _cudaError_t = cudaError_t +cdef object _cudaError_t_SUCCESS = cudaError_t.cudaSuccess + + + {{if 'cudaLaunchAttributeID' in found_types}} class cudaStreamAttrID(_FastEnum): @@ -20592,7 +20598,7 @@ def cudaDeviceReset(): """ with nogil: err = cyruntime.cudaDeviceReset() - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceSynchronize' in found_functions}} @@ -20619,7 +20625,7 @@ def cudaDeviceSynchronize(): """ with nogil: err = cyruntime.cudaDeviceSynchronize() - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceSetLimit' in found_functions}} @@ -20722,7 +20728,7 @@ def cudaDeviceSetLimit(limit not None : cudaLimit, size_t value): cdef cyruntime.cudaLimit cylimit = int(limit) with nogil: err = cyruntime.cudaDeviceSetLimit(cylimit, value) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetLimit' in found_functions}} @@ -20781,8 +20787,8 @@ def cudaDeviceGetLimit(limit not None : cudaLimit): with nogil: err = cyruntime.cudaDeviceGetLimit(&pValue, cylimit) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pValue) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pValue) {{endif}} {{if 'cudaDeviceGetTexture1DLinearMaxWidth' in found_functions}} @@ -20819,8 +20825,8 @@ def cudaDeviceGetTexture1DLinearMaxWidth(fmtDesc : Optional[cudaChannelFormatDes with nogil: err = cyruntime.cudaDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cyfmtDesc_ptr, device) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), maxWidthInElements) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, maxWidthInElements) {{endif}} {{if 'cudaDeviceGetCacheConfig' in found_functions}} @@ -20869,8 +20875,8 @@ def cudaDeviceGetCacheConfig(): with nogil: err = cyruntime.cudaDeviceGetCacheConfig(&pCacheConfig) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), cudaFuncCache(pCacheConfig)) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, cudaFuncCache(pCacheConfig)) {{endif}} {{if 'cudaDeviceGetStreamPriorityRange' in found_functions}} @@ -20916,8 +20922,8 @@ def cudaDeviceGetStreamPriorityRange(): with nogil: err = cyruntime.cudaDeviceGetStreamPriorityRange(&leastPriority, &greatestPriority) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), leastPriority, greatestPriority) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, leastPriority, greatestPriority) {{endif}} {{if 'cudaDeviceSetCacheConfig' in found_functions}} @@ -20975,7 +20981,7 @@ def cudaDeviceSetCacheConfig(cacheConfig not None : cudaFuncCache): cdef cyruntime.cudaFuncCache cycacheConfig = int(cacheConfig) with nogil: err = cyruntime.cudaDeviceSetCacheConfig(cycacheConfig) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetByPCIBusId' in found_functions}} @@ -21009,8 +21015,8 @@ def cudaDeviceGetByPCIBusId(char* pciBusId): with nogil: err = cyruntime.cudaDeviceGetByPCIBusId(&device, pciBusId) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), device) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, device) {{endif}} {{if 'cudaDeviceGetPCIBusId' in found_functions}} @@ -21050,8 +21056,8 @@ def cudaDeviceGetPCIBusId(int length, int device): with nogil: err = cyruntime.cudaDeviceGetPCIBusId(pciBusId, length, device) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pypciBusId) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pypciBusId) {{endif}} {{if 'cudaIpcGetEventHandle' in found_functions}} @@ -21111,8 +21117,8 @@ def cudaIpcGetEventHandle(event): with nogil: err = cyruntime.cudaIpcGetEventHandle(handle._pvt_ptr, cyevent) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), handle) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, handle) {{endif}} {{if 'cudaIpcOpenEventHandle' in found_functions}} @@ -21158,8 +21164,8 @@ def cudaIpcOpenEventHandle(handle not None : cudaIpcEventHandle_t): with nogil: err = cyruntime.cudaIpcOpenEventHandle(event._pvt_ptr, handle._pvt_ptr[0]) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), event) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, event) {{endif}} {{if 'cudaIpcGetMemHandle' in found_functions}} @@ -21208,8 +21214,8 @@ def cudaIpcGetMemHandle(devPtr): with nogil: err = cyruntime.cudaIpcGetMemHandle(handle._pvt_ptr, cydevPtr_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), handle) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, handle) {{endif}} {{if 'cudaIpcOpenMemHandle' in found_functions}} @@ -21281,8 +21287,8 @@ def cudaIpcOpenMemHandle(handle not None : cudaIpcMemHandle_t, unsigned int flag with nogil: err = cyruntime.cudaIpcOpenMemHandle(&devPtr, handle._pvt_ptr[0], flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), devPtr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, devPtr) {{endif}} {{if 'cudaIpcCloseMemHandle' in found_functions}} @@ -21325,7 +21331,7 @@ def cudaIpcCloseMemHandle(devPtr): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaIpcCloseMemHandle(cydevPtr_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceFlushGPUDirectRDMAWrites' in found_functions}} @@ -21368,7 +21374,7 @@ def cudaDeviceFlushGPUDirectRDMAWrites(target not None : cudaFlushGPUDirectRDMAW cdef cyruntime.cudaFlushGPUDirectRDMAWritesScope cyscope = int(scope) with nogil: err = cyruntime.cudaDeviceFlushGPUDirectRDMAWrites(cytarget, cyscope) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceRegisterAsyncNotification' in found_functions}} @@ -21454,8 +21460,8 @@ def cudaDeviceRegisterAsyncNotification(int device, callbackFunc, userData): else: m_global._allocated[int(callback)] = cbData if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), callback) + return (_cudaError_t(err), None) + return (_cudaError_t(err), callback) {{endif}} {{if 'cudaDeviceUnregisterAsyncNotification' in found_functions}} @@ -21497,7 +21503,7 @@ def cudaDeviceUnregisterAsyncNotification(int device, callback): if err == cyruntime.cudaSuccess: free(m_global._allocated[pcallback]) m_global._allocated.erase(pcallback) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetSharedMemConfig' in found_functions}} @@ -21540,8 +21546,8 @@ def cudaDeviceGetSharedMemConfig(): with nogil: err = cyruntime.cudaDeviceGetSharedMemConfig(&pConfig) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), cudaSharedMemConfig(pConfig)) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, cudaSharedMemConfig(pConfig)) {{endif}} {{if 'cudaDeviceSetSharedMemConfig' in found_functions}} @@ -21598,7 +21604,7 @@ def cudaDeviceSetSharedMemConfig(config not None : cudaSharedMemConfig): cdef cyruntime.cudaSharedMemConfig cyconfig = int(config) with nogil: err = cyruntime.cudaDeviceSetSharedMemConfig(cyconfig) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGetLastError' in found_functions}} @@ -21626,7 +21632,7 @@ def cudaGetLastError(): """ with nogil: err = cyruntime.cudaGetLastError() - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaPeekAtLastError' in found_functions}} @@ -21655,7 +21661,7 @@ def cudaPeekAtLastError(): """ with nogil: err = cyruntime.cudaPeekAtLastError() - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGetErrorName' in found_functions}} @@ -21746,8 +21752,8 @@ def cudaGetDeviceCount(): with nogil: err = cyruntime.cudaGetDeviceCount(&count) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), count) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, count) {{endif}} {{if 'cudaGetDeviceProperties' in found_functions}} @@ -21778,8 +21784,8 @@ def cudaGetDeviceProperties(int device): with nogil: err = cyruntime.cudaGetDeviceProperties(prop._pvt_ptr, device) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), prop) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, prop) {{endif}} {{if 'cudaDeviceGetAttribute' in found_functions}} @@ -21814,8 +21820,8 @@ def cudaDeviceGetAttribute(attr not None : cudaDeviceAttr, int device): with nogil: err = cyruntime.cudaDeviceGetAttribute(&value, cyattr, device) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), value) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, value) {{endif}} {{if 'cudaDeviceGetHostAtomicCapabilities' in found_functions}} @@ -21877,8 +21883,8 @@ def cudaDeviceGetHostAtomicCapabilities(operations : Optional[tuple[cudaAtomicOp if cycapabilities is not NULL: free(cycapabilities) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pycapabilities) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pycapabilities) {{endif}} {{if 'cudaDeviceGetDefaultMemPool' in found_functions}} @@ -21910,8 +21916,8 @@ def cudaDeviceGetDefaultMemPool(int device): with nogil: err = cyruntime.cudaDeviceGetDefaultMemPool(memPool._pvt_ptr, device) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), memPool) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, memPool) {{endif}} {{if 'cudaDeviceSetMemPool' in found_functions}} @@ -21956,7 +21962,7 @@ def cudaDeviceSetMemPool(int device, memPool): cymemPool = pmemPool with nogil: err = cyruntime.cudaDeviceSetMemPool(device, cymemPool) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetMemPool' in found_functions}} @@ -21992,8 +21998,8 @@ def cudaDeviceGetMemPool(int device): with nogil: err = cyruntime.cudaDeviceGetMemPool(memPool._pvt_ptr, device) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), memPool) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, memPool) {{endif}} {{if 'cudaDeviceGetNvSciSyncAttributes' in found_functions}} @@ -22079,7 +22085,7 @@ def cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, int device, int flags): cdef void* cynvSciSyncAttrList_ptr = cynvSciSyncAttrList.cptr with nogil: err = cyruntime.cudaDeviceGetNvSciSyncAttributes(cynvSciSyncAttrList_ptr, device, flags) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetP2PAttribute' in found_functions}} @@ -22143,8 +22149,8 @@ def cudaDeviceGetP2PAttribute(attr not None : cudaDeviceP2PAttr, int srcDevice, with nogil: err = cyruntime.cudaDeviceGetP2PAttribute(&value, cyattr, srcDevice, dstDevice) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), value) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, value) {{endif}} {{if 'cudaDeviceGetP2PAtomicCapabilities' in found_functions}} @@ -22210,8 +22216,8 @@ def cudaDeviceGetP2PAtomicCapabilities(operations : Optional[tuple[cudaAtomicOpe if cycapabilities is not NULL: free(cycapabilities) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pycapabilities) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pycapabilities) {{endif}} {{if 'cudaChooseDevice' in found_functions}} @@ -22244,8 +22250,8 @@ def cudaChooseDevice(prop : Optional[cudaDeviceProp]): with nogil: err = cyruntime.cudaChooseDevice(&device, cyprop_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), device) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, device) {{endif}} {{if 'cudaInitDevice' in found_functions}} @@ -22288,7 +22294,7 @@ def cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags): """ with nogil: err = cyruntime.cudaInitDevice(device, deviceFlags, flags) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaSetDevice' in found_functions}} @@ -22344,7 +22350,7 @@ def cudaSetDevice(int device): """ with nogil: err = cyruntime.cudaSetDevice(device) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGetDevice' in found_functions}} @@ -22371,8 +22377,8 @@ def cudaGetDevice(): with nogil: err = cyruntime.cudaGetDevice(&device) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), device) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, device) {{endif}} {{if 'cudaSetDeviceFlags' in found_functions}} @@ -22459,7 +22465,7 @@ def cudaSetDeviceFlags(unsigned int flags): """ with nogil: err = cyruntime.cudaSetDeviceFlags(flags) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGetDeviceFlags' in found_functions}} @@ -22508,8 +22514,8 @@ def cudaGetDeviceFlags(): with nogil: err = cyruntime.cudaGetDeviceFlags(&flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), flags) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, flags) {{endif}} {{if 'cudaStreamCreate' in found_functions}} @@ -22538,8 +22544,8 @@ def cudaStreamCreate(): with nogil: err = cyruntime.cudaStreamCreate(pStream._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pStream) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pStream) {{endif}} {{if 'cudaStreamCreateWithFlags' in found_functions}} @@ -22582,8 +22588,8 @@ def cudaStreamCreateWithFlags(unsigned int flags): with nogil: err = cyruntime.cudaStreamCreateWithFlags(pStream._pvt_ptr, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pStream) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pStream) {{endif}} {{if 'cudaStreamCreateWithPriority' in found_functions}} @@ -22643,8 +22649,8 @@ def cudaStreamCreateWithPriority(unsigned int flags, int priority): with nogil: err = cyruntime.cudaStreamCreateWithPriority(pStream._pvt_ptr, flags, priority) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pStream) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pStream) {{endif}} {{if 'cudaStreamGetPriority' in found_functions}} @@ -22689,8 +22695,8 @@ def cudaStreamGetPriority(hStream): with nogil: err = cyruntime.cudaStreamGetPriority(cyhStream, &priority) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), priority) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, priority) {{endif}} {{if 'cudaStreamGetFlags' in found_functions}} @@ -22731,8 +22737,8 @@ def cudaStreamGetFlags(hStream): with nogil: err = cyruntime.cudaStreamGetFlags(cyhStream, &flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), flags) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, flags) {{endif}} {{if 'cudaStreamGetId' in found_functions}} @@ -22787,8 +22793,8 @@ def cudaStreamGetId(hStream): with nogil: err = cyruntime.cudaStreamGetId(cyhStream, &streamId) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), streamId) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, streamId) {{endif}} {{if 'cudaStreamGetDevice' in found_functions}} @@ -22827,8 +22833,8 @@ def cudaStreamGetDevice(hStream): with nogil: err = cyruntime.cudaStreamGetDevice(cyhStream, &device) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), device) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, device) {{endif}} {{if 'cudaCtxResetPersistingL2Cache' in found_functions}} @@ -22851,7 +22857,7 @@ def cudaCtxResetPersistingL2Cache(): """ with nogil: err = cyruntime.cudaCtxResetPersistingL2Cache() - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaStreamCopyAttributes' in found_functions}} @@ -22897,7 +22903,7 @@ def cudaStreamCopyAttributes(dst, src): cydst = pdst with nogil: err = cyruntime.cudaStreamCopyAttributes(cydst, cysrc) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaStreamGetAttribute' in found_functions}} @@ -22940,8 +22946,8 @@ def cudaStreamGetAttribute(hStream, attr not None : cudaStreamAttrID): with nogil: err = cyruntime.cudaStreamGetAttribute(cyhStream, cyattr, value_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), value_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, value_out) {{endif}} {{if 'cudaStreamSetAttribute' in found_functions}} @@ -22984,7 +22990,7 @@ def cudaStreamSetAttribute(hStream, attr not None : cudaStreamAttrID, value : Op cdef cyruntime.cudaStreamAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cyruntime.cudaStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaStreamDestroy' in found_functions}} @@ -23024,7 +23030,7 @@ def cudaStreamDestroy(stream): cystream = pstream with nogil: err = cyruntime.cudaStreamDestroy(cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaStreamWaitEvent' in found_functions}} @@ -23082,7 +23088,7 @@ def cudaStreamWaitEvent(stream, event, unsigned int flags): cystream = pstream with nogil: err = cyruntime.cudaStreamWaitEvent(cystream, cyevent, flags) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaStreamAddCallback' in found_functions}} @@ -23199,7 +23205,7 @@ def cudaStreamAddCallback(stream, callback, userData, unsigned int flags): err = cyruntime.cudaStreamAddCallback(cystream, cudaStreamRtCallbackWrapper, cbData, flags) if err != cyruntime.cudaSuccess: free(cbData) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaStreamSynchronize' in found_functions}} @@ -23237,7 +23243,7 @@ def cudaStreamSynchronize(stream): cystream = pstream with nogil: err = cyruntime.cudaStreamSynchronize(cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaStreamQuery' in found_functions}} @@ -23277,7 +23283,7 @@ def cudaStreamQuery(stream): cystream = pstream with nogil: err = cyruntime.cudaStreamQuery(cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaStreamAttachMemAsync' in found_functions}} @@ -23388,7 +23394,7 @@ def cudaStreamAttachMemAsync(stream, devPtr, size_t length, unsigned int flags): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaStreamAttachMemAsync(cystream, cydevPtr_ptr, length, flags) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaStreamBeginCapture' in found_functions}} @@ -23445,7 +23451,7 @@ def cudaStreamBeginCapture(stream, mode not None : cudaStreamCaptureMode): cdef cyruntime.cudaStreamCaptureMode cymode = int(mode) with nogil: err = cyruntime.cudaStreamBeginCapture(cystream, cymode) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaStreamBeginCaptureToGraph' in found_functions}} @@ -23550,7 +23556,7 @@ def cudaStreamBeginCaptureToGraph(stream, graph, dependencies : Optional[tuple[c free(cydependencies) if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaThreadExchangeStreamCaptureMode' in found_functions}} @@ -23623,8 +23629,8 @@ def cudaThreadExchangeStreamCaptureMode(mode not None : cudaStreamCaptureMode): with nogil: err = cyruntime.cudaThreadExchangeStreamCaptureMode(&cymode) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), cudaStreamCaptureMode(cymode)) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, cudaStreamCaptureMode(cymode)) {{endif}} {{if 'cudaStreamEndCapture' in found_functions}} @@ -23671,8 +23677,8 @@ def cudaStreamEndCapture(stream): with nogil: err = cyruntime.cudaStreamEndCapture(cystream, pGraph._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraph) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraph) {{endif}} {{if 'cudaStreamIsCapturing' in found_functions}} @@ -23733,8 +23739,8 @@ def cudaStreamIsCapturing(stream): with nogil: err = cyruntime.cudaStreamIsCapturing(cystream, &pCaptureStatus) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), cudaStreamCaptureStatus(pCaptureStatus)) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, cudaStreamCaptureStatus(pCaptureStatus)) {{endif}} {{if 'cudaStreamGetCaptureInfo' in found_functions}} @@ -23833,8 +23839,8 @@ def cudaStreamGetCaptureInfo(stream): if cudaError_t(err) == cudaError_t(0): pyedgeData_out = [cudaGraphEdgeData(_ptr=&cyedgeData_out[idx]) for idx in range(numDependencies_out)] if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None, None, None, None, None) - return (cudaError_t(err), cudaStreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, pyedgeData_out, numDependencies_out) + return (_cudaError_t(err), None, None, None, None, None, None) + return (_cudaError_t_SUCCESS, cudaStreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, pyedgeData_out, numDependencies_out) {{endif}} {{if 'cudaStreamUpdateCaptureDependencies' in found_functions}} @@ -23921,7 +23927,7 @@ def cudaStreamUpdateCaptureDependencies(stream, dependencies : Optional[tuple[cu free(cydependencies) if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaEventCreate' in found_functions}} @@ -23948,8 +23954,8 @@ def cudaEventCreate(): with nogil: err = cyruntime.cudaEventCreate(event._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), event) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, event) {{endif}} {{if 'cudaEventCreateWithFlags' in found_functions}} @@ -24000,8 +24006,8 @@ def cudaEventCreateWithFlags(unsigned int flags): with nogil: err = cyruntime.cudaEventCreateWithFlags(event._pvt_ptr, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), event) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, event) {{endif}} {{if 'cudaEventRecord' in found_functions}} @@ -24060,7 +24066,7 @@ def cudaEventRecord(event, stream): cyevent = pevent with nogil: err = cyruntime.cudaEventRecord(cyevent, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaEventRecordWithFlags' in found_functions}} @@ -24128,7 +24134,7 @@ def cudaEventRecordWithFlags(event, stream, unsigned int flags): cyevent = pevent with nogil: err = cyruntime.cudaEventRecordWithFlags(cyevent, cystream, flags) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaEventQuery' in found_functions}} @@ -24173,7 +24179,7 @@ def cudaEventQuery(event): cyevent = pevent with nogil: err = cyruntime.cudaEventQuery(cyevent) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaEventSynchronize' in found_functions}} @@ -24217,7 +24223,7 @@ def cudaEventSynchronize(event): cyevent = pevent with nogil: err = cyruntime.cudaEventSynchronize(cyevent) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaEventDestroy' in found_functions}} @@ -24258,7 +24264,7 @@ def cudaEventDestroy(event): cyevent = pevent with nogil: err = cyruntime.cudaEventDestroy(cyevent) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaEventElapsedTime' in found_functions}} @@ -24330,8 +24336,8 @@ def cudaEventElapsedTime(start, end): with nogil: err = cyruntime.cudaEventElapsedTime(&ms, cystart, cyend) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), ms) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, ms) {{endif}} {{if 'cudaImportExternalMemory' in found_functions}} @@ -24484,8 +24490,8 @@ def cudaImportExternalMemory(memHandleDesc : Optional[cudaExternalMemoryHandleDe with nogil: err = cyruntime.cudaImportExternalMemory(extMem_out._pvt_ptr, cymemHandleDesc_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), extMem_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, extMem_out) {{endif}} {{if 'cudaExternalMemoryGetMappedBuffer' in found_functions}} @@ -24552,8 +24558,8 @@ def cudaExternalMemoryGetMappedBuffer(extMem, bufferDesc : Optional[cudaExternal with nogil: err = cyruntime.cudaExternalMemoryGetMappedBuffer(&devPtr, cyextMem, cybufferDesc_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), devPtr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, devPtr) {{endif}} {{if 'cudaExternalMemoryGetMappedMipmappedArray' in found_functions}} @@ -24624,8 +24630,8 @@ def cudaExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : Optional[cuda with nogil: err = cyruntime.cudaExternalMemoryGetMappedMipmappedArray(mipmap._pvt_ptr, cyextMem, cymipmapDesc_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), mipmap) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, mipmap) {{endif}} {{if 'cudaDestroyExternalMemory' in found_functions}} @@ -24663,7 +24669,7 @@ def cudaDestroyExternalMemory(extMem): cyextMem = pextMem with nogil: err = cyruntime.cudaDestroyExternalMemory(cyextMem) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaImportExternalSemaphore' in found_functions}} @@ -24811,8 +24817,8 @@ def cudaImportExternalSemaphore(semHandleDesc : Optional[cudaExternalSemaphoreHa with nogil: err = cyruntime.cudaImportExternalSemaphore(extSem_out._pvt_ptr, cysemHandleDesc_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), extSem_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, extSem_out) {{endif}} {{if 'cudaSignalExternalSemaphoresAsync' in found_functions}} @@ -24968,7 +24974,7 @@ def cudaSignalExternalSemaphoresAsync(extSemArray : Optional[tuple[cudaExternalS free(cyextSemArray) if len(paramsArray) > 1 and cyparamsArray is not NULL: free(cyparamsArray) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaWaitExternalSemaphoresAsync' in found_functions}} @@ -25097,7 +25103,7 @@ def cudaWaitExternalSemaphoresAsync(extSemArray : Optional[tuple[cudaExternalSem free(cyextSemArray) if len(paramsArray) > 1 and cyparamsArray is not NULL: free(cyparamsArray) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDestroyExternalSemaphore' in found_functions}} @@ -25134,7 +25140,7 @@ def cudaDestroyExternalSemaphore(extSem): cyextSem = pextSem with nogil: err = cyruntime.cudaDestroyExternalSemaphore(cyextSem) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaFuncSetCacheConfig' in found_functions}} @@ -25201,7 +25207,7 @@ def cudaFuncSetCacheConfig(func, cacheConfig not None : cudaFuncCache): cdef cyruntime.cudaFuncCache cycacheConfig = int(cacheConfig) with nogil: err = cyruntime.cudaFuncSetCacheConfig(cyfunc_ptr, cycacheConfig) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaFuncGetAttributes' in found_functions}} @@ -25244,8 +25250,8 @@ def cudaFuncGetAttributes(func): with nogil: err = cyruntime.cudaFuncGetAttributes(attr._pvt_ptr, cyfunc_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), attr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, attr) {{endif}} {{if 'cudaFuncSetAttribute' in found_functions}} @@ -25331,7 +25337,7 @@ def cudaFuncSetAttribute(func, attr not None : cudaFuncAttribute, int value): cdef cyruntime.cudaFuncAttribute cyattr = int(attr) with nogil: err = cyruntime.cudaFuncSetAttribute(cyfunc_ptr, cyattr, value) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaLaunchHostFunc' in found_functions}} @@ -25441,7 +25447,7 @@ def cudaLaunchHostFunc(stream, fn, userData): err = cyruntime.cudaLaunchHostFunc(cystream, cudaStreamRtHostCallbackWrapper, cbData) if err != cyruntime.cudaSuccess: free(cbData) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaFuncSetSharedMemConfig' in found_functions}} @@ -25509,7 +25515,7 @@ def cudaFuncSetSharedMemConfig(func, config not None : cudaSharedMemConfig): cdef cyruntime.cudaSharedMemConfig cyconfig = int(config) with nogil: err = cyruntime.cudaFuncSetSharedMemConfig(cyfunc_ptr, cyconfig) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaOccupancyMaxActiveBlocksPerMultiprocessor' in found_functions}} @@ -25547,8 +25553,8 @@ def cudaOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dy with nogil: err = cyruntime.cudaOccupancyMaxActiveBlocksPerMultiprocessor(&numBlocks, cyfunc_ptr, blockSize, dynamicSMemSize) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), numBlocks) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, numBlocks) {{endif}} {{if 'cudaOccupancyAvailableDynamicSMemPerBlock' in found_functions}} @@ -25586,8 +25592,8 @@ def cudaOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize with nogil: err = cyruntime.cudaOccupancyAvailableDynamicSMemPerBlock(&dynamicSmemSize, cyfunc_ptr, numBlocks, blockSize) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), dynamicSmemSize) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, dynamicSmemSize) {{endif}} {{if 'cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' in found_functions}} @@ -25642,8 +25648,8 @@ def cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, with nogil: err = cyruntime.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(&numBlocks, cyfunc_ptr, blockSize, dynamicSMemSize, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), numBlocks) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, numBlocks) {{endif}} {{if 'cudaMallocManaged' in found_functions}} @@ -25776,8 +25782,8 @@ def cudaMallocManaged(size_t size, unsigned int flags): with nogil: err = cyruntime.cudaMallocManaged(&devPtr, size, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), devPtr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, devPtr) {{endif}} {{if 'cudaMalloc' in found_functions}} @@ -25815,8 +25821,8 @@ def cudaMalloc(size_t size): with nogil: err = cyruntime.cudaMalloc(&devPtr, size) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), devPtr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, devPtr) {{endif}} {{if 'cudaMallocHost' in found_functions}} @@ -25863,8 +25869,8 @@ def cudaMallocHost(size_t size): with nogil: err = cyruntime.cudaMallocHost(&ptr, size) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), ptr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, ptr) {{endif}} {{if 'cudaMallocPitch' in found_functions}} @@ -25919,8 +25925,8 @@ def cudaMallocPitch(size_t width, size_t height): with nogil: err = cyruntime.cudaMallocPitch(&devPtr, &pitch, width, height) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), devPtr, pitch) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, devPtr, pitch) {{endif}} {{if 'cudaMallocArray' in found_functions}} @@ -25996,8 +26002,8 @@ def cudaMallocArray(desc : Optional[cudaChannelFormatDesc], size_t width, size_t with nogil: err = cyruntime.cudaMallocArray(array._pvt_ptr, cydesc_ptr, width, height, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), array) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, array) {{endif}} {{if 'cudaFree' in found_functions}} @@ -26047,7 +26053,7 @@ def cudaFree(devPtr): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaFree(cydevPtr_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaFreeHost' in found_functions}} @@ -26078,7 +26084,7 @@ def cudaFreeHost(ptr): cdef void* cyptr_ptr = cyptr.cptr with nogil: err = cyruntime.cudaFreeHost(cyptr_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaFreeArray' in found_functions}} @@ -26115,7 +26121,7 @@ def cudaFreeArray(array): cyarray = parray with nogil: err = cyruntime.cudaFreeArray(cyarray) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaFreeMipmappedArray' in found_functions}} @@ -26152,7 +26158,7 @@ def cudaFreeMipmappedArray(mipmappedArray): cymipmappedArray = pmipmappedArray with nogil: err = cyruntime.cudaFreeMipmappedArray(cymipmappedArray) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaHostAlloc' in found_functions}} @@ -26236,8 +26242,8 @@ def cudaHostAlloc(size_t size, unsigned int flags): with nogil: err = cyruntime.cudaHostAlloc(&pHost, size, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pHost) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pHost) {{endif}} {{if 'cudaHostRegister' in found_functions}} @@ -26354,7 +26360,7 @@ def cudaHostRegister(ptr, size_t size, unsigned int flags): cdef void* cyptr_ptr = cyptr.cptr with nogil: err = cyruntime.cudaHostRegister(cyptr_ptr, size, flags) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaHostUnregister' in found_functions}} @@ -26387,7 +26393,7 @@ def cudaHostUnregister(ptr): cdef void* cyptr_ptr = cyptr.cptr with nogil: err = cyruntime.cudaHostUnregister(cyptr_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaHostGetDevicePointer' in found_functions}} @@ -26448,8 +26454,8 @@ def cudaHostGetDevicePointer(pHost, unsigned int flags): with nogil: err = cyruntime.cudaHostGetDevicePointer(&pDevice, cypHost_ptr, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pDevice) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pDevice) {{endif}} {{if 'cudaHostGetFlags' in found_functions}} @@ -26483,8 +26489,8 @@ def cudaHostGetFlags(pHost): with nogil: err = cyruntime.cudaHostGetFlags(&pFlags, cypHost_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pFlags) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pFlags) {{endif}} {{if 'cudaMalloc3D' in found_functions}} @@ -26532,8 +26538,8 @@ def cudaMalloc3D(extent not None : cudaExtent): with nogil: err = cyruntime.cudaMalloc3D(pitchedDevPtr._pvt_ptr, extent._pvt_ptr[0]) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pitchedDevPtr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pitchedDevPtr) {{endif}} {{if 'cudaMalloc3DArray' in found_functions}} @@ -26655,8 +26661,8 @@ def cudaMalloc3DArray(desc : Optional[cudaChannelFormatDesc], extent not None : with nogil: err = cyruntime.cudaMalloc3DArray(array._pvt_ptr, cydesc_ptr, extent._pvt_ptr[0], flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), array) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, array) {{endif}} {{if 'cudaMallocMipmappedArray' in found_functions}} @@ -26781,8 +26787,8 @@ def cudaMallocMipmappedArray(desc : Optional[cudaChannelFormatDesc], extent not with nogil: err = cyruntime.cudaMallocMipmappedArray(mipmappedArray._pvt_ptr, cydesc_ptr, extent._pvt_ptr[0], numLevels, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), mipmappedArray) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, mipmappedArray) {{endif}} {{if 'cudaGetMipmappedArrayLevel' in found_functions}} @@ -26830,8 +26836,8 @@ def cudaGetMipmappedArrayLevel(mipmappedArray, unsigned int level): with nogil: err = cyruntime.cudaGetMipmappedArrayLevel(levelArray._pvt_ptr, cymipmappedArray, level) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), levelArray) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, levelArray) {{endif}} {{if 'cudaMemcpy3D' in found_functions}} @@ -26915,7 +26921,7 @@ def cudaMemcpy3D(p : Optional[cudaMemcpy3DParms]): cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p is not None else NULL with nogil: err = cyruntime.cudaMemcpy3D(cyp_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpy3DPeer' in found_functions}} @@ -26952,7 +26958,7 @@ def cudaMemcpy3DPeer(p : Optional[cudaMemcpy3DPeerParms]): cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p is not None else NULL with nogil: err = cyruntime.cudaMemcpy3DPeer(cyp_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpy3DAsync' in found_functions}} @@ -27057,7 +27063,7 @@ def cudaMemcpy3DAsync(p : Optional[cudaMemcpy3DParms], stream): cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p is not None else NULL with nogil: err = cyruntime.cudaMemcpy3DAsync(cyp_ptr, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpy3DPeerAsync' in found_functions}} @@ -27097,7 +27103,7 @@ def cudaMemcpy3DPeerAsync(p : Optional[cudaMemcpy3DPeerParms], stream): cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p is not None else NULL with nogil: err = cyruntime.cudaMemcpy3DPeerAsync(cyp_ptr, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemGetInfo' in found_functions}} @@ -27141,8 +27147,8 @@ def cudaMemGetInfo(): with nogil: err = cyruntime.cudaMemGetInfo(&free, &total) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), free, total) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, free, total) {{endif}} {{if 'cudaArrayGetInfo' in found_functions}} @@ -27190,8 +27196,8 @@ def cudaArrayGetInfo(array): with nogil: err = cyruntime.cudaArrayGetInfo(desc._pvt_ptr, extent._pvt_ptr, &flags, cyarray) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None, None) - return (cudaError_t(err), desc, extent, flags) + return (_cudaError_t(err), None, None, None) + return (_cudaError_t_SUCCESS, desc, extent, flags) {{endif}} {{if 'cudaArrayGetPlane' in found_functions}} @@ -27246,8 +27252,8 @@ def cudaArrayGetPlane(hArray, unsigned int planeIdx): with nogil: err = cyruntime.cudaArrayGetPlane(pPlaneArray._pvt_ptr, cyhArray, planeIdx) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pPlaneArray) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pPlaneArray) {{endif}} {{if 'cudaArrayGetMemoryRequirements' in found_functions}} @@ -27296,8 +27302,8 @@ def cudaArrayGetMemoryRequirements(array, int device): with nogil: err = cyruntime.cudaArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cyarray, device) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), memoryRequirements) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, memoryRequirements) {{endif}} {{if 'cudaMipmappedArrayGetMemoryRequirements' in found_functions}} @@ -27346,8 +27352,8 @@ def cudaMipmappedArrayGetMemoryRequirements(mipmap, int device): with nogil: err = cyruntime.cudaMipmappedArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cymipmap, device) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), memoryRequirements) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, memoryRequirements) {{endif}} {{if 'cudaArrayGetSparseProperties' in found_functions}} @@ -27402,8 +27408,8 @@ def cudaArrayGetSparseProperties(array): with nogil: err = cyruntime.cudaArrayGetSparseProperties(sparseProperties._pvt_ptr, cyarray) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), sparseProperties) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, sparseProperties) {{endif}} {{if 'cudaMipmappedArrayGetSparseProperties' in found_functions}} @@ -27458,8 +27464,8 @@ def cudaMipmappedArrayGetSparseProperties(mipmap): with nogil: err = cyruntime.cudaMipmappedArrayGetSparseProperties(sparseProperties._pvt_ptr, cymipmap) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), sparseProperties) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, sparseProperties) {{endif}} {{if 'cudaMemcpy' in found_functions}} @@ -27509,7 +27515,7 @@ def cudaMemcpy(dst, src, size_t count, kind not None : cudaMemcpyKind): cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy(cydst_ptr, cysrc_ptr, count, cykind) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpyPeer' in found_functions}} @@ -27557,7 +27563,7 @@ def cudaMemcpyPeer(dst, int dstDevice, src, int srcDevice, size_t count): cdef void* cysrc_ptr = cysrc.cptr with nogil: err = cyruntime.cudaMemcpyPeer(cydst_ptr, dstDevice, cysrc_ptr, srcDevice, count) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2D' in found_functions}} @@ -27617,7 +27623,7 @@ def cudaMemcpy2D(dst, size_t dpitch, src, size_t spitch, size_t width, size_t he cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2D(cydst_ptr, dpitch, cysrc_ptr, spitch, width, height, cykind) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DToArray' in found_functions}} @@ -27684,7 +27690,7 @@ def cudaMemcpy2DToArray(dst, size_t wOffset, size_t hOffset, src, size_t spitch, cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DToArray(cydst, wOffset, hOffset, cysrc_ptr, spitch, width, height, cykind) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DFromArray' in found_functions}} @@ -27751,7 +27757,7 @@ def cudaMemcpy2DFromArray(dst, size_t dpitch, src, size_t wOffset, size_t hOffse cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DFromArray(cydst_ptr, dpitch, cysrc, wOffset, hOffset, width, height, cykind) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DArrayToArray' in found_functions}} @@ -27824,7 +27830,7 @@ def cudaMemcpy2DArrayToArray(dst, size_t wOffsetDst, size_t hOffsetDst, src, siz cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DArrayToArray(cydst, wOffsetDst, hOffsetDst, cysrc, wOffsetSrc, hOffsetSrc, width, height, cykind) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpyAsync' in found_functions}} @@ -27894,7 +27900,7 @@ def cudaMemcpyAsync(dst, src, size_t count, kind not None : cudaMemcpyKind, stre cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyAsync(cydst_ptr, cysrc_ptr, count, cykind, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpyPeerAsync' in found_functions}} @@ -27950,7 +27956,7 @@ def cudaMemcpyPeerAsync(dst, int dstDevice, src, int srcDevice, size_t count, st cdef void* cysrc_ptr = cysrc.cptr with nogil: err = cyruntime.cudaMemcpyPeerAsync(cydst_ptr, dstDevice, cysrc_ptr, srcDevice, count, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpyBatchAsync' in found_functions}} @@ -28100,7 +28106,7 @@ def cudaMemcpyBatchAsync(dsts : Optional[tuple[Any] | list[Any]], srcs : Optiona err = cyruntime.cudaMemcpyBatchAsync(cydsts_ptr, cysrcs_ptr, cysizes.data(), count, cyattrs, cyattrsIdxs.data(), numAttrs, cystream) if len(attrs) > 1 and cyattrs is not NULL: free(cyattrs) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpy3DBatchAsync' in found_functions}} @@ -28230,7 +28236,7 @@ def cudaMemcpy3DBatchAsync(size_t numOps, opList : Optional[tuple[cudaMemcpy3DBa err = cyruntime.cudaMemcpy3DBatchAsync(numOps, cyopList, flags, cystream) if len(opList) > 1 and cyopList is not NULL: free(cyopList) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DAsync' in found_functions}} @@ -28311,7 +28317,7 @@ def cudaMemcpy2DAsync(dst, size_t dpitch, src, size_t spitch, size_t width, size cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DAsync(cydst_ptr, dpitch, cysrc_ptr, spitch, width, height, cykind, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DToArrayAsync' in found_functions}} @@ -28399,7 +28405,7 @@ def cudaMemcpy2DToArrayAsync(dst, size_t wOffset, size_t hOffset, src, size_t sp cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DToArrayAsync(cydst, wOffset, hOffset, cysrc_ptr, spitch, width, height, cykind, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpy2DFromArrayAsync' in found_functions}} @@ -28486,7 +28492,7 @@ def cudaMemcpy2DFromArrayAsync(dst, size_t dpitch, src, size_t wOffset, size_t h cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpy2DFromArrayAsync(cydst_ptr, dpitch, cysrc, wOffset, hOffset, width, height, cykind, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemset' in found_functions}} @@ -28523,7 +28529,7 @@ def cudaMemset(devPtr, int value, size_t count): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaMemset(cydevPtr_ptr, value, count) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemset2D' in found_functions}} @@ -28567,7 +28573,7 @@ def cudaMemset2D(devPtr, size_t pitch, int value, size_t width, size_t height): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaMemset2D(cydevPtr_ptr, pitch, value, width, height) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemset3D' in found_functions}} @@ -28621,7 +28627,7 @@ def cudaMemset3D(pitchedDevPtr not None : cudaPitchedPtr, int value, extent not """ with nogil: err = cyruntime.cudaMemset3D(pitchedDevPtr._pvt_ptr[0], value, extent._pvt_ptr[0]) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemsetAsync' in found_functions}} @@ -28674,7 +28680,7 @@ def cudaMemsetAsync(devPtr, int value, size_t count, stream): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaMemsetAsync(cydevPtr_ptr, value, count, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemset2DAsync' in found_functions}} @@ -28734,7 +28740,7 @@ def cudaMemset2DAsync(devPtr, size_t pitch, int value, size_t width, size_t heig cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaMemset2DAsync(cydevPtr_ptr, pitch, value, width, height, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemset3DAsync' in found_functions}} @@ -28804,7 +28810,7 @@ def cudaMemset3DAsync(pitchedDevPtr not None : cudaPitchedPtr, int value, extent cystream = pstream with nogil: err = cyruntime.cudaMemset3DAsync(pitchedDevPtr._pvt_ptr[0], value, extent._pvt_ptr[0], cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemPrefetchAsync' in found_functions}} @@ -28922,7 +28928,7 @@ def cudaMemPrefetchAsync(devPtr, size_t count, location not None : cudaMemLocati cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaMemPrefetchAsync(cydevPtr_ptr, count, location._pvt_ptr[0], flags, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemPrefetchBatchAsync' in found_functions}} @@ -29031,7 +29037,7 @@ def cudaMemPrefetchBatchAsync(dptrs : Optional[tuple[Any] | list[Any]], sizes : err = cyruntime.cudaMemPrefetchBatchAsync(cydptrs_ptr, cysizes.data(), count, cyprefetchLocs, cyprefetchLocIdxs.data(), numPrefetchLocs, flags, cystream) if len(prefetchLocs) > 1 and cyprefetchLocs is not NULL: free(cyprefetchLocs) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemDiscardBatchAsync' in found_functions}} @@ -29105,7 +29111,7 @@ def cudaMemDiscardBatchAsync(dptrs : Optional[tuple[Any] | list[Any]], sizes : t if count > len(sizes): raise RuntimeError("List is too small: " + str(len(sizes)) + " < " + str(count)) with nogil: err = cyruntime.cudaMemDiscardBatchAsync(cydptrs_ptr, cysizes.data(), count, flags, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemDiscardAndPrefetchBatchAsync' in found_functions}} @@ -29222,7 +29228,7 @@ def cudaMemDiscardAndPrefetchBatchAsync(dptrs : Optional[tuple[Any] | list[Any]] err = cyruntime.cudaMemDiscardAndPrefetchBatchAsync(cydptrs_ptr, cysizes.data(), count, cyprefetchLocs, cyprefetchLocIdxs.data(), numPrefetchLocs, flags, cystream) if len(prefetchLocs) > 1 and cyprefetchLocs is not NULL: free(cyprefetchLocs) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemAdvise' in found_functions}} @@ -29419,7 +29425,7 @@ def cudaMemAdvise(devPtr, size_t count, advice not None : cudaMemoryAdvise, loca cdef cyruntime.cudaMemoryAdvise cyadvice = int(advice) with nogil: err = cyruntime.cudaMemAdvise(cydevPtr_ptr, count, cyadvice, location._pvt_ptr[0]) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemRangeGetAttribute' in found_functions}} @@ -29568,8 +29574,8 @@ def cudaMemRangeGetAttribute(size_t dataSize, attribute not None : cudaMemRangeA with nogil: err = cyruntime.cudaMemRangeGetAttribute(cydata_ptr, dataSize, cyattribute, cydevPtr_ptr, count) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), cydata.pyObj()) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, cydata.pyObj()) {{endif}} {{if 'cudaMemRangeGetAttributes' in found_functions}} @@ -29649,8 +29655,8 @@ def cudaMemRangeGetAttributes(dataSizes : tuple[int] | list[int], attributes : O with nogil: err = cyruntime.cudaMemRangeGetAttributes(cyvoidStarHelper_ptr, cydataSizes.data(), cyattributes.data(), numAttributes, cydevPtr_ptr, count) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), [obj.pyObj() for obj in pylist]) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, [obj.pyObj() for obj in pylist]) {{endif}} {{if 'cudaMemcpyToArray' in found_functions}} @@ -29709,7 +29715,7 @@ def cudaMemcpyToArray(dst, size_t wOffset, size_t hOffset, src, size_t count, ki cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyToArray(cydst, wOffset, hOffset, cysrc_ptr, count, cykind) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpyFromArray' in found_functions}} @@ -29768,7 +29774,7 @@ def cudaMemcpyFromArray(dst, src, size_t wOffset, size_t hOffset, size_t count, cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyFromArray(cydst_ptr, cysrc, wOffset, hOffset, count, cykind) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpyArrayToArray' in found_functions}} @@ -29838,7 +29844,7 @@ def cudaMemcpyArrayToArray(dst, size_t wOffsetDst, size_t hOffsetDst, src, size_ cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyArrayToArray(cydst, wOffsetDst, hOffsetDst, cysrc, wOffsetSrc, hOffsetSrc, count, cykind) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpyToArrayAsync' in found_functions}} @@ -29914,7 +29920,7 @@ def cudaMemcpyToArrayAsync(dst, size_t wOffset, size_t hOffset, src, size_t coun cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyToArrayAsync(cydst, wOffset, hOffset, cysrc_ptr, count, cykind, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemcpyFromArrayAsync' in found_functions}} @@ -29990,7 +29996,7 @@ def cudaMemcpyFromArrayAsync(dst, src, size_t wOffset, size_t hOffset, size_t co cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaMemcpyFromArrayAsync(cydst_ptr, cysrc, wOffset, hOffset, count, cykind, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMallocAsync' in found_functions}} @@ -30044,8 +30050,8 @@ def cudaMallocAsync(size_t size, hStream): with nogil: err = cyruntime.cudaMallocAsync(&devPtr, size, cyhStream) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), devPtr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, devPtr) {{endif}} {{if 'cudaFreeAsync' in found_functions}} @@ -30091,7 +30097,7 @@ def cudaFreeAsync(devPtr, hStream): cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: err = cyruntime.cudaFreeAsync(cydevPtr_ptr, cyhStream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemPoolTrimTo' in found_functions}} @@ -30141,7 +30147,7 @@ def cudaMemPoolTrimTo(memPool, size_t minBytesToKeep): cymemPool = pmemPool with nogil: err = cyruntime.cudaMemPoolTrimTo(cymemPool, minBytesToKeep) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemPoolSetAttribute' in found_functions}} @@ -30217,7 +30223,7 @@ def cudaMemPoolSetAttribute(memPool, attr not None : cudaMemPoolAttr, value): cdef void* cyvalue_ptr = cyvalue.cptr with nogil: err = cyruntime.cudaMemPoolSetAttribute(cymemPool, cyattr, cyvalue_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemPoolGetAttribute' in found_functions}} @@ -30300,8 +30306,8 @@ def cudaMemPoolGetAttribute(memPool, attr not None : cudaMemPoolAttr): with nogil: err = cyruntime.cudaMemPoolGetAttribute(cymemPool, cyattr, cyvalue_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), cyvalue.pyObj()) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, cyvalue.pyObj()) {{endif}} {{if 'cudaMemPoolSetAccess' in found_functions}} @@ -30354,7 +30360,7 @@ def cudaMemPoolSetAccess(memPool, descList : Optional[tuple[cudaMemAccessDesc] | err = cyruntime.cudaMemPoolSetAccess(cymemPool, cydescList, count) if len(descList) > 1 and cydescList is not NULL: free(cydescList) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemPoolGetAccess' in found_functions}} @@ -30397,8 +30403,8 @@ def cudaMemPoolGetAccess(memPool, location : Optional[cudaMemLocation]): with nogil: err = cyruntime.cudaMemPoolGetAccess(&flags, cymemPool, cylocation_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), cudaMemAccessFlags(flags)) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, cudaMemAccessFlags(flags)) {{endif}} {{if 'cudaMemPoolCreate' in found_functions}} @@ -30497,8 +30503,8 @@ def cudaMemPoolCreate(poolProps : Optional[cudaMemPoolProps]): with nogil: err = cyruntime.cudaMemPoolCreate(memPool._pvt_ptr, cypoolProps_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), memPool) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, memPool) {{endif}} {{if 'cudaMemPoolDestroy' in found_functions}} @@ -30544,7 +30550,7 @@ def cudaMemPoolDestroy(memPool): cymemPool = pmemPool with nogil: err = cyruntime.cudaMemPoolDestroy(cymemPool) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMemGetDefaultMemPool' in found_functions}} @@ -30588,8 +30594,8 @@ def cudaMemGetDefaultMemPool(location : Optional[cudaMemLocation], typename not with nogil: err = cyruntime.cudaMemGetDefaultMemPool(memPool._pvt_ptr, cylocation_ptr, cytypename) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), memPool) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, memPool) {{endif}} {{if 'cudaMemGetMemPool' in found_functions}} @@ -30642,8 +30648,8 @@ def cudaMemGetMemPool(location : Optional[cudaMemLocation], typename not None : with nogil: err = cyruntime.cudaMemGetMemPool(memPool._pvt_ptr, cylocation_ptr, cytypename) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), memPool) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, memPool) {{endif}} {{if 'cudaMemSetMemPool' in found_functions}} @@ -30710,7 +30716,7 @@ def cudaMemSetMemPool(location : Optional[cudaMemLocation], typename not None : cdef cyruntime.cudaMemAllocationType cytypename = int(typename) with nogil: err = cyruntime.cudaMemSetMemPool(cylocation_ptr, cytypename, cymemPool) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaMallocFromPoolAsync' in found_functions}} @@ -30768,8 +30774,8 @@ def cudaMallocFromPoolAsync(size_t size, memPool, stream): with nogil: err = cyruntime.cudaMallocFromPoolAsync(&ptr, size, cymemPool, cystream) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), ptr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, ptr) {{endif}} {{if 'cudaMemPoolExportToShareableHandle' in found_functions}} @@ -30825,8 +30831,8 @@ def cudaMemPoolExportToShareableHandle(memPool, handleType not None : cudaMemAll with nogil: err = cyruntime.cudaMemPoolExportToShareableHandle(cyshareableHandle_ptr, cymemPool, cyhandleType, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), cyshareableHandle.pyObj()) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, cyshareableHandle.pyObj()) {{endif}} {{if 'cudaMemPoolImportFromShareableHandle' in found_functions}} @@ -30869,8 +30875,8 @@ def cudaMemPoolImportFromShareableHandle(shareableHandle, handleType not None : with nogil: err = cyruntime.cudaMemPoolImportFromShareableHandle(memPool._pvt_ptr, cyshareableHandle_ptr, cyhandleType, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), memPool) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, memPool) {{endif}} {{if 'cudaMemPoolExportPointer' in found_functions}} @@ -30906,8 +30912,8 @@ def cudaMemPoolExportPointer(ptr): with nogil: err = cyruntime.cudaMemPoolExportPointer(exportData._pvt_ptr, cyptr_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), exportData) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, exportData) {{endif}} {{if 'cudaMemPoolImportPointer' in found_functions}} @@ -30959,8 +30965,8 @@ def cudaMemPoolImportPointer(memPool, exportData : Optional[cudaMemPoolPtrExport with nogil: err = cyruntime.cudaMemPoolImportPointer(&ptr, cymemPool, cyexportData_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), ptr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, ptr) {{endif}} {{if 'cudaPointerGetAttributes' in found_functions}} @@ -31031,8 +31037,8 @@ def cudaPointerGetAttributes(ptr): with nogil: err = cyruntime.cudaPointerGetAttributes(attributes._pvt_ptr, cyptr_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), attributes) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, attributes) {{endif}} {{if 'cudaDeviceCanAccessPeer' in found_functions}} @@ -31070,8 +31076,8 @@ def cudaDeviceCanAccessPeer(int device, int peerDevice): with nogil: err = cyruntime.cudaDeviceCanAccessPeer(&canAccessPeer, device, peerDevice) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), canAccessPeer) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, canAccessPeer) {{endif}} {{if 'cudaDeviceEnablePeerAccess' in found_functions}} @@ -31122,7 +31128,7 @@ def cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags): """ with nogil: err = cyruntime.cudaDeviceEnablePeerAccess(peerDevice, flags) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceDisablePeerAccess' in found_functions}} @@ -31151,7 +31157,7 @@ def cudaDeviceDisablePeerAccess(int peerDevice): """ with nogil: err = cyruntime.cudaDeviceDisablePeerAccess(peerDevice) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphicsUnregisterResource' in found_functions}} @@ -31190,7 +31196,7 @@ def cudaGraphicsUnregisterResource(resource): cyresource = presource with nogil: err = cyruntime.cudaGraphicsUnregisterResource(cyresource) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphicsResourceSetMapFlags' in found_functions}} @@ -31246,7 +31252,7 @@ def cudaGraphicsResourceSetMapFlags(resource, unsigned int flags): cyresource = presource with nogil: err = cyruntime.cudaGraphicsResourceSetMapFlags(cyresource, flags) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphicsMapResources' in found_functions}} @@ -31309,7 +31315,7 @@ def cudaGraphicsMapResources(int count, resources, stream): raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) with nogil: err = cyruntime.cudaGraphicsMapResources(count, cyresources, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphicsUnmapResources' in found_functions}} @@ -31370,7 +31376,7 @@ def cudaGraphicsUnmapResources(int count, resources, stream): raise TypeError("Argument 'resources' is not instance of type (expected , found " + str(type(resources))) with nogil: err = cyruntime.cudaGraphicsUnmapResources(count, cyresources, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphicsResourceGetMappedPointer' in found_functions}} @@ -31415,8 +31421,8 @@ def cudaGraphicsResourceGetMappedPointer(resource): with nogil: err = cyruntime.cudaGraphicsResourceGetMappedPointer(&devPtr, &size, cyresource) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), devPtr, size) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, devPtr, size) {{endif}} {{if 'cudaGraphicsSubResourceGetMappedArray' in found_functions}} @@ -31472,8 +31478,8 @@ def cudaGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, uns with nogil: err = cyruntime.cudaGraphicsSubResourceGetMappedArray(array._pvt_ptr, cyresource, arrayIndex, mipLevel) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), array) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, array) {{endif}} {{if 'cudaGraphicsResourceGetMappedMipmappedArray' in found_functions}} @@ -31518,8 +31524,8 @@ def cudaGraphicsResourceGetMappedMipmappedArray(resource): with nogil: err = cyruntime.cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray._pvt_ptr, cyresource) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), mipmappedArray) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, mipmappedArray) {{endif}} {{if 'cudaGetChannelDesc' in found_functions}} @@ -31558,8 +31564,8 @@ def cudaGetChannelDesc(array): with nogil: err = cyruntime.cudaGetChannelDesc(desc._pvt_ptr, cyarray) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), desc) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, desc) {{endif}} {{if 'cudaCreateChannelDesc' in found_functions}} @@ -31852,8 +31858,8 @@ def cudaCreateTextureObject(pResDesc : Optional[cudaResourceDesc], pTexDesc : Op with nogil: err = cyruntime.cudaCreateTextureObject(pTexObject._pvt_ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pTexObject) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pTexObject) {{endif}} {{if 'cudaDestroyTextureObject' in found_functions}} @@ -31888,7 +31894,7 @@ def cudaDestroyTextureObject(texObject): cytexObject = ptexObject with nogil: err = cyruntime.cudaDestroyTextureObject(cytexObject) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGetTextureObjectResourceDesc' in found_functions}} @@ -31928,8 +31934,8 @@ def cudaGetTextureObjectResourceDesc(texObject): with nogil: err = cyruntime.cudaGetTextureObjectResourceDesc(pResDesc._pvt_ptr, cytexObject) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pResDesc) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pResDesc) {{endif}} {{if 'cudaGetTextureObjectTextureDesc' in found_functions}} @@ -31969,8 +31975,8 @@ def cudaGetTextureObjectTextureDesc(texObject): with nogil: err = cyruntime.cudaGetTextureObjectTextureDesc(pTexDesc._pvt_ptr, cytexObject) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pTexDesc) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pTexDesc) {{endif}} {{if 'cudaGetTextureObjectResourceViewDesc' in found_functions}} @@ -32011,8 +32017,8 @@ def cudaGetTextureObjectResourceViewDesc(texObject): with nogil: err = cyruntime.cudaGetTextureObjectResourceViewDesc(pResViewDesc._pvt_ptr, cytexObject) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pResViewDesc) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pResViewDesc) {{endif}} {{if 'cudaCreateSurfaceObject' in found_functions}} @@ -32053,8 +32059,8 @@ def cudaCreateSurfaceObject(pResDesc : Optional[cudaResourceDesc]): with nogil: err = cyruntime.cudaCreateSurfaceObject(pSurfObject._pvt_ptr, cypResDesc_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pSurfObject) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pSurfObject) {{endif}} {{if 'cudaDestroySurfaceObject' in found_functions}} @@ -32089,7 +32095,7 @@ def cudaDestroySurfaceObject(surfObject): cysurfObject = psurfObject with nogil: err = cyruntime.cudaDestroySurfaceObject(cysurfObject) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGetSurfaceObjectResourceDesc' in found_functions}} @@ -32126,8 +32132,8 @@ def cudaGetSurfaceObjectResourceDesc(surfObject): with nogil: err = cyruntime.cudaGetSurfaceObjectResourceDesc(pResDesc._pvt_ptr, cysurfObject) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pResDesc) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pResDesc) {{endif}} {{if 'cudaDriverGetVersion' in found_functions}} @@ -32159,8 +32165,8 @@ def cudaDriverGetVersion(): with nogil: err = cyruntime.cudaDriverGetVersion(&driverVersion) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), driverVersion) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, driverVersion) {{endif}} {{if 'cudaRuntimeGetVersion' in found_functions}} @@ -32195,8 +32201,8 @@ def cudaRuntimeGetVersion(): with nogil: err = cyruntime.cudaRuntimeGetVersion(&runtimeVersion) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), runtimeVersion) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, runtimeVersion) {{endif}} {{if 'cudaLogsRegisterCallback' in found_functions}} @@ -32235,8 +32241,8 @@ def cudaLogsRegisterCallback(callbackFunc, userData): with nogil: err = cyruntime.cudaLogsRegisterCallback(cycallbackFunc, cyuserData_ptr, callback_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), callback_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, callback_out) {{endif}} {{if 'cudaLogsUnregisterCallback' in found_functions}} @@ -32265,7 +32271,7 @@ def cudaLogsUnregisterCallback(callback): cycallback = pcallback with nogil: err = cyruntime.cudaLogsUnregisterCallback(cycallback) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaLogsCurrent' in found_functions}} @@ -32290,8 +32296,8 @@ def cudaLogsCurrent(unsigned int flags): with nogil: err = cyruntime.cudaLogsCurrent(iterator_out._pvt_ptr, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), iterator_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, iterator_out) {{endif}} {{if 'cudaLogsDumpToFile' in found_functions}} @@ -32334,8 +32340,8 @@ def cudaLogsDumpToFile(iterator : Optional[cudaLogIterator], char* pathToFile, u with nogil: err = cyruntime.cudaLogsDumpToFile(cyiterator, pathToFile, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), iterator) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, iterator) {{endif}} {{if 'cudaLogsDumpToMemory' in found_functions}} @@ -32392,8 +32398,8 @@ def cudaLogsDumpToMemory(iterator : Optional[cudaLogIterator], char* buffer, siz with nogil: err = cyruntime.cudaLogsDumpToMemory(cyiterator, buffer, &size, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), iterator, size) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, iterator, size) {{endif}} {{if 'cudaGraphCreate' in found_functions}} @@ -32424,8 +32430,8 @@ def cudaGraphCreate(unsigned int flags): with nogil: err = cyruntime.cudaGraphCreate(pGraph._pvt_ptr, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraph) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraph) {{endif}} {{if 'cudaGraphAddKernelNode' in found_functions}} @@ -32546,8 +32552,8 @@ def cudaGraphAddKernelNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphKernelNodeGetParams' in found_functions}} @@ -32595,8 +32601,8 @@ def cudaGraphKernelNodeGetParams(node): with nogil: err = cyruntime.cudaGraphKernelNodeGetParams(cynode, pNodeParams._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pNodeParams) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pNodeParams) {{endif}} {{if 'cudaGraphKernelNodeSetParams' in found_functions}} @@ -32634,7 +32640,7 @@ def cudaGraphKernelNodeSetParams(node, pNodeParams : Optional[cudaKernelNodePara cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphKernelNodeSetParams(cynode, cypNodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphKernelNodeCopyAttributes' in found_functions}} @@ -32681,7 +32687,7 @@ def cudaGraphKernelNodeCopyAttributes(hDst, hSrc): cyhDst = phDst with nogil: err = cyruntime.cudaGraphKernelNodeCopyAttributes(cyhDst, cyhSrc) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphKernelNodeGetAttribute' in found_functions}} @@ -32724,8 +32730,8 @@ def cudaGraphKernelNodeGetAttribute(hNode, attr not None : cudaKernelNodeAttrID) with nogil: err = cyruntime.cudaGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), value_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, value_out) {{endif}} {{if 'cudaGraphKernelNodeSetAttribute' in found_functions}} @@ -32767,7 +32773,7 @@ def cudaGraphKernelNodeSetAttribute(hNode, attr not None : cudaKernelNodeAttrID, cdef cyruntime.cudaKernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value is not None else NULL with nogil: err = cyruntime.cudaGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphAddMemcpyNode' in found_functions}} @@ -32842,8 +32848,8 @@ def cudaGraphAddMemcpyNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphAddMemcpyNode1D' in found_functions}} @@ -32937,8 +32943,8 @@ def cudaGraphAddMemcpyNode1D(graph, pDependencies : Optional[tuple[cudaGraphNode if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphMemcpyNodeGetParams' in found_functions}} @@ -32977,8 +32983,8 @@ def cudaGraphMemcpyNodeGetParams(node): with nogil: err = cyruntime.cudaGraphMemcpyNodeGetParams(cynode, pNodeParams._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pNodeParams) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pNodeParams) {{endif}} {{if 'cudaGraphMemcpyNodeSetParams' in found_functions}} @@ -33016,7 +33022,7 @@ def cudaGraphMemcpyNodeSetParams(node, pNodeParams : Optional[cudaMemcpy3DParms] cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphMemcpyNodeSetParams(cynode, cypNodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphMemcpyNodeSetParams1D' in found_functions}} @@ -33078,7 +33084,7 @@ def cudaGraphMemcpyNodeSetParams1D(node, dst, src, size_t count, kind not None : cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaGraphMemcpyNodeSetParams1D(cynode, cydst_ptr, cysrc_ptr, count, cykind) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphAddMemsetNode' in found_functions}} @@ -33147,8 +33153,8 @@ def cudaGraphAddMemsetNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphMemsetNodeGetParams' in found_functions}} @@ -33187,8 +33193,8 @@ def cudaGraphMemsetNodeGetParams(node): with nogil: err = cyruntime.cudaGraphMemsetNodeGetParams(cynode, pNodeParams._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pNodeParams) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pNodeParams) {{endif}} {{if 'cudaGraphMemsetNodeSetParams' in found_functions}} @@ -33226,7 +33232,7 @@ def cudaGraphMemsetNodeSetParams(node, pNodeParams : Optional[cudaMemsetParams]) cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphMemsetNodeSetParams(cynode, cypNodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphAddHostNode' in found_functions}} @@ -33296,8 +33302,8 @@ def cudaGraphAddHostNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphHostNodeGetParams' in found_functions}} @@ -33336,8 +33342,8 @@ def cudaGraphHostNodeGetParams(node): with nogil: err = cyruntime.cudaGraphHostNodeGetParams(cynode, pNodeParams._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pNodeParams) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pNodeParams) {{endif}} {{if 'cudaGraphHostNodeSetParams' in found_functions}} @@ -33375,7 +33381,7 @@ def cudaGraphHostNodeSetParams(node, pNodeParams : Optional[cudaHostNodeParams]) cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphHostNodeSetParams(cynode, cypNodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphAddChildGraphNode' in found_functions}} @@ -33455,8 +33461,8 @@ def cudaGraphAddChildGraphNode(graph, pDependencies : Optional[tuple[cudaGraphNo if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphChildGraphNodeGetGraph' in found_functions}} @@ -33500,8 +33506,8 @@ def cudaGraphChildGraphNodeGetGraph(node): with nogil: err = cyruntime.cudaGraphChildGraphNodeGetGraph(cynode, pGraph._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraph) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraph) {{endif}} {{if 'cudaGraphAddEmptyNode' in found_functions}} @@ -33571,8 +33577,8 @@ def cudaGraphAddEmptyNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphAddEventRecordNode' in found_functions}} @@ -33651,8 +33657,8 @@ def cudaGraphAddEventRecordNode(graph, pDependencies : Optional[tuple[cudaGraphN if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphEventRecordNodeGetEvent' in found_functions}} @@ -33691,8 +33697,8 @@ def cudaGraphEventRecordNodeGetEvent(node): with nogil: err = cyruntime.cudaGraphEventRecordNodeGetEvent(cynode, event_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), event_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, event_out) {{endif}} {{if 'cudaGraphEventRecordNodeSetEvent' in found_functions}} @@ -33737,7 +33743,7 @@ def cudaGraphEventRecordNodeSetEvent(node, event): cynode = pnode with nogil: err = cyruntime.cudaGraphEventRecordNodeSetEvent(cynode, cyevent) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphAddEventWaitNode' in found_functions}} @@ -33819,8 +33825,8 @@ def cudaGraphAddEventWaitNode(graph, pDependencies : Optional[tuple[cudaGraphNod if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphEventWaitNodeGetEvent' in found_functions}} @@ -33859,8 +33865,8 @@ def cudaGraphEventWaitNodeGetEvent(node): with nogil: err = cyruntime.cudaGraphEventWaitNodeGetEvent(cynode, event_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), event_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, event_out) {{endif}} {{if 'cudaGraphEventWaitNodeSetEvent' in found_functions}} @@ -33905,7 +33911,7 @@ def cudaGraphEventWaitNodeSetEvent(node, event): cynode = pnode with nogil: err = cyruntime.cudaGraphEventWaitNodeSetEvent(cynode, cyevent) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphAddExternalSemaphoresSignalNode' in found_functions}} @@ -33976,8 +33982,8 @@ def cudaGraphAddExternalSemaphoresSignalNode(graph, pDependencies : Optional[tup if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphExternalSemaphoresSignalNodeGetParams' in found_functions}} @@ -34022,8 +34028,8 @@ def cudaGraphExternalSemaphoresSignalNodeGetParams(hNode): with nogil: err = cyruntime.cudaGraphExternalSemaphoresSignalNodeGetParams(cyhNode, params_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), params_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, params_out) {{endif}} {{if 'cudaGraphExternalSemaphoresSignalNodeSetParams' in found_functions}} @@ -34062,7 +34068,7 @@ def cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : Optional[ cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExternalSemaphoresSignalNodeSetParams(cyhNode, cynodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphAddExternalSemaphoresWaitNode' in found_functions}} @@ -34133,8 +34139,8 @@ def cudaGraphAddExternalSemaphoresWaitNode(graph, pDependencies : Optional[tuple if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphExternalSemaphoresWaitNodeGetParams' in found_functions}} @@ -34179,8 +34185,8 @@ def cudaGraphExternalSemaphoresWaitNodeGetParams(hNode): with nogil: err = cyruntime.cudaGraphExternalSemaphoresWaitNodeGetParams(cyhNode, params_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), params_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, params_out) {{endif}} {{if 'cudaGraphExternalSemaphoresWaitNodeSetParams' in found_functions}} @@ -34219,7 +34225,7 @@ def cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : Optional[cu cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExternalSemaphoresWaitNodeSetParams(cyhNode, cynodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphAddMemAllocNode' in found_functions}} @@ -34329,8 +34335,8 @@ def cudaGraphAddMemAllocNode(graph, pDependencies : Optional[tuple[cudaGraphNode if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphMemAllocNodeGetParams' in found_functions}} @@ -34372,8 +34378,8 @@ def cudaGraphMemAllocNodeGetParams(node): with nogil: err = cyruntime.cudaGraphMemAllocNodeGetParams(cynode, params_out._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), params_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, params_out) {{endif}} {{if 'cudaGraphAddMemFreeNode' in found_functions}} @@ -34462,8 +34468,8 @@ def cudaGraphAddMemFreeNode(graph, pDependencies : Optional[tuple[cudaGraphNode_ if len(pDependencies) > 1 and cypDependencies is not NULL: free(cypDependencies) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphMemFreeNodeGetParams' in found_functions}} @@ -34503,8 +34509,8 @@ def cudaGraphMemFreeNodeGetParams(node): with nogil: err = cyruntime.cudaGraphMemFreeNodeGetParams(cynode, cydptr_out_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), dptr_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, dptr_out) {{endif}} {{if 'cudaDeviceGraphMemTrim' in found_functions}} @@ -34533,7 +34539,7 @@ def cudaDeviceGraphMemTrim(int device): """ with nogil: err = cyruntime.cudaDeviceGraphMemTrim(device) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetGraphMemAttribute' in found_functions}} @@ -34583,8 +34589,8 @@ def cudaDeviceGetGraphMemAttribute(int device, attr not None : cudaGraphMemAttri with nogil: err = cyruntime.cudaDeviceGetGraphMemAttribute(device, cyattr, cyvalue_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), cyvalue.pyObj()) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, cyvalue.pyObj()) {{endif}} {{if 'cudaDeviceSetGraphMemAttribute' in found_functions}} @@ -34626,7 +34632,7 @@ def cudaDeviceSetGraphMemAttribute(int device, attr not None : cudaGraphMemAttri cdef void* cyvalue_ptr = cyvalue.cptr with nogil: err = cyruntime.cudaDeviceSetGraphMemAttribute(device, cyattr, cyvalue_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphClone' in found_functions}} @@ -34675,8 +34681,8 @@ def cudaGraphClone(originalGraph): with nogil: err = cyruntime.cudaGraphClone(pGraphClone._pvt_ptr, cyoriginalGraph) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphClone) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphClone) {{endif}} {{if 'cudaGraphNodeFindInClone' in found_functions}} @@ -34732,8 +34738,8 @@ def cudaGraphNodeFindInClone(originalNode, clonedGraph): with nogil: err = cyruntime.cudaGraphNodeFindInClone(pNode._pvt_ptr, cyoriginalNode, cyclonedGraph) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pNode) {{endif}} {{if 'cudaGraphNodeGetType' in found_functions}} @@ -34772,8 +34778,8 @@ def cudaGraphNodeGetType(node): with nogil: err = cyruntime.cudaGraphNodeGetType(cynode, &pType) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), cudaGraphNodeType(pType)) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, cudaGraphNodeType(pType)) {{endif}} {{if 'cudaGraphNodeGetContainingGraph' in found_functions}} @@ -34813,8 +34819,8 @@ def cudaGraphNodeGetContainingGraph(hNode): with nogil: err = cyruntime.cudaGraphNodeGetContainingGraph(cyhNode, phGraph._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), phGraph) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, phGraph) {{endif}} {{if 'cudaGraphNodeGetLocalId' in found_functions}} @@ -34855,8 +34861,8 @@ def cudaGraphNodeGetLocalId(hNode): with nogil: err = cyruntime.cudaGraphNodeGetLocalId(cyhNode, &nodeId) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), nodeId) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, nodeId) {{endif}} {{if 'cudaGraphNodeGetToolsId' in found_functions}} @@ -34893,8 +34899,8 @@ def cudaGraphNodeGetToolsId(hNode): with nogil: err = cyruntime.cudaGraphNodeGetToolsId(cyhNode, &toolsNodeId) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), toolsNodeId) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, toolsNodeId) {{endif}} {{if 'cudaGraphGetId' in found_functions}} @@ -34934,8 +34940,8 @@ def cudaGraphGetId(hGraph): with nogil: err = cyruntime.cudaGraphGetId(cyhGraph, &graphID) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), graphID) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, graphID) {{endif}} {{if 'cudaGraphExecGetId' in found_functions}} @@ -34975,8 +34981,8 @@ def cudaGraphExecGetId(hGraphExec): with nogil: err = cyruntime.cudaGraphExecGetId(cyhGraphExec, &graphID) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), graphID) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, graphID) {{endif}} {{if 'cudaGraphGetNodes' in found_functions}} @@ -35034,8 +35040,8 @@ def cudaGraphGetNodes(graph, size_t numNodes = 0): if cynodes is not NULL: free(cynodes) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), pynodes, numNodes) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, pynodes, numNodes) {{endif}} {{if 'cudaGraphGetRootNodes' in found_functions}} @@ -35093,8 +35099,8 @@ def cudaGraphGetRootNodes(graph, size_t pNumRootNodes = 0): if cypRootNodes is not NULL: free(cypRootNodes) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), pypRootNodes, pNumRootNodes) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, pypRootNodes, pNumRootNodes) {{endif}} {{if 'cudaGraphGetEdges' in found_functions}} @@ -35183,8 +35189,8 @@ def cudaGraphGetEdges(graph, size_t numEdges = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None, None, None) - return (cudaError_t(err), pyfrom_, pyto, pyedgeData, numEdges) + return (_cudaError_t(err), None, None, None, None) + return (_cudaError_t_SUCCESS, pyfrom_, pyto, pyedgeData, numEdges) {{endif}} {{if 'cudaGraphNodeGetDependencies' in found_functions}} @@ -35260,8 +35266,8 @@ def cudaGraphNodeGetDependencies(node, size_t pNumDependencies = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None, None) - return (cudaError_t(err), pypDependencies, pyedgeData, pNumDependencies) + return (_cudaError_t(err), None, None, None) + return (_cudaError_t_SUCCESS, pypDependencies, pyedgeData, pNumDependencies) {{endif}} {{if 'cudaGraphNodeGetDependentNodes' in found_functions}} @@ -35337,8 +35343,8 @@ def cudaGraphNodeGetDependentNodes(node, size_t pNumDependentNodes = 0): if cyedgeData is not NULL: free(cyedgeData) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None, None) - return (cudaError_t(err), pypDependentNodes, pyedgeData, pNumDependentNodes) + return (_cudaError_t(err), None, None, None) + return (_cudaError_t_SUCCESS, pypDependentNodes, pyedgeData, pNumDependentNodes) {{endif}} {{if 'cudaGraphAddDependencies' in found_functions}} @@ -35431,7 +35437,7 @@ def cudaGraphAddDependencies(graph, from_ : Optional[tuple[cudaGraphNode_t] | li free(cyto) if len(edgeData) > 1 and cyedgeData is not NULL: free(cyedgeData) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphRemoveDependencies' in found_functions}} @@ -35527,7 +35533,7 @@ def cudaGraphRemoveDependencies(graph, from_ : Optional[tuple[cudaGraphNode_t] | free(cyto) if len(edgeData) > 1 and cyedgeData is not NULL: free(cyedgeData) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphDestroyNode' in found_functions}} @@ -35566,7 +35572,7 @@ def cudaGraphDestroyNode(node): cynode = pnode with nogil: err = cyruntime.cudaGraphDestroyNode(cynode) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphInstantiate' in found_functions}} @@ -35669,8 +35675,8 @@ def cudaGraphInstantiate(graph, unsigned long long flags): with nogil: err = cyruntime.cudaGraphInstantiate(pGraphExec._pvt_ptr, cygraph, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphExec) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphExec) {{endif}} {{if 'cudaGraphInstantiateWithFlags' in found_functions}} @@ -35775,8 +35781,8 @@ def cudaGraphInstantiateWithFlags(graph, unsigned long long flags): with nogil: err = cyruntime.cudaGraphInstantiateWithFlags(pGraphExec._pvt_ptr, cygraph, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphExec) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphExec) {{endif}} {{if 'cudaGraphInstantiateWithParams' in found_functions}} @@ -35922,8 +35928,8 @@ def cudaGraphInstantiateWithParams(graph, instantiateParams : Optional[cudaGraph with nogil: err = cyruntime.cudaGraphInstantiateWithParams(pGraphExec._pvt_ptr, cygraph, cyinstantiateParams_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphExec) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphExec) {{endif}} {{if 'cudaGraphExecGetFlags' in found_functions}} @@ -35965,8 +35971,8 @@ def cudaGraphExecGetFlags(graphExec): with nogil: err = cyruntime.cudaGraphExecGetFlags(cygraphExec, &flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), flags) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, flags) {{endif}} {{if 'cudaGraphExecKernelNodeSetParams' in found_functions}} @@ -36048,7 +36054,7 @@ def cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecKernelNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphExecMemcpyNodeSetParams' in found_functions}} @@ -36113,7 +36119,7 @@ def cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecMemcpyNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphExecMemcpyNodeSetParams1D' in found_functions}} @@ -36186,7 +36192,7 @@ def cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, size_t count, cdef cyruntime.cudaMemcpyKind cykind = int(kind) with nogil: err = cyruntime.cudaGraphExecMemcpyNodeSetParams1D(cyhGraphExec, cynode, cydst_ptr, cysrc_ptr, count, cykind) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphExecMemsetNodeSetParams' in found_functions}} @@ -36256,7 +36262,7 @@ def cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecMemsetNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphExecHostNodeSetParams' in found_functions}} @@ -36311,7 +36317,7 @@ def cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams : Optional[cuda cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecHostNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphExecChildGraphNodeSetParams' in found_functions}} @@ -36381,7 +36387,7 @@ def cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph): cyhGraphExec = phGraphExec with nogil: err = cyruntime.cudaGraphExecChildGraphNodeSetParams(cyhGraphExec, cynode, cychildGraph) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphExecEventRecordNodeSetEvent' in found_functions}} @@ -36444,7 +36450,7 @@ def cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event): cyhGraphExec = phGraphExec with nogil: err = cyruntime.cudaGraphExecEventRecordNodeSetEvent(cyhGraphExec, cyhNode, cyevent) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphExecEventWaitNodeSetEvent' in found_functions}} @@ -36507,7 +36513,7 @@ def cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event): cyhGraphExec = phGraphExec with nogil: err = cyruntime.cudaGraphExecEventWaitNodeSetEvent(cyhGraphExec, cyhNode, cyevent) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphExecExternalSemaphoresSignalNodeSetParams' in found_functions}} @@ -36567,7 +36573,7 @@ def cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodePa cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecExternalSemaphoresSignalNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphExecExternalSemaphoresWaitNodeSetParams' in found_functions}} @@ -36627,7 +36633,7 @@ def cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodePara cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecExternalSemaphoresWaitNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphNodeSetEnabled' in found_functions}} @@ -36690,7 +36696,7 @@ def cudaGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled): cyhGraphExec = phGraphExec with nogil: err = cyruntime.cudaGraphNodeSetEnabled(cyhGraphExec, cyhNode, isEnabled) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphNodeGetEnabled' in found_functions}} @@ -36748,8 +36754,8 @@ def cudaGraphNodeGetEnabled(hGraphExec, hNode): with nogil: err = cyruntime.cudaGraphNodeGetEnabled(cyhGraphExec, cyhNode, &isEnabled) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), isEnabled) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, isEnabled) {{endif}} {{if 'cudaGraphExecUpdate' in found_functions}} @@ -36924,8 +36930,8 @@ def cudaGraphExecUpdate(hGraphExec, hGraph): with nogil: err = cyruntime.cudaGraphExecUpdate(cyhGraphExec, cyhGraph, resultInfo._pvt_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), resultInfo) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, resultInfo) {{endif}} {{if 'cudaGraphUpload' in found_functions}} @@ -36974,7 +36980,7 @@ def cudaGraphUpload(graphExec, stream): cygraphExec = pgraphExec with nogil: err = cyruntime.cudaGraphUpload(cygraphExec, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphLaunch' in found_functions}} @@ -37028,7 +37034,7 @@ def cudaGraphLaunch(graphExec, stream): cygraphExec = pgraphExec with nogil: err = cyruntime.cudaGraphLaunch(cygraphExec, cystream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphExecDestroy' in found_functions}} @@ -37063,7 +37069,7 @@ def cudaGraphExecDestroy(graphExec): cygraphExec = pgraphExec with nogil: err = cyruntime.cudaGraphExecDestroy(cygraphExec) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphDestroy' in found_functions}} @@ -37098,7 +37104,7 @@ def cudaGraphDestroy(graph): cygraph = pgraph with nogil: err = cyruntime.cudaGraphDestroy(cygraph) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphDebugDotPrint' in found_functions}} @@ -37138,7 +37144,7 @@ def cudaGraphDebugDotPrint(graph, char* path, unsigned int flags): cygraph = pgraph with nogil: err = cyruntime.cudaGraphDebugDotPrint(cygraph, path, flags) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaUserObjectCreate' in found_functions}} @@ -37199,8 +37205,8 @@ def cudaUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned in with nogil: err = cyruntime.cudaUserObjectCreate(object_out._pvt_ptr, cyptr_ptr, cydestroy, initialRefcount, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), object_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, object_out) {{endif}} {{if 'cudaUserObjectRetain' in found_functions}} @@ -37242,7 +37248,7 @@ def cudaUserObjectRetain(object, unsigned int count): cyobject = pobject with nogil: err = cyruntime.cudaUserObjectRetain(cyobject, count) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaUserObjectRelease' in found_functions}} @@ -37287,7 +37293,7 @@ def cudaUserObjectRelease(object, unsigned int count): cyobject = pobject with nogil: err = cyruntime.cudaUserObjectRelease(cyobject, count) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphRetainUserObject' in found_functions}} @@ -37343,7 +37349,7 @@ def cudaGraphRetainUserObject(graph, object, unsigned int count, unsigned int fl cygraph = pgraph with nogil: err = cyruntime.cudaGraphRetainUserObject(cygraph, cyobject, count, flags) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphReleaseUserObject' in found_functions}} @@ -37394,7 +37400,7 @@ def cudaGraphReleaseUserObject(graph, object, unsigned int count): cygraph = pgraph with nogil: err = cyruntime.cudaGraphReleaseUserObject(cygraph, cyobject, count) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphAddNode' in found_functions}} @@ -37489,8 +37495,8 @@ def cudaGraphAddNode(graph, pDependencies : Optional[tuple[cudaGraphNode_t] | li if len(dependencyData) > 1 and cydependencyData is not NULL: free(cydependencyData) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pGraphNode) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pGraphNode) {{endif}} {{if 'cudaGraphNodeSetParams' in found_functions}} @@ -37534,7 +37540,7 @@ def cudaGraphNodeSetParams(node, nodeParams : Optional[cudaGraphNodeParams]): cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphNodeSetParams(cynode, cynodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphExecNodeSetParams' in found_functions}} @@ -37594,7 +37600,7 @@ def cudaGraphExecNodeSetParams(graphExec, node, nodeParams : Optional[cudaGraphN cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL with nogil: err = cyruntime.cudaGraphExecNodeSetParams(cygraphExec, cynode, cynodeParams_ptr) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaGraphConditionalHandleCreate' in found_functions}} @@ -37645,8 +37651,8 @@ def cudaGraphConditionalHandleCreate(graph, unsigned int defaultLaunchValue, uns with nogil: err = cyruntime.cudaGraphConditionalHandleCreate(pHandle_out._pvt_ptr, cygraph, defaultLaunchValue, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pHandle_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pHandle_out) {{endif}} {{if 'cudaGraphConditionalHandleCreate_v2' in found_functions}} @@ -37708,8 +37714,8 @@ def cudaGraphConditionalHandleCreate_v2(graph, ctx, unsigned int defaultLaunchVa with nogil: err = cyruntime.cudaGraphConditionalHandleCreate_v2(pHandle_out._pvt_ptr, cygraph, cyctx, defaultLaunchValue, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pHandle_out) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pHandle_out) {{endif}} {{if 'cudaGetDriverEntryPoint' in found_functions}} @@ -37812,8 +37818,8 @@ def cudaGetDriverEntryPoint(char* symbol, unsigned long long flags): with nogil: err = cyruntime.cudaGetDriverEntryPoint(symbol, &funcPtr, flags, &driverStatus) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), funcPtr, cudaDriverEntryPointQueryResult(driverStatus)) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, funcPtr, cudaDriverEntryPointQueryResult(driverStatus)) {{endif}} {{if 'cudaGetDriverEntryPointByVersion' in found_functions}} @@ -37920,8 +37926,8 @@ def cudaGetDriverEntryPointByVersion(char* symbol, unsigned int cudaVersion, uns with nogil: err = cyruntime.cudaGetDriverEntryPointByVersion(symbol, &funcPtr, cudaVersion, flags, &driverStatus) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), funcPtr, cudaDriverEntryPointQueryResult(driverStatus)) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, funcPtr, cudaDriverEntryPointQueryResult(driverStatus)) {{endif}} {{if 'cudaLibraryLoadData' in found_functions}} @@ -38019,8 +38025,8 @@ def cudaLibraryLoadData(code, jitOptions : Optional[tuple[cudaJitOption] | list[ with nogil: err = cyruntime.cudaLibraryLoadData(library._pvt_ptr, cycode_ptr, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), library) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, library) {{endif}} {{if 'cudaLibraryLoadFromFile' in found_functions}} @@ -38117,8 +38123,8 @@ def cudaLibraryLoadFromFile(char* fileName, jitOptions : Optional[tuple[cudaJitO with nogil: err = cyruntime.cudaLibraryLoadFromFile(library._pvt_ptr, fileName, cyjitOptions.data(), cyjitOptionsValues_ptr, numJitOptions, cylibraryOptions.data(), cylibraryOptionValues_ptr, numLibraryOptions) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), library) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, library) {{endif}} {{if 'cudaLibraryUnload' in found_functions}} @@ -38153,7 +38159,7 @@ def cudaLibraryUnload(library): cylibrary = plibrary with nogil: err = cyruntime.cudaLibraryUnload(cylibrary) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaLibraryGetKernel' in found_functions}} @@ -38196,8 +38202,8 @@ def cudaLibraryGetKernel(library, char* name): with nogil: err = cyruntime.cudaLibraryGetKernel(pKernel._pvt_ptr, cylibrary, name) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pKernel) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pKernel) {{endif}} {{if 'cudaLibraryGetGlobal' in found_functions}} @@ -38248,8 +38254,8 @@ def cudaLibraryGetGlobal(library, char* name): with nogil: err = cyruntime.cudaLibraryGetGlobal(&dptr, &numbytes, cylibrary, name) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), dptr, numbytes) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, dptr, numbytes) {{endif}} {{if 'cudaLibraryGetManaged' in found_functions}} @@ -38302,8 +38308,8 @@ def cudaLibraryGetManaged(library, char* name): with nogil: err = cyruntime.cudaLibraryGetManaged(&dptr, &numbytes, cylibrary, name) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), dptr, numbytes) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, dptr, numbytes) {{endif}} {{if 'cudaLibraryGetUnifiedFunction' in found_functions}} @@ -38348,8 +38354,8 @@ def cudaLibraryGetUnifiedFunction(library, char* symbol): with nogil: err = cyruntime.cudaLibraryGetUnifiedFunction(&fptr, cylibrary, symbol) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), fptr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, fptr) {{endif}} {{if 'cudaLibraryGetKernelCount' in found_functions}} @@ -38388,8 +38394,8 @@ def cudaLibraryGetKernelCount(lib): with nogil: err = cyruntime.cudaLibraryGetKernelCount(&count, cylib) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), count) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, count) {{endif}} {{if 'cudaLibraryEnumerateKernels' in found_functions}} @@ -38441,8 +38447,8 @@ def cudaLibraryEnumerateKernels(unsigned int numKernels, lib): if cykernels is not NULL: free(cykernels) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pykernels) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pykernels) {{endif}} {{if 'cudaKernelSetAttributeForDevice' in found_functions}} @@ -38548,7 +38554,7 @@ def cudaKernelSetAttributeForDevice(kernel, attr not None : cudaFuncAttribute, i cdef cyruntime.cudaFuncAttribute cyattr = int(attr) with nogil: err = cyruntime.cudaKernelSetAttributeForDevice(cykernel, cyattr, value, device) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetDevResource' in found_functions}} @@ -38586,8 +38592,8 @@ def cudaDeviceGetDevResource(int device, typename not None : cudaDevResourceType with nogil: err = cyruntime.cudaDeviceGetDevResource(device, resource._pvt_ptr, cytypename) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), resource) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, resource) {{endif}} {{if 'cudaDevSmResourceSplitByCount' in found_functions}} @@ -38706,8 +38712,8 @@ def cudaDevSmResourceSplitByCount(unsigned int nbGroups, input_ : Optional[cudaD if cyresult is not NULL: free(cyresult) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None, None) - return (cudaError_t(err), pyresult, cynbGroups, remaining) + return (_cudaError_t(err), None, None, None) + return (_cudaError_t_SUCCESS, pyresult, cynbGroups, remaining) {{endif}} {{if 'cudaDevSmResourceSplit' in found_functions}} @@ -38866,8 +38872,8 @@ def cudaDevSmResourceSplit(unsigned int nbGroups, input_ : Optional[cudaDevResou if cyresult is not NULL: free(cyresult) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), pyresult, remainder) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, pyresult, remainder) {{endif}} {{if 'cudaDevResourceGenerateDesc' in found_functions}} @@ -38933,8 +38939,8 @@ def cudaDevResourceGenerateDesc(resources : Optional[tuple[cudaDevResource] | li if len(resources) > 1 and cyresources is not NULL: free(cyresources) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), phDesc) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, phDesc) {{endif}} {{if 'cudaGreenCtxCreate' in found_functions}} @@ -38996,8 +39002,8 @@ def cudaGreenCtxCreate(desc, int device, unsigned int flags): with nogil: err = cyruntime.cudaGreenCtxCreate(phCtx._pvt_ptr, cydesc, device, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), phCtx) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, phCtx) {{endif}} {{if 'cudaExecutionCtxDestroy' in found_functions}} @@ -39056,7 +39062,7 @@ def cudaExecutionCtxDestroy(ctx): cyctx = pctx with nogil: err = cyruntime.cudaExecutionCtxDestroy(cyctx) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaExecutionCtxGetDevResource' in found_functions}} @@ -39101,8 +39107,8 @@ def cudaExecutionCtxGetDevResource(ctx, typename not None : cudaDevResourceType) with nogil: err = cyruntime.cudaExecutionCtxGetDevResource(cyctx, resource._pvt_ptr, cytypename) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), resource) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, resource) {{endif}} {{if 'cudaExecutionCtxGetDevice' in found_functions}} @@ -39143,8 +39149,8 @@ def cudaExecutionCtxGetDevice(ctx): with nogil: err = cyruntime.cudaExecutionCtxGetDevice(&device, cyctx) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), device) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, device) {{endif}} {{if 'cudaExecutionCtxGetId' in found_functions}} @@ -39186,8 +39192,8 @@ def cudaExecutionCtxGetId(ctx): with nogil: err = cyruntime.cudaExecutionCtxGetId(cyctx, &ctxId) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), ctxId) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, ctxId) {{endif}} {{if 'cudaExecutionCtxStreamCreate' in found_functions}} @@ -39261,8 +39267,8 @@ def cudaExecutionCtxStreamCreate(ctx, unsigned int flags, int priority): with nogil: err = cyruntime.cudaExecutionCtxStreamCreate(phStream._pvt_ptr, cyctx, flags, priority) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), phStream) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, phStream) {{endif}} {{if 'cudaExecutionCtxSynchronize' in found_functions}} @@ -39304,7 +39310,7 @@ def cudaExecutionCtxSynchronize(ctx): cyctx = pctx with nogil: err = cyruntime.cudaExecutionCtxSynchronize(cyctx) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaStreamGetDevResource' in found_functions}} @@ -39351,8 +39357,8 @@ def cudaStreamGetDevResource(hStream, typename not None : cudaDevResourceType): with nogil: err = cyruntime.cudaStreamGetDevResource(cyhStream, resource._pvt_ptr, cytypename) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), resource) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, resource) {{endif}} {{if 'cudaExecutionCtxRecordEvent' in found_functions}} @@ -39411,7 +39417,7 @@ def cudaExecutionCtxRecordEvent(ctx, event): cyctx = pctx with nogil: err = cyruntime.cudaExecutionCtxRecordEvent(cyctx, cyevent) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaExecutionCtxWaitEvent' in found_functions}} @@ -39469,7 +39475,7 @@ def cudaExecutionCtxWaitEvent(ctx, event): cyctx = pctx with nogil: err = cyruntime.cudaExecutionCtxWaitEvent(cyctx, cyevent) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaDeviceGetExecutionCtx' in found_functions}} @@ -39507,8 +39513,8 @@ def cudaDeviceGetExecutionCtx(int device): with nogil: err = cyruntime.cudaDeviceGetExecutionCtx(ctx._pvt_ptr, device) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), ctx) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, ctx) {{endif}} {{if 'cudaGetExportTable' in found_functions}} @@ -39521,8 +39527,8 @@ def cudaGetExportTable(pExportTableId : Optional[cudaUUID_t]): with nogil: err = cyruntime.cudaGetExportTable(&ppExportTable, cypExportTableId_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), ppExportTable) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, ppExportTable) {{endif}} {{if 'cudaGetKernel' in found_functions}} @@ -39565,8 +39571,8 @@ def cudaGetKernel(entryFuncAddr): with nogil: err = cyruntime.cudaGetKernel(kernelPtr._pvt_ptr, cyentryFuncAddr_ptr) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), kernelPtr) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, kernelPtr) {{endif}} {{if 'make_cudaPitchedPtr' in found_functions}} @@ -39754,8 +39760,8 @@ def cudaGraphicsEGLRegisterImage(image, unsigned int flags): with nogil: err = cyruntime.cudaGraphicsEGLRegisterImage(pCudaResource._pvt_ptr, cyimage, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), pCudaResource) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, pCudaResource) {{endif}} {{if True}} @@ -39797,8 +39803,8 @@ def cudaEGLStreamConsumerConnect(eglStream): with nogil: err = cyruntime.cudaEGLStreamConsumerConnect(conn._pvt_ptr, cyeglStream) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), conn) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, conn) {{endif}} {{if True}} @@ -39844,8 +39850,8 @@ def cudaEGLStreamConsumerConnectWithFlags(eglStream, unsigned int flags): with nogil: err = cyruntime.cudaEGLStreamConsumerConnectWithFlags(conn._pvt_ptr, cyeglStream, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), conn) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, conn) {{endif}} {{if True}} @@ -39882,7 +39888,7 @@ def cudaEGLStreamConsumerDisconnect(conn): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cyruntime.cudaEGLStreamConsumerDisconnect(cyconn) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if True}} @@ -39948,7 +39954,7 @@ def cudaEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cyruntime.cudaEGLStreamConsumerAcquireFrame(cyconn, cypCudaResource, cypStream, timeout) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if True}} @@ -40008,7 +40014,7 @@ def cudaEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cyruntime.cudaEGLStreamConsumerReleaseFrame(cyconn, cypCudaResource, cypStream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if True}} @@ -40070,8 +40076,8 @@ def cudaEGLStreamProducerConnect(eglStream, width, height): with nogil: err = cyruntime.cudaEGLStreamProducerConnect(conn._pvt_ptr, cyeglStream, cywidth, cyheight) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), conn) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, conn) {{endif}} {{if True}} @@ -40108,7 +40114,7 @@ def cudaEGLStreamProducerDisconnect(conn): raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cyruntime.cudaEGLStreamProducerDisconnect(cyconn) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if True}} @@ -40168,7 +40174,7 @@ def cudaEGLStreamProducerPresentFrame(conn, eglframe not None : cudaEglFrame, pS raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) with nogil: err = cyruntime.cudaEGLStreamProducerPresentFrame(cyconn, eglframe._pvt_ptr[0], cypStream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if True}} @@ -40223,7 +40229,7 @@ def cudaEGLStreamProducerReturnFrame(conn, eglframe : Optional[cudaEglFrame], pS cdef cyruntime.cudaEglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe is not None else NULL with nogil: err = cyruntime.cudaEGLStreamProducerReturnFrame(cyconn, cyeglframe_ptr, cypStream) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if True}} @@ -40276,8 +40282,8 @@ def cudaGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned with nogil: err = cyruntime.cudaGraphicsResourceGetMappedEglFrame(eglFrame._pvt_ptr, cyresource, index, mipLevel) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), eglFrame) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, eglFrame) {{endif}} {{if True}} @@ -40332,8 +40338,8 @@ def cudaEventCreateFromEGLSync(eglSync, unsigned int flags): with nogil: err = cyruntime.cudaEventCreateFromEGLSync(phEvent._pvt_ptr, cyeglSync, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), phEvent) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, phEvent) {{endif}} {{if 'cudaProfilerStart' in found_functions}} @@ -40361,7 +40367,7 @@ def cudaProfilerStart(): """ with nogil: err = cyruntime.cudaProfilerStart() - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if 'cudaProfilerStop' in found_functions}} @@ -40389,7 +40395,7 @@ def cudaProfilerStop(): """ with nogil: err = cyruntime.cudaProfilerStop() - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if True}} @@ -40456,8 +40462,8 @@ def cudaGLGetDevices(unsigned int cudaDeviceCount, deviceList not None : cudaGLD if cypCudaDevices is not NULL: free(cypCudaDevices) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None, None) - return (cudaError_t(err), pCudaDeviceCount, pypCudaDevices) + return (_cudaError_t(err), None, None) + return (_cudaError_t_SUCCESS, pCudaDeviceCount, pypCudaDevices) {{endif}} {{if True}} @@ -40556,8 +40562,8 @@ def cudaGraphicsGLRegisterImage(image, target, unsigned int flags): with nogil: err = cyruntime.cudaGraphicsGLRegisterImage(resource._pvt_ptr, cyimage, cytarget, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), resource) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, resource) {{endif}} {{if True}} @@ -40613,8 +40619,8 @@ def cudaGraphicsGLRegisterBuffer(buffer, unsigned int flags): with nogil: err = cyruntime.cudaGraphicsGLRegisterBuffer(resource._pvt_ptr, cybuffer, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), resource) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, resource) {{endif}} {{if True}} @@ -40666,8 +40672,8 @@ def cudaVDPAUGetDevice(vdpDevice, vdpGetProcAddress): with nogil: err = cyruntime.cudaVDPAUGetDevice(&device, cyvdpDevice, cyvdpGetProcAddress) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), device) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, device) {{endif}} {{if True}} @@ -40726,7 +40732,7 @@ def cudaVDPAUSetVDPAUDevice(int device, vdpDevice, vdpGetProcAddress): cyvdpDevice = pvdpDevice with nogil: err = cyruntime.cudaVDPAUSetVDPAUDevice(device, cyvdpDevice, cyvdpGetProcAddress) - return (cudaError_t(err),) + return (_cudaError_t(err),) {{endif}} {{if True}} @@ -40782,8 +40788,8 @@ def cudaGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags): with nogil: err = cyruntime.cudaGraphicsVDPAURegisterVideoSurface(resource._pvt_ptr, cyvdpSurface, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), resource) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, resource) {{endif}} {{if True}} @@ -40839,8 +40845,8 @@ def cudaGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags): with nogil: err = cyruntime.cudaGraphicsVDPAURegisterOutputSurface(resource._pvt_ptr, cyvdpSurface, flags) if err != cyruntime.cudaSuccess: - return (cudaError_t(err), None) - return (cudaError_t(err), resource) + return (_cudaError_t(err), None) + return (_cudaError_t_SUCCESS, resource) {{endif}}