# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly.

# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a7205ec1f1749acd8f9e32e85660d77d8ccb60a0d038bb63fb4b015496f23d07
from libc.stdint cimport uint32_t, uint64_t


# Types overridden or aliased here because they are macros in driver_types.h
# (not real C types) and cannot be generated from headers directly.

# GL
ctypedef unsigned int GLenum
ctypedef unsigned int GLuint

# EGL
ctypedef void *EGLImageKHR
ctypedef void *EGLStreamKHR
ctypedef unsigned int EGLint
ctypedef void *EGLSyncKHR

# VDPAU
ctypedef uint32_t VdpDevice
ctypedef unsigned long long VdpGetProcAddress
ctypedef uint32_t VdpVideoSurface
ctypedef uint32_t VdpOutputSurface

# These four names are preprocessor macros in driver_types.h that alias the
# cudaLaunchAttribute* types.  Omitting the C alias string is intentional: it
# preserves the Cython-mangled ABI (__pyx_t_...) that legacy_cython_gen produced,
# so downstream extensions compiled against the old headers keep working.
# Do NOT add 'CName' aliases here — that would break binary compatibility.
ctypedef cudaLaunchAttributeID cudaStreamAttrID
ctypedef cudaLaunchAttributeID cudaKernelNodeAttrID
ctypedef cudaLaunchAttributeValue cudaStreamAttrValue
ctypedef cudaLaunchAttributeValue cudaKernelNodeAttrValue

# dim3 is used as a member type in several CUDA structs
cdef extern from 'vector_types.h':
    ctypedef struct dim3 'dim3':
        unsigned int x
        unsigned int y
        unsigned int z

# Opaque CUDA runtime handle types declared as their underlying CU*_st pointer types
# (matching cydriver's declarations) so that runtime wrapper classes sharing _pvt_ptr
# with driver wrapper classes can assign values without Cython type errors.
cdef extern from 'driver_types.h':
    cdef struct CUstream_st 'CUstream_st':
        pass
    ctypedef CUstream_st* cudaStream_t 'cudaStream_t'

cdef extern from 'driver_types.h':
    cdef struct CUevent_st 'CUevent_st':
        pass
    ctypedef CUevent_st* cudaEvent_t 'cudaEvent_t'

cdef extern from 'driver_types.h':
    cdef struct CUexternalMemory_st 'CUexternalMemory_st':
        pass
    ctypedef CUexternalMemory_st* cudaExternalMemory_t 'cudaExternalMemory_t'

cdef extern from 'driver_types.h':
    cdef struct CUexternalSemaphore_st 'CUexternalSemaphore_st':
        pass
    ctypedef CUexternalSemaphore_st* cudaExternalSemaphore_t 'cudaExternalSemaphore_t'

cdef extern from 'driver_types.h':
    cdef struct CUgraph_st 'CUgraph_st':
        pass
    ctypedef CUgraph_st* cudaGraph_t 'cudaGraph_t'

cdef extern from 'driver_types.h':
    cdef struct CUgraphNode_st 'CUgraphNode_st':
        pass
    ctypedef CUgraphNode_st* cudaGraphNode_t 'cudaGraphNode_t'

cdef extern from 'driver_types.h':
    cdef struct CUuserObject_st 'CUuserObject_st':
        pass
    ctypedef CUuserObject_st* cudaUserObject_t 'cudaUserObject_t'

cdef extern from 'driver_types.h':
    cdef struct CUfunc_st 'CUfunc_st':
        pass
    ctypedef CUfunc_st* cudaFunction_t 'cudaFunction_t'

cdef extern from 'driver_types.h':
    cdef struct CUkern_st 'CUkern_st':
        pass
    ctypedef CUkern_st* cudaKernel_t 'cudaKernel_t'

cdef extern from 'driver_types.h':
    cdef struct CUlib_st 'CUlib_st':
        pass
    ctypedef CUlib_st* cudaLibrary_t 'cudaLibrary_t'

cdef extern from 'driver_types.h':
    cdef struct CUmemPoolHandle_st 'CUmemPoolHandle_st':
        pass
    ctypedef CUmemPoolHandle_st* cudaMemPool_t 'cudaMemPool_t'

cdef extern from 'driver_types.h':
    cdef struct CUgraphExec_st 'CUgraphExec_st':
        pass
    ctypedef CUgraphExec_st* cudaGraphExec_t 'cudaGraphExec_t'

cdef extern from 'driver_types.h':
    cdef struct CUgraphDeviceUpdatableNode_st 'CUgraphDeviceUpdatableNode_st':
        pass
    ctypedef CUgraphDeviceUpdatableNode_st* cudaGraphDeviceNode_t 'cudaGraphDeviceNode_t'

cdef extern from 'driver_types.h':
    cdef struct CUlogsCallbackEntry_st 'CUlogsCallbackEntry_st':
        pass
    ctypedef CUlogsCallbackEntry_st* cudaLogsCallbackHandle 'cudaLogsCallbackHandle'

cdef extern from 'driver_types.h':
    cdef struct CUdevResourceDesc_st 'CUdevResourceDesc_st':
        pass
    ctypedef CUdevResourceDesc_st* cudaDevResourceDesc_t 'cudaDevResourceDesc_t'

cdef extern from 'driver_types.h':
    cdef struct cudaExecutionContext_st 'cudaExecutionContext_st':
        pass
    ctypedef cudaExecutionContext_st* cudaExecutionContext_t 'cudaExecutionContext_t'

# Types that are outside the naming pattern or SKIPped but required for ABI compatibility
# with the lowpp layer (runtime.pxd) which was generated by legacy_cython_gen.
cdef extern from 'driver_types.h':
    cdef struct CUuuid_st 'CUuuid_st':
        char bytes[16]
    ctypedef CUuuid_st CUuuid 'CUuuid'

cdef extern from 'driver_types.h':
    cdef struct cudalibraryHostUniversalFunctionAndDataTable 'cudalibraryHostUniversalFunctionAndDataTable':
        void* functionTable
        size_t functionWindowSize
        void* dataTable
        size_t dataWindowSize

# Forward declarations for types that are SKIPped but referenced in non-skipped structs/functions
cdef extern from 'driver_types.h':
    ctypedef struct cudaUUID_t 'cudaUUID_t':
        char bytes[16]

cdef extern from 'driver_types.h':
    cdef struct cudaGraphicsResource 'cudaGraphicsResource':
        pass
    ctypedef cudaGraphicsResource* cudaGraphicsResource_t 'cudaGraphicsResource_t'

cdef extern from *:
    """
    struct CUeglStreamConnection_st;
    typedef struct CUeglStreamConnection_st *cudaEglStreamConnection;
    """
    cdef struct CUeglStreamConnection_st 'CUeglStreamConnection_st':
        pass

# Declared at module scope (not inside cdef extern from) so that Cython assigns
# its own mangled name (__pyx_t_...) to this typedef, preserving the Cython ABI
# that legacy_cython_gen produced for the EGL functions that take this type.
# Do NOT move this declaration back inside the cdef extern from block.
ctypedef CUeglStreamConnection_st* cudaEglStreamConnection


# ENUMS
cdef extern from 'driver_types.h':
    cdef enum cudaError:
        cudaSuccess
        cudaErrorInvalidValue
        cudaErrorMemoryAllocation
        cudaErrorInitializationError
        cudaErrorCudartUnloading
        cudaErrorProfilerDisabled
        cudaErrorProfilerNotInitialized
        cudaErrorProfilerAlreadyStarted
        cudaErrorProfilerAlreadyStopped
        cudaErrorInvalidConfiguration
        cudaErrorVersionTranslation
        cudaErrorInvalidPitchValue
        cudaErrorInvalidSymbol
        cudaErrorInvalidHostPointer
        cudaErrorInvalidDevicePointer
        cudaErrorInvalidTexture
        cudaErrorInvalidTextureBinding
        cudaErrorInvalidChannelDescriptor
        cudaErrorInvalidMemcpyDirection
        cudaErrorAddressOfConstant
        cudaErrorTextureFetchFailed
        cudaErrorTextureNotBound
        cudaErrorSynchronizationError
        cudaErrorInvalidFilterSetting
        cudaErrorInvalidNormSetting
        cudaErrorMixedDeviceExecution
        cudaErrorNotYetImplemented
        cudaErrorMemoryValueTooLarge
        cudaErrorStubLibrary
        cudaErrorInsufficientDriver
        cudaErrorCallRequiresNewerDriver
        cudaErrorInvalidSurface
        cudaErrorDuplicateVariableName
        cudaErrorDuplicateTextureName
        cudaErrorDuplicateSurfaceName
        cudaErrorDevicesUnavailable
        cudaErrorIncompatibleDriverContext
        cudaErrorMissingConfiguration
        cudaErrorPriorLaunchFailure
        cudaErrorLaunchMaxDepthExceeded
        cudaErrorLaunchFileScopedTex
        cudaErrorLaunchFileScopedSurf
        cudaErrorSyncDepthExceeded
        cudaErrorLaunchPendingCountExceeded
        cudaErrorInvalidDeviceFunction
        cudaErrorNoDevice
        cudaErrorInvalidDevice
        cudaErrorDeviceNotLicensed
        cudaErrorSoftwareValidityNotEstablished
        cudaErrorStartupFailure
        cudaErrorInvalidKernelImage
        cudaErrorDeviceUninitialized
        cudaErrorMapBufferObjectFailed
        cudaErrorUnmapBufferObjectFailed
        cudaErrorArrayIsMapped
        cudaErrorAlreadyMapped
        cudaErrorNoKernelImageForDevice
        cudaErrorAlreadyAcquired
        cudaErrorNotMapped
        cudaErrorNotMappedAsArray
        cudaErrorNotMappedAsPointer
        cudaErrorECCUncorrectable
        cudaErrorUnsupportedLimit
        cudaErrorDeviceAlreadyInUse
        cudaErrorPeerAccessUnsupported
        cudaErrorInvalidPtx
        cudaErrorInvalidGraphicsContext
        cudaErrorNvlinkUncorrectable
        cudaErrorJitCompilerNotFound
        cudaErrorUnsupportedPtxVersion
        cudaErrorJitCompilationDisabled
        cudaErrorUnsupportedExecAffinity
        cudaErrorUnsupportedDevSideSync
        cudaErrorContained
        cudaErrorInvalidSource
        cudaErrorFileNotFound
        cudaErrorSharedObjectSymbolNotFound
        cudaErrorSharedObjectInitFailed
        cudaErrorOperatingSystem
        cudaErrorInvalidResourceHandle
        cudaErrorIllegalState
        cudaErrorLossyQuery
        cudaErrorSymbolNotFound
        cudaErrorNotReady
        cudaErrorIllegalAddress
        cudaErrorLaunchOutOfResources
        cudaErrorLaunchTimeout
        cudaErrorLaunchIncompatibleTexturing
        cudaErrorPeerAccessAlreadyEnabled
        cudaErrorPeerAccessNotEnabled
        cudaErrorSetOnActiveProcess
        cudaErrorContextIsDestroyed
        cudaErrorAssert
        cudaErrorTooManyPeers
        cudaErrorHostMemoryAlreadyRegistered
        cudaErrorHostMemoryNotRegistered
        cudaErrorHardwareStackError
        cudaErrorIllegalInstruction
        cudaErrorMisalignedAddress
        cudaErrorInvalidAddressSpace
        cudaErrorInvalidPc
        cudaErrorLaunchFailure
        cudaErrorCooperativeLaunchTooLarge
        cudaErrorTensorMemoryLeak
        cudaErrorNotPermitted
        cudaErrorNotSupported
        cudaErrorSystemNotReady
        cudaErrorSystemDriverMismatch
        cudaErrorCompatNotSupportedOnDevice
        cudaErrorMpsConnectionFailed
        cudaErrorMpsRpcFailure
        cudaErrorMpsServerNotReady
        cudaErrorMpsMaxClientsReached
        cudaErrorMpsMaxConnectionsReached
        cudaErrorMpsClientTerminated
        cudaErrorCdpNotSupported
        cudaErrorCdpVersionMismatch
        cudaErrorStreamCaptureUnsupported
        cudaErrorStreamCaptureInvalidated
        cudaErrorStreamCaptureMerge
        cudaErrorStreamCaptureUnmatched
        cudaErrorStreamCaptureUnjoined
        cudaErrorStreamCaptureIsolation
        cudaErrorStreamCaptureImplicit
        cudaErrorCapturedEvent
        cudaErrorStreamCaptureWrongThread
        cudaErrorTimeout
        cudaErrorGraphExecUpdateFailure
        cudaErrorExternalDevice
        cudaErrorInvalidClusterSize
        cudaErrorFunctionNotLoaded
        cudaErrorInvalidResourceType
        cudaErrorInvalidResourceConfiguration
        cudaErrorStreamDetached
        cudaErrorGraphRecaptureFailure
        cudaErrorUnknown
        cudaErrorApiFailureBase

cdef extern from 'driver_types.h':
    cdef enum cudaChannelFormatKind:
        cudaChannelFormatKindSigned
        cudaChannelFormatKindUnsigned
        cudaChannelFormatKindFloat
        cudaChannelFormatKindNone
        cudaChannelFormatKindNV12
        cudaChannelFormatKindUnsignedNormalized8X1
        cudaChannelFormatKindUnsignedNormalized8X2
        cudaChannelFormatKindUnsignedNormalized8X4
        cudaChannelFormatKindUnsignedNormalized16X1
        cudaChannelFormatKindUnsignedNormalized16X2
        cudaChannelFormatKindUnsignedNormalized16X4
        cudaChannelFormatKindSignedNormalized8X1
        cudaChannelFormatKindSignedNormalized8X2
        cudaChannelFormatKindSignedNormalized8X4
        cudaChannelFormatKindSignedNormalized16X1
        cudaChannelFormatKindSignedNormalized16X2
        cudaChannelFormatKindSignedNormalized16X4
        cudaChannelFormatKindUnsignedBlockCompressed1
        cudaChannelFormatKindUnsignedBlockCompressed1SRGB
        cudaChannelFormatKindUnsignedBlockCompressed2
        cudaChannelFormatKindUnsignedBlockCompressed2SRGB
        cudaChannelFormatKindUnsignedBlockCompressed3
        cudaChannelFormatKindUnsignedBlockCompressed3SRGB
        cudaChannelFormatKindUnsignedBlockCompressed4
        cudaChannelFormatKindSignedBlockCompressed4
        cudaChannelFormatKindUnsignedBlockCompressed5
        cudaChannelFormatKindSignedBlockCompressed5
        cudaChannelFormatKindUnsignedBlockCompressed6H
        cudaChannelFormatKindSignedBlockCompressed6H
        cudaChannelFormatKindUnsignedBlockCompressed7
        cudaChannelFormatKindUnsignedBlockCompressed7SRGB
        cudaChannelFormatKindUnsignedNormalized1010102
        cudaChannelFormatKindUnsigned8Packed422
        cudaChannelFormatKindUnsigned8Packed444
        cudaChannelFormatKindUnsigned8SemiPlanar420
        cudaChannelFormatKindUnsigned16SemiPlanar420
        cudaChannelFormatKindUnsigned8SemiPlanar422
        cudaChannelFormatKindUnsigned16SemiPlanar422
        cudaChannelFormatKindUnsigned8SemiPlanar444
        cudaChannelFormatKindUnsigned16SemiPlanar444
        cudaChannelFormatKindUnsigned8Planar420
        cudaChannelFormatKindUnsigned16Planar420
        cudaChannelFormatKindUnsigned8Planar422
        cudaChannelFormatKindUnsigned16Planar422
        cudaChannelFormatKindUnsigned8Planar444
        cudaChannelFormatKindUnsigned16Planar444

cdef extern from 'driver_types.h':
    cdef enum cudaMemoryType:
        cudaMemoryTypeUnregistered
        cudaMemoryTypeHost
        cudaMemoryTypeDevice
        cudaMemoryTypeManaged

cdef extern from 'driver_types.h':
    cdef enum cudaMemcpyKind:
        cudaMemcpyHostToHost
        cudaMemcpyHostToDevice
        cudaMemcpyDeviceToHost
        cudaMemcpyDeviceToDevice
        cudaMemcpyDefault

cdef extern from 'driver_types.h':
    cdef enum cudaAccessProperty:
        cudaAccessPropertyNormal
        cudaAccessPropertyStreaming
        cudaAccessPropertyPersisting

cdef extern from 'driver_types.h':
    cdef enum cudaStreamCaptureStatus:
        cudaStreamCaptureStatusNone
        cudaStreamCaptureStatusActive
        cudaStreamCaptureStatusInvalidated

cdef extern from 'driver_types.h':
    cdef enum cudaStreamCaptureMode:
        cudaStreamCaptureModeGlobal
        cudaStreamCaptureModeThreadLocal
        cudaStreamCaptureModeRelaxed

cdef extern from 'driver_types.h':
    cdef enum cudaSynchronizationPolicy:
        cudaSyncPolicyAuto
        cudaSyncPolicySpin
        cudaSyncPolicyYield
        cudaSyncPolicyBlockingSync

cdef extern from 'driver_types.h':
    cdef enum cudaClusterSchedulingPolicy:
        cudaClusterSchedulingPolicyDefault
        cudaClusterSchedulingPolicySpread
        cudaClusterSchedulingPolicyLoadBalancing

cdef extern from 'driver_types.h':
    cdef enum cudaStreamUpdateCaptureDependenciesFlags:
        cudaStreamAddCaptureDependencies
        cudaStreamSetCaptureDependencies

cdef extern from 'driver_types.h':
    cdef enum cudaUserObjectFlags:
        cudaUserObjectNoDestructorSync

cdef extern from 'driver_types.h':
    cdef enum cudaUserObjectRetainFlags:
        cudaGraphUserObjectMove

cdef extern from 'driver_types.h':
    cdef enum cudaGraphicsRegisterFlags:
        cudaGraphicsRegisterFlagsNone
        cudaGraphicsRegisterFlagsReadOnly
        cudaGraphicsRegisterFlagsWriteDiscard
        cudaGraphicsRegisterFlagsSurfaceLoadStore
        cudaGraphicsRegisterFlagsTextureGather

cdef extern from 'driver_types.h':
    cdef enum cudaGraphicsMapFlags:
        cudaGraphicsMapFlagsNone
        cudaGraphicsMapFlagsReadOnly
        cudaGraphicsMapFlagsWriteDiscard

cdef extern from 'driver_types.h':
    cdef enum cudaGraphicsCubeFace:
        cudaGraphicsCubeFacePositiveX
        cudaGraphicsCubeFaceNegativeX
        cudaGraphicsCubeFacePositiveY
        cudaGraphicsCubeFaceNegativeY
        cudaGraphicsCubeFacePositiveZ
        cudaGraphicsCubeFaceNegativeZ

cdef extern from 'driver_types.h':
    cdef enum cudaResourceType:
        cudaResourceTypeArray
        cudaResourceTypeMipmappedArray
        cudaResourceTypeLinear
        cudaResourceTypePitch2D

cdef extern from 'driver_types.h':
    cdef enum cudaResourceViewFormat:
        cudaResViewFormatNone
        cudaResViewFormatUnsignedChar1
        cudaResViewFormatUnsignedChar2
        cudaResViewFormatUnsignedChar4
        cudaResViewFormatSignedChar1
        cudaResViewFormatSignedChar2
        cudaResViewFormatSignedChar4
        cudaResViewFormatUnsignedShort1
        cudaResViewFormatUnsignedShort2
        cudaResViewFormatUnsignedShort4
        cudaResViewFormatSignedShort1
        cudaResViewFormatSignedShort2
        cudaResViewFormatSignedShort4
        cudaResViewFormatUnsignedInt1
        cudaResViewFormatUnsignedInt2
        cudaResViewFormatUnsignedInt4
        cudaResViewFormatSignedInt1
        cudaResViewFormatSignedInt2
        cudaResViewFormatSignedInt4
        cudaResViewFormatHalf1
        cudaResViewFormatHalf2
        cudaResViewFormatHalf4
        cudaResViewFormatFloat1
        cudaResViewFormatFloat2
        cudaResViewFormatFloat4
        cudaResViewFormatUnsignedBlockCompressed1
        cudaResViewFormatUnsignedBlockCompressed2
        cudaResViewFormatUnsignedBlockCompressed3
        cudaResViewFormatUnsignedBlockCompressed4
        cudaResViewFormatSignedBlockCompressed4
        cudaResViewFormatUnsignedBlockCompressed5
        cudaResViewFormatSignedBlockCompressed5
        cudaResViewFormatUnsignedBlockCompressed6H
        cudaResViewFormatSignedBlockCompressed6H
        cudaResViewFormatUnsignedBlockCompressed7

cdef extern from 'driver_types.h':
    cdef enum cudaFuncAttribute:
        cudaFuncAttributeMaxDynamicSharedMemorySize
        cudaFuncAttributePreferredSharedMemoryCarveout
        cudaFuncAttributeClusterDimMustBeSet
        cudaFuncAttributeRequiredClusterWidth
        cudaFuncAttributeRequiredClusterHeight
        cudaFuncAttributeRequiredClusterDepth
        cudaFuncAttributeNonPortableClusterSizeAllowed
        cudaFuncAttributeClusterSchedulingPolicyPreference
        cudaFuncAttributeMax

cdef extern from 'driver_types.h':
    cdef enum cudaFuncCache:
        cudaFuncCachePreferNone
        cudaFuncCachePreferShared
        cudaFuncCachePreferL1
        cudaFuncCachePreferEqual

cdef extern from 'driver_types.h':
    cdef enum cudaSharedMemConfig:
        cudaSharedMemBankSizeDefault
        cudaSharedMemBankSizeFourByte
        cudaSharedMemBankSizeEightByte

cdef extern from 'driver_types.h':
    cdef enum cudaSharedCarveout:
        cudaSharedmemCarveoutDefault
        cudaSharedmemCarveoutMaxShared
        cudaSharedmemCarveoutMaxL1

cdef extern from 'driver_types.h':
    cdef enum cudaComputeMode:
        cudaComputeModeDefault
        cudaComputeModeExclusive
        cudaComputeModeProhibited
        cudaComputeModeExclusiveProcess

cdef extern from 'driver_types.h':
    cdef enum cudaLimit:
        cudaLimitStackSize
        cudaLimitPrintfFifoSize
        cudaLimitMallocHeapSize
        cudaLimitDevRuntimeSyncDepth
        cudaLimitDevRuntimePendingLaunchCount
        cudaLimitMaxL2FetchGranularity
        cudaLimitPersistingL2CacheSize

cdef extern from 'driver_types.h':
    cdef enum cudaMemoryAdvise:
        cudaMemAdviseSetReadMostly
        cudaMemAdviseUnsetReadMostly
        cudaMemAdviseSetPreferredLocation
        cudaMemAdviseUnsetPreferredLocation
        cudaMemAdviseSetAccessedBy
        cudaMemAdviseUnsetAccessedBy

cdef extern from 'driver_types.h':
    cdef enum cudaMemRangeAttribute:
        cudaMemRangeAttributeReadMostly
        cudaMemRangeAttributePreferredLocation
        cudaMemRangeAttributeAccessedBy
        cudaMemRangeAttributeLastPrefetchLocation
        cudaMemRangeAttributePreferredLocationType
        cudaMemRangeAttributePreferredLocationId
        cudaMemRangeAttributeLastPrefetchLocationType
        cudaMemRangeAttributeLastPrefetchLocationId

cdef extern from 'driver_types.h':
    cdef enum cudaFlushGPUDirectRDMAWritesOptions:
        cudaFlushGPUDirectRDMAWritesOptionHost
        cudaFlushGPUDirectRDMAWritesOptionMemOps

cdef extern from 'driver_types.h':
    cdef enum cudaGPUDirectRDMAWritesOrdering:
        cudaGPUDirectRDMAWritesOrderingNone
        cudaGPUDirectRDMAWritesOrderingOwner
        cudaGPUDirectRDMAWritesOrderingAllDevices

cdef extern from 'driver_types.h':
    cdef enum cudaFlushGPUDirectRDMAWritesScope:
        cudaFlushGPUDirectRDMAWritesToOwner
        cudaFlushGPUDirectRDMAWritesToAllDevices

cdef extern from 'driver_types.h':
    cdef enum cudaFlushGPUDirectRDMAWritesTarget:
        cudaFlushGPUDirectRDMAWritesTargetCurrentDevice

cdef extern from 'driver_types.h':
    cdef enum cudaDeviceAttr:
        cudaDevAttrMaxThreadsPerBlock
        cudaDevAttrMaxBlockDimX
        cudaDevAttrMaxBlockDimY
        cudaDevAttrMaxBlockDimZ
        cudaDevAttrMaxGridDimX
        cudaDevAttrMaxGridDimY
        cudaDevAttrMaxGridDimZ
        cudaDevAttrMaxSharedMemoryPerBlock
        cudaDevAttrTotalConstantMemory
        cudaDevAttrWarpSize
        cudaDevAttrMaxPitch
        cudaDevAttrMaxRegistersPerBlock
        cudaDevAttrClockRate
        cudaDevAttrTextureAlignment
        cudaDevAttrGpuOverlap
        cudaDevAttrMultiProcessorCount
        cudaDevAttrKernelExecTimeout
        cudaDevAttrIntegrated
        cudaDevAttrCanMapHostMemory
        cudaDevAttrComputeMode
        cudaDevAttrMaxTexture1DWidth
        cudaDevAttrMaxTexture2DWidth
        cudaDevAttrMaxTexture2DHeight
        cudaDevAttrMaxTexture3DWidth
        cudaDevAttrMaxTexture3DHeight
        cudaDevAttrMaxTexture3DDepth
        cudaDevAttrMaxTexture2DLayeredWidth
        cudaDevAttrMaxTexture2DLayeredHeight
        cudaDevAttrMaxTexture2DLayeredLayers
        cudaDevAttrSurfaceAlignment
        cudaDevAttrConcurrentKernels
        cudaDevAttrEccEnabled
        cudaDevAttrPciBusId
        cudaDevAttrPciDeviceId
        cudaDevAttrTccDriver
        cudaDevAttrMemoryClockRate
        cudaDevAttrGlobalMemoryBusWidth
        cudaDevAttrL2CacheSize
        cudaDevAttrMaxThreadsPerMultiProcessor
        cudaDevAttrAsyncEngineCount
        cudaDevAttrUnifiedAddressing
        cudaDevAttrMaxTexture1DLayeredWidth
        cudaDevAttrMaxTexture1DLayeredLayers
        cudaDevAttrMaxTexture2DGatherWidth
        cudaDevAttrMaxTexture2DGatherHeight
        cudaDevAttrMaxTexture3DWidthAlt
        cudaDevAttrMaxTexture3DHeightAlt
        cudaDevAttrMaxTexture3DDepthAlt
        cudaDevAttrPciDomainId
        cudaDevAttrTexturePitchAlignment
        cudaDevAttrMaxTextureCubemapWidth
        cudaDevAttrMaxTextureCubemapLayeredWidth
        cudaDevAttrMaxTextureCubemapLayeredLayers
        cudaDevAttrMaxSurface1DWidth
        cudaDevAttrMaxSurface2DWidth
        cudaDevAttrMaxSurface2DHeight
        cudaDevAttrMaxSurface3DWidth
        cudaDevAttrMaxSurface3DHeight
        cudaDevAttrMaxSurface3DDepth
        cudaDevAttrMaxSurface1DLayeredWidth
        cudaDevAttrMaxSurface1DLayeredLayers
        cudaDevAttrMaxSurface2DLayeredWidth
        cudaDevAttrMaxSurface2DLayeredHeight
        cudaDevAttrMaxSurface2DLayeredLayers
        cudaDevAttrMaxSurfaceCubemapWidth
        cudaDevAttrMaxSurfaceCubemapLayeredWidth
        cudaDevAttrMaxSurfaceCubemapLayeredLayers
        cudaDevAttrMaxTexture1DLinearWidth
        cudaDevAttrMaxTexture2DLinearWidth
        cudaDevAttrMaxTexture2DLinearHeight
        cudaDevAttrMaxTexture2DLinearPitch
        cudaDevAttrMaxTexture2DMipmappedWidth
        cudaDevAttrMaxTexture2DMipmappedHeight
        cudaDevAttrComputeCapabilityMajor
        cudaDevAttrComputeCapabilityMinor
        cudaDevAttrMaxTexture1DMipmappedWidth
        cudaDevAttrStreamPrioritiesSupported
        cudaDevAttrGlobalL1CacheSupported
        cudaDevAttrLocalL1CacheSupported
        cudaDevAttrMaxSharedMemoryPerMultiprocessor
        cudaDevAttrMaxRegistersPerMultiprocessor
        cudaDevAttrManagedMemory
        cudaDevAttrIsMultiGpuBoard
        cudaDevAttrMultiGpuBoardGroupID
        cudaDevAttrHostNativeAtomicSupported
        cudaDevAttrSingleToDoublePrecisionPerfRatio
        cudaDevAttrPageableMemoryAccess
        cudaDevAttrConcurrentManagedAccess
        cudaDevAttrComputePreemptionSupported
        cudaDevAttrCanUseHostPointerForRegisteredMem
        cudaDevAttrReserved92
        cudaDevAttrReserved93
        cudaDevAttrReserved94
        cudaDevAttrCooperativeLaunch
        cudaDevAttrReserved96
        cudaDevAttrMaxSharedMemoryPerBlockOptin
        cudaDevAttrCanFlushRemoteWrites
        cudaDevAttrHostRegisterSupported
        cudaDevAttrPageableMemoryAccessUsesHostPageTables
        cudaDevAttrDirectManagedMemAccessFromHost
        cudaDevAttrMaxBlocksPerMultiprocessor
        cudaDevAttrMaxPersistingL2CacheSize
        cudaDevAttrMaxAccessPolicyWindowSize
        cudaDevAttrReservedSharedMemoryPerBlock
        cudaDevAttrSparseCudaArraySupported
        cudaDevAttrHostRegisterReadOnlySupported
        cudaDevAttrTimelineSemaphoreInteropSupported
        cudaDevAttrMemoryPoolsSupported
        cudaDevAttrGPUDirectRDMASupported
        cudaDevAttrGPUDirectRDMAFlushWritesOptions
        cudaDevAttrGPUDirectRDMAWritesOrdering
        cudaDevAttrMemoryPoolSupportedHandleTypes
        cudaDevAttrClusterLaunch
        cudaDevAttrDeferredMappingCudaArraySupported
        cudaDevAttrReserved122
        cudaDevAttrReserved123
        cudaDevAttrReserved124
        cudaDevAttrIpcEventSupport
        cudaDevAttrMemSyncDomainCount
        cudaDevAttrReserved127
        cudaDevAttrReserved128
        cudaDevAttrReserved129
        cudaDevAttrNumaConfig
        cudaDevAttrNumaId
        cudaDevAttrReserved132
        cudaDevAttrMpsEnabled
        cudaDevAttrHostNumaId
        cudaDevAttrD3D12CigSupported
        cudaDevAttrVulkanCigSupported
        cudaDevAttrGpuPciDeviceId
        cudaDevAttrGpuPciSubsystemId
        cudaDevAttrReserved141
        cudaDevAttrHostNumaMemoryPoolsSupported
        cudaDevAttrHostNumaMultinodeIpcSupported
        cudaDevAttrHostMemoryPoolsSupported
        cudaDevAttrReserved145
        cudaDevAttrOnlyPartialHostNativeAtomicSupported
        cudaDevAttrAtomicReductionSupported
        cudaDevAttrCigStreamsSupported
        cudaDevAttrMax
        cudaDevAttrCooperativeMultiDeviceLaunch
        cudaDevAttrMaxTimelineSemaphoreInteropSupported

cdef extern from 'driver_types.h':
    cdef enum cudaMemPoolAttr:
        cudaMemPoolReuseFollowEventDependencies
        cudaMemPoolReuseAllowOpportunistic
        cudaMemPoolReuseAllowInternalDependencies
        cudaMemPoolAttrReleaseThreshold
        cudaMemPoolAttrReservedMemCurrent
        cudaMemPoolAttrReservedMemHigh
        cudaMemPoolAttrUsedMemCurrent
        cudaMemPoolAttrUsedMemHigh
        cudaMemPoolAttrAllocationType
        cudaMemPoolAttrExportHandleTypes
        cudaMemPoolAttrLocationId
        cudaMemPoolAttrLocationType
        cudaMemPoolAttrMaxPoolSize
        cudaMemPoolAttrHwDecompressEnabled

cdef extern from 'driver_types.h':
    cdef enum cudaMemLocationType:
        cudaMemLocationTypeInvalid
        cudaMemLocationTypeNone
        cudaMemLocationTypeDevice
        cudaMemLocationTypeHost
        cudaMemLocationTypeHostNuma
        cudaMemLocationTypeHostNumaCurrent
        cudaMemLocationTypeInvisible

cdef extern from 'driver_types.h':
    cdef enum cudaMemAccessFlags:
        cudaMemAccessFlagsProtNone
        cudaMemAccessFlagsProtRead
        cudaMemAccessFlagsProtReadWrite

cdef extern from 'driver_types.h':
    cdef enum cudaMemAllocationType:
        cudaMemAllocationTypeInvalid
        cudaMemAllocationTypePinned
        cudaMemAllocationTypeManaged
        cudaMemAllocationTypeMax

cdef extern from 'driver_types.h':
    cdef enum cudaMemAllocationHandleType:
        cudaMemHandleTypeNone
        cudaMemHandleTypePosixFileDescriptor
        cudaMemHandleTypeWin32
        cudaMemHandleTypeWin32Kmt
        cudaMemHandleTypeFabric

cdef extern from 'driver_types.h':
    cdef enum cudaGraphMemAttributeType:
        cudaGraphMemAttrUsedMemCurrent
        cudaGraphMemAttrUsedMemHigh
        cudaGraphMemAttrReservedMemCurrent
        cudaGraphMemAttrReservedMemHigh

cdef extern from 'driver_types.h':
    cdef enum cudaMemcpyFlags:
        cudaMemcpyFlagDefault
        cudaMemcpyFlagPreferOverlapWithCompute

cdef extern from 'driver_types.h':
    cdef enum cudaMemcpySrcAccessOrder:
        cudaMemcpySrcAccessOrderInvalid
        cudaMemcpySrcAccessOrderStream
        cudaMemcpySrcAccessOrderDuringApiCall
        cudaMemcpySrcAccessOrderAny
        cudaMemcpySrcAccessOrderMax

cdef extern from 'driver_types.h':
    cdef enum cudaMemcpy3DOperandType:
        cudaMemcpyOperandTypePointer
        cudaMemcpyOperandTypeArray
        cudaMemcpyOperandTypeMax

cdef extern from 'driver_types.h':
    cdef enum cudaDeviceP2PAttr:
        cudaDevP2PAttrPerformanceRank
        cudaDevP2PAttrAccessSupported
        cudaDevP2PAttrNativeAtomicSupported
        cudaDevP2PAttrCudaArrayAccessSupported
        cudaDevP2PAttrOnlyPartialNativeAtomicSupported

cdef extern from 'driver_types.h':
    cdef enum cudaExternalMemoryHandleType:
        cudaExternalMemoryHandleTypeOpaqueFd
        cudaExternalMemoryHandleTypeOpaqueWin32
        cudaExternalMemoryHandleTypeOpaqueWin32Kmt
        cudaExternalMemoryHandleTypeD3D12Heap
        cudaExternalMemoryHandleTypeD3D12Resource
        cudaExternalMemoryHandleTypeD3D11Resource
        cudaExternalMemoryHandleTypeD3D11ResourceKmt
        cudaExternalMemoryHandleTypeNvSciBuf

cdef extern from 'driver_types.h':
    cdef enum cudaExternalSemaphoreHandleType:
        cudaExternalSemaphoreHandleTypeOpaqueFd
        cudaExternalSemaphoreHandleTypeOpaqueWin32
        cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt
        cudaExternalSemaphoreHandleTypeD3D12Fence
        cudaExternalSemaphoreHandleTypeD3D11Fence
        cudaExternalSemaphoreHandleTypeNvSciSync
        cudaExternalSemaphoreHandleTypeKeyedMutex
        cudaExternalSemaphoreHandleTypeKeyedMutexKmt
        cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd
        cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32

cdef extern from 'driver_types.h':
    ctypedef cudaError cudaError_t

cdef extern from 'driver_types.h':
    cdef enum cudaJitOption:
        cudaJitMaxRegisters
        cudaJitThreadsPerBlock
        cudaJitWallTime
        cudaJitInfoLogBuffer
        cudaJitInfoLogBufferSizeBytes
        cudaJitErrorLogBuffer
        cudaJitErrorLogBufferSizeBytes
        cudaJitOptimizationLevel
        cudaJitFallbackStrategy
        cudaJitGenerateDebugInfo
        cudaJitLogVerbose
        cudaJitGenerateLineInfo
        cudaJitCacheMode
        cudaJitPositionIndependentCode
        cudaJitMinCtaPerSm
        cudaJitMaxThreadsPerBlock
        cudaJitOverrideDirectiveValues

cdef extern from 'driver_types.h':
    cdef enum cudaLibraryOption:
        cudaLibraryHostUniversalFunctionAndDataTable
        cudaLibraryBinaryIsPreserved

cdef extern from 'driver_types.h':
    cdef enum cudaJit_CacheMode:
        cudaJitCacheOptionNone
        cudaJitCacheOptionCG
        cudaJitCacheOptionCA

cdef extern from 'driver_types.h':
    cdef enum cudaJit_Fallback:
        cudaPreferPtx
        cudaPreferBinary

cdef extern from 'driver_types.h':
    cdef enum cudaCGScope:
        cudaCGScopeInvalid
        cudaCGScopeGrid
        cudaCGScopeReserved
        cudaCGScopeMultiGrid

cdef extern from 'driver_types.h':
    cdef enum cudaGraphConditionalHandleFlags:
        cudaGraphCondAssignDefault

cdef extern from 'driver_types.h':
    cdef enum cudaGraphConditionalNodeType:
        cudaGraphCondTypeIf
        cudaGraphCondTypeWhile
        cudaGraphCondTypeSwitch

cdef extern from 'driver_types.h':
    cdef enum cudaGraphNodeType:
        cudaGraphNodeTypeKernel
        cudaGraphNodeTypeMemcpy
        cudaGraphNodeTypeMemset
        cudaGraphNodeTypeHost
        cudaGraphNodeTypeGraph
        cudaGraphNodeTypeEmpty
        cudaGraphNodeTypeWaitEvent
        cudaGraphNodeTypeEventRecord
        cudaGraphNodeTypeExtSemaphoreSignal
        cudaGraphNodeTypeExtSemaphoreWait
        cudaGraphNodeTypeMemAlloc
        cudaGraphNodeTypeMemFree
        cudaGraphNodeTypeConditional
        cudaGraphNodeTypeReserved16
        cudaGraphNodeTypeCount

cdef extern from 'driver_types.h':
    cdef enum cudaGraphChildGraphNodeOwnership:
        cudaGraphChildGraphOwnershipClone
        cudaGraphChildGraphOwnershipMove
        cudaGraphChildGraphOwnershipInvalid

cdef extern from 'driver_types.h':
    cdef enum cudaGraphDependencyType_enum:
        cudaGraphDependencyTypeDefault
        cudaGraphDependencyTypeProgrammatic
    ctypedef cudaGraphDependencyType_enum cudaGraphDependencyType

cdef extern from 'driver_types.h':
    cdef enum cudaGraphExecUpdateResult:
        cudaGraphExecUpdateSuccess
        cudaGraphExecUpdateError
        cudaGraphExecUpdateErrorTopologyChanged
        cudaGraphExecUpdateErrorNodeTypeChanged
        cudaGraphExecUpdateErrorFunctionChanged
        cudaGraphExecUpdateErrorParametersChanged
        cudaGraphExecUpdateErrorNotSupported
        cudaGraphExecUpdateErrorUnsupportedFunctionChange
        cudaGraphExecUpdateErrorAttributesChanged

cdef extern from 'driver_types.h':
    cdef enum cudaGraphInstantiateResult:
        cudaGraphInstantiateSuccess
        cudaGraphInstantiateError
        cudaGraphInstantiateInvalidStructure
        cudaGraphInstantiateNodeOperationNotSupported
        cudaGraphInstantiateMultipleDevicesNotSupported
        cudaGraphInstantiateConditionalHandleUnused

cdef extern from 'driver_types.h':
    cdef enum cudaGraphKernelNodeField:
        cudaGraphKernelNodeFieldInvalid
        cudaGraphKernelNodeFieldGridDim
        cudaGraphKernelNodeFieldParam
        cudaGraphKernelNodeFieldEnabled

cdef extern from 'driver_types.h':
    cdef enum cudaGetDriverEntryPointFlags:
        cudaEnableDefault
        cudaEnableLegacyStream
        cudaEnablePerThreadDefaultStream

cdef extern from 'driver_types.h':
    cdef enum cudaDriverEntryPointQueryResult:
        cudaDriverEntryPointSuccess
        cudaDriverEntryPointSymbolNotFound
        cudaDriverEntryPointVersionNotSufficent

cdef extern from 'driver_types.h':
    cdef enum cudaGraphDebugDotFlags:
        cudaGraphDebugDotFlagsVerbose
        cudaGraphDebugDotFlagsKernelNodeParams
        cudaGraphDebugDotFlagsMemcpyNodeParams
        cudaGraphDebugDotFlagsMemsetNodeParams
        cudaGraphDebugDotFlagsHostNodeParams
        cudaGraphDebugDotFlagsEventNodeParams
        cudaGraphDebugDotFlagsExtSemasSignalNodeParams
        cudaGraphDebugDotFlagsExtSemasWaitNodeParams
        cudaGraphDebugDotFlagsKernelNodeAttributes
        cudaGraphDebugDotFlagsHandles
        cudaGraphDebugDotFlagsConditionalNodeParams

cdef extern from 'driver_types.h':
    cdef enum cudaGraphInstantiateFlags:
        cudaGraphInstantiateFlagAutoFreeOnLaunch
        cudaGraphInstantiateFlagUpload
        cudaGraphInstantiateFlagDeviceLaunch
        cudaGraphInstantiateFlagUseNodePriority

cdef extern from 'driver_types.h':
    cdef enum cudaLaunchMemSyncDomain:
        cudaLaunchMemSyncDomainDefault
        cudaLaunchMemSyncDomainRemote

cdef extern from 'driver_types.h':
    cdef enum cudaLaunchAttributeID:
        cudaLaunchAttributeIgnore
        cudaLaunchAttributeAccessPolicyWindow
        cudaLaunchAttributeCooperative
        cudaLaunchAttributeSynchronizationPolicy
        cudaLaunchAttributeClusterDimension
        cudaLaunchAttributeClusterSchedulingPolicyPreference
        cudaLaunchAttributeProgrammaticStreamSerialization
        cudaLaunchAttributeProgrammaticEvent
        cudaLaunchAttributePriority
        cudaLaunchAttributeMemSyncDomainMap
        cudaLaunchAttributeMemSyncDomain
        cudaLaunchAttributePreferredClusterDimension
        cudaLaunchAttributeLaunchCompletionEvent
        cudaLaunchAttributeDeviceUpdatableKernelNode
        cudaLaunchAttributePreferredSharedMemoryCarveout
        cudaLaunchAttributeNvlinkUtilCentricScheduling
        cudaLaunchAttributePortableClusterSizeMode
        cudaLaunchAttributeSharedMemoryMode

cdef extern from 'driver_types.h':
    cdef enum cudaDeviceNumaConfig:
        cudaDeviceNumaConfigNone
        cudaDeviceNumaConfigNumaNode

cdef extern from 'driver_types.h':
    cdef enum cudaAsyncNotificationType_enum:
        cudaAsyncNotificationTypeOverBudget
    ctypedef cudaAsyncNotificationType_enum cudaAsyncNotificationType

cdef extern from 'device_types.h':
    cdef enum cudaRoundMode:
        cudaRoundNearest
        cudaRoundZero
        cudaRoundPosInf
        cudaRoundMinInf

cdef extern from 'surface_types.h':
    cdef enum cudaSurfaceBoundaryMode:
        cudaBoundaryModeZero
        cudaBoundaryModeClamp
        cudaBoundaryModeTrap

cdef extern from 'surface_types.h':
    cdef enum cudaSurfaceFormatMode:
        cudaFormatModeForced
        cudaFormatModeAuto

cdef extern from 'texture_types.h':
    cdef enum cudaTextureAddressMode:
        cudaAddressModeWrap
        cudaAddressModeClamp
        cudaAddressModeMirror
        cudaAddressModeBorder

cdef extern from 'texture_types.h':
    cdef enum cudaTextureFilterMode:
        cudaFilterModePoint
        cudaFilterModeLinear

cdef extern from 'texture_types.h':
    cdef enum cudaTextureReadMode:
        cudaReadModeElementType
        cudaReadModeNormalizedFloat

cdef extern from 'library_types.h':
    cdef enum cudaDataType_t:
        CUDA_R_16F
        CUDA_C_16F
        CUDA_R_16BF
        CUDA_C_16BF
        CUDA_R_32F
        CUDA_C_32F
        CUDA_R_64F
        CUDA_C_64F
        CUDA_R_4I
        CUDA_C_4I
        CUDA_R_4U
        CUDA_C_4U
        CUDA_R_8I
        CUDA_C_8I
        CUDA_R_8U
        CUDA_C_8U
        CUDA_R_16I
        CUDA_C_16I
        CUDA_R_16U
        CUDA_C_16U
        CUDA_R_32I
        CUDA_C_32I
        CUDA_R_32U
        CUDA_C_32U
        CUDA_R_64I
        CUDA_C_64I
        CUDA_R_64U
        CUDA_C_64U
        CUDA_R_8F_E4M3
        CUDA_R_8F_UE4M3
        CUDA_R_8F_E5M2
        CUDA_R_8F_UE8M0
        CUDA_R_6F_E2M3
        CUDA_R_6F_E3M2
        CUDA_R_4F_E2M1
    ctypedef cudaDataType_t cudaDataType

cdef enum cudaEglFrameType_enum:
    cudaEglFrameTypeArray = 0
    cudaEglFrameTypePitch = 1
ctypedef cudaEglFrameType_enum cudaEglFrameType

cdef enum cudaEglResourceLocationFlags_enum:
    cudaEglResourceLocationSysmem = 0x00
    cudaEglResourceLocationVidmem = 0x01
ctypedef cudaEglResourceLocationFlags_enum cudaEglResourceLocationFlags

cdef enum cudaEglColorFormat_enum:
    cudaEglColorFormatYUV420Planar = 0
    cudaEglColorFormatYUV420SemiPlanar = 1
    cudaEglColorFormatYUV422Planar = 2
    cudaEglColorFormatYUV422SemiPlanar = 3
    cudaEglColorFormatARGB = 6
    cudaEglColorFormatRGBA = 7
    cudaEglColorFormatL = 8
    cudaEglColorFormatR = 9
    cudaEglColorFormatYUV444Planar = 10
    cudaEglColorFormatYUV444SemiPlanar = 11
    cudaEglColorFormatYUYV422 = 12
    cudaEglColorFormatUYVY422 = 13
    cudaEglColorFormatABGR = 14
    cudaEglColorFormatBGRA = 15
    cudaEglColorFormatA = 16
    cudaEglColorFormatRG = 17
    cudaEglColorFormatAYUV = 18
    cudaEglColorFormatYVU444SemiPlanar = 19
    cudaEglColorFormatYVU422SemiPlanar = 20
    cudaEglColorFormatYVU420SemiPlanar = 21
    cudaEglColorFormatY10V10U10_444SemiPlanar = 22
    cudaEglColorFormatY10V10U10_420SemiPlanar = 23
    cudaEglColorFormatY12V12U12_444SemiPlanar = 24
    cudaEglColorFormatY12V12U12_420SemiPlanar = 25
    cudaEglColorFormatVYUY_ER = 26
    cudaEglColorFormatUYVY_ER = 27
    cudaEglColorFormatYUYV_ER = 28
    cudaEglColorFormatYVYU_ER = 29
    cudaEglColorFormatYUVA_ER = 31
    cudaEglColorFormatAYUV_ER = 32
    cudaEglColorFormatYUV444Planar_ER = 33
    cudaEglColorFormatYUV422Planar_ER = 34
    cudaEglColorFormatYUV420Planar_ER = 35
    cudaEglColorFormatYUV444SemiPlanar_ER = 36
    cudaEglColorFormatYUV422SemiPlanar_ER = 37
    cudaEglColorFormatYUV420SemiPlanar_ER = 38
    cudaEglColorFormatYVU444Planar_ER = 39
    cudaEglColorFormatYVU422Planar_ER = 40
    cudaEglColorFormatYVU420Planar_ER = 41
    cudaEglColorFormatYVU444SemiPlanar_ER = 42
    cudaEglColorFormatYVU422SemiPlanar_ER = 43
    cudaEglColorFormatYVU420SemiPlanar_ER = 44
    cudaEglColorFormatBayerRGGB = 45
    cudaEglColorFormatBayerBGGR = 46
    cudaEglColorFormatBayerGRBG = 47
    cudaEglColorFormatBayerGBRG = 48
    cudaEglColorFormatBayer10RGGB = 49
    cudaEglColorFormatBayer10BGGR = 50
    cudaEglColorFormatBayer10GRBG = 51
    cudaEglColorFormatBayer10GBRG = 52
    cudaEglColorFormatBayer12RGGB = 53
    cudaEglColorFormatBayer12BGGR = 54
    cudaEglColorFormatBayer12GRBG = 55
    cudaEglColorFormatBayer12GBRG = 56
    cudaEglColorFormatBayer14RGGB = 57
    cudaEglColorFormatBayer14BGGR = 58
    cudaEglColorFormatBayer14GRBG = 59
    cudaEglColorFormatBayer14GBRG = 60
    cudaEglColorFormatBayer20RGGB = 61
    cudaEglColorFormatBayer20BGGR = 62
    cudaEglColorFormatBayer20GRBG = 63
    cudaEglColorFormatBayer20GBRG = 64
    cudaEglColorFormatYVU444Planar = 65
    cudaEglColorFormatYVU422Planar = 66
    cudaEglColorFormatYVU420Planar = 67
    cudaEglColorFormatBayerIspRGGB = 68
    cudaEglColorFormatBayerIspBGGR = 69
    cudaEglColorFormatBayerIspGRBG = 70
    cudaEglColorFormatBayerIspGBRG = 71
    cudaEglColorFormatBayerBCCR = 72
    cudaEglColorFormatBayerRCCB = 73
    cudaEglColorFormatBayerCRBC = 74
    cudaEglColorFormatBayerCBRC = 75
    cudaEglColorFormatBayer10CCCC = 76
    cudaEglColorFormatBayer12BCCR = 77
    cudaEglColorFormatBayer12RCCB = 78
    cudaEglColorFormatBayer12CRBC = 79
    cudaEglColorFormatBayer12CBRC = 80
    cudaEglColorFormatBayer12CCCC = 81
    cudaEglColorFormatY = 82
    cudaEglColorFormatYUV420SemiPlanar_2020 = 83
    cudaEglColorFormatYVU420SemiPlanar_2020 = 84
    cudaEglColorFormatYUV420Planar_2020 = 85
    cudaEglColorFormatYVU420Planar_2020 = 86
    cudaEglColorFormatYUV420SemiPlanar_709 = 87
    cudaEglColorFormatYVU420SemiPlanar_709 = 88
    cudaEglColorFormatYUV420Planar_709 = 89
    cudaEglColorFormatYVU420Planar_709 = 90
    cudaEglColorFormatY10V10U10_420SemiPlanar_709 = 91
    cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = 92
    cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = 93
    cudaEglColorFormatY10V10U10_422SemiPlanar = 94
    cudaEglColorFormatY10V10U10_422SemiPlanar_709 = 95
    cudaEglColorFormatY_ER = 96
    cudaEglColorFormatY_709_ER = 97
    cudaEglColorFormatY10_ER = 98
    cudaEglColorFormatY10_709_ER = 99
    cudaEglColorFormatY12_ER = 100
    cudaEglColorFormatY12_709_ER = 101
    cudaEglColorFormatYUVA = 102
    cudaEglColorFormatYVYU = 104
    cudaEglColorFormatVYUY = 105
    cudaEglColorFormatY10V10U10_420SemiPlanar_ER = 106
    cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = 107
    cudaEglColorFormatY10V10U10_444SemiPlanar_ER = 108
    cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = 109
    cudaEglColorFormatY12V12U12_420SemiPlanar_ER = 110
    cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = 111
    cudaEglColorFormatY12V12U12_444SemiPlanar_ER = 112
    cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = 113
    cudaEglColorFormatUYVY709 = 114
    cudaEglColorFormatUYVY709_ER = 115
    cudaEglColorFormatUYVY2020 = 116
ctypedef cudaEglColorFormat_enum cudaEglColorFormat

cdef enum cudaGLDeviceList:
    cudaGLDeviceListAll = 1
    cudaGLDeviceListCurrentFrame = 2
    cudaGLDeviceListNextFrame = 3

cdef enum cudaGLMapFlags:
    cudaGLMapFlagsNone = 0
    cudaGLMapFlagsReadOnly = 1
    cudaGLMapFlagsWriteDiscard = 2

cdef extern from 'driver_types.h':
    cdef enum cudaAtomicOperation:
        cudaAtomicOperationIntegerAdd
        cudaAtomicOperationIntegerMin
        cudaAtomicOperationIntegerMax
        cudaAtomicOperationIntegerIncrement
        cudaAtomicOperationIntegerDecrement
        cudaAtomicOperationAnd
        cudaAtomicOperationOr
        cudaAtomicOperationXOR
        cudaAtomicOperationExchange
        cudaAtomicOperationCAS
        cudaAtomicOperationFloatAdd
        cudaAtomicOperationFloatMin
        cudaAtomicOperationFloatMax

cdef extern from 'driver_types.h':
    cdef enum cudaAtomicOperationCapability:
        cudaAtomicCapabilitySigned
        cudaAtomicCapabilityUnsigned
        cudaAtomicCapabilityReduction
        cudaAtomicCapabilityScalar32
        cudaAtomicCapabilityScalar64
        cudaAtomicCapabilityScalar128
        cudaAtomicCapabilityVector32x4

cdef extern from 'driver_types.h':
    cdef enum CUDAlogLevel_enum:
        cudaLogLevelError
        cudaLogLevelWarning
    ctypedef CUDAlogLevel_enum cudaLogLevel

cdef extern from 'library_types.h':
    cdef enum cudaEmulationStrategy_t:
        CUDA_EMULATION_STRATEGY_DEFAULT
        CUDA_EMULATION_STRATEGY_PERFORMANT
        CUDA_EMULATION_STRATEGY_EAGER
    ctypedef cudaEmulationStrategy_t cudaEmulationStrategy

cdef extern from 'library_types.h':
    cdef enum cudaEmulationMantissaControl_t:
        CUDA_EMULATION_MANTISSA_CONTROL_DYNAMIC
        CUDA_EMULATION_MANTISSA_CONTROL_FIXED
    ctypedef cudaEmulationMantissaControl_t cudaEmulationMantissaControl

cdef extern from 'library_types.h':
    cdef enum cudaEmulationSpecialValuesSupport_t:
        CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_DEFAULT
        CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_NONE
        CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_INFINITY
        CUDA_EMULATION_SPECIAL_VALUES_SUPPORT_NAN
    ctypedef cudaEmulationSpecialValuesSupport_t cudaEmulationSpecialValuesSupport

cdef extern from 'driver_types.h':
    cdef enum cudaDevSmResourceGroup_flags:
        cudaDevSmResourceGroupDefault
        cudaDevSmResourceGroupBackfill

cdef extern from 'driver_types.h':
    cdef enum cudaDevSmResourceSplitByCount_flags:
        cudaDevSmResourceSplitIgnoreSmCoscheduling
        cudaDevSmResourceSplitMaxPotentialClusterSize

cdef extern from 'driver_types.h':
    cdef enum cudaDevResourceType:
        cudaDevResourceTypeInvalid
        cudaDevResourceTypeSm
        cudaDevResourceTypeWorkqueueConfig
        cudaDevResourceTypeWorkqueue

cdef extern from 'driver_types.h':
    cdef enum cudaDevWorkqueueConfigScope:
        cudaDevWorkqueueConfigScopeDeviceCtx
        cudaDevWorkqueueConfigScopeGreenCtxBalanced

cdef extern from 'driver_types.h':
    cdef enum cudaHostTaskSyncMode:
        cudaHostTaskBlocking
        cudaHostTaskSpinWait

cdef extern from 'driver_types.h':
    cdef enum cudaKernelFunctionType:
        cudaKernelFunctionTypeUnspecified
        cudaKernelFunctionTypeDeviceEntry
        cudaKernelFunctionTypeKernel
        cudaKernelFunctionTypeFunction

cdef extern from 'driver_types.h':
    cdef enum cudaLaunchAttributePortableClusterMode:
        cudaLaunchPortableClusterModeDefault
        cudaLaunchPortableClusterModeRequirePortable
        cudaLaunchPortableClusterModeAllowNonPortable

cdef extern from 'driver_types.h':
    cdef enum cudaSharedMemoryMode:
        cudaSharedMemoryModeDefault
        cudaSharedMemoryModeRequirePortable
        cudaSharedMemoryModeAllowNonPortable

cdef extern from 'driver_types.h':
    cdef enum cudaGraphRecaptureStatus:
        cudaGraphRecaptureEligibleForUpdate
        cudaGraphRecaptureIneligibleForUpdate
        cudaGraphRecaptureError

cdef extern from 'driver_types.h':
    cdef enum cudaFabricOpStatusSource:
        cudaFabricOpStatusSourceMbarrierV1
        cudaFabricOpStatusSourceMax

cdef extern from 'driver_types.h':
    cdef enum cudaFabricOpStatusInfo:
        cudaFabricOpStatusInfoSuccess
        cudaFabricOpStatusInfoLast
        cudaFabricOpStatusInfoMax
cdef enum: _CUDAERROR_T_INTERNAL_LOADING_ERROR = cudaError_t.cudaErrorCallRequiresNewerDriver


# TYPES
cdef extern from 'driver_types.h':
    ctypedef unsigned long long cudaGraphConditionalHandle 'cudaGraphConditionalHandle'


cdef extern from 'surface_types.h':
    ctypedef unsigned long long cudaSurfaceObject_t 'cudaSurfaceObject_t'


cdef extern from 'texture_types.h':
    ctypedef unsigned long long cudaTextureObject_t 'cudaTextureObject_t'


cdef extern from 'driver_types.h':
    ctypedef unsigned int cudaLogIterator 'cudaLogIterator'


cdef extern from 'driver_types.h':
    ctypedef struct cudaArray:
        pass
    ctypedef cudaArray* cudaArray_t 'cudaArray_t'


cdef extern from 'driver_types.h':
    ctypedef struct cudaArray:
        pass
    ctypedef cudaArray* cudaArray_const_t 'cudaArray_const_t'


cdef extern from 'driver_types.h':
    ctypedef struct cudaMipmappedArray:
        pass
    ctypedef cudaMipmappedArray* cudaMipmappedArray_t 'cudaMipmappedArray_t'


cdef extern from 'driver_types.h':
    ctypedef struct cudaMipmappedArray:
        pass
    ctypedef cudaMipmappedArray* cudaMipmappedArray_const_t 'cudaMipmappedArray_const_t'


cdef extern from 'driver_types.h':
    ctypedef struct cudaAsyncCallbackEntry:
        pass
    ctypedef cudaAsyncCallbackEntry* cudaAsyncCallbackHandle_t 'cudaAsyncCallbackHandle_t'


cdef extern from 'driver_types.h':
    cdef struct cudaChannelFormatDesc:
        int x
        int y
        int z
        int w
        cudaChannelFormatKind f

cdef struct cuda_bindings_runtime__anon_pod0:
    unsigned int width
    unsigned int height
    unsigned int depth

cdef extern from 'driver_types.h':
    cdef struct cudaArrayMemoryRequirements:
        size_t size
        size_t alignment
        unsigned int reserved[4]

cdef extern from 'driver_types.h':
    cdef struct cudaPitchedPtr:
        void* ptr
        size_t pitch
        size_t xsize
        size_t ysize

cdef extern from 'driver_types.h':
    cdef struct cudaExtent:
        size_t width
        size_t height
        size_t depth

cdef extern from 'driver_types.h':
    cdef struct cudaPos:
        size_t x
        size_t y
        size_t z

cdef extern from 'driver_types.h':
    cdef struct cudaMemsetParams:
        void* dst
        size_t pitch
        unsigned int value
        unsigned int elementSize
        size_t width
        size_t height

cdef extern from 'driver_types.h':
    cdef struct cudaAccessPolicyWindow:
        void* base_ptr
        size_t num_bytes
        float hitRatio
        cudaAccessProperty hitProp
        cudaAccessProperty missProp

cdef extern from 'driver_types.h':
    ctypedef void (*cudaHostFn_t 'cudaHostFn_t')(
        void* userData
    )


cdef struct cuda_bindings_runtime__anon_pod6:
    int reserved[32]

cdef extern from 'driver_types.h':
    cdef struct cudaResourceViewDesc:
        cudaResourceViewFormat format
        size_t width
        size_t height
        size_t depth
        unsigned int firstMipmapLevel
        unsigned int lastMipmapLevel
        unsigned int firstLayer
        unsigned int lastLayer
        unsigned int reserved[16]

cdef extern from 'driver_types.h':
    cdef struct cudaPointerAttributes:
        cudaMemoryType type
        int device
        void* devicePointer
        void* hostPointer
        long reserved[8]

cdef extern from 'driver_types.h':
    cdef struct cudaFuncAttributes:
        size_t sharedSizeBytes
        size_t constSizeBytes
        size_t localSizeBytes
        int maxThreadsPerBlock
        int numRegs
        int ptxVersion
        int binaryVersion
        int cacheModeCA
        int maxDynamicSharedSizeBytes
        int preferredShmemCarveout
        int clusterDimMustBeSet
        int requiredClusterWidth
        int requiredClusterHeight
        int requiredClusterDepth
        int clusterSchedulingPolicyPreference
        int nonPortableClusterSizeAllowed
        int deviceNodeUpdateStatus
        int reserved1
        int reserved[14]

cdef extern from 'driver_types.h':
    cdef struct cudaMemPoolPtrExportData:
        unsigned char reserved[64]

cdef extern from 'driver_types.h':
    cdef struct cudaMemFreeNodeParams:
        void* dptr

cdef extern from 'driver_types.h':
    cdef struct cudaOffset3D:
        size_t x
        size_t y
        size_t z

cdef extern from 'driver_types.h':
    cdef struct cudaDeviceProp:
        char name[256]
        cudaUUID_t uuid
        char luid[8]
        unsigned int luidDeviceNodeMask
        size_t totalGlobalMem
        size_t sharedMemPerBlock
        int regsPerBlock
        int warpSize
        size_t memPitch
        int maxThreadsPerBlock
        int maxThreadsDim[3]
        int maxGridSize[3]
        size_t totalConstMem
        int major
        int minor
        size_t textureAlignment
        size_t texturePitchAlignment
        int multiProcessorCount
        int integrated
        int canMapHostMemory
        int maxTexture1D
        int maxTexture1DMipmap
        int maxTexture2D[2]
        int maxTexture2DMipmap[2]
        int maxTexture2DLinear[3]
        int maxTexture2DGather[2]
        int maxTexture3D[3]
        int maxTexture3DAlt[3]
        int maxTextureCubemap
        int maxTexture1DLayered[2]
        int maxTexture2DLayered[3]
        int maxTextureCubemapLayered[2]
        int maxSurface1D
        int maxSurface2D[2]
        int maxSurface3D[3]
        int maxSurface1DLayered[2]
        int maxSurface2DLayered[3]
        int maxSurfaceCubemap
        int maxSurfaceCubemapLayered[2]
        size_t surfaceAlignment
        int concurrentKernels
        int ECCEnabled
        int pciBusID
        int pciDeviceID
        int pciDomainID
        int tccDriver
        int asyncEngineCount
        int unifiedAddressing
        int memoryBusWidth
        int l2CacheSize
        int persistingL2CacheMaxSize
        int maxThreadsPerMultiProcessor
        int streamPrioritiesSupported
        int globalL1CacheSupported
        int localL1CacheSupported
        size_t sharedMemPerMultiprocessor
        int regsPerMultiprocessor
        int managedMemory
        int isMultiGpuBoard
        int multiGpuBoardGroupID
        int hostNativeAtomicSupported
        int pageableMemoryAccess
        int concurrentManagedAccess
        int computePreemptionSupported
        int canUseHostPointerForRegisteredMem
        int cooperativeLaunch
        size_t sharedMemPerBlockOptin
        int pageableMemoryAccessUsesHostPageTables
        int directManagedMemAccessFromHost
        int maxBlocksPerMultiProcessor
        int accessPolicyMaxWindowSize
        size_t reservedSharedMemPerBlock
        int hostRegisterSupported
        int sparseCudaArraySupported
        int hostRegisterReadOnlySupported
        int timelineSemaphoreInteropSupported
        int memoryPoolsSupported
        int gpuDirectRDMASupported
        unsigned int gpuDirectRDMAFlushWritesOptions
        int gpuDirectRDMAWritesOrdering
        unsigned int memoryPoolSupportedHandleTypes
        int deferredMappingCudaArraySupported
        int ipcEventSupported
        int clusterLaunch
        int unifiedFunctionPointers
        int deviceNumaConfig
        int deviceNumaId
        int mpsEnabled
        int hostNumaId
        unsigned int gpuPciDeviceID
        unsigned int gpuPciSubsystemID
        int hostNumaMultinodeIpcSupported
        int reserved[56]

cdef extern from 'driver_types.h':
    cdef struct cudaIpcEventHandle_st:
        char reserved[64]
    ctypedef cudaIpcEventHandle_st cudaIpcEventHandle_t

cdef extern from 'driver_types.h':
    cdef struct cudaIpcMemHandle_st:
        char reserved[64]
    ctypedef cudaIpcMemHandle_st cudaIpcMemHandle_t

cdef extern from 'driver_types.h':
    cdef struct cudaMemFabricHandle_st:
        char reserved[64]
    ctypedef cudaMemFabricHandle_st cudaMemFabricHandle_t

cdef struct cuda_bindings_runtime__anon_pod12:
    void* handle
    void* name

cdef extern from 'driver_types.h':
    cdef struct cudaExternalMemoryBufferDesc:
        unsigned long long offset
        unsigned long long size
        unsigned int flags
        unsigned int reserved[16]

cdef struct cuda_bindings_runtime__anon_pod14:
    void* handle
    void* name

cdef struct cuda_bindings_runtime__anon_pod16:
    unsigned long long value

cdef union cuda_bindings_runtime__anon_pod17:
    void* fence
    unsigned long long reserved

cdef struct cuda_bindings_runtime__anon_pod18:
    unsigned long long key

cdef struct cuda_bindings_runtime__anon_pod20:
    unsigned long long value

cdef union cuda_bindings_runtime__anon_pod21:
    void* fence
    unsigned long long reserved

cdef struct cuda_bindings_runtime__anon_pod22:
    unsigned long long key
    unsigned int timeoutMs

cdef extern from 'driver_types.h':
    cdef struct cudaKernelNodeParams:
        void* func
        dim3 gridDim
        dim3 blockDim
        unsigned int sharedMemBytes
        void** kernelParams
        void** extra

cdef extern from 'driver_types.h':
    cdef struct cudaGraphEdgeData_st:
        unsigned char from_port
        unsigned char to_port
        unsigned char type
        unsigned char reserved[5]
    ctypedef cudaGraphEdgeData_st cudaGraphEdgeData

cdef struct cuda_bindings_runtime__anon_pod26:
    void* pValue
    size_t offset
    size_t size

cdef extern from 'driver_types.h':
    cdef struct cudaLaunchMemSyncDomainMap_st:
        unsigned char default_
        unsigned char remote
    ctypedef cudaLaunchMemSyncDomainMap_st cudaLaunchMemSyncDomainMap

cdef struct cuda_bindings_runtime__anon_pod27:
    unsigned int x
    unsigned int y
    unsigned int z

cdef struct cuda_bindings_runtime__anon_pod29:
    unsigned int x
    unsigned int y
    unsigned int z

cdef struct cuda_bindings_runtime__anon_pod33:
    unsigned long long bytesOverBudget

cdef extern from '':
    cdef struct cudaTextureDesc:
        cudaTextureAddressMode addressMode[3]
        cudaTextureFilterMode filterMode
        cudaTextureReadMode readMode
        int sRGB
        float borderColor[4]
        int normalizedCoords
        unsigned int maxAnisotropy
        cudaTextureFilterMode mipmapFilterMode
        float mipmapLevelBias
        float minMipmapLevelClamp
        float maxMipmapLevelClamp
        int disableTrilinearOptimization
        int seamlessCubemap

cdef extern from 'driver_types.h':
    cdef struct cudaDevSmResource:
        unsigned int smCount
        unsigned int minSmPartitionSize
        unsigned int smCoscheduledAlignment
        unsigned int flags

cdef extern from 'driver_types.h':
    cdef struct cudaDevWorkqueueConfigResource:
        int device
        unsigned int wqConcurrencyLimit
        cudaDevWorkqueueConfigScope sharingScope

cdef extern from 'driver_types.h':
    cdef struct cudaDevWorkqueueResource:
        unsigned char reserved[40]

cdef extern from 'driver_types.h':
    cdef struct cudaDevSmResourceGroupParams_st:
        unsigned int smCount
        unsigned int coscheduledSmCount
        unsigned int preferredCoscheduledSmCount
        unsigned int flags
        unsigned int reserved[12]
    ctypedef cudaDevSmResourceGroupParams_st cudaDevSmResourceGroupParams

cdef extern from 'cuda_runtime_api.h':
    ctypedef void (*cudaLogsCallback_t 'cudaLogsCallback_t')(
        void* data,
        cudaLogLevel logLevel,
        char* message,
        size_t length
    )


cdef struct cuda_bindings_runtime__anon_pod2:
    cudaArray_t array

cdef struct cuda_bindings_runtime__anon_pod3:
    cudaMipmappedArray_t mipmap

cdef extern from 'cuda_runtime_api.h':
    ctypedef void (*cudaStreamCallback_t 'cudaStreamCallback_t')(
        cudaStream_t stream,
        cudaError_t status,
        void* userData
    )


cdef extern from 'driver_types.h':
    cdef struct cudaEventRecordNodeParams:
        cudaEvent_t event

cdef extern from 'driver_types.h':
    cdef struct cudaEventWaitNodeParams:
        cudaEvent_t event

cdef struct cuda_bindings_runtime__anon_pod28:
    cudaEvent_t event
    int flags
    int triggerAtBlockStart

cdef struct cuda_bindings_runtime__anon_pod30:
    cudaEvent_t event
    int flags

cdef extern from 'driver_types.h':
    cdef struct cudaChildGraphNodeParams:
        cudaGraph_t graph
        cudaGraphChildGraphNodeOwnership ownership

cdef extern from 'driver_types.h':
    cdef struct cudaGraphInstantiateParams_st:
        unsigned long long flags
        cudaStream_t uploadStream
        cudaGraphNode_t errNode_out
        cudaGraphInstantiateResult result_out
    ctypedef cudaGraphInstantiateParams_st cudaGraphInstantiateParams

cdef extern from 'driver_types.h':
    cdef struct cudaGraphExecUpdateResultInfo_st:
        cudaGraphExecUpdateResult result
        cudaGraphNode_t errorNode
        cudaGraphNode_t errorFromNode
    ctypedef cudaGraphExecUpdateResultInfo_st cudaGraphExecUpdateResultInfo

cdef struct cuda_bindings_runtime__anon_pod31:
    int deviceUpdatable
    cudaGraphDeviceNode_t devNode

cdef extern from 'driver_types.h':
    cdef struct cudaMemsetParamsV2:
        void* dst
        size_t pitch
        unsigned int value
        unsigned int elementSize
        size_t width
        size_t height
        cudaExecutionContext_t ctx

cdef extern from 'driver_types.h':
    cdef struct cudaConditionalNodeParams:
        cudaGraphConditionalHandle handle
        cudaGraphConditionalNodeType type
        unsigned int size
        cudaGraph_t* phGraph_out
        cudaExecutionContext_t ctx

cdef struct cuda_bindings_runtime__anon_pod4:
    void* devPtr
    cudaChannelFormatDesc desc
    size_t sizeInBytes

cdef struct cuda_bindings_runtime__anon_pod5:
    void* devPtr
    cudaChannelFormatDesc desc
    size_t width
    size_t height
    size_t pitchInBytes

cdef struct cudaEglPlaneDesc_st:
    unsigned int width
    unsigned int height
    unsigned int depth
    unsigned int pitch
    unsigned int numChannels
    cudaChannelFormatDesc channelDesc
    unsigned int reserved[4]
ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc

cdef extern from 'driver_types.h':
    cdef struct cudaArraySparseProperties:
        cuda_bindings_runtime__anon_pod0 tileExtent
        unsigned int miptailFirstLevel
        unsigned long long miptailSize
        unsigned int flags
        unsigned int reserved[4]

cdef union cuda_bindings_runtime__anon_pod34:
    cudaArray_t pArray[3]
    cudaPitchedPtr pPitch[3]

cdef extern from 'driver_types.h':
    cdef struct cudaExternalMemoryMipmappedArrayDesc:
        unsigned long long offset
        cudaChannelFormatDesc formatDesc
        cudaExtent extent
        unsigned int flags
        unsigned int numLevels
        unsigned int reserved[16]

cdef extern from 'driver_types.h':
    cdef struct cudaMemcpy3DParms:
        cudaArray_t srcArray
        cudaPos srcPos
        cudaPitchedPtr srcPtr
        cudaArray_t dstArray
        cudaPos dstPos
        cudaPitchedPtr dstPtr
        cudaExtent extent
        cudaMemcpyKind kind

cdef extern from 'driver_types.h':
    cdef struct cudaMemcpy3DPeerParms:
        cudaArray_t srcArray
        cudaPos srcPos
        cudaPitchedPtr srcPtr
        int srcDevice
        cudaArray_t dstArray
        cudaPos dstPos
        cudaPitchedPtr dstPtr
        int dstDevice
        cudaExtent extent

cdef extern from 'driver_types.h':
    cdef struct cudaHostNodeParams:
        cudaHostFn_t fn
        void* userData

cdef extern from 'driver_types.h':
    cdef struct cudaHostNodeParamsV2:
        cudaHostFn_t fn
        void* userData
        unsigned int syncMode

cdef extern from 'driver_types.h':
    cdef struct cudaMemLocation:
        cudaMemLocationType type
        int id

cdef struct cuda_bindings_runtime__anon_pod10:
    cudaArray_t array
    cudaOffset3D offset

cdef union cuda_bindings_runtime__anon_pod11:
    int fd
    cuda_bindings_runtime__anon_pod12 win32
    void* nvSciBufObject

cdef union cuda_bindings_runtime__anon_pod13:
    int fd
    cuda_bindings_runtime__anon_pod14 win32
    void* nvSciSyncObj

cdef struct cuda_bindings_runtime__anon_pod15:
    cuda_bindings_runtime__anon_pod16 fence
    cuda_bindings_runtime__anon_pod17 nvSciSync
    cuda_bindings_runtime__anon_pod18 keyedMutex
    unsigned int reserved[12]

cdef struct cuda_bindings_runtime__anon_pod19:
    cuda_bindings_runtime__anon_pod20 fence
    cuda_bindings_runtime__anon_pod21 nvSciSync
    cuda_bindings_runtime__anon_pod22 keyedMutex
    unsigned int reserved[10]

cdef union cuda_bindings_runtime__anon_pod25:
    dim3 gridDim
    cuda_bindings_runtime__anon_pod26 param
    unsigned int isEnabled

cdef union cuda_bindings_runtime__anon_pod32:
    cuda_bindings_runtime__anon_pod33 overBudget

cdef extern from 'driver_types.h':
    cdef struct cudaKernelNodeParamsV2:
        void* func
        cudaKernel_t kern
        cudaFunction_t cuFunc
        dim3 gridDim
        dim3 blockDim
        unsigned int sharedMemBytes
        void** kernelParams
        void** extra
        cudaExecutionContext_t ctx
        cudaKernelFunctionType functionType

cdef extern from 'driver_types.h':
    cdef union cudaLaunchAttributeValue:
        char pad[64]
        cudaAccessPolicyWindow accessPolicyWindow
        int cooperative
        cudaSynchronizationPolicy syncPolicy
        cuda_bindings_runtime__anon_pod27 clusterDim
        cudaClusterSchedulingPolicy clusterSchedulingPolicyPreference
        int programmaticStreamSerializationAllowed
        cuda_bindings_runtime__anon_pod28 programmaticEvent
        int priority
        cudaLaunchMemSyncDomainMap memSyncDomainMap
        cudaLaunchMemSyncDomain memSyncDomain
        cuda_bindings_runtime__anon_pod29 preferredClusterDim
        cuda_bindings_runtime__anon_pod30 launchCompletionEvent
        cuda_bindings_runtime__anon_pod31 deviceUpdatableKernelNode
        unsigned int sharedMemCarveout
        unsigned int nvlinkUtilCentricScheduling
        cudaLaunchAttributePortableClusterMode portableClusterSizeMode
        cudaSharedMemoryMode sharedMemoryMode

cdef union cuda_bindings_runtime__anon_pod1:
    cuda_bindings_runtime__anon_pod2 array
    cuda_bindings_runtime__anon_pod3 mipmap
    cuda_bindings_runtime__anon_pod4 linear
    cuda_bindings_runtime__anon_pod5 pitch2D
    cuda_bindings_runtime__anon_pod6 reserved

cdef struct cudaEglFrame_st:
    cuda_bindings_runtime__anon_pod34 frame
    cudaEglPlaneDesc planeDesc[3]
    unsigned int planeCount
    cudaEglFrameType frameType
    cudaEglColorFormat eglColorFormat
ctypedef cudaEglFrame_st cudaEglFrame

cdef extern from 'driver_types.h':
    cdef struct cudaMemcpyNodeParams:
        int flags
        int reserved
        cudaExecutionContext_t ctx
        cudaMemcpy3DParms copyParams

cdef extern from 'driver_types.h':
    cdef struct cudaMemAccessDesc:
        cudaMemLocation location
        cudaMemAccessFlags flags

cdef extern from 'driver_types.h':
    cdef struct cudaMemPoolProps:
        cudaMemAllocationType allocType
        cudaMemAllocationHandleType handleTypes
        cudaMemLocation location
        void* win32SecurityAttributes
        size_t maxSize
        unsigned short usage
        unsigned char reserved[54]

cdef extern from 'driver_types.h':
    cdef struct cudaMemcpyAttributes:
        cudaMemcpySrcAccessOrder srcAccessOrder
        cudaMemLocation srcLocHint
        cudaMemLocation dstLocHint
        unsigned int flags

cdef struct cuda_bindings_runtime__anon_pod9:
    void* ptr
    size_t rowLength
    size_t layerHeight
    cudaMemLocation locHint

cdef extern from 'driver_types.h':
    cdef struct cudaExternalMemoryHandleDesc:
        cudaExternalMemoryHandleType type
        cuda_bindings_runtime__anon_pod11 handle
        unsigned long long size
        unsigned int flags
        unsigned int reserved[16]

cdef extern from 'driver_types.h':
    cdef struct cudaExternalSemaphoreHandleDesc:
        cudaExternalSemaphoreHandleType type
        cuda_bindings_runtime__anon_pod13 handle
        unsigned int flags
        unsigned int reserved[16]

cdef extern from 'driver_types.h':
    cdef struct cudaExternalSemaphoreSignalParams:
        cuda_bindings_runtime__anon_pod15 params
        unsigned int flags
        unsigned int reserved[16]

cdef extern from 'driver_types.h':
    cdef struct cudaExternalSemaphoreWaitParams:
        cuda_bindings_runtime__anon_pod19 params
        unsigned int flags
        unsigned int reserved[16]

cdef extern from 'driver_types.h':
    cdef struct cudaGraphKernelNodeUpdate:
        cudaGraphDeviceNode_t node
        cudaGraphKernelNodeField field
        cuda_bindings_runtime__anon_pod25 updateData

cdef extern from 'driver_types.h':
    cdef struct cudaAsyncNotificationInfo:
        cudaAsyncNotificationType type
        cuda_bindings_runtime__anon_pod32 info
    ctypedef cudaAsyncNotificationInfo cudaAsyncNotificationInfo_t

cdef extern from 'driver_types.h':
    cdef struct cudaDevResource_st:
        cudaDevResourceType type
        unsigned char _internal_padding[92]
        cudaDevSmResource sm
        cudaDevWorkqueueConfigResource wqConfig
        cudaDevWorkqueueResource wq
        unsigned char _oversize[40]
        cudaDevResource_st* nextResource
    ctypedef cudaDevResource_st cudaDevResource

cdef extern from 'driver_types.h':
    cdef struct cudaResourceDesc:
        cudaResourceType resType
        cuda_bindings_runtime__anon_pod1 res
        unsigned int flags

cdef extern from 'driver_types.h':
    cdef struct cudaMemAllocNodeParams:
        cudaMemPoolProps poolProps
        cudaMemAccessDesc* accessDescs
        size_t accessDescCount
        size_t bytesize
        void* dptr

cdef extern from 'driver_types.h':
    cdef struct cudaMemAllocNodeParamsV2:
        cudaMemPoolProps poolProps
        cudaMemAccessDesc* accessDescs
        size_t accessDescCount
        size_t bytesize
        void* dptr

cdef union cuda_bindings_runtime__anon_pod8:
    cuda_bindings_runtime__anon_pod9 ptr
    cuda_bindings_runtime__anon_pod10 array

cdef extern from 'driver_types.h':
    cdef struct cudaExternalSemaphoreSignalNodeParams:
        cudaExternalSemaphore_t* extSemArray
        cudaExternalSemaphoreSignalParams* paramsArray
        unsigned int numExtSems

cdef extern from 'driver_types.h':
    cdef struct cudaExternalSemaphoreSignalNodeParamsV2:
        cudaExternalSemaphore_t* extSemArray
        cudaExternalSemaphoreSignalParams* paramsArray
        unsigned int numExtSems

cdef extern from 'driver_types.h':
    cdef struct cudaExternalSemaphoreWaitNodeParams:
        cudaExternalSemaphore_t* extSemArray
        cudaExternalSemaphoreWaitParams* paramsArray
        unsigned int numExtSems

cdef extern from 'driver_types.h':
    cdef struct cudaExternalSemaphoreWaitNodeParamsV2:
        cudaExternalSemaphore_t* extSemArray
        cudaExternalSemaphoreWaitParams* paramsArray
        unsigned int numExtSems

cdef extern from 'driver_types.h':
    cdef struct cudaMemcpy3DOperand:
        cudaMemcpy3DOperandType type
        cuda_bindings_runtime__anon_pod8 op

cdef extern from 'driver_types.h':
    cdef struct cudaMemcpy3DBatchOp:
        cudaMemcpy3DOperand src
        cudaMemcpy3DOperand dst
        cudaExtent extent
        cudaMemcpySrcAccessOrder srcAccessOrder
        unsigned int flags

cdef extern from 'driver_types.h':
    cdef struct cudaGraphNodeParams:
        cudaGraphNodeType type
        int reserved0[3]
        long long reserved1[29]
        cudaKernelNodeParamsV2 kernel
        cudaMemcpyNodeParams memcpy
        cudaMemsetParamsV2 memset
        cudaHostNodeParamsV2 host
        cudaChildGraphNodeParams graph
        cudaEventWaitNodeParams eventWait
        cudaEventRecordNodeParams eventRecord
        cudaExternalSemaphoreSignalNodeParamsV2 extSemSignal
        cudaExternalSemaphoreWaitNodeParamsV2 extSemWait
        cudaMemAllocNodeParamsV2 alloc
        cudaMemFreeNodeParams free
        cudaConditionalNodeParams conditional
        long long reserved2

cdef extern from 'cuda_runtime_api.h':
    ctypedef cudaError_t (*cudaGraphRecaptureCallback_t 'cudaGraphRecaptureCallback_t')(
        void* data,
        cudaGraphNode_t node,
        const cudaGraphNodeParams* originalParams,
        const cudaGraphNodeParams* recaptureParams,
        cudaGraphRecaptureStatus status
    )


cdef extern from '':
    cdef struct cudaGraphRecaptureCallbackData:
        cudaGraphRecaptureCallback_t callbackFunc
        void* userData

cdef extern from 'driver_types.h':
    # cudaLaunchAttribute_st is SKIPped (sizeof-based array dimension in pad field).
    # Declared here (after the enum and type sections) so that cudaLaunchAttributeID and
    # cudaLaunchAttributeValue are already in scope — Cython requires forward types to
    # be visible at the point of use even inside cdef extern from blocks.
    # Field types must match the legacy_cython_gen ABI baseline for __pyx_capi__ compat.
    ctypedef struct cudaLaunchAttribute_st 'cudaLaunchAttribute_st':
        cudaLaunchAttributeID id
        cudaLaunchAttributeValue val

cdef extern from 'driver_types.h':
    ctypedef cudaLaunchAttribute_st cudaLaunchAttribute 'cudaLaunchAttribute'

# cudaLaunchConfig_st references cudaLaunchAttribute* so it must follow the above.
# Declared here rather than auto-generated (which would land in type_decls, before
# cudaLaunchAttribute) to satisfy Cython's forward-declaration requirement.
cdef extern from '':
    cdef struct cudaLaunchConfig_st:
        dim3 gridDim
        dim3 blockDim
        size_t dynamicSmemBytes
        cudaStream_t stream
        cudaLaunchAttribute* attrs
        unsigned int numAttrs
    ctypedef cudaLaunchConfig_st cudaLaunchConfig_t

cdef extern from 'cuda_runtime_api.h':
    ctypedef void (*cudaAsyncCallback)(cudaAsyncNotificationInfo_t* info, void* userData, cudaAsyncCallbackHandle_t handle) nogil


# FUNCTIONS
cdef cudaError_t cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceSynchronize() except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceSetLimit(cudaLimit limit, size_t value) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetLimit(size_t* pValue, cudaLimit limit) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetTexture1DLinearMaxWidth(size_t* maxWidthInElements, const cudaChannelFormatDesc* fmtDesc, int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetCacheConfig(cudaFuncCache* pCacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetStreamPriorityRange(int* leastPriority, int* greatestPriority) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceSetCacheConfig(cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetByPCIBusId(int* device, const char* pciBusId) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetPCIBusId(char* pciBusId, int len, int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaIpcGetEventHandle(cudaIpcEventHandle_t* handle, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaIpcOpenEventHandle(cudaEvent_t* event, cudaIpcEventHandle_t handle) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaIpcGetMemHandle(cudaIpcMemHandle_t* handle, void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaIpcOpenMemHandle(void** devPtr, cudaIpcMemHandle_t handle, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaIpcCloseMemHandle(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceFlushGPUDirectRDMAWrites(cudaFlushGPUDirectRDMAWritesTarget target, cudaFlushGPUDirectRDMAWritesScope scope) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetSharedMemConfig(cudaSharedMemConfig* pConfig) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceSetSharedMemConfig(cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetLastError() except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaPeekAtLastError() except ?cudaErrorCallRequiresNewerDriver nogil
cdef const char* cudaGetErrorName(cudaError_t error) except?NULL nogil
cdef const char* cudaGetErrorString(cudaError_t error) except?NULL nogil
cdef cudaError_t cudaGetDeviceCount(int* count) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetAttribute(int* value, cudaDeviceAttr attr, int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetDefaultMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceSetMemPool(int device, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetMemPool(cudaMemPool_t* memPool, int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetNvSciSyncAttributes(void* nvSciSyncAttrList, int device, int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetP2PAttribute(int* value, cudaDeviceP2PAttr attr, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaChooseDevice(int* device, const cudaDeviceProp* prop) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaSetDevice(int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetDevice(int* device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaSetDeviceFlags(unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetDeviceFlags(unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamCreate(cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamCreateWithFlags(cudaStream_t* pStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamCreateWithPriority(cudaStream_t* pStream, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamGetPriority(cudaStream_t hStream, int* priority) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamCopyAttributes(cudaStream_t dst, cudaStream_t src) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamGetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, cudaStreamAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamSetAttribute(cudaStream_t hStream, cudaStreamAttrID attr, const cudaStreamAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamDestroy(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamWaitEvent(cudaStream_t stream, cudaEvent_t event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamAddCallback(cudaStream_t stream, cudaStreamCallback_t callback, void* userData, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamSynchronize(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamQuery(cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamAttachMemAsync(cudaStream_t stream, void* devPtr, size_t length, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamBeginCapture(cudaStream_t stream, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamBeginCaptureToGraph(cudaStream_t stream, cudaGraph_t graph, const cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaStreamCaptureMode mode) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaThreadExchangeStreamCaptureMode(cudaStreamCaptureMode* mode) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamEndCapture(cudaStream_t stream, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamIsCapturing(cudaStream_t stream, cudaStreamCaptureStatus* pCaptureStatus) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamUpdateCaptureDependencies(cudaStream_t stream, cudaGraphNode_t* dependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEventCreate(cudaEvent_t* event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEventCreateWithFlags(cudaEvent_t* event, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEventRecord(cudaEvent_t event, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEventRecordWithFlags(cudaEvent_t event, cudaStream_t stream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEventQuery(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEventSynchronize(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaExternalMemoryGetMappedBuffer(void** devPtr, cudaExternalMemory_t extMem, const cudaExternalMemoryBufferDesc* bufferDesc) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaExternalMemoryGetMappedMipmappedArray(cudaMipmappedArray_t* mipmap, cudaExternalMemory_t extMem, const cudaExternalMemoryMipmappedArrayDesc* mipmapDesc) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDestroyExternalMemory(cudaExternalMemory_t extMem) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaImportExternalSemaphore(cudaExternalSemaphore_t* extSem_out, const cudaExternalSemaphoreHandleDesc* semHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDestroyExternalSemaphore(cudaExternalSemaphore_t extSem) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFuncSetCacheConfig(const void* func, cudaFuncCache cacheConfig) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFuncGetAttributes(cudaFuncAttributes* attr, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFuncSetAttribute(const void* func, cudaFuncAttribute attr, int value) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFuncGetName(const char** name, const void* func) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFuncGetParamInfo(const void* func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLaunchHostFunc(cudaStream_t stream, cudaHostFn_t fn, void* userData) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFuncSetSharedMemConfig(const void* func, cudaSharedMemConfig config) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessor(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaOccupancyAvailableDynamicSMemPerBlock(size_t* dynamicSmemSize, const void* func, int numBlocks, int blockSize) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(int* numBlocks, const void* func, int blockSize, size_t dynamicSMemSize, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMallocManaged(void** devPtr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMalloc(void** devPtr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMallocHost(void** ptr, size_t size) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMallocPitch(void** devPtr, size_t* pitch, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMallocArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, size_t width, size_t height, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFree(void* devPtr) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFreeHost(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFreeArray(cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFreeMipmappedArray(cudaMipmappedArray_t mipmappedArray) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaHostAlloc(void** pHost, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaHostRegister(void* ptr, size_t size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaHostUnregister(void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaHostGetDevicePointer(void** pDevice, void* pHost, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaHostGetFlags(unsigned int* pFlags, void* pHost) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMalloc3D(cudaPitchedPtr* pitchedDevPtr, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMalloc3DArray(cudaArray_t* array, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMallocMipmappedArray(cudaMipmappedArray_t* mipmappedArray, const cudaChannelFormatDesc* desc, cudaExtent extent, unsigned int numLevels, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetMipmappedArrayLevel(cudaArray_t* levelArray, cudaMipmappedArray_const_t mipmappedArray, unsigned int level) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy3D(const cudaMemcpy3DParms* p) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy3DPeer(const cudaMemcpy3DPeerParms* p) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy3DAsync(const cudaMemcpy3DParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy3DPeerAsync(const cudaMemcpy3DPeerParms* p, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemGetInfo(size_t* free, size_t* total) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaArrayGetInfo(cudaChannelFormatDesc* desc, cudaExtent* extent, unsigned int* flags, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaArrayGetPlane(cudaArray_t* pPlaneArray, cudaArray_t hArray, unsigned int planeIdx) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaArray_t array, int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMipmappedArrayGetMemoryRequirements(cudaArrayMemoryRequirements* memoryRequirements, cudaMipmappedArray_t mipmap, int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaArray_t array) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMipmappedArrayGetSparseProperties(cudaArraySparseProperties* sparseProperties, cudaMipmappedArray_t mipmap) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy(void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpyPeer(void* dst, int dstDevice, const void* src, int srcDevice, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy2D(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy2DToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy2DFromArray(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy2DArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpyBatchAsync(const void** dsts, const void** srcs, const size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy2DAsync(void* dst, size_t dpitch, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy2DToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t spitch, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy2DFromArrayAsync(void* dst, size_t dpitch, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t width, size_t height, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemset(void* devPtr, int value, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemset2D(void* devPtr, size_t pitch, int value, size_t width, size_t height) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemset3D(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemsetAsync(void* devPtr, int value, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemset2DAsync(void* devPtr, size_t pitch, int value, size_t width, size_t height, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr, int value, cudaExtent extent, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPrefetchAsync(const void* devPtr, size_t count, cudaMemLocation location, unsigned int flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemAdvise(const void* devPtr, size_t count, cudaMemoryAdvise advice, cudaMemLocation location) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemRangeGetAttribute(void* data, size_t dataSize, cudaMemRangeAttribute attribute, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemRangeGetAttributes(void** data, size_t* dataSizes, cudaMemRangeAttribute* attributes, size_t numAttributes, const void* devPtr, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpyToArray(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpyFromArray(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpyArrayToArray(cudaArray_t dst, size_t wOffsetDst, size_t hOffsetDst, cudaArray_const_t src, size_t wOffsetSrc, size_t hOffsetSrc, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpyToArrayAsync(cudaArray_t dst, size_t wOffset, size_t hOffset, const void* src, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpyFromArrayAsync(void* dst, cudaArray_const_t src, size_t wOffset, size_t hOffset, size_t count, cudaMemcpyKind kind, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMallocAsync(void** devPtr, size_t size, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFreeAsync(void* devPtr, cudaStream_t hStream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPoolTrimTo(cudaMemPool_t memPool, size_t minBytesToKeep) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPoolSetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPoolGetAttribute(cudaMemPool_t memPool, cudaMemPoolAttr attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPoolSetAccess(cudaMemPool_t memPool, const cudaMemAccessDesc* descList, size_t count) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPoolGetAccess(cudaMemAccessFlags* flags, cudaMemPool_t memPool, cudaMemLocation* location) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPoolCreate(cudaMemPool_t* memPool, const cudaMemPoolProps* poolProps) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPoolDestroy(cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMallocFromPoolAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPoolExportToShareableHandle(void* shareableHandle, cudaMemPool_t memPool, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPoolImportFromShareableHandle(cudaMemPool_t* memPool, void* shareableHandle, cudaMemAllocationHandleType handleType, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPoolExportPointer(cudaMemPoolPtrExportData* exportData, void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPoolImportPointer(void** ptr, cudaMemPool_t memPool, cudaMemPoolPtrExportData* exportData) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaPointerGetAttributes(cudaPointerAttributes* attributes, const void* ptr) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceDisablePeerAccess(int peerDevice) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsUnregisterResource(cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsResourceSetMapFlags(cudaGraphicsResource_t resource, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsMapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsUnmapResources(int count, cudaGraphicsResource_t* resources, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsResourceGetMappedPointer(void** devPtr, size_t* size, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsSubResourceGetMappedArray(cudaArray_t* array, cudaGraphicsResource_t resource, unsigned int arrayIndex, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsResourceGetMappedMipmappedArray(cudaMipmappedArray_t* mipmappedArray, cudaGraphicsResource_t resource) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const_t array) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil
cdef cudaError_t cudaCreateTextureObject(cudaTextureObject_t* pTexObject, const cudaResourceDesc* pResDesc, const cudaTextureDesc* pTexDesc, const cudaResourceViewDesc* pResViewDesc) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDestroyTextureObject(cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetTextureObjectResourceDesc(cudaResourceDesc* pResDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetTextureObjectTextureDesc(cudaTextureDesc* pTexDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetTextureObjectResourceViewDesc(cudaResourceViewDesc* pResViewDesc, cudaTextureObject_t texObject) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaCreateSurfaceObject(cudaSurfaceObject_t* pSurfObject, const cudaResourceDesc* pResDesc) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDestroySurfaceObject(cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetSurfaceObjectResourceDesc(cudaResourceDesc* pResDesc, cudaSurfaceObject_t surfObject) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDriverGetVersion(int* driverVersion) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaRuntimeGetVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphCreate(cudaGraph_t* pGraph, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddKernelNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphKernelNodeGetParams(cudaGraphNode_t node, cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphKernelNodeSetParams(cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphKernelNodeCopyAttributes(cudaGraphNode_t hDst, cudaGraphNode_t hSrc) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphKernelNodeGetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, cudaKernelNodeAttrValue* value_out) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphKernelNodeSetAttribute(cudaGraphNode_t hNode, cudaKernelNodeAttrID attr, const cudaKernelNodeAttrValue* value) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddMemcpyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemcpy3DParms* pCopyParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddMemcpyNode1D(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphMemcpyNodeGetParams(cudaGraphNode_t node, cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphMemcpyNodeSetParams(cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphMemcpyNodeSetParams1D(cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddMemsetNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaMemsetParams* pMemsetParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphMemsetNodeGetParams(cudaGraphNode_t node, cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphMemsetNodeSetParams(cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddHostNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphHostNodeGetParams(cudaGraphNode_t node, cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphHostNodeSetParams(cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddChildGraphNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphChildGraphNodeGetGraph(cudaGraphNode_t node, cudaGraph_t* pGraph) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddEmptyNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddEventRecordNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphEventRecordNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphEventRecordNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddEventWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphEventWaitNodeGetEvent(cudaGraphNode_t node, cudaEvent_t* event_out) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphEventWaitNodeSetEvent(cudaGraphNode_t node, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddExternalSemaphoresSignalNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreSignalNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExternalSemaphoresSignalNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddExternalSemaphoresWaitNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeGetParams(cudaGraphNode_t hNode, cudaExternalSemaphoreWaitNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExternalSemaphoresWaitNodeSetParams(cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddMemAllocNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, cudaMemAllocNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphMemAllocNodeGetParams(cudaGraphNode_t node, cudaMemAllocNodeParams* params_out) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddMemFreeNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, size_t numDependencies, void* dptr) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphMemFreeNodeGetParams(cudaGraphNode_t node, void* dptr_out) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGraphMemTrim(int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceSetGraphMemAttribute(int device, cudaGraphMemAttributeType attr, void* value) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphClone(cudaGraph_t* pGraphClone, cudaGraph_t originalGraph) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphNodeFindInClone(cudaGraphNode_t* pNode, cudaGraphNode_t originalNode, cudaGraph_t clonedGraph) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphNodeGetType(cudaGraphNode_t node, cudaGraphNodeType* pType) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphGetNodes(cudaGraph_t graph, cudaGraphNode_t* nodes, size_t* numNodes) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphGetRootNodes(cudaGraph_t graph, cudaGraphNode_t* pRootNodes, size_t* pNumRootNodes) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphGetEdges(cudaGraph_t graph, cudaGraphNode_t* from_, cudaGraphNode_t* to, cudaGraphEdgeData* edgeData, size_t* numEdges) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphNodeGetDependencies(cudaGraphNode_t node, cudaGraphNode_t* pDependencies, cudaGraphEdgeData* edgeData, size_t* pNumDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphNodeGetDependentNodes(cudaGraphNode_t node, cudaGraphNode_t* pDependentNodes, cudaGraphEdgeData* edgeData, size_t* pNumDependentNodes) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphRemoveDependencies(cudaGraph_t graph, const cudaGraphNode_t* from_, const cudaGraphNode_t* to, const cudaGraphEdgeData* edgeData, size_t numDependencies) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphDestroyNode(cudaGraphNode_t node) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphInstantiate(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphInstantiateWithFlags(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphInstantiateWithParams(cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphInstantiateParams* instantiateParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecGetFlags(cudaGraphExec_t graphExec, unsigned long long* flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecKernelNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaKernelNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecMemcpyNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemcpy3DParms* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecMemcpyNodeSetParams1D(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, void* dst, const void* src, size_t count, cudaMemcpyKind kind) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecMemsetNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaMemsetParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecHostNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, const cudaHostNodeParams* pNodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecChildGraphNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t node, cudaGraph_t childGraph) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecEventRecordNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecEventWaitNodeSetEvent(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecExternalSemaphoresSignalNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreSignalNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecExternalSemaphoresWaitNodeSetParams(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, const cudaExternalSemaphoreWaitNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphNodeSetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphNodeGetEnabled(cudaGraphExec_t hGraphExec, cudaGraphNode_t hNode, unsigned int* isEnabled) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecUpdate(cudaGraphExec_t hGraphExec, cudaGraph_t hGraph, cudaGraphExecUpdateResultInfo* resultInfo) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphUpload(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphLaunch(cudaGraphExec_t graphExec, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecDestroy(cudaGraphExec_t graphExec) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphDestroy(cudaGraph_t graph) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphDebugDotPrint(cudaGraph_t graph, const char* path, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaUserObjectCreate(cudaUserObject_t* object_out, void* ptr, cudaHostFn_t destroy, unsigned int initialRefcount, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaUserObjectRetain(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaUserObjectRelease(cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphRetainUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphReleaseUserObject(cudaGraph_t graph, cudaUserObject_t object, unsigned int count) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphAddNode(cudaGraphNode_t* pGraphNode, cudaGraph_t graph, const cudaGraphNode_t* pDependencies, const cudaGraphEdgeData* dependencyData, size_t numDependencies, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphNodeSetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecNodeSetParams(cudaGraphExec_t graphExec, cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphConditionalHandleCreate(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLibraryLoadData(cudaLibrary_t* library, const void* code, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLibraryLoadFromFile(cudaLibrary_t* library, const char* fileName, cudaJitOption* jitOptions, void** jitOptionsValues, unsigned int numJitOptions, cudaLibraryOption* libraryOptions, void** libraryOptionValues, unsigned int numLibraryOptions) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* bytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* bytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAddr) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsEGLRegisterImage(cudaGraphicsResource** pCudaResource, EGLImageKHR image, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEGLStreamConsumerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEGLStreamConsumerConnectWithFlags(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEGLStreamConsumerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEGLStreamConsumerAcquireFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t* pCudaResource, cudaStream_t* pStream, unsigned int timeout) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEGLStreamConsumerReleaseFrame(cudaEglStreamConnection* conn, cudaGraphicsResource_t pCudaResource, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEGLStreamProducerConnect(cudaEglStreamConnection* conn, EGLStreamKHR eglStream, EGLint width, EGLint height) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEGLStreamProducerDisconnect(cudaEglStreamConnection* conn) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEGLStreamProducerPresentFrame(cudaEglStreamConnection* conn, cudaEglFrame eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEGLStreamProducerReturnFrame(cudaEglStreamConnection* conn, cudaEglFrame* eglframe, cudaStream_t* pStream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsResourceGetMappedEglFrame(cudaEglFrame* eglFrame, cudaGraphicsResource_t resource, unsigned int index, unsigned int mipLevel) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaEventCreateFromEGLSync(cudaEvent_t* phEvent, EGLSyncKHR eglSync, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaProfilerStart() except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaProfilerStop() except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGLGetDevices(unsigned int* pCudaDeviceCount, int* pCudaDevices, unsigned int cudaDeviceCount, cudaGLDeviceList deviceList) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsGLRegisterImage(cudaGraphicsResource** resource, GLuint image, GLenum target, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsGLRegisterBuffer(cudaGraphicsResource** resource, GLuint buffer, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaVDPAUGetDevice(int* device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaVDPAUSetVDPAUDevice(int device, VdpDevice vdpDevice, VdpGetProcAddress* vdpGetProcAddress) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsVDPAURegisterVideoSurface(cudaGraphicsResource** resource, VdpVideoSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphicsVDPAURegisterOutputSurface(cudaGraphicsResource** resource, VdpOutputSurface vdpSurface, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGetDeviceProperties(cudaDeviceProp* prop, int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetHostAtomicCapabilities(unsigned int* capabilities, const cudaAtomicOperation* operations, unsigned int count, int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetP2PAtomicCapabilities(unsigned int* capabilities, const cudaAtomicOperation* operations, unsigned int count, int srcDevice, int dstDevice) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamGetCaptureInfo(cudaStream_t stream, cudaStreamCaptureStatus* captureStatus_out, unsigned long long* id_out, cudaGraph_t* graph_out, const cudaGraphNode_t** dependencies_out, const cudaGraphEdgeData** edgeData_out, size_t* numDependencies_out) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaSignalExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreSignalParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaWaitExternalSemaphoresAsync(const cudaExternalSemaphore_t* extSemArray, const cudaExternalSemaphoreWaitParams* paramsArray, unsigned int numExtSems, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemPrefetchBatchAsync(void** dptrs, size_t* sizes, size_t count, cudaMemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemDiscardBatchAsync(void** dptrs, size_t* sizes, size_t count, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemDiscardAndPrefetchBatchAsync(void** dptrs, size_t* sizes, size_t count, cudaMemLocation* prefetchLocs, size_t* prefetchLocIdxs, size_t numPrefetchLocs, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemGetDefaultMemPool(cudaMemPool_t* memPool, cudaMemLocation* location, cudaMemAllocationType type) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemGetMemPool(cudaMemPool_t* memPool, cudaMemLocation* location, cudaMemAllocationType type) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemSetMemPool(cudaMemLocation* location, cudaMemAllocationType type, cudaMemPool_t memPool) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLogsRegisterCallback(cudaLogsCallback_t callbackFunc, void* userData, cudaLogsCallbackHandle* callback_out) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLogsUnregisterCallback(cudaLogsCallbackHandle callback) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLogsCurrent(cudaLogIterator* iterator_out, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLogsDumpToFile(cudaLogIterator* iterator, const char* pathToFile, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLogsDumpToMemory(cudaLogIterator* iterator, char* buffer, size_t* size, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphNodeGetContainingGraph(cudaGraphNode_t hNode, cudaGraph_t* phGraph) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphNodeGetLocalId(cudaGraphNode_t hNode, unsigned int* nodeId) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphNodeGetToolsId(cudaGraphNode_t hNode, unsigned long long* toolsNodeId) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphGetId(cudaGraph_t hGraph, unsigned int* graphID) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphExecGetId(cudaGraphExec_t hGraphExec, unsigned int* graphID) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphConditionalHandleCreate_v2(cudaGraphConditionalHandle* pHandle_out, cudaGraph_t graph, cudaExecutionContext_t ctx, unsigned int defaultLaunchValue, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetDevResource(int device, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDevSmResourceSplitByCount(cudaDevResource* result, unsigned int* nbGroups, const cudaDevResource* input, cudaDevResource* remaining, unsigned int flags, unsigned int minCount) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDevSmResourceSplit(cudaDevResource* result, unsigned int nbGroups, const cudaDevResource* input, cudaDevResource* remainder, unsigned int flags, cudaDevSmResourceGroupParams* groupParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDevResourceGenerateDesc(cudaDevResourceDesc_t* phDesc, cudaDevResource* resources, unsigned int nbResources) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGreenCtxCreate(cudaExecutionContext_t* phCtx, cudaDevResourceDesc_t desc, int device, unsigned int flags) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaExecutionCtxDestroy(cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaExecutionCtxGetDevResource(cudaExecutionContext_t ctx, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaExecutionCtxGetDevice(int* device, cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaExecutionCtxGetId(cudaExecutionContext_t ctx, unsigned long long* ctxId) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaExecutionCtxStreamCreate(cudaStream_t* phStream, cudaExecutionContext_t ctx, unsigned int flags, int priority) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaExecutionCtxSynchronize(cudaExecutionContext_t ctx) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamGetDevResource(cudaStream_t hStream, cudaDevResource* resource, cudaDevResourceType type) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaExecutionCtxRecordEvent(cudaExecutionContext_t ctx, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaExecutionCtxWaitEvent(cudaExecutionContext_t ctx, cudaEvent_t event) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaDeviceGetExecutionCtx(cudaExecutionContext_t* ctx, int device) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaFuncGetParamCount(const void* func, size_t* paramCount) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaLaunchHostFunc_v2(cudaStream_t stream, cudaHostFn_t fn, void* userData, unsigned int syncMode) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpyWithAttributesAsync(void* dst, const void* src, size_t size, cudaMemcpyAttributes* attr, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaMemcpy3DWithAttributesAsync(cudaMemcpy3DBatchOp* op, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaGraphNodeGetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil
cdef cudaError_t cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) except ?cudaErrorCallRequiresNewerDriver nogil

# C #define integer constants from driver_types.h required for ABI compat with lowpp layer
cdef extern from 'driver_types.h':
    cdef enum:
        cudaHostAllocDefault
        cudaHostAllocPortable
        cudaHostAllocMapped
        cudaHostAllocWriteCombined
        cudaHostRegisterDefault
        cudaHostRegisterPortable
        cudaHostRegisterMapped
        cudaHostRegisterIoMemory
        cudaHostRegisterReadOnly
        cudaPeerAccessDefault
        cudaStreamDefault
        cudaStreamNonBlocking
        cudaEventDefault
        cudaEventBlockingSync
        cudaEventDisableTiming
        cudaEventInterprocess
        cudaEventRecordDefault
        cudaEventRecordExternal
        cudaEventWaitDefault
        cudaEventWaitExternal
        cudaDeviceScheduleAuto
        cudaDeviceScheduleSpin
        cudaDeviceScheduleYield
        cudaDeviceScheduleBlockingSync
        cudaDeviceBlockingSync
        cudaDeviceScheduleMask
        cudaDeviceMapHost
        cudaDeviceLmemResizeToMax
        cudaDeviceSyncMemops
        cudaDeviceMask
        cudaArrayDefault
        cudaArrayLayered
        cudaArraySurfaceLoadStore
        cudaArrayCubemap
        cudaArrayTextureGather
        cudaArrayColorAttachment
        cudaArraySparse
        cudaArrayDeferredMapping
        cudaIpcMemLazyEnablePeerAccess
        cudaMemAttachGlobal
        cudaMemAttachHost
        cudaMemAttachSingle
        cudaOccupancyDefault
        cudaOccupancyDisableCachingOverride
        cudaCpuDeviceId
        cudaInvalidDeviceId
        cudaInitDeviceFlagsAreValid
        cudaArraySparsePropertiesSingleMipTail
        cudaMemPoolCreateUsageHwDecompress
        CUDA_IPC_HANDLE_SIZE
        cudaExternalMemoryDedicated
        cudaExternalSemaphoreSignalSkipNvSciBufMemSync
        cudaExternalSemaphoreWaitSkipNvSciBufMemSync
        cudaNvSciSyncAttrSignal
        cudaNvSciSyncAttrWait
        cudaGraphKernelNodePortDefault
        cudaGraphKernelNodePortProgrammatic
        cudaGraphKernelNodePortLaunchCompletion
        cudaStreamAttributeAccessPolicyWindow
        cudaStreamAttributeSynchronizationPolicy
        cudaStreamAttributeMemSyncDomainMap
        cudaStreamAttributeMemSyncDomain
        cudaStreamAttributePriority
        cudaKernelNodeAttributeAccessPolicyWindow
        cudaKernelNodeAttributeCooperative
        cudaKernelNodeAttributePriority
        cudaKernelNodeAttributeClusterDimension
        cudaKernelNodeAttributeClusterSchedulingPolicyPreference
        cudaKernelNodeAttributeMemSyncDomainMap
        cudaKernelNodeAttributeMemSyncDomain
        cudaKernelNodeAttributePreferredSharedMemoryCarveout
        cudaKernelNodeAttributeDeviceUpdatableKernelNode
        cudaKernelNodeAttributeNvlinkUtilCentricScheduling

# cudaStreamLegacy/PerThread are pointer-cast macros: ((cudaStream_t)0x1/0x2); use integer values
cdef enum:
    cudaStreamLegacy = 1
    cudaStreamPerThread = 2

# Surface and texture type constants
cdef extern from 'surface_types.h':
    cdef enum:
        cudaSurfaceType1D
        cudaSurfaceType2D
        cudaSurfaceType3D
        cudaSurfaceTypeCubemap
        cudaSurfaceType1DLayered
        cudaSurfaceType2DLayered
        cudaSurfaceTypeCubemapLayered

cdef extern from 'texture_types.h':
    cdef enum:
        cudaTextureType1D
        cudaTextureType2D
        cudaTextureType3D
        cudaTextureTypeCubemap
        cudaTextureType1DLayered
        cudaTextureType2DLayered
        cudaTextureTypeCubemapLayered

# Version constants
cdef extern from 'cuda_runtime.h':
    cdef enum:
        CUDART_VERSION

cdef extern from 'cuda_runtime_api.h':
    cdef enum:
        __CUDART_API_VERSION

# CUDA_EGL_MAX_PLANES is defined as 3 in cuda_egl_interop.h; hardcoded to avoid EGL deps
cdef enum:
    CUDA_EGL_MAX_PLANES = 3

# libraryPropertyType_t (starts lowercase, outside type pattern)
cdef extern from 'library_types.h':
    ctypedef enum libraryPropertyType_t 'libraryPropertyType_t':
        MAJOR_VERSION
        MINOR_VERSION
        PATCH_LEVEL


# Static inline helpers from driver_functions.h — wrapped as cdef so the lowpp layer can cimport them.
cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil
cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil
cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil

cdef cudaError_t getLocalRuntimeVersion(int* runtimeVersion) except ?cudaErrorCallRequiresNewerDriver nogil
