diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index a78b799d3..feafb0c87 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -31,7 +31,7 @@ jobs: - "3.9" cuda-version: # Note: this is for build-time only. - - "12.6.2" + - "12.8.0" name: Build (${{ matrix.host-platform }}, Python ${{ matrix.python-version }}, CUDA ${{ matrix.cuda-version }}) if: ${{ github.repository_owner == 'nvidia' }} permissions: @@ -220,7 +220,7 @@ jobs: - "3.9" cuda-version: # Note: this is for test-time only. - - "12.6.2" + - "12.8.0" - "12.0.1" - "11.8.0" local-ctk: @@ -235,7 +235,7 @@ jobs: include: - host-platform: linux-64 python-version: "3.12" - cuda-version: "12.6.2" + cuda-version: "12.8.0" local-ctk: 1 runner: H100 name: Test (${{ matrix.host-platform }}, Python ${{ matrix.python-version }}, CUDA ${{ matrix.cuda-version }}, Runner ${{ matrix.runner }}, ${{ (matrix.local-ctk == '1' && 'local CTK') || 'CTK wheels' }}) diff --git a/cuda_bindings/cuda/bindings/_bindings/cydriver.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cydriver.pxd.in index 21cdb5205..8f0e92269 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cydriver.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cydriver.pxd.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. from cuda.bindings.cydriver cimport * {{if 'cuGetErrorString' in found_functions}} @@ -672,6 +674,16 @@ cdef CUresult _cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D* pCopy, CUstream hStream) cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuMemcpyBatchAsync' in found_functions}} + +cdef CUresult _cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuMemcpy3DBatchAsync' in found_functions}} + +cdef CUresult _cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuMemsetD8_v2' in found_functions}} cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil @@ -802,6 +814,11 @@ cdef CUresult _cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuMemBatchDecompressAsync' in found_functions}} + +cdef CUresult _cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuMemAddressReserve' in found_functions}} cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil @@ -1032,6 +1049,11 @@ cdef CUresult _cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuStreamGetDevice' in found_functions}} + +cdef CUresult _cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuStreamGetFlags' in found_functions}} cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil @@ -1177,6 +1199,11 @@ cdef CUresult _cuEventDestroy_v2(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND no cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuEventElapsedTime_v2' in found_functions}} + +cdef CUresult _cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuImportExternalMemory' in found_functions}} cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil @@ -2032,6 +2059,11 @@ cdef CUresult _cuTensorMapEncodeTiled(CUtensorMap* tensorMap, CUtensorMapDataTyp cdef CUresult _cuTensorMapEncodeIm2col(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const int* pixelBoxLowerCorner, const int* pixelBoxUpperCorner, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuTensorMapEncodeIm2colWide' in found_functions}} + +cdef CUresult _cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuTensorMapReplaceAddress' in found_functions}} cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil @@ -2182,6 +2214,36 @@ cdef CUresult _cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ? cdef CUresult _cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}} + +cdef CUresult _cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuCheckpointProcessGetState' in found_functions}} + +cdef CUresult _cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuCheckpointProcessLock' in found_functions}} + +cdef CUresult _cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuCheckpointProcessCheckpoint' in found_functions}} + +cdef CUresult _cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuCheckpointProcessRestore' in found_functions}} + +cdef CUresult _cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuCheckpointProcessUnlock' in found_functions}} + +cdef CUresult _cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuProfilerStart' in found_functions}} cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil diff --git a/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in index a1c260e12..9cd92fa71 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cydriver.pyx.in @@ -5,9 +5,13 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. {{if 'Windows' == platform.system()}} -import win32api +import os +import site import struct +import win32api from pywintypes import error {{else}} cimport cuda.bindings._lib.dlfcn as dlfcn @@ -149,6 +153,8 @@ cdef bint __cuPythonInit = False {{if 'cuMemcpy2DAsync_v2' in found_functions}}cdef void *__cuMemcpy2DAsync_v2 = NULL{{endif}} {{if 'cuMemcpy3DAsync_v2' in found_functions}}cdef void *__cuMemcpy3DAsync_v2 = NULL{{endif}} {{if 'cuMemcpy3DPeerAsync' in found_functions}}cdef void *__cuMemcpy3DPeerAsync = NULL{{endif}} +{{if 'cuMemcpyBatchAsync' in found_functions}}cdef void *__cuMemcpyBatchAsync = NULL{{endif}} +{{if 'cuMemcpy3DBatchAsync' in found_functions}}cdef void *__cuMemcpy3DBatchAsync = NULL{{endif}} {{if 'cuMemsetD8_v2' in found_functions}}cdef void *__cuMemsetD8_v2 = NULL{{endif}} {{if 'cuMemsetD16_v2' in found_functions}}cdef void *__cuMemsetD16_v2 = NULL{{endif}} {{if 'cuMemsetD32_v2' in found_functions}}cdef void *__cuMemsetD32_v2 = NULL{{endif}} @@ -175,6 +181,7 @@ cdef bint __cuPythonInit = False {{if 'cuMipmappedArrayGetLevel' in found_functions}}cdef void *__cuMipmappedArrayGetLevel = NULL{{endif}} {{if 'cuMipmappedArrayDestroy' in found_functions}}cdef void *__cuMipmappedArrayDestroy = NULL{{endif}} {{if 'cuMemGetHandleForAddressRange' in found_functions}}cdef void *__cuMemGetHandleForAddressRange = NULL{{endif}} +{{if 'cuMemBatchDecompressAsync' in found_functions}}cdef void *__cuMemBatchDecompressAsync = NULL{{endif}} {{if 'cuMemAddressReserve' in found_functions}}cdef void *__cuMemAddressReserve = NULL{{endif}} {{if 'cuMemAddressFree' in found_functions}}cdef void *__cuMemAddressFree = NULL{{endif}} {{if 'cuMemCreate' in found_functions}}cdef void *__cuMemCreate = NULL{{endif}} @@ -221,6 +228,7 @@ cdef bint __cuPythonInit = False {{if 'cuStreamCreate' in found_functions}}cdef void *__cuStreamCreate = NULL{{endif}} {{if 'cuStreamCreateWithPriority' in found_functions}}cdef void *__cuStreamCreateWithPriority = NULL{{endif}} {{if 'cuStreamGetPriority' in found_functions}}cdef void *__cuStreamGetPriority = NULL{{endif}} +{{if 'cuStreamGetDevice' in found_functions}}cdef void *__cuStreamGetDevice = NULL{{endif}} {{if 'cuStreamGetFlags' in found_functions}}cdef void *__cuStreamGetFlags = NULL{{endif}} {{if 'cuStreamGetId' in found_functions}}cdef void *__cuStreamGetId = NULL{{endif}} {{if 'cuStreamGetCtx' in found_functions}}cdef void *__cuStreamGetCtx = NULL{{endif}} @@ -250,6 +258,7 @@ cdef bint __cuPythonInit = False {{if 'cuEventSynchronize' in found_functions}}cdef void *__cuEventSynchronize = NULL{{endif}} {{if 'cuEventDestroy_v2' in found_functions}}cdef void *__cuEventDestroy_v2 = NULL{{endif}} {{if 'cuEventElapsedTime' in found_functions}}cdef void *__cuEventElapsedTime = NULL{{endif}} +{{if 'cuEventElapsedTime_v2' in found_functions}}cdef void *__cuEventElapsedTime_v2 = NULL{{endif}} {{if 'cuImportExternalMemory' in found_functions}}cdef void *__cuImportExternalMemory = NULL{{endif}} {{if 'cuExternalMemoryGetMappedBuffer' in found_functions}}cdef void *__cuExternalMemoryGetMappedBuffer = NULL{{endif}} {{if 'cuExternalMemoryGetMappedMipmappedArray' in found_functions}}cdef void *__cuExternalMemoryGetMappedMipmappedArray = NULL{{endif}} @@ -421,6 +430,7 @@ cdef bint __cuPythonInit = False {{if 'cuSurfObjectGetResourceDesc' in found_functions}}cdef void *__cuSurfObjectGetResourceDesc = NULL{{endif}} {{if 'cuTensorMapEncodeTiled' in found_functions}}cdef void *__cuTensorMapEncodeTiled = NULL{{endif}} {{if 'cuTensorMapEncodeIm2col' in found_functions}}cdef void *__cuTensorMapEncodeIm2col = NULL{{endif}} +{{if 'cuTensorMapEncodeIm2colWide' in found_functions}}cdef void *__cuTensorMapEncodeIm2colWide = NULL{{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}}cdef void *__cuTensorMapReplaceAddress = NULL{{endif}} {{if 'cuDeviceCanAccessPeer' in found_functions}}cdef void *__cuDeviceCanAccessPeer = NULL{{endif}} {{if 'cuCtxEnablePeerAccess' in found_functions}}cdef void *__cuCtxEnablePeerAccess = NULL{{endif}} @@ -451,6 +461,12 @@ cdef bint __cuPythonInit = False {{if 'cuGreenCtxWaitEvent' in found_functions}}cdef void *__cuGreenCtxWaitEvent = NULL{{endif}} {{if 'cuStreamGetGreenCtx' in found_functions}}cdef void *__cuStreamGetGreenCtx = NULL{{endif}} {{if 'cuGreenCtxStreamCreate' in found_functions}}cdef void *__cuGreenCtxStreamCreate = NULL{{endif}} +{{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}}cdef void *__cuCheckpointProcessGetRestoreThreadId = NULL{{endif}} +{{if 'cuCheckpointProcessGetState' in found_functions}}cdef void *__cuCheckpointProcessGetState = NULL{{endif}} +{{if 'cuCheckpointProcessLock' in found_functions}}cdef void *__cuCheckpointProcessLock = NULL{{endif}} +{{if 'cuCheckpointProcessCheckpoint' in found_functions}}cdef void *__cuCheckpointProcessCheckpoint = NULL{{endif}} +{{if 'cuCheckpointProcessRestore' in found_functions}}cdef void *__cuCheckpointProcessRestore = NULL{{endif}} +{{if 'cuCheckpointProcessUnlock' in found_functions}}cdef void *__cuCheckpointProcessUnlock = NULL{{endif}} {{if 'cuProfilerStart' in found_functions}}cdef void *__cuProfilerStart = NULL{{endif}} {{if 'cuProfilerStop' in found_functions}}cdef void *__cuProfilerStop = NULL{{endif}} {{if True}}cdef void *__cuGraphicsEGLRegisterImage = NULL{{endif}} @@ -622,6 +638,14 @@ cdef int cuPythonInit() except -1 nogil: global __cuMemcpy3DPeerAsync cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} + {{if 'cuMemcpyBatchAsync' in found_functions}} + global __cuMemcpyBatchAsync + cuGetProcAddress('cuMemcpyBatchAsync', &__cuMemcpyBatchAsync, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + {{endif}} + {{if 'cuMemcpy3DBatchAsync' in found_functions}} + global __cuMemcpy3DBatchAsync + cuGetProcAddress('cuMemcpy3DBatchAsync', &__cuMemcpy3DBatchAsync, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} global __cuMemsetD8_v2 cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) @@ -670,6 +694,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuMemsetD2D32Async cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} + {{if 'cuMemBatchDecompressAsync' in found_functions}} + global __cuMemBatchDecompressAsync + cuGetProcAddress('cuMemBatchDecompressAsync', &__cuMemBatchDecompressAsync, 12060, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} global __cuMemMapArrayAsync cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) @@ -698,6 +726,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuStreamGetPriority cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) {{endif}} + {{if 'cuStreamGetDevice' in found_functions}} + global __cuStreamGetDevice + cuGetProcAddress('cuStreamGetDevice', &__cuStreamGetDevice, 12080, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) + {{endif}} {{if 'cuStreamGetFlags' in found_functions}} global __cuStreamGetFlags cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 7000, CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM, NULL) @@ -949,6 +981,14 @@ cdef int cuPythonInit() except -1 nogil: global __cuMemcpy3DPeerAsync cuGetProcAddress('cuMemcpy3DPeerAsync', &__cuMemcpy3DPeerAsync, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} + {{if 'cuMemcpyBatchAsync' in found_functions}} + global __cuMemcpyBatchAsync + cuGetProcAddress('cuMemcpyBatchAsync', &__cuMemcpyBatchAsync, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} + {{if 'cuMemcpy3DBatchAsync' in found_functions}} + global __cuMemcpy3DBatchAsync + cuGetProcAddress('cuMemcpy3DBatchAsync', &__cuMemcpy3DBatchAsync, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} global __cuMemsetD8_v2 cuGetProcAddress('cuMemsetD8', &__cuMemsetD8_v2, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) @@ -997,6 +1037,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuMemsetD2D32Async cuGetProcAddress('cuMemsetD2D32Async', &__cuMemsetD2D32Async, 3020, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} + {{if 'cuMemBatchDecompressAsync' in found_functions}} + global __cuMemBatchDecompressAsync + cuGetProcAddress('cuMemBatchDecompressAsync', &__cuMemBatchDecompressAsync, 12060, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} global __cuMemMapArrayAsync cuGetProcAddress('cuMemMapArrayAsync', &__cuMemMapArrayAsync, 11010, CU_GET_PROC_ADDRESS_DEFAULT, NULL) @@ -1025,6 +1069,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuStreamGetPriority cuGetProcAddress('cuStreamGetPriority', &__cuStreamGetPriority, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} + {{if 'cuStreamGetDevice' in found_functions}} + global __cuStreamGetDevice + cuGetProcAddress('cuStreamGetDevice', &__cuStreamGetDevice, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} {{if 'cuStreamGetFlags' in found_functions}} global __cuStreamGetFlags cuGetProcAddress('cuStreamGetFlags', &__cuStreamGetFlags, 5050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) @@ -1854,6 +1902,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuEventElapsedTime cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime, 2000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} + {{if 'cuEventElapsedTime_v2' in found_functions}} + global __cuEventElapsedTime_v2 + cuGetProcAddress('cuEventElapsedTime', &__cuEventElapsedTime_v2, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} {{if 'cuImportExternalMemory' in found_functions}} global __cuImportExternalMemory cuGetProcAddress('cuImportExternalMemory', &__cuImportExternalMemory, 10000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) @@ -2482,6 +2534,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuTensorMapEncodeIm2col cuGetProcAddress('cuTensorMapEncodeIm2col', &__cuTensorMapEncodeIm2col, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} + {{if 'cuTensorMapEncodeIm2colWide' in found_functions}} + global __cuTensorMapEncodeIm2colWide + cuGetProcAddress('cuTensorMapEncodeIm2colWide', &__cuTensorMapEncodeIm2colWide, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}} global __cuTensorMapReplaceAddress cuGetProcAddress('cuTensorMapReplaceAddress', &__cuTensorMapReplaceAddress, 12000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) @@ -2594,6 +2650,30 @@ cdef int cuPythonInit() except -1 nogil: global __cuGreenCtxStreamCreate cuGetProcAddress('cuGreenCtxStreamCreate', &__cuGreenCtxStreamCreate, 12050, CU_GET_PROC_ADDRESS_DEFAULT, NULL) {{endif}} + {{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}} + global __cuCheckpointProcessGetRestoreThreadId + cuGetProcAddress('cuCheckpointProcessGetRestoreThreadId', &__cuCheckpointProcessGetRestoreThreadId, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} + {{if 'cuCheckpointProcessGetState' in found_functions}} + global __cuCheckpointProcessGetState + cuGetProcAddress('cuCheckpointProcessGetState', &__cuCheckpointProcessGetState, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} + {{if 'cuCheckpointProcessLock' in found_functions}} + global __cuCheckpointProcessLock + cuGetProcAddress('cuCheckpointProcessLock', &__cuCheckpointProcessLock, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} + {{if 'cuCheckpointProcessCheckpoint' in found_functions}} + global __cuCheckpointProcessCheckpoint + cuGetProcAddress('cuCheckpointProcessCheckpoint', &__cuCheckpointProcessCheckpoint, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} + {{if 'cuCheckpointProcessRestore' in found_functions}} + global __cuCheckpointProcessRestore + cuGetProcAddress('cuCheckpointProcessRestore', &__cuCheckpointProcessRestore, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} + {{if 'cuCheckpointProcessUnlock' in found_functions}} + global __cuCheckpointProcessUnlock + cuGetProcAddress('cuCheckpointProcessUnlock', &__cuCheckpointProcessUnlock, 12080, CU_GET_PROC_ADDRESS_DEFAULT, NULL) + {{endif}} {{if 'cuProfilerStart' in found_functions}} global __cuProfilerStart cuGetProcAddress('cuProfilerStart', &__cuProfilerStart, 4000, CU_GET_PROC_ADDRESS_DEFAULT, NULL) @@ -2854,6 +2934,20 @@ cdef int cuPythonInit() except -1 nogil: except: pass {{endif}} + {{if 'cuMemcpyBatchAsync' in found_functions}} + try: + global __cuMemcpyBatchAsync + __cuMemcpyBatchAsync = win32api.GetProcAddress(handle, 'cuMemcpyBatchAsync_ptsz') + except: + pass + {{endif}} + {{if 'cuMemcpy3DBatchAsync' in found_functions}} + try: + global __cuMemcpy3DBatchAsync + __cuMemcpy3DBatchAsync = win32api.GetProcAddress(handle, 'cuMemcpy3DBatchAsync_ptsz') + except: + pass + {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} try: global __cuMemsetD8_v2 @@ -2938,6 +3032,13 @@ cdef int cuPythonInit() except -1 nogil: except: pass {{endif}} + {{if 'cuMemBatchDecompressAsync' in found_functions}} + try: + global __cuMemBatchDecompressAsync + __cuMemBatchDecompressAsync = win32api.GetProcAddress(handle, 'cuMemBatchDecompressAsync_ptsz') + except: + pass + {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} try: global __cuMemMapArrayAsync @@ -2987,6 +3088,13 @@ cdef int cuPythonInit() except -1 nogil: except: pass {{endif}} + {{if 'cuStreamGetDevice' in found_functions}} + try: + global __cuStreamGetDevice + __cuStreamGetDevice = win32api.GetProcAddress(handle, 'cuStreamGetDevice_ptsz') + except: + pass + {{endif}} {{if 'cuStreamGetFlags' in found_functions}} try: global __cuStreamGetFlags @@ -3424,6 +3532,20 @@ cdef int cuPythonInit() except -1 nogil: except: pass {{endif}} + {{if 'cuMemcpyBatchAsync' in found_functions}} + try: + global __cuMemcpyBatchAsync + __cuMemcpyBatchAsync = win32api.GetProcAddress(handle, 'cuMemcpyBatchAsync') + except: + pass + {{endif}} + {{if 'cuMemcpy3DBatchAsync' in found_functions}} + try: + global __cuMemcpy3DBatchAsync + __cuMemcpy3DBatchAsync = win32api.GetProcAddress(handle, 'cuMemcpy3DBatchAsync') + except: + pass + {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} try: global __cuMemsetD8_v2 @@ -3508,6 +3630,13 @@ cdef int cuPythonInit() except -1 nogil: except: pass {{endif}} + {{if 'cuMemBatchDecompressAsync' in found_functions}} + try: + global __cuMemBatchDecompressAsync + __cuMemBatchDecompressAsync = win32api.GetProcAddress(handle, 'cuMemBatchDecompressAsync') + except: + pass + {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} try: global __cuMemMapArrayAsync @@ -3557,6 +3686,13 @@ cdef int cuPythonInit() except -1 nogil: except: pass {{endif}} + {{if 'cuStreamGetDevice' in found_functions}} + try: + global __cuStreamGetDevice + __cuStreamGetDevice = win32api.GetProcAddress(handle, 'cuStreamGetDevice') + except: + pass + {{endif}} {{if 'cuStreamGetFlags' in found_functions}} try: global __cuStreamGetFlags @@ -5007,6 +5143,13 @@ cdef int cuPythonInit() except -1 nogil: except: pass {{endif}} + {{if 'cuEventElapsedTime_v2' in found_functions}} + try: + global __cuEventElapsedTime_v2 + __cuEventElapsedTime_v2 = win32api.GetProcAddress(handle, 'cuEventElapsedTime_v2') + except: + pass + {{endif}} {{if 'cuImportExternalMemory' in found_functions}} try: global __cuImportExternalMemory @@ -6106,6 +6249,13 @@ cdef int cuPythonInit() except -1 nogil: except: pass {{endif}} + {{if 'cuTensorMapEncodeIm2colWide' in found_functions}} + try: + global __cuTensorMapEncodeIm2colWide + __cuTensorMapEncodeIm2colWide = win32api.GetProcAddress(handle, 'cuTensorMapEncodeIm2colWide') + except: + pass + {{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}} try: global __cuTensorMapReplaceAddress @@ -6302,6 +6452,48 @@ cdef int cuPythonInit() except -1 nogil: except: pass {{endif}} + {{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}} + try: + global __cuCheckpointProcessGetRestoreThreadId + __cuCheckpointProcessGetRestoreThreadId = win32api.GetProcAddress(handle, 'cuCheckpointProcessGetRestoreThreadId') + except: + pass + {{endif}} + {{if 'cuCheckpointProcessGetState' in found_functions}} + try: + global __cuCheckpointProcessGetState + __cuCheckpointProcessGetState = win32api.GetProcAddress(handle, 'cuCheckpointProcessGetState') + except: + pass + {{endif}} + {{if 'cuCheckpointProcessLock' in found_functions}} + try: + global __cuCheckpointProcessLock + __cuCheckpointProcessLock = win32api.GetProcAddress(handle, 'cuCheckpointProcessLock') + except: + pass + {{endif}} + {{if 'cuCheckpointProcessCheckpoint' in found_functions}} + try: + global __cuCheckpointProcessCheckpoint + __cuCheckpointProcessCheckpoint = win32api.GetProcAddress(handle, 'cuCheckpointProcessCheckpoint') + except: + pass + {{endif}} + {{if 'cuCheckpointProcessRestore' in found_functions}} + try: + global __cuCheckpointProcessRestore + __cuCheckpointProcessRestore = win32api.GetProcAddress(handle, 'cuCheckpointProcessRestore') + except: + pass + {{endif}} + {{if 'cuCheckpointProcessUnlock' in found_functions}} + try: + global __cuCheckpointProcessUnlock + __cuCheckpointProcessUnlock = win32api.GetProcAddress(handle, 'cuCheckpointProcessUnlock') + except: + pass + {{endif}} {{if 'cuProfilerStart' in found_functions}} try: global __cuProfilerStart @@ -6550,6 +6742,14 @@ cdef int cuPythonInit() except -1 nogil: global __cuMemcpy3DPeerAsync __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync_ptsz') {{endif}} + {{if 'cuMemcpyBatchAsync' in found_functions}} + global __cuMemcpyBatchAsync + __cuMemcpyBatchAsync = dlfcn.dlsym(handle, 'cuMemcpyBatchAsync_ptsz') + {{endif}} + {{if 'cuMemcpy3DBatchAsync' in found_functions}} + global __cuMemcpy3DBatchAsync + __cuMemcpy3DBatchAsync = dlfcn.dlsym(handle, 'cuMemcpy3DBatchAsync_ptsz') + {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} global __cuMemsetD8_v2 __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2_ptds') @@ -6598,6 +6798,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuMemsetD2D32Async __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async_ptsz') {{endif}} + {{if 'cuMemBatchDecompressAsync' in found_functions}} + global __cuMemBatchDecompressAsync + __cuMemBatchDecompressAsync = dlfcn.dlsym(handle, 'cuMemBatchDecompressAsync_ptsz') + {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} global __cuMemMapArrayAsync __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync_ptsz') @@ -6626,6 +6830,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuStreamGetPriority __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority_ptsz') {{endif}} + {{if 'cuStreamGetDevice' in found_functions}} + global __cuStreamGetDevice + __cuStreamGetDevice = dlfcn.dlsym(handle, 'cuStreamGetDevice_ptsz') + {{endif}} {{if 'cuStreamGetFlags' in found_functions}} global __cuStreamGetFlags __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags_ptsz') @@ -6877,6 +7085,14 @@ cdef int cuPythonInit() except -1 nogil: global __cuMemcpy3DPeerAsync __cuMemcpy3DPeerAsync = dlfcn.dlsym(handle, 'cuMemcpy3DPeerAsync') {{endif}} + {{if 'cuMemcpyBatchAsync' in found_functions}} + global __cuMemcpyBatchAsync + __cuMemcpyBatchAsync = dlfcn.dlsym(handle, 'cuMemcpyBatchAsync') + {{endif}} + {{if 'cuMemcpy3DBatchAsync' in found_functions}} + global __cuMemcpy3DBatchAsync + __cuMemcpy3DBatchAsync = dlfcn.dlsym(handle, 'cuMemcpy3DBatchAsync') + {{endif}} {{if 'cuMemsetD8_v2' in found_functions}} global __cuMemsetD8_v2 __cuMemsetD8_v2 = dlfcn.dlsym(handle, 'cuMemsetD8_v2') @@ -6925,6 +7141,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuMemsetD2D32Async __cuMemsetD2D32Async = dlfcn.dlsym(handle, 'cuMemsetD2D32Async') {{endif}} + {{if 'cuMemBatchDecompressAsync' in found_functions}} + global __cuMemBatchDecompressAsync + __cuMemBatchDecompressAsync = dlfcn.dlsym(handle, 'cuMemBatchDecompressAsync') + {{endif}} {{if 'cuMemMapArrayAsync' in found_functions}} global __cuMemMapArrayAsync __cuMemMapArrayAsync = dlfcn.dlsym(handle, 'cuMemMapArrayAsync') @@ -6953,6 +7173,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuStreamGetPriority __cuStreamGetPriority = dlfcn.dlsym(handle, 'cuStreamGetPriority') {{endif}} + {{if 'cuStreamGetDevice' in found_functions}} + global __cuStreamGetDevice + __cuStreamGetDevice = dlfcn.dlsym(handle, 'cuStreamGetDevice') + {{endif}} {{if 'cuStreamGetFlags' in found_functions}} global __cuStreamGetFlags __cuStreamGetFlags = dlfcn.dlsym(handle, 'cuStreamGetFlags') @@ -7782,6 +8006,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuEventElapsedTime __cuEventElapsedTime = dlfcn.dlsym(handle, 'cuEventElapsedTime') {{endif}} + {{if 'cuEventElapsedTime_v2' in found_functions}} + global __cuEventElapsedTime_v2 + __cuEventElapsedTime_v2 = dlfcn.dlsym(handle, 'cuEventElapsedTime_v2') + {{endif}} {{if 'cuImportExternalMemory' in found_functions}} global __cuImportExternalMemory __cuImportExternalMemory = dlfcn.dlsym(handle, 'cuImportExternalMemory') @@ -8410,6 +8638,10 @@ cdef int cuPythonInit() except -1 nogil: global __cuTensorMapEncodeIm2col __cuTensorMapEncodeIm2col = dlfcn.dlsym(handle, 'cuTensorMapEncodeIm2col') {{endif}} + {{if 'cuTensorMapEncodeIm2colWide' in found_functions}} + global __cuTensorMapEncodeIm2colWide + __cuTensorMapEncodeIm2colWide = dlfcn.dlsym(handle, 'cuTensorMapEncodeIm2colWide') + {{endif}} {{if 'cuTensorMapReplaceAddress' in found_functions}} global __cuTensorMapReplaceAddress __cuTensorMapReplaceAddress = dlfcn.dlsym(handle, 'cuTensorMapReplaceAddress') @@ -8522,6 +8754,30 @@ cdef int cuPythonInit() except -1 nogil: global __cuGreenCtxStreamCreate __cuGreenCtxStreamCreate = dlfcn.dlsym(handle, 'cuGreenCtxStreamCreate') {{endif}} + {{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}} + global __cuCheckpointProcessGetRestoreThreadId + __cuCheckpointProcessGetRestoreThreadId = dlfcn.dlsym(handle, 'cuCheckpointProcessGetRestoreThreadId') + {{endif}} + {{if 'cuCheckpointProcessGetState' in found_functions}} + global __cuCheckpointProcessGetState + __cuCheckpointProcessGetState = dlfcn.dlsym(handle, 'cuCheckpointProcessGetState') + {{endif}} + {{if 'cuCheckpointProcessLock' in found_functions}} + global __cuCheckpointProcessLock + __cuCheckpointProcessLock = dlfcn.dlsym(handle, 'cuCheckpointProcessLock') + {{endif}} + {{if 'cuCheckpointProcessCheckpoint' in found_functions}} + global __cuCheckpointProcessCheckpoint + __cuCheckpointProcessCheckpoint = dlfcn.dlsym(handle, 'cuCheckpointProcessCheckpoint') + {{endif}} + {{if 'cuCheckpointProcessRestore' in found_functions}} + global __cuCheckpointProcessRestore + __cuCheckpointProcessRestore = dlfcn.dlsym(handle, 'cuCheckpointProcessRestore') + {{endif}} + {{if 'cuCheckpointProcessUnlock' in found_functions}} + global __cuCheckpointProcessUnlock + __cuCheckpointProcessUnlock = dlfcn.dlsym(handle, 'cuCheckpointProcessUnlock') + {{endif}} {{if 'cuProfilerStart' in found_functions}} global __cuProfilerStart __cuProfilerStart = dlfcn.dlsym(handle, 'cuProfilerStart') @@ -10204,6 +10460,30 @@ cdef CUresult _cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hSt return err {{endif}} +{{if 'cuMemcpyBatchAsync' in found_functions}} + +cdef CUresult _cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpyBatchAsync + cuPythonInit() + if __cuMemcpyBatchAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemcpyBatchAsync" not found') + err = ( __cuMemcpyBatchAsync)(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) + return err +{{endif}} + +{{if 'cuMemcpy3DBatchAsync' in found_functions}} + +cdef CUresult _cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemcpy3DBatchAsync + cuPythonInit() + if __cuMemcpy3DBatchAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemcpy3DBatchAsync" not found') + err = ( __cuMemcpy3DBatchAsync)(numOps, opList, failIdx, flags, hStream) + return err +{{endif}} + {{if 'cuMemsetD8_v2' in found_functions}} cdef CUresult _cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: @@ -10516,6 +10796,18 @@ cdef CUresult _cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, siz return err {{endif}} +{{if 'cuMemBatchDecompressAsync' in found_functions}} + +cdef CUresult _cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemBatchDecompressAsync + cuPythonInit() + if __cuMemBatchDecompressAsync == NULL: + with gil: + raise RuntimeError('Function "cuMemBatchDecompressAsync" not found') + err = ( __cuMemBatchDecompressAsync)(paramsArray, count, flags, errorIndex, stream) + return err +{{endif}} + {{if 'cuMemAddressReserve' in found_functions}} cdef CUresult _cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: @@ -11068,6 +11360,18 @@ cdef CUresult _cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA return err {{endif}} +{{if 'cuStreamGetDevice' in found_functions}} + +cdef CUresult _cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuStreamGetDevice + cuPythonInit() + if __cuStreamGetDevice == NULL: + with gil: + raise RuntimeError('Function "cuStreamGetDevice" not found') + err = ( __cuStreamGetDevice)(hStream, device) + return err +{{endif}} + {{if 'cuStreamGetFlags' in found_functions}} cdef CUresult _cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: @@ -11416,6 +11720,18 @@ cdef CUresult _cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent return err {{endif}} +{{if 'cuEventElapsedTime_v2' in found_functions}} + +cdef CUresult _cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuEventElapsedTime_v2 + cuPythonInit() + if __cuEventElapsedTime_v2 == NULL: + with gil: + raise RuntimeError('Function "cuEventElapsedTime_v2" not found') + err = ( __cuEventElapsedTime_v2)(pMilliseconds, hStart, hEnd) + return err +{{endif}} + {{if 'cuImportExternalMemory' in found_functions}} cdef CUresult _cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: @@ -13468,6 +13784,18 @@ cdef CUresult _cuTensorMapEncodeIm2col(CUtensorMap* tensorMap, CUtensorMapDataTy return err {{endif}} +{{if 'cuTensorMapEncodeIm2colWide' in found_functions}} + +cdef CUresult _cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuTensorMapEncodeIm2colWide + cuPythonInit() + if __cuTensorMapEncodeIm2colWide == NULL: + with gil: + raise RuntimeError('Function "cuTensorMapEncodeIm2colWide" not found') + err = ( __cuTensorMapEncodeIm2colWide)(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) + return err +{{endif}} + {{if 'cuTensorMapReplaceAddress' in found_functions}} cdef CUresult _cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: @@ -13828,6 +14156,78 @@ cdef CUresult _cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, u return err {{endif}} +{{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}} + +cdef CUresult _cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessGetRestoreThreadId + cuPythonInit() + if __cuCheckpointProcessGetRestoreThreadId == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessGetRestoreThreadId" not found') + err = ( __cuCheckpointProcessGetRestoreThreadId)(pid, tid) + return err +{{endif}} + +{{if 'cuCheckpointProcessGetState' in found_functions}} + +cdef CUresult _cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessGetState + cuPythonInit() + if __cuCheckpointProcessGetState == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessGetState" not found') + err = ( __cuCheckpointProcessGetState)(pid, state) + return err +{{endif}} + +{{if 'cuCheckpointProcessLock' in found_functions}} + +cdef CUresult _cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessLock + cuPythonInit() + if __cuCheckpointProcessLock == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessLock" not found') + err = ( __cuCheckpointProcessLock)(pid, args) + return err +{{endif}} + +{{if 'cuCheckpointProcessCheckpoint' in found_functions}} + +cdef CUresult _cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessCheckpoint + cuPythonInit() + if __cuCheckpointProcessCheckpoint == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessCheckpoint" not found') + err = ( __cuCheckpointProcessCheckpoint)(pid, args) + return err +{{endif}} + +{{if 'cuCheckpointProcessRestore' in found_functions}} + +cdef CUresult _cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessRestore + cuPythonInit() + if __cuCheckpointProcessRestore == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessRestore" not found') + err = ( __cuCheckpointProcessRestore)(pid, args) + return err +{{endif}} + +{{if 'cuCheckpointProcessUnlock' in found_functions}} + +cdef CUresult _cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointProcessUnlock + cuPythonInit() + if __cuCheckpointProcessUnlock == NULL: + with gil: + raise RuntimeError('Function "cuCheckpointProcessUnlock" not found') + err = ( __cuCheckpointProcessUnlock)(pid, args) + return err +{{endif}} + {{if 'cuProfilerStart' in found_functions}} cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: diff --git a/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pxd.in b/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pxd.in index 26d3a6ffe..d4be8d479 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pxd.in +++ b/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pxd.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. from cuda.bindings.cynvrtc cimport * {{if 'nvrtcGetErrorString' in found_functions}} @@ -112,3 +114,28 @@ cdef nvrtcResult _nvrtcAddNameExpression(nvrtcProgram prog, const char* name_exp cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil {{endif}} +{{if 'nvrtcGetPCHHeapSize' in found_functions}} + +cdef nvrtcResult _nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil +{{endif}} + +{{if 'nvrtcSetPCHHeapSize' in found_functions}} + +cdef nvrtcResult _nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil +{{endif}} + +{{if 'nvrtcGetPCHCreateStatus' in found_functions}} + +cdef nvrtcResult _nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil +{{endif}} + +{{if 'nvrtcGetPCHHeapSizeRequired' in found_functions}} + +cdef nvrtcResult _nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil +{{endif}} + +{{if 'nvrtcSetFlowCallback' in found_functions}} + +cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil +{{endif}} + diff --git a/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in b/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in index 5cc8219c0..884ec65da 100644 --- a/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in +++ b/cuda_bindings/cuda/bindings/_bindings/cynvrtc.pyx.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. {{if 'Windows' == platform.system()}} import os import site @@ -37,6 +39,11 @@ cdef bint __cuPythonInit = False {{if 'nvrtcGetProgramLog' in found_functions}}cdef void *__nvrtcGetProgramLog = NULL{{endif}} {{if 'nvrtcAddNameExpression' in found_functions}}cdef void *__nvrtcAddNameExpression = NULL{{endif}} {{if 'nvrtcGetLoweredName' in found_functions}}cdef void *__nvrtcGetLoweredName = NULL{{endif}} +{{if 'nvrtcGetPCHHeapSize' in found_functions}}cdef void *__nvrtcGetPCHHeapSize = NULL{{endif}} +{{if 'nvrtcSetPCHHeapSize' in found_functions}}cdef void *__nvrtcSetPCHHeapSize = NULL{{endif}} +{{if 'nvrtcGetPCHCreateStatus' in found_functions}}cdef void *__nvrtcGetPCHCreateStatus = NULL{{endif}} +{{if 'nvrtcGetPCHHeapSizeRequired' in found_functions}}cdef void *__nvrtcGetPCHHeapSizeRequired = NULL{{endif}} +{{if 'nvrtcSetFlowCallback' in found_functions}}cdef void *__nvrtcSetFlowCallback = NULL{{endif}} cdef int cuPythonInit() except -1 nogil: global __cuPythonInit @@ -244,6 +251,41 @@ cdef int cuPythonInit() except -1 nogil: except: pass {{endif}} + {{if 'nvrtcGetPCHHeapSize' in found_functions}} + try: + global __nvrtcGetPCHHeapSize + __nvrtcGetPCHHeapSize = win32api.GetProcAddress(handle, 'nvrtcGetPCHHeapSize') + except: + pass + {{endif}} + {{if 'nvrtcSetPCHHeapSize' in found_functions}} + try: + global __nvrtcSetPCHHeapSize + __nvrtcSetPCHHeapSize = win32api.GetProcAddress(handle, 'nvrtcSetPCHHeapSize') + except: + pass + {{endif}} + {{if 'nvrtcGetPCHCreateStatus' in found_functions}} + try: + global __nvrtcGetPCHCreateStatus + __nvrtcGetPCHCreateStatus = win32api.GetProcAddress(handle, 'nvrtcGetPCHCreateStatus') + except: + pass + {{endif}} + {{if 'nvrtcGetPCHHeapSizeRequired' in found_functions}} + try: + global __nvrtcGetPCHHeapSizeRequired + __nvrtcGetPCHHeapSizeRequired = win32api.GetProcAddress(handle, 'nvrtcGetPCHHeapSizeRequired') + except: + pass + {{endif}} + {{if 'nvrtcSetFlowCallback' in found_functions}} + try: + global __nvrtcSetFlowCallback + __nvrtcSetFlowCallback = win32api.GetProcAddress(handle, 'nvrtcSetFlowCallback') + except: + pass + {{endif}} {{else}} {{if 'nvrtcGetErrorString' in found_functions}} @@ -330,6 +372,26 @@ cdef int cuPythonInit() except -1 nogil: global __nvrtcGetLoweredName __nvrtcGetLoweredName = dlfcn.dlsym(handle, 'nvrtcGetLoweredName') {{endif}} + {{if 'nvrtcGetPCHHeapSize' in found_functions}} + global __nvrtcGetPCHHeapSize + __nvrtcGetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSize') + {{endif}} + {{if 'nvrtcSetPCHHeapSize' in found_functions}} + global __nvrtcSetPCHHeapSize + __nvrtcSetPCHHeapSize = dlfcn.dlsym(handle, 'nvrtcSetPCHHeapSize') + {{endif}} + {{if 'nvrtcGetPCHCreateStatus' in found_functions}} + global __nvrtcGetPCHCreateStatus + __nvrtcGetPCHCreateStatus = dlfcn.dlsym(handle, 'nvrtcGetPCHCreateStatus') + {{endif}} + {{if 'nvrtcGetPCHHeapSizeRequired' in found_functions}} + global __nvrtcGetPCHHeapSizeRequired + __nvrtcGetPCHHeapSizeRequired = dlfcn.dlsym(handle, 'nvrtcGetPCHHeapSizeRequired') + {{endif}} + {{if 'nvrtcSetFlowCallback' in found_functions}} + global __nvrtcSetFlowCallback + __nvrtcSetFlowCallback = dlfcn.dlsym(handle, 'nvrtcSetFlowCallback') + {{endif}} {{endif}} @@ -584,3 +646,63 @@ cdef nvrtcResult _nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expres err = ( __nvrtcGetLoweredName)(prog, name_expression, lowered_name) return err {{endif}} + +{{if 'nvrtcGetPCHHeapSize' in found_functions}} + +cdef nvrtcResult _nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetPCHHeapSize + cuPythonInit() + if __nvrtcGetPCHHeapSize == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetPCHHeapSize" not found') + err = ( __nvrtcGetPCHHeapSize)(ret) + return err +{{endif}} + +{{if 'nvrtcSetPCHHeapSize' in found_functions}} + +cdef nvrtcResult _nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcSetPCHHeapSize + cuPythonInit() + if __nvrtcSetPCHHeapSize == NULL: + with gil: + raise RuntimeError('Function "nvrtcSetPCHHeapSize" not found') + err = ( __nvrtcSetPCHHeapSize)(size) + return err +{{endif}} + +{{if 'nvrtcGetPCHCreateStatus' in found_functions}} + +cdef nvrtcResult _nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetPCHCreateStatus + cuPythonInit() + if __nvrtcGetPCHCreateStatus == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetPCHCreateStatus" not found') + err = ( __nvrtcGetPCHCreateStatus)(prog) + return err +{{endif}} + +{{if 'nvrtcGetPCHHeapSizeRequired' in found_functions}} + +cdef nvrtcResult _nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcGetPCHHeapSizeRequired + cuPythonInit() + if __nvrtcGetPCHHeapSizeRequired == NULL: + with gil: + raise RuntimeError('Function "nvrtcGetPCHHeapSizeRequired" not found') + err = ( __nvrtcGetPCHHeapSizeRequired)(prog, size) + return err +{{endif}} + +{{if 'nvrtcSetFlowCallback' in found_functions}} + +cdef nvrtcResult _nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: + global __nvrtcSetFlowCallback + cuPythonInit() + if __nvrtcSetFlowCallback == NULL: + with gil: + raise RuntimeError('Function "nvrtcSetFlowCallback" not found') + err = ( __nvrtcSetFlowCallback)(prog, callback, payload) + return err +{{endif}} diff --git a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd.in index bb42fc31a..743dac01a 100644 --- a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pxd.in @@ -309,3 +309,17 @@ from libcpp cimport bool {{if 'cudaDeviceRegisterAsyncNotification' in found_functions}}cdef cudaError_t _cudaDeviceRegisterAsyncNotification(int device, cudaAsyncCallback callbackFunc, void* userData, cudaAsyncCallbackHandle_t* callback) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} {{if 'cudaDeviceUnregisterAsyncNotification' in found_functions}}cdef cudaError_t _cudaDeviceUnregisterAsyncNotification(int device, cudaAsyncCallbackHandle_t callback) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} {{if 'cudaGetDriverEntryPointByVersion' in found_functions}}cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaLibraryLoadData' in found_functions}}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{{endif}} +{{if 'cudaLibraryLoadFromFile' in found_functions}}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{{endif}} +{{if 'cudaLibraryUnload' in found_functions}}cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaLibraryGetKernel' in found_functions}}cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaLibraryGetGlobal' in found_functions}}cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaLibraryGetManaged' in found_functions}}cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaLibraryGetUnifiedFunction' in found_functions}}cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaLibraryGetKernelCount' in found_functions}}cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaLibraryEnumerateKernels' in found_functions}}cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaKernelSetAttributeForDevice' in found_functions}}cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaStreamGetDevice' in found_functions}}cdef cudaError_t _cudaStreamGetDevice(cudaStream_t stream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaEventElapsedTime_v2' in found_functions}}cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaMemcpyBatchAsync' in found_functions}}cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} +{{if 'cudaMemcpy3DBatchAsync' in found_functions}}cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil{{endif}} diff --git a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pyx.in index fed405586..3210f173c 100644 --- a/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/_lib/cyruntime/cyruntime.pyx.in @@ -4928,3 +4928,190 @@ cdef cudaError_t _cudaGetDriverEntryPointByVersion(const char* symbol, void** fu return err {{endif}} +{{if 'cudaLibraryLoadData' in found_functions}} + +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 err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaLibraryLoadFromFile' in found_functions}} + +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 err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaLibraryUnload' in found_functions}} + +cdef cudaError_t _cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuLibraryUnload(library) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaLibraryGetKernel' in found_functions}} + +cdef cudaError_t _cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuLibraryGetKernel(pKernel, library, name) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaLibraryGetGlobal' in found_functions}} + +cdef cudaError_t _cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuLibraryGetGlobal(dptr, numbytes, library, name) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaLibraryGetManaged' in found_functions}} + +cdef cudaError_t _cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuLibraryGetManaged(dptr, numbytes, library, name) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaLibraryGetUnifiedFunction' in found_functions}} + +cdef cudaError_t _cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuLibraryGetUnifiedFunction(fptr, library, symbol) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaLibraryGetKernelCount' in found_functions}} + +cdef cudaError_t _cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuLibraryGetKernelCount(count, lib) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaLibraryEnumerateKernels' in found_functions}} + +cdef cudaError_t _cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuLibraryEnumerateKernels(kernels, numKernels, lib) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaKernelSetAttributeForDevice' in found_functions}} + +cdef cudaError_t _cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuKernelSetAttribute(attr, value, kernel, device) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaStreamGetDevice' in found_functions}} + +cdef cudaError_t _cudaStreamGetDevice(cudaStream_t stream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + cdef cydriver.CUdevice driverDevice = 0 + if stream == NULL or stream == cudaStreamLegacy or stream == cudaStreamPerThread: + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuStreamGetDevice(stream, &driverDevice) + if err != cudaSuccess: + _setLastError(err) + return err + cudaDevice = m_global.getDeviceFromDriver(driverDevice) + device[0] = cudaDevice[0].deviceOrdinal + return cudaSuccess + +{{endif}} +{{if 'cudaEventElapsedTime_v2' in found_functions}} + +cdef cudaError_t _cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + if ms == NULL: + _setLastError(cudaErrorInvalidValue) + return cudaErrorInvalidValue + err = cydriver._cuEventElapsedTime_v2(ms, start, end) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaMemcpyBatchAsync' in found_functions}} + +cdef cudaError_t _cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver._cuMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} +{{if 'cudaMemcpy3DBatchAsync' in found_functions}} + +cdef cudaError_t _cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef cudaError_t err = cudaSuccess + err = m_global.lazyInitContextState() + if err != cudaSuccess: + return err + err = cydriver.cuMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + if err != cudaSuccess: + _setLastError(err) + return err + +{{endif}} diff --git a/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pyx.in b/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pyx.in index ea47081d7..bdcc37b74 100644 --- a/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pyx.in +++ b/cuda_bindings/cuda/bindings/_lib/cyruntime/utils.pyx.in @@ -710,6 +710,9 @@ cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChanne cudaChannelFormatKind.cudaChannelFormatKindSignedBlockCompressed6H,): if (d[0].x != 16) or (d[0].y != 16) or (d[0].z != 16) or (d[0].w != 0): return cudaErrorInvalidChannelDescriptor + elif d[0].f in (cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102,): + if (d[0].x != 10) or (d[0].y != 10) or (d[0].z != 10) or (d[0].w != 2): + return cudaErrorInvalidChannelDescriptor else: return cudaErrorInvalidChannelDescriptor @@ -719,7 +722,8 @@ cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChanne if (((d[0].y != 0) and (d[0].y != d[0].x)) or ((d[0].z != 0) and (d[0].z != d[0].y)) or ((d[0].w != 0) and (d[0].w != d[0].z))): - return cudaErrorInvalidChannelDescriptor + if d[0].f != cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102: + return cudaErrorInvalidChannelDescriptor if case_desc(d, 8, 0, 0, 0, cudaChannelFormatKind.cudaChannelFormatKindSigned): numberOfChannels[0] = 1 format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_SIGNED_INT8 @@ -861,6 +865,9 @@ cdef cudaError_t getDescInfo(const cudaChannelFormatDesc* d, int *numberOfChanne elif case_desc(d, 8, 8, 8, 8, cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB): numberOfChannels[0] = 4 format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_BC7_UNORM_SRGB + elif case_desc(d, 10, 10, 10, 2, cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102): + numberOfChannels[0] = 4 + format[0] = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2 else: return cudaErrorInvalidChannelDescriptor @@ -1046,7 +1053,8 @@ cdef cudaError_t bytesPerElement(size_t *bytes, int numberOfChannels, cydriver.C elif format in (cydriver.CU_AD_FORMAT_SNORM_INT8X4, cydriver.CU_AD_FORMAT_UNORM_INT8X4, cydriver.CU_AD_FORMAT_SNORM_INT16X2, - cydriver.CU_AD_FORMAT_UNORM_INT16X2): + cydriver.CU_AD_FORMAT_UNORM_INT16X2, + cydriver.CU_AD_FORMAT_UNORM_INT_101010_2): bytes[0] = 4 return cudaSuccess elif format in (cydriver.CU_AD_FORMAT_SNORM_INT16X4, @@ -1178,6 +1186,8 @@ cdef cudaError_t getChannelFormatDescFromDriverDesc( elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_BC7_UNORM_SRGB: pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB channel_size = 8 + elif pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2: + pRuntimeDesc[0].f = cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 else: return cudaErrorInvalidChannelDescriptor @@ -1187,14 +1197,20 @@ cdef cudaError_t getChannelFormatDescFromDriverDesc( pRuntimeDesc[0].z = 0 pRuntimeDesc[0].w = 0 - if pDriverDesc[0].NumChannels >= 4: - pRuntimeDesc[0].w = channel_size - if pDriverDesc[0].NumChannels >= 3: - pRuntimeDesc[0].z = channel_size - if pDriverDesc[0].NumChannels >= 2: - pRuntimeDesc[0].y = channel_size - if pDriverDesc[0].NumChannels >= 1: - pRuntimeDesc[0].x = channel_size + if pDriverDesc[0].Format == cydriver.CU_AD_FORMAT_UNORM_INT_101010_2 and pDriverDesc[0].NumChannels == 4: + pRuntimeDesc[0].w = 2 + pRuntimeDesc[0].z = 10 + pRuntimeDesc[0].y = 10 + pRuntimeDesc[0].x = 10 + else: + if pDriverDesc[0].NumChannels >= 4: + pRuntimeDesc[0].w = channel_size + if pDriverDesc[0].NumChannels >= 3: + pRuntimeDesc[0].z = channel_size + if pDriverDesc[0].NumChannels >= 2: + pRuntimeDesc[0].y = channel_size + if pDriverDesc[0].NumChannels >= 1: + pRuntimeDesc[0].x = channel_size if pDriverDesc[0].NumChannels not in (4, 3, 2, 1): return cudaErrorInvalidChannelDescriptor @@ -1230,7 +1246,8 @@ cdef cudaError_t getArrayBlockExtent(cudaExtent *blockExtent, cydriver.CUarray_f cydriver.CU_AD_FORMAT_SNORM_INT16X2, cydriver.CU_AD_FORMAT_UNORM_INT16X2, cydriver.CU_AD_FORMAT_SNORM_INT16X4, - cydriver.CU_AD_FORMAT_UNORM_INT16X4): + cydriver.CU_AD_FORMAT_UNORM_INT16X4, + cydriver.CU_AD_FORMAT_UNORM_INT_101010_2): blockExtent[0].width = 1 blockExtent[0].height = 1 blockExtent[0].depth = 1 @@ -2840,6 +2857,12 @@ cdef cudaError_t getDriverEglFrame(cydriver.CUeglFrame *cuEglFrame, cudaEglFrame cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_YUYV_422 elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY422: cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422 + elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY709: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709 + elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY709_ER: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER + elif eglFrame.eglColorFormat == cudaEglColorFormatUYVY2020: + cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020 elif eglFrame.eglColorFormat == cudaEglColorFormatARGB: cuEglFrame[0].eglColorFormat = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB elif eglFrame.eglColorFormat == cudaEglColorFormatRGBA: @@ -3194,6 +3217,12 @@ cdef cudaError_t getRuntimeEglFrame(cudaEglFrame *eglFrame, cydriver.CUeglFrame eglFrame[0].eglColorFormat = cudaEglColorFormatYUYV422 elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_422: eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY422 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709: + eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY709 + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER: + eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY709_ER + elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020: + eglFrame[0].eglColorFormat = cudaEglColorFormatUYVY2020 elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_ARGB: eglFrame[0].eglColorFormat = cudaEglColorFormatARGB elif cueglFrame.eglColorFormat == cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_RGBA: diff --git a/cuda_bindings/cuda/bindings/_lib/utils.pxd.in b/cuda_bindings/cuda/bindings/_lib/utils.pxd.in index e2022a36d..d8f6b790b 100644 --- a/cuda_bindings/cuda/bindings/_lib/utils.pxd.in +++ b/cuda_bindings/cuda/bindings/_lib/utils.pxd.in @@ -7,6 +7,7 @@ # is strictly prohibited. cimport cuda.bindings.driver as driver cimport cuda.bindings.cydriver as cydriver +cimport cuda.bindings.cyruntime as cyruntime from libcpp.vector cimport vector cdef class HelperKernelParams: @@ -88,6 +89,20 @@ cdef class HelperCUjit_option: cdef vector[char*] _charstarstar # list of names cdef InputVoidPtrPtrHelper _voidstarstar # list of addresses {{endif}} +{{if 'cudaJitOption' in found_types}} + +cdef class HelperCudaJitOption: + cdef void* _cptr + cdef cyruntime.cudaJitOption _attr + + # Return values + cdef unsigned int _uint + cdef float _float + cdef char* _charstar + cdef cyruntime.cudaJit_Fallback _fallback + cdef int _int + cdef cyruntime.cudaJit_CacheMode _cacheMode +{{endif}} {{if 'CUlibraryOption_enum' in found_types}} cdef class HelperCUlibraryOption: @@ -97,6 +112,15 @@ cdef class HelperCUlibraryOption: # Return values cdef unsigned int _uint {{endif}} +{{if 'cudaLibraryOption' in found_types}} + +cdef class HelperCudaLibraryOption: + cdef void* _cptr + cdef cyruntime.cudaLibraryOption _attr + + # Return values + cdef unsigned int _uint +{{endif}} {{if 'CUmemAllocationHandleType_enum' in found_types}} cdef class HelperCUmemAllocationHandleType: @@ -107,7 +131,9 @@ cdef class HelperCUmemAllocationHandleType: cdef int _int cdef void* _handle cdef unsigned int _d3dkmt_handle + {{if 'CUmemFabricHandle' in found_types}} cdef driver.CUmemFabricHandle _mem_fabric_handle + {{endif}} {{endif}} cdef class InputVoidPtrPtrHelper: diff --git a/cuda_bindings/cuda/bindings/_lib/utils.pyx.in b/cuda_bindings/cuda/bindings/_lib/utils.pyx.in index 15bafa99e..fdcaafd2c 100644 --- a/cuda_bindings/cuda/bindings/_lib/utils.pyx.in +++ b/cuda_bindings/cuda/bindings/_lib/utils.pyx.in @@ -435,6 +435,51 @@ cdef class HelperCUjit_option: return self._cptr {{endif}} +{{if 'cudaJitOption' in found_types}} + +cdef class HelperCudaJitOption: + def __cinit__(self, attr, init_value): + self._attr = attr.value + if self._attr in ({{if 'cudaJitMaxRegisters' in found_values}}cyruntime.cudaJitOption.cudaJitMaxRegisters,{{endif}} + {{if 'cudaJitThreadsPerBlock' in found_values}}cyruntime.cudaJitOption.cudaJitThreadsPerBlock,{{endif}} + {{if 'cudaJitInfoLogBufferSizeBytes' in found_values}}cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes,{{endif}} + {{if 'cudaJitErrorLogBufferSizeBytes' in found_values}}cyruntime.cudaJitOption.cudaJitErrorLogBufferSizeBytes,{{endif}} + {{if 'cudaJitOptimizationLevel' in found_values}}cyruntime.cudaJitOption.cudaJitOptimizationLevel,{{endif}} + {{if 'cudaJitMinCtaPerSm' in found_values}}cyruntime.cudaJitOption.cudaJitMinCtaPerSm,{{endif}}): + self._uint = init_value + self._cptr = self._uint + elif self._attr in ({{if 'cudaJitWallTime' in found_values}}cyruntime.cudaJitOption.cudaJitWallTime,{{endif}}): + self._float = init_value + self._cptr = self._float + elif self._attr in ({{if 'cudaJitInfoLogBuffer' in found_values}}cyruntime.cudaJitOption.cudaJitInfoLogBuffer,{{endif}} + {{if 'cudaJitErrorLogBuffer' in found_values}}cyruntime.cudaJitOption.cudaJitErrorLogBuffer{{endif}}): + self._charstar = init_value + self._cptr = self._charstar + elif self._attr in ({{if 'cudaJitFallbackStrategy' in found_values}}cyruntime.cudaJitOption.cudaJitFallbackStrategy,{{endif}}): + self._fallback = init_value.value + self._cptr = self._fallback + elif self._attr in ({{if 'cudaJitGenerateDebugInfo' in found_values}}cyruntime.cudaJitOption.cudaJitGenerateDebugInfo,{{endif}} + {{if 'cudaJitLogVerbose' in found_values}}cyruntime.cudaJitOption.cudaJitLogVerbose,{{endif}} + {{if 'cudaJitGenerateLineInfo' in found_values}}cyruntime.cudaJitOption.cudaJitGenerateLineInfo,{{endif}} + {{if 'cudaJitPositionIndependentCode' in found_values}}cyruntime.cudaJitOption.cudaJitPositionIndependentCode,{{endif}} + {{if 'cudaJitMaxThreadsPerBlock' in found_values}}cyruntime.cudaJitOption.cudaJitMaxThreadsPerBlock,{{endif}} + {{if 'cudaJitOverrideDirectiveValues' in found_values}}cyruntime.cudaJitOption.cudaJitOverrideDirectiveValues,{{endif}}): + self._int = init_value + self._cptr = self._int + elif self._attr in ({{if 'cudaJitCacheMode' in found_values}}cyruntime.cudaJitOption.cudaJitCacheMode,{{endif}}): + self._cacheMode = init_value.value + self._cptr = self._cacheMode + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr +{{endif}} + {{if 'CUlibraryOption_enum' in found_types}} cdef class HelperCUlibraryOption: @@ -462,6 +507,33 @@ cdef class HelperCUlibraryOption: return self._cptr {{endif}} +{{if 'cudaLibraryOption' in found_types}} + +cdef class HelperCudaLibraryOption: + def __cinit__(self, attr, init_value): + self._attr = attr.value + if False: + pass + {{if 'cudaLibraryHostUniversalFunctionAndDataTable' in found_values}} + elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable,): + self._cptr = init_value.getPtr() + {{endif}} + {{if 'cudaLibraryBinaryIsPreserved' in found_values}} + elif self._attr in (cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved,): + self._uint = init_value + self._cptr = self._uint + {{endif}} + else: + raise TypeError('Unsupported attribute: {}'.format(attr.name)) + + def __dealloc__(self): + pass + + @property + def cptr(self): + return self._cptr +{{endif}} + {{if 'CUmemAllocationHandleType_enum' in found_types}} cdef class HelperCUmemAllocationHandleType: diff --git a/cuda_bindings/cuda/bindings/_version.py b/cuda_bindings/cuda/bindings/_version.py index c144fb2ca..184a71671 100644 --- a/cuda_bindings/cuda/bindings/_version.py +++ b/cuda_bindings/cuda/bindings/_version.py @@ -6,4 +6,4 @@ # this software and related documentation outside the terms of the EULA # is strictly prohibited. -__version__ = "12.6.3" +__version__ = "12.8.0" diff --git a/cuda_bindings/cuda/bindings/cydriver.pxd.in b/cuda_bindings/cuda/bindings/cydriver.pxd.in index 95877a3f4..d1a3f24b6 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pxd.in +++ b/cuda_bindings/cuda/bindings/cydriver.pxd.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t @@ -349,6 +351,7 @@ cdef extern from "cuda.h": CU_AD_FORMAT_SIGNED_INT32 = 10 CU_AD_FORMAT_HALF = 16 CU_AD_FORMAT_FLOAT = 32 + CU_AD_FORMAT_UNORM_INT_101010_2 = 80 CU_AD_FORMAT_BC1_UNORM = 145 CU_AD_FORMAT_BC1_UNORM_SRGB = 146 CU_AD_FORMAT_BC2_UNORM = 147 @@ -377,6 +380,8 @@ cdef extern from "cuda.h": CU_AD_FORMAT_Y416 = 177 CU_AD_FORMAT_Y444_PLANAR8 = 178 CU_AD_FORMAT_Y444_PLANAR10 = 179 + CU_AD_FORMAT_YUV444_8bit_SemiPlanar = 180 + CU_AD_FORMAT_YUV444_16bit_SemiPlanar = 181 CU_AD_FORMAT_UNORM_INT8X1 = 192 CU_AD_FORMAT_UNORM_INT8X2 = 193 CU_AD_FORMAT_UNORM_INT8X4 = 194 @@ -549,7 +554,12 @@ cdef extern from "cuda.h": CU_DEVICE_ATTRIBUTE_MPS_ENABLED = 133 CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID = 134 CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED = 135 - CU_DEVICE_ATTRIBUTE_MAX = 136 + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK = 136 + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH = 137 + CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID = 139 + CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID = 140 + CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED = 143 + CU_DEVICE_ATTRIBUTE_MAX = 144 ctypedef CUdevice_attribute_enum CUdevice_attribute @@ -590,6 +600,7 @@ cdef extern from "cuda.h": CU_POINTER_ATTRIBUTE_MAPPING_SIZE = 18 CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR = 19 CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID = 20 + CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE = 21 ctypedef CUpointer_attribute_enum CUpointer_attribute @@ -731,7 +742,13 @@ cdef extern from "cuda.h": CU_TARGET_COMPUTE_87 = 87 CU_TARGET_COMPUTE_89 = 89 CU_TARGET_COMPUTE_90 = 90 + CU_TARGET_COMPUTE_100 = 100 + CU_TARGET_COMPUTE_101 = 101 + CU_TARGET_COMPUTE_120 = 120 CU_TARGET_COMPUTE_90A = 65626 + CU_TARGET_COMPUTE_100A = 65636 + CU_TARGET_COMPUTE_101A = 65637 + CU_TARGET_COMPUTE_120A = 65656 ctypedef CUjit_target_enum CUjit_target @@ -920,6 +937,7 @@ cdef extern from "cuda.h": cdef enum CUgraphConditionalNodeType_enum: CU_GRAPH_COND_TYPE_IF = 0 CU_GRAPH_COND_TYPE_WHILE = 1 + CU_GRAPH_COND_TYPE_SWITCH = 2 ctypedef CUgraphConditionalNodeType_enum CUgraphConditionalNodeType @@ -968,6 +986,7 @@ cdef extern from "cuda.h": CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE = 2 CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED = 3 CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED = 4 + CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED = 5 ctypedef CUgraphInstantiateResult_enum CUgraphInstantiateResult @@ -1018,6 +1037,7 @@ cdef extern from "cuda.h": CU_LAUNCH_ATTRIBUTE_PRIORITY = 8 CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = 12 CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 @@ -1039,6 +1059,11 @@ cdef extern from "cuda.h": int flags cdef struct anon_struct4: + unsigned int x + unsigned int y + unsigned int z + + cdef struct anon_struct5: int deviceUpdatable CUgraphDeviceNode devNode @@ -1055,7 +1080,8 @@ cdef extern from "cuda.h": int priority CUlaunchMemSyncDomainMap memSyncDomainMap CUlaunchMemSyncDomain memSyncDomain - anon_struct4 deviceUpdatableKernelNode + anon_struct4 preferredClusterDim + anon_struct5 deviceUpdatableKernelNode unsigned int sharedMemCarveout ctypedef CUlaunchAttributeValue_union CUlaunchAttributeValue @@ -1216,6 +1242,7 @@ cdef extern from "cuda.h": CUDA_ERROR_JIT_COMPILATION_DISABLED = 223 CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY = 224 CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC = 225 + CUDA_ERROR_CONTAINED = 226 CUDA_ERROR_INVALID_SOURCE = 300 CUDA_ERROR_FILE_NOT_FOUND = 301 CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = 302 @@ -1245,6 +1272,7 @@ cdef extern from "cuda.h": CUDA_ERROR_INVALID_PC = 718 CUDA_ERROR_LAUNCH_FAILED = 719 CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = 720 + CUDA_ERROR_TENSOR_MEMORY_LEAK = 721 CUDA_ERROR_NOT_PERMITTED = 800 CUDA_ERROR_NOT_SUPPORTED = 801 CUDA_ERROR_SYSTEM_NOT_READY = 802 @@ -1274,6 +1302,7 @@ cdef extern from "cuda.h": CUDA_ERROR_FUNCTION_NOT_LOADED = 913 CUDA_ERROR_INVALID_RESOURCE_TYPE = 914 CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION = 915 + CUDA_ERROR_KEY_ROTATION = 916 CUDA_ERROR_UNKNOWN = 999 ctypedef cudaError_enum CUresult @@ -1405,13 +1434,13 @@ cdef extern from "cuda.h": ctypedef CUDA_ARRAY3D_DESCRIPTOR_v2 CUDA_ARRAY3D_DESCRIPTOR - cdef struct anon_struct5: + cdef struct anon_struct6: unsigned int width unsigned int height unsigned int depth cdef struct CUDA_ARRAY_SPARSE_PROPERTIES_st: - anon_struct5 tileExtent + anon_struct6 tileExtent unsigned int miptailFirstLevel unsigned long long miptailSize unsigned int flags @@ -1430,19 +1459,19 @@ cdef extern from "cuda.h": ctypedef CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 CUDA_ARRAY_MEMORY_REQUIREMENTS - cdef struct anon_struct6: + cdef struct anon_struct7: CUarray hArray - cdef struct anon_struct7: + cdef struct anon_struct8: CUmipmappedArray hMipmappedArray - cdef struct anon_struct8: + cdef struct anon_struct9: CUdeviceptr devPtr CUarray_format format unsigned int numChannels size_t sizeInBytes - cdef struct anon_struct9: + cdef struct anon_struct10: CUdeviceptr devPtr CUarray_format format unsigned int numChannels @@ -1450,15 +1479,15 @@ cdef extern from "cuda.h": size_t height size_t pitchInBytes - cdef struct anon_struct10: + cdef struct anon_struct11: int reserved[32] cdef union anon_union4: - anon_struct6 array - anon_struct7 mipmap - anon_struct8 linear - anon_struct9 pitch2D - anon_struct10 reserved + anon_struct7 array + anon_struct8 mipmap + anon_struct9 linear + anon_struct10 pitch2D + anon_struct11 reserved cdef struct CUDA_RESOURCE_DESC_st: CUresourcetype resType @@ -1558,6 +1587,9 @@ cdef extern from "cuda.h": CU_TENSOR_MAP_DATA_TYPE_FLOAT32_FTZ = 10 CU_TENSOR_MAP_DATA_TYPE_TFLOAT32 = 11 CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ = 12 + CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B = 13 + CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B = 14 + CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B = 15 ctypedef CUtensorMapDataType_enum CUtensorMapDataType @@ -1573,6 +1605,9 @@ cdef extern from "cuda.h": CU_TENSOR_MAP_SWIZZLE_32B = 1 CU_TENSOR_MAP_SWIZZLE_64B = 2 CU_TENSOR_MAP_SWIZZLE_128B = 3 + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B = 4 + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B_FLIP_8B = 5 + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B = 6 ctypedef CUtensorMapSwizzle_enum CUtensorMapSwizzle @@ -1590,6 +1625,12 @@ cdef extern from "cuda.h": ctypedef CUtensorMapFloatOOBfill_enum CUtensorMapFloatOOBfill + cdef enum CUtensorMapIm2ColWideMode_enum: + CU_TENSOR_MAP_IM2COL_WIDE_MODE_W = 0 + CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128 = 1 + + ctypedef CUtensorMapIm2ColWideMode_enum CUtensorMapIm2ColWideMode + cdef struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: unsigned long long p2pToken unsigned int vaSpaceToken @@ -1633,13 +1674,13 @@ cdef extern from "cuda.h": ctypedef CUexternalMemoryHandleType_enum CUexternalMemoryHandleType - cdef struct anon_struct11: + cdef struct anon_struct12: void* handle const void* name cdef union anon_union5: int fd - anon_struct11 win32 + anon_struct12 win32 const void* nvSciBufObject cdef struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: @@ -1687,13 +1728,13 @@ cdef extern from "cuda.h": ctypedef CUexternalSemaphoreHandleType_enum CUexternalSemaphoreHandleType - cdef struct anon_struct12: + cdef struct anon_struct13: void* handle const void* name cdef union anon_union6: int fd - anon_struct12 win32 + anon_struct13 win32 const void* nvSciSyncObj cdef struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: @@ -1706,24 +1747,24 @@ cdef extern from "cuda.h": ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC - cdef struct anon_struct13: + cdef struct anon_struct14: unsigned long long value cdef union anon_union7: void* fence unsigned long long reserved - cdef struct anon_struct14: + cdef struct anon_struct15: unsigned long long key - cdef struct anon_struct15: - anon_struct13 fence + cdef struct anon_struct16: + anon_struct14 fence anon_union7 nvSciSync - anon_struct14 keyedMutex + anon_struct15 keyedMutex unsigned int reserved[12] cdef struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: - anon_struct15 params + anon_struct16 params unsigned int flags unsigned int reserved[16] @@ -1731,25 +1772,25 @@ cdef extern from "cuda.h": ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS - cdef struct anon_struct16: + cdef struct anon_struct17: unsigned long long value cdef union anon_union8: void* fence unsigned long long reserved - cdef struct anon_struct17: + cdef struct anon_struct18: unsigned long long key unsigned int timeoutMs - cdef struct anon_struct18: - anon_struct16 fence + cdef struct anon_struct19: + anon_struct17 fence anon_union8 nvSciSync - anon_struct17 keyedMutex + anon_struct18 keyedMutex unsigned int reserved[10] cdef struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: - anon_struct18 params + anon_struct19 params unsigned int flags unsigned int reserved[16] @@ -1840,6 +1881,11 @@ cdef extern from "cuda.h": ctypedef CUmemRangeHandleType_enum CUmemRangeHandleType + cdef enum CUmemRangeFlags_enum: + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE = 1 + + ctypedef CUmemRangeFlags_enum CUmemRangeFlags + cdef enum CUarraySparseSubresourceType_enum: CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = 0 CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = 1 @@ -1861,7 +1907,7 @@ cdef extern from "cuda.h": CUmipmappedArray mipmap CUarray array - cdef struct anon_struct19: + cdef struct anon_struct20: unsigned int level unsigned int layer unsigned int offsetX @@ -1871,14 +1917,14 @@ cdef extern from "cuda.h": unsigned int extentHeight unsigned int extentDepth - cdef struct anon_struct20: + cdef struct anon_struct21: unsigned int layer unsigned long long offset unsigned long long size cdef union anon_union10: - anon_struct19 sparseLevel - anon_struct20 miptail + anon_struct20 sparseLevel + anon_struct21 miptail cdef union anon_union11: CUmemGenericAllocationHandle memHandle @@ -1914,7 +1960,7 @@ cdef extern from "cuda.h": ctypedef CUmemAllocationCompType_enum CUmemAllocationCompType - cdef struct anon_struct21: + cdef struct anon_struct22: unsigned char compressionType unsigned char gpuDirectRDMACapable unsigned short usage @@ -1925,7 +1971,7 @@ cdef extern from "cuda.h": CUmemAllocationHandleType requestedHandleTypes CUmemLocation location void* win32HandleMetaData - anon_struct21 allocFlags + anon_struct22 allocFlags ctypedef CUmemAllocationProp_st CUmemAllocationProp_v1 @@ -2146,12 +2192,143 @@ cdef extern from "cuda.h": ctypedef CUdeviceNumaConfig_enum CUdeviceNumaConfig + cdef enum CUprocessState_enum: + CU_PROCESS_STATE_RUNNING = 0 + CU_PROCESS_STATE_LOCKED = 1 + CU_PROCESS_STATE_CHECKPOINTED = 2 + CU_PROCESS_STATE_FAILED = 3 + + ctypedef CUprocessState_enum CUprocessState + + cdef struct CUcheckpointLockArgs_st: + unsigned int timeoutMs + unsigned int reserved0 + cuuint64_t reserved1[7] + + ctypedef CUcheckpointLockArgs_st CUcheckpointLockArgs + + cdef struct CUcheckpointCheckpointArgs_st: + cuuint64_t reserved[8] + + ctypedef CUcheckpointCheckpointArgs_st CUcheckpointCheckpointArgs + + cdef struct CUcheckpointRestoreArgs_st: + cuuint64_t reserved[8] + + ctypedef CUcheckpointRestoreArgs_st CUcheckpointRestoreArgs + + cdef struct CUcheckpointUnlockArgs_st: + cuuint64_t reserved[8] + + ctypedef CUcheckpointUnlockArgs_st CUcheckpointUnlockArgs + + cdef enum CUmemcpyFlags_enum: + CU_MEMCPY_FLAG_DEFAULT = 0 + CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE = 1 + + ctypedef CUmemcpyFlags_enum CUmemcpyFlags + + cdef enum CUmemcpySrcAccessOrder_enum: + CU_MEMCPY_SRC_ACCESS_ORDER_INVALID = 0 + CU_MEMCPY_SRC_ACCESS_ORDER_STREAM = 1 + CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL = 2 + CU_MEMCPY_SRC_ACCESS_ORDER_ANY = 3 + CU_MEMCPY_SRC_ACCESS_ORDER_MAX = 2147483647 + + ctypedef CUmemcpySrcAccessOrder_enum CUmemcpySrcAccessOrder + + cdef struct CUmemcpyAttributes_st: + CUmemcpySrcAccessOrder srcAccessOrder + CUmemLocation srcLocHint + CUmemLocation dstLocHint + unsigned int flags + + ctypedef CUmemcpyAttributes_st CUmemcpyAttributes_v1 + + ctypedef CUmemcpyAttributes_v1 CUmemcpyAttributes + + cdef enum CUmemcpy3DOperandType_enum: + CU_MEMCPY_OPERAND_TYPE_POINTER = 1 + CU_MEMCPY_OPERAND_TYPE_ARRAY = 2 + CU_MEMCPY_OPERAND_TYPE_MAX = 2147483647 + + ctypedef CUmemcpy3DOperandType_enum CUmemcpy3DOperandType + + cdef struct CUoffset3D_st: + size_t x + size_t y + size_t z + + ctypedef CUoffset3D_st CUoffset3D_v1 + + ctypedef CUoffset3D_v1 CUoffset3D + + cdef struct CUextent3D_st: + size_t width + size_t height + size_t depth + + ctypedef CUextent3D_st CUextent3D_v1 + + ctypedef CUextent3D_v1 CUextent3D + + cdef struct anon_struct23: + CUdeviceptr ptr + size_t rowLength + size_t layerHeight + CUmemLocation locHint + + cdef struct anon_struct24: + CUarray array + CUoffset3D offset + + cdef union anon_union13: + anon_struct23 ptr + anon_struct24 array + + cdef struct CUmemcpy3DOperand_st: + CUmemcpy3DOperandType type + anon_union13 op + + ctypedef CUmemcpy3DOperand_st CUmemcpy3DOperand_v1 + + ctypedef CUmemcpy3DOperand_v1 CUmemcpy3DOperand + + cdef struct CUDA_MEMCPY3D_BATCH_OP_st: + CUmemcpy3DOperand src + CUmemcpy3DOperand dst + CUextent3D extent + CUmemcpySrcAccessOrder srcAccessOrder + unsigned int flags + + ctypedef CUDA_MEMCPY3D_BATCH_OP_st CUDA_MEMCPY3D_BATCH_OP_v1 + + ctypedef CUDA_MEMCPY3D_BATCH_OP_v1 CUDA_MEMCPY3D_BATCH_OP + cdef enum CUmoduleLoadingMode_enum: CU_MODULE_EAGER_LOADING = 1 CU_MODULE_LAZY_LOADING = 2 ctypedef CUmoduleLoadingMode_enum CUmoduleLoadingMode + cdef enum CUmemDecompressAlgorithm_enum: + CU_MEM_DECOMPRESS_UNSUPPORTED = 0 + CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE = 1 + CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY = 2 + + ctypedef CUmemDecompressAlgorithm_enum CUmemDecompressAlgorithm + + cdef struct CUmemDecompressParams_st: + size_t srcNumBytes + size_t dstNumBytes + cuuint32_t* dstActBytes + const void* src + void* dst + CUmemDecompressAlgorithm algo + unsigned char padding[20] + + ctypedef CUmemDecompressParams_st CUmemDecompressParams + cdef enum CUfunctionLoadingState_enum: CU_FUNCTION_LOADING_STATE_UNLOADED = 0 CU_FUNCTION_LOADING_STATE_LOADED = 1 @@ -2346,16 +2523,19 @@ cdef enum CUeglColorFormat_enum: CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 111 CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 112 CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 113 - CU_EGL_COLOR_FORMAT_MAX = 114 + CU_EGL_COLOR_FORMAT_UYVY_709 = 114 + CU_EGL_COLOR_FORMAT_UYVY_709_ER = 115 + CU_EGL_COLOR_FORMAT_UYVY_2020 = 116 + CU_EGL_COLOR_FORMAT_MAX = 117 ctypedef CUeglColorFormat_enum CUeglColorFormat -cdef union anon_union14: +cdef union anon_union15: CUarray pArray[3] void* pPitch[3] cdef struct CUeglFrame_st: - anon_union14 frame + anon_union15 frame unsigned int width unsigned int height unsigned int depth @@ -3083,6 +3263,16 @@ cdef CUresult cuMemcpy3DAsync(const CUDA_MEMCPY3D* pCopy, CUstream hStream) exce cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuMemcpyBatchAsync' in found_functions}} + +cdef CUresult cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuMemcpy3DBatchAsync' in found_functions}} + +cdef CUresult cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuMemsetD8_v2' in found_functions}} cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil @@ -3213,6 +3403,11 @@ cdef CUresult cuMipmappedArrayDestroy(CUmipmappedArray hMipmappedArray) except ? cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size_t size, CUmemRangeHandleType handleType, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuMemBatchDecompressAsync' in found_functions}} + +cdef CUresult cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuMemAddressReserve' in found_functions}} cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil @@ -3443,6 +3638,11 @@ cdef CUresult cuStreamCreateWithPriority(CUstream* phStream, unsigned int flags, cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuStreamGetDevice' in found_functions}} + +cdef CUresult cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuStreamGetFlags' in found_functions}} cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil @@ -3588,6 +3788,11 @@ cdef CUresult cuEventDestroy(CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuEventElapsedTime_v2' in found_functions}} + +cdef CUresult cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuImportExternalMemory' in found_functions}} cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil @@ -4443,6 +4648,11 @@ cdef CUresult cuTensorMapEncodeTiled(CUtensorMap* tensorMap, CUtensorMapDataType cdef CUresult cuTensorMapEncodeIm2col(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, const int* pixelBoxLowerCorner, const int* pixelBoxUpperCorner, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuTensorMapEncodeIm2colWide' in found_functions}} + +cdef CUresult cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuTensorMapReplaceAddress' in found_functions}} cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil @@ -4593,6 +4803,36 @@ cdef CUresult cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?C cdef CUresult cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, unsigned int flags, int priority) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} +{{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}} + +cdef CUresult cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuCheckpointProcessGetState' in found_functions}} + +cdef CUresult cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuCheckpointProcessLock' in found_functions}} + +cdef CUresult cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuCheckpointProcessCheckpoint' in found_functions}} + +cdef CUresult cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuCheckpointProcessRestore' in found_functions}} + +cdef CUresult cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + +{{if 'cuCheckpointProcessUnlock' in found_functions}} + +cdef CUresult cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil +{{endif}} + {{if 'cuProfilerStart' in found_functions}} cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil @@ -4698,7 +4938,7 @@ cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResou cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil {{endif}} -cdef enum: CUDA_VERSION = 12060 +cdef enum: CUDA_VERSION = 12080 cdef enum: CU_IPC_HANDLE_SIZE = 64 @@ -4730,6 +4970,8 @@ cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9 cdef enum: CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10 +cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = 11 + cdef enum: CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13 cdef enum: CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14 @@ -4774,6 +5016,10 @@ cdef enum: CUDA_NVSCISYNC_ATTR_WAIT = 2 cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 +cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 + +cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 + cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1 cdef enum: CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2 diff --git a/cuda_bindings/cuda/bindings/cydriver.pyx.in b/cuda_bindings/cuda/bindings/cydriver.pyx.in index 3809e3585..6b99e62dd 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pyx.in +++ b/cuda_bindings/cuda/bindings/cydriver.pyx.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. cimport cuda.bindings._bindings.cydriver as cydriver {{if 'cuGetErrorString' in found_functions}} @@ -805,6 +807,18 @@ cdef CUresult cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER* pCopy, CUstream hStr return cydriver._cuMemcpy3DPeerAsync(pCopy, hStream) {{endif}} +{{if 'cuMemcpyBatchAsync' in found_functions}} + +cdef CUresult cuMemcpyBatchAsync(CUdeviceptr* dsts, CUdeviceptr* srcs, size_t* sizes, size_t count, CUmemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, hStream) +{{endif}} + +{{if 'cuMemcpy3DBatchAsync' in found_functions}} + +cdef CUresult cuMemcpy3DBatchAsync(size_t numOps, CUDA_MEMCPY3D_BATCH_OP* opList, size_t* failIdx, unsigned long long flags, CUstream hStream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemcpy3DBatchAsync(numOps, opList, failIdx, flags, hStream) +{{endif}} + {{if 'cuMemsetD8_v2' in found_functions}} cdef CUresult cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, size_t N) except ?CUDA_ERROR_NOT_FOUND nogil: @@ -961,6 +975,12 @@ cdef CUresult cuMemGetHandleForAddressRange(void* handle, CUdeviceptr dptr, size return cydriver._cuMemGetHandleForAddressRange(handle, dptr, size, handleType, flags) {{endif}} +{{if 'cuMemBatchDecompressAsync' in found_functions}} + +cdef CUresult cuMemBatchDecompressAsync(CUmemDecompressParams* paramsArray, size_t count, unsigned int flags, size_t* errorIndex, CUstream stream) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuMemBatchDecompressAsync(paramsArray, count, flags, errorIndex, stream) +{{endif}} + {{if 'cuMemAddressReserve' in found_functions}} cdef CUresult cuMemAddressReserve(CUdeviceptr* ptr, size_t size, size_t alignment, CUdeviceptr addr, unsigned long long flags) except ?CUDA_ERROR_NOT_FOUND nogil: @@ -1237,6 +1257,12 @@ cdef CUresult cuStreamGetPriority(CUstream hStream, int* priority) except ?CUDA_ return cydriver._cuStreamGetPriority(hStream, priority) {{endif}} +{{if 'cuStreamGetDevice' in found_functions}} + +cdef CUresult cuStreamGetDevice(CUstream hStream, CUdevice* device) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuStreamGetDevice(hStream, device) +{{endif}} + {{if 'cuStreamGetFlags' in found_functions}} cdef CUresult cuStreamGetFlags(CUstream hStream, unsigned int* flags) except ?CUDA_ERROR_NOT_FOUND nogil: @@ -1411,6 +1437,12 @@ cdef CUresult cuEventElapsedTime(float* pMilliseconds, CUevent hStart, CUevent h return cydriver._cuEventElapsedTime(pMilliseconds, hStart, hEnd) {{endif}} +{{if 'cuEventElapsedTime_v2' in found_functions}} + +cdef CUresult cuEventElapsedTime_v2(float* pMilliseconds, CUevent hStart, CUevent hEnd) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuEventElapsedTime_v2(pMilliseconds, hStart, hEnd) +{{endif}} + {{if 'cuImportExternalMemory' in found_functions}} cdef CUresult cuImportExternalMemory(CUexternalMemory* extMem_out, const CUDA_EXTERNAL_MEMORY_HANDLE_DESC* memHandleDesc) except ?CUDA_ERROR_NOT_FOUND nogil: @@ -2437,6 +2469,12 @@ cdef CUresult cuTensorMapEncodeIm2col(CUtensorMap* tensorMap, CUtensorMapDataTyp return cydriver._cuTensorMapEncodeIm2col(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCorner, pixelBoxUpperCorner, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, swizzle, l2Promotion, oobFill) {{endif}} +{{if 'cuTensorMapEncodeIm2colWide' in found_functions}} + +cdef CUresult cuTensorMapEncodeIm2colWide(CUtensorMap* tensorMap, CUtensorMapDataType tensorDataType, cuuint32_t tensorRank, void* globalAddress, const cuuint64_t* globalDim, const cuuint64_t* globalStrides, int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, cuuint32_t channelsPerPixel, cuuint32_t pixelsPerColumn, const cuuint32_t* elementStrides, CUtensorMapInterleave interleave, CUtensorMapIm2ColWideMode mode, CUtensorMapSwizzle swizzle, CUtensorMapL2promotion l2Promotion, CUtensorMapFloatOOBfill oobFill) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuTensorMapEncodeIm2colWide(tensorMap, tensorDataType, tensorRank, globalAddress, globalDim, globalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides, interleave, mode, swizzle, l2Promotion, oobFill) +{{endif}} + {{if 'cuTensorMapReplaceAddress' in found_functions}} cdef CUresult cuTensorMapReplaceAddress(CUtensorMap* tensorMap, void* globalAddress) except ?CUDA_ERROR_NOT_FOUND nogil: @@ -2617,6 +2655,42 @@ cdef CUresult cuGreenCtxStreamCreate(CUstream* phStream, CUgreenCtx greenCtx, un return cydriver._cuGreenCtxStreamCreate(phStream, greenCtx, flags, priority) {{endif}} +{{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}} + +cdef CUresult cuCheckpointProcessGetRestoreThreadId(int pid, int* tid) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessGetRestoreThreadId(pid, tid) +{{endif}} + +{{if 'cuCheckpointProcessGetState' in found_functions}} + +cdef CUresult cuCheckpointProcessGetState(int pid, CUprocessState* state) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessGetState(pid, state) +{{endif}} + +{{if 'cuCheckpointProcessLock' in found_functions}} + +cdef CUresult cuCheckpointProcessLock(int pid, CUcheckpointLockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessLock(pid, args) +{{endif}} + +{{if 'cuCheckpointProcessCheckpoint' in found_functions}} + +cdef CUresult cuCheckpointProcessCheckpoint(int pid, CUcheckpointCheckpointArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessCheckpoint(pid, args) +{{endif}} + +{{if 'cuCheckpointProcessRestore' in found_functions}} + +cdef CUresult cuCheckpointProcessRestore(int pid, CUcheckpointRestoreArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessRestore(pid, args) +{{endif}} + +{{if 'cuCheckpointProcessUnlock' in found_functions}} + +cdef CUresult cuCheckpointProcessUnlock(int pid, CUcheckpointUnlockArgs* args) except ?CUDA_ERROR_NOT_FOUND nogil: + return cydriver._cuCheckpointProcessUnlock(pid, args) +{{endif}} + {{if 'cuProfilerStart' in found_functions}} cdef CUresult cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil: diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pxd.in b/cuda_bindings/cuda/bindings/cynvrtc.pxd.in index 20e3fef38..ce1fed330 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pxd.in +++ b/cuda_bindings/cuda/bindings/cynvrtc.pxd.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t @@ -24,6 +26,10 @@ cdef extern from "nvrtc.h": NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10 NVRTC_ERROR_INTERNAL_ERROR = 11 NVRTC_ERROR_TIME_FILE_WRITE_FAILED = 12 + NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED = 13 + NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED = 14 + NVRTC_ERROR_PCH_CREATE = 15 + NVRTC_ERROR_CANCELLED = 16 cdef struct _nvrtcProgram: pass @@ -134,3 +140,28 @@ cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expr cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil {{endif}} +{{if 'nvrtcGetPCHHeapSize' in found_functions}} + +cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil +{{endif}} + +{{if 'nvrtcSetPCHHeapSize' in found_functions}} + +cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil +{{endif}} + +{{if 'nvrtcGetPCHCreateStatus' in found_functions}} + +cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil +{{endif}} + +{{if 'nvrtcGetPCHHeapSizeRequired' in found_functions}} + +cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil +{{endif}} + +{{if 'nvrtcSetFlowCallback' in found_functions}} + +cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil +{{endif}} + diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pyx.in b/cuda_bindings/cuda/bindings/cynvrtc.pyx.in index cf02cce97..17b187bef 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pyx.in +++ b/cuda_bindings/cuda/bindings/cynvrtc.pyx.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. cimport cuda.bindings._bindings.cynvrtc as cynvrtc {{if 'nvrtcGetErrorString' in found_functions}} @@ -132,3 +134,33 @@ cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expr cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil: return cynvrtc._nvrtcGetLoweredName(prog, name_expression, lowered_name) {{endif}} + +{{if 'nvrtcGetPCHHeapSize' in found_functions}} + +cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetPCHHeapSize(ret) +{{endif}} + +{{if 'nvrtcSetPCHHeapSize' in found_functions}} + +cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcSetPCHHeapSize(size) +{{endif}} + +{{if 'nvrtcGetPCHCreateStatus' in found_functions}} + +cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetPCHCreateStatus(prog) +{{endif}} + +{{if 'nvrtcGetPCHHeapSizeRequired' in found_functions}} + +cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcGetPCHHeapSizeRequired(prog, size) +{{endif}} + +{{if 'nvrtcSetFlowCallback' in found_functions}} + +cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil: + return cynvrtc._nvrtcSetFlowCallback(prog, callback, payload) +{{endif}} diff --git a/cuda_bindings/cuda/bindings/cyruntime.pxd.in b/cuda_bindings/cuda/bindings/cyruntime.pxd.in index 4372558c2..6fb33eab2 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pxd.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pxd.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. from libc.stdint cimport uint32_t, uint64_t @@ -90,6 +92,7 @@ cdef extern from "driver_types.h": cudaErrorJitCompilationDisabled = 223 cudaErrorUnsupportedExecAffinity = 224 cudaErrorUnsupportedDevSideSync = 225 + cudaErrorContained = 226 cudaErrorInvalidSource = 300 cudaErrorFileNotFound = 301 cudaErrorSharedObjectSymbolNotFound = 302 @@ -119,6 +122,7 @@ cdef extern from "driver_types.h": cudaErrorInvalidPc = 718 cudaErrorLaunchFailure = 719 cudaErrorCooperativeLaunchTooLarge = 720 + cudaErrorTensorMemoryLeak = 721 cudaErrorNotPermitted = 800 cudaErrorNotSupported = 801 cudaErrorSystemNotReady = 802 @@ -368,6 +372,42 @@ cdef extern from "driver_types.h": cdef struct cudaMemFreeNodeParams: void* dptr + cdef struct cudaMemcpyAttributes: + cudaMemcpySrcAccessOrder srcAccessOrder + cudaMemLocation srcLocHint + cudaMemLocation dstLocHint + unsigned int flags + + cdef struct cudaOffset3D: + size_t x + size_t y + size_t z + + cdef struct anon_struct5: + void* ptr + size_t rowLength + size_t layerHeight + cudaMemLocation locHint + + cdef struct anon_struct6: + cudaArray_t array + cudaOffset3D offset + + cdef union anon_union1: + anon_struct5 ptr + anon_struct6 array + + cdef struct cudaMemcpy3DOperand: + cudaMemcpy3DOperandType type + anon_union1 op + + cdef struct cudaMemcpy3DBatchOp: + cudaMemcpy3DOperand src + cudaMemcpy3DOperand dst + cudaExtent extent + cudaMemcpySrcAccessOrder srcAccessOrder + unsigned int flags + cdef struct CUuuid_st: char bytes[16] @@ -469,9 +509,7 @@ cdef extern from "driver_types.h": int ipcEventSupported int clusterLaunch int unifiedFunctionPointers - int reserved2[2] - int reserved1[1] - int reserved[60] + int reserved[63] cdef struct cudaIpcEventHandle_st: char reserved[64] @@ -488,18 +526,18 @@ cdef extern from "driver_types.h": ctypedef cudaMemFabricHandle_st cudaMemFabricHandle_t - cdef struct anon_struct5: + cdef struct anon_struct7: void* handle const void* name - cdef union anon_union1: + cdef union anon_union2: int fd - anon_struct5 win32 + anon_struct7 win32 const void* nvSciBufObject cdef struct cudaExternalMemoryHandleDesc: cudaExternalMemoryHandleType type - anon_union1 handle + anon_union2 handle unsigned long long size unsigned int flags @@ -515,60 +553,60 @@ cdef extern from "driver_types.h": unsigned int flags unsigned int numLevels - cdef struct anon_struct6: + cdef struct anon_struct8: void* handle const void* name - cdef union anon_union2: + cdef union anon_union3: int fd - anon_struct6 win32 + anon_struct8 win32 const void* nvSciSyncObj cdef struct cudaExternalSemaphoreHandleDesc: cudaExternalSemaphoreHandleType type - anon_union2 handle + anon_union3 handle unsigned int flags - cdef struct anon_struct13: + cdef struct anon_struct15: unsigned long long value - cdef union anon_union5: + cdef union anon_union6: void* fence unsigned long long reserved - cdef struct anon_struct14: + cdef struct anon_struct16: unsigned long long key - cdef struct anon_struct15: - anon_struct13 fence - anon_union5 nvSciSync - anon_struct14 keyedMutex + cdef struct anon_struct17: + anon_struct15 fence + anon_union6 nvSciSync + anon_struct16 keyedMutex unsigned int reserved[12] cdef struct cudaExternalSemaphoreSignalParams: - anon_struct15 params + anon_struct17 params unsigned int flags unsigned int reserved[16] - cdef struct anon_struct16: + cdef struct anon_struct18: unsigned long long value - cdef union anon_union6: + cdef union anon_union7: void* fence unsigned long long reserved - cdef struct anon_struct17: + cdef struct anon_struct19: unsigned long long key unsigned int timeoutMs - cdef struct anon_struct18: - anon_struct16 fence - anon_union6 nvSciSync - anon_struct17 keyedMutex + cdef struct anon_struct20: + anon_struct18 fence + anon_union7 nvSciSync + anon_struct19 keyedMutex unsigned int reserved[10] cdef struct cudaExternalSemaphoreWaitParams: - anon_struct18 params + anon_struct20 params unsigned int flags unsigned int reserved[16] @@ -614,6 +652,16 @@ cdef extern from "driver_types.h": pass ctypedef CUkern_st* cudaKernel_t + cdef struct cudalibraryHostUniversalFunctionAndDataTable: + void* functionTable + size_t functionWindowSize + void* dataTable + size_t dataWindowSize + + cdef struct CUlib_st: + pass + ctypedef CUlib_st* cudaLibrary_t + cdef struct CUmemPoolHandle_st: pass ctypedef CUmemPoolHandle_st* cudaMemPool_t @@ -711,6 +759,7 @@ cdef extern from "driver_types.h": cudaGraphInstantiateInvalidStructure = 2 cudaGraphInstantiateNodeOperationNotSupported = 3 cudaGraphInstantiateMultipleDevicesNotSupported = 4 + cudaGraphInstantiateConditionalHandleUnused = 5 cdef struct cudaGraphInstantiateParams_st: unsigned long long flags @@ -731,20 +780,20 @@ cdef extern from "driver_types.h": pass ctypedef CUgraphDeviceUpdatableNode_st* cudaGraphDeviceNode_t - cdef struct anon_struct19: + cdef struct anon_struct21: const void* pValue size_t offset size_t size - cdef union anon_union8: + cdef union anon_union9: dim3 gridDim - anon_struct19 param + anon_struct21 param unsigned int isEnabled cdef struct cudaGraphKernelNodeUpdate: cudaGraphDeviceNode_t node cudaGraphKernelNodeField field - anon_union8 updateData + anon_union9 updateData cdef enum cudaLaunchMemSyncDomain: cudaLaunchMemSyncDomainDefault = 0 @@ -768,25 +817,31 @@ cdef extern from "driver_types.h": cudaLaunchAttributePriority = 8 cudaLaunchAttributeMemSyncDomainMap = 9 cudaLaunchAttributeMemSyncDomain = 10 + cudaLaunchAttributePreferredClusterDimension = 11 cudaLaunchAttributeLaunchCompletionEvent = 12 cudaLaunchAttributeDeviceUpdatableKernelNode = 13 cudaLaunchAttributePreferredSharedMemoryCarveout = 14 - cdef struct anon_struct20: + cdef struct anon_struct22: unsigned int x unsigned int y unsigned int z - cdef struct anon_struct21: + cdef struct anon_struct23: cudaEvent_t event int flags int triggerAtBlockStart - cdef struct anon_struct22: + cdef struct anon_struct24: + unsigned int x + unsigned int y + unsigned int z + + cdef struct anon_struct25: cudaEvent_t event int flags - cdef struct anon_struct23: + cdef struct anon_struct26: int deviceUpdatable cudaGraphDeviceNode_t devNode @@ -795,15 +850,16 @@ cdef extern from "driver_types.h": cudaAccessPolicyWindow accessPolicyWindow int cooperative cudaSynchronizationPolicy syncPolicy - anon_struct20 clusterDim + anon_struct22 clusterDim cudaClusterSchedulingPolicy clusterSchedulingPolicyPreference int programmaticStreamSerializationAllowed - anon_struct21 programmaticEvent + anon_struct23 programmaticEvent int priority cudaLaunchMemSyncDomainMap memSyncDomainMap cudaLaunchMemSyncDomain memSyncDomain - anon_struct22 launchCompletionEvent - anon_struct23 deviceUpdatableKernelNode + anon_struct24 preferredClusterDim + anon_struct25 launchCompletionEvent + anon_struct26 deviceUpdatableKernelNode unsigned int sharedMemCarveout cdef struct cudaLaunchAttribute_st: @@ -821,15 +877,15 @@ cdef extern from "driver_types.h": ctypedef cudaAsyncNotificationType_enum cudaAsyncNotificationType - cdef struct anon_struct24: + cdef struct anon_struct27: unsigned long long bytesOverBudget - cdef union anon_union9: - anon_struct24 overBudget + cdef union anon_union10: + anon_struct27 overBudget cdef struct cudaAsyncNotificationInfo: cudaAsyncNotificationType type - anon_union9 info + anon_union10 info ctypedef cudaAsyncNotificationInfo cudaAsyncNotificationInfo_t @@ -867,6 +923,7 @@ cdef extern from "driver_types.h": cudaChannelFormatKindSignedBlockCompressed6H = 28 cudaChannelFormatKindUnsignedBlockCompressed7 = 29 cudaChannelFormatKindUnsignedBlockCompressed7SRGB = 30 + cudaChannelFormatKindUnsignedNormalized1010102 = 31 cdef enum cudaMemoryType: cudaMemoryTypeUnregistered = 0 @@ -1186,7 +1243,10 @@ cdef extern from "driver_types.h": cudaDevAttrMpsEnabled = 133 cudaDevAttrHostNumaId = 134 cudaDevAttrD3D12CigSupported = 135 - cudaDevAttrMax = 136 + cudaDevAttrGpuPciDeviceId = 139 + cudaDevAttrGpuPciSubsystemId = 140 + cudaDevAttrHostNumaMultinodeIpcSupported = 143 + cudaDevAttrMax = 144 cdef enum cudaMemPoolAttr: cudaMemPoolReuseFollowEventDependencies = 1 @@ -1228,6 +1288,22 @@ cdef extern from "driver_types.h": cudaGraphMemAttrReservedMemCurrent = 2 cudaGraphMemAttrReservedMemHigh = 3 + cdef enum cudaMemcpyFlags: + cudaMemcpyFlagDefault = 0 + cudaMemcpyFlagPreferOverlapWithCompute = 1 + + cdef enum cudaMemcpySrcAccessOrder: + cudaMemcpySrcAccessOrderInvalid = 0 + cudaMemcpySrcAccessOrderStream = 1 + cudaMemcpySrcAccessOrderDuringApiCall = 2 + cudaMemcpySrcAccessOrderAny = 3 + cudaMemcpySrcAccessOrderMax = 2147483647 + + cdef enum cudaMemcpy3DOperandType: + cudaMemcpyOperandTypePointer = 1 + cudaMemcpyOperandTypeArray = 2 + cudaMemcpyOperandTypeMax = 2147483647 + cdef enum cudaDeviceP2PAttr: cudaDevP2PAttrPerformanceRank = 1 cudaDevP2PAttrAccessSupported = 2 @@ -1256,6 +1332,38 @@ cdef extern from "driver_types.h": cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9 cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10 + cdef enum cudaJitOption: + cudaJitMaxRegisters = 0 + cudaJitThreadsPerBlock = 1 + cudaJitWallTime = 2 + cudaJitInfoLogBuffer = 3 + cudaJitInfoLogBufferSizeBytes = 4 + cudaJitErrorLogBuffer = 5 + cudaJitErrorLogBufferSizeBytes = 6 + cudaJitOptimizationLevel = 7 + cudaJitFallbackStrategy = 10 + cudaJitGenerateDebugInfo = 11 + cudaJitLogVerbose = 12 + cudaJitGenerateLineInfo = 13 + cudaJitCacheMode = 14 + cudaJitPositionIndependentCode = 30 + cudaJitMinCtaPerSm = 31 + cudaJitMaxThreadsPerBlock = 32 + cudaJitOverrideDirectiveValues = 33 + + cdef enum cudaLibraryOption: + cudaLibraryHostUniversalFunctionAndDataTable = 0 + cudaLibraryBinaryIsPreserved = 1 + + cdef enum cudaJit_CacheMode: + cudaJitCacheOptionNone = 0 + cudaJitCacheOptionCG = 1 + cudaJitCacheOptionCA = 2 + + cdef enum cudaJit_Fallback: + cudaPreferPtx = 0 + cudaPreferBinary = 1 + cdef enum cudaCGScope: cudaCGScopeInvalid = 0 cudaCGScopeGrid = 1 @@ -1267,6 +1375,7 @@ cdef extern from "driver_types.h": cdef enum cudaGraphConditionalNodeType: cudaGraphCondTypeIf = 0 cudaGraphCondTypeWhile = 1 + cudaGraphCondTypeSwitch = 2 cdef enum cudaGraphNodeType: cudaGraphNodeTypeKernel = 0 @@ -1412,7 +1521,12 @@ cdef extern from "library_types.h": CUDA_R_64U = 26 CUDA_C_64U = 27 CUDA_R_8F_E4M3 = 28 + CUDA_R_8F_UE4M3 = 28 CUDA_R_8F_E5M2 = 29 + CUDA_R_8F_UE8M0 = 30 + CUDA_R_6F_E2M3 = 31 + CUDA_R_6F_E3M2 = 32 + CUDA_R_4F_E2M1 = 33 ctypedef cudaDataType_t cudaDataType @@ -1595,6 +1709,9 @@ cdef enum cudaEglColorFormat_enum: 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 @@ -1609,12 +1726,12 @@ cdef struct cudaEglPlaneDesc_st: ctypedef cudaEglPlaneDesc_st cudaEglPlaneDesc -cdef union anon_union10: +cdef union anon_union11: cudaArray_t pArray[3] cudaPitchedPtr pPitch[3] cdef struct cudaEglFrame_st: - anon_union10 frame + anon_union11 frame cudaEglPlaneDesc planeDesc[3] unsigned int planeCount cudaEglFrameType frameType @@ -1857,6 +1974,11 @@ cdef cudaError_t cudaStreamGetFlags(cudaStream_t hStream, unsigned int* flags) e cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* streamId) except ?cudaErrorCallRequiresNewerDriver nogil {{endif}} +{{if 'cudaStreamGetDevice' in found_functions}} + +cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + {{if 'cudaCtxResetPersistingL2Cache' in found_functions}} cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil @@ -1992,6 +2114,11 @@ cdef cudaError_t cudaEventDestroy(cudaEvent_t event) except ?cudaErrorCallRequir cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil {{endif}} +{{if 'cudaEventElapsedTime_v2' in found_functions}} + +cdef cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + {{if 'cudaImportExternalMemory' in found_functions}} cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil @@ -2257,6 +2384,16 @@ cdef cudaError_t cudaMemcpyAsync(void* dst, const void* src, size_t count, cudaM cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, int srcDevice, size_t count, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil {{endif}} +{{if 'cudaMemcpyBatchAsync' in found_functions}} + +cdef cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + +{{if 'cudaMemcpy3DBatchAsync' in found_functions}} + +cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + {{if 'cudaMemcpy2DAsync' in found_functions}} 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 @@ -2992,6 +3129,56 @@ cdef cudaError_t cudaGetDriverEntryPoint(const char* symbol, void** funcPtr, uns cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** funcPtr, unsigned int cudaVersion, unsigned long long flags, cudaDriverEntryPointQueryResult* driverStatus) except ?cudaErrorCallRequiresNewerDriver nogil {{endif}} +{{if 'cudaLibraryLoadData' in found_functions}} + +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 +{{endif}} + +{{if 'cudaLibraryLoadFromFile' in found_functions}} + +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 +{{endif}} + +{{if 'cudaLibraryUnload' in found_functions}} + +cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + +{{if 'cudaLibraryGetKernel' in found_functions}} + +cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + +{{if 'cudaLibraryGetGlobal' in found_functions}} + +cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + +{{if 'cudaLibraryGetManaged' in found_functions}} + +cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + +{{if 'cudaLibraryGetUnifiedFunction' in found_functions}} + +cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + +{{if 'cudaLibraryGetKernelCount' in found_functions}} + +cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + +{{if 'cudaLibraryEnumerateKernels' in found_functions}} + +cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + +{{if 'cudaKernelSetAttributeForDevice' in found_functions}} + +cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil +{{endif}} + {{if 'cudaGetExportTable' in found_functions}} cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil @@ -3231,6 +3418,8 @@ cdef enum: cudaCooperativeLaunchMultiDeviceNoPostSync = 2 cdef enum: cudaArraySparsePropertiesSingleMipTail = 1 +cdef enum: cudaMemPoolCreateUsageHwDecompress = 2 + cdef enum: CUDA_IPC_HANDLE_SIZE = 64 cdef enum: cudaExternalMemoryDedicated = 1 @@ -3305,8 +3494,8 @@ cdef enum: cudaTextureType2DLayered = 242 cdef enum: cudaTextureTypeCubemapLayered = 252 -cdef enum: CUDART_VERSION = 12060 +cdef enum: CUDART_VERSION = 12080 -cdef enum: __CUDART_API_VERSION = 12060 +cdef enum: __CUDART_API_VERSION = 12080 cdef enum: CUDA_EGL_MAX_PLANES = 3 \ No newline at end of file diff --git a/cuda_bindings/cuda/bindings/cyruntime.pyx.in b/cuda_bindings/cuda/bindings/cyruntime.pyx.in index 18b9fe402..eed4f9145 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pyx.in +++ b/cuda_bindings/cuda/bindings/cyruntime.pyx.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. # cython: show_performance_hints=False @@ -391,6 +393,9 @@ cdef const char* cudaGetErrorName(cudaError_t error) except ?NULL nogil: {{if 'cudaErrorUnsupportedDevSideSync' in found_values}} if error == cudaErrorUnsupportedDevSideSync: return "cudaErrorUnsupportedDevSideSync"{{endif}} + {{if 'cudaErrorContained' in found_values}} + if error == cudaErrorContained: + return "cudaErrorContained"{{endif}} {{if 'cudaErrorInvalidSource' in found_values}} if error == cudaErrorInvalidSource: return "cudaErrorInvalidSource"{{endif}} @@ -478,6 +483,9 @@ cdef const char* cudaGetErrorName(cudaError_t error) except ?NULL nogil: {{if 'cudaErrorCooperativeLaunchTooLarge' in found_values}} if error == cudaErrorCooperativeLaunchTooLarge: return "cudaErrorCooperativeLaunchTooLarge"{{endif}} + {{if 'cudaErrorTensorMemoryLeak' in found_values}} + if error == cudaErrorTensorMemoryLeak: + return "cudaErrorTensorMemoryLeak"{{endif}} {{if 'cudaErrorNotPermitted' in found_values}} if error == cudaErrorNotPermitted: return "cudaErrorNotPermitted"{{endif}} @@ -722,6 +730,13 @@ cdef cudaError_t cudaStreamGetId(cudaStream_t hStream, unsigned long long* strea {{endif}} +{{if 'cudaStreamGetDevice' in found_functions}} + +cdef cudaError_t cudaStreamGetDevice(cudaStream_t hStream, int* device) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaStreamGetDevice(hStream, device) + +{{endif}} + {{if 'cudaCtxResetPersistingL2Cache' in found_functions}} cdef cudaError_t cudaCtxResetPersistingL2Cache() except ?cudaErrorCallRequiresNewerDriver nogil: @@ -911,6 +926,13 @@ cdef cudaError_t cudaEventElapsedTime(float* ms, cudaEvent_t start, cudaEvent_t {{endif}} +{{if 'cudaEventElapsedTime_v2' in found_functions}} + +cdef cudaError_t cudaEventElapsedTime_v2(float* ms, cudaEvent_t start, cudaEvent_t end) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaEventElapsedTime_v2(ms, start, end) + +{{endif}} + {{if 'cudaImportExternalMemory' in found_functions}} cdef cudaError_t cudaImportExternalMemory(cudaExternalMemory_t* extMem_out, const cudaExternalMemoryHandleDesc* memHandleDesc) except ?cudaErrorCallRequiresNewerDriver nogil: @@ -1282,6 +1304,20 @@ cdef cudaError_t cudaMemcpyPeerAsync(void* dst, int dstDevice, const void* src, {{endif}} +{{if 'cudaMemcpyBatchAsync' in found_functions}} + +cdef cudaError_t cudaMemcpyBatchAsync(void** dsts, void** srcs, size_t* sizes, size_t count, cudaMemcpyAttributes* attrs, size_t* attrsIdxs, size_t numAttrs, size_t* failIdx, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaMemcpyBatchAsync(dsts, srcs, sizes, count, attrs, attrsIdxs, numAttrs, failIdx, stream) + +{{endif}} + +{{if 'cudaMemcpy3DBatchAsync' in found_functions}} + +cdef cudaError_t cudaMemcpy3DBatchAsync(size_t numOps, cudaMemcpy3DBatchOp* opList, size_t* failIdx, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaMemcpy3DBatchAsync(numOps, opList, failIdx, flags, stream) + +{{endif}} + {{if 'cudaMemcpy2DAsync' in found_functions}} 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: @@ -2311,6 +2347,76 @@ cdef cudaError_t cudaGetDriverEntryPointByVersion(const char* symbol, void** fun {{endif}} +{{if 'cudaLibraryLoadData' in found_functions}} + +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: + return _cudaLibraryLoadData(library, code, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + +{{endif}} + +{{if 'cudaLibraryLoadFromFile' in found_functions}} + +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: + return _cudaLibraryLoadFromFile(library, fileName, jitOptions, jitOptionsValues, numJitOptions, libraryOptions, libraryOptionValues, numLibraryOptions) + +{{endif}} + +{{if 'cudaLibraryUnload' in found_functions}} + +cdef cudaError_t cudaLibraryUnload(cudaLibrary_t library) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaLibraryUnload(library) + +{{endif}} + +{{if 'cudaLibraryGetKernel' in found_functions}} + +cdef cudaError_t cudaLibraryGetKernel(cudaKernel_t* pKernel, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaLibraryGetKernel(pKernel, library, name) + +{{endif}} + +{{if 'cudaLibraryGetGlobal' in found_functions}} + +cdef cudaError_t cudaLibraryGetGlobal(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaLibraryGetGlobal(dptr, numbytes, library, name) + +{{endif}} + +{{if 'cudaLibraryGetManaged' in found_functions}} + +cdef cudaError_t cudaLibraryGetManaged(void** dptr, size_t* numbytes, cudaLibrary_t library, const char* name) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaLibraryGetManaged(dptr, numbytes, library, name) + +{{endif}} + +{{if 'cudaLibraryGetUnifiedFunction' in found_functions}} + +cdef cudaError_t cudaLibraryGetUnifiedFunction(void** fptr, cudaLibrary_t library, const char* symbol) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaLibraryGetUnifiedFunction(fptr, library, symbol) + +{{endif}} + +{{if 'cudaLibraryGetKernelCount' in found_functions}} + +cdef cudaError_t cudaLibraryGetKernelCount(unsigned int* count, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaLibraryGetKernelCount(count, lib) + +{{endif}} + +{{if 'cudaLibraryEnumerateKernels' in found_functions}} + +cdef cudaError_t cudaLibraryEnumerateKernels(cudaKernel_t* kernels, unsigned int numKernels, cudaLibrary_t lib) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaLibraryEnumerateKernels(kernels, numKernels, lib) + +{{endif}} + +{{if 'cudaKernelSetAttributeForDevice' in found_functions}} + +cdef cudaError_t cudaKernelSetAttributeForDevice(cudaKernel_t kernel, cudaFuncAttribute attr, int value, int device) except ?cudaErrorCallRequiresNewerDriver nogil: + return _cudaKernelSetAttributeForDevice(kernel, attr, value, device) + +{{endif}} + {{if 'cudaGetExportTable' in found_functions}} cdef cudaError_t cudaGetExportTable(const void** ppExportTable, const cudaUUID_t* pExportTableId) except ?cudaErrorCallRequiresNewerDriver nogil: diff --git a/cuda_bindings/cuda/bindings/driver.pxd.in b/cuda_bindings/cuda/bindings/driver.pxd.in index 9be46cb2e..87af8aa31 100644 --- a/cuda_bindings/cuda/bindings/driver.pxd.in +++ b/cuda_bindings/cuda/bindings/driver.pxd.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. cimport cuda.bindings.cydriver as cydriver cimport cuda.bindings._lib.utils as utils @@ -21,8 +23,8 @@ cdef class CUcontext: Get memory address of class instance """ - cdef cydriver.CUcontext __val - cdef cydriver.CUcontext* _ptr + cdef cydriver.CUcontext _pvt_val + cdef cydriver.CUcontext* _pvt_ptr {{endif}} {{if 'CUmodule' in found_types}} @@ -38,8 +40,8 @@ cdef class CUmodule: Get memory address of class instance """ - cdef cydriver.CUmodule __val - cdef cydriver.CUmodule* _ptr + cdef cydriver.CUmodule _pvt_val + cdef cydriver.CUmodule* _pvt_ptr {{endif}} {{if 'CUfunction' in found_types}} @@ -55,8 +57,8 @@ cdef class CUfunction: Get memory address of class instance """ - cdef cydriver.CUfunction __val - cdef cydriver.CUfunction* _ptr + cdef cydriver.CUfunction _pvt_val + cdef cydriver.CUfunction* _pvt_ptr {{endif}} {{if 'CUlibrary' in found_types}} @@ -72,8 +74,8 @@ cdef class CUlibrary: Get memory address of class instance """ - cdef cydriver.CUlibrary __val - cdef cydriver.CUlibrary* _ptr + cdef cydriver.CUlibrary _pvt_val + cdef cydriver.CUlibrary* _pvt_ptr {{endif}} {{if 'CUkernel' in found_types}} @@ -89,8 +91,8 @@ cdef class CUkernel: Get memory address of class instance """ - cdef cydriver.CUkernel __val - cdef cydriver.CUkernel* _ptr + cdef cydriver.CUkernel _pvt_val + cdef cydriver.CUkernel* _pvt_ptr {{endif}} {{if 'CUarray' in found_types}} @@ -106,8 +108,8 @@ cdef class CUarray: Get memory address of class instance """ - cdef cydriver.CUarray __val - cdef cydriver.CUarray* _ptr + cdef cydriver.CUarray _pvt_val + cdef cydriver.CUarray* _pvt_ptr {{endif}} {{if 'CUmipmappedArray' in found_types}} @@ -123,8 +125,8 @@ cdef class CUmipmappedArray: Get memory address of class instance """ - cdef cydriver.CUmipmappedArray __val - cdef cydriver.CUmipmappedArray* _ptr + cdef cydriver.CUmipmappedArray _pvt_val + cdef cydriver.CUmipmappedArray* _pvt_ptr {{endif}} {{if 'CUtexref' in found_types}} @@ -140,8 +142,8 @@ cdef class CUtexref: Get memory address of class instance """ - cdef cydriver.CUtexref __val - cdef cydriver.CUtexref* _ptr + cdef cydriver.CUtexref _pvt_val + cdef cydriver.CUtexref* _pvt_ptr {{endif}} {{if 'CUsurfref' in found_types}} @@ -157,8 +159,8 @@ cdef class CUsurfref: Get memory address of class instance """ - cdef cydriver.CUsurfref __val - cdef cydriver.CUsurfref* _ptr + cdef cydriver.CUsurfref _pvt_val + cdef cydriver.CUsurfref* _pvt_ptr {{endif}} {{if 'CUevent' in found_types}} @@ -174,8 +176,8 @@ cdef class CUevent: Get memory address of class instance """ - cdef cydriver.CUevent __val - cdef cydriver.CUevent* _ptr + cdef cydriver.CUevent _pvt_val + cdef cydriver.CUevent* _pvt_ptr {{endif}} {{if 'CUstream' in found_types}} @@ -191,8 +193,8 @@ cdef class CUstream: Get memory address of class instance """ - cdef cydriver.CUstream __val - cdef cydriver.CUstream* _ptr + cdef cydriver.CUstream _pvt_val + cdef cydriver.CUstream* _pvt_ptr {{endif}} {{if 'CUgraphicsResource' in found_types}} @@ -208,8 +210,8 @@ cdef class CUgraphicsResource: Get memory address of class instance """ - cdef cydriver.CUgraphicsResource __val - cdef cydriver.CUgraphicsResource* _ptr + cdef cydriver.CUgraphicsResource _pvt_val + cdef cydriver.CUgraphicsResource* _pvt_ptr {{endif}} {{if 'CUexternalMemory' in found_types}} @@ -225,8 +227,8 @@ cdef class CUexternalMemory: Get memory address of class instance """ - cdef cydriver.CUexternalMemory __val - cdef cydriver.CUexternalMemory* _ptr + cdef cydriver.CUexternalMemory _pvt_val + cdef cydriver.CUexternalMemory* _pvt_ptr {{endif}} {{if 'CUexternalSemaphore' in found_types}} @@ -242,8 +244,8 @@ cdef class CUexternalSemaphore: Get memory address of class instance """ - cdef cydriver.CUexternalSemaphore __val - cdef cydriver.CUexternalSemaphore* _ptr + cdef cydriver.CUexternalSemaphore _pvt_val + cdef cydriver.CUexternalSemaphore* _pvt_ptr {{endif}} {{if 'CUgraph' in found_types}} @@ -259,8 +261,8 @@ cdef class CUgraph: Get memory address of class instance """ - cdef cydriver.CUgraph __val - cdef cydriver.CUgraph* _ptr + cdef cydriver.CUgraph _pvt_val + cdef cydriver.CUgraph* _pvt_ptr {{endif}} {{if 'CUgraphNode' in found_types}} @@ -276,8 +278,8 @@ cdef class CUgraphNode: Get memory address of class instance """ - cdef cydriver.CUgraphNode __val - cdef cydriver.CUgraphNode* _ptr + cdef cydriver.CUgraphNode _pvt_val + cdef cydriver.CUgraphNode* _pvt_ptr {{endif}} {{if 'CUgraphExec' in found_types}} @@ -293,8 +295,8 @@ cdef class CUgraphExec: Get memory address of class instance """ - cdef cydriver.CUgraphExec __val - cdef cydriver.CUgraphExec* _ptr + cdef cydriver.CUgraphExec _pvt_val + cdef cydriver.CUgraphExec* _pvt_ptr {{endif}} {{if 'CUmemoryPool' in found_types}} @@ -310,8 +312,8 @@ cdef class CUmemoryPool: Get memory address of class instance """ - cdef cydriver.CUmemoryPool __val - cdef cydriver.CUmemoryPool* _ptr + cdef cydriver.CUmemoryPool _pvt_val + cdef cydriver.CUmemoryPool* _pvt_ptr {{endif}} {{if 'CUuserObject' in found_types}} @@ -327,8 +329,8 @@ cdef class CUuserObject: Get memory address of class instance """ - cdef cydriver.CUuserObject __val - cdef cydriver.CUuserObject* _ptr + cdef cydriver.CUuserObject _pvt_val + cdef cydriver.CUuserObject* _pvt_ptr {{endif}} {{if 'CUgraphDeviceNode' in found_types}} @@ -344,8 +346,8 @@ cdef class CUgraphDeviceNode: Get memory address of class instance """ - cdef cydriver.CUgraphDeviceNode __val - cdef cydriver.CUgraphDeviceNode* _ptr + cdef cydriver.CUgraphDeviceNode _pvt_val + cdef cydriver.CUgraphDeviceNode* _pvt_ptr {{endif}} {{if 'CUasyncCallbackHandle' in found_types}} @@ -361,8 +363,8 @@ cdef class CUasyncCallbackHandle: Get memory address of class instance """ - cdef cydriver.CUasyncCallbackHandle __val - cdef cydriver.CUasyncCallbackHandle* _ptr + cdef cydriver.CUasyncCallbackHandle _pvt_val + cdef cydriver.CUasyncCallbackHandle* _pvt_ptr {{endif}} {{if 'CUgreenCtx' in found_types}} @@ -378,8 +380,8 @@ cdef class CUgreenCtx: Get memory address of class instance """ - cdef cydriver.CUgreenCtx __val - cdef cydriver.CUgreenCtx* _ptr + cdef cydriver.CUgreenCtx _pvt_val + cdef cydriver.CUgreenCtx* _pvt_ptr {{endif}} {{if 'CUlinkState' in found_types}} @@ -393,8 +395,8 @@ cdef class CUlinkState: Get memory address of class instance """ - cdef cydriver.CUlinkState __val - cdef cydriver.CUlinkState* _ptr + cdef cydriver.CUlinkState _pvt_val + cdef cydriver.CUlinkState* _pvt_ptr cdef list _keepalive {{endif}} @@ -411,8 +413,8 @@ cdef class CUdevResourceDesc: Get memory address of class instance """ - cdef cydriver.CUdevResourceDesc __val - cdef cydriver.CUdevResourceDesc* _ptr + cdef cydriver.CUdevResourceDesc _pvt_val + cdef cydriver.CUdevResourceDesc* _pvt_ptr {{endif}} {{if True}} @@ -428,8 +430,8 @@ cdef class CUeglStreamConnection: Get memory address of class instance """ - cdef cydriver.CUeglStreamConnection __val - cdef cydriver.CUeglStreamConnection* _ptr + cdef cydriver.CUeglStreamConnection _pvt_val + cdef cydriver.CUeglStreamConnection* _pvt_ptr {{endif}} {{if True}} @@ -443,8 +445,8 @@ cdef class EGLImageKHR: Get memory address of class instance """ - cdef cydriver.EGLImageKHR __val - cdef cydriver.EGLImageKHR* _ptr + cdef cydriver.EGLImageKHR _pvt_val + cdef cydriver.EGLImageKHR* _pvt_ptr {{endif}} {{if True}} @@ -458,8 +460,8 @@ cdef class EGLStreamKHR: Get memory address of class instance """ - cdef cydriver.EGLStreamKHR __val - cdef cydriver.EGLStreamKHR* _ptr + cdef cydriver.EGLStreamKHR _pvt_val + cdef cydriver.EGLStreamKHR* _pvt_ptr {{endif}} {{if True}} @@ -473,8 +475,8 @@ cdef class EGLSyncKHR: Get memory address of class instance """ - cdef cydriver.EGLSyncKHR __val - cdef cydriver.EGLSyncKHR* _ptr + cdef cydriver.EGLSyncKHR _pvt_val + cdef cydriver.EGLSyncKHR* _pvt_ptr {{endif}} {{if 'CUasyncCallback' in found_types}} @@ -488,8 +490,8 @@ cdef class CUasyncCallback: Get memory address of class instance """ - cdef cydriver.CUasyncCallback __val - cdef cydriver.CUasyncCallback* _ptr + cdef cydriver.CUasyncCallback _pvt_val + cdef cydriver.CUasyncCallback* _pvt_ptr {{endif}} {{if 'CUhostFn' in found_types}} @@ -503,8 +505,8 @@ cdef class CUhostFn: Get memory address of class instance """ - cdef cydriver.CUhostFn __val - cdef cydriver.CUhostFn* _ptr + cdef cydriver.CUhostFn _pvt_val + cdef cydriver.CUhostFn* _pvt_ptr {{endif}} {{if 'CUstreamCallback' in found_types}} @@ -518,8 +520,8 @@ cdef class CUstreamCallback: Get memory address of class instance """ - cdef cydriver.CUstreamCallback __val - cdef cydriver.CUstreamCallback* _ptr + cdef cydriver.CUstreamCallback _pvt_val + cdef cydriver.CUstreamCallback* _pvt_ptr {{endif}} {{if 'CUoccupancyB2DSize' in found_types}} @@ -533,29 +535,30 @@ cdef class CUoccupancyB2DSize: Get memory address of class instance """ - cdef cydriver.CUoccupancyB2DSize __val - cdef cydriver.CUoccupancyB2DSize* _ptr + cdef cydriver.CUoccupancyB2DSize _pvt_val + cdef cydriver.CUoccupancyB2DSize* _pvt_ptr {{endif}} -{{if 'struct CUuuid_st' in found_types}} +{{if 'CUuuid_st' in found_struct}} cdef class CUuuid_st: """ Attributes ---------- + {{if 'CUuuid_st.bytes' in found_struct}} bytes : bytes < CUDA definition of UUID + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUuuid_st __val - cdef cydriver.CUuuid_st* _ptr + cdef cydriver.CUuuid_st _pvt_val + cdef cydriver.CUuuid_st* _pvt_ptr {{endif}} -{{if 'struct CUmemFabricHandle_st' in found_types}} +{{if 'CUmemFabricHandle_st' in found_struct}} cdef class CUmemFabricHandle_st: """ @@ -566,19 +569,20 @@ cdef class CUmemFabricHandle_st: Attributes ---------- + {{if 'CUmemFabricHandle_st.data' in found_struct}} data : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUmemFabricHandle_st __val - cdef cydriver.CUmemFabricHandle_st* _ptr + cdef cydriver.CUmemFabricHandle_st _pvt_val + cdef cydriver.CUmemFabricHandle_st* _pvt_ptr {{endif}} -{{if 'struct CUipcEventHandle_st' in found_types}} +{{if 'CUipcEventHandle_st' in found_struct}} cdef class CUipcEventHandle_st: """ @@ -586,19 +590,20 @@ cdef class CUipcEventHandle_st: Attributes ---------- + {{if 'CUipcEventHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUipcEventHandle_st __val - cdef cydriver.CUipcEventHandle_st* _ptr + cdef cydriver.CUipcEventHandle_st _pvt_val + cdef cydriver.CUipcEventHandle_st* _pvt_ptr {{endif}} -{{if 'struct CUipcMemHandle_st' in found_types}} +{{if 'CUipcMemHandle_st' in found_struct}} cdef class CUipcMemHandle_st: """ @@ -606,119 +611,164 @@ cdef class CUipcMemHandle_st: Attributes ---------- + {{if 'CUipcMemHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUipcMemHandle_st __val - cdef cydriver.CUipcMemHandle_st* _ptr + cdef cydriver.CUipcMemHandle_st _pvt_val + cdef cydriver.CUipcMemHandle_st* _pvt_ptr {{endif}} -{{if 'union CUstreamBatchMemOpParams_union' in found_types}} +{{if 'CUstreamBatchMemOpParams_union.waitValue' in found_struct}} cdef class CUstreamMemOpWaitValueParams_st: """ Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.waitValue.operation' in found_struct}} operation : CUstreamBatchMemOpType + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.address' in found_struct}} address : CUdeviceptr + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value' in found_struct}} value : cuuint32_t + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value64' in found_struct}} value64 : cuuint64_t + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.flags' in found_struct}} flags : unsigned int + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.alias' in found_struct}} alias : CUdeviceptr For driver internal use. Initial value is unimportant. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUstreamBatchMemOpParams_union* _ptr + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + {{if 'CUstreamBatchMemOpParams_union.waitValue.address' in found_struct}} cdef CUdeviceptr _address + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value' in found_struct}} cdef cuuint32_t _value + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value64' in found_struct}} cdef cuuint64_t _value64 + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.alias' in found_struct}} cdef CUdeviceptr _alias + {{endif}} {{endif}} -{{if 'union CUstreamBatchMemOpParams_union' in found_types}} +{{if 'CUstreamBatchMemOpParams_union.writeValue' in found_struct}} cdef class CUstreamMemOpWriteValueParams_st: """ Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.writeValue.operation' in found_struct}} operation : CUstreamBatchMemOpType + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.address' in found_struct}} address : CUdeviceptr + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value' in found_struct}} value : cuuint32_t + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value64' in found_struct}} value64 : cuuint64_t + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.flags' in found_struct}} flags : unsigned int + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.alias' in found_struct}} alias : CUdeviceptr For driver internal use. Initial value is unimportant. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUstreamBatchMemOpParams_union* _ptr + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + {{if 'CUstreamBatchMemOpParams_union.writeValue.address' in found_struct}} cdef CUdeviceptr _address + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value' in found_struct}} cdef cuuint32_t _value + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value64' in found_struct}} cdef cuuint64_t _value64 + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.alias' in found_struct}} cdef CUdeviceptr _alias + {{endif}} {{endif}} -{{if 'union CUstreamBatchMemOpParams_union' in found_types}} +{{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites' in found_struct}} cdef class CUstreamMemOpFlushRemoteWritesParams_st: """ Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites.operation' in found_struct}} operation : CUstreamBatchMemOpType + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites.flags' in found_struct}} flags : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUstreamBatchMemOpParams_union* _ptr + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr {{endif}} -{{if 'union CUstreamBatchMemOpParams_union' in found_types}} +{{if 'CUstreamBatchMemOpParams_union.memoryBarrier' in found_struct}} cdef class CUstreamMemOpMemoryBarrierParams_st: """ Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier.operation' in found_struct}} operation : CUstreamBatchMemOpType < Only supported in the _v2 API + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier.flags' in found_struct}} flags : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUstreamBatchMemOpParams_union* _ptr + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr {{endif}} -{{if 'union CUstreamBatchMemOpParams_union' in found_types}} +{{if 'CUstreamBatchMemOpParams_union' in found_struct}} cdef class CUstreamBatchMemOpParams_union: """ @@ -726,61 +776,90 @@ cdef class CUstreamBatchMemOpParams_union: Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.operation' in found_struct}} operation : CUstreamBatchMemOpType + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue' in found_struct}} waitValue : CUstreamMemOpWaitValueParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue' in found_struct}} writeValue : CUstreamMemOpWriteValueParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites' in found_struct}} flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier' in found_struct}} memoryBarrier : CUstreamMemOpMemoryBarrierParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.pad' in found_struct}} pad : List[cuuint64_t] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUstreamBatchMemOpParams_union __val - cdef cydriver.CUstreamBatchMemOpParams_union* _ptr + cdef cydriver.CUstreamBatchMemOpParams_union _pvt_val + cdef cydriver.CUstreamBatchMemOpParams_union* _pvt_ptr + {{if 'CUstreamBatchMemOpParams_union.waitValue' in found_struct}} cdef CUstreamMemOpWaitValueParams_st _waitValue + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue' in found_struct}} cdef CUstreamMemOpWriteValueParams_st _writeValue + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites' in found_struct}} cdef CUstreamMemOpFlushRemoteWritesParams_st _flushRemoteWrites + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier' in found_struct}} cdef CUstreamMemOpMemoryBarrierParams_st _memoryBarrier + {{endif}} {{endif}} -{{if 'struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st' in found_types}} +{{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st' in found_struct}} cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: """ Attributes ---------- + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.ctx' in found_struct}} ctx : CUcontext + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.count' in found_struct}} count : unsigned int + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.paramArray' in found_struct}} paramArray : CUstreamBatchMemOpParams + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.flags' in found_struct}} flags : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st __val - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st* _ptr + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st _pvt_val + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st* _pvt_ptr + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.ctx' in found_struct}} cdef CUcontext _ctx + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.paramArray' in found_struct}} cdef size_t _paramArray_length cdef cydriver.CUstreamBatchMemOpParams* _paramArray - + {{endif}} {{endif}} -{{if 'struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: """ @@ -788,64 +867,78 @@ cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.ctx' in found_struct}} ctx : CUcontext Context to use for the operations. + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.count' in found_struct}} count : unsigned int Number of operations in paramArray. + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.paramArray' in found_struct}} paramArray : CUstreamBatchMemOpParams Array of batch memory operations. + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.flags' in found_struct}} flags : unsigned int Flags to control the node. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st __val - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st* _ptr + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st* _pvt_ptr + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.ctx' in found_struct}} cdef CUcontext _ctx + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.paramArray' in found_struct}} cdef size_t _paramArray_length cdef cydriver.CUstreamBatchMemOpParams* _paramArray - + {{endif}} {{endif}} -{{if 'struct CUasyncNotificationInfo_st' in found_types}} +{{if 'CUasyncNotificationInfo_st.info.overBudget' in found_struct}} cdef class anon_struct0: """ Attributes ---------- + {{if 'CUasyncNotificationInfo_st.info.overBudget.bytesOverBudget' in found_struct}} bytesOverBudget : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUasyncNotificationInfo_st* _ptr + cdef cydriver.CUasyncNotificationInfo_st* _pvt_ptr {{endif}} -{{if 'struct CUasyncNotificationInfo_st' in found_types}} +{{if 'CUasyncNotificationInfo_st.info' in found_struct}} cdef class anon_union2: """ Attributes ---------- + {{if 'CUasyncNotificationInfo_st.info.overBudget' in found_struct}} overBudget : anon_struct0 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUasyncNotificationInfo_st* _ptr + cdef cydriver.CUasyncNotificationInfo_st* _pvt_ptr + {{if 'CUasyncNotificationInfo_st.info.overBudget' in found_struct}} cdef anon_struct0 _overBudget + {{endif}} {{endif}} -{{if 'struct CUasyncNotificationInfo_st' in found_types}} +{{if 'CUasyncNotificationInfo_st' in found_struct}} cdef class CUasyncNotificationInfo_st: """ @@ -853,22 +946,27 @@ cdef class CUasyncNotificationInfo_st: Attributes ---------- + {{if 'CUasyncNotificationInfo_st.type' in found_struct}} type : CUasyncNotificationType + {{endif}} + {{if 'CUasyncNotificationInfo_st.info' in found_struct}} info : anon_union2 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cydriver.CUasyncNotificationInfo_st* _val_ptr - cdef cydriver.CUasyncNotificationInfo_st* _ptr + cdef cydriver.CUasyncNotificationInfo_st* _pvt_ptr + {{if 'CUasyncNotificationInfo_st.info' in found_struct}} cdef anon_union2 _info + {{endif}} {{endif}} -{{if 'struct CUdevprop_st' in found_types}} +{{if 'CUdevprop_st' in found_struct}} cdef class CUdevprop_st: """ @@ -876,37 +974,56 @@ cdef class CUdevprop_st: Attributes ---------- + {{if 'CUdevprop_st.maxThreadsPerBlock' in found_struct}} maxThreadsPerBlock : int Maximum number of threads per block + {{endif}} + {{if 'CUdevprop_st.maxThreadsDim' in found_struct}} maxThreadsDim : List[int] Maximum size of each dimension of a block + {{endif}} + {{if 'CUdevprop_st.maxGridSize' in found_struct}} maxGridSize : List[int] Maximum size of each dimension of a grid + {{endif}} + {{if 'CUdevprop_st.sharedMemPerBlock' in found_struct}} sharedMemPerBlock : int Shared memory available per block in bytes + {{endif}} + {{if 'CUdevprop_st.totalConstantMemory' in found_struct}} totalConstantMemory : int Constant memory available on device in bytes + {{endif}} + {{if 'CUdevprop_st.SIMDWidth' in found_struct}} SIMDWidth : int Warp size in threads + {{endif}} + {{if 'CUdevprop_st.memPitch' in found_struct}} memPitch : int Maximum pitch in bytes allowed by memory copies + {{endif}} + {{if 'CUdevprop_st.regsPerBlock' in found_struct}} regsPerBlock : int 32-bit registers available per block + {{endif}} + {{if 'CUdevprop_st.clockRate' in found_struct}} clockRate : int Clock frequency in kilohertz + {{endif}} + {{if 'CUdevprop_st.textureAlign' in found_struct}} textureAlign : int Alignment requirement for textures + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUdevprop_st __val - cdef cydriver.CUdevprop_st* _ptr + cdef cydriver.CUdevprop_st _pvt_val + cdef cydriver.CUdevprop_st* _pvt_ptr {{endif}} -{{if 'struct CUaccessPolicyWindow_st' in found_types}} +{{if 'CUaccessPolicyWindow_st' in found_struct}} cdef class CUaccessPolicyWindow_st: """ @@ -923,30 +1040,39 @@ cdef class CUaccessPolicyWindow_st: Attributes ---------- + {{if 'CUaccessPolicyWindow_st.base_ptr' in found_struct}} base_ptr : Any Starting address of the access policy window. CUDA driver may align it. + {{endif}} + {{if 'CUaccessPolicyWindow_st.num_bytes' in found_struct}} num_bytes : size_t Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment. + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitRatio' in found_struct}} hitRatio : float hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp. + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitProp' in found_struct}} hitProp : CUaccessProperty CUaccessProperty set for hit. + {{endif}} + {{if 'CUaccessPolicyWindow_st.missProp' in found_struct}} missProp : CUaccessProperty CUaccessProperty set for miss. Must be either NORMAL or STREAMING + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUaccessPolicyWindow_st __val - cdef cydriver.CUaccessPolicyWindow_st* _ptr + cdef cydriver.CUaccessPolicyWindow_st _pvt_val + cdef cydriver.CUaccessPolicyWindow_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_KERNEL_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_KERNEL_NODE_PARAMS_st' in found_struct}} cdef class CUDA_KERNEL_NODE_PARAMS_st: """ @@ -954,39 +1080,62 @@ cdef class CUDA_KERNEL_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_KERNEL_NODE_PARAMS_st.func' in found_struct}} func : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.extra' in found_struct}} extra : Any Extra options + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_KERNEL_NODE_PARAMS_st __val - cdef cydriver.CUDA_KERNEL_NODE_PARAMS_st* _ptr + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_st* _pvt_ptr + {{if 'CUDA_KERNEL_NODE_PARAMS_st.func' in found_struct}} cdef CUfunction _func + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.kernelParams' in found_struct}} cdef utils.HelperKernelParams _cykernelParams + {{endif}} {{endif}} -{{if 'struct CUDA_KERNEL_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_KERNEL_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_KERNEL_NODE_PARAMS_v2_st: """ @@ -994,47 +1143,78 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.func' in found_struct}} func : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.extra' in found_struct}} extra : Any Extra options + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kern' in found_struct}} kern : CUkernel Kernel to launch, will only be referenced if func is NULL + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.ctx' in found_struct}} ctx : CUcontext Context for the kernel task to run in. The value NULL will indicate the current context should be used by the api. This field is ignored if func is set. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v2_st __val - cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v2_st* _ptr + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v2_st* _pvt_ptr + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.func' in found_struct}} cdef CUfunction _func + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kernelParams' in found_struct}} cdef utils.HelperKernelParams _cykernelParams + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kern' in found_struct}} cdef CUkernel _kern + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.ctx' in found_struct}} cdef CUcontext _ctx + {{endif}} {{endif}} -{{if 'struct CUDA_KERNEL_NODE_PARAMS_v3_st' in found_types}} +{{if 'CUDA_KERNEL_NODE_PARAMS_v3_st' in found_struct}} cdef class CUDA_KERNEL_NODE_PARAMS_v3_st: """ @@ -1042,47 +1222,78 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v3_st: Attributes ---------- + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.func' in found_struct}} func : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.extra' in found_struct}} extra : Any Extra options + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kern' in found_struct}} kern : CUkernel Kernel to launch, will only be referenced if func is NULL + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.ctx' in found_struct}} ctx : CUcontext Context for the kernel task to run in. The value NULL will indicate the current context should be used by the api. This field is ignored if func is set. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v3_st __val - cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v3_st* _ptr + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v3_st _pvt_val + cdef cydriver.CUDA_KERNEL_NODE_PARAMS_v3_st* _pvt_ptr + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.func' in found_struct}} cdef CUfunction _func + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kernelParams' in found_struct}} cdef utils.HelperKernelParams _cykernelParams + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kern' in found_struct}} cdef CUkernel _kern + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.ctx' in found_struct}} cdef CUcontext _ctx + {{endif}} {{endif}} -{{if 'struct CUDA_MEMSET_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_MEMSET_NODE_PARAMS_st' in found_struct}} cdef class CUDA_MEMSET_NODE_PARAMS_st: """ @@ -1090,30 +1301,43 @@ cdef class CUDA_MEMSET_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_MEMSET_NODE_PARAMS_st.dst' in found_struct}} dst : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.pitch' in found_struct}} pitch : size_t Pitch of destination device pointer. Unused if height is 1 + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.value' in found_struct}} value : unsigned int Value to be set + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.elementSize' in found_struct}} elementSize : unsigned int Size of each element in bytes. Must be 1, 2, or 4. + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.width' in found_struct}} width : size_t Width of the row in elements + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.height' in found_struct}} height : size_t Number of rows + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_MEMSET_NODE_PARAMS_st __val - cdef cydriver.CUDA_MEMSET_NODE_PARAMS_st* _ptr + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_st* _pvt_ptr + {{if 'CUDA_MEMSET_NODE_PARAMS_st.dst' in found_struct}} cdef CUdeviceptr _dst + {{endif}} {{endif}} -{{if 'struct CUDA_MEMSET_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_MEMSET_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_MEMSET_NODE_PARAMS_v2_st: """ @@ -1121,33 +1345,50 @@ cdef class CUDA_MEMSET_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.dst' in found_struct}} dst : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.pitch' in found_struct}} pitch : size_t Pitch of destination device pointer. Unused if height is 1 + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.value' in found_struct}} value : unsigned int Value to be set + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.elementSize' in found_struct}} elementSize : unsigned int Size of each element in bytes. Must be 1, 2, or 4. + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.width' in found_struct}} width : size_t Width of the row in elements + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.height' in found_struct}} height : size_t Number of rows + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.ctx' in found_struct}} ctx : CUcontext Context on which to run the node + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_MEMSET_NODE_PARAMS_v2_st __val - cdef cydriver.CUDA_MEMSET_NODE_PARAMS_v2_st* _ptr + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_MEMSET_NODE_PARAMS_v2_st* _pvt_ptr + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.dst' in found_struct}} cdef CUdeviceptr _dst + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.ctx' in found_struct}} cdef CUcontext _ctx + {{endif}} {{endif}} -{{if 'struct CUDA_HOST_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_HOST_NODE_PARAMS_st' in found_struct}} cdef class CUDA_HOST_NODE_PARAMS_st: """ @@ -1155,22 +1396,27 @@ cdef class CUDA_HOST_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_HOST_NODE_PARAMS_st.fn' in found_struct}} fn : CUhostFn The function to call when the node executes + {{endif}} + {{if 'CUDA_HOST_NODE_PARAMS_st.userData' in found_struct}} userData : Any Argument to pass to the function + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_HOST_NODE_PARAMS_st __val - cdef cydriver.CUDA_HOST_NODE_PARAMS_st* _ptr + cdef cydriver.CUDA_HOST_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_HOST_NODE_PARAMS_st* _pvt_ptr + {{if 'CUDA_HOST_NODE_PARAMS_st.fn' in found_struct}} cdef CUhostFn _fn + {{endif}} {{endif}} -{{if 'struct CUDA_HOST_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_HOST_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_HOST_NODE_PARAMS_v2_st: """ @@ -1178,22 +1424,27 @@ cdef class CUDA_HOST_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.fn' in found_struct}} fn : CUhostFn The function to call when the node executes + {{endif}} + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.userData' in found_struct}} userData : Any Argument to pass to the function + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_HOST_NODE_PARAMS_v2_st __val - cdef cydriver.CUDA_HOST_NODE_PARAMS_v2_st* _ptr + cdef cydriver.CUDA_HOST_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_HOST_NODE_PARAMS_v2_st* _pvt_ptr + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.fn' in found_struct}} cdef CUhostFn _fn + {{endif}} {{endif}} -{{if 'struct CUDA_CONDITIONAL_NODE_PARAMS' in found_types}} +{{if 'CUDA_CONDITIONAL_NODE_PARAMS' in found_struct}} cdef class CUDA_CONDITIONAL_NODE_PARAMS: """ @@ -1201,13 +1452,22 @@ cdef class CUDA_CONDITIONAL_NODE_PARAMS: Attributes ---------- + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.handle' in found_struct}} handle : CUgraphConditionalHandle Conditional node handle. Handles must be created in advance of creating the node using cuGraphConditionalHandleCreate. + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.type' in found_struct}} type : CUgraphConditionalNodeType Type of conditional node. + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.size' in found_struct}} size : unsigned int - Size of graph output array. Must be 1. + Size of graph output array. Allowed values are 1 for + CU_GRAPH_COND_TYPE_WHILE, 1 or 2 for CU_GRAPH_COND_TYPE_IF, or any + value greater than zero for CU_GRAPH_COND_TYPE_SWITCH. + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.phGraph_out' in found_struct}} phGraph_out : CUgraph CUDA-owned array populated with conditional node child graphs during creation of the node. Valid for the lifetime of the @@ -1218,26 +1478,39 @@ cdef class CUDA_CONDITIONAL_NODE_PARAMS: - All kernels, including kernels in nested conditionals or child graphs at any level, must belong to the same CUDA context. These graphs may be populated using graph node creation APIs or - cuStreamBeginCaptureToGraph. + cuStreamBeginCaptureToGraph. CU_GRAPH_COND_TYPE_IF: phGraph_out[0] + is executed when the condition is non-zero. If `size` == 2, + phGraph_out[1] will be executed when the condition is zero. + CU_GRAPH_COND_TYPE_WHILE: phGraph_out[0] is executed as long as the + condition is non-zero. CU_GRAPH_COND_TYPE_SWITCH: phGraph_out[n] is + executed when the condition is equal to n. If the condition >= + `size`, no body graph is executed. + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.ctx' in found_struct}} ctx : CUcontext Context on which to run the node. Must match context used to create the handle and all body nodes. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_CONDITIONAL_NODE_PARAMS __val - cdef cydriver.CUDA_CONDITIONAL_NODE_PARAMS* _ptr + cdef cydriver.CUDA_CONDITIONAL_NODE_PARAMS _pvt_val + cdef cydriver.CUDA_CONDITIONAL_NODE_PARAMS* _pvt_ptr + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.handle' in found_struct}} cdef CUgraphConditionalHandle _handle + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.phGraph_out' in found_struct}} cdef size_t _phGraph_out_length cdef cydriver.CUgraph* _phGraph_out - + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.ctx' in found_struct}} cdef CUcontext _ctx + {{endif}} {{endif}} -{{if 'struct CUgraphEdgeData_st' in found_types}} +{{if 'CUgraphEdgeData_st' in found_struct}} cdef class CUgraphEdgeData_st: """ @@ -1248,6 +1521,7 @@ cdef class CUgraphEdgeData_st: Attributes ---------- + {{if 'CUgraphEdgeData_st.from_port' in found_struct}} from_port : bytes This indicates when the dependency is triggered from the upstream node on the edge. The meaning is specfic to the node type. A value @@ -1258,6 +1532,8 @@ cdef class CUgraphEdgeData_st: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC, or CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER. + {{endif}} + {{if 'CUgraphEdgeData_st.to_port' in found_struct}} to_port : bytes This indicates what portion of the downstream node is dependent on the upstream node or portion thereof (indicated by `from_port`). @@ -1265,24 +1541,28 @@ cdef class CUgraphEdgeData_st: means the entirety of the downstream node is dependent on the upstream work. Currently no node types define non-zero ports. Accordingly, this field must be set to zero. + {{endif}} + {{if 'CUgraphEdgeData_st.type' in found_struct}} type : bytes This should be populated with a value from CUgraphDependencyType. (It is typed as char due to compiler-specific layout of bitfields.) See CUgraphDependencyType. + {{endif}} + {{if 'CUgraphEdgeData_st.reserved' in found_struct}} reserved : bytes These bytes are unused and must be zeroed. This ensures compatibility if additional fields are added in the future. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUgraphEdgeData_st __val - cdef cydriver.CUgraphEdgeData_st* _ptr + cdef cydriver.CUgraphEdgeData_st _pvt_val + cdef cydriver.CUgraphEdgeData_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_GRAPH_INSTANTIATE_PARAMS_st' in found_types}} +{{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st' in found_struct}} cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: """ @@ -1290,28 +1570,41 @@ cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: Attributes ---------- + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.flags' in found_struct}} flags : cuuint64_t Instantiation flags + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hUploadStream' in found_struct}} hUploadStream : CUstream Upload stream + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hErrNode_out' in found_struct}} hErrNode_out : CUgraphNode The node which caused instantiation to fail, if any + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.result_out' in found_struct}} result_out : CUgraphInstantiateResult Whether instantiation was successful. If it failed, the reason why + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS_st __val - cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS_st* _ptr + cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS_st _pvt_val + cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS_st* _pvt_ptr + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.flags' in found_struct}} cdef cuuint64_t _flags + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hUploadStream' in found_struct}} cdef CUstream _hUploadStream + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hErrNode_out' in found_struct}} cdef CUgraphNode _hErrNode_out + {{endif}} {{endif}} -{{if 'struct CUlaunchMemSyncDomainMap_st' in found_types}} +{{if 'CUlaunchMemSyncDomainMap_st' in found_struct}} cdef class CUlaunchMemSyncDomainMap_st: """ @@ -1325,104 +1618,155 @@ cdef class CUlaunchMemSyncDomainMap_st: Attributes ---------- + {{if 'CUlaunchMemSyncDomainMap_st.default_' in found_struct}} default_ : bytes The default domain ID to use for designated kernels + {{endif}} + {{if 'CUlaunchMemSyncDomainMap_st.remote' in found_struct}} remote : bytes The remote domain ID to use for designated kernels + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUlaunchMemSyncDomainMap_st __val - cdef cydriver.CUlaunchMemSyncDomainMap_st* _ptr + cdef cydriver.CUlaunchMemSyncDomainMap_st _pvt_val + cdef cydriver.CUlaunchMemSyncDomainMap_st* _pvt_ptr {{endif}} -{{if 'union CUlaunchAttributeValue_union' in found_types}} +{{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} cdef class anon_struct1: """ Attributes ---------- + {{if 'CUlaunchAttributeValue_union.clusterDim.x' in found_struct}} x : unsigned int + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim.y' in found_struct}} y : unsigned int + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim.z' in found_struct}} z : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUlaunchAttributeValue_union* _ptr + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr {{endif}} -{{if 'union CUlaunchAttributeValue_union' in found_types}} +{{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} cdef class anon_struct2: """ Attributes ---------- + {{if 'CUlaunchAttributeValue_union.programmaticEvent.event' in found_struct}} event : CUevent + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent.flags' in found_struct}} flags : int + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent.triggerAtBlockStart' in found_struct}} triggerAtBlockStart : int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUlaunchAttributeValue_union* _ptr + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + {{if 'CUlaunchAttributeValue_union.programmaticEvent.event' in found_struct}} cdef CUevent _event + {{endif}} {{endif}} -{{if 'union CUlaunchAttributeValue_union' in found_types}} +{{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} cdef class anon_struct3: """ Attributes ---------- + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent.event' in found_struct}} event : CUevent + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent.flags' in found_struct}} flags : int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUlaunchAttributeValue_union* _ptr + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent.event' in found_struct}} cdef CUevent _event + {{endif}} {{endif}} -{{if 'union CUlaunchAttributeValue_union' in found_types}} +{{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} cdef class anon_struct4: """ Attributes ---------- + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.x' in found_struct}} + x : unsigned int + + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.y' in found_struct}} + y : unsigned int + + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.z' in found_struct}} + z : unsigned int + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr +{{endif}} +{{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} + +cdef class anon_struct5: + """ + Attributes + ---------- + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode.deviceUpdatable' in found_struct}} deviceUpdatable : int + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode.devNode' in found_struct}} devNode : CUgraphDeviceNode + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUlaunchAttributeValue_union* _ptr + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode.devNode' in found_struct}} cdef CUgraphDeviceNode _devNode + {{endif}} {{endif}} -{{if 'union CUlaunchAttributeValue_union' in found_types}} +{{if 'CUlaunchAttributeValue_union' in found_struct}} cdef class CUlaunchAttributeValue_union: """ @@ -1430,17 +1774,26 @@ cdef class CUlaunchAttributeValue_union: Attributes ---------- + {{if 'CUlaunchAttributeValue_union.pad' in found_struct}} pad : bytes + {{endif}} + {{if 'CUlaunchAttributeValue_union.accessPolicyWindow' in found_struct}} accessPolicyWindow : CUaccessPolicyWindow Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + {{endif}} + {{if 'CUlaunchAttributeValue_union.cooperative' in found_struct}} cooperative : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero indicates a cooperative kernel (see cuLaunchCooperativeKernel). + {{endif}} + {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. ::CUsynchronizationPolicy for work queued up in this stream + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION that represents the desired cluster dimensions for the kernel. @@ -1449,13 +1802,19 @@ cdef class CUlaunchAttributeValue_union: - `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension. - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension. + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster scheduling policy preference for the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed' in found_struct}} programmaticStreamSerializationAllowed : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} programmaticEvent : anon_struct2 Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT with the following fields: - `CUevent` event - Event to fire when @@ -1463,48 +1822,90 @@ cdef class CUlaunchAttributeValue_union: cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. - `triggerAtBlockStart` - If this is set to non-0, each block launch will automatically trigger the event. + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} launchCompletionEvent : anon_struct3 Value of launch attribute CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following fields: - `CUevent` event - Event to fire when the last block launches - `int` flags; - Event record flags, see cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + {{endif}} + {{if 'CUlaunchAttributeValue_union.priority' in found_struct}} priority : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution priority of the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomainMap' in found_struct}} memSyncDomainMap : CUlaunchMemSyncDomainMap Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. See CUlaunchMemSyncDomainMap. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomain' in found_struct}} memSyncDomain : CUlaunchMemSyncDomain Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. See::CUlaunchMemSyncDomain - deviceUpdatableKernelNode : anon_struct4 + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} + deviceUpdatableKernelNode : anon_struct5 Value of launch attribute CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the following fields: - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable. - `CUgraphDeviceNode` devNode - Returns a handle to pass to the various device-side update functions. + {{endif}} + {{if 'CUlaunchAttributeValue_union.sharedMemCarveout' in found_struct}} sharedMemCarveout : unsigned int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUlaunchAttributeValue_union __val - cdef cydriver.CUlaunchAttributeValue_union* _ptr + cdef cydriver.CUlaunchAttributeValue_union _pvt_val + cdef cydriver.CUlaunchAttributeValue_union* _pvt_ptr + {{if 'CUlaunchAttributeValue_union.accessPolicyWindow' in found_struct}} cdef CUaccessPolicyWindow _accessPolicyWindow + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} cdef anon_struct1 _clusterDim + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} cdef anon_struct2 _programmaticEvent + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} cdef anon_struct3 _launchCompletionEvent + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomainMap' in found_struct}} cdef CUlaunchMemSyncDomainMap _memSyncDomainMap - cdef anon_struct4 _deviceUpdatableKernelNode + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} + cdef anon_struct4 _preferredClusterDim + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} + cdef anon_struct5 _deviceUpdatableKernelNode + {{endif}} {{endif}} -{{if 'struct CUlaunchAttribute_st' in found_types}} +{{if 'CUlaunchAttribute_st' in found_struct}} cdef class CUlaunchAttribute_st: """ @@ -1512,22 +1913,27 @@ cdef class CUlaunchAttribute_st: Attributes ---------- + {{if 'CUlaunchAttribute_st.id' in found_struct}} id : CUlaunchAttributeID Attribute to set + {{endif}} + {{if 'CUlaunchAttribute_st.value' in found_struct}} value : CUlaunchAttributeValue Value of the attribute + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUlaunchAttribute_st __val - cdef cydriver.CUlaunchAttribute_st* _ptr + cdef cydriver.CUlaunchAttribute_st _pvt_val + cdef cydriver.CUlaunchAttribute_st* _pvt_ptr + {{if 'CUlaunchAttribute_st.value' in found_struct}} cdef CUlaunchAttributeValue _value + {{endif}} {{endif}} -{{if 'struct CUlaunchConfig_st' in found_types}} +{{if 'CUlaunchConfig_st' in found_struct}} cdef class CUlaunchConfig_st: """ @@ -1535,41 +1941,63 @@ cdef class CUlaunchConfig_st: Attributes ---------- + {{if 'CUlaunchConfig_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUlaunchConfig_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUlaunchConfig_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUlaunchConfig_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUlaunchConfig_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUlaunchConfig_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUlaunchConfig_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUlaunchConfig_st.hStream' in found_struct}} hStream : CUstream Stream identifier + {{endif}} + {{if 'CUlaunchConfig_st.attrs' in found_struct}} attrs : CUlaunchAttribute List of attributes; nullable if CUlaunchConfig::numAttrs == 0 + {{endif}} + {{if 'CUlaunchConfig_st.numAttrs' in found_struct}} numAttrs : unsigned int Number of attributes populated in CUlaunchConfig::attrs + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUlaunchConfig_st __val - cdef cydriver.CUlaunchConfig_st* _ptr + cdef cydriver.CUlaunchConfig_st _pvt_val + cdef cydriver.CUlaunchConfig_st* _pvt_ptr + {{if 'CUlaunchConfig_st.hStream' in found_struct}} cdef CUstream _hStream + {{endif}} + {{if 'CUlaunchConfig_st.attrs' in found_struct}} cdef size_t _attrs_length cdef cydriver.CUlaunchAttribute* _attrs - + {{endif}} {{endif}} -{{if 'struct CUexecAffinitySmCount_st' in found_types}} +{{if 'CUexecAffinitySmCount_st' in found_struct}} cdef class CUexecAffinitySmCount_st: """ @@ -1577,37 +2005,41 @@ cdef class CUexecAffinitySmCount_st: Attributes ---------- + {{if 'CUexecAffinitySmCount_st.val' in found_struct}} val : unsigned int The number of SMs the context is limited to use. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUexecAffinitySmCount_st __val - cdef cydriver.CUexecAffinitySmCount_st* _ptr + cdef cydriver.CUexecAffinitySmCount_st _pvt_val + cdef cydriver.CUexecAffinitySmCount_st* _pvt_ptr {{endif}} -{{if 'struct CUexecAffinityParam_st' in found_types}} +{{if 'CUexecAffinityParam_st.param' in found_struct}} cdef class anon_union3: """ Attributes ---------- + {{if 'CUexecAffinityParam_st.param.smCount' in found_struct}} smCount : CUexecAffinitySmCount + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUexecAffinityParam_st* _ptr + cdef cydriver.CUexecAffinityParam_st* _pvt_ptr + {{if 'CUexecAffinityParam_st.param.smCount' in found_struct}} cdef CUexecAffinitySmCount _smCount + {{endif}} {{endif}} -{{if 'struct CUexecAffinityParam_st' in found_types}} +{{if 'CUexecAffinityParam_st' in found_struct}} cdef class CUexecAffinityParam_st: """ @@ -1615,22 +2047,27 @@ cdef class CUexecAffinityParam_st: Attributes ---------- + {{if 'CUexecAffinityParam_st.type' in found_struct}} type : CUexecAffinityType + {{endif}} + {{if 'CUexecAffinityParam_st.param' in found_struct}} param : anon_union3 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cydriver.CUexecAffinityParam_st* _val_ptr - cdef cydriver.CUexecAffinityParam_st* _ptr + cdef cydriver.CUexecAffinityParam_st* _pvt_ptr + {{if 'CUexecAffinityParam_st.param' in found_struct}} cdef anon_union3 _param + {{endif}} {{endif}} -{{if 'struct CUctxCigParam_st' in found_types}} +{{if 'CUctxCigParam_st' in found_struct}} cdef class CUctxCigParam_st: """ @@ -1638,21 +2075,24 @@ cdef class CUctxCigParam_st: Attributes ---------- + {{if 'CUctxCigParam_st.sharedDataType' in found_struct}} sharedDataType : CUcigDataType + {{endif}} + {{if 'CUctxCigParam_st.sharedData' in found_struct}} sharedData : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUctxCigParam_st __val - cdef cydriver.CUctxCigParam_st* _ptr + cdef cydriver.CUctxCigParam_st _pvt_val + cdef cydriver.CUctxCigParam_st* _pvt_ptr {{endif}} -{{if 'struct CUctxCreateParams_st' in found_types}} +{{if 'CUctxCreateParams_st' in found_struct}} cdef class CUctxCreateParams_st: """ @@ -1661,53 +2101,67 @@ cdef class CUctxCreateParams_st: Attributes ---------- + {{if 'CUctxCreateParams_st.execAffinityParams' in found_struct}} execAffinityParams : CUexecAffinityParam + {{endif}} + {{if 'CUctxCreateParams_st.numExecAffinityParams' in found_struct}} numExecAffinityParams : int + {{endif}} + {{if 'CUctxCreateParams_st.cigParams' in found_struct}} cigParams : CUctxCigParam + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUctxCreateParams_st __val - cdef cydriver.CUctxCreateParams_st* _ptr + cdef cydriver.CUctxCreateParams_st _pvt_val + cdef cydriver.CUctxCreateParams_st* _pvt_ptr + {{if 'CUctxCreateParams_st.execAffinityParams' in found_struct}} cdef size_t _execAffinityParams_length cdef cydriver.CUexecAffinityParam* _execAffinityParams - + {{endif}} + {{if 'CUctxCreateParams_st.cigParams' in found_struct}} cdef size_t _cigParams_length cdef cydriver.CUctxCigParam* _cigParams - + {{endif}} {{endif}} -{{if 'struct CUlibraryHostUniversalFunctionAndDataTable_st' in found_types}} +{{if 'CUlibraryHostUniversalFunctionAndDataTable_st' in found_struct}} cdef class CUlibraryHostUniversalFunctionAndDataTable_st: """ Attributes ---------- + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.functionTable' in found_struct}} functionTable : Any + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.functionWindowSize' in found_struct}} functionWindowSize : size_t + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.dataTable' in found_struct}} dataTable : Any + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.dataWindowSize' in found_struct}} dataWindowSize : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUlibraryHostUniversalFunctionAndDataTable_st __val - cdef cydriver.CUlibraryHostUniversalFunctionAndDataTable_st* _ptr + cdef cydriver.CUlibraryHostUniversalFunctionAndDataTable_st _pvt_val + cdef cydriver.CUlibraryHostUniversalFunctionAndDataTable_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_MEMCPY2D_st' in found_types}} +{{if 'CUDA_MEMCPY2D_st' in found_struct}} cdef class CUDA_MEMCPY2D_st: """ @@ -1715,53 +2169,92 @@ cdef class CUDA_MEMCPY2D_st: Attributes ---------- + {{if 'CUDA_MEMCPY2D_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 2D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.Height' in found_struct}} Height : size_t Height of 2D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_MEMCPY2D_st __val - cdef cydriver.CUDA_MEMCPY2D_st* _ptr + cdef cydriver.CUDA_MEMCPY2D_st _pvt_val + cdef cydriver.CUDA_MEMCPY2D_st* _pvt_ptr + {{if 'CUDA_MEMCPY2D_st.srcDevice' in found_struct}} cdef CUdeviceptr _srcDevice + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcArray' in found_struct}} cdef CUarray _srcArray + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstDevice' in found_struct}} cdef CUdeviceptr _dstDevice + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstArray' in found_struct}} cdef CUarray _dstArray + {{endif}} {{endif}} -{{if 'struct CUDA_MEMCPY3D_st' in found_types}} +{{if 'CUDA_MEMCPY3D_st' in found_struct}} cdef class CUDA_MEMCPY3D_st: """ @@ -1769,72 +2262,129 @@ cdef class CUDA_MEMCPY3D_st: Attributes ---------- + {{if 'CUDA_MEMCPY3D_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcZ' in found_struct}} srcZ : size_t Source Z + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcLOD' in found_struct}} srcLOD : size_t Source LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved0' in found_struct}} reserved0 : Any Must be NULL + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHeight' in found_struct}} srcHeight : size_t Source height (ignored when src is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstZ' in found_struct}} dstZ : size_t Destination Z + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstLOD' in found_struct}} dstLOD : size_t Destination LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved1' in found_struct}} reserved1 : Any Must be NULL + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHeight' in found_struct}} dstHeight : size_t Destination height (ignored when dst is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 3D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Height' in found_struct}} Height : size_t Height of 3D memory copy + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Depth' in found_struct}} Depth : size_t Depth of 3D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_MEMCPY3D_st __val - cdef cydriver.CUDA_MEMCPY3D_st* _ptr + cdef cydriver.CUDA_MEMCPY3D_st _pvt_val + cdef cydriver.CUDA_MEMCPY3D_st* _pvt_ptr + {{if 'CUDA_MEMCPY3D_st.srcDevice' in found_struct}} cdef CUdeviceptr _srcDevice + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcArray' in found_struct}} cdef CUarray _srcArray + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstDevice' in found_struct}} cdef CUdeviceptr _dstDevice + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstArray' in found_struct}} cdef CUarray _dstArray + {{endif}} {{endif}} -{{if 'struct CUDA_MEMCPY3D_PEER_st' in found_types}} +{{if 'CUDA_MEMCPY3D_PEER_st' in found_struct}} cdef class CUDA_MEMCPY3D_PEER_st: """ @@ -1842,75 +2392,136 @@ cdef class CUDA_MEMCPY3D_PEER_st: Attributes ---------- + {{if 'CUDA_MEMCPY3D_PEER_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcZ' in found_struct}} srcZ : size_t Source Z + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcLOD' in found_struct}} srcLOD : size_t Source LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcContext' in found_struct}} srcContext : CUcontext Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHeight' in found_struct}} srcHeight : size_t Source height (ignored when src is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstZ' in found_struct}} dstZ : size_t Destination Z + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstLOD' in found_struct}} dstLOD : size_t Destination LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstContext' in found_struct}} dstContext : CUcontext Destination context (ignored with dstMemoryType is CU_MEMORYTYPE_ARRAY) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHeight' in found_struct}} dstHeight : size_t Destination height (ignored when dst is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 3D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Height' in found_struct}} Height : size_t Height of 3D memory copy + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Depth' in found_struct}} Depth : size_t Depth of 3D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_MEMCPY3D_PEER_st __val - cdef cydriver.CUDA_MEMCPY3D_PEER_st* _ptr + cdef cydriver.CUDA_MEMCPY3D_PEER_st _pvt_val + cdef cydriver.CUDA_MEMCPY3D_PEER_st* _pvt_ptr + {{if 'CUDA_MEMCPY3D_PEER_st.srcDevice' in found_struct}} cdef CUdeviceptr _srcDevice + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcArray' in found_struct}} cdef CUarray _srcArray + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcContext' in found_struct}} cdef CUcontext _srcContext + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstDevice' in found_struct}} cdef CUdeviceptr _dstDevice + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstArray' in found_struct}} cdef CUarray _dstArray + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstContext' in found_struct}} cdef CUcontext _dstContext + {{endif}} {{endif}} -{{if 'struct CUDA_MEMCPY_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_MEMCPY_NODE_PARAMS_st' in found_struct}} cdef class CUDA_MEMCPY_NODE_PARAMS_st: """ @@ -1918,27 +2529,38 @@ cdef class CUDA_MEMCPY_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.flags' in found_struct}} flags : int Must be zero + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.reserved' in found_struct}} reserved : int Must be zero + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyCtx' in found_struct}} copyCtx : CUcontext Context on which to run the node + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyParams' in found_struct}} copyParams : CUDA_MEMCPY3D Parameters for the memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_MEMCPY_NODE_PARAMS_st __val - cdef cydriver.CUDA_MEMCPY_NODE_PARAMS_st* _ptr + cdef cydriver.CUDA_MEMCPY_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_MEMCPY_NODE_PARAMS_st* _pvt_ptr + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyCtx' in found_struct}} cdef CUcontext _copyCtx + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyParams' in found_struct}} cdef CUDA_MEMCPY3D _copyParams + {{endif}} {{endif}} -{{if 'struct CUDA_ARRAY_DESCRIPTOR_st' in found_types}} +{{if 'CUDA_ARRAY_DESCRIPTOR_st' in found_struct}} cdef class CUDA_ARRAY_DESCRIPTOR_st: """ @@ -1946,25 +2568,32 @@ cdef class CUDA_ARRAY_DESCRIPTOR_st: Attributes ---------- + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Width' in found_struct}} Width : size_t Width of array + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Height' in found_struct}} Height : size_t Height of array + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Format' in found_struct}} Format : CUarray_format Array format + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.NumChannels' in found_struct}} NumChannels : unsigned int Channels per array element + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_ARRAY_DESCRIPTOR_st __val - cdef cydriver.CUDA_ARRAY_DESCRIPTOR_st* _ptr + cdef cydriver.CUDA_ARRAY_DESCRIPTOR_st _pvt_val + cdef cydriver.CUDA_ARRAY_DESCRIPTOR_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_ARRAY3D_DESCRIPTOR_st' in found_types}} +{{if 'CUDA_ARRAY3D_DESCRIPTOR_st' in found_struct}} cdef class CUDA_ARRAY3D_DESCRIPTOR_st: """ @@ -1972,50 +2601,66 @@ cdef class CUDA_ARRAY3D_DESCRIPTOR_st: Attributes ---------- + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Width' in found_struct}} Width : size_t Width of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Height' in found_struct}} Height : size_t Height of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Depth' in found_struct}} Depth : size_t Depth of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Format' in found_struct}} Format : CUarray_format Array format + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.NumChannels' in found_struct}} NumChannels : unsigned int Channels per array element + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Flags' in found_struct}} Flags : unsigned int Flags + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_st __val - cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_st* _ptr + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_st _pvt_val + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_ARRAY_SPARSE_PROPERTIES_st' in found_types}} +{{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent' in found_struct}} -cdef class anon_struct5: +cdef class anon_struct6: """ Attributes ---------- + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.width' in found_struct}} width : unsigned int + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.height' in found_struct}} height : unsigned int + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.depth' in found_struct}} depth : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st* _ptr + cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_ARRAY_SPARSE_PROPERTIES_st' in found_types}} +{{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st' in found_struct}} cdef class CUDA_ARRAY_SPARSE_PROPERTIES_st: """ @@ -2023,29 +2668,40 @@ cdef class CUDA_ARRAY_SPARSE_PROPERTIES_st: Attributes ---------- - tileExtent : anon_struct5 + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent' in found_struct}} + tileExtent : anon_struct6 + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailFirstLevel' in found_struct}} miptailFirstLevel : unsigned int First mip level at which the mip tail begins. + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailSize' in found_struct}} miptailSize : unsigned long long Total size of the mip tail. + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.flags' in found_struct}} flags : unsigned int Flags will either be zero or CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st __val - cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st* _ptr - cdef anon_struct5 _tileExtent + cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st _pvt_val + cdef cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st* _pvt_ptr + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent' in found_struct}} + cdef anon_struct6 _tileExtent + {{endif}} {{endif}} -{{if 'struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st' in found_types}} +{{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st' in found_struct}} cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_st: """ @@ -2053,158 +2709,211 @@ cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_st: Attributes ---------- + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.size' in found_struct}} size : size_t Total required memory size + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.alignment' in found_struct}} alignment : size_t alignment requirement + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st __val - cdef cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st* _ptr + cdef cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st _pvt_val + cdef cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res.array' in found_struct}} -cdef class anon_struct6: +cdef class anon_struct7: """ Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.res.array.hArray' in found_struct}} hArray : CUarray + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_RESOURCE_DESC_st* _ptr + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + {{if 'CUDA_RESOURCE_DESC_st.res.array.hArray' in found_struct}} cdef CUarray _hArray + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res.mipmap' in found_struct}} -cdef class anon_struct7: +cdef class anon_struct8: """ Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap.hMipmappedArray' in found_struct}} hMipmappedArray : CUmipmappedArray + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_RESOURCE_DESC_st* _ptr + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap.hMipmappedArray' in found_struct}} cdef CUmipmappedArray _hMipmappedArray + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res.linear' in found_struct}} -cdef class anon_struct8: +cdef class anon_struct9: """ Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.res.linear.devPtr' in found_struct}} devPtr : CUdeviceptr + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.format' in found_struct}} format : CUarray_format + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.numChannels' in found_struct}} numChannels : unsigned int + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.sizeInBytes' in found_struct}} sizeInBytes : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_RESOURCE_DESC_st* _ptr + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + {{if 'CUDA_RESOURCE_DESC_st.res.linear.devPtr' in found_struct}} cdef CUdeviceptr _devPtr + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res.pitch2D' in found_struct}} -cdef class anon_struct9: +cdef class anon_struct10: """ Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.devPtr' in found_struct}} devPtr : CUdeviceptr + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.format' in found_struct}} format : CUarray_format + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.numChannels' in found_struct}} numChannels : unsigned int + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.width' in found_struct}} width : size_t + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.height' in found_struct}} height : size_t + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.pitchInBytes' in found_struct}} pitchInBytes : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_RESOURCE_DESC_st* _ptr + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.devPtr' in found_struct}} cdef CUdeviceptr _devPtr + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res.reserved' in found_struct}} -cdef class anon_struct10: +cdef class anon_struct11: """ Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.res.reserved.reserved' in found_struct}} reserved : List[int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_RESOURCE_DESC_st* _ptr + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res' in found_struct}} cdef class anon_union4: """ Attributes ---------- - array : anon_struct6 + {{if 'CUDA_RESOURCE_DESC_st.res.array' in found_struct}} + array : anon_struct7 - mipmap : anon_struct7 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap' in found_struct}} + mipmap : anon_struct8 - linear : anon_struct8 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear' in found_struct}} + linear : anon_struct9 - pitch2D : anon_struct9 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D' in found_struct}} + pitch2D : anon_struct10 - reserved : anon_struct10 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.reserved' in found_struct}} + reserved : anon_struct11 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_RESOURCE_DESC_st* _ptr - cdef anon_struct6 _array - cdef anon_struct7 _mipmap - cdef anon_struct8 _linear - cdef anon_struct9 _pitch2D - cdef anon_struct10 _reserved + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + {{if 'CUDA_RESOURCE_DESC_st.res.array' in found_struct}} + cdef anon_struct7 _array + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap' in found_struct}} + cdef anon_struct8 _mipmap + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear' in found_struct}} + cdef anon_struct9 _linear + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D' in found_struct}} + cdef anon_struct10 _pitch2D + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.reserved' in found_struct}} + cdef anon_struct11 _reserved + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st' in found_struct}} cdef class CUDA_RESOURCE_DESC_st: """ @@ -2212,24 +2921,31 @@ cdef class CUDA_RESOURCE_DESC_st: Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.resType' in found_struct}} resType : CUresourcetype Resource type + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res' in found_struct}} res : anon_union4 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.flags' in found_struct}} flags : unsigned int Flags (must be zero) + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cydriver.CUDA_RESOURCE_DESC_st* _val_ptr - cdef cydriver.CUDA_RESOURCE_DESC_st* _ptr + cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr + {{if 'CUDA_RESOURCE_DESC_st.res' in found_struct}} cdef anon_union4 _res + {{endif}} {{endif}} -{{if 'struct CUDA_TEXTURE_DESC_st' in found_types}} +{{if 'CUDA_TEXTURE_DESC_st' in found_struct}} cdef class CUDA_TEXTURE_DESC_st: """ @@ -2237,37 +2953,56 @@ cdef class CUDA_TEXTURE_DESC_st: Attributes ---------- + {{if 'CUDA_TEXTURE_DESC_st.addressMode' in found_struct}} addressMode : List[CUaddress_mode] Address modes + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.filterMode' in found_struct}} filterMode : CUfilter_mode Filter mode + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.flags' in found_struct}} flags : unsigned int Flags + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxAnisotropy' in found_struct}} maxAnisotropy : unsigned int Maximum anisotropy ratio + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapFilterMode' in found_struct}} mipmapFilterMode : CUfilter_mode Mipmap filter mode + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapLevelBias' in found_struct}} mipmapLevelBias : float Mipmap level bias + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.minMipmapLevelClamp' in found_struct}} minMipmapLevelClamp : float Mipmap minimum level clamp + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxMipmapLevelClamp' in found_struct}} maxMipmapLevelClamp : float Mipmap maximum level clamp + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.borderColor' in found_struct}} borderColor : List[float] Border Color + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.reserved' in found_struct}} reserved : List[int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_TEXTURE_DESC_st __val - cdef cydriver.CUDA_TEXTURE_DESC_st* _ptr + cdef cydriver.CUDA_TEXTURE_DESC_st _pvt_val + cdef cydriver.CUDA_TEXTURE_DESC_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_RESOURCE_VIEW_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_VIEW_DESC_st' in found_struct}} cdef class CUDA_RESOURCE_VIEW_DESC_st: """ @@ -2275,35 +3010,52 @@ cdef class CUDA_RESOURCE_VIEW_DESC_st: Attributes ---------- + {{if 'CUDA_RESOURCE_VIEW_DESC_st.format' in found_struct}} format : CUresourceViewFormat Resource view format + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.width' in found_struct}} width : size_t Width of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.height' in found_struct}} height : size_t Height of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.depth' in found_struct}} depth : size_t Depth of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstMipmapLevel' in found_struct}} firstMipmapLevel : unsigned int First defined mipmap level + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastMipmapLevel' in found_struct}} lastMipmapLevel : unsigned int Last defined mipmap level + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstLayer' in found_struct}} firstLayer : unsigned int First layer index + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastLayer' in found_struct}} lastLayer : unsigned int Last layer index + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_RESOURCE_VIEW_DESC_st __val - cdef cydriver.CUDA_RESOURCE_VIEW_DESC_st* _ptr + cdef cydriver.CUDA_RESOURCE_VIEW_DESC_st _pvt_val + cdef cydriver.CUDA_RESOURCE_VIEW_DESC_st* _pvt_ptr {{endif}} -{{if 'struct CUtensorMap_st' in found_types}} +{{if 'CUtensorMap_st' in found_struct}} cdef class CUtensorMap_st: """ @@ -2312,19 +3064,20 @@ cdef class CUtensorMap_st: Attributes ---------- + {{if 'CUtensorMap_st.opaque' in found_struct}} opaque : List[cuuint64_t] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUtensorMap_st __val - cdef cydriver.CUtensorMap_st* _ptr + cdef cydriver.CUtensorMap_st _pvt_val + cdef cydriver.CUtensorMap_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st' in found_types}} +{{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st' in found_struct}} cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: """ @@ -2332,21 +3085,24 @@ cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: Attributes ---------- + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.p2pToken' in found_struct}} p2pToken : unsigned long long + {{endif}} + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.vaSpaceToken' in found_struct}} vaSpaceToken : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st __val - cdef cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st* _ptr + cdef cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st _pvt_val + cdef cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_LAUNCH_PARAMS_st' in found_types}} +{{if 'CUDA_LAUNCH_PARAMS_st' in found_struct}} cdef class CUDA_LAUNCH_PARAMS_st: """ @@ -2354,81 +3110,116 @@ cdef class CUDA_LAUNCH_PARAMS_st: Attributes ---------- + {{if 'CUDA_LAUNCH_PARAMS_st.function' in found_struct}} function : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.hStream' in found_struct}} hStream : CUstream Stream identifier + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_LAUNCH_PARAMS_st __val - cdef cydriver.CUDA_LAUNCH_PARAMS_st* _ptr + cdef cydriver.CUDA_LAUNCH_PARAMS_st _pvt_val + cdef cydriver.CUDA_LAUNCH_PARAMS_st* _pvt_ptr + {{if 'CUDA_LAUNCH_PARAMS_st.function' in found_struct}} cdef CUfunction _function + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.hStream' in found_struct}} cdef CUstream _hStream + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.kernelParams' in found_struct}} cdef utils.HelperKernelParams _cykernelParams + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32' in found_struct}} -cdef class anon_struct11: +cdef class anon_struct12: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32.handle' in found_struct}} handle : Any + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32.name' in found_struct}} name : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _ptr + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle' in found_struct}} cdef class anon_union5: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.fd' in found_struct}} fd : int - win32 : anon_struct11 + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32' in found_struct}} + win32 : anon_struct12 + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.nvSciBufObject' in found_struct}} nvSciBufObject : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _ptr - cdef anon_struct11 _win32 + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _pvt_ptr + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32' in found_struct}} + cdef anon_struct12 _win32 + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st' in found_struct}} cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: """ @@ -2436,28 +3227,39 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.type' in found_struct}} type : CUexternalMemoryHandleType Type of the handle + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle' in found_struct}} handle : anon_union5 + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.size' in found_struct}} size : unsigned long long Size of the memory allocation + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.flags' in found_struct}} flags : unsigned int Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _val_ptr - cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _ptr + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _pvt_ptr + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle' in found_struct}} cdef anon_union5 _handle + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st' in found_struct}} cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: """ @@ -2465,25 +3267,32 @@ cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the buffer's base is + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.size' in found_struct}} size : unsigned long long Size of the buffer + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.flags' in found_struct}} flags : unsigned int Flags reserved for future use. Must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st __val - cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st* _ptr + cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st' in found_struct}} cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: """ @@ -2491,68 +3300,87 @@ cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the base level of the mipmap chain is. + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.arrayDesc' in found_struct}} arrayDesc : CUDA_ARRAY3D_DESCRIPTOR Format, dimension and type of base level of the mipmap chain + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.numLevels' in found_struct}} numLevels : unsigned int Total number of levels in the mipmap chain + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st __val - cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st* _ptr + cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st* _pvt_ptr + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.arrayDesc' in found_struct}} cdef CUDA_ARRAY3D_DESCRIPTOR _arrayDesc + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32' in found_struct}} -cdef class anon_struct12: +cdef class anon_struct13: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32.handle' in found_struct}} handle : Any + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32.name' in found_struct}} name : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle' in found_struct}} cdef class anon_union6: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.fd' in found_struct}} fd : int - win32 : anon_struct12 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32' in found_struct}} + win32 : anon_struct13 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.nvSciSyncObj' in found_struct}} nvSciSyncObj : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _ptr - cdef anon_struct12 _win32 + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _pvt_ptr + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32' in found_struct}} + cdef anon_struct13 _win32 + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st' in found_struct}} cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: """ @@ -2560,105 +3388,132 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.type' in found_struct}} type : CUexternalSemaphoreHandleType Type of the handle + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle' in found_struct}} handle : anon_union6 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.flags' in found_struct}} flags : unsigned int Flags reserved for the future. Must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _val_ptr - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _pvt_ptr + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle' in found_struct}} cdef anon_union6 _handle + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence' in found_struct}} -cdef class anon_struct13: +cdef class anon_struct14: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence.value' in found_struct}} value : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync' in found_struct}} cdef class anon_union7: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync.fence' in found_struct}} fence : Any + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync.reserved' in found_struct}} reserved : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex' in found_struct}} -cdef class anon_struct14: +cdef class anon_struct15: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex.key' in found_struct}} key : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params' in found_struct}} -cdef class anon_struct15: +cdef class anon_struct16: """ Attributes ---------- - fence : anon_struct13 + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence' in found_struct}} + fence : anon_struct14 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync' in found_struct}} nvSciSync : anon_union7 - keyedMutex : anon_struct14 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex' in found_struct}} + keyedMutex : anon_struct15 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _ptr - cdef anon_struct13 _fence + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence' in found_struct}} + cdef anon_struct14 _fence + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync' in found_struct}} cdef anon_union7 _nvSciSync - cdef anon_struct14 _keyedMutex + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex' in found_struct}} + cdef anon_struct15 _keyedMutex + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_struct}} cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: """ @@ -2666,8 +3521,11 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: Attributes ---------- - params : anon_struct15 + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params' in found_struct}} + params : anon_struct16 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags' in found_struct}} flags : unsigned int Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a CUexternalSemaphore of type @@ -2677,101 +3535,125 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: synchronization operations should be performed for any external memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. For all other types of CUexternalSemaphore, flags must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st __val - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _ptr - cdef anon_struct15 _params + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params' in found_struct}} + cdef anon_struct16 _params + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence' in found_struct}} -cdef class anon_struct16: +cdef class anon_struct17: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence.value' in found_struct}} value : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync' in found_struct}} cdef class anon_union8: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync.fence' in found_struct}} fence : Any + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync.reserved' in found_struct}} reserved : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex' in found_struct}} -cdef class anon_struct17: +cdef class anon_struct18: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex.key' in found_struct}} key : unsigned long long + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex.timeoutMs' in found_struct}} timeoutMs : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _ptr + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params' in found_struct}} -cdef class anon_struct18: +cdef class anon_struct19: """ Attributes ---------- - fence : anon_struct16 + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence' in found_struct}} + fence : anon_struct17 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync' in found_struct}} nvSciSync : anon_union8 - keyedMutex : anon_struct17 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex' in found_struct}} + keyedMutex : anon_struct18 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _ptr - cdef anon_struct16 _fence + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence' in found_struct}} + cdef anon_struct17 _fence + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync' in found_struct}} cdef anon_union8 _nvSciSync - cdef anon_struct17 _keyedMutex + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex' in found_struct}} + cdef anon_struct18 _keyedMutex + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_struct}} cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: """ @@ -2779,8 +3661,11 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: Attributes ---------- - params : anon_struct18 + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params' in found_struct}} + params : anon_struct19 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags' in found_struct}} flags : unsigned int Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a CUexternalSemaphore of type @@ -2790,20 +3675,24 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: synchronization operations should be performed for any external memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. For all other types of CUexternalSemaphore, flags must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st __val - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _ptr - cdef anon_struct18 _params + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params' in found_struct}} + cdef anon_struct19 _params + {{endif}} {{endif}} -{{if 'struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st' in found_struct}} cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: """ @@ -2811,30 +3700,37 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS Array of external semaphore signal parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st __val - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st* _ptr + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st* _pvt_ptr + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.extSemArray' in found_struct}} cdef size_t _extSemArray_length cdef cydriver.CUexternalSemaphore* _extSemArray - + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.paramsArray' in found_struct}} cdef size_t _paramsArray_length cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* _paramsArray - + {{endif}} {{endif}} -{{if 'struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: """ @@ -2842,30 +3738,37 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS Array of external semaphore signal parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st __val - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st* _ptr + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st* _pvt_ptr + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.extSemArray' in found_struct}} cdef size_t _extSemArray_length cdef cydriver.CUexternalSemaphore* _extSemArray - + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.paramsArray' in found_struct}} cdef size_t _paramsArray_length cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* _paramsArray - + {{endif}} {{endif}} -{{if 'struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st' in found_struct}} cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: """ @@ -2873,30 +3776,37 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS Array of external semaphore wait parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st __val - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st* _ptr + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st* _pvt_ptr + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.extSemArray' in found_struct}} cdef size_t _extSemArray_length cdef cydriver.CUexternalSemaphore* _extSemArray - + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.paramsArray' in found_struct}} cdef size_t _paramsArray_length cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* _paramsArray - + {{endif}} {{endif}} -{{if 'struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: """ @@ -2904,142 +3814,186 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS Array of external semaphore wait parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st __val - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st* _ptr + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st* _pvt_ptr + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.extSemArray' in found_struct}} cdef size_t _extSemArray_length cdef cydriver.CUexternalSemaphore* _extSemArray - + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.paramsArray' in found_struct}} cdef size_t _paramsArray_length cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* _paramsArray - + {{endif}} {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st.resource' in found_struct}} cdef class anon_union9: """ Attributes ---------- + {{if 'CUarrayMapInfo_st.resource.mipmap' in found_struct}} mipmap : CUmipmappedArray + {{endif}} + {{if 'CUarrayMapInfo_st.resource.array' in found_struct}} array : CUarray + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUarrayMapInfo_st* _ptr + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + {{if 'CUarrayMapInfo_st.resource.mipmap' in found_struct}} cdef CUmipmappedArray _mipmap + {{endif}} + {{if 'CUarrayMapInfo_st.resource.array' in found_struct}} cdef CUarray _array + {{endif}} {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st.subresource.sparseLevel' in found_struct}} -cdef class anon_struct19: +cdef class anon_struct20: """ Attributes ---------- + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.level' in found_struct}} level : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.layer' in found_struct}} layer : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetX' in found_struct}} offsetX : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetY' in found_struct}} offsetY : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetZ' in found_struct}} offsetZ : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentWidth' in found_struct}} extentWidth : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentHeight' in found_struct}} extentHeight : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentDepth' in found_struct}} extentDepth : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUarrayMapInfo_st* _ptr + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st.subresource.miptail' in found_struct}} -cdef class anon_struct20: +cdef class anon_struct21: """ Attributes ---------- + {{if 'CUarrayMapInfo_st.subresource.miptail.layer' in found_struct}} layer : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail.offset' in found_struct}} offset : unsigned long long + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail.size' in found_struct}} size : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUarrayMapInfo_st* _ptr + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st.subresource' in found_struct}} cdef class anon_union10: """ Attributes ---------- - sparseLevel : anon_struct19 + {{if 'CUarrayMapInfo_st.subresource.sparseLevel' in found_struct}} + sparseLevel : anon_struct20 - miptail : anon_struct20 + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail' in found_struct}} + miptail : anon_struct21 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUarrayMapInfo_st* _ptr - cdef anon_struct19 _sparseLevel - cdef anon_struct20 _miptail + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + {{if 'CUarrayMapInfo_st.subresource.sparseLevel' in found_struct}} + cdef anon_struct20 _sparseLevel + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail' in found_struct}} + cdef anon_struct21 _miptail + {{endif}} {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st.memHandle' in found_struct}} cdef class anon_union11: """ Attributes ---------- + {{if 'CUarrayMapInfo_st.memHandle.memHandle' in found_struct}} memHandle : CUmemGenericAllocationHandle + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUarrayMapInfo_st* _ptr + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + {{if 'CUarrayMapInfo_st.memHandle.memHandle' in found_struct}} cdef CUmemGenericAllocationHandle _memHandle + {{endif}} {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st' in found_struct}} cdef class CUarrayMapInfo_st: """ @@ -3048,42 +4002,69 @@ cdef class CUarrayMapInfo_st: Attributes ---------- + {{if 'CUarrayMapInfo_st.resourceType' in found_struct}} resourceType : CUresourcetype Resource type + {{endif}} + {{if 'CUarrayMapInfo_st.resource' in found_struct}} resource : anon_union9 + {{endif}} + {{if 'CUarrayMapInfo_st.subresourceType' in found_struct}} subresourceType : CUarraySparseSubresourceType Sparse subresource type + {{endif}} + {{if 'CUarrayMapInfo_st.subresource' in found_struct}} subresource : anon_union10 + {{endif}} + {{if 'CUarrayMapInfo_st.memOperationType' in found_struct}} memOperationType : CUmemOperationType Memory operation type + {{endif}} + {{if 'CUarrayMapInfo_st.memHandleType' in found_struct}} memHandleType : CUmemHandleType Memory handle type + {{endif}} + {{if 'CUarrayMapInfo_st.memHandle' in found_struct}} memHandle : anon_union11 + {{endif}} + {{if 'CUarrayMapInfo_st.offset' in found_struct}} offset : unsigned long long Offset within mip tail Offset within the memory + {{endif}} + {{if 'CUarrayMapInfo_st.deviceBitMask' in found_struct}} deviceBitMask : unsigned int Device ordinal bit mask + {{endif}} + {{if 'CUarrayMapInfo_st.flags' in found_struct}} flags : unsigned int flags for future use, must be zero now. + {{endif}} + {{if 'CUarrayMapInfo_st.reserved' in found_struct}} reserved : List[unsigned int] Reserved for future use, must be zero now. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cydriver.CUarrayMapInfo_st* _val_ptr - cdef cydriver.CUarrayMapInfo_st* _ptr + cdef cydriver.CUarrayMapInfo_st* _pvt_ptr + {{if 'CUarrayMapInfo_st.resource' in found_struct}} cdef anon_union9 _resource + {{endif}} + {{if 'CUarrayMapInfo_st.subresource' in found_struct}} cdef anon_union10 _subresource + {{endif}} + {{if 'CUarrayMapInfo_st.memHandle' in found_struct}} cdef anon_union11 _memHandle + {{endif}} {{endif}} -{{if 'struct CUmemLocation_st' in found_types}} +{{if 'CUmemLocation_st' in found_struct}} cdef class CUmemLocation_st: """ @@ -3091,44 +4072,54 @@ cdef class CUmemLocation_st: Attributes ---------- + {{if 'CUmemLocation_st.type' in found_struct}} type : CUmemLocationType Specifies the location type, which modifies the meaning of id. + {{endif}} + {{if 'CUmemLocation_st.id' in found_struct}} id : int identifier for a given this location's CUmemLocationType. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUmemLocation_st __val - cdef cydriver.CUmemLocation_st* _ptr + cdef cydriver.CUmemLocation_st _pvt_val + cdef cydriver.CUmemLocation_st* _pvt_ptr {{endif}} -{{if 'struct CUmemAllocationProp_st' in found_types}} +{{if 'CUmemAllocationProp_st.allocFlags' in found_struct}} -cdef class anon_struct21: +cdef class anon_struct22: """ Attributes ---------- + {{if 'CUmemAllocationProp_st.allocFlags.compressionType' in found_struct}} compressionType : bytes + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.gpuDirectRDMACapable' in found_struct}} gpuDirectRDMACapable : bytes + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.usage' in found_struct}} usage : unsigned short + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUmemAllocationProp_st* _ptr + cdef cydriver.CUmemAllocationProp_st* _pvt_ptr {{endif}} -{{if 'struct CUmemAllocationProp_st' in found_types}} +{{if 'CUmemAllocationProp_st' in found_struct}} cdef class CUmemAllocationProp_st: """ @@ -3136,33 +4127,46 @@ cdef class CUmemAllocationProp_st: Attributes ---------- + {{if 'CUmemAllocationProp_st.type' in found_struct}} type : CUmemAllocationType Allocation type + {{endif}} + {{if 'CUmemAllocationProp_st.requestedHandleTypes' in found_struct}} requestedHandleTypes : CUmemAllocationHandleType requested CUmemAllocationHandleType + {{endif}} + {{if 'CUmemAllocationProp_st.location' in found_struct}} location : CUmemLocation Location of allocation + {{endif}} + {{if 'CUmemAllocationProp_st.win32HandleMetaData' in found_struct}} win32HandleMetaData : Any Windows-specific POBJECT_ATTRIBUTES required when CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes structure includes security attributes that define the scope of which exported allocations may be transferred to other processes. In all other cases, this field is required to be zero. - allocFlags : anon_struct21 + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags' in found_struct}} + allocFlags : anon_struct22 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUmemAllocationProp_st __val - cdef cydriver.CUmemAllocationProp_st* _ptr + cdef cydriver.CUmemAllocationProp_st _pvt_val + cdef cydriver.CUmemAllocationProp_st* _pvt_ptr + {{if 'CUmemAllocationProp_st.location' in found_struct}} cdef CUmemLocation _location - cdef anon_struct21 _allocFlags + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags' in found_struct}} + cdef anon_struct22 _allocFlags + {{endif}} {{endif}} -{{if 'struct CUmulticastObjectProp_st' in found_types}} +{{if 'CUmulticastObjectProp_st' in found_struct}} cdef class CUmulticastObjectProp_st: """ @@ -3170,28 +4174,35 @@ cdef class CUmulticastObjectProp_st: Attributes ---------- + {{if 'CUmulticastObjectProp_st.numDevices' in found_struct}} numDevices : unsigned int The number of devices in the multicast team that will bind memory to this object + {{endif}} + {{if 'CUmulticastObjectProp_st.size' in found_struct}} size : size_t The maximum amount of memory that can be bound to this multicast object per device + {{endif}} + {{if 'CUmulticastObjectProp_st.handleTypes' in found_struct}} handleTypes : unsigned long long Bitmask of exportable handle types (see CUmemAllocationHandleType) for this object + {{endif}} + {{if 'CUmulticastObjectProp_st.flags' in found_struct}} flags : unsigned long long Flags for future use, must be zero now + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUmulticastObjectProp_st __val - cdef cydriver.CUmulticastObjectProp_st* _ptr + cdef cydriver.CUmulticastObjectProp_st _pvt_val + cdef cydriver.CUmulticastObjectProp_st* _pvt_ptr {{endif}} -{{if 'struct CUmemAccessDesc_st' in found_types}} +{{if 'CUmemAccessDesc_st' in found_struct}} cdef class CUmemAccessDesc_st: """ @@ -3199,22 +4210,27 @@ cdef class CUmemAccessDesc_st: Attributes ---------- + {{if 'CUmemAccessDesc_st.location' in found_struct}} location : CUmemLocation Location on which the request is to change it's accessibility + {{endif}} + {{if 'CUmemAccessDesc_st.flags' in found_struct}} flags : CUmemAccess_flags ::CUmemProt accessibility flags to set on the request + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUmemAccessDesc_st __val - cdef cydriver.CUmemAccessDesc_st* _ptr + cdef cydriver.CUmemAccessDesc_st _pvt_val + cdef cydriver.CUmemAccessDesc_st* _pvt_ptr + {{if 'CUmemAccessDesc_st.location' in found_struct}} cdef CUmemLocation _location + {{endif}} {{endif}} -{{if 'struct CUgraphExecUpdateResultInfo_st' in found_types}} +{{if 'CUgraphExecUpdateResultInfo_st' in found_struct}} cdef class CUgraphExecUpdateResultInfo_st: """ @@ -3222,28 +4238,37 @@ cdef class CUgraphExecUpdateResultInfo_st: Attributes ---------- + {{if 'CUgraphExecUpdateResultInfo_st.result' in found_struct}} result : CUgraphExecUpdateResult Gives more specific detail when a cuda graph update fails. + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorNode' in found_struct}} errorNode : CUgraphNode The "to node" of the error edge when the topologies do not match. The error node when the error is associated with a specific node. NULL when the error is generic. + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} errorFromNode : CUgraphNode The from node of error edge when the topologies do not match. Otherwise NULL. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUgraphExecUpdateResultInfo_st __val - cdef cydriver.CUgraphExecUpdateResultInfo_st* _ptr + cdef cydriver.CUgraphExecUpdateResultInfo_st _pvt_val + cdef cydriver.CUgraphExecUpdateResultInfo_st* _pvt_ptr + {{if 'CUgraphExecUpdateResultInfo_st.errorNode' in found_struct}} cdef CUgraphNode _errorNode + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} cdef CUgraphNode _errorFromNode + {{endif}} {{endif}} -{{if 'struct CUmemPoolProps_st' in found_types}} +{{if 'CUmemPoolProps_st' in found_struct}} cdef class CUmemPoolProps_st: """ @@ -3251,38 +4276,53 @@ cdef class CUmemPoolProps_st: Attributes ---------- + {{if 'CUmemPoolProps_st.allocType' in found_struct}} allocType : CUmemAllocationType Allocation type. Currently must be specified as CU_MEM_ALLOCATION_TYPE_PINNED + {{endif}} + {{if 'CUmemPoolProps_st.handleTypes' in found_struct}} handleTypes : CUmemAllocationHandleType Handle types that will be supported by allocations from the pool. + {{endif}} + {{if 'CUmemPoolProps_st.location' in found_struct}} location : CUmemLocation Location where allocations should reside. + {{endif}} + {{if 'CUmemPoolProps_st.win32SecurityAttributes' in found_struct}} win32SecurityAttributes : Any Windows-specific LPSECURITYATTRIBUTES required when CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute defines the scope of which exported allocations may be transferred to other processes. In all other cases, this field is required to be zero. + {{endif}} + {{if 'CUmemPoolProps_st.maxSize' in found_struct}} maxSize : size_t Maximum pool size. When set to 0, defaults to a system dependent value. + {{endif}} + {{if 'CUmemPoolProps_st.usage' in found_struct}} usage : unsigned short Bitmask indicating intended usage for the pool. + {{endif}} + {{if 'CUmemPoolProps_st.reserved' in found_struct}} reserved : bytes reserved for future use, must be 0 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUmemPoolProps_st __val - cdef cydriver.CUmemPoolProps_st* _ptr + cdef cydriver.CUmemPoolProps_st _pvt_val + cdef cydriver.CUmemPoolProps_st* _pvt_ptr + {{if 'CUmemPoolProps_st.location' in found_struct}} cdef CUmemLocation _location + {{endif}} {{endif}} -{{if 'struct CUmemPoolPtrExportData_st' in found_types}} +{{if 'CUmemPoolPtrExportData_st' in found_struct}} cdef class CUmemPoolPtrExportData_st: """ @@ -3290,19 +4330,20 @@ cdef class CUmemPoolPtrExportData_st: Attributes ---------- + {{if 'CUmemPoolPtrExportData_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUmemPoolPtrExportData_st __val - cdef cydriver.CUmemPoolPtrExportData_st* _ptr + cdef cydriver.CUmemPoolPtrExportData_st _pvt_val + cdef cydriver.CUmemPoolPtrExportData_st* _pvt_ptr {{endif}} -{{if 'struct CUDA_MEM_ALLOC_NODE_PARAMS_v1_st' in found_types}} +{{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st' in found_struct}} cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: """ @@ -3310,36 +4351,50 @@ cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: Attributes ---------- + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.poolProps' in found_struct}} poolProps : CUmemPoolProps in: location where the allocation should reside (specified in ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is not supported. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescs' in found_struct}} accessDescs : CUmemAccessDesc in: array of memory access descriptors. Used to describe peer GPU access + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescCount' in found_struct}} accessDescCount : size_t in: number of memory access descriptors. Must not exceed the number of GPUs. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.bytesize' in found_struct}} bytesize : size_t in: size in bytes of the requested allocation + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.dptr' in found_struct}} dptr : CUdeviceptr out: address of the allocation returned by CUDA + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v1_st __val - cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v1_st* _ptr + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v1_st _pvt_val + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v1_st* _pvt_ptr + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.poolProps' in found_struct}} cdef CUmemPoolProps _poolProps + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescs' in found_struct}} cdef size_t _accessDescs_length cdef cydriver.CUmemAccessDesc* _accessDescs - + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.dptr' in found_struct}} cdef CUdeviceptr _dptr + {{endif}} {{endif}} -{{if 'struct CUDA_MEM_ALLOC_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: """ @@ -3347,36 +4402,50 @@ cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.poolProps' in found_struct}} poolProps : CUmemPoolProps in: location where the allocation should reside (specified in ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is not supported. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescs' in found_struct}} accessDescs : CUmemAccessDesc in: array of memory access descriptors. Used to describe peer GPU access + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescCount' in found_struct}} accessDescCount : size_t in: number of memory access descriptors. Must not exceed the number of GPUs. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.bytesize' in found_struct}} bytesize : size_t in: size in bytes of the requested allocation + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.dptr' in found_struct}} dptr : CUdeviceptr out: address of the allocation returned by CUDA + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2_st __val - cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2_st* _ptr + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2_st* _pvt_ptr + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.poolProps' in found_struct}} cdef CUmemPoolProps _poolProps + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescs' in found_struct}} cdef size_t _accessDescs_length cdef cydriver.CUmemAccessDesc* _accessDescs - + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.dptr' in found_struct}} cdef CUdeviceptr _dptr + {{endif}} {{endif}} -{{if 'struct CUDA_MEM_FREE_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_MEM_FREE_NODE_PARAMS_st' in found_struct}} cdef class CUDA_MEM_FREE_NODE_PARAMS_st: """ @@ -3384,20 +4453,23 @@ cdef class CUDA_MEM_FREE_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_MEM_FREE_NODE_PARAMS_st.dptr' in found_struct}} dptr : CUdeviceptr in: the pointer to free + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_MEM_FREE_NODE_PARAMS_st __val - cdef cydriver.CUDA_MEM_FREE_NODE_PARAMS_st* _ptr + cdef cydriver.CUDA_MEM_FREE_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_MEM_FREE_NODE_PARAMS_st* _pvt_ptr + {{if 'CUDA_MEM_FREE_NODE_PARAMS_st.dptr' in found_struct}} cdef CUdeviceptr _dptr + {{endif}} {{endif}} -{{if 'struct CUDA_CHILD_GRAPH_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_CHILD_GRAPH_NODE_PARAMS_st' in found_struct}} cdef class CUDA_CHILD_GRAPH_NODE_PARAMS_st: """ @@ -3405,21 +4477,24 @@ cdef class CUDA_CHILD_GRAPH_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_CHILD_GRAPH_NODE_PARAMS_st.graph' in found_struct}} graph : CUgraph The child graph to clone into the node for node creation, or a handle to the graph owned by the node for node query + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS_st __val - cdef cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS_st* _ptr + cdef cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS_st* _pvt_ptr + {{if 'CUDA_CHILD_GRAPH_NODE_PARAMS_st.graph' in found_struct}} cdef CUgraph _graph + {{endif}} {{endif}} -{{if 'struct CUDA_EVENT_RECORD_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_EVENT_RECORD_NODE_PARAMS_st' in found_struct}} cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: """ @@ -3427,20 +4502,23 @@ cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_EVENT_RECORD_NODE_PARAMS_st.event' in found_struct}} event : CUevent The event to record when the node executes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st __val - cdef cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st* _ptr + cdef cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st* _pvt_ptr + {{if 'CUDA_EVENT_RECORD_NODE_PARAMS_st.event' in found_struct}} cdef CUevent _event + {{endif}} {{endif}} -{{if 'struct CUDA_EVENT_WAIT_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_EVENT_WAIT_NODE_PARAMS_st' in found_struct}} cdef class CUDA_EVENT_WAIT_NODE_PARAMS_st: """ @@ -3448,20 +4526,23 @@ cdef class CUDA_EVENT_WAIT_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_EVENT_WAIT_NODE_PARAMS_st.event' in found_struct}} event : CUevent The event to wait on from the node + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUDA_EVENT_WAIT_NODE_PARAMS_st __val - cdef cydriver.CUDA_EVENT_WAIT_NODE_PARAMS_st* _ptr + cdef cydriver.CUDA_EVENT_WAIT_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EVENT_WAIT_NODE_PARAMS_st* _pvt_ptr + {{if 'CUDA_EVENT_WAIT_NODE_PARAMS_st.event' in found_struct}} cdef CUevent _event + {{endif}} {{endif}} -{{if 'struct CUgraphNodeParams_st' in found_types}} +{{if 'CUgraphNodeParams_st' in found_struct}} cdef class CUgraphNodeParams_st: """ @@ -3469,216 +4550,723 @@ cdef class CUgraphNodeParams_st: Attributes ---------- + {{if 'CUgraphNodeParams_st.type' in found_struct}} type : CUgraphNodeType Type of the node + {{endif}} + {{if 'CUgraphNodeParams_st.reserved0' in found_struct}} reserved0 : List[int] Reserved. Must be zero. + {{endif}} + {{if 'CUgraphNodeParams_st.reserved1' in found_struct}} reserved1 : List[long long] Padding. Unused bytes must be zero. + {{endif}} + {{if 'CUgraphNodeParams_st.kernel' in found_struct}} kernel : CUDA_KERNEL_NODE_PARAMS_v3 Kernel node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.memcpy' in found_struct}} memcpy : CUDA_MEMCPY_NODE_PARAMS Memcpy node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.memset' in found_struct}} memset : CUDA_MEMSET_NODE_PARAMS_v2 Memset node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.host' in found_struct}} host : CUDA_HOST_NODE_PARAMS_v2 Host node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.graph' in found_struct}} graph : CUDA_CHILD_GRAPH_NODE_PARAMS Child graph node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.eventWait' in found_struct}} eventWait : CUDA_EVENT_WAIT_NODE_PARAMS Event wait node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.eventRecord' in found_struct}} eventRecord : CUDA_EVENT_RECORD_NODE_PARAMS Event record node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.extSemSignal' in found_struct}} extSemSignal : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 External semaphore signal node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.extSemWait' in found_struct}} extSemWait : CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 External semaphore wait node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.alloc' in found_struct}} alloc : CUDA_MEM_ALLOC_NODE_PARAMS_v2 Memory allocation node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.free' in found_struct}} free : CUDA_MEM_FREE_NODE_PARAMS Memory free node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.memOp' in found_struct}} memOp : CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 MemOp node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.conditional' in found_struct}} conditional : CUDA_CONDITIONAL_NODE_PARAMS Conditional node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.reserved2' in found_struct}} reserved2 : long long Reserved bytes. Must be zero. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cydriver.CUgraphNodeParams_st* _val_ptr - cdef cydriver.CUgraphNodeParams_st* _ptr + cdef cydriver.CUgraphNodeParams_st* _pvt_ptr + {{if 'CUgraphNodeParams_st.kernel' in found_struct}} cdef CUDA_KERNEL_NODE_PARAMS_v3 _kernel + {{endif}} + {{if 'CUgraphNodeParams_st.memcpy' in found_struct}} cdef CUDA_MEMCPY_NODE_PARAMS _memcpy + {{endif}} + {{if 'CUgraphNodeParams_st.memset' in found_struct}} cdef CUDA_MEMSET_NODE_PARAMS_v2 _memset + {{endif}} + {{if 'CUgraphNodeParams_st.host' in found_struct}} cdef CUDA_HOST_NODE_PARAMS_v2 _host + {{endif}} + {{if 'CUgraphNodeParams_st.graph' in found_struct}} cdef CUDA_CHILD_GRAPH_NODE_PARAMS _graph + {{endif}} + {{if 'CUgraphNodeParams_st.eventWait' in found_struct}} cdef CUDA_EVENT_WAIT_NODE_PARAMS _eventWait + {{endif}} + {{if 'CUgraphNodeParams_st.eventRecord' in found_struct}} cdef CUDA_EVENT_RECORD_NODE_PARAMS _eventRecord + {{endif}} + {{if 'CUgraphNodeParams_st.extSemSignal' in found_struct}} cdef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 _extSemSignal + {{endif}} + {{if 'CUgraphNodeParams_st.extSemWait' in found_struct}} cdef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 _extSemWait + {{endif}} + {{if 'CUgraphNodeParams_st.alloc' in found_struct}} cdef CUDA_MEM_ALLOC_NODE_PARAMS_v2 _alloc + {{endif}} + {{if 'CUgraphNodeParams_st.free' in found_struct}} cdef CUDA_MEM_FREE_NODE_PARAMS _free + {{endif}} + {{if 'CUgraphNodeParams_st.memOp' in found_struct}} cdef CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 _memOp + {{endif}} + {{if 'CUgraphNodeParams_st.conditional' in found_struct}} cdef CUDA_CONDITIONAL_NODE_PARAMS _conditional + {{endif}} {{endif}} -{{if 'struct CUdevSmResource_st' in found_types}} +{{if 'CUcheckpointLockArgs_st' in found_struct}} -cdef class CUdevSmResource_st: +cdef class CUcheckpointLockArgs_st: """ + CUDA checkpoint optional lock arguments + Attributes ---------- - smCount : unsigned int - The amount of streaming multiprocessors available in this resource. - This is an output parameter only, do not write to this field. + {{if 'CUcheckpointLockArgs_st.timeoutMs' in found_struct}} + timeoutMs : unsigned int + Timeout in milliseconds to attempt to lock the process, 0 indicates + no timeout + {{endif}} + {{if 'CUcheckpointLockArgs_st.reserved0' in found_struct}} + reserved0 : unsigned int + Reserved for future use, must be zero + {{endif}} + {{if 'CUcheckpointLockArgs_st.reserved1' in found_struct}} + reserved1 : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUdevSmResource_st __val - cdef cydriver.CUdevSmResource_st* _ptr + cdef cydriver.CUcheckpointLockArgs_st _pvt_val + cdef cydriver.CUcheckpointLockArgs_st* _pvt_ptr {{endif}} -{{if 'struct CUdevResource_st' in found_types}} +{{if 'CUcheckpointCheckpointArgs_st' in found_struct}} -cdef class CUdevResource_st: +cdef class CUcheckpointCheckpointArgs_st: """ + CUDA checkpoint optional checkpoint arguments + Attributes ---------- - type : CUdevResourceType - Type of resource, dictates which union field was last set - _internal_padding : bytes - - sm : CUdevSmResource - Resource corresponding to CU_DEV_RESOURCE_TYPE_SM ``. type. - _oversize : bytes - + {{if 'CUcheckpointCheckpointArgs_st.reserved' in found_struct}} + reserved : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUdevResource_st* _val_ptr - cdef cydriver.CUdevResource_st* _ptr - cdef CUdevSmResource _sm + cdef cydriver.CUcheckpointCheckpointArgs_st _pvt_val + cdef cydriver.CUcheckpointCheckpointArgs_st* _pvt_ptr {{endif}} -{{if True}} +{{if 'CUcheckpointRestoreArgs_st' in found_struct}} -cdef class anon_union14: +cdef class CUcheckpointRestoreArgs_st: """ + CUDA checkpoint optional restore arguments + Attributes ---------- - pArray : List[CUarray] - - pPitch : List[Any] - + {{if 'CUcheckpointRestoreArgs_st.reserved' in found_struct}} + reserved : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUeglFrame_st* _ptr + cdef cydriver.CUcheckpointRestoreArgs_st _pvt_val + cdef cydriver.CUcheckpointRestoreArgs_st* _pvt_ptr {{endif}} -{{if True}} +{{if 'CUcheckpointUnlockArgs_st' in found_struct}} -cdef class CUeglFrame_st: +cdef class CUcheckpointUnlockArgs_st: """ - CUDA EGLFrame structure Descriptor - structure defining one frame - of EGL. Each frame may contain one or more planes depending on - whether the surface * is Multiplanar or not. + CUDA checkpoint optional unlock arguments Attributes ---------- - frame : anon_union14 - - width : unsigned int - Width of first plane - height : unsigned int - Height of first plane - depth : unsigned int - Depth of first plane - pitch : unsigned int - Pitch of first plane - planeCount : unsigned int - Number of planes - numChannels : unsigned int - Number of channels for the plane - frameType : CUeglFrameType - Array or Pitch - eglColorFormat : CUeglColorFormat - CUDA EGL Color Format - cuFormat : CUarray_format - CUDA Array Format + {{if 'CUcheckpointUnlockArgs_st.reserved' in found_struct}} + reserved : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUeglFrame_st* _val_ptr - cdef cydriver.CUeglFrame_st* _ptr - cdef anon_union14 _frame + cdef cydriver.CUcheckpointUnlockArgs_st _pvt_val + cdef cydriver.CUcheckpointUnlockArgs_st* _pvt_ptr {{endif}} -{{if 'CUdeviceptr' in found_types}} +{{if 'CUmemcpyAttributes_st' in found_struct}} -cdef class CUdeviceptr: +cdef class CUmemcpyAttributes_st: """ + Attributes specific to copies within a batch. For more details on + usage see cuMemcpyBatchAsync. - CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform. + Attributes + ---------- + {{if 'CUmemcpyAttributes_st.srcAccessOrder' in found_struct}} + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + {{endif}} + {{if 'CUmemcpyAttributes_st.srcLocHint' in found_struct}} + srcLocHint : CUmemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'CUmemcpyAttributes_st.dstLocHint' in found_struct}} + dstLocHint : CUmemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'CUmemcpyAttributes_st.flags' in found_struct}} + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUdeviceptr __val - cdef cydriver.CUdeviceptr* _ptr + cdef cydriver.CUmemcpyAttributes_st _pvt_val + cdef cydriver.CUmemcpyAttributes_st* _pvt_ptr + {{if 'CUmemcpyAttributes_st.srcLocHint' in found_struct}} + cdef CUmemLocation _srcLocHint + {{endif}} + {{if 'CUmemcpyAttributes_st.dstLocHint' in found_struct}} + cdef CUmemLocation _dstLocHint + {{endif}} {{endif}} -{{if 'CUdevice' in found_types}} +{{if 'CUoffset3D_st' in found_struct}} -cdef class CUdevice: +cdef class CUoffset3D_st: """ + Struct representing offset into a CUarray in elements - CUDA device - - Methods - ------- - getPtr() - Get memory address of class instance + Attributes + ---------- + {{if 'CUoffset3D_st.x' in found_struct}} + x : size_t - """ - cdef cydriver.CUdevice __val - cdef cydriver.CUdevice* _ptr -{{endif}} -{{if 'CUtexObject' in found_types}} + {{endif}} + {{if 'CUoffset3D_st.y' in found_struct}} + y : size_t -cdef class CUtexObject: - """ + {{endif}} + {{if 'CUoffset3D_st.z' in found_struct}} + z : size_t - An opaque value that represents a CUDA texture object + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cydriver.CUtexObject __val - cdef cydriver.CUtexObject* _ptr + cdef cydriver.CUoffset3D_st _pvt_val + cdef cydriver.CUoffset3D_st* _pvt_ptr {{endif}} -{{if 'CUsurfObject' in found_types}} +{{if 'CUextent3D_st' in found_struct}} + +cdef class CUextent3D_st: + """ + Struct representing width/height/depth of a CUarray in elements + + Attributes + ---------- + {{if 'CUextent3D_st.width' in found_struct}} + width : size_t + + {{endif}} + {{if 'CUextent3D_st.height' in found_struct}} + height : size_t + + {{endif}} + {{if 'CUextent3D_st.depth' in found_struct}} + depth : size_t + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUextent3D_st _pvt_val + cdef cydriver.CUextent3D_st* _pvt_ptr +{{endif}} +{{if 'CUmemcpy3DOperand_st.op.ptr' in found_struct}} + +cdef class anon_struct23: + """ + Attributes + ---------- + {{if 'CUmemcpy3DOperand_st.op.ptr.ptr' in found_struct}} + ptr : CUdeviceptr + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.rowLength' in found_struct}} + rowLength : size_t + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.layerHeight' in found_struct}} + layerHeight : size_t + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.locHint' in found_struct}} + locHint : CUmemLocation + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + {{if 'CUmemcpy3DOperand_st.op.ptr.ptr' in found_struct}} + cdef CUdeviceptr _ptr + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.locHint' in found_struct}} + cdef CUmemLocation _locHint + {{endif}} +{{endif}} +{{if 'CUmemcpy3DOperand_st.op.array' in found_struct}} + +cdef class anon_struct24: + """ + Attributes + ---------- + {{if 'CUmemcpy3DOperand_st.op.array.array' in found_struct}} + array : CUarray + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array.offset' in found_struct}} + offset : CUoffset3D + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + {{if 'CUmemcpy3DOperand_st.op.array.array' in found_struct}} + cdef CUarray _array + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array.offset' in found_struct}} + cdef CUoffset3D _offset + {{endif}} +{{endif}} +{{if 'CUmemcpy3DOperand_st.op' in found_struct}} + +cdef class anon_union13: + """ + Attributes + ---------- + {{if 'CUmemcpy3DOperand_st.op.ptr' in found_struct}} + ptr : anon_struct23 + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array' in found_struct}} + array : anon_struct24 + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + {{if 'CUmemcpy3DOperand_st.op.ptr' in found_struct}} + cdef anon_struct23 _ptr + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array' in found_struct}} + cdef anon_struct24 _array + {{endif}} +{{endif}} +{{if 'CUmemcpy3DOperand_st' in found_struct}} + +cdef class CUmemcpy3DOperand_st: + """ + Struct representing an operand for copy with cuMemcpy3DBatchAsync + + Attributes + ---------- + {{if 'CUmemcpy3DOperand_st.type' in found_struct}} + type : CUmemcpy3DOperandType + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op' in found_struct}} + op : anon_union13 + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemcpy3DOperand_st* _val_ptr + cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr + {{if 'CUmemcpy3DOperand_st.op' in found_struct}} + cdef anon_union13 _op + {{endif}} +{{endif}} +{{if 'CUDA_MEMCPY3D_BATCH_OP_st' in found_struct}} + +cdef class CUDA_MEMCPY3D_BATCH_OP_st: + """ + Attributes + ---------- + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.src' in found_struct}} + src : CUmemcpy3DOperand + Source memcpy operand. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.dst' in found_struct}} + dst : CUmemcpy3DOperand + Destination memcpy operand. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.extent' in found_struct}} + extent : CUextent3D + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.srcAccessOrder' in found_struct}} + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.flags' in found_struct}} + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUDA_MEMCPY3D_BATCH_OP_st _pvt_val + cdef cydriver.CUDA_MEMCPY3D_BATCH_OP_st* _pvt_ptr + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.src' in found_struct}} + cdef CUmemcpy3DOperand _src + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.dst' in found_struct}} + cdef CUmemcpy3DOperand _dst + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.extent' in found_struct}} + cdef CUextent3D _extent + {{endif}} +{{endif}} +{{if 'CUmemDecompressParams_st' in found_struct}} + +cdef class CUmemDecompressParams_st: + """ + Structure describing the parameters that compose a single + decompression operation. + + Attributes + ---------- + {{if 'CUmemDecompressParams_st.srcNumBytes' in found_struct}} + srcNumBytes : size_t + The number of bytes to be read and decompressed from + CUmemDecompressParams_st.src. + {{endif}} + {{if 'CUmemDecompressParams_st.dstNumBytes' in found_struct}} + dstNumBytes : size_t + The number of bytes that the decompression operation will be + expected to write to CUmemDecompressParams_st.dst. This value is + optional; if present, it may be used by the CUDA driver as a + heuristic for scheduling the individual decompression operations. + {{endif}} + {{if 'CUmemDecompressParams_st.dstActBytes' in found_struct}} + dstActBytes : cuuint32_t + After the decompression operation has completed, the actual number + of bytes written to CUmemDecompressParams.dst will be recorded as a + 32-bit unsigned integer in the memory at this address. + {{endif}} + {{if 'CUmemDecompressParams_st.src' in found_struct}} + src : Any + Pointer to a buffer of at least + CUmemDecompressParams_st.srcNumBytes compressed bytes. + {{endif}} + {{if 'CUmemDecompressParams_st.dst' in found_struct}} + dst : Any + Pointer to a buffer where the decompressed data will be written. + The number of bytes written to this location will be recorded in + the memory pointed to by CUmemDecompressParams_st.dstActBytes + {{endif}} + {{if 'CUmemDecompressParams_st.algo' in found_struct}} + algo : CUmemDecompressAlgorithm + The decompression algorithm to use. + {{endif}} + {{if 'CUmemDecompressParams_st.padding' in found_struct}} + padding : bytes + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemDecompressParams_st _pvt_val + cdef cydriver.CUmemDecompressParams_st* _pvt_ptr +{{endif}} +{{if 'CUdevSmResource_st' in found_struct}} + +cdef class CUdevSmResource_st: + """ + Attributes + ---------- + {{if 'CUdevSmResource_st.smCount' in found_struct}} + smCount : unsigned int + The amount of streaming multiprocessors available in this resource. + This is an output parameter only, do not write to this field. + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUdevSmResource_st _pvt_val + cdef cydriver.CUdevSmResource_st* _pvt_ptr +{{endif}} +{{if 'CUdevResource_st' in found_struct}} + +cdef class CUdevResource_st: + """ + Attributes + ---------- + {{if 'CUdevResource_st.type' in found_struct}} + type : CUdevResourceType + Type of resource, dictates which union field was last set + {{endif}} + {{if 'CUdevResource_st._internal_padding' in found_struct}} + _internal_padding : bytes + + {{endif}} + {{if 'CUdevResource_st.sm' in found_struct}} + sm : CUdevSmResource + Resource corresponding to CU_DEV_RESOURCE_TYPE_SM ``. type. + {{endif}} + {{if 'CUdevResource_st._oversize' in found_struct}} + _oversize : bytes + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUdevResource_st* _val_ptr + cdef cydriver.CUdevResource_st* _pvt_ptr + {{if 'CUdevResource_st.sm' in found_struct}} + cdef CUdevSmResource _sm + {{endif}} +{{endif}} +{{if True}} + +cdef class anon_union15: + """ + Attributes + ---------- + {{if True}} + pArray : List[CUarray] + + {{endif}} + {{if True}} + pPitch : List[Any] + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUeglFrame_st* _pvt_ptr +{{endif}} +{{if True}} + +cdef class CUeglFrame_st: + """ + CUDA EGLFrame structure Descriptor - structure defining one frame + of EGL. Each frame may contain one or more planes depending on + whether the surface * is Multiplanar or not. + + Attributes + ---------- + {{if True}} + frame : anon_union15 + + {{endif}} + {{if True}} + width : unsigned int + Width of first plane + {{endif}} + {{if True}} + height : unsigned int + Height of first plane + {{endif}} + {{if True}} + depth : unsigned int + Depth of first plane + {{endif}} + {{if True}} + pitch : unsigned int + Pitch of first plane + {{endif}} + {{if True}} + planeCount : unsigned int + Number of planes + {{endif}} + {{if True}} + numChannels : unsigned int + Number of channels for the plane + {{endif}} + {{if True}} + frameType : CUeglFrameType + Array or Pitch + {{endif}} + {{if True}} + eglColorFormat : CUeglColorFormat + CUDA EGL Color Format + {{endif}} + {{if True}} + cuFormat : CUarray_format + CUDA Array Format + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUeglFrame_st* _val_ptr + cdef cydriver.CUeglFrame_st* _pvt_ptr + {{if True}} + cdef anon_union15 _frame + {{endif}} +{{endif}} +{{if 'CUdeviceptr' in found_types}} + +cdef class CUdeviceptr: + """ + + CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform. + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdeviceptr _pvt_val + cdef cydriver.CUdeviceptr* _pvt_ptr +{{endif}} +{{if 'CUdevice' in found_types}} + +cdef class CUdevice: + """ + + CUDA device + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUdevice _pvt_val + cdef cydriver.CUdevice* _pvt_ptr +{{endif}} +{{if 'CUtexObject' in found_types}} + +cdef class CUtexObject: + """ + + An opaque value that represents a CUDA texture object + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUtexObject _pvt_val + cdef cydriver.CUtexObject* _pvt_ptr +{{endif}} +{{if 'CUsurfObject' in found_types}} cdef class CUsurfObject: """ @@ -3691,8 +5279,8 @@ cdef class CUsurfObject: Get memory address of class instance """ - cdef cydriver.CUsurfObject __val - cdef cydriver.CUsurfObject* _ptr + cdef cydriver.CUsurfObject _pvt_val + cdef cydriver.CUsurfObject* _pvt_ptr {{endif}} {{if 'CUgraphConditionalHandle' in found_types}} @@ -3705,8 +5293,8 @@ cdef class CUgraphConditionalHandle: Get memory address of class instance """ - cdef cydriver.CUgraphConditionalHandle __val - cdef cydriver.CUgraphConditionalHandle* _ptr + cdef cydriver.CUgraphConditionalHandle _pvt_val + cdef cydriver.CUgraphConditionalHandle* _pvt_ptr {{endif}} {{if 'CUuuid' in found_types}} @@ -3714,14 +5302,15 @@ cdef class CUuuid(CUuuid_st): """ Attributes ---------- + {{if 'CUuuid_st.bytes' in found_struct}} bytes : bytes < CUDA definition of UUID + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3736,14 +5325,15 @@ cdef class CUmemFabricHandle_v1(CUmemFabricHandle_st): Attributes ---------- + {{if 'CUmemFabricHandle_st.data' in found_struct}} data : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3758,14 +5348,15 @@ cdef class CUmemFabricHandle(CUmemFabricHandle_v1): Attributes ---------- + {{if 'CUmemFabricHandle_st.data' in found_struct}} data : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3777,14 +5368,15 @@ cdef class CUipcEventHandle_v1(CUipcEventHandle_st): Attributes ---------- + {{if 'CUipcEventHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3796,14 +5388,15 @@ cdef class CUipcEventHandle(CUipcEventHandle_v1): Attributes ---------- + {{if 'CUipcEventHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3815,14 +5408,15 @@ cdef class CUipcMemHandle_v1(CUipcMemHandle_st): Attributes ---------- + {{if 'CUipcMemHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3834,14 +5428,15 @@ cdef class CUipcMemHandle(CUipcMemHandle_v1): Attributes ---------- + {{if 'CUipcMemHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3853,24 +5448,35 @@ cdef class CUstreamBatchMemOpParams_v1(CUstreamBatchMemOpParams_union): Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.operation' in found_struct}} operation : CUstreamBatchMemOpType + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue' in found_struct}} waitValue : CUstreamMemOpWaitValueParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue' in found_struct}} writeValue : CUstreamMemOpWriteValueParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites' in found_struct}} flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier' in found_struct}} memoryBarrier : CUstreamMemOpMemoryBarrierParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.pad' in found_struct}} pad : List[cuuint64_t] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3882,24 +5488,35 @@ cdef class CUstreamBatchMemOpParams(CUstreamBatchMemOpParams_v1): Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.operation' in found_struct}} operation : CUstreamBatchMemOpType + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue' in found_struct}} waitValue : CUstreamMemOpWaitValueParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue' in found_struct}} writeValue : CUstreamMemOpWriteValueParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites' in found_struct}} flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier' in found_struct}} memoryBarrier : CUstreamMemOpMemoryBarrierParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.pad' in found_struct}} pad : List[cuuint64_t] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3909,20 +5526,27 @@ cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st) """ Attributes ---------- + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.ctx' in found_struct}} ctx : CUcontext + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.count' in found_struct}} count : unsigned int + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.paramArray' in found_struct}} paramArray : CUstreamBatchMemOpParams + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.flags' in found_struct}} flags : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3932,20 +5556,27 @@ cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1): """ Attributes ---------- + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.ctx' in found_struct}} ctx : CUcontext + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.count' in found_struct}} count : unsigned int + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.paramArray' in found_struct}} paramArray : CUstreamBatchMemOpParams + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.flags' in found_struct}} flags : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3957,20 +5588,27 @@ cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2(CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st) Attributes ---------- + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.ctx' in found_struct}} ctx : CUcontext Context to use for the operations. + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.count' in found_struct}} count : unsigned int Number of operations in paramArray. + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.paramArray' in found_struct}} paramArray : CUstreamBatchMemOpParams Array of batch memory operations. + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.flags' in found_struct}} flags : unsigned int Flags to control the node. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3982,16 +5620,19 @@ cdef class CUasyncNotificationInfo(CUasyncNotificationInfo_st): Attributes ---------- + {{if 'CUasyncNotificationInfo_st.type' in found_struct}} type : CUasyncNotificationType + {{endif}} + {{if 'CUasyncNotificationInfo_st.info' in found_struct}} info : anon_union2 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4003,32 +5644,51 @@ cdef class CUdevprop_v1(CUdevprop_st): Attributes ---------- + {{if 'CUdevprop_st.maxThreadsPerBlock' in found_struct}} maxThreadsPerBlock : int Maximum number of threads per block + {{endif}} + {{if 'CUdevprop_st.maxThreadsDim' in found_struct}} maxThreadsDim : List[int] Maximum size of each dimension of a block + {{endif}} + {{if 'CUdevprop_st.maxGridSize' in found_struct}} maxGridSize : List[int] Maximum size of each dimension of a grid + {{endif}} + {{if 'CUdevprop_st.sharedMemPerBlock' in found_struct}} sharedMemPerBlock : int Shared memory available per block in bytes + {{endif}} + {{if 'CUdevprop_st.totalConstantMemory' in found_struct}} totalConstantMemory : int Constant memory available on device in bytes + {{endif}} + {{if 'CUdevprop_st.SIMDWidth' in found_struct}} SIMDWidth : int Warp size in threads + {{endif}} + {{if 'CUdevprop_st.memPitch' in found_struct}} memPitch : int Maximum pitch in bytes allowed by memory copies + {{endif}} + {{if 'CUdevprop_st.regsPerBlock' in found_struct}} regsPerBlock : int 32-bit registers available per block + {{endif}} + {{if 'CUdevprop_st.clockRate' in found_struct}} clockRate : int Clock frequency in kilohertz + {{endif}} + {{if 'CUdevprop_st.textureAlign' in found_struct}} textureAlign : int Alignment requirement for textures + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4040,32 +5700,51 @@ cdef class CUdevprop(CUdevprop_v1): Attributes ---------- + {{if 'CUdevprop_st.maxThreadsPerBlock' in found_struct}} maxThreadsPerBlock : int Maximum number of threads per block + {{endif}} + {{if 'CUdevprop_st.maxThreadsDim' in found_struct}} maxThreadsDim : List[int] Maximum size of each dimension of a block + {{endif}} + {{if 'CUdevprop_st.maxGridSize' in found_struct}} maxGridSize : List[int] Maximum size of each dimension of a grid + {{endif}} + {{if 'CUdevprop_st.sharedMemPerBlock' in found_struct}} sharedMemPerBlock : int Shared memory available per block in bytes + {{endif}} + {{if 'CUdevprop_st.totalConstantMemory' in found_struct}} totalConstantMemory : int Constant memory available on device in bytes + {{endif}} + {{if 'CUdevprop_st.SIMDWidth' in found_struct}} SIMDWidth : int Warp size in threads + {{endif}} + {{if 'CUdevprop_st.memPitch' in found_struct}} memPitch : int Maximum pitch in bytes allowed by memory copies + {{endif}} + {{if 'CUdevprop_st.regsPerBlock' in found_struct}} regsPerBlock : int 32-bit registers available per block + {{endif}} + {{if 'CUdevprop_st.clockRate' in found_struct}} clockRate : int Clock frequency in kilohertz + {{endif}} + {{if 'CUdevprop_st.textureAlign' in found_struct}} textureAlign : int Alignment requirement for textures + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4086,25 +5765,34 @@ cdef class CUaccessPolicyWindow_v1(CUaccessPolicyWindow_st): Attributes ---------- + {{if 'CUaccessPolicyWindow_st.base_ptr' in found_struct}} base_ptr : Any Starting address of the access policy window. CUDA driver may align it. + {{endif}} + {{if 'CUaccessPolicyWindow_st.num_bytes' in found_struct}} num_bytes : size_t Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment. + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitRatio' in found_struct}} hitRatio : float hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp. + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitProp' in found_struct}} hitProp : CUaccessProperty CUaccessProperty set for hit. + {{endif}} + {{if 'CUaccessPolicyWindow_st.missProp' in found_struct}} missProp : CUaccessProperty CUaccessProperty set for miss. Must be either NORMAL or STREAMING + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4125,25 +5813,34 @@ cdef class CUaccessPolicyWindow(CUaccessPolicyWindow_v1): Attributes ---------- + {{if 'CUaccessPolicyWindow_st.base_ptr' in found_struct}} base_ptr : Any Starting address of the access policy window. CUDA driver may align it. + {{endif}} + {{if 'CUaccessPolicyWindow_st.num_bytes' in found_struct}} num_bytes : size_t Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment. + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitRatio' in found_struct}} hitRatio : float hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp. + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitProp' in found_struct}} hitProp : CUaccessProperty CUaccessProperty set for hit. + {{endif}} + {{if 'CUaccessPolicyWindow_st.missProp' in found_struct}} missProp : CUaccessProperty CUaccessProperty set for miss. Must be either NORMAL or STREAMING + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4155,32 +5852,51 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v1(CUDA_KERNEL_NODE_PARAMS_st): Attributes ---------- + {{if 'CUDA_KERNEL_NODE_PARAMS_st.func' in found_struct}} func : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.extra' in found_struct}} extra : Any Extra options + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4192,38 +5908,61 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v2(CUDA_KERNEL_NODE_PARAMS_v2_st): Attributes ---------- + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.func' in found_struct}} func : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.extra' in found_struct}} extra : Any Extra options + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kern' in found_struct}} kern : CUkernel Kernel to launch, will only be referenced if func is NULL + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.ctx' in found_struct}} ctx : CUcontext Context for the kernel task to run in. The value NULL will indicate the current context should be used by the api. This field is ignored if func is set. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4235,38 +5974,61 @@ cdef class CUDA_KERNEL_NODE_PARAMS(CUDA_KERNEL_NODE_PARAMS_v2): Attributes ---------- + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.func' in found_struct}} func : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.extra' in found_struct}} extra : Any Extra options + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kern' in found_struct}} kern : CUkernel Kernel to launch, will only be referenced if func is NULL + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.ctx' in found_struct}} ctx : CUcontext Context for the kernel task to run in. The value NULL will indicate the current context should be used by the api. This field is ignored if func is set. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4278,38 +6040,61 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v3(CUDA_KERNEL_NODE_PARAMS_v3_st): Attributes ---------- + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.func' in found_struct}} func : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.extra' in found_struct}} extra : Any Extra options + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kern' in found_struct}} kern : CUkernel Kernel to launch, will only be referenced if func is NULL + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.ctx' in found_struct}} ctx : CUcontext Context for the kernel task to run in. The value NULL will indicate the current context should be used by the api. This field is ignored if func is set. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4321,24 +6106,35 @@ cdef class CUDA_MEMSET_NODE_PARAMS_v1(CUDA_MEMSET_NODE_PARAMS_st): Attributes ---------- + {{if 'CUDA_MEMSET_NODE_PARAMS_st.dst' in found_struct}} dst : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.pitch' in found_struct}} pitch : size_t Pitch of destination device pointer. Unused if height is 1 + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.value' in found_struct}} value : unsigned int Value to be set + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.elementSize' in found_struct}} elementSize : unsigned int Size of each element in bytes. Must be 1, 2, or 4. + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.width' in found_struct}} width : size_t Width of the row in elements + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.height' in found_struct}} height : size_t Number of rows + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4350,24 +6146,35 @@ cdef class CUDA_MEMSET_NODE_PARAMS(CUDA_MEMSET_NODE_PARAMS_v1): Attributes ---------- + {{if 'CUDA_MEMSET_NODE_PARAMS_st.dst' in found_struct}} dst : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.pitch' in found_struct}} pitch : size_t Pitch of destination device pointer. Unused if height is 1 + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.value' in found_struct}} value : unsigned int Value to be set + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.elementSize' in found_struct}} elementSize : unsigned int Size of each element in bytes. Must be 1, 2, or 4. + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.width' in found_struct}} width : size_t Width of the row in elements + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.height' in found_struct}} height : size_t Number of rows + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4379,26 +6186,39 @@ cdef class CUDA_MEMSET_NODE_PARAMS_v2(CUDA_MEMSET_NODE_PARAMS_v2_st): Attributes ---------- + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.dst' in found_struct}} dst : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.pitch' in found_struct}} pitch : size_t Pitch of destination device pointer. Unused if height is 1 + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.value' in found_struct}} value : unsigned int Value to be set + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.elementSize' in found_struct}} elementSize : unsigned int Size of each element in bytes. Must be 1, 2, or 4. + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.width' in found_struct}} width : size_t Width of the row in elements + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.height' in found_struct}} height : size_t Number of rows + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.ctx' in found_struct}} ctx : CUcontext Context on which to run the node + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4410,16 +6230,19 @@ cdef class CUDA_HOST_NODE_PARAMS_v1(CUDA_HOST_NODE_PARAMS_st): Attributes ---------- + {{if 'CUDA_HOST_NODE_PARAMS_st.fn' in found_struct}} fn : CUhostFn The function to call when the node executes + {{endif}} + {{if 'CUDA_HOST_NODE_PARAMS_st.userData' in found_struct}} userData : Any Argument to pass to the function + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4431,16 +6254,19 @@ cdef class CUDA_HOST_NODE_PARAMS(CUDA_HOST_NODE_PARAMS_v1): Attributes ---------- + {{if 'CUDA_HOST_NODE_PARAMS_st.fn' in found_struct}} fn : CUhostFn The function to call when the node executes + {{endif}} + {{if 'CUDA_HOST_NODE_PARAMS_st.userData' in found_struct}} userData : Any Argument to pass to the function + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4452,16 +6278,19 @@ cdef class CUDA_HOST_NODE_PARAMS_v2(CUDA_HOST_NODE_PARAMS_v2_st): Attributes ---------- + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.fn' in found_struct}} fn : CUhostFn The function to call when the node executes + {{endif}} + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.userData' in found_struct}} userData : Any Argument to pass to the function + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4476,6 +6305,7 @@ cdef class CUgraphEdgeData(CUgraphEdgeData_st): Attributes ---------- + {{if 'CUgraphEdgeData_st.from_port' in found_struct}} from_port : bytes This indicates when the dependency is triggered from the upstream node on the edge. The meaning is specfic to the node type. A value @@ -4486,6 +6316,8 @@ cdef class CUgraphEdgeData(CUgraphEdgeData_st): CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC, or CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER. + {{endif}} + {{if 'CUgraphEdgeData_st.to_port' in found_struct}} to_port : bytes This indicates what portion of the downstream node is dependent on the upstream node or portion thereof (indicated by `from_port`). @@ -4493,19 +6325,23 @@ cdef class CUgraphEdgeData(CUgraphEdgeData_st): means the entirety of the downstream node is dependent on the upstream work. Currently no node types define non-zero ports. Accordingly, this field must be set to zero. + {{endif}} + {{if 'CUgraphEdgeData_st.type' in found_struct}} type : bytes This should be populated with a value from CUgraphDependencyType. (It is typed as char due to compiler-specific layout of bitfields.) See CUgraphDependencyType. + {{endif}} + {{if 'CUgraphEdgeData_st.reserved' in found_struct}} reserved : bytes These bytes are unused and must be zeroed. This ensures compatibility if additional fields are added in the future. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4517,20 +6353,27 @@ cdef class CUDA_GRAPH_INSTANTIATE_PARAMS(CUDA_GRAPH_INSTANTIATE_PARAMS_st): Attributes ---------- + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.flags' in found_struct}} flags : cuuint64_t Instantiation flags + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hUploadStream' in found_struct}} hUploadStream : CUstream Upload stream + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hErrNode_out' in found_struct}} hErrNode_out : CUgraphNode The node which caused instantiation to fail, if any + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.result_out' in found_struct}} result_out : CUgraphInstantiateResult Whether instantiation was successful. If it failed, the reason why + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4548,16 +6391,19 @@ cdef class CUlaunchMemSyncDomainMap(CUlaunchMemSyncDomainMap_st): Attributes ---------- + {{if 'CUlaunchMemSyncDomainMap_st.default_' in found_struct}} default_ : bytes The default domain ID to use for designated kernels + {{endif}} + {{if 'CUlaunchMemSyncDomainMap_st.remote' in found_struct}} remote : bytes The remote domain ID to use for designated kernels + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4569,17 +6415,26 @@ cdef class CUlaunchAttributeValue(CUlaunchAttributeValue_union): Attributes ---------- + {{if 'CUlaunchAttributeValue_union.pad' in found_struct}} pad : bytes + {{endif}} + {{if 'CUlaunchAttributeValue_union.accessPolicyWindow' in found_struct}} accessPolicyWindow : CUaccessPolicyWindow Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + {{endif}} + {{if 'CUlaunchAttributeValue_union.cooperative' in found_struct}} cooperative : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero indicates a cooperative kernel (see cuLaunchCooperativeKernel). + {{endif}} + {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. ::CUsynchronizationPolicy for work queued up in this stream + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION that represents the desired cluster dimensions for the kernel. @@ -4588,13 +6443,19 @@ cdef class CUlaunchAttributeValue(CUlaunchAttributeValue_union): - `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension. - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension. + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster scheduling policy preference for the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed' in found_struct}} programmaticStreamSerializationAllowed : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} programmaticEvent : anon_struct2 Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT with the following fields: - `CUevent` event - Event to fire when @@ -4602,37 +6463,64 @@ cdef class CUlaunchAttributeValue(CUlaunchAttributeValue_union): cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. - `triggerAtBlockStart` - If this is set to non-0, each block launch will automatically trigger the event. + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} launchCompletionEvent : anon_struct3 Value of launch attribute CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following fields: - `CUevent` event - Event to fire when the last block launches - `int` flags; - Event record flags, see cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + {{endif}} + {{if 'CUlaunchAttributeValue_union.priority' in found_struct}} priority : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution priority of the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomainMap' in found_struct}} memSyncDomainMap : CUlaunchMemSyncDomainMap Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. See CUlaunchMemSyncDomainMap. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomain' in found_struct}} memSyncDomain : CUlaunchMemSyncDomain Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. See::CUlaunchMemSyncDomain - deviceUpdatableKernelNode : anon_struct4 + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} + deviceUpdatableKernelNode : anon_struct5 Value of launch attribute CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the following fields: - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable. - `CUgraphDeviceNode` devNode - Returns a handle to pass to the various device-side update functions. + {{endif}} + {{if 'CUlaunchAttributeValue_union.sharedMemCarveout' in found_struct}} sharedMemCarveout : unsigned int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4644,16 +6532,19 @@ cdef class CUlaunchAttribute(CUlaunchAttribute_st): Attributes ---------- + {{if 'CUlaunchAttribute_st.id' in found_struct}} id : CUlaunchAttributeID Attribute to set + {{endif}} + {{if 'CUlaunchAttribute_st.value' in found_struct}} value : CUlaunchAttributeValue Value of the attribute + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4665,32 +6556,51 @@ cdef class CUlaunchConfig(CUlaunchConfig_st): Attributes ---------- + {{if 'CUlaunchConfig_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUlaunchConfig_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUlaunchConfig_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUlaunchConfig_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUlaunchConfig_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUlaunchConfig_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUlaunchConfig_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUlaunchConfig_st.hStream' in found_struct}} hStream : CUstream Stream identifier + {{endif}} + {{if 'CUlaunchConfig_st.attrs' in found_struct}} attrs : CUlaunchAttribute List of attributes; nullable if CUlaunchConfig::numAttrs == 0 + {{endif}} + {{if 'CUlaunchConfig_st.numAttrs' in found_struct}} numAttrs : unsigned int Number of attributes populated in CUlaunchConfig::attrs + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4702,17 +6612,26 @@ cdef class CUkernelNodeAttrValue_v1(CUlaunchAttributeValue): Attributes ---------- + {{if 'CUlaunchAttributeValue_union.pad' in found_struct}} pad : bytes + {{endif}} + {{if 'CUlaunchAttributeValue_union.accessPolicyWindow' in found_struct}} accessPolicyWindow : CUaccessPolicyWindow Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + {{endif}} + {{if 'CUlaunchAttributeValue_union.cooperative' in found_struct}} cooperative : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero indicates a cooperative kernel (see cuLaunchCooperativeKernel). + {{endif}} + {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. ::CUsynchronizationPolicy for work queued up in this stream + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION that represents the desired cluster dimensions for the kernel. @@ -4721,13 +6640,19 @@ cdef class CUkernelNodeAttrValue_v1(CUlaunchAttributeValue): - `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension. - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension. + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster scheduling policy preference for the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed' in found_struct}} programmaticStreamSerializationAllowed : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} programmaticEvent : anon_struct2 Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT with the following fields: - `CUevent` event - Event to fire when @@ -4735,37 +6660,64 @@ cdef class CUkernelNodeAttrValue_v1(CUlaunchAttributeValue): cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. - `triggerAtBlockStart` - If this is set to non-0, each block launch will automatically trigger the event. + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} launchCompletionEvent : anon_struct3 Value of launch attribute CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following fields: - `CUevent` event - Event to fire when the last block launches - `int` flags; - Event record flags, see cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + {{endif}} + {{if 'CUlaunchAttributeValue_union.priority' in found_struct}} priority : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution priority of the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomainMap' in found_struct}} memSyncDomainMap : CUlaunchMemSyncDomainMap Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. See CUlaunchMemSyncDomainMap. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomain' in found_struct}} memSyncDomain : CUlaunchMemSyncDomain Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. See::CUlaunchMemSyncDomain - deviceUpdatableKernelNode : anon_struct4 + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} + deviceUpdatableKernelNode : anon_struct5 Value of launch attribute CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the following fields: - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable. - `CUgraphDeviceNode` devNode - Returns a handle to pass to the various device-side update functions. + {{endif}} + {{if 'CUlaunchAttributeValue_union.sharedMemCarveout' in found_struct}} sharedMemCarveout : unsigned int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4777,17 +6729,26 @@ cdef class CUkernelNodeAttrValue(CUkernelNodeAttrValue_v1): Attributes ---------- + {{if 'CUlaunchAttributeValue_union.pad' in found_struct}} pad : bytes + {{endif}} + {{if 'CUlaunchAttributeValue_union.accessPolicyWindow' in found_struct}} accessPolicyWindow : CUaccessPolicyWindow Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + {{endif}} + {{if 'CUlaunchAttributeValue_union.cooperative' in found_struct}} cooperative : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero indicates a cooperative kernel (see cuLaunchCooperativeKernel). + {{endif}} + {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. ::CUsynchronizationPolicy for work queued up in this stream + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION that represents the desired cluster dimensions for the kernel. @@ -4796,13 +6757,19 @@ cdef class CUkernelNodeAttrValue(CUkernelNodeAttrValue_v1): - `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension. - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension. + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster scheduling policy preference for the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed' in found_struct}} programmaticStreamSerializationAllowed : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} programmaticEvent : anon_struct2 Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT with the following fields: - `CUevent` event - Event to fire when @@ -4810,37 +6777,64 @@ cdef class CUkernelNodeAttrValue(CUkernelNodeAttrValue_v1): cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. - `triggerAtBlockStart` - If this is set to non-0, each block launch will automatically trigger the event. + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} launchCompletionEvent : anon_struct3 Value of launch attribute CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following fields: - `CUevent` event - Event to fire when the last block launches - `int` flags; - Event record flags, see cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + {{endif}} + {{if 'CUlaunchAttributeValue_union.priority' in found_struct}} priority : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution priority of the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomainMap' in found_struct}} memSyncDomainMap : CUlaunchMemSyncDomainMap Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. See CUlaunchMemSyncDomainMap. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomain' in found_struct}} memSyncDomain : CUlaunchMemSyncDomain Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. See::CUlaunchMemSyncDomain - deviceUpdatableKernelNode : anon_struct4 + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} + deviceUpdatableKernelNode : anon_struct5 Value of launch attribute CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the following fields: - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable. - `CUgraphDeviceNode` devNode - Returns a handle to pass to the various device-side update functions. + {{endif}} + {{if 'CUlaunchAttributeValue_union.sharedMemCarveout' in found_struct}} sharedMemCarveout : unsigned int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4852,17 +6846,26 @@ cdef class CUstreamAttrValue_v1(CUlaunchAttributeValue): Attributes ---------- + {{if 'CUlaunchAttributeValue_union.pad' in found_struct}} pad : bytes + {{endif}} + {{if 'CUlaunchAttributeValue_union.accessPolicyWindow' in found_struct}} accessPolicyWindow : CUaccessPolicyWindow Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + {{endif}} + {{if 'CUlaunchAttributeValue_union.cooperative' in found_struct}} cooperative : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero indicates a cooperative kernel (see cuLaunchCooperativeKernel). + {{endif}} + {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. ::CUsynchronizationPolicy for work queued up in this stream + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION that represents the desired cluster dimensions for the kernel. @@ -4871,13 +6874,19 @@ cdef class CUstreamAttrValue_v1(CUlaunchAttributeValue): - `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension. - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension. + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster scheduling policy preference for the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed' in found_struct}} programmaticStreamSerializationAllowed : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} programmaticEvent : anon_struct2 Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT with the following fields: - `CUevent` event - Event to fire when @@ -4885,37 +6894,64 @@ cdef class CUstreamAttrValue_v1(CUlaunchAttributeValue): cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. - `triggerAtBlockStart` - If this is set to non-0, each block launch will automatically trigger the event. + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} launchCompletionEvent : anon_struct3 Value of launch attribute CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following fields: - `CUevent` event - Event to fire when the last block launches - `int` flags; - Event record flags, see cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + {{endif}} + {{if 'CUlaunchAttributeValue_union.priority' in found_struct}} priority : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution priority of the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomainMap' in found_struct}} memSyncDomainMap : CUlaunchMemSyncDomainMap Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. See CUlaunchMemSyncDomainMap. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomain' in found_struct}} memSyncDomain : CUlaunchMemSyncDomain Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. See::CUlaunchMemSyncDomain - deviceUpdatableKernelNode : anon_struct4 + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} + deviceUpdatableKernelNode : anon_struct5 Value of launch attribute CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the following fields: - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable. - `CUgraphDeviceNode` devNode - Returns a handle to pass to the various device-side update functions. + {{endif}} + {{if 'CUlaunchAttributeValue_union.sharedMemCarveout' in found_struct}} sharedMemCarveout : unsigned int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -4927,17 +6963,26 @@ cdef class CUstreamAttrValue(CUstreamAttrValue_v1): Attributes ---------- + {{if 'CUlaunchAttributeValue_union.pad' in found_struct}} pad : bytes + {{endif}} + {{if 'CUlaunchAttributeValue_union.accessPolicyWindow' in found_struct}} accessPolicyWindow : CUaccessPolicyWindow Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + {{endif}} + {{if 'CUlaunchAttributeValue_union.cooperative' in found_struct}} cooperative : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero indicates a cooperative kernel (see cuLaunchCooperativeKernel). + {{endif}} + {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. ::CUsynchronizationPolicy for work queued up in this stream + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION that represents the desired cluster dimensions for the kernel. @@ -4946,13 +6991,19 @@ cdef class CUstreamAttrValue(CUstreamAttrValue_v1): - `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension. - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension. + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster scheduling policy preference for the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed' in found_struct}} programmaticStreamSerializationAllowed : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} programmaticEvent : anon_struct2 Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT with the following fields: - `CUevent` event - Event to fire when @@ -4960,37 +7011,64 @@ cdef class CUstreamAttrValue(CUstreamAttrValue_v1): cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. - `triggerAtBlockStart` - If this is set to non-0, each block launch will automatically trigger the event. + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} launchCompletionEvent : anon_struct3 Value of launch attribute CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following fields: - `CUevent` event - Event to fire when the last block launches - `int` flags; - Event record flags, see cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + {{endif}} + {{if 'CUlaunchAttributeValue_union.priority' in found_struct}} priority : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution priority of the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomainMap' in found_struct}} memSyncDomainMap : CUlaunchMemSyncDomainMap Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. See CUlaunchMemSyncDomainMap. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomain' in found_struct}} memSyncDomain : CUlaunchMemSyncDomain Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. See::CUlaunchMemSyncDomain - deviceUpdatableKernelNode : anon_struct4 + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} + deviceUpdatableKernelNode : anon_struct5 Value of launch attribute CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the following fields: - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable. - `CUgraphDeviceNode` devNode - Returns a handle to pass to the various device-side update functions. + {{endif}} + {{if 'CUlaunchAttributeValue_union.sharedMemCarveout' in found_struct}} sharedMemCarveout : unsigned int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5002,14 +7080,15 @@ cdef class CUexecAffinitySmCount_v1(CUexecAffinitySmCount_st): Attributes ---------- + {{if 'CUexecAffinitySmCount_st.val' in found_struct}} val : unsigned int The number of SMs the context is limited to use. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5021,14 +7100,15 @@ cdef class CUexecAffinitySmCount(CUexecAffinitySmCount_v1): Attributes ---------- + {{if 'CUexecAffinitySmCount_st.val' in found_struct}} val : unsigned int The number of SMs the context is limited to use. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5040,16 +7120,19 @@ cdef class CUexecAffinityParam_v1(CUexecAffinityParam_st): Attributes ---------- + {{if 'CUexecAffinityParam_st.type' in found_struct}} type : CUexecAffinityType + {{endif}} + {{if 'CUexecAffinityParam_st.param' in found_struct}} param : anon_union3 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5061,16 +7144,19 @@ cdef class CUexecAffinityParam(CUexecAffinityParam_v1): Attributes ---------- + {{if 'CUexecAffinityParam_st.type' in found_struct}} type : CUexecAffinityType + {{endif}} + {{if 'CUexecAffinityParam_st.param' in found_struct}} param : anon_union3 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5082,16 +7168,19 @@ cdef class CUctxCigParam(CUctxCigParam_st): Attributes ---------- + {{if 'CUctxCigParam_st.sharedDataType' in found_struct}} sharedDataType : CUcigDataType + {{endif}} + {{if 'CUctxCigParam_st.sharedData' in found_struct}} sharedData : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5104,18 +7193,23 @@ cdef class CUctxCreateParams(CUctxCreateParams_st): Attributes ---------- + {{if 'CUctxCreateParams_st.execAffinityParams' in found_struct}} execAffinityParams : CUexecAffinityParam + {{endif}} + {{if 'CUctxCreateParams_st.numExecAffinityParams' in found_struct}} numExecAffinityParams : int + {{endif}} + {{if 'CUctxCreateParams_st.cigParams' in found_struct}} cigParams : CUctxCigParam + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5125,20 +7219,27 @@ cdef class CUlibraryHostUniversalFunctionAndDataTable(CUlibraryHostUniversalFunc """ Attributes ---------- + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.functionTable' in found_struct}} functionTable : Any + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.functionWindowSize' in found_struct}} functionWindowSize : size_t + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.dataTable' in found_struct}} dataTable : Any + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.dataWindowSize' in found_struct}} dataWindowSize : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5150,44 +7251,75 @@ cdef class CUDA_MEMCPY2D_v2(CUDA_MEMCPY2D_st): Attributes ---------- + {{if 'CUDA_MEMCPY2D_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 2D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.Height' in found_struct}} Height : size_t Height of 2D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5199,44 +7331,75 @@ cdef class CUDA_MEMCPY2D(CUDA_MEMCPY2D_v2): Attributes ---------- + {{if 'CUDA_MEMCPY2D_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 2D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.Height' in found_struct}} Height : size_t Height of 2D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5248,63 +7411,112 @@ cdef class CUDA_MEMCPY3D_v2(CUDA_MEMCPY3D_st): Attributes ---------- + {{if 'CUDA_MEMCPY3D_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcZ' in found_struct}} srcZ : size_t Source Z + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcLOD' in found_struct}} srcLOD : size_t Source LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved0' in found_struct}} reserved0 : Any Must be NULL + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHeight' in found_struct}} srcHeight : size_t Source height (ignored when src is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstZ' in found_struct}} dstZ : size_t Destination Z + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstLOD' in found_struct}} dstLOD : size_t Destination LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved1' in found_struct}} reserved1 : Any Must be NULL + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHeight' in found_struct}} dstHeight : size_t Destination height (ignored when dst is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 3D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Height' in found_struct}} Height : size_t Height of 3D memory copy + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Depth' in found_struct}} Depth : size_t Depth of 3D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5316,63 +7528,112 @@ cdef class CUDA_MEMCPY3D(CUDA_MEMCPY3D_v2): Attributes ---------- + {{if 'CUDA_MEMCPY3D_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcZ' in found_struct}} srcZ : size_t Source Z + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcLOD' in found_struct}} srcLOD : size_t Source LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved0' in found_struct}} reserved0 : Any Must be NULL + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHeight' in found_struct}} srcHeight : size_t Source height (ignored when src is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstZ' in found_struct}} dstZ : size_t Destination Z + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstLOD' in found_struct}} dstLOD : size_t Destination LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved1' in found_struct}} reserved1 : Any Must be NULL + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHeight' in found_struct}} dstHeight : size_t Destination height (ignored when dst is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 3D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Height' in found_struct}} Height : size_t Height of 3D memory copy + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Depth' in found_struct}} Depth : size_t Depth of 3D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5384,64 +7645,113 @@ cdef class CUDA_MEMCPY3D_PEER_v1(CUDA_MEMCPY3D_PEER_st): Attributes ---------- + {{if 'CUDA_MEMCPY3D_PEER_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcZ' in found_struct}} srcZ : size_t Source Z + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcLOD' in found_struct}} srcLOD : size_t Source LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcContext' in found_struct}} srcContext : CUcontext Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHeight' in found_struct}} srcHeight : size_t Source height (ignored when src is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstZ' in found_struct}} dstZ : size_t Destination Z + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstLOD' in found_struct}} dstLOD : size_t Destination LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstContext' in found_struct}} dstContext : CUcontext Destination context (ignored with dstMemoryType is CU_MEMORYTYPE_ARRAY) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHeight' in found_struct}} dstHeight : size_t Destination height (ignored when dst is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 3D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Height' in found_struct}} Height : size_t Height of 3D memory copy + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Depth' in found_struct}} Depth : size_t Depth of 3D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5453,64 +7763,113 @@ cdef class CUDA_MEMCPY3D_PEER(CUDA_MEMCPY3D_PEER_v1): Attributes ---------- + {{if 'CUDA_MEMCPY3D_PEER_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcZ' in found_struct}} srcZ : size_t Source Z + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcLOD' in found_struct}} srcLOD : size_t Source LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcContext' in found_struct}} srcContext : CUcontext Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHeight' in found_struct}} srcHeight : size_t Source height (ignored when src is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstZ' in found_struct}} dstZ : size_t Destination Z + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstLOD' in found_struct}} dstLOD : size_t Destination LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstContext' in found_struct}} dstContext : CUcontext Destination context (ignored with dstMemoryType is CU_MEMORYTYPE_ARRAY) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHeight' in found_struct}} dstHeight : size_t Destination height (ignored when dst is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 3D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Height' in found_struct}} Height : size_t Height of 3D memory copy + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Depth' in found_struct}} Depth : size_t Depth of 3D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5522,20 +7881,27 @@ cdef class CUDA_MEMCPY_NODE_PARAMS(CUDA_MEMCPY_NODE_PARAMS_st): Attributes ---------- + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.flags' in found_struct}} flags : int Must be zero + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.reserved' in found_struct}} reserved : int Must be zero + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyCtx' in found_struct}} copyCtx : CUcontext Context on which to run the node + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyParams' in found_struct}} copyParams : CUDA_MEMCPY3D Parameters for the memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5547,20 +7913,27 @@ cdef class CUDA_ARRAY_DESCRIPTOR_v2(CUDA_ARRAY_DESCRIPTOR_st): Attributes ---------- + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Width' in found_struct}} Width : size_t Width of array + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Height' in found_struct}} Height : size_t Height of array + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Format' in found_struct}} Format : CUarray_format Array format + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.NumChannels' in found_struct}} NumChannels : unsigned int Channels per array element + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5572,20 +7945,27 @@ cdef class CUDA_ARRAY_DESCRIPTOR(CUDA_ARRAY_DESCRIPTOR_v2): Attributes ---------- + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Width' in found_struct}} Width : size_t Width of array + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Height' in found_struct}} Height : size_t Height of array + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Format' in found_struct}} Format : CUarray_format Array format + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.NumChannels' in found_struct}} NumChannels : unsigned int Channels per array element + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5597,24 +7977,35 @@ cdef class CUDA_ARRAY3D_DESCRIPTOR_v2(CUDA_ARRAY3D_DESCRIPTOR_st): Attributes ---------- + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Width' in found_struct}} Width : size_t Width of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Height' in found_struct}} Height : size_t Height of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Depth' in found_struct}} Depth : size_t Depth of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Format' in found_struct}} Format : CUarray_format Array format + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.NumChannels' in found_struct}} NumChannels : unsigned int Channels per array element + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Flags' in found_struct}} Flags : unsigned int Flags + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5626,24 +8017,35 @@ cdef class CUDA_ARRAY3D_DESCRIPTOR(CUDA_ARRAY3D_DESCRIPTOR_v2): Attributes ---------- + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Width' in found_struct}} Width : size_t Width of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Height' in found_struct}} Height : size_t Height of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Depth' in found_struct}} Depth : size_t Depth of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Format' in found_struct}} Format : CUarray_format Array format + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.NumChannels' in found_struct}} NumChannels : unsigned int Channels per array element + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Flags' in found_struct}} Flags : unsigned int Flags + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5655,23 +8057,32 @@ cdef class CUDA_ARRAY_SPARSE_PROPERTIES_v1(CUDA_ARRAY_SPARSE_PROPERTIES_st): Attributes ---------- - tileExtent : anon_struct5 + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent' in found_struct}} + tileExtent : anon_struct6 + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailFirstLevel' in found_struct}} miptailFirstLevel : unsigned int First mip level at which the mip tail begins. + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailSize' in found_struct}} miptailSize : unsigned long long Total size of the mip tail. + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.flags' in found_struct}} flags : unsigned int Flags will either be zero or CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5683,23 +8094,32 @@ cdef class CUDA_ARRAY_SPARSE_PROPERTIES(CUDA_ARRAY_SPARSE_PROPERTIES_v1): Attributes ---------- - tileExtent : anon_struct5 + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent' in found_struct}} + tileExtent : anon_struct6 + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailFirstLevel' in found_struct}} miptailFirstLevel : unsigned int First mip level at which the mip tail begins. + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailSize' in found_struct}} miptailSize : unsigned long long Total size of the mip tail. + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.flags' in found_struct}} flags : unsigned int Flags will either be zero or CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5711,18 +8131,23 @@ cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_v1(CUDA_ARRAY_MEMORY_REQUIREMENTS_st): Attributes ---------- + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.size' in found_struct}} size : size_t Total required memory size + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.alignment' in found_struct}} alignment : size_t alignment requirement + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5734,18 +8159,23 @@ cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS(CUDA_ARRAY_MEMORY_REQUIREMENTS_v1): Attributes ---------- + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.size' in found_struct}} size : size_t Total required memory size + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.alignment' in found_struct}} alignment : size_t alignment requirement + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5757,18 +8187,23 @@ cdef class CUDA_RESOURCE_DESC_v1(CUDA_RESOURCE_DESC_st): Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.resType' in found_struct}} resType : CUresourcetype Resource type + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res' in found_struct}} res : anon_union4 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.flags' in found_struct}} flags : unsigned int Flags (must be zero) + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5780,18 +8215,23 @@ cdef class CUDA_RESOURCE_DESC(CUDA_RESOURCE_DESC_v1): Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.resType' in found_struct}} resType : CUresourcetype Resource type + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res' in found_struct}} res : anon_union4 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.flags' in found_struct}} flags : unsigned int Flags (must be zero) + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5803,32 +8243,51 @@ cdef class CUDA_TEXTURE_DESC_v1(CUDA_TEXTURE_DESC_st): Attributes ---------- + {{if 'CUDA_TEXTURE_DESC_st.addressMode' in found_struct}} addressMode : List[CUaddress_mode] Address modes + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.filterMode' in found_struct}} filterMode : CUfilter_mode Filter mode + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.flags' in found_struct}} flags : unsigned int Flags + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxAnisotropy' in found_struct}} maxAnisotropy : unsigned int Maximum anisotropy ratio + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapFilterMode' in found_struct}} mipmapFilterMode : CUfilter_mode Mipmap filter mode + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapLevelBias' in found_struct}} mipmapLevelBias : float Mipmap level bias + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.minMipmapLevelClamp' in found_struct}} minMipmapLevelClamp : float Mipmap minimum level clamp + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxMipmapLevelClamp' in found_struct}} maxMipmapLevelClamp : float Mipmap maximum level clamp + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.borderColor' in found_struct}} borderColor : List[float] Border Color + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.reserved' in found_struct}} reserved : List[int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5840,32 +8299,51 @@ cdef class CUDA_TEXTURE_DESC(CUDA_TEXTURE_DESC_v1): Attributes ---------- + {{if 'CUDA_TEXTURE_DESC_st.addressMode' in found_struct}} addressMode : List[CUaddress_mode] Address modes + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.filterMode' in found_struct}} filterMode : CUfilter_mode Filter mode + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.flags' in found_struct}} flags : unsigned int Flags + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxAnisotropy' in found_struct}} maxAnisotropy : unsigned int Maximum anisotropy ratio + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapFilterMode' in found_struct}} mipmapFilterMode : CUfilter_mode Mipmap filter mode + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapLevelBias' in found_struct}} mipmapLevelBias : float Mipmap level bias + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.minMipmapLevelClamp' in found_struct}} minMipmapLevelClamp : float Mipmap minimum level clamp + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxMipmapLevelClamp' in found_struct}} maxMipmapLevelClamp : float Mipmap maximum level clamp + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.borderColor' in found_struct}} borderColor : List[float] Border Color + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.reserved' in found_struct}} reserved : List[int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5877,30 +8355,47 @@ cdef class CUDA_RESOURCE_VIEW_DESC_v1(CUDA_RESOURCE_VIEW_DESC_st): Attributes ---------- + {{if 'CUDA_RESOURCE_VIEW_DESC_st.format' in found_struct}} format : CUresourceViewFormat Resource view format + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.width' in found_struct}} width : size_t Width of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.height' in found_struct}} height : size_t Height of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.depth' in found_struct}} depth : size_t Depth of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstMipmapLevel' in found_struct}} firstMipmapLevel : unsigned int First defined mipmap level + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastMipmapLevel' in found_struct}} lastMipmapLevel : unsigned int Last defined mipmap level + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstLayer' in found_struct}} firstLayer : unsigned int First layer index + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastLayer' in found_struct}} lastLayer : unsigned int Last layer index + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5912,30 +8407,47 @@ cdef class CUDA_RESOURCE_VIEW_DESC(CUDA_RESOURCE_VIEW_DESC_v1): Attributes ---------- + {{if 'CUDA_RESOURCE_VIEW_DESC_st.format' in found_struct}} format : CUresourceViewFormat Resource view format + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.width' in found_struct}} width : size_t Width of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.height' in found_struct}} height : size_t Height of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.depth' in found_struct}} depth : size_t Depth of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstMipmapLevel' in found_struct}} firstMipmapLevel : unsigned int First defined mipmap level + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastMipmapLevel' in found_struct}} lastMipmapLevel : unsigned int Last defined mipmap level + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstLayer' in found_struct}} firstLayer : unsigned int First layer index + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastLayer' in found_struct}} lastLayer : unsigned int Last layer index + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5948,14 +8460,15 @@ cdef class CUtensorMap(CUtensorMap_st): Attributes ---------- + {{if 'CUtensorMap_st.opaque' in found_struct}} opaque : List[cuuint64_t] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5967,16 +8480,19 @@ cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1(CUDA_POINTER_ATTRIBUTE_P2P_TOKEN Attributes ---------- + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.p2pToken' in found_struct}} p2pToken : unsigned long long + {{endif}} + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.vaSpaceToken' in found_struct}} vaSpaceToken : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -5988,16 +8504,19 @@ cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v Attributes ---------- + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.p2pToken' in found_struct}} p2pToken : unsigned long long + {{endif}} + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.vaSpaceToken' in found_struct}} vaSpaceToken : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6009,32 +8528,51 @@ cdef class CUDA_LAUNCH_PARAMS_v1(CUDA_LAUNCH_PARAMS_st): Attributes ---------- + {{if 'CUDA_LAUNCH_PARAMS_st.function' in found_struct}} function : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.hStream' in found_struct}} hStream : CUstream Stream identifier + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6046,32 +8584,51 @@ cdef class CUDA_LAUNCH_PARAMS(CUDA_LAUNCH_PARAMS_v1): Attributes ---------- + {{if 'CUDA_LAUNCH_PARAMS_st.function' in found_struct}} function : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.hStream' in found_struct}} hStream : CUstream Stream identifier + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6083,22 +8640,31 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_ Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.type' in found_struct}} type : CUexternalMemoryHandleType Type of the handle + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle' in found_struct}} handle : anon_union5 + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.size' in found_struct}} size : unsigned long long Size of the memory allocation + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.flags' in found_struct}} flags : unsigned int Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6110,22 +8676,31 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1) Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.type' in found_struct}} type : CUexternalMemoryHandleType Type of the handle + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle' in found_struct}} handle : anon_union5 + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.size' in found_struct}} size : unsigned long long Size of the memory allocation + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.flags' in found_struct}} flags : unsigned int Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6137,20 +8712,27 @@ cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_ Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the buffer's base is + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.size' in found_struct}} size : unsigned long long Size of the buffer + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.flags' in found_struct}} flags : unsigned int Flags reserved for future use. Must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6162,20 +8744,27 @@ cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1) Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the buffer's base is + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.size' in found_struct}} size : unsigned long long Size of the buffer + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.flags' in found_struct}} flags : unsigned int Flags reserved for future use. Must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6187,21 +8776,28 @@ cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1(CUDA_EXTERNAL_MEMORY_MIP Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the base level of the mipmap chain is. + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.arrayDesc' in found_struct}} arrayDesc : CUDA_ARRAY3D_DESCRIPTOR Format, dimension and type of base level of the mipmap chain + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.numLevels' in found_struct}} numLevels : unsigned int Total number of levels in the mipmap chain + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6213,21 +8809,28 @@ cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC(CUDA_EXTERNAL_MEMORY_MIPMAP Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the base level of the mipmap chain is. + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.arrayDesc' in found_struct}} arrayDesc : CUDA_ARRAY3D_DESCRIPTOR Format, dimension and type of base level of the mipmap chain + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.numLevels' in found_struct}} numLevels : unsigned int Total number of levels in the mipmap chain + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6239,20 +8842,27 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1(CUDA_EXTERNAL_SEMAPHORE_HANDLE Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.type' in found_struct}} type : CUexternalSemaphoreHandleType Type of the handle + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle' in found_struct}} handle : anon_union6 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.flags' in found_struct}} flags : unsigned int Flags reserved for the future. Must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6264,20 +8874,27 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DE Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.type' in found_struct}} type : CUexternalSemaphoreHandleType Type of the handle + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle' in found_struct}} handle : anon_union6 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.flags' in found_struct}} flags : unsigned int Flags reserved for the future. Must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6289,8 +8906,11 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_SIGN Attributes ---------- - params : anon_struct15 + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params' in found_struct}} + params : anon_struct16 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags' in found_struct}} flags : unsigned int Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a CUexternalSemaphore of type @@ -6300,14 +8920,16 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_SIGN synchronization operations should be performed for any external memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. For all other types of CUexternalSemaphore, flags must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6319,8 +8941,11 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_ Attributes ---------- - params : anon_struct15 + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params' in found_struct}} + params : anon_struct16 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags' in found_struct}} flags : unsigned int Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a CUexternalSemaphore of type @@ -6330,14 +8955,16 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_ synchronization operations should be performed for any external memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. For all other types of CUexternalSemaphore, flags must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6349,8 +8976,11 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_WAIT_P Attributes ---------- - params : anon_struct18 + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params' in found_struct}} + params : anon_struct19 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags' in found_struct}} flags : unsigned int Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a CUexternalSemaphore of type @@ -6360,14 +8990,16 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1(CUDA_EXTERNAL_SEMAPHORE_WAIT_P synchronization operations should be performed for any external memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. For all other types of CUexternalSemaphore, flags must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6379,8 +9011,11 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARA Attributes ---------- - params : anon_struct18 + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params' in found_struct}} + params : anon_struct19 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags' in found_struct}} flags : unsigned int Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a CUexternalSemaphore of type @@ -6390,14 +9025,16 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARA synchronization operations should be performed for any external memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. For all other types of CUexternalSemaphore, flags must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6409,19 +9046,24 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st Attributes ---------- + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS Array of external semaphore signal parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6433,19 +9075,24 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1): Attributes ---------- + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS Array of external semaphore signal parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6457,19 +9104,24 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 Attributes ---------- + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS Array of external semaphore signal parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6481,19 +9133,24 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1(CUDA_EXT_SEM_WAIT_NODE_PARAMS_st): Attributes ---------- + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS Array of external semaphore wait parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6505,19 +9162,24 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1): Attributes ---------- + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS Array of external semaphore wait parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6529,19 +9191,24 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st) Attributes ---------- + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS Array of external semaphore wait parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6556,8 +9223,8 @@ cdef class CUmemGenericAllocationHandle: Get memory address of class instance """ - cdef cydriver.CUmemGenericAllocationHandle __val - cdef cydriver.CUmemGenericAllocationHandle* _ptr + cdef cydriver.CUmemGenericAllocationHandle _pvt_val + cdef cydriver.CUmemGenericAllocationHandle* _pvt_ptr {{endif}} {{if 'CUarrayMapInfo_v1' in found_types}} @@ -6568,34 +9235,55 @@ cdef class CUarrayMapInfo_v1(CUarrayMapInfo_st): Attributes ---------- + {{if 'CUarrayMapInfo_st.resourceType' in found_struct}} resourceType : CUresourcetype Resource type + {{endif}} + {{if 'CUarrayMapInfo_st.resource' in found_struct}} resource : anon_union9 + {{endif}} + {{if 'CUarrayMapInfo_st.subresourceType' in found_struct}} subresourceType : CUarraySparseSubresourceType Sparse subresource type + {{endif}} + {{if 'CUarrayMapInfo_st.subresource' in found_struct}} subresource : anon_union10 + {{endif}} + {{if 'CUarrayMapInfo_st.memOperationType' in found_struct}} memOperationType : CUmemOperationType Memory operation type + {{endif}} + {{if 'CUarrayMapInfo_st.memHandleType' in found_struct}} memHandleType : CUmemHandleType Memory handle type + {{endif}} + {{if 'CUarrayMapInfo_st.memHandle' in found_struct}} memHandle : anon_union11 + {{endif}} + {{if 'CUarrayMapInfo_st.offset' in found_struct}} offset : unsigned long long Offset within mip tail Offset within the memory + {{endif}} + {{if 'CUarrayMapInfo_st.deviceBitMask' in found_struct}} deviceBitMask : unsigned int Device ordinal bit mask + {{endif}} + {{if 'CUarrayMapInfo_st.flags' in found_struct}} flags : unsigned int flags for future use, must be zero now. + {{endif}} + {{if 'CUarrayMapInfo_st.reserved' in found_struct}} reserved : List[unsigned int] Reserved for future use, must be zero now. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6608,34 +9296,55 @@ cdef class CUarrayMapInfo(CUarrayMapInfo_v1): Attributes ---------- + {{if 'CUarrayMapInfo_st.resourceType' in found_struct}} resourceType : CUresourcetype Resource type + {{endif}} + {{if 'CUarrayMapInfo_st.resource' in found_struct}} resource : anon_union9 + {{endif}} + {{if 'CUarrayMapInfo_st.subresourceType' in found_struct}} subresourceType : CUarraySparseSubresourceType Sparse subresource type + {{endif}} + {{if 'CUarrayMapInfo_st.subresource' in found_struct}} subresource : anon_union10 + {{endif}} + {{if 'CUarrayMapInfo_st.memOperationType' in found_struct}} memOperationType : CUmemOperationType Memory operation type + {{endif}} + {{if 'CUarrayMapInfo_st.memHandleType' in found_struct}} memHandleType : CUmemHandleType Memory handle type + {{endif}} + {{if 'CUarrayMapInfo_st.memHandle' in found_struct}} memHandle : anon_union11 + {{endif}} + {{if 'CUarrayMapInfo_st.offset' in found_struct}} offset : unsigned long long Offset within mip tail Offset within the memory + {{endif}} + {{if 'CUarrayMapInfo_st.deviceBitMask' in found_struct}} deviceBitMask : unsigned int Device ordinal bit mask + {{endif}} + {{if 'CUarrayMapInfo_st.flags' in found_struct}} flags : unsigned int flags for future use, must be zero now. + {{endif}} + {{if 'CUarrayMapInfo_st.reserved' in found_struct}} reserved : List[unsigned int] Reserved for future use, must be zero now. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6647,16 +9356,19 @@ cdef class CUmemLocation_v1(CUmemLocation_st): Attributes ---------- + {{if 'CUmemLocation_st.type' in found_struct}} type : CUmemLocationType Specifies the location type, which modifies the meaning of id. + {{endif}} + {{if 'CUmemLocation_st.id' in found_struct}} id : int identifier for a given this location's CUmemLocationType. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6668,16 +9380,19 @@ cdef class CUmemLocation(CUmemLocation_v1): Attributes ---------- + {{if 'CUmemLocation_st.type' in found_struct}} type : CUmemLocationType Specifies the location type, which modifies the meaning of id. + {{endif}} + {{if 'CUmemLocation_st.id' in found_struct}} id : int identifier for a given this location's CUmemLocationType. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6689,26 +9404,35 @@ cdef class CUmemAllocationProp_v1(CUmemAllocationProp_st): Attributes ---------- + {{if 'CUmemAllocationProp_st.type' in found_struct}} type : CUmemAllocationType Allocation type + {{endif}} + {{if 'CUmemAllocationProp_st.requestedHandleTypes' in found_struct}} requestedHandleTypes : CUmemAllocationHandleType requested CUmemAllocationHandleType + {{endif}} + {{if 'CUmemAllocationProp_st.location' in found_struct}} location : CUmemLocation Location of allocation + {{endif}} + {{if 'CUmemAllocationProp_st.win32HandleMetaData' in found_struct}} win32HandleMetaData : Any Windows-specific POBJECT_ATTRIBUTES required when CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes structure includes security attributes that define the scope of which exported allocations may be transferred to other processes. In all other cases, this field is required to be zero. - allocFlags : anon_struct21 + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags' in found_struct}} + allocFlags : anon_struct22 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6720,26 +9444,35 @@ cdef class CUmemAllocationProp(CUmemAllocationProp_v1): Attributes ---------- + {{if 'CUmemAllocationProp_st.type' in found_struct}} type : CUmemAllocationType Allocation type + {{endif}} + {{if 'CUmemAllocationProp_st.requestedHandleTypes' in found_struct}} requestedHandleTypes : CUmemAllocationHandleType requested CUmemAllocationHandleType + {{endif}} + {{if 'CUmemAllocationProp_st.location' in found_struct}} location : CUmemLocation Location of allocation + {{endif}} + {{if 'CUmemAllocationProp_st.win32HandleMetaData' in found_struct}} win32HandleMetaData : Any Windows-specific POBJECT_ATTRIBUTES required when CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes structure includes security attributes that define the scope of which exported allocations may be transferred to other processes. In all other cases, this field is required to be zero. - allocFlags : anon_struct21 + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags' in found_struct}} + allocFlags : anon_struct22 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6751,23 +9484,30 @@ cdef class CUmulticastObjectProp_v1(CUmulticastObjectProp_st): Attributes ---------- + {{if 'CUmulticastObjectProp_st.numDevices' in found_struct}} numDevices : unsigned int The number of devices in the multicast team that will bind memory to this object + {{endif}} + {{if 'CUmulticastObjectProp_st.size' in found_struct}} size : size_t The maximum amount of memory that can be bound to this multicast object per device + {{endif}} + {{if 'CUmulticastObjectProp_st.handleTypes' in found_struct}} handleTypes : unsigned long long Bitmask of exportable handle types (see CUmemAllocationHandleType) for this object + {{endif}} + {{if 'CUmulticastObjectProp_st.flags' in found_struct}} flags : unsigned long long Flags for future use, must be zero now + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6779,23 +9519,30 @@ cdef class CUmulticastObjectProp(CUmulticastObjectProp_v1): Attributes ---------- + {{if 'CUmulticastObjectProp_st.numDevices' in found_struct}} numDevices : unsigned int The number of devices in the multicast team that will bind memory to this object + {{endif}} + {{if 'CUmulticastObjectProp_st.size' in found_struct}} size : size_t The maximum amount of memory that can be bound to this multicast object per device + {{endif}} + {{if 'CUmulticastObjectProp_st.handleTypes' in found_struct}} handleTypes : unsigned long long Bitmask of exportable handle types (see CUmemAllocationHandleType) for this object + {{endif}} + {{if 'CUmulticastObjectProp_st.flags' in found_struct}} flags : unsigned long long Flags for future use, must be zero now + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6807,16 +9554,19 @@ cdef class CUmemAccessDesc_v1(CUmemAccessDesc_st): Attributes ---------- + {{if 'CUmemAccessDesc_st.location' in found_struct}} location : CUmemLocation Location on which the request is to change it's accessibility + {{endif}} + {{if 'CUmemAccessDesc_st.flags' in found_struct}} flags : CUmemAccess_flags ::CUmemProt accessibility flags to set on the request + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6828,16 +9578,19 @@ cdef class CUmemAccessDesc(CUmemAccessDesc_v1): Attributes ---------- + {{if 'CUmemAccessDesc_st.location' in found_struct}} location : CUmemLocation Location on which the request is to change it's accessibility + {{endif}} + {{if 'CUmemAccessDesc_st.flags' in found_struct}} flags : CUmemAccess_flags ::CUmemProt accessibility flags to set on the request + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6849,21 +9602,26 @@ cdef class CUgraphExecUpdateResultInfo_v1(CUgraphExecUpdateResultInfo_st): Attributes ---------- + {{if 'CUgraphExecUpdateResultInfo_st.result' in found_struct}} result : CUgraphExecUpdateResult Gives more specific detail when a cuda graph update fails. + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorNode' in found_struct}} errorNode : CUgraphNode The "to node" of the error edge when the topologies do not match. The error node when the error is associated with a specific node. NULL when the error is generic. + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} errorFromNode : CUgraphNode The from node of error edge when the topologies do not match. Otherwise NULL. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6875,21 +9633,26 @@ cdef class CUgraphExecUpdateResultInfo(CUgraphExecUpdateResultInfo_v1): Attributes ---------- + {{if 'CUgraphExecUpdateResultInfo_st.result' in found_struct}} result : CUgraphExecUpdateResult Gives more specific detail when a cuda graph update fails. + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorNode' in found_struct}} errorNode : CUgraphNode The "to node" of the error edge when the topologies do not match. The error node when the error is associated with a specific node. NULL when the error is generic. + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} errorFromNode : CUgraphNode The from node of error edge when the topologies do not match. Otherwise NULL. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6901,32 +9664,45 @@ cdef class CUmemPoolProps_v1(CUmemPoolProps_st): Attributes ---------- + {{if 'CUmemPoolProps_st.allocType' in found_struct}} allocType : CUmemAllocationType Allocation type. Currently must be specified as CU_MEM_ALLOCATION_TYPE_PINNED + {{endif}} + {{if 'CUmemPoolProps_st.handleTypes' in found_struct}} handleTypes : CUmemAllocationHandleType Handle types that will be supported by allocations from the pool. + {{endif}} + {{if 'CUmemPoolProps_st.location' in found_struct}} location : CUmemLocation Location where allocations should reside. + {{endif}} + {{if 'CUmemPoolProps_st.win32SecurityAttributes' in found_struct}} win32SecurityAttributes : Any Windows-specific LPSECURITYATTRIBUTES required when CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute defines the scope of which exported allocations may be transferred to other processes. In all other cases, this field is required to be zero. + {{endif}} + {{if 'CUmemPoolProps_st.maxSize' in found_struct}} maxSize : size_t Maximum pool size. When set to 0, defaults to a system dependent value. + {{endif}} + {{if 'CUmemPoolProps_st.usage' in found_struct}} usage : unsigned short Bitmask indicating intended usage for the pool. + {{endif}} + {{if 'CUmemPoolProps_st.reserved' in found_struct}} reserved : bytes reserved for future use, must be 0 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6938,32 +9714,45 @@ cdef class CUmemPoolProps(CUmemPoolProps_v1): Attributes ---------- + {{if 'CUmemPoolProps_st.allocType' in found_struct}} allocType : CUmemAllocationType Allocation type. Currently must be specified as CU_MEM_ALLOCATION_TYPE_PINNED + {{endif}} + {{if 'CUmemPoolProps_st.handleTypes' in found_struct}} handleTypes : CUmemAllocationHandleType Handle types that will be supported by allocations from the pool. + {{endif}} + {{if 'CUmemPoolProps_st.location' in found_struct}} location : CUmemLocation Location where allocations should reside. + {{endif}} + {{if 'CUmemPoolProps_st.win32SecurityAttributes' in found_struct}} win32SecurityAttributes : Any Windows-specific LPSECURITYATTRIBUTES required when CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute defines the scope of which exported allocations may be transferred to other processes. In all other cases, this field is required to be zero. + {{endif}} + {{if 'CUmemPoolProps_st.maxSize' in found_struct}} maxSize : size_t Maximum pool size. When set to 0, defaults to a system dependent value. + {{endif}} + {{if 'CUmemPoolProps_st.usage' in found_struct}} usage : unsigned short Bitmask indicating intended usage for the pool. + {{endif}} + {{if 'CUmemPoolProps_st.reserved' in found_struct}} reserved : bytes reserved for future use, must be 0 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6975,14 +9764,15 @@ cdef class CUmemPoolPtrExportData_v1(CUmemPoolPtrExportData_st): Attributes ---------- + {{if 'CUmemPoolPtrExportData_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -6994,14 +9784,15 @@ cdef class CUmemPoolPtrExportData(CUmemPoolPtrExportData_v1): Attributes ---------- + {{if 'CUmemPoolPtrExportData_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7013,26 +9804,35 @@ cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1(CUDA_MEM_ALLOC_NODE_PARAMS_v1_st): Attributes ---------- + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.poolProps' in found_struct}} poolProps : CUmemPoolProps in: location where the allocation should reside (specified in ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is not supported. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescs' in found_struct}} accessDescs : CUmemAccessDesc in: array of memory access descriptors. Used to describe peer GPU access + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescCount' in found_struct}} accessDescCount : size_t in: number of memory access descriptors. Must not exceed the number of GPUs. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.bytesize' in found_struct}} bytesize : size_t in: size in bytes of the requested allocation + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.dptr' in found_struct}} dptr : CUdeviceptr out: address of the allocation returned by CUDA + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7044,26 +9844,35 @@ cdef class CUDA_MEM_ALLOC_NODE_PARAMS(CUDA_MEM_ALLOC_NODE_PARAMS_v1): Attributes ---------- + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.poolProps' in found_struct}} poolProps : CUmemPoolProps in: location where the allocation should reside (specified in ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is not supported. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescs' in found_struct}} accessDescs : CUmemAccessDesc in: array of memory access descriptors. Used to describe peer GPU access + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescCount' in found_struct}} accessDescCount : size_t in: number of memory access descriptors. Must not exceed the number of GPUs. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.bytesize' in found_struct}} bytesize : size_t in: size in bytes of the requested allocation + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.dptr' in found_struct}} dptr : CUdeviceptr out: address of the allocation returned by CUDA + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7075,26 +9884,35 @@ cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2(CUDA_MEM_ALLOC_NODE_PARAMS_v2_st): Attributes ---------- + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.poolProps' in found_struct}} poolProps : CUmemPoolProps in: location where the allocation should reside (specified in ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is not supported. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescs' in found_struct}} accessDescs : CUmemAccessDesc in: array of memory access descriptors. Used to describe peer GPU access + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescCount' in found_struct}} accessDescCount : size_t in: number of memory access descriptors. Must not exceed the number of GPUs. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.bytesize' in found_struct}} bytesize : size_t in: size in bytes of the requested allocation + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.dptr' in found_struct}} dptr : CUdeviceptr out: address of the allocation returned by CUDA + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7106,14 +9924,15 @@ cdef class CUDA_MEM_FREE_NODE_PARAMS(CUDA_MEM_FREE_NODE_PARAMS_st): Attributes ---------- + {{if 'CUDA_MEM_FREE_NODE_PARAMS_st.dptr' in found_struct}} dptr : CUdeviceptr in: the pointer to free + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7125,15 +9944,16 @@ cdef class CUDA_CHILD_GRAPH_NODE_PARAMS(CUDA_CHILD_GRAPH_NODE_PARAMS_st): Attributes ---------- + {{if 'CUDA_CHILD_GRAPH_NODE_PARAMS_st.graph' in found_struct}} graph : CUgraph The child graph to clone into the node for node creation, or a handle to the graph owned by the node for node query + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7145,14 +9965,15 @@ cdef class CUDA_EVENT_RECORD_NODE_PARAMS(CUDA_EVENT_RECORD_NODE_PARAMS_st): Attributes ---------- + {{if 'CUDA_EVENT_RECORD_NODE_PARAMS_st.event' in found_struct}} event : CUevent The event to record when the node executes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7164,14 +9985,15 @@ cdef class CUDA_EVENT_WAIT_NODE_PARAMS(CUDA_EVENT_WAIT_NODE_PARAMS_st): Attributes ---------- + {{if 'CUDA_EVENT_WAIT_NODE_PARAMS_st.event' in found_struct}} event : CUevent The event to wait on from the node + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7183,46 +10005,524 @@ cdef class CUgraphNodeParams(CUgraphNodeParams_st): Attributes ---------- + {{if 'CUgraphNodeParams_st.type' in found_struct}} type : CUgraphNodeType Type of the node + {{endif}} + {{if 'CUgraphNodeParams_st.reserved0' in found_struct}} reserved0 : List[int] Reserved. Must be zero. + {{endif}} + {{if 'CUgraphNodeParams_st.reserved1' in found_struct}} reserved1 : List[long long] Padding. Unused bytes must be zero. + {{endif}} + {{if 'CUgraphNodeParams_st.kernel' in found_struct}} kernel : CUDA_KERNEL_NODE_PARAMS_v3 Kernel node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.memcpy' in found_struct}} memcpy : CUDA_MEMCPY_NODE_PARAMS Memcpy node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.memset' in found_struct}} memset : CUDA_MEMSET_NODE_PARAMS_v2 Memset node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.host' in found_struct}} host : CUDA_HOST_NODE_PARAMS_v2 Host node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.graph' in found_struct}} graph : CUDA_CHILD_GRAPH_NODE_PARAMS Child graph node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.eventWait' in found_struct}} eventWait : CUDA_EVENT_WAIT_NODE_PARAMS Event wait node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.eventRecord' in found_struct}} eventRecord : CUDA_EVENT_RECORD_NODE_PARAMS Event record node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.extSemSignal' in found_struct}} extSemSignal : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 External semaphore signal node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.extSemWait' in found_struct}} extSemWait : CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 External semaphore wait node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.alloc' in found_struct}} alloc : CUDA_MEM_ALLOC_NODE_PARAMS_v2 Memory allocation node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.free' in found_struct}} free : CUDA_MEM_FREE_NODE_PARAMS Memory free node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.memOp' in found_struct}} memOp : CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 MemOp node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.conditional' in found_struct}} conditional : CUDA_CONDITIONAL_NODE_PARAMS Conditional node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.reserved2' in found_struct}} reserved2 : long long Reserved bytes. Must be zero. + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUcheckpointLockArgs' in found_types}} + +cdef class CUcheckpointLockArgs(CUcheckpointLockArgs_st): + """ + CUDA checkpoint optional lock arguments + + Attributes + ---------- + {{if 'CUcheckpointLockArgs_st.timeoutMs' in found_struct}} + timeoutMs : unsigned int + Timeout in milliseconds to attempt to lock the process, 0 indicates + no timeout + {{endif}} + {{if 'CUcheckpointLockArgs_st.reserved0' in found_struct}} + reserved0 : unsigned int + Reserved for future use, must be zero + {{endif}} + {{if 'CUcheckpointLockArgs_st.reserved1' in found_struct}} + reserved1 : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUcheckpointCheckpointArgs' in found_types}} + +cdef class CUcheckpointCheckpointArgs(CUcheckpointCheckpointArgs_st): + """ + CUDA checkpoint optional checkpoint arguments + + Attributes + ---------- + {{if 'CUcheckpointCheckpointArgs_st.reserved' in found_struct}} + reserved : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUcheckpointRestoreArgs' in found_types}} + +cdef class CUcheckpointRestoreArgs(CUcheckpointRestoreArgs_st): + """ + CUDA checkpoint optional restore arguments + + Attributes + ---------- + {{if 'CUcheckpointRestoreArgs_st.reserved' in found_struct}} + reserved : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUcheckpointUnlockArgs' in found_types}} + +cdef class CUcheckpointUnlockArgs(CUcheckpointUnlockArgs_st): + """ + CUDA checkpoint optional unlock arguments + + Attributes + ---------- + {{if 'CUcheckpointUnlockArgs_st.reserved' in found_struct}} + reserved : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUmemcpyAttributes_v1' in found_types}} + +cdef class CUmemcpyAttributes_v1(CUmemcpyAttributes_st): + """ + Attributes specific to copies within a batch. For more details on + usage see cuMemcpyBatchAsync. + + Attributes + ---------- + {{if 'CUmemcpyAttributes_st.srcAccessOrder' in found_struct}} + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + {{endif}} + {{if 'CUmemcpyAttributes_st.srcLocHint' in found_struct}} + srcLocHint : CUmemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'CUmemcpyAttributes_st.dstLocHint' in found_struct}} + dstLocHint : CUmemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'CUmemcpyAttributes_st.flags' in found_struct}} + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUmemcpyAttributes' in found_types}} + +cdef class CUmemcpyAttributes(CUmemcpyAttributes_v1): + """ + Attributes specific to copies within a batch. For more details on + usage see cuMemcpyBatchAsync. + + Attributes + ---------- + {{if 'CUmemcpyAttributes_st.srcAccessOrder' in found_struct}} + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + {{endif}} + {{if 'CUmemcpyAttributes_st.srcLocHint' in found_struct}} + srcLocHint : CUmemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'CUmemcpyAttributes_st.dstLocHint' in found_struct}} + dstLocHint : CUmemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'CUmemcpyAttributes_st.flags' in found_struct}} + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUoffset3D_v1' in found_types}} + +cdef class CUoffset3D_v1(CUoffset3D_st): + """ + Struct representing offset into a CUarray in elements + + Attributes + ---------- + {{if 'CUoffset3D_st.x' in found_struct}} + x : size_t + + {{endif}} + {{if 'CUoffset3D_st.y' in found_struct}} + y : size_t + + {{endif}} + {{if 'CUoffset3D_st.z' in found_struct}} + z : size_t + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUoffset3D' in found_types}} + +cdef class CUoffset3D(CUoffset3D_v1): + """ + Struct representing offset into a CUarray in elements + + Attributes + ---------- + {{if 'CUoffset3D_st.x' in found_struct}} + x : size_t + + {{endif}} + {{if 'CUoffset3D_st.y' in found_struct}} + y : size_t + + {{endif}} + {{if 'CUoffset3D_st.z' in found_struct}} + z : size_t + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUextent3D_v1' in found_types}} + +cdef class CUextent3D_v1(CUextent3D_st): + """ + Struct representing width/height/depth of a CUarray in elements + + Attributes + ---------- + {{if 'CUextent3D_st.width' in found_struct}} + width : size_t + + {{endif}} + {{if 'CUextent3D_st.height' in found_struct}} + height : size_t + + {{endif}} + {{if 'CUextent3D_st.depth' in found_struct}} + depth : size_t + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUextent3D' in found_types}} + +cdef class CUextent3D(CUextent3D_v1): + """ + Struct representing width/height/depth of a CUarray in elements + + Attributes + ---------- + {{if 'CUextent3D_st.width' in found_struct}} + width : size_t + + {{endif}} + {{if 'CUextent3D_st.height' in found_struct}} + height : size_t + + {{endif}} + {{if 'CUextent3D_st.depth' in found_struct}} + depth : size_t + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUmemcpy3DOperand_v1' in found_types}} + +cdef class CUmemcpy3DOperand_v1(CUmemcpy3DOperand_st): + """ + Struct representing an operand for copy with cuMemcpy3DBatchAsync + + Attributes + ---------- + {{if 'CUmemcpy3DOperand_st.type' in found_struct}} + type : CUmemcpy3DOperandType + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op' in found_struct}} + op : anon_union13 + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUmemcpy3DOperand' in found_types}} + +cdef class CUmemcpy3DOperand(CUmemcpy3DOperand_v1): + """ + Struct representing an operand for copy with cuMemcpy3DBatchAsync + + Attributes + ---------- + {{if 'CUmemcpy3DOperand_st.type' in found_struct}} + type : CUmemcpy3DOperandType + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op' in found_struct}} + op : anon_union13 + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUDA_MEMCPY3D_BATCH_OP_v1' in found_types}} + +cdef class CUDA_MEMCPY3D_BATCH_OP_v1(CUDA_MEMCPY3D_BATCH_OP_st): + """ + Attributes + ---------- + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.src' in found_struct}} + src : CUmemcpy3DOperand + Source memcpy operand. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.dst' in found_struct}} + dst : CUmemcpy3DOperand + Destination memcpy operand. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.extent' in found_struct}} + extent : CUextent3D + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.srcAccessOrder' in found_struct}} + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.flags' in found_struct}} + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUDA_MEMCPY3D_BATCH_OP' in found_types}} + +cdef class CUDA_MEMCPY3D_BATCH_OP(CUDA_MEMCPY3D_BATCH_OP_v1): + """ + Attributes + ---------- + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.src' in found_struct}} + src : CUmemcpy3DOperand + Source memcpy operand. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.dst' in found_struct}} + dst : CUmemcpy3DOperand + Destination memcpy operand. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.extent' in found_struct}} + extent : CUextent3D + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.srcAccessOrder' in found_struct}} + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.flags' in found_struct}} + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + {{endif}} Methods ------- getPtr() Get memory address of class instance + """ + pass +{{endif}} +{{if 'CUmemDecompressParams' in found_types}} + +cdef class CUmemDecompressParams(CUmemDecompressParams_st): + """ + Structure describing the parameters that compose a single + decompression operation. + + Attributes + ---------- + {{if 'CUmemDecompressParams_st.srcNumBytes' in found_struct}} + srcNumBytes : size_t + The number of bytes to be read and decompressed from + CUmemDecompressParams_st.src. + {{endif}} + {{if 'CUmemDecompressParams_st.dstNumBytes' in found_struct}} + dstNumBytes : size_t + The number of bytes that the decompression operation will be + expected to write to CUmemDecompressParams_st.dst. This value is + optional; if present, it may be used by the CUDA driver as a + heuristic for scheduling the individual decompression operations. + {{endif}} + {{if 'CUmemDecompressParams_st.dstActBytes' in found_struct}} + dstActBytes : cuuint32_t + After the decompression operation has completed, the actual number + of bytes written to CUmemDecompressParams.dst will be recorded as a + 32-bit unsigned integer in the memory at this address. + {{endif}} + {{if 'CUmemDecompressParams_st.src' in found_struct}} + src : Any + Pointer to a buffer of at least + CUmemDecompressParams_st.srcNumBytes compressed bytes. + {{endif}} + {{if 'CUmemDecompressParams_st.dst' in found_struct}} + dst : Any + Pointer to a buffer where the decompressed data will be written. + The number of bytes written to this location will be recorded in + the memory pointed to by CUmemDecompressParams_st.dstActBytes + {{endif}} + {{if 'CUmemDecompressParams_st.algo' in found_struct}} + algo : CUmemDecompressAlgorithm + The decompression algorithm to use. + {{endif}} + {{if 'CUmemDecompressParams_st.padding' in found_struct}} + padding : bytes + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance """ pass {{endif}} @@ -7232,15 +10532,16 @@ cdef class CUdevSmResource(CUdevSmResource_st): """ Attributes ---------- + {{if 'CUdevSmResource_st.smCount' in found_struct}} smCount : unsigned int The amount of streaming multiprocessors available in this resource. This is an output parameter only, do not write to this field. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7250,20 +10551,27 @@ cdef class CUdevResource_v1(CUdevResource_st): """ Attributes ---------- + {{if 'CUdevResource_st.type' in found_struct}} type : CUdevResourceType Type of resource, dictates which union field was last set + {{endif}} + {{if 'CUdevResource_st._internal_padding' in found_struct}} _internal_padding : bytes + {{endif}} + {{if 'CUdevResource_st.sm' in found_struct}} sm : CUdevSmResource Resource corresponding to CU_DEV_RESOURCE_TYPE_SM ``. type. + {{endif}} + {{if 'CUdevResource_st._oversize' in found_struct}} _oversize : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7273,20 +10581,27 @@ cdef class CUdevResource(CUdevResource_v1): """ Attributes ---------- + {{if 'CUdevResource_st.type' in found_struct}} type : CUdevResourceType Type of resource, dictates which union field was last set + {{endif}} + {{if 'CUdevResource_st._internal_padding' in found_struct}} _internal_padding : bytes + {{endif}} + {{if 'CUdevResource_st.sm' in found_struct}} sm : CUdevSmResource Resource corresponding to CU_DEV_RESOURCE_TYPE_SM ``. type. + {{endif}} + {{if 'CUdevResource_st._oversize' in found_struct}} _oversize : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7300,32 +10615,51 @@ cdef class CUeglFrame_v1(CUeglFrame_st): Attributes ---------- - frame : anon_union14 + {{if True}} + frame : anon_union15 + {{endif}} + {{if True}} width : unsigned int Width of first plane + {{endif}} + {{if True}} height : unsigned int Height of first plane + {{endif}} + {{if True}} depth : unsigned int Depth of first plane + {{endif}} + {{if True}} pitch : unsigned int Pitch of first plane + {{endif}} + {{if True}} planeCount : unsigned int Number of planes + {{endif}} + {{if True}} numChannels : unsigned int Number of channels for the plane + {{endif}} + {{if True}} frameType : CUeglFrameType Array or Pitch + {{endif}} + {{if True}} eglColorFormat : CUeglColorFormat CUDA EGL Color Format + {{endif}} + {{if True}} cuFormat : CUarray_format CUDA Array Format + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7339,32 +10673,51 @@ cdef class CUeglFrame(CUeglFrame_v1): Attributes ---------- - frame : anon_union14 + {{if True}} + frame : anon_union15 + {{endif}} + {{if True}} width : unsigned int Width of first plane + {{endif}} + {{if True}} height : unsigned int Height of first plane + {{endif}} + {{if True}} depth : unsigned int Depth of first plane + {{endif}} + {{if True}} pitch : unsigned int Pitch of first plane + {{endif}} + {{if True}} planeCount : unsigned int Number of planes + {{endif}} + {{if True}} numChannels : unsigned int Number of channels for the plane + {{endif}} + {{if True}} frameType : CUeglFrameType Array or Pitch + {{endif}} + {{if True}} eglColorFormat : CUeglColorFormat CUDA EGL Color Format + {{endif}} + {{if True}} cuFormat : CUarray_format CUDA Array Format + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -7379,8 +10732,8 @@ cdef class cuuint32_t: Get memory address of class instance """ - cdef cydriver.cuuint32_t __val - cdef cydriver.cuuint32_t* _ptr + cdef cydriver.cuuint32_t _pvt_val + cdef cydriver.cuuint32_t* _pvt_ptr {{endif}} {{if 'cuuint64_t' in found_types}} @@ -7394,8 +10747,8 @@ cdef class cuuint64_t: Get memory address of class instance """ - cdef cydriver.cuuint64_t __val - cdef cydriver.cuuint64_t* _ptr + cdef cydriver.cuuint64_t _pvt_val + cdef cydriver.cuuint64_t* _pvt_ptr {{endif}} {{if 'CUdeviceptr_v2' in found_types}} @@ -7411,8 +10764,8 @@ cdef class CUdeviceptr_v2: Get memory address of class instance """ - cdef cydriver.CUdeviceptr_v2 __val - cdef cydriver.CUdeviceptr_v2* _ptr + cdef cydriver.CUdeviceptr_v2 _pvt_val + cdef cydriver.CUdeviceptr_v2* _pvt_ptr {{endif}} {{if 'CUdevice_v1' in found_types}} @@ -7428,8 +10781,8 @@ cdef class CUdevice_v1: Get memory address of class instance """ - cdef cydriver.CUdevice_v1 __val - cdef cydriver.CUdevice_v1* _ptr + cdef cydriver.CUdevice_v1 _pvt_val + cdef cydriver.CUdevice_v1* _pvt_ptr {{endif}} {{if 'CUtexObject_v1' in found_types}} @@ -7445,8 +10798,8 @@ cdef class CUtexObject_v1: Get memory address of class instance """ - cdef cydriver.CUtexObject_v1 __val - cdef cydriver.CUtexObject_v1* _ptr + cdef cydriver.CUtexObject_v1 _pvt_val + cdef cydriver.CUtexObject_v1* _pvt_ptr {{endif}} {{if 'CUsurfObject_v1' in found_types}} @@ -7462,8 +10815,8 @@ cdef class CUsurfObject_v1: Get memory address of class instance """ - cdef cydriver.CUsurfObject_v1 __val - cdef cydriver.CUsurfObject_v1* _ptr + cdef cydriver.CUsurfObject_v1 _pvt_val + cdef cydriver.CUsurfObject_v1* _pvt_ptr {{endif}} {{if 'CUmemGenericAllocationHandle_v1' in found_types}} @@ -7477,8 +10830,8 @@ cdef class CUmemGenericAllocationHandle_v1: Get memory address of class instance """ - cdef cydriver.CUmemGenericAllocationHandle_v1 __val - cdef cydriver.CUmemGenericAllocationHandle_v1* _ptr + cdef cydriver.CUmemGenericAllocationHandle_v1 _pvt_val + cdef cydriver.CUmemGenericAllocationHandle_v1* _pvt_ptr {{endif}} {{if True}} @@ -7492,8 +10845,8 @@ cdef class GLenum: Get memory address of class instance """ - cdef cydriver.GLenum __val - cdef cydriver.GLenum* _ptr + cdef cydriver.GLenum _pvt_val + cdef cydriver.GLenum* _pvt_ptr {{endif}} {{if True}} @@ -7507,8 +10860,8 @@ cdef class GLuint: Get memory address of class instance """ - cdef cydriver.GLuint __val - cdef cydriver.GLuint* _ptr + cdef cydriver.GLuint _pvt_val + cdef cydriver.GLuint* _pvt_ptr {{endif}} {{if True}} @@ -7522,8 +10875,8 @@ cdef class EGLint: Get memory address of class instance """ - cdef cydriver.EGLint __val - cdef cydriver.EGLint* _ptr + cdef cydriver.EGLint _pvt_val + cdef cydriver.EGLint* _pvt_ptr {{endif}} {{if True}} @@ -7537,8 +10890,8 @@ cdef class VdpDevice: Get memory address of class instance """ - cdef cydriver.VdpDevice __val - cdef cydriver.VdpDevice* _ptr + cdef cydriver.VdpDevice _pvt_val + cdef cydriver.VdpDevice* _pvt_ptr {{endif}} {{if True}} @@ -7552,8 +10905,8 @@ cdef class VdpGetProcAddress: Get memory address of class instance """ - cdef cydriver.VdpGetProcAddress __val - cdef cydriver.VdpGetProcAddress* _ptr + cdef cydriver.VdpGetProcAddress _pvt_val + cdef cydriver.VdpGetProcAddress* _pvt_ptr {{endif}} {{if True}} @@ -7567,8 +10920,8 @@ cdef class VdpVideoSurface: Get memory address of class instance """ - cdef cydriver.VdpVideoSurface __val - cdef cydriver.VdpVideoSurface* _ptr + cdef cydriver.VdpVideoSurface _pvt_val + cdef cydriver.VdpVideoSurface* _pvt_ptr {{endif}} {{if True}} @@ -7582,6 +10935,6 @@ cdef class VdpOutputSurface: Get memory address of class instance """ - cdef cydriver.VdpOutputSurface __val - cdef cydriver.VdpOutputSurface* _ptr + cdef cydriver.VdpOutputSurface _pvt_val + cdef cydriver.VdpOutputSurface* _pvt_ptr {{endif}} diff --git a/cuda_bindings/cuda/bindings/driver.pyx.in b/cuda_bindings/cuda/bindings/driver.pyx.in index 8bbdd9806..6be529571 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx.in +++ b/cuda_bindings/cuda/bindings/driver.pyx.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. from typing import List, Tuple, Any, Optional from enum import IntEnum import cython @@ -96,6 +98,8 @@ CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = cydriver.CU_KERNEL_NODE_ATTRIBUTE CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN +CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = cydriver.CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION + CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = cydriver.CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = cydriver.CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT @@ -200,6 +204,14 @@ CUDA_NVSCISYNC_ATTR_WAIT = cydriver.CUDA_NVSCISYNC_ATTR_WAIT #: This flag if set indicates that the memory will be used as a tile pool. CU_MEM_CREATE_USAGE_TILE_POOL = cydriver.CU_MEM_CREATE_USAGE_TILE_POOL +#: This flag, if set, indicates that the memory will be used as a buffer +#: for hardware accelerated decompression. +CU_MEM_CREATE_USAGE_HW_DECOMPRESS = cydriver.CU_MEM_CREATE_USAGE_HW_DECOMPRESS + +#: This flag, if set, indicates that the memory will be used as a buffer +#: for hardware accelerated decompression. +CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = cydriver.CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS + #: If set, each kernel launched as part of #: :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` only waits for prior #: work in the stream corresponding to that GPU to complete before the @@ -743,6 +755,10 @@ class CUarray_format(IntEnum): #: 32-bit floating point CU_AD_FORMAT_FLOAT = cydriver.CUarray_format_enum.CU_AD_FORMAT_FLOAT{{endif}} + {{if 'CU_AD_FORMAT_UNORM_INT_101010_2' in found_values}} + + #: 4 channel unorm R10G10B10A2 RGB format + CU_AD_FORMAT_UNORM_INT_101010_2 = cydriver.CUarray_format_enum.CU_AD_FORMAT_UNORM_INT_101010_2{{endif}} {{if 'CU_AD_FORMAT_BC1_UNORM' in found_values}} #: 4 channel unsigned normalized block-compressed (BC1 compression) @@ -869,6 +885,14 @@ class CUarray_format(IntEnum): #: 3 channel 10-bit YUV planar format, with 4:4:4 sampling CU_AD_FORMAT_Y444_PLANAR10 = cydriver.CUarray_format_enum.CU_AD_FORMAT_Y444_PLANAR10{{endif}} + {{if 'CU_AD_FORMAT_YUV444_8bit_SemiPlanar' in found_values}} + + #: 3 channel 8-bit YUV semi-planar format, with 4:4:4 sampling + CU_AD_FORMAT_YUV444_8bit_SemiPlanar = cydriver.CUarray_format_enum.CU_AD_FORMAT_YUV444_8bit_SemiPlanar{{endif}} + {{if 'CU_AD_FORMAT_YUV444_16bit_SemiPlanar' in found_values}} + + #: 3 channel 16-bit YUV semi-planar format, with 4:4:4 sampling + CU_AD_FORMAT_YUV444_16bit_SemiPlanar = cydriver.CUarray_format_enum.CU_AD_FORMAT_YUV444_16bit_SemiPlanar{{endif}} {{if 'CU_AD_FORMAT_UNORM_INT8X1' in found_values}} #: 1 channel unsigned 8-bit normalized integer @@ -1572,6 +1596,31 @@ class CUdevice_attribute(IntEnum): #: Device supports CIG with D3D12. CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED{{endif}} + {{if 'CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK' in found_values}} + + #: The returned valued shall be interpreted as a bitmask, where the + #: individual bits are described by the + #: :py:obj:`~.CUmemDecompressAlgorithm` enum. + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK{{endif}} + {{if 'CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH' in found_values}} + + #: The returned valued is the maximum length in bytes of a single + #: decompress operation that is allowed. + CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH{{endif}} + {{if 'CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID' in found_values}} + + #: The combined 16-bit PCI device ID and 16-bit PCI vendor ID. + CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID{{endif}} + {{if 'CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID' in found_values}} + + #: The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor + #: ID. + CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID{{endif}} + {{if 'CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED' in found_values}} + + #: Device supports HOST_NUMA location IPC between nodes in a multi-node + #: system. + CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED{{endif}} {{if 'CU_DEVICE_ATTRIBUTE_MAX' in found_values}} CU_DEVICE_ATTRIBUTE_MAX = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX{{endif}} {{endif}} @@ -1674,6 +1723,12 @@ class CUpointer_attribute(IntEnum): #: A process-wide unique id corresponding to the physical allocation #: the pointer belongs to CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID{{endif}} + {{if 'CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE' in found_values}} + + #: Returns in `*data` a boolean that indicates whether the pointer + #: points to memory that is capable to be used for hardware accelerated + #: decompression. + CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE = cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE{{endif}} {{endif}} {{if 'CUfunction_attribute_enum' in found_types}} @@ -2336,11 +2391,35 @@ class CUjit_target(IntEnum): CU_TARGET_COMPUTE_89 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_89{{endif}} {{if 'CU_TARGET_COMPUTE_90' in found_values}} - #: Compute device class 9.0. Compute device class 9.0. with accelerated - #: features. + #: Compute device class 9.0. CU_TARGET_COMPUTE_90 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_90{{endif}} + {{if 'CU_TARGET_COMPUTE_100' in found_values}} + + #: Compute device class 10.0. + CU_TARGET_COMPUTE_100 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_100{{endif}} + {{if 'CU_TARGET_COMPUTE_101' in found_values}} + + #: Compute device class 10.1. + CU_TARGET_COMPUTE_101 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_101{{endif}} + {{if 'CU_TARGET_COMPUTE_120' in found_values}} + + #: Compute device class 12.0. Compute device class 9.0. with + #: accelerated features. + CU_TARGET_COMPUTE_120 = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_120{{endif}} {{if 'CU_TARGET_COMPUTE_90A' in found_values}} + + #: Compute device class 10.0. with accelerated features. CU_TARGET_COMPUTE_90A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_90A{{endif}} + {{if 'CU_TARGET_COMPUTE_100A' in found_values}} + + #: Compute device class 10.1 with accelerated features. + CU_TARGET_COMPUTE_100A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_100A{{endif}} + {{if 'CU_TARGET_COMPUTE_101A' in found_values}} + + #: Compute device class 12.0. with accelerated features. + CU_TARGET_COMPUTE_101A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_101A{{endif}} + {{if 'CU_TARGET_COMPUTE_120A' in found_values}} + CU_TARGET_COMPUTE_120A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_120A{{endif}} {{endif}} {{if 'CUjit_fallback_enum' in found_types}} @@ -2528,9 +2607,9 @@ class CUlimit(IntEnum): CU_LIMIT_CIG_ENABLED = cydriver.CUlimit_enum.CU_LIMIT_CIG_ENABLED{{endif}} {{if 'CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED' in found_values}} - #: When set to a non-zero value, CUDA will fail to launch a kernel on a - #: CIG context, instead of using the fallback path, if the kernel uses - #: more shared memory than available + #: When set to zero, CUDA will fail to launch a kernel on a CIG + #: context, instead of using the fallback path, if the kernel uses more + #: shared memory than available CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED = cydriver.CUlimit_enum.CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED{{endif}} {{if 'CU_LIMIT_MAX' in found_values}} CU_LIMIT_MAX = cydriver.CUlimit_enum.CU_LIMIT_MAX{{endif}} @@ -2586,14 +2665,21 @@ class CUgraphConditionalNodeType(IntEnum): """ {{if 'CU_GRAPH_COND_TYPE_IF' in found_values}} - #: Conditional 'if' Node. Body executed once if condition value is non- - #: zero. + #: Conditional 'if/else' Node. Body[0] executed if condition is non- + #: zero. If `size` == 2, an optional ELSE graph is created and this is + #: executed if the condition is zero. CU_GRAPH_COND_TYPE_IF = cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_IF{{endif}} {{if 'CU_GRAPH_COND_TYPE_WHILE' in found_values}} #: Conditional 'while' Node. Body executed repeatedly while condition #: value is non-zero. CU_GRAPH_COND_TYPE_WHILE = cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_WHILE{{endif}} + {{if 'CU_GRAPH_COND_TYPE_SWITCH' in found_values}} + + #: Conditional 'switch' Node. Body[n] is executed once, where 'n' is + #: the value of the condition. If the condition does not match a body + #: index, no body is launched. + CU_GRAPH_COND_TYPE_SWITCH = cydriver.CUgraphConditionalNodeType_enum.CU_GRAPH_COND_TYPE_SWITCH{{endif}} {{endif}} {{if 'CUgraphNodeType_enum' in found_types}} @@ -2731,6 +2817,11 @@ class CUgraphInstantiateResult(IntEnum): #: Instantiation for device launch failed due to the nodes belonging to #: different contexts CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED{{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED' in found_values}} + + #: One or more conditional handles are not associated with conditional + #: nodes + CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED = cydriver.CUgraphInstantiateResult_enum.CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED{{endif}} {{endif}} {{if 'CUsynchronizationPolicy_enum' in found_types}} @@ -2887,6 +2978,41 @@ class CUlaunchAttributeID(IntEnum): #: Valid for streams, graph nodes, launches. See #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomain`. CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN{{endif}} + {{if 'CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION' in found_values}} + + #: Valid for graph nodes, launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the + #: kernel launch to specify a preferred substitute cluster dimension. + #: Blocks may be grouped according to either the dimensions specified + #: with this attribute (grouped into a "preferred substitute cluster"), + #: or the one specified with + #: :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION{{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT' in found_values}} #: Valid for launches. Set @@ -3277,6 +3403,16 @@ class CUresult(IntEnum): #: This indicates that the code to be compiled by the PTX JIT contains #: unsupported call to cudaDeviceSynchronize. CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC = cydriver.cudaError_enum.CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC{{endif}} + {{if 'CUDA_ERROR_CONTAINED' in found_values}} + + #: This indicates that an exception occurred on the device that is now + #: contained by the GPU's error containment capability. Common causes + #: are - a. Certain types of invalid accesses of peer GPU memory over + #: nvlink b. Certain classes of hardware errors This leaves the process + #: in an inconsistent state and any further CUDA work will return the + #: same error. To continue using CUDA, the process must be terminated + #: and relaunched. + CUDA_ERROR_CONTAINED = cydriver.cudaError_enum.CUDA_ERROR_CONTAINED{{endif}} {{if 'CUDA_ERROR_INVALID_SOURCE' in found_values}} #: This indicates that the device kernel source is invalid. This @@ -3474,6 +3610,14 @@ class CUresult(IntEnum): #: times the number of multiprocessors as specified by the device #: attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`. CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = cydriver.cudaError_enum.CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE{{endif}} + {{if 'CUDA_ERROR_TENSOR_MEMORY_LEAK' in found_values}} + + #: An exception occurred on the device while exiting a kernel using + #: tensor memory: the tensor memory was not completely deallocated. + #: This leaves the process in an inconsistent state and any further + #: CUDA work will return the same error. To continue using CUDA, the + #: process must be terminated and relaunched. + CUDA_ERROR_TENSOR_MEMORY_LEAK = cydriver.cudaError_enum.CUDA_ERROR_TENSOR_MEMORY_LEAK{{endif}} {{if 'CUDA_ERROR_NOT_PERMITTED' in found_values}} #: This error indicates that the attempted operation is not permitted. @@ -3637,6 +3781,11 @@ class CUresult(IntEnum): #: This error indicates one or more resources are insufficient or non- #: applicable for the operation. CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION = cydriver.cudaError_enum.CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION{{endif}} + {{if 'CUDA_ERROR_KEY_ROTATION' in found_values}} + + #: This error indicates that an error happened during the key rotation + #: sequence. + CUDA_ERROR_KEY_ROTATION = cydriver.cudaError_enum.CUDA_ERROR_KEY_ROTATION{{endif}} {{if 'CUDA_ERROR_UNKNOWN' in found_values}} #: This indicates that an unknown internal error has occurred. @@ -3849,6 +3998,12 @@ class CUtensorMapDataType(IntEnum): CU_TENSOR_MAP_DATA_TYPE_TFLOAT32 = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_TFLOAT32{{endif}} {{if 'CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ' in found_values}} CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ{{endif}} + {{if 'CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B' in found_values}} + CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B{{endif}} + {{if 'CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B' in found_values}} + CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B{{endif}} + {{if 'CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B' in found_values}} + CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B = cydriver.CUtensorMapDataType_enum.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B{{endif}} {{endif}} {{if 'CUtensorMapInterleave_enum' in found_types}} @@ -3877,6 +4032,12 @@ class CUtensorMapSwizzle(IntEnum): CU_TENSOR_MAP_SWIZZLE_64B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_64B{{endif}} {{if 'CU_TENSOR_MAP_SWIZZLE_128B' in found_values}} CU_TENSOR_MAP_SWIZZLE_128B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_128B{{endif}} + {{if 'CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B' in found_values}} + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B{{endif}} + {{if 'CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B_FLIP_8B' in found_values}} + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B_FLIP_8B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B_FLIP_8B{{endif}} + {{if 'CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B' in found_values}} + CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B = cydriver.CUtensorMapSwizzle_enum.CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B{{endif}} {{endif}} {{if 'CUtensorMapL2promotion_enum' in found_types}} @@ -3904,6 +4065,17 @@ class CUtensorMapFloatOOBfill(IntEnum): {{if 'CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA' in found_values}} CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA = cydriver.CUtensorMapFloatOOBfill_enum.CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA{{endif}} {{endif}} +{{if 'CUtensorMapIm2ColWideMode_enum' in found_types}} + +class CUtensorMapIm2ColWideMode(IntEnum): + """ + Tensor map Im2Col wide mode + """ + {{if 'CU_TENSOR_MAP_IM2COL_WIDE_MODE_W' in found_values}} + CU_TENSOR_MAP_IM2COL_WIDE_MODE_W = cydriver.CUtensorMapIm2ColWideMode_enum.CU_TENSOR_MAP_IM2COL_WIDE_MODE_W{{endif}} + {{if 'CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128' in found_values}} + CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128 = cydriver.CUtensorMapIm2ColWideMode_enum.CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128{{endif}} +{{endif}} {{if 'CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum' in found_types}} class CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS(IntEnum): @@ -4137,6 +4309,17 @@ class CUmemRangeHandleType(IntEnum): {{if 'CU_MEM_RANGE_HANDLE_TYPE_MAX' in found_values}} CU_MEM_RANGE_HANDLE_TYPE_MAX = cydriver.CUmemRangeHandleType_enum.CU_MEM_RANGE_HANDLE_TYPE_MAX{{endif}} {{endif}} +{{if 'CUmemRangeFlags_enum' in found_types}} + +class CUmemRangeFlags(IntEnum): + """ + Flag for requesting handle type for address range. + """ + {{if 'CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE' in found_values}} + + #: Indicates that DMA_BUF handle should be mapped via PCIe BAR1 + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE = cydriver.CUmemRangeFlags_enum.CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE{{endif}} +{{endif}} {{if 'CUarraySparseSubresourceType_enum' in found_types}} class CUarraySparseSubresourceType(IntEnum): @@ -4541,6 +4724,104 @@ class CUdeviceNumaConfig(IntEnum): #: NUMA ID CU_DEVICE_NUMA_CONFIG_NUMA_NODE = cydriver.CUdeviceNumaConfig_enum.CU_DEVICE_NUMA_CONFIG_NUMA_NODE{{endif}} {{endif}} +{{if 'CUprocessState_enum' in found_types}} + +class CUprocessState(IntEnum): + """ + CUDA Process States + """ + {{if 'CU_PROCESS_STATE_RUNNING' in found_values}} + + #: Default process state + CU_PROCESS_STATE_RUNNING = cydriver.CUprocessState_enum.CU_PROCESS_STATE_RUNNING{{endif}} + {{if 'CU_PROCESS_STATE_LOCKED' in found_values}} + + #: CUDA API locks are taken so further CUDA API calls will block + CU_PROCESS_STATE_LOCKED = cydriver.CUprocessState_enum.CU_PROCESS_STATE_LOCKED{{endif}} + {{if 'CU_PROCESS_STATE_CHECKPOINTED' in found_values}} + + #: Application memory contents have been checkpointed and underlying + #: allocations and device handles have been released + CU_PROCESS_STATE_CHECKPOINTED = cydriver.CUprocessState_enum.CU_PROCESS_STATE_CHECKPOINTED{{endif}} + {{if 'CU_PROCESS_STATE_FAILED' in found_values}} + + #: Application entered an uncorrectable error during the + #: checkpoint/restore process + CU_PROCESS_STATE_FAILED = cydriver.CUprocessState_enum.CU_PROCESS_STATE_FAILED{{endif}} +{{endif}} +{{if 'CUmemcpyFlags_enum' in found_types}} + +class CUmemcpyFlags(IntEnum): + """ + Flags to specify for copies within a batch. For more details see + :py:obj:`~.cuMemcpyBatchAsync`. + """ + {{if 'CU_MEMCPY_FLAG_DEFAULT' in found_values}} + CU_MEMCPY_FLAG_DEFAULT = cydriver.CUmemcpyFlags_enum.CU_MEMCPY_FLAG_DEFAULT{{endif}} + {{if 'CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE' in found_values}} + + #: Hint to the driver to try and overlap the copy with compute work on + #: the SMs. + CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE = cydriver.CUmemcpyFlags_enum.CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE{{endif}} +{{endif}} +{{if 'CUmemcpySrcAccessOrder_enum' in found_types}} + +class CUmemcpySrcAccessOrder(IntEnum): + """ + These flags allow applications to convey the source access ordering + CUDA must maintain. The destination will always be accessed in + stream order. + """ + {{if 'CU_MEMCPY_SRC_ACCESS_ORDER_INVALID' in found_values}} + + #: Default invalid. + CU_MEMCPY_SRC_ACCESS_ORDER_INVALID = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_INVALID{{endif}} + {{if 'CU_MEMCPY_SRC_ACCESS_ORDER_STREAM' in found_values}} + + #: Indicates that access to the source pointer must be in stream order. + CU_MEMCPY_SRC_ACCESS_ORDER_STREAM = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_STREAM{{endif}} + {{if 'CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL' in found_values}} + + #: Indicates that access to the source pointer can be out of stream + #: order and all accesses must be complete before the API call returns. + #: This flag is suited for ephemeral sources (ex., stack variables) + #: when it's known that no prior operations in the stream can be + #: accessing the memory and also that the lifetime of the memory is + #: limited to the scope that the source variable was declared in. + #: Specifying this flag allows the driver to optimize the copy and + #: removes the need for the user to synchronize the stream after the + #: API call. + CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL{{endif}} + {{if 'CU_MEMCPY_SRC_ACCESS_ORDER_ANY' in found_values}} + + #: Indicates that access to the source pointer can be out of stream + #: order and the accesses can happen even after the API call returns. + #: This flag is suited for host pointers allocated outside CUDA (ex., + #: via malloc) when it's known that no prior operations in the stream + #: can be accessing the memory. Specifying this flag allows the driver + #: to optimize the copy on certain platforms. + CU_MEMCPY_SRC_ACCESS_ORDER_ANY = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_ANY{{endif}} + {{if 'CU_MEMCPY_SRC_ACCESS_ORDER_MAX' in found_values}} + CU_MEMCPY_SRC_ACCESS_ORDER_MAX = cydriver.CUmemcpySrcAccessOrder_enum.CU_MEMCPY_SRC_ACCESS_ORDER_MAX{{endif}} +{{endif}} +{{if 'CUmemcpy3DOperandType_enum' in found_types}} + +class CUmemcpy3DOperandType(IntEnum): + """ + These flags allow applications to convey the operand type for + individual copies specified in :py:obj:`~.cuMemcpy3DBatchAsync`. + """ + {{if 'CU_MEMCPY_OPERAND_TYPE_POINTER' in found_values}} + + #: Memcpy operand is a valid pointer. + CU_MEMCPY_OPERAND_TYPE_POINTER = cydriver.CUmemcpy3DOperandType_enum.CU_MEMCPY_OPERAND_TYPE_POINTER{{endif}} + {{if 'CU_MEMCPY_OPERAND_TYPE_ARRAY' in found_values}} + + #: Memcpy operand is a CUarray. + CU_MEMCPY_OPERAND_TYPE_ARRAY = cydriver.CUmemcpy3DOperandType_enum.CU_MEMCPY_OPERAND_TYPE_ARRAY{{endif}} + {{if 'CU_MEMCPY_OPERAND_TYPE_MAX' in found_values}} + CU_MEMCPY_OPERAND_TYPE_MAX = cydriver.CUmemcpy3DOperandType_enum.CU_MEMCPY_OPERAND_TYPE_MAX{{endif}} +{{endif}} {{if 'CUmoduleLoadingMode_enum' in found_types}} class CUmoduleLoadingMode(IntEnum): @@ -4556,6 +4837,25 @@ class CUmoduleLoadingMode(IntEnum): #: Lazy Kernel Loading is enabled CU_MODULE_LAZY_LOADING = cydriver.CUmoduleLoadingMode_enum.CU_MODULE_LAZY_LOADING{{endif}} {{endif}} +{{if 'CUmemDecompressAlgorithm_enum' in found_types}} + +class CUmemDecompressAlgorithm(IntEnum): + """ + Bitmasks for CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK. + """ + {{if 'CU_MEM_DECOMPRESS_UNSUPPORTED' in found_values}} + + #: Decompression is unsupported. + CU_MEM_DECOMPRESS_UNSUPPORTED = cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_UNSUPPORTED{{endif}} + {{if 'CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE' in found_values}} + + #: Deflate is supported. + CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE = cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE{{endif}} + {{if 'CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY' in found_values}} + + #: Snappy is supported. + CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY = cydriver.CUmemDecompressAlgorithm_enum.CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY{{endif}} +{{endif}} {{if 'CUfunctionLoadingState_enum' in found_types}} class CUfunctionLoadingState(IntEnum): @@ -5268,6 +5568,19 @@ class CUeglColorFormat(IntEnum): #: width = Y width, U/V height = Y height. CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER{{endif}} {{if True}} + + #: Y, U, V in one surface, interleaved as UYVY in one channel. + CU_EGL_COLOR_FORMAT_UYVY_709 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709{{endif}} + {{if True}} + + #: Extended Range Y, U, V in one surface, interleaved as UYVY in one + #: channel. + CU_EGL_COLOR_FORMAT_UYVY_709_ER = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_709_ER{{endif}} + {{if True}} + + #: Y, U, V in one surface, interleaved as UYVY in one channel. + CU_EGL_COLOR_FORMAT_UYVY_2020 = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_UYVY_2020{{endif}} + {{if True}} CU_EGL_COLOR_FORMAT_MAX = cydriver.CUeglColorFormat_enum.CU_EGL_COLOR_FORMAT_MAX{{endif}} {{endif}} {{if True}} @@ -5319,19 +5632,19 @@ cdef class CUdeviceptr: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUdevice' in found_types}} @@ -5349,19 +5662,19 @@ cdef class CUdevice: """ def __cinit__(self, int init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUtexObject' in found_types}} @@ -5379,19 +5692,19 @@ cdef class CUtexObject: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUsurfObject' in found_types}} @@ -5409,19 +5722,19 @@ cdef class CUsurfObject: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUgraphConditionalHandle' in found_types}} @@ -5437,19 +5750,19 @@ cdef class CUgraphConditionalHandle: """ def __cinit__(self, uint64_t init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUlaunchAttributeID_enum' in found_types}} @@ -5539,6 +5852,41 @@ class CUkernelNodeAttrID(IntEnum): #: Valid for streams, graph nodes, launches. See #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomain`. CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN{{endif}} + {{if 'CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION' in found_values}} + + #: Valid for graph nodes, launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the + #: kernel launch to specify a preferred substitute cluster dimension. + #: Blocks may be grouped according to either the dimensions specified + #: with this attribute (grouped into a "preferred substitute cluster"), + #: or the one specified with + #: :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION{{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT' in found_values}} #: Valid for launches. Set @@ -5694,6 +6042,41 @@ class CUstreamAttrID(IntEnum): #: Valid for streams, graph nodes, launches. See #: :py:obj:`~.CUlaunchAttributeValue.memSyncDomain`. CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN{{endif}} + {{if 'CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION' in found_values}} + + #: Valid for graph nodes, launches. Set + #: :py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the + #: kernel launch to specify a preferred substitute cluster dimension. + #: Blocks may be grouped according to either the dimensions specified + #: with this attribute (grouped into a "preferred substitute cluster"), + #: or the one specified with + #: :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION = cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION{{endif}} {{if 'CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT' in found_values}} #: Valid for launches. Set @@ -5775,19 +6158,19 @@ cdef class CUmemGenericAllocationHandle: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUcontext' in found_types}} @@ -5805,10 +6188,10 @@ cdef class CUcontext: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -5816,9 +6199,9 @@ cdef class CUcontext: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUmodule' in found_types}} @@ -5836,10 +6219,10 @@ cdef class CUmodule: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -5847,9 +6230,9 @@ cdef class CUmodule: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUfunction' in found_types}} @@ -5867,10 +6250,10 @@ cdef class CUfunction: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -5878,9 +6261,9 @@ cdef class CUfunction: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUlibrary' in found_types}} @@ -5898,10 +6281,10 @@ cdef class CUlibrary: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -5909,9 +6292,9 @@ cdef class CUlibrary: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUkernel' in found_types}} @@ -5929,10 +6312,10 @@ cdef class CUkernel: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -5940,9 +6323,9 @@ cdef class CUkernel: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUarray' in found_types}} @@ -5960,10 +6343,10 @@ cdef class CUarray: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -5971,9 +6354,9 @@ cdef class CUarray: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUmipmappedArray' in found_types}} @@ -5991,10 +6374,10 @@ cdef class CUmipmappedArray: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6002,9 +6385,9 @@ cdef class CUmipmappedArray: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUtexref' in found_types}} @@ -6022,10 +6405,10 @@ cdef class CUtexref: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6033,9 +6416,9 @@ cdef class CUtexref: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUsurfref' in found_types}} @@ -6053,10 +6436,10 @@ cdef class CUsurfref: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6064,9 +6447,9 @@ cdef class CUsurfref: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUevent' in found_types}} @@ -6084,10 +6467,10 @@ cdef class CUevent: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6095,9 +6478,9 @@ cdef class CUevent: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUstream' in found_types}} @@ -6115,10 +6498,10 @@ cdef class CUstream: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6126,9 +6509,9 @@ cdef class CUstream: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUgraphicsResource' in found_types}} @@ -6146,10 +6529,10 @@ cdef class CUgraphicsResource: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6157,9 +6540,9 @@ cdef class CUgraphicsResource: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUexternalMemory' in found_types}} @@ -6177,10 +6560,10 @@ cdef class CUexternalMemory: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6188,9 +6571,9 @@ cdef class CUexternalMemory: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUexternalSemaphore' in found_types}} @@ -6208,10 +6591,10 @@ cdef class CUexternalSemaphore: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6219,9 +6602,9 @@ cdef class CUexternalSemaphore: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUgraph' in found_types}} @@ -6239,10 +6622,10 @@ cdef class CUgraph: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6250,9 +6633,9 @@ cdef class CUgraph: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUgraphNode' in found_types}} @@ -6270,10 +6653,10 @@ cdef class CUgraphNode: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6281,9 +6664,9 @@ cdef class CUgraphNode: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUgraphExec' in found_types}} @@ -6301,10 +6684,10 @@ cdef class CUgraphExec: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6312,9 +6695,9 @@ cdef class CUgraphExec: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUmemoryPool' in found_types}} @@ -6332,10 +6715,10 @@ cdef class CUmemoryPool: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6343,9 +6726,9 @@ cdef class CUmemoryPool: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUuserObject' in found_types}} @@ -6363,10 +6746,10 @@ cdef class CUuserObject: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6374,9 +6757,9 @@ cdef class CUuserObject: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUgraphDeviceNode' in found_types}} @@ -6394,10 +6777,10 @@ cdef class CUgraphDeviceNode: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6405,9 +6788,9 @@ cdef class CUgraphDeviceNode: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUasyncCallbackHandle' in found_types}} @@ -6425,10 +6808,10 @@ cdef class CUasyncCallbackHandle: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6436,9 +6819,9 @@ cdef class CUasyncCallbackHandle: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUgreenCtx' in found_types}} @@ -6456,10 +6839,10 @@ cdef class CUgreenCtx: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6467,9 +6850,9 @@ cdef class CUgreenCtx: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUlinkState' in found_types}} @@ -6485,10 +6868,10 @@ cdef class CUlinkState: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): self._keepalive = [] def __repr__(self): @@ -6496,9 +6879,9 @@ cdef class CUlinkState: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUdevResourceDesc' in found_types}} @@ -6516,10 +6899,10 @@ cdef class CUdevResourceDesc: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6527,9 +6910,9 @@ cdef class CUdevResourceDesc: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -6547,10 +6930,10 @@ cdef class CUeglStreamConnection: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6558,9 +6941,9 @@ cdef class CUeglStreamConnection: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -6576,10 +6959,10 @@ cdef class EGLImageKHR: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6587,9 +6970,9 @@ cdef class EGLImageKHR: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -6605,10 +6988,10 @@ cdef class EGLStreamKHR: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6616,9 +6999,9 @@ cdef class EGLStreamKHR: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -6634,10 +7017,10 @@ cdef class EGLSyncKHR: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6645,9 +7028,9 @@ cdef class EGLSyncKHR: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUasyncCallback' in found_types}} @@ -6663,10 +7046,10 @@ cdef class CUasyncCallback: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6674,9 +7057,9 @@ cdef class CUasyncCallback: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUhostFn' in found_types}} @@ -6692,10 +7075,10 @@ cdef class CUhostFn: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6703,9 +7086,9 @@ cdef class CUhostFn: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUstreamCallback' in found_types}} @@ -6721,10 +7104,10 @@ cdef class CUstreamCallback: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6732,9 +7115,9 @@ cdef class CUstreamCallback: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUoccupancyB2DSize' in found_types}} @@ -6750,10 +7133,10 @@ cdef class CUoccupancyB2DSize: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -6761,53 +7144,57 @@ cdef class CUoccupancyB2DSize: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} -{{if 'struct CUuuid_st' in found_types}} +{{if 'CUuuid_st' in found_struct}} cdef class CUuuid_st: """ Attributes ---------- + {{if 'CUuuid_st.bytes' in found_struct}} bytes : bytes < CUDA definition of UUID + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUuuid_st.bytes' in found_struct}} try: str_list += ['bytes : ' + str(self.bytes.hex())] except ValueError: str_list += ['bytes : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUuuid_st.bytes' in found_struct}} @property def bytes(self): - return PyBytes_FromStringAndSize(self._ptr[0].bytes, 16) - + return PyBytes_FromStringAndSize(self._pvt_ptr[0].bytes, 16) + {{endif}} {{endif}} -{{if 'struct CUmemFabricHandle_st' in found_types}} +{{if 'CUmemFabricHandle_st' in found_struct}} cdef class CUmemFabricHandle_st: """ @@ -6818,47 +7205,52 @@ cdef class CUmemFabricHandle_st: Attributes ---------- + {{if 'CUmemFabricHandle_st.data' in found_struct}} data : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUmemFabricHandle_st.data' in found_struct}} try: str_list += ['data : ' + str(self.data)] except ValueError: str_list += ['data : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUmemFabricHandle_st.data' in found_struct}} @property def data(self): - return PyBytes_FromStringAndSize(self._ptr[0].data, 64) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].data, 64) @data.setter def data(self, data): if len(data) != 64: raise ValueError("data length must be 64, is " + str(len(data))) for i, b in enumerate(data): - self._ptr[0].data[i] = b + self._pvt_ptr[0].data[i] = b + {{endif}} {{endif}} -{{if 'struct CUipcEventHandle_st' in found_types}} +{{if 'CUipcEventHandle_st' in found_struct}} cdef class CUipcEventHandle_st: """ @@ -6866,39 +7258,43 @@ cdef class CUipcEventHandle_st: Attributes ---------- + {{if 'CUipcEventHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUipcEventHandle_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUipcEventHandle_st.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) @reserved.setter def reserved(self, reserved): if len(reserved) != 64: @@ -6907,14 +7303,15 @@ cdef class CUipcEventHandle_st: for i, b in enumerate(reserved): if b < 0 and b > -129: b = b + 256 - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b else: for i, b in enumerate(reserved): if b > 127 and b < 256: b = b - 256 - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b + {{endif}} {{endif}} -{{if 'struct CUipcMemHandle_st' in found_types}} +{{if 'CUipcMemHandle_st' in found_struct}} cdef class CUipcMemHandle_st: """ @@ -6922,39 +7319,43 @@ cdef class CUipcMemHandle_st: Attributes ---------- + {{if 'CUipcMemHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUipcMemHandle_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUipcMemHandle_st.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) @reserved.setter def reserved(self, reserved): if len(reserved) != 64: @@ -6963,86 +7364,122 @@ cdef class CUipcMemHandle_st: for i, b in enumerate(reserved): if b < 0 and b > -129: b = b + 256 - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b else: for i, b in enumerate(reserved): if b > 127 and b < 256: b = b - 256 - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b + {{endif}} {{endif}} -{{if 'union CUstreamBatchMemOpParams_union' in found_types}} +{{if 'CUstreamBatchMemOpParams_union.waitValue' in found_struct}} cdef class CUstreamMemOpWaitValueParams_st: """ Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.waitValue.operation' in found_struct}} operation : CUstreamBatchMemOpType + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.address' in found_struct}} address : CUdeviceptr + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value' in found_struct}} value : cuuint32_t + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value64' in found_struct}} value64 : cuuint64_t + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.flags' in found_struct}} flags : unsigned int + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.alias' in found_struct}} alias : CUdeviceptr For driver internal use. Initial value is unimportant. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._address = CUdeviceptr(_ptr=&self._ptr[0].waitValue.address) - self._value = cuuint32_t(_ptr=&self._ptr[0].waitValue.value) - self._value64 = cuuint64_t(_ptr=&self._ptr[0].waitValue.value64) - self._alias = CUdeviceptr(_ptr=&self._ptr[0].waitValue.alias) + pass + {{if 'CUstreamBatchMemOpParams_union.waitValue.address' in found_struct}} + self._address = CUdeviceptr(_ptr=&self._pvt_ptr[0].waitValue.address) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value' in found_struct}} + self._value = cuuint32_t(_ptr=&self._pvt_ptr[0].waitValue.value) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value64' in found_struct}} + self._value64 = cuuint64_t(_ptr=&self._pvt_ptr[0].waitValue.value64) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.alias' in found_struct}} + self._alias = CUdeviceptr(_ptr=&self._pvt_ptr[0].waitValue.alias) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].waitValue + return &self._pvt_ptr[0].waitValue def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUstreamBatchMemOpParams_union.waitValue.operation' in found_struct}} try: str_list += ['operation : ' + str(self.operation)] except ValueError: str_list += ['operation : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.address' in found_struct}} try: str_list += ['address : ' + str(self.address)] except ValueError: str_list += ['address : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value' in found_struct}} try: str_list += ['value : ' + str(self.value)] except ValueError: str_list += ['value : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value64' in found_struct}} try: str_list += ['value64 : ' + str(self.value64)] except ValueError: str_list += ['value64 : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.alias' in found_struct}} try: str_list += ['alias : ' + str(self.alias)] except ValueError: str_list += ['alias : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUstreamBatchMemOpParams_union.waitValue.operation' in found_struct}} @property def operation(self): - return CUstreamBatchMemOpType(self._ptr[0].waitValue.operation) + return CUstreamBatchMemOpType(self._pvt_ptr[0].waitValue.operation) @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): - self._ptr[0].waitValue.operation = operation.value + self._pvt_ptr[0].waitValue.operation = operation.value + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.address' in found_struct}} @property def address(self): return self._address @@ -7057,8 +7494,10 @@ cdef class CUstreamMemOpWaitValueParams_st: else: paddress = int(CUdeviceptr(address)) cyaddress = paddress - self._address._ptr[0] = cyaddress + self._address._pvt_ptr[0] = cyaddress + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value' in found_struct}} @property def value(self): return self._value @@ -7073,8 +7512,10 @@ cdef class CUstreamMemOpWaitValueParams_st: else: pvalue = int(cuuint32_t(value)) cyvalue = pvalue - self._value._ptr[0] = cyvalue + self._value._pvt_ptr[0] = cyvalue + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.value64' in found_struct}} @property def value64(self): return self._value64 @@ -7089,14 +7530,18 @@ cdef class CUstreamMemOpWaitValueParams_st: else: pvalue64 = int(cuuint64_t(value64)) cyvalue64 = pvalue64 - self._value64._ptr[0] = cyvalue64 + self._value64._pvt_ptr[0] = cyvalue64 + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.flags' in found_struct}} @property def flags(self): - return self._ptr[0].waitValue.flags + return self._pvt_ptr[0].waitValue.flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].waitValue.flags = flags + self._pvt_ptr[0].waitValue.flags = flags + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue.alias' in found_struct}} @property def alias(self): return self._alias @@ -7111,82 +7556,118 @@ cdef class CUstreamMemOpWaitValueParams_st: else: palias = int(CUdeviceptr(alias)) cyalias = palias - self._alias._ptr[0] = cyalias + self._alias._pvt_ptr[0] = cyalias + {{endif}} {{endif}} -{{if 'union CUstreamBatchMemOpParams_union' in found_types}} +{{if 'CUstreamBatchMemOpParams_union.writeValue' in found_struct}} cdef class CUstreamMemOpWriteValueParams_st: """ Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.writeValue.operation' in found_struct}} operation : CUstreamBatchMemOpType + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.address' in found_struct}} address : CUdeviceptr + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value' in found_struct}} value : cuuint32_t + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value64' in found_struct}} value64 : cuuint64_t + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.flags' in found_struct}} flags : unsigned int + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.alias' in found_struct}} alias : CUdeviceptr For driver internal use. Initial value is unimportant. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._address = CUdeviceptr(_ptr=&self._ptr[0].writeValue.address) - self._value = cuuint32_t(_ptr=&self._ptr[0].writeValue.value) - self._value64 = cuuint64_t(_ptr=&self._ptr[0].writeValue.value64) - self._alias = CUdeviceptr(_ptr=&self._ptr[0].writeValue.alias) + pass + {{if 'CUstreamBatchMemOpParams_union.writeValue.address' in found_struct}} + self._address = CUdeviceptr(_ptr=&self._pvt_ptr[0].writeValue.address) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value' in found_struct}} + self._value = cuuint32_t(_ptr=&self._pvt_ptr[0].writeValue.value) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value64' in found_struct}} + self._value64 = cuuint64_t(_ptr=&self._pvt_ptr[0].writeValue.value64) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.alias' in found_struct}} + self._alias = CUdeviceptr(_ptr=&self._pvt_ptr[0].writeValue.alias) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].writeValue + return &self._pvt_ptr[0].writeValue def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUstreamBatchMemOpParams_union.writeValue.operation' in found_struct}} try: str_list += ['operation : ' + str(self.operation)] except ValueError: str_list += ['operation : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.address' in found_struct}} try: str_list += ['address : ' + str(self.address)] except ValueError: str_list += ['address : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value' in found_struct}} try: str_list += ['value : ' + str(self.value)] except ValueError: str_list += ['value : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value64' in found_struct}} try: str_list += ['value64 : ' + str(self.value64)] except ValueError: str_list += ['value64 : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.alias' in found_struct}} try: str_list += ['alias : ' + str(self.alias)] except ValueError: str_list += ['alias : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUstreamBatchMemOpParams_union.writeValue.operation' in found_struct}} @property def operation(self): - return CUstreamBatchMemOpType(self._ptr[0].writeValue.operation) + return CUstreamBatchMemOpType(self._pvt_ptr[0].writeValue.operation) @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): - self._ptr[0].writeValue.operation = operation.value + self._pvt_ptr[0].writeValue.operation = operation.value + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.address' in found_struct}} @property def address(self): return self._address @@ -7201,8 +7682,10 @@ cdef class CUstreamMemOpWriteValueParams_st: else: paddress = int(CUdeviceptr(address)) cyaddress = paddress - self._address._ptr[0] = cyaddress + self._address._pvt_ptr[0] = cyaddress + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value' in found_struct}} @property def value(self): return self._value @@ -7217,8 +7700,10 @@ cdef class CUstreamMemOpWriteValueParams_st: else: pvalue = int(cuuint32_t(value)) cyvalue = pvalue - self._value._ptr[0] = cyvalue + self._value._pvt_ptr[0] = cyvalue + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.value64' in found_struct}} @property def value64(self): return self._value64 @@ -7233,14 +7718,18 @@ cdef class CUstreamMemOpWriteValueParams_st: else: pvalue64 = int(cuuint64_t(value64)) cyvalue64 = pvalue64 - self._value64._ptr[0] = cyvalue64 + self._value64._pvt_ptr[0] = cyvalue64 + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.flags' in found_struct}} @property def flags(self): - return self._ptr[0].writeValue.flags + return self._pvt_ptr[0].writeValue.flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].writeValue.flags = flags + self._pvt_ptr[0].writeValue.flags = flags + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue.alias' in found_struct}} @property def alias(self): return self._alias @@ -7255,116 +7744,139 @@ cdef class CUstreamMemOpWriteValueParams_st: else: palias = int(CUdeviceptr(alias)) cyalias = palias - self._alias._ptr[0] = cyalias + self._alias._pvt_ptr[0] = cyalias + {{endif}} {{endif}} -{{if 'union CUstreamBatchMemOpParams_union' in found_types}} +{{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites' in found_struct}} cdef class CUstreamMemOpFlushRemoteWritesParams_st: """ Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites.operation' in found_struct}} operation : CUstreamBatchMemOpType + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites.flags' in found_struct}} flags : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].flushRemoteWrites + return &self._pvt_ptr[0].flushRemoteWrites def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites.operation' in found_struct}} try: str_list += ['operation : ' + str(self.operation)] except ValueError: str_list += ['operation : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites.operation' in found_struct}} @property def operation(self): - return CUstreamBatchMemOpType(self._ptr[0].flushRemoteWrites.operation) + return CUstreamBatchMemOpType(self._pvt_ptr[0].flushRemoteWrites.operation) @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): - self._ptr[0].flushRemoteWrites.operation = operation.value + self._pvt_ptr[0].flushRemoteWrites.operation = operation.value + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flushRemoteWrites.flags + return self._pvt_ptr[0].flushRemoteWrites.flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flushRemoteWrites.flags = flags + self._pvt_ptr[0].flushRemoteWrites.flags = flags + {{endif}} {{endif}} -{{if 'union CUstreamBatchMemOpParams_union' in found_types}} +{{if 'CUstreamBatchMemOpParams_union.memoryBarrier' in found_struct}} cdef class CUstreamMemOpMemoryBarrierParams_st: """ Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier.operation' in found_struct}} operation : CUstreamBatchMemOpType < Only supported in the _v2 API + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier.flags' in found_struct}} flags : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].memoryBarrier + return &self._pvt_ptr[0].memoryBarrier def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier.operation' in found_struct}} try: str_list += ['operation : ' + str(self.operation)] except ValueError: str_list += ['operation : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier.operation' in found_struct}} @property def operation(self): - return CUstreamBatchMemOpType(self._ptr[0].memoryBarrier.operation) + return CUstreamBatchMemOpType(self._pvt_ptr[0].memoryBarrier.operation) @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): - self._ptr[0].memoryBarrier.operation = operation.value + self._pvt_ptr[0].memoryBarrier.operation = operation.value + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier.flags' in found_struct}} @property def flags(self): - return self._ptr[0].memoryBarrier.flags + return self._pvt_ptr[0].memoryBarrier.flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].memoryBarrier.flags = flags + self._pvt_ptr[0].memoryBarrier.flags = flags + {{endif}} {{endif}} -{{if 'union CUstreamBatchMemOpParams_union' in found_types}} +{{if 'CUstreamBatchMemOpParams_union' in found_struct}} cdef class CUstreamBatchMemOpParams_union: """ @@ -7372,162 +7884,228 @@ cdef class CUstreamBatchMemOpParams_union: Attributes ---------- + {{if 'CUstreamBatchMemOpParams_union.operation' in found_struct}} operation : CUstreamBatchMemOpType + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue' in found_struct}} waitValue : CUstreamMemOpWaitValueParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue' in found_struct}} writeValue : CUstreamMemOpWriteValueParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites' in found_struct}} flushRemoteWrites : CUstreamMemOpFlushRemoteWritesParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier' in found_struct}} memoryBarrier : CUstreamMemOpMemoryBarrierParams_st + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.pad' in found_struct}} pad : List[cuuint64_t] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._waitValue = CUstreamMemOpWaitValueParams_st(_ptr=self._ptr) - self._writeValue = CUstreamMemOpWriteValueParams_st(_ptr=self._ptr) - self._flushRemoteWrites = CUstreamMemOpFlushRemoteWritesParams_st(_ptr=self._ptr) - self._memoryBarrier = CUstreamMemOpMemoryBarrierParams_st(_ptr=self._ptr) + pass + {{if 'CUstreamBatchMemOpParams_union.waitValue' in found_struct}} + self._waitValue = CUstreamMemOpWaitValueParams_st(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue' in found_struct}} + self._writeValue = CUstreamMemOpWriteValueParams_st(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites' in found_struct}} + self._flushRemoteWrites = CUstreamMemOpFlushRemoteWritesParams_st(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier' in found_struct}} + self._memoryBarrier = CUstreamMemOpMemoryBarrierParams_st(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUstreamBatchMemOpParams_union.operation' in found_struct}} try: str_list += ['operation : ' + str(self.operation)] except ValueError: str_list += ['operation : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue' in found_struct}} try: str_list += ['waitValue :\n' + '\n'.join([' ' + line for line in str(self.waitValue).splitlines()])] except ValueError: str_list += ['waitValue : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue' in found_struct}} try: str_list += ['writeValue :\n' + '\n'.join([' ' + line for line in str(self.writeValue).splitlines()])] except ValueError: str_list += ['writeValue : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites' in found_struct}} try: str_list += ['flushRemoteWrites :\n' + '\n'.join([' ' + line for line in str(self.flushRemoteWrites).splitlines()])] except ValueError: str_list += ['flushRemoteWrites : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier' in found_struct}} try: str_list += ['memoryBarrier :\n' + '\n'.join([' ' + line for line in str(self.memoryBarrier).splitlines()])] except ValueError: str_list += ['memoryBarrier : '] + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.pad' in found_struct}} try: str_list += ['pad : ' + str(self.pad)] except ValueError: str_list += ['pad : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUstreamBatchMemOpParams_union.operation' in found_struct}} @property def operation(self): - return CUstreamBatchMemOpType(self._ptr[0].operation) + return CUstreamBatchMemOpType(self._pvt_ptr[0].operation) @operation.setter def operation(self, operation not None : CUstreamBatchMemOpType): - self._ptr[0].operation = operation.value + self._pvt_ptr[0].operation = operation.value + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.waitValue' in found_struct}} @property def waitValue(self): return self._waitValue @waitValue.setter def waitValue(self, waitValue not None : CUstreamMemOpWaitValueParams_st): - string.memcpy(&self._ptr[0].waitValue, waitValue.getPtr(), sizeof(self._ptr[0].waitValue)) + string.memcpy(&self._pvt_ptr[0].waitValue, waitValue.getPtr(), sizeof(self._pvt_ptr[0].waitValue)) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.writeValue' in found_struct}} @property def writeValue(self): return self._writeValue @writeValue.setter def writeValue(self, writeValue not None : CUstreamMemOpWriteValueParams_st): - string.memcpy(&self._ptr[0].writeValue, writeValue.getPtr(), sizeof(self._ptr[0].writeValue)) + string.memcpy(&self._pvt_ptr[0].writeValue, writeValue.getPtr(), sizeof(self._pvt_ptr[0].writeValue)) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.flushRemoteWrites' in found_struct}} @property def flushRemoteWrites(self): return self._flushRemoteWrites @flushRemoteWrites.setter def flushRemoteWrites(self, flushRemoteWrites not None : CUstreamMemOpFlushRemoteWritesParams_st): - string.memcpy(&self._ptr[0].flushRemoteWrites, flushRemoteWrites.getPtr(), sizeof(self._ptr[0].flushRemoteWrites)) + string.memcpy(&self._pvt_ptr[0].flushRemoteWrites, flushRemoteWrites.getPtr(), sizeof(self._pvt_ptr[0].flushRemoteWrites)) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.memoryBarrier' in found_struct}} @property def memoryBarrier(self): return self._memoryBarrier @memoryBarrier.setter def memoryBarrier(self, memoryBarrier not None : CUstreamMemOpMemoryBarrierParams_st): - string.memcpy(&self._ptr[0].memoryBarrier, memoryBarrier.getPtr(), sizeof(self._ptr[0].memoryBarrier)) + string.memcpy(&self._pvt_ptr[0].memoryBarrier, memoryBarrier.getPtr(), sizeof(self._pvt_ptr[0].memoryBarrier)) + {{endif}} + {{if 'CUstreamBatchMemOpParams_union.pad' in found_struct}} @property def pad(self): - return [cuuint64_t(init_value=_pad) for _pad in self._ptr[0].pad] + return [cuuint64_t(init_value=_pad) for _pad in self._pvt_ptr[0].pad] @pad.setter def pad(self, pad): - self._ptr[0].pad = pad + self._pvt_ptr[0].pad = pad + {{endif}} {{endif}} -{{if 'struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st' in found_types}} +{{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st' in found_struct}} cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: """ Attributes ---------- + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.ctx' in found_struct}} ctx : CUcontext + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.count' in found_struct}} count : unsigned int + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.paramArray' in found_struct}} paramArray : CUstreamBatchMemOpParams + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.flags' in found_struct}} flags : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._ctx = CUcontext(_ptr=&self._ptr[0].ctx) + pass + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.ctx' in found_struct}} + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + {{endif}} def __dealloc__(self): + pass + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.paramArray' in found_struct}} if self._paramArray is not NULL: free(self._paramArray) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.ctx' in found_struct}} try: str_list += ['ctx : ' + str(self.ctx)] except ValueError: str_list += ['ctx : '] + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.count' in found_struct}} try: str_list += ['count : ' + str(self.count)] except ValueError: str_list += ['count : '] + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.paramArray' in found_struct}} try: str_list += ['paramArray : ' + str(self.paramArray)] except ValueError: str_list += ['paramArray : '] + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.ctx' in found_struct}} @property def ctx(self): return self._ctx @@ -7542,23 +8120,27 @@ cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: else: pctx = int(CUcontext(ctx)) cyctx = pctx - self._ctx._ptr[0] = cyctx + self._ctx._pvt_ptr[0] = cyctx + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.count' in found_struct}} @property def count(self): - return self._ptr[0].count + return self._pvt_ptr[0].count @count.setter def count(self, unsigned int count): - self._ptr[0].count = count + self._pvt_ptr[0].count = count + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.paramArray' in found_struct}} @property def paramArray(self): - arrs = [self._ptr[0].paramArray + x*sizeof(cydriver.CUstreamBatchMemOpParams) for x in range(self._paramArray_length)] + arrs = [self._pvt_ptr[0].paramArray + x*sizeof(cydriver.CUstreamBatchMemOpParams) for x in range(self._paramArray_length)] return [CUstreamBatchMemOpParams(_ptr=arr) for arr in arrs] @paramArray.setter def paramArray(self, val): if len(val) == 0: free(self._paramArray) self._paramArray_length = 0 - self._ptr[0].paramArray = NULL + self._pvt_ptr[0].paramArray = NULL else: if self._paramArray_length != len(val): free(self._paramArray) @@ -7566,18 +8148,21 @@ cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: if self._paramArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUstreamBatchMemOpParams))) self._paramArray_length = len(val) - self._ptr[0].paramArray = self._paramArray + self._pvt_ptr[0].paramArray = self._paramArray for idx in range(len(val)): - string.memcpy(&self._paramArray[idx], (val[idx])._ptr, sizeof(cydriver.CUstreamBatchMemOpParams)) + string.memcpy(&self._paramArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUstreamBatchMemOpParams)) + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} {{endif}} -{{if 'struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: """ @@ -7585,55 +8170,77 @@ cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.ctx' in found_struct}} ctx : CUcontext Context to use for the operations. + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.count' in found_struct}} count : unsigned int Number of operations in paramArray. + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.paramArray' in found_struct}} paramArray : CUstreamBatchMemOpParams Array of batch memory operations. + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.flags' in found_struct}} flags : unsigned int Flags to control the node. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._ctx = CUcontext(_ptr=&self._ptr[0].ctx) + pass + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.ctx' in found_struct}} + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + {{endif}} def __dealloc__(self): + pass + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.paramArray' in found_struct}} if self._paramArray is not NULL: free(self._paramArray) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.ctx' in found_struct}} try: str_list += ['ctx : ' + str(self.ctx)] except ValueError: str_list += ['ctx : '] + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.count' in found_struct}} try: str_list += ['count : ' + str(self.count)] except ValueError: str_list += ['count : '] + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.paramArray' in found_struct}} try: str_list += ['paramArray : ' + str(self.paramArray)] except ValueError: str_list += ['paramArray : '] + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.ctx' in found_struct}} @property def ctx(self): return self._ctx @@ -7648,23 +8255,27 @@ cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: else: pctx = int(CUcontext(ctx)) cyctx = pctx - self._ctx._ptr[0] = cyctx + self._ctx._pvt_ptr[0] = cyctx + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.count' in found_struct}} @property def count(self): - return self._ptr[0].count + return self._pvt_ptr[0].count @count.setter def count(self, unsigned int count): - self._ptr[0].count = count + self._pvt_ptr[0].count = count + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.paramArray' in found_struct}} @property def paramArray(self): - arrs = [self._ptr[0].paramArray + x*sizeof(cydriver.CUstreamBatchMemOpParams) for x in range(self._paramArray_length)] + arrs = [self._pvt_ptr[0].paramArray + x*sizeof(cydriver.CUstreamBatchMemOpParams) for x in range(self._paramArray_length)] return [CUstreamBatchMemOpParams(_ptr=arr) for arr in arrs] @paramArray.setter def paramArray(self, val): if len(val) == 0: free(self._paramArray) self._paramArray_length = 0 - self._ptr[0].paramArray = NULL + self._pvt_ptr[0].paramArray = NULL else: if self._paramArray_length != len(val): free(self._paramArray) @@ -7672,100 +8283,116 @@ cdef class CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: if self._paramArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUstreamBatchMemOpParams))) self._paramArray_length = len(val) - self._ptr[0].paramArray = self._paramArray + self._pvt_ptr[0].paramArray = self._paramArray for idx in range(len(val)): - string.memcpy(&self._paramArray[idx], (val[idx])._ptr, sizeof(cydriver.CUstreamBatchMemOpParams)) + string.memcpy(&self._paramArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUstreamBatchMemOpParams)) + {{endif}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} {{endif}} -{{if 'struct CUasyncNotificationInfo_st' in found_types}} +{{if 'CUasyncNotificationInfo_st.info.overBudget' in found_struct}} cdef class anon_struct0: """ Attributes ---------- + {{if 'CUasyncNotificationInfo_st.info.overBudget.bytesOverBudget' in found_struct}} bytesOverBudget : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].info.overBudget + return &self._pvt_ptr[0].info.overBudget def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUasyncNotificationInfo_st.info.overBudget.bytesOverBudget' in found_struct}} try: str_list += ['bytesOverBudget : ' + str(self.bytesOverBudget)] except ValueError: str_list += ['bytesOverBudget : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUasyncNotificationInfo_st.info.overBudget.bytesOverBudget' in found_struct}} @property def bytesOverBudget(self): - return self._ptr[0].info.overBudget.bytesOverBudget + return self._pvt_ptr[0].info.overBudget.bytesOverBudget @bytesOverBudget.setter def bytesOverBudget(self, unsigned long long bytesOverBudget): - self._ptr[0].info.overBudget.bytesOverBudget = bytesOverBudget + self._pvt_ptr[0].info.overBudget.bytesOverBudget = bytesOverBudget + {{endif}} {{endif}} -{{if 'struct CUasyncNotificationInfo_st' in found_types}} +{{if 'CUasyncNotificationInfo_st.info' in found_struct}} cdef class anon_union2: """ Attributes ---------- + {{if 'CUasyncNotificationInfo_st.info.overBudget' in found_struct}} overBudget : anon_struct0 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._overBudget = anon_struct0(_ptr=self._ptr) + pass + {{if 'CUasyncNotificationInfo_st.info.overBudget' in found_struct}} + self._overBudget = anon_struct0(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].info + return &self._pvt_ptr[0].info def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUasyncNotificationInfo_st.info.overBudget' in found_struct}} try: str_list += ['overBudget :\n' + '\n'.join([' ' + line for line in str(self.overBudget).splitlines()])] except ValueError: str_list += ['overBudget : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUasyncNotificationInfo_st.info.overBudget' in found_struct}} @property def overBudget(self): return self._overBudget @overBudget.setter def overBudget(self, overBudget not None : anon_struct0): - string.memcpy(&self._ptr[0].info.overBudget, overBudget.getPtr(), sizeof(self._ptr[0].info.overBudget)) + string.memcpy(&self._pvt_ptr[0].info.overBudget, overBudget.getPtr(), sizeof(self._pvt_ptr[0].info.overBudget)) + {{endif}} {{endif}} -{{if 'struct CUasyncNotificationInfo_st' in found_types}} +{{if 'CUasyncNotificationInfo_st' in found_struct}} cdef class CUasyncNotificationInfo_st: """ @@ -7773,58 +8400,72 @@ cdef class CUasyncNotificationInfo_st: Attributes ---------- + {{if 'CUasyncNotificationInfo_st.type' in found_struct}} type : CUasyncNotificationType + {{endif}} + {{if 'CUasyncNotificationInfo_st.info' in found_struct}} info : anon_union2 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cydriver.CUasyncNotificationInfo_st)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._info = anon_union2(_ptr=self._ptr) + pass + {{if 'CUasyncNotificationInfo_st.info' in found_struct}} + self._info = anon_union2(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUasyncNotificationInfo_st.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'CUasyncNotificationInfo_st.info' in found_struct}} try: str_list += ['info :\n' + '\n'.join([' ' + line for line in str(self.info).splitlines()])] except ValueError: str_list += ['info : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUasyncNotificationInfo_st.type' in found_struct}} @property def type(self): - return CUasyncNotificationType(self._ptr[0].type) + return CUasyncNotificationType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUasyncNotificationType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'CUasyncNotificationInfo_st.info' in found_struct}} @property def info(self): return self._info @info.setter def info(self, info not None : anon_union2): - string.memcpy(&self._ptr[0].info, info.getPtr(), sizeof(self._ptr[0].info)) + string.memcpy(&self._pvt_ptr[0].info, info.getPtr(), sizeof(self._pvt_ptr[0].info)) + {{endif}} {{endif}} -{{if 'struct CUdevprop_st' in found_types}} +{{if 'CUdevprop_st' in found_struct}} cdef class CUdevprop_st: """ @@ -7832,152 +8473,211 @@ cdef class CUdevprop_st: Attributes ---------- + {{if 'CUdevprop_st.maxThreadsPerBlock' in found_struct}} maxThreadsPerBlock : int Maximum number of threads per block + {{endif}} + {{if 'CUdevprop_st.maxThreadsDim' in found_struct}} maxThreadsDim : List[int] Maximum size of each dimension of a block + {{endif}} + {{if 'CUdevprop_st.maxGridSize' in found_struct}} maxGridSize : List[int] Maximum size of each dimension of a grid + {{endif}} + {{if 'CUdevprop_st.sharedMemPerBlock' in found_struct}} sharedMemPerBlock : int Shared memory available per block in bytes + {{endif}} + {{if 'CUdevprop_st.totalConstantMemory' in found_struct}} totalConstantMemory : int Constant memory available on device in bytes + {{endif}} + {{if 'CUdevprop_st.SIMDWidth' in found_struct}} SIMDWidth : int Warp size in threads + {{endif}} + {{if 'CUdevprop_st.memPitch' in found_struct}} memPitch : int Maximum pitch in bytes allowed by memory copies + {{endif}} + {{if 'CUdevprop_st.regsPerBlock' in found_struct}} regsPerBlock : int 32-bit registers available per block + {{endif}} + {{if 'CUdevprop_st.clockRate' in found_struct}} clockRate : int Clock frequency in kilohertz + {{endif}} + {{if 'CUdevprop_st.textureAlign' in found_struct}} textureAlign : int Alignment requirement for textures + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUdevprop_st.maxThreadsPerBlock' in found_struct}} try: str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)] except ValueError: str_list += ['maxThreadsPerBlock : '] + {{endif}} + {{if 'CUdevprop_st.maxThreadsDim' in found_struct}} try: str_list += ['maxThreadsDim : ' + str(self.maxThreadsDim)] except ValueError: str_list += ['maxThreadsDim : '] + {{endif}} + {{if 'CUdevprop_st.maxGridSize' in found_struct}} try: str_list += ['maxGridSize : ' + str(self.maxGridSize)] except ValueError: str_list += ['maxGridSize : '] + {{endif}} + {{if 'CUdevprop_st.sharedMemPerBlock' in found_struct}} try: str_list += ['sharedMemPerBlock : ' + str(self.sharedMemPerBlock)] except ValueError: str_list += ['sharedMemPerBlock : '] + {{endif}} + {{if 'CUdevprop_st.totalConstantMemory' in found_struct}} try: str_list += ['totalConstantMemory : ' + str(self.totalConstantMemory)] except ValueError: str_list += ['totalConstantMemory : '] + {{endif}} + {{if 'CUdevprop_st.SIMDWidth' in found_struct}} try: str_list += ['SIMDWidth : ' + str(self.SIMDWidth)] except ValueError: str_list += ['SIMDWidth : '] + {{endif}} + {{if 'CUdevprop_st.memPitch' in found_struct}} try: str_list += ['memPitch : ' + str(self.memPitch)] except ValueError: str_list += ['memPitch : '] + {{endif}} + {{if 'CUdevprop_st.regsPerBlock' in found_struct}} try: str_list += ['regsPerBlock : ' + str(self.regsPerBlock)] except ValueError: str_list += ['regsPerBlock : '] + {{endif}} + {{if 'CUdevprop_st.clockRate' in found_struct}} try: str_list += ['clockRate : ' + str(self.clockRate)] except ValueError: str_list += ['clockRate : '] + {{endif}} + {{if 'CUdevprop_st.textureAlign' in found_struct}} try: str_list += ['textureAlign : ' + str(self.textureAlign)] except ValueError: str_list += ['textureAlign : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUdevprop_st.maxThreadsPerBlock' in found_struct}} @property def maxThreadsPerBlock(self): - return self._ptr[0].maxThreadsPerBlock + return self._pvt_ptr[0].maxThreadsPerBlock @maxThreadsPerBlock.setter def maxThreadsPerBlock(self, int maxThreadsPerBlock): - self._ptr[0].maxThreadsPerBlock = maxThreadsPerBlock + self._pvt_ptr[0].maxThreadsPerBlock = maxThreadsPerBlock + {{endif}} + {{if 'CUdevprop_st.maxThreadsDim' in found_struct}} @property def maxThreadsDim(self): - return self._ptr[0].maxThreadsDim + return self._pvt_ptr[0].maxThreadsDim @maxThreadsDim.setter def maxThreadsDim(self, maxThreadsDim): - self._ptr[0].maxThreadsDim = maxThreadsDim + self._pvt_ptr[0].maxThreadsDim = maxThreadsDim + {{endif}} + {{if 'CUdevprop_st.maxGridSize' in found_struct}} @property def maxGridSize(self): - return self._ptr[0].maxGridSize + return self._pvt_ptr[0].maxGridSize @maxGridSize.setter def maxGridSize(self, maxGridSize): - self._ptr[0].maxGridSize = maxGridSize + self._pvt_ptr[0].maxGridSize = maxGridSize + {{endif}} + {{if 'CUdevprop_st.sharedMemPerBlock' in found_struct}} @property def sharedMemPerBlock(self): - return self._ptr[0].sharedMemPerBlock + return self._pvt_ptr[0].sharedMemPerBlock @sharedMemPerBlock.setter def sharedMemPerBlock(self, int sharedMemPerBlock): - self._ptr[0].sharedMemPerBlock = sharedMemPerBlock + self._pvt_ptr[0].sharedMemPerBlock = sharedMemPerBlock + {{endif}} + {{if 'CUdevprop_st.totalConstantMemory' in found_struct}} @property def totalConstantMemory(self): - return self._ptr[0].totalConstantMemory + return self._pvt_ptr[0].totalConstantMemory @totalConstantMemory.setter def totalConstantMemory(self, int totalConstantMemory): - self._ptr[0].totalConstantMemory = totalConstantMemory + self._pvt_ptr[0].totalConstantMemory = totalConstantMemory + {{endif}} + {{if 'CUdevprop_st.SIMDWidth' in found_struct}} @property def SIMDWidth(self): - return self._ptr[0].SIMDWidth + return self._pvt_ptr[0].SIMDWidth @SIMDWidth.setter def SIMDWidth(self, int SIMDWidth): - self._ptr[0].SIMDWidth = SIMDWidth + self._pvt_ptr[0].SIMDWidth = SIMDWidth + {{endif}} + {{if 'CUdevprop_st.memPitch' in found_struct}} @property def memPitch(self): - return self._ptr[0].memPitch + return self._pvt_ptr[0].memPitch @memPitch.setter def memPitch(self, int memPitch): - self._ptr[0].memPitch = memPitch + self._pvt_ptr[0].memPitch = memPitch + {{endif}} + {{if 'CUdevprop_st.regsPerBlock' in found_struct}} @property def regsPerBlock(self): - return self._ptr[0].regsPerBlock + return self._pvt_ptr[0].regsPerBlock @regsPerBlock.setter def regsPerBlock(self, int regsPerBlock): - self._ptr[0].regsPerBlock = regsPerBlock + self._pvt_ptr[0].regsPerBlock = regsPerBlock + {{endif}} + {{if 'CUdevprop_st.clockRate' in found_struct}} @property def clockRate(self): - return self._ptr[0].clockRate + return self._pvt_ptr[0].clockRate @clockRate.setter def clockRate(self, int clockRate): - self._ptr[0].clockRate = clockRate + self._pvt_ptr[0].clockRate = clockRate + {{endif}} + {{if 'CUdevprop_st.textureAlign' in found_struct}} @property def textureAlign(self): - return self._ptr[0].textureAlign + return self._pvt_ptr[0].textureAlign @textureAlign.setter def textureAlign(self, int textureAlign): - self._ptr[0].textureAlign = textureAlign + self._pvt_ptr[0].textureAlign = textureAlign + {{endif}} {{endif}} -{{if 'struct CUaccessPolicyWindow_st' in found_types}} +{{if 'CUaccessPolicyWindow_st' in found_struct}} cdef class CUaccessPolicyWindow_st: """ @@ -7994,96 +8694,125 @@ cdef class CUaccessPolicyWindow_st: Attributes ---------- + {{if 'CUaccessPolicyWindow_st.base_ptr' in found_struct}} base_ptr : Any Starting address of the access policy window. CUDA driver may align it. + {{endif}} + {{if 'CUaccessPolicyWindow_st.num_bytes' in found_struct}} num_bytes : size_t Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment. + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitRatio' in found_struct}} hitRatio : float hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp. + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitProp' in found_struct}} hitProp : CUaccessProperty CUaccessProperty set for hit. + {{endif}} + {{if 'CUaccessPolicyWindow_st.missProp' in found_struct}} missProp : CUaccessProperty CUaccessProperty set for miss. Must be either NORMAL or STREAMING + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUaccessPolicyWindow_st.base_ptr' in found_struct}} try: str_list += ['base_ptr : ' + hex(self.base_ptr)] except ValueError: str_list += ['base_ptr : '] + {{endif}} + {{if 'CUaccessPolicyWindow_st.num_bytes' in found_struct}} try: str_list += ['num_bytes : ' + str(self.num_bytes)] except ValueError: str_list += ['num_bytes : '] + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitRatio' in found_struct}} try: str_list += ['hitRatio : ' + str(self.hitRatio)] except ValueError: str_list += ['hitRatio : '] + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitProp' in found_struct}} try: str_list += ['hitProp : ' + str(self.hitProp)] except ValueError: str_list += ['hitProp : '] + {{endif}} + {{if 'CUaccessPolicyWindow_st.missProp' in found_struct}} try: str_list += ['missProp : ' + str(self.missProp)] except ValueError: str_list += ['missProp : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUaccessPolicyWindow_st.base_ptr' in found_struct}} @property def base_ptr(self): - return self._ptr[0].base_ptr + return self._pvt_ptr[0].base_ptr @base_ptr.setter def base_ptr(self, base_ptr): - _cybase_ptr = utils.HelperInputVoidPtr(base_ptr) - self._ptr[0].base_ptr = _cybase_ptr.cptr + _cbase_ptr = utils.HelperInputVoidPtr(base_ptr) + self._pvt_ptr[0].base_ptr = _cbase_ptr.cptr + {{endif}} + {{if 'CUaccessPolicyWindow_st.num_bytes' in found_struct}} @property def num_bytes(self): - return self._ptr[0].num_bytes + return self._pvt_ptr[0].num_bytes @num_bytes.setter def num_bytes(self, size_t num_bytes): - self._ptr[0].num_bytes = num_bytes + self._pvt_ptr[0].num_bytes = num_bytes + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitRatio' in found_struct}} @property def hitRatio(self): - return self._ptr[0].hitRatio + return self._pvt_ptr[0].hitRatio @hitRatio.setter def hitRatio(self, float hitRatio): - self._ptr[0].hitRatio = hitRatio + self._pvt_ptr[0].hitRatio = hitRatio + {{endif}} + {{if 'CUaccessPolicyWindow_st.hitProp' in found_struct}} @property def hitProp(self): - return CUaccessProperty(self._ptr[0].hitProp) + return CUaccessProperty(self._pvt_ptr[0].hitProp) @hitProp.setter def hitProp(self, hitProp not None : CUaccessProperty): - self._ptr[0].hitProp = hitProp.value + self._pvt_ptr[0].hitProp = hitProp.value + {{endif}} + {{if 'CUaccessPolicyWindow_st.missProp' in found_struct}} @property def missProp(self): - return CUaccessProperty(self._ptr[0].missProp) + return CUaccessProperty(self._pvt_ptr[0].missProp) @missProp.setter def missProp(self, missProp not None : CUaccessProperty): - self._ptr[0].missProp = missProp.value + self._pvt_ptr[0].missProp = missProp.value + {{endif}} {{endif}} -{{if 'struct CUDA_KERNEL_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_KERNEL_NODE_PARAMS_st' in found_struct}} cdef class CUDA_KERNEL_NODE_PARAMS_st: """ @@ -8091,90 +8820,133 @@ cdef class CUDA_KERNEL_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_KERNEL_NODE_PARAMS_st.func' in found_struct}} func : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.extra' in found_struct}} extra : Any Extra options + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._func = CUfunction(_ptr=&self._ptr[0].func) + pass + {{if 'CUDA_KERNEL_NODE_PARAMS_st.func' in found_struct}} + self._func = CUfunction(_ptr=&self._pvt_ptr[0].func) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_KERNEL_NODE_PARAMS_st.func' in found_struct}} try: str_list += ['func : ' + str(self.func)] except ValueError: str_list += ['func : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimX' in found_struct}} try: str_list += ['gridDimX : ' + str(self.gridDimX)] except ValueError: str_list += ['gridDimX : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimY' in found_struct}} try: str_list += ['gridDimY : ' + str(self.gridDimY)] except ValueError: str_list += ['gridDimY : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimZ' in found_struct}} try: str_list += ['gridDimZ : ' + str(self.gridDimZ)] except ValueError: str_list += ['gridDimZ : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimX' in found_struct}} try: str_list += ['blockDimX : ' + str(self.blockDimX)] except ValueError: str_list += ['blockDimX : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimY' in found_struct}} try: str_list += ['blockDimY : ' + str(self.blockDimY)] except ValueError: str_list += ['blockDimY : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimZ' in found_struct}} try: str_list += ['blockDimZ : ' + str(self.blockDimZ)] except ValueError: str_list += ['blockDimZ : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.sharedMemBytes' in found_struct}} try: str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] except ValueError: str_list += ['sharedMemBytes : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.kernelParams' in found_struct}} try: str_list += ['kernelParams : ' + str(self.kernelParams)] except ValueError: str_list += ['kernelParams : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.extra' in found_struct}} try: str_list += ['extra : ' + str(self.extra)] except ValueError: str_list += ['extra : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_KERNEL_NODE_PARAMS_st.func' in found_struct}} @property def func(self): return self._func @@ -8189,64 +8961,83 @@ cdef class CUDA_KERNEL_NODE_PARAMS_st: else: pfunc = int(CUfunction(func)) cyfunc = pfunc - self._func._ptr[0] = cyfunc + self._func._pvt_ptr[0] = cyfunc + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimX' in found_struct}} @property def gridDimX(self): - return self._ptr[0].gridDimX + return self._pvt_ptr[0].gridDimX @gridDimX.setter def gridDimX(self, unsigned int gridDimX): - self._ptr[0].gridDimX = gridDimX + self._pvt_ptr[0].gridDimX = gridDimX + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimY' in found_struct}} @property def gridDimY(self): - return self._ptr[0].gridDimY + return self._pvt_ptr[0].gridDimY @gridDimY.setter def gridDimY(self, unsigned int gridDimY): - self._ptr[0].gridDimY = gridDimY + self._pvt_ptr[0].gridDimY = gridDimY + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.gridDimZ' in found_struct}} @property def gridDimZ(self): - return self._ptr[0].gridDimZ + return self._pvt_ptr[0].gridDimZ @gridDimZ.setter def gridDimZ(self, unsigned int gridDimZ): - self._ptr[0].gridDimZ = gridDimZ + self._pvt_ptr[0].gridDimZ = gridDimZ + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimX' in found_struct}} @property def blockDimX(self): - return self._ptr[0].blockDimX + return self._pvt_ptr[0].blockDimX @blockDimX.setter def blockDimX(self, unsigned int blockDimX): - self._ptr[0].blockDimX = blockDimX + self._pvt_ptr[0].blockDimX = blockDimX + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimY' in found_struct}} @property def blockDimY(self): - return self._ptr[0].blockDimY + return self._pvt_ptr[0].blockDimY @blockDimY.setter def blockDimY(self, unsigned int blockDimY): - self._ptr[0].blockDimY = blockDimY + self._pvt_ptr[0].blockDimY = blockDimY + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.blockDimZ' in found_struct}} @property def blockDimZ(self): - return self._ptr[0].blockDimZ + return self._pvt_ptr[0].blockDimZ @blockDimZ.setter def blockDimZ(self, unsigned int blockDimZ): - self._ptr[0].blockDimZ = blockDimZ + self._pvt_ptr[0].blockDimZ = blockDimZ + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.sharedMemBytes' in found_struct}} @property def sharedMemBytes(self): - return self._ptr[0].sharedMemBytes + return self._pvt_ptr[0].sharedMemBytes @sharedMemBytes.setter def sharedMemBytes(self, unsigned int sharedMemBytes): - self._ptr[0].sharedMemBytes = sharedMemBytes + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.kernelParams' in found_struct}} @property def kernelParams(self): - return self._ptr[0].kernelParams + return self._pvt_ptr[0].kernelParams @kernelParams.setter def kernelParams(self, kernelParams): self._cykernelParams = utils.HelperKernelParams(kernelParams) - self._ptr[0].kernelParams = self._cykernelParams.ckernelParams + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st.extra' in found_struct}} @property def extra(self): - return self._ptr[0].extra + return self._pvt_ptr[0].extra @extra.setter def extra(self, void_ptr extra): - self._ptr[0].extra = extra + self._pvt_ptr[0].extra = extra + {{endif}} {{endif}} -{{if 'struct CUDA_KERNEL_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_KERNEL_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_KERNEL_NODE_PARAMS_v2_st: """ @@ -8254,106 +9045,161 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.func' in found_struct}} func : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.extra' in found_struct}} extra : Any Extra options + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kern' in found_struct}} kern : CUkernel Kernel to launch, will only be referenced if func is NULL + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.ctx' in found_struct}} ctx : CUcontext Context for the kernel task to run in. The value NULL will indicate the current context should be used by the api. This field is ignored if func is set. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._func = CUfunction(_ptr=&self._ptr[0].func) - self._kern = CUkernel(_ptr=&self._ptr[0].kern) - self._ctx = CUcontext(_ptr=&self._ptr[0].ctx) + pass + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.func' in found_struct}} + self._func = CUfunction(_ptr=&self._pvt_ptr[0].func) + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kern' in found_struct}} + self._kern = CUkernel(_ptr=&self._pvt_ptr[0].kern) + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.ctx' in found_struct}} + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.func' in found_struct}} try: str_list += ['func : ' + str(self.func)] except ValueError: str_list += ['func : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimX' in found_struct}} try: str_list += ['gridDimX : ' + str(self.gridDimX)] except ValueError: str_list += ['gridDimX : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimY' in found_struct}} try: str_list += ['gridDimY : ' + str(self.gridDimY)] except ValueError: str_list += ['gridDimY : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimZ' in found_struct}} try: str_list += ['gridDimZ : ' + str(self.gridDimZ)] except ValueError: str_list += ['gridDimZ : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimX' in found_struct}} try: str_list += ['blockDimX : ' + str(self.blockDimX)] except ValueError: str_list += ['blockDimX : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimY' in found_struct}} try: str_list += ['blockDimY : ' + str(self.blockDimY)] except ValueError: str_list += ['blockDimY : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimZ' in found_struct}} try: str_list += ['blockDimZ : ' + str(self.blockDimZ)] except ValueError: str_list += ['blockDimZ : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.sharedMemBytes' in found_struct}} try: str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] except ValueError: str_list += ['sharedMemBytes : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kernelParams' in found_struct}} try: str_list += ['kernelParams : ' + str(self.kernelParams)] except ValueError: str_list += ['kernelParams : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.extra' in found_struct}} try: str_list += ['extra : ' + str(self.extra)] except ValueError: str_list += ['extra : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kern' in found_struct}} try: str_list += ['kern : ' + str(self.kern)] except ValueError: str_list += ['kern : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.ctx' in found_struct}} try: str_list += ['ctx : ' + str(self.ctx)] except ValueError: str_list += ['ctx : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.func' in found_struct}} @property def func(self): return self._func @@ -8368,62 +9214,82 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v2_st: else: pfunc = int(CUfunction(func)) cyfunc = pfunc - self._func._ptr[0] = cyfunc + self._func._pvt_ptr[0] = cyfunc + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimX' in found_struct}} @property def gridDimX(self): - return self._ptr[0].gridDimX + return self._pvt_ptr[0].gridDimX @gridDimX.setter def gridDimX(self, unsigned int gridDimX): - self._ptr[0].gridDimX = gridDimX + self._pvt_ptr[0].gridDimX = gridDimX + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimY' in found_struct}} @property def gridDimY(self): - return self._ptr[0].gridDimY + return self._pvt_ptr[0].gridDimY @gridDimY.setter def gridDimY(self, unsigned int gridDimY): - self._ptr[0].gridDimY = gridDimY + self._pvt_ptr[0].gridDimY = gridDimY + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.gridDimZ' in found_struct}} @property def gridDimZ(self): - return self._ptr[0].gridDimZ + return self._pvt_ptr[0].gridDimZ @gridDimZ.setter def gridDimZ(self, unsigned int gridDimZ): - self._ptr[0].gridDimZ = gridDimZ + self._pvt_ptr[0].gridDimZ = gridDimZ + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimX' in found_struct}} @property def blockDimX(self): - return self._ptr[0].blockDimX + return self._pvt_ptr[0].blockDimX @blockDimX.setter def blockDimX(self, unsigned int blockDimX): - self._ptr[0].blockDimX = blockDimX + self._pvt_ptr[0].blockDimX = blockDimX + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimY' in found_struct}} @property def blockDimY(self): - return self._ptr[0].blockDimY + return self._pvt_ptr[0].blockDimY @blockDimY.setter def blockDimY(self, unsigned int blockDimY): - self._ptr[0].blockDimY = blockDimY + self._pvt_ptr[0].blockDimY = blockDimY + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.blockDimZ' in found_struct}} @property def blockDimZ(self): - return self._ptr[0].blockDimZ + return self._pvt_ptr[0].blockDimZ @blockDimZ.setter def blockDimZ(self, unsigned int blockDimZ): - self._ptr[0].blockDimZ = blockDimZ + self._pvt_ptr[0].blockDimZ = blockDimZ + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.sharedMemBytes' in found_struct}} @property def sharedMemBytes(self): - return self._ptr[0].sharedMemBytes + return self._pvt_ptr[0].sharedMemBytes @sharedMemBytes.setter def sharedMemBytes(self, unsigned int sharedMemBytes): - self._ptr[0].sharedMemBytes = sharedMemBytes + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kernelParams' in found_struct}} @property def kernelParams(self): - return self._ptr[0].kernelParams + return self._pvt_ptr[0].kernelParams @kernelParams.setter def kernelParams(self, kernelParams): self._cykernelParams = utils.HelperKernelParams(kernelParams) - self._ptr[0].kernelParams = self._cykernelParams.ckernelParams + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.extra' in found_struct}} @property def extra(self): - return self._ptr[0].extra + return self._pvt_ptr[0].extra @extra.setter def extra(self, void_ptr extra): - self._ptr[0].extra = extra + self._pvt_ptr[0].extra = extra + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.kern' in found_struct}} @property def kern(self): return self._kern @@ -8438,7 +9304,9 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v2_st: else: pkern = int(CUkernel(kern)) cykern = pkern - self._kern._ptr[0] = cykern + self._kern._pvt_ptr[0] = cykern + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st.ctx' in found_struct}} @property def ctx(self): return self._ctx @@ -8453,9 +9321,10 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v2_st: else: pctx = int(CUcontext(ctx)) cyctx = pctx - self._ctx._ptr[0] = cyctx + self._ctx._pvt_ptr[0] = cyctx + {{endif}} {{endif}} -{{if 'struct CUDA_KERNEL_NODE_PARAMS_v3_st' in found_types}} +{{if 'CUDA_KERNEL_NODE_PARAMS_v3_st' in found_struct}} cdef class CUDA_KERNEL_NODE_PARAMS_v3_st: """ @@ -8463,106 +9332,161 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v3_st: Attributes ---------- + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.func' in found_struct}} func : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.extra' in found_struct}} extra : Any Extra options + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kern' in found_struct}} kern : CUkernel Kernel to launch, will only be referenced if func is NULL + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.ctx' in found_struct}} ctx : CUcontext Context for the kernel task to run in. The value NULL will indicate the current context should be used by the api. This field is ignored if func is set. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._func = CUfunction(_ptr=&self._ptr[0].func) - self._kern = CUkernel(_ptr=&self._ptr[0].kern) - self._ctx = CUcontext(_ptr=&self._ptr[0].ctx) + pass + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.func' in found_struct}} + self._func = CUfunction(_ptr=&self._pvt_ptr[0].func) + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kern' in found_struct}} + self._kern = CUkernel(_ptr=&self._pvt_ptr[0].kern) + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.ctx' in found_struct}} + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.func' in found_struct}} try: str_list += ['func : ' + str(self.func)] except ValueError: str_list += ['func : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimX' in found_struct}} try: str_list += ['gridDimX : ' + str(self.gridDimX)] except ValueError: str_list += ['gridDimX : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimY' in found_struct}} try: str_list += ['gridDimY : ' + str(self.gridDimY)] except ValueError: str_list += ['gridDimY : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimZ' in found_struct}} try: str_list += ['gridDimZ : ' + str(self.gridDimZ)] except ValueError: str_list += ['gridDimZ : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimX' in found_struct}} try: str_list += ['blockDimX : ' + str(self.blockDimX)] except ValueError: str_list += ['blockDimX : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimY' in found_struct}} try: str_list += ['blockDimY : ' + str(self.blockDimY)] except ValueError: str_list += ['blockDimY : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimZ' in found_struct}} try: str_list += ['blockDimZ : ' + str(self.blockDimZ)] except ValueError: str_list += ['blockDimZ : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.sharedMemBytes' in found_struct}} try: str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] except ValueError: str_list += ['sharedMemBytes : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kernelParams' in found_struct}} try: str_list += ['kernelParams : ' + str(self.kernelParams)] except ValueError: str_list += ['kernelParams : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.extra' in found_struct}} try: str_list += ['extra : ' + str(self.extra)] except ValueError: str_list += ['extra : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kern' in found_struct}} try: str_list += ['kern : ' + str(self.kern)] except ValueError: str_list += ['kern : '] + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.ctx' in found_struct}} try: str_list += ['ctx : ' + str(self.ctx)] except ValueError: str_list += ['ctx : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.func' in found_struct}} @property def func(self): return self._func @@ -8577,62 +9501,82 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v3_st: else: pfunc = int(CUfunction(func)) cyfunc = pfunc - self._func._ptr[0] = cyfunc + self._func._pvt_ptr[0] = cyfunc + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimX' in found_struct}} @property def gridDimX(self): - return self._ptr[0].gridDimX + return self._pvt_ptr[0].gridDimX @gridDimX.setter def gridDimX(self, unsigned int gridDimX): - self._ptr[0].gridDimX = gridDimX + self._pvt_ptr[0].gridDimX = gridDimX + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimY' in found_struct}} @property def gridDimY(self): - return self._ptr[0].gridDimY + return self._pvt_ptr[0].gridDimY @gridDimY.setter def gridDimY(self, unsigned int gridDimY): - self._ptr[0].gridDimY = gridDimY + self._pvt_ptr[0].gridDimY = gridDimY + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.gridDimZ' in found_struct}} @property def gridDimZ(self): - return self._ptr[0].gridDimZ + return self._pvt_ptr[0].gridDimZ @gridDimZ.setter def gridDimZ(self, unsigned int gridDimZ): - self._ptr[0].gridDimZ = gridDimZ + self._pvt_ptr[0].gridDimZ = gridDimZ + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimX' in found_struct}} @property def blockDimX(self): - return self._ptr[0].blockDimX + return self._pvt_ptr[0].blockDimX @blockDimX.setter def blockDimX(self, unsigned int blockDimX): - self._ptr[0].blockDimX = blockDimX + self._pvt_ptr[0].blockDimX = blockDimX + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimY' in found_struct}} @property def blockDimY(self): - return self._ptr[0].blockDimY + return self._pvt_ptr[0].blockDimY @blockDimY.setter def blockDimY(self, unsigned int blockDimY): - self._ptr[0].blockDimY = blockDimY + self._pvt_ptr[0].blockDimY = blockDimY + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.blockDimZ' in found_struct}} @property def blockDimZ(self): - return self._ptr[0].blockDimZ + return self._pvt_ptr[0].blockDimZ @blockDimZ.setter def blockDimZ(self, unsigned int blockDimZ): - self._ptr[0].blockDimZ = blockDimZ + self._pvt_ptr[0].blockDimZ = blockDimZ + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.sharedMemBytes' in found_struct}} @property def sharedMemBytes(self): - return self._ptr[0].sharedMemBytes + return self._pvt_ptr[0].sharedMemBytes @sharedMemBytes.setter def sharedMemBytes(self, unsigned int sharedMemBytes): - self._ptr[0].sharedMemBytes = sharedMemBytes + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kernelParams' in found_struct}} @property def kernelParams(self): - return self._ptr[0].kernelParams + return self._pvt_ptr[0].kernelParams @kernelParams.setter def kernelParams(self, kernelParams): self._cykernelParams = utils.HelperKernelParams(kernelParams) - self._ptr[0].kernelParams = self._cykernelParams.ckernelParams + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.extra' in found_struct}} @property def extra(self): - return self._ptr[0].extra + return self._pvt_ptr[0].extra @extra.setter def extra(self, void_ptr extra): - self._ptr[0].extra = extra + self._pvt_ptr[0].extra = extra + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.kern' in found_struct}} @property def kern(self): return self._kern @@ -8647,7 +9591,9 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v3_st: else: pkern = int(CUkernel(kern)) cykern = pkern - self._kern._ptr[0] = cykern + self._kern._pvt_ptr[0] = cykern + {{endif}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st.ctx' in found_struct}} @property def ctx(self): return self._ctx @@ -8662,9 +9608,10 @@ cdef class CUDA_KERNEL_NODE_PARAMS_v3_st: else: pctx = int(CUcontext(ctx)) cyctx = pctx - self._ctx._ptr[0] = cyctx + self._ctx._pvt_ptr[0] = cyctx + {{endif}} {{endif}} -{{if 'struct CUDA_MEMSET_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_MEMSET_NODE_PARAMS_st' in found_struct}} cdef class CUDA_MEMSET_NODE_PARAMS_st: """ @@ -8672,66 +9619,93 @@ cdef class CUDA_MEMSET_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_MEMSET_NODE_PARAMS_st.dst' in found_struct}} dst : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.pitch' in found_struct}} pitch : size_t Pitch of destination device pointer. Unused if height is 1 + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.value' in found_struct}} value : unsigned int Value to be set + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.elementSize' in found_struct}} elementSize : unsigned int Size of each element in bytes. Must be 1, 2, or 4. + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.width' in found_struct}} width : size_t Width of the row in elements + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.height' in found_struct}} height : size_t Number of rows + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._dst = CUdeviceptr(_ptr=&self._ptr[0].dst) + pass + {{if 'CUDA_MEMSET_NODE_PARAMS_st.dst' in found_struct}} + self._dst = CUdeviceptr(_ptr=&self._pvt_ptr[0].dst) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_MEMSET_NODE_PARAMS_st.dst' in found_struct}} try: str_list += ['dst : ' + str(self.dst)] except ValueError: str_list += ['dst : '] + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.pitch' in found_struct}} try: str_list += ['pitch : ' + str(self.pitch)] except ValueError: str_list += ['pitch : '] + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.value' in found_struct}} try: str_list += ['value : ' + str(self.value)] except ValueError: str_list += ['value : '] + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.elementSize' in found_struct}} try: str_list += ['elementSize : ' + str(self.elementSize)] except ValueError: str_list += ['elementSize : '] + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.width' in found_struct}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.height' in found_struct}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_MEMSET_NODE_PARAMS_st.dst' in found_struct}} @property def dst(self): return self._dst @@ -8746,40 +9720,51 @@ cdef class CUDA_MEMSET_NODE_PARAMS_st: else: pdst = int(CUdeviceptr(dst)) cydst = pdst - self._dst._ptr[0] = cydst + self._dst._pvt_ptr[0] = cydst + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.pitch' in found_struct}} @property def pitch(self): - return self._ptr[0].pitch + return self._pvt_ptr[0].pitch @pitch.setter def pitch(self, size_t pitch): - self._ptr[0].pitch = pitch + self._pvt_ptr[0].pitch = pitch + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.value' in found_struct}} @property def value(self): - return self._ptr[0].value + return self._pvt_ptr[0].value @value.setter def value(self, unsigned int value): - self._ptr[0].value = value + self._pvt_ptr[0].value = value + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.elementSize' in found_struct}} @property def elementSize(self): - return self._ptr[0].elementSize + return self._pvt_ptr[0].elementSize @elementSize.setter def elementSize(self, unsigned int elementSize): - self._ptr[0].elementSize = elementSize + self._pvt_ptr[0].elementSize = elementSize + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.width' in found_struct}} @property def width(self): - return self._ptr[0].width + return self._pvt_ptr[0].width @width.setter def width(self, size_t width): - self._ptr[0].width = width + self._pvt_ptr[0].width = width + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st.height' in found_struct}} @property def height(self): - return self._ptr[0].height + return self._pvt_ptr[0].height @height.setter def height(self, size_t height): - self._ptr[0].height = height + self._pvt_ptr[0].height = height + {{endif}} {{endif}} -{{if 'struct CUDA_MEMSET_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_MEMSET_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_MEMSET_NODE_PARAMS_v2_st: """ @@ -8787,73 +9772,106 @@ cdef class CUDA_MEMSET_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.dst' in found_struct}} dst : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.pitch' in found_struct}} pitch : size_t Pitch of destination device pointer. Unused if height is 1 + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.value' in found_struct}} value : unsigned int Value to be set + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.elementSize' in found_struct}} elementSize : unsigned int Size of each element in bytes. Must be 1, 2, or 4. + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.width' in found_struct}} width : size_t Width of the row in elements + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.height' in found_struct}} height : size_t Number of rows + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.ctx' in found_struct}} ctx : CUcontext Context on which to run the node + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._dst = CUdeviceptr(_ptr=&self._ptr[0].dst) - self._ctx = CUcontext(_ptr=&self._ptr[0].ctx) + pass + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.dst' in found_struct}} + self._dst = CUdeviceptr(_ptr=&self._pvt_ptr[0].dst) + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.ctx' in found_struct}} + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.dst' in found_struct}} try: str_list += ['dst : ' + str(self.dst)] except ValueError: str_list += ['dst : '] + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.pitch' in found_struct}} try: str_list += ['pitch : ' + str(self.pitch)] except ValueError: str_list += ['pitch : '] + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.value' in found_struct}} try: str_list += ['value : ' + str(self.value)] except ValueError: str_list += ['value : '] + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.elementSize' in found_struct}} try: str_list += ['elementSize : ' + str(self.elementSize)] except ValueError: str_list += ['elementSize : '] + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.width' in found_struct}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.height' in found_struct}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.ctx' in found_struct}} try: str_list += ['ctx : ' + str(self.ctx)] except ValueError: str_list += ['ctx : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.dst' in found_struct}} @property def dst(self): return self._dst @@ -8868,38 +9886,50 @@ cdef class CUDA_MEMSET_NODE_PARAMS_v2_st: else: pdst = int(CUdeviceptr(dst)) cydst = pdst - self._dst._ptr[0] = cydst + self._dst._pvt_ptr[0] = cydst + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.pitch' in found_struct}} @property def pitch(self): - return self._ptr[0].pitch + return self._pvt_ptr[0].pitch @pitch.setter def pitch(self, size_t pitch): - self._ptr[0].pitch = pitch + self._pvt_ptr[0].pitch = pitch + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.value' in found_struct}} @property def value(self): - return self._ptr[0].value + return self._pvt_ptr[0].value @value.setter def value(self, unsigned int value): - self._ptr[0].value = value + self._pvt_ptr[0].value = value + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.elementSize' in found_struct}} @property def elementSize(self): - return self._ptr[0].elementSize + return self._pvt_ptr[0].elementSize @elementSize.setter def elementSize(self, unsigned int elementSize): - self._ptr[0].elementSize = elementSize + self._pvt_ptr[0].elementSize = elementSize + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.width' in found_struct}} @property def width(self): - return self._ptr[0].width + return self._pvt_ptr[0].width @width.setter def width(self, size_t width): - self._ptr[0].width = width + self._pvt_ptr[0].width = width + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.height' in found_struct}} @property def height(self): - return self._ptr[0].height + return self._pvt_ptr[0].height @height.setter def height(self, size_t height): - self._ptr[0].height = height + self._pvt_ptr[0].height = height + {{endif}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st.ctx' in found_struct}} @property def ctx(self): return self._ctx @@ -8914,9 +9944,10 @@ cdef class CUDA_MEMSET_NODE_PARAMS_v2_st: else: pctx = int(CUcontext(ctx)) cyctx = pctx - self._ctx._ptr[0] = cyctx + self._ctx._pvt_ptr[0] = cyctx + {{endif}} {{endif}} -{{if 'struct CUDA_HOST_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_HOST_NODE_PARAMS_st' in found_struct}} cdef class CUDA_HOST_NODE_PARAMS_st: """ @@ -8924,42 +9955,53 @@ cdef class CUDA_HOST_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_HOST_NODE_PARAMS_st.fn' in found_struct}} fn : CUhostFn The function to call when the node executes + {{endif}} + {{if 'CUDA_HOST_NODE_PARAMS_st.userData' in found_struct}} userData : Any Argument to pass to the function + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._fn = CUhostFn(_ptr=&self._ptr[0].fn) + pass + {{if 'CUDA_HOST_NODE_PARAMS_st.fn' in found_struct}} + self._fn = CUhostFn(_ptr=&self._pvt_ptr[0].fn) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_HOST_NODE_PARAMS_st.fn' in found_struct}} try: str_list += ['fn : ' + str(self.fn)] except ValueError: str_list += ['fn : '] + {{endif}} + {{if 'CUDA_HOST_NODE_PARAMS_st.userData' in found_struct}} try: str_list += ['userData : ' + hex(self.userData)] except ValueError: str_list += ['userData : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_HOST_NODE_PARAMS_st.fn' in found_struct}} @property def fn(self): return self._fn @@ -8974,16 +10016,19 @@ cdef class CUDA_HOST_NODE_PARAMS_st: else: pfn = int(CUhostFn(fn)) cyfn = pfn - self._fn._ptr[0] = cyfn + self._fn._pvt_ptr[0] = cyfn + {{endif}} + {{if 'CUDA_HOST_NODE_PARAMS_st.userData' in found_struct}} @property def userData(self): - return self._ptr[0].userData + return self._pvt_ptr[0].userData @userData.setter def userData(self, userData): - _cyuserData = utils.HelperInputVoidPtr(userData) - self._ptr[0].userData = _cyuserData.cptr + _cuserData = utils.HelperInputVoidPtr(userData) + self._pvt_ptr[0].userData = _cuserData.cptr + {{endif}} {{endif}} -{{if 'struct CUDA_HOST_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_HOST_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_HOST_NODE_PARAMS_v2_st: """ @@ -8991,42 +10036,53 @@ cdef class CUDA_HOST_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.fn' in found_struct}} fn : CUhostFn The function to call when the node executes + {{endif}} + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.userData' in found_struct}} userData : Any Argument to pass to the function + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._fn = CUhostFn(_ptr=&self._ptr[0].fn) + pass + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.fn' in found_struct}} + self._fn = CUhostFn(_ptr=&self._pvt_ptr[0].fn) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.fn' in found_struct}} try: str_list += ['fn : ' + str(self.fn)] except ValueError: str_list += ['fn : '] + {{endif}} + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.userData' in found_struct}} try: str_list += ['userData : ' + hex(self.userData)] except ValueError: str_list += ['userData : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.fn' in found_struct}} @property def fn(self): return self._fn @@ -9041,16 +10097,19 @@ cdef class CUDA_HOST_NODE_PARAMS_v2_st: else: pfn = int(CUhostFn(fn)) cyfn = pfn - self._fn._ptr[0] = cyfn + self._fn._pvt_ptr[0] = cyfn + {{endif}} + {{if 'CUDA_HOST_NODE_PARAMS_v2_st.userData' in found_struct}} @property def userData(self): - return self._ptr[0].userData + return self._pvt_ptr[0].userData @userData.setter def userData(self, userData): - _cyuserData = utils.HelperInputVoidPtr(userData) - self._ptr[0].userData = _cyuserData.cptr + _cuserData = utils.HelperInputVoidPtr(userData) + self._pvt_ptr[0].userData = _cuserData.cptr + {{endif}} {{endif}} -{{if 'struct CUDA_CONDITIONAL_NODE_PARAMS' in found_types}} +{{if 'CUDA_CONDITIONAL_NODE_PARAMS' in found_struct}} cdef class CUDA_CONDITIONAL_NODE_PARAMS: """ @@ -9058,13 +10117,22 @@ cdef class CUDA_CONDITIONAL_NODE_PARAMS: Attributes ---------- + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.handle' in found_struct}} handle : CUgraphConditionalHandle Conditional node handle. Handles must be created in advance of creating the node using cuGraphConditionalHandleCreate. + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.type' in found_struct}} type : CUgraphConditionalNodeType Type of conditional node. + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.size' in found_struct}} size : unsigned int - Size of graph output array. Must be 1. + Size of graph output array. Allowed values are 1 for + CU_GRAPH_COND_TYPE_WHILE, 1 or 2 for CU_GRAPH_COND_TYPE_IF, or any + value greater than zero for CU_GRAPH_COND_TYPE_SWITCH. + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.phGraph_out' in found_struct}} phGraph_out : CUgraph CUDA-owned array populated with conditional node child graphs during creation of the node. Valid for the lifetime of the @@ -9075,55 +10143,79 @@ cdef class CUDA_CONDITIONAL_NODE_PARAMS: - All kernels, including kernels in nested conditionals or child graphs at any level, must belong to the same CUDA context. These graphs may be populated using graph node creation APIs or - cuStreamBeginCaptureToGraph. + cuStreamBeginCaptureToGraph. CU_GRAPH_COND_TYPE_IF: phGraph_out[0] + is executed when the condition is non-zero. If `size` == 2, + phGraph_out[1] will be executed when the condition is zero. + CU_GRAPH_COND_TYPE_WHILE: phGraph_out[0] is executed as long as the + condition is non-zero. CU_GRAPH_COND_TYPE_SWITCH: phGraph_out[n] is + executed when the condition is equal to n. If the condition >= + `size`, no body graph is executed. + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.ctx' in found_struct}} ctx : CUcontext Context on which to run the node. Must match context used to create the handle and all body nodes. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._handle = CUgraphConditionalHandle(_ptr=&self._ptr[0].handle) - self._ctx = CUcontext(_ptr=&self._ptr[0].ctx) + pass + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.handle' in found_struct}} + self._handle = CUgraphConditionalHandle(_ptr=&self._pvt_ptr[0].handle) + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.ctx' in found_struct}} + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.handle' in found_struct}} try: str_list += ['handle : ' + str(self.handle)] except ValueError: str_list += ['handle : '] + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.size' in found_struct}} try: str_list += ['size : ' + str(self.size)] except ValueError: str_list += ['size : '] + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.phGraph_out' in found_struct}} try: str_list += ['phGraph_out : ' + str(self.phGraph_out)] except ValueError: str_list += ['phGraph_out : '] + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.ctx' in found_struct}} try: str_list += ['ctx : ' + str(self.ctx)] except ValueError: str_list += ['ctx : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.handle' in found_struct}} @property def handle(self): return self._handle @@ -9138,24 +10230,32 @@ cdef class CUDA_CONDITIONAL_NODE_PARAMS: else: phandle = int(CUgraphConditionalHandle(handle)) cyhandle = phandle - self._handle._ptr[0] = cyhandle + self._handle._pvt_ptr[0] = cyhandle + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.type' in found_struct}} @property def type(self): - return CUgraphConditionalNodeType(self._ptr[0].type) + return CUgraphConditionalNodeType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUgraphConditionalNodeType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.size' in found_struct}} @property def size(self): - return self._ptr[0].size + return self._pvt_ptr[0].size @size.setter def size(self, unsigned int size): - self._ptr[0].size = size + self._pvt_ptr[0].size = size + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.phGraph_out' in found_struct}} @property def phGraph_out(self): - arrs = [self._ptr[0].phGraph_out + x*sizeof(cydriver.CUgraph) for x in range(self.size)] + arrs = [self._pvt_ptr[0].phGraph_out + x*sizeof(cydriver.CUgraph) for x in range(self.size)] return [CUgraph(_ptr=arr) for arr in arrs] + {{endif}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS.ctx' in found_struct}} @property def ctx(self): return self._ctx @@ -9170,9 +10270,10 @@ cdef class CUDA_CONDITIONAL_NODE_PARAMS: else: pctx = int(CUcontext(ctx)) cyctx = pctx - self._ctx._ptr[0] = cyctx + self._ctx._pvt_ptr[0] = cyctx + {{endif}} {{endif}} -{{if 'struct CUgraphEdgeData_st' in found_types}} +{{if 'CUgraphEdgeData_st' in found_struct}} cdef class CUgraphEdgeData_st: """ @@ -9183,6 +10284,7 @@ cdef class CUgraphEdgeData_st: Attributes ---------- + {{if 'CUgraphEdgeData_st.from_port' in found_struct}} from_port : bytes This indicates when the dependency is triggered from the upstream node on the edge. The meaning is specfic to the node type. A value @@ -9193,6 +10295,8 @@ cdef class CUgraphEdgeData_st: CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC, or CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER. + {{endif}} + {{if 'CUgraphEdgeData_st.to_port' in found_struct}} to_port : bytes This indicates what portion of the downstream node is dependent on the upstream node or portion thereof (indicated by `from_port`). @@ -9200,82 +10304,102 @@ cdef class CUgraphEdgeData_st: means the entirety of the downstream node is dependent on the upstream work. Currently no node types define non-zero ports. Accordingly, this field must be set to zero. + {{endif}} + {{if 'CUgraphEdgeData_st.type' in found_struct}} type : bytes This should be populated with a value from CUgraphDependencyType. (It is typed as char due to compiler-specific layout of bitfields.) See CUgraphDependencyType. + {{endif}} + {{if 'CUgraphEdgeData_st.reserved' in found_struct}} reserved : bytes These bytes are unused and must be zeroed. This ensures compatibility if additional fields are added in the future. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUgraphEdgeData_st.from_port' in found_struct}} try: str_list += ['from_port : ' + str(self.from_port)] except ValueError: str_list += ['from_port : '] + {{endif}} + {{if 'CUgraphEdgeData_st.to_port' in found_struct}} try: str_list += ['to_port : ' + str(self.to_port)] except ValueError: str_list += ['to_port : '] + {{endif}} + {{if 'CUgraphEdgeData_st.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'CUgraphEdgeData_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUgraphEdgeData_st.from_port' in found_struct}} @property def from_port(self): - return self._ptr[0].from_port + return self._pvt_ptr[0].from_port @from_port.setter def from_port(self, unsigned char from_port): - self._ptr[0].from_port = from_port + self._pvt_ptr[0].from_port = from_port + {{endif}} + {{if 'CUgraphEdgeData_st.to_port' in found_struct}} @property def to_port(self): - return self._ptr[0].to_port + return self._pvt_ptr[0].to_port @to_port.setter def to_port(self, unsigned char to_port): - self._ptr[0].to_port = to_port + self._pvt_ptr[0].to_port = to_port + {{endif}} + {{if 'CUgraphEdgeData_st.type' in found_struct}} @property def type(self): - return self._ptr[0].type + return self._pvt_ptr[0].type @type.setter def type(self, unsigned char type): - self._ptr[0].type = type + self._pvt_ptr[0].type = type + {{endif}} + {{if 'CUgraphEdgeData_st.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].reserved, 5) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 5) @reserved.setter def reserved(self, reserved): if len(reserved) != 5: raise ValueError("reserved length must be 5, is " + str(len(reserved))) for i, b in enumerate(reserved): - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b + {{endif}} {{endif}} -{{if 'struct CUDA_GRAPH_INSTANTIATE_PARAMS_st' in found_types}} +{{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st' in found_struct}} cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: """ @@ -9283,56 +10407,79 @@ cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: Attributes ---------- + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.flags' in found_struct}} flags : cuuint64_t Instantiation flags + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hUploadStream' in found_struct}} hUploadStream : CUstream Upload stream + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hErrNode_out' in found_struct}} hErrNode_out : CUgraphNode The node which caused instantiation to fail, if any + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.result_out' in found_struct}} result_out : CUgraphInstantiateResult Whether instantiation was successful. If it failed, the reason why + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._flags = cuuint64_t(_ptr=&self._ptr[0].flags) - self._hUploadStream = CUstream(_ptr=&self._ptr[0].hUploadStream) - self._hErrNode_out = CUgraphNode(_ptr=&self._ptr[0].hErrNode_out) + pass + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.flags' in found_struct}} + self._flags = cuuint64_t(_ptr=&self._pvt_ptr[0].flags) + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hUploadStream' in found_struct}} + self._hUploadStream = CUstream(_ptr=&self._pvt_ptr[0].hUploadStream) + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hErrNode_out' in found_struct}} + self._hErrNode_out = CUgraphNode(_ptr=&self._pvt_ptr[0].hErrNode_out) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hUploadStream' in found_struct}} try: str_list += ['hUploadStream : ' + str(self.hUploadStream)] except ValueError: str_list += ['hUploadStream : '] + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hErrNode_out' in found_struct}} try: str_list += ['hErrNode_out : ' + str(self.hErrNode_out)] except ValueError: str_list += ['hErrNode_out : '] + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.result_out' in found_struct}} try: str_list += ['result_out : ' + str(self.result_out)] except ValueError: str_list += ['result_out : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.flags' in found_struct}} @property def flags(self): return self._flags @@ -9347,8 +10494,10 @@ cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: else: pflags = int(cuuint64_t(flags)) cyflags = pflags - self._flags._ptr[0] = cyflags + self._flags._pvt_ptr[0] = cyflags + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hUploadStream' in found_struct}} @property def hUploadStream(self): return self._hUploadStream @@ -9363,7 +10512,9 @@ cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: else: phUploadStream = int(CUstream(hUploadStream)) cyhUploadStream = phUploadStream - self._hUploadStream._ptr[0] = cyhUploadStream + self._hUploadStream._pvt_ptr[0] = cyhUploadStream + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.hErrNode_out' in found_struct}} @property def hErrNode_out(self): return self._hErrNode_out @@ -9378,15 +10529,18 @@ cdef class CUDA_GRAPH_INSTANTIATE_PARAMS_st: else: phErrNode_out = int(CUgraphNode(hErrNode_out)) cyhErrNode_out = phErrNode_out - self._hErrNode_out._ptr[0] = cyhErrNode_out + self._hErrNode_out._pvt_ptr[0] = cyhErrNode_out + {{endif}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st.result_out' in found_struct}} @property def result_out(self): - return CUgraphInstantiateResult(self._ptr[0].result_out) + return CUgraphInstantiateResult(self._pvt_ptr[0].result_out) @result_out.setter def result_out(self, result_out not None : CUgraphInstantiateResult): - self._ptr[0].result_out = result_out.value + self._pvt_ptr[0].result_out = result_out.value + {{endif}} {{endif}} -{{if 'struct CUlaunchMemSyncDomainMap_st' in found_types}} +{{if 'CUlaunchMemSyncDomainMap_st' in found_struct}} cdef class CUlaunchMemSyncDomainMap_st: """ @@ -9400,166 +10554,209 @@ cdef class CUlaunchMemSyncDomainMap_st: Attributes ---------- + {{if 'CUlaunchMemSyncDomainMap_st.default_' in found_struct}} default_ : bytes The default domain ID to use for designated kernels + {{endif}} + {{if 'CUlaunchMemSyncDomainMap_st.remote' in found_struct}} remote : bytes The remote domain ID to use for designated kernels + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUlaunchMemSyncDomainMap_st.default_' in found_struct}} try: str_list += ['default_ : ' + str(self.default_)] except ValueError: str_list += ['default_ : '] + {{endif}} + {{if 'CUlaunchMemSyncDomainMap_st.remote' in found_struct}} try: str_list += ['remote : ' + str(self.remote)] except ValueError: str_list += ['remote : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUlaunchMemSyncDomainMap_st.default_' in found_struct}} @property def default_(self): - return self._ptr[0].default_ + return self._pvt_ptr[0].default_ @default_.setter def default_(self, unsigned char default_): - self._ptr[0].default_ = default_ + self._pvt_ptr[0].default_ = default_ + {{endif}} + {{if 'CUlaunchMemSyncDomainMap_st.remote' in found_struct}} @property def remote(self): - return self._ptr[0].remote + return self._pvt_ptr[0].remote @remote.setter def remote(self, unsigned char remote): - self._ptr[0].remote = remote + self._pvt_ptr[0].remote = remote + {{endif}} {{endif}} -{{if 'union CUlaunchAttributeValue_union' in found_types}} +{{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} cdef class anon_struct1: """ Attributes ---------- + {{if 'CUlaunchAttributeValue_union.clusterDim.x' in found_struct}} x : unsigned int + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim.y' in found_struct}} y : unsigned int + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim.z' in found_struct}} z : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].clusterDim + return &self._pvt_ptr[0].clusterDim def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUlaunchAttributeValue_union.clusterDim.x' in found_struct}} try: str_list += ['x : ' + str(self.x)] except ValueError: str_list += ['x : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim.y' in found_struct}} try: str_list += ['y : ' + str(self.y)] except ValueError: str_list += ['y : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim.z' in found_struct}} try: str_list += ['z : ' + str(self.z)] except ValueError: str_list += ['z : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUlaunchAttributeValue_union.clusterDim.x' in found_struct}} @property def x(self): - return self._ptr[0].clusterDim.x + return self._pvt_ptr[0].clusterDim.x @x.setter def x(self, unsigned int x): - self._ptr[0].clusterDim.x = x + self._pvt_ptr[0].clusterDim.x = x + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim.y' in found_struct}} @property def y(self): - return self._ptr[0].clusterDim.y + return self._pvt_ptr[0].clusterDim.y @y.setter def y(self, unsigned int y): - self._ptr[0].clusterDim.y = y + self._pvt_ptr[0].clusterDim.y = y + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim.z' in found_struct}} @property def z(self): - return self._ptr[0].clusterDim.z + return self._pvt_ptr[0].clusterDim.z @z.setter def z(self, unsigned int z): - self._ptr[0].clusterDim.z = z + self._pvt_ptr[0].clusterDim.z = z + {{endif}} {{endif}} -{{if 'union CUlaunchAttributeValue_union' in found_types}} +{{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} cdef class anon_struct2: """ Attributes ---------- + {{if 'CUlaunchAttributeValue_union.programmaticEvent.event' in found_struct}} event : CUevent + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent.flags' in found_struct}} flags : int + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent.triggerAtBlockStart' in found_struct}} triggerAtBlockStart : int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._event = CUevent(_ptr=&self._ptr[0].programmaticEvent.event) + pass + {{if 'CUlaunchAttributeValue_union.programmaticEvent.event' in found_struct}} + self._event = CUevent(_ptr=&self._pvt_ptr[0].programmaticEvent.event) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].programmaticEvent + return &self._pvt_ptr[0].programmaticEvent def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUlaunchAttributeValue_union.programmaticEvent.event' in found_struct}} try: str_list += ['event : ' + str(self.event)] except ValueError: str_list += ['event : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent.triggerAtBlockStart' in found_struct}} try: str_list += ['triggerAtBlockStart : ' + str(self.triggerAtBlockStart)] except ValueError: str_list += ['triggerAtBlockStart : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUlaunchAttributeValue_union.programmaticEvent.event' in found_struct}} @property def event(self): return self._event @@ -9574,60 +10771,76 @@ cdef class anon_struct2: else: pevent = int(CUevent(event)) cyevent = pevent - self._event._ptr[0] = cyevent + self._event._pvt_ptr[0] = cyevent + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent.flags' in found_struct}} @property def flags(self): - return self._ptr[0].programmaticEvent.flags + return self._pvt_ptr[0].programmaticEvent.flags @flags.setter def flags(self, int flags): - self._ptr[0].programmaticEvent.flags = flags + self._pvt_ptr[0].programmaticEvent.flags = flags + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent.triggerAtBlockStart' in found_struct}} @property def triggerAtBlockStart(self): - return self._ptr[0].programmaticEvent.triggerAtBlockStart + return self._pvt_ptr[0].programmaticEvent.triggerAtBlockStart @triggerAtBlockStart.setter def triggerAtBlockStart(self, int triggerAtBlockStart): - self._ptr[0].programmaticEvent.triggerAtBlockStart = triggerAtBlockStart + self._pvt_ptr[0].programmaticEvent.triggerAtBlockStart = triggerAtBlockStart + {{endif}} {{endif}} -{{if 'union CUlaunchAttributeValue_union' in found_types}} +{{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} cdef class anon_struct3: """ Attributes ---------- + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent.event' in found_struct}} event : CUevent + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent.flags' in found_struct}} flags : int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._event = CUevent(_ptr=&self._ptr[0].launchCompletionEvent.event) + pass + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent.event' in found_struct}} + self._event = CUevent(_ptr=&self._pvt_ptr[0].launchCompletionEvent.event) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].launchCompletionEvent + return &self._pvt_ptr[0].launchCompletionEvent def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent.event' in found_struct}} try: str_list += ['event : ' + str(self.event)] except ValueError: str_list += ['event : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent.event' in found_struct}} @property def event(self): return self._event @@ -9642,60 +10855,158 @@ cdef class anon_struct3: else: pevent = int(CUevent(event)) cyevent = pevent - self._event._ptr[0] = cyevent + self._event._pvt_ptr[0] = cyevent + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent.flags' in found_struct}} @property def flags(self): - return self._ptr[0].launchCompletionEvent.flags + return self._pvt_ptr[0].launchCompletionEvent.flags @flags.setter def flags(self, int flags): - self._ptr[0].launchCompletionEvent.flags = flags + self._pvt_ptr[0].launchCompletionEvent.flags = flags + {{endif}} {{endif}} -{{if 'union CUlaunchAttributeValue_union' in found_types}} +{{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} cdef class anon_struct4: """ Attributes ---------- + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.x' in found_struct}} + x : unsigned int + + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.y' in found_struct}} + y : unsigned int + + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.z' in found_struct}} + z : unsigned int + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].preferredClusterDim + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.x' in found_struct}} + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.y' in found_struct}} + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.z' in found_struct}} + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.x' in found_struct}} + @property + def x(self): + return self._pvt_ptr[0].preferredClusterDim.x + @x.setter + def x(self, unsigned int x): + self._pvt_ptr[0].preferredClusterDim.x = x + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.y' in found_struct}} + @property + def y(self): + return self._pvt_ptr[0].preferredClusterDim.y + @y.setter + def y(self, unsigned int y): + self._pvt_ptr[0].preferredClusterDim.y = y + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim.z' in found_struct}} + @property + def z(self): + return self._pvt_ptr[0].preferredClusterDim.z + @z.setter + def z(self, unsigned int z): + self._pvt_ptr[0].preferredClusterDim.z = z + {{endif}} +{{endif}} +{{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} + +cdef class anon_struct5: + """ + Attributes + ---------- + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode.deviceUpdatable' in found_struct}} deviceUpdatable : int + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode.devNode' in found_struct}} devNode : CUgraphDeviceNode + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._devNode = CUgraphDeviceNode(_ptr=&self._ptr[0].deviceUpdatableKernelNode.devNode) + pass + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode.devNode' in found_struct}} + self._devNode = CUgraphDeviceNode(_ptr=&self._pvt_ptr[0].deviceUpdatableKernelNode.devNode) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].deviceUpdatableKernelNode + return &self._pvt_ptr[0].deviceUpdatableKernelNode def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode.deviceUpdatable' in found_struct}} try: str_list += ['deviceUpdatable : ' + str(self.deviceUpdatable)] except ValueError: str_list += ['deviceUpdatable : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode.devNode' in found_struct}} try: str_list += ['devNode : ' + str(self.devNode)] except ValueError: str_list += ['devNode : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode.deviceUpdatable' in found_struct}} @property def deviceUpdatable(self): - return self._ptr[0].deviceUpdatableKernelNode.deviceUpdatable + return self._pvt_ptr[0].deviceUpdatableKernelNode.deviceUpdatable @deviceUpdatable.setter def deviceUpdatable(self, int deviceUpdatable): - self._ptr[0].deviceUpdatableKernelNode.deviceUpdatable = deviceUpdatable + self._pvt_ptr[0].deviceUpdatableKernelNode.deviceUpdatable = deviceUpdatable + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode.devNode' in found_struct}} @property def devNode(self): return self._devNode @@ -9710,9 +11021,10 @@ cdef class anon_struct4: else: pdevNode = int(CUgraphDeviceNode(devNode)) cydevNode = pdevNode - self._devNode._ptr[0] = cydevNode + self._devNode._pvt_ptr[0] = cydevNode + {{endif}} {{endif}} -{{if 'union CUlaunchAttributeValue_union' in found_types}} +{{if 'CUlaunchAttributeValue_union' in found_struct}} cdef class CUlaunchAttributeValue_union: """ @@ -9720,17 +11032,26 @@ cdef class CUlaunchAttributeValue_union: Attributes ---------- + {{if 'CUlaunchAttributeValue_union.pad' in found_struct}} pad : bytes + {{endif}} + {{if 'CUlaunchAttributeValue_union.accessPolicyWindow' in found_struct}} accessPolicyWindow : CUaccessPolicyWindow Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW. + {{endif}} + {{if 'CUlaunchAttributeValue_union.cooperative' in found_struct}} cooperative : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero indicates a cooperative kernel (see cuLaunchCooperativeKernel). + {{endif}} + {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} syncPolicy : CUsynchronizationPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. ::CUsynchronizationPolicy for work queued up in this stream + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} clusterDim : anon_struct1 Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION that represents the desired cluster dimensions for the kernel. @@ -9739,13 +11060,19 @@ cdef class CUlaunchAttributeValue_union: - `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension. - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension. + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : CUclusterSchedulingPolicy Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster scheduling policy preference for the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed' in found_struct}} programmaticStreamSerializationAllowed : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION. + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} programmaticEvent : anon_struct2 Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT with the following fields: - `CUevent` event - Event to fire when @@ -9753,119 +11080,197 @@ cdef class CUlaunchAttributeValue_union: cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. - `triggerAtBlockStart` - If this is set to non-0, each block launch will automatically trigger the event. + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} launchCompletionEvent : anon_struct3 Value of launch attribute CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following fields: - `CUevent` event - Event to fire when the last block launches - `int` flags; - Event record flags, see cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL. + {{endif}} + {{if 'CUlaunchAttributeValue_union.priority' in found_struct}} priority : int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution priority of the kernel. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomainMap' in found_struct}} memSyncDomainMap : CUlaunchMemSyncDomainMap Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. See CUlaunchMemSyncDomainMap. + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomain' in found_struct}} memSyncDomain : CUlaunchMemSyncDomain Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. See::CUlaunchMemSyncDomain - deviceUpdatableKernelNode : anon_struct4 + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} + preferredClusterDim : anon_struct4 + Value of launch attribute + CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + CUlaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + CUlaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + CUlaunchAttributeValue::clusterDim. + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} + deviceUpdatableKernelNode : anon_struct5 Value of launch attribute CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the following fields: - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable. - `CUgraphDeviceNode` devNode - Returns a handle to pass to the various device-side update functions. + {{endif}} + {{if 'CUlaunchAttributeValue_union.sharedMemCarveout' in found_struct}} sharedMemCarveout : unsigned int Value of launch attribute CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._accessPolicyWindow = CUaccessPolicyWindow(_ptr=&self._ptr[0].accessPolicyWindow) - self._clusterDim = anon_struct1(_ptr=self._ptr) - self._programmaticEvent = anon_struct2(_ptr=self._ptr) - self._launchCompletionEvent = anon_struct3(_ptr=self._ptr) - self._memSyncDomainMap = CUlaunchMemSyncDomainMap(_ptr=&self._ptr[0].memSyncDomainMap) - self._deviceUpdatableKernelNode = anon_struct4(_ptr=self._ptr) + pass + {{if 'CUlaunchAttributeValue_union.accessPolicyWindow' in found_struct}} + self._accessPolicyWindow = CUaccessPolicyWindow(_ptr=&self._pvt_ptr[0].accessPolicyWindow) + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} + self._clusterDim = anon_struct1(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} + self._programmaticEvent = anon_struct2(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} + self._launchCompletionEvent = anon_struct3(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomainMap' in found_struct}} + self._memSyncDomainMap = CUlaunchMemSyncDomainMap(_ptr=&self._pvt_ptr[0].memSyncDomainMap) + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} + self._preferredClusterDim = anon_struct4(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} + self._deviceUpdatableKernelNode = anon_struct5(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUlaunchAttributeValue_union.pad' in found_struct}} try: str_list += ['pad : ' + str(self.pad)] except ValueError: str_list += ['pad : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.accessPolicyWindow' in found_struct}} try: str_list += ['accessPolicyWindow :\n' + '\n'.join([' ' + line for line in str(self.accessPolicyWindow).splitlines()])] except ValueError: str_list += ['accessPolicyWindow : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.cooperative' in found_struct}} try: str_list += ['cooperative : ' + str(self.cooperative)] except ValueError: str_list += ['cooperative : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} try: str_list += ['syncPolicy : ' + str(self.syncPolicy)] except ValueError: str_list += ['syncPolicy : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} try: str_list += ['clusterDim :\n' + '\n'.join([' ' + line for line in str(self.clusterDim).splitlines()])] except ValueError: str_list += ['clusterDim : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference' in found_struct}} try: str_list += ['clusterSchedulingPolicyPreference : ' + str(self.clusterSchedulingPolicyPreference)] except ValueError: str_list += ['clusterSchedulingPolicyPreference : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed' in found_struct}} try: str_list += ['programmaticStreamSerializationAllowed : ' + str(self.programmaticStreamSerializationAllowed)] except ValueError: str_list += ['programmaticStreamSerializationAllowed : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} try: str_list += ['programmaticEvent :\n' + '\n'.join([' ' + line for line in str(self.programmaticEvent).splitlines()])] except ValueError: str_list += ['programmaticEvent : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} try: str_list += ['launchCompletionEvent :\n' + '\n'.join([' ' + line for line in str(self.launchCompletionEvent).splitlines()])] except ValueError: str_list += ['launchCompletionEvent : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.priority' in found_struct}} try: str_list += ['priority : ' + str(self.priority)] except ValueError: str_list += ['priority : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomainMap' in found_struct}} try: str_list += ['memSyncDomainMap :\n' + '\n'.join([' ' + line for line in str(self.memSyncDomainMap).splitlines()])] except ValueError: str_list += ['memSyncDomainMap : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomain' in found_struct}} try: str_list += ['memSyncDomain : ' + str(self.memSyncDomain)] except ValueError: str_list += ['memSyncDomain : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} + try: + str_list += ['preferredClusterDim :\n' + '\n'.join([' ' + line for line in str(self.preferredClusterDim).splitlines()])] + except ValueError: + str_list += ['preferredClusterDim : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} try: str_list += ['deviceUpdatableKernelNode :\n' + '\n'.join([' ' + line for line in str(self.deviceUpdatableKernelNode).splitlines()])] except ValueError: str_list += ['deviceUpdatableKernelNode : '] + {{endif}} + {{if 'CUlaunchAttributeValue_union.sharedMemCarveout' in found_struct}} try: str_list += ['sharedMemCarveout : ' + str(self.sharedMemCarveout)] except ValueError: str_list += ['sharedMemCarveout : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUlaunchAttributeValue_union.pad' in found_struct}} @property def pad(self): - return PyBytes_FromStringAndSize(self._ptr[0].pad, 64) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].pad, 64) @pad.setter def pad(self, pad): if len(pad) != 64: @@ -9874,92 +11279,127 @@ cdef class CUlaunchAttributeValue_union: for i, b in enumerate(pad): if b < 0 and b > -129: b = b + 256 - self._ptr[0].pad[i] = b + self._pvt_ptr[0].pad[i] = b else: for i, b in enumerate(pad): if b > 127 and b < 256: b = b - 256 - self._ptr[0].pad[i] = b + self._pvt_ptr[0].pad[i] = b + {{endif}} + {{if 'CUlaunchAttributeValue_union.accessPolicyWindow' in found_struct}} @property def accessPolicyWindow(self): return self._accessPolicyWindow @accessPolicyWindow.setter def accessPolicyWindow(self, accessPolicyWindow not None : CUaccessPolicyWindow): - string.memcpy(&self._ptr[0].accessPolicyWindow, accessPolicyWindow.getPtr(), sizeof(self._ptr[0].accessPolicyWindow)) + string.memcpy(&self._pvt_ptr[0].accessPolicyWindow, accessPolicyWindow.getPtr(), sizeof(self._pvt_ptr[0].accessPolicyWindow)) + {{endif}} + {{if 'CUlaunchAttributeValue_union.cooperative' in found_struct}} @property def cooperative(self): - return self._ptr[0].cooperative + return self._pvt_ptr[0].cooperative @cooperative.setter def cooperative(self, int cooperative): - self._ptr[0].cooperative = cooperative + self._pvt_ptr[0].cooperative = cooperative + {{endif}} + {{if 'CUlaunchAttributeValue_union.syncPolicy' in found_struct}} @property def syncPolicy(self): - return CUsynchronizationPolicy(self._ptr[0].syncPolicy) + return CUsynchronizationPolicy(self._pvt_ptr[0].syncPolicy) @syncPolicy.setter def syncPolicy(self, syncPolicy not None : CUsynchronizationPolicy): - self._ptr[0].syncPolicy = syncPolicy.value + self._pvt_ptr[0].syncPolicy = syncPolicy.value + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterDim' in found_struct}} @property def clusterDim(self): return self._clusterDim @clusterDim.setter def clusterDim(self, clusterDim not None : anon_struct1): - string.memcpy(&self._ptr[0].clusterDim, clusterDim.getPtr(), sizeof(self._ptr[0].clusterDim)) + string.memcpy(&self._pvt_ptr[0].clusterDim, clusterDim.getPtr(), sizeof(self._pvt_ptr[0].clusterDim)) + {{endif}} + {{if 'CUlaunchAttributeValue_union.clusterSchedulingPolicyPreference' in found_struct}} @property def clusterSchedulingPolicyPreference(self): - return CUclusterSchedulingPolicy(self._ptr[0].clusterSchedulingPolicyPreference) + return CUclusterSchedulingPolicy(self._pvt_ptr[0].clusterSchedulingPolicyPreference) @clusterSchedulingPolicyPreference.setter def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : CUclusterSchedulingPolicy): - self._ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value + self._pvt_ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticStreamSerializationAllowed' in found_struct}} @property def programmaticStreamSerializationAllowed(self): - return self._ptr[0].programmaticStreamSerializationAllowed + return self._pvt_ptr[0].programmaticStreamSerializationAllowed @programmaticStreamSerializationAllowed.setter def programmaticStreamSerializationAllowed(self, int programmaticStreamSerializationAllowed): - self._ptr[0].programmaticStreamSerializationAllowed = programmaticStreamSerializationAllowed + self._pvt_ptr[0].programmaticStreamSerializationAllowed = programmaticStreamSerializationAllowed + {{endif}} + {{if 'CUlaunchAttributeValue_union.programmaticEvent' in found_struct}} @property def programmaticEvent(self): return self._programmaticEvent @programmaticEvent.setter def programmaticEvent(self, programmaticEvent not None : anon_struct2): - string.memcpy(&self._ptr[0].programmaticEvent, programmaticEvent.getPtr(), sizeof(self._ptr[0].programmaticEvent)) + string.memcpy(&self._pvt_ptr[0].programmaticEvent, programmaticEvent.getPtr(), sizeof(self._pvt_ptr[0].programmaticEvent)) + {{endif}} + {{if 'CUlaunchAttributeValue_union.launchCompletionEvent' in found_struct}} @property def launchCompletionEvent(self): return self._launchCompletionEvent @launchCompletionEvent.setter def launchCompletionEvent(self, launchCompletionEvent not None : anon_struct3): - string.memcpy(&self._ptr[0].launchCompletionEvent, launchCompletionEvent.getPtr(), sizeof(self._ptr[0].launchCompletionEvent)) + string.memcpy(&self._pvt_ptr[0].launchCompletionEvent, launchCompletionEvent.getPtr(), sizeof(self._pvt_ptr[0].launchCompletionEvent)) + {{endif}} + {{if 'CUlaunchAttributeValue_union.priority' in found_struct}} @property def priority(self): - return self._ptr[0].priority + return self._pvt_ptr[0].priority @priority.setter def priority(self, int priority): - self._ptr[0].priority = priority + self._pvt_ptr[0].priority = priority + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomainMap' in found_struct}} @property def memSyncDomainMap(self): return self._memSyncDomainMap @memSyncDomainMap.setter def memSyncDomainMap(self, memSyncDomainMap not None : CUlaunchMemSyncDomainMap): - string.memcpy(&self._ptr[0].memSyncDomainMap, memSyncDomainMap.getPtr(), sizeof(self._ptr[0].memSyncDomainMap)) + string.memcpy(&self._pvt_ptr[0].memSyncDomainMap, memSyncDomainMap.getPtr(), sizeof(self._pvt_ptr[0].memSyncDomainMap)) + {{endif}} + {{if 'CUlaunchAttributeValue_union.memSyncDomain' in found_struct}} @property def memSyncDomain(self): - return CUlaunchMemSyncDomain(self._ptr[0].memSyncDomain) + return CUlaunchMemSyncDomain(self._pvt_ptr[0].memSyncDomain) @memSyncDomain.setter def memSyncDomain(self, memSyncDomain not None : CUlaunchMemSyncDomain): - self._ptr[0].memSyncDomain = memSyncDomain.value + self._pvt_ptr[0].memSyncDomain = memSyncDomain.value + {{endif}} + {{if 'CUlaunchAttributeValue_union.preferredClusterDim' in found_struct}} + @property + def preferredClusterDim(self): + return self._preferredClusterDim + @preferredClusterDim.setter + def preferredClusterDim(self, preferredClusterDim not None : anon_struct4): + string.memcpy(&self._pvt_ptr[0].preferredClusterDim, preferredClusterDim.getPtr(), sizeof(self._pvt_ptr[0].preferredClusterDim)) + {{endif}} + {{if 'CUlaunchAttributeValue_union.deviceUpdatableKernelNode' in found_struct}} @property def deviceUpdatableKernelNode(self): return self._deviceUpdatableKernelNode @deviceUpdatableKernelNode.setter - def deviceUpdatableKernelNode(self, deviceUpdatableKernelNode not None : anon_struct4): - string.memcpy(&self._ptr[0].deviceUpdatableKernelNode, deviceUpdatableKernelNode.getPtr(), sizeof(self._ptr[0].deviceUpdatableKernelNode)) + def deviceUpdatableKernelNode(self, deviceUpdatableKernelNode not None : anon_struct5): + string.memcpy(&self._pvt_ptr[0].deviceUpdatableKernelNode, deviceUpdatableKernelNode.getPtr(), sizeof(self._pvt_ptr[0].deviceUpdatableKernelNode)) + {{endif}} + {{if 'CUlaunchAttributeValue_union.sharedMemCarveout' in found_struct}} @property def sharedMemCarveout(self): - return self._ptr[0].sharedMemCarveout + return self._pvt_ptr[0].sharedMemCarveout @sharedMemCarveout.setter def sharedMemCarveout(self, unsigned int sharedMemCarveout): - self._ptr[0].sharedMemCarveout = sharedMemCarveout + self._pvt_ptr[0].sharedMemCarveout = sharedMemCarveout + {{endif}} {{endif}} -{{if 'struct CUlaunchAttribute_st' in found_types}} +{{if 'CUlaunchAttribute_st' in found_struct}} cdef class CUlaunchAttribute_st: """ @@ -9967,56 +11407,70 @@ cdef class CUlaunchAttribute_st: Attributes ---------- + {{if 'CUlaunchAttribute_st.id' in found_struct}} id : CUlaunchAttributeID Attribute to set + {{endif}} + {{if 'CUlaunchAttribute_st.value' in found_struct}} value : CUlaunchAttributeValue Value of the attribute + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._value = CUlaunchAttributeValue(_ptr=&self._ptr[0].value) + pass + {{if 'CUlaunchAttribute_st.value' in found_struct}} + self._value = CUlaunchAttributeValue(_ptr=&self._pvt_ptr[0].value) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUlaunchAttribute_st.id' in found_struct}} try: str_list += ['id : ' + str(self.id)] except ValueError: str_list += ['id : '] + {{endif}} + {{if 'CUlaunchAttribute_st.value' in found_struct}} try: str_list += ['value :\n' + '\n'.join([' ' + line for line in str(self.value).splitlines()])] except ValueError: str_list += ['value : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUlaunchAttribute_st.id' in found_struct}} @property def id(self): - return CUlaunchAttributeID(self._ptr[0].id) + return CUlaunchAttributeID(self._pvt_ptr[0].id) @id.setter def id(self, id not None : CUlaunchAttributeID): - self._ptr[0].id = id.value + self._pvt_ptr[0].id = id.value + {{endif}} + {{if 'CUlaunchAttribute_st.value' in found_struct}} @property def value(self): return self._value @value.setter def value(self, value not None : CUlaunchAttributeValue): - string.memcpy(&self._ptr[0].value, value.getPtr(), sizeof(self._ptr[0].value)) + string.memcpy(&self._pvt_ptr[0].value, value.getPtr(), sizeof(self._pvt_ptr[0].value)) + {{endif}} {{endif}} -{{if 'struct CUlaunchConfig_st' in found_types}} +{{if 'CUlaunchConfig_st' in found_struct}} cdef class CUlaunchConfig_st: """ @@ -10024,133 +11478,193 @@ cdef class CUlaunchConfig_st: Attributes ---------- + {{if 'CUlaunchConfig_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUlaunchConfig_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUlaunchConfig_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUlaunchConfig_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUlaunchConfig_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUlaunchConfig_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUlaunchConfig_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUlaunchConfig_st.hStream' in found_struct}} hStream : CUstream Stream identifier + {{endif}} + {{if 'CUlaunchConfig_st.attrs' in found_struct}} attrs : CUlaunchAttribute List of attributes; nullable if CUlaunchConfig::numAttrs == 0 + {{endif}} + {{if 'CUlaunchConfig_st.numAttrs' in found_struct}} numAttrs : unsigned int Number of attributes populated in CUlaunchConfig::attrs + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._hStream = CUstream(_ptr=&self._ptr[0].hStream) + pass + {{if 'CUlaunchConfig_st.hStream' in found_struct}} + self._hStream = CUstream(_ptr=&self._pvt_ptr[0].hStream) + {{endif}} def __dealloc__(self): + pass + {{if 'CUlaunchConfig_st.attrs' in found_struct}} if self._attrs is not NULL: free(self._attrs) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUlaunchConfig_st.gridDimX' in found_struct}} try: str_list += ['gridDimX : ' + str(self.gridDimX)] except ValueError: str_list += ['gridDimX : '] + {{endif}} + {{if 'CUlaunchConfig_st.gridDimY' in found_struct}} try: str_list += ['gridDimY : ' + str(self.gridDimY)] except ValueError: str_list += ['gridDimY : '] + {{endif}} + {{if 'CUlaunchConfig_st.gridDimZ' in found_struct}} try: str_list += ['gridDimZ : ' + str(self.gridDimZ)] except ValueError: str_list += ['gridDimZ : '] + {{endif}} + {{if 'CUlaunchConfig_st.blockDimX' in found_struct}} try: str_list += ['blockDimX : ' + str(self.blockDimX)] except ValueError: str_list += ['blockDimX : '] + {{endif}} + {{if 'CUlaunchConfig_st.blockDimY' in found_struct}} try: str_list += ['blockDimY : ' + str(self.blockDimY)] except ValueError: str_list += ['blockDimY : '] + {{endif}} + {{if 'CUlaunchConfig_st.blockDimZ' in found_struct}} try: str_list += ['blockDimZ : ' + str(self.blockDimZ)] except ValueError: str_list += ['blockDimZ : '] + {{endif}} + {{if 'CUlaunchConfig_st.sharedMemBytes' in found_struct}} try: str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] except ValueError: str_list += ['sharedMemBytes : '] + {{endif}} + {{if 'CUlaunchConfig_st.hStream' in found_struct}} try: str_list += ['hStream : ' + str(self.hStream)] except ValueError: str_list += ['hStream : '] + {{endif}} + {{if 'CUlaunchConfig_st.attrs' in found_struct}} try: str_list += ['attrs : ' + str(self.attrs)] except ValueError: str_list += ['attrs : '] + {{endif}} + {{if 'CUlaunchConfig_st.numAttrs' in found_struct}} try: str_list += ['numAttrs : ' + str(self.numAttrs)] except ValueError: str_list += ['numAttrs : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUlaunchConfig_st.gridDimX' in found_struct}} @property def gridDimX(self): - return self._ptr[0].gridDimX + return self._pvt_ptr[0].gridDimX @gridDimX.setter def gridDimX(self, unsigned int gridDimX): - self._ptr[0].gridDimX = gridDimX + self._pvt_ptr[0].gridDimX = gridDimX + {{endif}} + {{if 'CUlaunchConfig_st.gridDimY' in found_struct}} @property def gridDimY(self): - return self._ptr[0].gridDimY + return self._pvt_ptr[0].gridDimY @gridDimY.setter def gridDimY(self, unsigned int gridDimY): - self._ptr[0].gridDimY = gridDimY + self._pvt_ptr[0].gridDimY = gridDimY + {{endif}} + {{if 'CUlaunchConfig_st.gridDimZ' in found_struct}} @property def gridDimZ(self): - return self._ptr[0].gridDimZ + return self._pvt_ptr[0].gridDimZ @gridDimZ.setter def gridDimZ(self, unsigned int gridDimZ): - self._ptr[0].gridDimZ = gridDimZ + self._pvt_ptr[0].gridDimZ = gridDimZ + {{endif}} + {{if 'CUlaunchConfig_st.blockDimX' in found_struct}} @property def blockDimX(self): - return self._ptr[0].blockDimX + return self._pvt_ptr[0].blockDimX @blockDimX.setter def blockDimX(self, unsigned int blockDimX): - self._ptr[0].blockDimX = blockDimX + self._pvt_ptr[0].blockDimX = blockDimX + {{endif}} + {{if 'CUlaunchConfig_st.blockDimY' in found_struct}} @property def blockDimY(self): - return self._ptr[0].blockDimY + return self._pvt_ptr[0].blockDimY @blockDimY.setter def blockDimY(self, unsigned int blockDimY): - self._ptr[0].blockDimY = blockDimY + self._pvt_ptr[0].blockDimY = blockDimY + {{endif}} + {{if 'CUlaunchConfig_st.blockDimZ' in found_struct}} @property def blockDimZ(self): - return self._ptr[0].blockDimZ + return self._pvt_ptr[0].blockDimZ @blockDimZ.setter def blockDimZ(self, unsigned int blockDimZ): - self._ptr[0].blockDimZ = blockDimZ + self._pvt_ptr[0].blockDimZ = blockDimZ + {{endif}} + {{if 'CUlaunchConfig_st.sharedMemBytes' in found_struct}} @property def sharedMemBytes(self): - return self._ptr[0].sharedMemBytes + return self._pvt_ptr[0].sharedMemBytes @sharedMemBytes.setter def sharedMemBytes(self, unsigned int sharedMemBytes): - self._ptr[0].sharedMemBytes = sharedMemBytes + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + {{endif}} + {{if 'CUlaunchConfig_st.hStream' in found_struct}} @property def hStream(self): return self._hStream @@ -10165,17 +11679,19 @@ cdef class CUlaunchConfig_st: else: phStream = int(CUstream(hStream)) cyhStream = phStream - self._hStream._ptr[0] = cyhStream + self._hStream._pvt_ptr[0] = cyhStream + {{endif}} + {{if 'CUlaunchConfig_st.attrs' in found_struct}} @property def attrs(self): - arrs = [self._ptr[0].attrs + x*sizeof(cydriver.CUlaunchAttribute) for x in range(self._attrs_length)] + arrs = [self._pvt_ptr[0].attrs + x*sizeof(cydriver.CUlaunchAttribute) for x in range(self._attrs_length)] return [CUlaunchAttribute(_ptr=arr) for arr in arrs] @attrs.setter def attrs(self, val): if len(val) == 0: free(self._attrs) self._attrs_length = 0 - self._ptr[0].attrs = NULL + self._pvt_ptr[0].attrs = NULL else: if self._attrs_length != len(val): free(self._attrs) @@ -10183,18 +11699,21 @@ cdef class CUlaunchConfig_st: if self._attrs is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUlaunchAttribute))) self._attrs_length = len(val) - self._ptr[0].attrs = self._attrs + self._pvt_ptr[0].attrs = self._attrs for idx in range(len(val)): - string.memcpy(&self._attrs[idx], (val[idx])._ptr, sizeof(cydriver.CUlaunchAttribute)) + string.memcpy(&self._attrs[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUlaunchAttribute)) + {{endif}} + {{if 'CUlaunchConfig_st.numAttrs' in found_struct}} @property def numAttrs(self): - return self._ptr[0].numAttrs + return self._pvt_ptr[0].numAttrs @numAttrs.setter def numAttrs(self, unsigned int numAttrs): - self._ptr[0].numAttrs = numAttrs + self._pvt_ptr[0].numAttrs = numAttrs + {{endif}} {{endif}} -{{if 'struct CUexecAffinitySmCount_st' in found_types}} +{{if 'CUexecAffinitySmCount_st' in found_struct}} cdef class CUexecAffinitySmCount_st: """ @@ -10202,85 +11721,98 @@ cdef class CUexecAffinitySmCount_st: Attributes ---------- + {{if 'CUexecAffinitySmCount_st.val' in found_struct}} val : unsigned int The number of SMs the context is limited to use. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUexecAffinitySmCount_st.val' in found_struct}} try: str_list += ['val : ' + str(self.val)] except ValueError: str_list += ['val : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUexecAffinitySmCount_st.val' in found_struct}} @property def val(self): - return self._ptr[0].val + return self._pvt_ptr[0].val @val.setter def val(self, unsigned int val): - self._ptr[0].val = val + self._pvt_ptr[0].val = val + {{endif}} {{endif}} -{{if 'struct CUexecAffinityParam_st' in found_types}} +{{if 'CUexecAffinityParam_st.param' in found_struct}} cdef class anon_union3: """ Attributes ---------- + {{if 'CUexecAffinityParam_st.param.smCount' in found_struct}} smCount : CUexecAffinitySmCount + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._smCount = CUexecAffinitySmCount(_ptr=&self._ptr[0].param.smCount) + pass + {{if 'CUexecAffinityParam_st.param.smCount' in found_struct}} + self._smCount = CUexecAffinitySmCount(_ptr=&self._pvt_ptr[0].param.smCount) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].param + return &self._pvt_ptr[0].param def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUexecAffinityParam_st.param.smCount' in found_struct}} try: str_list += ['smCount :\n' + '\n'.join([' ' + line for line in str(self.smCount).splitlines()])] except ValueError: str_list += ['smCount : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUexecAffinityParam_st.param.smCount' in found_struct}} @property def smCount(self): return self._smCount @smCount.setter def smCount(self, smCount not None : CUexecAffinitySmCount): - string.memcpy(&self._ptr[0].param.smCount, smCount.getPtr(), sizeof(self._ptr[0].param.smCount)) + string.memcpy(&self._pvt_ptr[0].param.smCount, smCount.getPtr(), sizeof(self._pvt_ptr[0].param.smCount)) + {{endif}} {{endif}} -{{if 'struct CUexecAffinityParam_st' in found_types}} +{{if 'CUexecAffinityParam_st' in found_struct}} cdef class CUexecAffinityParam_st: """ @@ -10288,58 +11820,72 @@ cdef class CUexecAffinityParam_st: Attributes ---------- + {{if 'CUexecAffinityParam_st.type' in found_struct}} type : CUexecAffinityType + {{endif}} + {{if 'CUexecAffinityParam_st.param' in found_struct}} param : anon_union3 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cydriver.CUexecAffinityParam_st)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._param = anon_union3(_ptr=self._ptr) + pass + {{if 'CUexecAffinityParam_st.param' in found_struct}} + self._param = anon_union3(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUexecAffinityParam_st.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'CUexecAffinityParam_st.param' in found_struct}} try: str_list += ['param :\n' + '\n'.join([' ' + line for line in str(self.param).splitlines()])] except ValueError: str_list += ['param : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUexecAffinityParam_st.type' in found_struct}} @property def type(self): - return CUexecAffinityType(self._ptr[0].type) + return CUexecAffinityType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUexecAffinityType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'CUexecAffinityParam_st.param' in found_struct}} @property def param(self): return self._param @param.setter def param(self, param not None : anon_union3): - string.memcpy(&self._ptr[0].param, param.getPtr(), sizeof(self._ptr[0].param)) + string.memcpy(&self._pvt_ptr[0].param, param.getPtr(), sizeof(self._pvt_ptr[0].param)) + {{endif}} {{endif}} -{{if 'struct CUctxCigParam_st' in found_types}} +{{if 'CUctxCigParam_st' in found_struct}} cdef class CUctxCigParam_st: """ @@ -10347,57 +11893,68 @@ cdef class CUctxCigParam_st: Attributes ---------- + {{if 'CUctxCigParam_st.sharedDataType' in found_struct}} sharedDataType : CUcigDataType + {{endif}} + {{if 'CUctxCigParam_st.sharedData' in found_struct}} sharedData : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUctxCigParam_st.sharedDataType' in found_struct}} try: str_list += ['sharedDataType : ' + str(self.sharedDataType)] except ValueError: str_list += ['sharedDataType : '] + {{endif}} + {{if 'CUctxCigParam_st.sharedData' in found_struct}} try: str_list += ['sharedData : ' + hex(self.sharedData)] except ValueError: str_list += ['sharedData : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUctxCigParam_st.sharedDataType' in found_struct}} @property def sharedDataType(self): - return CUcigDataType(self._ptr[0].sharedDataType) + return CUcigDataType(self._pvt_ptr[0].sharedDataType) @sharedDataType.setter def sharedDataType(self, sharedDataType not None : CUcigDataType): - self._ptr[0].sharedDataType = sharedDataType.value + self._pvt_ptr[0].sharedDataType = sharedDataType.value + {{endif}} + {{if 'CUctxCigParam_st.sharedData' in found_struct}} @property def sharedData(self): - return self._ptr[0].sharedData + return self._pvt_ptr[0].sharedData @sharedData.setter def sharedData(self, sharedData): - _cysharedData = utils.HelperInputVoidPtr(sharedData) - self._ptr[0].sharedData = _cysharedData.cptr + _csharedData = utils.HelperInputVoidPtr(sharedData) + self._pvt_ptr[0].sharedData = _csharedData.cptr + {{endif}} {{endif}} -{{if 'struct CUctxCreateParams_st' in found_types}} +{{if 'CUctxCreateParams_st' in found_struct}} cdef class CUctxCreateParams_st: """ @@ -10406,61 +11963,78 @@ cdef class CUctxCreateParams_st: Attributes ---------- + {{if 'CUctxCreateParams_st.execAffinityParams' in found_struct}} execAffinityParams : CUexecAffinityParam + {{endif}} + {{if 'CUctxCreateParams_st.numExecAffinityParams' in found_struct}} numExecAffinityParams : int + {{endif}} + {{if 'CUctxCreateParams_st.cigParams' in found_struct}} cigParams : CUctxCigParam + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): + pass + {{if 'CUctxCreateParams_st.execAffinityParams' in found_struct}} if self._execAffinityParams is not NULL: free(self._execAffinityParams) + {{endif}} + {{if 'CUctxCreateParams_st.cigParams' in found_struct}} if self._cigParams is not NULL: free(self._cigParams) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUctxCreateParams_st.execAffinityParams' in found_struct}} try: str_list += ['execAffinityParams : ' + str(self.execAffinityParams)] except ValueError: str_list += ['execAffinityParams : '] + {{endif}} + {{if 'CUctxCreateParams_st.numExecAffinityParams' in found_struct}} try: str_list += ['numExecAffinityParams : ' + str(self.numExecAffinityParams)] except ValueError: str_list += ['numExecAffinityParams : '] + {{endif}} + {{if 'CUctxCreateParams_st.cigParams' in found_struct}} try: str_list += ['cigParams : ' + str(self.cigParams)] except ValueError: str_list += ['cigParams : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUctxCreateParams_st.execAffinityParams' in found_struct}} @property def execAffinityParams(self): - arrs = [self._ptr[0].execAffinityParams + x*sizeof(cydriver.CUexecAffinityParam) for x in range(self._execAffinityParams_length)] + arrs = [self._pvt_ptr[0].execAffinityParams + x*sizeof(cydriver.CUexecAffinityParam) for x in range(self._execAffinityParams_length)] return [CUexecAffinityParam(_ptr=arr) for arr in arrs] @execAffinityParams.setter def execAffinityParams(self, val): if len(val) == 0: free(self._execAffinityParams) self._execAffinityParams_length = 0 - self._ptr[0].execAffinityParams = NULL + self._pvt_ptr[0].execAffinityParams = NULL else: if self._execAffinityParams_length != len(val): free(self._execAffinityParams) @@ -10468,26 +12042,30 @@ cdef class CUctxCreateParams_st: if self._execAffinityParams is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUexecAffinityParam))) self._execAffinityParams_length = len(val) - self._ptr[0].execAffinityParams = self._execAffinityParams + self._pvt_ptr[0].execAffinityParams = self._execAffinityParams for idx in range(len(val)): - string.memcpy(&self._execAffinityParams[idx], (val[idx])._ptr, sizeof(cydriver.CUexecAffinityParam)) + string.memcpy(&self._execAffinityParams[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUexecAffinityParam)) + {{endif}} + {{if 'CUctxCreateParams_st.numExecAffinityParams' in found_struct}} @property def numExecAffinityParams(self): - return self._ptr[0].numExecAffinityParams + return self._pvt_ptr[0].numExecAffinityParams @numExecAffinityParams.setter def numExecAffinityParams(self, int numExecAffinityParams): - self._ptr[0].numExecAffinityParams = numExecAffinityParams + self._pvt_ptr[0].numExecAffinityParams = numExecAffinityParams + {{endif}} + {{if 'CUctxCreateParams_st.cigParams' in found_struct}} @property def cigParams(self): - arrs = [self._ptr[0].cigParams + x*sizeof(cydriver.CUctxCigParam) for x in range(self._cigParams_length)] + arrs = [self._pvt_ptr[0].cigParams + x*sizeof(cydriver.CUctxCigParam) for x in range(self._cigParams_length)] return [CUctxCigParam(_ptr=arr) for arr in arrs] @cigParams.setter def cigParams(self, val): if len(val) == 0: free(self._cigParams) self._cigParams_length = 0 - self._ptr[0].cigParams = NULL + self._pvt_ptr[0].cigParams = NULL else: if self._cigParams_length != len(val): free(self._cigParams) @@ -10495,93 +12073,117 @@ cdef class CUctxCreateParams_st: if self._cigParams is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUctxCigParam))) self._cigParams_length = len(val) - self._ptr[0].cigParams = self._cigParams + self._pvt_ptr[0].cigParams = self._cigParams for idx in range(len(val)): - string.memcpy(&self._cigParams[idx], (val[idx])._ptr, sizeof(cydriver.CUctxCigParam)) + string.memcpy(&self._cigParams[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUctxCigParam)) + {{endif}} {{endif}} -{{if 'struct CUlibraryHostUniversalFunctionAndDataTable_st' in found_types}} +{{if 'CUlibraryHostUniversalFunctionAndDataTable_st' in found_struct}} cdef class CUlibraryHostUniversalFunctionAndDataTable_st: """ Attributes ---------- + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.functionTable' in found_struct}} functionTable : Any + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.functionWindowSize' in found_struct}} functionWindowSize : size_t + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.dataTable' in found_struct}} dataTable : Any + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.dataWindowSize' in found_struct}} dataWindowSize : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.functionTable' in found_struct}} try: str_list += ['functionTable : ' + hex(self.functionTable)] except ValueError: str_list += ['functionTable : '] + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.functionWindowSize' in found_struct}} try: str_list += ['functionWindowSize : ' + str(self.functionWindowSize)] except ValueError: str_list += ['functionWindowSize : '] + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.dataTable' in found_struct}} try: str_list += ['dataTable : ' + hex(self.dataTable)] except ValueError: str_list += ['dataTable : '] + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.dataWindowSize' in found_struct}} try: str_list += ['dataWindowSize : ' + str(self.dataWindowSize)] except ValueError: str_list += ['dataWindowSize : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.functionTable' in found_struct}} @property def functionTable(self): - return self._ptr[0].functionTable + return self._pvt_ptr[0].functionTable @functionTable.setter def functionTable(self, functionTable): - _cyfunctionTable = utils.HelperInputVoidPtr(functionTable) - self._ptr[0].functionTable = _cyfunctionTable.cptr + _cfunctionTable = utils.HelperInputVoidPtr(functionTable) + self._pvt_ptr[0].functionTable = _cfunctionTable.cptr + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.functionWindowSize' in found_struct}} @property def functionWindowSize(self): - return self._ptr[0].functionWindowSize + return self._pvt_ptr[0].functionWindowSize @functionWindowSize.setter def functionWindowSize(self, size_t functionWindowSize): - self._ptr[0].functionWindowSize = functionWindowSize + self._pvt_ptr[0].functionWindowSize = functionWindowSize + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.dataTable' in found_struct}} @property def dataTable(self): - return self._ptr[0].dataTable + return self._pvt_ptr[0].dataTable @dataTable.setter def dataTable(self, dataTable): - _cydataTable = utils.HelperInputVoidPtr(dataTable) - self._ptr[0].dataTable = _cydataTable.cptr + _cdataTable = utils.HelperInputVoidPtr(dataTable) + self._pvt_ptr[0].dataTable = _cdataTable.cptr + {{endif}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st.dataWindowSize' in found_struct}} @property def dataWindowSize(self): - return self._ptr[0].dataWindowSize + return self._pvt_ptr[0].dataWindowSize @dataWindowSize.setter def dataWindowSize(self, size_t dataWindowSize): - self._ptr[0].dataWindowSize = dataWindowSize + self._pvt_ptr[0].dataWindowSize = dataWindowSize + {{endif}} {{endif}} -{{if 'struct CUDA_MEMCPY2D_st' in found_types}} +{{if 'CUDA_MEMCPY2D_st' in found_struct}} cdef class CUDA_MEMCPY2D_st: """ @@ -10589,154 +12191,235 @@ cdef class CUDA_MEMCPY2D_st: Attributes ---------- + {{if 'CUDA_MEMCPY2D_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 2D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.Height' in found_struct}} Height : size_t Height of 2D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._srcDevice = CUdeviceptr(_ptr=&self._ptr[0].srcDevice) - self._srcArray = CUarray(_ptr=&self._ptr[0].srcArray) - self._dstDevice = CUdeviceptr(_ptr=&self._ptr[0].dstDevice) - self._dstArray = CUarray(_ptr=&self._ptr[0].dstArray) + pass + {{if 'CUDA_MEMCPY2D_st.srcDevice' in found_struct}} + self._srcDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].srcDevice) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcArray' in found_struct}} + self._srcArray = CUarray(_ptr=&self._pvt_ptr[0].srcArray) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstDevice' in found_struct}} + self._dstDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].dstDevice) + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstArray' in found_struct}} + self._dstArray = CUarray(_ptr=&self._pvt_ptr[0].dstArray) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_MEMCPY2D_st.srcXInBytes' in found_struct}} try: str_list += ['srcXInBytes : ' + str(self.srcXInBytes)] except ValueError: str_list += ['srcXInBytes : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcY' in found_struct}} try: str_list += ['srcY : ' + str(self.srcY)] except ValueError: str_list += ['srcY : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcMemoryType' in found_struct}} try: str_list += ['srcMemoryType : ' + str(self.srcMemoryType)] except ValueError: str_list += ['srcMemoryType : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcHost' in found_struct}} try: str_list += ['srcHost : ' + hex(self.srcHost)] except ValueError: str_list += ['srcHost : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcDevice' in found_struct}} try: str_list += ['srcDevice : ' + str(self.srcDevice)] except ValueError: str_list += ['srcDevice : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcArray' in found_struct}} try: str_list += ['srcArray : ' + str(self.srcArray)] except ValueError: str_list += ['srcArray : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcPitch' in found_struct}} try: str_list += ['srcPitch : ' + str(self.srcPitch)] except ValueError: str_list += ['srcPitch : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstXInBytes' in found_struct}} try: str_list += ['dstXInBytes : ' + str(self.dstXInBytes)] except ValueError: str_list += ['dstXInBytes : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstY' in found_struct}} try: str_list += ['dstY : ' + str(self.dstY)] except ValueError: str_list += ['dstY : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstMemoryType' in found_struct}} try: str_list += ['dstMemoryType : ' + str(self.dstMemoryType)] except ValueError: str_list += ['dstMemoryType : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstHost' in found_struct}} try: str_list += ['dstHost : ' + hex(self.dstHost)] except ValueError: str_list += ['dstHost : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstDevice' in found_struct}} try: str_list += ['dstDevice : ' + str(self.dstDevice)] except ValueError: str_list += ['dstDevice : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstArray' in found_struct}} try: str_list += ['dstArray : ' + str(self.dstArray)] except ValueError: str_list += ['dstArray : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstPitch' in found_struct}} try: str_list += ['dstPitch : ' + str(self.dstPitch)] except ValueError: str_list += ['dstPitch : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.WidthInBytes' in found_struct}} try: str_list += ['WidthInBytes : ' + str(self.WidthInBytes)] except ValueError: str_list += ['WidthInBytes : '] + {{endif}} + {{if 'CUDA_MEMCPY2D_st.Height' in found_struct}} try: str_list += ['Height : ' + str(self.Height)] except ValueError: str_list += ['Height : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_MEMCPY2D_st.srcXInBytes' in found_struct}} @property def srcXInBytes(self): - return self._ptr[0].srcXInBytes + return self._pvt_ptr[0].srcXInBytes @srcXInBytes.setter def srcXInBytes(self, size_t srcXInBytes): - self._ptr[0].srcXInBytes = srcXInBytes + self._pvt_ptr[0].srcXInBytes = srcXInBytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcY' in found_struct}} @property def srcY(self): - return self._ptr[0].srcY + return self._pvt_ptr[0].srcY @srcY.setter def srcY(self, size_t srcY): - self._ptr[0].srcY = srcY + self._pvt_ptr[0].srcY = srcY + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcMemoryType' in found_struct}} @property def srcMemoryType(self): - return CUmemorytype(self._ptr[0].srcMemoryType) + return CUmemorytype(self._pvt_ptr[0].srcMemoryType) @srcMemoryType.setter def srcMemoryType(self, srcMemoryType not None : CUmemorytype): - self._ptr[0].srcMemoryType = srcMemoryType.value + self._pvt_ptr[0].srcMemoryType = srcMemoryType.value + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcHost' in found_struct}} @property def srcHost(self): - return self._ptr[0].srcHost + return self._pvt_ptr[0].srcHost @srcHost.setter def srcHost(self, srcHost): - _cysrcHost = utils.HelperInputVoidPtr(srcHost) - self._ptr[0].srcHost = _cysrcHost.cptr + _csrcHost = utils.HelperInputVoidPtr(srcHost) + self._pvt_ptr[0].srcHost = _csrcHost.cptr + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcDevice' in found_struct}} @property def srcDevice(self): return self._srcDevice @@ -10751,8 +12434,10 @@ cdef class CUDA_MEMCPY2D_st: else: psrcDevice = int(CUdeviceptr(srcDevice)) cysrcDevice = psrcDevice - self._srcDevice._ptr[0] = cysrcDevice + self._srcDevice._pvt_ptr[0] = cysrcDevice + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcArray' in found_struct}} @property def srcArray(self): return self._srcArray @@ -10767,38 +12452,50 @@ cdef class CUDA_MEMCPY2D_st: else: psrcArray = int(CUarray(srcArray)) cysrcArray = psrcArray - self._srcArray._ptr[0] = cysrcArray + self._srcArray._pvt_ptr[0] = cysrcArray + {{endif}} + {{if 'CUDA_MEMCPY2D_st.srcPitch' in found_struct}} @property def srcPitch(self): - return self._ptr[0].srcPitch + return self._pvt_ptr[0].srcPitch @srcPitch.setter def srcPitch(self, size_t srcPitch): - self._ptr[0].srcPitch = srcPitch + self._pvt_ptr[0].srcPitch = srcPitch + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstXInBytes' in found_struct}} @property def dstXInBytes(self): - return self._ptr[0].dstXInBytes + return self._pvt_ptr[0].dstXInBytes @dstXInBytes.setter def dstXInBytes(self, size_t dstXInBytes): - self._ptr[0].dstXInBytes = dstXInBytes + self._pvt_ptr[0].dstXInBytes = dstXInBytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstY' in found_struct}} @property def dstY(self): - return self._ptr[0].dstY + return self._pvt_ptr[0].dstY @dstY.setter def dstY(self, size_t dstY): - self._ptr[0].dstY = dstY + self._pvt_ptr[0].dstY = dstY + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstMemoryType' in found_struct}} @property def dstMemoryType(self): - return CUmemorytype(self._ptr[0].dstMemoryType) + return CUmemorytype(self._pvt_ptr[0].dstMemoryType) @dstMemoryType.setter def dstMemoryType(self, dstMemoryType not None : CUmemorytype): - self._ptr[0].dstMemoryType = dstMemoryType.value + self._pvt_ptr[0].dstMemoryType = dstMemoryType.value + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstHost' in found_struct}} @property def dstHost(self): - return self._ptr[0].dstHost + return self._pvt_ptr[0].dstHost @dstHost.setter def dstHost(self, dstHost): - _cydstHost = utils.HelperInputVoidPtr(dstHost) - self._ptr[0].dstHost = _cydstHost.cptr + _cdstHost = utils.HelperInputVoidPtr(dstHost) + self._pvt_ptr[0].dstHost = _cdstHost.cptr + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstDevice' in found_struct}} @property def dstDevice(self): return self._dstDevice @@ -10813,8 +12510,10 @@ cdef class CUDA_MEMCPY2D_st: else: pdstDevice = int(CUdeviceptr(dstDevice)) cydstDevice = pdstDevice - self._dstDevice._ptr[0] = cydstDevice + self._dstDevice._pvt_ptr[0] = cydstDevice + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstArray' in found_struct}} @property def dstArray(self): return self._dstArray @@ -10829,27 +12528,34 @@ cdef class CUDA_MEMCPY2D_st: else: pdstArray = int(CUarray(dstArray)) cydstArray = pdstArray - self._dstArray._ptr[0] = cydstArray + self._dstArray._pvt_ptr[0] = cydstArray + {{endif}} + {{if 'CUDA_MEMCPY2D_st.dstPitch' in found_struct}} @property def dstPitch(self): - return self._ptr[0].dstPitch + return self._pvt_ptr[0].dstPitch @dstPitch.setter def dstPitch(self, size_t dstPitch): - self._ptr[0].dstPitch = dstPitch + self._pvt_ptr[0].dstPitch = dstPitch + {{endif}} + {{if 'CUDA_MEMCPY2D_st.WidthInBytes' in found_struct}} @property def WidthInBytes(self): - return self._ptr[0].WidthInBytes + return self._pvt_ptr[0].WidthInBytes @WidthInBytes.setter def WidthInBytes(self, size_t WidthInBytes): - self._ptr[0].WidthInBytes = WidthInBytes + self._pvt_ptr[0].WidthInBytes = WidthInBytes + {{endif}} + {{if 'CUDA_MEMCPY2D_st.Height' in found_struct}} @property def Height(self): - return self._ptr[0].Height + return self._pvt_ptr[0].Height @Height.setter def Height(self, size_t Height): - self._ptr[0].Height = Height + self._pvt_ptr[0].Height = Height + {{endif}} {{endif}} -{{if 'struct CUDA_MEMCPY3D_st' in found_types}} +{{if 'CUDA_MEMCPY3D_st' in found_struct}} cdef class CUDA_MEMCPY3D_st: """ @@ -10857,221 +12563,342 @@ cdef class CUDA_MEMCPY3D_st: Attributes ---------- + {{if 'CUDA_MEMCPY3D_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcZ' in found_struct}} srcZ : size_t Source Z + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcLOD' in found_struct}} srcLOD : size_t Source LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved0' in found_struct}} reserved0 : Any Must be NULL + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHeight' in found_struct}} srcHeight : size_t Source height (ignored when src is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstZ' in found_struct}} dstZ : size_t Destination Z + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstLOD' in found_struct}} dstLOD : size_t Destination LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved1' in found_struct}} reserved1 : Any Must be NULL + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHeight' in found_struct}} dstHeight : size_t Destination height (ignored when dst is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 3D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Height' in found_struct}} Height : size_t Height of 3D memory copy + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Depth' in found_struct}} Depth : size_t Depth of 3D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._srcDevice = CUdeviceptr(_ptr=&self._ptr[0].srcDevice) - self._srcArray = CUarray(_ptr=&self._ptr[0].srcArray) - self._dstDevice = CUdeviceptr(_ptr=&self._ptr[0].dstDevice) - self._dstArray = CUarray(_ptr=&self._ptr[0].dstArray) + pass + {{if 'CUDA_MEMCPY3D_st.srcDevice' in found_struct}} + self._srcDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].srcDevice) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcArray' in found_struct}} + self._srcArray = CUarray(_ptr=&self._pvt_ptr[0].srcArray) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstDevice' in found_struct}} + self._dstDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].dstDevice) + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstArray' in found_struct}} + self._dstArray = CUarray(_ptr=&self._pvt_ptr[0].dstArray) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_MEMCPY3D_st.srcXInBytes' in found_struct}} try: str_list += ['srcXInBytes : ' + str(self.srcXInBytes)] except ValueError: str_list += ['srcXInBytes : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcY' in found_struct}} try: str_list += ['srcY : ' + str(self.srcY)] except ValueError: str_list += ['srcY : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcZ' in found_struct}} try: str_list += ['srcZ : ' + str(self.srcZ)] except ValueError: str_list += ['srcZ : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcLOD' in found_struct}} try: str_list += ['srcLOD : ' + str(self.srcLOD)] except ValueError: str_list += ['srcLOD : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcMemoryType' in found_struct}} try: str_list += ['srcMemoryType : ' + str(self.srcMemoryType)] except ValueError: str_list += ['srcMemoryType : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHost' in found_struct}} try: str_list += ['srcHost : ' + hex(self.srcHost)] except ValueError: str_list += ['srcHost : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcDevice' in found_struct}} try: str_list += ['srcDevice : ' + str(self.srcDevice)] except ValueError: str_list += ['srcDevice : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcArray' in found_struct}} try: str_list += ['srcArray : ' + str(self.srcArray)] except ValueError: str_list += ['srcArray : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved0' in found_struct}} try: str_list += ['reserved0 : ' + hex(self.reserved0)] except ValueError: str_list += ['reserved0 : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcPitch' in found_struct}} try: str_list += ['srcPitch : ' + str(self.srcPitch)] except ValueError: str_list += ['srcPitch : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHeight' in found_struct}} try: str_list += ['srcHeight : ' + str(self.srcHeight)] except ValueError: str_list += ['srcHeight : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstXInBytes' in found_struct}} try: str_list += ['dstXInBytes : ' + str(self.dstXInBytes)] except ValueError: str_list += ['dstXInBytes : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstY' in found_struct}} try: str_list += ['dstY : ' + str(self.dstY)] except ValueError: str_list += ['dstY : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstZ' in found_struct}} try: str_list += ['dstZ : ' + str(self.dstZ)] except ValueError: str_list += ['dstZ : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstLOD' in found_struct}} try: str_list += ['dstLOD : ' + str(self.dstLOD)] except ValueError: str_list += ['dstLOD : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstMemoryType' in found_struct}} try: str_list += ['dstMemoryType : ' + str(self.dstMemoryType)] except ValueError: str_list += ['dstMemoryType : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHost' in found_struct}} try: str_list += ['dstHost : ' + hex(self.dstHost)] except ValueError: str_list += ['dstHost : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstDevice' in found_struct}} try: str_list += ['dstDevice : ' + str(self.dstDevice)] except ValueError: str_list += ['dstDevice : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstArray' in found_struct}} try: str_list += ['dstArray : ' + str(self.dstArray)] except ValueError: str_list += ['dstArray : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved1' in found_struct}} try: str_list += ['reserved1 : ' + hex(self.reserved1)] except ValueError: str_list += ['reserved1 : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstPitch' in found_struct}} try: str_list += ['dstPitch : ' + str(self.dstPitch)] except ValueError: str_list += ['dstPitch : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHeight' in found_struct}} try: str_list += ['dstHeight : ' + str(self.dstHeight)] except ValueError: str_list += ['dstHeight : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.WidthInBytes' in found_struct}} try: str_list += ['WidthInBytes : ' + str(self.WidthInBytes)] except ValueError: str_list += ['WidthInBytes : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Height' in found_struct}} try: str_list += ['Height : ' + str(self.Height)] except ValueError: str_list += ['Height : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Depth' in found_struct}} try: str_list += ['Depth : ' + str(self.Depth)] except ValueError: str_list += ['Depth : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_MEMCPY3D_st.srcXInBytes' in found_struct}} @property def srcXInBytes(self): - return self._ptr[0].srcXInBytes + return self._pvt_ptr[0].srcXInBytes @srcXInBytes.setter def srcXInBytes(self, size_t srcXInBytes): - self._ptr[0].srcXInBytes = srcXInBytes + self._pvt_ptr[0].srcXInBytes = srcXInBytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcY' in found_struct}} @property def srcY(self): - return self._ptr[0].srcY + return self._pvt_ptr[0].srcY @srcY.setter def srcY(self, size_t srcY): - self._ptr[0].srcY = srcY + self._pvt_ptr[0].srcY = srcY + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcZ' in found_struct}} @property def srcZ(self): - return self._ptr[0].srcZ + return self._pvt_ptr[0].srcZ @srcZ.setter def srcZ(self, size_t srcZ): - self._ptr[0].srcZ = srcZ + self._pvt_ptr[0].srcZ = srcZ + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcLOD' in found_struct}} @property def srcLOD(self): - return self._ptr[0].srcLOD + return self._pvt_ptr[0].srcLOD @srcLOD.setter def srcLOD(self, size_t srcLOD): - self._ptr[0].srcLOD = srcLOD + self._pvt_ptr[0].srcLOD = srcLOD + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcMemoryType' in found_struct}} @property def srcMemoryType(self): - return CUmemorytype(self._ptr[0].srcMemoryType) + return CUmemorytype(self._pvt_ptr[0].srcMemoryType) @srcMemoryType.setter def srcMemoryType(self, srcMemoryType not None : CUmemorytype): - self._ptr[0].srcMemoryType = srcMemoryType.value + self._pvt_ptr[0].srcMemoryType = srcMemoryType.value + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHost' in found_struct}} @property def srcHost(self): - return self._ptr[0].srcHost + return self._pvt_ptr[0].srcHost @srcHost.setter def srcHost(self, srcHost): - _cysrcHost = utils.HelperInputVoidPtr(srcHost) - self._ptr[0].srcHost = _cysrcHost.cptr + _csrcHost = utils.HelperInputVoidPtr(srcHost) + self._pvt_ptr[0].srcHost = _csrcHost.cptr + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcDevice' in found_struct}} @property def srcDevice(self): return self._srcDevice @@ -11086,8 +12913,10 @@ cdef class CUDA_MEMCPY3D_st: else: psrcDevice = int(CUdeviceptr(srcDevice)) cysrcDevice = psrcDevice - self._srcDevice._ptr[0] = cysrcDevice + self._srcDevice._pvt_ptr[0] = cysrcDevice + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcArray' in found_struct}} @property def srcArray(self): return self._srcArray @@ -11102,63 +12931,83 @@ cdef class CUDA_MEMCPY3D_st: else: psrcArray = int(CUarray(srcArray)) cysrcArray = psrcArray - self._srcArray._ptr[0] = cysrcArray + self._srcArray._pvt_ptr[0] = cysrcArray + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved0' in found_struct}} @property def reserved0(self): - return self._ptr[0].reserved0 + return self._pvt_ptr[0].reserved0 @reserved0.setter def reserved0(self, reserved0): - _cyreserved0 = utils.HelperInputVoidPtr(reserved0) - self._ptr[0].reserved0 = _cyreserved0.cptr + _creserved0 = utils.HelperInputVoidPtr(reserved0) + self._pvt_ptr[0].reserved0 = _creserved0.cptr + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcPitch' in found_struct}} @property def srcPitch(self): - return self._ptr[0].srcPitch + return self._pvt_ptr[0].srcPitch @srcPitch.setter def srcPitch(self, size_t srcPitch): - self._ptr[0].srcPitch = srcPitch + self._pvt_ptr[0].srcPitch = srcPitch + {{endif}} + {{if 'CUDA_MEMCPY3D_st.srcHeight' in found_struct}} @property def srcHeight(self): - return self._ptr[0].srcHeight + return self._pvt_ptr[0].srcHeight @srcHeight.setter def srcHeight(self, size_t srcHeight): - self._ptr[0].srcHeight = srcHeight + self._pvt_ptr[0].srcHeight = srcHeight + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstXInBytes' in found_struct}} @property def dstXInBytes(self): - return self._ptr[0].dstXInBytes + return self._pvt_ptr[0].dstXInBytes @dstXInBytes.setter def dstXInBytes(self, size_t dstXInBytes): - self._ptr[0].dstXInBytes = dstXInBytes + self._pvt_ptr[0].dstXInBytes = dstXInBytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstY' in found_struct}} @property def dstY(self): - return self._ptr[0].dstY + return self._pvt_ptr[0].dstY @dstY.setter def dstY(self, size_t dstY): - self._ptr[0].dstY = dstY + self._pvt_ptr[0].dstY = dstY + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstZ' in found_struct}} @property def dstZ(self): - return self._ptr[0].dstZ + return self._pvt_ptr[0].dstZ @dstZ.setter def dstZ(self, size_t dstZ): - self._ptr[0].dstZ = dstZ + self._pvt_ptr[0].dstZ = dstZ + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstLOD' in found_struct}} @property def dstLOD(self): - return self._ptr[0].dstLOD + return self._pvt_ptr[0].dstLOD @dstLOD.setter def dstLOD(self, size_t dstLOD): - self._ptr[0].dstLOD = dstLOD + self._pvt_ptr[0].dstLOD = dstLOD + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstMemoryType' in found_struct}} @property def dstMemoryType(self): - return CUmemorytype(self._ptr[0].dstMemoryType) + return CUmemorytype(self._pvt_ptr[0].dstMemoryType) @dstMemoryType.setter def dstMemoryType(self, dstMemoryType not None : CUmemorytype): - self._ptr[0].dstMemoryType = dstMemoryType.value + self._pvt_ptr[0].dstMemoryType = dstMemoryType.value + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHost' in found_struct}} @property def dstHost(self): - return self._ptr[0].dstHost + return self._pvt_ptr[0].dstHost @dstHost.setter def dstHost(self, dstHost): - _cydstHost = utils.HelperInputVoidPtr(dstHost) - self._ptr[0].dstHost = _cydstHost.cptr + _cdstHost = utils.HelperInputVoidPtr(dstHost) + self._pvt_ptr[0].dstHost = _cdstHost.cptr + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstDevice' in found_struct}} @property def dstDevice(self): return self._dstDevice @@ -11173,8 +13022,10 @@ cdef class CUDA_MEMCPY3D_st: else: pdstDevice = int(CUdeviceptr(dstDevice)) cydstDevice = pdstDevice - self._dstDevice._ptr[0] = cydstDevice + self._dstDevice._pvt_ptr[0] = cydstDevice + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstArray' in found_struct}} @property def dstArray(self): return self._dstArray @@ -11189,46 +13040,59 @@ cdef class CUDA_MEMCPY3D_st: else: pdstArray = int(CUarray(dstArray)) cydstArray = pdstArray - self._dstArray._ptr[0] = cydstArray + self._dstArray._pvt_ptr[0] = cydstArray + {{endif}} + {{if 'CUDA_MEMCPY3D_st.reserved1' in found_struct}} @property def reserved1(self): - return self._ptr[0].reserved1 + return self._pvt_ptr[0].reserved1 @reserved1.setter def reserved1(self, reserved1): - _cyreserved1 = utils.HelperInputVoidPtr(reserved1) - self._ptr[0].reserved1 = _cyreserved1.cptr + _creserved1 = utils.HelperInputVoidPtr(reserved1) + self._pvt_ptr[0].reserved1 = _creserved1.cptr + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstPitch' in found_struct}} @property def dstPitch(self): - return self._ptr[0].dstPitch + return self._pvt_ptr[0].dstPitch @dstPitch.setter def dstPitch(self, size_t dstPitch): - self._ptr[0].dstPitch = dstPitch + self._pvt_ptr[0].dstPitch = dstPitch + {{endif}} + {{if 'CUDA_MEMCPY3D_st.dstHeight' in found_struct}} @property def dstHeight(self): - return self._ptr[0].dstHeight + return self._pvt_ptr[0].dstHeight @dstHeight.setter def dstHeight(self, size_t dstHeight): - self._ptr[0].dstHeight = dstHeight + self._pvt_ptr[0].dstHeight = dstHeight + {{endif}} + {{if 'CUDA_MEMCPY3D_st.WidthInBytes' in found_struct}} @property def WidthInBytes(self): - return self._ptr[0].WidthInBytes + return self._pvt_ptr[0].WidthInBytes @WidthInBytes.setter def WidthInBytes(self, size_t WidthInBytes): - self._ptr[0].WidthInBytes = WidthInBytes + self._pvt_ptr[0].WidthInBytes = WidthInBytes + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Height' in found_struct}} @property def Height(self): - return self._ptr[0].Height + return self._pvt_ptr[0].Height @Height.setter def Height(self, size_t Height): - self._ptr[0].Height = Height + self._pvt_ptr[0].Height = Height + {{endif}} + {{if 'CUDA_MEMCPY3D_st.Depth' in found_struct}} @property def Depth(self): - return self._ptr[0].Depth + return self._pvt_ptr[0].Depth @Depth.setter def Depth(self, size_t Depth): - self._ptr[0].Depth = Depth + self._pvt_ptr[0].Depth = Depth + {{endif}} {{endif}} -{{if 'struct CUDA_MEMCPY3D_PEER_st' in found_types}} +{{if 'CUDA_MEMCPY3D_PEER_st' in found_struct}} cdef class CUDA_MEMCPY3D_PEER_st: """ @@ -11236,224 +13100,349 @@ cdef class CUDA_MEMCPY3D_PEER_st: Attributes ---------- + {{if 'CUDA_MEMCPY3D_PEER_st.srcXInBytes' in found_struct}} srcXInBytes : size_t Source X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcY' in found_struct}} srcY : size_t Source Y + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcZ' in found_struct}} srcZ : size_t Source Z + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcLOD' in found_struct}} srcLOD : size_t Source LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcMemoryType' in found_struct}} srcMemoryType : CUmemorytype Source memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHost' in found_struct}} srcHost : Any Source host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcDevice' in found_struct}} srcDevice : CUdeviceptr Source device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcArray' in found_struct}} srcArray : CUarray Source array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcContext' in found_struct}} srcContext : CUcontext Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcPitch' in found_struct}} srcPitch : size_t Source pitch (ignored when src is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHeight' in found_struct}} srcHeight : size_t Source height (ignored when src is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstXInBytes' in found_struct}} dstXInBytes : size_t Destination X in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstY' in found_struct}} dstY : size_t Destination Y + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstZ' in found_struct}} dstZ : size_t Destination Z + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstLOD' in found_struct}} dstLOD : size_t Destination LOD + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstMemoryType' in found_struct}} dstMemoryType : CUmemorytype Destination memory type (host, device, array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHost' in found_struct}} dstHost : Any Destination host pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstDevice' in found_struct}} dstDevice : CUdeviceptr Destination device pointer + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstArray' in found_struct}} dstArray : CUarray Destination array reference + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstContext' in found_struct}} dstContext : CUcontext Destination context (ignored with dstMemoryType is CU_MEMORYTYPE_ARRAY) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstPitch' in found_struct}} dstPitch : size_t Destination pitch (ignored when dst is array) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHeight' in found_struct}} dstHeight : size_t Destination height (ignored when dst is array; may be 0 if Depth==1) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.WidthInBytes' in found_struct}} WidthInBytes : size_t Width of 3D memory copy in bytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Height' in found_struct}} Height : size_t Height of 3D memory copy + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Depth' in found_struct}} Depth : size_t Depth of 3D memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._srcDevice = CUdeviceptr(_ptr=&self._ptr[0].srcDevice) - self._srcArray = CUarray(_ptr=&self._ptr[0].srcArray) - self._srcContext = CUcontext(_ptr=&self._ptr[0].srcContext) - self._dstDevice = CUdeviceptr(_ptr=&self._ptr[0].dstDevice) - self._dstArray = CUarray(_ptr=&self._ptr[0].dstArray) - self._dstContext = CUcontext(_ptr=&self._ptr[0].dstContext) + pass + {{if 'CUDA_MEMCPY3D_PEER_st.srcDevice' in found_struct}} + self._srcDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].srcDevice) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcArray' in found_struct}} + self._srcArray = CUarray(_ptr=&self._pvt_ptr[0].srcArray) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcContext' in found_struct}} + self._srcContext = CUcontext(_ptr=&self._pvt_ptr[0].srcContext) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstDevice' in found_struct}} + self._dstDevice = CUdeviceptr(_ptr=&self._pvt_ptr[0].dstDevice) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstArray' in found_struct}} + self._dstArray = CUarray(_ptr=&self._pvt_ptr[0].dstArray) + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstContext' in found_struct}} + self._dstContext = CUcontext(_ptr=&self._pvt_ptr[0].dstContext) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_MEMCPY3D_PEER_st.srcXInBytes' in found_struct}} try: str_list += ['srcXInBytes : ' + str(self.srcXInBytes)] except ValueError: str_list += ['srcXInBytes : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcY' in found_struct}} try: str_list += ['srcY : ' + str(self.srcY)] except ValueError: str_list += ['srcY : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcZ' in found_struct}} try: str_list += ['srcZ : ' + str(self.srcZ)] except ValueError: str_list += ['srcZ : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcLOD' in found_struct}} try: str_list += ['srcLOD : ' + str(self.srcLOD)] except ValueError: str_list += ['srcLOD : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcMemoryType' in found_struct}} try: str_list += ['srcMemoryType : ' + str(self.srcMemoryType)] except ValueError: str_list += ['srcMemoryType : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHost' in found_struct}} try: str_list += ['srcHost : ' + hex(self.srcHost)] except ValueError: str_list += ['srcHost : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcDevice' in found_struct}} try: str_list += ['srcDevice : ' + str(self.srcDevice)] except ValueError: str_list += ['srcDevice : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcArray' in found_struct}} try: str_list += ['srcArray : ' + str(self.srcArray)] except ValueError: str_list += ['srcArray : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcContext' in found_struct}} try: str_list += ['srcContext : ' + str(self.srcContext)] except ValueError: str_list += ['srcContext : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcPitch' in found_struct}} try: str_list += ['srcPitch : ' + str(self.srcPitch)] except ValueError: str_list += ['srcPitch : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHeight' in found_struct}} try: str_list += ['srcHeight : ' + str(self.srcHeight)] except ValueError: str_list += ['srcHeight : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstXInBytes' in found_struct}} try: str_list += ['dstXInBytes : ' + str(self.dstXInBytes)] except ValueError: str_list += ['dstXInBytes : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstY' in found_struct}} try: str_list += ['dstY : ' + str(self.dstY)] except ValueError: str_list += ['dstY : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstZ' in found_struct}} try: str_list += ['dstZ : ' + str(self.dstZ)] except ValueError: str_list += ['dstZ : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstLOD' in found_struct}} try: str_list += ['dstLOD : ' + str(self.dstLOD)] except ValueError: str_list += ['dstLOD : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstMemoryType' in found_struct}} try: str_list += ['dstMemoryType : ' + str(self.dstMemoryType)] except ValueError: str_list += ['dstMemoryType : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHost' in found_struct}} try: str_list += ['dstHost : ' + hex(self.dstHost)] except ValueError: str_list += ['dstHost : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstDevice' in found_struct}} try: str_list += ['dstDevice : ' + str(self.dstDevice)] except ValueError: str_list += ['dstDevice : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstArray' in found_struct}} try: str_list += ['dstArray : ' + str(self.dstArray)] except ValueError: str_list += ['dstArray : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstContext' in found_struct}} try: str_list += ['dstContext : ' + str(self.dstContext)] except ValueError: str_list += ['dstContext : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstPitch' in found_struct}} try: str_list += ['dstPitch : ' + str(self.dstPitch)] except ValueError: str_list += ['dstPitch : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHeight' in found_struct}} try: str_list += ['dstHeight : ' + str(self.dstHeight)] except ValueError: str_list += ['dstHeight : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.WidthInBytes' in found_struct}} try: str_list += ['WidthInBytes : ' + str(self.WidthInBytes)] except ValueError: str_list += ['WidthInBytes : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Height' in found_struct}} try: str_list += ['Height : ' + str(self.Height)] except ValueError: str_list += ['Height : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Depth' in found_struct}} try: str_list += ['Depth : ' + str(self.Depth)] except ValueError: str_list += ['Depth : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_MEMCPY3D_PEER_st.srcXInBytes' in found_struct}} @property def srcXInBytes(self): - return self._ptr[0].srcXInBytes + return self._pvt_ptr[0].srcXInBytes @srcXInBytes.setter def srcXInBytes(self, size_t srcXInBytes): - self._ptr[0].srcXInBytes = srcXInBytes + self._pvt_ptr[0].srcXInBytes = srcXInBytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcY' in found_struct}} @property def srcY(self): - return self._ptr[0].srcY + return self._pvt_ptr[0].srcY @srcY.setter def srcY(self, size_t srcY): - self._ptr[0].srcY = srcY + self._pvt_ptr[0].srcY = srcY + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcZ' in found_struct}} @property def srcZ(self): - return self._ptr[0].srcZ + return self._pvt_ptr[0].srcZ @srcZ.setter def srcZ(self, size_t srcZ): - self._ptr[0].srcZ = srcZ + self._pvt_ptr[0].srcZ = srcZ + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcLOD' in found_struct}} @property def srcLOD(self): - return self._ptr[0].srcLOD + return self._pvt_ptr[0].srcLOD @srcLOD.setter def srcLOD(self, size_t srcLOD): - self._ptr[0].srcLOD = srcLOD + self._pvt_ptr[0].srcLOD = srcLOD + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcMemoryType' in found_struct}} @property def srcMemoryType(self): - return CUmemorytype(self._ptr[0].srcMemoryType) + return CUmemorytype(self._pvt_ptr[0].srcMemoryType) @srcMemoryType.setter def srcMemoryType(self, srcMemoryType not None : CUmemorytype): - self._ptr[0].srcMemoryType = srcMemoryType.value + self._pvt_ptr[0].srcMemoryType = srcMemoryType.value + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHost' in found_struct}} @property def srcHost(self): - return self._ptr[0].srcHost + return self._pvt_ptr[0].srcHost @srcHost.setter def srcHost(self, srcHost): - _cysrcHost = utils.HelperInputVoidPtr(srcHost) - self._ptr[0].srcHost = _cysrcHost.cptr + _csrcHost = utils.HelperInputVoidPtr(srcHost) + self._pvt_ptr[0].srcHost = _csrcHost.cptr + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcDevice' in found_struct}} @property def srcDevice(self): return self._srcDevice @@ -11468,8 +13457,10 @@ cdef class CUDA_MEMCPY3D_PEER_st: else: psrcDevice = int(CUdeviceptr(srcDevice)) cysrcDevice = psrcDevice - self._srcDevice._ptr[0] = cysrcDevice + self._srcDevice._pvt_ptr[0] = cysrcDevice + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcArray' in found_struct}} @property def srcArray(self): return self._srcArray @@ -11484,7 +13475,9 @@ cdef class CUDA_MEMCPY3D_PEER_st: else: psrcArray = int(CUarray(srcArray)) cysrcArray = psrcArray - self._srcArray._ptr[0] = cysrcArray + self._srcArray._pvt_ptr[0] = cysrcArray + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcContext' in found_struct}} @property def srcContext(self): return self._srcContext @@ -11499,56 +13492,74 @@ cdef class CUDA_MEMCPY3D_PEER_st: else: psrcContext = int(CUcontext(srcContext)) cysrcContext = psrcContext - self._srcContext._ptr[0] = cysrcContext + self._srcContext._pvt_ptr[0] = cysrcContext + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcPitch' in found_struct}} @property def srcPitch(self): - return self._ptr[0].srcPitch + return self._pvt_ptr[0].srcPitch @srcPitch.setter def srcPitch(self, size_t srcPitch): - self._ptr[0].srcPitch = srcPitch + self._pvt_ptr[0].srcPitch = srcPitch + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.srcHeight' in found_struct}} @property def srcHeight(self): - return self._ptr[0].srcHeight + return self._pvt_ptr[0].srcHeight @srcHeight.setter def srcHeight(self, size_t srcHeight): - self._ptr[0].srcHeight = srcHeight + self._pvt_ptr[0].srcHeight = srcHeight + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstXInBytes' in found_struct}} @property def dstXInBytes(self): - return self._ptr[0].dstXInBytes + return self._pvt_ptr[0].dstXInBytes @dstXInBytes.setter def dstXInBytes(self, size_t dstXInBytes): - self._ptr[0].dstXInBytes = dstXInBytes + self._pvt_ptr[0].dstXInBytes = dstXInBytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstY' in found_struct}} @property def dstY(self): - return self._ptr[0].dstY + return self._pvt_ptr[0].dstY @dstY.setter def dstY(self, size_t dstY): - self._ptr[0].dstY = dstY + self._pvt_ptr[0].dstY = dstY + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstZ' in found_struct}} @property def dstZ(self): - return self._ptr[0].dstZ + return self._pvt_ptr[0].dstZ @dstZ.setter def dstZ(self, size_t dstZ): - self._ptr[0].dstZ = dstZ + self._pvt_ptr[0].dstZ = dstZ + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstLOD' in found_struct}} @property def dstLOD(self): - return self._ptr[0].dstLOD + return self._pvt_ptr[0].dstLOD @dstLOD.setter def dstLOD(self, size_t dstLOD): - self._ptr[0].dstLOD = dstLOD + self._pvt_ptr[0].dstLOD = dstLOD + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstMemoryType' in found_struct}} @property def dstMemoryType(self): - return CUmemorytype(self._ptr[0].dstMemoryType) + return CUmemorytype(self._pvt_ptr[0].dstMemoryType) @dstMemoryType.setter def dstMemoryType(self, dstMemoryType not None : CUmemorytype): - self._ptr[0].dstMemoryType = dstMemoryType.value + self._pvt_ptr[0].dstMemoryType = dstMemoryType.value + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHost' in found_struct}} @property def dstHost(self): - return self._ptr[0].dstHost + return self._pvt_ptr[0].dstHost @dstHost.setter def dstHost(self, dstHost): - _cydstHost = utils.HelperInputVoidPtr(dstHost) - self._ptr[0].dstHost = _cydstHost.cptr + _cdstHost = utils.HelperInputVoidPtr(dstHost) + self._pvt_ptr[0].dstHost = _cdstHost.cptr + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstDevice' in found_struct}} @property def dstDevice(self): return self._dstDevice @@ -11563,8 +13574,10 @@ cdef class CUDA_MEMCPY3D_PEER_st: else: pdstDevice = int(CUdeviceptr(dstDevice)) cydstDevice = pdstDevice - self._dstDevice._ptr[0] = cydstDevice + self._dstDevice._pvt_ptr[0] = cydstDevice + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstArray' in found_struct}} @property def dstArray(self): return self._dstArray @@ -11579,7 +13592,9 @@ cdef class CUDA_MEMCPY3D_PEER_st: else: pdstArray = int(CUarray(dstArray)) cydstArray = pdstArray - self._dstArray._ptr[0] = cydstArray + self._dstArray._pvt_ptr[0] = cydstArray + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstContext' in found_struct}} @property def dstContext(self): return self._dstContext @@ -11594,39 +13609,50 @@ cdef class CUDA_MEMCPY3D_PEER_st: else: pdstContext = int(CUcontext(dstContext)) cydstContext = pdstContext - self._dstContext._ptr[0] = cydstContext + self._dstContext._pvt_ptr[0] = cydstContext + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstPitch' in found_struct}} @property def dstPitch(self): - return self._ptr[0].dstPitch + return self._pvt_ptr[0].dstPitch @dstPitch.setter def dstPitch(self, size_t dstPitch): - self._ptr[0].dstPitch = dstPitch + self._pvt_ptr[0].dstPitch = dstPitch + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.dstHeight' in found_struct}} @property def dstHeight(self): - return self._ptr[0].dstHeight + return self._pvt_ptr[0].dstHeight @dstHeight.setter def dstHeight(self, size_t dstHeight): - self._ptr[0].dstHeight = dstHeight + self._pvt_ptr[0].dstHeight = dstHeight + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.WidthInBytes' in found_struct}} @property def WidthInBytes(self): - return self._ptr[0].WidthInBytes + return self._pvt_ptr[0].WidthInBytes @WidthInBytes.setter def WidthInBytes(self, size_t WidthInBytes): - self._ptr[0].WidthInBytes = WidthInBytes + self._pvt_ptr[0].WidthInBytes = WidthInBytes + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Height' in found_struct}} @property def Height(self): - return self._ptr[0].Height + return self._pvt_ptr[0].Height @Height.setter def Height(self, size_t Height): - self._ptr[0].Height = Height + self._pvt_ptr[0].Height = Height + {{endif}} + {{if 'CUDA_MEMCPY3D_PEER_st.Depth' in found_struct}} @property def Depth(self): - return self._ptr[0].Depth + return self._pvt_ptr[0].Depth @Depth.setter def Depth(self, size_t Depth): - self._ptr[0].Depth = Depth + self._pvt_ptr[0].Depth = Depth + {{endif}} {{endif}} -{{if 'struct CUDA_MEMCPY_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_MEMCPY_NODE_PARAMS_st' in found_struct}} cdef class CUDA_MEMCPY_NODE_PARAMS_st: """ @@ -11634,67 +13660,92 @@ cdef class CUDA_MEMCPY_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.flags' in found_struct}} flags : int Must be zero + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.reserved' in found_struct}} reserved : int Must be zero + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyCtx' in found_struct}} copyCtx : CUcontext Context on which to run the node + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyParams' in found_struct}} copyParams : CUDA_MEMCPY3D Parameters for the memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._copyCtx = CUcontext(_ptr=&self._ptr[0].copyCtx) - self._copyParams = CUDA_MEMCPY3D(_ptr=&self._ptr[0].copyParams) + pass + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyCtx' in found_struct}} + self._copyCtx = CUcontext(_ptr=&self._pvt_ptr[0].copyCtx) + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyParams' in found_struct}} + self._copyParams = CUDA_MEMCPY3D(_ptr=&self._pvt_ptr[0].copyParams) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyCtx' in found_struct}} try: str_list += ['copyCtx : ' + str(self.copyCtx)] except ValueError: str_list += ['copyCtx : '] + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyParams' in found_struct}} try: str_list += ['copyParams :\n' + '\n'.join([' ' + line for line in str(self.copyParams).splitlines()])] except ValueError: str_list += ['copyParams : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, int reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyCtx' in found_struct}} @property def copyCtx(self): return self._copyCtx @@ -11709,15 +13760,18 @@ cdef class CUDA_MEMCPY_NODE_PARAMS_st: else: pcopyCtx = int(CUcontext(copyCtx)) cycopyCtx = pcopyCtx - self._copyCtx._ptr[0] = cycopyCtx + self._copyCtx._pvt_ptr[0] = cycopyCtx + {{endif}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st.copyParams' in found_struct}} @property def copyParams(self): return self._copyParams @copyParams.setter def copyParams(self, copyParams not None : CUDA_MEMCPY3D): - string.memcpy(&self._ptr[0].copyParams, copyParams.getPtr(), sizeof(self._ptr[0].copyParams)) + string.memcpy(&self._pvt_ptr[0].copyParams, copyParams.getPtr(), sizeof(self._pvt_ptr[0].copyParams)) + {{endif}} {{endif}} -{{if 'struct CUDA_ARRAY_DESCRIPTOR_st' in found_types}} +{{if 'CUDA_ARRAY_DESCRIPTOR_st' in found_struct}} cdef class CUDA_ARRAY_DESCRIPTOR_st: """ @@ -11725,80 +13779,103 @@ cdef class CUDA_ARRAY_DESCRIPTOR_st: Attributes ---------- + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Width' in found_struct}} Width : size_t Width of array + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Height' in found_struct}} Height : size_t Height of array + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Format' in found_struct}} Format : CUarray_format Array format + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.NumChannels' in found_struct}} NumChannels : unsigned int Channels per array element + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Width' in found_struct}} try: str_list += ['Width : ' + str(self.Width)] except ValueError: str_list += ['Width : '] + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Height' in found_struct}} try: str_list += ['Height : ' + str(self.Height)] except ValueError: str_list += ['Height : '] + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Format' in found_struct}} try: str_list += ['Format : ' + str(self.Format)] except ValueError: str_list += ['Format : '] + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.NumChannels' in found_struct}} try: str_list += ['NumChannels : ' + str(self.NumChannels)] except ValueError: str_list += ['NumChannels : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Width' in found_struct}} @property def Width(self): - return self._ptr[0].Width + return self._pvt_ptr[0].Width @Width.setter def Width(self, size_t Width): - self._ptr[0].Width = Width + self._pvt_ptr[0].Width = Width + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Height' in found_struct}} @property def Height(self): - return self._ptr[0].Height + return self._pvt_ptr[0].Height @Height.setter def Height(self, size_t Height): - self._ptr[0].Height = Height + self._pvt_ptr[0].Height = Height + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.Format' in found_struct}} @property def Format(self): - return CUarray_format(self._ptr[0].Format) + return CUarray_format(self._pvt_ptr[0].Format) @Format.setter def Format(self, Format not None : CUarray_format): - self._ptr[0].Format = Format.value + self._pvt_ptr[0].Format = Format.value + {{endif}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st.NumChannels' in found_struct}} @property def NumChannels(self): - return self._ptr[0].NumChannels + return self._pvt_ptr[0].NumChannels @NumChannels.setter def NumChannels(self, unsigned int NumChannels): - self._ptr[0].NumChannels = NumChannels + self._pvt_ptr[0].NumChannels = NumChannels + {{endif}} {{endif}} -{{if 'struct CUDA_ARRAY3D_DESCRIPTOR_st' in found_types}} +{{if 'CUDA_ARRAY3D_DESCRIPTOR_st' in found_struct}} cdef class CUDA_ARRAY3D_DESCRIPTOR_st: """ @@ -11806,169 +13883,221 @@ cdef class CUDA_ARRAY3D_DESCRIPTOR_st: Attributes ---------- + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Width' in found_struct}} Width : size_t Width of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Height' in found_struct}} Height : size_t Height of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Depth' in found_struct}} Depth : size_t Depth of 3D array + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Format' in found_struct}} Format : CUarray_format Array format + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.NumChannels' in found_struct}} NumChannels : unsigned int Channels per array element + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Flags' in found_struct}} Flags : unsigned int Flags + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Width' in found_struct}} try: str_list += ['Width : ' + str(self.Width)] except ValueError: str_list += ['Width : '] + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Height' in found_struct}} try: str_list += ['Height : ' + str(self.Height)] except ValueError: str_list += ['Height : '] + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Depth' in found_struct}} try: str_list += ['Depth : ' + str(self.Depth)] except ValueError: str_list += ['Depth : '] + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Format' in found_struct}} try: str_list += ['Format : ' + str(self.Format)] except ValueError: str_list += ['Format : '] + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.NumChannels' in found_struct}} try: str_list += ['NumChannels : ' + str(self.NumChannels)] except ValueError: str_list += ['NumChannels : '] + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Flags' in found_struct}} try: str_list += ['Flags : ' + str(self.Flags)] except ValueError: str_list += ['Flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Width' in found_struct}} @property def Width(self): - return self._ptr[0].Width + return self._pvt_ptr[0].Width @Width.setter def Width(self, size_t Width): - self._ptr[0].Width = Width + self._pvt_ptr[0].Width = Width + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Height' in found_struct}} @property def Height(self): - return self._ptr[0].Height + return self._pvt_ptr[0].Height @Height.setter def Height(self, size_t Height): - self._ptr[0].Height = Height + self._pvt_ptr[0].Height = Height + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Depth' in found_struct}} @property def Depth(self): - return self._ptr[0].Depth + return self._pvt_ptr[0].Depth @Depth.setter def Depth(self, size_t Depth): - self._ptr[0].Depth = Depth + self._pvt_ptr[0].Depth = Depth + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Format' in found_struct}} @property def Format(self): - return CUarray_format(self._ptr[0].Format) + return CUarray_format(self._pvt_ptr[0].Format) @Format.setter def Format(self, Format not None : CUarray_format): - self._ptr[0].Format = Format.value + self._pvt_ptr[0].Format = Format.value + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.NumChannels' in found_struct}} @property def NumChannels(self): - return self._ptr[0].NumChannels + return self._pvt_ptr[0].NumChannels @NumChannels.setter def NumChannels(self, unsigned int NumChannels): - self._ptr[0].NumChannels = NumChannels + self._pvt_ptr[0].NumChannels = NumChannels + {{endif}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st.Flags' in found_struct}} @property def Flags(self): - return self._ptr[0].Flags + return self._pvt_ptr[0].Flags @Flags.setter def Flags(self, unsigned int Flags): - self._ptr[0].Flags = Flags + self._pvt_ptr[0].Flags = Flags + {{endif}} {{endif}} -{{if 'struct CUDA_ARRAY_SPARSE_PROPERTIES_st' in found_types}} +{{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent' in found_struct}} -cdef class anon_struct5: +cdef class anon_struct6: """ Attributes ---------- + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.width' in found_struct}} width : unsigned int + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.height' in found_struct}} height : unsigned int + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.depth' in found_struct}} depth : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].tileExtent + return &self._pvt_ptr[0].tileExtent def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.width' in found_struct}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.height' in found_struct}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.depth' in found_struct}} try: str_list += ['depth : ' + str(self.depth)] except ValueError: str_list += ['depth : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.width' in found_struct}} @property def width(self): - return self._ptr[0].tileExtent.width + return self._pvt_ptr[0].tileExtent.width @width.setter def width(self, unsigned int width): - self._ptr[0].tileExtent.width = width + self._pvt_ptr[0].tileExtent.width = width + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.height' in found_struct}} @property def height(self): - return self._ptr[0].tileExtent.height + return self._pvt_ptr[0].tileExtent.height @height.setter def height(self, unsigned int height): - self._ptr[0].tileExtent.height = height + self._pvt_ptr[0].tileExtent.height = height + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent.depth' in found_struct}} @property def depth(self): - return self._ptr[0].tileExtent.depth + return self._pvt_ptr[0].tileExtent.depth @depth.setter def depth(self, unsigned int depth): - self._ptr[0].tileExtent.depth = depth + self._pvt_ptr[0].tileExtent.depth = depth + {{endif}} {{endif}} -{{if 'struct CUDA_ARRAY_SPARSE_PROPERTIES_st' in found_types}} +{{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st' in found_struct}} cdef class CUDA_ARRAY_SPARSE_PROPERTIES_st: """ @@ -11976,93 +14105,125 @@ cdef class CUDA_ARRAY_SPARSE_PROPERTIES_st: Attributes ---------- - tileExtent : anon_struct5 + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent' in found_struct}} + tileExtent : anon_struct6 + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailFirstLevel' in found_struct}} miptailFirstLevel : unsigned int First mip level at which the mip tail begins. + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailSize' in found_struct}} miptailSize : unsigned long long Total size of the mip tail. + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.flags' in found_struct}} flags : unsigned int Flags will either be zero or CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._tileExtent = anon_struct5(_ptr=self._ptr) + pass + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent' in found_struct}} + self._tileExtent = anon_struct6(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent' in found_struct}} try: str_list += ['tileExtent :\n' + '\n'.join([' ' + line for line in str(self.tileExtent).splitlines()])] except ValueError: str_list += ['tileExtent : '] + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailFirstLevel' in found_struct}} try: str_list += ['miptailFirstLevel : ' + str(self.miptailFirstLevel)] except ValueError: str_list += ['miptailFirstLevel : '] + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailSize' in found_struct}} try: str_list += ['miptailSize : ' + str(self.miptailSize)] except ValueError: str_list += ['miptailSize : '] + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.tileExtent' in found_struct}} @property def tileExtent(self): return self._tileExtent @tileExtent.setter - def tileExtent(self, tileExtent not None : anon_struct5): - string.memcpy(&self._ptr[0].tileExtent, tileExtent.getPtr(), sizeof(self._ptr[0].tileExtent)) + def tileExtent(self, tileExtent not None : anon_struct6): + string.memcpy(&self._pvt_ptr[0].tileExtent, tileExtent.getPtr(), sizeof(self._pvt_ptr[0].tileExtent)) + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailFirstLevel' in found_struct}} @property def miptailFirstLevel(self): - return self._ptr[0].miptailFirstLevel + return self._pvt_ptr[0].miptailFirstLevel @miptailFirstLevel.setter def miptailFirstLevel(self, unsigned int miptailFirstLevel): - self._ptr[0].miptailFirstLevel = miptailFirstLevel + self._pvt_ptr[0].miptailFirstLevel = miptailFirstLevel + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.miptailSize' in found_struct}} @property def miptailSize(self): - return self._ptr[0].miptailSize + return self._pvt_ptr[0].miptailSize @miptailSize.setter def miptailSize(self, unsigned long long miptailSize): - self._ptr[0].miptailSize = miptailSize + self._pvt_ptr[0].miptailSize = miptailSize + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st' in found_types}} +{{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st' in found_struct}} cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_st: """ @@ -12070,101 +14231,125 @@ cdef class CUDA_ARRAY_MEMORY_REQUIREMENTS_st: Attributes ---------- + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.size' in found_struct}} size : size_t Total required memory size + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.alignment' in found_struct}} alignment : size_t alignment requirement + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.size' in found_struct}} try: str_list += ['size : ' + str(self.size)] except ValueError: str_list += ['size : '] + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.alignment' in found_struct}} try: str_list += ['alignment : ' + str(self.alignment)] except ValueError: str_list += ['alignment : '] + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.size' in found_struct}} @property def size(self): - return self._ptr[0].size + return self._pvt_ptr[0].size @size.setter def size(self, size_t size): - self._ptr[0].size = size + self._pvt_ptr[0].size = size + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.alignment' in found_struct}} @property def alignment(self): - return self._ptr[0].alignment + return self._pvt_ptr[0].alignment @alignment.setter def alignment(self, size_t alignment): - self._ptr[0].alignment = alignment + self._pvt_ptr[0].alignment = alignment + {{endif}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res.array' in found_struct}} -cdef class anon_struct6: +cdef class anon_struct7: """ Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.res.array.hArray' in found_struct}} hArray : CUarray + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._hArray = CUarray(_ptr=&self._ptr[0].res.array.hArray) + pass + {{if 'CUDA_RESOURCE_DESC_st.res.array.hArray' in found_struct}} + self._hArray = CUarray(_ptr=&self._pvt_ptr[0].res.array.hArray) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].res.array + return &self._pvt_ptr[0].res.array def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_RESOURCE_DESC_st.res.array.hArray' in found_struct}} try: str_list += ['hArray : ' + str(self.hArray)] except ValueError: str_list += ['hArray : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_RESOURCE_DESC_st.res.array.hArray' in found_struct}} @property def hArray(self): return self._hArray @@ -12179,42 +14364,50 @@ cdef class anon_struct6: else: phArray = int(CUarray(hArray)) cyhArray = phArray - self._hArray._ptr[0] = cyhArray + self._hArray._pvt_ptr[0] = cyhArray + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res.mipmap' in found_struct}} -cdef class anon_struct7: +cdef class anon_struct8: """ Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap.hMipmappedArray' in found_struct}} hMipmappedArray : CUmipmappedArray + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._hMipmappedArray = CUmipmappedArray(_ptr=&self._ptr[0].res.mipmap.hMipmappedArray) + pass + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap.hMipmappedArray' in found_struct}} + self._hMipmappedArray = CUmipmappedArray(_ptr=&self._pvt_ptr[0].res.mipmap.hMipmappedArray) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].res.mipmap + return &self._pvt_ptr[0].res.mipmap def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap.hMipmappedArray' in found_struct}} try: str_list += ['hMipmappedArray : ' + str(self.hMipmappedArray)] except ValueError: str_list += ['hMipmappedArray : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap.hMipmappedArray' in found_struct}} @property def hMipmappedArray(self): return self._hMipmappedArray @@ -12229,60 +14422,80 @@ cdef class anon_struct7: else: phMipmappedArray = int(CUmipmappedArray(hMipmappedArray)) cyhMipmappedArray = phMipmappedArray - self._hMipmappedArray._ptr[0] = cyhMipmappedArray + self._hMipmappedArray._pvt_ptr[0] = cyhMipmappedArray + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res.linear' in found_struct}} -cdef class anon_struct8: +cdef class anon_struct9: """ Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.res.linear.devPtr' in found_struct}} devPtr : CUdeviceptr + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.format' in found_struct}} format : CUarray_format + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.numChannels' in found_struct}} numChannels : unsigned int + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.sizeInBytes' in found_struct}} sizeInBytes : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._devPtr = CUdeviceptr(_ptr=&self._ptr[0].res.linear.devPtr) + pass + {{if 'CUDA_RESOURCE_DESC_st.res.linear.devPtr' in found_struct}} + self._devPtr = CUdeviceptr(_ptr=&self._pvt_ptr[0].res.linear.devPtr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].res.linear + return &self._pvt_ptr[0].res.linear def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_RESOURCE_DESC_st.res.linear.devPtr' in found_struct}} try: str_list += ['devPtr : ' + str(self.devPtr)] except ValueError: str_list += ['devPtr : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.format' in found_struct}} try: str_list += ['format : ' + str(self.format)] except ValueError: str_list += ['format : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.numChannels' in found_struct}} try: str_list += ['numChannels : ' + str(self.numChannels)] except ValueError: str_list += ['numChannels : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.sizeInBytes' in found_struct}} try: str_list += ['sizeInBytes : ' + str(self.sizeInBytes)] except ValueError: str_list += ['sizeInBytes : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_RESOURCE_DESC_st.res.linear.devPtr' in found_struct}} @property def devPtr(self): return self._devPtr @@ -12297,91 +14510,125 @@ cdef class anon_struct8: else: pdevPtr = int(CUdeviceptr(devPtr)) cydevPtr = pdevPtr - self._devPtr._ptr[0] = cydevPtr + self._devPtr._pvt_ptr[0] = cydevPtr + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.format' in found_struct}} @property def format(self): - return CUarray_format(self._ptr[0].res.linear.format) + return CUarray_format(self._pvt_ptr[0].res.linear.format) @format.setter def format(self, format not None : CUarray_format): - self._ptr[0].res.linear.format = format.value + self._pvt_ptr[0].res.linear.format = format.value + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.numChannels' in found_struct}} @property def numChannels(self): - return self._ptr[0].res.linear.numChannels + return self._pvt_ptr[0].res.linear.numChannels @numChannels.setter def numChannels(self, unsigned int numChannels): - self._ptr[0].res.linear.numChannels = numChannels + self._pvt_ptr[0].res.linear.numChannels = numChannels + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear.sizeInBytes' in found_struct}} @property def sizeInBytes(self): - return self._ptr[0].res.linear.sizeInBytes + return self._pvt_ptr[0].res.linear.sizeInBytes @sizeInBytes.setter def sizeInBytes(self, size_t sizeInBytes): - self._ptr[0].res.linear.sizeInBytes = sizeInBytes + self._pvt_ptr[0].res.linear.sizeInBytes = sizeInBytes + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res.pitch2D' in found_struct}} -cdef class anon_struct9: +cdef class anon_struct10: """ Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.devPtr' in found_struct}} devPtr : CUdeviceptr + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.format' in found_struct}} format : CUarray_format + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.numChannels' in found_struct}} numChannels : unsigned int + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.width' in found_struct}} width : size_t + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.height' in found_struct}} height : size_t + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.pitchInBytes' in found_struct}} pitchInBytes : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._devPtr = CUdeviceptr(_ptr=&self._ptr[0].res.pitch2D.devPtr) + pass + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.devPtr' in found_struct}} + self._devPtr = CUdeviceptr(_ptr=&self._pvt_ptr[0].res.pitch2D.devPtr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].res.pitch2D + return &self._pvt_ptr[0].res.pitch2D def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.devPtr' in found_struct}} try: str_list += ['devPtr : ' + str(self.devPtr)] except ValueError: str_list += ['devPtr : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.format' in found_struct}} try: str_list += ['format : ' + str(self.format)] except ValueError: str_list += ['format : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.numChannels' in found_struct}} try: str_list += ['numChannels : ' + str(self.numChannels)] except ValueError: str_list += ['numChannels : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.width' in found_struct}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.height' in found_struct}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.pitchInBytes' in found_struct}} try: str_list += ['pitchInBytes : ' + str(self.pitchInBytes)] except ValueError: str_list += ['pitchInBytes : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.devPtr' in found_struct}} @property def devPtr(self): return self._devPtr @@ -12396,174 +14643,230 @@ cdef class anon_struct9: else: pdevPtr = int(CUdeviceptr(devPtr)) cydevPtr = pdevPtr - self._devPtr._ptr[0] = cydevPtr + self._devPtr._pvt_ptr[0] = cydevPtr + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.format' in found_struct}} @property def format(self): - return CUarray_format(self._ptr[0].res.pitch2D.format) + return CUarray_format(self._pvt_ptr[0].res.pitch2D.format) @format.setter def format(self, format not None : CUarray_format): - self._ptr[0].res.pitch2D.format = format.value + self._pvt_ptr[0].res.pitch2D.format = format.value + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.numChannels' in found_struct}} @property def numChannels(self): - return self._ptr[0].res.pitch2D.numChannels + return self._pvt_ptr[0].res.pitch2D.numChannels @numChannels.setter def numChannels(self, unsigned int numChannels): - self._ptr[0].res.pitch2D.numChannels = numChannels + self._pvt_ptr[0].res.pitch2D.numChannels = numChannels + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.width' in found_struct}} @property def width(self): - return self._ptr[0].res.pitch2D.width + return self._pvt_ptr[0].res.pitch2D.width @width.setter def width(self, size_t width): - self._ptr[0].res.pitch2D.width = width + self._pvt_ptr[0].res.pitch2D.width = width + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.height' in found_struct}} @property def height(self): - return self._ptr[0].res.pitch2D.height + return self._pvt_ptr[0].res.pitch2D.height @height.setter def height(self, size_t height): - self._ptr[0].res.pitch2D.height = height + self._pvt_ptr[0].res.pitch2D.height = height + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D.pitchInBytes' in found_struct}} @property def pitchInBytes(self): - return self._ptr[0].res.pitch2D.pitchInBytes + return self._pvt_ptr[0].res.pitch2D.pitchInBytes @pitchInBytes.setter def pitchInBytes(self, size_t pitchInBytes): - self._ptr[0].res.pitch2D.pitchInBytes = pitchInBytes + self._pvt_ptr[0].res.pitch2D.pitchInBytes = pitchInBytes + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res.reserved' in found_struct}} -cdef class anon_struct10: +cdef class anon_struct11: """ Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.res.reserved.reserved' in found_struct}} reserved : List[int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].res.reserved + return &self._pvt_ptr[0].res.reserved def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_RESOURCE_DESC_st.res.reserved.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_RESOURCE_DESC_st.res.reserved.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].res.reserved.reserved + return self._pvt_ptr[0].res.reserved.reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].res.reserved.reserved = reserved + self._pvt_ptr[0].res.reserved.reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st.res' in found_struct}} cdef class anon_union4: """ Attributes ---------- - array : anon_struct6 + {{if 'CUDA_RESOURCE_DESC_st.res.array' in found_struct}} + array : anon_struct7 - mipmap : anon_struct7 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap' in found_struct}} + mipmap : anon_struct8 - linear : anon_struct8 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear' in found_struct}} + linear : anon_struct9 - pitch2D : anon_struct9 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D' in found_struct}} + pitch2D : anon_struct10 - reserved : anon_struct10 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.reserved' in found_struct}} + reserved : anon_struct11 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._array = anon_struct6(_ptr=self._ptr) - self._mipmap = anon_struct7(_ptr=self._ptr) - self._linear = anon_struct8(_ptr=self._ptr) - self._pitch2D = anon_struct9(_ptr=self._ptr) - self._reserved = anon_struct10(_ptr=self._ptr) + pass + {{if 'CUDA_RESOURCE_DESC_st.res.array' in found_struct}} + self._array = anon_struct7(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap' in found_struct}} + self._mipmap = anon_struct8(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear' in found_struct}} + self._linear = anon_struct9(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D' in found_struct}} + self._pitch2D = anon_struct10(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.reserved' in found_struct}} + self._reserved = anon_struct11(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].res + return &self._pvt_ptr[0].res def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_RESOURCE_DESC_st.res.array' in found_struct}} try: str_list += ['array :\n' + '\n'.join([' ' + line for line in str(self.array).splitlines()])] except ValueError: str_list += ['array : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap' in found_struct}} try: str_list += ['mipmap :\n' + '\n'.join([' ' + line for line in str(self.mipmap).splitlines()])] except ValueError: str_list += ['mipmap : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear' in found_struct}} try: str_list += ['linear :\n' + '\n'.join([' ' + line for line in str(self.linear).splitlines()])] except ValueError: str_list += ['linear : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D' in found_struct}} try: str_list += ['pitch2D :\n' + '\n'.join([' ' + line for line in str(self.pitch2D).splitlines()])] except ValueError: str_list += ['pitch2D : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.reserved' in found_struct}} try: str_list += ['reserved :\n' + '\n'.join([' ' + line for line in str(self.reserved).splitlines()])] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_RESOURCE_DESC_st.res.array' in found_struct}} @property def array(self): return self._array @array.setter - def array(self, array not None : anon_struct6): - string.memcpy(&self._ptr[0].res.array, array.getPtr(), sizeof(self._ptr[0].res.array)) + def array(self, array not None : anon_struct7): + string.memcpy(&self._pvt_ptr[0].res.array, array.getPtr(), sizeof(self._pvt_ptr[0].res.array)) + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.mipmap' in found_struct}} @property def mipmap(self): return self._mipmap @mipmap.setter - def mipmap(self, mipmap not None : anon_struct7): - string.memcpy(&self._ptr[0].res.mipmap, mipmap.getPtr(), sizeof(self._ptr[0].res.mipmap)) + def mipmap(self, mipmap not None : anon_struct8): + string.memcpy(&self._pvt_ptr[0].res.mipmap, mipmap.getPtr(), sizeof(self._pvt_ptr[0].res.mipmap)) + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.linear' in found_struct}} @property def linear(self): return self._linear @linear.setter - def linear(self, linear not None : anon_struct8): - string.memcpy(&self._ptr[0].res.linear, linear.getPtr(), sizeof(self._ptr[0].res.linear)) + def linear(self, linear not None : anon_struct9): + string.memcpy(&self._pvt_ptr[0].res.linear, linear.getPtr(), sizeof(self._pvt_ptr[0].res.linear)) + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.pitch2D' in found_struct}} @property def pitch2D(self): return self._pitch2D @pitch2D.setter - def pitch2D(self, pitch2D not None : anon_struct9): - string.memcpy(&self._ptr[0].res.pitch2D, pitch2D.getPtr(), sizeof(self._ptr[0].res.pitch2D)) + def pitch2D(self, pitch2D not None : anon_struct10): + string.memcpy(&self._pvt_ptr[0].res.pitch2D, pitch2D.getPtr(), sizeof(self._pvt_ptr[0].res.pitch2D)) + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res.reserved' in found_struct}} @property def reserved(self): return self._reserved @reserved.setter - def reserved(self, reserved not None : anon_struct10): - string.memcpy(&self._ptr[0].res.reserved, reserved.getPtr(), sizeof(self._ptr[0].res.reserved)) + def reserved(self, reserved not None : anon_struct11): + string.memcpy(&self._pvt_ptr[0].res.reserved, reserved.getPtr(), sizeof(self._pvt_ptr[0].res.reserved)) + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_DESC_st' in found_struct}} cdef class CUDA_RESOURCE_DESC_st: """ @@ -12571,70 +14874,90 @@ cdef class CUDA_RESOURCE_DESC_st: Attributes ---------- + {{if 'CUDA_RESOURCE_DESC_st.resType' in found_struct}} resType : CUresourcetype Resource type + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res' in found_struct}} res : anon_union4 + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.flags' in found_struct}} flags : unsigned int Flags (must be zero) + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cydriver.CUDA_RESOURCE_DESC_st)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._res = anon_union4(_ptr=self._ptr) + pass + {{if 'CUDA_RESOURCE_DESC_st.res' in found_struct}} + self._res = anon_union4(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_RESOURCE_DESC_st.resType' in found_struct}} try: str_list += ['resType : ' + str(self.resType)] except ValueError: str_list += ['resType : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res' in found_struct}} try: str_list += ['res :\n' + '\n'.join([' ' + line for line in str(self.res).splitlines()])] except ValueError: str_list += ['res : '] + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_RESOURCE_DESC_st.resType' in found_struct}} @property def resType(self): - return CUresourcetype(self._ptr[0].resType) + return CUresourcetype(self._pvt_ptr[0].resType) @resType.setter def resType(self, resType not None : CUresourcetype): - self._ptr[0].resType = resType.value + self._pvt_ptr[0].resType = resType.value + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.res' in found_struct}} @property def res(self): return self._res @res.setter def res(self, res not None : anon_union4): - string.memcpy(&self._ptr[0].res, res.getPtr(), sizeof(self._ptr[0].res)) + string.memcpy(&self._pvt_ptr[0].res, res.getPtr(), sizeof(self._pvt_ptr[0].res)) + {{endif}} + {{if 'CUDA_RESOURCE_DESC_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} {{endif}} -{{if 'struct CUDA_TEXTURE_DESC_st' in found_types}} +{{if 'CUDA_TEXTURE_DESC_st' in found_struct}} cdef class CUDA_TEXTURE_DESC_st: """ @@ -12642,152 +14965,211 @@ cdef class CUDA_TEXTURE_DESC_st: Attributes ---------- + {{if 'CUDA_TEXTURE_DESC_st.addressMode' in found_struct}} addressMode : List[CUaddress_mode] Address modes + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.filterMode' in found_struct}} filterMode : CUfilter_mode Filter mode + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.flags' in found_struct}} flags : unsigned int Flags + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxAnisotropy' in found_struct}} maxAnisotropy : unsigned int Maximum anisotropy ratio + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapFilterMode' in found_struct}} mipmapFilterMode : CUfilter_mode Mipmap filter mode + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapLevelBias' in found_struct}} mipmapLevelBias : float Mipmap level bias + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.minMipmapLevelClamp' in found_struct}} minMipmapLevelClamp : float Mipmap minimum level clamp + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxMipmapLevelClamp' in found_struct}} maxMipmapLevelClamp : float Mipmap maximum level clamp + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.borderColor' in found_struct}} borderColor : List[float] Border Color + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.reserved' in found_struct}} reserved : List[int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_TEXTURE_DESC_st.addressMode' in found_struct}} try: str_list += ['addressMode : ' + str(self.addressMode)] except ValueError: str_list += ['addressMode : '] + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.filterMode' in found_struct}} try: str_list += ['filterMode : ' + str(self.filterMode)] except ValueError: str_list += ['filterMode : '] + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxAnisotropy' in found_struct}} try: str_list += ['maxAnisotropy : ' + str(self.maxAnisotropy)] except ValueError: str_list += ['maxAnisotropy : '] + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapFilterMode' in found_struct}} try: str_list += ['mipmapFilterMode : ' + str(self.mipmapFilterMode)] except ValueError: str_list += ['mipmapFilterMode : '] + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapLevelBias' in found_struct}} try: str_list += ['mipmapLevelBias : ' + str(self.mipmapLevelBias)] except ValueError: str_list += ['mipmapLevelBias : '] + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.minMipmapLevelClamp' in found_struct}} try: str_list += ['minMipmapLevelClamp : ' + str(self.minMipmapLevelClamp)] except ValueError: str_list += ['minMipmapLevelClamp : '] + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxMipmapLevelClamp' in found_struct}} try: str_list += ['maxMipmapLevelClamp : ' + str(self.maxMipmapLevelClamp)] except ValueError: str_list += ['maxMipmapLevelClamp : '] + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.borderColor' in found_struct}} try: str_list += ['borderColor : ' + str(self.borderColor)] except ValueError: str_list += ['borderColor : '] + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_TEXTURE_DESC_st.addressMode' in found_struct}} @property def addressMode(self): - return [CUaddress_mode(_x) for _x in list(self._ptr[0].addressMode)] + return [CUaddress_mode(_x) for _x in list(self._pvt_ptr[0].addressMode)] @addressMode.setter def addressMode(self, addressMode): - self._ptr[0].addressMode = [_x.value for _x in addressMode] + self._pvt_ptr[0].addressMode = [_x.value for _x in addressMode] + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.filterMode' in found_struct}} @property def filterMode(self): - return CUfilter_mode(self._ptr[0].filterMode) + return CUfilter_mode(self._pvt_ptr[0].filterMode) @filterMode.setter def filterMode(self, filterMode not None : CUfilter_mode): - self._ptr[0].filterMode = filterMode.value + self._pvt_ptr[0].filterMode = filterMode.value + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxAnisotropy' in found_struct}} @property def maxAnisotropy(self): - return self._ptr[0].maxAnisotropy + return self._pvt_ptr[0].maxAnisotropy @maxAnisotropy.setter def maxAnisotropy(self, unsigned int maxAnisotropy): - self._ptr[0].maxAnisotropy = maxAnisotropy + self._pvt_ptr[0].maxAnisotropy = maxAnisotropy + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapFilterMode' in found_struct}} @property def mipmapFilterMode(self): - return CUfilter_mode(self._ptr[0].mipmapFilterMode) + return CUfilter_mode(self._pvt_ptr[0].mipmapFilterMode) @mipmapFilterMode.setter def mipmapFilterMode(self, mipmapFilterMode not None : CUfilter_mode): - self._ptr[0].mipmapFilterMode = mipmapFilterMode.value + self._pvt_ptr[0].mipmapFilterMode = mipmapFilterMode.value + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.mipmapLevelBias' in found_struct}} @property def mipmapLevelBias(self): - return self._ptr[0].mipmapLevelBias + return self._pvt_ptr[0].mipmapLevelBias @mipmapLevelBias.setter def mipmapLevelBias(self, float mipmapLevelBias): - self._ptr[0].mipmapLevelBias = mipmapLevelBias + self._pvt_ptr[0].mipmapLevelBias = mipmapLevelBias + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.minMipmapLevelClamp' in found_struct}} @property def minMipmapLevelClamp(self): - return self._ptr[0].minMipmapLevelClamp + return self._pvt_ptr[0].minMipmapLevelClamp @minMipmapLevelClamp.setter def minMipmapLevelClamp(self, float minMipmapLevelClamp): - self._ptr[0].minMipmapLevelClamp = minMipmapLevelClamp + self._pvt_ptr[0].minMipmapLevelClamp = minMipmapLevelClamp + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.maxMipmapLevelClamp' in found_struct}} @property def maxMipmapLevelClamp(self): - return self._ptr[0].maxMipmapLevelClamp + return self._pvt_ptr[0].maxMipmapLevelClamp @maxMipmapLevelClamp.setter def maxMipmapLevelClamp(self, float maxMipmapLevelClamp): - self._ptr[0].maxMipmapLevelClamp = maxMipmapLevelClamp + self._pvt_ptr[0].maxMipmapLevelClamp = maxMipmapLevelClamp + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.borderColor' in found_struct}} @property def borderColor(self): - return self._ptr[0].borderColor + return self._pvt_ptr[0].borderColor @borderColor.setter def borderColor(self, borderColor): - self._ptr[0].borderColor = borderColor + self._pvt_ptr[0].borderColor = borderColor + {{endif}} + {{if 'CUDA_TEXTURE_DESC_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_RESOURCE_VIEW_DESC_st' in found_types}} +{{if 'CUDA_RESOURCE_VIEW_DESC_st' in found_struct}} cdef class CUDA_RESOURCE_VIEW_DESC_st: """ @@ -12795,140 +15177,193 @@ cdef class CUDA_RESOURCE_VIEW_DESC_st: Attributes ---------- + {{if 'CUDA_RESOURCE_VIEW_DESC_st.format' in found_struct}} format : CUresourceViewFormat Resource view format + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.width' in found_struct}} width : size_t Width of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.height' in found_struct}} height : size_t Height of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.depth' in found_struct}} depth : size_t Depth of the resource view + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstMipmapLevel' in found_struct}} firstMipmapLevel : unsigned int First defined mipmap level + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastMipmapLevel' in found_struct}} lastMipmapLevel : unsigned int Last defined mipmap level + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstLayer' in found_struct}} firstLayer : unsigned int First layer index + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastLayer' in found_struct}} lastLayer : unsigned int Last layer index + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_RESOURCE_VIEW_DESC_st.format' in found_struct}} try: str_list += ['format : ' + str(self.format)] except ValueError: str_list += ['format : '] + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.width' in found_struct}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.height' in found_struct}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.depth' in found_struct}} try: str_list += ['depth : ' + str(self.depth)] except ValueError: str_list += ['depth : '] + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstMipmapLevel' in found_struct}} try: str_list += ['firstMipmapLevel : ' + str(self.firstMipmapLevel)] except ValueError: str_list += ['firstMipmapLevel : '] + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastMipmapLevel' in found_struct}} try: str_list += ['lastMipmapLevel : ' + str(self.lastMipmapLevel)] except ValueError: str_list += ['lastMipmapLevel : '] + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstLayer' in found_struct}} try: str_list += ['firstLayer : ' + str(self.firstLayer)] except ValueError: str_list += ['firstLayer : '] + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastLayer' in found_struct}} try: str_list += ['lastLayer : ' + str(self.lastLayer)] except ValueError: str_list += ['lastLayer : '] + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_RESOURCE_VIEW_DESC_st.format' in found_struct}} @property def format(self): - return CUresourceViewFormat(self._ptr[0].format) + return CUresourceViewFormat(self._pvt_ptr[0].format) @format.setter def format(self, format not None : CUresourceViewFormat): - self._ptr[0].format = format.value + self._pvt_ptr[0].format = format.value + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.width' in found_struct}} @property def width(self): - return self._ptr[0].width + return self._pvt_ptr[0].width @width.setter def width(self, size_t width): - self._ptr[0].width = width + self._pvt_ptr[0].width = width + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.height' in found_struct}} @property def height(self): - return self._ptr[0].height + return self._pvt_ptr[0].height @height.setter def height(self, size_t height): - self._ptr[0].height = height + self._pvt_ptr[0].height = height + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.depth' in found_struct}} @property def depth(self): - return self._ptr[0].depth + return self._pvt_ptr[0].depth @depth.setter def depth(self, size_t depth): - self._ptr[0].depth = depth + self._pvt_ptr[0].depth = depth + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstMipmapLevel' in found_struct}} @property def firstMipmapLevel(self): - return self._ptr[0].firstMipmapLevel + return self._pvt_ptr[0].firstMipmapLevel @firstMipmapLevel.setter def firstMipmapLevel(self, unsigned int firstMipmapLevel): - self._ptr[0].firstMipmapLevel = firstMipmapLevel + self._pvt_ptr[0].firstMipmapLevel = firstMipmapLevel + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastMipmapLevel' in found_struct}} @property def lastMipmapLevel(self): - return self._ptr[0].lastMipmapLevel + return self._pvt_ptr[0].lastMipmapLevel @lastMipmapLevel.setter def lastMipmapLevel(self, unsigned int lastMipmapLevel): - self._ptr[0].lastMipmapLevel = lastMipmapLevel + self._pvt_ptr[0].lastMipmapLevel = lastMipmapLevel + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.firstLayer' in found_struct}} @property def firstLayer(self): - return self._ptr[0].firstLayer + return self._pvt_ptr[0].firstLayer @firstLayer.setter def firstLayer(self, unsigned int firstLayer): - self._ptr[0].firstLayer = firstLayer + self._pvt_ptr[0].firstLayer = firstLayer + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.lastLayer' in found_struct}} @property def lastLayer(self): - return self._ptr[0].lastLayer + return self._pvt_ptr[0].lastLayer @lastLayer.setter def lastLayer(self, unsigned int lastLayer): - self._ptr[0].lastLayer = lastLayer + self._pvt_ptr[0].lastLayer = lastLayer + {{endif}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUtensorMap_st' in found_types}} +{{if 'CUtensorMap_st' in found_struct}} cdef class CUtensorMap_st: """ @@ -12937,45 +15372,50 @@ cdef class CUtensorMap_st: Attributes ---------- + {{if 'CUtensorMap_st.opaque' in found_struct}} opaque : List[cuuint64_t] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUtensorMap_st.opaque' in found_struct}} try: str_list += ['opaque : ' + str(self.opaque)] except ValueError: str_list += ['opaque : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUtensorMap_st.opaque' in found_struct}} @property def opaque(self): - return [cuuint64_t(init_value=_opaque) for _opaque in self._ptr[0].opaque] + return [cuuint64_t(init_value=_opaque) for _opaque in self._pvt_ptr[0].opaque] @opaque.setter def opaque(self, opaque): - self._ptr[0].opaque = opaque + self._pvt_ptr[0].opaque = opaque + {{endif}} {{endif}} -{{if 'struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st' in found_types}} +{{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st' in found_struct}} cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: """ @@ -12983,56 +15423,67 @@ cdef class CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: Attributes ---------- + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.p2pToken' in found_struct}} p2pToken : unsigned long long + {{endif}} + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.vaSpaceToken' in found_struct}} vaSpaceToken : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.p2pToken' in found_struct}} try: str_list += ['p2pToken : ' + str(self.p2pToken)] except ValueError: str_list += ['p2pToken : '] + {{endif}} + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.vaSpaceToken' in found_struct}} try: str_list += ['vaSpaceToken : ' + str(self.vaSpaceToken)] except ValueError: str_list += ['vaSpaceToken : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.p2pToken' in found_struct}} @property def p2pToken(self): - return self._ptr[0].p2pToken + return self._pvt_ptr[0].p2pToken @p2pToken.setter def p2pToken(self, unsigned long long p2pToken): - self._ptr[0].p2pToken = p2pToken + self._pvt_ptr[0].p2pToken = p2pToken + {{endif}} + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st.vaSpaceToken' in found_struct}} @property def vaSpaceToken(self): - return self._ptr[0].vaSpaceToken + return self._pvt_ptr[0].vaSpaceToken @vaSpaceToken.setter def vaSpaceToken(self, unsigned int vaSpaceToken): - self._ptr[0].vaSpaceToken = vaSpaceToken + self._pvt_ptr[0].vaSpaceToken = vaSpaceToken + {{endif}} {{endif}} -{{if 'struct CUDA_LAUNCH_PARAMS_st' in found_types}} +{{if 'CUDA_LAUNCH_PARAMS_st' in found_struct}} cdef class CUDA_LAUNCH_PARAMS_st: """ @@ -13040,91 +15491,136 @@ cdef class CUDA_LAUNCH_PARAMS_st: Attributes ---------- + {{if 'CUDA_LAUNCH_PARAMS_st.function' in found_struct}} function : CUfunction Kernel to launch + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimX' in found_struct}} gridDimX : unsigned int Width of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimY' in found_struct}} gridDimY : unsigned int Height of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimZ' in found_struct}} gridDimZ : unsigned int Depth of grid in blocks + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimX' in found_struct}} blockDimX : unsigned int X dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimY' in found_struct}} blockDimY : unsigned int Y dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimZ' in found_struct}} blockDimZ : unsigned int Z dimension of each thread block + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.hStream' in found_struct}} hStream : CUstream Stream identifier + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.kernelParams' in found_struct}} kernelParams : Any Array of pointers to kernel parameters + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._function = CUfunction(_ptr=&self._ptr[0].function) - self._hStream = CUstream(_ptr=&self._ptr[0].hStream) + pass + {{if 'CUDA_LAUNCH_PARAMS_st.function' in found_struct}} + self._function = CUfunction(_ptr=&self._pvt_ptr[0].function) + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.hStream' in found_struct}} + self._hStream = CUstream(_ptr=&self._pvt_ptr[0].hStream) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_LAUNCH_PARAMS_st.function' in found_struct}} try: str_list += ['function : ' + str(self.function)] except ValueError: str_list += ['function : '] + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimX' in found_struct}} try: str_list += ['gridDimX : ' + str(self.gridDimX)] except ValueError: str_list += ['gridDimX : '] + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimY' in found_struct}} try: str_list += ['gridDimY : ' + str(self.gridDimY)] except ValueError: str_list += ['gridDimY : '] + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimZ' in found_struct}} try: str_list += ['gridDimZ : ' + str(self.gridDimZ)] except ValueError: str_list += ['gridDimZ : '] + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimX' in found_struct}} try: str_list += ['blockDimX : ' + str(self.blockDimX)] except ValueError: str_list += ['blockDimX : '] + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimY' in found_struct}} try: str_list += ['blockDimY : ' + str(self.blockDimY)] except ValueError: str_list += ['blockDimY : '] + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimZ' in found_struct}} try: str_list += ['blockDimZ : ' + str(self.blockDimZ)] except ValueError: str_list += ['blockDimZ : '] + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.sharedMemBytes' in found_struct}} try: str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] except ValueError: str_list += ['sharedMemBytes : '] + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.hStream' in found_struct}} try: str_list += ['hStream : ' + str(self.hStream)] except ValueError: str_list += ['hStream : '] + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.kernelParams' in found_struct}} try: str_list += ['kernelParams : ' + str(self.kernelParams)] except ValueError: str_list += ['kernelParams : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_LAUNCH_PARAMS_st.function' in found_struct}} @property def function(self): return self._function @@ -13139,49 +15635,65 @@ cdef class CUDA_LAUNCH_PARAMS_st: else: pfunction = int(CUfunction(function)) cyfunction = pfunction - self._function._ptr[0] = cyfunction + self._function._pvt_ptr[0] = cyfunction + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimX' in found_struct}} @property def gridDimX(self): - return self._ptr[0].gridDimX + return self._pvt_ptr[0].gridDimX @gridDimX.setter def gridDimX(self, unsigned int gridDimX): - self._ptr[0].gridDimX = gridDimX + self._pvt_ptr[0].gridDimX = gridDimX + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimY' in found_struct}} @property def gridDimY(self): - return self._ptr[0].gridDimY + return self._pvt_ptr[0].gridDimY @gridDimY.setter def gridDimY(self, unsigned int gridDimY): - self._ptr[0].gridDimY = gridDimY + self._pvt_ptr[0].gridDimY = gridDimY + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.gridDimZ' in found_struct}} @property def gridDimZ(self): - return self._ptr[0].gridDimZ + return self._pvt_ptr[0].gridDimZ @gridDimZ.setter def gridDimZ(self, unsigned int gridDimZ): - self._ptr[0].gridDimZ = gridDimZ + self._pvt_ptr[0].gridDimZ = gridDimZ + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimX' in found_struct}} @property def blockDimX(self): - return self._ptr[0].blockDimX + return self._pvt_ptr[0].blockDimX @blockDimX.setter def blockDimX(self, unsigned int blockDimX): - self._ptr[0].blockDimX = blockDimX + self._pvt_ptr[0].blockDimX = blockDimX + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimY' in found_struct}} @property def blockDimY(self): - return self._ptr[0].blockDimY + return self._pvt_ptr[0].blockDimY @blockDimY.setter def blockDimY(self, unsigned int blockDimY): - self._ptr[0].blockDimY = blockDimY + self._pvt_ptr[0].blockDimY = blockDimY + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.blockDimZ' in found_struct}} @property def blockDimZ(self): - return self._ptr[0].blockDimZ + return self._pvt_ptr[0].blockDimZ @blockDimZ.setter def blockDimZ(self, unsigned int blockDimZ): - self._ptr[0].blockDimZ = blockDimZ + self._pvt_ptr[0].blockDimZ = blockDimZ + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.sharedMemBytes' in found_struct}} @property def sharedMemBytes(self): - return self._ptr[0].sharedMemBytes + return self._pvt_ptr[0].sharedMemBytes @sharedMemBytes.setter def sharedMemBytes(self, unsigned int sharedMemBytes): - self._ptr[0].sharedMemBytes = sharedMemBytes + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.hStream' in found_struct}} @property def hStream(self): return self._hStream @@ -13196,137 +15708,171 @@ cdef class CUDA_LAUNCH_PARAMS_st: else: phStream = int(CUstream(hStream)) cyhStream = phStream - self._hStream._ptr[0] = cyhStream + self._hStream._pvt_ptr[0] = cyhStream + {{endif}} + {{if 'CUDA_LAUNCH_PARAMS_st.kernelParams' in found_struct}} @property def kernelParams(self): - return self._ptr[0].kernelParams + return self._pvt_ptr[0].kernelParams @kernelParams.setter def kernelParams(self, kernelParams): self._cykernelParams = utils.HelperKernelParams(kernelParams) - self._ptr[0].kernelParams = self._cykernelParams.ckernelParams + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32' in found_struct}} -cdef class anon_struct11: +cdef class anon_struct12: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32.handle' in found_struct}} handle : Any + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32.name' in found_struct}} name : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].handle.win32 + return &self._pvt_ptr[0].handle.win32 def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32.handle' in found_struct}} try: str_list += ['handle : ' + hex(self.handle)] except ValueError: str_list += ['handle : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32.name' in found_struct}} try: str_list += ['name : ' + hex(self.name)] except ValueError: str_list += ['name : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32.handle' in found_struct}} @property def handle(self): - return self._ptr[0].handle.win32.handle + return self._pvt_ptr[0].handle.win32.handle @handle.setter def handle(self, handle): - _cyhandle = utils.HelperInputVoidPtr(handle) - self._ptr[0].handle.win32.handle = _cyhandle.cptr + _chandle = utils.HelperInputVoidPtr(handle) + self._pvt_ptr[0].handle.win32.handle = _chandle.cptr + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32.name' in found_struct}} @property def name(self): - return self._ptr[0].handle.win32.name + return self._pvt_ptr[0].handle.win32.name @name.setter def name(self, name): - _cyname = utils.HelperInputVoidPtr(name) - self._ptr[0].handle.win32.name = _cyname.cptr + _cname = utils.HelperInputVoidPtr(name) + self._pvt_ptr[0].handle.win32.name = _cname.cptr + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle' in found_struct}} cdef class anon_union5: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.fd' in found_struct}} fd : int - win32 : anon_struct11 + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32' in found_struct}} + win32 : anon_struct12 + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.nvSciBufObject' in found_struct}} nvSciBufObject : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._win32 = anon_struct11(_ptr=self._ptr) + pass + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32' in found_struct}} + self._win32 = anon_struct12(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].handle + return &self._pvt_ptr[0].handle def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.fd' in found_struct}} try: str_list += ['fd : ' + str(self.fd)] except ValueError: str_list += ['fd : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32' in found_struct}} try: str_list += ['win32 :\n' + '\n'.join([' ' + line for line in str(self.win32).splitlines()])] except ValueError: str_list += ['win32 : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.nvSciBufObject' in found_struct}} try: str_list += ['nvSciBufObject : ' + hex(self.nvSciBufObject)] except ValueError: str_list += ['nvSciBufObject : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.fd' in found_struct}} @property def fd(self): - return self._ptr[0].handle.fd + return self._pvt_ptr[0].handle.fd @fd.setter def fd(self, int fd): - self._ptr[0].handle.fd = fd + self._pvt_ptr[0].handle.fd = fd + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.win32' in found_struct}} @property def win32(self): return self._win32 @win32.setter - def win32(self, win32 not None : anon_struct11): - string.memcpy(&self._ptr[0].handle.win32, win32.getPtr(), sizeof(self._ptr[0].handle.win32)) + def win32(self, win32 not None : anon_struct12): + string.memcpy(&self._pvt_ptr[0].handle.win32, win32.getPtr(), sizeof(self._pvt_ptr[0].handle.win32)) + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle.nvSciBufObject' in found_struct}} @property def nvSciBufObject(self): - return self._ptr[0].handle.nvSciBufObject + return self._pvt_ptr[0].handle.nvSciBufObject @nvSciBufObject.setter def nvSciBufObject(self, nvSciBufObject): - _cynvSciBufObject = utils.HelperInputVoidPtr(nvSciBufObject) - self._ptr[0].handle.nvSciBufObject = _cynvSciBufObject.cptr + _cnvSciBufObject = utils.HelperInputVoidPtr(nvSciBufObject) + self._pvt_ptr[0].handle.nvSciBufObject = _cnvSciBufObject.cptr + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st' in found_struct}} cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: """ @@ -13334,94 +15880,126 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.type' in found_struct}} type : CUexternalMemoryHandleType Type of the handle + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle' in found_struct}} handle : anon_union5 + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.size' in found_struct}} size : unsigned long long Size of the memory allocation + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.flags' in found_struct}} flags : unsigned int Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._handle = anon_union5(_ptr=self._ptr) + pass + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle' in found_struct}} + self._handle = anon_union5(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle' in found_struct}} try: str_list += ['handle :\n' + '\n'.join([' ' + line for line in str(self.handle).splitlines()])] except ValueError: str_list += ['handle : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.size' in found_struct}} try: str_list += ['size : ' + str(self.size)] except ValueError: str_list += ['size : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.type' in found_struct}} @property def type(self): - return CUexternalMemoryHandleType(self._ptr[0].type) + return CUexternalMemoryHandleType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUexternalMemoryHandleType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.handle' in found_struct}} @property def handle(self): return self._handle @handle.setter def handle(self, handle not None : anon_union5): - string.memcpy(&self._ptr[0].handle, handle.getPtr(), sizeof(self._ptr[0].handle)) + string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.size' in found_struct}} @property def size(self): - return self._ptr[0].size + return self._pvt_ptr[0].size @size.setter def size(self, unsigned long long size): - self._ptr[0].size = size + self._pvt_ptr[0].size = size + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st' in found_struct}} cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: """ @@ -13429,80 +16007,103 @@ cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the buffer's base is + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.size' in found_struct}} size : unsigned long long Size of the buffer + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.flags' in found_struct}} flags : unsigned int Flags reserved for future use. Must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.offset' in found_struct}} try: str_list += ['offset : ' + str(self.offset)] except ValueError: str_list += ['offset : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.size' in found_struct}} try: str_list += ['size : ' + str(self.size)] except ValueError: str_list += ['size : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.offset' in found_struct}} @property def offset(self): - return self._ptr[0].offset + return self._pvt_ptr[0].offset @offset.setter def offset(self, unsigned long long offset): - self._ptr[0].offset = offset + self._pvt_ptr[0].offset = offset + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.size' in found_struct}} @property def size(self): - return self._ptr[0].size + return self._pvt_ptr[0].size @size.setter def size(self, unsigned long long size): - self._ptr[0].size = size + self._pvt_ptr[0].size = size + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st' in found_struct}} cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: """ @@ -13510,202 +16111,259 @@ cdef class CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: Attributes ---------- + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the base level of the mipmap chain is. + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.arrayDesc' in found_struct}} arrayDesc : CUDA_ARRAY3D_DESCRIPTOR Format, dimension and type of base level of the mipmap chain + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.numLevels' in found_struct}} numLevels : unsigned int Total number of levels in the mipmap chain + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._arrayDesc = CUDA_ARRAY3D_DESCRIPTOR(_ptr=&self._ptr[0].arrayDesc) + pass + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.arrayDesc' in found_struct}} + self._arrayDesc = CUDA_ARRAY3D_DESCRIPTOR(_ptr=&self._pvt_ptr[0].arrayDesc) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.offset' in found_struct}} try: str_list += ['offset : ' + str(self.offset)] except ValueError: str_list += ['offset : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.arrayDesc' in found_struct}} try: str_list += ['arrayDesc :\n' + '\n'.join([' ' + line for line in str(self.arrayDesc).splitlines()])] except ValueError: str_list += ['arrayDesc : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.numLevels' in found_struct}} try: str_list += ['numLevels : ' + str(self.numLevels)] except ValueError: str_list += ['numLevels : '] + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.offset' in found_struct}} @property def offset(self): - return self._ptr[0].offset + return self._pvt_ptr[0].offset @offset.setter def offset(self, unsigned long long offset): - self._ptr[0].offset = offset + self._pvt_ptr[0].offset = offset + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.arrayDesc' in found_struct}} @property def arrayDesc(self): return self._arrayDesc @arrayDesc.setter def arrayDesc(self, arrayDesc not None : CUDA_ARRAY3D_DESCRIPTOR): - string.memcpy(&self._ptr[0].arrayDesc, arrayDesc.getPtr(), sizeof(self._ptr[0].arrayDesc)) + string.memcpy(&self._pvt_ptr[0].arrayDesc, arrayDesc.getPtr(), sizeof(self._pvt_ptr[0].arrayDesc)) + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.numLevels' in found_struct}} @property def numLevels(self): - return self._ptr[0].numLevels + return self._pvt_ptr[0].numLevels @numLevels.setter def numLevels(self, unsigned int numLevels): - self._ptr[0].numLevels = numLevels + self._pvt_ptr[0].numLevels = numLevels + {{endif}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32' in found_struct}} -cdef class anon_struct12: +cdef class anon_struct13: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32.handle' in found_struct}} handle : Any + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32.name' in found_struct}} name : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].handle.win32 + return &self._pvt_ptr[0].handle.win32 def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32.handle' in found_struct}} try: str_list += ['handle : ' + hex(self.handle)] except ValueError: str_list += ['handle : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32.name' in found_struct}} try: str_list += ['name : ' + hex(self.name)] except ValueError: str_list += ['name : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32.handle' in found_struct}} @property def handle(self): - return self._ptr[0].handle.win32.handle + return self._pvt_ptr[0].handle.win32.handle @handle.setter def handle(self, handle): - _cyhandle = utils.HelperInputVoidPtr(handle) - self._ptr[0].handle.win32.handle = _cyhandle.cptr + _chandle = utils.HelperInputVoidPtr(handle) + self._pvt_ptr[0].handle.win32.handle = _chandle.cptr + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32.name' in found_struct}} @property def name(self): - return self._ptr[0].handle.win32.name + return self._pvt_ptr[0].handle.win32.name @name.setter def name(self, name): - _cyname = utils.HelperInputVoidPtr(name) - self._ptr[0].handle.win32.name = _cyname.cptr + _cname = utils.HelperInputVoidPtr(name) + self._pvt_ptr[0].handle.win32.name = _cname.cptr + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle' in found_struct}} cdef class anon_union6: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.fd' in found_struct}} fd : int - win32 : anon_struct12 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32' in found_struct}} + win32 : anon_struct13 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.nvSciSyncObj' in found_struct}} nvSciSyncObj : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._win32 = anon_struct12(_ptr=self._ptr) + pass + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32' in found_struct}} + self._win32 = anon_struct13(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].handle + return &self._pvt_ptr[0].handle def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.fd' in found_struct}} try: str_list += ['fd : ' + str(self.fd)] except ValueError: str_list += ['fd : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32' in found_struct}} try: str_list += ['win32 :\n' + '\n'.join([' ' + line for line in str(self.win32).splitlines()])] except ValueError: str_list += ['win32 : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.nvSciSyncObj' in found_struct}} try: str_list += ['nvSciSyncObj : ' + hex(self.nvSciSyncObj)] except ValueError: str_list += ['nvSciSyncObj : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.fd' in found_struct}} @property def fd(self): - return self._ptr[0].handle.fd + return self._pvt_ptr[0].handle.fd @fd.setter def fd(self, int fd): - self._ptr[0].handle.fd = fd + self._pvt_ptr[0].handle.fd = fd + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.win32' in found_struct}} @property def win32(self): return self._win32 @win32.setter - def win32(self, win32 not None : anon_struct12): - string.memcpy(&self._ptr[0].handle.win32, win32.getPtr(), sizeof(self._ptr[0].handle.win32)) + def win32(self, win32 not None : anon_struct13): + string.memcpy(&self._pvt_ptr[0].handle.win32, win32.getPtr(), sizeof(self._pvt_ptr[0].handle.win32)) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle.nvSciSyncObj' in found_struct}} @property def nvSciSyncObj(self): - return self._ptr[0].handle.nvSciSyncObj + return self._pvt_ptr[0].handle.nvSciSyncObj @nvSciSyncObj.setter def nvSciSyncObj(self, nvSciSyncObj): - _cynvSciSyncObj = utils.HelperInputVoidPtr(nvSciSyncObj) - self._ptr[0].handle.nvSciSyncObj = _cynvSciSyncObj.cptr + _cnvSciSyncObj = utils.HelperInputVoidPtr(nvSciSyncObj) + self._pvt_ptr[0].handle.nvSciSyncObj = _cnvSciSyncObj.cptr + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st' in found_struct}} cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: """ @@ -13713,297 +16371,374 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.type' in found_struct}} type : CUexternalSemaphoreHandleType Type of the handle + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle' in found_struct}} handle : anon_union6 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.flags' in found_struct}} flags : unsigned int Flags reserved for the future. Must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._handle = anon_union6(_ptr=self._ptr) + pass + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle' in found_struct}} + self._handle = anon_union6(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle' in found_struct}} try: str_list += ['handle :\n' + '\n'.join([' ' + line for line in str(self.handle).splitlines()])] except ValueError: str_list += ['handle : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.type' in found_struct}} @property def type(self): - return CUexternalSemaphoreHandleType(self._ptr[0].type) + return CUexternalSemaphoreHandleType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUexternalSemaphoreHandleType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.handle' in found_struct}} @property def handle(self): return self._handle @handle.setter def handle(self, handle not None : anon_union6): - string.memcpy(&self._ptr[0].handle, handle.getPtr(), sizeof(self._ptr[0].handle)) + string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence' in found_struct}} -cdef class anon_struct13: +cdef class anon_struct14: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence.value' in found_struct}} value : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.fence + return &self._pvt_ptr[0].params.fence def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence.value' in found_struct}} try: str_list += ['value : ' + str(self.value)] except ValueError: str_list += ['value : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence.value' in found_struct}} @property def value(self): - return self._ptr[0].params.fence.value + return self._pvt_ptr[0].params.fence.value @value.setter def value(self, unsigned long long value): - self._ptr[0].params.fence.value = value + self._pvt_ptr[0].params.fence.value = value + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync' in found_struct}} cdef class anon_union7: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync.fence' in found_struct}} fence : Any + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync.reserved' in found_struct}} reserved : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.nvSciSync + return &self._pvt_ptr[0].params.nvSciSync def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync.fence' in found_struct}} try: str_list += ['fence : ' + hex(self.fence)] except ValueError: str_list += ['fence : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync.fence' in found_struct}} @property def fence(self): - return self._ptr[0].params.nvSciSync.fence + return self._pvt_ptr[0].params.nvSciSync.fence @fence.setter def fence(self, fence): - _cyfence = utils.HelperInputVoidPtr(fence) - self._ptr[0].params.nvSciSync.fence = _cyfence.cptr + _cfence = utils.HelperInputVoidPtr(fence) + self._pvt_ptr[0].params.nvSciSync.fence = _cfence.cptr + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].params.nvSciSync.reserved + return self._pvt_ptr[0].params.nvSciSync.reserved @reserved.setter def reserved(self, unsigned long long reserved): - self._ptr[0].params.nvSciSync.reserved = reserved + self._pvt_ptr[0].params.nvSciSync.reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex' in found_struct}} -cdef class anon_struct14: +cdef class anon_struct15: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex.key' in found_struct}} key : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.keyedMutex + return &self._pvt_ptr[0].params.keyedMutex def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex.key' in found_struct}} try: str_list += ['key : ' + str(self.key)] except ValueError: str_list += ['key : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex.key' in found_struct}} @property def key(self): - return self._ptr[0].params.keyedMutex.key + return self._pvt_ptr[0].params.keyedMutex.key @key.setter def key(self, unsigned long long key): - self._ptr[0].params.keyedMutex.key = key + self._pvt_ptr[0].params.keyedMutex.key = key + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params' in found_struct}} -cdef class anon_struct15: +cdef class anon_struct16: """ Attributes ---------- - fence : anon_struct13 + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence' in found_struct}} + fence : anon_struct14 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync' in found_struct}} nvSciSync : anon_union7 - keyedMutex : anon_struct14 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex' in found_struct}} + keyedMutex : anon_struct15 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._fence = anon_struct13(_ptr=self._ptr) - self._nvSciSync = anon_union7(_ptr=self._ptr) - self._keyedMutex = anon_struct14(_ptr=self._ptr) + pass + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence' in found_struct}} + self._fence = anon_struct14(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync' in found_struct}} + self._nvSciSync = anon_union7(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex' in found_struct}} + self._keyedMutex = anon_struct15(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params + return &self._pvt_ptr[0].params def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence' in found_struct}} try: str_list += ['fence :\n' + '\n'.join([' ' + line for line in str(self.fence).splitlines()])] except ValueError: str_list += ['fence : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync' in found_struct}} try: str_list += ['nvSciSync :\n' + '\n'.join([' ' + line for line in str(self.nvSciSync).splitlines()])] except ValueError: str_list += ['nvSciSync : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex' in found_struct}} try: str_list += ['keyedMutex :\n' + '\n'.join([' ' + line for line in str(self.keyedMutex).splitlines()])] except ValueError: str_list += ['keyedMutex : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.fence' in found_struct}} @property def fence(self): return self._fence @fence.setter - def fence(self, fence not None : anon_struct13): - string.memcpy(&self._ptr[0].params.fence, fence.getPtr(), sizeof(self._ptr[0].params.fence)) + def fence(self, fence not None : anon_struct14): + string.memcpy(&self._pvt_ptr[0].params.fence, fence.getPtr(), sizeof(self._pvt_ptr[0].params.fence)) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.nvSciSync' in found_struct}} @property def nvSciSync(self): return self._nvSciSync @nvSciSync.setter def nvSciSync(self, nvSciSync not None : anon_union7): - string.memcpy(&self._ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._ptr[0].params.nvSciSync)) + string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.keyedMutex' in found_struct}} @property def keyedMutex(self): return self._keyedMutex @keyedMutex.setter - def keyedMutex(self, keyedMutex not None : anon_struct14): - string.memcpy(&self._ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._ptr[0].params.keyedMutex)) + def keyedMutex(self, keyedMutex not None : anon_struct15): + string.memcpy(&self._pvt_ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._pvt_ptr[0].params.keyedMutex)) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].params.reserved + return self._pvt_ptr[0].params.reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].params.reserved = reserved + self._pvt_ptr[0].params.reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_struct}} cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: """ @@ -14011,8 +16746,11 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: Attributes ---------- - params : anon_struct15 + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params' in found_struct}} + params : anon_struct16 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags' in found_struct}} flags : unsigned int Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal a CUexternalSemaphore of type @@ -14022,291 +16760,365 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: synchronization operations should be performed for any external memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. For all other types of CUexternalSemaphore, flags must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._params = anon_struct15(_ptr=self._ptr) + pass + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params' in found_struct}} + self._params = anon_struct16(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params' in found_struct}} try: str_list += ['params :\n' + '\n'.join([' ' + line for line in str(self.params).splitlines()])] except ValueError: str_list += ['params : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.params' in found_struct}} @property def params(self): return self._params @params.setter - def params(self, params not None : anon_struct15): - string.memcpy(&self._ptr[0].params, params.getPtr(), sizeof(self._ptr[0].params)) + def params(self, params not None : anon_struct16): + string.memcpy(&self._pvt_ptr[0].params, params.getPtr(), sizeof(self._pvt_ptr[0].params)) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence' in found_struct}} -cdef class anon_struct16: +cdef class anon_struct17: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence.value' in found_struct}} value : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.fence + return &self._pvt_ptr[0].params.fence def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence.value' in found_struct}} try: str_list += ['value : ' + str(self.value)] except ValueError: str_list += ['value : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence.value' in found_struct}} @property def value(self): - return self._ptr[0].params.fence.value + return self._pvt_ptr[0].params.fence.value @value.setter def value(self, unsigned long long value): - self._ptr[0].params.fence.value = value + self._pvt_ptr[0].params.fence.value = value + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync' in found_struct}} cdef class anon_union8: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync.fence' in found_struct}} fence : Any + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync.reserved' in found_struct}} reserved : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.nvSciSync + return &self._pvt_ptr[0].params.nvSciSync def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync.fence' in found_struct}} try: str_list += ['fence : ' + hex(self.fence)] except ValueError: str_list += ['fence : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync.fence' in found_struct}} @property def fence(self): - return self._ptr[0].params.nvSciSync.fence + return self._pvt_ptr[0].params.nvSciSync.fence @fence.setter def fence(self, fence): - _cyfence = utils.HelperInputVoidPtr(fence) - self._ptr[0].params.nvSciSync.fence = _cyfence.cptr + _cfence = utils.HelperInputVoidPtr(fence) + self._pvt_ptr[0].params.nvSciSync.fence = _cfence.cptr + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].params.nvSciSync.reserved + return self._pvt_ptr[0].params.nvSciSync.reserved @reserved.setter def reserved(self, unsigned long long reserved): - self._ptr[0].params.nvSciSync.reserved = reserved + self._pvt_ptr[0].params.nvSciSync.reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex' in found_struct}} -cdef class anon_struct17: +cdef class anon_struct18: """ Attributes ---------- + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex.key' in found_struct}} key : unsigned long long + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex.timeoutMs' in found_struct}} timeoutMs : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.keyedMutex + return &self._pvt_ptr[0].params.keyedMutex def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex.key' in found_struct}} try: str_list += ['key : ' + str(self.key)] except ValueError: str_list += ['key : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex.timeoutMs' in found_struct}} try: str_list += ['timeoutMs : ' + str(self.timeoutMs)] except ValueError: str_list += ['timeoutMs : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex.key' in found_struct}} @property def key(self): - return self._ptr[0].params.keyedMutex.key + return self._pvt_ptr[0].params.keyedMutex.key @key.setter def key(self, unsigned long long key): - self._ptr[0].params.keyedMutex.key = key + self._pvt_ptr[0].params.keyedMutex.key = key + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex.timeoutMs' in found_struct}} @property def timeoutMs(self): - return self._ptr[0].params.keyedMutex.timeoutMs + return self._pvt_ptr[0].params.keyedMutex.timeoutMs @timeoutMs.setter def timeoutMs(self, unsigned int timeoutMs): - self._ptr[0].params.keyedMutex.timeoutMs = timeoutMs + self._pvt_ptr[0].params.keyedMutex.timeoutMs = timeoutMs + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params' in found_struct}} -cdef class anon_struct18: +cdef class anon_struct19: """ Attributes ---------- - fence : anon_struct16 + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence' in found_struct}} + fence : anon_struct17 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync' in found_struct}} nvSciSync : anon_union8 - keyedMutex : anon_struct17 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex' in found_struct}} + keyedMutex : anon_struct18 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._fence = anon_struct16(_ptr=self._ptr) - self._nvSciSync = anon_union8(_ptr=self._ptr) - self._keyedMutex = anon_struct17(_ptr=self._ptr) + pass + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence' in found_struct}} + self._fence = anon_struct17(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync' in found_struct}} + self._nvSciSync = anon_union8(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex' in found_struct}} + self._keyedMutex = anon_struct18(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params + return &self._pvt_ptr[0].params def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence' in found_struct}} try: str_list += ['fence :\n' + '\n'.join([' ' + line for line in str(self.fence).splitlines()])] except ValueError: str_list += ['fence : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync' in found_struct}} try: str_list += ['nvSciSync :\n' + '\n'.join([' ' + line for line in str(self.nvSciSync).splitlines()])] except ValueError: str_list += ['nvSciSync : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex' in found_struct}} try: str_list += ['keyedMutex :\n' + '\n'.join([' ' + line for line in str(self.keyedMutex).splitlines()])] except ValueError: str_list += ['keyedMutex : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.fence' in found_struct}} @property def fence(self): return self._fence @fence.setter - def fence(self, fence not None : anon_struct16): - string.memcpy(&self._ptr[0].params.fence, fence.getPtr(), sizeof(self._ptr[0].params.fence)) + def fence(self, fence not None : anon_struct17): + string.memcpy(&self._pvt_ptr[0].params.fence, fence.getPtr(), sizeof(self._pvt_ptr[0].params.fence)) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.nvSciSync' in found_struct}} @property def nvSciSync(self): return self._nvSciSync @nvSciSync.setter def nvSciSync(self, nvSciSync not None : anon_union8): - string.memcpy(&self._ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._ptr[0].params.nvSciSync)) + string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.keyedMutex' in found_struct}} @property def keyedMutex(self): return self._keyedMutex @keyedMutex.setter - def keyedMutex(self, keyedMutex not None : anon_struct17): - string.memcpy(&self._ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._ptr[0].params.keyedMutex)) + def keyedMutex(self, keyedMutex not None : anon_struct18): + string.memcpy(&self._pvt_ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._pvt_ptr[0].params.keyedMutex)) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].params.reserved + return self._pvt_ptr[0].params.reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].params.reserved = reserved + self._pvt_ptr[0].params.reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_types}} +{{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_struct}} cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: """ @@ -14314,8 +17126,11 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: Attributes ---------- - params : anon_struct18 + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params' in found_struct}} + params : anon_struct19 + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags' in found_struct}} flags : unsigned int Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on a CUexternalSemaphore of type @@ -14325,64 +17140,81 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: synchronization operations should be performed for any external memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. For all other types of CUexternalSemaphore, flags must be zero. + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._params = anon_struct18(_ptr=self._ptr) + pass + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params' in found_struct}} + self._params = anon_struct19(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params' in found_struct}} try: str_list += ['params :\n' + '\n'.join([' ' + line for line in str(self.params).splitlines()])] except ValueError: str_list += ['params : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.params' in found_struct}} @property def params(self): return self._params @params.setter - def params(self, params not None : anon_struct18): - string.memcpy(&self._ptr[0].params, params.getPtr(), sizeof(self._ptr[0].params)) + def params(self, params not None : anon_struct19): + string.memcpy(&self._pvt_ptr[0].params, params.getPtr(), sizeof(self._pvt_ptr[0].params)) + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st' in found_struct}} cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: """ @@ -14390,62 +17222,79 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS Array of external semaphore signal parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): + pass + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.extSemArray' in found_struct}} if self._extSemArray is not NULL: free(self._extSemArray) + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.paramsArray' in found_struct}} if self._paramsArray is not NULL: free(self._paramsArray) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.extSemArray' in found_struct}} try: str_list += ['extSemArray : ' + str(self.extSemArray)] except ValueError: str_list += ['extSemArray : '] + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.paramsArray' in found_struct}} try: str_list += ['paramsArray : ' + str(self.paramsArray)] except ValueError: str_list += ['paramsArray : '] + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.numExtSems' in found_struct}} try: str_list += ['numExtSems : ' + str(self.numExtSems)] except ValueError: str_list += ['numExtSems : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.extSemArray' in found_struct}} @property def extSemArray(self): - arrs = [self._ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] return [CUexternalSemaphore(_ptr=arr) for arr in arrs] @extSemArray.setter def extSemArray(self, val): if len(val) == 0: free(self._extSemArray) self._extSemArray_length = 0 - self._ptr[0].extSemArray = NULL + self._pvt_ptr[0].extSemArray = NULL else: if self._extSemArray_length != len(val): free(self._extSemArray) @@ -14453,20 +17302,22 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: if self._extSemArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) self._extSemArray_length = len(val) - self._ptr[0].extSemArray = self._extSemArray + self._pvt_ptr[0].extSemArray = self._extSemArray for idx in range(len(val)): - self._extSemArray[idx] = (val[idx])._ptr[0] + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.paramsArray' in found_struct}} @property def paramsArray(self): - arrs = [self._ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) for x in range(self._paramsArray_length)] + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) for x in range(self._paramsArray_length)] return [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(_ptr=arr) for arr in arrs] @paramsArray.setter def paramsArray(self, val): if len(val) == 0: free(self._paramsArray) self._paramsArray_length = 0 - self._ptr[0].paramsArray = NULL + self._pvt_ptr[0].paramsArray = NULL else: if self._paramsArray_length != len(val): free(self._paramsArray) @@ -14474,18 +17325,21 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: if self._paramsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))) self._paramsArray_length = len(val) - self._ptr[0].paramsArray = self._paramsArray + self._pvt_ptr[0].paramsArray = self._paramsArray for idx in range(len(val)): - string.memcpy(&self._paramsArray[idx], (val[idx])._ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st.numExtSems' in found_struct}} @property def numExtSems(self): - return self._ptr[0].numExtSems + return self._pvt_ptr[0].numExtSems @numExtSems.setter def numExtSems(self, unsigned int numExtSems): - self._ptr[0].numExtSems = numExtSems + self._pvt_ptr[0].numExtSems = numExtSems + {{endif}} {{endif}} -{{if 'struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: """ @@ -14493,62 +17347,79 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS Array of external semaphore signal parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): + pass + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.extSemArray' in found_struct}} if self._extSemArray is not NULL: free(self._extSemArray) + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.paramsArray' in found_struct}} if self._paramsArray is not NULL: free(self._paramsArray) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.extSemArray' in found_struct}} try: str_list += ['extSemArray : ' + str(self.extSemArray)] except ValueError: str_list += ['extSemArray : '] + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.paramsArray' in found_struct}} try: str_list += ['paramsArray : ' + str(self.paramsArray)] except ValueError: str_list += ['paramsArray : '] + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.numExtSems' in found_struct}} try: str_list += ['numExtSems : ' + str(self.numExtSems)] except ValueError: str_list += ['numExtSems : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.extSemArray' in found_struct}} @property def extSemArray(self): - arrs = [self._ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] return [CUexternalSemaphore(_ptr=arr) for arr in arrs] @extSemArray.setter def extSemArray(self, val): if len(val) == 0: free(self._extSemArray) self._extSemArray_length = 0 - self._ptr[0].extSemArray = NULL + self._pvt_ptr[0].extSemArray = NULL else: if self._extSemArray_length != len(val): free(self._extSemArray) @@ -14556,20 +17427,22 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: if self._extSemArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) self._extSemArray_length = len(val) - self._ptr[0].extSemArray = self._extSemArray + self._pvt_ptr[0].extSemArray = self._extSemArray for idx in range(len(val)): - self._extSemArray[idx] = (val[idx])._ptr[0] + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.paramsArray' in found_struct}} @property def paramsArray(self): - arrs = [self._ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) for x in range(self._paramsArray_length)] + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS) for x in range(self._paramsArray_length)] return [CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS(_ptr=arr) for arr in arrs] @paramsArray.setter def paramsArray(self, val): if len(val) == 0: free(self._paramsArray) self._paramsArray_length = 0 - self._ptr[0].paramsArray = NULL + self._pvt_ptr[0].paramsArray = NULL else: if self._paramsArray_length != len(val): free(self._paramsArray) @@ -14577,18 +17450,21 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: if self._paramsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))) self._paramsArray_length = len(val) - self._ptr[0].paramsArray = self._paramsArray + self._pvt_ptr[0].paramsArray = self._paramsArray for idx in range(len(val)): - string.memcpy(&self._paramsArray[idx], (val[idx])._ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) + {{endif}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st.numExtSems' in found_struct}} @property def numExtSems(self): - return self._ptr[0].numExtSems + return self._pvt_ptr[0].numExtSems @numExtSems.setter def numExtSems(self, unsigned int numExtSems): - self._ptr[0].numExtSems = numExtSems + self._pvt_ptr[0].numExtSems = numExtSems + {{endif}} {{endif}} -{{if 'struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st' in found_struct}} cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: """ @@ -14596,62 +17472,79 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS Array of external semaphore wait parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): + pass + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.extSemArray' in found_struct}} if self._extSemArray is not NULL: free(self._extSemArray) + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.paramsArray' in found_struct}} if self._paramsArray is not NULL: free(self._paramsArray) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.extSemArray' in found_struct}} try: str_list += ['extSemArray : ' + str(self.extSemArray)] except ValueError: str_list += ['extSemArray : '] + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.paramsArray' in found_struct}} try: str_list += ['paramsArray : ' + str(self.paramsArray)] except ValueError: str_list += ['paramsArray : '] + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.numExtSems' in found_struct}} try: str_list += ['numExtSems : ' + str(self.numExtSems)] except ValueError: str_list += ['numExtSems : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.extSemArray' in found_struct}} @property def extSemArray(self): - arrs = [self._ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] return [CUexternalSemaphore(_ptr=arr) for arr in arrs] @extSemArray.setter def extSemArray(self, val): if len(val) == 0: free(self._extSemArray) self._extSemArray_length = 0 - self._ptr[0].extSemArray = NULL + self._pvt_ptr[0].extSemArray = NULL else: if self._extSemArray_length != len(val): free(self._extSemArray) @@ -14659,20 +17552,22 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: if self._extSemArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) self._extSemArray_length = len(val) - self._ptr[0].extSemArray = self._extSemArray + self._pvt_ptr[0].extSemArray = self._extSemArray for idx in range(len(val)): - self._extSemArray[idx] = (val[idx])._ptr[0] + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.paramsArray' in found_struct}} @property def paramsArray(self): - arrs = [self._ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) for x in range(self._paramsArray_length)] + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) for x in range(self._paramsArray_length)] return [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(_ptr=arr) for arr in arrs] @paramsArray.setter def paramsArray(self, val): if len(val) == 0: free(self._paramsArray) self._paramsArray_length = 0 - self._ptr[0].paramsArray = NULL + self._pvt_ptr[0].paramsArray = NULL else: if self._paramsArray_length != len(val): free(self._paramsArray) @@ -14680,18 +17575,21 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: if self._paramsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))) self._paramsArray_length = len(val) - self._ptr[0].paramsArray = self._paramsArray + self._pvt_ptr[0].paramsArray = self._paramsArray for idx in range(len(val)): - string.memcpy(&self._paramsArray[idx], (val[idx])._ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st.numExtSems' in found_struct}} @property def numExtSems(self): - return self._ptr[0].numExtSems + return self._pvt_ptr[0].numExtSems @numExtSems.setter def numExtSems(self, unsigned int numExtSems): - self._ptr[0].numExtSems = numExtSems + self._pvt_ptr[0].numExtSems = numExtSems + {{endif}} {{endif}} -{{if 'struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: """ @@ -14699,62 +17597,79 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.extSemArray' in found_struct}} extSemArray : CUexternalSemaphore Array of external semaphore handles. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.paramsArray' in found_struct}} paramsArray : CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS Array of external semaphore wait parameters. + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): + pass + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.extSemArray' in found_struct}} if self._extSemArray is not NULL: free(self._extSemArray) + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.paramsArray' in found_struct}} if self._paramsArray is not NULL: free(self._paramsArray) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.extSemArray' in found_struct}} try: str_list += ['extSemArray : ' + str(self.extSemArray)] except ValueError: str_list += ['extSemArray : '] + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.paramsArray' in found_struct}} try: str_list += ['paramsArray : ' + str(self.paramsArray)] except ValueError: str_list += ['paramsArray : '] + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.numExtSems' in found_struct}} try: str_list += ['numExtSems : ' + str(self.numExtSems)] except ValueError: str_list += ['numExtSems : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.extSemArray' in found_struct}} @property def extSemArray(self): - arrs = [self._ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cydriver.CUexternalSemaphore) for x in range(self._extSemArray_length)] return [CUexternalSemaphore(_ptr=arr) for arr in arrs] @extSemArray.setter def extSemArray(self, val): if len(val) == 0: free(self._extSemArray) self._extSemArray_length = 0 - self._ptr[0].extSemArray = NULL + self._pvt_ptr[0].extSemArray = NULL else: if self._extSemArray_length != len(val): free(self._extSemArray) @@ -14762,20 +17677,22 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: if self._extSemArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) self._extSemArray_length = len(val) - self._ptr[0].extSemArray = self._extSemArray + self._pvt_ptr[0].extSemArray = self._extSemArray for idx in range(len(val)): - self._extSemArray[idx] = (val[idx])._ptr[0] + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.paramsArray' in found_struct}} @property def paramsArray(self): - arrs = [self._ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) for x in range(self._paramsArray_length)] + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS) for x in range(self._paramsArray_length)] return [CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS(_ptr=arr) for arr in arrs] @paramsArray.setter def paramsArray(self, val): if len(val) == 0: free(self._paramsArray) self._paramsArray_length = 0 - self._ptr[0].paramsArray = NULL + self._pvt_ptr[0].paramsArray = NULL else: if self._paramsArray_length != len(val): free(self._paramsArray) @@ -14783,58 +17700,74 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: if self._paramsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))) self._paramsArray_length = len(val) - self._ptr[0].paramsArray = self._paramsArray + self._pvt_ptr[0].paramsArray = self._paramsArray for idx in range(len(val)): - string.memcpy(&self._paramsArray[idx], (val[idx])._ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) + {{endif}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st.numExtSems' in found_struct}} @property def numExtSems(self): - return self._ptr[0].numExtSems + return self._pvt_ptr[0].numExtSems @numExtSems.setter def numExtSems(self, unsigned int numExtSems): - self._ptr[0].numExtSems = numExtSems + self._pvt_ptr[0].numExtSems = numExtSems + {{endif}} {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st.resource' in found_struct}} cdef class anon_union9: """ Attributes ---------- + {{if 'CUarrayMapInfo_st.resource.mipmap' in found_struct}} mipmap : CUmipmappedArray + {{endif}} + {{if 'CUarrayMapInfo_st.resource.array' in found_struct}} array : CUarray + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._mipmap = CUmipmappedArray(_ptr=&self._ptr[0].resource.mipmap) - self._array = CUarray(_ptr=&self._ptr[0].resource.array) + pass + {{if 'CUarrayMapInfo_st.resource.mipmap' in found_struct}} + self._mipmap = CUmipmappedArray(_ptr=&self._pvt_ptr[0].resource.mipmap) + {{endif}} + {{if 'CUarrayMapInfo_st.resource.array' in found_struct}} + self._array = CUarray(_ptr=&self._pvt_ptr[0].resource.array) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].resource + return &self._pvt_ptr[0].resource def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUarrayMapInfo_st.resource.mipmap' in found_struct}} try: str_list += ['mipmap : ' + str(self.mipmap)] except ValueError: str_list += ['mipmap : '] + {{endif}} + {{if 'CUarrayMapInfo_st.resource.array' in found_struct}} try: str_list += ['array : ' + str(self.array)] except ValueError: str_list += ['array : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUarrayMapInfo_st.resource.mipmap' in found_struct}} @property def mipmap(self): return self._mipmap @@ -14849,7 +17782,9 @@ cdef class anon_union9: else: pmipmap = int(CUmipmappedArray(mipmap)) cymipmap = pmipmap - self._mipmap._ptr[0] = cymipmap + self._mipmap._pvt_ptr[0] = cymipmap + {{endif}} + {{if 'CUarrayMapInfo_st.resource.array' in found_struct}} @property def array(self): return self._array @@ -14864,286 +17799,374 @@ cdef class anon_union9: else: parray = int(CUarray(array)) cyarray = parray - self._array._ptr[0] = cyarray + self._array._pvt_ptr[0] = cyarray + {{endif}} {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st.subresource.sparseLevel' in found_struct}} -cdef class anon_struct19: +cdef class anon_struct20: """ Attributes ---------- + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.level' in found_struct}} level : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.layer' in found_struct}} layer : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetX' in found_struct}} offsetX : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetY' in found_struct}} offsetY : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetZ' in found_struct}} offsetZ : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentWidth' in found_struct}} extentWidth : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentHeight' in found_struct}} extentHeight : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentDepth' in found_struct}} extentDepth : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].subresource.sparseLevel + return &self._pvt_ptr[0].subresource.sparseLevel def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.level' in found_struct}} try: str_list += ['level : ' + str(self.level)] except ValueError: str_list += ['level : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.layer' in found_struct}} try: str_list += ['layer : ' + str(self.layer)] except ValueError: str_list += ['layer : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetX' in found_struct}} try: str_list += ['offsetX : ' + str(self.offsetX)] except ValueError: str_list += ['offsetX : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetY' in found_struct}} try: str_list += ['offsetY : ' + str(self.offsetY)] except ValueError: str_list += ['offsetY : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetZ' in found_struct}} try: str_list += ['offsetZ : ' + str(self.offsetZ)] except ValueError: str_list += ['offsetZ : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentWidth' in found_struct}} try: str_list += ['extentWidth : ' + str(self.extentWidth)] except ValueError: str_list += ['extentWidth : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentHeight' in found_struct}} try: str_list += ['extentHeight : ' + str(self.extentHeight)] except ValueError: str_list += ['extentHeight : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentDepth' in found_struct}} try: str_list += ['extentDepth : ' + str(self.extentDepth)] except ValueError: str_list += ['extentDepth : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.level' in found_struct}} @property def level(self): - return self._ptr[0].subresource.sparseLevel.level + return self._pvt_ptr[0].subresource.sparseLevel.level @level.setter def level(self, unsigned int level): - self._ptr[0].subresource.sparseLevel.level = level + self._pvt_ptr[0].subresource.sparseLevel.level = level + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.layer' in found_struct}} @property def layer(self): - return self._ptr[0].subresource.sparseLevel.layer + return self._pvt_ptr[0].subresource.sparseLevel.layer @layer.setter def layer(self, unsigned int layer): - self._ptr[0].subresource.sparseLevel.layer = layer + self._pvt_ptr[0].subresource.sparseLevel.layer = layer + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetX' in found_struct}} @property def offsetX(self): - return self._ptr[0].subresource.sparseLevel.offsetX + return self._pvt_ptr[0].subresource.sparseLevel.offsetX @offsetX.setter def offsetX(self, unsigned int offsetX): - self._ptr[0].subresource.sparseLevel.offsetX = offsetX + self._pvt_ptr[0].subresource.sparseLevel.offsetX = offsetX + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetY' in found_struct}} @property def offsetY(self): - return self._ptr[0].subresource.sparseLevel.offsetY + return self._pvt_ptr[0].subresource.sparseLevel.offsetY @offsetY.setter def offsetY(self, unsigned int offsetY): - self._ptr[0].subresource.sparseLevel.offsetY = offsetY + self._pvt_ptr[0].subresource.sparseLevel.offsetY = offsetY + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.offsetZ' in found_struct}} @property def offsetZ(self): - return self._ptr[0].subresource.sparseLevel.offsetZ + return self._pvt_ptr[0].subresource.sparseLevel.offsetZ @offsetZ.setter def offsetZ(self, unsigned int offsetZ): - self._ptr[0].subresource.sparseLevel.offsetZ = offsetZ + self._pvt_ptr[0].subresource.sparseLevel.offsetZ = offsetZ + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentWidth' in found_struct}} @property def extentWidth(self): - return self._ptr[0].subresource.sparseLevel.extentWidth + return self._pvt_ptr[0].subresource.sparseLevel.extentWidth @extentWidth.setter def extentWidth(self, unsigned int extentWidth): - self._ptr[0].subresource.sparseLevel.extentWidth = extentWidth + self._pvt_ptr[0].subresource.sparseLevel.extentWidth = extentWidth + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentHeight' in found_struct}} @property def extentHeight(self): - return self._ptr[0].subresource.sparseLevel.extentHeight + return self._pvt_ptr[0].subresource.sparseLevel.extentHeight @extentHeight.setter def extentHeight(self, unsigned int extentHeight): - self._ptr[0].subresource.sparseLevel.extentHeight = extentHeight + self._pvt_ptr[0].subresource.sparseLevel.extentHeight = extentHeight + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.sparseLevel.extentDepth' in found_struct}} @property def extentDepth(self): - return self._ptr[0].subresource.sparseLevel.extentDepth + return self._pvt_ptr[0].subresource.sparseLevel.extentDepth @extentDepth.setter def extentDepth(self, unsigned int extentDepth): - self._ptr[0].subresource.sparseLevel.extentDepth = extentDepth + self._pvt_ptr[0].subresource.sparseLevel.extentDepth = extentDepth + {{endif}} {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st.subresource.miptail' in found_struct}} -cdef class anon_struct20: +cdef class anon_struct21: """ Attributes ---------- + {{if 'CUarrayMapInfo_st.subresource.miptail.layer' in found_struct}} layer : unsigned int + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail.offset' in found_struct}} offset : unsigned long long + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail.size' in found_struct}} size : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].subresource.miptail + return &self._pvt_ptr[0].subresource.miptail def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUarrayMapInfo_st.subresource.miptail.layer' in found_struct}} try: str_list += ['layer : ' + str(self.layer)] except ValueError: str_list += ['layer : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail.offset' in found_struct}} try: str_list += ['offset : ' + str(self.offset)] except ValueError: str_list += ['offset : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail.size' in found_struct}} try: str_list += ['size : ' + str(self.size)] except ValueError: str_list += ['size : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUarrayMapInfo_st.subresource.miptail.layer' in found_struct}} @property def layer(self): - return self._ptr[0].subresource.miptail.layer + return self._pvt_ptr[0].subresource.miptail.layer @layer.setter def layer(self, unsigned int layer): - self._ptr[0].subresource.miptail.layer = layer + self._pvt_ptr[0].subresource.miptail.layer = layer + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail.offset' in found_struct}} @property def offset(self): - return self._ptr[0].subresource.miptail.offset + return self._pvt_ptr[0].subresource.miptail.offset @offset.setter def offset(self, unsigned long long offset): - self._ptr[0].subresource.miptail.offset = offset + self._pvt_ptr[0].subresource.miptail.offset = offset + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail.size' in found_struct}} @property def size(self): - return self._ptr[0].subresource.miptail.size + return self._pvt_ptr[0].subresource.miptail.size @size.setter def size(self, unsigned long long size): - self._ptr[0].subresource.miptail.size = size + self._pvt_ptr[0].subresource.miptail.size = size + {{endif}} {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st.subresource' in found_struct}} cdef class anon_union10: """ Attributes ---------- - sparseLevel : anon_struct19 + {{if 'CUarrayMapInfo_st.subresource.sparseLevel' in found_struct}} + sparseLevel : anon_struct20 - miptail : anon_struct20 + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail' in found_struct}} + miptail : anon_struct21 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._sparseLevel = anon_struct19(_ptr=self._ptr) - self._miptail = anon_struct20(_ptr=self._ptr) + pass + {{if 'CUarrayMapInfo_st.subresource.sparseLevel' in found_struct}} + self._sparseLevel = anon_struct20(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail' in found_struct}} + self._miptail = anon_struct21(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].subresource + return &self._pvt_ptr[0].subresource def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUarrayMapInfo_st.subresource.sparseLevel' in found_struct}} try: str_list += ['sparseLevel :\n' + '\n'.join([' ' + line for line in str(self.sparseLevel).splitlines()])] except ValueError: str_list += ['sparseLevel : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail' in found_struct}} try: str_list += ['miptail :\n' + '\n'.join([' ' + line for line in str(self.miptail).splitlines()])] except ValueError: str_list += ['miptail : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUarrayMapInfo_st.subresource.sparseLevel' in found_struct}} @property def sparseLevel(self): return self._sparseLevel @sparseLevel.setter - def sparseLevel(self, sparseLevel not None : anon_struct19): - string.memcpy(&self._ptr[0].subresource.sparseLevel, sparseLevel.getPtr(), sizeof(self._ptr[0].subresource.sparseLevel)) + def sparseLevel(self, sparseLevel not None : anon_struct20): + string.memcpy(&self._pvt_ptr[0].subresource.sparseLevel, sparseLevel.getPtr(), sizeof(self._pvt_ptr[0].subresource.sparseLevel)) + {{endif}} + {{if 'CUarrayMapInfo_st.subresource.miptail' in found_struct}} @property def miptail(self): return self._miptail @miptail.setter - def miptail(self, miptail not None : anon_struct20): - string.memcpy(&self._ptr[0].subresource.miptail, miptail.getPtr(), sizeof(self._ptr[0].subresource.miptail)) + def miptail(self, miptail not None : anon_struct21): + string.memcpy(&self._pvt_ptr[0].subresource.miptail, miptail.getPtr(), sizeof(self._pvt_ptr[0].subresource.miptail)) + {{endif}} {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st.memHandle' in found_struct}} cdef class anon_union11: """ Attributes ---------- + {{if 'CUarrayMapInfo_st.memHandle.memHandle' in found_struct}} memHandle : CUmemGenericAllocationHandle + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._memHandle = CUmemGenericAllocationHandle(_ptr=&self._ptr[0].memHandle.memHandle) + pass + {{if 'CUarrayMapInfo_st.memHandle.memHandle' in found_struct}} + self._memHandle = CUmemGenericAllocationHandle(_ptr=&self._pvt_ptr[0].memHandle.memHandle) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].memHandle + return &self._pvt_ptr[0].memHandle def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUarrayMapInfo_st.memHandle.memHandle' in found_struct}} try: str_list += ['memHandle : ' + str(self.memHandle)] except ValueError: str_list += ['memHandle : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUarrayMapInfo_st.memHandle.memHandle' in found_struct}} @property def memHandle(self): return self._memHandle @@ -15158,10 +18181,11 @@ cdef class anon_union11: else: pmemHandle = int(CUmemGenericAllocationHandle(memHandle)) cymemHandle = pmemHandle - self._memHandle._ptr[0] = cymemHandle + self._memHandle._pvt_ptr[0] = cymemHandle + {{endif}} {{endif}} -{{if 'struct CUarrayMapInfo_st' in found_types}} +{{if 'CUarrayMapInfo_st' in found_struct}} cdef class CUarrayMapInfo_st: """ @@ -15170,168 +18194,240 @@ cdef class CUarrayMapInfo_st: Attributes ---------- + {{if 'CUarrayMapInfo_st.resourceType' in found_struct}} resourceType : CUresourcetype Resource type + {{endif}} + {{if 'CUarrayMapInfo_st.resource' in found_struct}} resource : anon_union9 + {{endif}} + {{if 'CUarrayMapInfo_st.subresourceType' in found_struct}} subresourceType : CUarraySparseSubresourceType Sparse subresource type + {{endif}} + {{if 'CUarrayMapInfo_st.subresource' in found_struct}} subresource : anon_union10 + {{endif}} + {{if 'CUarrayMapInfo_st.memOperationType' in found_struct}} memOperationType : CUmemOperationType Memory operation type + {{endif}} + {{if 'CUarrayMapInfo_st.memHandleType' in found_struct}} memHandleType : CUmemHandleType Memory handle type + {{endif}} + {{if 'CUarrayMapInfo_st.memHandle' in found_struct}} memHandle : anon_union11 + {{endif}} + {{if 'CUarrayMapInfo_st.offset' in found_struct}} offset : unsigned long long Offset within mip tail Offset within the memory + {{endif}} + {{if 'CUarrayMapInfo_st.deviceBitMask' in found_struct}} deviceBitMask : unsigned int Device ordinal bit mask + {{endif}} + {{if 'CUarrayMapInfo_st.flags' in found_struct}} flags : unsigned int flags for future use, must be zero now. + {{endif}} + {{if 'CUarrayMapInfo_st.reserved' in found_struct}} reserved : List[unsigned int] Reserved for future use, must be zero now. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cydriver.CUarrayMapInfo_st)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._resource = anon_union9(_ptr=self._ptr) - self._subresource = anon_union10(_ptr=self._ptr) - self._memHandle = anon_union11(_ptr=self._ptr) + pass + {{if 'CUarrayMapInfo_st.resource' in found_struct}} + self._resource = anon_union9(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUarrayMapInfo_st.subresource' in found_struct}} + self._subresource = anon_union10(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUarrayMapInfo_st.memHandle' in found_struct}} + self._memHandle = anon_union11(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUarrayMapInfo_st.resourceType' in found_struct}} try: str_list += ['resourceType : ' + str(self.resourceType)] except ValueError: str_list += ['resourceType : '] + {{endif}} + {{if 'CUarrayMapInfo_st.resource' in found_struct}} try: str_list += ['resource :\n' + '\n'.join([' ' + line for line in str(self.resource).splitlines()])] except ValueError: str_list += ['resource : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresourceType' in found_struct}} try: str_list += ['subresourceType : ' + str(self.subresourceType)] except ValueError: str_list += ['subresourceType : '] + {{endif}} + {{if 'CUarrayMapInfo_st.subresource' in found_struct}} try: str_list += ['subresource :\n' + '\n'.join([' ' + line for line in str(self.subresource).splitlines()])] except ValueError: str_list += ['subresource : '] + {{endif}} + {{if 'CUarrayMapInfo_st.memOperationType' in found_struct}} try: str_list += ['memOperationType : ' + str(self.memOperationType)] except ValueError: str_list += ['memOperationType : '] + {{endif}} + {{if 'CUarrayMapInfo_st.memHandleType' in found_struct}} try: str_list += ['memHandleType : ' + str(self.memHandleType)] except ValueError: str_list += ['memHandleType : '] + {{endif}} + {{if 'CUarrayMapInfo_st.memHandle' in found_struct}} try: str_list += ['memHandle :\n' + '\n'.join([' ' + line for line in str(self.memHandle).splitlines()])] except ValueError: str_list += ['memHandle : '] + {{endif}} + {{if 'CUarrayMapInfo_st.offset' in found_struct}} try: str_list += ['offset : ' + str(self.offset)] except ValueError: str_list += ['offset : '] + {{endif}} + {{if 'CUarrayMapInfo_st.deviceBitMask' in found_struct}} try: str_list += ['deviceBitMask : ' + str(self.deviceBitMask)] except ValueError: str_list += ['deviceBitMask : '] + {{endif}} + {{if 'CUarrayMapInfo_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'CUarrayMapInfo_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUarrayMapInfo_st.resourceType' in found_struct}} @property def resourceType(self): - return CUresourcetype(self._ptr[0].resourceType) + return CUresourcetype(self._pvt_ptr[0].resourceType) @resourceType.setter def resourceType(self, resourceType not None : CUresourcetype): - self._ptr[0].resourceType = resourceType.value + self._pvt_ptr[0].resourceType = resourceType.value + {{endif}} + {{if 'CUarrayMapInfo_st.resource' in found_struct}} @property def resource(self): return self._resource @resource.setter def resource(self, resource not None : anon_union9): - string.memcpy(&self._ptr[0].resource, resource.getPtr(), sizeof(self._ptr[0].resource)) + string.memcpy(&self._pvt_ptr[0].resource, resource.getPtr(), sizeof(self._pvt_ptr[0].resource)) + {{endif}} + {{if 'CUarrayMapInfo_st.subresourceType' in found_struct}} @property def subresourceType(self): - return CUarraySparseSubresourceType(self._ptr[0].subresourceType) + return CUarraySparseSubresourceType(self._pvt_ptr[0].subresourceType) @subresourceType.setter def subresourceType(self, subresourceType not None : CUarraySparseSubresourceType): - self._ptr[0].subresourceType = subresourceType.value + self._pvt_ptr[0].subresourceType = subresourceType.value + {{endif}} + {{if 'CUarrayMapInfo_st.subresource' in found_struct}} @property def subresource(self): return self._subresource @subresource.setter def subresource(self, subresource not None : anon_union10): - string.memcpy(&self._ptr[0].subresource, subresource.getPtr(), sizeof(self._ptr[0].subresource)) + string.memcpy(&self._pvt_ptr[0].subresource, subresource.getPtr(), sizeof(self._pvt_ptr[0].subresource)) + {{endif}} + {{if 'CUarrayMapInfo_st.memOperationType' in found_struct}} @property def memOperationType(self): - return CUmemOperationType(self._ptr[0].memOperationType) + return CUmemOperationType(self._pvt_ptr[0].memOperationType) @memOperationType.setter def memOperationType(self, memOperationType not None : CUmemOperationType): - self._ptr[0].memOperationType = memOperationType.value + self._pvt_ptr[0].memOperationType = memOperationType.value + {{endif}} + {{if 'CUarrayMapInfo_st.memHandleType' in found_struct}} @property def memHandleType(self): - return CUmemHandleType(self._ptr[0].memHandleType) + return CUmemHandleType(self._pvt_ptr[0].memHandleType) @memHandleType.setter def memHandleType(self, memHandleType not None : CUmemHandleType): - self._ptr[0].memHandleType = memHandleType.value + self._pvt_ptr[0].memHandleType = memHandleType.value + {{endif}} + {{if 'CUarrayMapInfo_st.memHandle' in found_struct}} @property def memHandle(self): return self._memHandle @memHandle.setter def memHandle(self, memHandle not None : anon_union11): - string.memcpy(&self._ptr[0].memHandle, memHandle.getPtr(), sizeof(self._ptr[0].memHandle)) + string.memcpy(&self._pvt_ptr[0].memHandle, memHandle.getPtr(), sizeof(self._pvt_ptr[0].memHandle)) + {{endif}} + {{if 'CUarrayMapInfo_st.offset' in found_struct}} @property def offset(self): - return self._ptr[0].offset + return self._pvt_ptr[0].offset @offset.setter def offset(self, unsigned long long offset): - self._ptr[0].offset = offset + self._pvt_ptr[0].offset = offset + {{endif}} + {{if 'CUarrayMapInfo_st.deviceBitMask' in found_struct}} @property def deviceBitMask(self): - return self._ptr[0].deviceBitMask + return self._pvt_ptr[0].deviceBitMask @deviceBitMask.setter def deviceBitMask(self, unsigned int deviceBitMask): - self._ptr[0].deviceBitMask = deviceBitMask + self._pvt_ptr[0].deviceBitMask = deviceBitMask + {{endif}} + {{if 'CUarrayMapInfo_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'CUarrayMapInfo_st.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct CUmemLocation_st' in found_types}} +{{if 'CUmemLocation_st' in found_struct}} cdef class CUmemLocation_st: """ @@ -15339,136 +18435,170 @@ cdef class CUmemLocation_st: Attributes ---------- + {{if 'CUmemLocation_st.type' in found_struct}} type : CUmemLocationType Specifies the location type, which modifies the meaning of id. + {{endif}} + {{if 'CUmemLocation_st.id' in found_struct}} id : int identifier for a given this location's CUmemLocationType. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUmemLocation_st.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'CUmemLocation_st.id' in found_struct}} try: str_list += ['id : ' + str(self.id)] except ValueError: str_list += ['id : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUmemLocation_st.type' in found_struct}} @property def type(self): - return CUmemLocationType(self._ptr[0].type) + return CUmemLocationType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUmemLocationType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'CUmemLocation_st.id' in found_struct}} @property def id(self): - return self._ptr[0].id + return self._pvt_ptr[0].id @id.setter def id(self, int id): - self._ptr[0].id = id + self._pvt_ptr[0].id = id + {{endif}} {{endif}} -{{if 'struct CUmemAllocationProp_st' in found_types}} +{{if 'CUmemAllocationProp_st.allocFlags' in found_struct}} -cdef class anon_struct21: +cdef class anon_struct22: """ Attributes ---------- + {{if 'CUmemAllocationProp_st.allocFlags.compressionType' in found_struct}} compressionType : bytes + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.gpuDirectRDMACapable' in found_struct}} gpuDirectRDMACapable : bytes + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.usage' in found_struct}} usage : unsigned short + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].allocFlags + return &self._pvt_ptr[0].allocFlags def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUmemAllocationProp_st.allocFlags.compressionType' in found_struct}} try: str_list += ['compressionType : ' + str(self.compressionType)] except ValueError: str_list += ['compressionType : '] + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.gpuDirectRDMACapable' in found_struct}} try: str_list += ['gpuDirectRDMACapable : ' + str(self.gpuDirectRDMACapable)] except ValueError: str_list += ['gpuDirectRDMACapable : '] + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.usage' in found_struct}} try: str_list += ['usage : ' + str(self.usage)] except ValueError: str_list += ['usage : '] + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUmemAllocationProp_st.allocFlags.compressionType' in found_struct}} @property def compressionType(self): - return self._ptr[0].allocFlags.compressionType + return self._pvt_ptr[0].allocFlags.compressionType @compressionType.setter def compressionType(self, unsigned char compressionType): - self._ptr[0].allocFlags.compressionType = compressionType + self._pvt_ptr[0].allocFlags.compressionType = compressionType + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.gpuDirectRDMACapable' in found_struct}} @property def gpuDirectRDMACapable(self): - return self._ptr[0].allocFlags.gpuDirectRDMACapable + return self._pvt_ptr[0].allocFlags.gpuDirectRDMACapable @gpuDirectRDMACapable.setter def gpuDirectRDMACapable(self, unsigned char gpuDirectRDMACapable): - self._ptr[0].allocFlags.gpuDirectRDMACapable = gpuDirectRDMACapable + self._pvt_ptr[0].allocFlags.gpuDirectRDMACapable = gpuDirectRDMACapable + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.usage' in found_struct}} @property def usage(self): - return self._ptr[0].allocFlags.usage + return self._pvt_ptr[0].allocFlags.usage @usage.setter def usage(self, unsigned short usage): - self._ptr[0].allocFlags.usage = usage + self._pvt_ptr[0].allocFlags.usage = usage + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].allocFlags.reserved, 4) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].allocFlags.reserved, 4) @reserved.setter def reserved(self, reserved): if len(reserved) != 4: raise ValueError("reserved length must be 4, is " + str(len(reserved))) for i, b in enumerate(reserved): - self._ptr[0].allocFlags.reserved[i] = b + self._pvt_ptr[0].allocFlags.reserved[i] = b + {{endif}} {{endif}} -{{if 'struct CUmemAllocationProp_st' in found_types}} +{{if 'CUmemAllocationProp_st' in found_struct}} cdef class CUmemAllocationProp_st: """ @@ -15476,98 +18606,132 @@ cdef class CUmemAllocationProp_st: Attributes ---------- + {{if 'CUmemAllocationProp_st.type' in found_struct}} type : CUmemAllocationType Allocation type + {{endif}} + {{if 'CUmemAllocationProp_st.requestedHandleTypes' in found_struct}} requestedHandleTypes : CUmemAllocationHandleType requested CUmemAllocationHandleType + {{endif}} + {{if 'CUmemAllocationProp_st.location' in found_struct}} location : CUmemLocation Location of allocation + {{endif}} + {{if 'CUmemAllocationProp_st.win32HandleMetaData' in found_struct}} win32HandleMetaData : Any Windows-specific POBJECT_ATTRIBUTES required when CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes structure includes security attributes that define the scope of which exported allocations may be transferred to other processes. In all other cases, this field is required to be zero. - allocFlags : anon_struct21 + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags' in found_struct}} + allocFlags : anon_struct22 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._location = CUmemLocation(_ptr=&self._ptr[0].location) - self._allocFlags = anon_struct21(_ptr=self._ptr) + pass + {{if 'CUmemAllocationProp_st.location' in found_struct}} + self._location = CUmemLocation(_ptr=&self._pvt_ptr[0].location) + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags' in found_struct}} + self._allocFlags = anon_struct22(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUmemAllocationProp_st.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'CUmemAllocationProp_st.requestedHandleTypes' in found_struct}} try: str_list += ['requestedHandleTypes : ' + str(self.requestedHandleTypes)] except ValueError: str_list += ['requestedHandleTypes : '] + {{endif}} + {{if 'CUmemAllocationProp_st.location' in found_struct}} try: str_list += ['location :\n' + '\n'.join([' ' + line for line in str(self.location).splitlines()])] except ValueError: str_list += ['location : '] + {{endif}} + {{if 'CUmemAllocationProp_st.win32HandleMetaData' in found_struct}} try: str_list += ['win32HandleMetaData : ' + hex(self.win32HandleMetaData)] except ValueError: str_list += ['win32HandleMetaData : '] + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags' in found_struct}} try: str_list += ['allocFlags :\n' + '\n'.join([' ' + line for line in str(self.allocFlags).splitlines()])] except ValueError: str_list += ['allocFlags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUmemAllocationProp_st.type' in found_struct}} @property def type(self): - return CUmemAllocationType(self._ptr[0].type) + return CUmemAllocationType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUmemAllocationType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'CUmemAllocationProp_st.requestedHandleTypes' in found_struct}} @property def requestedHandleTypes(self): - return CUmemAllocationHandleType(self._ptr[0].requestedHandleTypes) + return CUmemAllocationHandleType(self._pvt_ptr[0].requestedHandleTypes) @requestedHandleTypes.setter def requestedHandleTypes(self, requestedHandleTypes not None : CUmemAllocationHandleType): - self._ptr[0].requestedHandleTypes = requestedHandleTypes.value + self._pvt_ptr[0].requestedHandleTypes = requestedHandleTypes.value + {{endif}} + {{if 'CUmemAllocationProp_st.location' in found_struct}} @property def location(self): return self._location @location.setter def location(self, location not None : CUmemLocation): - string.memcpy(&self._ptr[0].location, location.getPtr(), sizeof(self._ptr[0].location)) + string.memcpy(&self._pvt_ptr[0].location, location.getPtr(), sizeof(self._pvt_ptr[0].location)) + {{endif}} + {{if 'CUmemAllocationProp_st.win32HandleMetaData' in found_struct}} @property def win32HandleMetaData(self): - return self._ptr[0].win32HandleMetaData + return self._pvt_ptr[0].win32HandleMetaData @win32HandleMetaData.setter def win32HandleMetaData(self, win32HandleMetaData): - _cywin32HandleMetaData = utils.HelperInputVoidPtr(win32HandleMetaData) - self._ptr[0].win32HandleMetaData = _cywin32HandleMetaData.cptr + _cwin32HandleMetaData = utils.HelperInputVoidPtr(win32HandleMetaData) + self._pvt_ptr[0].win32HandleMetaData = _cwin32HandleMetaData.cptr + {{endif}} + {{if 'CUmemAllocationProp_st.allocFlags' in found_struct}} @property def allocFlags(self): return self._allocFlags @allocFlags.setter - def allocFlags(self, allocFlags not None : anon_struct21): - string.memcpy(&self._ptr[0].allocFlags, allocFlags.getPtr(), sizeof(self._ptr[0].allocFlags)) + def allocFlags(self, allocFlags not None : anon_struct22): + string.memcpy(&self._pvt_ptr[0].allocFlags, allocFlags.getPtr(), sizeof(self._pvt_ptr[0].allocFlags)) + {{endif}} {{endif}} -{{if 'struct CUmulticastObjectProp_st' in found_types}} +{{if 'CUmulticastObjectProp_st' in found_struct}} cdef class CUmulticastObjectProp_st: """ @@ -15575,83 +18739,106 @@ cdef class CUmulticastObjectProp_st: Attributes ---------- + {{if 'CUmulticastObjectProp_st.numDevices' in found_struct}} numDevices : unsigned int The number of devices in the multicast team that will bind memory to this object + {{endif}} + {{if 'CUmulticastObjectProp_st.size' in found_struct}} size : size_t The maximum amount of memory that can be bound to this multicast object per device + {{endif}} + {{if 'CUmulticastObjectProp_st.handleTypes' in found_struct}} handleTypes : unsigned long long Bitmask of exportable handle types (see CUmemAllocationHandleType) for this object + {{endif}} + {{if 'CUmulticastObjectProp_st.flags' in found_struct}} flags : unsigned long long Flags for future use, must be zero now + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUmulticastObjectProp_st.numDevices' in found_struct}} try: str_list += ['numDevices : ' + str(self.numDevices)] except ValueError: str_list += ['numDevices : '] + {{endif}} + {{if 'CUmulticastObjectProp_st.size' in found_struct}} try: str_list += ['size : ' + str(self.size)] except ValueError: str_list += ['size : '] + {{endif}} + {{if 'CUmulticastObjectProp_st.handleTypes' in found_struct}} try: str_list += ['handleTypes : ' + str(self.handleTypes)] except ValueError: str_list += ['handleTypes : '] + {{endif}} + {{if 'CUmulticastObjectProp_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUmulticastObjectProp_st.numDevices' in found_struct}} @property def numDevices(self): - return self._ptr[0].numDevices + return self._pvt_ptr[0].numDevices @numDevices.setter def numDevices(self, unsigned int numDevices): - self._ptr[0].numDevices = numDevices + self._pvt_ptr[0].numDevices = numDevices + {{endif}} + {{if 'CUmulticastObjectProp_st.size' in found_struct}} @property def size(self): - return self._ptr[0].size + return self._pvt_ptr[0].size @size.setter def size(self, size_t size): - self._ptr[0].size = size + self._pvt_ptr[0].size = size + {{endif}} + {{if 'CUmulticastObjectProp_st.handleTypes' in found_struct}} @property def handleTypes(self): - return self._ptr[0].handleTypes + return self._pvt_ptr[0].handleTypes @handleTypes.setter def handleTypes(self, unsigned long long handleTypes): - self._ptr[0].handleTypes = handleTypes + self._pvt_ptr[0].handleTypes = handleTypes + {{endif}} + {{if 'CUmulticastObjectProp_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned long long flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} {{endif}} -{{if 'struct CUmemAccessDesc_st' in found_types}} +{{if 'CUmemAccessDesc_st' in found_struct}} cdef class CUmemAccessDesc_st: """ @@ -15659,56 +18846,70 @@ cdef class CUmemAccessDesc_st: Attributes ---------- + {{if 'CUmemAccessDesc_st.location' in found_struct}} location : CUmemLocation Location on which the request is to change it's accessibility + {{endif}} + {{if 'CUmemAccessDesc_st.flags' in found_struct}} flags : CUmemAccess_flags ::CUmemProt accessibility flags to set on the request + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._location = CUmemLocation(_ptr=&self._ptr[0].location) + pass + {{if 'CUmemAccessDesc_st.location' in found_struct}} + self._location = CUmemLocation(_ptr=&self._pvt_ptr[0].location) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUmemAccessDesc_st.location' in found_struct}} try: str_list += ['location :\n' + '\n'.join([' ' + line for line in str(self.location).splitlines()])] except ValueError: str_list += ['location : '] + {{endif}} + {{if 'CUmemAccessDesc_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUmemAccessDesc_st.location' in found_struct}} @property def location(self): return self._location @location.setter def location(self, location not None : CUmemLocation): - string.memcpy(&self._ptr[0].location, location.getPtr(), sizeof(self._ptr[0].location)) + string.memcpy(&self._pvt_ptr[0].location, location.getPtr(), sizeof(self._pvt_ptr[0].location)) + {{endif}} + {{if 'CUmemAccessDesc_st.flags' in found_struct}} @property def flags(self): - return CUmemAccess_flags(self._ptr[0].flags) + return CUmemAccess_flags(self._pvt_ptr[0].flags) @flags.setter def flags(self, flags not None : CUmemAccess_flags): - self._ptr[0].flags = flags.value + self._pvt_ptr[0].flags = flags.value + {{endif}} {{endif}} -{{if 'struct CUgraphExecUpdateResultInfo_st' in found_types}} +{{if 'CUgraphExecUpdateResultInfo_st' in found_struct}} cdef class CUgraphExecUpdateResultInfo_st: """ @@ -15716,58 +18917,77 @@ cdef class CUgraphExecUpdateResultInfo_st: Attributes ---------- + {{if 'CUgraphExecUpdateResultInfo_st.result' in found_struct}} result : CUgraphExecUpdateResult Gives more specific detail when a cuda graph update fails. + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorNode' in found_struct}} errorNode : CUgraphNode The "to node" of the error edge when the topologies do not match. The error node when the error is associated with a specific node. NULL when the error is generic. + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} errorFromNode : CUgraphNode The from node of error edge when the topologies do not match. Otherwise NULL. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._errorNode = CUgraphNode(_ptr=&self._ptr[0].errorNode) - self._errorFromNode = CUgraphNode(_ptr=&self._ptr[0].errorFromNode) + pass + {{if 'CUgraphExecUpdateResultInfo_st.errorNode' in found_struct}} + self._errorNode = CUgraphNode(_ptr=&self._pvt_ptr[0].errorNode) + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} + self._errorFromNode = CUgraphNode(_ptr=&self._pvt_ptr[0].errorFromNode) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUgraphExecUpdateResultInfo_st.result' in found_struct}} try: str_list += ['result : ' + str(self.result)] except ValueError: str_list += ['result : '] + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorNode' in found_struct}} try: str_list += ['errorNode : ' + str(self.errorNode)] except ValueError: str_list += ['errorNode : '] + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} try: str_list += ['errorFromNode : ' + str(self.errorFromNode)] except ValueError: str_list += ['errorFromNode : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUgraphExecUpdateResultInfo_st.result' in found_struct}} @property def result(self): - return CUgraphExecUpdateResult(self._ptr[0].result) + return CUgraphExecUpdateResult(self._pvt_ptr[0].result) @result.setter def result(self, result not None : CUgraphExecUpdateResult): - self._ptr[0].result = result.value + self._pvt_ptr[0].result = result.value + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorNode' in found_struct}} @property def errorNode(self): return self._errorNode @@ -15782,7 +19002,9 @@ cdef class CUgraphExecUpdateResultInfo_st: else: perrorNode = int(CUgraphNode(errorNode)) cyerrorNode = perrorNode - self._errorNode._ptr[0] = cyerrorNode + self._errorNode._pvt_ptr[0] = cyerrorNode + {{endif}} + {{if 'CUgraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} @property def errorFromNode(self): return self._errorFromNode @@ -15797,9 +19019,10 @@ cdef class CUgraphExecUpdateResultInfo_st: else: perrorFromNode = int(CUgraphNode(errorFromNode)) cyerrorFromNode = perrorFromNode - self._errorFromNode._ptr[0] = cyerrorFromNode + self._errorFromNode._pvt_ptr[0] = cyerrorFromNode + {{endif}} {{endif}} -{{if 'struct CUmemPoolProps_st' in found_types}} +{{if 'CUmemPoolProps_st' in found_struct}} cdef class CUmemPoolProps_st: """ @@ -15807,126 +19030,170 @@ cdef class CUmemPoolProps_st: Attributes ---------- + {{if 'CUmemPoolProps_st.allocType' in found_struct}} allocType : CUmemAllocationType Allocation type. Currently must be specified as CU_MEM_ALLOCATION_TYPE_PINNED + {{endif}} + {{if 'CUmemPoolProps_st.handleTypes' in found_struct}} handleTypes : CUmemAllocationHandleType Handle types that will be supported by allocations from the pool. + {{endif}} + {{if 'CUmemPoolProps_st.location' in found_struct}} location : CUmemLocation Location where allocations should reside. + {{endif}} + {{if 'CUmemPoolProps_st.win32SecurityAttributes' in found_struct}} win32SecurityAttributes : Any Windows-specific LPSECURITYATTRIBUTES required when CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute defines the scope of which exported allocations may be transferred to other processes. In all other cases, this field is required to be zero. + {{endif}} + {{if 'CUmemPoolProps_st.maxSize' in found_struct}} maxSize : size_t Maximum pool size. When set to 0, defaults to a system dependent value. + {{endif}} + {{if 'CUmemPoolProps_st.usage' in found_struct}} usage : unsigned short Bitmask indicating intended usage for the pool. + {{endif}} + {{if 'CUmemPoolProps_st.reserved' in found_struct}} reserved : bytes reserved for future use, must be 0 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._location = CUmemLocation(_ptr=&self._ptr[0].location) + pass + {{if 'CUmemPoolProps_st.location' in found_struct}} + self._location = CUmemLocation(_ptr=&self._pvt_ptr[0].location) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUmemPoolProps_st.allocType' in found_struct}} try: str_list += ['allocType : ' + str(self.allocType)] except ValueError: str_list += ['allocType : '] + {{endif}} + {{if 'CUmemPoolProps_st.handleTypes' in found_struct}} try: str_list += ['handleTypes : ' + str(self.handleTypes)] except ValueError: str_list += ['handleTypes : '] + {{endif}} + {{if 'CUmemPoolProps_st.location' in found_struct}} try: str_list += ['location :\n' + '\n'.join([' ' + line for line in str(self.location).splitlines()])] except ValueError: str_list += ['location : '] + {{endif}} + {{if 'CUmemPoolProps_st.win32SecurityAttributes' in found_struct}} try: str_list += ['win32SecurityAttributes : ' + hex(self.win32SecurityAttributes)] except ValueError: str_list += ['win32SecurityAttributes : '] + {{endif}} + {{if 'CUmemPoolProps_st.maxSize' in found_struct}} try: str_list += ['maxSize : ' + str(self.maxSize)] except ValueError: str_list += ['maxSize : '] + {{endif}} + {{if 'CUmemPoolProps_st.usage' in found_struct}} try: str_list += ['usage : ' + str(self.usage)] except ValueError: str_list += ['usage : '] + {{endif}} + {{if 'CUmemPoolProps_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUmemPoolProps_st.allocType' in found_struct}} @property def allocType(self): - return CUmemAllocationType(self._ptr[0].allocType) + return CUmemAllocationType(self._pvt_ptr[0].allocType) @allocType.setter def allocType(self, allocType not None : CUmemAllocationType): - self._ptr[0].allocType = allocType.value + self._pvt_ptr[0].allocType = allocType.value + {{endif}} + {{if 'CUmemPoolProps_st.handleTypes' in found_struct}} @property def handleTypes(self): - return CUmemAllocationHandleType(self._ptr[0].handleTypes) + return CUmemAllocationHandleType(self._pvt_ptr[0].handleTypes) @handleTypes.setter def handleTypes(self, handleTypes not None : CUmemAllocationHandleType): - self._ptr[0].handleTypes = handleTypes.value + self._pvt_ptr[0].handleTypes = handleTypes.value + {{endif}} + {{if 'CUmemPoolProps_st.location' in found_struct}} @property def location(self): return self._location @location.setter def location(self, location not None : CUmemLocation): - string.memcpy(&self._ptr[0].location, location.getPtr(), sizeof(self._ptr[0].location)) + string.memcpy(&self._pvt_ptr[0].location, location.getPtr(), sizeof(self._pvt_ptr[0].location)) + {{endif}} + {{if 'CUmemPoolProps_st.win32SecurityAttributes' in found_struct}} @property def win32SecurityAttributes(self): - return self._ptr[0].win32SecurityAttributes + return self._pvt_ptr[0].win32SecurityAttributes @win32SecurityAttributes.setter def win32SecurityAttributes(self, win32SecurityAttributes): - _cywin32SecurityAttributes = utils.HelperInputVoidPtr(win32SecurityAttributes) - self._ptr[0].win32SecurityAttributes = _cywin32SecurityAttributes.cptr + _cwin32SecurityAttributes = utils.HelperInputVoidPtr(win32SecurityAttributes) + self._pvt_ptr[0].win32SecurityAttributes = _cwin32SecurityAttributes.cptr + {{endif}} + {{if 'CUmemPoolProps_st.maxSize' in found_struct}} @property def maxSize(self): - return self._ptr[0].maxSize + return self._pvt_ptr[0].maxSize @maxSize.setter def maxSize(self, size_t maxSize): - self._ptr[0].maxSize = maxSize + self._pvt_ptr[0].maxSize = maxSize + {{endif}} + {{if 'CUmemPoolProps_st.usage' in found_struct}} @property def usage(self): - return self._ptr[0].usage + return self._pvt_ptr[0].usage @usage.setter def usage(self, unsigned short usage): - self._ptr[0].usage = usage + self._pvt_ptr[0].usage = usage + {{endif}} + {{if 'CUmemPoolProps_st.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].reserved, 54) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 54) @reserved.setter def reserved(self, reserved): if len(reserved) != 54: raise ValueError("reserved length must be 54, is " + str(len(reserved))) for i, b in enumerate(reserved): - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b + {{endif}} {{endif}} -{{if 'struct CUmemPoolPtrExportData_st' in found_types}} +{{if 'CUmemPoolPtrExportData_st' in found_struct}} cdef class CUmemPoolPtrExportData_st: """ @@ -15934,47 +19201,52 @@ cdef class CUmemPoolPtrExportData_st: Attributes ---------- + {{if 'CUmemPoolPtrExportData_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUmemPoolPtrExportData_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUmemPoolPtrExportData_st.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) @reserved.setter def reserved(self, reserved): if len(reserved) != 64: raise ValueError("reserved length must be 64, is " + str(len(reserved))) for i, b in enumerate(reserved): - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b + {{endif}} {{endif}} -{{if 'struct CUDA_MEM_ALLOC_NODE_PARAMS_v1_st' in found_types}} +{{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st' in found_struct}} cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: """ @@ -15982,82 +19254,112 @@ cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: Attributes ---------- + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.poolProps' in found_struct}} poolProps : CUmemPoolProps in: location where the allocation should reside (specified in ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is not supported. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescs' in found_struct}} accessDescs : CUmemAccessDesc in: array of memory access descriptors. Used to describe peer GPU access + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescCount' in found_struct}} accessDescCount : size_t in: number of memory access descriptors. Must not exceed the number of GPUs. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.bytesize' in found_struct}} bytesize : size_t in: size in bytes of the requested allocation + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.dptr' in found_struct}} dptr : CUdeviceptr out: address of the allocation returned by CUDA + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._poolProps = CUmemPoolProps(_ptr=&self._ptr[0].poolProps) - self._dptr = CUdeviceptr(_ptr=&self._ptr[0].dptr) + pass + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.poolProps' in found_struct}} + self._poolProps = CUmemPoolProps(_ptr=&self._pvt_ptr[0].poolProps) + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.dptr' in found_struct}} + self._dptr = CUdeviceptr(_ptr=&self._pvt_ptr[0].dptr) + {{endif}} def __dealloc__(self): + pass + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescs' in found_struct}} if self._accessDescs is not NULL: free(self._accessDescs) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.poolProps' in found_struct}} try: str_list += ['poolProps :\n' + '\n'.join([' ' + line for line in str(self.poolProps).splitlines()])] except ValueError: str_list += ['poolProps : '] + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescs' in found_struct}} try: str_list += ['accessDescs : ' + str(self.accessDescs)] except ValueError: str_list += ['accessDescs : '] + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescCount' in found_struct}} try: str_list += ['accessDescCount : ' + str(self.accessDescCount)] except ValueError: str_list += ['accessDescCount : '] + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.bytesize' in found_struct}} try: str_list += ['bytesize : ' + str(self.bytesize)] except ValueError: str_list += ['bytesize : '] + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.dptr' in found_struct}} try: str_list += ['dptr : ' + str(self.dptr)] except ValueError: str_list += ['dptr : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.poolProps' in found_struct}} @property def poolProps(self): return self._poolProps @poolProps.setter def poolProps(self, poolProps not None : CUmemPoolProps): - string.memcpy(&self._ptr[0].poolProps, poolProps.getPtr(), sizeof(self._ptr[0].poolProps)) + string.memcpy(&self._pvt_ptr[0].poolProps, poolProps.getPtr(), sizeof(self._pvt_ptr[0].poolProps)) + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescs' in found_struct}} @property def accessDescs(self): - arrs = [self._ptr[0].accessDescs + x*sizeof(cydriver.CUmemAccessDesc) for x in range(self._accessDescs_length)] + arrs = [self._pvt_ptr[0].accessDescs + x*sizeof(cydriver.CUmemAccessDesc) for x in range(self._accessDescs_length)] return [CUmemAccessDesc(_ptr=arr) for arr in arrs] @accessDescs.setter def accessDescs(self, val): if len(val) == 0: free(self._accessDescs) self._accessDescs_length = 0 - self._ptr[0].accessDescs = NULL + self._pvt_ptr[0].accessDescs = NULL else: if self._accessDescs_length != len(val): free(self._accessDescs) @@ -16065,22 +19367,28 @@ cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: if self._accessDescs is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUmemAccessDesc))) self._accessDescs_length = len(val) - self._ptr[0].accessDescs = self._accessDescs + self._pvt_ptr[0].accessDescs = self._accessDescs for idx in range(len(val)): - string.memcpy(&self._accessDescs[idx], (val[idx])._ptr, sizeof(cydriver.CUmemAccessDesc)) + string.memcpy(&self._accessDescs[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUmemAccessDesc)) + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.accessDescCount' in found_struct}} @property def accessDescCount(self): - return self._ptr[0].accessDescCount + return self._pvt_ptr[0].accessDescCount @accessDescCount.setter def accessDescCount(self, size_t accessDescCount): - self._ptr[0].accessDescCount = accessDescCount + self._pvt_ptr[0].accessDescCount = accessDescCount + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.bytesize' in found_struct}} @property def bytesize(self): - return self._ptr[0].bytesize + return self._pvt_ptr[0].bytesize @bytesize.setter def bytesize(self, size_t bytesize): - self._ptr[0].bytesize = bytesize + self._pvt_ptr[0].bytesize = bytesize + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st.dptr' in found_struct}} @property def dptr(self): return self._dptr @@ -16095,10 +19403,11 @@ cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: else: pdptr = int(CUdeviceptr(dptr)) cydptr = pdptr - self._dptr._ptr[0] = cydptr + self._dptr._pvt_ptr[0] = cydptr + {{endif}} {{endif}} -{{if 'struct CUDA_MEM_ALLOC_NODE_PARAMS_v2_st' in found_types}} +{{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st' in found_struct}} cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: """ @@ -16106,82 +19415,112 @@ cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: Attributes ---------- + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.poolProps' in found_struct}} poolProps : CUmemPoolProps in: location where the allocation should reside (specified in ::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is not supported. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescs' in found_struct}} accessDescs : CUmemAccessDesc in: array of memory access descriptors. Used to describe peer GPU access + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescCount' in found_struct}} accessDescCount : size_t in: number of memory access descriptors. Must not exceed the number of GPUs. + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.bytesize' in found_struct}} bytesize : size_t in: size in bytes of the requested allocation + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.dptr' in found_struct}} dptr : CUdeviceptr out: address of the allocation returned by CUDA + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._poolProps = CUmemPoolProps(_ptr=&self._ptr[0].poolProps) - self._dptr = CUdeviceptr(_ptr=&self._ptr[0].dptr) + pass + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.poolProps' in found_struct}} + self._poolProps = CUmemPoolProps(_ptr=&self._pvt_ptr[0].poolProps) + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.dptr' in found_struct}} + self._dptr = CUdeviceptr(_ptr=&self._pvt_ptr[0].dptr) + {{endif}} def __dealloc__(self): + pass + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescs' in found_struct}} if self._accessDescs is not NULL: free(self._accessDescs) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.poolProps' in found_struct}} try: str_list += ['poolProps :\n' + '\n'.join([' ' + line for line in str(self.poolProps).splitlines()])] except ValueError: str_list += ['poolProps : '] + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescs' in found_struct}} try: str_list += ['accessDescs : ' + str(self.accessDescs)] except ValueError: str_list += ['accessDescs : '] + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescCount' in found_struct}} try: str_list += ['accessDescCount : ' + str(self.accessDescCount)] except ValueError: str_list += ['accessDescCount : '] + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.bytesize' in found_struct}} try: str_list += ['bytesize : ' + str(self.bytesize)] except ValueError: str_list += ['bytesize : '] + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.dptr' in found_struct}} try: str_list += ['dptr : ' + str(self.dptr)] except ValueError: str_list += ['dptr : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.poolProps' in found_struct}} @property def poolProps(self): return self._poolProps @poolProps.setter def poolProps(self, poolProps not None : CUmemPoolProps): - string.memcpy(&self._ptr[0].poolProps, poolProps.getPtr(), sizeof(self._ptr[0].poolProps)) + string.memcpy(&self._pvt_ptr[0].poolProps, poolProps.getPtr(), sizeof(self._pvt_ptr[0].poolProps)) + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescs' in found_struct}} @property def accessDescs(self): - arrs = [self._ptr[0].accessDescs + x*sizeof(cydriver.CUmemAccessDesc) for x in range(self._accessDescs_length)] + arrs = [self._pvt_ptr[0].accessDescs + x*sizeof(cydriver.CUmemAccessDesc) for x in range(self._accessDescs_length)] return [CUmemAccessDesc(_ptr=arr) for arr in arrs] @accessDescs.setter def accessDescs(self, val): if len(val) == 0: free(self._accessDescs) self._accessDescs_length = 0 - self._ptr[0].accessDescs = NULL + self._pvt_ptr[0].accessDescs = NULL else: if self._accessDescs_length != len(val): free(self._accessDescs) @@ -16189,22 +19528,28 @@ cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: if self._accessDescs is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUmemAccessDesc))) self._accessDescs_length = len(val) - self._ptr[0].accessDescs = self._accessDescs + self._pvt_ptr[0].accessDescs = self._accessDescs for idx in range(len(val)): - string.memcpy(&self._accessDescs[idx], (val[idx])._ptr, sizeof(cydriver.CUmemAccessDesc)) + string.memcpy(&self._accessDescs[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUmemAccessDesc)) + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.accessDescCount' in found_struct}} @property def accessDescCount(self): - return self._ptr[0].accessDescCount + return self._pvt_ptr[0].accessDescCount @accessDescCount.setter def accessDescCount(self, size_t accessDescCount): - self._ptr[0].accessDescCount = accessDescCount + self._pvt_ptr[0].accessDescCount = accessDescCount + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.bytesize' in found_struct}} @property def bytesize(self): - return self._ptr[0].bytesize + return self._pvt_ptr[0].bytesize @bytesize.setter def bytesize(self, size_t bytesize): - self._ptr[0].bytesize = bytesize + self._pvt_ptr[0].bytesize = bytesize + {{endif}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st.dptr' in found_struct}} @property def dptr(self): return self._dptr @@ -16219,10 +19564,11 @@ cdef class CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: else: pdptr = int(CUdeviceptr(dptr)) cydptr = pdptr - self._dptr._ptr[0] = cydptr + self._dptr._pvt_ptr[0] = cydptr + {{endif}} {{endif}} -{{if 'struct CUDA_MEM_FREE_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_MEM_FREE_NODE_PARAMS_st' in found_struct}} cdef class CUDA_MEM_FREE_NODE_PARAMS_st: """ @@ -16230,36 +19576,43 @@ cdef class CUDA_MEM_FREE_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_MEM_FREE_NODE_PARAMS_st.dptr' in found_struct}} dptr : CUdeviceptr in: the pointer to free + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._dptr = CUdeviceptr(_ptr=&self._ptr[0].dptr) + pass + {{if 'CUDA_MEM_FREE_NODE_PARAMS_st.dptr' in found_struct}} + self._dptr = CUdeviceptr(_ptr=&self._pvt_ptr[0].dptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_MEM_FREE_NODE_PARAMS_st.dptr' in found_struct}} try: str_list += ['dptr : ' + str(self.dptr)] except ValueError: str_list += ['dptr : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_MEM_FREE_NODE_PARAMS_st.dptr' in found_struct}} @property def dptr(self): return self._dptr @@ -16274,10 +19627,11 @@ cdef class CUDA_MEM_FREE_NODE_PARAMS_st: else: pdptr = int(CUdeviceptr(dptr)) cydptr = pdptr - self._dptr._ptr[0] = cydptr + self._dptr._pvt_ptr[0] = cydptr + {{endif}} {{endif}} -{{if 'struct CUDA_CHILD_GRAPH_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_CHILD_GRAPH_NODE_PARAMS_st' in found_struct}} cdef class CUDA_CHILD_GRAPH_NODE_PARAMS_st: """ @@ -16285,37 +19639,44 @@ cdef class CUDA_CHILD_GRAPH_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_CHILD_GRAPH_NODE_PARAMS_st.graph' in found_struct}} graph : CUgraph The child graph to clone into the node for node creation, or a handle to the graph owned by the node for node query + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._graph = CUgraph(_ptr=&self._ptr[0].graph) + pass + {{if 'CUDA_CHILD_GRAPH_NODE_PARAMS_st.graph' in found_struct}} + self._graph = CUgraph(_ptr=&self._pvt_ptr[0].graph) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_CHILD_GRAPH_NODE_PARAMS_st.graph' in found_struct}} try: str_list += ['graph : ' + str(self.graph)] except ValueError: str_list += ['graph : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_CHILD_GRAPH_NODE_PARAMS_st.graph' in found_struct}} @property def graph(self): return self._graph @@ -16330,9 +19691,10 @@ cdef class CUDA_CHILD_GRAPH_NODE_PARAMS_st: else: pgraph = int(CUgraph(graph)) cygraph = pgraph - self._graph._ptr[0] = cygraph + self._graph._pvt_ptr[0] = cygraph + {{endif}} {{endif}} -{{if 'struct CUDA_EVENT_RECORD_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_EVENT_RECORD_NODE_PARAMS_st' in found_struct}} cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: """ @@ -16340,36 +19702,43 @@ cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_EVENT_RECORD_NODE_PARAMS_st.event' in found_struct}} event : CUevent The event to record when the node executes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._event = CUevent(_ptr=&self._ptr[0].event) + pass + {{if 'CUDA_EVENT_RECORD_NODE_PARAMS_st.event' in found_struct}} + self._event = CUevent(_ptr=&self._pvt_ptr[0].event) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EVENT_RECORD_NODE_PARAMS_st.event' in found_struct}} try: str_list += ['event : ' + str(self.event)] except ValueError: str_list += ['event : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EVENT_RECORD_NODE_PARAMS_st.event' in found_struct}} @property def event(self): return self._event @@ -16384,9 +19753,10 @@ cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: else: pevent = int(CUevent(event)) cyevent = pevent - self._event._ptr[0] = cyevent + self._event._pvt_ptr[0] = cyevent + {{endif}} {{endif}} -{{if 'struct CUDA_EVENT_WAIT_NODE_PARAMS_st' in found_types}} +{{if 'CUDA_EVENT_WAIT_NODE_PARAMS_st' in found_struct}} cdef class CUDA_EVENT_WAIT_NODE_PARAMS_st: """ @@ -16394,36 +19764,43 @@ cdef class CUDA_EVENT_WAIT_NODE_PARAMS_st: Attributes ---------- + {{if 'CUDA_EVENT_WAIT_NODE_PARAMS_st.event' in found_struct}} event : CUevent The event to wait on from the node + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._event = CUevent(_ptr=&self._ptr[0].event) + pass + {{if 'CUDA_EVENT_WAIT_NODE_PARAMS_st.event' in found_struct}} + self._event = CUevent(_ptr=&self._pvt_ptr[0].event) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUDA_EVENT_WAIT_NODE_PARAMS_st.event' in found_struct}} try: str_list += ['event : ' + str(self.event)] except ValueError: str_list += ['event : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUDA_EVENT_WAIT_NODE_PARAMS_st.event' in found_struct}} @property def event(self): return self._event @@ -16438,9 +19815,10 @@ cdef class CUDA_EVENT_WAIT_NODE_PARAMS_st: else: pevent = int(CUevent(event)) cyevent = pevent - self._event._ptr[0] = cyevent + self._event._pvt_ptr[0] = cyevent + {{endif}} {{endif}} -{{if 'struct CUgraphNodeParams_st' in found_types}} +{{if 'CUgraphNodeParams_st' in found_struct}} cdef class CUgraphNodeParams_st: """ @@ -16448,441 +19826,1776 @@ cdef class CUgraphNodeParams_st: Attributes ---------- + {{if 'CUgraphNodeParams_st.type' in found_struct}} type : CUgraphNodeType Type of the node + {{endif}} + {{if 'CUgraphNodeParams_st.reserved0' in found_struct}} reserved0 : List[int] Reserved. Must be zero. + {{endif}} + {{if 'CUgraphNodeParams_st.reserved1' in found_struct}} reserved1 : List[long long] Padding. Unused bytes must be zero. + {{endif}} + {{if 'CUgraphNodeParams_st.kernel' in found_struct}} kernel : CUDA_KERNEL_NODE_PARAMS_v3 Kernel node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.memcpy' in found_struct}} memcpy : CUDA_MEMCPY_NODE_PARAMS Memcpy node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.memset' in found_struct}} memset : CUDA_MEMSET_NODE_PARAMS_v2 Memset node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.host' in found_struct}} host : CUDA_HOST_NODE_PARAMS_v2 Host node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.graph' in found_struct}} graph : CUDA_CHILD_GRAPH_NODE_PARAMS Child graph node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.eventWait' in found_struct}} eventWait : CUDA_EVENT_WAIT_NODE_PARAMS Event wait node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.eventRecord' in found_struct}} eventRecord : CUDA_EVENT_RECORD_NODE_PARAMS Event record node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.extSemSignal' in found_struct}} extSemSignal : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 External semaphore signal node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.extSemWait' in found_struct}} extSemWait : CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 External semaphore wait node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.alloc' in found_struct}} alloc : CUDA_MEM_ALLOC_NODE_PARAMS_v2 Memory allocation node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.free' in found_struct}} free : CUDA_MEM_FREE_NODE_PARAMS Memory free node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.memOp' in found_struct}} memOp : CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 MemOp node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.conditional' in found_struct}} conditional : CUDA_CONDITIONAL_NODE_PARAMS Conditional node parameters. + {{endif}} + {{if 'CUgraphNodeParams_st.reserved2' in found_struct}} reserved2 : long long Reserved bytes. Must be zero. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cydriver.CUgraphNodeParams_st)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._kernel = CUDA_KERNEL_NODE_PARAMS_v3(_ptr=&self._ptr[0].kernel) - self._memcpy = CUDA_MEMCPY_NODE_PARAMS(_ptr=&self._ptr[0].memcpy) - self._memset = CUDA_MEMSET_NODE_PARAMS_v2(_ptr=&self._ptr[0].memset) - self._host = CUDA_HOST_NODE_PARAMS_v2(_ptr=&self._ptr[0].host) - self._graph = CUDA_CHILD_GRAPH_NODE_PARAMS(_ptr=&self._ptr[0].graph) - self._eventWait = CUDA_EVENT_WAIT_NODE_PARAMS(_ptr=&self._ptr[0].eventWait) - self._eventRecord = CUDA_EVENT_RECORD_NODE_PARAMS(_ptr=&self._ptr[0].eventRecord) - self._extSemSignal = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2(_ptr=&self._ptr[0].extSemSignal) - self._extSemWait = CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2(_ptr=&self._ptr[0].extSemWait) - self._alloc = CUDA_MEM_ALLOC_NODE_PARAMS_v2(_ptr=&self._ptr[0].alloc) - self._free = CUDA_MEM_FREE_NODE_PARAMS(_ptr=&self._ptr[0].free) - self._memOp = CUDA_BATCH_MEM_OP_NODE_PARAMS_v2(_ptr=&self._ptr[0].memOp) - self._conditional = CUDA_CONDITIONAL_NODE_PARAMS(_ptr=&self._ptr[0].conditional) + pass + {{if 'CUgraphNodeParams_st.kernel' in found_struct}} + self._kernel = CUDA_KERNEL_NODE_PARAMS_v3(_ptr=&self._pvt_ptr[0].kernel) + {{endif}} + {{if 'CUgraphNodeParams_st.memcpy' in found_struct}} + self._memcpy = CUDA_MEMCPY_NODE_PARAMS(_ptr=&self._pvt_ptr[0].memcpy) + {{endif}} + {{if 'CUgraphNodeParams_st.memset' in found_struct}} + self._memset = CUDA_MEMSET_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].memset) + {{endif}} + {{if 'CUgraphNodeParams_st.host' in found_struct}} + self._host = CUDA_HOST_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].host) + {{endif}} + {{if 'CUgraphNodeParams_st.graph' in found_struct}} + self._graph = CUDA_CHILD_GRAPH_NODE_PARAMS(_ptr=&self._pvt_ptr[0].graph) + {{endif}} + {{if 'CUgraphNodeParams_st.eventWait' in found_struct}} + self._eventWait = CUDA_EVENT_WAIT_NODE_PARAMS(_ptr=&self._pvt_ptr[0].eventWait) + {{endif}} + {{if 'CUgraphNodeParams_st.eventRecord' in found_struct}} + self._eventRecord = CUDA_EVENT_RECORD_NODE_PARAMS(_ptr=&self._pvt_ptr[0].eventRecord) + {{endif}} + {{if 'CUgraphNodeParams_st.extSemSignal' in found_struct}} + self._extSemSignal = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].extSemSignal) + {{endif}} + {{if 'CUgraphNodeParams_st.extSemWait' in found_struct}} + self._extSemWait = CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].extSemWait) + {{endif}} + {{if 'CUgraphNodeParams_st.alloc' in found_struct}} + self._alloc = CUDA_MEM_ALLOC_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].alloc) + {{endif}} + {{if 'CUgraphNodeParams_st.free' in found_struct}} + self._free = CUDA_MEM_FREE_NODE_PARAMS(_ptr=&self._pvt_ptr[0].free) + {{endif}} + {{if 'CUgraphNodeParams_st.memOp' in found_struct}} + self._memOp = CUDA_BATCH_MEM_OP_NODE_PARAMS_v2(_ptr=&self._pvt_ptr[0].memOp) + {{endif}} + {{if 'CUgraphNodeParams_st.conditional' in found_struct}} + self._conditional = CUDA_CONDITIONAL_NODE_PARAMS(_ptr=&self._pvt_ptr[0].conditional) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUgraphNodeParams_st.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'CUgraphNodeParams_st.reserved0' in found_struct}} try: str_list += ['reserved0 : ' + str(self.reserved0)] except ValueError: str_list += ['reserved0 : '] + {{endif}} + {{if 'CUgraphNodeParams_st.reserved1' in found_struct}} try: str_list += ['reserved1 : ' + str(self.reserved1)] except ValueError: str_list += ['reserved1 : '] + {{endif}} + {{if 'CUgraphNodeParams_st.kernel' in found_struct}} try: str_list += ['kernel :\n' + '\n'.join([' ' + line for line in str(self.kernel).splitlines()])] except ValueError: str_list += ['kernel : '] + {{endif}} + {{if 'CUgraphNodeParams_st.memcpy' in found_struct}} try: str_list += ['memcpy :\n' + '\n'.join([' ' + line for line in str(self.memcpy).splitlines()])] except ValueError: str_list += ['memcpy : '] + {{endif}} + {{if 'CUgraphNodeParams_st.memset' in found_struct}} try: str_list += ['memset :\n' + '\n'.join([' ' + line for line in str(self.memset).splitlines()])] except ValueError: str_list += ['memset : '] + {{endif}} + {{if 'CUgraphNodeParams_st.host' in found_struct}} try: str_list += ['host :\n' + '\n'.join([' ' + line for line in str(self.host).splitlines()])] except ValueError: str_list += ['host : '] + {{endif}} + {{if 'CUgraphNodeParams_st.graph' in found_struct}} try: str_list += ['graph :\n' + '\n'.join([' ' + line for line in str(self.graph).splitlines()])] except ValueError: str_list += ['graph : '] + {{endif}} + {{if 'CUgraphNodeParams_st.eventWait' in found_struct}} try: str_list += ['eventWait :\n' + '\n'.join([' ' + line for line in str(self.eventWait).splitlines()])] except ValueError: str_list += ['eventWait : '] + {{endif}} + {{if 'CUgraphNodeParams_st.eventRecord' in found_struct}} try: str_list += ['eventRecord :\n' + '\n'.join([' ' + line for line in str(self.eventRecord).splitlines()])] except ValueError: str_list += ['eventRecord : '] + {{endif}} + {{if 'CUgraphNodeParams_st.extSemSignal' in found_struct}} try: str_list += ['extSemSignal :\n' + '\n'.join([' ' + line for line in str(self.extSemSignal).splitlines()])] except ValueError: str_list += ['extSemSignal : '] + {{endif}} + {{if 'CUgraphNodeParams_st.extSemWait' in found_struct}} try: str_list += ['extSemWait :\n' + '\n'.join([' ' + line for line in str(self.extSemWait).splitlines()])] except ValueError: str_list += ['extSemWait : '] + {{endif}} + {{if 'CUgraphNodeParams_st.alloc' in found_struct}} try: str_list += ['alloc :\n' + '\n'.join([' ' + line for line in str(self.alloc).splitlines()])] except ValueError: str_list += ['alloc : '] + {{endif}} + {{if 'CUgraphNodeParams_st.free' in found_struct}} try: str_list += ['free :\n' + '\n'.join([' ' + line for line in str(self.free).splitlines()])] except ValueError: str_list += ['free : '] + {{endif}} + {{if 'CUgraphNodeParams_st.memOp' in found_struct}} try: str_list += ['memOp :\n' + '\n'.join([' ' + line for line in str(self.memOp).splitlines()])] except ValueError: str_list += ['memOp : '] + {{endif}} + {{if 'CUgraphNodeParams_st.conditional' in found_struct}} try: str_list += ['conditional :\n' + '\n'.join([' ' + line for line in str(self.conditional).splitlines()])] except ValueError: str_list += ['conditional : '] + {{endif}} + {{if 'CUgraphNodeParams_st.reserved2' in found_struct}} try: str_list += ['reserved2 : ' + str(self.reserved2)] except ValueError: str_list += ['reserved2 : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUgraphNodeParams_st.type' in found_struct}} @property def type(self): - return CUgraphNodeType(self._ptr[0].type) + return CUgraphNodeType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUgraphNodeType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'CUgraphNodeParams_st.reserved0' in found_struct}} @property def reserved0(self): - return self._ptr[0].reserved0 + return self._pvt_ptr[0].reserved0 @reserved0.setter def reserved0(self, reserved0): - self._ptr[0].reserved0 = reserved0 + self._pvt_ptr[0].reserved0 = reserved0 + {{endif}} + {{if 'CUgraphNodeParams_st.reserved1' in found_struct}} @property def reserved1(self): - return self._ptr[0].reserved1 + return self._pvt_ptr[0].reserved1 @reserved1.setter def reserved1(self, reserved1): - self._ptr[0].reserved1 = reserved1 + self._pvt_ptr[0].reserved1 = reserved1 + {{endif}} + {{if 'CUgraphNodeParams_st.kernel' in found_struct}} @property def kernel(self): return self._kernel @kernel.setter def kernel(self, kernel not None : CUDA_KERNEL_NODE_PARAMS_v3): - string.memcpy(&self._ptr[0].kernel, kernel.getPtr(), sizeof(self._ptr[0].kernel)) + string.memcpy(&self._pvt_ptr[0].kernel, kernel.getPtr(), sizeof(self._pvt_ptr[0].kernel)) + {{endif}} + {{if 'CUgraphNodeParams_st.memcpy' in found_struct}} @property def memcpy(self): return self._memcpy @memcpy.setter def memcpy(self, memcpy not None : CUDA_MEMCPY_NODE_PARAMS): - string.memcpy(&self._ptr[0].memcpy, memcpy.getPtr(), sizeof(self._ptr[0].memcpy)) + string.memcpy(&self._pvt_ptr[0].memcpy, memcpy.getPtr(), sizeof(self._pvt_ptr[0].memcpy)) + {{endif}} + {{if 'CUgraphNodeParams_st.memset' in found_struct}} @property def memset(self): return self._memset @memset.setter def memset(self, memset not None : CUDA_MEMSET_NODE_PARAMS_v2): - string.memcpy(&self._ptr[0].memset, memset.getPtr(), sizeof(self._ptr[0].memset)) + string.memcpy(&self._pvt_ptr[0].memset, memset.getPtr(), sizeof(self._pvt_ptr[0].memset)) + {{endif}} + {{if 'CUgraphNodeParams_st.host' in found_struct}} @property def host(self): return self._host @host.setter def host(self, host not None : CUDA_HOST_NODE_PARAMS_v2): - string.memcpy(&self._ptr[0].host, host.getPtr(), sizeof(self._ptr[0].host)) + string.memcpy(&self._pvt_ptr[0].host, host.getPtr(), sizeof(self._pvt_ptr[0].host)) + {{endif}} + {{if 'CUgraphNodeParams_st.graph' in found_struct}} @property def graph(self): return self._graph @graph.setter def graph(self, graph not None : CUDA_CHILD_GRAPH_NODE_PARAMS): - string.memcpy(&self._ptr[0].graph, graph.getPtr(), sizeof(self._ptr[0].graph)) + string.memcpy(&self._pvt_ptr[0].graph, graph.getPtr(), sizeof(self._pvt_ptr[0].graph)) + {{endif}} + {{if 'CUgraphNodeParams_st.eventWait' in found_struct}} @property def eventWait(self): return self._eventWait @eventWait.setter def eventWait(self, eventWait not None : CUDA_EVENT_WAIT_NODE_PARAMS): - string.memcpy(&self._ptr[0].eventWait, eventWait.getPtr(), sizeof(self._ptr[0].eventWait)) + string.memcpy(&self._pvt_ptr[0].eventWait, eventWait.getPtr(), sizeof(self._pvt_ptr[0].eventWait)) + {{endif}} + {{if 'CUgraphNodeParams_st.eventRecord' in found_struct}} @property def eventRecord(self): return self._eventRecord @eventRecord.setter def eventRecord(self, eventRecord not None : CUDA_EVENT_RECORD_NODE_PARAMS): - string.memcpy(&self._ptr[0].eventRecord, eventRecord.getPtr(), sizeof(self._ptr[0].eventRecord)) + string.memcpy(&self._pvt_ptr[0].eventRecord, eventRecord.getPtr(), sizeof(self._pvt_ptr[0].eventRecord)) + {{endif}} + {{if 'CUgraphNodeParams_st.extSemSignal' in found_struct}} @property def extSemSignal(self): return self._extSemSignal @extSemSignal.setter def extSemSignal(self, extSemSignal not None : CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2): - string.memcpy(&self._ptr[0].extSemSignal, extSemSignal.getPtr(), sizeof(self._ptr[0].extSemSignal)) + string.memcpy(&self._pvt_ptr[0].extSemSignal, extSemSignal.getPtr(), sizeof(self._pvt_ptr[0].extSemSignal)) + {{endif}} + {{if 'CUgraphNodeParams_st.extSemWait' in found_struct}} @property def extSemWait(self): return self._extSemWait @extSemWait.setter def extSemWait(self, extSemWait not None : CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2): - string.memcpy(&self._ptr[0].extSemWait, extSemWait.getPtr(), sizeof(self._ptr[0].extSemWait)) + string.memcpy(&self._pvt_ptr[0].extSemWait, extSemWait.getPtr(), sizeof(self._pvt_ptr[0].extSemWait)) + {{endif}} + {{if 'CUgraphNodeParams_st.alloc' in found_struct}} @property def alloc(self): return self._alloc @alloc.setter def alloc(self, alloc not None : CUDA_MEM_ALLOC_NODE_PARAMS_v2): - string.memcpy(&self._ptr[0].alloc, alloc.getPtr(), sizeof(self._ptr[0].alloc)) + string.memcpy(&self._pvt_ptr[0].alloc, alloc.getPtr(), sizeof(self._pvt_ptr[0].alloc)) + {{endif}} + {{if 'CUgraphNodeParams_st.free' in found_struct}} @property def free(self): return self._free @free.setter def free(self, free not None : CUDA_MEM_FREE_NODE_PARAMS): - string.memcpy(&self._ptr[0].free, free.getPtr(), sizeof(self._ptr[0].free)) + string.memcpy(&self._pvt_ptr[0].free, free.getPtr(), sizeof(self._pvt_ptr[0].free)) + {{endif}} + {{if 'CUgraphNodeParams_st.memOp' in found_struct}} @property def memOp(self): return self._memOp @memOp.setter def memOp(self, memOp not None : CUDA_BATCH_MEM_OP_NODE_PARAMS_v2): - string.memcpy(&self._ptr[0].memOp, memOp.getPtr(), sizeof(self._ptr[0].memOp)) + string.memcpy(&self._pvt_ptr[0].memOp, memOp.getPtr(), sizeof(self._pvt_ptr[0].memOp)) + {{endif}} + {{if 'CUgraphNodeParams_st.conditional' in found_struct}} @property def conditional(self): return self._conditional @conditional.setter def conditional(self, conditional not None : CUDA_CONDITIONAL_NODE_PARAMS): - string.memcpy(&self._ptr[0].conditional, conditional.getPtr(), sizeof(self._ptr[0].conditional)) + string.memcpy(&self._pvt_ptr[0].conditional, conditional.getPtr(), sizeof(self._pvt_ptr[0].conditional)) + {{endif}} + {{if 'CUgraphNodeParams_st.reserved2' in found_struct}} @property def reserved2(self): - return self._ptr[0].reserved2 + return self._pvt_ptr[0].reserved2 @reserved2.setter def reserved2(self, long long reserved2): - self._ptr[0].reserved2 = reserved2 + self._pvt_ptr[0].reserved2 = reserved2 + {{endif}} +{{endif}} +{{if 'CUcheckpointLockArgs_st' in found_struct}} + +cdef class CUcheckpointLockArgs_st: + """ + CUDA checkpoint optional lock arguments + + Attributes + ---------- + {{if 'CUcheckpointLockArgs_st.timeoutMs' in found_struct}} + timeoutMs : unsigned int + Timeout in milliseconds to attempt to lock the process, 0 indicates + no timeout + {{endif}} + {{if 'CUcheckpointLockArgs_st.reserved0' in found_struct}} + reserved0 : unsigned int + Reserved for future use, must be zero + {{endif}} + {{if 'CUcheckpointLockArgs_st.reserved1' in found_struct}} + reserved1 : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUcheckpointLockArgs_st.timeoutMs' in found_struct}} + try: + str_list += ['timeoutMs : ' + str(self.timeoutMs)] + except ValueError: + str_list += ['timeoutMs : '] + {{endif}} + {{if 'CUcheckpointLockArgs_st.reserved0' in found_struct}} + try: + str_list += ['reserved0 : ' + str(self.reserved0)] + except ValueError: + str_list += ['reserved0 : '] + {{endif}} + {{if 'CUcheckpointLockArgs_st.reserved1' in found_struct}} + try: + str_list += ['reserved1 : ' + str(self.reserved1)] + except ValueError: + str_list += ['reserved1 : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUcheckpointLockArgs_st.timeoutMs' in found_struct}} + @property + def timeoutMs(self): + return self._pvt_ptr[0].timeoutMs + @timeoutMs.setter + def timeoutMs(self, unsigned int timeoutMs): + self._pvt_ptr[0].timeoutMs = timeoutMs + {{endif}} + {{if 'CUcheckpointLockArgs_st.reserved0' in found_struct}} + @property + def reserved0(self): + return self._pvt_ptr[0].reserved0 + @reserved0.setter + def reserved0(self, unsigned int reserved0): + self._pvt_ptr[0].reserved0 = reserved0 + {{endif}} + {{if 'CUcheckpointLockArgs_st.reserved1' in found_struct}} + @property + def reserved1(self): + return [cuuint64_t(init_value=_reserved1) for _reserved1 in self._pvt_ptr[0].reserved1] + @reserved1.setter + def reserved1(self, reserved1): + self._pvt_ptr[0].reserved1 = reserved1 + + {{endif}} {{endif}} -{{if 'struct CUdevSmResource_st' in found_types}} +{{if 'CUcheckpointCheckpointArgs_st' in found_struct}} + +cdef class CUcheckpointCheckpointArgs_st: + """ + CUDA checkpoint optional checkpoint arguments + + Attributes + ---------- + {{if 'CUcheckpointCheckpointArgs_st.reserved' in found_struct}} + reserved : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUcheckpointCheckpointArgs_st.reserved' in found_struct}} + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUcheckpointCheckpointArgs_st.reserved' in found_struct}} + @property + def reserved(self): + return [cuuint64_t(init_value=_reserved) for _reserved in self._pvt_ptr[0].reserved] + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + + {{endif}} +{{endif}} +{{if 'CUcheckpointRestoreArgs_st' in found_struct}} + +cdef class CUcheckpointRestoreArgs_st: + """ + CUDA checkpoint optional restore arguments + + Attributes + ---------- + {{if 'CUcheckpointRestoreArgs_st.reserved' in found_struct}} + reserved : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUcheckpointRestoreArgs_st.reserved' in found_struct}} + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUcheckpointRestoreArgs_st.reserved' in found_struct}} + @property + def reserved(self): + return [cuuint64_t(init_value=_reserved) for _reserved in self._pvt_ptr[0].reserved] + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + + {{endif}} +{{endif}} +{{if 'CUcheckpointUnlockArgs_st' in found_struct}} + +cdef class CUcheckpointUnlockArgs_st: + """ + CUDA checkpoint optional unlock arguments + + Attributes + ---------- + {{if 'CUcheckpointUnlockArgs_st.reserved' in found_struct}} + reserved : List[cuuint64_t] + Reserved for future use, must be zeroed + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUcheckpointUnlockArgs_st.reserved' in found_struct}} + try: + str_list += ['reserved : ' + str(self.reserved)] + except ValueError: + str_list += ['reserved : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUcheckpointUnlockArgs_st.reserved' in found_struct}} + @property + def reserved(self): + return [cuuint64_t(init_value=_reserved) for _reserved in self._pvt_ptr[0].reserved] + @reserved.setter + def reserved(self, reserved): + self._pvt_ptr[0].reserved = reserved + + {{endif}} +{{endif}} +{{if 'CUmemcpyAttributes_st' in found_struct}} + +cdef class CUmemcpyAttributes_st: + """ + Attributes specific to copies within a batch. For more details on + usage see cuMemcpyBatchAsync. + + Attributes + ---------- + {{if 'CUmemcpyAttributes_st.srcAccessOrder' in found_struct}} + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + {{endif}} + {{if 'CUmemcpyAttributes_st.srcLocHint' in found_struct}} + srcLocHint : CUmemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'CUmemcpyAttributes_st.dstLocHint' in found_struct}} + dstLocHint : CUmemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'CUmemcpyAttributes_st.flags' in found_struct}} + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + {{if 'CUmemcpyAttributes_st.srcLocHint' in found_struct}} + self._srcLocHint = CUmemLocation(_ptr=&self._pvt_ptr[0].srcLocHint) + {{endif}} + {{if 'CUmemcpyAttributes_st.dstLocHint' in found_struct}} + self._dstLocHint = CUmemLocation(_ptr=&self._pvt_ptr[0].dstLocHint) + {{endif}} + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUmemcpyAttributes_st.srcAccessOrder' in found_struct}} + try: + str_list += ['srcAccessOrder : ' + str(self.srcAccessOrder)] + except ValueError: + str_list += ['srcAccessOrder : '] + {{endif}} + {{if 'CUmemcpyAttributes_st.srcLocHint' in found_struct}} + try: + str_list += ['srcLocHint :\n' + '\n'.join([' ' + line for line in str(self.srcLocHint).splitlines()])] + except ValueError: + str_list += ['srcLocHint : '] + {{endif}} + {{if 'CUmemcpyAttributes_st.dstLocHint' in found_struct}} + try: + str_list += ['dstLocHint :\n' + '\n'.join([' ' + line for line in str(self.dstLocHint).splitlines()])] + except ValueError: + str_list += ['dstLocHint : '] + {{endif}} + {{if 'CUmemcpyAttributes_st.flags' in found_struct}} + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUmemcpyAttributes_st.srcAccessOrder' in found_struct}} + @property + def srcAccessOrder(self): + return CUmemcpySrcAccessOrder(self._pvt_ptr[0].srcAccessOrder) + @srcAccessOrder.setter + def srcAccessOrder(self, srcAccessOrder not None : CUmemcpySrcAccessOrder): + self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + {{endif}} + {{if 'CUmemcpyAttributes_st.srcLocHint' in found_struct}} + @property + def srcLocHint(self): + return self._srcLocHint + @srcLocHint.setter + def srcLocHint(self, srcLocHint not None : CUmemLocation): + string.memcpy(&self._pvt_ptr[0].srcLocHint, srcLocHint.getPtr(), sizeof(self._pvt_ptr[0].srcLocHint)) + {{endif}} + {{if 'CUmemcpyAttributes_st.dstLocHint' in found_struct}} + @property + def dstLocHint(self): + return self._dstLocHint + @dstLocHint.setter + def dstLocHint(self, dstLocHint not None : CUmemLocation): + string.memcpy(&self._pvt_ptr[0].dstLocHint, dstLocHint.getPtr(), sizeof(self._pvt_ptr[0].dstLocHint)) + {{endif}} + {{if 'CUmemcpyAttributes_st.flags' in found_struct}} + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + {{endif}} +{{endif}} +{{if 'CUoffset3D_st' in found_struct}} + +cdef class CUoffset3D_st: + """ + Struct representing offset into a CUarray in elements + + Attributes + ---------- + {{if 'CUoffset3D_st.x' in found_struct}} + x : size_t + + {{endif}} + {{if 'CUoffset3D_st.y' in found_struct}} + y : size_t + + {{endif}} + {{if 'CUoffset3D_st.z' in found_struct}} + z : size_t + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUoffset3D_st.x' in found_struct}} + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + {{endif}} + {{if 'CUoffset3D_st.y' in found_struct}} + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + {{endif}} + {{if 'CUoffset3D_st.z' in found_struct}} + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUoffset3D_st.x' in found_struct}} + @property + def x(self): + return self._pvt_ptr[0].x + @x.setter + def x(self, size_t x): + self._pvt_ptr[0].x = x + {{endif}} + {{if 'CUoffset3D_st.y' in found_struct}} + @property + def y(self): + return self._pvt_ptr[0].y + @y.setter + def y(self, size_t y): + self._pvt_ptr[0].y = y + {{endif}} + {{if 'CUoffset3D_st.z' in found_struct}} + @property + def z(self): + return self._pvt_ptr[0].z + @z.setter + def z(self, size_t z): + self._pvt_ptr[0].z = z + {{endif}} +{{endif}} +{{if 'CUextent3D_st' in found_struct}} + +cdef class CUextent3D_st: + """ + Struct representing width/height/depth of a CUarray in elements + + Attributes + ---------- + {{if 'CUextent3D_st.width' in found_struct}} + width : size_t + + {{endif}} + {{if 'CUextent3D_st.height' in found_struct}} + height : size_t + + {{endif}} + {{if 'CUextent3D_st.depth' in found_struct}} + depth : size_t + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUextent3D_st.width' in found_struct}} + try: + str_list += ['width : ' + str(self.width)] + except ValueError: + str_list += ['width : '] + {{endif}} + {{if 'CUextent3D_st.height' in found_struct}} + try: + str_list += ['height : ' + str(self.height)] + except ValueError: + str_list += ['height : '] + {{endif}} + {{if 'CUextent3D_st.depth' in found_struct}} + try: + str_list += ['depth : ' + str(self.depth)] + except ValueError: + str_list += ['depth : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUextent3D_st.width' in found_struct}} + @property + def width(self): + return self._pvt_ptr[0].width + @width.setter + def width(self, size_t width): + self._pvt_ptr[0].width = width + {{endif}} + {{if 'CUextent3D_st.height' in found_struct}} + @property + def height(self): + return self._pvt_ptr[0].height + @height.setter + def height(self, size_t height): + self._pvt_ptr[0].height = height + {{endif}} + {{if 'CUextent3D_st.depth' in found_struct}} + @property + def depth(self): + return self._pvt_ptr[0].depth + @depth.setter + def depth(self, size_t depth): + self._pvt_ptr[0].depth = depth + {{endif}} +{{endif}} +{{if 'CUmemcpy3DOperand_st.op.ptr' in found_struct}} + +cdef class anon_struct23: + """ + Attributes + ---------- + {{if 'CUmemcpy3DOperand_st.op.ptr.ptr' in found_struct}} + ptr : CUdeviceptr + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.rowLength' in found_struct}} + rowLength : size_t + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.layerHeight' in found_struct}} + layerHeight : size_t + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.locHint' in found_struct}} + locHint : CUmemLocation + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + {{if 'CUmemcpy3DOperand_st.op.ptr.ptr' in found_struct}} + self._ptr = CUdeviceptr(_ptr=&self._pvt_ptr[0].op.ptr.ptr) + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.locHint' in found_struct}} + self._locHint = CUmemLocation(_ptr=&self._pvt_ptr[0].op.ptr.locHint) + {{endif}} + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op.ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUmemcpy3DOperand_st.op.ptr.ptr' in found_struct}} + try: + str_list += ['ptr : ' + str(self.ptr)] + except ValueError: + str_list += ['ptr : '] + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.rowLength' in found_struct}} + try: + str_list += ['rowLength : ' + str(self.rowLength)] + except ValueError: + str_list += ['rowLength : '] + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.layerHeight' in found_struct}} + try: + str_list += ['layerHeight : ' + str(self.layerHeight)] + except ValueError: + str_list += ['layerHeight : '] + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.locHint' in found_struct}} + try: + str_list += ['locHint :\n' + '\n'.join([' ' + line for line in str(self.locHint).splitlines()])] + except ValueError: + str_list += ['locHint : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUmemcpy3DOperand_st.op.ptr.ptr' in found_struct}} + @property + def ptr(self): + return self._ptr + @ptr.setter + def ptr(self, ptr): + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + cyptr = 0 + elif isinstance(ptr, (CUdeviceptr)): + pptr = int(ptr) + cyptr = pptr + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + self._ptr._pvt_ptr[0] = cyptr + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.rowLength' in found_struct}} + @property + def rowLength(self): + return self._pvt_ptr[0].op.ptr.rowLength + @rowLength.setter + def rowLength(self, size_t rowLength): + self._pvt_ptr[0].op.ptr.rowLength = rowLength + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.layerHeight' in found_struct}} + @property + def layerHeight(self): + return self._pvt_ptr[0].op.ptr.layerHeight + @layerHeight.setter + def layerHeight(self, size_t layerHeight): + self._pvt_ptr[0].op.ptr.layerHeight = layerHeight + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.ptr.locHint' in found_struct}} + @property + def locHint(self): + return self._locHint + @locHint.setter + def locHint(self, locHint not None : CUmemLocation): + string.memcpy(&self._pvt_ptr[0].op.ptr.locHint, locHint.getPtr(), sizeof(self._pvt_ptr[0].op.ptr.locHint)) + {{endif}} +{{endif}} +{{if 'CUmemcpy3DOperand_st.op.array' in found_struct}} + +cdef class anon_struct24: + """ + Attributes + ---------- + {{if 'CUmemcpy3DOperand_st.op.array.array' in found_struct}} + array : CUarray + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array.offset' in found_struct}} + offset : CUoffset3D + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + {{if 'CUmemcpy3DOperand_st.op.array.array' in found_struct}} + self._array = CUarray(_ptr=&self._pvt_ptr[0].op.array.array) + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array.offset' in found_struct}} + self._offset = CUoffset3D(_ptr=&self._pvt_ptr[0].op.array.offset) + {{endif}} + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op.array + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUmemcpy3DOperand_st.op.array.array' in found_struct}} + try: + str_list += ['array : ' + str(self.array)] + except ValueError: + str_list += ['array : '] + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array.offset' in found_struct}} + try: + str_list += ['offset :\n' + '\n'.join([' ' + line for line in str(self.offset).splitlines()])] + except ValueError: + str_list += ['offset : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUmemcpy3DOperand_st.op.array.array' in found_struct}} + @property + def array(self): + return self._array + @array.setter + def array(self, array): + cdef cydriver.CUarray cyarray + if array is None: + cyarray = 0 + elif isinstance(array, (CUarray,)): + parray = int(array) + cyarray = parray + else: + parray = int(CUarray(array)) + cyarray = parray + self._array._pvt_ptr[0] = cyarray + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array.offset' in found_struct}} + @property + def offset(self): + return self._offset + @offset.setter + def offset(self, offset not None : CUoffset3D): + string.memcpy(&self._pvt_ptr[0].op.array.offset, offset.getPtr(), sizeof(self._pvt_ptr[0].op.array.offset)) + {{endif}} +{{endif}} +{{if 'CUmemcpy3DOperand_st.op' in found_struct}} + +cdef class anon_union13: + """ + Attributes + ---------- + {{if 'CUmemcpy3DOperand_st.op.ptr' in found_struct}} + ptr : anon_struct23 + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array' in found_struct}} + array : anon_struct24 + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + {{if 'CUmemcpy3DOperand_st.op.ptr' in found_struct}} + self._ptr = anon_struct23(_ptr=self._pvt_ptr) + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array' in found_struct}} + self._array = anon_struct24(_ptr=self._pvt_ptr) + {{endif}} + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUmemcpy3DOperand_st.op.ptr' in found_struct}} + try: + str_list += ['ptr :\n' + '\n'.join([' ' + line for line in str(self.ptr).splitlines()])] + except ValueError: + str_list += ['ptr : '] + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array' in found_struct}} + try: + str_list += ['array :\n' + '\n'.join([' ' + line for line in str(self.array).splitlines()])] + except ValueError: + str_list += ['array : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUmemcpy3DOperand_st.op.ptr' in found_struct}} + @property + def ptr(self): + return self._ptr + @ptr.setter + def ptr(self, ptr not None : anon_struct23): + string.memcpy(&self._pvt_ptr[0].op.ptr, ptr.getPtr(), sizeof(self._pvt_ptr[0].op.ptr)) + {{endif}} + {{if 'CUmemcpy3DOperand_st.op.array' in found_struct}} + @property + def array(self): + return self._array + @array.setter + def array(self, array not None : anon_struct24): + string.memcpy(&self._pvt_ptr[0].op.array, array.getPtr(), sizeof(self._pvt_ptr[0].op.array)) + {{endif}} +{{endif}} +{{if 'CUmemcpy3DOperand_st' in found_struct}} + +cdef class CUmemcpy3DOperand_st: + """ + Struct representing an operand for copy with cuMemcpy3DBatchAsync + + Attributes + ---------- + {{if 'CUmemcpy3DOperand_st.type' in found_struct}} + type : CUmemcpy3DOperandType + + {{endif}} + {{if 'CUmemcpy3DOperand_st.op' in found_struct}} + op : anon_union13 + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cydriver.CUmemcpy3DOperand_st)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + {{if 'CUmemcpy3DOperand_st.op' in found_struct}} + self._op = anon_union13(_ptr=self._pvt_ptr) + {{endif}} + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUmemcpy3DOperand_st.type' in found_struct}} + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + {{endif}} + {{if 'CUmemcpy3DOperand_st.op' in found_struct}} + try: + str_list += ['op :\n' + '\n'.join([' ' + line for line in str(self.op).splitlines()])] + except ValueError: + str_list += ['op : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUmemcpy3DOperand_st.type' in found_struct}} + @property + def type(self): + return CUmemcpy3DOperandType(self._pvt_ptr[0].type) + @type.setter + def type(self, type not None : CUmemcpy3DOperandType): + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'CUmemcpy3DOperand_st.op' in found_struct}} + @property + def op(self): + return self._op + @op.setter + def op(self, op not None : anon_union13): + string.memcpy(&self._pvt_ptr[0].op, op.getPtr(), sizeof(self._pvt_ptr[0].op)) + {{endif}} +{{endif}} +{{if 'CUDA_MEMCPY3D_BATCH_OP_st' in found_struct}} + +cdef class CUDA_MEMCPY3D_BATCH_OP_st: + """ + Attributes + ---------- + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.src' in found_struct}} + src : CUmemcpy3DOperand + Source memcpy operand. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.dst' in found_struct}} + dst : CUmemcpy3DOperand + Destination memcpy operand. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.extent' in found_struct}} + extent : CUextent3D + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.srcAccessOrder' in found_struct}} + srcAccessOrder : CUmemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.flags' in found_struct}} + flags : unsigned int + Additional flags for copies with this attribute. See CUmemcpyFlags + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.src' in found_struct}} + self._src = CUmemcpy3DOperand(_ptr=&self._pvt_ptr[0].src) + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.dst' in found_struct}} + self._dst = CUmemcpy3DOperand(_ptr=&self._pvt_ptr[0].dst) + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.extent' in found_struct}} + self._extent = CUextent3D(_ptr=&self._pvt_ptr[0].extent) + {{endif}} + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.src' in found_struct}} + try: + str_list += ['src :\n' + '\n'.join([' ' + line for line in str(self.src).splitlines()])] + except ValueError: + str_list += ['src : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.dst' in found_struct}} + try: + str_list += ['dst :\n' + '\n'.join([' ' + line for line in str(self.dst).splitlines()])] + except ValueError: + str_list += ['dst : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.extent' in found_struct}} + try: + str_list += ['extent :\n' + '\n'.join([' ' + line for line in str(self.extent).splitlines()])] + except ValueError: + str_list += ['extent : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.srcAccessOrder' in found_struct}} + try: + str_list += ['srcAccessOrder : ' + str(self.srcAccessOrder)] + except ValueError: + str_list += ['srcAccessOrder : '] + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.flags' in found_struct}} + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.src' in found_struct}} + @property + def src(self): + return self._src + @src.setter + def src(self, src not None : CUmemcpy3DOperand): + string.memcpy(&self._pvt_ptr[0].src, src.getPtr(), sizeof(self._pvt_ptr[0].src)) + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.dst' in found_struct}} + @property + def dst(self): + return self._dst + @dst.setter + def dst(self, dst not None : CUmemcpy3DOperand): + string.memcpy(&self._pvt_ptr[0].dst, dst.getPtr(), sizeof(self._pvt_ptr[0].dst)) + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.extent' in found_struct}} + @property + def extent(self): + return self._extent + @extent.setter + def extent(self, extent not None : CUextent3D): + string.memcpy(&self._pvt_ptr[0].extent, extent.getPtr(), sizeof(self._pvt_ptr[0].extent)) + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.srcAccessOrder' in found_struct}} + @property + def srcAccessOrder(self): + return CUmemcpySrcAccessOrder(self._pvt_ptr[0].srcAccessOrder) + @srcAccessOrder.setter + def srcAccessOrder(self, srcAccessOrder not None : CUmemcpySrcAccessOrder): + self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + {{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st.flags' in found_struct}} + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + {{endif}} +{{endif}} +{{if 'CUmemDecompressParams_st' in found_struct}} + +cdef class CUmemDecompressParams_st: + """ + Structure describing the parameters that compose a single + decompression operation. + + Attributes + ---------- + {{if 'CUmemDecompressParams_st.srcNumBytes' in found_struct}} + srcNumBytes : size_t + The number of bytes to be read and decompressed from + CUmemDecompressParams_st.src. + {{endif}} + {{if 'CUmemDecompressParams_st.dstNumBytes' in found_struct}} + dstNumBytes : size_t + The number of bytes that the decompression operation will be + expected to write to CUmemDecompressParams_st.dst. This value is + optional; if present, it may be used by the CUDA driver as a + heuristic for scheduling the individual decompression operations. + {{endif}} + {{if 'CUmemDecompressParams_st.dstActBytes' in found_struct}} + dstActBytes : cuuint32_t + After the decompression operation has completed, the actual number + of bytes written to CUmemDecompressParams.dst will be recorded as a + 32-bit unsigned integer in the memory at this address. + {{endif}} + {{if 'CUmemDecompressParams_st.src' in found_struct}} + src : Any + Pointer to a buffer of at least + CUmemDecompressParams_st.srcNumBytes compressed bytes. + {{endif}} + {{if 'CUmemDecompressParams_st.dst' in found_struct}} + dst : Any + Pointer to a buffer where the decompressed data will be written. + The number of bytes written to this location will be recorded in + the memory pointed to by CUmemDecompressParams_st.dstActBytes + {{endif}} + {{if 'CUmemDecompressParams_st.algo' in found_struct}} + algo : CUmemDecompressAlgorithm + The decompression algorithm to use. + {{endif}} + {{if 'CUmemDecompressParams_st.padding' in found_struct}} + padding : bytes + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUmemDecompressParams_st.srcNumBytes' in found_struct}} + try: + str_list += ['srcNumBytes : ' + str(self.srcNumBytes)] + except ValueError: + str_list += ['srcNumBytes : '] + {{endif}} + {{if 'CUmemDecompressParams_st.dstNumBytes' in found_struct}} + try: + str_list += ['dstNumBytes : ' + str(self.dstNumBytes)] + except ValueError: + str_list += ['dstNumBytes : '] + {{endif}} + {{if 'CUmemDecompressParams_st.dstActBytes' in found_struct}} + try: + str_list += ['dstActBytes : ' + str(self.dstActBytes)] + except ValueError: + str_list += ['dstActBytes : '] + {{endif}} + {{if 'CUmemDecompressParams_st.src' in found_struct}} + try: + str_list += ['src : ' + hex(self.src)] + except ValueError: + str_list += ['src : '] + {{endif}} + {{if 'CUmemDecompressParams_st.dst' in found_struct}} + try: + str_list += ['dst : ' + hex(self.dst)] + except ValueError: + str_list += ['dst : '] + {{endif}} + {{if 'CUmemDecompressParams_st.algo' in found_struct}} + try: + str_list += ['algo : ' + str(self.algo)] + except ValueError: + str_list += ['algo : '] + {{endif}} + {{if 'CUmemDecompressParams_st.padding' in found_struct}} + try: + str_list += ['padding : ' + str(self.padding)] + except ValueError: + str_list += ['padding : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUmemDecompressParams_st.srcNumBytes' in found_struct}} + @property + def srcNumBytes(self): + return self._pvt_ptr[0].srcNumBytes + @srcNumBytes.setter + def srcNumBytes(self, size_t srcNumBytes): + self._pvt_ptr[0].srcNumBytes = srcNumBytes + {{endif}} + {{if 'CUmemDecompressParams_st.dstNumBytes' in found_struct}} + @property + def dstNumBytes(self): + return self._pvt_ptr[0].dstNumBytes + @dstNumBytes.setter + def dstNumBytes(self, size_t dstNumBytes): + self._pvt_ptr[0].dstNumBytes = dstNumBytes + {{endif}} + {{if 'CUmemDecompressParams_st.dstActBytes' in found_struct}} + @property + def dstActBytes(self): + return cuuint32_t(_ptr=self._pvt_ptr[0].dstActBytes) + {{endif}} + {{if 'CUmemDecompressParams_st.src' in found_struct}} + @property + def src(self): + return self._pvt_ptr[0].src + @src.setter + def src(self, src): + _csrc = utils.HelperInputVoidPtr(src) + self._pvt_ptr[0].src = _csrc.cptr + {{endif}} + {{if 'CUmemDecompressParams_st.dst' in found_struct}} + @property + def dst(self): + return self._pvt_ptr[0].dst + @dst.setter + def dst(self, dst): + _cdst = utils.HelperInputVoidPtr(dst) + self._pvt_ptr[0].dst = _cdst.cptr + {{endif}} + {{if 'CUmemDecompressParams_st.algo' in found_struct}} + @property + def algo(self): + return CUmemDecompressAlgorithm(self._pvt_ptr[0].algo) + @algo.setter + def algo(self, algo not None : CUmemDecompressAlgorithm): + self._pvt_ptr[0].algo = algo.value + {{endif}} + {{if 'CUmemDecompressParams_st.padding' in found_struct}} + @property + def padding(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].padding, 20) + @padding.setter + def padding(self, padding): + if len(padding) != 20: + raise ValueError("padding length must be 20, is " + str(len(padding))) + for i, b in enumerate(padding): + self._pvt_ptr[0].padding[i] = b + {{endif}} +{{endif}} +{{if 'CUdevSmResource_st' in found_struct}} cdef class CUdevSmResource_st: """ Attributes ---------- + {{if 'CUdevSmResource_st.smCount' in found_struct}} smCount : unsigned int The amount of streaming multiprocessors available in this resource. This is an output parameter only, do not write to this field. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUdevSmResource_st.smCount' in found_struct}} try: str_list += ['smCount : ' + str(self.smCount)] except ValueError: str_list += ['smCount : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUdevSmResource_st.smCount' in found_struct}} @property def smCount(self): - return self._ptr[0].smCount + return self._pvt_ptr[0].smCount @smCount.setter def smCount(self, unsigned int smCount): - self._ptr[0].smCount = smCount + self._pvt_ptr[0].smCount = smCount + {{endif}} {{endif}} -{{if 'struct CUdevResource_st' in found_types}} +{{if 'CUdevResource_st' in found_struct}} cdef class CUdevResource_st: """ Attributes ---------- + {{if 'CUdevResource_st.type' in found_struct}} type : CUdevResourceType Type of resource, dictates which union field was last set + {{endif}} + {{if 'CUdevResource_st._internal_padding' in found_struct}} _internal_padding : bytes + {{endif}} + {{if 'CUdevResource_st.sm' in found_struct}} sm : CUdevSmResource Resource corresponding to CU_DEV_RESOURCE_TYPE_SM ``. type. + {{endif}} + {{if 'CUdevResource_st._oversize' in found_struct}} _oversize : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cydriver.CUdevResource_st)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._sm = CUdevSmResource(_ptr=&self._ptr[0].sm) + pass + {{if 'CUdevResource_st.sm' in found_struct}} + self._sm = CUdevSmResource(_ptr=&self._pvt_ptr[0].sm) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'CUdevResource_st.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'CUdevResource_st._internal_padding' in found_struct}} try: str_list += ['_internal_padding : ' + str(self._internal_padding)] except ValueError: str_list += ['_internal_padding : '] + {{endif}} + {{if 'CUdevResource_st.sm' in found_struct}} try: str_list += ['sm :\n' + '\n'.join([' ' + line for line in str(self.sm).splitlines()])] except ValueError: str_list += ['sm : '] + {{endif}} + {{if 'CUdevResource_st._oversize' in found_struct}} try: str_list += ['_oversize : ' + str(self._oversize)] except ValueError: str_list += ['_oversize : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'CUdevResource_st.type' in found_struct}} @property def type(self): - return CUdevResourceType(self._ptr[0].type) + return CUdevResourceType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : CUdevResourceType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'CUdevResource_st._internal_padding' in found_struct}} @property def _internal_padding(self): - return PyBytes_FromStringAndSize(self._ptr[0]._internal_padding, 92) + return PyBytes_FromStringAndSize(self._pvt_ptr[0]._internal_padding, 92) @_internal_padding.setter def _internal_padding(self, _internal_padding): if len(_internal_padding) != 92: raise ValueError("_internal_padding length must be 92, is " + str(len(_internal_padding))) for i, b in enumerate(_internal_padding): - self._ptr[0]._internal_padding[i] = b + self._pvt_ptr[0]._internal_padding[i] = b + {{endif}} + {{if 'CUdevResource_st.sm' in found_struct}} @property def sm(self): return self._sm @sm.setter def sm(self, sm not None : CUdevSmResource): - string.memcpy(&self._ptr[0].sm, sm.getPtr(), sizeof(self._ptr[0].sm)) + string.memcpy(&self._pvt_ptr[0].sm, sm.getPtr(), sizeof(self._pvt_ptr[0].sm)) + {{endif}} + {{if 'CUdevResource_st._oversize' in found_struct}} @property def _oversize(self): - return PyBytes_FromStringAndSize(self._ptr[0]._oversize, 48) + return PyBytes_FromStringAndSize(self._pvt_ptr[0]._oversize, 48) @_oversize.setter def _oversize(self, _oversize): if len(_oversize) != 48: raise ValueError("_oversize length must be 48, is " + str(len(_oversize))) for i, b in enumerate(_oversize): - self._ptr[0]._oversize[i] = b + self._pvt_ptr[0]._oversize[i] = b + {{endif}} {{endif}} {{if True}} -cdef class anon_union14: +cdef class anon_union15: """ Attributes ---------- + {{if True}} pArray : List[CUarray] + {{endif}} + {{if True}} pPitch : List[Any] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].frame + return &self._pvt_ptr[0].frame def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if True}} try: str_list += ['pArray : ' + str(self.pArray)] except ValueError: str_list += ['pArray : '] + {{endif}} + {{if True}} try: str_list += ['pPitch : ' + hex(self.pPitch)] except ValueError: str_list += ['pPitch : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if True}} @property def pArray(self): - return [CUarray(init_value=_pArray) for _pArray in self._ptr[0].frame.pArray] + return [CUarray(init_value=_pArray) for _pArray in self._pvt_ptr[0].frame.pArray] @pArray.setter def pArray(self, pArray : List[CUarray]): if len(pArray) != 3: raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray)) pArray = [int(_pArray) for _pArray in pArray] for _idx, _pArray in enumerate(pArray): - self._ptr[0].frame.pArray[_idx] = _pArray + self._pvt_ptr[0].frame.pArray[_idx] = _pArray + {{endif}} + {{if True}} @property def pPitch(self): - return [_pPitch for _pPitch in self._ptr[0].frame.pPitch] + return [_pPitch for _pPitch in self._pvt_ptr[0].frame.pPitch] @pPitch.setter def pPitch(self, pPitch : List[int]): if len(pPitch) != 3: raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch)) pPitch = [_pPitch for _pPitch in pPitch] for _idx, _pPitch in enumerate(pPitch): - self._ptr[0].frame.pPitch[_idx] = _pPitch + self._pvt_ptr[0].frame.pPitch[_idx] = _pPitch + {{endif}} {{endif}} {{if True}} @@ -16894,152 +21607,214 @@ cdef class CUeglFrame_st: Attributes ---------- - frame : anon_union14 + {{if True}} + frame : anon_union15 + {{endif}} + {{if True}} width : unsigned int Width of first plane + {{endif}} + {{if True}} height : unsigned int Height of first plane + {{endif}} + {{if True}} depth : unsigned int Depth of first plane + {{endif}} + {{if True}} pitch : unsigned int Pitch of first plane + {{endif}} + {{if True}} planeCount : unsigned int Number of planes + {{endif}} + {{if True}} numChannels : unsigned int Number of channels for the plane + {{endif}} + {{if True}} frameType : CUeglFrameType Array or Pitch + {{endif}} + {{if True}} eglColorFormat : CUeglColorFormat CUDA EGL Color Format + {{endif}} + {{if True}} cuFormat : CUarray_format CUDA Array Format + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cydriver.CUeglFrame_st)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._frame = anon_union14(_ptr=self._ptr) + pass + {{if True}} + self._frame = anon_union15(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if True}} try: str_list += ['frame :\n' + '\n'.join([' ' + line for line in str(self.frame).splitlines()])] except ValueError: str_list += ['frame : '] + {{endif}} + {{if True}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if True}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} + {{if True}} try: str_list += ['depth : ' + str(self.depth)] except ValueError: str_list += ['depth : '] + {{endif}} + {{if True}} try: str_list += ['pitch : ' + str(self.pitch)] except ValueError: str_list += ['pitch : '] + {{endif}} + {{if True}} try: str_list += ['planeCount : ' + str(self.planeCount)] except ValueError: str_list += ['planeCount : '] + {{endif}} + {{if True}} try: str_list += ['numChannels : ' + str(self.numChannels)] except ValueError: str_list += ['numChannels : '] + {{endif}} + {{if True}} try: str_list += ['frameType : ' + str(self.frameType)] except ValueError: str_list += ['frameType : '] + {{endif}} + {{if True}} try: str_list += ['eglColorFormat : ' + str(self.eglColorFormat)] except ValueError: str_list += ['eglColorFormat : '] + {{endif}} + {{if True}} try: str_list += ['cuFormat : ' + str(self.cuFormat)] except ValueError: str_list += ['cuFormat : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if True}} @property def frame(self): return self._frame @frame.setter - def frame(self, frame not None : anon_union14): - string.memcpy(&self._ptr[0].frame, frame.getPtr(), sizeof(self._ptr[0].frame)) + def frame(self, frame not None : anon_union15): + string.memcpy(&self._pvt_ptr[0].frame, frame.getPtr(), sizeof(self._pvt_ptr[0].frame)) + {{endif}} + {{if True}} @property def width(self): - return self._ptr[0].width + return self._pvt_ptr[0].width @width.setter def width(self, unsigned int width): - self._ptr[0].width = width + self._pvt_ptr[0].width = width + {{endif}} + {{if True}} @property def height(self): - return self._ptr[0].height + return self._pvt_ptr[0].height @height.setter def height(self, unsigned int height): - self._ptr[0].height = height + self._pvt_ptr[0].height = height + {{endif}} + {{if True}} @property def depth(self): - return self._ptr[0].depth + return self._pvt_ptr[0].depth @depth.setter def depth(self, unsigned int depth): - self._ptr[0].depth = depth + self._pvt_ptr[0].depth = depth + {{endif}} + {{if True}} @property def pitch(self): - return self._ptr[0].pitch + return self._pvt_ptr[0].pitch @pitch.setter def pitch(self, unsigned int pitch): - self._ptr[0].pitch = pitch + self._pvt_ptr[0].pitch = pitch + {{endif}} + {{if True}} @property def planeCount(self): - return self._ptr[0].planeCount + return self._pvt_ptr[0].planeCount @planeCount.setter def planeCount(self, unsigned int planeCount): - self._ptr[0].planeCount = planeCount + self._pvt_ptr[0].planeCount = planeCount + {{endif}} + {{if True}} @property def numChannels(self): - return self._ptr[0].numChannels + return self._pvt_ptr[0].numChannels @numChannels.setter def numChannels(self, unsigned int numChannels): - self._ptr[0].numChannels = numChannels + self._pvt_ptr[0].numChannels = numChannels + {{endif}} + {{if True}} @property def frameType(self): - return CUeglFrameType(self._ptr[0].frameType) + return CUeglFrameType(self._pvt_ptr[0].frameType) @frameType.setter def frameType(self, frameType not None : CUeglFrameType): - self._ptr[0].frameType = frameType.value + self._pvt_ptr[0].frameType = frameType.value + {{endif}} + {{if True}} @property def eglColorFormat(self): - return CUeglColorFormat(self._ptr[0].eglColorFormat) + return CUeglColorFormat(self._pvt_ptr[0].eglColorFormat) @eglColorFormat.setter def eglColorFormat(self, eglColorFormat not None : CUeglColorFormat): - self._ptr[0].eglColorFormat = eglColorFormat.value + self._pvt_ptr[0].eglColorFormat = eglColorFormat.value + {{endif}} + {{if True}} @property def cuFormat(self): - return CUarray_format(self._ptr[0].cuFormat) + return CUarray_format(self._pvt_ptr[0].cuFormat) @cuFormat.setter def cuFormat(self, cuFormat not None : CUarray_format): - self._ptr[0].cuFormat = cuFormat.value + self._pvt_ptr[0].cuFormat = cuFormat.value + {{endif}} {{endif}} {{if 'cuuint32_t' in found_types}} @@ -17054,19 +21829,19 @@ cdef class cuuint32_t: """ def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cuuint64_t' in found_types}} @@ -17082,19 +21857,19 @@ cdef class cuuint64_t: """ def __cinit__(self, uint64_t init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUdeviceptr_v2' in found_types}} @@ -17112,19 +21887,19 @@ cdef class CUdeviceptr_v2: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUdevice_v1' in found_types}} @@ -17142,19 +21917,19 @@ cdef class CUdevice_v1: """ def __cinit__(self, int init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUtexObject_v1' in found_types}} @@ -17172,19 +21947,19 @@ cdef class CUtexObject_v1: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUsurfObject_v1' in found_types}} @@ -17202,19 +21977,19 @@ cdef class CUsurfObject_v1: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'CUmemGenericAllocationHandle_v1' in found_types}} @@ -17230,19 +22005,19 @@ cdef class CUmemGenericAllocationHandle_v1: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -17258,19 +22033,19 @@ cdef class GLenum: """ def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -17286,19 +22061,19 @@ cdef class GLuint: """ def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -17314,19 +22089,19 @@ cdef class EGLint: """ def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -17342,19 +22117,19 @@ cdef class VdpDevice: """ def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -17370,19 +22145,19 @@ cdef class VdpGetProcAddress: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -17398,19 +22173,19 @@ cdef class VdpVideoSurface: """ def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -17426,19 +22201,19 @@ cdef class VdpOutputSurface: """ def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cuGetErrorString' in found_functions}} @@ -17582,7 +22357,7 @@ def cuDeviceGet(int ordinal): :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetCount`, :py:obj:`~.cuDeviceGetName`, :py:obj:`~.cuDeviceGetUuid`, :py:obj:`~.cuDeviceGetLuid`, :py:obj:`~.cuDeviceTotalMem`, :py:obj:`~.cuDeviceGetExecAffinitySupport` """ cdef CUdevice device = CUdevice() - err = cydriver.cuDeviceGet(device._ptr, ordinal) + err = cydriver.cuDeviceGet(device._pvt_ptr, ordinal) return (CUresult(err), device) {{endif}} @@ -17694,7 +22469,7 @@ def cuDeviceGetUuid(dev): pdev = int(CUdevice(dev)) cydev = pdev cdef CUuuid uuid = CUuuid() - err = cydriver.cuDeviceGetUuid(uuid._ptr, cydev) + err = cydriver.cuDeviceGetUuid(uuid._pvt_ptr, cydev) return (CUresult(err), uuid) {{endif}} @@ -17734,7 +22509,7 @@ def cuDeviceGetUuid_v2(dev): pdev = int(CUdevice(dev)) cydev = pdev cdef CUuuid uuid = CUuuid() - err = cydriver.cuDeviceGetUuid_v2(uuid._ptr, cydev) + err = cydriver.cuDeviceGetUuid_v2(uuid._pvt_ptr, cydev) return (CUresult(err), uuid) {{endif}} @@ -18261,6 +23036,12 @@ def cuDeviceGetAttribute(attrib not None : CUdevice_attribute, dev): - :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED`: Device supports switch multicast and reduction operations. + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID`: The combined + 16-bit PCI device ID and 16-bit PCI vendor ID. + + - :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID`: The combined + 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor ID. ID. + Parameters ---------- attrib : :py:obj:`~.CUdevice_attribute` @@ -18483,7 +23264,7 @@ def cuDeviceGetMemPool(dev): pdev = int(CUdevice(dev)) cydev = pdev cdef CUmemoryPool pool = CUmemoryPool() - err = cydriver.cuDeviceGetMemPool(pool._ptr, cydev) + err = cydriver.cuDeviceGetMemPool(pool._pvt_ptr, cydev) return (CUresult(err), pool) {{endif}} @@ -18522,7 +23303,7 @@ def cuDeviceGetDefaultMemPool(dev): pdev = int(CUdevice(dev)) cydev = pdev cdef CUmemoryPool pool_out = CUmemoryPool() - err = cydriver.cuDeviceGetDefaultMemPool(pool_out._ptr, cydev) + err = cydriver.cuDeviceGetDefaultMemPool(pool_out._pvt_ptr, cydev) return (CUresult(err), pool_out) {{endif}} @@ -18589,6 +23370,16 @@ def cuFlushGPUDirectRDMAWrites(target not None : CUflushGPUDirectRDMAWritesTarge can be determined by comparing the numerical values between the two enums, with smaller scopes having smaller values. + On platforms that support GPUDirect RDMA writes via more than one path + in hardware (see + :py:obj:`~.CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE`), the user + should consider those paths as belonging to separate ordering domains. + Note that in such cases CUDA driver will report both RDMA writes + ordering and RDMA write scope as ALL_DEVICES and a call to + cuFlushGPUDirectRDMA will be a no-op, but when these multiple paths are + used simultaneously, it is the user's responsibility to ensure ordering + by using mechanisms outside the scope of CUDA. + Users may query support for this API via :py:obj:`~.CU_DEVICE_ATTRIBUTE_FLUSH_FLUSH_GPU_DIRECT_RDMA_OPTIONS`. @@ -18686,7 +23477,7 @@ def cuDeviceGetProperties(dev): pdev = int(CUdevice(dev)) cydev = pdev cdef CUdevprop prop = CUdevprop() - err = cydriver.cuDeviceGetProperties(prop._ptr, cydev) + err = cydriver.cuDeviceGetProperties(prop._pvt_ptr, cydev) return (CUresult(err), prop) {{endif}} @@ -18789,7 +23580,7 @@ def cuDevicePrimaryCtxRetain(dev): pdev = int(CUdevice(dev)) cydev = pdev cdef CUcontext pctx = CUcontext() - err = cydriver.cuDevicePrimaryCtxRetain(pctx._ptr, cydev) + err = cydriver.cuDevicePrimaryCtxRetain(pctx._pvt_ptr, cydev) return (CUresult(err), pctx) {{endif}} @@ -19180,7 +23971,7 @@ def cuCtxCreate(unsigned int flags, dev): pdev = int(CUdevice(dev)) cydev = pdev cdef CUcontext pctx = CUcontext() - err = cydriver.cuCtxCreate(pctx._ptr, flags, cydev) + err = cydriver.cuCtxCreate(pctx._pvt_ptr, flags, cydev) return (CUresult(err), pctx) {{endif}} @@ -19342,8 +24133,8 @@ def cuCtxCreate_v3(paramsArray : Optional[Tuple[CUexecAffinityParam] | List[CUex if cyparamsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(cydriver.CUexecAffinityParam))) for idx in range(len(paramsArray)): - string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._ptr, sizeof(cydriver.CUexecAffinityParam)) - err = cydriver.cuCtxCreate_v3(pctx._ptr, (paramsArray[0])._ptr if len(paramsArray) == 1 else cyparamsArray, numParams, flags, cydev) + string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._pvt_ptr, sizeof(cydriver.CUexecAffinityParam)) + err = cydriver.cuCtxCreate_v3(pctx._pvt_ptr, (paramsArray[0])._pvt_ptr if len(paramsArray) == 1 else cyparamsArray, numParams, flags, cydev) if cyparamsArray is not NULL: free(cyparamsArray) return (CUresult(err), pctx) @@ -19380,16 +24171,14 @@ def cuCtxCreate_v4(ctxCreateParams : Optional[CUctxCreateParams], unsigned int f context via `cuCtxGetExecAffinity` after context creation. Currently, this attribute is only supported under Volta+ MPS. - CUDA context can be created in CIG(CUDA in Graphics) mode by setting /p - cigParams. Hardware support and software support for graphics clients - can be determined using :py:obj:`~.cuDeviceGetAttribute()` with - :py:obj:`~.CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED`. Data from graphics - client is shared with CUDA via the /p sharedData in /pcigParams. For - D3D12, /p sharedData is a ID3D12CommandQueue handle. - - Either /p execAffinityParams or /p cigParams can be set to a non-null - value. Setting both to a non-null value will result in an undefined - behavior. + CUDA context can be created in CIG(CUDA in Graphics) mode by setting + `cigParams`. Data from graphics client is shared with CUDA via the + `sharedData` in `cigParams`. Support for D3D12 graphics client can be + determined using :py:obj:`~.cuDeviceGetAttribute()` with + :py:obj:`~.CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED`. `sharedData` is a + ID3D12CommandQueue handle. Either `execAffinityParams` or `cigParams` + can be set to a non-null value. Setting both to a non-null value will + result in an undefined behavior. The three LSBs of the `flags` parameter can be used to control how the OS thread, which owns the CUDA context at the time of an API call, @@ -19523,8 +24312,8 @@ def cuCtxCreate_v4(ctxCreateParams : Optional[CUctxCreateParams], unsigned int f pdev = int(CUdevice(dev)) cydev = pdev cdef CUcontext pctx = CUcontext() - cdef cydriver.CUctxCreateParams* cyctxCreateParams_ptr = ctxCreateParams._ptr if ctxCreateParams != None else NULL - err = cydriver.cuCtxCreate_v4(pctx._ptr, cyctxCreateParams_ptr, flags, cydev) + cdef cydriver.CUctxCreateParams* cyctxCreateParams_ptr = ctxCreateParams._pvt_ptr if ctxCreateParams != None else NULL + err = cydriver.cuCtxCreate_v4(pctx._pvt_ptr, cyctxCreateParams_ptr, flags, cydev) return (CUresult(err), pctx) {{endif}} @@ -19658,7 +24447,7 @@ def cuCtxPopCurrent(): :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize` """ cdef CUcontext pctx = CUcontext() - err = cydriver.cuCtxPopCurrent(pctx._ptr) + err = cydriver.cuCtxPopCurrent(pctx._pvt_ptr) return (CUresult(err), pctx) {{endif}} @@ -19727,7 +24516,7 @@ def cuCtxGetCurrent(): :py:obj:`~.cuCtxSetCurrent`, :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cudaGetDevice` """ cdef CUcontext pctx = CUcontext() - err = cydriver.cuCtxGetCurrent(pctx._ptr) + err = cydriver.cuCtxGetCurrent(pctx._pvt_ptr) return (CUresult(err), pctx) {{endif}} @@ -19735,23 +24524,23 @@ def cuCtxGetCurrent(): @cython.embedsignature(True) def cuCtxGetDevice(): - """ Returns the device ID for the current context. + """ Returns the device handle for the current context. - Returns in `*device` the ordinal of the current context's device. + Returns in `*device` the handle of the current context's device. Returns ------- CUresult :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, device : :py:obj:`~.CUdevice` - Returned device ID for the current context + Returned device handle for the current context See Also -------- :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaGetDevice` """ cdef CUdevice device = CUdevice() - err = cydriver.cuCtxGetDevice(device._ptr) + err = cydriver.cuCtxGetDevice(device._pvt_ptr) return (CUresult(err), device) {{endif}} @@ -20280,7 +25069,7 @@ def cuCtxGetExecAffinity(typename not None : CUexecAffinityType): """ cdef CUexecAffinityParam pExecAffinity = CUexecAffinityParam() cdef cydriver.CUexecAffinityType cytypename = typename.value - err = cydriver.cuCtxGetExecAffinity(pExecAffinity._ptr, cytypename) + err = cydriver.cuCtxGetExecAffinity(pExecAffinity._pvt_ptr, cytypename) return (CUresult(err), pExecAffinity) {{endif}} @@ -20439,7 +25228,7 @@ def cuCtxAttach(unsigned int flags): :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxDetach`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxGetLimit`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize` """ cdef CUcontext pctx = CUcontext() - err = cydriver.cuCtxAttach(pctx._ptr, flags) + err = cydriver.cuCtxAttach(pctx._pvt_ptr, flags) return (CUresult(err), pctx) {{endif}} @@ -20611,7 +25400,7 @@ def cuModuleLoad(char* fname): :py:obj:`~.cuModuleGetFunction`, :py:obj:`~.cuModuleGetGlobal`, :py:obj:`~.cuModuleGetTexRef`, :py:obj:`~.cuModuleLoadData`, :py:obj:`~.cuModuleLoadDataEx`, :py:obj:`~.cuModuleLoadFatBinary`, :py:obj:`~.cuModuleUnload` """ cdef CUmodule module = CUmodule() - err = cydriver.cuModuleLoad(module._ptr, fname) + err = cydriver.cuModuleLoad(module._pvt_ptr, fname) return (CUresult(err), module) {{endif}} @@ -20645,7 +25434,7 @@ def cuModuleLoadData(image): cdef CUmodule module = CUmodule() cyimage = utils.HelperInputVoidPtr(image) cdef void* cyimage_ptr = cyimage.cptr - err = cydriver.cuModuleLoadData(module._ptr, cyimage_ptr) + err = cydriver.cuModuleLoadData(module._pvt_ptr, cyimage_ptr) return (CUresult(err), module) {{endif}} @@ -20694,7 +25483,7 @@ def cuModuleLoadDataEx(image, unsigned int numOptions, options : Optional[Tuple[ cdef vector[cydriver.CUjit_option] cyoptions = [pyoptions.value for pyoptions in (options)] pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] cdef utils.InputVoidPtrPtrHelper voidStarHelperoptionValues = utils.InputVoidPtrPtrHelper(pylist) - err = cydriver.cuModuleLoadDataEx(module._ptr, cyimage_ptr, numOptions, cyoptions.data(), voidStarHelperoptionValues.cptr) + err = cydriver.cuModuleLoadDataEx(module._pvt_ptr, cyimage_ptr, numOptions, cyoptions.data(), voidStarHelperoptionValues.cptr) return (CUresult(err), module) {{endif}} @@ -20734,7 +25523,7 @@ def cuModuleLoadFatBinary(fatCubin): cdef CUmodule module = CUmodule() cyfatCubin = utils.HelperInputVoidPtr(fatCubin) cdef void* cyfatCubin_ptr = cyfatCubin.cptr - err = cydriver.cuModuleLoadFatBinary(module._ptr, cyfatCubin_ptr) + err = cydriver.cuModuleLoadFatBinary(module._pvt_ptr, cyfatCubin_ptr) return (CUresult(err), module) {{endif}} @@ -20840,7 +25629,7 @@ def cuModuleGetFunction(hmod, char* name): phmod = int(CUmodule(hmod)) cyhmod = phmod cdef CUfunction hfunc = CUfunction() - err = cydriver.cuModuleGetFunction(hfunc._ptr, cyhmod, name) + err = cydriver.cuModuleGetFunction(hfunc._pvt_ptr, cyhmod, name) return (CUresult(err), hfunc) {{endif}} @@ -20978,7 +25767,7 @@ def cuModuleGetGlobal(hmod, char* name): cyhmod = phmod cdef CUdeviceptr dptr = CUdeviceptr() cdef size_t numbytes = 0 - err = cydriver.cuModuleGetGlobal(dptr._ptr, &numbytes, cyhmod, name) + err = cydriver.cuModuleGetGlobal(dptr._pvt_ptr, &numbytes, cyhmod, name) return (CUresult(err), dptr, numbytes) {{endif}} @@ -21045,7 +25834,7 @@ def cuLinkCreate(unsigned int numOptions, options : Optional[Tuple[CUjit_option] pylist = [utils.HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] cdef utils.InputVoidPtrPtrHelper voidStarHelperoptionValues = utils.InputVoidPtrPtrHelper(pylist) cdef CUlinkState stateOut = CUlinkState() - err = cydriver.cuLinkCreate(numOptions, cyoptions.data(), voidStarHelperoptionValues.cptr, stateOut._ptr) + err = cydriver.cuLinkCreate(numOptions, cyoptions.data(), voidStarHelperoptionValues.cptr, stateOut._pvt_ptr) stateOut._keepalive.append(voidStarHelperoptionValues) for option in pylist: stateOut._keepalive.append(option) @@ -21315,7 +26104,7 @@ def cuModuleGetTexRef(hmod, char* name): phmod = int(CUmodule(hmod)) cyhmod = phmod cdef CUtexref pTexRef = CUtexref() - err = cydriver.cuModuleGetTexRef(pTexRef._ptr, cyhmod, name) + err = cydriver.cuModuleGetTexRef(pTexRef._pvt_ptr, cyhmod, name) return (CUresult(err), pTexRef) {{endif}} @@ -21360,7 +26149,7 @@ def cuModuleGetSurfRef(hmod, char* name): phmod = int(CUmodule(hmod)) cyhmod = phmod cdef CUsurfref pSurfRef = CUsurfref() - err = cydriver.cuModuleGetSurfRef(pSurfRef._ptr, cyhmod, name) + err = cydriver.cuModuleGetSurfRef(pSurfRef._pvt_ptr, cyhmod, name) return (CUresult(err), pSurfRef) {{endif}} @@ -21453,7 +26242,7 @@ def cuLibraryLoadData(code, jitOptions : Optional[Tuple[CUjit_option] | List[CUj cdef utils.InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = utils.InputVoidPtrPtrHelper(pylist) if numLibraryOptions > len(libraryOptions): raise RuntimeError("List is too small: " + str(len(libraryOptions)) + " < " + str(numLibraryOptions)) if numLibraryOptions > len(libraryOptionValues): raise RuntimeError("List is too small: " + str(len(libraryOptionValues)) + " < " + str(numLibraryOptions)) - err = cydriver.cuLibraryLoadData(library._ptr, cycode_ptr, cyjitOptions.data(), voidStarHelperjitOptionsValues.cptr, numJitOptions, cylibraryOptions.data(), voidStarHelperlibraryOptionValues.cptr, numLibraryOptions) + err = cydriver.cuLibraryLoadData(library._pvt_ptr, cycode_ptr, cyjitOptions.data(), voidStarHelperjitOptionsValues.cptr, numJitOptions, cylibraryOptions.data(), voidStarHelperlibraryOptionValues.cptr, numLibraryOptions) return (CUresult(err), library) {{endif}} @@ -21545,7 +26334,7 @@ def cuLibraryLoadFromFile(char* fileName, jitOptions : Optional[Tuple[CUjit_opti cdef utils.InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = utils.InputVoidPtrPtrHelper(pylist) if numLibraryOptions > len(libraryOptions): raise RuntimeError("List is too small: " + str(len(libraryOptions)) + " < " + str(numLibraryOptions)) if numLibraryOptions > len(libraryOptionValues): raise RuntimeError("List is too small: " + str(len(libraryOptionValues)) + " < " + str(numLibraryOptions)) - err = cydriver.cuLibraryLoadFromFile(library._ptr, fileName, cyjitOptions.data(), voidStarHelperjitOptionsValues.cptr, numJitOptions, cylibraryOptions.data(), voidStarHelperlibraryOptionValues.cptr, numLibraryOptions) + err = cydriver.cuLibraryLoadFromFile(library._pvt_ptr, fileName, cyjitOptions.data(), voidStarHelperjitOptionsValues.cptr, numJitOptions, cylibraryOptions.data(), voidStarHelperlibraryOptionValues.cptr, numLibraryOptions) return (CUresult(err), library) {{endif}} @@ -21622,7 +26411,7 @@ def cuLibraryGetKernel(library, char* name): plibrary = int(CUlibrary(library)) cylibrary = plibrary cdef CUkernel pKernel = CUkernel() - err = cydriver.cuLibraryGetKernel(pKernel._ptr, cylibrary, name) + err = cydriver.cuLibraryGetKernel(pKernel._pvt_ptr, cylibrary, name) return (CUresult(err), pKernel) {{endif}} @@ -21747,7 +26536,7 @@ def cuLibraryGetModule(library): plibrary = int(CUlibrary(library)) cylibrary = plibrary cdef CUmodule pMod = CUmodule() - err = cydriver.cuLibraryGetModule(pMod._ptr, cylibrary) + err = cydriver.cuLibraryGetModule(pMod._pvt_ptr, cylibrary) return (CUresult(err), pMod) {{endif}} @@ -21787,7 +26576,7 @@ def cuKernelGetFunction(kernel): pkernel = int(CUkernel(kernel)) cykernel = pkernel cdef CUfunction pFunc = CUfunction() - err = cydriver.cuKernelGetFunction(pFunc._ptr, cykernel) + err = cydriver.cuKernelGetFunction(pFunc._pvt_ptr, cykernel) return (CUresult(err), pFunc) {{endif}} @@ -21826,7 +26615,7 @@ def cuKernelGetLibrary(kernel): pkernel = int(CUkernel(kernel)) cykernel = pkernel cdef CUlibrary pLib = CUlibrary() - err = cydriver.cuKernelGetLibrary(pLib._ptr, cykernel) + err = cydriver.cuKernelGetLibrary(pLib._pvt_ptr, cykernel) return (CUresult(err), pLib) {{endif}} @@ -21873,7 +26662,7 @@ def cuLibraryGetGlobal(library, char* name): cylibrary = plibrary cdef CUdeviceptr dptr = CUdeviceptr() cdef size_t numbytes = 0 - err = cydriver.cuLibraryGetGlobal(dptr._ptr, &numbytes, cylibrary, name) + err = cydriver.cuLibraryGetGlobal(dptr._pvt_ptr, &numbytes, cylibrary, name) return (CUresult(err), dptr, numbytes) {{endif}} @@ -21922,7 +26711,7 @@ def cuLibraryGetManaged(library, char* name): cylibrary = plibrary cdef CUdeviceptr dptr = CUdeviceptr() cdef size_t numbytes = 0 - err = cydriver.cuLibraryGetManaged(dptr._ptr, &numbytes, cylibrary, name) + err = cydriver.cuLibraryGetManaged(dptr._pvt_ptr, &numbytes, cylibrary, name) return (CUresult(err), dptr, numbytes) {{endif}} @@ -22470,7 +27259,7 @@ def cuMemAlloc(size_t bytesize): :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMalloc` """ cdef CUdeviceptr dptr = CUdeviceptr() - err = cydriver.cuMemAlloc(dptr._ptr, bytesize) + err = cydriver.cuMemAlloc(dptr._pvt_ptr, bytesize) return (CUresult(err), dptr) {{endif}} @@ -22536,7 +27325,7 @@ def cuMemAllocPitch(size_t WidthInBytes, size_t Height, unsigned int ElementSize """ cdef CUdeviceptr dptr = CUdeviceptr() cdef size_t pPitch = 0 - err = cydriver.cuMemAllocPitch(dptr._ptr, &pPitch, WidthInBytes, Height, ElementSizeBytes) + err = cydriver.cuMemAllocPitch(dptr._pvt_ptr, &pPitch, WidthInBytes, Height, ElementSizeBytes) return (CUresult(err), dptr, pPitch) {{endif}} @@ -22628,7 +27417,7 @@ def cuMemGetAddressRange(dptr): cydptr = pdptr cdef CUdeviceptr pbase = CUdeviceptr() cdef size_t psize = 0 - err = cydriver.cuMemGetAddressRange(pbase._ptr, &psize, cydptr) + err = cydriver.cuMemGetAddressRange(pbase._pvt_ptr, &psize, cydptr) return (CUresult(err), pbase, psize) {{endif}} @@ -22861,7 +27650,7 @@ def cuMemHostGetDevicePointer(p, unsigned int Flags): cdef CUdeviceptr pdptr = CUdeviceptr() cyp = utils.HelperInputVoidPtr(p) cdef void* cyp_ptr = cyp.cptr - err = cydriver.cuMemHostGetDevicePointer(pdptr._ptr, cyp_ptr, Flags) + err = cydriver.cuMemHostGetDevicePointer(pdptr._pvt_ptr, cyp_ptr, Flags) return (CUresult(err), pdptr) {{endif}} @@ -23031,7 +27820,7 @@ def cuMemAllocManaged(size_t bytesize, unsigned int flags): :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuStreamAttachMemAsync`, :py:obj:`~.cudaMallocManaged` """ cdef CUdeviceptr dptr = CUdeviceptr() - err = cydriver.cuMemAllocManaged(dptr._ptr, bytesize, flags) + err = cydriver.cuMemAllocManaged(dptr._pvt_ptr, bytesize, flags) return (CUresult(err), dptr) {{endif}} @@ -23101,7 +27890,7 @@ def cuDeviceRegisterAsyncNotification(device, callbackFunc, userData): cyuserData = utils.HelperInputVoidPtr(userData) cdef void* cyuserData_ptr = cyuserData.cptr cdef CUasyncCallbackHandle callback = CUasyncCallbackHandle() - err = cydriver.cuDeviceRegisterAsyncNotification(cydevice, cycallbackFunc, cyuserData_ptr, callback._ptr) + err = cydriver.cuDeviceRegisterAsyncNotification(cydevice, cycallbackFunc, cyuserData_ptr, callback._pvt_ptr) return (CUresult(err), callback) {{endif}} @@ -23181,7 +27970,7 @@ def cuDeviceGetByPCIBusId(char* pciBusId): :py:obj:`~.cuDeviceGet`, :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetPCIBusId`, :py:obj:`~.cudaDeviceGetByPCIBusId` """ cdef CUdevice dev = CUdevice() - err = cydriver.cuDeviceGetByPCIBusId(dev._ptr, pciBusId) + err = cydriver.cuDeviceGetByPCIBusId(dev._pvt_ptr, pciBusId) return (CUresult(err), dev) {{endif}} @@ -23287,7 +28076,7 @@ def cuIpcGetEventHandle(event): pevent = int(CUevent(event)) cyevent = pevent cdef CUipcEventHandle pHandle = CUipcEventHandle() - err = cydriver.cuIpcGetEventHandle(pHandle._ptr, cyevent) + err = cydriver.cuIpcGetEventHandle(pHandle._pvt_ptr, cyevent) return (CUresult(err), pHandle) {{endif}} @@ -23331,7 +28120,7 @@ def cuIpcOpenEventHandle(handle not None : CUipcEventHandle): :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuIpcGetEventHandle`, :py:obj:`~.cuIpcGetMemHandle`, :py:obj:`~.cuIpcOpenMemHandle`, :py:obj:`~.cuIpcCloseMemHandle`, :py:obj:`~.cudaIpcOpenEventHandle` """ cdef CUevent phEvent = CUevent() - err = cydriver.cuIpcOpenEventHandle(phEvent._ptr, handle._ptr[0]) + err = cydriver.cuIpcOpenEventHandle(phEvent._pvt_ptr, handle._pvt_ptr[0]) return (CUresult(err), phEvent) {{endif}} @@ -23385,7 +28174,7 @@ def cuIpcGetMemHandle(dptr): pdptr = int(CUdeviceptr(dptr)) cydptr = pdptr cdef CUipcMemHandle pHandle = CUipcMemHandle() - err = cydriver.cuIpcGetMemHandle(pHandle._ptr, cydptr) + err = cydriver.cuIpcGetMemHandle(pHandle._pvt_ptr, cydptr) return (CUresult(err), pHandle) {{endif}} @@ -23451,7 +28240,7 @@ def cuIpcOpenMemHandle(handle not None : CUipcMemHandle, unsigned int Flags): No guarantees are made about the address returned in `*pdptr`. In particular, multiple processes may not receive the same address for the same `handle`. """ cdef CUdeviceptr pdptr = CUdeviceptr() - err = cydriver.cuIpcOpenMemHandle(pdptr._ptr, handle._ptr[0], Flags) + err = cydriver.cuIpcOpenMemHandle(pdptr._pvt_ptr, handle._pvt_ptr[0], Flags) return (CUresult(err), pdptr) {{endif}} @@ -24282,7 +29071,7 @@ def cuMemcpy2D(pCopy : Optional[CUDA_MEMCPY2D]): -------- :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray` """ - cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._ptr if pCopy != None else NULL + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL err = cydriver.cuMemcpy2D(cypCopy_ptr) return (CUresult(err),) {{endif}} @@ -24408,7 +29197,7 @@ def cuMemcpy2DUnaligned(pCopy : Optional[CUDA_MEMCPY2D]): -------- :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray` """ - cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._ptr if pCopy != None else NULL + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL err = cydriver.cuMemcpy2DUnaligned(cypCopy_ptr) return (CUresult(err),) {{endif}} @@ -24537,7 +29326,7 @@ def cuMemcpy3D(pCopy : Optional[CUDA_MEMCPY3D]): -------- :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMemcpy3D` """ - cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._ptr if pCopy != None else NULL + cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL err = cydriver.cuMemcpy3D(cypCopy_ptr) return (CUresult(err),) {{endif}} @@ -24566,7 +29355,7 @@ def cuMemcpy3DPeer(pCopy : Optional[CUDA_MEMCPY3D_PEER]): -------- :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyPeer`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyPeerAsync`, :py:obj:`~.cuMemcpy3DPeerAsync`, :py:obj:`~.cudaMemcpy3DPeer` """ - cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._ptr if pCopy != None else NULL + cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL err = cydriver.cuMemcpy3DPeer(cypCopy_ptr) return (CUresult(err),) {{endif}} @@ -25142,7 +29931,7 @@ def cuMemcpy2DAsync(pCopy : Optional[CUDA_MEMCPY2D], hStream): else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._ptr if pCopy != None else NULL + cdef cydriver.CUDA_MEMCPY2D* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL err = cydriver.cuMemcpy2DAsync(cypCopy_ptr, cyhStream) return (CUresult(err),) {{endif}} @@ -25282,7 +30071,7 @@ def cuMemcpy3DAsync(pCopy : Optional[CUDA_MEMCPY3D], hStream): else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._ptr if pCopy != None else NULL + cdef cydriver.CUDA_MEMCPY3D* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL err = cydriver.cuMemcpy3DAsync(cypCopy_ptr, cyhStream) return (CUresult(err),) {{endif}} @@ -25322,11 +30111,324 @@ def cuMemcpy3DPeerAsync(pCopy : Optional[CUDA_MEMCPY3D_PEER], hStream): else: phStream = int(CUstream(hStream)) cyhStream = phStream - cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._ptr if pCopy != None else NULL + cdef cydriver.CUDA_MEMCPY3D_PEER* cypCopy_ptr = pCopy._pvt_ptr if pCopy != None else NULL err = cydriver.cuMemcpy3DPeerAsync(cypCopy_ptr, cyhStream) return (CUresult(err),) {{endif}} +{{if 'cuMemcpyBatchAsync' in found_functions}} + +@cython.embedsignature(True) +def cuMemcpyBatchAsync(dsts : Optional[Tuple[CUdeviceptr] | List[CUdeviceptr]], srcs : Optional[Tuple[CUdeviceptr] | List[CUdeviceptr]], sizes : Tuple[int] | List[int], size_t count, attrs : Optional[Tuple[CUmemcpyAttributes] | List[CUmemcpyAttributes]], attrsIdxs : Tuple[int] | List[int], size_t numAttrs, hStream): + """ Performs a batch of memory copies asynchronously. + + Performs a batch of memory copies. The batch as a whole executes in + stream order but copies within a batch are not guaranteed to execute in + any specific order. This API only supports pointer-to-pointer copies. + For copies involving CUDA arrays, please see + :py:obj:`~.cuMemcpy3DBatchAsync`. + + Performs memory copies from source buffers specified in `srcs` to + destination buffers specified in `dsts`. The size of each copy is + specified in `sizes`. All three arrays must be of the same length as + specified by `count`. Since there are no ordering guarantees for copies + within a batch, specifying any dependent copies within a batch will + result in undefined behavior. + + Every copy in the batch has to be associated with a set of attributes + specified in the `attrs` array. Each entry in this array can apply to + more than one copy. This can be done by specifying in the `attrsIdxs` + array, the index of the first copy that the corresponding entry in the + `attrs` array applies to. Both `attrs` and `attrsIdxs` must be of the + same length as specified by `numAttrs`. For example, if a batch has 10 + copies listed in dst/src/sizes, the first 6 of which have one set of + attributes and the remaining 4 another, then `numAttrs` will be 2, + `attrsIdxs` will be {0, 6} and `attrs` will contains the two sets of + attributes. Note that the first entry in `attrsIdxs` must always be 0. + Also, each entry must be greater than the previous entry and the last + entry should be less than `count`. Furthermore, `numAttrs` must be + lesser than or equal to `count`. + + The :py:obj:`~.CUmemcpyAttributes.srcAccessOrder` indicates the source + access ordering to be observed for copies associated with the + attribute. If the source access order is set to + :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_STREAM`, then the source will be + accessed in stream order. If the source access order is set to + :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL` then it + indicates that access to the source pointer can be out of stream order + and all accesses must be complete before the API call returns. This + flag is suited for ephemeral sources (ex., stack variables) when it's + known that no prior operations in the stream can be accessing the + memory and also that the lifetime of the memory is limited to the scope + that the source variable was declared in. Specifying this flag allows + the driver to optimize the copy and removes the need for the user to + synchronize the stream after the API call. If the source access order + is set to :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_ANY` then it indicates + that access to the source pointer can be out of stream order and the + accesses can happen even after the API call returns. This flag is + suited for host pointers allocated outside CUDA (ex., via malloc) when + it's known that no prior operations in the stream can be accessing the + memory. Specifying this flag allows the driver to optimize the copy on + certain platforms. Each memcpy operation in the batch must have a valid + :py:obj:`~.CUmemcpyAttributes` corresponding to it including the + appropriate srcAccessOrder setting, otherwise the API will return + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + + The :py:obj:`~.CUmemcpyAttributes.srcLocHint` and + :py:obj:`~.CUmemcpyAttributes.dstLocHint` allows applications to + specify hint locations for operands of a copy when the operand doesn't + have a fixed location. That is, these hints are only applicable for + managed memory pointers on devices where + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` is true or + system-allocated pageable memory on devices where + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS` is true. For + other cases, these hints are ignored. + + The :py:obj:`~.CUmemcpyAttributes.flags` field can be used to specify + certain flags for copies. Setting the + :py:obj:`~.CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE` flag indicates + that the associated copies should preferably overlap with any compute + work. Note that this flag is a hint and can be ignored depending on the + platform and other parameters of the copy. + + If any error is encountered while parsing the batch, the index within + the batch where the error was encountered will be returned in + `failIdx`. + + Parameters + ---------- + dsts : List[:py:obj:`~.CUdeviceptr`] + Array of destination pointers. + srcs : List[:py:obj:`~.CUdeviceptr`] + Array of memcpy source pointers. + sizes : List[int] + Array of sizes for memcpy operations. + count : size_t + Size of `dsts`, `srcs` and `sizes` arrays + attrs : List[:py:obj:`~.CUmemcpyAttributes`] + Array of memcpy attributes. + attrsIdxs : List[int] + Array of indices to specify which copies each entry in the `attrs` + array applies to. The attributes specified in attrs[k] will be + applied to copies starting from attrsIdxs[k] through attrsIdxs[k+1] + - 1. Also attrs[numAttrs-1] will apply to copies starting from + attrsIdxs[numAttrs-1] through count - 1. + numAttrs : size_t + Size of `attrs` and `attrsIdxs` arrays. + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to enqueue the operations in. Must not be legacy NULL + stream. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_DEINITIALIZED` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + failIdx : int + Pointer to a location to return the index of the copy where a + failure was encountered. The value will be SIZE_MAX if the error + doesn't pertain to any specific copy. + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + cyhStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + cyhStream = phStream + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + if not all(isinstance(_x, (int)) for _x in attrsIdxs): + raise TypeError("Argument 'attrsIdxs' is not instance of type (expected Tuple[int] or List[int]") + attrs = [] if attrs is None else attrs + if not all(isinstance(_x, (CUmemcpyAttributes,)) for _x in attrs): + raise TypeError("Argument 'attrs' is not instance of type (expected Tuple[cydriver.CUmemcpyAttributes,] or List[cydriver.CUmemcpyAttributes,]") + if not all(isinstance(_x, (int)) for _x in sizes): + raise TypeError("Argument 'sizes' is not instance of type (expected Tuple[int] or List[int]") + srcs = [] if srcs is None else srcs + if not all(isinstance(_x, (CUdeviceptr,)) for _x in srcs): + raise TypeError("Argument 'srcs' is not instance of type (expected Tuple[cydriver.CUdeviceptr,] or List[cydriver.CUdeviceptr,]") + dsts = [] if dsts is None else dsts + if not all(isinstance(_x, (CUdeviceptr,)) for _x in dsts): + raise TypeError("Argument 'dsts' is not instance of type (expected Tuple[cydriver.CUdeviceptr,] or List[cydriver.CUdeviceptr,]") + cdef cydriver.CUdeviceptr* cydsts = NULL + if len(dsts) > 0: + cydsts = calloc(len(dsts), sizeof(cydriver.CUdeviceptr)) + if cydsts is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dsts)) + 'x' + str(sizeof(cydriver.CUdeviceptr))) + else: + for idx in range(len(dsts)): + cydsts[idx] = (dsts[idx])._pvt_ptr[0] + cdef cydriver.CUdeviceptr* cysrcs = NULL + if len(srcs) > 0: + cysrcs = calloc(len(srcs), sizeof(cydriver.CUdeviceptr)) + if cysrcs is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(srcs)) + 'x' + str(sizeof(cydriver.CUdeviceptr))) + else: + for idx in range(len(srcs)): + cysrcs[idx] = (srcs[idx])._pvt_ptr[0] + cdef vector[size_t] cysizes = sizes + if count > len(dsts): raise RuntimeError("List is too small: " + str(len(dsts)) + " < " + str(count)) + if count > len(srcs): raise RuntimeError("List is too small: " + str(len(srcs)) + " < " + str(count)) + if count > len(sizes): raise RuntimeError("List is too small: " + str(len(sizes)) + " < " + str(count)) + cdef cydriver.CUmemcpyAttributes* cyattrs = NULL + if len(attrs) > 0: + cyattrs = calloc(len(attrs), sizeof(cydriver.CUmemcpyAttributes)) + if cyattrs is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(attrs)) + 'x' + str(sizeof(cydriver.CUmemcpyAttributes))) + for idx in range(len(attrs)): + string.memcpy(&cyattrs[idx], (attrs[idx])._pvt_ptr, sizeof(cydriver.CUmemcpyAttributes)) + cdef vector[size_t] cyattrsIdxs = attrsIdxs + if numAttrs > len(attrs): raise RuntimeError("List is too small: " + str(len(attrs)) + " < " + str(numAttrs)) + if numAttrs > len(attrsIdxs): raise RuntimeError("List is too small: " + str(len(attrsIdxs)) + " < " + str(numAttrs)) + cdef size_t failIdx = 0 + err = cydriver.cuMemcpyBatchAsync((dsts[0])._pvt_ptr if len(dsts) == 1 else cydsts, (srcs[0])._pvt_ptr if len(srcs) == 1 else cysrcs, cysizes.data(), count, (attrs[0])._pvt_ptr if len(attrs) == 1 else cyattrs, cyattrsIdxs.data(), numAttrs, &failIdx, cyhStream) + if cydsts is not NULL: + free(cydsts) + if cysrcs is not NULL: + free(cysrcs) + if cyattrs is not NULL: + free(cyattrs) + return (CUresult(err), failIdx) +{{endif}} + +{{if 'cuMemcpy3DBatchAsync' in found_functions}} + +@cython.embedsignature(True) +def cuMemcpy3DBatchAsync(size_t numOps, opList : Optional[Tuple[CUDA_MEMCPY3D_BATCH_OP] | List[CUDA_MEMCPY3D_BATCH_OP]], unsigned long long flags, hStream): + """ Performs a batch of 3D memory copies asynchronously. + + Performs a batch of memory copies. The batch as a whole executes in + stream order but copies within a batch are not guaranteed to execute in + any specific order. Note that this means specifying any dependent + copies within a batch will result in undefined behavior. + + Performs memory copies as specified in the `opList` array. The length + of this array is specified in `numOps`. Each entry in this array + describes a copy operation. This includes among other things, the + source and destination operands for the copy as specified in + :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP.src` and + :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP.dst` respectively. The source and + destination operands of a copy can either be a pointer or a CUDA array. + The width, height and depth of a copy is specified in + :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP.extent`. The width, height and depth + of a copy are specified in elements and must not be zero. For pointer- + to-pointer copies, the element size is considered to be 1. For pointer + to CUDA array or vice versa copies, the element size is determined by + the CUDA array. For CUDA array to CUDA array copies, the element size + of the two CUDA arrays must match. + + For a given operand, if :py:obj:`~.CUmemcpy3DOperand`::type is + specified as :py:obj:`~.CU_MEMCPY_OPERAND_TYPE_POINTER`, then + :py:obj:`~.CUmemcpy3DOperand`::op::ptr will be used. The + :py:obj:`~.CUmemcpy3DOperand`::op::ptr::ptr field must contain the + pointer where the copy should begin. The + :py:obj:`~.CUmemcpy3DOperand`::op::ptr::rowLength field specifies the + length of each row in elements and must either be zero or be greater + than or equal to the width of the copy specified in + :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP`::extent::width. The + :py:obj:`~.CUmemcpy3DOperand`::op::ptr::layerHeight field specifies the + height of each layer and must either be zero or be greater than or + equal to the height of the copy specified in + :py:obj:`~.CUDA_MEMCPY3D_BATCH_OP`::extent::height. When either of + these values is zero, that aspect of the operand is considered to be + tightly packed according to the copy extent. For managed memory + pointers on devices where + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS` is true or + system-allocated pageable memory on devices where + :py:obj:`~.CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS` is true, the + :py:obj:`~.CUmemcpy3DOperand`::op::ptr::locHint field can be used to + hint the location of the operand. + + If an operand's type is specified as + :py:obj:`~.CU_MEMCPY_OPERAND_TYPE_ARRAY`, then + :py:obj:`~.CUmemcpy3DOperand`::op::array will be used. The + :py:obj:`~.CUmemcpy3DOperand`::op::array::array field specifies the + CUDA array and :py:obj:`~.CUmemcpy3DOperand`::op::array::offset + specifies the 3D offset into that array where the copy begins. + + The :py:obj:`~.CUmemcpyAttributes.srcAccessOrder` indicates the source + access ordering to be observed for copies associated with the + attribute. If the source access order is set to + :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_STREAM`, then the source will be + accessed in stream order. If the source access order is set to + :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL` then it + indicates that access to the source pointer can be out of stream order + and all accesses must be complete before the API call returns. This + flag is suited for ephemeral sources (ex., stack variables) when it's + known that no prior operations in the stream can be accessing the + memory and also that the lifetime of the memory is limited to the scope + that the source variable was declared in. Specifying this flag allows + the driver to optimize the copy and removes the need for the user to + synchronize the stream after the API call. If the source access order + is set to :py:obj:`~.CU_MEMCPY_SRC_ACCESS_ORDER_ANY` then it indicates + that access to the source pointer can be out of stream order and the + accesses can happen even after the API call returns. This flag is + suited for host pointers allocated outside CUDA (ex., via malloc) when + it's known that no prior operations in the stream can be accessing the + memory. Specifying this flag allows the driver to optimize the copy on + certain platforms. Each memcopy operation in `opList` must have a valid + srcAccessOrder setting, otherwise this API will return + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + + The :py:obj:`~.CUmemcpyAttributes.flags` field can be used to specify + certain flags for copies. Setting the + :py:obj:`~.CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE` flag indicates + that the associated copies should preferably overlap with any compute + work. Note that this flag is a hint and can be ignored depending on the + platform and other parameters of the copy. + + If any error is encountered while parsing the batch, the index within + the batch where the error was encountered will be returned in + `failIdx`. + + Parameters + ---------- + numOps : size_t + Total number of memcpy operations. + opList : List[:py:obj:`~.CUDA_MEMCPY3D_BATCH_OP`] + Array of size `numOps` containing the actual memcpy operations. + flags : unsigned long long + Flags for future use, must be zero now. + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to enqueue the operations in. Must not be default NULL + stream. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_DEINITIALIZED` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + failIdx : int + Pointer to a location to return the index of the copy where a + failure was encountered. The value will be SIZE_MAX if the error + doesn't pertain to any specific copy. + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + cyhStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + cyhStream = phStream + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + opList = [] if opList is None else opList + if not all(isinstance(_x, (CUDA_MEMCPY3D_BATCH_OP,)) for _x in opList): + raise TypeError("Argument 'opList' is not instance of type (expected Tuple[cydriver.CUDA_MEMCPY3D_BATCH_OP,] or List[cydriver.CUDA_MEMCPY3D_BATCH_OP,]") + if numOps > len(opList): raise RuntimeError("List is too small: " + str(len(opList)) + " < " + str(numOps)) + cdef cydriver.CUDA_MEMCPY3D_BATCH_OP* cyopList = NULL + if len(opList) > 0: + cyopList = calloc(len(opList), sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP)) + if cyopList is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(opList)) + 'x' + str(sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP))) + for idx in range(len(opList)): + string.memcpy(&cyopList[idx], (opList[idx])._pvt_ptr, sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP)) + cdef size_t failIdx = 0 + err = cydriver.cuMemcpy3DBatchAsync(numOps, (opList[0])._pvt_ptr if len(opList) == 1 else cyopList, &failIdx, flags, cyhStream) + if cyopList is not NULL: + free(cyopList) + return (CUresult(err), failIdx) +{{endif}} + {{if 'cuMemsetD8_v2' in found_functions}} @cython.embedsignature(True) @@ -25980,8 +31082,8 @@ def cuArrayCreate(pAllocateArray : Optional[CUDA_ARRAY_DESCRIPTOR]): :py:obj:`~.cuArray3DCreate`, :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMallocArray` """ cdef CUarray pHandle = CUarray() - cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._ptr if pAllocateArray != None else NULL - err = cydriver.cuArrayCreate(pHandle._ptr, cypAllocateArray_ptr) + cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray != None else NULL + err = cydriver.cuArrayCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) return (CUresult(err), pHandle) {{endif}} @@ -26022,7 +31124,7 @@ def cuArrayGetDescriptor(hArray): phArray = int(CUarray(hArray)) cyhArray = phArray cdef CUDA_ARRAY_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY_DESCRIPTOR() - err = cydriver.cuArrayGetDescriptor(pArrayDescriptor._ptr, cyhArray) + err = cydriver.cuArrayGetDescriptor(pArrayDescriptor._pvt_ptr, cyhArray) return (CUresult(err), pArrayDescriptor) {{endif}} @@ -26076,7 +31178,7 @@ def cuArrayGetSparseProperties(array): parray = int(CUarray(array)) cyarray = parray cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES() - err = cydriver.cuArrayGetSparseProperties(sparseProperties._ptr, cyarray) + err = cydriver.cuArrayGetSparseProperties(sparseProperties._pvt_ptr, cyarray) return (CUresult(err), sparseProperties) {{endif}} @@ -26132,7 +31234,7 @@ def cuMipmappedArrayGetSparseProperties(mipmap): pmipmap = int(CUmipmappedArray(mipmap)) cymipmap = pmipmap cdef CUDA_ARRAY_SPARSE_PROPERTIES sparseProperties = CUDA_ARRAY_SPARSE_PROPERTIES() - err = cydriver.cuMipmappedArrayGetSparseProperties(sparseProperties._ptr, cymipmap) + err = cydriver.cuMipmappedArrayGetSparseProperties(sparseProperties._pvt_ptr, cymipmap) return (CUresult(err), sparseProperties) {{endif}} @@ -26189,7 +31291,7 @@ def cuArrayGetMemoryRequirements(array, device): parray = int(CUarray(array)) cyarray = parray cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS() - err = cydriver.cuArrayGetMemoryRequirements(memoryRequirements._ptr, cyarray, cydevice) + err = cydriver.cuArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cyarray, cydevice) return (CUresult(err), memoryRequirements) {{endif}} @@ -26247,7 +31349,7 @@ def cuMipmappedArrayGetMemoryRequirements(mipmap, device): pmipmap = int(CUmipmappedArray(mipmap)) cymipmap = pmipmap cdef CUDA_ARRAY_MEMORY_REQUIREMENTS memoryRequirements = CUDA_ARRAY_MEMORY_REQUIREMENTS() - err = cydriver.cuMipmappedArrayGetMemoryRequirements(memoryRequirements._ptr, cymipmap, cydevice) + err = cydriver.cuMipmappedArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cymipmap, cydevice) return (CUresult(err), memoryRequirements) {{endif}} @@ -26301,7 +31403,7 @@ def cuArrayGetPlane(hArray, unsigned int planeIdx): phArray = int(CUarray(hArray)) cyhArray = phArray cdef CUarray pPlaneArray = CUarray() - err = cydriver.cuArrayGetPlane(pPlaneArray._ptr, cyhArray, planeIdx) + err = cydriver.cuArrayGetPlane(pPlaneArray._pvt_ptr, cyhArray, planeIdx) return (CUresult(err), pPlaneArray) {{endif}} @@ -26467,8 +31569,8 @@ def cuArray3DCreate(pAllocateArray : Optional[CUDA_ARRAY3D_DESCRIPTOR]): :py:obj:`~.cuArray3DGetDescriptor`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cuArrayDestroy`, :py:obj:`~.cuArrayGetDescriptor`, :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemAllocHost`, :py:obj:`~.cuMemAllocPitch`, :py:obj:`~.cuMemcpy2D`, :py:obj:`~.cuMemcpy2DAsync`, :py:obj:`~.cuMemcpy2DUnaligned`, :py:obj:`~.cuMemcpy3D`, :py:obj:`~.cuMemcpy3DAsync`, :py:obj:`~.cuMemcpyAtoA`, :py:obj:`~.cuMemcpyAtoD`, :py:obj:`~.cuMemcpyAtoH`, :py:obj:`~.cuMemcpyAtoHAsync`, :py:obj:`~.cuMemcpyDtoA`, :py:obj:`~.cuMemcpyDtoD`, :py:obj:`~.cuMemcpyDtoDAsync`, :py:obj:`~.cuMemcpyDtoH`, :py:obj:`~.cuMemcpyDtoHAsync`, :py:obj:`~.cuMemcpyHtoA`, :py:obj:`~.cuMemcpyHtoAAsync`, :py:obj:`~.cuMemcpyHtoD`, :py:obj:`~.cuMemcpyHtoDAsync`, :py:obj:`~.cuMemFree`, :py:obj:`~.cuMemFreeHost`, :py:obj:`~.cuMemGetAddressRange`, :py:obj:`~.cuMemGetInfo`, :py:obj:`~.cuMemHostAlloc`, :py:obj:`~.cuMemHostGetDevicePointer`, :py:obj:`~.cuMemsetD2D8`, :py:obj:`~.cuMemsetD2D16`, :py:obj:`~.cuMemsetD2D32`, :py:obj:`~.cuMemsetD8`, :py:obj:`~.cuMemsetD16`, :py:obj:`~.cuMemsetD32`, :py:obj:`~.cudaMalloc3DArray` """ cdef CUarray pHandle = CUarray() - cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._ptr if pAllocateArray != None else NULL - err = cydriver.cuArray3DCreate(pHandle._ptr, cypAllocateArray_ptr) + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypAllocateArray_ptr = pAllocateArray._pvt_ptr if pAllocateArray != None else NULL + err = cydriver.cuArray3DCreate(pHandle._pvt_ptr, cypAllocateArray_ptr) return (CUresult(err), pHandle) {{endif}} @@ -26513,7 +31615,7 @@ def cuArray3DGetDescriptor(hArray): phArray = int(CUarray(hArray)) cyhArray = phArray cdef CUDA_ARRAY3D_DESCRIPTOR pArrayDescriptor = CUDA_ARRAY3D_DESCRIPTOR() - err = cydriver.cuArray3DGetDescriptor(pArrayDescriptor._ptr, cyhArray) + err = cydriver.cuArray3DGetDescriptor(pArrayDescriptor._pvt_ptr, cyhArray) return (CUresult(err), pArrayDescriptor) {{endif}} @@ -26632,8 +31734,8 @@ def cuMipmappedArrayCreate(pMipmappedArrayDesc : Optional[CUDA_ARRAY3D_DESCRIPTO :py:obj:`~.cuMipmappedArrayDestroy`, :py:obj:`~.cuMipmappedArrayGetLevel`, :py:obj:`~.cuArrayCreate`, :py:obj:`~.cudaMallocMipmappedArray` """ cdef CUmipmappedArray pHandle = CUmipmappedArray() - cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypMipmappedArrayDesc_ptr = pMipmappedArrayDesc._ptr if pMipmappedArrayDesc != None else NULL - err = cydriver.cuMipmappedArrayCreate(pHandle._ptr, cypMipmappedArrayDesc_ptr, numMipmapLevels) + cdef cydriver.CUDA_ARRAY3D_DESCRIPTOR* cypMipmappedArrayDesc_ptr = pMipmappedArrayDesc._pvt_ptr if pMipmappedArrayDesc != None else NULL + err = cydriver.cuMipmappedArrayCreate(pHandle._pvt_ptr, cypMipmappedArrayDesc_ptr, numMipmapLevels) return (CUresult(err), pHandle) {{endif}} @@ -26677,7 +31779,7 @@ def cuMipmappedArrayGetLevel(hMipmappedArray, unsigned int level): phMipmappedArray = int(CUmipmappedArray(hMipmappedArray)) cyhMipmappedArray = phMipmappedArray cdef CUarray pLevelArray = CUarray() - err = cydriver.cuMipmappedArrayGetLevel(pLevelArray._ptr, cyhMipmappedArray, level) + err = cydriver.cuMipmappedArrayGetLevel(pLevelArray._pvt_ptr, cyhMipmappedArray, level) return (CUresult(err), pLevelArray) {{endif}} @@ -26747,6 +31849,12 @@ def cuMemGetHandleForAddressRange(dptr, size_t size, handleType not None : CUmem allocation(s) corresponding to a previously queried VA range are changed. + For CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD, users + may set flags to + :py:obj:`~.CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE`. Which when set + on a supported platform, will give a DMA_BUF handle mapped via PCIE + BAR1 or will return an error otherwise. + Parameters ---------- dptr : :py:obj:`~.CUdeviceptr` @@ -26758,7 +31866,10 @@ def cuMemGetHandleForAddressRange(dptr, size_t size, handleType not None : CUmem Type of handle requested (defines type and size of the `handle` output parameter) flags : unsigned long long - Reserved, must be zero + When requesting + CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD the value + could be :py:obj:`~.CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE`, + otherwise 0. Returns ------- @@ -26783,6 +31894,90 @@ def cuMemGetHandleForAddressRange(dptr, size_t size, handleType not None : CUmem return (CUresult(err), handle) {{endif}} +{{if 'cuMemBatchDecompressAsync' in found_functions}} + +@cython.embedsignature(True) +def cuMemBatchDecompressAsync(paramsArray : Optional[CUmemDecompressParams], size_t count, unsigned int flags, stream): + """ Submit a batch of `count` independent decompression operations. + + Each of the `count` decompression operations is described by a single + entry in the `paramsArray` array. Once the batch has been submitted, + the function will return, and decompression will happen asynchronously + w.r.t. the CPU. To the work completion tracking mechanisms in the CUDA + driver, the batch will be considered a single unit of work and + processed according to stream semantics, i.e., it is not possible to + query the completion of individual decompression operations within a + batch. + + The memory pointed to by each of :py:obj:`~.CUmemDecompressParams.src`, + :py:obj:`~.CUmemDecompressParams.dst`, and + :py:obj:`~.CUmemDecompressParams.dstActBytes`, must be capable of usage + with the hardware decompress feature. That is, for each of said + pointers, the pointer attribute + :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_MEM_DECOMPRESS_CAPABLE` should give + a non-zero value. To ensure this, the memory backing the pointers + should have been allocated using one of the following CUDA memory + allocators: + + - :py:obj:`~.cuMemAlloc()` + + - :py:obj:`~.cuMemCreate()` with the usage flag + :py:obj:`~.CU_MEM_CREATE_USAGE_HW_DECOMPRESS` + + - :py:obj:`~.cuMemAllocFromPoolAsync()` from a pool that was created + with the usage flag + :py:obj:`~.CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS` Additionally, + :py:obj:`~.CUmemDecompressParams.src`, + :py:obj:`~.CUmemDecompressParams.dst`, and + :py:obj:`~.CUmemDecompressParams.dstActBytes`, must all be accessible + from the device associated with the context where `stream` was + created. For information on how to ensure this, see the documentation + for the allocator of interest. + + Parameters + ---------- + paramsArray : :py:obj:`~.CUmemDecompressParams` + The array of structures describing the independent decompression + operations. + count : size_t + The number of entries in `paramsArray` array. + flags : unsigned int + Must be 0. + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream where the work will be enqueued. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` + errorIndex : int + The index into `paramsArray` of the decompression operation for + which the error returned by this function pertains to. If `index` + is SIZE_MAX and the value returned is not :py:obj:`~.CUDA_SUCCESS`, + then the error returned by this function should be considered a + general error that does not pertain to a particular decompression + operation. May be `NULL`, in which case, no index will be recorded + in the event of error. + + See Also + -------- + :py:obj:`~.cuMemAlloc`, :py:obj:`~.cuMemPoolCreate`, :py:obj:`~.cuMemAllocFromPoolAsync` + """ + cdef cydriver.CUstream cystream + if stream is None: + cystream = 0 + elif isinstance(stream, (CUstream,)): + pstream = int(stream) + cystream = pstream + else: + pstream = int(CUstream(stream)) + cystream = pstream + cdef cydriver.CUmemDecompressParams* cyparamsArray_ptr = paramsArray._pvt_ptr if paramsArray != None else NULL + cdef size_t errorIndex = 0 + err = cydriver.cuMemBatchDecompressAsync(cyparamsArray_ptr, count, flags, &errorIndex, cystream) + return (CUresult(err), errorIndex) +{{endif}} + {{if 'cuMemAddressReserve' in found_functions}} @cython.embedsignature(True) @@ -26827,7 +32022,7 @@ def cuMemAddressReserve(size_t size, size_t alignment, addr, unsigned long long paddr = int(CUdeviceptr(addr)) cyaddr = paddr cdef CUdeviceptr ptr = CUdeviceptr() - err = cydriver.cuMemAddressReserve(ptr._ptr, size, alignment, cyaddr, flags) + err = cydriver.cuMemAddressReserve(ptr._pvt_ptr, size, alignment, cyaddr, flags) return (CUresult(err), ptr) {{endif}} @@ -26900,21 +32095,25 @@ def cuMemCreate(size_t size, prop : Optional[CUmemAllocationProp], unsigned long :py:obj:`~.CUmemLocation.type` will result in :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. - Applications can set - :py:obj:`~.CUmemAllocationProp.requestedHandleTypes` to - :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` in order to create allocations - suitable for sharing within an IMEX domain. An IMEX domain is either an - OS instance or a group of securely connected OS instances using the - NVIDIA IMEX daemon. An IMEX channel is a global resource within the - IMEX domain that represents a logical entity that aims to provide fine - grained accessibility control for the participating processes. When - exporter and importer CUDA processes have been granted access to the - same IMEX channel, they can securely share memory. If the allocating - process does not have access setup for an IMEX channel, attempting to - create a :py:obj:`~.CUmemGenericAllocationHandle` with - :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` will result in - :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`. The nvidia-modprobe CLI provides - more information regarding setting up of IMEX channels. + Applications that intend to use :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` + based memory sharing must ensure: (1) `nvidia-caps-imex-channels` + character device is created by the driver and is listed under + /proc/devices (2) have at least one IMEX channel file accessible by the + user launching the application. + + When exporter and importer CUDA processes have been granted access to + the same IMEX channel, they can securely share memory. + + The IMEX channel security model works on a per user basis. Which means + all processes under a user can share memory if the user has access to a + valid IMEX channel. When multi-user isolation is desired, a separate + IMEX channel is required for each user. + + These channel files exist in /dev/nvidia-caps-imex-channels/channel* + and can be created using standard OS native calls like mknod on Linux. + For example: To create channel0 with the major number from + /proc/devices users can execute the following command: `mknod + /dev/nvidia-caps-imex-channels/channel0 c 0` If :py:obj:`~.CUmemAllocationProp`::allocFlags::usage contains :py:obj:`~.CU_MEM_CREATE_USAGE_TILE_POOL` flag then the memory @@ -26944,8 +32143,8 @@ def cuMemCreate(size_t size, prop : Optional[CUmemAllocationProp], unsigned long :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemImportFromShareableHandle` """ cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle() - cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._ptr if prop != None else NULL - err = cydriver.cuMemCreate(handle._ptr, size, cyprop_ptr, flags) + cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop != None else NULL + err = cydriver.cuMemCreate(handle._pvt_ptr, size, cyprop_ptr, flags) return (CUresult(err), handle) {{endif}} @@ -27235,9 +32434,9 @@ def cuMemMapArrayAsync(mapInfoList : Optional[Tuple[CUarrayMapInfo] | List[CUarr if cymapInfoList is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(mapInfoList)) + 'x' + str(sizeof(cydriver.CUarrayMapInfo))) for idx in range(len(mapInfoList)): - string.memcpy(&cymapInfoList[idx], (mapInfoList[idx])._ptr, sizeof(cydriver.CUarrayMapInfo)) + string.memcpy(&cymapInfoList[idx], (mapInfoList[idx])._pvt_ptr, sizeof(cydriver.CUarrayMapInfo)) if count > len(mapInfoList): raise RuntimeError("List is too small: " + str(len(mapInfoList)) + " < " + str(count)) - err = cydriver.cuMemMapArrayAsync((mapInfoList[0])._ptr if len(mapInfoList) == 1 else cymapInfoList, count, cyhStream) + err = cydriver.cuMemMapArrayAsync((mapInfoList[0])._pvt_ptr if len(mapInfoList) == 1 else cymapInfoList, count, cyhStream) if cymapInfoList is not NULL: free(cymapInfoList) return (CUresult(err),) @@ -27354,9 +32553,9 @@ def cuMemSetAccess(ptr, size_t size, desc : Optional[Tuple[CUmemAccessDesc] | Li if cydesc is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(desc)) + 'x' + str(sizeof(cydriver.CUmemAccessDesc))) for idx in range(len(desc)): - string.memcpy(&cydesc[idx], (desc[idx])._ptr, sizeof(cydriver.CUmemAccessDesc)) + string.memcpy(&cydesc[idx], (desc[idx])._pvt_ptr, sizeof(cydriver.CUmemAccessDesc)) if count > len(desc): raise RuntimeError("List is too small: " + str(len(desc)) + " < " + str(count)) - err = cydriver.cuMemSetAccess(cyptr, size, (desc[0])._ptr if len(desc) == 1 else cydesc, count) + err = cydriver.cuMemSetAccess(cyptr, size, (desc[0])._pvt_ptr if len(desc) == 1 else cydesc, count) if cydesc is not NULL: free(cydesc) return (CUresult(err),) @@ -27396,7 +32595,7 @@ def cuMemGetAccess(location : Optional[CUmemLocation], ptr): pptr = int(CUdeviceptr(ptr)) cyptr = pptr cdef unsigned long long flags = 0 - cdef cydriver.CUmemLocation* cylocation_ptr = location._ptr if location != None else NULL + cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location != None else NULL err = cydriver.cuMemGetAccess(&flags, cylocation_ptr, cyptr) return (CUresult(err), flags) {{endif}} @@ -27502,7 +32701,7 @@ def cuMemImportFromShareableHandle(osHandle, shHandleType not None : CUmemAlloca cyosHandle = utils.HelperInputVoidPtr(osHandle) cdef void* cyosHandle_ptr = cyosHandle.cptr cdef cydriver.CUmemAllocationHandleType cyshHandleType = shHandleType.value - err = cydriver.cuMemImportFromShareableHandle(handle._ptr, cyosHandle_ptr, cyshHandleType) + err = cydriver.cuMemImportFromShareableHandle(handle._pvt_ptr, cyosHandle_ptr, cyshHandleType) return (CUresult(err), handle) {{endif}} @@ -27536,7 +32735,7 @@ def cuMemGetAllocationGranularity(prop : Optional[CUmemAllocationProp], option n :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemMap` """ cdef size_t granularity = 0 - cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._ptr if prop != None else NULL + cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop != None else NULL cdef cydriver.CUmemAllocationGranularity_flags cyoption = option.value err = cydriver.cuMemGetAllocationGranularity(&granularity, cyprop_ptr, cyoption) return (CUresult(err), granularity) @@ -27575,7 +32774,7 @@ def cuMemGetAllocationPropertiesFromHandle(handle): phandle = int(CUmemGenericAllocationHandle(handle)) cyhandle = phandle cdef CUmemAllocationProp prop = CUmemAllocationProp() - err = cydriver.cuMemGetAllocationPropertiesFromHandle(prop._ptr, cyhandle) + err = cydriver.cuMemGetAllocationPropertiesFromHandle(prop._pvt_ptr, cyhandle) return (CUresult(err), prop) {{endif}} @@ -27613,7 +32812,7 @@ def cuMemRetainAllocationHandle(addr): cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle() cyaddr = utils.HelperInputVoidPtr(addr) cdef void* cyaddr_ptr = cyaddr.cptr - err = cydriver.cuMemRetainAllocationHandle(handle._ptr, cyaddr_ptr) + err = cydriver.cuMemRetainAllocationHandle(handle._pvt_ptr, cyaddr_ptr) return (CUresult(err), handle) {{endif}} @@ -27714,7 +32913,7 @@ def cuMemAllocAsync(size_t bytesize, hStream): phStream = int(CUstream(hStream)) cyhStream = phStream cdef CUdeviceptr dptr = CUdeviceptr() - err = cydriver.cuMemAllocAsync(dptr._ptr, bytesize, cyhStream) + err = cydriver.cuMemAllocAsync(dptr._pvt_ptr, bytesize, cyhStream) return (CUresult(err), dptr) {{endif}} @@ -27968,9 +33167,9 @@ def cuMemPoolSetAccess(pool, map : Optional[Tuple[CUmemAccessDesc] | List[CUmemA if cymap is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(map)) + 'x' + str(sizeof(cydriver.CUmemAccessDesc))) for idx in range(len(map)): - string.memcpy(&cymap[idx], (map[idx])._ptr, sizeof(cydriver.CUmemAccessDesc)) + string.memcpy(&cymap[idx], (map[idx])._pvt_ptr, sizeof(cydriver.CUmemAccessDesc)) if count > len(map): raise RuntimeError("List is too small: " + str(len(map)) + " < " + str(count)) - err = cydriver.cuMemPoolSetAccess(cypool, (map[0])._ptr if len(map) == 1 else cymap, count) + err = cydriver.cuMemPoolSetAccess(cypool, (map[0])._pvt_ptr if len(map) == 1 else cymap, count) if cymap is not NULL: free(cymap) return (CUresult(err),) @@ -28013,7 +33212,7 @@ def cuMemPoolGetAccess(memPool, location : Optional[CUmemLocation]): pmemPool = int(CUmemoryPool(memPool)) cymemPool = pmemPool cdef cydriver.CUmemAccess_flags flags - cdef cydriver.CUmemLocation* cylocation_ptr = location._ptr if location != None else NULL + cdef cydriver.CUmemLocation* cylocation_ptr = location._pvt_ptr if location != None else NULL err = cydriver.cuMemPoolGetAccess(&flags, cymemPool, cylocation_ptr) return (CUresult(err), CUmemAccess_flags(flags)) {{endif}} @@ -28044,20 +33243,25 @@ def cuMemPoolCreate(poolProps : Optional[CUmemPoolProps]): :py:obj:`~.CUmemPoolProps.maxSize`. If set to 0, the maximum size of the pool will default to a system dependent value. - Applications can set :py:obj:`~.CUmemPoolProps.handleTypes` to - :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` in order to create - :py:obj:`~.CUmemoryPool` suitable for sharing within an IMEX domain. An - IMEX domain is either an OS instance or a group of securely connected - OS instances using the NVIDIA IMEX daemon. An IMEX channel is a global - resource within the IMEX domain that represents a logical entity that - aims to provide fine grained accessibility control for the - participating processes. When exporter and importer CUDA processes have - been granted access to the same IMEX channel, they can securely share - memory. If the allocating process does not have access setup for an - IMEX channel, attempting to export a :py:obj:`~.CUmemoryPool` with - :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` will result in - :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`. The nvidia-modprobe CLI provides - more information regarding setting up of IMEX channels. + Applications that intend to use :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` + based memory sharing must ensure: (1) `nvidia-caps-imex-channels` + character device is created by the driver and is listed under + /proc/devices (2) have at least one IMEX channel file accessible by the + user launching the application. + + When exporter and importer CUDA processes have been granted access to + the same IMEX channel, they can securely share memory. + + The IMEX channel security model works on a per user basis. Which means + all processes under a user can share memory if the user has access to a + valid IMEX channel. When multi-user isolation is desired, a separate + IMEX channel is required for each user. + + These channel files exist in /dev/nvidia-caps-imex-channels/channel* + and can be created using standard OS native calls like mknod on Linux. + For example: To create channel0 with the major number from + /proc/devices users can execute the following command: `mknod + /dev/nvidia-caps-imex-channels/channel0 c 0` Parameters ---------- @@ -28080,8 +33284,8 @@ def cuMemPoolCreate(poolProps : Optional[CUmemPoolProps]): Specifying CU_MEM_HANDLE_TYPE_NONE creates a memory pool that will not support IPC. """ cdef CUmemoryPool pool = CUmemoryPool() - cdef cydriver.CUmemPoolProps* cypoolProps_ptr = poolProps._ptr if poolProps != None else NULL - err = cydriver.cuMemPoolCreate(pool._ptr, cypoolProps_ptr) + cdef cydriver.CUmemPoolProps* cypoolProps_ptr = poolProps._pvt_ptr if poolProps != None else NULL + err = cydriver.cuMemPoolCreate(pool._pvt_ptr, cypoolProps_ptr) return (CUresult(err), pool) {{endif}} @@ -28185,7 +33389,7 @@ def cuMemAllocFromPoolAsync(size_t bytesize, pool, hStream): ppool = int(CUmemoryPool(pool)) cypool = ppool cdef CUdeviceptr dptr = CUdeviceptr() - err = cydriver.cuMemAllocFromPoolAsync(dptr._ptr, bytesize, cypool, cyhStream) + err = cydriver.cuMemAllocFromPoolAsync(dptr._pvt_ptr, bytesize, cypool, cyhStream) return (CUresult(err), dptr) {{endif}} @@ -28286,7 +33490,7 @@ def cuMemPoolImportFromShareableHandle(handle, handleType not None : CUmemAlloca cyhandle = utils.HelperInputVoidPtr(handle) cdef void* cyhandle_ptr = cyhandle.cptr cdef cydriver.CUmemAllocationHandleType cyhandleType = handleType.value - err = cydriver.cuMemPoolImportFromShareableHandle(pool_out._ptr, cyhandle_ptr, cyhandleType, flags) + err = cydriver.cuMemPoolImportFromShareableHandle(pool_out._pvt_ptr, cyhandle_ptr, cyhandleType, flags) return (CUresult(err), pool_out) {{endif}} @@ -28327,7 +33531,7 @@ def cuMemPoolExportPointer(ptr): pptr = int(CUdeviceptr(ptr)) cyptr = pptr cdef CUmemPoolPtrExportData shareData_out = CUmemPoolPtrExportData() - err = cydriver.cuMemPoolExportPointer(shareData_out._ptr, cyptr) + err = cydriver.cuMemPoolExportPointer(shareData_out._pvt_ptr, cyptr) return (CUresult(err), shareData_out) {{endif}} @@ -28377,8 +33581,8 @@ def cuMemPoolImportPointer(pool, shareData : Optional[CUmemPoolPtrExportData]): ppool = int(CUmemoryPool(pool)) cypool = ppool cdef CUdeviceptr ptr_out = CUdeviceptr() - cdef cydriver.CUmemPoolPtrExportData* cyshareData_ptr = shareData._ptr if shareData != None else NULL - err = cydriver.cuMemPoolImportPointer(ptr_out._ptr, cypool, cyshareData_ptr) + cdef cydriver.CUmemPoolPtrExportData* cyshareData_ptr = shareData._pvt_ptr if shareData != None else NULL + err = cydriver.cuMemPoolImportPointer(ptr_out._pvt_ptr, cypool, cyshareData_ptr) return (CUresult(err), ptr_out) {{endif}} @@ -28435,8 +33639,8 @@ def cuMulticastCreate(prop : Optional[CUmulticastObjectProp]): :py:obj:`~.cuMemCreate`, :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemImportFromShareableHandle` """ cdef CUmemGenericAllocationHandle mcHandle = CUmemGenericAllocationHandle() - cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._ptr if prop != None else NULL - err = cydriver.cuMulticastCreate(mcHandle._ptr, cyprop_ptr) + cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop != None else NULL + err = cydriver.cuMulticastCreate(mcHandle._pvt_ptr, cyprop_ptr) return (CUresult(err), mcHandle) {{endif}} @@ -28735,7 +33939,7 @@ def cuMulticastGetGranularity(prop : Optional[CUmulticastObjectProp], option not :py:obj:`~.cuMulticastCreate`, :py:obj:`~.cuMulticastBindMem`, :py:obj:`~.cuMulticastBindAddr`, :py:obj:`~.cuMulticastUnbind` """ cdef size_t granularity = 0 - cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._ptr if prop != None else NULL + cdef cydriver.CUmulticastObjectProp* cyprop_ptr = prop._pvt_ptr if prop != None else NULL cdef cydriver.CUmulticastGranularity_flags cyoption = option.value err = cydriver.cuMulticastGetGranularity(&granularity, cyprop_ptr, cyoption) return (CUresult(err), granularity) @@ -28890,6 +34094,12 @@ def cuPointerGetAttribute(attribute not None : CUpointer_attribute, ptr): - Returns in `*data` the handle to the mempool that the allocation was obtained from. + - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE`: + + - Returns in `*data` a boolean that indicates whether the pointer + points to memory that is capable to be used for hardware accelerated + decompression. + Note that for most allocations in the unified virtual address space the host and device pointer for accessing the allocation will be the same. The exceptions to this are @@ -29184,7 +34394,7 @@ def cuMemPrefetchAsync_v2(devPtr, size_t count, location not None : CUmemLocatio else: pdevPtr = int(CUdeviceptr(devPtr)) cydevPtr = pdevPtr - err = cydriver.cuMemPrefetchAsync_v2(cydevPtr, count, location._ptr[0], flags, cyhStream) + err = cydriver.cuMemPrefetchAsync_v2(cydevPtr, count, location._pvt_ptr[0], flags, cyhStream) return (CUresult(err),) {{endif}} @@ -29576,7 +34786,7 @@ def cuMemAdvise_v2(devPtr, size_t count, advice not None : CUmem_advise, locatio pdevPtr = int(CUdeviceptr(devPtr)) cydevPtr = pdevPtr cdef cydriver.CUmem_advise cyadvice = advice.value - err = cydriver.cuMemAdvise_v2(cydevPtr, count, cyadvice, location._ptr[0]) + err = cydriver.cuMemAdvise_v2(cydevPtr, count, cyadvice, location._pvt_ptr[0]) return (CUresult(err),) {{endif}} @@ -29915,6 +35125,8 @@ def cuPointerGetAttributes(unsigned int numAttributes, attributes : Optional[Tup - :py:obj:`~.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE` + - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE` + Unlike :py:obj:`~.cuPointerGetAttribute`, this function will not return an error when the `ptr` encountered is not a valid CUDA pointer. Instead, the attributes are assigned default NULL values and @@ -29999,10 +35211,10 @@ def cuStreamCreate(unsigned int Flags): See Also -------- - :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags` + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice` :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags` """ cdef CUstream phStream = CUstream() - err = cydriver.cuStreamCreate(phStream._ptr, Flags) + err = cydriver.cuStreamCreate(phStream._pvt_ptr, Flags) return (CUresult(err), phStream) {{endif}} @@ -30045,7 +35257,7 @@ def cuStreamCreateWithPriority(unsigned int flags, int priority): See Also -------- - :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreateWithPriority` + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice` :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreateWithPriority` Notes ----- @@ -30054,7 +35266,7 @@ def cuStreamCreateWithPriority(unsigned int flags, int priority): In the current implementation, only compute kernels launched in priority streams are affected by the stream's priority. Stream priorities have no effect on host-to-device and device-to-host memory operations. """ cdef CUstream phStream = CUstream() - err = cydriver.cuStreamCreateWithPriority(phStream._ptr, flags, priority) + err = cydriver.cuStreamCreateWithPriority(phStream._pvt_ptr, flags, priority) return (CUresult(err), phStream) {{endif}} @@ -30088,7 +35300,7 @@ def cuStreamGetPriority(hStream): See Also -------- - :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cudaStreamGetPriority` + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice` :py:obj:`~.cudaStreamGetPriority` """ cdef cydriver.CUstream cyhStream if hStream is None: @@ -30104,6 +35316,44 @@ def cuStreamGetPriority(hStream): return (CUresult(err), priority) {{endif}} +{{if 'cuStreamGetDevice' in found_functions}} + +@cython.embedsignature(True) +def cuStreamGetDevice(hStream): + """ Returns the device handle of the stream. + + Returns in `*device` the device handle of the stream + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY` + device : :py:obj:`~.CUdevice` + Returns the device to which a stream belongs + + See Also + -------- + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetFlags` + """ + cdef cydriver.CUstream cyhStream + if hStream is None: + cyhStream = 0 + elif isinstance(hStream, (CUstream,)): + phStream = int(hStream) + cyhStream = phStream + else: + phStream = int(CUstream(hStream)) + cyhStream = phStream + cdef CUdevice device = CUdevice() + err = cydriver.cuStreamGetDevice(cyhStream, device._pvt_ptr) + return (CUresult(err), device) +{{endif}} + {{if 'cuStreamGetFlags' in found_functions}} @cython.embedsignature(True) @@ -30131,7 +35381,7 @@ def cuStreamGetFlags(hStream): See Also -------- - :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cudaStreamGetFlags` + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cudaStreamGetFlags` :py:obj:`~.cuStreamGetDevice` """ cdef cydriver.CUstream cyhStream if hStream is None: @@ -30250,7 +35500,7 @@ def cuStreamGetCtx(hStream): See Also -------- - :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cuStreamGetCtx_v2`, :py:obj:`~.cudaStreamCreateWithFlags` + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice` :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cuStreamGetCtx_v2`, :py:obj:`~.cudaStreamCreateWithFlags` """ cdef cydriver.CUstream cyhStream if hStream is None: @@ -30262,7 +35512,7 @@ def cuStreamGetCtx(hStream): phStream = int(CUstream(hStream)) cyhStream = phStream cdef CUcontext pctx = CUcontext() - err = cydriver.cuStreamGetCtx(cyhStream, pctx._ptr) + err = cydriver.cuStreamGetCtx(cyhStream, pctx._pvt_ptr) return (CUresult(err), pctx) {{endif}} @@ -30325,7 +35575,7 @@ def cuStreamGetCtx_v2(hStream): See Also -------- - :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate` :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`, + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate` :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice` :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags`, """ cdef cydriver.CUstream cyhStream if hStream is None: @@ -30338,7 +35588,7 @@ def cuStreamGetCtx_v2(hStream): cyhStream = phStream cdef CUcontext pCtx = CUcontext() cdef CUgreenCtx pGreenCtx = CUgreenCtx() - err = cydriver.cuStreamGetCtx_v2(cyhStream, pCtx._ptr, pGreenCtx._ptr) + err = cydriver.cuStreamGetCtx_v2(cyhStream, pCtx._pvt_ptr, pGreenCtx._pvt_ptr) return (CUresult(err), pCtx, pGreenCtx) {{endif}} @@ -30638,18 +35888,18 @@ def cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies : Optional[Tuple[C raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] cdef cydriver.CUgraphEdgeData* cydependencyData = NULL if len(dependencyData) > 0: cydependencyData = calloc(len(dependencyData), sizeof(cydriver.CUgraphEdgeData)) if cydependencyData is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) for idx in range(len(dependencyData)): - string.memcpy(&cydependencyData[idx], (dependencyData[idx])._ptr, sizeof(cydriver.CUgraphEdgeData)) + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cydriver.CUgraphEdgeData)) if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) if numDependencies > len(dependencyData): raise RuntimeError("List is too small: " + str(len(dependencyData)) + " < " + str(numDependencies)) cdef cydriver.CUstreamCaptureMode cymode = mode.value - err = cydriver.cuStreamBeginCaptureToGraph(cyhStream, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, (dependencyData[0])._ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, cymode) + err = cydriver.cuStreamBeginCaptureToGraph(cyhStream, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, (dependencyData[0])._pvt_ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, cymode) if cydependencies is not NULL: free(cydependencies) if cydependencyData is not NULL: @@ -30770,7 +36020,7 @@ def cuStreamEndCapture(hStream): phStream = int(CUstream(hStream)) cyhStream = phStream cdef CUgraph phGraph = CUgraph() - err = cydriver.cuStreamEndCapture(cyhStream, phGraph._ptr) + err = cydriver.cuStreamEndCapture(cyhStream, phGraph._pvt_ptr) return (CUresult(err), phGraph) {{endif}} @@ -30911,7 +36161,7 @@ def cuStreamGetCaptureInfo(hStream): cdef const cydriver.CUgraphNode* cydependencies_out = NULL pydependencies_out = [] cdef size_t numDependencies_out = 0 - err = cydriver.cuStreamGetCaptureInfo(cyhStream, &captureStatus_out, id_out._ptr, graph_out._ptr, &cydependencies_out, &numDependencies_out) + err = cydriver.cuStreamGetCaptureInfo(cyhStream, &captureStatus_out, id_out._pvt_ptr, graph_out._pvt_ptr, &cydependencies_out, &numDependencies_out) if CUresult(err) == CUresult(0): pydependencies_out = [CUgraphNode(init_value=cydependencies_out[idx]) for idx in range(numDependencies_out)] return (CUresult(err), CUstreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, numDependencies_out) @@ -31007,7 +36257,7 @@ def cuStreamGetCaptureInfo_v3(hStream): cdef const cydriver.CUgraphEdgeData* cyedgeData_out = NULL pyedgeData_out = [] cdef size_t numDependencies_out = 0 - err = cydriver.cuStreamGetCaptureInfo_v3(cyhStream, &captureStatus_out, id_out._ptr, graph_out._ptr, &cydependencies_out, &cyedgeData_out, &numDependencies_out) + err = cydriver.cuStreamGetCaptureInfo_v3(cyhStream, &captureStatus_out, id_out._pvt_ptr, graph_out._pvt_ptr, &cydependencies_out, &cyedgeData_out, &numDependencies_out) if CUresult(err) == CUresult(0): pydependencies_out = [CUgraphNode(init_value=cydependencies_out[idx]) for idx in range(numDependencies_out)] if CUresult(err) == CUresult(0): @@ -31081,9 +36331,9 @@ def cuStreamUpdateCaptureDependencies(hStream, dependencies : Optional[Tuple[CUg raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - err = cydriver.cuStreamUpdateCaptureDependencies(cyhStream, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, flags) + err = cydriver.cuStreamUpdateCaptureDependencies(cyhStream, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, flags) if cydependencies is not NULL: free(cydependencies) return (CUresult(err),) @@ -31156,15 +36406,15 @@ def cuStreamUpdateCaptureDependencies_v2(hStream, dependencies : Optional[Tuple[ raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] cdef cydriver.CUgraphEdgeData* cydependencyData = NULL if len(dependencyData) > 0: cydependencyData = calloc(len(dependencyData), sizeof(cydriver.CUgraphEdgeData)) if cydependencyData is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) for idx in range(len(dependencyData)): - string.memcpy(&cydependencyData[idx], (dependencyData[idx])._ptr, sizeof(cydriver.CUgraphEdgeData)) - err = cydriver.cuStreamUpdateCaptureDependencies_v2(cyhStream, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, (dependencyData[0])._ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, flags) + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cydriver.CUgraphEdgeData)) + err = cydriver.cuStreamUpdateCaptureDependencies_v2(cyhStream, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, (dependencyData[0])._pvt_ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, flags) if cydependencies is not NULL: free(cydependencies) if cydependencyData is not NULL: @@ -31493,7 +36743,7 @@ def cuStreamGetAttribute(hStream, attr not None : CUstreamAttrID): cyhStream = phStream cdef cydriver.CUstreamAttrID cyattr = attr.value cdef CUstreamAttrValue value_out = CUstreamAttrValue() - err = cydriver.cuStreamGetAttribute(cyhStream, cyattr, value_out._ptr) + err = cydriver.cuStreamGetAttribute(cyhStream, cyattr, value_out._pvt_ptr) return (CUresult(err), value_out) {{endif}} @@ -31535,7 +36785,7 @@ def cuStreamSetAttribute(hStream, attr not None : CUstreamAttrID, value : Option phStream = int(CUstream(hStream)) cyhStream = phStream cdef cydriver.CUstreamAttrID cyattr = attr.value - cdef cydriver.CUstreamAttrValue* cyvalue_ptr = value._ptr if value != None else NULL + cdef cydriver.CUstreamAttrValue* cyvalue_ptr = value._pvt_ptr if value != None else NULL err = cydriver.cuStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) return (CUresult(err),) {{endif}} @@ -31584,7 +36834,7 @@ def cuEventCreate(unsigned int Flags): :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cuEventElapsedTime`, :py:obj:`~.cudaEventCreate`, :py:obj:`~.cudaEventCreateWithFlags` """ cdef CUevent phEvent = CUevent() - err = cydriver.cuEventCreate(phEvent._ptr, Flags) + err = cydriver.cuEventCreate(phEvent._pvt_ptr, Flags) return (CUresult(err), phEvent) {{endif}} @@ -31877,6 +37127,10 @@ def cuEventElapsedTime(hStart, hEnd): created with the :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag, then this function will return :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`. + Note there is a later version of this API, + :py:obj:`~.cuEventElapsedTime_v2`. It will supplant this version in + CUDA 13.0, which is retained for minor version compatibility. + Parameters ---------- hStart : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` @@ -31918,6 +37172,78 @@ def cuEventElapsedTime(hStart, hEnd): return (CUresult(err), pMilliseconds) {{endif}} +{{if 'cuEventElapsedTime_v2' in found_functions}} + +@cython.embedsignature(True) +def cuEventElapsedTime_v2(hStart, hEnd): + """ Computes the elapsed time between two events. + + Computes the elapsed time between two events (in milliseconds with a + resolution of around 0.5 microseconds). Note this API is not guaranteed + to return the latest errors for pending work. As such this API is + intended to serve as an elapsed time calculation only and any polling + for completion on the events to be compared should be done with + :py:obj:`~.cuEventQuery` instead. + + If either event was last recorded in a non-NULL stream, the resulting + time may be greater than expected (even if both used the same stream + handle). This happens because the :py:obj:`~.cuEventRecord()` operation + takes place asynchronously and there is no guarantee that the measured + latency is actually just between the two events. Any number of other + different stream operations could execute in between the two measured + events, thus altering the timing in a significant way. + + If :py:obj:`~.cuEventRecord()` has not been called on either event then + :py:obj:`~.CUDA_ERROR_INVALID_HANDLE` is returned. If + :py:obj:`~.cuEventRecord()` has been called on both events but one or + both of them has not yet been completed (that is, + :py:obj:`~.cuEventQuery()` would return + :py:obj:`~.CUDA_ERROR_NOT_READY` on at least one of the events), + :py:obj:`~.CUDA_ERROR_NOT_READY` is returned. If either event was + created with the :py:obj:`~.CU_EVENT_DISABLE_TIMING` flag, then this + function will return :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`. + + Parameters + ---------- + hStart : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Starting event + hEnd : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Ending event + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_HANDLE`, :py:obj:`~.CUDA_ERROR_NOT_READY`, :py:obj:`~.CUDA_ERROR_UNKNOWN` + pMilliseconds : float + Time between `hStart` and `hEnd` in ms + + See Also + -------- + :py:obj:`~.cuEventCreate`, :py:obj:`~.cuEventRecord`, :py:obj:`~.cuEventQuery`, :py:obj:`~.cuEventSynchronize`, :py:obj:`~.cuEventDestroy`, :py:obj:`~.cudaEventElapsedTime` + """ + cdef cydriver.CUevent cyhEnd + if hEnd is None: + cyhEnd = 0 + elif isinstance(hEnd, (CUevent,)): + phEnd = int(hEnd) + cyhEnd = phEnd + else: + phEnd = int(CUevent(hEnd)) + cyhEnd = phEnd + cdef cydriver.CUevent cyhStart + if hStart is None: + cyhStart = 0 + elif isinstance(hStart, (CUevent,)): + phStart = int(hStart) + cyhStart = phStart + else: + phStart = int(CUevent(hStart)) + cyhStart = phStart + cdef float pMilliseconds = 0 + err = cydriver.cuEventElapsedTime_v2(&pMilliseconds, cyhStart, cyhEnd) + return (CUresult(err), pMilliseconds) +{{endif}} + {{if 'cuImportExternalMemory' in found_functions}} @cython.embedsignature(True) @@ -32066,8 +37392,8 @@ def cuImportExternalMemory(memHandleDesc : Optional[CUDA_EXTERNAL_MEMORY_HANDLE_ and Cache Control" chapter from Vulkan specification. """ cdef CUexternalMemory extMem_out = CUexternalMemory() - cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC* cymemHandleDesc_ptr = memHandleDesc._ptr if memHandleDesc != None else NULL - err = cydriver.cuImportExternalMemory(extMem_out._ptr, cymemHandleDesc_ptr) + cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC* cymemHandleDesc_ptr = memHandleDesc._pvt_ptr if memHandleDesc != None else NULL + err = cydriver.cuImportExternalMemory(extMem_out._pvt_ptr, cymemHandleDesc_ptr) return (CUresult(err), extMem_out) {{endif}} @@ -32134,8 +37460,8 @@ def cuExternalMemoryGetMappedBuffer(extMem, bufferDesc : Optional[CUDA_EXTERNAL_ pextMem = int(CUexternalMemory(extMem)) cyextMem = pextMem cdef CUdeviceptr devPtr = CUdeviceptr() - cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC* cybufferDesc_ptr = bufferDesc._ptr if bufferDesc != None else NULL - err = cydriver.cuExternalMemoryGetMappedBuffer(devPtr._ptr, cyextMem, cybufferDesc_ptr) + cdef cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC* cybufferDesc_ptr = bufferDesc._pvt_ptr if bufferDesc != None else NULL + err = cydriver.cuExternalMemoryGetMappedBuffer(devPtr._pvt_ptr, cyextMem, cybufferDesc_ptr) return (CUresult(err), devPtr) {{endif}} @@ -32205,8 +37531,8 @@ def cuExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : Optional[CUDA_E pextMem = int(CUexternalMemory(extMem)) cyextMem = pextMem cdef CUmipmappedArray mipmap = CUmipmappedArray() - cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* cymipmapDesc_ptr = mipmapDesc._ptr if mipmapDesc != None else NULL - err = cydriver.cuExternalMemoryGetMappedMipmappedArray(mipmap._ptr, cyextMem, cymipmapDesc_ptr) + cdef cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC* cymipmapDesc_ptr = mipmapDesc._pvt_ptr if mipmapDesc != None else NULL + err = cydriver.cuExternalMemoryGetMappedMipmappedArray(mipmap._pvt_ptr, cyextMem, cymipmapDesc_ptr) return (CUresult(err), mipmap) {{endif}} @@ -32391,8 +37717,8 @@ def cuImportExternalSemaphore(semHandleDesc : Optional[CUDA_EXTERNAL_SEMAPHORE_H :py:obj:`~.cuDestroyExternalSemaphore`, :py:obj:`~.cuSignalExternalSemaphoresAsync`, :py:obj:`~.cuWaitExternalSemaphoresAsync` """ cdef CUexternalSemaphore extSem_out = CUexternalSemaphore() - cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* cysemHandleDesc_ptr = semHandleDesc._ptr if semHandleDesc != None else NULL - err = cydriver.cuImportExternalSemaphore(extSem_out._ptr, cysemHandleDesc_ptr) + cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC* cysemHandleDesc_ptr = semHandleDesc._pvt_ptr if semHandleDesc != None else NULL + err = cydriver.cuImportExternalSemaphore(extSem_out._pvt_ptr, cysemHandleDesc_ptr) return (CUresult(err), extSem_out) {{endif}} @@ -32513,17 +37839,17 @@ def cuSignalExternalSemaphoresAsync(extSemArray : Optional[Tuple[CUexternalSemap raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) else: for idx in range(len(extSemArray)): - cyextSemArray[idx] = (extSemArray[idx])._ptr[0] + cyextSemArray[idx] = (extSemArray[idx])._pvt_ptr[0] cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* cyparamsArray = NULL if len(paramsArray) > 0: cyparamsArray = calloc(len(paramsArray), sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) if cyparamsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS))) for idx in range(len(paramsArray)): - string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) + string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS)) if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems)) if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems)) - err = cydriver.cuSignalExternalSemaphoresAsync((extSemArray[0])._ptr if len(extSemArray) == 1 else cyextSemArray, (paramsArray[0])._ptr if len(paramsArray) == 1 else cyparamsArray, numExtSems, cystream) + err = cydriver.cuSignalExternalSemaphoresAsync((extSemArray[0])._pvt_ptr if len(extSemArray) == 1 else cyextSemArray, (paramsArray[0])._pvt_ptr if len(paramsArray) == 1 else cyparamsArray, numExtSems, cystream) if cyextSemArray is not NULL: free(cyextSemArray) if cyparamsArray is not NULL: @@ -32639,17 +37965,17 @@ def cuWaitExternalSemaphoresAsync(extSemArray : Optional[Tuple[CUexternalSemapho raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(cydriver.CUexternalSemaphore))) else: for idx in range(len(extSemArray)): - cyextSemArray[idx] = (extSemArray[idx])._ptr[0] + cyextSemArray[idx] = (extSemArray[idx])._pvt_ptr[0] cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* cyparamsArray = NULL if len(paramsArray) > 0: cyparamsArray = calloc(len(paramsArray), sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) if cyparamsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS))) for idx in range(len(paramsArray)): - string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) + string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._pvt_ptr, sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS)) if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems)) if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems)) - err = cydriver.cuWaitExternalSemaphoresAsync((extSemArray[0])._ptr if len(extSemArray) == 1 else cyextSemArray, (paramsArray[0])._ptr if len(paramsArray) == 1 else cyparamsArray, numExtSems, cystream) + err = cydriver.cuWaitExternalSemaphoresAsync((extSemArray[0])._pvt_ptr if len(extSemArray) == 1 else cyextSemArray, (paramsArray[0])._pvt_ptr if len(paramsArray) == 1 else cyparamsArray, numExtSems, cystream) if cyextSemArray is not NULL: free(cyextSemArray) if cyparamsArray is not NULL: @@ -33038,8 +38364,8 @@ def cuStreamBatchMemOp(stream, unsigned int count, paramArray : Optional[Tuple[C if cyparamArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramArray)) + 'x' + str(sizeof(cydriver.CUstreamBatchMemOpParams))) for idx in range(len(paramArray)): - string.memcpy(&cyparamArray[idx], (paramArray[idx])._ptr, sizeof(cydriver.CUstreamBatchMemOpParams)) - err = cydriver.cuStreamBatchMemOp(cystream, count, (paramArray[0])._ptr if len(paramArray) == 1 else cyparamArray, flags) + string.memcpy(&cyparamArray[idx], (paramArray[idx])._pvt_ptr, sizeof(cydriver.CUstreamBatchMemOpParams)) + err = cydriver.cuStreamBatchMemOp(cystream, count, (paramArray[0])._pvt_ptr if len(paramArray) == 1 else cyparamArray, flags) if cyparamArray is not NULL: free(cyparamArray) return (CUresult(err),) @@ -33377,7 +38703,7 @@ def cuFuncGetModule(hfunc): phfunc = int(CUfunction(hfunc)) cyhfunc = phfunc cdef CUmodule hmod = CUmodule() - err = cydriver.cuFuncGetModule(hmod._ptr, cyhfunc) + err = cydriver.cuFuncGetModule(hmod._pvt_ptr, cyhfunc) return (CUresult(err), hmod) {{endif}} @@ -33827,6 +39153,38 @@ def cuLaunchKernelEx(config : Optional[CUlaunchConfig], f, kernelParams, void_pt Graphs containing one or more device-updatable node also do not allow multiple instantiation. + :py:obj:`~.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION` allows the + kernel launch to specify a preferred substitute cluster dimension. + Blocks may be grouped according to either the dimensions specified with + this attribute (grouped into a "preferred substitute cluster"), or the + one specified with :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` + attribute (grouped into a "regular cluster"). The cluster dimensions of + a "preferred substitute cluster" shall be an integer multiple greater + than zero of the regular cluster dimensions. The device will attempt - + on a best-effort basis - to group thread blocks into preferred clusters + over grouping them into regular clusters. When it deems necessary + (primarily when the device temporarily runs out of physical resources + to launch the larger preferred clusters), the device may switch to + launch the regular clusters instead to attempt to utilize as much of + the physical device resources as possible. + + Each type of cluster will have its enumeration / coordinate setup as if + the grid consists solely of its type of cluster. For example, if the + preferred substitute cluster dimensions double the regular cluster + dimensions, there might be simultaneously a regular cluster indexed at + (1,0,0), and a preferred cluster indexed at (1,0,0). In this example, + the preferred substitute cluster (1,0,0) replaces regular clusters + (2,0,0) and (3,0,0) and groups their blocks. + + This attribute will only take effect when a regular cluster dimension + has been specified. The preferred substitute The preferred substitute + cluster dimension must be an integer multiple greater than zero of the + regular cluster dimension and must divide the grid. It must also be no + more than `maxBlocksPerCluster`, if it is set in the kernel's + `__launch_bounds__`. Otherwise it must be less than the maximum value + the driver can support. Otherwise, setting this attribute to a value + physically unable to fit on any particular device is permitted. + The effect of other attributes is consistent with their effect when set via persistent APIs. @@ -33883,7 +39241,7 @@ def cuLaunchKernelEx(config : Optional[CUlaunchConfig], f, kernelParams, void_pt else: pf = int(CUfunction(f)) cyf = pf - cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._ptr if config != None else NULL + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config != None else NULL cykernelParams = utils.HelperKernelParams(kernelParams) err = cydriver.cuLaunchKernelEx(cyconfig_ptr, cyf, cykernelParams.ckernelParams, extra) return (CUresult(err),) @@ -34165,9 +39523,9 @@ def cuLaunchCooperativeKernelMultiDevice(launchParamsList : Optional[Tuple[CUDA_ if cylaunchParamsList is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(launchParamsList)) + 'x' + str(sizeof(cydriver.CUDA_LAUNCH_PARAMS))) for idx in range(len(launchParamsList)): - string.memcpy(&cylaunchParamsList[idx], (launchParamsList[idx])._ptr, sizeof(cydriver.CUDA_LAUNCH_PARAMS)) + string.memcpy(&cylaunchParamsList[idx], (launchParamsList[idx])._pvt_ptr, sizeof(cydriver.CUDA_LAUNCH_PARAMS)) if numDevices > len(launchParamsList): raise RuntimeError("List is too small: " + str(len(launchParamsList)) + " < " + str(numDevices)) - err = cydriver.cuLaunchCooperativeKernelMultiDevice((launchParamsList[0])._ptr if len(launchParamsList) == 1 else cylaunchParamsList, numDevices, flags) + err = cydriver.cuLaunchCooperativeKernelMultiDevice((launchParamsList[0])._pvt_ptr if len(launchParamsList) == 1 else cylaunchParamsList, numDevices, flags) if cylaunchParamsList is not NULL: free(cylaunchParamsList) return (CUresult(err),) @@ -34844,7 +40202,7 @@ def cuGraphCreate(unsigned int flags): :py:obj:`~.cuGraphAddChildGraphNode`, :py:obj:`~.cuGraphAddEmptyNode`, :py:obj:`~.cuGraphAddKernelNode`, :py:obj:`~.cuGraphAddHostNode`, :py:obj:`~.cuGraphAddMemcpyNode`, :py:obj:`~.cuGraphAddMemsetNode`, :py:obj:`~.cuGraphInstantiate`, :py:obj:`~.cuGraphDestroy`, :py:obj:`~.cuGraphGetNodes`, :py:obj:`~.cuGraphGetRootNodes`, :py:obj:`~.cuGraphGetEdges`, :py:obj:`~.cuGraphClone` """ cdef CUgraph phGraph = CUgraph() - err = cydriver.cuGraphCreate(phGraph._ptr, flags) + err = cydriver.cuGraphCreate(phGraph._pvt_ptr, flags) return (CUresult(err), phGraph) {{endif}} @@ -34959,10 +40317,10 @@ def cuGraphAddKernelNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] | Li raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cydriver.cuGraphAddKernelNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cydriver.cuGraphAddKernelNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -35011,7 +40369,7 @@ def cuGraphKernelNodeGetParams(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUDA_KERNEL_NODE_PARAMS nodeParams = CUDA_KERNEL_NODE_PARAMS() - err = cydriver.cuGraphKernelNodeGetParams(cyhNode, nodeParams._ptr) + err = cydriver.cuGraphKernelNodeGetParams(cyhNode, nodeParams._pvt_ptr) return (CUresult(err), nodeParams) {{endif}} @@ -35048,7 +40406,7 @@ def cuGraphKernelNodeSetParams(hNode, nodeParams : Optional[CUDA_KERNEL_NODE_PAR else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphKernelNodeSetParams(cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -35132,10 +40490,10 @@ def cuGraphAddMemcpyNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] | Li raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._ptr if copyParams != None else NULL - err = cydriver.cuGraphAddMemcpyNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cycopyParams_ptr, cyctx) + cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams != None else NULL + err = cydriver.cuGraphAddMemcpyNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cycopyParams_ptr, cyctx) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -35175,7 +40533,7 @@ def cuGraphMemcpyNodeGetParams(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUDA_MEMCPY3D nodeParams = CUDA_MEMCPY3D() - err = cydriver.cuGraphMemcpyNodeGetParams(cyhNode, nodeParams._ptr) + err = cydriver.cuGraphMemcpyNodeGetParams(cyhNode, nodeParams._pvt_ptr) return (CUresult(err), nodeParams) {{endif}} @@ -35212,7 +40570,7 @@ def cuGraphMemcpyNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMCPY3D]): else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_MEMCPY3D* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_MEMCPY3D* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphMemcpyNodeSetParams(cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -35286,10 +40644,10 @@ def cuGraphAddMemsetNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] | Li raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._ptr if memsetParams != None else NULL - err = cydriver.cuGraphAddMemsetNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cymemsetParams_ptr, cyctx) + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams != None else NULL + err = cydriver.cuGraphAddMemsetNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cymemsetParams_ptr, cyctx) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -35329,7 +40687,7 @@ def cuGraphMemsetNodeGetParams(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUDA_MEMSET_NODE_PARAMS nodeParams = CUDA_MEMSET_NODE_PARAMS() - err = cydriver.cuGraphMemsetNodeGetParams(cyhNode, nodeParams._ptr) + err = cydriver.cuGraphMemsetNodeGetParams(cyhNode, nodeParams._pvt_ptr) return (CUresult(err), nodeParams) {{endif}} @@ -35366,7 +40724,7 @@ def cuGraphMemsetNodeSetParams(hNode, nodeParams : Optional[CUDA_MEMSET_NODE_PAR else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphMemsetNodeSetParams(cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -35429,10 +40787,10 @@ def cuGraphAddHostNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] | List raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cydriver.cuGraphAddHostNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cydriver.cuGraphAddHostNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -35472,7 +40830,7 @@ def cuGraphHostNodeGetParams(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUDA_HOST_NODE_PARAMS nodeParams = CUDA_HOST_NODE_PARAMS() - err = cydriver.cuGraphHostNodeGetParams(cyhNode, nodeParams._ptr) + err = cydriver.cuGraphHostNodeGetParams(cyhNode, nodeParams._pvt_ptr) return (CUresult(err), nodeParams) {{endif}} @@ -35509,7 +40867,7 @@ def cuGraphHostNodeSetParams(hNode, nodeParams : Optional[CUDA_HOST_NODE_PARAMS] else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphHostNodeSetParams(cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -35584,9 +40942,9 @@ def cuGraphAddChildGraphNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - err = cydriver.cuGraphAddChildGraphNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cychildGraph) + err = cydriver.cuGraphAddChildGraphNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cychildGraph) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -35631,7 +40989,7 @@ def cuGraphChildGraphNodeGetGraph(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUgraph phGraph = CUgraph() - err = cydriver.cuGraphChildGraphNodeGetGraph(cyhNode, phGraph._ptr) + err = cydriver.cuGraphChildGraphNodeGetGraph(cyhNode, phGraph._pvt_ptr) return (CUresult(err), phGraph) {{endif}} @@ -35694,9 +41052,9 @@ def cuGraphAddEmptyNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] | Lis raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - err = cydriver.cuGraphAddEmptyNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies) + err = cydriver.cuGraphAddEmptyNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -35769,9 +41127,9 @@ def cuGraphAddEventRecordNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - err = cydriver.cuGraphAddEventRecordNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cyevent) + err = cydriver.cuGraphAddEventRecordNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cyevent) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -35811,7 +41169,7 @@ def cuGraphEventRecordNodeGetEvent(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUevent event_out = CUevent() - err = cydriver.cuGraphEventRecordNodeGetEvent(cyhNode, event_out._ptr) + err = cydriver.cuGraphEventRecordNodeGetEvent(cyhNode, event_out._pvt_ptr) return (CUresult(err), event_out) {{endif}} @@ -35930,9 +41288,9 @@ def cuGraphAddEventWaitNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] | raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - err = cydriver.cuGraphAddEventWaitNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cyevent) + err = cydriver.cuGraphAddEventWaitNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cyevent) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -35972,7 +41330,7 @@ def cuGraphEventWaitNodeGetEvent(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUevent event_out = CUevent() - err = cydriver.cuGraphEventWaitNodeGetEvent(cyhNode, event_out._ptr) + err = cydriver.cuGraphEventWaitNodeGetEvent(cyhNode, event_out._pvt_ptr) return (CUresult(err), event_out) {{endif}} @@ -36081,10 +41439,10 @@ def cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies : Optional[Tuple raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cydriver.cuGraphAddExternalSemaphoresSignalNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cydriver.cuGraphAddExternalSemaphoresSignalNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -36130,7 +41488,7 @@ def cuGraphExternalSemaphoresSignalNodeGetParams(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS params_out = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS() - err = cydriver.cuGraphExternalSemaphoresSignalNodeGetParams(cyhNode, params_out._ptr) + err = cydriver.cuGraphExternalSemaphoresSignalNodeGetParams(cyhNode, params_out._pvt_ptr) return (CUresult(err), params_out) {{endif}} @@ -36168,7 +41526,7 @@ def cuGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : Optional[CU else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphExternalSemaphoresSignalNodeSetParams(cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -36232,10 +41590,10 @@ def cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies : Optional[Tuple[C raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cydriver.cuGraphAddExternalSemaphoresWaitNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cydriver.cuGraphAddExternalSemaphoresWaitNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -36281,7 +41639,7 @@ def cuGraphExternalSemaphoresWaitNodeGetParams(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUDA_EXT_SEM_WAIT_NODE_PARAMS params_out = CUDA_EXT_SEM_WAIT_NODE_PARAMS() - err = cydriver.cuGraphExternalSemaphoresWaitNodeGetParams(cyhNode, params_out._ptr) + err = cydriver.cuGraphExternalSemaphoresWaitNodeGetParams(cyhNode, params_out._pvt_ptr) return (CUresult(err), params_out) {{endif}} @@ -36319,7 +41677,7 @@ def cuGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : Optional[CUDA else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphExternalSemaphoresWaitNodeSetParams(cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -36386,10 +41744,10 @@ def cuGraphAddBatchMemOpNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cydriver.cuGraphAddBatchMemOpNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cydriver.cuGraphAddBatchMemOpNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -36434,7 +41792,7 @@ def cuGraphBatchMemOpNodeGetParams(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams_out = CUDA_BATCH_MEM_OP_NODE_PARAMS() - err = cydriver.cuGraphBatchMemOpNodeGetParams(cyhNode, nodeParams_out._ptr) + err = cydriver.cuGraphBatchMemOpNodeGetParams(cyhNode, nodeParams_out._pvt_ptr) return (CUresult(err), nodeParams_out) {{endif}} @@ -36474,7 +41832,7 @@ def cuGraphBatchMemOpNodeSetParams(hNode, nodeParams : Optional[CUDA_BATCH_MEM_O else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphBatchMemOpNodeSetParams(cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -36546,7 +41904,7 @@ def cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, nodeParams : Optional[ else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphExecBatchMemOpNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -36649,10 +42007,10 @@ def cuGraphAddMemAllocNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] | raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cydriver.cuGraphAddMemAllocNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) + cdef cydriver.CUDA_MEM_ALLOC_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cydriver.cuGraphAddMemAllocNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -36695,7 +42053,7 @@ def cuGraphMemAllocNodeGetParams(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUDA_MEM_ALLOC_NODE_PARAMS params_out = CUDA_MEM_ALLOC_NODE_PARAMS() - err = cydriver.cuGraphMemAllocNodeGetParams(cyhNode, params_out._ptr) + err = cydriver.cuGraphMemAllocNodeGetParams(cyhNode, params_out._pvt_ptr) return (CUresult(err), params_out) {{endif}} @@ -36783,9 +42141,9 @@ def cuGraphAddMemFreeNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] | L raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - err = cydriver.cuGraphAddMemFreeNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cydptr) + err = cydriver.cuGraphAddMemFreeNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cydptr) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -36825,7 +42183,7 @@ def cuGraphMemFreeNodeGetParams(hNode): phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef CUdeviceptr dptr_out = CUdeviceptr() - err = cydriver.cuGraphMemFreeNodeGetParams(cyhNode, dptr_out._ptr) + err = cydriver.cuGraphMemFreeNodeGetParams(cyhNode, dptr_out._pvt_ptr) return (CUresult(err), dptr_out) {{endif}} @@ -37013,7 +42371,7 @@ def cuGraphClone(originalGraph): poriginalGraph = int(CUgraph(originalGraph)) cyoriginalGraph = poriginalGraph cdef CUgraph phGraphClone = CUgraph() - err = cydriver.cuGraphClone(phGraphClone._ptr, cyoriginalGraph) + err = cydriver.cuGraphClone(phGraphClone._pvt_ptr, cyoriginalGraph) return (CUresult(err), phGraphClone) {{endif}} @@ -37069,7 +42427,7 @@ def cuGraphNodeFindInClone(hOriginalNode, hClonedGraph): phOriginalNode = int(CUgraphNode(hOriginalNode)) cyhOriginalNode = phOriginalNode cdef CUgraphNode phNode = CUgraphNode() - err = cydriver.cuGraphNodeFindInClone(phNode._ptr, cyhOriginalNode, cyhClonedGraph) + err = cydriver.cuGraphNodeFindInClone(phNode._pvt_ptr, cyhOriginalNode, cyhClonedGraph) return (CUresult(err), phNode) {{endif}} @@ -37705,7 +43063,7 @@ def cuGraphAddDependencies(hGraph, from_ : Optional[Tuple[CUgraphNode] | List[CU raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(from_)): - cyfrom_[idx] = (from_[idx])._ptr[0] + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] cdef cydriver.CUgraphNode* cyto = NULL if len(to) > 0: cyto = calloc(len(to), sizeof(cydriver.CUgraphNode)) @@ -37713,8 +43071,8 @@ def cuGraphAddDependencies(hGraph, from_ : Optional[Tuple[CUgraphNode] | List[CU raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(to)): - cyto[idx] = (to[idx])._ptr[0] - err = cydriver.cuGraphAddDependencies(cyhGraph, (from_[0])._ptr if len(from_) == 1 else cyfrom_, (to[0])._ptr if len(to) == 1 else cyto, numDependencies) + cyto[idx] = (to[idx])._pvt_ptr[0] + err = cydriver.cuGraphAddDependencies(cyhGraph, (from_[0])._pvt_ptr if len(from_) == 1 else cyfrom_, (to[0])._pvt_ptr if len(to) == 1 else cyto, numDependencies) if cyfrom_ is not NULL: free(cyfrom_) if cyto is not NULL: @@ -37783,7 +43141,7 @@ def cuGraphAddDependencies_v2(hGraph, from_ : Optional[Tuple[CUgraphNode] | List raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(from_)): - cyfrom_[idx] = (from_[idx])._ptr[0] + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] cdef cydriver.CUgraphNode* cyto = NULL if len(to) > 0: cyto = calloc(len(to), sizeof(cydriver.CUgraphNode)) @@ -37791,15 +43149,15 @@ def cuGraphAddDependencies_v2(hGraph, from_ : Optional[Tuple[CUgraphNode] | List raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(to)): - cyto[idx] = (to[idx])._ptr[0] + cyto[idx] = (to[idx])._pvt_ptr[0] cdef cydriver.CUgraphEdgeData* cyedgeData = NULL if len(edgeData) > 0: cyedgeData = calloc(len(edgeData), sizeof(cydriver.CUgraphEdgeData)) if cyedgeData is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(edgeData)) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) for idx in range(len(edgeData)): - string.memcpy(&cyedgeData[idx], (edgeData[idx])._ptr, sizeof(cydriver.CUgraphEdgeData)) - err = cydriver.cuGraphAddDependencies_v2(cyhGraph, (from_[0])._ptr if len(from_) == 1 else cyfrom_, (to[0])._ptr if len(to) == 1 else cyto, (edgeData[0])._ptr if len(edgeData) == 1 else cyedgeData, numDependencies) + string.memcpy(&cyedgeData[idx], (edgeData[idx])._pvt_ptr, sizeof(cydriver.CUgraphEdgeData)) + err = cydriver.cuGraphAddDependencies_v2(cyhGraph, (from_[0])._pvt_ptr if len(from_) == 1 else cyfrom_, (to[0])._pvt_ptr if len(to) == 1 else cyto, (edgeData[0])._pvt_ptr if len(edgeData) == 1 else cyedgeData, numDependencies) if cyfrom_ is not NULL: free(cyfrom_) if cyto is not NULL: @@ -37868,7 +43226,7 @@ def cuGraphRemoveDependencies(hGraph, from_ : Optional[Tuple[CUgraphNode] | List raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(from_)): - cyfrom_[idx] = (from_[idx])._ptr[0] + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] cdef cydriver.CUgraphNode* cyto = NULL if len(to) > 0: cyto = calloc(len(to), sizeof(cydriver.CUgraphNode)) @@ -37876,8 +43234,8 @@ def cuGraphRemoveDependencies(hGraph, from_ : Optional[Tuple[CUgraphNode] | List raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(to)): - cyto[idx] = (to[idx])._ptr[0] - err = cydriver.cuGraphRemoveDependencies(cyhGraph, (from_[0])._ptr if len(from_) == 1 else cyfrom_, (to[0])._ptr if len(to) == 1 else cyto, numDependencies) + cyto[idx] = (to[idx])._pvt_ptr[0] + err = cydriver.cuGraphRemoveDependencies(cyhGraph, (from_[0])._pvt_ptr if len(from_) == 1 else cyfrom_, (to[0])._pvt_ptr if len(to) == 1 else cyto, numDependencies) if cyfrom_ is not NULL: free(cyfrom_) if cyto is not NULL: @@ -37952,7 +43310,7 @@ def cuGraphRemoveDependencies_v2(hGraph, from_ : Optional[Tuple[CUgraphNode] | L raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(from_)): - cyfrom_[idx] = (from_[idx])._ptr[0] + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] cdef cydriver.CUgraphNode* cyto = NULL if len(to) > 0: cyto = calloc(len(to), sizeof(cydriver.CUgraphNode)) @@ -37960,15 +43318,15 @@ def cuGraphRemoveDependencies_v2(hGraph, from_ : Optional[Tuple[CUgraphNode] | L raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(to)): - cyto[idx] = (to[idx])._ptr[0] + cyto[idx] = (to[idx])._pvt_ptr[0] cdef cydriver.CUgraphEdgeData* cyedgeData = NULL if len(edgeData) > 0: cyedgeData = calloc(len(edgeData), sizeof(cydriver.CUgraphEdgeData)) if cyedgeData is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(edgeData)) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) for idx in range(len(edgeData)): - string.memcpy(&cyedgeData[idx], (edgeData[idx])._ptr, sizeof(cydriver.CUgraphEdgeData)) - err = cydriver.cuGraphRemoveDependencies_v2(cyhGraph, (from_[0])._ptr if len(from_) == 1 else cyfrom_, (to[0])._ptr if len(to) == 1 else cyto, (edgeData[0])._ptr if len(edgeData) == 1 else cyedgeData, numDependencies) + string.memcpy(&cyedgeData[idx], (edgeData[idx])._pvt_ptr, sizeof(cydriver.CUgraphEdgeData)) + err = cydriver.cuGraphRemoveDependencies_v2(cyhGraph, (from_[0])._pvt_ptr if len(from_) == 1 else cyfrom_, (to[0])._pvt_ptr if len(to) == 1 else cyto, (edgeData[0])._pvt_ptr if len(edgeData) == 1 else cyedgeData, numDependencies) if cyfrom_ is not NULL: free(cyfrom_) if cyto is not NULL: @@ -38116,7 +43474,7 @@ def cuGraphInstantiate(hGraph, unsigned long long flags): phGraph = int(CUgraph(hGraph)) cyhGraph = phGraph cdef CUgraphExec phGraphExec = CUgraphExec() - err = cydriver.cuGraphInstantiate(phGraphExec._ptr, cyhGraph, flags) + err = cydriver.cuGraphInstantiate(phGraphExec._pvt_ptr, cyhGraph, flags) return (CUresult(err), phGraphExec) {{endif}} @@ -38259,8 +43617,8 @@ def cuGraphInstantiateWithParams(hGraph, instantiateParams : Optional[CUDA_GRAPH phGraph = int(CUgraph(hGraph)) cyhGraph = phGraph cdef CUgraphExec phGraphExec = CUgraphExec() - cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS* cyinstantiateParams_ptr = instantiateParams._ptr if instantiateParams != None else NULL - err = cydriver.cuGraphInstantiateWithParams(phGraphExec._ptr, cyhGraph, cyinstantiateParams_ptr) + cdef cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS* cyinstantiateParams_ptr = instantiateParams._pvt_ptr if instantiateParams != None else NULL + err = cydriver.cuGraphInstantiateWithParams(phGraphExec._pvt_ptr, cyhGraph, cyinstantiateParams_ptr) return (CUresult(err), phGraphExec) {{endif}} @@ -38301,7 +43659,7 @@ def cuGraphExecGetFlags(hGraphExec): phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec cdef cuuint64_t flags = cuuint64_t() - err = cydriver.cuGraphExecGetFlags(cyhGraphExec, flags._ptr) + err = cydriver.cuGraphExecGetFlags(cyhGraphExec, flags._pvt_ptr) return (CUresult(err), flags) {{endif}} @@ -38382,7 +43740,7 @@ def cuGraphExecKernelNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_KERNEL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphExecKernelNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -38459,7 +43817,7 @@ def cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, copyParams : Optional[CUDA else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._ptr if copyParams != None else NULL + cdef cydriver.CUDA_MEMCPY3D* cycopyParams_ptr = copyParams._pvt_ptr if copyParams != None else NULL err = cydriver.cuGraphExecMemcpyNodeSetParams(cyhGraphExec, cyhNode, cycopyParams_ptr, cyctx) return (CUresult(err),) {{endif}} @@ -38541,7 +43899,7 @@ def cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, memsetParams : Optional[CU else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._ptr if memsetParams != None else NULL + cdef cydriver.CUDA_MEMSET_NODE_PARAMS* cymemsetParams_ptr = memsetParams._pvt_ptr if memsetParams != None else NULL err = cydriver.cuGraphExecMemsetNodeSetParams(cyhGraphExec, cyhNode, cymemsetParams_ptr, cyctx) return (CUresult(err),) {{endif}} @@ -38597,7 +43955,7 @@ def cuGraphExecHostNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUDA_H else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_HOST_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphExecHostNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -38860,7 +44218,7 @@ def cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodePara else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphExecExternalSemaphoresSignalNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -38921,7 +44279,7 @@ def cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodeParams else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphExecExternalSemaphoresWaitNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -39408,7 +44766,7 @@ def cuGraphExecUpdate(hGraphExec, hGraph): phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec cdef CUgraphExecUpdateResultInfo resultInfo = CUgraphExecUpdateResultInfo() - err = cydriver.cuGraphExecUpdate(cyhGraphExec, cyhGraph, resultInfo._ptr) + err = cydriver.cuGraphExecUpdate(cyhGraphExec, cyhGraph, resultInfo._pvt_ptr) return (CUresult(err), resultInfo) {{endif}} @@ -39498,7 +44856,7 @@ def cuGraphKernelNodeGetAttribute(hNode, attr not None : CUkernelNodeAttrID): cyhNode = phNode cdef cydriver.CUkernelNodeAttrID cyattr = attr.value cdef CUkernelNodeAttrValue value_out = CUkernelNodeAttrValue() - err = cydriver.cuGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._ptr) + err = cydriver.cuGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._pvt_ptr) return (CUresult(err), value_out) {{endif}} @@ -39539,7 +44897,7 @@ def cuGraphKernelNodeSetAttribute(hNode, attr not None : CUkernelNodeAttrID, val phNode = int(CUgraphNode(hNode)) cyhNode = phNode cdef cydriver.CUkernelNodeAttrID cyattr = attr.value - cdef cydriver.CUkernelNodeAttrValue* cyvalue_ptr = value._ptr if value != None else NULL + cdef cydriver.CUkernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value != None else NULL err = cydriver.cuGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) return (CUresult(err),) {{endif}} @@ -39640,7 +44998,7 @@ def cuUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int cdef CUuserObject object_out = CUuserObject() cyptr = utils.HelperInputVoidPtr(ptr) cdef void* cyptr_ptr = cyptr.cptr - err = cydriver.cuUserObjectCreate(object_out._ptr, cyptr_ptr, cydestroy, initialRefcount, flags) + err = cydriver.cuUserObjectCreate(object_out._pvt_ptr, cyptr_ptr, cydestroy, initialRefcount, flags) return (CUresult(err), object_out) {{endif}} @@ -39907,10 +45265,10 @@ def cuGraphAddNode(hGraph, dependencies : Optional[Tuple[CUgraphNode] | List[CUg raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cydriver.cuGraphAddNode(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cydriver.cuGraphAddNode(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, cynodeParams_ptr) if cydependencies is not NULL: free(cydependencies) return (CUresult(err), phGraphNode) @@ -39989,18 +45347,18 @@ def cuGraphAddNode_v2(hGraph, dependencies : Optional[Tuple[CUgraphNode] | List[ raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] cdef cydriver.CUgraphEdgeData* cydependencyData = NULL if len(dependencyData) > 0: cydependencyData = calloc(len(dependencyData), sizeof(cydriver.CUgraphEdgeData)) if cydependencyData is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) for idx in range(len(dependencyData)): - string.memcpy(&cydependencyData[idx], (dependencyData[idx])._ptr, sizeof(cydriver.CUgraphEdgeData)) + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cydriver.CUgraphEdgeData)) if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) if numDependencies > len(dependencyData): raise RuntimeError("List is too small: " + str(len(dependencyData)) + " < " + str(numDependencies)) - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cydriver.cuGraphAddNode_v2(phGraphNode._ptr, cyhGraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, (dependencyData[0])._ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, cynodeParams_ptr) + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cydriver.cuGraphAddNode_v2(phGraphNode._pvt_ptr, cyhGraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, (dependencyData[0])._pvt_ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, cynodeParams_ptr) if cydependencies is not NULL: free(cydependencies) if cydependencyData is not NULL: @@ -40047,7 +45405,7 @@ def cuGraphNodeSetParams(hNode, nodeParams : Optional[CUgraphNodeParams]): else: phNode = int(CUgraphNode(hNode)) cyhNode = phNode - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphNodeSetParams(cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -40108,7 +45466,7 @@ def cuGraphExecNodeSetParams(hGraphExec, hNode, nodeParams : Optional[CUgraphNod else: phGraphExec = int(CUgraphExec(hGraphExec)) cyhGraphExec = phGraphExec - cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cydriver.cuGraphExecNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (CUresult(err),) {{endif}} @@ -40137,7 +45495,9 @@ def cuGraphConditionalHandleCreate(hGraph, ctx, unsigned int defaultLaunchValue, ctx : :py:obj:`~.CUcontext` Context for the handle and associated conditional node. defaultLaunchValue : unsigned int - Optional initial value for the conditional variable. + Optional initial value for the conditional variable. Applied at the + beginning of each graph execution if CU_GRAPH_COND_ASSIGN_DEFAULT + is set in `flags`. flags : unsigned int Currently must be CU_GRAPH_COND_ASSIGN_DEFAULT or 0. @@ -40171,7 +45531,7 @@ def cuGraphConditionalHandleCreate(hGraph, ctx, unsigned int defaultLaunchValue, phGraph = int(CUgraph(hGraph)) cyhGraph = phGraph cdef CUgraphConditionalHandle pHandle_out = CUgraphConditionalHandle() - err = cydriver.cuGraphConditionalHandleCreate(pHandle_out._ptr, cyhGraph, cyctx, defaultLaunchValue, flags) + err = cydriver.cuGraphConditionalHandleCreate(pHandle_out._pvt_ptr, cyhGraph, cyctx, defaultLaunchValue, flags) return (CUresult(err), pHandle_out) {{endif}} @@ -40560,7 +45920,7 @@ def cuOccupancyMaxPotentialClusterSize(func, config : Optional[CUlaunchConfig]): pfunc = int(CUfunction(func)) cyfunc = pfunc cdef int clusterSize = 0 - cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._ptr if config != None else NULL + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config != None else NULL err = cydriver.cuOccupancyMaxPotentialClusterSize(&clusterSize, cyfunc, cyconfig_ptr) return (CUresult(err), clusterSize) {{endif}} @@ -40618,7 +45978,7 @@ def cuOccupancyMaxActiveClusters(func, config : Optional[CUlaunchConfig]): pfunc = int(CUfunction(func)) cyfunc = pfunc cdef int numClusters = 0 - cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._ptr if config != None else NULL + cdef cydriver.CUlaunchConfig* cyconfig_ptr = config._pvt_ptr if config != None else NULL err = cydriver.cuOccupancyMaxActiveClusters(&numClusters, cyfunc, cyconfig_ptr) return (CUresult(err), numClusters) {{endif}} @@ -40882,7 +46242,7 @@ def cuTexRefSetAddress2D(hTexRef, desc : Optional[CUDA_ARRAY_DESCRIPTOR], dptr, else: phTexRef = int(CUtexref(hTexRef)) cyhTexRef = phTexRef - cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cydesc_ptr = desc._ptr if desc != None else NULL + cdef cydriver.CUDA_ARRAY_DESCRIPTOR* cydesc_ptr = desc._pvt_ptr if desc != None else NULL err = cydriver.cuTexRefSetAddress2D(cyhTexRef, cydesc_ptr, cydptr, Pitch) return (CUresult(err),) {{endif}} @@ -41357,7 +46717,7 @@ def cuTexRefGetAddress(hTexRef): phTexRef = int(CUtexref(hTexRef)) cyhTexRef = phTexRef cdef CUdeviceptr pdptr = CUdeviceptr() - err = cydriver.cuTexRefGetAddress(pdptr._ptr, cyhTexRef) + err = cydriver.cuTexRefGetAddress(pdptr._pvt_ptr, cyhTexRef) return (CUresult(err), pdptr) {{endif}} @@ -41399,7 +46759,7 @@ def cuTexRefGetArray(hTexRef): phTexRef = int(CUtexref(hTexRef)) cyhTexRef = phTexRef cdef CUarray phArray = CUarray() - err = cydriver.cuTexRefGetArray(phArray._ptr, cyhTexRef) + err = cydriver.cuTexRefGetArray(phArray._pvt_ptr, cyhTexRef) return (CUresult(err), phArray) {{endif}} @@ -41442,7 +46802,7 @@ def cuTexRefGetMipmappedArray(hTexRef): phTexRef = int(CUtexref(hTexRef)) cyhTexRef = phTexRef cdef CUmipmappedArray phMipmappedArray = CUmipmappedArray() - err = cydriver.cuTexRefGetMipmappedArray(phMipmappedArray._ptr, cyhTexRef) + err = cydriver.cuTexRefGetMipmappedArray(phMipmappedArray._pvt_ptr, cyhTexRef) return (CUresult(err), phMipmappedArray) {{endif}} @@ -41856,7 +47216,7 @@ def cuTexRefCreate(): :py:obj:`~.cuTexRefDestroy` """ cdef CUtexref pTexRef = CUtexref() - err = cydriver.cuTexRefCreate(pTexRef._ptr) + err = cydriver.cuTexRefCreate(pTexRef._pvt_ptr) return (CUresult(err), pTexRef) {{endif}} @@ -41990,7 +47350,7 @@ def cuSurfRefGetArray(hSurfRef): phSurfRef = int(CUsurfref(hSurfRef)) cyhSurfRef = phSurfRef cdef CUarray phArray = CUarray() - err = cydriver.cuSurfRefGetArray(phArray._ptr, cyhSurfRef) + err = cydriver.cuSurfRefGetArray(phArray._pvt_ptr, cyhSurfRef) return (CUresult(err), phArray) {{endif}} @@ -42224,10 +47584,10 @@ def cuTexObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC], pTexDesc : Option :py:obj:`~.cuTexObjectDestroy`, :py:obj:`~.cudaCreateTextureObject` """ cdef CUtexObject pTexObject = CUtexObject() - cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL - cdef cydriver.CUDA_TEXTURE_DESC* cypTexDesc_ptr = pTexDesc._ptr if pTexDesc != None else NULL - cdef cydriver.CUDA_RESOURCE_VIEW_DESC* cypResViewDesc_ptr = pResViewDesc._ptr if pResViewDesc != None else NULL - err = cydriver.cuTexObjectCreate(pTexObject._ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) + cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc != None else NULL + cdef cydriver.CUDA_TEXTURE_DESC* cypTexDesc_ptr = pTexDesc._pvt_ptr if pTexDesc != None else NULL + cdef cydriver.CUDA_RESOURCE_VIEW_DESC* cypResViewDesc_ptr = pResViewDesc._pvt_ptr if pResViewDesc != None else NULL + err = cydriver.cuTexObjectCreate(pTexObject._pvt_ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) return (CUresult(err), pTexObject) {{endif}} @@ -42301,7 +47661,7 @@ def cuTexObjectGetResourceDesc(texObject): ptexObject = int(CUtexObject(texObject)) cytexObject = ptexObject cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC() - err = cydriver.cuTexObjectGetResourceDesc(pResDesc._ptr, cytexObject) + err = cydriver.cuTexObjectGetResourceDesc(pResDesc._pvt_ptr, cytexObject) return (CUresult(err), pResDesc) {{endif}} @@ -42340,7 +47700,7 @@ def cuTexObjectGetTextureDesc(texObject): ptexObject = int(CUtexObject(texObject)) cytexObject = ptexObject cdef CUDA_TEXTURE_DESC pTexDesc = CUDA_TEXTURE_DESC() - err = cydriver.cuTexObjectGetTextureDesc(pTexDesc._ptr, cytexObject) + err = cydriver.cuTexObjectGetTextureDesc(pTexDesc._pvt_ptr, cytexObject) return (CUresult(err), pTexDesc) {{endif}} @@ -42380,7 +47740,7 @@ def cuTexObjectGetResourceViewDesc(texObject): ptexObject = int(CUtexObject(texObject)) cytexObject = ptexObject cdef CUDA_RESOURCE_VIEW_DESC pResViewDesc = CUDA_RESOURCE_VIEW_DESC() - err = cydriver.cuTexObjectGetResourceViewDesc(pResViewDesc._ptr, cytexObject) + err = cydriver.cuTexObjectGetResourceViewDesc(pResViewDesc._pvt_ptr, cytexObject) return (CUresult(err), pResViewDesc) {{endif}} @@ -42419,8 +47779,8 @@ def cuSurfObjectCreate(pResDesc : Optional[CUDA_RESOURCE_DESC]): :py:obj:`~.cuSurfObjectDestroy`, :py:obj:`~.cudaCreateSurfaceObject` """ cdef CUsurfObject pSurfObject = CUsurfObject() - cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL - err = cydriver.cuSurfObjectCreate(pSurfObject._ptr, cypResDesc_ptr) + cdef cydriver.CUDA_RESOURCE_DESC* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc != None else NULL + err = cydriver.cuSurfObjectCreate(pSurfObject._pvt_ptr, cypResDesc_ptr) return (CUresult(err), pSurfObject) {{endif}} @@ -42494,7 +47854,7 @@ def cuSurfObjectGetResourceDesc(surfObject): psurfObject = int(CUsurfObject(surfObject)) cysurfObject = psurfObject cdef CUDA_RESOURCE_DESC pResDesc = CUDA_RESOURCE_DESC() - err = cydriver.cuSurfObjectGetResourceDesc(pResDesc._ptr, cysurfObject) + err = cydriver.cuSurfObjectGetResourceDesc(pResDesc._pvt_ptr, cysurfObject) return (CUresult(err), pResDesc) {{endif}} @@ -42509,7 +47869,7 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor Tensor map objects are only supported on devices of compute capability 9.0 or higher. Additionally, a tensor map object is an opaque value, - and, as such, should only be accessed through CUDA API calls. + and, as such, should only be accessed through CUDA APIs and PTX. The parameters passed are bound to the following requirements: @@ -42520,46 +47880,90 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor - **View CUDA Toolkit Documentation for a C++ code example** + - :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B` copies '16 x U4' + packed values to memory aligned as 8 bytes. There are no gaps between + packed values. :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B` + copies '16 x U4' packed values to memory aligned as 16 bytes. There + are 8 byte gaps between every 8 byte chunk of packed values. + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` copies '16 x U6' + packed values to memory aligned as 16 bytes. There are 4 byte gaps + between every 12 byte chunk of packed values. + - `tensorRank` must be non-zero and less than or equal to the maximum supported dimensionality of 5. If `interleave` is not :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, then `tensorRank` must additionally be greater than or equal to 3. - `globalAddress`, which specifies the starting address of the memory - region described, must be 32 byte aligned when `interleave` is - :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B` and 16 byte aligned - otherwise. + region described, must be 16 byte aligned. The following requirements + need to also be met: - - `globalDim` array, which specifies tensor size of each of the - `tensorRank` dimensions, must be non-zero and less than or equal to - 2^32. + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, + `globalAddress` must be 32 byte aligned. - - `globalStrides` array, which specifies tensor stride of each of the - lower `tensorRank` - 1 dimensions in bytes, must be a multiple of 16 - and less than 2^40. Additionally, the stride must be a multiple of 32 - when `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`. Each - following dimension specified includes previous dimension stride: + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, `globalAddress` + must be 32 byte aligned. - - **View CUDA Toolkit Documentation for a C++ code example** + `globalDim` array, which specifies tensor size of each of the + `tensorRank` dimensions, must be non-zero and less than or equal to + 2^32. Additionally, the following requirements need to be met for the + packed data types: - - `boxDim` array, which specifies number of elements to be traversed - along each of the `tensorRank` dimensions, must be non-zero and less - than or equal to 256. When `interleave` is - :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, { `boxDim`[0] * - elementSizeInBytes( `tensorDataType` ) } must be a multiple of 16 - bytes. + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, globalDim[0] must + be a multiple of 128. - - `elementStrides` array, which specifies the iteration step along each - of the `tensorRank` dimensions, must be non-zero and less than or - equal to 8. Note that when `interleave` is - :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, the first element of this - array is ignored since TMA doesn’t support the stride for dimension - zero. When all elements of `elementStrides` array is one, `boxDim` - specifies the number of elements to load. However, if the - `elementStrides`[i] is not equal to one, then TMA loads ceil( - `boxDim`[i] / `elementStrides`[i]) number of elements along i-th - dimension. To load N elements along i-th dimension, `boxDim`[i] must - be set to N * `elementStrides`[i]. + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, `globalDim`[0] must + be a multiple of 2. + + - Dimension for the packed data types must reflect the number of + individual U# values. + + `globalStrides` array, which specifies tensor stride of each of the + lower `tensorRank` - 1 dimensions in bytes, must be a multiple of 16 + and less than 2^40. Additionally, the following requirements need to be + met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, the + strides must be a multiple of 32. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, the strides must + be a multiple of 32. Each following dimension specified includes + previous dimension stride: + + - **View CUDA Toolkit Documentation for a C++ code example** + + `boxDim` array, which specifies number of elements to be traversed + along each of the `tensorRank` dimensions, must be non-zero and less + than or equal to 256. Additionally, the following requirements need to + be met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, { + `boxDim`[0] * elementSizeInBytes( `tensorDataType` ) } must be a + multiple of 16 bytes. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, boxDim[0] must be + 128. + + `elementStrides` array, which specifies the iteration step along each + of the `tensorRank` dimensions, must be non-zero and less than or equal + to 8. Note that when `interleave` is + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, the first element of this + array is ignored since TMA doesn’t support the stride for dimension + zero. When all elements of `elementStrides` array is one, `boxDim` + specifies the number of elements to load. However, if the + `elementStrides`[i] is not equal to one, then TMA loads ceil( + `boxDim`[i] / `elementStrides`[i]) number of elements along i-th + dimension. To load N elements along i-th dimension, `boxDim`[i] must be + set to N * `elementStrides`[i]. - `interleave` specifies the interleaved layout of type :py:obj:`~.CUtensorMapInterleave`, which is defined as: @@ -42575,14 +47979,16 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor from `tensorDataType`) must be less than or equal to the swizzle size. - - CU_TENSOR_MAP_SWIZZLE_32B implies the bounding box inner dimension - will be <= 32. + - CU_TENSOR_MAP_SWIZZLE_32B requires the bounding box inner dimension + to be <= 32. - - CU_TENSOR_MAP_SWIZZLE_64B implies the bounding box inner dimension - will be <= 64. + - CU_TENSOR_MAP_SWIZZLE_64B requires the bounding box inner dimension + to be <= 64. - - CU_TENSOR_MAP_SWIZZLE_128B implies the bounding box inner dimension - will be <= 128. + - CU_TENSOR_MAP_SWIZZLE_128B* require the bounding box inner + dimension to be <= 128. Additionally, `tensorDataType` of + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` requires + `interleave` to be :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`. - `swizzle`, which specifies the shared memory bank swizzling pattern, has to be of type :py:obj:`~.CUtensorMapSwizzle` which is defined as: @@ -42597,7 +48003,26 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor shared memory banks. When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, `swizzle` must be :py:obj:`~.CU_TENSOR_MAP_SWIZZLE_32B`. Other interleave modes can - have any swizzling pattern. + have any swizzling pattern. When the `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`, only the following + swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_NONE (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B (Store only) When the + `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, only the + following swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_NONE (Load only) + + - CU_TENSOR_MAP_SWIZZLE_128B (Load only) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load only) - `l2Promotion` specifies L2 fetch size which indicates the byte granurality at which L2 requests is filled from DRAM. It must be of @@ -42614,7 +48039,10 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor - Note that :py:obj:`~.CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA` can only be used when `tensorDataType` represents a floating-point data - type. + type, and when `tensorDataType` is not + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, and + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`. Parameters ---------- @@ -42656,7 +48084,7 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor See Also -------- - :py:obj:`~.cuTensorMapEncodeIm2col`, :py:obj:`~.cuTensorMapReplaceAddress` + :py:obj:`~.cuTensorMapEncodeIm2col`, :py:obj:`~.cuTensorMapEncodeIm2colWide`, :py:obj:`~.cuTensorMapReplaceAddress` """ elementStrides = [] if elementStrides is None else elementStrides if not all(isinstance(_x, (cuuint32_t,)) for _x in elementStrides): @@ -42690,7 +48118,7 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalDim)) + 'x' + str(sizeof(cydriver.cuuint64_t))) else: for idx in range(len(globalDim)): - cyglobalDim[idx] = (globalDim[idx])._ptr[0] + cyglobalDim[idx] = (globalDim[idx])._pvt_ptr[0] cdef cydriver.cuuint64_t* cyglobalStrides = NULL if len(globalStrides) > 0: cyglobalStrides = calloc(len(globalStrides), sizeof(cydriver.cuuint64_t)) @@ -42698,7 +48126,7 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalStrides)) + 'x' + str(sizeof(cydriver.cuuint64_t))) else: for idx in range(len(globalStrides)): - cyglobalStrides[idx] = (globalStrides[idx])._ptr[0] + cyglobalStrides[idx] = (globalStrides[idx])._pvt_ptr[0] cdef cydriver.cuuint32_t* cyboxDim = NULL if len(boxDim) > 0: cyboxDim = calloc(len(boxDim), sizeof(cydriver.cuuint32_t)) @@ -42706,7 +48134,7 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor raise MemoryError('Failed to allocate length x size memory: ' + str(len(boxDim)) + 'x' + str(sizeof(cydriver.cuuint32_t))) else: for idx in range(len(boxDim)): - cyboxDim[idx] = (boxDim[idx])._ptr[0] + cyboxDim[idx] = (boxDim[idx])._pvt_ptr[0] cdef cydriver.cuuint32_t* cyelementStrides = NULL if len(elementStrides) > 0: cyelementStrides = calloc(len(elementStrides), sizeof(cydriver.cuuint32_t)) @@ -42714,12 +48142,12 @@ def cuTensorMapEncodeTiled(tensorDataType not None : CUtensorMapDataType, tensor raise MemoryError('Failed to allocate length x size memory: ' + str(len(elementStrides)) + 'x' + str(sizeof(cydriver.cuuint32_t))) else: for idx in range(len(elementStrides)): - cyelementStrides[idx] = (elementStrides[idx])._ptr[0] + cyelementStrides[idx] = (elementStrides[idx])._pvt_ptr[0] cdef cydriver.CUtensorMapInterleave cyinterleave = interleave.value cdef cydriver.CUtensorMapSwizzle cyswizzle = swizzle.value cdef cydriver.CUtensorMapL2promotion cyl2Promotion = l2Promotion.value cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = oobFill.value - err = cydriver.cuTensorMapEncodeTiled(tensorMap._ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, (globalDim[0])._ptr if len(globalDim) == 1 else cyglobalDim, (globalStrides[0])._ptr if len(globalStrides) == 1 else cyglobalStrides, (boxDim[0])._ptr if len(boxDim) == 1 else cyboxDim, (elementStrides[0])._ptr if len(elementStrides) == 1 else cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) + err = cydriver.cuTensorMapEncodeTiled(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, (globalDim[0])._pvt_ptr if len(globalDim) == 1 else cyglobalDim, (globalStrides[0])._pvt_ptr if len(globalStrides) == 1 else cyglobalStrides, (boxDim[0])._pvt_ptr if len(boxDim) == 1 else cyboxDim, (elementStrides[0])._pvt_ptr if len(elementStrides) == 1 else cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) if cyglobalDim is not NULL: free(cyglobalDim) if cyglobalStrides is not NULL: @@ -42743,7 +48171,7 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso Tensor map objects are only supported on devices of compute capability 9.0 or higher. Additionally, a tensor map object is an opaque value, - and, as such, should only be accessed through CUDA API calls. + and, as such, should only be accessed through CUDA APIs and PTX. The parameters passed are bound to the following requirements: @@ -42754,25 +48182,62 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso - **View CUDA Toolkit Documentation for a C++ code example** + - :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B` copies '16 x U4' + packed values to memory aligned as 8 bytes. There are no gaps between + packed values. :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B` + copies '16 x U4' packed values to memory aligned as 16 bytes. There + are 8 byte gaps between every 8 byte chunk of packed values. + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` copies '16 x U6' + packed values to memory aligned as 16 bytes. There are 4 byte gaps + between every 12 byte chunk of packed values. + - `tensorRank`, which specifies the number of tensor dimensions, must be 3, 4, or 5. - `globalAddress`, which specifies the starting address of the memory - region described, must be 32 byte aligned when `interleave` is - :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B` and 16 byte aligned - otherwise. + region described, must be 16 byte aligned. The following requirements + need to also be met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, + `globalAddress` must be 32 byte aligned. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, `globalAddress` + must be 32 byte aligned. - `globalDim` array, which specifies tensor size of each of the `tensorRank` dimensions, must be non-zero and less than or equal to - 2^32. + 2^32. Additionally, the following requirements need to be met for the + packed data types: + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, globalDim[0] + must be a multiple of 128. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, `globalDim`[0] + must be a multiple of 2. + + - Dimension for the packed data types must reflect the number of + individual U# values. - `globalStrides` array, which specifies tensor stride of each of the lower `tensorRank` - 1 dimensions in bytes, must be a multiple of 16 - and less than 2^40. Additionally, the stride must be a multiple of 32 - when `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`. Each - following dimension specified includes previous dimension stride: + and less than 2^40. Additionally, the following requirements need to + be met: - - **View CUDA Toolkit Documentation for a C++ code example** + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, the + strides must be a multiple of 32. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, the strides must + be a multiple of 32. Each following dimension specified includes + previous dimension stride: + + - **View CUDA Toolkit Documentation for a C++ code example** - `pixelBoxLowerCorner` array specifies the coordinate offsets {D, H, W} of the bounding box from top/left/front corner. The number of @@ -42803,6 +48268,10 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso - `channelsPerPixel`, which specifies the number of elements which must be accessed along C dimension, must be less than or equal to 256. + Additionally, when `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, `channelsPerPixel` + must be 128. - `pixelsPerColumn`, which specifies the number of elements that must be accessed along the {N, D, H, W} dimensions, must be less than or @@ -42830,18 +48299,20 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso uses 32 bytes. When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE` and `swizzle` is not :py:obj:`~.CU_TENSOR_MAP_SWIZZLE_NONE`, the bounding box inner - dimension (computed as `boxDim`[0] multiplied by element size derived - from `tensorDataType`) must be less than or equal to the swizzle - size. + dimension (computed as `channelsPerPixel` multiplied by element size + in bytes derived from `tensorDataType`) must be less than or equal to + the swizzle size. - - CU_TENSOR_MAP_SWIZZLE_32B implies the bounding box inner dimension - will be <= 32. + - CU_TENSOR_MAP_SWIZZLE_32B requires the bounding box inner dimension + to be <= 32. - - CU_TENSOR_MAP_SWIZZLE_64B implies the bounding box inner dimension - will be <= 64. + - CU_TENSOR_MAP_SWIZZLE_64B requires the bounding box inner dimension + to be <= 64. - - CU_TENSOR_MAP_SWIZZLE_128B implies the bounding box inner dimension - will be <= 128. + - CU_TENSOR_MAP_SWIZZLE_128B* require the bounding box inner + dimension to be <= 128. Additionally, `tensorDataType` of + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` requires + `interleave` to be :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`. - `swizzle`, which specifies the shared memory bank swizzling pattern, has to be of type :py:obj:`~.CUtensorMapSwizzle` which is defined as: @@ -42856,7 +48327,26 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso shared memory banks. When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, `swizzle` must be :py:obj:`~.CU_TENSOR_MAP_SWIZZLE_32B`. Other interleave modes can - have any swizzling pattern. + have any swizzling pattern. When the `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`, only the following + swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_NONE (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B (Store only) When the + `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, only the + following swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_NONE (Load only) + + - CU_TENSOR_MAP_SWIZZLE_128B (Load only) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load only) - `l2Promotion` specifies L2 fetch size which indicates the byte granularity at which L2 requests are filled from DRAM. It must be of @@ -42873,7 +48363,10 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso - Note that :py:obj:`~.CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA` can only be used when `tensorDataType` represents a floating-point data - type. + type, and when `tensorDataType` is not + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, and + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`. Parameters ---------- @@ -42919,7 +48412,7 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso See Also -------- - :py:obj:`~.cuTensorMapEncodeTiled`, :py:obj:`~.cuTensorMapReplaceAddress` + :py:obj:`~.cuTensorMapEncodeTiled`, :py:obj:`~.cuTensorMapEncodeIm2colWide`, :py:obj:`~.cuTensorMapReplaceAddress` """ elementStrides = [] if elementStrides is None else elementStrides if not all(isinstance(_x, (cuuint32_t,)) for _x in elementStrides): @@ -42974,7 +48467,7 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalDim)) + 'x' + str(sizeof(cydriver.cuuint64_t))) else: for idx in range(len(globalDim)): - cyglobalDim[idx] = (globalDim[idx])._ptr[0] + cyglobalDim[idx] = (globalDim[idx])._pvt_ptr[0] cdef cydriver.cuuint64_t* cyglobalStrides = NULL if len(globalStrides) > 0: cyglobalStrides = calloc(len(globalStrides), sizeof(cydriver.cuuint64_t)) @@ -42982,7 +48475,7 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalStrides)) + 'x' + str(sizeof(cydriver.cuuint64_t))) else: for idx in range(len(globalStrides)): - cyglobalStrides[idx] = (globalStrides[idx])._ptr[0] + cyglobalStrides[idx] = (globalStrides[idx])._pvt_ptr[0] cdef vector[int] cypixelBoxLowerCorner = pixelBoxLowerCorner cdef vector[int] cypixelBoxUpperCorner = pixelBoxUpperCorner cdef cydriver.cuuint32_t* cyelementStrides = NULL @@ -42992,12 +48485,333 @@ def cuTensorMapEncodeIm2col(tensorDataType not None : CUtensorMapDataType, tenso raise MemoryError('Failed to allocate length x size memory: ' + str(len(elementStrides)) + 'x' + str(sizeof(cydriver.cuuint32_t))) else: for idx in range(len(elementStrides)): - cyelementStrides[idx] = (elementStrides[idx])._ptr[0] + cyelementStrides[idx] = (elementStrides[idx])._pvt_ptr[0] cdef cydriver.CUtensorMapInterleave cyinterleave = interleave.value cdef cydriver.CUtensorMapSwizzle cyswizzle = swizzle.value cdef cydriver.CUtensorMapL2promotion cyl2Promotion = l2Promotion.value cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = oobFill.value - err = cydriver.cuTensorMapEncodeIm2col(tensorMap._ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, (globalDim[0])._ptr if len(globalDim) == 1 else cyglobalDim, (globalStrides[0])._ptr if len(globalStrides) == 1 else cyglobalStrides, cypixelBoxLowerCorner.data(), cypixelBoxUpperCorner.data(), cychannelsPerPixel, cypixelsPerColumn, (elementStrides[0])._ptr if len(elementStrides) == 1 else cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) + err = cydriver.cuTensorMapEncodeIm2col(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, (globalDim[0])._pvt_ptr if len(globalDim) == 1 else cyglobalDim, (globalStrides[0])._pvt_ptr if len(globalStrides) == 1 else cyglobalStrides, cypixelBoxLowerCorner.data(), cypixelBoxUpperCorner.data(), cychannelsPerPixel, cypixelsPerColumn, (elementStrides[0])._pvt_ptr if len(elementStrides) == 1 else cyelementStrides, cyinterleave, cyswizzle, cyl2Promotion, cyoobFill) + if cyglobalDim is not NULL: + free(cyglobalDim) + if cyglobalStrides is not NULL: + free(cyglobalStrides) + if cyelementStrides is not NULL: + free(cyelementStrides) + return (CUresult(err), tensorMap) +{{endif}} + +{{if 'cuTensorMapEncodeIm2colWide' in found_functions}} + +@cython.embedsignature(True) +def cuTensorMapEncodeIm2colWide(tensorDataType not None : CUtensorMapDataType, tensorRank, globalAddress, globalDim : Optional[Tuple[cuuint64_t] | List[cuuint64_t]], globalStrides : Optional[Tuple[cuuint64_t] | List[cuuint64_t]], int pixelBoxLowerCornerWidth, int pixelBoxUpperCornerWidth, channelsPerPixel, pixelsPerColumn, elementStrides : Optional[Tuple[cuuint32_t] | List[cuuint32_t]], interleave not None : CUtensorMapInterleave, mode not None : CUtensorMapIm2ColWideMode, swizzle not None : CUtensorMapSwizzle, l2Promotion not None : CUtensorMapL2promotion, oobFill not None : CUtensorMapFloatOOBfill): + """ Create a tensor map descriptor object representing im2col memory region, but where the elements are exclusively loaded along the W dimension. + + Creates a descriptor for Tensor Memory Access (TMA) object specified by + the parameters describing a im2col memory layout and where the row is + always loaded along the W dimensuin and returns it in `tensorMap`. This + assumes the tensor layout in memory is either NDHWC, NHWC, or NWC. + + This API is only supported on devices of compute capability 10.0 or + higher. Additionally, a tensor map object is an opaque value, and, as + such, should only be accessed through CUDA APIs and PTX. + + The parameters passed are bound to the following requirements: + + - `tensorMap` address must be aligned to 64 bytes. + + - `tensorDataType` has to be an enum from + :py:obj:`~.CUtensorMapDataType` which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B` copies '16 x U4' + packed values to memory aligned as 8 bytes. There are no gaps between + packed values. :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B` + copies '16 x U4' packed values to memory aligned as 16 bytes. There + are 8 byte gaps between every 8 byte chunk of packed values. + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` copies '16 x U6' + packed values to memory aligned as 16 bytes. There are 4 byte gaps + between every 12 byte chunk of packed values. + + - `tensorRank`, which specifies the number of tensor dimensions, must + be 3, 4, or 5. + + - `globalAddress`, which specifies the starting address of the memory + region described, must be 16 byte aligned. The following requirements + need to also be met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, + `globalAddress` must be 32 byte aligned. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, `globalAddress` + must be 32 byte aligned. + + `globalDim` array, which specifies tensor size of each of the + `tensorRank` dimensions, must be non-zero and less than or equal to + 2^32. Additionally, the following requirements need to be met for the + packed data types: + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, globalDim[0] must + be a multiple of 128. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, `globalDim`[0] must + be a multiple of 2. + + - Dimension for the packed data types must reflect the number of + individual U# values. + + `globalStrides` array, which specifies tensor stride of each of the + lower `tensorRank` - 1 dimensions in bytes, must be a multiple of 16 + and less than 2^40. Additionally, the following requirements need to be + met: + + - When `interleave` is :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_32B`, the + strides must be a multiple of 32. + + - When `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, the strides must + be a multiple of 32. Each following dimension specified includes + previous dimension stride: + + - **View CUDA Toolkit Documentation for a C++ code example** + + `pixelBoxLowerCornerWidth` specifies the coordinate offset W of the + bounding box from left corner. The offset must be within range [-32768, + 32767]. + + - `pixelBoxUpperCornerWidth` specifies the coordinate offset W of the + bounding box from right corner. The offset must be within range + [-32768, 32767]. + + The bounding box specified by `pixelBoxLowerCornerWidth` and + `pixelBoxUpperCornerWidth` must have non-zero area. Note that the size + of the box along D and H dimensions is always equal to one. + + - `channelsPerPixel`, which specifies the number of elements which must + be accessed along C dimension, must be less than or equal to 256. + Additionally, when `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` or + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, `channelsPerPixel` + must be 128. + + - `pixelsPerColumn`, which specifies the number of elements that must + be accessed along the W dimension, must be less than or equal to + 1024. This field is ignored when `mode` is + :py:obj:`~.CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128`. + + - `elementStrides` array, which specifies the iteration step along each + of the `tensorRank` dimensions, must be non-zero and less than or + equal to 8. Note that when `interleave` is + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, the first element of this + array is ignored since TMA doesn’t support the stride for dimension + zero. When all elements of the `elementStrides` array are one, + `boxDim` specifies the number of elements to load. However, if + `elementStrides`[i] is not equal to one for some `i`, then TMA loads + ceil( `boxDim`[i] / `elementStrides`[i]) number of elements along + i-th dimension. To load N elements along i-th dimension, `boxDim`[i] + must be set to N * `elementStrides`[i]. + + - `interleave` specifies the interleaved layout of type + :py:obj:`~.CUtensorMapInterleave`, which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - TMA supports interleaved layouts like NC/8HWC8 where C8 utilizes 16 + bytes in memory assuming 2 byte per channel or NC/16HWC16 where C16 + uses 32 bytes. When `interleave` is + :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`, the bounding box inner + dimension (computed as `channelsPerPixel` multiplied by element size + in bytes derived from `tensorDataType`) must be less than or equal to + the swizzle size. + + - CU_TENSOR_MAP_SWIZZLE_64B requires the bounding box inner dimension + to be <= 64. + + - CU_TENSOR_MAP_SWIZZLE_128B* require the bounding box inner + dimension to be <= 128. Additionally, `tensorDataType` of + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B` requires + `interleave` to be :py:obj:`~.CU_TENSOR_MAP_INTERLEAVE_NONE`. + + - `mode`, which describes loading of elements loaded along the W + dimension, has to be one of the following + :py:obj:`~.CUtensorMapIm2ColWideMode` types: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - :py:obj:`~.CU_TENSOR_MAP_IM2COL_WIDE_MODE_W` allows the number of + elements loaded along the W dimension to be specified via the + `pixelsPerColumn` field. + + - `swizzle`, which specifies the shared memory bank swizzling pattern, + must be one of the following :py:obj:`~.CUtensorMapSwizzle` modes + (other swizzle modes are not supported): + + - **View CUDA Toolkit Documentation for a C++ code example** + + - Data are organized in a specific order in global memory; however, + this may not match the order in which the application accesses data + in shared memory. This difference in data organization may cause bank + conflicts when shared memory is accessed. In order to avoid this + problem, data can be loaded to shared memory with shuffling across + shared memory banks. When the `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`, only the following + swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_128B (Load & Store) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load & Store) When the + `tensorDataType` is + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, only the + following swizzle modes are supported: + + - CU_TENSOR_MAP_SWIZZLE_128B (Load only) + + - CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B (Load only) + + - `l2Promotion` specifies L2 fetch size which indicates the byte + granularity at which L2 requests are filled from DRAM. It must be of + type :py:obj:`~.CUtensorMapL2promotion`, which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - `oobFill`, which indicates whether zero or a special NaN constant + should be used to fill out-of-bound elements, must be of type + :py:obj:`~.CUtensorMapFloatOOBfill` which is defined as: + + - **View CUDA Toolkit Documentation for a C++ code example** + + - Note that + :py:obj:`~.CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA` can + only be used when `tensorDataType` represents a floating-point data + type, and when `tensorDataType` is not + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B`, + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B`, and + :py:obj:`~.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B`. + + Parameters + ---------- + tensorDataType : :py:obj:`~.CUtensorMapDataType` + Tensor data type + tensorRank : Any + Dimensionality of tensor; must be at least 3 + globalAddress : Any + Starting address of memory region described by tensor + globalDim : List[:py:obj:`~.cuuint64_t`] + Array containing tensor size (number of elements) along each of the + `tensorRank` dimensions + globalStrides : List[:py:obj:`~.cuuint64_t`] + Array containing stride size (in bytes) along each of the + `tensorRank` - 1 dimensions + pixelBoxLowerCornerWidth : int + Width offset of left box corner + pixelBoxUpperCornerWidth : int + Width offset of right box corner + channelsPerPixel : Any + Number of channels per pixel + pixelsPerColumn : Any + Number of pixels per column + elementStrides : List[:py:obj:`~.cuuint32_t`] + Array containing traversal stride in each of the `tensorRank` + dimensions + interleave : :py:obj:`~.CUtensorMapInterleave` + Type of interleaved layout the tensor addresses + mode : :py:obj:`~.CUtensorMapIm2ColWideMode` + W or W128 mode + swizzle : :py:obj:`~.CUtensorMapSwizzle` + Bank swizzling pattern inside shared memory + l2Promotion : :py:obj:`~.CUtensorMapL2promotion` + L2 promotion size + oobFill : :py:obj:`~.CUtensorMapFloatOOBfill` + Indicate whether zero or special NaN constant will be used to fill + out-of-bound elements + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + tensorMap : :py:obj:`~.CUtensorMap` + Tensor map object to create + + See Also + -------- + :py:obj:`~.cuTensorMapEncodeTiled`, :py:obj:`~.cuTensorMapEncodeIm2col`, :py:obj:`~.cuTensorMapReplaceAddress` + """ + elementStrides = [] if elementStrides is None else elementStrides + if not all(isinstance(_x, (cuuint32_t,)) for _x in elementStrides): + raise TypeError("Argument 'elementStrides' is not instance of type (expected Tuple[cydriver.cuuint32_t,] or List[cydriver.cuuint32_t,]") + cdef cydriver.cuuint32_t cypixelsPerColumn + if pixelsPerColumn is None: + cypixelsPerColumn = 0 + elif isinstance(pixelsPerColumn, (cuuint32_t,)): + ppixelsPerColumn = int(pixelsPerColumn) + cypixelsPerColumn = ppixelsPerColumn + else: + ppixelsPerColumn = int(cuuint32_t(pixelsPerColumn)) + cypixelsPerColumn = ppixelsPerColumn + cdef cydriver.cuuint32_t cychannelsPerPixel + if channelsPerPixel is None: + cychannelsPerPixel = 0 + elif isinstance(channelsPerPixel, (cuuint32_t,)): + pchannelsPerPixel = int(channelsPerPixel) + cychannelsPerPixel = pchannelsPerPixel + else: + pchannelsPerPixel = int(cuuint32_t(channelsPerPixel)) + cychannelsPerPixel = pchannelsPerPixel + globalStrides = [] if globalStrides is None else globalStrides + if not all(isinstance(_x, (cuuint64_t,)) for _x in globalStrides): + raise TypeError("Argument 'globalStrides' is not instance of type (expected Tuple[cydriver.cuuint64_t,] or List[cydriver.cuuint64_t,]") + globalDim = [] if globalDim is None else globalDim + if not all(isinstance(_x, (cuuint64_t,)) for _x in globalDim): + raise TypeError("Argument 'globalDim' is not instance of type (expected Tuple[cydriver.cuuint64_t,] or List[cydriver.cuuint64_t,]") + cdef cydriver.cuuint32_t cytensorRank + if tensorRank is None: + cytensorRank = 0 + elif isinstance(tensorRank, (cuuint32_t,)): + ptensorRank = int(tensorRank) + cytensorRank = ptensorRank + else: + ptensorRank = int(cuuint32_t(tensorRank)) + cytensorRank = ptensorRank + cdef CUtensorMap tensorMap = CUtensorMap() + cdef cydriver.CUtensorMapDataType cytensorDataType = tensorDataType.value + cyglobalAddress = utils.HelperInputVoidPtr(globalAddress) + cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr + cdef cydriver.cuuint64_t* cyglobalDim = NULL + if len(globalDim) > 0: + cyglobalDim = calloc(len(globalDim), sizeof(cydriver.cuuint64_t)) + if cyglobalDim is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalDim)) + 'x' + str(sizeof(cydriver.cuuint64_t))) + else: + for idx in range(len(globalDim)): + cyglobalDim[idx] = (globalDim[idx])._pvt_ptr[0] + cdef cydriver.cuuint64_t* cyglobalStrides = NULL + if len(globalStrides) > 0: + cyglobalStrides = calloc(len(globalStrides), sizeof(cydriver.cuuint64_t)) + if cyglobalStrides is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(globalStrides)) + 'x' + str(sizeof(cydriver.cuuint64_t))) + else: + for idx in range(len(globalStrides)): + cyglobalStrides[idx] = (globalStrides[idx])._pvt_ptr[0] + cdef cydriver.cuuint32_t* cyelementStrides = NULL + if len(elementStrides) > 0: + cyelementStrides = calloc(len(elementStrides), sizeof(cydriver.cuuint32_t)) + if cyelementStrides is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(elementStrides)) + 'x' + str(sizeof(cydriver.cuuint32_t))) + else: + for idx in range(len(elementStrides)): + cyelementStrides[idx] = (elementStrides[idx])._pvt_ptr[0] + cdef cydriver.CUtensorMapInterleave cyinterleave = interleave.value + cdef cydriver.CUtensorMapIm2ColWideMode cymode = mode.value + cdef cydriver.CUtensorMapSwizzle cyswizzle = swizzle.value + cdef cydriver.CUtensorMapL2promotion cyl2Promotion = l2Promotion.value + cdef cydriver.CUtensorMapFloatOOBfill cyoobFill = oobFill.value + err = cydriver.cuTensorMapEncodeIm2colWide(tensorMap._pvt_ptr, cytensorDataType, cytensorRank, cyglobalAddress_ptr, (globalDim[0])._pvt_ptr if len(globalDim) == 1 else cyglobalDim, (globalStrides[0])._pvt_ptr if len(globalStrides) == 1 else cyglobalStrides, pixelBoxLowerCornerWidth, pixelBoxUpperCornerWidth, cychannelsPerPixel, cypixelsPerColumn, (elementStrides[0])._pvt_ptr if len(elementStrides) == 1 else cyelementStrides, cyinterleave, cymode, cyswizzle, cyl2Promotion, cyoobFill) if cyglobalDim is not NULL: free(cyglobalDim) if cyglobalStrides is not NULL: @@ -43035,9 +48849,9 @@ def cuTensorMapReplaceAddress(tensorMap : Optional[CUtensorMap], globalAddress): See Also -------- - :py:obj:`~.cuTensorMapEncodeTiled`, :py:obj:`~.cuTensorMapEncodeIm2col` + :py:obj:`~.cuTensorMapEncodeTiled`, :py:obj:`~.cuTensorMapEncodeIm2col` :py:obj:`~.cuTensorMapEncodeIm2colWide` """ - cdef cydriver.CUtensorMap* cytensorMap_ptr = tensorMap._ptr if tensorMap != None else NULL + cdef cydriver.CUtensorMap* cytensorMap_ptr = tensorMap._pvt_ptr if tensorMap != None else NULL cyglobalAddress = utils.HelperInputVoidPtr(globalAddress) cdef void* cyglobalAddress_ptr = cyglobalAddress.cptr err = cydriver.cuTensorMapReplaceAddress(cytensorMap_ptr, cyglobalAddress_ptr) @@ -43373,7 +49187,7 @@ def cuGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsig presource = int(CUgraphicsResource(resource)) cyresource = presource cdef CUarray pArray = CUarray() - err = cydriver.cuGraphicsSubResourceGetMappedArray(pArray._ptr, cyresource, arrayIndex, mipLevel) + err = cydriver.cuGraphicsSubResourceGetMappedArray(pArray._pvt_ptr, cyresource, arrayIndex, mipLevel) return (CUresult(err), pArray) {{endif}} @@ -43418,7 +49232,7 @@ def cuGraphicsResourceGetMappedMipmappedArray(resource): presource = int(CUgraphicsResource(resource)) cyresource = presource cdef CUmipmappedArray pMipmappedArray = CUmipmappedArray() - err = cydriver.cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray._ptr, cyresource) + err = cydriver.cuGraphicsResourceGetMappedMipmappedArray(pMipmappedArray._pvt_ptr, cyresource) return (CUresult(err), pMipmappedArray) {{endif}} @@ -43463,7 +49277,7 @@ def cuGraphicsResourceGetMappedPointer(resource): cyresource = presource cdef CUdeviceptr pDevPtr = CUdeviceptr() cdef size_t pSize = 0 - err = cydriver.cuGraphicsResourceGetMappedPointer(pDevPtr._ptr, &pSize, cyresource) + err = cydriver.cuGraphicsResourceGetMappedPointer(pDevPtr._pvt_ptr, &pSize, cyresource) return (CUresult(err), pDevPtr, pSize) {{endif}} @@ -44246,7 +50060,7 @@ def cuGetExportTable(pExportTableId : Optional[CUuuid]): None """ cdef void_ptr ppExportTable = 0 - cdef cydriver.CUuuid* cypExportTableId_ptr = pExportTableId._ptr if pExportTableId != None else NULL + cdef cydriver.CUuuid* cypExportTableId_ptr = pExportTableId._pvt_ptr if pExportTableId != None else NULL err = cydriver.cuGetExportTable(&ppExportTable, cypExportTableId_ptr) return (CUresult(err), ppExportTable) {{endif}} @@ -44322,7 +50136,7 @@ def cuGreenCtxCreate(desc, dev, unsigned int flags): pdesc = int(CUdevResourceDesc(desc)) cydesc = pdesc cdef CUgreenCtx phCtx = CUgreenCtx() - err = cydriver.cuGreenCtxCreate(phCtx._ptr, cydesc, cydev, flags) + err = cydriver.cuGreenCtxCreate(phCtx._pvt_ptr, cydesc, cydev, flags) return (CUresult(err), phCtx) {{endif}} @@ -44407,7 +50221,7 @@ def cuCtxFromGreenCtx(hCtx): phCtx = int(CUgreenCtx(hCtx)) cyhCtx = phCtx cdef CUcontext pContext = CUcontext() - err = cydriver.cuCtxFromGreenCtx(pContext._ptr, cyhCtx) + err = cydriver.cuCtxFromGreenCtx(pContext._pvt_ptr, cyhCtx) return (CUresult(err), pContext) {{endif}} @@ -44452,7 +50266,7 @@ def cuDeviceGetDevResource(device, typename not None : CUdevResourceType): cydevice = pdevice cdef CUdevResource resource = CUdevResource() cdef cydriver.CUdevResourceType cytypename = typename.value - err = cydriver.cuDeviceGetDevResource(cydevice, resource._ptr, cytypename) + err = cydriver.cuDeviceGetDevResource(cydevice, resource._pvt_ptr, cytypename) return (CUresult(err), resource) {{endif}} @@ -44494,7 +50308,7 @@ def cuCtxGetDevResource(hCtx, typename not None : CUdevResourceType): cyhCtx = phCtx cdef CUdevResource resource = CUdevResource() cdef cydriver.CUdevResourceType cytypename = typename.value - err = cydriver.cuCtxGetDevResource(cyhCtx, resource._ptr, cytypename) + err = cydriver.cuCtxGetDevResource(cyhCtx, resource._pvt_ptr, cytypename) return (CUresult(err), resource) {{endif}} @@ -44536,7 +50350,7 @@ def cuGreenCtxGetDevResource(hCtx, typename not None : CUdevResourceType): cyhCtx = phCtx cdef CUdevResource resource = CUdevResource() cdef cydriver.CUdevResourceType cytypename = typename.value - err = cydriver.cuGreenCtxGetDevResource(cyhCtx, resource._ptr, cytypename) + err = cydriver.cuGreenCtxGetDevResource(cyhCtx, resource._pvt_ptr, cytypename) return (CUresult(err), resource) {{endif}} @@ -44644,12 +50458,12 @@ def cuDevSmResourceSplitByCount(unsigned int nbGroups, input_ : Optional[CUdevRe if cyresult is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(nbGroups) + 'x' + str(sizeof(cydriver.CUdevResource))) cdef unsigned int cynbGroups = nbGroups - cdef cydriver.CUdevResource* cyinput__ptr = input_._ptr if input_ != None else NULL + cdef cydriver.CUdevResource* cyinput__ptr = input_._pvt_ptr if input_ != None else NULL cdef CUdevResource remaining = CUdevResource() - err = cydriver.cuDevSmResourceSplitByCount(cyresult, &cynbGroups, cyinput__ptr, remaining._ptr, useFlags, minCount) + err = cydriver.cuDevSmResourceSplitByCount(cyresult, &cynbGroups, cyinput__ptr, remaining._pvt_ptr, useFlags, minCount) if CUresult(err) == CUresult(0): for idx in range(nbGroups): - string.memcpy((pyresult[idx])._ptr, &cyresult[idx], sizeof(cydriver.CUdevResource)) + string.memcpy((pyresult[idx])._pvt_ptr, &cyresult[idx], sizeof(cydriver.CUdevResource)) if cyresult is not NULL: free(cyresult) return (CUresult(err), pyresult, cynbGroups, remaining) @@ -44709,9 +50523,9 @@ def cuDevResourceGenerateDesc(resources : Optional[Tuple[CUdevResource] | List[C if cyresources is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(resources)) + 'x' + str(sizeof(cydriver.CUdevResource))) for idx in range(len(resources)): - string.memcpy(&cyresources[idx], (resources[idx])._ptr, sizeof(cydriver.CUdevResource)) + string.memcpy(&cyresources[idx], (resources[idx])._pvt_ptr, sizeof(cydriver.CUdevResource)) if nbResources > len(resources): raise RuntimeError("List is too small: " + str(len(resources)) + " < " + str(nbResources)) - err = cydriver.cuDevResourceGenerateDesc(phDesc._ptr, (resources[0])._ptr if len(resources) == 1 else cyresources, nbResources) + err = cydriver.cuDevResourceGenerateDesc(phDesc._pvt_ptr, (resources[0])._pvt_ptr if len(resources) == 1 else cyresources, nbResources) if cyresources is not NULL: free(cyresources) return (CUresult(err), phDesc) @@ -44871,7 +50685,7 @@ def cuStreamGetGreenCtx(hStream): See Also -------- - :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetCtx_v2`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags` + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamCreateWithPriority`, :py:obj:`~.cuStreamGetCtx_v2`, :py:obj:`~.cuGreenCtxStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice` :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithFlags` """ cdef cydriver.CUstream cyhStream if hStream is None: @@ -44883,7 +50697,7 @@ def cuStreamGetGreenCtx(hStream): phStream = int(CUstream(hStream)) cyhStream = phStream cdef CUgreenCtx phCtx = CUgreenCtx() - err = cydriver.cuStreamGetGreenCtx(cyhStream, phCtx._ptr) + err = cydriver.cuStreamGetGreenCtx(cyhStream, phCtx._pvt_ptr) return (CUresult(err), phCtx) {{endif}} @@ -44940,7 +50754,7 @@ def cuGreenCtxStreamCreate(greenCtx, unsigned int flags, int priority): See Also -------- - :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuGreenCtxCreate` :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreateWithPriority` + :py:obj:`~.cuStreamDestroy`, :py:obj:`~.cuGreenCtxCreate` :py:obj:`~.cuStreamCreate`, :py:obj:`~.cuStreamGetPriority`, :py:obj:`~.cuCtxGetStreamPriorityRange`, :py:obj:`~.cuStreamGetFlags`, :py:obj:`~.cuStreamGetDevice` :py:obj:`~.cuStreamWaitEvent`, :py:obj:`~.cuStreamQuery`, :py:obj:`~.cuStreamSynchronize`, :py:obj:`~.cuStreamAddCallback`, :py:obj:`~.cudaStreamCreateWithPriority` Notes ----- @@ -44956,10 +50770,186 @@ def cuGreenCtxStreamCreate(greenCtx, unsigned int flags, int priority): pgreenCtx = int(CUgreenCtx(greenCtx)) cygreenCtx = pgreenCtx cdef CUstream phStream = CUstream() - err = cydriver.cuGreenCtxStreamCreate(phStream._ptr, cygreenCtx, flags, priority) + err = cydriver.cuGreenCtxStreamCreate(phStream._pvt_ptr, cygreenCtx, flags, priority) return (CUresult(err), phStream) {{endif}} +{{if 'cuCheckpointProcessGetRestoreThreadId' in found_functions}} + +@cython.embedsignature(True) +def cuCheckpointProcessGetRestoreThreadId(int pid): + """ Returns the restore thread ID for a CUDA process. + + Returns in `*tid` the thread ID of the CUDA restore thread for the + process specified by `pid`. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + tid : int + Returned restore thread ID + """ + cdef int tid = 0 + err = cydriver.cuCheckpointProcessGetRestoreThreadId(pid, &tid) + return (CUresult(err), tid) +{{endif}} + +{{if 'cuCheckpointProcessGetState' in found_functions}} + +@cython.embedsignature(True) +def cuCheckpointProcessGetState(int pid): + """ Returns the process state of a CUDA process. + + Returns in `*state` the current state of the CUDA process specified by + `pid`. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + state : :py:obj:`~.CUprocessState` + Returned CUDA process state + """ + cdef cydriver.CUprocessState state + err = cydriver.cuCheckpointProcessGetState(pid, &state) + return (CUresult(err), CUprocessState(state)) +{{endif}} + +{{if 'cuCheckpointProcessLock' in found_functions}} + +@cython.embedsignature(True) +def cuCheckpointProcessLock(int pid, args : Optional[CUcheckpointLockArgs]): + """ Lock a running CUDA process. + + Lock the CUDA process specified by `pid` which will block further CUDA + API calls. Process must be in the RUNNING state in order to lock. + + Upon successful return the process will be in the LOCKED state. + + If timeoutMs is specified and the timeout is reached the process will + be left in the RUNNING state upon return. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + args : :py:obj:`~.CUcheckpointLockArgs` + Optional lock operation arguments + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` :py:obj:`~.CUDA_ERROR_NOT_READY` + """ + cdef cydriver.CUcheckpointLockArgs* cyargs_ptr = args._pvt_ptr if args != None else NULL + err = cydriver.cuCheckpointProcessLock(pid, cyargs_ptr) + return (CUresult(err),) +{{endif}} + +{{if 'cuCheckpointProcessCheckpoint' in found_functions}} + +@cython.embedsignature(True) +def cuCheckpointProcessCheckpoint(int pid, args : Optional[CUcheckpointCheckpointArgs]): + """ Checkpoint a CUDA process's GPU memory contents. + + Checkpoints a CUDA process specified by `pid` that is in the LOCKED + state. The GPU memory contents will be brought into host memory and all + underlying references will be released. Process must be in the LOCKED + state to checkpoint. + + Upon successful return the process will be in the CHECKPOINTED state. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + args : :py:obj:`~.CUcheckpointCheckpointArgs` + Optional checkpoint operation arguments + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + """ + cdef cydriver.CUcheckpointCheckpointArgs* cyargs_ptr = args._pvt_ptr if args != None else NULL + err = cydriver.cuCheckpointProcessCheckpoint(pid, cyargs_ptr) + return (CUresult(err),) +{{endif}} + +{{if 'cuCheckpointProcessRestore' in found_functions}} + +@cython.embedsignature(True) +def cuCheckpointProcessRestore(int pid, args : Optional[CUcheckpointRestoreArgs]): + """ Restore a CUDA process's GPU memory contents from its last checkpoint. + + Restores a CUDA process specified by `pid` from its last checkpoint. + Process must be in the CHECKPOINTED state to restore. + + Upon successful return the process will be in the LOCKED state. + + CUDA process restore requires persistence mode to be enabled or + :py:obj:`~.cuInit` to have been called before execution. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + args : :py:obj:`~.CUcheckpointRestoreArgs` + Optional restore operation arguments + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuInit` + """ + cdef cydriver.CUcheckpointRestoreArgs* cyargs_ptr = args._pvt_ptr if args != None else NULL + err = cydriver.cuCheckpointProcessRestore(pid, cyargs_ptr) + return (CUresult(err),) +{{endif}} + +{{if 'cuCheckpointProcessUnlock' in found_functions}} + +@cython.embedsignature(True) +def cuCheckpointProcessUnlock(int pid, args : Optional[CUcheckpointUnlockArgs]): + """ Unlock a CUDA process to allow CUDA API calls. + + Unlocks a process specified by `pid` allowing it to resume making CUDA + API calls. Process must be in the LOCKED state. + + Upon successful return the process will be in the RUNNING state. + + Parameters + ---------- + pid : int + The process ID of the CUDA process + args : :py:obj:`~.CUcheckpointUnlockArgs` + Optional unlock operation arguments + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + """ + cdef cydriver.CUcheckpointUnlockArgs* cyargs_ptr = args._pvt_ptr if args != None else NULL + err = cydriver.cuCheckpointProcessUnlock(pid, cyargs_ptr) + return (CUresult(err),) +{{endif}} + {{if 'cuProfilerStart' in found_functions}} @cython.embedsignature(True) @@ -45084,7 +51074,7 @@ def cuGraphicsEGLRegisterImage(image, unsigned int flags): pimage = int(EGLImageKHR(image)) cyimage = pimage cdef CUgraphicsResource pCudaResource = CUgraphicsResource() - err = cydriver.cuGraphicsEGLRegisterImage(pCudaResource._ptr, cyimage, flags) + err = cydriver.cuGraphicsEGLRegisterImage(pCudaResource._pvt_ptr, cyimage, flags) return (CUresult(err), pCudaResource) {{endif}} @@ -45125,7 +51115,7 @@ def cuEGLStreamConsumerConnect(stream): pstream = int(EGLStreamKHR(stream)) cystream = pstream cdef CUeglStreamConnection conn = CUeglStreamConnection() - err = cydriver.cuEGLStreamConsumerConnect(conn._ptr, cystream) + err = cydriver.cuEGLStreamConsumerConnect(conn._pvt_ptr, cystream) return (CUresult(err), conn) {{endif}} @@ -45170,7 +51160,7 @@ def cuEGLStreamConsumerConnectWithFlags(stream, unsigned int flags): pstream = int(EGLStreamKHR(stream)) cystream = pstream cdef CUeglStreamConnection conn = CUeglStreamConnection() - err = cydriver.cuEGLStreamConsumerConnectWithFlags(conn._ptr, cystream, flags) + err = cydriver.cuEGLStreamConsumerConnectWithFlags(conn._pvt_ptr, cystream, flags) return (CUresult(err), conn) {{endif}} @@ -45403,7 +51393,7 @@ def cuEGLStreamProducerConnect(stream, width, height): pstream = int(EGLStreamKHR(stream)) cystream = pstream cdef CUeglStreamConnection conn = CUeglStreamConnection() - err = cydriver.cuEGLStreamProducerConnect(conn._ptr, cystream, cywidth, cyheight) + err = cydriver.cuEGLStreamProducerConnect(conn._pvt_ptr, cystream, cywidth, cyheight) return (CUresult(err), conn) {{endif}} @@ -45508,7 +51498,7 @@ def cuEGLStreamProducerPresentFrame(conn, eglframe not None : CUeglFrame, pStrea cyconn = conn else: raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) - err = cydriver.cuEGLStreamProducerPresentFrame(cyconn, eglframe._ptr[0], cypStream) + err = cydriver.cuEGLStreamProducerPresentFrame(cyconn, eglframe._pvt_ptr[0], cypStream) return (CUresult(err),) {{endif}} @@ -45561,7 +51551,7 @@ def cuEGLStreamProducerReturnFrame(conn, eglframe : Optional[CUeglFrame], pStrea cyconn = conn else: raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) - cdef cydriver.CUeglFrame* cyeglframe_ptr = eglframe._ptr if eglframe != None else NULL + cdef cydriver.CUeglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe != None else NULL err = cydriver.cuEGLStreamProducerReturnFrame(cyconn, cyeglframe_ptr, cypStream) return (CUresult(err),) {{endif}} @@ -45609,7 +51599,7 @@ def cuGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned i presource = int(CUgraphicsResource(resource)) cyresource = presource cdef CUeglFrame eglFrame = CUeglFrame() - err = cydriver.cuGraphicsResourceGetMappedEglFrame(eglFrame._ptr, cyresource, index, mipLevel) + err = cydriver.cuGraphicsResourceGetMappedEglFrame(eglFrame._pvt_ptr, cyresource, index, mipLevel) return (CUresult(err), eglFrame) {{endif}} @@ -45666,7 +51656,7 @@ def cuEventCreateFromEGLSync(eglSync, unsigned int flags): peglSync = int(EGLSyncKHR(eglSync)) cyeglSync = peglSync cdef CUevent phEvent = CUevent() - err = cydriver.cuEventCreateFromEGLSync(phEvent._ptr, cyeglSync, flags) + err = cydriver.cuEventCreateFromEGLSync(phEvent._pvt_ptr, cyeglSync, flags) return (CUresult(err), phEvent) {{endif}} @@ -45721,7 +51711,7 @@ def cuGraphicsGLRegisterBuffer(buffer, unsigned int Flags): pbuffer = int(GLuint(buffer)) cybuffer = pbuffer cdef CUgraphicsResource pCudaResource = CUgraphicsResource() - err = cydriver.cuGraphicsGLRegisterBuffer(pCudaResource._ptr, cybuffer, Flags) + err = cydriver.cuGraphicsGLRegisterBuffer(pCudaResource._pvt_ptr, cybuffer, Flags) return (CUresult(err), pCudaResource) {{endif}} @@ -45820,7 +51810,7 @@ def cuGraphicsGLRegisterImage(image, target, unsigned int Flags): pimage = int(GLuint(image)) cyimage = pimage cdef CUgraphicsResource pCudaResource = CUgraphicsResource() - err = cydriver.cuGraphicsGLRegisterImage(pCudaResource._ptr, cyimage, cytarget, Flags) + err = cydriver.cuGraphicsGLRegisterImage(pCudaResource._pvt_ptr, cyimage, cytarget, Flags) return (CUresult(err), pCudaResource) {{endif}} @@ -45937,7 +51927,7 @@ def cuVDPAUGetDevice(vdpDevice, vdpGetProcAddress): pvdpDevice = int(VdpDevice(vdpDevice)) cyvdpDevice = pvdpDevice cdef CUdevice pDevice = CUdevice() - err = cydriver.cuVDPAUGetDevice(pDevice._ptr, cyvdpDevice, cyvdpGetProcAddress) + err = cydriver.cuVDPAUGetDevice(pDevice._pvt_ptr, cyvdpDevice, cyvdpGetProcAddress) return (CUresult(err), pDevice) {{endif}} @@ -46004,7 +51994,7 @@ def cuVDPAUCtxCreate(unsigned int flags, device, vdpDevice, vdpGetProcAddress): pdevice = int(CUdevice(device)) cydevice = pdevice cdef CUcontext pCtx = CUcontext() - err = cydriver.cuVDPAUCtxCreate(pCtx._ptr, flags, cydevice, cyvdpDevice, cyvdpGetProcAddress) + err = cydriver.cuVDPAUCtxCreate(pCtx._pvt_ptr, flags, cydevice, cyvdpDevice, cyvdpGetProcAddress) return (CUresult(err), pCtx) {{endif}} @@ -46065,7 +52055,7 @@ def cuGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags): pvdpSurface = int(VdpVideoSurface(vdpSurface)) cyvdpSurface = pvdpSurface cdef CUgraphicsResource pCudaResource = CUgraphicsResource() - err = cydriver.cuGraphicsVDPAURegisterVideoSurface(pCudaResource._ptr, cyvdpSurface, flags) + err = cydriver.cuGraphicsVDPAURegisterVideoSurface(pCudaResource._pvt_ptr, cyvdpSurface, flags) return (CUresult(err), pCudaResource) {{endif}} @@ -46126,7 +52116,7 @@ def cuGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags): pvdpSurface = int(VdpOutputSurface(vdpSurface)) cyvdpSurface = pvdpSurface cdef CUgraphicsResource pCudaResource = CUgraphicsResource() - err = cydriver.cuGraphicsVDPAURegisterOutputSurface(pCudaResource._ptr, cyvdpSurface, flags) + err = cydriver.cuGraphicsVDPAURegisterOutputSurface(pCudaResource._pvt_ptr, cyvdpSurface, flags) return (CUresult(err), pCudaResource) {{endif}} @@ -46243,13 +52233,13 @@ def sizeof(objType): {{if 'CUgreenCtx' in found_types}} if objType == CUgreenCtx: return sizeof(cydriver.CUgreenCtx){{endif}} - {{if 'struct CUuuid_st' in found_types}} + {{if 'CUuuid_st' in found_struct}} if objType == CUuuid_st: return sizeof(cydriver.CUuuid_st){{endif}} {{if 'CUuuid' in found_types}} if objType == CUuuid: return sizeof(cydriver.CUuuid){{endif}} - {{if 'struct CUmemFabricHandle_st' in found_types}} + {{if 'CUmemFabricHandle_st' in found_struct}} if objType == CUmemFabricHandle_st: return sizeof(cydriver.CUmemFabricHandle_st){{endif}} {{if 'CUmemFabricHandle_v1' in found_types}} @@ -46258,7 +52248,7 @@ def sizeof(objType): {{if 'CUmemFabricHandle' in found_types}} if objType == CUmemFabricHandle: return sizeof(cydriver.CUmemFabricHandle){{endif}} - {{if 'struct CUipcEventHandle_st' in found_types}} + {{if 'CUipcEventHandle_st' in found_struct}} if objType == CUipcEventHandle_st: return sizeof(cydriver.CUipcEventHandle_st){{endif}} {{if 'CUipcEventHandle_v1' in found_types}} @@ -46267,7 +52257,7 @@ def sizeof(objType): {{if 'CUipcEventHandle' in found_types}} if objType == CUipcEventHandle: return sizeof(cydriver.CUipcEventHandle){{endif}} - {{if 'struct CUipcMemHandle_st' in found_types}} + {{if 'CUipcMemHandle_st' in found_struct}} if objType == CUipcMemHandle_st: return sizeof(cydriver.CUipcMemHandle_st){{endif}} {{if 'CUipcMemHandle_v1' in found_types}} @@ -46276,7 +52266,7 @@ def sizeof(objType): {{if 'CUipcMemHandle' in found_types}} if objType == CUipcMemHandle: return sizeof(cydriver.CUipcMemHandle){{endif}} - {{if 'union CUstreamBatchMemOpParams_union' in found_types}} + {{if 'CUstreamBatchMemOpParams_union' in found_struct}} if objType == CUstreamBatchMemOpParams_union: return sizeof(cydriver.CUstreamBatchMemOpParams_union){{endif}} {{if 'CUstreamBatchMemOpParams_v1' in found_types}} @@ -46285,7 +52275,7 @@ def sizeof(objType): {{if 'CUstreamBatchMemOpParams' in found_types}} if objType == CUstreamBatchMemOpParams: return sizeof(cydriver.CUstreamBatchMemOpParams){{endif}} - {{if 'struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st' in found_types}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st' in found_struct}} if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: return sizeof(cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st){{endif}} {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v1' in found_types}} @@ -46294,13 +52284,13 @@ def sizeof(objType): {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS' in found_types}} if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS: return sizeof(cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS){{endif}} - {{if 'struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st' in found_types}} + {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st' in found_struct}} if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st: return sizeof(cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st){{endif}} {{if 'CUDA_BATCH_MEM_OP_NODE_PARAMS_v2' in found_types}} if objType == CUDA_BATCH_MEM_OP_NODE_PARAMS_v2: return sizeof(cydriver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2){{endif}} - {{if 'struct CUasyncNotificationInfo_st' in found_types}} + {{if 'CUasyncNotificationInfo_st' in found_struct}} if objType == CUasyncNotificationInfo_st: return sizeof(cydriver.CUasyncNotificationInfo_st){{endif}} {{if 'CUasyncNotificationInfo' in found_types}} @@ -46309,7 +52299,7 @@ def sizeof(objType): {{if 'CUasyncCallback' in found_types}} if objType == CUasyncCallback: return sizeof(cydriver.CUasyncCallback){{endif}} - {{if 'struct CUdevprop_st' in found_types}} + {{if 'CUdevprop_st' in found_struct}} if objType == CUdevprop_st: return sizeof(cydriver.CUdevprop_st){{endif}} {{if 'CUdevprop_v1' in found_types}} @@ -46324,7 +52314,7 @@ def sizeof(objType): {{if 'CUhostFn' in found_types}} if objType == CUhostFn: return sizeof(cydriver.CUhostFn){{endif}} - {{if 'struct CUaccessPolicyWindow_st' in found_types}} + {{if 'CUaccessPolicyWindow_st' in found_struct}} if objType == CUaccessPolicyWindow_st: return sizeof(cydriver.CUaccessPolicyWindow_st){{endif}} {{if 'CUaccessPolicyWindow_v1' in found_types}} @@ -46333,13 +52323,13 @@ def sizeof(objType): {{if 'CUaccessPolicyWindow' in found_types}} if objType == CUaccessPolicyWindow: return sizeof(cydriver.CUaccessPolicyWindow){{endif}} - {{if 'struct CUDA_KERNEL_NODE_PARAMS_st' in found_types}} + {{if 'CUDA_KERNEL_NODE_PARAMS_st' in found_struct}} if objType == CUDA_KERNEL_NODE_PARAMS_st: return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS_st){{endif}} {{if 'CUDA_KERNEL_NODE_PARAMS_v1' in found_types}} if objType == CUDA_KERNEL_NODE_PARAMS_v1: return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS_v1){{endif}} - {{if 'struct CUDA_KERNEL_NODE_PARAMS_v2_st' in found_types}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v2_st' in found_struct}} if objType == CUDA_KERNEL_NODE_PARAMS_v2_st: return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS_v2_st){{endif}} {{if 'CUDA_KERNEL_NODE_PARAMS_v2' in found_types}} @@ -46348,13 +52338,13 @@ def sizeof(objType): {{if 'CUDA_KERNEL_NODE_PARAMS' in found_types}} if objType == CUDA_KERNEL_NODE_PARAMS: return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS){{endif}} - {{if 'struct CUDA_KERNEL_NODE_PARAMS_v3_st' in found_types}} + {{if 'CUDA_KERNEL_NODE_PARAMS_v3_st' in found_struct}} if objType == CUDA_KERNEL_NODE_PARAMS_v3_st: return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS_v3_st){{endif}} {{if 'CUDA_KERNEL_NODE_PARAMS_v3' in found_types}} if objType == CUDA_KERNEL_NODE_PARAMS_v3: return sizeof(cydriver.CUDA_KERNEL_NODE_PARAMS_v3){{endif}} - {{if 'struct CUDA_MEMSET_NODE_PARAMS_st' in found_types}} + {{if 'CUDA_MEMSET_NODE_PARAMS_st' in found_struct}} if objType == CUDA_MEMSET_NODE_PARAMS_st: return sizeof(cydriver.CUDA_MEMSET_NODE_PARAMS_st){{endif}} {{if 'CUDA_MEMSET_NODE_PARAMS_v1' in found_types}} @@ -46363,13 +52353,13 @@ def sizeof(objType): {{if 'CUDA_MEMSET_NODE_PARAMS' in found_types}} if objType == CUDA_MEMSET_NODE_PARAMS: return sizeof(cydriver.CUDA_MEMSET_NODE_PARAMS){{endif}} - {{if 'struct CUDA_MEMSET_NODE_PARAMS_v2_st' in found_types}} + {{if 'CUDA_MEMSET_NODE_PARAMS_v2_st' in found_struct}} if objType == CUDA_MEMSET_NODE_PARAMS_v2_st: return sizeof(cydriver.CUDA_MEMSET_NODE_PARAMS_v2_st){{endif}} {{if 'CUDA_MEMSET_NODE_PARAMS_v2' in found_types}} if objType == CUDA_MEMSET_NODE_PARAMS_v2: return sizeof(cydriver.CUDA_MEMSET_NODE_PARAMS_v2){{endif}} - {{if 'struct CUDA_HOST_NODE_PARAMS_st' in found_types}} + {{if 'CUDA_HOST_NODE_PARAMS_st' in found_struct}} if objType == CUDA_HOST_NODE_PARAMS_st: return sizeof(cydriver.CUDA_HOST_NODE_PARAMS_st){{endif}} {{if 'CUDA_HOST_NODE_PARAMS_v1' in found_types}} @@ -46378,46 +52368,46 @@ def sizeof(objType): {{if 'CUDA_HOST_NODE_PARAMS' in found_types}} if objType == CUDA_HOST_NODE_PARAMS: return sizeof(cydriver.CUDA_HOST_NODE_PARAMS){{endif}} - {{if 'struct CUDA_HOST_NODE_PARAMS_v2_st' in found_types}} + {{if 'CUDA_HOST_NODE_PARAMS_v2_st' in found_struct}} if objType == CUDA_HOST_NODE_PARAMS_v2_st: return sizeof(cydriver.CUDA_HOST_NODE_PARAMS_v2_st){{endif}} {{if 'CUDA_HOST_NODE_PARAMS_v2' in found_types}} if objType == CUDA_HOST_NODE_PARAMS_v2: return sizeof(cydriver.CUDA_HOST_NODE_PARAMS_v2){{endif}} - {{if 'struct CUDA_CONDITIONAL_NODE_PARAMS' in found_types}} + {{if 'CUDA_CONDITIONAL_NODE_PARAMS' in found_struct}} if objType == CUDA_CONDITIONAL_NODE_PARAMS: return sizeof(cydriver.CUDA_CONDITIONAL_NODE_PARAMS){{endif}} - {{if 'struct CUgraphEdgeData_st' in found_types}} + {{if 'CUgraphEdgeData_st' in found_struct}} if objType == CUgraphEdgeData_st: return sizeof(cydriver.CUgraphEdgeData_st){{endif}} {{if 'CUgraphEdgeData' in found_types}} if objType == CUgraphEdgeData: return sizeof(cydriver.CUgraphEdgeData){{endif}} - {{if 'struct CUDA_GRAPH_INSTANTIATE_PARAMS_st' in found_types}} + {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS_st' in found_struct}} if objType == CUDA_GRAPH_INSTANTIATE_PARAMS_st: return sizeof(cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS_st){{endif}} {{if 'CUDA_GRAPH_INSTANTIATE_PARAMS' in found_types}} if objType == CUDA_GRAPH_INSTANTIATE_PARAMS: return sizeof(cydriver.CUDA_GRAPH_INSTANTIATE_PARAMS){{endif}} - {{if 'struct CUlaunchMemSyncDomainMap_st' in found_types}} + {{if 'CUlaunchMemSyncDomainMap_st' in found_struct}} if objType == CUlaunchMemSyncDomainMap_st: return sizeof(cydriver.CUlaunchMemSyncDomainMap_st){{endif}} {{if 'CUlaunchMemSyncDomainMap' in found_types}} if objType == CUlaunchMemSyncDomainMap: return sizeof(cydriver.CUlaunchMemSyncDomainMap){{endif}} - {{if 'union CUlaunchAttributeValue_union' in found_types}} + {{if 'CUlaunchAttributeValue_union' in found_struct}} if objType == CUlaunchAttributeValue_union: return sizeof(cydriver.CUlaunchAttributeValue_union){{endif}} {{if 'CUlaunchAttributeValue' in found_types}} if objType == CUlaunchAttributeValue: return sizeof(cydriver.CUlaunchAttributeValue){{endif}} - {{if 'struct CUlaunchAttribute_st' in found_types}} + {{if 'CUlaunchAttribute_st' in found_struct}} if objType == CUlaunchAttribute_st: return sizeof(cydriver.CUlaunchAttribute_st){{endif}} {{if 'CUlaunchAttribute' in found_types}} if objType == CUlaunchAttribute: return sizeof(cydriver.CUlaunchAttribute){{endif}} - {{if 'struct CUlaunchConfig_st' in found_types}} + {{if 'CUlaunchConfig_st' in found_struct}} if objType == CUlaunchConfig_st: return sizeof(cydriver.CUlaunchConfig_st){{endif}} {{if 'CUlaunchConfig' in found_types}} @@ -46435,7 +52425,7 @@ def sizeof(objType): {{if 'CUstreamAttrValue' in found_types}} if objType == CUstreamAttrValue: return sizeof(cydriver.CUstreamAttrValue){{endif}} - {{if 'struct CUexecAffinitySmCount_st' in found_types}} + {{if 'CUexecAffinitySmCount_st' in found_struct}} if objType == CUexecAffinitySmCount_st: return sizeof(cydriver.CUexecAffinitySmCount_st){{endif}} {{if 'CUexecAffinitySmCount_v1' in found_types}} @@ -46444,7 +52434,7 @@ def sizeof(objType): {{if 'CUexecAffinitySmCount' in found_types}} if objType == CUexecAffinitySmCount: return sizeof(cydriver.CUexecAffinitySmCount){{endif}} - {{if 'struct CUexecAffinityParam_st' in found_types}} + {{if 'CUexecAffinityParam_st' in found_struct}} if objType == CUexecAffinityParam_st: return sizeof(cydriver.CUexecAffinityParam_st){{endif}} {{if 'CUexecAffinityParam_v1' in found_types}} @@ -46453,19 +52443,19 @@ def sizeof(objType): {{if 'CUexecAffinityParam' in found_types}} if objType == CUexecAffinityParam: return sizeof(cydriver.CUexecAffinityParam){{endif}} - {{if 'struct CUctxCigParam_st' in found_types}} + {{if 'CUctxCigParam_st' in found_struct}} if objType == CUctxCigParam_st: return sizeof(cydriver.CUctxCigParam_st){{endif}} {{if 'CUctxCigParam' in found_types}} if objType == CUctxCigParam: return sizeof(cydriver.CUctxCigParam){{endif}} - {{if 'struct CUctxCreateParams_st' in found_types}} + {{if 'CUctxCreateParams_st' in found_struct}} if objType == CUctxCreateParams_st: return sizeof(cydriver.CUctxCreateParams_st){{endif}} {{if 'CUctxCreateParams' in found_types}} if objType == CUctxCreateParams: return sizeof(cydriver.CUctxCreateParams){{endif}} - {{if 'struct CUlibraryHostUniversalFunctionAndDataTable_st' in found_types}} + {{if 'CUlibraryHostUniversalFunctionAndDataTable_st' in found_struct}} if objType == CUlibraryHostUniversalFunctionAndDataTable_st: return sizeof(cydriver.CUlibraryHostUniversalFunctionAndDataTable_st){{endif}} {{if 'CUlibraryHostUniversalFunctionAndDataTable' in found_types}} @@ -46477,7 +52467,7 @@ def sizeof(objType): {{if 'CUoccupancyB2DSize' in found_types}} if objType == CUoccupancyB2DSize: return sizeof(cydriver.CUoccupancyB2DSize){{endif}} - {{if 'struct CUDA_MEMCPY2D_st' in found_types}} + {{if 'CUDA_MEMCPY2D_st' in found_struct}} if objType == CUDA_MEMCPY2D_st: return sizeof(cydriver.CUDA_MEMCPY2D_st){{endif}} {{if 'CUDA_MEMCPY2D_v2' in found_types}} @@ -46486,7 +52476,7 @@ def sizeof(objType): {{if 'CUDA_MEMCPY2D' in found_types}} if objType == CUDA_MEMCPY2D: return sizeof(cydriver.CUDA_MEMCPY2D){{endif}} - {{if 'struct CUDA_MEMCPY3D_st' in found_types}} + {{if 'CUDA_MEMCPY3D_st' in found_struct}} if objType == CUDA_MEMCPY3D_st: return sizeof(cydriver.CUDA_MEMCPY3D_st){{endif}} {{if 'CUDA_MEMCPY3D_v2' in found_types}} @@ -46495,7 +52485,7 @@ def sizeof(objType): {{if 'CUDA_MEMCPY3D' in found_types}} if objType == CUDA_MEMCPY3D: return sizeof(cydriver.CUDA_MEMCPY3D){{endif}} - {{if 'struct CUDA_MEMCPY3D_PEER_st' in found_types}} + {{if 'CUDA_MEMCPY3D_PEER_st' in found_struct}} if objType == CUDA_MEMCPY3D_PEER_st: return sizeof(cydriver.CUDA_MEMCPY3D_PEER_st){{endif}} {{if 'CUDA_MEMCPY3D_PEER_v1' in found_types}} @@ -46504,13 +52494,13 @@ def sizeof(objType): {{if 'CUDA_MEMCPY3D_PEER' in found_types}} if objType == CUDA_MEMCPY3D_PEER: return sizeof(cydriver.CUDA_MEMCPY3D_PEER){{endif}} - {{if 'struct CUDA_MEMCPY_NODE_PARAMS_st' in found_types}} + {{if 'CUDA_MEMCPY_NODE_PARAMS_st' in found_struct}} if objType == CUDA_MEMCPY_NODE_PARAMS_st: return sizeof(cydriver.CUDA_MEMCPY_NODE_PARAMS_st){{endif}} {{if 'CUDA_MEMCPY_NODE_PARAMS' in found_types}} if objType == CUDA_MEMCPY_NODE_PARAMS: return sizeof(cydriver.CUDA_MEMCPY_NODE_PARAMS){{endif}} - {{if 'struct CUDA_ARRAY_DESCRIPTOR_st' in found_types}} + {{if 'CUDA_ARRAY_DESCRIPTOR_st' in found_struct}} if objType == CUDA_ARRAY_DESCRIPTOR_st: return sizeof(cydriver.CUDA_ARRAY_DESCRIPTOR_st){{endif}} {{if 'CUDA_ARRAY_DESCRIPTOR_v2' in found_types}} @@ -46519,7 +52509,7 @@ def sizeof(objType): {{if 'CUDA_ARRAY_DESCRIPTOR' in found_types}} if objType == CUDA_ARRAY_DESCRIPTOR: return sizeof(cydriver.CUDA_ARRAY_DESCRIPTOR){{endif}} - {{if 'struct CUDA_ARRAY3D_DESCRIPTOR_st' in found_types}} + {{if 'CUDA_ARRAY3D_DESCRIPTOR_st' in found_struct}} if objType == CUDA_ARRAY3D_DESCRIPTOR_st: return sizeof(cydriver.CUDA_ARRAY3D_DESCRIPTOR_st){{endif}} {{if 'CUDA_ARRAY3D_DESCRIPTOR_v2' in found_types}} @@ -46528,7 +52518,7 @@ def sizeof(objType): {{if 'CUDA_ARRAY3D_DESCRIPTOR' in found_types}} if objType == CUDA_ARRAY3D_DESCRIPTOR: return sizeof(cydriver.CUDA_ARRAY3D_DESCRIPTOR){{endif}} - {{if 'struct CUDA_ARRAY_SPARSE_PROPERTIES_st' in found_types}} + {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_st' in found_struct}} if objType == CUDA_ARRAY_SPARSE_PROPERTIES_st: return sizeof(cydriver.CUDA_ARRAY_SPARSE_PROPERTIES_st){{endif}} {{if 'CUDA_ARRAY_SPARSE_PROPERTIES_v1' in found_types}} @@ -46537,7 +52527,7 @@ def sizeof(objType): {{if 'CUDA_ARRAY_SPARSE_PROPERTIES' in found_types}} if objType == CUDA_ARRAY_SPARSE_PROPERTIES: return sizeof(cydriver.CUDA_ARRAY_SPARSE_PROPERTIES){{endif}} - {{if 'struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st' in found_types}} + {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_st' in found_struct}} if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS_st: return sizeof(cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st){{endif}} {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS_v1' in found_types}} @@ -46546,7 +52536,7 @@ def sizeof(objType): {{if 'CUDA_ARRAY_MEMORY_REQUIREMENTS' in found_types}} if objType == CUDA_ARRAY_MEMORY_REQUIREMENTS: return sizeof(cydriver.CUDA_ARRAY_MEMORY_REQUIREMENTS){{endif}} - {{if 'struct CUDA_RESOURCE_DESC_st' in found_types}} + {{if 'CUDA_RESOURCE_DESC_st' in found_struct}} if objType == CUDA_RESOURCE_DESC_st: return sizeof(cydriver.CUDA_RESOURCE_DESC_st){{endif}} {{if 'CUDA_RESOURCE_DESC_v1' in found_types}} @@ -46555,7 +52545,7 @@ def sizeof(objType): {{if 'CUDA_RESOURCE_DESC' in found_types}} if objType == CUDA_RESOURCE_DESC: return sizeof(cydriver.CUDA_RESOURCE_DESC){{endif}} - {{if 'struct CUDA_TEXTURE_DESC_st' in found_types}} + {{if 'CUDA_TEXTURE_DESC_st' in found_struct}} if objType == CUDA_TEXTURE_DESC_st: return sizeof(cydriver.CUDA_TEXTURE_DESC_st){{endif}} {{if 'CUDA_TEXTURE_DESC_v1' in found_types}} @@ -46564,7 +52554,7 @@ def sizeof(objType): {{if 'CUDA_TEXTURE_DESC' in found_types}} if objType == CUDA_TEXTURE_DESC: return sizeof(cydriver.CUDA_TEXTURE_DESC){{endif}} - {{if 'struct CUDA_RESOURCE_VIEW_DESC_st' in found_types}} + {{if 'CUDA_RESOURCE_VIEW_DESC_st' in found_struct}} if objType == CUDA_RESOURCE_VIEW_DESC_st: return sizeof(cydriver.CUDA_RESOURCE_VIEW_DESC_st){{endif}} {{if 'CUDA_RESOURCE_VIEW_DESC_v1' in found_types}} @@ -46573,13 +52563,13 @@ def sizeof(objType): {{if 'CUDA_RESOURCE_VIEW_DESC' in found_types}} if objType == CUDA_RESOURCE_VIEW_DESC: return sizeof(cydriver.CUDA_RESOURCE_VIEW_DESC){{endif}} - {{if 'struct CUtensorMap_st' in found_types}} + {{if 'CUtensorMap_st' in found_struct}} if objType == CUtensorMap_st: return sizeof(cydriver.CUtensorMap_st){{endif}} {{if 'CUtensorMap' in found_types}} if objType == CUtensorMap: return sizeof(cydriver.CUtensorMap){{endif}} - {{if 'struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st' in found_types}} + {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st' in found_struct}} if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st: return sizeof(cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st){{endif}} {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1' in found_types}} @@ -46588,7 +52578,7 @@ def sizeof(objType): {{if 'CUDA_POINTER_ATTRIBUTE_P2P_TOKENS' in found_types}} if objType == CUDA_POINTER_ATTRIBUTE_P2P_TOKENS: return sizeof(cydriver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS){{endif}} - {{if 'struct CUDA_LAUNCH_PARAMS_st' in found_types}} + {{if 'CUDA_LAUNCH_PARAMS_st' in found_struct}} if objType == CUDA_LAUNCH_PARAMS_st: return sizeof(cydriver.CUDA_LAUNCH_PARAMS_st){{endif}} {{if 'CUDA_LAUNCH_PARAMS_v1' in found_types}} @@ -46597,7 +52587,7 @@ def sizeof(objType): {{if 'CUDA_LAUNCH_PARAMS' in found_types}} if objType == CUDA_LAUNCH_PARAMS: return sizeof(cydriver.CUDA_LAUNCH_PARAMS){{endif}} - {{if 'struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st' in found_types}} + {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st' in found_struct}} if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st){{endif}} {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1' in found_types}} @@ -46606,7 +52596,7 @@ def sizeof(objType): {{if 'CUDA_EXTERNAL_MEMORY_HANDLE_DESC' in found_types}} if objType == CUDA_EXTERNAL_MEMORY_HANDLE_DESC: return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC){{endif}} - {{if 'struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st' in found_types}} + {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st' in found_struct}} if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st){{endif}} {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1' in found_types}} @@ -46615,7 +52605,7 @@ def sizeof(objType): {{if 'CUDA_EXTERNAL_MEMORY_BUFFER_DESC' in found_types}} if objType == CUDA_EXTERNAL_MEMORY_BUFFER_DESC: return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC){{endif}} - {{if 'struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st' in found_types}} + {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st' in found_struct}} if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st: return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st){{endif}} {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1' in found_types}} @@ -46624,7 +52614,7 @@ def sizeof(objType): {{if 'CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC' in found_types}} if objType == CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC: return sizeof(cydriver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC){{endif}} - {{if 'struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st' in found_types}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st' in found_struct}} if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st){{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1' in found_types}} @@ -46633,7 +52623,7 @@ def sizeof(objType): {{if 'CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC' in found_types}} if objType == CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC: return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC){{endif}} - {{if 'struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_types}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st' in found_struct}} if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st){{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1' in found_types}} @@ -46642,7 +52632,7 @@ def sizeof(objType): {{if 'CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS' in found_types}} if objType == CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS: return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS){{endif}} - {{if 'struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_types}} + {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st' in found_struct}} if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st){{endif}} {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1' in found_types}} @@ -46651,7 +52641,7 @@ def sizeof(objType): {{if 'CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS' in found_types}} if objType == CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS: return sizeof(cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS){{endif}} - {{if 'struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st' in found_types}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st' in found_struct}} if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st: return sizeof(cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st){{endif}} {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1' in found_types}} @@ -46660,13 +52650,13 @@ def sizeof(objType): {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS' in found_types}} if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS: return sizeof(cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS){{endif}} - {{if 'struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st' in found_types}} + {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st' in found_struct}} if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: return sizeof(cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st){{endif}} {{if 'CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2' in found_types}} if objType == CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2: return sizeof(cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2){{endif}} - {{if 'struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st' in found_types}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_st' in found_struct}} if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: return sizeof(cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st){{endif}} {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1' in found_types}} @@ -46675,7 +52665,7 @@ def sizeof(objType): {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS' in found_types}} if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS: return sizeof(cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS){{endif}} - {{if 'struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st' in found_types}} + {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st' in found_struct}} if objType == CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: return sizeof(cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st){{endif}} {{if 'CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2' in found_types}} @@ -46687,7 +52677,7 @@ def sizeof(objType): {{if 'CUmemGenericAllocationHandle' in found_types}} if objType == CUmemGenericAllocationHandle: return sizeof(cydriver.CUmemGenericAllocationHandle){{endif}} - {{if 'struct CUarrayMapInfo_st' in found_types}} + {{if 'CUarrayMapInfo_st' in found_struct}} if objType == CUarrayMapInfo_st: return sizeof(cydriver.CUarrayMapInfo_st){{endif}} {{if 'CUarrayMapInfo_v1' in found_types}} @@ -46696,7 +52686,7 @@ def sizeof(objType): {{if 'CUarrayMapInfo' in found_types}} if objType == CUarrayMapInfo: return sizeof(cydriver.CUarrayMapInfo){{endif}} - {{if 'struct CUmemLocation_st' in found_types}} + {{if 'CUmemLocation_st' in found_struct}} if objType == CUmemLocation_st: return sizeof(cydriver.CUmemLocation_st){{endif}} {{if 'CUmemLocation_v1' in found_types}} @@ -46705,7 +52695,7 @@ def sizeof(objType): {{if 'CUmemLocation' in found_types}} if objType == CUmemLocation: return sizeof(cydriver.CUmemLocation){{endif}} - {{if 'struct CUmemAllocationProp_st' in found_types}} + {{if 'CUmemAllocationProp_st' in found_struct}} if objType == CUmemAllocationProp_st: return sizeof(cydriver.CUmemAllocationProp_st){{endif}} {{if 'CUmemAllocationProp_v1' in found_types}} @@ -46714,7 +52704,7 @@ def sizeof(objType): {{if 'CUmemAllocationProp' in found_types}} if objType == CUmemAllocationProp: return sizeof(cydriver.CUmemAllocationProp){{endif}} - {{if 'struct CUmulticastObjectProp_st' in found_types}} + {{if 'CUmulticastObjectProp_st' in found_struct}} if objType == CUmulticastObjectProp_st: return sizeof(cydriver.CUmulticastObjectProp_st){{endif}} {{if 'CUmulticastObjectProp_v1' in found_types}} @@ -46723,7 +52713,7 @@ def sizeof(objType): {{if 'CUmulticastObjectProp' in found_types}} if objType == CUmulticastObjectProp: return sizeof(cydriver.CUmulticastObjectProp){{endif}} - {{if 'struct CUmemAccessDesc_st' in found_types}} + {{if 'CUmemAccessDesc_st' in found_struct}} if objType == CUmemAccessDesc_st: return sizeof(cydriver.CUmemAccessDesc_st){{endif}} {{if 'CUmemAccessDesc_v1' in found_types}} @@ -46732,7 +52722,7 @@ def sizeof(objType): {{if 'CUmemAccessDesc' in found_types}} if objType == CUmemAccessDesc: return sizeof(cydriver.CUmemAccessDesc){{endif}} - {{if 'struct CUgraphExecUpdateResultInfo_st' in found_types}} + {{if 'CUgraphExecUpdateResultInfo_st' in found_struct}} if objType == CUgraphExecUpdateResultInfo_st: return sizeof(cydriver.CUgraphExecUpdateResultInfo_st){{endif}} {{if 'CUgraphExecUpdateResultInfo_v1' in found_types}} @@ -46741,7 +52731,7 @@ def sizeof(objType): {{if 'CUgraphExecUpdateResultInfo' in found_types}} if objType == CUgraphExecUpdateResultInfo: return sizeof(cydriver.CUgraphExecUpdateResultInfo){{endif}} - {{if 'struct CUmemPoolProps_st' in found_types}} + {{if 'CUmemPoolProps_st' in found_struct}} if objType == CUmemPoolProps_st: return sizeof(cydriver.CUmemPoolProps_st){{endif}} {{if 'CUmemPoolProps_v1' in found_types}} @@ -46750,7 +52740,7 @@ def sizeof(objType): {{if 'CUmemPoolProps' in found_types}} if objType == CUmemPoolProps: return sizeof(cydriver.CUmemPoolProps){{endif}} - {{if 'struct CUmemPoolPtrExportData_st' in found_types}} + {{if 'CUmemPoolPtrExportData_st' in found_struct}} if objType == CUmemPoolPtrExportData_st: return sizeof(cydriver.CUmemPoolPtrExportData_st){{endif}} {{if 'CUmemPoolPtrExportData_v1' in found_types}} @@ -46759,7 +52749,7 @@ def sizeof(objType): {{if 'CUmemPoolPtrExportData' in found_types}} if objType == CUmemPoolPtrExportData: return sizeof(cydriver.CUmemPoolPtrExportData){{endif}} - {{if 'struct CUDA_MEM_ALLOC_NODE_PARAMS_v1_st' in found_types}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1_st' in found_struct}} if objType == CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: return sizeof(cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v1_st){{endif}} {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v1' in found_types}} @@ -46768,52 +52758,127 @@ def sizeof(objType): {{if 'CUDA_MEM_ALLOC_NODE_PARAMS' in found_types}} if objType == CUDA_MEM_ALLOC_NODE_PARAMS: return sizeof(cydriver.CUDA_MEM_ALLOC_NODE_PARAMS){{endif}} - {{if 'struct CUDA_MEM_ALLOC_NODE_PARAMS_v2_st' in found_types}} + {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2_st' in found_struct}} if objType == CUDA_MEM_ALLOC_NODE_PARAMS_v2_st: return sizeof(cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2_st){{endif}} {{if 'CUDA_MEM_ALLOC_NODE_PARAMS_v2' in found_types}} if objType == CUDA_MEM_ALLOC_NODE_PARAMS_v2: return sizeof(cydriver.CUDA_MEM_ALLOC_NODE_PARAMS_v2){{endif}} - {{if 'struct CUDA_MEM_FREE_NODE_PARAMS_st' in found_types}} + {{if 'CUDA_MEM_FREE_NODE_PARAMS_st' in found_struct}} if objType == CUDA_MEM_FREE_NODE_PARAMS_st: return sizeof(cydriver.CUDA_MEM_FREE_NODE_PARAMS_st){{endif}} {{if 'CUDA_MEM_FREE_NODE_PARAMS' in found_types}} if objType == CUDA_MEM_FREE_NODE_PARAMS: return sizeof(cydriver.CUDA_MEM_FREE_NODE_PARAMS){{endif}} - {{if 'struct CUDA_CHILD_GRAPH_NODE_PARAMS_st' in found_types}} + {{if 'CUDA_CHILD_GRAPH_NODE_PARAMS_st' in found_struct}} if objType == CUDA_CHILD_GRAPH_NODE_PARAMS_st: return sizeof(cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS_st){{endif}} {{if 'CUDA_CHILD_GRAPH_NODE_PARAMS' in found_types}} if objType == CUDA_CHILD_GRAPH_NODE_PARAMS: return sizeof(cydriver.CUDA_CHILD_GRAPH_NODE_PARAMS){{endif}} - {{if 'struct CUDA_EVENT_RECORD_NODE_PARAMS_st' in found_types}} + {{if 'CUDA_EVENT_RECORD_NODE_PARAMS_st' in found_struct}} if objType == CUDA_EVENT_RECORD_NODE_PARAMS_st: return sizeof(cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st){{endif}} {{if 'CUDA_EVENT_RECORD_NODE_PARAMS' in found_types}} if objType == CUDA_EVENT_RECORD_NODE_PARAMS: return sizeof(cydriver.CUDA_EVENT_RECORD_NODE_PARAMS){{endif}} - {{if 'struct CUDA_EVENT_WAIT_NODE_PARAMS_st' in found_types}} + {{if 'CUDA_EVENT_WAIT_NODE_PARAMS_st' in found_struct}} if objType == CUDA_EVENT_WAIT_NODE_PARAMS_st: return sizeof(cydriver.CUDA_EVENT_WAIT_NODE_PARAMS_st){{endif}} {{if 'CUDA_EVENT_WAIT_NODE_PARAMS' in found_types}} if objType == CUDA_EVENT_WAIT_NODE_PARAMS: return sizeof(cydriver.CUDA_EVENT_WAIT_NODE_PARAMS){{endif}} - {{if 'struct CUgraphNodeParams_st' in found_types}} + {{if 'CUgraphNodeParams_st' in found_struct}} if objType == CUgraphNodeParams_st: return sizeof(cydriver.CUgraphNodeParams_st){{endif}} {{if 'CUgraphNodeParams' in found_types}} if objType == CUgraphNodeParams: return sizeof(cydriver.CUgraphNodeParams){{endif}} + {{if 'CUcheckpointLockArgs_st' in found_struct}} + if objType == CUcheckpointLockArgs_st: + return sizeof(cydriver.CUcheckpointLockArgs_st){{endif}} + {{if 'CUcheckpointLockArgs' in found_types}} + if objType == CUcheckpointLockArgs: + return sizeof(cydriver.CUcheckpointLockArgs){{endif}} + {{if 'CUcheckpointCheckpointArgs_st' in found_struct}} + if objType == CUcheckpointCheckpointArgs_st: + return sizeof(cydriver.CUcheckpointCheckpointArgs_st){{endif}} + {{if 'CUcheckpointCheckpointArgs' in found_types}} + if objType == CUcheckpointCheckpointArgs: + return sizeof(cydriver.CUcheckpointCheckpointArgs){{endif}} + {{if 'CUcheckpointRestoreArgs_st' in found_struct}} + if objType == CUcheckpointRestoreArgs_st: + return sizeof(cydriver.CUcheckpointRestoreArgs_st){{endif}} + {{if 'CUcheckpointRestoreArgs' in found_types}} + if objType == CUcheckpointRestoreArgs: + return sizeof(cydriver.CUcheckpointRestoreArgs){{endif}} + {{if 'CUcheckpointUnlockArgs_st' in found_struct}} + if objType == CUcheckpointUnlockArgs_st: + return sizeof(cydriver.CUcheckpointUnlockArgs_st){{endif}} + {{if 'CUcheckpointUnlockArgs' in found_types}} + if objType == CUcheckpointUnlockArgs: + return sizeof(cydriver.CUcheckpointUnlockArgs){{endif}} + {{if 'CUmemcpyAttributes_st' in found_struct}} + if objType == CUmemcpyAttributes_st: + return sizeof(cydriver.CUmemcpyAttributes_st){{endif}} + {{if 'CUmemcpyAttributes_v1' in found_types}} + if objType == CUmemcpyAttributes_v1: + return sizeof(cydriver.CUmemcpyAttributes_v1){{endif}} + {{if 'CUmemcpyAttributes' in found_types}} + if objType == CUmemcpyAttributes: + return sizeof(cydriver.CUmemcpyAttributes){{endif}} + {{if 'CUoffset3D_st' in found_struct}} + if objType == CUoffset3D_st: + return sizeof(cydriver.CUoffset3D_st){{endif}} + {{if 'CUoffset3D_v1' in found_types}} + if objType == CUoffset3D_v1: + return sizeof(cydriver.CUoffset3D_v1){{endif}} + {{if 'CUoffset3D' in found_types}} + if objType == CUoffset3D: + return sizeof(cydriver.CUoffset3D){{endif}} + {{if 'CUextent3D_st' in found_struct}} + if objType == CUextent3D_st: + return sizeof(cydriver.CUextent3D_st){{endif}} + {{if 'CUextent3D_v1' in found_types}} + if objType == CUextent3D_v1: + return sizeof(cydriver.CUextent3D_v1){{endif}} + {{if 'CUextent3D' in found_types}} + if objType == CUextent3D: + return sizeof(cydriver.CUextent3D){{endif}} + {{if 'CUmemcpy3DOperand_st' in found_struct}} + if objType == CUmemcpy3DOperand_st: + return sizeof(cydriver.CUmemcpy3DOperand_st){{endif}} + {{if 'CUmemcpy3DOperand_v1' in found_types}} + if objType == CUmemcpy3DOperand_v1: + return sizeof(cydriver.CUmemcpy3DOperand_v1){{endif}} + {{if 'CUmemcpy3DOperand' in found_types}} + if objType == CUmemcpy3DOperand: + return sizeof(cydriver.CUmemcpy3DOperand){{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_st' in found_struct}} + if objType == CUDA_MEMCPY3D_BATCH_OP_st: + return sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP_st){{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP_v1' in found_types}} + if objType == CUDA_MEMCPY3D_BATCH_OP_v1: + return sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP_v1){{endif}} + {{if 'CUDA_MEMCPY3D_BATCH_OP' in found_types}} + if objType == CUDA_MEMCPY3D_BATCH_OP: + return sizeof(cydriver.CUDA_MEMCPY3D_BATCH_OP){{endif}} + {{if 'CUmemDecompressParams_st' in found_struct}} + if objType == CUmemDecompressParams_st: + return sizeof(cydriver.CUmemDecompressParams_st){{endif}} + {{if 'CUmemDecompressParams' in found_types}} + if objType == CUmemDecompressParams: + return sizeof(cydriver.CUmemDecompressParams){{endif}} {{if 'CUdevResourceDesc' in found_types}} if objType == CUdevResourceDesc: return sizeof(cydriver.CUdevResourceDesc){{endif}} - {{if 'struct CUdevSmResource_st' in found_types}} + {{if 'CUdevSmResource_st' in found_struct}} if objType == CUdevSmResource_st: return sizeof(cydriver.CUdevSmResource_st){{endif}} {{if 'CUdevSmResource' in found_types}} if objType == CUdevSmResource: return sizeof(cydriver.CUdevSmResource){{endif}} - {{if 'struct CUdevResource_st' in found_types}} + {{if 'CUdevResource_st' in found_struct}} if objType == CUdevResource_st: return sizeof(cydriver.CUdevResource_st){{endif}} {{if 'struct CUdevResource_st' in found_types}} diff --git a/cuda_bindings/cuda/bindings/nvrtc.pxd.in b/cuda_bindings/cuda/bindings/nvrtc.pxd.in index fdd23e2fd..e6785a370 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pxd.in +++ b/cuda_bindings/cuda/bindings/nvrtc.pxd.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. cimport cuda.bindings.cynvrtc as cynvrtc cimport cuda.bindings._lib.utils as utils @@ -21,6 +23,6 @@ cdef class nvrtcProgram: Get memory address of class instance """ - cdef cynvrtc.nvrtcProgram __val - cdef cynvrtc.nvrtcProgram* _ptr + cdef cynvrtc.nvrtcProgram _pvt_val + cdef cynvrtc.nvrtcProgram* _pvt_ptr {{endif}} diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx.in b/cuda_bindings/cuda/bindings/nvrtc.pyx.in index 73e2adeb8..67808422d 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx.in +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. from typing import List, Tuple, Any, Optional from enum import IntEnum import cython @@ -75,6 +77,14 @@ class nvrtcResult(IntEnum): NVRTC_ERROR_INTERNAL_ERROR = cynvrtc.nvrtcResult.NVRTC_ERROR_INTERNAL_ERROR{{endif}} {{if 'NVRTC_ERROR_TIME_FILE_WRITE_FAILED' in found_values}} NVRTC_ERROR_TIME_FILE_WRITE_FAILED = cynvrtc.nvrtcResult.NVRTC_ERROR_TIME_FILE_WRITE_FAILED{{endif}} + {{if 'NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED' in found_values}} + NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED = cynvrtc.nvrtcResult.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED{{endif}} + {{if 'NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED' in found_values}} + NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED{{endif}} + {{if 'NVRTC_ERROR_PCH_CREATE' in found_values}} + NVRTC_ERROR_PCH_CREATE = cynvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE{{endif}} + {{if 'NVRTC_ERROR_CANCELLED' in found_values}} + NVRTC_ERROR_CANCELLED = cynvrtc.nvrtcResult.NVRTC_ERROR_CANCELLED{{endif}} {{endif}} {{if 'nvrtcProgram' in found_types}} @@ -91,10 +101,10 @@ cdef class nvrtcProgram: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -102,9 +112,9 @@ cdef class nvrtcProgram: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'nvrtcGetErrorString' in found_functions}} @@ -248,7 +258,7 @@ def nvrtcCreateProgram(char* src, char* name, int numHeaders, headers : Optional if numHeaders > len(includeNames): raise RuntimeError("List is too small: " + str(len(includeNames)) + " < " + str(numHeaders)) cdef vector[const char*] cyheaders = headers cdef vector[const char*] cyincludeNames = includeNames - err = cynvrtc.nvrtcCreateProgram(prog._ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) + err = cynvrtc.nvrtcCreateProgram(prog._pvt_ptr, src, name, numHeaders, cyheaders.data(), cyincludeNames.data()) return (nvrtcResult(err), prog) {{endif}} @@ -317,6 +327,7 @@ def nvrtcCompileProgram(prog, int numOptions, options : Optional[Tuple[bytes] | - :py:obj:`~.NVRTC_ERROR_COMPILATION` - :py:obj:`~.NVRTC_ERROR_BUILTIN_OPERATION_FAILURE` - :py:obj:`~.NVRTC_ERROR_TIME_FILE_WRITE_FAILED` + - :py:obj:`~.NVRTC_ERROR_CANCELLED` """ options = [] if options is None else options if not all(isinstance(_x, (bytes)) for _x in options): @@ -672,8 +683,8 @@ def nvrtcGetOptiXIR(prog, char* optixir): ---------- prog : :py:obj:`~.nvrtcProgram` CUDA Runtime Compilation program. - Optix : bytes - IR Compiled result. + optixir : bytes + Optix IR Compiled result. Returns ------- @@ -862,6 +873,193 @@ def nvrtcGetLoweredName(prog, char* name_expression): return (nvrtcResult(err), lowered_name) {{endif}} +{{if 'nvrtcGetPCHHeapSize' in found_functions}} + +@cython.embedsignature(True) +def nvrtcGetPCHHeapSize(): + """ retrieve the current size of the PCH Heap. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + ret : int + pointer to location where the size of the PCH Heap will be stored + """ + cdef size_t ret = 0 + err = cynvrtc.nvrtcGetPCHHeapSize(&ret) + return (nvrtcResult(err), ret) +{{endif}} + +{{if 'nvrtcSetPCHHeapSize' in found_functions}} + +@cython.embedsignature(True) +def nvrtcSetPCHHeapSize(size_t size): + """ set the size of the PCH Heap. + + The requested size may be rounded up to a platform dependent alignment + (e.g. page size). If the PCH Heap has already been allocated, the heap + memory will be freed and a new PCH Heap will be allocated. + + Parameters + ---------- + size : size_t + requested size of the PCH Heap, in bytes + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + """ + err = cynvrtc.nvrtcSetPCHHeapSize(size) + return (nvrtcResult(err),) +{{endif}} + +{{if 'nvrtcGetPCHCreateStatus' in found_functions}} + +@cython.embedsignature(True) +def nvrtcGetPCHCreateStatus(prog): + """ returns the PCH creation status. + + NVRTC_SUCCESS indicates that the PCH was successfully created. + NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED indicates that no PCH creation was + attempted, either because PCH functionality was not requested during + the preceding nvrtcCompileProgram call, or automatic PCH processing was + requested, and compiler chose not to create a PCH file. + NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED indicates that a PCH file could + potentially have been created, but the compiler ran out space in the + PCH heap. In this scenario, the + :py:obj:`~.nvrtcGetPCHHeapSizeRequired()` can be used to query the + required heap size, the heap can be reallocated for this size with + :py:obj:`~.nvrtcSetPCHHeapSize()` and PCH creation may be reattempted + again invoking :py:obj:`~.nvrtcCompileProgram()` with a new NVRTC + program instance. NVRTC_ERROR_PCH_CREATE indicates that an error + condition prevented the PCH file from being created. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED` + - :py:obj:`~.NVRTC_ERROR_PCH_CREATE` + - :py:obj:`~.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + cyprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + cyprog = pprog + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + err = cynvrtc.nvrtcGetPCHCreateStatus(cyprog) + return (nvrtcResult(err),) +{{endif}} + +{{if 'nvrtcGetPCHHeapSizeRequired' in found_functions}} + +@cython.embedsignature(True) +def nvrtcGetPCHHeapSizeRequired(prog): + """ retrieve the required size of the PCH heap required to compile the given program. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` The size retrieved using this function is only valid if :py:obj:`~.nvrtcGetPCHCreateStatus()` returned NVRTC_SUCCESS or NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED + size : int + pointer to location where the required size of the PCH Heap will be + stored + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + cyprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + cyprog = pprog + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + cdef size_t size = 0 + err = cynvrtc.nvrtcGetPCHHeapSizeRequired(cyprog, &size) + return (nvrtcResult(err), size) +{{endif}} + +{{if 'nvrtcSetFlowCallback' in found_functions}} + +@cython.embedsignature(True) +def nvrtcSetFlowCallback(prog, callback, payload): + """ nvrtcSetFlowCallback registers a callback function that the compiler will invoke at different points during a call to nvrtcCompileProgram, and the callback function can decide whether to cancel compilation by returning specific values. + + The callback function must satisfy the following constraints: + + (1) Its signature should be: + + **View CUDA Toolkit Documentation for a C++ code example** + + When invoking the callback, the compiler will always pass `payload` to + param1 so that the callback may make decisions based on `payload` . + It'll always pass NULL to param2 for now which is reserved for future + extensions. + + (2) It must return 1 to cancel compilation or 0 to continue. Other + return values are reserved for future use. + + (3) It must return consistent values. Once it returns 1 at one point, + it must return 1 in all following invocations during the current + nvrtcCompileProgram call in progress. + + (4) It must be thread-safe. + + (5) It must not invoke any nvrtc/libnvvm/ptx APIs. + + Parameters + ---------- + prog : :py:obj:`~.nvrtcProgram` + CUDA Runtime Compilation program. + callback : Any + the callback that issues cancellation signal. + payload : Any + to be passed as a parameter when invoking the callback. + + Returns + ------- + nvrtcResult + - :py:obj:`~.NVRTC_SUCCESS` + - :py:obj:`~.NVRTC_ERROR_INVALID_PROGRAM` + - :py:obj:`~.NVRTC_ERROR_INVALID_INPUT` + """ + cdef cynvrtc.nvrtcProgram cyprog + if prog is None: + cyprog = 0 + elif isinstance(prog, (nvrtcProgram,)): + pprog = int(prog) + cyprog = pprog + else: + pprog = int(nvrtcProgram(prog)) + cyprog = pprog + cycallback = utils.HelperInputVoidPtr(callback) + cdef void* cycallback_ptr = cycallback.cptr + cypayload = utils.HelperInputVoidPtr(payload) + cdef void* cypayload_ptr = cypayload.cptr + err = cynvrtc.nvrtcSetFlowCallback(cyprog, cycallback_ptr, cypayload_ptr) + return (nvrtcResult(err),) +{{endif}} + @cython.embedsignature(True) def sizeof(objType): """ Returns the size of provided CUDA Python structure in bytes diff --git a/cuda_bindings/cuda/bindings/runtime.pxd.in b/cuda_bindings/cuda/bindings/runtime.pxd.in index a3727e188..ef4367077 100644 --- a/cuda_bindings/cuda/bindings/runtime.pxd.in +++ b/cuda_bindings/cuda/bindings/runtime.pxd.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. cimport cuda.bindings.cyruntime as cyruntime cimport cuda.bindings._lib.utils as utils cimport cuda.bindings.driver as driver @@ -22,8 +24,8 @@ cdef class cudaArray_t: Get memory address of class instance """ - cdef cyruntime.cudaArray_t __val - cdef cyruntime.cudaArray_t* _ptr + cdef cyruntime.cudaArray_t _pvt_val + cdef cyruntime.cudaArray_t* _pvt_ptr {{endif}} {{if 'cudaArray_const_t' in found_types}} @@ -39,8 +41,8 @@ cdef class cudaArray_const_t: Get memory address of class instance """ - cdef cyruntime.cudaArray_const_t __val - cdef cyruntime.cudaArray_const_t* _ptr + cdef cyruntime.cudaArray_const_t _pvt_val + cdef cyruntime.cudaArray_const_t* _pvt_ptr {{endif}} {{if 'cudaMipmappedArray_t' in found_types}} @@ -56,8 +58,8 @@ cdef class cudaMipmappedArray_t: Get memory address of class instance """ - cdef cyruntime.cudaMipmappedArray_t __val - cdef cyruntime.cudaMipmappedArray_t* _ptr + cdef cyruntime.cudaMipmappedArray_t _pvt_val + cdef cyruntime.cudaMipmappedArray_t* _pvt_ptr {{endif}} {{if 'cudaMipmappedArray_const_t' in found_types}} @@ -73,8 +75,8 @@ cdef class cudaMipmappedArray_const_t: Get memory address of class instance """ - cdef cyruntime.cudaMipmappedArray_const_t __val - cdef cyruntime.cudaMipmappedArray_const_t* _ptr + cdef cyruntime.cudaMipmappedArray_const_t _pvt_val + cdef cyruntime.cudaMipmappedArray_const_t* _pvt_ptr {{endif}} {{if 'cudaGraphicsResource_t' in found_types}} @@ -90,8 +92,8 @@ cdef class cudaGraphicsResource_t: Get memory address of class instance """ - cdef cyruntime.cudaGraphicsResource_t __val - cdef cyruntime.cudaGraphicsResource_t* _ptr + cdef cyruntime.cudaGraphicsResource_t _pvt_val + cdef cyruntime.cudaGraphicsResource_t* _pvt_ptr {{endif}} {{if 'cudaExternalMemory_t' in found_types}} @@ -107,8 +109,8 @@ cdef class cudaExternalMemory_t: Get memory address of class instance """ - cdef cyruntime.cudaExternalMemory_t __val - cdef cyruntime.cudaExternalMemory_t* _ptr + cdef cyruntime.cudaExternalMemory_t _pvt_val + cdef cyruntime.cudaExternalMemory_t* _pvt_ptr {{endif}} {{if 'cudaExternalSemaphore_t' in found_types}} @@ -124,8 +126,8 @@ cdef class cudaExternalSemaphore_t: Get memory address of class instance """ - cdef cyruntime.cudaExternalSemaphore_t __val - cdef cyruntime.cudaExternalSemaphore_t* _ptr + cdef cyruntime.cudaExternalSemaphore_t _pvt_val + cdef cyruntime.cudaExternalSemaphore_t* _pvt_ptr {{endif}} {{if 'cudaKernel_t' in found_types}} @@ -141,8 +143,25 @@ cdef class cudaKernel_t: Get memory address of class instance """ - cdef cyruntime.cudaKernel_t __val - cdef cyruntime.cudaKernel_t* _ptr + cdef cyruntime.cudaKernel_t _pvt_val + cdef cyruntime.cudaKernel_t* _pvt_ptr +{{endif}} + +{{if 'cudaLibrary_t' in found_types}} + +cdef class cudaLibrary_t: + """ + + CUDA library + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cyruntime.cudaLibrary_t _pvt_val + cdef cyruntime.cudaLibrary_t* _pvt_ptr {{endif}} {{if 'cudaGraphDeviceNode_t' in found_types}} @@ -158,8 +177,8 @@ cdef class cudaGraphDeviceNode_t: Get memory address of class instance """ - cdef cyruntime.cudaGraphDeviceNode_t __val - cdef cyruntime.cudaGraphDeviceNode_t* _ptr + cdef cyruntime.cudaGraphDeviceNode_t _pvt_val + cdef cyruntime.cudaGraphDeviceNode_t* _pvt_ptr {{endif}} {{if 'cudaAsyncCallbackHandle_t' in found_types}} @@ -175,8 +194,8 @@ cdef class cudaAsyncCallbackHandle_t: Get memory address of class instance """ - cdef cyruntime.cudaAsyncCallbackHandle_t __val - cdef cyruntime.cudaAsyncCallbackHandle_t* _ptr + cdef cyruntime.cudaAsyncCallbackHandle_t _pvt_val + cdef cyruntime.cudaAsyncCallbackHandle_t* _pvt_ptr {{endif}} {{if True}} @@ -190,8 +209,8 @@ cdef class EGLImageKHR: Get memory address of class instance """ - cdef cyruntime.EGLImageKHR __val - cdef cyruntime.EGLImageKHR* _ptr + cdef cyruntime.EGLImageKHR _pvt_val + cdef cyruntime.EGLImageKHR* _pvt_ptr {{endif}} {{if True}} @@ -205,8 +224,8 @@ cdef class EGLStreamKHR: Get memory address of class instance """ - cdef cyruntime.EGLStreamKHR __val - cdef cyruntime.EGLStreamKHR* _ptr + cdef cyruntime.EGLStreamKHR _pvt_val + cdef cyruntime.EGLStreamKHR* _pvt_ptr {{endif}} {{if True}} @@ -220,8 +239,8 @@ cdef class EGLSyncKHR: Get memory address of class instance """ - cdef cyruntime.EGLSyncKHR __val - cdef cyruntime.EGLSyncKHR* _ptr + cdef cyruntime.EGLSyncKHR _pvt_val + cdef cyruntime.EGLSyncKHR* _pvt_ptr {{endif}} {{if 'cudaHostFn_t' in found_types}} @@ -235,8 +254,8 @@ cdef class cudaHostFn_t: Get memory address of class instance """ - cdef cyruntime.cudaHostFn_t __val - cdef cyruntime.cudaHostFn_t* _ptr + cdef cyruntime.cudaHostFn_t _pvt_val + cdef cyruntime.cudaHostFn_t* _pvt_ptr {{endif}} {{if 'cudaAsyncCallback' in found_types}} @@ -250,8 +269,8 @@ cdef class cudaAsyncCallback: Get memory address of class instance """ - cdef cyruntime.cudaAsyncCallback __val - cdef cyruntime.cudaAsyncCallback* _ptr + cdef cyruntime.cudaAsyncCallback _pvt_val + cdef cyruntime.cudaAsyncCallback* _pvt_ptr {{endif}} {{if 'cudaStreamCallback_t' in found_types}} @@ -265,33 +284,38 @@ cdef class cudaStreamCallback_t: Get memory address of class instance """ - cdef cyruntime.cudaStreamCallback_t __val - cdef cyruntime.cudaStreamCallback_t* _ptr + cdef cyruntime.cudaStreamCallback_t _pvt_val + cdef cyruntime.cudaStreamCallback_t* _pvt_ptr {{endif}} -{{if 'struct dim3' in found_types}} +{{if 'dim3' in found_struct}} cdef class dim3: """ Attributes ---------- + {{if 'dim3.x' in found_struct}} x : unsigned int + {{endif}} + {{if 'dim3.y' in found_struct}} y : unsigned int + {{endif}} + {{if 'dim3.z' in found_struct}} z : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.dim3 __val - cdef cyruntime.dim3* _ptr + cdef cyruntime.dim3 _pvt_val + cdef cyruntime.dim3* _pvt_ptr {{endif}} -{{if 'struct cudaChannelFormatDesc' in found_types}} +{{if 'cudaChannelFormatDesc' in found_struct}} cdef class cudaChannelFormatDesc: """ @@ -299,48 +323,62 @@ cdef class cudaChannelFormatDesc: Attributes ---------- + {{if 'cudaChannelFormatDesc.x' in found_struct}} x : int x + {{endif}} + {{if 'cudaChannelFormatDesc.y' in found_struct}} y : int y + {{endif}} + {{if 'cudaChannelFormatDesc.z' in found_struct}} z : int z + {{endif}} + {{if 'cudaChannelFormatDesc.w' in found_struct}} w : int w + {{endif}} + {{if 'cudaChannelFormatDesc.f' in found_struct}} f : cudaChannelFormatKind Channel format kind + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaChannelFormatDesc __val - cdef cyruntime.cudaChannelFormatDesc* _ptr + cdef cyruntime.cudaChannelFormatDesc _pvt_val + cdef cyruntime.cudaChannelFormatDesc* _pvt_ptr {{endif}} -{{if 'struct cudaArraySparseProperties' in found_types}} +{{if 'cudaArraySparseProperties.tileExtent' in found_struct}} cdef class anon_struct0: """ Attributes ---------- + {{if 'cudaArraySparseProperties.tileExtent.width' in found_struct}} width : unsigned int + {{endif}} + {{if 'cudaArraySparseProperties.tileExtent.height' in found_struct}} height : unsigned int + {{endif}} + {{if 'cudaArraySparseProperties.tileExtent.depth' in found_struct}} depth : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaArraySparseProperties* _ptr + cdef cyruntime.cudaArraySparseProperties* _pvt_ptr {{endif}} -{{if 'struct cudaArraySparseProperties' in found_types}} +{{if 'cudaArraySparseProperties' in found_struct}} cdef class cudaArraySparseProperties: """ @@ -348,28 +386,39 @@ cdef class cudaArraySparseProperties: Attributes ---------- + {{if 'cudaArraySparseProperties.tileExtent' in found_struct}} tileExtent : anon_struct0 + {{endif}} + {{if 'cudaArraySparseProperties.miptailFirstLevel' in found_struct}} miptailFirstLevel : unsigned int First mip level at which the mip tail begins + {{endif}} + {{if 'cudaArraySparseProperties.miptailSize' in found_struct}} miptailSize : unsigned long long Total size of the mip tail. + {{endif}} + {{if 'cudaArraySparseProperties.flags' in found_struct}} flags : unsigned int Flags will either be zero or cudaArraySparsePropertiesSingleMipTail + {{endif}} + {{if 'cudaArraySparseProperties.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaArraySparseProperties __val - cdef cyruntime.cudaArraySparseProperties* _ptr + cdef cyruntime.cudaArraySparseProperties _pvt_val + cdef cyruntime.cudaArraySparseProperties* _pvt_ptr + {{if 'cudaArraySparseProperties.tileExtent' in found_struct}} cdef anon_struct0 _tileExtent + {{endif}} {{endif}} -{{if 'struct cudaArrayMemoryRequirements' in found_types}} +{{if 'cudaArrayMemoryRequirements' in found_struct}} cdef class cudaArrayMemoryRequirements: """ @@ -377,23 +426,28 @@ cdef class cudaArrayMemoryRequirements: Attributes ---------- + {{if 'cudaArrayMemoryRequirements.size' in found_struct}} size : size_t Total size of the array. + {{endif}} + {{if 'cudaArrayMemoryRequirements.alignment' in found_struct}} alignment : size_t Alignment necessary for mapping the array. + {{endif}} + {{if 'cudaArrayMemoryRequirements.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaArrayMemoryRequirements __val - cdef cyruntime.cudaArrayMemoryRequirements* _ptr + cdef cyruntime.cudaArrayMemoryRequirements _pvt_val + cdef cyruntime.cudaArrayMemoryRequirements* _pvt_ptr {{endif}} -{{if 'struct cudaPitchedPtr' in found_types}} +{{if 'cudaPitchedPtr' in found_struct}} cdef class cudaPitchedPtr: """ @@ -401,25 +455,32 @@ cdef class cudaPitchedPtr: Attributes ---------- + {{if 'cudaPitchedPtr.ptr' in found_struct}} ptr : Any Pointer to allocated memory + {{endif}} + {{if 'cudaPitchedPtr.pitch' in found_struct}} pitch : size_t Pitch of allocated memory in bytes + {{endif}} + {{if 'cudaPitchedPtr.xsize' in found_struct}} xsize : size_t Logical width of allocation in elements + {{endif}} + {{if 'cudaPitchedPtr.ysize' in found_struct}} ysize : size_t Logical height of allocation in elements + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaPitchedPtr __val - cdef cyruntime.cudaPitchedPtr* _ptr + cdef cyruntime.cudaPitchedPtr _pvt_val + cdef cyruntime.cudaPitchedPtr* _pvt_ptr {{endif}} -{{if 'struct cudaExtent' in found_types}} +{{if 'cudaExtent' in found_struct}} cdef class cudaExtent: """ @@ -427,24 +488,29 @@ cdef class cudaExtent: Attributes ---------- + {{if 'cudaExtent.width' in found_struct}} width : size_t Width in elements when referring to array memory, in bytes when referring to linear memory + {{endif}} + {{if 'cudaExtent.height' in found_struct}} height : size_t Height in elements + {{endif}} + {{if 'cudaExtent.depth' in found_struct}} depth : size_t Depth in elements + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExtent __val - cdef cyruntime.cudaExtent* _ptr + cdef cyruntime.cudaExtent _pvt_val + cdef cyruntime.cudaExtent* _pvt_ptr {{endif}} -{{if 'struct cudaPos' in found_types}} +{{if 'cudaPos' in found_struct}} cdef class cudaPos: """ @@ -452,23 +518,28 @@ cdef class cudaPos: Attributes ---------- + {{if 'cudaPos.x' in found_struct}} x : size_t x + {{endif}} + {{if 'cudaPos.y' in found_struct}} y : size_t y + {{endif}} + {{if 'cudaPos.z' in found_struct}} z : size_t z + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaPos __val - cdef cyruntime.cudaPos* _ptr + cdef cyruntime.cudaPos _pvt_val + cdef cyruntime.cudaPos* _pvt_ptr {{endif}} -{{if 'struct cudaMemcpy3DParms' in found_types}} +{{if 'cudaMemcpy3DParms' in found_struct}} cdef class cudaMemcpy3DParms: """ @@ -476,40 +547,69 @@ cdef class cudaMemcpy3DParms: Attributes ---------- + {{if 'cudaMemcpy3DParms.srcArray' in found_struct}} srcArray : cudaArray_t Source memory address + {{endif}} + {{if 'cudaMemcpy3DParms.srcPos' in found_struct}} srcPos : cudaPos Source position offset + {{endif}} + {{if 'cudaMemcpy3DParms.srcPtr' in found_struct}} srcPtr : cudaPitchedPtr Pitched source memory address + {{endif}} + {{if 'cudaMemcpy3DParms.dstArray' in found_struct}} dstArray : cudaArray_t Destination memory address + {{endif}} + {{if 'cudaMemcpy3DParms.dstPos' in found_struct}} dstPos : cudaPos Destination position offset + {{endif}} + {{if 'cudaMemcpy3DParms.dstPtr' in found_struct}} dstPtr : cudaPitchedPtr Pitched destination memory address + {{endif}} + {{if 'cudaMemcpy3DParms.extent' in found_struct}} extent : cudaExtent Requested memory copy size + {{endif}} + {{if 'cudaMemcpy3DParms.kind' in found_struct}} kind : cudaMemcpyKind Type of transfer + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemcpy3DParms __val - cdef cyruntime.cudaMemcpy3DParms* _ptr + cdef cyruntime.cudaMemcpy3DParms _pvt_val + cdef cyruntime.cudaMemcpy3DParms* _pvt_ptr + {{if 'cudaMemcpy3DParms.srcArray' in found_struct}} cdef cudaArray_t _srcArray + {{endif}} + {{if 'cudaMemcpy3DParms.srcPos' in found_struct}} cdef cudaPos _srcPos + {{endif}} + {{if 'cudaMemcpy3DParms.srcPtr' in found_struct}} cdef cudaPitchedPtr _srcPtr + {{endif}} + {{if 'cudaMemcpy3DParms.dstArray' in found_struct}} cdef cudaArray_t _dstArray + {{endif}} + {{if 'cudaMemcpy3DParms.dstPos' in found_struct}} cdef cudaPos _dstPos + {{endif}} + {{if 'cudaMemcpy3DParms.dstPtr' in found_struct}} cdef cudaPitchedPtr _dstPtr + {{endif}} + {{if 'cudaMemcpy3DParms.extent' in found_struct}} cdef cudaExtent _extent + {{endif}} {{endif}} -{{if 'struct cudaMemcpyNodeParams' in found_types}} +{{if 'cudaMemcpyNodeParams' in found_struct}} cdef class cudaMemcpyNodeParams: """ @@ -517,24 +617,31 @@ cdef class cudaMemcpyNodeParams: Attributes ---------- + {{if 'cudaMemcpyNodeParams.flags' in found_struct}} flags : int Must be zero + {{endif}} + {{if 'cudaMemcpyNodeParams.reserved' in found_struct}} reserved : List[int] Must be zero + {{endif}} + {{if 'cudaMemcpyNodeParams.copyParams' in found_struct}} copyParams : cudaMemcpy3DParms Parameters for the memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemcpyNodeParams __val - cdef cyruntime.cudaMemcpyNodeParams* _ptr + cdef cyruntime.cudaMemcpyNodeParams _pvt_val + cdef cyruntime.cudaMemcpyNodeParams* _pvt_ptr + {{if 'cudaMemcpyNodeParams.copyParams' in found_struct}} cdef cudaMemcpy3DParms _copyParams + {{endif}} {{endif}} -{{if 'struct cudaMemcpy3DPeerParms' in found_types}} +{{if 'cudaMemcpy3DPeerParms' in found_struct}} cdef class cudaMemcpy3DPeerParms: """ @@ -542,42 +649,73 @@ cdef class cudaMemcpy3DPeerParms: Attributes ---------- + {{if 'cudaMemcpy3DPeerParms.srcArray' in found_struct}} srcArray : cudaArray_t Source memory address + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPos' in found_struct}} srcPos : cudaPos Source position offset + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPtr' in found_struct}} srcPtr : cudaPitchedPtr Pitched source memory address + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcDevice' in found_struct}} srcDevice : int Source device + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstArray' in found_struct}} dstArray : cudaArray_t Destination memory address + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPos' in found_struct}} dstPos : cudaPos Destination position offset + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPtr' in found_struct}} dstPtr : cudaPitchedPtr Pitched destination memory address + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstDevice' in found_struct}} dstDevice : int Destination device + {{endif}} + {{if 'cudaMemcpy3DPeerParms.extent' in found_struct}} extent : cudaExtent Requested memory copy size + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemcpy3DPeerParms __val - cdef cyruntime.cudaMemcpy3DPeerParms* _ptr + cdef cyruntime.cudaMemcpy3DPeerParms _pvt_val + cdef cyruntime.cudaMemcpy3DPeerParms* _pvt_ptr + {{if 'cudaMemcpy3DPeerParms.srcArray' in found_struct}} cdef cudaArray_t _srcArray + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPos' in found_struct}} cdef cudaPos _srcPos + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPtr' in found_struct}} cdef cudaPitchedPtr _srcPtr + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstArray' in found_struct}} cdef cudaArray_t _dstArray + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPos' in found_struct}} cdef cudaPos _dstPos + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPtr' in found_struct}} cdef cudaPitchedPtr _dstPtr + {{endif}} + {{if 'cudaMemcpy3DPeerParms.extent' in found_struct}} cdef cudaExtent _extent + {{endif}} {{endif}} -{{if 'struct cudaMemsetParams' in found_types}} +{{if 'cudaMemsetParams' in found_struct}} cdef class cudaMemsetParams: """ @@ -585,29 +723,40 @@ cdef class cudaMemsetParams: Attributes ---------- + {{if 'cudaMemsetParams.dst' in found_struct}} dst : Any Destination device pointer + {{endif}} + {{if 'cudaMemsetParams.pitch' in found_struct}} pitch : size_t Pitch of destination device pointer. Unused if height is 1 + {{endif}} + {{if 'cudaMemsetParams.value' in found_struct}} value : unsigned int Value to be set + {{endif}} + {{if 'cudaMemsetParams.elementSize' in found_struct}} elementSize : unsigned int Size of each element in bytes. Must be 1, 2, or 4. + {{endif}} + {{if 'cudaMemsetParams.width' in found_struct}} width : size_t Width of the row in elements + {{endif}} + {{if 'cudaMemsetParams.height' in found_struct}} height : size_t Number of rows + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemsetParams __val - cdef cyruntime.cudaMemsetParams* _ptr + cdef cyruntime.cudaMemsetParams _pvt_val + cdef cyruntime.cudaMemsetParams* _pvt_ptr {{endif}} -{{if 'struct cudaMemsetParamsV2' in found_types}} +{{if 'cudaMemsetParamsV2' in found_struct}} cdef class cudaMemsetParamsV2: """ @@ -615,29 +764,40 @@ cdef class cudaMemsetParamsV2: Attributes ---------- + {{if 'cudaMemsetParamsV2.dst' in found_struct}} dst : Any Destination device pointer + {{endif}} + {{if 'cudaMemsetParamsV2.pitch' in found_struct}} pitch : size_t Pitch of destination device pointer. Unused if height is 1 + {{endif}} + {{if 'cudaMemsetParamsV2.value' in found_struct}} value : unsigned int Value to be set + {{endif}} + {{if 'cudaMemsetParamsV2.elementSize' in found_struct}} elementSize : unsigned int Size of each element in bytes. Must be 1, 2, or 4. + {{endif}} + {{if 'cudaMemsetParamsV2.width' in found_struct}} width : size_t Width of the row in elements + {{endif}} + {{if 'cudaMemsetParamsV2.height' in found_struct}} height : size_t Number of rows + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemsetParamsV2 __val - cdef cyruntime.cudaMemsetParamsV2* _ptr + cdef cyruntime.cudaMemsetParamsV2 _pvt_val + cdef cyruntime.cudaMemsetParamsV2* _pvt_ptr {{endif}} -{{if 'struct cudaAccessPolicyWindow' in found_types}} +{{if 'cudaAccessPolicyWindow' in found_struct}} cdef class cudaAccessPolicyWindow: """ @@ -652,31 +812,40 @@ cdef class cudaAccessPolicyWindow: Attributes ---------- + {{if 'cudaAccessPolicyWindow.base_ptr' in found_struct}} base_ptr : Any Starting address of the access policy window. CUDA driver may align it. + {{endif}} + {{if 'cudaAccessPolicyWindow.num_bytes' in found_struct}} num_bytes : size_t Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment. + {{endif}} + {{if 'cudaAccessPolicyWindow.hitRatio' in found_struct}} hitRatio : float hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp. + {{endif}} + {{if 'cudaAccessPolicyWindow.hitProp' in found_struct}} hitProp : cudaAccessProperty ::CUaccessProperty set for hit. + {{endif}} + {{if 'cudaAccessPolicyWindow.missProp' in found_struct}} missProp : cudaAccessProperty ::CUaccessProperty set for miss. Must be either NORMAL or STREAMING. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaAccessPolicyWindow __val - cdef cyruntime.cudaAccessPolicyWindow* _ptr + cdef cyruntime.cudaAccessPolicyWindow _pvt_val + cdef cyruntime.cudaAccessPolicyWindow* _pvt_ptr {{endif}} -{{if 'struct cudaHostNodeParams' in found_types}} +{{if 'cudaHostNodeParams' in found_struct}} cdef class cudaHostNodeParams: """ @@ -684,22 +853,27 @@ cdef class cudaHostNodeParams: Attributes ---------- + {{if 'cudaHostNodeParams.fn' in found_struct}} fn : cudaHostFn_t The function to call when the node executes + {{endif}} + {{if 'cudaHostNodeParams.userData' in found_struct}} userData : Any Argument to pass to the function + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaHostNodeParams __val - cdef cyruntime.cudaHostNodeParams* _ptr + cdef cyruntime.cudaHostNodeParams _pvt_val + cdef cyruntime.cudaHostNodeParams* _pvt_ptr + {{if 'cudaHostNodeParams.fn' in found_struct}} cdef cudaHostFn_t _fn + {{endif}} {{endif}} -{{if 'struct cudaHostNodeParamsV2' in found_types}} +{{if 'cudaHostNodeParamsV2' in found_struct}} cdef class cudaHostNodeParamsV2: """ @@ -707,133 +881,177 @@ cdef class cudaHostNodeParamsV2: Attributes ---------- + {{if 'cudaHostNodeParamsV2.fn' in found_struct}} fn : cudaHostFn_t The function to call when the node executes + {{endif}} + {{if 'cudaHostNodeParamsV2.userData' in found_struct}} userData : Any Argument to pass to the function + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaHostNodeParamsV2 __val - cdef cyruntime.cudaHostNodeParamsV2* _ptr + cdef cyruntime.cudaHostNodeParamsV2 _pvt_val + cdef cyruntime.cudaHostNodeParamsV2* _pvt_ptr + {{if 'cudaHostNodeParamsV2.fn' in found_struct}} cdef cudaHostFn_t _fn + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc.res.array' in found_struct}} cdef class anon_struct1: """ Attributes ---------- + {{if 'cudaResourceDesc.res.array.array' in found_struct}} array : cudaArray_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaResourceDesc* _ptr + cdef cyruntime.cudaResourceDesc* _pvt_ptr + {{if 'cudaResourceDesc.res.array.array' in found_struct}} cdef cudaArray_t _array + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc.res.mipmap' in found_struct}} cdef class anon_struct2: """ Attributes ---------- + {{if 'cudaResourceDesc.res.mipmap.mipmap' in found_struct}} mipmap : cudaMipmappedArray_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaResourceDesc* _ptr + cdef cyruntime.cudaResourceDesc* _pvt_ptr + {{if 'cudaResourceDesc.res.mipmap.mipmap' in found_struct}} cdef cudaMipmappedArray_t _mipmap + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc.res.linear' in found_struct}} cdef class anon_struct3: """ Attributes ---------- + {{if 'cudaResourceDesc.res.linear.devPtr' in found_struct}} devPtr : Any + {{endif}} + {{if 'cudaResourceDesc.res.linear.desc' in found_struct}} desc : cudaChannelFormatDesc + {{endif}} + {{if 'cudaResourceDesc.res.linear.sizeInBytes' in found_struct}} sizeInBytes : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaResourceDesc* _ptr + cdef cyruntime.cudaResourceDesc* _pvt_ptr + {{if 'cudaResourceDesc.res.linear.desc' in found_struct}} cdef cudaChannelFormatDesc _desc + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc.res.pitch2D' in found_struct}} cdef class anon_struct4: """ Attributes ---------- + {{if 'cudaResourceDesc.res.pitch2D.devPtr' in found_struct}} devPtr : Any + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.desc' in found_struct}} desc : cudaChannelFormatDesc + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.width' in found_struct}} width : size_t + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.height' in found_struct}} height : size_t + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.pitchInBytes' in found_struct}} pitchInBytes : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaResourceDesc* _ptr + cdef cyruntime.cudaResourceDesc* _pvt_ptr + {{if 'cudaResourceDesc.res.pitch2D.desc' in found_struct}} cdef cudaChannelFormatDesc _desc + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc.res' in found_struct}} cdef class anon_union0: """ Attributes ---------- + {{if 'cudaResourceDesc.res.array' in found_struct}} array : anon_struct1 + {{endif}} + {{if 'cudaResourceDesc.res.mipmap' in found_struct}} mipmap : anon_struct2 + {{endif}} + {{if 'cudaResourceDesc.res.linear' in found_struct}} linear : anon_struct3 + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D' in found_struct}} pitch2D : anon_struct4 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaResourceDesc* _ptr + cdef cyruntime.cudaResourceDesc* _pvt_ptr + {{if 'cudaResourceDesc.res.array' in found_struct}} cdef anon_struct1 _array + {{endif}} + {{if 'cudaResourceDesc.res.mipmap' in found_struct}} cdef anon_struct2 _mipmap + {{endif}} + {{if 'cudaResourceDesc.res.linear' in found_struct}} cdef anon_struct3 _linear + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D' in found_struct}} cdef anon_struct4 _pitch2D + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc' in found_struct}} cdef class cudaResourceDesc: """ @@ -841,22 +1059,27 @@ cdef class cudaResourceDesc: Attributes ---------- + {{if 'cudaResourceDesc.resType' in found_struct}} resType : cudaResourceType Resource type + {{endif}} + {{if 'cudaResourceDesc.res' in found_struct}} res : anon_union0 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cyruntime.cudaResourceDesc* _val_ptr - cdef cyruntime.cudaResourceDesc* _ptr + cdef cyruntime.cudaResourceDesc* _pvt_ptr + {{if 'cudaResourceDesc.res' in found_struct}} cdef anon_union0 _res + {{endif}} {{endif}} -{{if 'struct cudaResourceViewDesc' in found_types}} +{{if 'cudaResourceViewDesc' in found_struct}} cdef class cudaResourceViewDesc: """ @@ -864,33 +1087,48 @@ cdef class cudaResourceViewDesc: Attributes ---------- + {{if 'cudaResourceViewDesc.format' in found_struct}} format : cudaResourceViewFormat Resource view format + {{endif}} + {{if 'cudaResourceViewDesc.width' in found_struct}} width : size_t Width of the resource view + {{endif}} + {{if 'cudaResourceViewDesc.height' in found_struct}} height : size_t Height of the resource view + {{endif}} + {{if 'cudaResourceViewDesc.depth' in found_struct}} depth : size_t Depth of the resource view + {{endif}} + {{if 'cudaResourceViewDesc.firstMipmapLevel' in found_struct}} firstMipmapLevel : unsigned int First defined mipmap level + {{endif}} + {{if 'cudaResourceViewDesc.lastMipmapLevel' in found_struct}} lastMipmapLevel : unsigned int Last defined mipmap level + {{endif}} + {{if 'cudaResourceViewDesc.firstLayer' in found_struct}} firstLayer : unsigned int First layer index + {{endif}} + {{if 'cudaResourceViewDesc.lastLayer' in found_struct}} lastLayer : unsigned int Last layer index + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaResourceViewDesc __val - cdef cyruntime.cudaResourceViewDesc* _ptr + cdef cyruntime.cudaResourceViewDesc _pvt_val + cdef cyruntime.cudaResourceViewDesc* _pvt_ptr {{endif}} -{{if 'struct cudaPointerAttributes' in found_types}} +{{if 'cudaPointerAttributes' in found_struct}} cdef class cudaPointerAttributes: """ @@ -898,9 +1136,12 @@ cdef class cudaPointerAttributes: Attributes ---------- + {{if 'cudaPointerAttributes.type' in found_struct}} type : cudaMemoryType The type of memory - cudaMemoryTypeUnregistered, cudaMemoryTypeHost, cudaMemoryTypeDevice or cudaMemoryTypeManaged. + {{endif}} + {{if 'cudaPointerAttributes.device' in found_struct}} device : int The device against which the memory was allocated or registered. If the memory type is cudaMemoryTypeDevice then this identifies the @@ -909,25 +1150,29 @@ cdef class cudaPointerAttributes: this identifies the device which was current when the memory was allocated or registered (and if that device is deinitialized then this allocation will vanish with that device's state). + {{endif}} + {{if 'cudaPointerAttributes.devicePointer' in found_struct}} devicePointer : Any The address which may be dereferenced on the current device to access the memory or NULL if no such address exists. + {{endif}} + {{if 'cudaPointerAttributes.hostPointer' in found_struct}} hostPointer : Any The address which may be dereferenced on the host to access the memory or NULL if no such address exists. CUDA doesn't check if unregistered memory is allocated so this field may contain invalid pointer if an invalid pointer has been passed to CUDA. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaPointerAttributes __val - cdef cyruntime.cudaPointerAttributes* _ptr + cdef cyruntime.cudaPointerAttributes _pvt_val + cdef cyruntime.cudaPointerAttributes* _pvt_ptr {{endif}} -{{if 'struct cudaFuncAttributes' in found_types}} +{{if 'cudaFuncAttributes' in found_struct}} cdef class cudaFuncAttributes: """ @@ -935,38 +1180,57 @@ cdef class cudaFuncAttributes: Attributes ---------- + {{if 'cudaFuncAttributes.sharedSizeBytes' in found_struct}} sharedSizeBytes : size_t The size in bytes of statically-allocated shared memory per block required by this function. This does not include dynamically- allocated shared memory requested by the user at runtime. + {{endif}} + {{if 'cudaFuncAttributes.constSizeBytes' in found_struct}} constSizeBytes : size_t The size in bytes of user-allocated constant memory required by this function. + {{endif}} + {{if 'cudaFuncAttributes.localSizeBytes' in found_struct}} localSizeBytes : size_t The size in bytes of local memory used by each thread of this function. + {{endif}} + {{if 'cudaFuncAttributes.maxThreadsPerBlock' in found_struct}} maxThreadsPerBlock : int The maximum number of threads per block, beyond which a launch of the function would fail. This number depends on both the function and the device on which the function is currently loaded. + {{endif}} + {{if 'cudaFuncAttributes.numRegs' in found_struct}} numRegs : int The number of registers used by each thread of this function. + {{endif}} + {{if 'cudaFuncAttributes.ptxVersion' in found_struct}} ptxVersion : int The PTX virtual architecture version for which the function was compiled. This value is the major PTX version * 10 + the minor PTX version, so a PTX version 1.3 function would return the value 13. + {{endif}} + {{if 'cudaFuncAttributes.binaryVersion' in found_struct}} binaryVersion : int The binary architecture version for which the function was compiled. This value is the major binary version * 10 + the minor binary version, so a binary version 1.3 function would return the value 13. + {{endif}} + {{if 'cudaFuncAttributes.cacheModeCA' in found_struct}} cacheModeCA : int The attribute to indicate whether the function has been compiled with user specified option "-Xptxas --dlcm=ca" set. + {{endif}} + {{if 'cudaFuncAttributes.maxDynamicSharedSizeBytes' in found_struct}} maxDynamicSharedSizeBytes : int The maximum size in bytes of dynamic shared memory per block for this function. Any launch must have a dynamic shared memory size smaller than this value. + {{endif}} + {{if 'cudaFuncAttributes.preferredShmemCarveout' in found_struct}} preferredShmemCarveout : int On devices where the L1 cache and shared memory use the same hardware resources, this sets the shared memory carveout @@ -974,9 +1238,13 @@ cdef class cudaFuncAttributes: cudaDevAttrMaxSharedMemoryPerMultiprocessor. This is only a hint, and the driver can choose a different ratio if required to execute the function. See cudaFuncSetAttribute + {{endif}} + {{if 'cudaFuncAttributes.clusterDimMustBeSet' in found_struct}} clusterDimMustBeSet : int If this attribute is set, the kernel must launch with a valid cluster dimension specified. + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterWidth' in found_struct}} requiredClusterWidth : int The required cluster width/height/depth in blocks. The values must either all be 0 or all be positive. The validity of the cluster @@ -984,12 +1252,20 @@ cdef class cudaFuncAttributes: set during compile time, it cannot be set at runtime. Setting it at runtime should return cudaErrorNotPermitted. See cudaFuncSetAttribute + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterHeight' in found_struct}} requiredClusterHeight : int + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterDepth' in found_struct}} requiredClusterDepth : int + {{endif}} + {{if 'cudaFuncAttributes.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : int The block scheduling policy of a function. See cudaFuncSetAttribute + {{endif}} + {{if 'cudaFuncAttributes.nonPortableClusterSizeAllowed' in found_struct}} nonPortableClusterSizeAllowed : int Whether the function can be launched with non-portable cluster size. 1 is allowed, 0 is disallowed. A non-portable cluster size @@ -1004,19 +1280,21 @@ cdef class cudaFuncAttributes: compute capabilities. The specific hardware unit may support higher cluster sizes that’s not guaranteed to be portable. See cudaFuncSetAttribute + {{endif}} + {{if 'cudaFuncAttributes.reserved' in found_struct}} reserved : List[int] Reserved for future use. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaFuncAttributes __val - cdef cyruntime.cudaFuncAttributes* _ptr + cdef cyruntime.cudaFuncAttributes _pvt_val + cdef cyruntime.cudaFuncAttributes* _pvt_ptr {{endif}} -{{if 'struct cudaMemLocation' in found_types}} +{{if 'cudaMemLocation' in found_struct}} cdef class cudaMemLocation: """ @@ -1027,21 +1305,24 @@ cdef class cudaMemLocation: Attributes ---------- + {{if 'cudaMemLocation.type' in found_struct}} type : cudaMemLocationType Specifies the location type, which modifies the meaning of id. + {{endif}} + {{if 'cudaMemLocation.id' in found_struct}} id : int identifier for a given this location's ::CUmemLocationType. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemLocation __val - cdef cyruntime.cudaMemLocation* _ptr + cdef cyruntime.cudaMemLocation _pvt_val + cdef cyruntime.cudaMemLocation* _pvt_ptr {{endif}} -{{if 'struct cudaMemAccessDesc' in found_types}} +{{if 'cudaMemAccessDesc' in found_struct}} cdef class cudaMemAccessDesc: """ @@ -1049,22 +1330,27 @@ cdef class cudaMemAccessDesc: Attributes ---------- + {{if 'cudaMemAccessDesc.location' in found_struct}} location : cudaMemLocation Location on which the request is to change it's accessibility + {{endif}} + {{if 'cudaMemAccessDesc.flags' in found_struct}} flags : cudaMemAccessFlags ::CUmemProt accessibility flags to set on the request + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemAccessDesc __val - cdef cyruntime.cudaMemAccessDesc* _ptr + cdef cyruntime.cudaMemAccessDesc _pvt_val + cdef cyruntime.cudaMemAccessDesc* _pvt_ptr + {{if 'cudaMemAccessDesc.location' in found_struct}} cdef cudaMemLocation _location + {{endif}} {{endif}} -{{if 'struct cudaMemPoolProps' in found_types}} +{{if 'cudaMemPoolProps' in found_struct}} cdef class cudaMemPoolProps: """ @@ -1072,38 +1358,53 @@ cdef class cudaMemPoolProps: Attributes ---------- + {{if 'cudaMemPoolProps.allocType' in found_struct}} allocType : cudaMemAllocationType Allocation type. Currently must be specified as cudaMemAllocationTypePinned + {{endif}} + {{if 'cudaMemPoolProps.handleTypes' in found_struct}} handleTypes : cudaMemAllocationHandleType Handle types that will be supported by allocations from the pool. + {{endif}} + {{if 'cudaMemPoolProps.location' in found_struct}} location : cudaMemLocation Location allocations should reside. + {{endif}} + {{if 'cudaMemPoolProps.win32SecurityAttributes' in found_struct}} win32SecurityAttributes : Any Windows-specific LPSECURITYATTRIBUTES required when cudaMemHandleTypeWin32 is specified. This security attribute defines the scope of which exported allocations may be tranferred to other processes. In all other cases, this field is required to be zero. + {{endif}} + {{if 'cudaMemPoolProps.maxSize' in found_struct}} maxSize : size_t Maximum pool size. When set to 0, defaults to a system dependent value. + {{endif}} + {{if 'cudaMemPoolProps.usage' in found_struct}} usage : unsigned short Bitmask indicating intended usage for the pool. + {{endif}} + {{if 'cudaMemPoolProps.reserved' in found_struct}} reserved : bytes reserved for future use, must be 0 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemPoolProps __val - cdef cyruntime.cudaMemPoolProps* _ptr + cdef cyruntime.cudaMemPoolProps _pvt_val + cdef cyruntime.cudaMemPoolProps* _pvt_ptr + {{if 'cudaMemPoolProps.location' in found_struct}} cdef cudaMemLocation _location + {{endif}} {{endif}} -{{if 'struct cudaMemPoolPtrExportData' in found_types}} +{{if 'cudaMemPoolPtrExportData' in found_struct}} cdef class cudaMemPoolPtrExportData: """ @@ -1111,19 +1412,20 @@ cdef class cudaMemPoolPtrExportData: Attributes ---------- + {{if 'cudaMemPoolPtrExportData.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemPoolPtrExportData __val - cdef cyruntime.cudaMemPoolPtrExportData* _ptr + cdef cyruntime.cudaMemPoolPtrExportData _pvt_val + cdef cyruntime.cudaMemPoolPtrExportData* _pvt_ptr {{endif}} -{{if 'struct cudaMemAllocNodeParams' in found_types}} +{{if 'cudaMemAllocNodeParams' in found_struct}} cdef class cudaMemAllocNodeParams: """ @@ -1131,35 +1433,47 @@ cdef class cudaMemAllocNodeParams: Attributes ---------- + {{if 'cudaMemAllocNodeParams.poolProps' in found_struct}} poolProps : cudaMemPoolProps in: location where the allocation should reside (specified in ::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is not supported. in: array of memory access descriptors. Used to describe peer GPU access + {{endif}} + {{if 'cudaMemAllocNodeParams.accessDescs' in found_struct}} accessDescs : cudaMemAccessDesc in: number of memory access descriptors. Must not exceed the number of GPUs. + {{endif}} + {{if 'cudaMemAllocNodeParams.accessDescCount' in found_struct}} accessDescCount : size_t in: Number of `accessDescs`s + {{endif}} + {{if 'cudaMemAllocNodeParams.bytesize' in found_struct}} bytesize : size_t in: size in bytes of the requested allocation + {{endif}} + {{if 'cudaMemAllocNodeParams.dptr' in found_struct}} dptr : Any out: address of the allocation returned by CUDA + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemAllocNodeParams __val - cdef cyruntime.cudaMemAllocNodeParams* _ptr + cdef cyruntime.cudaMemAllocNodeParams _pvt_val + cdef cyruntime.cudaMemAllocNodeParams* _pvt_ptr + {{if 'cudaMemAllocNodeParams.poolProps' in found_struct}} cdef cudaMemPoolProps _poolProps + {{endif}} + {{if 'cudaMemAllocNodeParams.accessDescs' in found_struct}} cdef size_t _accessDescs_length cdef cyruntime.cudaMemAccessDesc* _accessDescs - + {{endif}} {{endif}} -{{if 'struct cudaMemAllocNodeParamsV2' in found_types}} +{{if 'cudaMemAllocNodeParamsV2' in found_struct}} cdef class cudaMemAllocNodeParamsV2: """ @@ -1167,35 +1481,47 @@ cdef class cudaMemAllocNodeParamsV2: Attributes ---------- + {{if 'cudaMemAllocNodeParamsV2.poolProps' in found_struct}} poolProps : cudaMemPoolProps in: location where the allocation should reside (specified in ::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is not supported. in: array of memory access descriptors. Used to describe peer GPU access + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.accessDescs' in found_struct}} accessDescs : cudaMemAccessDesc in: number of memory access descriptors. Must not exceed the number of GPUs. + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.accessDescCount' in found_struct}} accessDescCount : size_t in: Number of `accessDescs`s + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.bytesize' in found_struct}} bytesize : size_t in: size in bytes of the requested allocation + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.dptr' in found_struct}} dptr : Any out: address of the allocation returned by CUDA + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemAllocNodeParamsV2 __val - cdef cyruntime.cudaMemAllocNodeParamsV2* _ptr + cdef cyruntime.cudaMemAllocNodeParamsV2 _pvt_val + cdef cyruntime.cudaMemAllocNodeParamsV2* _pvt_ptr + {{if 'cudaMemAllocNodeParamsV2.poolProps' in found_struct}} cdef cudaMemPoolProps _poolProps + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.accessDescs' in found_struct}} cdef size_t _accessDescs_length cdef cyruntime.cudaMemAccessDesc* _accessDescs - + {{endif}} {{endif}} -{{if 'struct cudaMemFreeNodeParams' in found_types}} +{{if 'cudaMemFreeNodeParams' in found_struct}} cdef class cudaMemFreeNodeParams: """ @@ -1203,37 +1529,274 @@ cdef class cudaMemFreeNodeParams: Attributes ---------- + {{if 'cudaMemFreeNodeParams.dptr' in found_struct}} dptr : Any in: the pointer to free + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemFreeNodeParams _pvt_val + cdef cyruntime.cudaMemFreeNodeParams* _pvt_ptr +{{endif}} +{{if 'cudaMemcpyAttributes' in found_struct}} + +cdef class cudaMemcpyAttributes: + """ + Attributes specific to copies within a batch. For more details on + usage see cudaMemcpyBatchAsync. + + Attributes + ---------- + {{if 'cudaMemcpyAttributes.srcAccessOrder' in found_struct}} + srcAccessOrder : cudaMemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + {{endif}} + {{if 'cudaMemcpyAttributes.srcLocHint' in found_struct}} + srcLocHint : cudaMemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'cudaMemcpyAttributes.dstLocHint' in found_struct}} + dstLocHint : cudaMemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'cudaMemcpyAttributes.flags' in found_struct}} + flags : unsigned int + Additional flags for copies with this attribute. See + cudaMemcpyFlags. + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpyAttributes _pvt_val + cdef cyruntime.cudaMemcpyAttributes* _pvt_ptr + {{if 'cudaMemcpyAttributes.srcLocHint' in found_struct}} + cdef cudaMemLocation _srcLocHint + {{endif}} + {{if 'cudaMemcpyAttributes.dstLocHint' in found_struct}} + cdef cudaMemLocation _dstLocHint + {{endif}} +{{endif}} +{{if 'cudaOffset3D' in found_struct}} + +cdef class cudaOffset3D: + """ + Struct representing offset into a cudaArray_t in elements + + Attributes + ---------- + {{if 'cudaOffset3D.x' in found_struct}} + x : size_t + + {{endif}} + {{if 'cudaOffset3D.y' in found_struct}} + y : size_t + + {{endif}} + {{if 'cudaOffset3D.z' in found_struct}} + z : size_t + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaOffset3D _pvt_val + cdef cyruntime.cudaOffset3D* _pvt_ptr +{{endif}} +{{if 'cudaMemcpy3DOperand.op.ptr' in found_struct}} + +cdef class anon_struct5: + """ + Attributes + ---------- + {{if 'cudaMemcpy3DOperand.op.ptr.ptr' in found_struct}} + ptr : Any + + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.rowLength' in found_struct}} + rowLength : size_t + + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.layerHeight' in found_struct}} + layerHeight : size_t + + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.locHint' in found_struct}} + locHint : cudaMemLocation + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + {{if 'cudaMemcpy3DOperand.op.ptr.locHint' in found_struct}} + cdef cudaMemLocation _locHint + {{endif}} +{{endif}} +{{if 'cudaMemcpy3DOperand.op.array' in found_struct}} + +cdef class anon_struct6: + """ + Attributes + ---------- + {{if 'cudaMemcpy3DOperand.op.array.array' in found_struct}} + array : cudaArray_t + + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array.offset' in found_struct}} + offset : cudaOffset3D + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + {{if 'cudaMemcpy3DOperand.op.array.array' in found_struct}} + cdef cudaArray_t _array + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array.offset' in found_struct}} + cdef cudaOffset3D _offset + {{endif}} +{{endif}} +{{if 'cudaMemcpy3DOperand.op' in found_struct}} + +cdef class anon_union1: + """ + Attributes + ---------- + {{if 'cudaMemcpy3DOperand.op.ptr' in found_struct}} + ptr : anon_struct5 + + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array' in found_struct}} + array : anon_struct6 + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + {{if 'cudaMemcpy3DOperand.op.ptr' in found_struct}} + cdef anon_struct5 _ptr + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array' in found_struct}} + cdef anon_struct6 _array + {{endif}} +{{endif}} +{{if 'cudaMemcpy3DOperand' in found_struct}} + +cdef class cudaMemcpy3DOperand: + """ + Struct representing an operand for copy with cudaMemcpy3DBatchAsync + + Attributes + ---------- + {{if 'cudaMemcpy3DOperand.type' in found_struct}} + type : cudaMemcpy3DOperandType + + {{endif}} + {{if 'cudaMemcpy3DOperand.op' in found_struct}} + op : anon_union1 + + {{endif}} Methods ------- getPtr() Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DOperand* _val_ptr + cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr + {{if 'cudaMemcpy3DOperand.op' in found_struct}} + cdef anon_union1 _op + {{endif}} +{{endif}} +{{if 'cudaMemcpy3DBatchOp' in found_struct}} +cdef class cudaMemcpy3DBatchOp: """ - cdef cyruntime.cudaMemFreeNodeParams __val - cdef cyruntime.cudaMemFreeNodeParams* _ptr + Attributes + ---------- + {{if 'cudaMemcpy3DBatchOp.src' in found_struct}} + src : cudaMemcpy3DOperand + Source memcpy operand. + {{endif}} + {{if 'cudaMemcpy3DBatchOp.dst' in found_struct}} + dst : cudaMemcpy3DOperand + Destination memcpy operand. + {{endif}} + {{if 'cudaMemcpy3DBatchOp.extent' in found_struct}} + extent : cudaExtent + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + {{endif}} + {{if 'cudaMemcpy3DBatchOp.srcAccessOrder' in found_struct}} + srcAccessOrder : cudaMemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + {{endif}} + {{if 'cudaMemcpy3DBatchOp.flags' in found_struct}} + flags : unsigned int + Additional flags for copy from src to dst. See cudaMemcpyFlags. + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemcpy3DBatchOp _pvt_val + cdef cyruntime.cudaMemcpy3DBatchOp* _pvt_ptr + {{if 'cudaMemcpy3DBatchOp.src' in found_struct}} + cdef cudaMemcpy3DOperand _src + {{endif}} + {{if 'cudaMemcpy3DBatchOp.dst' in found_struct}} + cdef cudaMemcpy3DOperand _dst + {{endif}} + {{if 'cudaMemcpy3DBatchOp.extent' in found_struct}} + cdef cudaExtent _extent + {{endif}} {{endif}} -{{if 'struct CUuuid_st' in found_types}} +{{if 'CUuuid_st' in found_struct}} cdef class CUuuid_st: """ Attributes ---------- + {{if 'CUuuid_st.bytes' in found_struct}} bytes : bytes < CUDA definition of UUID + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.CUuuid_st __val - cdef cyruntime.CUuuid_st* _ptr + cdef cyruntime.CUuuid_st _pvt_val + cdef cyruntime.CUuuid_st* _pvt_ptr {{endif}} -{{if 'struct cudaDeviceProp' in found_types}} +{{if 'cudaDeviceProp' in found_struct}} cdef class cudaDeviceProp: """ @@ -1241,232 +1804,417 @@ cdef class cudaDeviceProp: Attributes ---------- + {{if 'cudaDeviceProp.name' in found_struct}} name : bytes ASCII string identifying device + {{endif}} + {{if 'cudaDeviceProp.uuid' in found_struct}} uuid : cudaUUID_t 16-byte unique identifier + {{endif}} + {{if 'cudaDeviceProp.luid' in found_struct}} luid : bytes 8-byte locally unique identifier. Value is undefined on TCC and non-Windows platforms + {{endif}} + {{if 'cudaDeviceProp.luidDeviceNodeMask' in found_struct}} luidDeviceNodeMask : unsigned int LUID device node mask. Value is undefined on TCC and non-Windows platforms + {{endif}} + {{if 'cudaDeviceProp.totalGlobalMem' in found_struct}} totalGlobalMem : size_t Global memory available on device in bytes + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerBlock' in found_struct}} sharedMemPerBlock : size_t Shared memory available per block in bytes + {{endif}} + {{if 'cudaDeviceProp.regsPerBlock' in found_struct}} regsPerBlock : int 32-bit registers available per block + {{endif}} + {{if 'cudaDeviceProp.warpSize' in found_struct}} warpSize : int Warp size in threads + {{endif}} + {{if 'cudaDeviceProp.memPitch' in found_struct}} memPitch : size_t Maximum pitch in bytes allowed by memory copies + {{endif}} + {{if 'cudaDeviceProp.maxThreadsPerBlock' in found_struct}} maxThreadsPerBlock : int Maximum number of threads per block + {{endif}} + {{if 'cudaDeviceProp.maxThreadsDim' in found_struct}} maxThreadsDim : List[int] Maximum size of each dimension of a block + {{endif}} + {{if 'cudaDeviceProp.maxGridSize' in found_struct}} maxGridSize : List[int] Maximum size of each dimension of a grid + {{endif}} + {{if 'cudaDeviceProp.clockRate' in found_struct}} clockRate : int Deprecated, Clock frequency in kilohertz + {{endif}} + {{if 'cudaDeviceProp.totalConstMem' in found_struct}} totalConstMem : size_t Constant memory available on device in bytes + {{endif}} + {{if 'cudaDeviceProp.major' in found_struct}} major : int Major compute capability + {{endif}} + {{if 'cudaDeviceProp.minor' in found_struct}} minor : int Minor compute capability + {{endif}} + {{if 'cudaDeviceProp.textureAlignment' in found_struct}} textureAlignment : size_t Alignment requirement for textures + {{endif}} + {{if 'cudaDeviceProp.texturePitchAlignment' in found_struct}} texturePitchAlignment : size_t Pitch alignment requirement for texture references bound to pitched memory + {{endif}} + {{if 'cudaDeviceProp.deviceOverlap' in found_struct}} deviceOverlap : int Device can concurrently copy memory and execute a kernel. Deprecated. Use instead asyncEngineCount. + {{endif}} + {{if 'cudaDeviceProp.multiProcessorCount' in found_struct}} multiProcessorCount : int Number of multiprocessors on device + {{endif}} + {{if 'cudaDeviceProp.kernelExecTimeoutEnabled' in found_struct}} kernelExecTimeoutEnabled : int Deprecated, Specified whether there is a run time limit on kernels + {{endif}} + {{if 'cudaDeviceProp.integrated' in found_struct}} integrated : int Device is integrated as opposed to discrete + {{endif}} + {{if 'cudaDeviceProp.canMapHostMemory' in found_struct}} canMapHostMemory : int Device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer + {{endif}} + {{if 'cudaDeviceProp.computeMode' in found_struct}} computeMode : int Deprecated, Compute mode (See cudaComputeMode) + {{endif}} + {{if 'cudaDeviceProp.maxTexture1D' in found_struct}} maxTexture1D : int Maximum 1D texture size + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DMipmap' in found_struct}} maxTexture1DMipmap : int Maximum 1D mipmapped texture size + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DLinear' in found_struct}} maxTexture1DLinear : int Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() or cuDeviceGetTexture1DLinearMaxWidth() instead. + {{endif}} + {{if 'cudaDeviceProp.maxTexture2D' in found_struct}} maxTexture2D : List[int] Maximum 2D texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DMipmap' in found_struct}} maxTexture2DMipmap : List[int] Maximum 2D mipmapped texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DLinear' in found_struct}} maxTexture2DLinear : List[int] Maximum dimensions (width, height, pitch) for 2D textures bound to pitched memory + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DGather' in found_struct}} maxTexture2DGather : List[int] Maximum 2D texture dimensions if texture gather operations have to be performed + {{endif}} + {{if 'cudaDeviceProp.maxTexture3D' in found_struct}} maxTexture3D : List[int] Maximum 3D texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTexture3DAlt' in found_struct}} maxTexture3DAlt : List[int] Maximum alternate 3D texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTextureCubemap' in found_struct}} maxTextureCubemap : int Maximum Cubemap texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DLayered' in found_struct}} maxTexture1DLayered : List[int] Maximum 1D layered texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DLayered' in found_struct}} maxTexture2DLayered : List[int] Maximum 2D layered texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTextureCubemapLayered' in found_struct}} maxTextureCubemapLayered : List[int] Maximum Cubemap layered texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurface1D' in found_struct}} maxSurface1D : int Maximum 1D surface size + {{endif}} + {{if 'cudaDeviceProp.maxSurface2D' in found_struct}} maxSurface2D : List[int] Maximum 2D surface dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurface3D' in found_struct}} maxSurface3D : List[int] Maximum 3D surface dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurface1DLayered' in found_struct}} maxSurface1DLayered : List[int] Maximum 1D layered surface dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurface2DLayered' in found_struct}} maxSurface2DLayered : List[int] Maximum 2D layered surface dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurfaceCubemap' in found_struct}} maxSurfaceCubemap : int Maximum Cubemap surface dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurfaceCubemapLayered' in found_struct}} maxSurfaceCubemapLayered : List[int] Maximum Cubemap layered surface dimensions + {{endif}} + {{if 'cudaDeviceProp.surfaceAlignment' in found_struct}} surfaceAlignment : size_t Alignment requirements for surfaces + {{endif}} + {{if 'cudaDeviceProp.concurrentKernels' in found_struct}} concurrentKernels : int Device can possibly execute multiple kernels concurrently + {{endif}} + {{if 'cudaDeviceProp.ECCEnabled' in found_struct}} ECCEnabled : int Device has ECC support enabled + {{endif}} + {{if 'cudaDeviceProp.pciBusID' in found_struct}} pciBusID : int PCI bus ID of the device + {{endif}} + {{if 'cudaDeviceProp.pciDeviceID' in found_struct}} pciDeviceID : int PCI device ID of the device + {{endif}} + {{if 'cudaDeviceProp.pciDomainID' in found_struct}} pciDomainID : int PCI domain ID of the device + {{endif}} + {{if 'cudaDeviceProp.tccDriver' in found_struct}} tccDriver : int 1 if device is a Tesla device using TCC driver, 0 otherwise + {{endif}} + {{if 'cudaDeviceProp.asyncEngineCount' in found_struct}} asyncEngineCount : int Number of asynchronous engines + {{endif}} + {{if 'cudaDeviceProp.unifiedAddressing' in found_struct}} unifiedAddressing : int Device shares a unified address space with the host + {{endif}} + {{if 'cudaDeviceProp.memoryClockRate' in found_struct}} memoryClockRate : int Deprecated, Peak memory clock frequency in kilohertz + {{endif}} + {{if 'cudaDeviceProp.memoryBusWidth' in found_struct}} memoryBusWidth : int Global memory bus width in bits + {{endif}} + {{if 'cudaDeviceProp.l2CacheSize' in found_struct}} l2CacheSize : int Size of L2 cache in bytes + {{endif}} + {{if 'cudaDeviceProp.persistingL2CacheMaxSize' in found_struct}} persistingL2CacheMaxSize : int Device's maximum l2 persisting lines capacity setting in bytes + {{endif}} + {{if 'cudaDeviceProp.maxThreadsPerMultiProcessor' in found_struct}} maxThreadsPerMultiProcessor : int Maximum resident threads per multiprocessor + {{endif}} + {{if 'cudaDeviceProp.streamPrioritiesSupported' in found_struct}} streamPrioritiesSupported : int Device supports stream priorities + {{endif}} + {{if 'cudaDeviceProp.globalL1CacheSupported' in found_struct}} globalL1CacheSupported : int Device supports caching globals in L1 + {{endif}} + {{if 'cudaDeviceProp.localL1CacheSupported' in found_struct}} localL1CacheSupported : int Device supports caching locals in L1 + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerMultiprocessor' in found_struct}} sharedMemPerMultiprocessor : size_t Shared memory available per multiprocessor in bytes + {{endif}} + {{if 'cudaDeviceProp.regsPerMultiprocessor' in found_struct}} regsPerMultiprocessor : int 32-bit registers available per multiprocessor + {{endif}} + {{if 'cudaDeviceProp.managedMemory' in found_struct}} managedMemory : int Device supports allocating managed memory on this system + {{endif}} + {{if 'cudaDeviceProp.isMultiGpuBoard' in found_struct}} isMultiGpuBoard : int Device is on a multi-GPU board + {{endif}} + {{if 'cudaDeviceProp.multiGpuBoardGroupID' in found_struct}} multiGpuBoardGroupID : int Unique identifier for a group of devices on the same multi-GPU board + {{endif}} + {{if 'cudaDeviceProp.hostNativeAtomicSupported' in found_struct}} hostNativeAtomicSupported : int Link between the device and the host supports native atomic operations + {{endif}} + {{if 'cudaDeviceProp.singleToDoublePrecisionPerfRatio' in found_struct}} singleToDoublePrecisionPerfRatio : int Deprecated, Ratio of single precision performance (in floating- point operations per second) to double precision performance + {{endif}} + {{if 'cudaDeviceProp.pageableMemoryAccess' in found_struct}} pageableMemoryAccess : int Device supports coherently accessing pageable memory without calling cudaHostRegister on it + {{endif}} + {{if 'cudaDeviceProp.concurrentManagedAccess' in found_struct}} concurrentManagedAccess : int Device can coherently access managed memory concurrently with the CPU + {{endif}} + {{if 'cudaDeviceProp.computePreemptionSupported' in found_struct}} computePreemptionSupported : int Device supports Compute Preemption + {{endif}} + {{if 'cudaDeviceProp.canUseHostPointerForRegisteredMem' in found_struct}} canUseHostPointerForRegisteredMem : int Device can access host registered memory at the same virtual address as the CPU + {{endif}} + {{if 'cudaDeviceProp.cooperativeLaunch' in found_struct}} cooperativeLaunch : int Device supports launching cooperative kernels via cudaLaunchCooperativeKernel + {{endif}} + {{if 'cudaDeviceProp.cooperativeMultiDeviceLaunch' in found_struct}} cooperativeMultiDeviceLaunch : int Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated. + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerBlockOptin' in found_struct}} sharedMemPerBlockOptin : size_t Per device maximum shared memory per block usable by special opt in + {{endif}} + {{if 'cudaDeviceProp.pageableMemoryAccessUsesHostPageTables' in found_struct}} pageableMemoryAccessUsesHostPageTables : int Device accesses pageable memory via the host's page tables + {{endif}} + {{if 'cudaDeviceProp.directManagedMemAccessFromHost' in found_struct}} directManagedMemAccessFromHost : int Host can directly access managed memory on the device without migration. + {{endif}} + {{if 'cudaDeviceProp.maxBlocksPerMultiProcessor' in found_struct}} maxBlocksPerMultiProcessor : int Maximum number of resident blocks per multiprocessor + {{endif}} + {{if 'cudaDeviceProp.accessPolicyMaxWindowSize' in found_struct}} accessPolicyMaxWindowSize : int The maximum value of cudaAccessPolicyWindow::num_bytes. + {{endif}} + {{if 'cudaDeviceProp.reservedSharedMemPerBlock' in found_struct}} reservedSharedMemPerBlock : size_t Shared memory reserved by CUDA driver per block in bytes + {{endif}} + {{if 'cudaDeviceProp.hostRegisterSupported' in found_struct}} hostRegisterSupported : int Device supports host memory registration via cudaHostRegister. + {{endif}} + {{if 'cudaDeviceProp.sparseCudaArraySupported' in found_struct}} sparseCudaArraySupported : int 1 if the device supports sparse CUDA arrays and sparse CUDA mipmapped arrays, 0 otherwise + {{endif}} + {{if 'cudaDeviceProp.hostRegisterReadOnlySupported' in found_struct}} hostRegisterReadOnlySupported : int Device supports using the cudaHostRegister flag cudaHostRegisterReadOnly to register memory that must be mapped as read-only to the GPU + {{endif}} + {{if 'cudaDeviceProp.timelineSemaphoreInteropSupported' in found_struct}} timelineSemaphoreInteropSupported : int External timeline semaphore interop is supported on the device + {{endif}} + {{if 'cudaDeviceProp.memoryPoolsSupported' in found_struct}} memoryPoolsSupported : int 1 if the device supports using the cudaMallocAsync and cudaMemPool family of APIs, 0 otherwise + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMASupported' in found_struct}} gpuDirectRDMASupported : int 1 if the device supports GPUDirect RDMA APIs, 0 otherwise + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMAFlushWritesOptions' in found_struct}} gpuDirectRDMAFlushWritesOptions : unsigned int Bitmask to be interpreted according to the cudaFlushGPUDirectRDMAWritesOptions enum + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMAWritesOrdering' in found_struct}} gpuDirectRDMAWritesOrdering : int See the cudaGPUDirectRDMAWritesOrdering enum for numerical values + {{endif}} + {{if 'cudaDeviceProp.memoryPoolSupportedHandleTypes' in found_struct}} memoryPoolSupportedHandleTypes : unsigned int Bitmask of handle types supported with mempool-based IPC + {{endif}} + {{if 'cudaDeviceProp.deferredMappingCudaArraySupported' in found_struct}} deferredMappingCudaArraySupported : int 1 if the device supports deferred mapping CUDA arrays and CUDA mipmapped arrays + {{endif}} + {{if 'cudaDeviceProp.ipcEventSupported' in found_struct}} ipcEventSupported : int Device supports IPC Events. + {{endif}} + {{if 'cudaDeviceProp.clusterLaunch' in found_struct}} clusterLaunch : int Indicates device supports cluster launch + {{endif}} + {{if 'cudaDeviceProp.unifiedFunctionPointers' in found_struct}} unifiedFunctionPointers : int Indicates device supports unified pointers - reserved2 : List[int] - - reserved1 : List[int] - Reserved for future use + {{endif}} + {{if 'cudaDeviceProp.reserved' in found_struct}} reserved : List[int] Reserved for future use + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaDeviceProp __val - cdef cyruntime.cudaDeviceProp* _ptr + cdef cyruntime.cudaDeviceProp _pvt_val + cdef cyruntime.cudaDeviceProp* _pvt_ptr + {{if 'cudaDeviceProp.uuid' in found_struct}} cdef cudaUUID_t _uuid + {{endif}} {{endif}} -{{if 'struct cudaIpcEventHandle_st' in found_types}} +{{if 'cudaIpcEventHandle_st' in found_struct}} cdef class cudaIpcEventHandle_st: """ @@ -1474,19 +2222,20 @@ cdef class cudaIpcEventHandle_st: Attributes ---------- + {{if 'cudaIpcEventHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaIpcEventHandle_st __val - cdef cyruntime.cudaIpcEventHandle_st* _ptr + cdef cyruntime.cudaIpcEventHandle_st _pvt_val + cdef cyruntime.cudaIpcEventHandle_st* _pvt_ptr {{endif}} -{{if 'struct cudaIpcMemHandle_st' in found_types}} +{{if 'cudaIpcMemHandle_st' in found_struct}} cdef class cudaIpcMemHandle_st: """ @@ -1494,78 +2243,90 @@ cdef class cudaIpcMemHandle_st: Attributes ---------- + {{if 'cudaIpcMemHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaIpcMemHandle_st __val - cdef cyruntime.cudaIpcMemHandle_st* _ptr + cdef cyruntime.cudaIpcMemHandle_st _pvt_val + cdef cyruntime.cudaIpcMemHandle_st* _pvt_ptr {{endif}} -{{if 'struct cudaMemFabricHandle_st' in found_types}} +{{if 'cudaMemFabricHandle_st' in found_struct}} cdef class cudaMemFabricHandle_st: """ Attributes ---------- + {{if 'cudaMemFabricHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaMemFabricHandle_st __val - cdef cyruntime.cudaMemFabricHandle_st* _ptr + cdef cyruntime.cudaMemFabricHandle_st _pvt_val + cdef cyruntime.cudaMemFabricHandle_st* _pvt_ptr {{endif}} -{{if 'struct cudaExternalMemoryHandleDesc' in found_types}} +{{if 'cudaExternalMemoryHandleDesc.handle.win32' in found_struct}} -cdef class anon_struct5: +cdef class anon_struct7: """ Attributes ---------- + {{if 'cudaExternalMemoryHandleDesc.handle.win32.handle' in found_struct}} handle : Any + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.win32.name' in found_struct}} name : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalMemoryHandleDesc* _ptr + cdef cyruntime.cudaExternalMemoryHandleDesc* _pvt_ptr {{endif}} -{{if 'struct cudaExternalMemoryHandleDesc' in found_types}} +{{if 'cudaExternalMemoryHandleDesc.handle' in found_struct}} -cdef class anon_union1: +cdef class anon_union2: """ Attributes ---------- + {{if 'cudaExternalMemoryHandleDesc.handle.fd' in found_struct}} fd : int - win32 : anon_struct5 + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.win32' in found_struct}} + win32 : anon_struct7 + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.nvSciBufObject' in found_struct}} nvSciBufObject : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalMemoryHandleDesc* _ptr - cdef anon_struct5 _win32 + cdef cyruntime.cudaExternalMemoryHandleDesc* _pvt_ptr + {{if 'cudaExternalMemoryHandleDesc.handle.win32' in found_struct}} + cdef anon_struct7 _win32 + {{endif}} {{endif}} -{{if 'struct cudaExternalMemoryHandleDesc' in found_types}} +{{if 'cudaExternalMemoryHandleDesc' in found_struct}} cdef class cudaExternalMemoryHandleDesc: """ @@ -1573,26 +2334,35 @@ cdef class cudaExternalMemoryHandleDesc: Attributes ---------- + {{if 'cudaExternalMemoryHandleDesc.type' in found_struct}} type : cudaExternalMemoryHandleType Type of the handle - handle : anon_union1 + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle' in found_struct}} + handle : anon_union2 + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.size' in found_struct}} size : unsigned long long Size of the memory allocation + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.flags' in found_struct}} flags : unsigned int Flags must either be zero or cudaExternalMemoryDedicated + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cyruntime.cudaExternalMemoryHandleDesc* _val_ptr - cdef cyruntime.cudaExternalMemoryHandleDesc* _ptr - cdef anon_union1 _handle + cdef cyruntime.cudaExternalMemoryHandleDesc* _pvt_ptr + {{if 'cudaExternalMemoryHandleDesc.handle' in found_struct}} + cdef anon_union2 _handle + {{endif}} {{endif}} -{{if 'struct cudaExternalMemoryBufferDesc' in found_types}} +{{if 'cudaExternalMemoryBufferDesc' in found_struct}} cdef class cudaExternalMemoryBufferDesc: """ @@ -1600,23 +2370,28 @@ cdef class cudaExternalMemoryBufferDesc: Attributes ---------- + {{if 'cudaExternalMemoryBufferDesc.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the buffer's base is + {{endif}} + {{if 'cudaExternalMemoryBufferDesc.size' in found_struct}} size : unsigned long long Size of the buffer + {{endif}} + {{if 'cudaExternalMemoryBufferDesc.flags' in found_struct}} flags : unsigned int Flags reserved for future use. Must be zero. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalMemoryBufferDesc __val - cdef cyruntime.cudaExternalMemoryBufferDesc* _ptr + cdef cyruntime.cudaExternalMemoryBufferDesc _pvt_val + cdef cyruntime.cudaExternalMemoryBufferDesc* _pvt_ptr {{endif}} -{{if 'struct cudaExternalMemoryMipmappedArrayDesc' in found_types}} +{{if 'cudaExternalMemoryMipmappedArrayDesc' in found_struct}} cdef class cudaExternalMemoryMipmappedArrayDesc: """ @@ -1624,72 +2399,95 @@ cdef class cudaExternalMemoryMipmappedArrayDesc: Attributes ---------- + {{if 'cudaExternalMemoryMipmappedArrayDesc.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the base level of the mipmap chain is. + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.formatDesc' in found_struct}} formatDesc : cudaChannelFormatDesc Format of base level of the mipmap chain + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.extent' in found_struct}} extent : cudaExtent Dimensions of base level of the mipmap chain + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.flags' in found_struct}} flags : unsigned int Flags associated with CUDA mipmapped arrays. See cudaMallocMipmappedArray + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.numLevels' in found_struct}} numLevels : unsigned int Total number of levels in the mipmap chain + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc __val - cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc* _ptr + cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc _pvt_val + cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc* _pvt_ptr + {{if 'cudaExternalMemoryMipmappedArrayDesc.formatDesc' in found_struct}} cdef cudaChannelFormatDesc _formatDesc + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.extent' in found_struct}} cdef cudaExtent _extent + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreHandleDesc' in found_types}} +{{if 'cudaExternalSemaphoreHandleDesc.handle.win32' in found_struct}} -cdef class anon_struct6: +cdef class anon_struct8: """ Attributes ---------- + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32.handle' in found_struct}} handle : Any + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32.name' in found_struct}} name : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreHandleDesc* _ptr + cdef cyruntime.cudaExternalSemaphoreHandleDesc* _pvt_ptr {{endif}} -{{if 'struct cudaExternalSemaphoreHandleDesc' in found_types}} +{{if 'cudaExternalSemaphoreHandleDesc.handle' in found_struct}} -cdef class anon_union2: +cdef class anon_union3: """ Attributes ---------- + {{if 'cudaExternalSemaphoreHandleDesc.handle.fd' in found_struct}} fd : int - win32 : anon_struct6 + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32' in found_struct}} + win32 : anon_struct8 + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.nvSciSyncObj' in found_struct}} nvSciSyncObj : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreHandleDesc* _ptr - cdef anon_struct6 _win32 + cdef cyruntime.cudaExternalSemaphoreHandleDesc* _pvt_ptr + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32' in found_struct}} + cdef anon_struct8 _win32 + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreHandleDesc' in found_types}} +{{if 'cudaExternalSemaphoreHandleDesc' in found_struct}} cdef class cudaExternalSemaphoreHandleDesc: """ @@ -1697,103 +2495,128 @@ cdef class cudaExternalSemaphoreHandleDesc: Attributes ---------- + {{if 'cudaExternalSemaphoreHandleDesc.type' in found_struct}} type : cudaExternalSemaphoreHandleType Type of the handle - handle : anon_union2 + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle' in found_struct}} + handle : anon_union3 + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.flags' in found_struct}} flags : unsigned int Flags reserved for the future. Must be zero. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cyruntime.cudaExternalSemaphoreHandleDesc* _val_ptr - cdef cyruntime.cudaExternalSemaphoreHandleDesc* _ptr - cdef anon_union2 _handle + cdef cyruntime.cudaExternalSemaphoreHandleDesc* _pvt_ptr + {{if 'cudaExternalSemaphoreHandleDesc.handle' in found_struct}} + cdef anon_union3 _handle + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreSignalParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalParams.params.fence' in found_struct}} -cdef class anon_struct13: +cdef class anon_struct15: """ Attributes ---------- + {{if 'cudaExternalSemaphoreSignalParams.params.fence.value' in found_struct}} value : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreSignalParams* _ptr + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr {{endif}} -{{if 'struct cudaExternalSemaphoreSignalParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync' in found_struct}} -cdef class anon_union5: +cdef class anon_union6: """ Attributes ---------- + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync.fence' in found_struct}} fence : Any + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync.reserved' in found_struct}} reserved : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreSignalParams* _ptr + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr {{endif}} -{{if 'struct cudaExternalSemaphoreSignalParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex' in found_struct}} -cdef class anon_struct14: +cdef class anon_struct16: """ Attributes ---------- + {{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex.key' in found_struct}} key : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreSignalParams* _ptr + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr {{endif}} -{{if 'struct cudaExternalSemaphoreSignalParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalParams.params' in found_struct}} -cdef class anon_struct15: +cdef class anon_struct17: """ Attributes ---------- - fence : anon_struct13 + {{if 'cudaExternalSemaphoreSignalParams.params.fence' in found_struct}} + fence : anon_struct15 - nvSciSync : anon_union5 + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync' in found_struct}} + nvSciSync : anon_union6 - keyedMutex : anon_struct14 + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex' in found_struct}} + keyedMutex : anon_struct16 + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreSignalParams* _ptr - cdef anon_struct13 _fence - cdef anon_union5 _nvSciSync - cdef anon_struct14 _keyedMutex + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + {{if 'cudaExternalSemaphoreSignalParams.params.fence' in found_struct}} + cdef anon_struct15 _fence + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync' in found_struct}} + cdef anon_union6 _nvSciSync + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex' in found_struct}} + cdef anon_struct16 _keyedMutex + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreSignalParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalParams' in found_struct}} cdef class cudaExternalSemaphoreSignalParams: """ @@ -1801,8 +2624,11 @@ cdef class cudaExternalSemaphoreSignalParams: Attributes ---------- - params : anon_struct15 + {{if 'cudaExternalSemaphoreSignalParams.params' in found_struct}} + params : anon_struct17 + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.flags' in found_struct}} flags : unsigned int Only when cudaExternalSemaphoreSignalParams is used to signal a cudaExternalSemaphore_t of type @@ -1812,101 +2638,125 @@ cdef class cudaExternalSemaphoreSignalParams: synchronization operations should be performed for any external memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For all other types of cudaExternalSemaphore_t, flags must be zero. + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreSignalParams __val - cdef cyruntime.cudaExternalSemaphoreSignalParams* _ptr - cdef anon_struct15 _params + cdef cyruntime.cudaExternalSemaphoreSignalParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr + {{if 'cudaExternalSemaphoreSignalParams.params' in found_struct}} + cdef anon_struct17 _params + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreWaitParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitParams.params.fence' in found_struct}} -cdef class anon_struct16: +cdef class anon_struct18: """ Attributes ---------- + {{if 'cudaExternalSemaphoreWaitParams.params.fence.value' in found_struct}} value : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreWaitParams* _ptr + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr {{endif}} -{{if 'struct cudaExternalSemaphoreWaitParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync' in found_struct}} -cdef class anon_union6: +cdef class anon_union7: """ Attributes ---------- + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync.fence' in found_struct}} fence : Any + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync.reserved' in found_struct}} reserved : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreWaitParams* _ptr + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr {{endif}} -{{if 'struct cudaExternalSemaphoreWaitParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex' in found_struct}} -cdef class anon_struct17: +cdef class anon_struct19: """ Attributes ---------- + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex.key' in found_struct}} key : unsigned long long + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex.timeoutMs' in found_struct}} timeoutMs : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreWaitParams* _ptr + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr {{endif}} -{{if 'struct cudaExternalSemaphoreWaitParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitParams.params' in found_struct}} -cdef class anon_struct18: +cdef class anon_struct20: """ Attributes ---------- - fence : anon_struct16 + {{if 'cudaExternalSemaphoreWaitParams.params.fence' in found_struct}} + fence : anon_struct18 - nvSciSync : anon_union6 + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync' in found_struct}} + nvSciSync : anon_union7 - keyedMutex : anon_struct17 + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex' in found_struct}} + keyedMutex : anon_struct19 + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreWaitParams* _ptr - cdef anon_struct16 _fence - cdef anon_union6 _nvSciSync - cdef anon_struct17 _keyedMutex + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + {{if 'cudaExternalSemaphoreWaitParams.params.fence' in found_struct}} + cdef anon_struct18 _fence + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync' in found_struct}} + cdef anon_union7 _nvSciSync + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex' in found_struct}} + cdef anon_struct19 _keyedMutex + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreWaitParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitParams' in found_struct}} cdef class cudaExternalSemaphoreWaitParams: """ @@ -1914,8 +2764,11 @@ cdef class cudaExternalSemaphoreWaitParams: Attributes ---------- - params : anon_struct18 + {{if 'cudaExternalSemaphoreWaitParams.params' in found_struct}} + params : anon_struct20 + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.flags' in found_struct}} flags : unsigned int Only when cudaExternalSemaphoreSignalParams is used to signal a cudaExternalSemaphore_t of type @@ -1925,20 +2778,55 @@ cdef class cudaExternalSemaphoreWaitParams: synchronization operations should be performed for any external memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For all other types of cudaExternalSemaphore_t, flags must be zero. + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance + """ + cdef cyruntime.cudaExternalSemaphoreWaitParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr + {{if 'cudaExternalSemaphoreWaitParams.params' in found_struct}} + cdef anon_struct20 _params + {{endif}} +{{endif}} +{{if 'cudalibraryHostUniversalFunctionAndDataTable' in found_struct}} + +cdef class cudalibraryHostUniversalFunctionAndDataTable: + """ + Attributes + ---------- + {{if 'cudalibraryHostUniversalFunctionAndDataTable.functionTable' in found_struct}} + functionTable : Any + + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.functionWindowSize' in found_struct}} + functionWindowSize : size_t + + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.dataTable' in found_struct}} + dataTable : Any + + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.dataWindowSize' in found_struct}} + dataWindowSize : size_t + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance """ - cdef cyruntime.cudaExternalSemaphoreWaitParams __val - cdef cyruntime.cudaExternalSemaphoreWaitParams* _ptr - cdef anon_struct18 _params + cdef cyruntime.cudalibraryHostUniversalFunctionAndDataTable _pvt_val + cdef cyruntime.cudalibraryHostUniversalFunctionAndDataTable* _pvt_ptr {{endif}} -{{if 'struct cudaKernelNodeParams' in found_types}} +{{if 'cudaKernelNodeParams' in found_struct}} cdef class cudaKernelNodeParams: """ @@ -1946,32 +2834,49 @@ cdef class cudaKernelNodeParams: Attributes ---------- + {{if 'cudaKernelNodeParams.func' in found_struct}} func : Any Kernel to launch + {{endif}} + {{if 'cudaKernelNodeParams.gridDim' in found_struct}} gridDim : dim3 Grid dimensions + {{endif}} + {{if 'cudaKernelNodeParams.blockDim' in found_struct}} blockDim : dim3 Block dimensions + {{endif}} + {{if 'cudaKernelNodeParams.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'cudaKernelNodeParams.kernelParams' in found_struct}} kernelParams : Any Array of pointers to individual kernel arguments + {{endif}} + {{if 'cudaKernelNodeParams.extra' in found_struct}} extra : Any Pointer to kernel arguments in the "extra" format + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaKernelNodeParams __val - cdef cyruntime.cudaKernelNodeParams* _ptr + cdef cyruntime.cudaKernelNodeParams _pvt_val + cdef cyruntime.cudaKernelNodeParams* _pvt_ptr + {{if 'cudaKernelNodeParams.gridDim' in found_struct}} cdef dim3 _gridDim + {{endif}} + {{if 'cudaKernelNodeParams.blockDim' in found_struct}} cdef dim3 _blockDim + {{endif}} + {{if 'cudaKernelNodeParams.kernelParams' in found_struct}} cdef utils.HelperKernelParams _cykernelParams + {{endif}} {{endif}} -{{if 'struct cudaKernelNodeParamsV2' in found_types}} +{{if 'cudaKernelNodeParamsV2' in found_struct}} cdef class cudaKernelNodeParamsV2: """ @@ -1979,32 +2884,49 @@ cdef class cudaKernelNodeParamsV2: Attributes ---------- + {{if 'cudaKernelNodeParamsV2.func' in found_struct}} func : Any Kernel to launch + {{endif}} + {{if 'cudaKernelNodeParamsV2.gridDim' in found_struct}} gridDim : dim3 Grid dimensions + {{endif}} + {{if 'cudaKernelNodeParamsV2.blockDim' in found_struct}} blockDim : dim3 Block dimensions + {{endif}} + {{if 'cudaKernelNodeParamsV2.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'cudaKernelNodeParamsV2.kernelParams' in found_struct}} kernelParams : Any Array of pointers to individual kernel arguments + {{endif}} + {{if 'cudaKernelNodeParamsV2.extra' in found_struct}} extra : Any Pointer to kernel arguments in the "extra" format + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaKernelNodeParamsV2 __val - cdef cyruntime.cudaKernelNodeParamsV2* _ptr + cdef cyruntime.cudaKernelNodeParamsV2 _pvt_val + cdef cyruntime.cudaKernelNodeParamsV2* _pvt_ptr + {{if 'cudaKernelNodeParamsV2.gridDim' in found_struct}} cdef dim3 _gridDim + {{endif}} + {{if 'cudaKernelNodeParamsV2.blockDim' in found_struct}} cdef dim3 _blockDim + {{endif}} + {{if 'cudaKernelNodeParamsV2.kernelParams' in found_struct}} cdef utils.HelperKernelParams _cykernelParams + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreSignalNodeParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalNodeParams' in found_struct}} cdef class cudaExternalSemaphoreSignalNodeParams: """ @@ -2012,30 +2934,37 @@ cdef class cudaExternalSemaphoreSignalNodeParams: Attributes ---------- + {{if 'cudaExternalSemaphoreSignalNodeParams.extSemArray' in found_struct}} extSemArray : cudaExternalSemaphore_t Array of external semaphore handles. + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParams.paramsArray' in found_struct}} paramsArray : cudaExternalSemaphoreSignalParams Array of external semaphore signal parameters. + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParams.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreSignalNodeParams __val - cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* _ptr + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* _pvt_ptr + {{if 'cudaExternalSemaphoreSignalNodeParams.extSemArray' in found_struct}} cdef size_t _extSemArray_length cdef cyruntime.cudaExternalSemaphore_t* _extSemArray - + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParams.paramsArray' in found_struct}} cdef size_t _paramsArray_length cdef cyruntime.cudaExternalSemaphoreSignalParams* _paramsArray - + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreSignalNodeParamsV2' in found_types}} +{{if 'cudaExternalSemaphoreSignalNodeParamsV2' in found_struct}} cdef class cudaExternalSemaphoreSignalNodeParamsV2: """ @@ -2043,30 +2972,37 @@ cdef class cudaExternalSemaphoreSignalNodeParamsV2: Attributes ---------- + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.extSemArray' in found_struct}} extSemArray : cudaExternalSemaphore_t Array of external semaphore handles. + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.paramsArray' in found_struct}} paramsArray : cudaExternalSemaphoreSignalParams Array of external semaphore signal parameters. + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreSignalNodeParamsV2 __val - cdef cyruntime.cudaExternalSemaphoreSignalNodeParamsV2* _ptr + cdef cyruntime.cudaExternalSemaphoreSignalNodeParamsV2 _pvt_val + cdef cyruntime.cudaExternalSemaphoreSignalNodeParamsV2* _pvt_ptr + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.extSemArray' in found_struct}} cdef size_t _extSemArray_length cdef cyruntime.cudaExternalSemaphore_t* _extSemArray - + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.paramsArray' in found_struct}} cdef size_t _paramsArray_length cdef cyruntime.cudaExternalSemaphoreSignalParams* _paramsArray - + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreWaitNodeParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitNodeParams' in found_struct}} cdef class cudaExternalSemaphoreWaitNodeParams: """ @@ -2074,30 +3010,37 @@ cdef class cudaExternalSemaphoreWaitNodeParams: Attributes ---------- + {{if 'cudaExternalSemaphoreWaitNodeParams.extSemArray' in found_struct}} extSemArray : cudaExternalSemaphore_t Array of external semaphore handles. + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParams.paramsArray' in found_struct}} paramsArray : cudaExternalSemaphoreWaitParams Array of external semaphore wait parameters. + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParams.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreWaitNodeParams __val - cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* _ptr + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams _pvt_val + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* _pvt_ptr + {{if 'cudaExternalSemaphoreWaitNodeParams.extSemArray' in found_struct}} cdef size_t _extSemArray_length cdef cyruntime.cudaExternalSemaphore_t* _extSemArray - + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParams.paramsArray' in found_struct}} cdef size_t _paramsArray_length cdef cyruntime.cudaExternalSemaphoreWaitParams* _paramsArray - + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreWaitNodeParamsV2' in found_types}} +{{if 'cudaExternalSemaphoreWaitNodeParamsV2' in found_struct}} cdef class cudaExternalSemaphoreWaitNodeParamsV2: """ @@ -2105,30 +3048,37 @@ cdef class cudaExternalSemaphoreWaitNodeParamsV2: Attributes ---------- + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.extSemArray' in found_struct}} extSemArray : cudaExternalSemaphore_t Array of external semaphore handles. + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.paramsArray' in found_struct}} paramsArray : cudaExternalSemaphoreWaitParams Array of external semaphore wait parameters. + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaExternalSemaphoreWaitNodeParamsV2 __val - cdef cyruntime.cudaExternalSemaphoreWaitNodeParamsV2* _ptr + cdef cyruntime.cudaExternalSemaphoreWaitNodeParamsV2 _pvt_val + cdef cyruntime.cudaExternalSemaphoreWaitNodeParamsV2* _pvt_ptr + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.extSemArray' in found_struct}} cdef size_t _extSemArray_length cdef cyruntime.cudaExternalSemaphore_t* _extSemArray - + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.paramsArray' in found_struct}} cdef size_t _paramsArray_length cdef cyruntime.cudaExternalSemaphoreWaitParams* _paramsArray - + {{endif}} {{endif}} -{{if 'struct cudaConditionalNodeParams' in found_types}} +{{if 'cudaConditionalNodeParams' in found_struct}} cdef class cudaConditionalNodeParams: """ @@ -2136,13 +3086,22 @@ cdef class cudaConditionalNodeParams: Attributes ---------- + {{if 'cudaConditionalNodeParams.handle' in found_struct}} handle : cudaGraphConditionalHandle Conditional node handle. Handles must be created in advance of creating the node using cudaGraphConditionalHandleCreate. + {{endif}} + {{if 'cudaConditionalNodeParams.type' in found_struct}} type : cudaGraphConditionalNodeType Type of conditional node. + {{endif}} + {{if 'cudaConditionalNodeParams.size' in found_struct}} size : unsigned int - Size of graph output array. Must be 1. + Size of graph output array. Allowed values are 1 for + cudaGraphCondTypeWhile, 1 or 2 for cudaGraphCondTypeWhile, or any + value greater than zero for cudaGraphCondTypeSwitch. + {{endif}} + {{if 'cudaConditionalNodeParams.phGraph_out' in found_struct}} phGraph_out : cudaGraph_t CUDA-owned array populated with conditional node child graphs during creation of the node. Valid for the lifetime of the @@ -2153,22 +3112,31 @@ cdef class cudaConditionalNodeParams: - All kernels, including kernels in nested conditionals or child graphs at any level, must belong to the same CUDA context. These graphs may be populated using graph node creation APIs or - cudaStreamBeginCaptureToGraph. + cudaStreamBeginCaptureToGraph. cudaGraphCondTypeIf: phGraph_out[0] + is executed when the condition is non-zero. If `size` == 2, + phGraph_out[1] will be executed when the condition is zero. + cudaGraphCondTypeWhile: phGraph_out[0] is executed as long as the + condition is non-zero. cudaGraphCondTypeSwitch: phGraph_out[n] is + executed when the condition is equal to n. If the condition >= + `size`, no body graph is executed. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaConditionalNodeParams __val - cdef cyruntime.cudaConditionalNodeParams* _ptr + cdef cyruntime.cudaConditionalNodeParams _pvt_val + cdef cyruntime.cudaConditionalNodeParams* _pvt_ptr + {{if 'cudaConditionalNodeParams.handle' in found_struct}} cdef cudaGraphConditionalHandle _handle + {{endif}} + {{if 'cudaConditionalNodeParams.phGraph_out' in found_struct}} cdef size_t _phGraph_out_length cdef cyruntime.cudaGraph_t* _phGraph_out - + {{endif}} {{endif}} -{{if 'struct cudaChildGraphNodeParams' in found_types}} +{{if 'cudaChildGraphNodeParams' in found_struct}} cdef class cudaChildGraphNodeParams: """ @@ -2176,21 +3144,24 @@ cdef class cudaChildGraphNodeParams: Attributes ---------- + {{if 'cudaChildGraphNodeParams.graph' in found_struct}} graph : cudaGraph_t The child graph to clone into the node for node creation, or a handle to the graph owned by the node for node query + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaChildGraphNodeParams __val - cdef cyruntime.cudaChildGraphNodeParams* _ptr + cdef cyruntime.cudaChildGraphNodeParams _pvt_val + cdef cyruntime.cudaChildGraphNodeParams* _pvt_ptr + {{if 'cudaChildGraphNodeParams.graph' in found_struct}} cdef cudaGraph_t _graph + {{endif}} {{endif}} -{{if 'struct cudaEventRecordNodeParams' in found_types}} +{{if 'cudaEventRecordNodeParams' in found_struct}} cdef class cudaEventRecordNodeParams: """ @@ -2198,20 +3169,23 @@ cdef class cudaEventRecordNodeParams: Attributes ---------- + {{if 'cudaEventRecordNodeParams.event' in found_struct}} event : cudaEvent_t The event to record when the node executes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaEventRecordNodeParams __val - cdef cyruntime.cudaEventRecordNodeParams* _ptr + cdef cyruntime.cudaEventRecordNodeParams _pvt_val + cdef cyruntime.cudaEventRecordNodeParams* _pvt_ptr + {{if 'cudaEventRecordNodeParams.event' in found_struct}} cdef cudaEvent_t _event + {{endif}} {{endif}} -{{if 'struct cudaEventWaitNodeParams' in found_types}} +{{if 'cudaEventWaitNodeParams' in found_struct}} cdef class cudaEventWaitNodeParams: """ @@ -2219,20 +3193,23 @@ cdef class cudaEventWaitNodeParams: Attributes ---------- + {{if 'cudaEventWaitNodeParams.event' in found_struct}} event : cudaEvent_t The event to wait on from the node + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaEventWaitNodeParams __val - cdef cyruntime.cudaEventWaitNodeParams* _ptr + cdef cyruntime.cudaEventWaitNodeParams _pvt_val + cdef cyruntime.cudaEventWaitNodeParams* _pvt_ptr + {{if 'cudaEventWaitNodeParams.event' in found_struct}} cdef cudaEvent_t _event + {{endif}} {{endif}} -{{if 'struct cudaGraphNodeParams' in found_types}} +{{if 'cudaGraphNodeParams' in found_struct}} cdef class cudaGraphNodeParams: """ @@ -2240,61 +3217,116 @@ cdef class cudaGraphNodeParams: Attributes ---------- + {{if 'cudaGraphNodeParams.type' in found_struct}} type : cudaGraphNodeType Type of the node + {{endif}} + {{if 'cudaGraphNodeParams.reserved0' in found_struct}} reserved0 : List[int] Reserved. Must be zero. + {{endif}} + {{if 'cudaGraphNodeParams.reserved1' in found_struct}} reserved1 : List[long long] Padding. Unused bytes must be zero. + {{endif}} + {{if 'cudaGraphNodeParams.kernel' in found_struct}} kernel : cudaKernelNodeParamsV2 Kernel node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.memcpy' in found_struct}} memcpy : cudaMemcpyNodeParams Memcpy node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.memset' in found_struct}} memset : cudaMemsetParamsV2 Memset node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.host' in found_struct}} host : cudaHostNodeParamsV2 Host node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.graph' in found_struct}} graph : cudaChildGraphNodeParams Child graph node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.eventWait' in found_struct}} eventWait : cudaEventWaitNodeParams Event wait node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.eventRecord' in found_struct}} eventRecord : cudaEventRecordNodeParams Event record node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.extSemSignal' in found_struct}} extSemSignal : cudaExternalSemaphoreSignalNodeParamsV2 External semaphore signal node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.extSemWait' in found_struct}} extSemWait : cudaExternalSemaphoreWaitNodeParamsV2 External semaphore wait node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.alloc' in found_struct}} alloc : cudaMemAllocNodeParamsV2 Memory allocation node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.free' in found_struct}} free : cudaMemFreeNodeParams Memory free node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.conditional' in found_struct}} conditional : cudaConditionalNodeParams Conditional node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.reserved2' in found_struct}} reserved2 : long long Reserved bytes. Must be zero. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cyruntime.cudaGraphNodeParams* _val_ptr - cdef cyruntime.cudaGraphNodeParams* _ptr + cdef cyruntime.cudaGraphNodeParams* _pvt_ptr + {{if 'cudaGraphNodeParams.kernel' in found_struct}} cdef cudaKernelNodeParamsV2 _kernel + {{endif}} + {{if 'cudaGraphNodeParams.memcpy' in found_struct}} cdef cudaMemcpyNodeParams _memcpy + {{endif}} + {{if 'cudaGraphNodeParams.memset' in found_struct}} cdef cudaMemsetParamsV2 _memset + {{endif}} + {{if 'cudaGraphNodeParams.host' in found_struct}} cdef cudaHostNodeParamsV2 _host + {{endif}} + {{if 'cudaGraphNodeParams.graph' in found_struct}} cdef cudaChildGraphNodeParams _graph + {{endif}} + {{if 'cudaGraphNodeParams.eventWait' in found_struct}} cdef cudaEventWaitNodeParams _eventWait + {{endif}} + {{if 'cudaGraphNodeParams.eventRecord' in found_struct}} cdef cudaEventRecordNodeParams _eventRecord + {{endif}} + {{if 'cudaGraphNodeParams.extSemSignal' in found_struct}} cdef cudaExternalSemaphoreSignalNodeParamsV2 _extSemSignal + {{endif}} + {{if 'cudaGraphNodeParams.extSemWait' in found_struct}} cdef cudaExternalSemaphoreWaitNodeParamsV2 _extSemWait + {{endif}} + {{if 'cudaGraphNodeParams.alloc' in found_struct}} cdef cudaMemAllocNodeParamsV2 _alloc + {{endif}} + {{if 'cudaGraphNodeParams.free' in found_struct}} cdef cudaMemFreeNodeParams _free + {{endif}} + {{if 'cudaGraphNodeParams.conditional' in found_struct}} cdef cudaConditionalNodeParams _conditional + {{endif}} {{endif}} -{{if 'struct cudaGraphEdgeData_st' in found_types}} +{{if 'cudaGraphEdgeData_st' in found_struct}} cdef class cudaGraphEdgeData_st: """ @@ -2305,6 +3337,7 @@ cdef class cudaGraphEdgeData_st: Attributes ---------- + {{if 'cudaGraphEdgeData_st.from_port' in found_struct}} from_port : bytes This indicates when the dependency is triggered from the upstream node on the edge. The meaning is specfic to the node type. A value @@ -2315,6 +3348,8 @@ cdef class cudaGraphEdgeData_st: cudaGraphKernelNodePortDefault, cudaGraphKernelNodePortProgrammatic, or cudaGraphKernelNodePortLaunchCompletion. + {{endif}} + {{if 'cudaGraphEdgeData_st.to_port' in found_struct}} to_port : bytes This indicates what portion of the downstream node is dependent on the upstream node or portion thereof (indicated by `from_port`). @@ -2322,24 +3357,28 @@ cdef class cudaGraphEdgeData_st: means the entirety of the downstream node is dependent on the upstream work. Currently no node types define non-zero ports. Accordingly, this field must be set to zero. + {{endif}} + {{if 'cudaGraphEdgeData_st.type' in found_struct}} type : bytes This should be populated with a value from ::cudaGraphDependencyType. (It is typed as char due to compiler- specific layout of bitfields.) See ::cudaGraphDependencyType. + {{endif}} + {{if 'cudaGraphEdgeData_st.reserved' in found_struct}} reserved : bytes These bytes are unused and must be zeroed. This ensures compatibility if additional fields are added in the future. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaGraphEdgeData_st __val - cdef cyruntime.cudaGraphEdgeData_st* _ptr + cdef cyruntime.cudaGraphEdgeData_st _pvt_val + cdef cyruntime.cudaGraphEdgeData_st* _pvt_ptr {{endif}} -{{if 'struct cudaGraphInstantiateParams_st' in found_types}} +{{if 'cudaGraphInstantiateParams_st' in found_struct}} cdef class cudaGraphInstantiateParams_st: """ @@ -2347,27 +3386,38 @@ cdef class cudaGraphInstantiateParams_st: Attributes ---------- + {{if 'cudaGraphInstantiateParams_st.flags' in found_struct}} flags : unsigned long long Instantiation flags + {{endif}} + {{if 'cudaGraphInstantiateParams_st.uploadStream' in found_struct}} uploadStream : cudaStream_t Upload stream + {{endif}} + {{if 'cudaGraphInstantiateParams_st.errNode_out' in found_struct}} errNode_out : cudaGraphNode_t The node which caused instantiation to fail, if any + {{endif}} + {{if 'cudaGraphInstantiateParams_st.result_out' in found_struct}} result_out : cudaGraphInstantiateResult Whether instantiation was successful. If it failed, the reason why + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaGraphInstantiateParams_st __val - cdef cyruntime.cudaGraphInstantiateParams_st* _ptr + cdef cyruntime.cudaGraphInstantiateParams_st _pvt_val + cdef cyruntime.cudaGraphInstantiateParams_st* _pvt_ptr + {{if 'cudaGraphInstantiateParams_st.uploadStream' in found_struct}} cdef cudaStream_t _uploadStream + {{endif}} + {{if 'cudaGraphInstantiateParams_st.errNode_out' in found_struct}} cdef cudaGraphNode_t _errNode_out + {{endif}} {{endif}} -{{if 'struct cudaGraphExecUpdateResultInfo_st' in found_types}} +{{if 'cudaGraphExecUpdateResultInfo_st' in found_struct}} cdef class cudaGraphExecUpdateResultInfo_st: """ @@ -2375,72 +3425,95 @@ cdef class cudaGraphExecUpdateResultInfo_st: Attributes ---------- + {{if 'cudaGraphExecUpdateResultInfo_st.result' in found_struct}} result : cudaGraphExecUpdateResult Gives more specific detail when a cuda graph update fails. + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorNode' in found_struct}} errorNode : cudaGraphNode_t The "to node" of the error edge when the topologies do not match. The error node when the error is associated with a specific node. NULL when the error is generic. + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} errorFromNode : cudaGraphNode_t The from node of error edge when the topologies do not match. Otherwise NULL. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaGraphExecUpdateResultInfo_st __val - cdef cyruntime.cudaGraphExecUpdateResultInfo_st* _ptr + cdef cyruntime.cudaGraphExecUpdateResultInfo_st _pvt_val + cdef cyruntime.cudaGraphExecUpdateResultInfo_st* _pvt_ptr + {{if 'cudaGraphExecUpdateResultInfo_st.errorNode' in found_struct}} cdef cudaGraphNode_t _errorNode + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} cdef cudaGraphNode_t _errorFromNode + {{endif}} {{endif}} -{{if 'struct cudaGraphKernelNodeUpdate' in found_types}} +{{if 'cudaGraphKernelNodeUpdate.updateData.param' in found_struct}} -cdef class anon_struct19: +cdef class anon_struct21: """ Attributes ---------- + {{if 'cudaGraphKernelNodeUpdate.updateData.param.pValue' in found_struct}} pValue : Any + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param.offset' in found_struct}} offset : size_t + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param.size' in found_struct}} size : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaGraphKernelNodeUpdate* _ptr + cdef cyruntime.cudaGraphKernelNodeUpdate* _pvt_ptr {{endif}} -{{if 'struct cudaGraphKernelNodeUpdate' in found_types}} +{{if 'cudaGraphKernelNodeUpdate.updateData' in found_struct}} -cdef class anon_union8: +cdef class anon_union9: """ Attributes ---------- + {{if 'cudaGraphKernelNodeUpdate.updateData.gridDim' in found_struct}} gridDim : dim3 - param : anon_struct19 + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param' in found_struct}} + param : anon_struct21 + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.isEnabled' in found_struct}} isEnabled : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaGraphKernelNodeUpdate* _ptr + cdef cyruntime.cudaGraphKernelNodeUpdate* _pvt_ptr + {{if 'cudaGraphKernelNodeUpdate.updateData.gridDim' in found_struct}} cdef dim3 _gridDim - cdef anon_struct19 _param + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param' in found_struct}} + cdef anon_struct21 _param + {{endif}} {{endif}} -{{if 'struct cudaGraphKernelNodeUpdate' in found_types}} +{{if 'cudaGraphKernelNodeUpdate' in found_struct}} cdef class cudaGraphKernelNodeUpdate: """ @@ -2449,26 +3522,35 @@ cdef class cudaGraphKernelNodeUpdate: Attributes ---------- + {{if 'cudaGraphKernelNodeUpdate.node' in found_struct}} node : cudaGraphDeviceNode_t Node to update + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.field' in found_struct}} field : cudaGraphKernelNodeField Which type of update to apply. Determines how updateData is interpreted - updateData : anon_union8 + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData' in found_struct}} + updateData : anon_union9 Update data to apply. Which field is used depends on field's value + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cyruntime.cudaGraphKernelNodeUpdate* _val_ptr - cdef cyruntime.cudaGraphKernelNodeUpdate* _ptr + cdef cyruntime.cudaGraphKernelNodeUpdate* _pvt_ptr + {{if 'cudaGraphKernelNodeUpdate.node' in found_struct}} cdef cudaGraphDeviceNode_t _node - cdef anon_union8 _updateData + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData' in found_struct}} + cdef anon_union9 _updateData + {{endif}} {{endif}} -{{if 'struct cudaLaunchMemSyncDomainMap_st' in found_types}} +{{if 'cudaLaunchMemSyncDomainMap_st' in found_struct}} cdef class cudaLaunchMemSyncDomainMap_st: """ @@ -2482,104 +3564,155 @@ cdef class cudaLaunchMemSyncDomainMap_st: Attributes ---------- + {{if 'cudaLaunchMemSyncDomainMap_st.default_' in found_struct}} default_ : bytes The default domain ID to use for designated kernels + {{endif}} + {{if 'cudaLaunchMemSyncDomainMap_st.remote' in found_struct}} remote : bytes The remote domain ID to use for designated kernels + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaLaunchMemSyncDomainMap_st __val - cdef cyruntime.cudaLaunchMemSyncDomainMap_st* _ptr + cdef cyruntime.cudaLaunchMemSyncDomainMap_st _pvt_val + cdef cyruntime.cudaLaunchMemSyncDomainMap_st* _pvt_ptr {{endif}} -{{if 'union cudaLaunchAttributeValue' in found_types}} +{{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} -cdef class anon_struct20: +cdef class anon_struct22: """ Attributes ---------- + {{if 'cudaLaunchAttributeValue.clusterDim.x' in found_struct}} x : unsigned int + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim.y' in found_struct}} y : unsigned int + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim.z' in found_struct}} z : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaLaunchAttributeValue* _ptr + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr {{endif}} -{{if 'union cudaLaunchAttributeValue' in found_types}} +{{if 'cudaLaunchAttributeValue.programmaticEvent' in found_struct}} -cdef class anon_struct21: +cdef class anon_struct23: """ Attributes ---------- + {{if 'cudaLaunchAttributeValue.programmaticEvent.event' in found_struct}} event : cudaEvent_t + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent.flags' in found_struct}} flags : int + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent.triggerAtBlockStart' in found_struct}} triggerAtBlockStart : int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaLaunchAttributeValue* _ptr + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + {{if 'cudaLaunchAttributeValue.programmaticEvent.event' in found_struct}} cdef cudaEvent_t _event + {{endif}} {{endif}} -{{if 'union cudaLaunchAttributeValue' in found_types}} +{{if 'cudaLaunchAttributeValue.preferredClusterDim' in found_struct}} -cdef class anon_struct22: +cdef class anon_struct24: + """ + Attributes + ---------- + {{if 'cudaLaunchAttributeValue.preferredClusterDim.x' in found_struct}} + x : unsigned int + + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim.y' in found_struct}} + y : unsigned int + + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim.z' in found_struct}} + z : unsigned int + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr +{{endif}} +{{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} + +cdef class anon_struct25: """ Attributes ---------- + {{if 'cudaLaunchAttributeValue.launchCompletionEvent.event' in found_struct}} event : cudaEvent_t + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent.flags' in found_struct}} flags : int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaLaunchAttributeValue* _ptr + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + {{if 'cudaLaunchAttributeValue.launchCompletionEvent.event' in found_struct}} cdef cudaEvent_t _event + {{endif}} {{endif}} -{{if 'union cudaLaunchAttributeValue' in found_types}} +{{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} -cdef class anon_struct23: +cdef class anon_struct26: """ Attributes ---------- + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode.deviceUpdatable' in found_struct}} deviceUpdatable : int + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode.devNode' in found_struct}} devNode : cudaGraphDeviceNode_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaLaunchAttributeValue* _ptr + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode.devNode' in found_struct}} cdef cudaGraphDeviceNode_t _devNode + {{endif}} {{endif}} -{{if 'union cudaLaunchAttributeValue' in found_types}} +{{if 'cudaLaunchAttributeValue' in found_struct}} cdef class cudaLaunchAttributeValue: """ @@ -2588,17 +3721,26 @@ cdef class cudaLaunchAttributeValue: Attributes ---------- + {{if 'cudaLaunchAttributeValue.pad' in found_struct}} pad : bytes + {{endif}} + {{if 'cudaLaunchAttributeValue.accessPolicyWindow' in found_struct}} accessPolicyWindow : cudaAccessPolicyWindow Value of launch attribute cudaLaunchAttributeAccessPolicyWindow. + {{endif}} + {{if 'cudaLaunchAttributeValue.cooperative' in found_struct}} cooperative : int Value of launch attribute cudaLaunchAttributeCooperative. Nonzero indicates a cooperative kernel (see cudaLaunchCooperativeKernel). + {{endif}} + {{if 'cudaLaunchAttributeValue.syncPolicy' in found_struct}} syncPolicy : cudaSynchronizationPolicy Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. ::cudaSynchronizationPolicy for work queued up in this stream. - clusterDim : anon_struct20 + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} + clusterDim : anon_struct22 Value of launch attribute cudaLaunchAttributeClusterDimension that represents the desired cluster dimensions for the kernel. Opaque type with the following fields: - `x` - The X dimension of the @@ -2606,62 +3748,110 @@ cdef class cudaLaunchAttributeValue: `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension. - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension. + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : cudaClusterSchedulingPolicy Value of launch attribute cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster scheduling policy preference for the kernel. + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticStreamSerializationAllowed' in found_struct}} programmaticStreamSerializationAllowed : int Value of launch attribute cudaLaunchAttributeProgrammaticStreamSerialization. - programmaticEvent : anon_struct21 + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent' in found_struct}} + programmaticEvent : anon_struct23 Value of launch attribute cudaLaunchAttributeProgrammaticEvent with the following fields: - `cudaEvent_t` event - Event to fire when all blocks trigger it. - `int` flags; - Event record flags, see cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. - `int` triggerAtBlockStart - If this is set to non-0, each block launch will automatically trigger the event. + {{endif}} + {{if 'cudaLaunchAttributeValue.priority' in found_struct}} priority : int Value of launch attribute cudaLaunchAttributePriority. Execution priority of the kernel. + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomainMap' in found_struct}} memSyncDomainMap : cudaLaunchMemSyncDomainMap Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See ::cudaLaunchMemSyncDomainMap. + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomain' in found_struct}} memSyncDomain : cudaLaunchMemSyncDomain Value of launch attribute cudaLaunchAttributeMemSyncDomain. See cudaLaunchMemSyncDomain. - launchCompletionEvent : anon_struct22 + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim' in found_struct}} + preferredClusterDim : anon_struct24 + Value of launch attribute + cudaLaunchAttributePreferredClusterDimension that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + cudaLaunchAttributeValue::clusterDim. + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} + launchCompletionEvent : anon_struct25 Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent with the following fields: - `cudaEvent_t` event - Event to fire when the last block launches. - `int` flags - Event record flags, see cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. - deviceUpdatableKernelNode : anon_struct23 + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} + deviceUpdatableKernelNode : anon_struct26 Value of launch attribute cudaLaunchAttributeDeviceUpdatableKernelNode with the following fields: - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable. - `cudaGraphDeviceNode_t` devNode - Returns a handle to pass to the various device-side update functions. + {{endif}} + {{if 'cudaLaunchAttributeValue.sharedMemCarveout' in found_struct}} sharedMemCarveout : unsigned int Value of launch attribute cudaLaunchAttributePreferredSharedMemoryCarveout. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaLaunchAttributeValue __val - cdef cyruntime.cudaLaunchAttributeValue* _ptr + cdef cyruntime.cudaLaunchAttributeValue _pvt_val + cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr + {{if 'cudaLaunchAttributeValue.accessPolicyWindow' in found_struct}} cdef cudaAccessPolicyWindow _accessPolicyWindow - cdef anon_struct20 _clusterDim - cdef anon_struct21 _programmaticEvent + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} + cdef anon_struct22 _clusterDim + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent' in found_struct}} + cdef anon_struct23 _programmaticEvent + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomainMap' in found_struct}} cdef cudaLaunchMemSyncDomainMap _memSyncDomainMap - cdef anon_struct22 _launchCompletionEvent - cdef anon_struct23 _deviceUpdatableKernelNode -{{endif}} -{{if 'struct cudaLaunchAttribute_st' in found_types}} + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim' in found_struct}} + cdef anon_struct24 _preferredClusterDim + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} + cdef anon_struct25 _launchCompletionEvent + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} + cdef anon_struct26 _deviceUpdatableKernelNode + {{endif}} +{{endif}} +{{if 'cudaLaunchAttribute_st' in found_struct}} cdef class cudaLaunchAttribute_st: """ @@ -2669,57 +3859,66 @@ cdef class cudaLaunchAttribute_st: Attributes ---------- + {{if 'cudaLaunchAttribute_st.id' in found_struct}} id : cudaLaunchAttributeID Attribute to set + {{endif}} + {{if 'cudaLaunchAttribute_st.val' in found_struct}} val : cudaLaunchAttributeValue Value of the attribute + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaLaunchAttribute_st __val - cdef cyruntime.cudaLaunchAttribute_st* _ptr + cdef cyruntime.cudaLaunchAttribute_st _pvt_val + cdef cyruntime.cudaLaunchAttribute_st* _pvt_ptr + {{if 'cudaLaunchAttribute_st.val' in found_struct}} cdef cudaLaunchAttributeValue _val + {{endif}} {{endif}} -{{if 'struct cudaAsyncNotificationInfo' in found_types}} +{{if 'cudaAsyncNotificationInfo.info.overBudget' in found_struct}} -cdef class anon_struct24: +cdef class anon_struct27: """ Attributes ---------- + {{if 'cudaAsyncNotificationInfo.info.overBudget.bytesOverBudget' in found_struct}} bytesOverBudget : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaAsyncNotificationInfo* _ptr + cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr {{endif}} -{{if 'struct cudaAsyncNotificationInfo' in found_types}} +{{if 'cudaAsyncNotificationInfo.info' in found_struct}} -cdef class anon_union9: +cdef class anon_union10: """ Attributes ---------- - overBudget : anon_struct24 + {{if 'cudaAsyncNotificationInfo.info.overBudget' in found_struct}} + overBudget : anon_struct27 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaAsyncNotificationInfo* _ptr - cdef anon_struct24 _overBudget + cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr + {{if 'cudaAsyncNotificationInfo.info.overBudget' in found_struct}} + cdef anon_struct27 _overBudget + {{endif}} {{endif}} -{{if 'struct cudaAsyncNotificationInfo' in found_types}} +{{if 'cudaAsyncNotificationInfo' in found_struct}} cdef class cudaAsyncNotificationInfo: """ @@ -2727,22 +3926,27 @@ cdef class cudaAsyncNotificationInfo: Attributes ---------- + {{if 'cudaAsyncNotificationInfo.type' in found_struct}} type : cudaAsyncNotificationType - info : anon_union9 + {{endif}} + {{if 'cudaAsyncNotificationInfo.info' in found_struct}} + info : anon_union10 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cyruntime.cudaAsyncNotificationInfo* _val_ptr - cdef cyruntime.cudaAsyncNotificationInfo* _ptr - cdef anon_union9 _info + cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr + {{if 'cudaAsyncNotificationInfo.info' in found_struct}} + cdef anon_union10 _info + {{endif}} {{endif}} -{{if 'struct cudaTextureDesc' in found_types}} +{{if 'cudaTextureDesc' in found_struct}} cdef class cudaTextureDesc: """ @@ -2750,41 +3954,66 @@ cdef class cudaTextureDesc: Attributes ---------- + {{if 'cudaTextureDesc.addressMode' in found_struct}} addressMode : List[cudaTextureAddressMode] Texture address mode for up to 3 dimensions + {{endif}} + {{if 'cudaTextureDesc.filterMode' in found_struct}} filterMode : cudaTextureFilterMode Texture filter mode + {{endif}} + {{if 'cudaTextureDesc.readMode' in found_struct}} readMode : cudaTextureReadMode Texture read mode + {{endif}} + {{if 'cudaTextureDesc.sRGB' in found_struct}} sRGB : int Perform sRGB->linear conversion during texture read + {{endif}} + {{if 'cudaTextureDesc.borderColor' in found_struct}} borderColor : List[float] Texture Border Color + {{endif}} + {{if 'cudaTextureDesc.normalizedCoords' in found_struct}} normalizedCoords : int Indicates whether texture reads are normalized or not + {{endif}} + {{if 'cudaTextureDesc.maxAnisotropy' in found_struct}} maxAnisotropy : unsigned int Limit to the anisotropy ratio + {{endif}} + {{if 'cudaTextureDesc.mipmapFilterMode' in found_struct}} mipmapFilterMode : cudaTextureFilterMode Mipmap filter mode + {{endif}} + {{if 'cudaTextureDesc.mipmapLevelBias' in found_struct}} mipmapLevelBias : float Offset applied to the supplied mipmap level + {{endif}} + {{if 'cudaTextureDesc.minMipmapLevelClamp' in found_struct}} minMipmapLevelClamp : float Lower end of the mipmap level range to clamp access to + {{endif}} + {{if 'cudaTextureDesc.maxMipmapLevelClamp' in found_struct}} maxMipmapLevelClamp : float Upper end of the mipmap level range to clamp access to + {{endif}} + {{if 'cudaTextureDesc.disableTrilinearOptimization' in found_struct}} disableTrilinearOptimization : int Disable any trilinear filtering optimizations. + {{endif}} + {{if 'cudaTextureDesc.seamlessCubemap' in found_struct}} seamlessCubemap : int Enable seamless cube map filtering. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaTextureDesc __val - cdef cyruntime.cudaTextureDesc* _ptr + cdef cyruntime.cudaTextureDesc _pvt_val + cdef cyruntime.cudaTextureDesc* _pvt_ptr {{endif}} {{if True}} @@ -2795,49 +4024,67 @@ cdef class cudaEglPlaneDesc_st: Attributes ---------- + {{if True}} width : unsigned int Width of plane + {{endif}} + {{if True}} height : unsigned int Height of plane + {{endif}} + {{if True}} depth : unsigned int Depth of plane + {{endif}} + {{if True}} pitch : unsigned int Pitch of plane + {{endif}} + {{if True}} numChannels : unsigned int Number of channels for the plane + {{endif}} + {{if True}} channelDesc : cudaChannelFormatDesc Channel Format Descriptor + {{endif}} + {{if True}} reserved : List[unsigned int] Reserved for future use + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaEglPlaneDesc_st __val - cdef cyruntime.cudaEglPlaneDesc_st* _ptr + cdef cyruntime.cudaEglPlaneDesc_st _pvt_val + cdef cyruntime.cudaEglPlaneDesc_st* _pvt_ptr + {{if True}} cdef cudaChannelFormatDesc _channelDesc + {{endif}} {{endif}} {{if True}} -cdef class anon_union10: +cdef class anon_union11: """ Attributes ---------- + {{if True}} pArray : List[cudaArray_t] + {{endif}} + {{if True}} pPitch : List[cudaPitchedPtr] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ - cdef cyruntime.cudaEglFrame_st* _ptr + cdef cyruntime.cudaEglFrame_st* _pvt_ptr {{endif}} {{if True}} @@ -2854,26 +4101,37 @@ cdef class cudaEglFrame_st: Attributes ---------- - frame : anon_union10 + {{if True}} + frame : anon_union11 + {{endif}} + {{if True}} planeDesc : List[cudaEglPlaneDesc] CUDA EGL Plane Descriptor cudaEglPlaneDesc + {{endif}} + {{if True}} planeCount : unsigned int Number of planes + {{endif}} + {{if True}} frameType : cudaEglFrameType Array or Pitch + {{endif}} + {{if True}} eglColorFormat : cudaEglColorFormat CUDA EGL Color Format + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ cdef cyruntime.cudaEglFrame_st* _val_ptr - cdef cyruntime.cudaEglFrame_st* _ptr - cdef anon_union10 _frame + cdef cyruntime.cudaEglFrame_st* _pvt_ptr + {{if True}} + cdef anon_union11 _frame + {{endif}} {{endif}} {{if 'CUuuid' in found_types}} @@ -2881,14 +4139,15 @@ cdef class CUuuid(CUuuid_st): """ Attributes ---------- + {{if 'CUuuid_st.bytes' in found_struct}} bytes : bytes < CUDA definition of UUID + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -2898,14 +4157,15 @@ cdef class cudaUUID_t(CUuuid_st): """ Attributes ---------- + {{if 'CUuuid_st.bytes' in found_struct}} bytes : bytes < CUDA definition of UUID + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -2917,14 +4177,15 @@ cdef class cudaIpcEventHandle_t(cudaIpcEventHandle_st): Attributes ---------- + {{if 'cudaIpcEventHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -2936,14 +4197,15 @@ cdef class cudaIpcMemHandle_t(cudaIpcMemHandle_st): Attributes ---------- + {{if 'cudaIpcMemHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -2953,14 +4215,15 @@ cdef class cudaMemFabricHandle_t(cudaMemFabricHandle_st): """ Attributes ---------- + {{if 'cudaMemFabricHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -2975,6 +4238,7 @@ cdef class cudaGraphEdgeData(cudaGraphEdgeData_st): Attributes ---------- + {{if 'cudaGraphEdgeData_st.from_port' in found_struct}} from_port : bytes This indicates when the dependency is triggered from the upstream node on the edge. The meaning is specfic to the node type. A value @@ -2985,6 +4249,8 @@ cdef class cudaGraphEdgeData(cudaGraphEdgeData_st): cudaGraphKernelNodePortDefault, cudaGraphKernelNodePortProgrammatic, or cudaGraphKernelNodePortLaunchCompletion. + {{endif}} + {{if 'cudaGraphEdgeData_st.to_port' in found_struct}} to_port : bytes This indicates what portion of the downstream node is dependent on the upstream node or portion thereof (indicated by `from_port`). @@ -2992,19 +4258,23 @@ cdef class cudaGraphEdgeData(cudaGraphEdgeData_st): means the entirety of the downstream node is dependent on the upstream work. Currently no node types define non-zero ports. Accordingly, this field must be set to zero. + {{endif}} + {{if 'cudaGraphEdgeData_st.type' in found_struct}} type : bytes This should be populated with a value from ::cudaGraphDependencyType. (It is typed as char due to compiler- specific layout of bitfields.) See ::cudaGraphDependencyType. + {{endif}} + {{if 'cudaGraphEdgeData_st.reserved' in found_struct}} reserved : bytes These bytes are unused and must be zeroed. This ensures compatibility if additional fields are added in the future. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3016,20 +4286,27 @@ cdef class cudaGraphInstantiateParams(cudaGraphInstantiateParams_st): Attributes ---------- + {{if 'cudaGraphInstantiateParams_st.flags' in found_struct}} flags : unsigned long long Instantiation flags + {{endif}} + {{if 'cudaGraphInstantiateParams_st.uploadStream' in found_struct}} uploadStream : cudaStream_t Upload stream + {{endif}} + {{if 'cudaGraphInstantiateParams_st.errNode_out' in found_struct}} errNode_out : cudaGraphNode_t The node which caused instantiation to fail, if any + {{endif}} + {{if 'cudaGraphInstantiateParams_st.result_out' in found_struct}} result_out : cudaGraphInstantiateResult Whether instantiation was successful. If it failed, the reason why + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3041,21 +4318,26 @@ cdef class cudaGraphExecUpdateResultInfo(cudaGraphExecUpdateResultInfo_st): Attributes ---------- + {{if 'cudaGraphExecUpdateResultInfo_st.result' in found_struct}} result : cudaGraphExecUpdateResult Gives more specific detail when a cuda graph update fails. + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorNode' in found_struct}} errorNode : cudaGraphNode_t The "to node" of the error edge when the topologies do not match. The error node when the error is associated with a specific node. NULL when the error is generic. + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} errorFromNode : cudaGraphNode_t The from node of error edge when the topologies do not match. Otherwise NULL. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3073,16 +4355,19 @@ cdef class cudaLaunchMemSyncDomainMap(cudaLaunchMemSyncDomainMap_st): Attributes ---------- + {{if 'cudaLaunchMemSyncDomainMap_st.default_' in found_struct}} default_ : bytes The default domain ID to use for designated kernels + {{endif}} + {{if 'cudaLaunchMemSyncDomainMap_st.remote' in found_struct}} remote : bytes The remote domain ID to use for designated kernels + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3094,16 +4379,19 @@ cdef class cudaLaunchAttribute(cudaLaunchAttribute_st): Attributes ---------- + {{if 'cudaLaunchAttribute_st.id' in found_struct}} id : cudaLaunchAttributeID Attribute to set + {{endif}} + {{if 'cudaLaunchAttribute_st.val' in found_struct}} val : cudaLaunchAttributeValue Value of the attribute + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3115,16 +4403,19 @@ cdef class cudaAsyncNotificationInfo_t(cudaAsyncNotificationInfo): Attributes ---------- + {{if 'cudaAsyncNotificationInfo.type' in found_struct}} type : cudaAsyncNotificationType - info : anon_union9 + {{endif}} + {{if 'cudaAsyncNotificationInfo.info' in found_struct}} + info : anon_union10 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3137,17 +4428,26 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): Attributes ---------- + {{if 'cudaLaunchAttributeValue.pad' in found_struct}} pad : bytes + {{endif}} + {{if 'cudaLaunchAttributeValue.accessPolicyWindow' in found_struct}} accessPolicyWindow : cudaAccessPolicyWindow Value of launch attribute cudaLaunchAttributeAccessPolicyWindow. + {{endif}} + {{if 'cudaLaunchAttributeValue.cooperative' in found_struct}} cooperative : int Value of launch attribute cudaLaunchAttributeCooperative. Nonzero indicates a cooperative kernel (see cudaLaunchCooperativeKernel). + {{endif}} + {{if 'cudaLaunchAttributeValue.syncPolicy' in found_struct}} syncPolicy : cudaSynchronizationPolicy Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. ::cudaSynchronizationPolicy for work queued up in this stream. - clusterDim : anon_struct20 + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} + clusterDim : anon_struct22 Value of launch attribute cudaLaunchAttributeClusterDimension that represents the desired cluster dimensions for the kernel. Opaque type with the following fields: - `x` - The X dimension of the @@ -3155,51 +4455,84 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension. - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension. + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : cudaClusterSchedulingPolicy Value of launch attribute cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster scheduling policy preference for the kernel. + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticStreamSerializationAllowed' in found_struct}} programmaticStreamSerializationAllowed : int Value of launch attribute cudaLaunchAttributeProgrammaticStreamSerialization. - programmaticEvent : anon_struct21 + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent' in found_struct}} + programmaticEvent : anon_struct23 Value of launch attribute cudaLaunchAttributeProgrammaticEvent with the following fields: - `cudaEvent_t` event - Event to fire when all blocks trigger it. - `int` flags; - Event record flags, see cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. - `int` triggerAtBlockStart - If this is set to non-0, each block launch will automatically trigger the event. + {{endif}} + {{if 'cudaLaunchAttributeValue.priority' in found_struct}} priority : int Value of launch attribute cudaLaunchAttributePriority. Execution priority of the kernel. + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomainMap' in found_struct}} memSyncDomainMap : cudaLaunchMemSyncDomainMap Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See ::cudaLaunchMemSyncDomainMap. + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomain' in found_struct}} memSyncDomain : cudaLaunchMemSyncDomain Value of launch attribute cudaLaunchAttributeMemSyncDomain. See cudaLaunchMemSyncDomain. - launchCompletionEvent : anon_struct22 + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim' in found_struct}} + preferredClusterDim : anon_struct24 + Value of launch attribute + cudaLaunchAttributePreferredClusterDimension that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + cudaLaunchAttributeValue::clusterDim. + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} + launchCompletionEvent : anon_struct25 Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent with the following fields: - `cudaEvent_t` event - Event to fire when the last block launches. - `int` flags - Event record flags, see cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. - deviceUpdatableKernelNode : anon_struct23 + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} + deviceUpdatableKernelNode : anon_struct26 Value of launch attribute cudaLaunchAttributeDeviceUpdatableKernelNode with the following fields: - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable. - `cudaGraphDeviceNode_t` devNode - Returns a handle to pass to the various device-side update functions. + {{endif}} + {{if 'cudaLaunchAttributeValue.sharedMemCarveout' in found_struct}} sharedMemCarveout : unsigned int Value of launch attribute cudaLaunchAttributePreferredSharedMemoryCarveout. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3212,17 +4545,26 @@ cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): Attributes ---------- + {{if 'cudaLaunchAttributeValue.pad' in found_struct}} pad : bytes + {{endif}} + {{if 'cudaLaunchAttributeValue.accessPolicyWindow' in found_struct}} accessPolicyWindow : cudaAccessPolicyWindow Value of launch attribute cudaLaunchAttributeAccessPolicyWindow. + {{endif}} + {{if 'cudaLaunchAttributeValue.cooperative' in found_struct}} cooperative : int Value of launch attribute cudaLaunchAttributeCooperative. Nonzero indicates a cooperative kernel (see cudaLaunchCooperativeKernel). + {{endif}} + {{if 'cudaLaunchAttributeValue.syncPolicy' in found_struct}} syncPolicy : cudaSynchronizationPolicy Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. ::cudaSynchronizationPolicy for work queued up in this stream. - clusterDim : anon_struct20 + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} + clusterDim : anon_struct22 Value of launch attribute cudaLaunchAttributeClusterDimension that represents the desired cluster dimensions for the kernel. Opaque type with the following fields: - `x` - The X dimension of the @@ -3230,51 +4572,84 @@ cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension. - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension. + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : cudaClusterSchedulingPolicy Value of launch attribute cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster scheduling policy preference for the kernel. + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticStreamSerializationAllowed' in found_struct}} programmaticStreamSerializationAllowed : int Value of launch attribute cudaLaunchAttributeProgrammaticStreamSerialization. - programmaticEvent : anon_struct21 + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent' in found_struct}} + programmaticEvent : anon_struct23 Value of launch attribute cudaLaunchAttributeProgrammaticEvent with the following fields: - `cudaEvent_t` event - Event to fire when all blocks trigger it. - `int` flags; - Event record flags, see cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. - `int` triggerAtBlockStart - If this is set to non-0, each block launch will automatically trigger the event. + {{endif}} + {{if 'cudaLaunchAttributeValue.priority' in found_struct}} priority : int Value of launch attribute cudaLaunchAttributePriority. Execution priority of the kernel. + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomainMap' in found_struct}} memSyncDomainMap : cudaLaunchMemSyncDomainMap Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See ::cudaLaunchMemSyncDomainMap. + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomain' in found_struct}} memSyncDomain : cudaLaunchMemSyncDomain Value of launch attribute cudaLaunchAttributeMemSyncDomain. See cudaLaunchMemSyncDomain. - launchCompletionEvent : anon_struct22 + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim' in found_struct}} + preferredClusterDim : anon_struct24 + Value of launch attribute + cudaLaunchAttributePreferredClusterDimension that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + cudaLaunchAttributeValue::clusterDim. + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} + launchCompletionEvent : anon_struct25 Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent with the following fields: - `cudaEvent_t` event - Event to fire when the last block launches. - `int` flags - Event record flags, see cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. - deviceUpdatableKernelNode : anon_struct23 + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} + deviceUpdatableKernelNode : anon_struct26 Value of launch attribute cudaLaunchAttributeDeviceUpdatableKernelNode with the following fields: - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable. - `cudaGraphDeviceNode_t` devNode - Returns a handle to pass to the various device-side update functions. + {{endif}} + {{if 'cudaLaunchAttributeValue.sharedMemCarveout' in found_struct}} sharedMemCarveout : unsigned int Value of launch attribute cudaLaunchAttributePreferredSharedMemoryCarveout. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3287,26 +4662,39 @@ cdef class cudaEglPlaneDesc(cudaEglPlaneDesc_st): Attributes ---------- + {{if True}} width : unsigned int Width of plane + {{endif}} + {{if True}} height : unsigned int Height of plane + {{endif}} + {{if True}} depth : unsigned int Depth of plane + {{endif}} + {{if True}} pitch : unsigned int Pitch of plane + {{endif}} + {{if True}} numChannels : unsigned int Number of channels for the plane + {{endif}} + {{if True}} channelDesc : cudaChannelFormatDesc Channel Format Descriptor + {{endif}} + {{if True}} reserved : List[unsigned int] Reserved for future use + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3325,22 +4713,31 @@ cdef class cudaEglFrame(cudaEglFrame_st): Attributes ---------- - frame : anon_union10 + {{if True}} + frame : anon_union11 + {{endif}} + {{if True}} planeDesc : List[cudaEglPlaneDesc] CUDA EGL Plane Descriptor cudaEglPlaneDesc + {{endif}} + {{if True}} planeCount : unsigned int Number of planes + {{endif}} + {{if True}} frameType : cudaEglFrameType Array or Pitch + {{endif}} + {{if True}} eglColorFormat : cudaEglColorFormat CUDA EGL Color Format + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ pass {{endif}} @@ -3501,8 +4898,8 @@ cdef class cudaGraphConditionalHandle: Get memory address of class instance """ - cdef cyruntime.cudaGraphConditionalHandle __val - cdef cyruntime.cudaGraphConditionalHandle* _ptr + cdef cyruntime.cudaGraphConditionalHandle _pvt_val + cdef cyruntime.cudaGraphConditionalHandle* _pvt_ptr {{endif}} {{if 'cudaSurfaceObject_t' in found_types}} @@ -3518,8 +4915,8 @@ cdef class cudaSurfaceObject_t: Get memory address of class instance """ - cdef cyruntime.cudaSurfaceObject_t __val - cdef cyruntime.cudaSurfaceObject_t* _ptr + cdef cyruntime.cudaSurfaceObject_t _pvt_val + cdef cyruntime.cudaSurfaceObject_t* _pvt_ptr {{endif}} {{if 'cudaTextureObject_t' in found_types}} @@ -3535,8 +4932,8 @@ cdef class cudaTextureObject_t: Get memory address of class instance """ - cdef cyruntime.cudaTextureObject_t __val - cdef cyruntime.cudaTextureObject_t* _ptr + cdef cyruntime.cudaTextureObject_t _pvt_val + cdef cyruntime.cudaTextureObject_t* _pvt_ptr {{endif}} {{if True}} @@ -3550,8 +4947,8 @@ cdef class GLenum: Get memory address of class instance """ - cdef cyruntime.GLenum __val - cdef cyruntime.GLenum* _ptr + cdef cyruntime.GLenum _pvt_val + cdef cyruntime.GLenum* _pvt_ptr {{endif}} {{if True}} @@ -3565,8 +4962,8 @@ cdef class GLuint: Get memory address of class instance """ - cdef cyruntime.GLuint __val - cdef cyruntime.GLuint* _ptr + cdef cyruntime.GLuint _pvt_val + cdef cyruntime.GLuint* _pvt_ptr {{endif}} {{if True}} @@ -3580,8 +4977,8 @@ cdef class EGLint: Get memory address of class instance """ - cdef cyruntime.EGLint __val - cdef cyruntime.EGLint* _ptr + cdef cyruntime.EGLint _pvt_val + cdef cyruntime.EGLint* _pvt_ptr {{endif}} {{if True}} @@ -3595,8 +4992,8 @@ cdef class VdpDevice: Get memory address of class instance """ - cdef cyruntime.VdpDevice __val - cdef cyruntime.VdpDevice* _ptr + cdef cyruntime.VdpDevice _pvt_val + cdef cyruntime.VdpDevice* _pvt_ptr {{endif}} {{if True}} @@ -3610,8 +5007,8 @@ cdef class VdpGetProcAddress: Get memory address of class instance """ - cdef cyruntime.VdpGetProcAddress __val - cdef cyruntime.VdpGetProcAddress* _ptr + cdef cyruntime.VdpGetProcAddress _pvt_val + cdef cyruntime.VdpGetProcAddress* _pvt_ptr {{endif}} {{if True}} @@ -3625,8 +5022,8 @@ cdef class VdpVideoSurface: Get memory address of class instance """ - cdef cyruntime.VdpVideoSurface __val - cdef cyruntime.VdpVideoSurface* _ptr + cdef cyruntime.VdpVideoSurface _pvt_val + cdef cyruntime.VdpVideoSurface* _pvt_ptr {{endif}} {{if True}} @@ -3640,6 +5037,6 @@ cdef class VdpOutputSurface: Get memory address of class instance """ - cdef cyruntime.VdpOutputSurface __val - cdef cyruntime.VdpOutputSurface* _ptr + cdef cyruntime.VdpOutputSurface _pvt_val + cdef cyruntime.VdpOutputSurface* _pvt_ptr {{endif}} diff --git a/cuda_bindings/cuda/bindings/runtime.pyx.in b/cuda_bindings/cuda/bindings/runtime.pyx.in index e735ee442..4282e12d7 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx.in +++ b/cuda_bindings/cuda/bindings/runtime.pyx.in @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +# +# This code was automatically generated with version 12.8.0. Do not modify it directly. from typing import List, Tuple, Any, Optional from enum import IntEnum import cython @@ -227,6 +229,10 @@ cudaCooperativeLaunchMultiDeviceNoPostSync = cyruntime.cudaCooperativeLaunchMult #: a single mip tail region for all layers cudaArraySparsePropertiesSingleMipTail = cyruntime.cudaArraySparsePropertiesSingleMipTail +#: This flag, if set, indicates that the memory will be used as a buffer +#: for hardware accelerated decompression. +cudaMemPoolCreateUsageHwDecompress = cyruntime.cudaMemPoolCreateUsageHwDecompress + #: CUDA IPC Handle Size CUDA_IPC_HANDLE_SIZE = cyruntime.CUDA_IPC_HANDLE_SIZE @@ -473,8 +479,8 @@ class cudaError_t(IntEnum): cudaErrorInvalidFilterSetting = cyruntime.cudaError.cudaErrorInvalidFilterSetting{{endif}} {{if 'cudaErrorInvalidNormSetting' in found_values}} - #: This indicates that an attempt was made to read a non-float texture - #: as a normalized float. This is not supported by CUDA. + #: This indicates that an attempt was made to read an unsupported data + #: type as a normalized float. This is not supported by CUDA. cudaErrorInvalidNormSetting = cyruntime.cudaError.cudaErrorInvalidNormSetting{{endif}} {{if 'cudaErrorMixedDeviceExecution' in found_values}} @@ -768,6 +774,16 @@ class cudaError_t(IntEnum): #: This indicates that the code to be compiled by the PTX JIT contains #: unsupported call to cudaDeviceSynchronize. cudaErrorUnsupportedDevSideSync = cyruntime.cudaError.cudaErrorUnsupportedDevSideSync{{endif}} + {{if 'cudaErrorContained' in found_values}} + + #: This indicates that an exception occurred on the device that is now + #: contained by the GPU's error containment capability. Common causes + #: are - a. Certain types of invalid accesses of peer GPU memory over + #: nvlink b. Certain classes of hardware errors This leaves the process + #: in an inconsistent state and any further CUDA work will return the + #: same error. To continue using CUDA, the process must be terminated + #: and relaunched. + cudaErrorContained = cyruntime.cudaError.cudaErrorContained{{endif}} {{if 'cudaErrorInvalidSource' in found_values}} #: This indicates that the device kernel source is invalid. @@ -971,6 +987,14 @@ class cudaError_t(IntEnum): #: times the number of multiprocessors as specified by the device #: attribute :py:obj:`~.cudaDevAttrMultiProcessorCount`. cudaErrorCooperativeLaunchTooLarge = cyruntime.cudaError.cudaErrorCooperativeLaunchTooLarge{{endif}} + {{if 'cudaErrorTensorMemoryLeak' in found_values}} + + #: An exception occurred on the device while exiting a kernel using + #: tensor memory: the tensor memory was not completely deallocated. + #: This leaves the process in an inconsistent state and any further + #: CUDA work will return the same error. To continue using CUDA, the + #: process must be terminated and relaunched. + cudaErrorTensorMemoryLeak = cyruntime.cudaError.cudaErrorTensorMemoryLeak{{endif}} {{if 'cudaErrorNotPermitted' in found_values}} #: This error indicates the attempted operation is not permitted. @@ -1188,6 +1212,11 @@ class cudaGraphInstantiateResult(IntEnum): #: Instantiation for device launch failed due to the nodes belonging to #: different contexts cudaGraphInstantiateMultipleDevicesNotSupported = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateMultipleDevicesNotSupported{{endif}} + {{if 'cudaGraphInstantiateConditionalHandleUnused' in found_values}} + + #: One or more conditional handles are not associated with conditional + #: nodes + cudaGraphInstantiateConditionalHandleUnused = cyruntime.cudaGraphInstantiateResult.cudaGraphInstantiateConditionalHandleUnused{{endif}} {{endif}} {{if 'cudaLaunchMemSyncDomain' in found_types}} @@ -1307,6 +1336,41 @@ class cudaLaunchAttributeID(IntEnum): #: Valid for streams, graph nodes, launches. See #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. cudaLaunchAttributeMemSyncDomain = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain{{endif}} + {{if 'cudaLaunchAttributePreferredClusterDimension' in found_values}} + + #: Valid for graph nodes and launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow + #: the kernel launch to specify a preferred substitute cluster + #: dimension. Blocks may be grouped according to either the dimensions + #: specified with this attribute (grouped into a "preferred substitute + #: cluster"), or the one specified with + #: :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + cudaLaunchAttributePreferredClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension{{endif}} {{if 'cudaLaunchAttributeLaunchCompletionEvent' in found_values}} #: Valid for launches. Set @@ -1446,8 +1510,18 @@ class cudaDataType(IntEnum): CUDA_C_64U = cyruntime.cudaDataType_t.CUDA_C_64U{{endif}} {{if 'CUDA_R_8F_E4M3' in found_values}} CUDA_R_8F_E4M3 = cyruntime.cudaDataType_t.CUDA_R_8F_E4M3{{endif}} + {{if 'CUDA_R_8F_UE4M3' in found_values}} + CUDA_R_8F_UE4M3 = cyruntime.cudaDataType_t.CUDA_R_8F_UE4M3{{endif}} {{if 'CUDA_R_8F_E5M2' in found_values}} CUDA_R_8F_E5M2 = cyruntime.cudaDataType_t.CUDA_R_8F_E5M2{{endif}} + {{if 'CUDA_R_8F_UE8M0' in found_values}} + CUDA_R_8F_UE8M0 = cyruntime.cudaDataType_t.CUDA_R_8F_UE8M0{{endif}} + {{if 'CUDA_R_6F_E2M3' in found_values}} + CUDA_R_6F_E2M3 = cyruntime.cudaDataType_t.CUDA_R_6F_E2M3{{endif}} + {{if 'CUDA_R_6F_E3M2' in found_values}} + CUDA_R_6F_E3M2 = cyruntime.cudaDataType_t.CUDA_R_6F_E3M2{{endif}} + {{if 'CUDA_R_4F_E2M1' in found_values}} + CUDA_R_4F_E2M1 = cyruntime.cudaDataType_t.CUDA_R_4F_E2M1{{endif}} {{endif}} {{if 'libraryPropertyType_t' in found_types}} @@ -2040,6 +2114,19 @@ class cudaEglColorFormat(IntEnum): #: Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V #: width = Y width, U/V height = Y height. cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER{{endif}} + {{if True}} + + #: Y, U, V in one surface, interleaved as UYVY in one channel. + cudaEglColorFormatUYVY709 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY709{{endif}} + {{if True}} + + #: Extended Range Y, U, V in one surface, interleaved as UYVY in one + #: channel. + cudaEglColorFormatUYVY709_ER = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY709_ER{{endif}} + {{if True}} + + #: Y, U, V in one surface, interleaved as UYVY in one channel. + cudaEglColorFormatUYVY2020 = cyruntime.cudaEglColorFormat_enum.cudaEglColorFormatUYVY2020{{endif}} {{endif}} {{if 'cudaChannelFormatKind' in found_types}} @@ -2185,6 +2272,10 @@ class cudaChannelFormatKind(IntEnum): #: 4 channel unsigned normalized block-compressed (BC7 compression) #: format with sRGB encoding cudaChannelFormatKindUnsignedBlockCompressed7SRGB = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedBlockCompressed7SRGB{{endif}} + {{if 'cudaChannelFormatKindUnsignedNormalized1010102' in found_values}} + + #: 4 channel unsigned normalized (10-bit, 10-bit, 10-bit, 2-bit) format + cudaChannelFormatKindUnsignedNormalized1010102 = cyruntime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102{{endif}} {{endif}} {{if 'cudaMemoryType' in found_types}} @@ -3438,13 +3529,27 @@ class cudaDeviceAttr(IntEnum): cudaDevAttrMpsEnabled = cyruntime.cudaDeviceAttr.cudaDevAttrMpsEnabled{{endif}} {{if 'cudaDevAttrHostNumaId' in found_values}} - #: NUMA ID of the host node closest to the device. Returns -1 when - #: system does not support NUMA. + #: NUMA ID of the host node closest to the device or -1 when system + #: does not support NUMA cudaDevAttrHostNumaId = cyruntime.cudaDeviceAttr.cudaDevAttrHostNumaId{{endif}} {{if 'cudaDevAttrD3D12CigSupported' in found_values}} #: Device supports CIG with D3D12. cudaDevAttrD3D12CigSupported = cyruntime.cudaDeviceAttr.cudaDevAttrD3D12CigSupported{{endif}} + {{if 'cudaDevAttrGpuPciDeviceId' in found_values}} + + #: The combined 16-bit PCI device ID and 16-bit PCI vendor ID. + cudaDevAttrGpuPciDeviceId = cyruntime.cudaDeviceAttr.cudaDevAttrGpuPciDeviceId{{endif}} + {{if 'cudaDevAttrGpuPciSubsystemId' in found_values}} + + #: The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor + #: ID. + cudaDevAttrGpuPciSubsystemId = cyruntime.cudaDeviceAttr.cudaDevAttrGpuPciSubsystemId{{endif}} + {{if 'cudaDevAttrHostNumaMultinodeIpcSupported' in found_values}} + + #: Device supports HostNuma location IPC between nodes in a multi-node + #: system. + cudaDevAttrHostNumaMultinodeIpcSupported = cyruntime.cudaDeviceAttr.cudaDevAttrHostNumaMultinodeIpcSupported{{endif}} {{if 'cudaDevAttrMax' in found_values}} cudaDevAttrMax = cyruntime.cudaDeviceAttr.cudaDevAttrMax{{endif}} {{endif}} @@ -3623,6 +3728,77 @@ class cudaGraphMemAttributeType(IntEnum): #: allocator. cudaGraphMemAttrReservedMemHigh = cyruntime.cudaGraphMemAttributeType.cudaGraphMemAttrReservedMemHigh{{endif}} {{endif}} +{{if 'cudaMemcpyFlags' in found_types}} + +class cudaMemcpyFlags(IntEnum): + """ + Flags to specify for copies within a batch. For more details see + :py:obj:`~.cudaMemcpyBatchAsync`. + """ + {{if 'cudaMemcpyFlagDefault' in found_values}} + cudaMemcpyFlagDefault = cyruntime.cudaMemcpyFlags.cudaMemcpyFlagDefault{{endif}} + {{if 'cudaMemcpyFlagPreferOverlapWithCompute' in found_values}} + + #: Hint to the driver to try and overlap the copy with compute work on + #: the SMs. + cudaMemcpyFlagPreferOverlapWithCompute = cyruntime.cudaMemcpyFlags.cudaMemcpyFlagPreferOverlapWithCompute{{endif}} +{{endif}} +{{if 'cudaMemcpySrcAccessOrder' in found_types}} + +class cudaMemcpySrcAccessOrder(IntEnum): + """ + + """ + {{if 'cudaMemcpySrcAccessOrderInvalid' in found_values}} + + #: Default invalid. + cudaMemcpySrcAccessOrderInvalid = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderInvalid{{endif}} + {{if 'cudaMemcpySrcAccessOrderStream' in found_values}} + + #: Indicates that access to the source pointer must be in stream order. + cudaMemcpySrcAccessOrderStream = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderStream{{endif}} + {{if 'cudaMemcpySrcAccessOrderDuringApiCall' in found_values}} + + #: Indicates that access to the source pointer can be out of stream + #: order and all accesses must be complete before the API call returns. + #: This flag is suited for ephemeral sources (ex., stack variables) + #: when it's known that no prior operations in the stream can be + #: accessing the memory and also that the lifetime of the memory is + #: limited to the scope that the source variable was declared in. + #: Specifying this flag allows the driver to optimize the copy and + #: removes the need for the user to synchronize the stream after the + #: API call. + cudaMemcpySrcAccessOrderDuringApiCall = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderDuringApiCall{{endif}} + {{if 'cudaMemcpySrcAccessOrderAny' in found_values}} + + #: Indicates that access to the source pointer can be out of stream + #: order and the accesses can happen even after the API call returns. + #: This flag is suited for host pointers allocated outside CUDA (ex., + #: via malloc) when it's known that no prior operations in the stream + #: can be accessing the memory. Specifying this flag allows the driver + #: to optimize the copy on certain platforms. + cudaMemcpySrcAccessOrderAny = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderAny{{endif}} + {{if 'cudaMemcpySrcAccessOrderMax' in found_values}} + cudaMemcpySrcAccessOrderMax = cyruntime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderMax{{endif}} +{{endif}} +{{if 'cudaMemcpy3DOperandType' in found_types}} + +class cudaMemcpy3DOperandType(IntEnum): + """ + These flags allow applications to convey the operand type for + individual copies specified in :py:obj:`~.cudaMemcpy3DBatchAsync`. + """ + {{if 'cudaMemcpyOperandTypePointer' in found_values}} + + #: Memcpy operand is a valid pointer. + cudaMemcpyOperandTypePointer = cyruntime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypePointer{{endif}} + {{if 'cudaMemcpyOperandTypeArray' in found_values}} + + #: Memcpy operand is a CUarray. + cudaMemcpyOperandTypeArray = cyruntime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeArray{{endif}} + {{if 'cudaMemcpyOperandTypeMax' in found_values}} + cudaMemcpyOperandTypeMax = cyruntime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeMax{{endif}} +{{endif}} {{if 'cudaDeviceP2PAttr' in found_types}} class cudaDeviceP2PAttr(IntEnum): @@ -3735,6 +3911,211 @@ class cudaExternalSemaphoreHandleType(IntEnum): #: semaphore cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = cyruntime.cudaExternalSemaphoreHandleType.cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32{{endif}} {{endif}} +{{if 'cudaJitOption' in found_types}} + +class cudaJitOption(IntEnum): + """ + Online compiler and linker options + """ + {{if 'cudaJitMaxRegisters' in found_values}} + + #: Max number of registers that a thread may use. + #: Option type: unsigned int + #: Applies to: compiler only + cudaJitMaxRegisters = cyruntime.cudaJitOption.cudaJitMaxRegisters{{endif}} + {{if 'cudaJitThreadsPerBlock' in found_values}} + + #: IN: Specifies minimum number of threads per block to target + #: compilation for + #: OUT: Returns the number of threads the compiler actually targeted. + #: This restricts the resource utilization of the compiler (e.g. max + #: registers) such that a block with the given number of threads should + #: be able to launch based on register limitations. Note, this option + #: does not currently take into account any other resource limitations, + #: such as shared memory utilization. + #: Option type: unsigned int + #: Applies to: compiler only + cudaJitThreadsPerBlock = cyruntime.cudaJitOption.cudaJitThreadsPerBlock{{endif}} + {{if 'cudaJitWallTime' in found_values}} + + #: Overwrites the option value with the total wall clock time, in + #: milliseconds, spent in the compiler and linker + #: Option type: float + #: Applies to: compiler and linker + cudaJitWallTime = cyruntime.cudaJitOption.cudaJitWallTime{{endif}} + {{if 'cudaJitInfoLogBuffer' in found_values}} + + #: Pointer to a buffer in which to print any log messages that are + #: informational in nature (the buffer size is specified via option + #: :py:obj:`~.cudaJitInfoLogBufferSizeBytes`) + #: Option type: char * + #: Applies to: compiler and linker + cudaJitInfoLogBuffer = cyruntime.cudaJitOption.cudaJitInfoLogBuffer{{endif}} + {{if 'cudaJitInfoLogBufferSizeBytes' in found_values}} + + #: IN: Log buffer size in bytes. Log messages will be capped at this + #: size (including null terminator) + #: OUT: Amount of log buffer filled with messages + #: Option type: unsigned int + #: Applies to: compiler and linker + cudaJitInfoLogBufferSizeBytes = cyruntime.cudaJitOption.cudaJitInfoLogBufferSizeBytes{{endif}} + {{if 'cudaJitErrorLogBuffer' in found_values}} + + #: Pointer to a buffer in which to print any log messages that reflect + #: errors (the buffer size is specified via option + #: :py:obj:`~.cudaJitErrorLogBufferSizeBytes`) + #: Option type: char * + #: Applies to: compiler and linker + cudaJitErrorLogBuffer = cyruntime.cudaJitOption.cudaJitErrorLogBuffer{{endif}} + {{if 'cudaJitErrorLogBufferSizeBytes' in found_values}} + + #: IN: Log buffer size in bytes. Log messages will be capped at this + #: size (including null terminator) + #: OUT: Amount of log buffer filled with messages + #: Option type: unsigned int + #: Applies to: compiler and linker + cudaJitErrorLogBufferSizeBytes = cyruntime.cudaJitOption.cudaJitErrorLogBufferSizeBytes{{endif}} + {{if 'cudaJitOptimizationLevel' in found_values}} + + #: Level of optimizations to apply to generated code (0 - 4), with 4 + #: being the default and highest level of optimizations. + #: Option type: unsigned int + #: Applies to: compiler only + cudaJitOptimizationLevel = cyruntime.cudaJitOption.cudaJitOptimizationLevel{{endif}} + {{if 'cudaJitFallbackStrategy' in found_values}} + + #: Specifies choice of fallback strategy if matching cubin is not + #: found. Choice is based on supplied :py:obj:`~.cudaJit_Fallback`. + #: Option type: unsigned int for enumerated type + #: :py:obj:`~.cudaJit_Fallback` + #: Applies to: compiler only + cudaJitFallbackStrategy = cyruntime.cudaJitOption.cudaJitFallbackStrategy{{endif}} + {{if 'cudaJitGenerateDebugInfo' in found_values}} + + #: Specifies whether to create debug information in output (-g) (0: + #: false, default) + #: Option type: int + #: Applies to: compiler and linker + cudaJitGenerateDebugInfo = cyruntime.cudaJitOption.cudaJitGenerateDebugInfo{{endif}} + {{if 'cudaJitLogVerbose' in found_values}} + + #: Generate verbose log messages (0: false, default) + #: Option type: int + #: Applies to: compiler and linker + cudaJitLogVerbose = cyruntime.cudaJitOption.cudaJitLogVerbose{{endif}} + {{if 'cudaJitGenerateLineInfo' in found_values}} + + #: Generate line number information (-lineinfo) (0: false, default) + #: Option type: int + #: Applies to: compiler only + cudaJitGenerateLineInfo = cyruntime.cudaJitOption.cudaJitGenerateLineInfo{{endif}} + {{if 'cudaJitCacheMode' in found_values}} + + #: Specifies whether to enable caching explicitly (-dlcm) + #: Choice is based on supplied :py:obj:`~.cudaJit_CacheMode`. + #: Option type: unsigned int for enumerated type + #: :py:obj:`~.cudaJit_CacheMode` + #: Applies to: compiler only + cudaJitCacheMode = cyruntime.cudaJitOption.cudaJitCacheMode{{endif}} + {{if 'cudaJitPositionIndependentCode' in found_values}} + + #: Generate position independent code (0: false) + #: Option type: int + #: Applies to: compiler only + cudaJitPositionIndependentCode = cyruntime.cudaJitOption.cudaJitPositionIndependentCode{{endif}} + {{if 'cudaJitMinCtaPerSm' in found_values}} + + #: This option hints to the JIT compiler the minimum number of CTAs + #: from the kernel’s grid to be mapped to a SM. This option is ignored + #: when used together with :py:obj:`~.cudaJitMaxRegisters` or + #: :py:obj:`~.cudaJitThreadsPerBlock`. Optimizations based on this + #: option need :py:obj:`~.cudaJitMaxThreadsPerBlock` to be specified as + #: well. For kernels already using PTX directive .minnctapersm, this + #: option will be ignored by default. Use + #: :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take + #: precedence over the PTX directive. Option type: unsigned int + #: Applies to: compiler only + cudaJitMinCtaPerSm = cyruntime.cudaJitOption.cudaJitMinCtaPerSm{{endif}} + {{if 'cudaJitMaxThreadsPerBlock' in found_values}} + + #: Maximum number threads in a thread block, computed as the product of + #: the maximum extent specifed for each dimension of the block. This + #: limit is guaranteed not to be exeeded in any invocation of the + #: kernel. Exceeding the the maximum number of threads results in + #: runtime error or kernel launch failure. For kernels already using + #: PTX directive .maxntid, this option will be ignored by default. Use + #: :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take + #: precedence over the PTX directive. Option type: int + #: Applies to: compiler only + cudaJitMaxThreadsPerBlock = cyruntime.cudaJitOption.cudaJitMaxThreadsPerBlock{{endif}} + {{if 'cudaJitOverrideDirectiveValues' in found_values}} + + #: This option lets the values specified using + #: :py:obj:`~.cudaJitMaxRegisters`, :py:obj:`~.cudaJitThreadsPerBlock`, + #: :py:obj:`~.cudaJitMaxThreadsPerBlock` and + #: :py:obj:`~.cudaJitMinCtaPerSm` take precedence over any PTX + #: directives. (0: Disable, default; 1: Enable) Option type: int + #: Applies to: compiler only + cudaJitOverrideDirectiveValues = cyruntime.cudaJitOption.cudaJitOverrideDirectiveValues{{endif}} +{{endif}} +{{if 'cudaLibraryOption' in found_types}} + +class cudaLibraryOption(IntEnum): + """ + Library options to be specified with + :py:obj:`~.cudaLibraryLoadData()` or + :py:obj:`~.cudaLibraryLoadFromFile()` + """ + {{if 'cudaLibraryHostUniversalFunctionAndDataTable' in found_values}} + cudaLibraryHostUniversalFunctionAndDataTable = cyruntime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable{{endif}} + {{if 'cudaLibraryBinaryIsPreserved' in found_values}} + + #: Specifes that the argument `code` passed to + #: :py:obj:`~.cudaLibraryLoadData()` will be preserved. Specifying this + #: option will let the driver know that `code` can be accessed at any + #: point until :py:obj:`~.cudaLibraryUnload()`. The default behavior is + #: for the driver to allocate and maintain its own copy of `code`. Note + #: that this is only a memory usage optimization hint and the driver + #: can choose to ignore it if required. Specifying this option with + #: :py:obj:`~.cudaLibraryLoadFromFile()` is invalid and will return + #: :py:obj:`~.cudaErrorInvalidValue`. + cudaLibraryBinaryIsPreserved = cyruntime.cudaLibraryOption.cudaLibraryBinaryIsPreserved{{endif}} +{{endif}} +{{if 'cudaJit_CacheMode' in found_types}} + +class cudaJit_CacheMode(IntEnum): + """ + Caching modes for dlcm + """ + {{if 'cudaJitCacheOptionNone' in found_values}} + + #: Compile with no -dlcm flag specified + cudaJitCacheOptionNone = cyruntime.cudaJit_CacheMode.cudaJitCacheOptionNone{{endif}} + {{if 'cudaJitCacheOptionCG' in found_values}} + + #: Compile with L1 cache disabled + cudaJitCacheOptionCG = cyruntime.cudaJit_CacheMode.cudaJitCacheOptionCG{{endif}} + {{if 'cudaJitCacheOptionCA' in found_values}} + + #: Compile with L1 cache enabled + cudaJitCacheOptionCA = cyruntime.cudaJit_CacheMode.cudaJitCacheOptionCA{{endif}} +{{endif}} +{{if 'cudaJit_Fallback' in found_types}} + +class cudaJit_Fallback(IntEnum): + """ + Cubin matching fallback strategies + """ + {{if 'cudaPreferPtx' in found_values}} + + #: Prefer to compile ptx if exact binary match not found + cudaPreferPtx = cyruntime.cudaJit_Fallback.cudaPreferPtx{{endif}} + {{if 'cudaPreferBinary' in found_values}} + + #: Prefer to fall back to compatible binary code if exact match not + #: found + cudaPreferBinary = cyruntime.cudaJit_Fallback.cudaPreferBinary{{endif}} +{{endif}} {{if 'cudaCGScope' in found_types}} class cudaCGScope(IntEnum): @@ -3773,14 +4154,21 @@ class cudaGraphConditionalNodeType(IntEnum): """ {{if 'cudaGraphCondTypeIf' in found_values}} - #: Conditional 'if' Node. Body executed once if condition value is non- - #: zero. + #: Conditional 'if/else' Node. Body[0] executed if condition is non- + #: zero. If `size` == 2, an optional ELSE graph is created and this is + #: executed if the condition is zero. cudaGraphCondTypeIf = cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeIf{{endif}} {{if 'cudaGraphCondTypeWhile' in found_values}} #: Conditional 'while' Node. Body executed repeatedly while condition #: value is non-zero. cudaGraphCondTypeWhile = cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeWhile{{endif}} + {{if 'cudaGraphCondTypeSwitch' in found_values}} + + #: Conditional 'switch' Node. Body[n] is executed once, where 'n' is + #: the value of the condition. If the condition does not match a body + #: index, no body is launched. + cudaGraphCondTypeSwitch = cyruntime.cudaGraphConditionalNodeType.cudaGraphCondTypeSwitch{{endif}} {{endif}} {{if 'cudaGraphNodeType' in found_types}} @@ -4305,6 +4693,41 @@ class cudaStreamAttrID(IntEnum): #: Valid for streams, graph nodes, launches. See #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. cudaLaunchAttributeMemSyncDomain = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain{{endif}} + {{if 'cudaLaunchAttributePreferredClusterDimension' in found_values}} + + #: Valid for graph nodes and launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow + #: the kernel launch to specify a preferred substitute cluster + #: dimension. Blocks may be grouped according to either the dimensions + #: specified with this attribute (grouped into a "preferred substitute + #: cluster"), or the one specified with + #: :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + cudaLaunchAttributePreferredClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension{{endif}} {{if 'cudaLaunchAttributeLaunchCompletionEvent' in found_values}} #: Valid for launches. Set @@ -4459,6 +4882,41 @@ class cudaKernelNodeAttrID(IntEnum): #: Valid for streams, graph nodes, launches. See #: :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. cudaLaunchAttributeMemSyncDomain = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributeMemSyncDomain{{endif}} + {{if 'cudaLaunchAttributePreferredClusterDimension' in found_values}} + + #: Valid for graph nodes and launches. Set + #: :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow + #: the kernel launch to specify a preferred substitute cluster + #: dimension. Blocks may be grouped according to either the dimensions + #: specified with this attribute (grouped into a "preferred substitute + #: cluster"), or the one specified with + #: :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped + #: into a "regular cluster"). The cluster dimensions of a "preferred + #: substitute cluster" shall be an integer multiple greater than zero + #: of the regular cluster dimensions. The device will attempt - on a + #: best-effort basis - to group thread blocks into preferred clusters + #: over grouping them into regular clusters. When it deems necessary + #: (primarily when the device temporarily runs out of physical + #: resources to launch the larger preferred clusters), the device may + #: switch to launch the regular clusters instead to attempt to utilize + #: as much of the physical device resources as possible. + #: Each type of cluster will have its enumeration / coordinate setup + #: as if the grid consists solely of its type of cluster. For example, + #: if the preferred substitute cluster dimensions double the regular + #: cluster dimensions, there might be simultaneously a regular cluster + #: indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In + #: this example, the preferred substitute cluster (1,0,0) replaces + #: regular clusters (2,0,0) and (3,0,0) and groups their blocks. + #: This attribute will only take effect when a regular cluster + #: dimension has been specified. The preferred substitute cluster + #: dimension must be an integer multiple greater than zero of the + #: regular cluster dimension and must divide the grid. It must also be + #: no more than `maxBlocksPerCluster`, if it is set in the kernel's + #: `__launch_bounds__`. Otherwise it must be less than the maximum + #: value the driver can support. Otherwise, setting this attribute to a + #: value physically unable to fit on any particular device is + #: permitted. + cudaLaunchAttributePreferredClusterDimension = cyruntime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension{{endif}} {{if 'cudaLaunchAttributeLaunchCompletionEvent' in found_values}} #: Valid for launches. Set @@ -4542,10 +5000,10 @@ cdef class cudaArray_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4553,9 +5011,9 @@ cdef class cudaArray_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaArray_const_t' in found_types}} @@ -4573,10 +5031,10 @@ cdef class cudaArray_const_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4584,9 +5042,9 @@ cdef class cudaArray_const_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaMipmappedArray_t' in found_types}} @@ -4604,10 +5062,10 @@ cdef class cudaMipmappedArray_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4615,9 +5073,9 @@ cdef class cudaMipmappedArray_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaMipmappedArray_const_t' in found_types}} @@ -4635,10 +5093,10 @@ cdef class cudaMipmappedArray_const_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4646,9 +5104,9 @@ cdef class cudaMipmappedArray_const_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaGraphicsResource_t' in found_types}} @@ -4666,10 +5124,10 @@ cdef class cudaGraphicsResource_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4677,9 +5135,9 @@ cdef class cudaGraphicsResource_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaExternalMemory_t' in found_types}} @@ -4697,10 +5155,10 @@ cdef class cudaExternalMemory_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4708,9 +5166,9 @@ cdef class cudaExternalMemory_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaExternalSemaphore_t' in found_types}} @@ -4728,10 +5186,10 @@ cdef class cudaExternalSemaphore_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4739,9 +5197,9 @@ cdef class cudaExternalSemaphore_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaKernel_t' in found_types}} @@ -4759,10 +5217,10 @@ cdef class cudaKernel_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4770,9 +5228,40 @@ cdef class cudaKernel_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr +{{endif}} + +{{if 'cudaLibrary_t' in found_types}} + +cdef class cudaLibrary_t: + """ + + CUDA library + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __int__(self): + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaGraphDeviceNode_t' in found_types}} @@ -4790,10 +5279,10 @@ cdef class cudaGraphDeviceNode_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4801,9 +5290,9 @@ cdef class cudaGraphDeviceNode_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaAsyncCallbackHandle_t' in found_types}} @@ -4821,10 +5310,10 @@ cdef class cudaAsyncCallbackHandle_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4832,9 +5321,9 @@ cdef class cudaAsyncCallbackHandle_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -4850,10 +5339,10 @@ cdef class EGLImageKHR: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4861,9 +5350,9 @@ cdef class EGLImageKHR: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -4879,10 +5368,10 @@ cdef class EGLStreamKHR: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4890,9 +5379,9 @@ cdef class EGLStreamKHR: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -4908,10 +5397,10 @@ cdef class EGLSyncKHR: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4919,9 +5408,9 @@ cdef class EGLSyncKHR: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaHostFn_t' in found_types}} @@ -4937,10 +5426,10 @@ cdef class cudaHostFn_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4948,9 +5437,9 @@ cdef class cudaHostFn_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaAsyncCallback' in found_types}} @@ -4966,10 +5455,10 @@ cdef class cudaAsyncCallback: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -4977,9 +5466,9 @@ cdef class cudaAsyncCallback: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaStreamCallback_t' in found_types}} @@ -4995,10 +5484,10 @@ cdef class cudaStreamCallback_t: """ def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val - self._ptr[0] = init_value + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, *args, **kwargs): pass def __repr__(self): @@ -5006,79 +5495,96 @@ cdef class cudaStreamCallback_t: def __index__(self): return self.__int__() def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} -{{if 'struct dim3' in found_types}} +{{if 'dim3' in found_struct}} cdef class dim3: """ Attributes ---------- + {{if 'dim3.x' in found_struct}} x : unsigned int + {{endif}} + {{if 'dim3.y' in found_struct}} y : unsigned int + {{endif}} + {{if 'dim3.z' in found_struct}} z : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'dim3.x' in found_struct}} try: str_list += ['x : ' + str(self.x)] except ValueError: str_list += ['x : '] + {{endif}} + {{if 'dim3.y' in found_struct}} try: str_list += ['y : ' + str(self.y)] except ValueError: str_list += ['y : '] + {{endif}} + {{if 'dim3.z' in found_struct}} try: str_list += ['z : ' + str(self.z)] except ValueError: str_list += ['z : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'dim3.x' in found_struct}} @property def x(self): - return self._ptr[0].x + return self._pvt_ptr[0].x @x.setter def x(self, unsigned int x): - self._ptr[0].x = x + self._pvt_ptr[0].x = x + {{endif}} + {{if 'dim3.y' in found_struct}} @property def y(self): - return self._ptr[0].y + return self._pvt_ptr[0].y @y.setter def y(self, unsigned int y): - self._ptr[0].y = y + self._pvt_ptr[0].y = y + {{endif}} + {{if 'dim3.z' in found_struct}} @property def z(self): - return self._ptr[0].z + return self._pvt_ptr[0].z @z.setter def z(self, unsigned int z): - self._ptr[0].z = z + self._pvt_ptr[0].z = z + {{endif}} {{endif}} -{{if 'struct cudaChannelFormatDesc' in found_types}} +{{if 'cudaChannelFormatDesc' in found_struct}} cdef class cudaChannelFormatDesc: """ @@ -5086,157 +5592,203 @@ cdef class cudaChannelFormatDesc: Attributes ---------- + {{if 'cudaChannelFormatDesc.x' in found_struct}} x : int x + {{endif}} + {{if 'cudaChannelFormatDesc.y' in found_struct}} y : int y + {{endif}} + {{if 'cudaChannelFormatDesc.z' in found_struct}} z : int z + {{endif}} + {{if 'cudaChannelFormatDesc.w' in found_struct}} w : int w + {{endif}} + {{if 'cudaChannelFormatDesc.f' in found_struct}} f : cudaChannelFormatKind Channel format kind + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaChannelFormatDesc.x' in found_struct}} try: str_list += ['x : ' + str(self.x)] except ValueError: str_list += ['x : '] + {{endif}} + {{if 'cudaChannelFormatDesc.y' in found_struct}} try: str_list += ['y : ' + str(self.y)] except ValueError: str_list += ['y : '] + {{endif}} + {{if 'cudaChannelFormatDesc.z' in found_struct}} try: str_list += ['z : ' + str(self.z)] except ValueError: str_list += ['z : '] + {{endif}} + {{if 'cudaChannelFormatDesc.w' in found_struct}} try: str_list += ['w : ' + str(self.w)] except ValueError: str_list += ['w : '] + {{endif}} + {{if 'cudaChannelFormatDesc.f' in found_struct}} try: str_list += ['f : ' + str(self.f)] except ValueError: str_list += ['f : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaChannelFormatDesc.x' in found_struct}} @property def x(self): - return self._ptr[0].x + return self._pvt_ptr[0].x @x.setter def x(self, int x): - self._ptr[0].x = x + self._pvt_ptr[0].x = x + {{endif}} + {{if 'cudaChannelFormatDesc.y' in found_struct}} @property def y(self): - return self._ptr[0].y + return self._pvt_ptr[0].y @y.setter def y(self, int y): - self._ptr[0].y = y + self._pvt_ptr[0].y = y + {{endif}} + {{if 'cudaChannelFormatDesc.z' in found_struct}} @property def z(self): - return self._ptr[0].z + return self._pvt_ptr[0].z @z.setter def z(self, int z): - self._ptr[0].z = z + self._pvt_ptr[0].z = z + {{endif}} + {{if 'cudaChannelFormatDesc.w' in found_struct}} @property def w(self): - return self._ptr[0].w + return self._pvt_ptr[0].w @w.setter def w(self, int w): - self._ptr[0].w = w + self._pvt_ptr[0].w = w + {{endif}} + {{if 'cudaChannelFormatDesc.f' in found_struct}} @property def f(self): - return cudaChannelFormatKind(self._ptr[0].f) + return cudaChannelFormatKind(self._pvt_ptr[0].f) @f.setter def f(self, f not None : cudaChannelFormatKind): - self._ptr[0].f = f.value + self._pvt_ptr[0].f = f.value + {{endif}} {{endif}} -{{if 'struct cudaArraySparseProperties' in found_types}} +{{if 'cudaArraySparseProperties.tileExtent' in found_struct}} cdef class anon_struct0: """ Attributes ---------- + {{if 'cudaArraySparseProperties.tileExtent.width' in found_struct}} width : unsigned int + {{endif}} + {{if 'cudaArraySparseProperties.tileExtent.height' in found_struct}} height : unsigned int + {{endif}} + {{if 'cudaArraySparseProperties.tileExtent.depth' in found_struct}} depth : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].tileExtent + return &self._pvt_ptr[0].tileExtent def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaArraySparseProperties.tileExtent.width' in found_struct}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if 'cudaArraySparseProperties.tileExtent.height' in found_struct}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} + {{if 'cudaArraySparseProperties.tileExtent.depth' in found_struct}} try: str_list += ['depth : ' + str(self.depth)] except ValueError: str_list += ['depth : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaArraySparseProperties.tileExtent.width' in found_struct}} @property def width(self): - return self._ptr[0].tileExtent.width + return self._pvt_ptr[0].tileExtent.width @width.setter def width(self, unsigned int width): - self._ptr[0].tileExtent.width = width + self._pvt_ptr[0].tileExtent.width = width + {{endif}} + {{if 'cudaArraySparseProperties.tileExtent.height' in found_struct}} @property def height(self): - return self._ptr[0].tileExtent.height + return self._pvt_ptr[0].tileExtent.height @height.setter def height(self, unsigned int height): - self._ptr[0].tileExtent.height = height + self._pvt_ptr[0].tileExtent.height = height + {{endif}} + {{if 'cudaArraySparseProperties.tileExtent.depth' in found_struct}} @property def depth(self): - return self._ptr[0].tileExtent.depth + return self._pvt_ptr[0].tileExtent.depth @depth.setter def depth(self, unsigned int depth): - self._ptr[0].tileExtent.depth = depth + self._pvt_ptr[0].tileExtent.depth = depth + {{endif}} {{endif}} -{{if 'struct cudaArraySparseProperties' in found_types}} +{{if 'cudaArraySparseProperties' in found_struct}} cdef class cudaArraySparseProperties: """ @@ -5244,92 +5796,124 @@ cdef class cudaArraySparseProperties: Attributes ---------- + {{if 'cudaArraySparseProperties.tileExtent' in found_struct}} tileExtent : anon_struct0 + {{endif}} + {{if 'cudaArraySparseProperties.miptailFirstLevel' in found_struct}} miptailFirstLevel : unsigned int First mip level at which the mip tail begins + {{endif}} + {{if 'cudaArraySparseProperties.miptailSize' in found_struct}} miptailSize : unsigned long long Total size of the mip tail. + {{endif}} + {{if 'cudaArraySparseProperties.flags' in found_struct}} flags : unsigned int Flags will either be zero or cudaArraySparsePropertiesSingleMipTail + {{endif}} + {{if 'cudaArraySparseProperties.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._tileExtent = anon_struct0(_ptr=self._ptr) + pass + {{if 'cudaArraySparseProperties.tileExtent' in found_struct}} + self._tileExtent = anon_struct0(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaArraySparseProperties.tileExtent' in found_struct}} try: str_list += ['tileExtent :\n' + '\n'.join([' ' + line for line in str(self.tileExtent).splitlines()])] except ValueError: str_list += ['tileExtent : '] + {{endif}} + {{if 'cudaArraySparseProperties.miptailFirstLevel' in found_struct}} try: str_list += ['miptailFirstLevel : ' + str(self.miptailFirstLevel)] except ValueError: str_list += ['miptailFirstLevel : '] + {{endif}} + {{if 'cudaArraySparseProperties.miptailSize' in found_struct}} try: str_list += ['miptailSize : ' + str(self.miptailSize)] except ValueError: str_list += ['miptailSize : '] + {{endif}} + {{if 'cudaArraySparseProperties.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'cudaArraySparseProperties.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaArraySparseProperties.tileExtent' in found_struct}} @property def tileExtent(self): return self._tileExtent @tileExtent.setter def tileExtent(self, tileExtent not None : anon_struct0): - string.memcpy(&self._ptr[0].tileExtent, tileExtent.getPtr(), sizeof(self._ptr[0].tileExtent)) + string.memcpy(&self._pvt_ptr[0].tileExtent, tileExtent.getPtr(), sizeof(self._pvt_ptr[0].tileExtent)) + {{endif}} + {{if 'cudaArraySparseProperties.miptailFirstLevel' in found_struct}} @property def miptailFirstLevel(self): - return self._ptr[0].miptailFirstLevel + return self._pvt_ptr[0].miptailFirstLevel @miptailFirstLevel.setter def miptailFirstLevel(self, unsigned int miptailFirstLevel): - self._ptr[0].miptailFirstLevel = miptailFirstLevel + self._pvt_ptr[0].miptailFirstLevel = miptailFirstLevel + {{endif}} + {{if 'cudaArraySparseProperties.miptailSize' in found_struct}} @property def miptailSize(self): - return self._ptr[0].miptailSize + return self._pvt_ptr[0].miptailSize @miptailSize.setter def miptailSize(self, unsigned long long miptailSize): - self._ptr[0].miptailSize = miptailSize + self._pvt_ptr[0].miptailSize = miptailSize + {{endif}} + {{if 'cudaArraySparseProperties.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'cudaArraySparseProperties.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct cudaArrayMemoryRequirements' in found_types}} +{{if 'cudaArrayMemoryRequirements' in found_struct}} cdef class cudaArrayMemoryRequirements: """ @@ -5337,68 +5921,85 @@ cdef class cudaArrayMemoryRequirements: Attributes ---------- + {{if 'cudaArrayMemoryRequirements.size' in found_struct}} size : size_t Total size of the array. + {{endif}} + {{if 'cudaArrayMemoryRequirements.alignment' in found_struct}} alignment : size_t Alignment necessary for mapping the array. + {{endif}} + {{if 'cudaArrayMemoryRequirements.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaArrayMemoryRequirements.size' in found_struct}} try: str_list += ['size : ' + str(self.size)] except ValueError: str_list += ['size : '] + {{endif}} + {{if 'cudaArrayMemoryRequirements.alignment' in found_struct}} try: str_list += ['alignment : ' + str(self.alignment)] except ValueError: str_list += ['alignment : '] + {{endif}} + {{if 'cudaArrayMemoryRequirements.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaArrayMemoryRequirements.size' in found_struct}} @property def size(self): - return self._ptr[0].size + return self._pvt_ptr[0].size @size.setter def size(self, size_t size): - self._ptr[0].size = size + self._pvt_ptr[0].size = size + {{endif}} + {{if 'cudaArrayMemoryRequirements.alignment' in found_struct}} @property def alignment(self): - return self._ptr[0].alignment + return self._pvt_ptr[0].alignment @alignment.setter def alignment(self, size_t alignment): - self._ptr[0].alignment = alignment + self._pvt_ptr[0].alignment = alignment + {{endif}} + {{if 'cudaArrayMemoryRequirements.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct cudaPitchedPtr' in found_types}} +{{if 'cudaPitchedPtr' in found_struct}} cdef class cudaPitchedPtr: """ @@ -5406,81 +6007,104 @@ cdef class cudaPitchedPtr: Attributes ---------- + {{if 'cudaPitchedPtr.ptr' in found_struct}} ptr : Any Pointer to allocated memory + {{endif}} + {{if 'cudaPitchedPtr.pitch' in found_struct}} pitch : size_t Pitch of allocated memory in bytes + {{endif}} + {{if 'cudaPitchedPtr.xsize' in found_struct}} xsize : size_t Logical width of allocation in elements + {{endif}} + {{if 'cudaPitchedPtr.ysize' in found_struct}} ysize : size_t Logical height of allocation in elements + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaPitchedPtr.ptr' in found_struct}} try: str_list += ['ptr : ' + hex(self.ptr)] except ValueError: str_list += ['ptr : '] + {{endif}} + {{if 'cudaPitchedPtr.pitch' in found_struct}} try: str_list += ['pitch : ' + str(self.pitch)] except ValueError: str_list += ['pitch : '] + {{endif}} + {{if 'cudaPitchedPtr.xsize' in found_struct}} try: str_list += ['xsize : ' + str(self.xsize)] except ValueError: str_list += ['xsize : '] + {{endif}} + {{if 'cudaPitchedPtr.ysize' in found_struct}} try: str_list += ['ysize : ' + str(self.ysize)] except ValueError: str_list += ['ysize : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaPitchedPtr.ptr' in found_struct}} @property def ptr(self): - return self._ptr[0].ptr + return self._pvt_ptr[0].ptr @ptr.setter def ptr(self, ptr): - _cyptr = utils.HelperInputVoidPtr(ptr) - self._ptr[0].ptr = _cyptr.cptr + _cptr = utils.HelperInputVoidPtr(ptr) + self._pvt_ptr[0].ptr = _cptr.cptr + {{endif}} + {{if 'cudaPitchedPtr.pitch' in found_struct}} @property def pitch(self): - return self._ptr[0].pitch + return self._pvt_ptr[0].pitch @pitch.setter def pitch(self, size_t pitch): - self._ptr[0].pitch = pitch + self._pvt_ptr[0].pitch = pitch + {{endif}} + {{if 'cudaPitchedPtr.xsize' in found_struct}} @property def xsize(self): - return self._ptr[0].xsize + return self._pvt_ptr[0].xsize @xsize.setter def xsize(self, size_t xsize): - self._ptr[0].xsize = xsize + self._pvt_ptr[0].xsize = xsize + {{endif}} + {{if 'cudaPitchedPtr.ysize' in found_struct}} @property def ysize(self): - return self._ptr[0].ysize + return self._pvt_ptr[0].ysize @ysize.setter def ysize(self, size_t ysize): - self._ptr[0].ysize = ysize + self._pvt_ptr[0].ysize = ysize + {{endif}} {{endif}} -{{if 'struct cudaExtent' in found_types}} +{{if 'cudaExtent' in found_struct}} cdef class cudaExtent: """ @@ -5488,69 +6112,86 @@ cdef class cudaExtent: Attributes ---------- + {{if 'cudaExtent.width' in found_struct}} width : size_t Width in elements when referring to array memory, in bytes when referring to linear memory + {{endif}} + {{if 'cudaExtent.height' in found_struct}} height : size_t Height in elements + {{endif}} + {{if 'cudaExtent.depth' in found_struct}} depth : size_t Depth in elements + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExtent.width' in found_struct}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if 'cudaExtent.height' in found_struct}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} + {{if 'cudaExtent.depth' in found_struct}} try: str_list += ['depth : ' + str(self.depth)] except ValueError: str_list += ['depth : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExtent.width' in found_struct}} @property def width(self): - return self._ptr[0].width + return self._pvt_ptr[0].width @width.setter def width(self, size_t width): - self._ptr[0].width = width + self._pvt_ptr[0].width = width + {{endif}} + {{if 'cudaExtent.height' in found_struct}} @property def height(self): - return self._ptr[0].height + return self._pvt_ptr[0].height @height.setter def height(self, size_t height): - self._ptr[0].height = height + self._pvt_ptr[0].height = height + {{endif}} + {{if 'cudaExtent.depth' in found_struct}} @property def depth(self): - return self._ptr[0].depth + return self._pvt_ptr[0].depth @depth.setter def depth(self, size_t depth): - self._ptr[0].depth = depth + self._pvt_ptr[0].depth = depth + {{endif}} {{endif}} -{{if 'struct cudaPos' in found_types}} +{{if 'cudaPos' in found_struct}} cdef class cudaPos: """ @@ -5558,68 +6199,85 @@ cdef class cudaPos: Attributes ---------- + {{if 'cudaPos.x' in found_struct}} x : size_t x + {{endif}} + {{if 'cudaPos.y' in found_struct}} y : size_t y + {{endif}} + {{if 'cudaPos.z' in found_struct}} z : size_t z + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaPos.x' in found_struct}} try: str_list += ['x : ' + str(self.x)] except ValueError: str_list += ['x : '] + {{endif}} + {{if 'cudaPos.y' in found_struct}} try: str_list += ['y : ' + str(self.y)] except ValueError: str_list += ['y : '] + {{endif}} + {{if 'cudaPos.z' in found_struct}} try: str_list += ['z : ' + str(self.z)] except ValueError: str_list += ['z : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaPos.x' in found_struct}} @property def x(self): - return self._ptr[0].x + return self._pvt_ptr[0].x @x.setter def x(self, size_t x): - self._ptr[0].x = x + self._pvt_ptr[0].x = x + {{endif}} + {{if 'cudaPos.y' in found_struct}} @property def y(self): - return self._ptr[0].y + return self._pvt_ptr[0].y @y.setter def y(self, size_t y): - self._ptr[0].y = y + self._pvt_ptr[0].y = y + {{endif}} + {{if 'cudaPos.z' in found_struct}} @property def z(self): - return self._ptr[0].z + return self._pvt_ptr[0].z @z.setter def z(self, size_t z): - self._ptr[0].z = z + self._pvt_ptr[0].z = z + {{endif}} {{endif}} -{{if 'struct cudaMemcpy3DParms' in found_types}} +{{if 'cudaMemcpy3DParms' in found_struct}} cdef class cudaMemcpy3DParms: """ @@ -5627,84 +6285,131 @@ cdef class cudaMemcpy3DParms: Attributes ---------- + {{if 'cudaMemcpy3DParms.srcArray' in found_struct}} srcArray : cudaArray_t Source memory address + {{endif}} + {{if 'cudaMemcpy3DParms.srcPos' in found_struct}} srcPos : cudaPos Source position offset + {{endif}} + {{if 'cudaMemcpy3DParms.srcPtr' in found_struct}} srcPtr : cudaPitchedPtr Pitched source memory address + {{endif}} + {{if 'cudaMemcpy3DParms.dstArray' in found_struct}} dstArray : cudaArray_t Destination memory address + {{endif}} + {{if 'cudaMemcpy3DParms.dstPos' in found_struct}} dstPos : cudaPos Destination position offset + {{endif}} + {{if 'cudaMemcpy3DParms.dstPtr' in found_struct}} dstPtr : cudaPitchedPtr Pitched destination memory address + {{endif}} + {{if 'cudaMemcpy3DParms.extent' in found_struct}} extent : cudaExtent Requested memory copy size + {{endif}} + {{if 'cudaMemcpy3DParms.kind' in found_struct}} kind : cudaMemcpyKind Type of transfer + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._srcArray = cudaArray_t(_ptr=&self._ptr[0].srcArray) - self._srcPos = cudaPos(_ptr=&self._ptr[0].srcPos) - self._srcPtr = cudaPitchedPtr(_ptr=&self._ptr[0].srcPtr) - self._dstArray = cudaArray_t(_ptr=&self._ptr[0].dstArray) - self._dstPos = cudaPos(_ptr=&self._ptr[0].dstPos) - self._dstPtr = cudaPitchedPtr(_ptr=&self._ptr[0].dstPtr) - self._extent = cudaExtent(_ptr=&self._ptr[0].extent) + pass + {{if 'cudaMemcpy3DParms.srcArray' in found_struct}} + self._srcArray = cudaArray_t(_ptr=&self._pvt_ptr[0].srcArray) + {{endif}} + {{if 'cudaMemcpy3DParms.srcPos' in found_struct}} + self._srcPos = cudaPos(_ptr=&self._pvt_ptr[0].srcPos) + {{endif}} + {{if 'cudaMemcpy3DParms.srcPtr' in found_struct}} + self._srcPtr = cudaPitchedPtr(_ptr=&self._pvt_ptr[0].srcPtr) + {{endif}} + {{if 'cudaMemcpy3DParms.dstArray' in found_struct}} + self._dstArray = cudaArray_t(_ptr=&self._pvt_ptr[0].dstArray) + {{endif}} + {{if 'cudaMemcpy3DParms.dstPos' in found_struct}} + self._dstPos = cudaPos(_ptr=&self._pvt_ptr[0].dstPos) + {{endif}} + {{if 'cudaMemcpy3DParms.dstPtr' in found_struct}} + self._dstPtr = cudaPitchedPtr(_ptr=&self._pvt_ptr[0].dstPtr) + {{endif}} + {{if 'cudaMemcpy3DParms.extent' in found_struct}} + self._extent = cudaExtent(_ptr=&self._pvt_ptr[0].extent) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemcpy3DParms.srcArray' in found_struct}} try: str_list += ['srcArray : ' + str(self.srcArray)] except ValueError: str_list += ['srcArray : '] + {{endif}} + {{if 'cudaMemcpy3DParms.srcPos' in found_struct}} try: str_list += ['srcPos :\n' + '\n'.join([' ' + line for line in str(self.srcPos).splitlines()])] except ValueError: str_list += ['srcPos : '] + {{endif}} + {{if 'cudaMemcpy3DParms.srcPtr' in found_struct}} try: str_list += ['srcPtr :\n' + '\n'.join([' ' + line for line in str(self.srcPtr).splitlines()])] except ValueError: str_list += ['srcPtr : '] + {{endif}} + {{if 'cudaMemcpy3DParms.dstArray' in found_struct}} try: str_list += ['dstArray : ' + str(self.dstArray)] except ValueError: str_list += ['dstArray : '] + {{endif}} + {{if 'cudaMemcpy3DParms.dstPos' in found_struct}} try: str_list += ['dstPos :\n' + '\n'.join([' ' + line for line in str(self.dstPos).splitlines()])] except ValueError: str_list += ['dstPos : '] + {{endif}} + {{if 'cudaMemcpy3DParms.dstPtr' in found_struct}} try: str_list += ['dstPtr :\n' + '\n'.join([' ' + line for line in str(self.dstPtr).splitlines()])] except ValueError: str_list += ['dstPtr : '] + {{endif}} + {{if 'cudaMemcpy3DParms.extent' in found_struct}} try: str_list += ['extent :\n' + '\n'.join([' ' + line for line in str(self.extent).splitlines()])] except ValueError: str_list += ['extent : '] + {{endif}} + {{if 'cudaMemcpy3DParms.kind' in found_struct}} try: str_list += ['kind : ' + str(self.kind)] except ValueError: str_list += ['kind : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemcpy3DParms.srcArray' in found_struct}} @property def srcArray(self): return self._srcArray @@ -5719,19 +6424,25 @@ cdef class cudaMemcpy3DParms: else: psrcArray = int(cudaArray_t(srcArray)) cysrcArray = psrcArray - self._srcArray._ptr[0] = cysrcArray + self._srcArray._pvt_ptr[0] = cysrcArray + {{endif}} + {{if 'cudaMemcpy3DParms.srcPos' in found_struct}} @property def srcPos(self): return self._srcPos @srcPos.setter def srcPos(self, srcPos not None : cudaPos): - string.memcpy(&self._ptr[0].srcPos, srcPos.getPtr(), sizeof(self._ptr[0].srcPos)) + string.memcpy(&self._pvt_ptr[0].srcPos, srcPos.getPtr(), sizeof(self._pvt_ptr[0].srcPos)) + {{endif}} + {{if 'cudaMemcpy3DParms.srcPtr' in found_struct}} @property def srcPtr(self): return self._srcPtr @srcPtr.setter def srcPtr(self, srcPtr not None : cudaPitchedPtr): - string.memcpy(&self._ptr[0].srcPtr, srcPtr.getPtr(), sizeof(self._ptr[0].srcPtr)) + string.memcpy(&self._pvt_ptr[0].srcPtr, srcPtr.getPtr(), sizeof(self._pvt_ptr[0].srcPtr)) + {{endif}} + {{if 'cudaMemcpy3DParms.dstArray' in found_struct}} @property def dstArray(self): return self._dstArray @@ -5746,33 +6457,42 @@ cdef class cudaMemcpy3DParms: else: pdstArray = int(cudaArray_t(dstArray)) cydstArray = pdstArray - self._dstArray._ptr[0] = cydstArray + self._dstArray._pvt_ptr[0] = cydstArray + {{endif}} + {{if 'cudaMemcpy3DParms.dstPos' in found_struct}} @property def dstPos(self): return self._dstPos @dstPos.setter def dstPos(self, dstPos not None : cudaPos): - string.memcpy(&self._ptr[0].dstPos, dstPos.getPtr(), sizeof(self._ptr[0].dstPos)) + string.memcpy(&self._pvt_ptr[0].dstPos, dstPos.getPtr(), sizeof(self._pvt_ptr[0].dstPos)) + {{endif}} + {{if 'cudaMemcpy3DParms.dstPtr' in found_struct}} @property def dstPtr(self): return self._dstPtr @dstPtr.setter def dstPtr(self, dstPtr not None : cudaPitchedPtr): - string.memcpy(&self._ptr[0].dstPtr, dstPtr.getPtr(), sizeof(self._ptr[0].dstPtr)) + string.memcpy(&self._pvt_ptr[0].dstPtr, dstPtr.getPtr(), sizeof(self._pvt_ptr[0].dstPtr)) + {{endif}} + {{if 'cudaMemcpy3DParms.extent' in found_struct}} @property def extent(self): return self._extent @extent.setter def extent(self, extent not None : cudaExtent): - string.memcpy(&self._ptr[0].extent, extent.getPtr(), sizeof(self._ptr[0].extent)) + string.memcpy(&self._pvt_ptr[0].extent, extent.getPtr(), sizeof(self._pvt_ptr[0].extent)) + {{endif}} + {{if 'cudaMemcpy3DParms.kind' in found_struct}} @property def kind(self): - return cudaMemcpyKind(self._ptr[0].kind) + return cudaMemcpyKind(self._pvt_ptr[0].kind) @kind.setter def kind(self, kind not None : cudaMemcpyKind): - self._ptr[0].kind = kind.value + self._pvt_ptr[0].kind = kind.value + {{endif}} {{endif}} -{{if 'struct cudaMemcpyNodeParams' in found_types}} +{{if 'cudaMemcpyNodeParams' in found_struct}} cdef class cudaMemcpyNodeParams: """ @@ -5780,68 +6500,88 @@ cdef class cudaMemcpyNodeParams: Attributes ---------- + {{if 'cudaMemcpyNodeParams.flags' in found_struct}} flags : int Must be zero + {{endif}} + {{if 'cudaMemcpyNodeParams.reserved' in found_struct}} reserved : List[int] Must be zero + {{endif}} + {{if 'cudaMemcpyNodeParams.copyParams' in found_struct}} copyParams : cudaMemcpy3DParms Parameters for the memory copy + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._copyParams = cudaMemcpy3DParms(_ptr=&self._ptr[0].copyParams) + pass + {{if 'cudaMemcpyNodeParams.copyParams' in found_struct}} + self._copyParams = cudaMemcpy3DParms(_ptr=&self._pvt_ptr[0].copyParams) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemcpyNodeParams.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'cudaMemcpyNodeParams.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} + {{if 'cudaMemcpyNodeParams.copyParams' in found_struct}} try: str_list += ['copyParams :\n' + '\n'.join([' ' + line for line in str(self.copyParams).splitlines()])] except ValueError: str_list += ['copyParams : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemcpyNodeParams.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'cudaMemcpyNodeParams.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} + {{if 'cudaMemcpyNodeParams.copyParams' in found_struct}} @property def copyParams(self): return self._copyParams @copyParams.setter def copyParams(self, copyParams not None : cudaMemcpy3DParms): - string.memcpy(&self._ptr[0].copyParams, copyParams.getPtr(), sizeof(self._ptr[0].copyParams)) + string.memcpy(&self._pvt_ptr[0].copyParams, copyParams.getPtr(), sizeof(self._pvt_ptr[0].copyParams)) + {{endif}} {{endif}} -{{if 'struct cudaMemcpy3DPeerParms' in found_types}} +{{if 'cudaMemcpy3DPeerParms' in found_struct}} cdef class cudaMemcpy3DPeerParms: """ @@ -5849,90 +6589,141 @@ cdef class cudaMemcpy3DPeerParms: Attributes ---------- + {{if 'cudaMemcpy3DPeerParms.srcArray' in found_struct}} srcArray : cudaArray_t Source memory address + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPos' in found_struct}} srcPos : cudaPos Source position offset + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPtr' in found_struct}} srcPtr : cudaPitchedPtr Pitched source memory address + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcDevice' in found_struct}} srcDevice : int Source device + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstArray' in found_struct}} dstArray : cudaArray_t Destination memory address + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPos' in found_struct}} dstPos : cudaPos Destination position offset + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPtr' in found_struct}} dstPtr : cudaPitchedPtr Pitched destination memory address + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstDevice' in found_struct}} dstDevice : int Destination device + {{endif}} + {{if 'cudaMemcpy3DPeerParms.extent' in found_struct}} extent : cudaExtent Requested memory copy size + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._srcArray = cudaArray_t(_ptr=&self._ptr[0].srcArray) - self._srcPos = cudaPos(_ptr=&self._ptr[0].srcPos) - self._srcPtr = cudaPitchedPtr(_ptr=&self._ptr[0].srcPtr) - self._dstArray = cudaArray_t(_ptr=&self._ptr[0].dstArray) - self._dstPos = cudaPos(_ptr=&self._ptr[0].dstPos) - self._dstPtr = cudaPitchedPtr(_ptr=&self._ptr[0].dstPtr) - self._extent = cudaExtent(_ptr=&self._ptr[0].extent) + pass + {{if 'cudaMemcpy3DPeerParms.srcArray' in found_struct}} + self._srcArray = cudaArray_t(_ptr=&self._pvt_ptr[0].srcArray) + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPos' in found_struct}} + self._srcPos = cudaPos(_ptr=&self._pvt_ptr[0].srcPos) + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPtr' in found_struct}} + self._srcPtr = cudaPitchedPtr(_ptr=&self._pvt_ptr[0].srcPtr) + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstArray' in found_struct}} + self._dstArray = cudaArray_t(_ptr=&self._pvt_ptr[0].dstArray) + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPos' in found_struct}} + self._dstPos = cudaPos(_ptr=&self._pvt_ptr[0].dstPos) + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPtr' in found_struct}} + self._dstPtr = cudaPitchedPtr(_ptr=&self._pvt_ptr[0].dstPtr) + {{endif}} + {{if 'cudaMemcpy3DPeerParms.extent' in found_struct}} + self._extent = cudaExtent(_ptr=&self._pvt_ptr[0].extent) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemcpy3DPeerParms.srcArray' in found_struct}} try: str_list += ['srcArray : ' + str(self.srcArray)] except ValueError: str_list += ['srcArray : '] + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPos' in found_struct}} try: str_list += ['srcPos :\n' + '\n'.join([' ' + line for line in str(self.srcPos).splitlines()])] except ValueError: str_list += ['srcPos : '] + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPtr' in found_struct}} try: str_list += ['srcPtr :\n' + '\n'.join([' ' + line for line in str(self.srcPtr).splitlines()])] except ValueError: str_list += ['srcPtr : '] + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcDevice' in found_struct}} try: str_list += ['srcDevice : ' + str(self.srcDevice)] except ValueError: str_list += ['srcDevice : '] + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstArray' in found_struct}} try: str_list += ['dstArray : ' + str(self.dstArray)] except ValueError: str_list += ['dstArray : '] + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPos' in found_struct}} try: str_list += ['dstPos :\n' + '\n'.join([' ' + line for line in str(self.dstPos).splitlines()])] except ValueError: str_list += ['dstPos : '] + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPtr' in found_struct}} try: str_list += ['dstPtr :\n' + '\n'.join([' ' + line for line in str(self.dstPtr).splitlines()])] except ValueError: str_list += ['dstPtr : '] + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstDevice' in found_struct}} try: str_list += ['dstDevice : ' + str(self.dstDevice)] except ValueError: str_list += ['dstDevice : '] + {{endif}} + {{if 'cudaMemcpy3DPeerParms.extent' in found_struct}} try: str_list += ['extent :\n' + '\n'.join([' ' + line for line in str(self.extent).splitlines()])] except ValueError: str_list += ['extent : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemcpy3DPeerParms.srcArray' in found_struct}} @property def srcArray(self): return self._srcArray @@ -5947,25 +6738,33 @@ cdef class cudaMemcpy3DPeerParms: else: psrcArray = int(cudaArray_t(srcArray)) cysrcArray = psrcArray - self._srcArray._ptr[0] = cysrcArray + self._srcArray._pvt_ptr[0] = cysrcArray + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPos' in found_struct}} @property def srcPos(self): return self._srcPos @srcPos.setter def srcPos(self, srcPos not None : cudaPos): - string.memcpy(&self._ptr[0].srcPos, srcPos.getPtr(), sizeof(self._ptr[0].srcPos)) + string.memcpy(&self._pvt_ptr[0].srcPos, srcPos.getPtr(), sizeof(self._pvt_ptr[0].srcPos)) + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcPtr' in found_struct}} @property def srcPtr(self): return self._srcPtr @srcPtr.setter def srcPtr(self, srcPtr not None : cudaPitchedPtr): - string.memcpy(&self._ptr[0].srcPtr, srcPtr.getPtr(), sizeof(self._ptr[0].srcPtr)) + string.memcpy(&self._pvt_ptr[0].srcPtr, srcPtr.getPtr(), sizeof(self._pvt_ptr[0].srcPtr)) + {{endif}} + {{if 'cudaMemcpy3DPeerParms.srcDevice' in found_struct}} @property def srcDevice(self): - return self._ptr[0].srcDevice + return self._pvt_ptr[0].srcDevice @srcDevice.setter def srcDevice(self, int srcDevice): - self._ptr[0].srcDevice = srcDevice + self._pvt_ptr[0].srcDevice = srcDevice + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstArray' in found_struct}} @property def dstArray(self): return self._dstArray @@ -5980,33 +6779,42 @@ cdef class cudaMemcpy3DPeerParms: else: pdstArray = int(cudaArray_t(dstArray)) cydstArray = pdstArray - self._dstArray._ptr[0] = cydstArray + self._dstArray._pvt_ptr[0] = cydstArray + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPos' in found_struct}} @property def dstPos(self): return self._dstPos @dstPos.setter def dstPos(self, dstPos not None : cudaPos): - string.memcpy(&self._ptr[0].dstPos, dstPos.getPtr(), sizeof(self._ptr[0].dstPos)) + string.memcpy(&self._pvt_ptr[0].dstPos, dstPos.getPtr(), sizeof(self._pvt_ptr[0].dstPos)) + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstPtr' in found_struct}} @property def dstPtr(self): return self._dstPtr @dstPtr.setter def dstPtr(self, dstPtr not None : cudaPitchedPtr): - string.memcpy(&self._ptr[0].dstPtr, dstPtr.getPtr(), sizeof(self._ptr[0].dstPtr)) + string.memcpy(&self._pvt_ptr[0].dstPtr, dstPtr.getPtr(), sizeof(self._pvt_ptr[0].dstPtr)) + {{endif}} + {{if 'cudaMemcpy3DPeerParms.dstDevice' in found_struct}} @property def dstDevice(self): - return self._ptr[0].dstDevice + return self._pvt_ptr[0].dstDevice @dstDevice.setter def dstDevice(self, int dstDevice): - self._ptr[0].dstDevice = dstDevice + self._pvt_ptr[0].dstDevice = dstDevice + {{endif}} + {{if 'cudaMemcpy3DPeerParms.extent' in found_struct}} @property def extent(self): return self._extent @extent.setter def extent(self, extent not None : cudaExtent): - string.memcpy(&self._ptr[0].extent, extent.getPtr(), sizeof(self._ptr[0].extent)) + string.memcpy(&self._pvt_ptr[0].extent, extent.getPtr(), sizeof(self._pvt_ptr[0].extent)) + {{endif}} {{endif}} -{{if 'struct cudaMemsetParams' in found_types}} +{{if 'cudaMemsetParams' in found_struct}} cdef class cudaMemsetParams: """ @@ -6014,105 +6822,140 @@ cdef class cudaMemsetParams: Attributes ---------- + {{if 'cudaMemsetParams.dst' in found_struct}} dst : Any Destination device pointer + {{endif}} + {{if 'cudaMemsetParams.pitch' in found_struct}} pitch : size_t Pitch of destination device pointer. Unused if height is 1 + {{endif}} + {{if 'cudaMemsetParams.value' in found_struct}} value : unsigned int Value to be set + {{endif}} + {{if 'cudaMemsetParams.elementSize' in found_struct}} elementSize : unsigned int Size of each element in bytes. Must be 1, 2, or 4. + {{endif}} + {{if 'cudaMemsetParams.width' in found_struct}} width : size_t Width of the row in elements + {{endif}} + {{if 'cudaMemsetParams.height' in found_struct}} height : size_t Number of rows + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemsetParams.dst' in found_struct}} try: str_list += ['dst : ' + hex(self.dst)] except ValueError: str_list += ['dst : '] + {{endif}} + {{if 'cudaMemsetParams.pitch' in found_struct}} try: str_list += ['pitch : ' + str(self.pitch)] except ValueError: str_list += ['pitch : '] + {{endif}} + {{if 'cudaMemsetParams.value' in found_struct}} try: str_list += ['value : ' + str(self.value)] except ValueError: str_list += ['value : '] + {{endif}} + {{if 'cudaMemsetParams.elementSize' in found_struct}} try: str_list += ['elementSize : ' + str(self.elementSize)] except ValueError: str_list += ['elementSize : '] + {{endif}} + {{if 'cudaMemsetParams.width' in found_struct}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if 'cudaMemsetParams.height' in found_struct}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemsetParams.dst' in found_struct}} @property def dst(self): - return self._ptr[0].dst + return self._pvt_ptr[0].dst @dst.setter def dst(self, dst): - _cydst = utils.HelperInputVoidPtr(dst) - self._ptr[0].dst = _cydst.cptr + _cdst = utils.HelperInputVoidPtr(dst) + self._pvt_ptr[0].dst = _cdst.cptr + {{endif}} + {{if 'cudaMemsetParams.pitch' in found_struct}} @property def pitch(self): - return self._ptr[0].pitch + return self._pvt_ptr[0].pitch @pitch.setter def pitch(self, size_t pitch): - self._ptr[0].pitch = pitch + self._pvt_ptr[0].pitch = pitch + {{endif}} + {{if 'cudaMemsetParams.value' in found_struct}} @property def value(self): - return self._ptr[0].value + return self._pvt_ptr[0].value @value.setter def value(self, unsigned int value): - self._ptr[0].value = value + self._pvt_ptr[0].value = value + {{endif}} + {{if 'cudaMemsetParams.elementSize' in found_struct}} @property def elementSize(self): - return self._ptr[0].elementSize + return self._pvt_ptr[0].elementSize @elementSize.setter def elementSize(self, unsigned int elementSize): - self._ptr[0].elementSize = elementSize + self._pvt_ptr[0].elementSize = elementSize + {{endif}} + {{if 'cudaMemsetParams.width' in found_struct}} @property def width(self): - return self._ptr[0].width + return self._pvt_ptr[0].width @width.setter def width(self, size_t width): - self._ptr[0].width = width + self._pvt_ptr[0].width = width + {{endif}} + {{if 'cudaMemsetParams.height' in found_struct}} @property def height(self): - return self._ptr[0].height + return self._pvt_ptr[0].height @height.setter def height(self, size_t height): - self._ptr[0].height = height + self._pvt_ptr[0].height = height + {{endif}} {{endif}} -{{if 'struct cudaMemsetParamsV2' in found_types}} +{{if 'cudaMemsetParamsV2' in found_struct}} cdef class cudaMemsetParamsV2: """ @@ -6120,105 +6963,140 @@ cdef class cudaMemsetParamsV2: Attributes ---------- + {{if 'cudaMemsetParamsV2.dst' in found_struct}} dst : Any Destination device pointer + {{endif}} + {{if 'cudaMemsetParamsV2.pitch' in found_struct}} pitch : size_t Pitch of destination device pointer. Unused if height is 1 + {{endif}} + {{if 'cudaMemsetParamsV2.value' in found_struct}} value : unsigned int Value to be set + {{endif}} + {{if 'cudaMemsetParamsV2.elementSize' in found_struct}} elementSize : unsigned int Size of each element in bytes. Must be 1, 2, or 4. + {{endif}} + {{if 'cudaMemsetParamsV2.width' in found_struct}} width : size_t Width of the row in elements + {{endif}} + {{if 'cudaMemsetParamsV2.height' in found_struct}} height : size_t Number of rows + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemsetParamsV2.dst' in found_struct}} try: str_list += ['dst : ' + hex(self.dst)] except ValueError: str_list += ['dst : '] + {{endif}} + {{if 'cudaMemsetParamsV2.pitch' in found_struct}} try: str_list += ['pitch : ' + str(self.pitch)] except ValueError: str_list += ['pitch : '] + {{endif}} + {{if 'cudaMemsetParamsV2.value' in found_struct}} try: str_list += ['value : ' + str(self.value)] except ValueError: str_list += ['value : '] + {{endif}} + {{if 'cudaMemsetParamsV2.elementSize' in found_struct}} try: str_list += ['elementSize : ' + str(self.elementSize)] except ValueError: str_list += ['elementSize : '] + {{endif}} + {{if 'cudaMemsetParamsV2.width' in found_struct}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if 'cudaMemsetParamsV2.height' in found_struct}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemsetParamsV2.dst' in found_struct}} @property def dst(self): - return self._ptr[0].dst + return self._pvt_ptr[0].dst @dst.setter def dst(self, dst): - _cydst = utils.HelperInputVoidPtr(dst) - self._ptr[0].dst = _cydst.cptr + _cdst = utils.HelperInputVoidPtr(dst) + self._pvt_ptr[0].dst = _cdst.cptr + {{endif}} + {{if 'cudaMemsetParamsV2.pitch' in found_struct}} @property def pitch(self): - return self._ptr[0].pitch + return self._pvt_ptr[0].pitch @pitch.setter def pitch(self, size_t pitch): - self._ptr[0].pitch = pitch + self._pvt_ptr[0].pitch = pitch + {{endif}} + {{if 'cudaMemsetParamsV2.value' in found_struct}} @property def value(self): - return self._ptr[0].value + return self._pvt_ptr[0].value @value.setter def value(self, unsigned int value): - self._ptr[0].value = value + self._pvt_ptr[0].value = value + {{endif}} + {{if 'cudaMemsetParamsV2.elementSize' in found_struct}} @property def elementSize(self): - return self._ptr[0].elementSize + return self._pvt_ptr[0].elementSize @elementSize.setter def elementSize(self, unsigned int elementSize): - self._ptr[0].elementSize = elementSize + self._pvt_ptr[0].elementSize = elementSize + {{endif}} + {{if 'cudaMemsetParamsV2.width' in found_struct}} @property def width(self): - return self._ptr[0].width + return self._pvt_ptr[0].width @width.setter def width(self, size_t width): - self._ptr[0].width = width + self._pvt_ptr[0].width = width + {{endif}} + {{if 'cudaMemsetParamsV2.height' in found_struct}} @property def height(self): - return self._ptr[0].height + return self._pvt_ptr[0].height @height.setter def height(self, size_t height): - self._ptr[0].height = height + self._pvt_ptr[0].height = height + {{endif}} {{endif}} -{{if 'struct cudaAccessPolicyWindow' in found_types}} +{{if 'cudaAccessPolicyWindow' in found_struct}} cdef class cudaAccessPolicyWindow: """ @@ -6233,97 +7111,126 @@ cdef class cudaAccessPolicyWindow: Attributes ---------- + {{if 'cudaAccessPolicyWindow.base_ptr' in found_struct}} base_ptr : Any Starting address of the access policy window. CUDA driver may align it. + {{endif}} + {{if 'cudaAccessPolicyWindow.num_bytes' in found_struct}} num_bytes : size_t Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment. + {{endif}} + {{if 'cudaAccessPolicyWindow.hitRatio' in found_struct}} hitRatio : float hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp. + {{endif}} + {{if 'cudaAccessPolicyWindow.hitProp' in found_struct}} hitProp : cudaAccessProperty ::CUaccessProperty set for hit. + {{endif}} + {{if 'cudaAccessPolicyWindow.missProp' in found_struct}} missProp : cudaAccessProperty ::CUaccessProperty set for miss. Must be either NORMAL or STREAMING. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaAccessPolicyWindow.base_ptr' in found_struct}} try: str_list += ['base_ptr : ' + hex(self.base_ptr)] except ValueError: str_list += ['base_ptr : '] + {{endif}} + {{if 'cudaAccessPolicyWindow.num_bytes' in found_struct}} try: str_list += ['num_bytes : ' + str(self.num_bytes)] except ValueError: str_list += ['num_bytes : '] + {{endif}} + {{if 'cudaAccessPolicyWindow.hitRatio' in found_struct}} try: str_list += ['hitRatio : ' + str(self.hitRatio)] except ValueError: str_list += ['hitRatio : '] + {{endif}} + {{if 'cudaAccessPolicyWindow.hitProp' in found_struct}} try: str_list += ['hitProp : ' + str(self.hitProp)] except ValueError: str_list += ['hitProp : '] + {{endif}} + {{if 'cudaAccessPolicyWindow.missProp' in found_struct}} try: str_list += ['missProp : ' + str(self.missProp)] except ValueError: str_list += ['missProp : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaAccessPolicyWindow.base_ptr' in found_struct}} @property def base_ptr(self): - return self._ptr[0].base_ptr + return self._pvt_ptr[0].base_ptr @base_ptr.setter def base_ptr(self, base_ptr): - _cybase_ptr = utils.HelperInputVoidPtr(base_ptr) - self._ptr[0].base_ptr = _cybase_ptr.cptr + _cbase_ptr = utils.HelperInputVoidPtr(base_ptr) + self._pvt_ptr[0].base_ptr = _cbase_ptr.cptr + {{endif}} + {{if 'cudaAccessPolicyWindow.num_bytes' in found_struct}} @property def num_bytes(self): - return self._ptr[0].num_bytes + return self._pvt_ptr[0].num_bytes @num_bytes.setter def num_bytes(self, size_t num_bytes): - self._ptr[0].num_bytes = num_bytes + self._pvt_ptr[0].num_bytes = num_bytes + {{endif}} + {{if 'cudaAccessPolicyWindow.hitRatio' in found_struct}} @property def hitRatio(self): - return self._ptr[0].hitRatio + return self._pvt_ptr[0].hitRatio @hitRatio.setter def hitRatio(self, float hitRatio): - self._ptr[0].hitRatio = hitRatio + self._pvt_ptr[0].hitRatio = hitRatio + {{endif}} + {{if 'cudaAccessPolicyWindow.hitProp' in found_struct}} @property def hitProp(self): - return cudaAccessProperty(self._ptr[0].hitProp) + return cudaAccessProperty(self._pvt_ptr[0].hitProp) @hitProp.setter def hitProp(self, hitProp not None : cudaAccessProperty): - self._ptr[0].hitProp = hitProp.value + self._pvt_ptr[0].hitProp = hitProp.value + {{endif}} + {{if 'cudaAccessPolicyWindow.missProp' in found_struct}} @property def missProp(self): - return cudaAccessProperty(self._ptr[0].missProp) + return cudaAccessProperty(self._pvt_ptr[0].missProp) @missProp.setter def missProp(self, missProp not None : cudaAccessProperty): - self._ptr[0].missProp = missProp.value + self._pvt_ptr[0].missProp = missProp.value + {{endif}} {{endif}} -{{if 'struct cudaHostNodeParams' in found_types}} +{{if 'cudaHostNodeParams' in found_struct}} cdef class cudaHostNodeParams: """ @@ -6331,42 +7238,53 @@ cdef class cudaHostNodeParams: Attributes ---------- + {{if 'cudaHostNodeParams.fn' in found_struct}} fn : cudaHostFn_t The function to call when the node executes + {{endif}} + {{if 'cudaHostNodeParams.userData' in found_struct}} userData : Any Argument to pass to the function + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._fn = cudaHostFn_t(_ptr=&self._ptr[0].fn) + pass + {{if 'cudaHostNodeParams.fn' in found_struct}} + self._fn = cudaHostFn_t(_ptr=&self._pvt_ptr[0].fn) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaHostNodeParams.fn' in found_struct}} try: str_list += ['fn : ' + str(self.fn)] except ValueError: str_list += ['fn : '] + {{endif}} + {{if 'cudaHostNodeParams.userData' in found_struct}} try: str_list += ['userData : ' + hex(self.userData)] except ValueError: str_list += ['userData : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaHostNodeParams.fn' in found_struct}} @property def fn(self): return self._fn @@ -6381,16 +7299,19 @@ cdef class cudaHostNodeParams: else: pfn = int(cudaHostFn_t(fn)) cyfn = pfn - self._fn._ptr[0] = cyfn + self._fn._pvt_ptr[0] = cyfn + {{endif}} + {{if 'cudaHostNodeParams.userData' in found_struct}} @property def userData(self): - return self._ptr[0].userData + return self._pvt_ptr[0].userData @userData.setter def userData(self, userData): - _cyuserData = utils.HelperInputVoidPtr(userData) - self._ptr[0].userData = _cyuserData.cptr + _cuserData = utils.HelperInputVoidPtr(userData) + self._pvt_ptr[0].userData = _cuserData.cptr + {{endif}} {{endif}} -{{if 'struct cudaHostNodeParamsV2' in found_types}} +{{if 'cudaHostNodeParamsV2' in found_struct}} cdef class cudaHostNodeParamsV2: """ @@ -6398,42 +7319,53 @@ cdef class cudaHostNodeParamsV2: Attributes ---------- + {{if 'cudaHostNodeParamsV2.fn' in found_struct}} fn : cudaHostFn_t The function to call when the node executes + {{endif}} + {{if 'cudaHostNodeParamsV2.userData' in found_struct}} userData : Any Argument to pass to the function + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._fn = cudaHostFn_t(_ptr=&self._ptr[0].fn) + pass + {{if 'cudaHostNodeParamsV2.fn' in found_struct}} + self._fn = cudaHostFn_t(_ptr=&self._pvt_ptr[0].fn) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaHostNodeParamsV2.fn' in found_struct}} try: str_list += ['fn : ' + str(self.fn)] except ValueError: str_list += ['fn : '] + {{endif}} + {{if 'cudaHostNodeParamsV2.userData' in found_struct}} try: str_list += ['userData : ' + hex(self.userData)] except ValueError: str_list += ['userData : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaHostNodeParamsV2.fn' in found_struct}} @property def fn(self): return self._fn @@ -6448,49 +7380,59 @@ cdef class cudaHostNodeParamsV2: else: pfn = int(cudaHostFn_t(fn)) cyfn = pfn - self._fn._ptr[0] = cyfn + self._fn._pvt_ptr[0] = cyfn + {{endif}} + {{if 'cudaHostNodeParamsV2.userData' in found_struct}} @property def userData(self): - return self._ptr[0].userData + return self._pvt_ptr[0].userData @userData.setter def userData(self, userData): - _cyuserData = utils.HelperInputVoidPtr(userData) - self._ptr[0].userData = _cyuserData.cptr + _cuserData = utils.HelperInputVoidPtr(userData) + self._pvt_ptr[0].userData = _cuserData.cptr + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc.res.array' in found_struct}} cdef class anon_struct1: """ Attributes ---------- + {{if 'cudaResourceDesc.res.array.array' in found_struct}} array : cudaArray_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._array = cudaArray_t(_ptr=&self._ptr[0].res.array.array) + pass + {{if 'cudaResourceDesc.res.array.array' in found_struct}} + self._array = cudaArray_t(_ptr=&self._pvt_ptr[0].res.array.array) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].res.array + return &self._pvt_ptr[0].res.array def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaResourceDesc.res.array.array' in found_struct}} try: str_list += ['array : ' + str(self.array)] except ValueError: str_list += ['array : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaResourceDesc.res.array.array' in found_struct}} @property def array(self): return self._array @@ -6505,42 +7447,50 @@ cdef class anon_struct1: else: parray = int(cudaArray_t(array)) cyarray = parray - self._array._ptr[0] = cyarray + self._array._pvt_ptr[0] = cyarray + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc.res.mipmap' in found_struct}} cdef class anon_struct2: """ Attributes ---------- + {{if 'cudaResourceDesc.res.mipmap.mipmap' in found_struct}} mipmap : cudaMipmappedArray_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._mipmap = cudaMipmappedArray_t(_ptr=&self._ptr[0].res.mipmap.mipmap) + pass + {{if 'cudaResourceDesc.res.mipmap.mipmap' in found_struct}} + self._mipmap = cudaMipmappedArray_t(_ptr=&self._pvt_ptr[0].res.mipmap.mipmap) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].res.mipmap + return &self._pvt_ptr[0].res.mipmap def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaResourceDesc.res.mipmap.mipmap' in found_struct}} try: str_list += ['mipmap : ' + str(self.mipmap)] except ValueError: str_list += ['mipmap : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaResourceDesc.res.mipmap.mipmap' in found_struct}} @property def mipmap(self): return self._mipmap @@ -6555,245 +7505,330 @@ cdef class anon_struct2: else: pmipmap = int(cudaMipmappedArray_t(mipmap)) cymipmap = pmipmap - self._mipmap._ptr[0] = cymipmap + self._mipmap._pvt_ptr[0] = cymipmap + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc.res.linear' in found_struct}} cdef class anon_struct3: """ Attributes ---------- + {{if 'cudaResourceDesc.res.linear.devPtr' in found_struct}} devPtr : Any + {{endif}} + {{if 'cudaResourceDesc.res.linear.desc' in found_struct}} desc : cudaChannelFormatDesc + {{endif}} + {{if 'cudaResourceDesc.res.linear.sizeInBytes' in found_struct}} sizeInBytes : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._desc = cudaChannelFormatDesc(_ptr=&self._ptr[0].res.linear.desc) + pass + {{if 'cudaResourceDesc.res.linear.desc' in found_struct}} + self._desc = cudaChannelFormatDesc(_ptr=&self._pvt_ptr[0].res.linear.desc) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].res.linear + return &self._pvt_ptr[0].res.linear def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaResourceDesc.res.linear.devPtr' in found_struct}} try: str_list += ['devPtr : ' + hex(self.devPtr)] except ValueError: str_list += ['devPtr : '] + {{endif}} + {{if 'cudaResourceDesc.res.linear.desc' in found_struct}} try: str_list += ['desc :\n' + '\n'.join([' ' + line for line in str(self.desc).splitlines()])] except ValueError: str_list += ['desc : '] + {{endif}} + {{if 'cudaResourceDesc.res.linear.sizeInBytes' in found_struct}} try: str_list += ['sizeInBytes : ' + str(self.sizeInBytes)] except ValueError: str_list += ['sizeInBytes : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaResourceDesc.res.linear.devPtr' in found_struct}} @property def devPtr(self): - return self._ptr[0].res.linear.devPtr + return self._pvt_ptr[0].res.linear.devPtr @devPtr.setter def devPtr(self, devPtr): - _cydevPtr = utils.HelperInputVoidPtr(devPtr) - self._ptr[0].res.linear.devPtr = _cydevPtr.cptr + _cdevPtr = utils.HelperInputVoidPtr(devPtr) + self._pvt_ptr[0].res.linear.devPtr = _cdevPtr.cptr + {{endif}} + {{if 'cudaResourceDesc.res.linear.desc' in found_struct}} @property def desc(self): return self._desc @desc.setter def desc(self, desc not None : cudaChannelFormatDesc): - string.memcpy(&self._ptr[0].res.linear.desc, desc.getPtr(), sizeof(self._ptr[0].res.linear.desc)) + string.memcpy(&self._pvt_ptr[0].res.linear.desc, desc.getPtr(), sizeof(self._pvt_ptr[0].res.linear.desc)) + {{endif}} + {{if 'cudaResourceDesc.res.linear.sizeInBytes' in found_struct}} @property def sizeInBytes(self): - return self._ptr[0].res.linear.sizeInBytes + return self._pvt_ptr[0].res.linear.sizeInBytes @sizeInBytes.setter def sizeInBytes(self, size_t sizeInBytes): - self._ptr[0].res.linear.sizeInBytes = sizeInBytes + self._pvt_ptr[0].res.linear.sizeInBytes = sizeInBytes + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc.res.pitch2D' in found_struct}} cdef class anon_struct4: """ Attributes ---------- + {{if 'cudaResourceDesc.res.pitch2D.devPtr' in found_struct}} devPtr : Any + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.desc' in found_struct}} desc : cudaChannelFormatDesc + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.width' in found_struct}} width : size_t + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.height' in found_struct}} height : size_t + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.pitchInBytes' in found_struct}} pitchInBytes : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._desc = cudaChannelFormatDesc(_ptr=&self._ptr[0].res.pitch2D.desc) + pass + {{if 'cudaResourceDesc.res.pitch2D.desc' in found_struct}} + self._desc = cudaChannelFormatDesc(_ptr=&self._pvt_ptr[0].res.pitch2D.desc) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].res.pitch2D + return &self._pvt_ptr[0].res.pitch2D def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaResourceDesc.res.pitch2D.devPtr' in found_struct}} try: str_list += ['devPtr : ' + hex(self.devPtr)] except ValueError: str_list += ['devPtr : '] + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.desc' in found_struct}} try: str_list += ['desc :\n' + '\n'.join([' ' + line for line in str(self.desc).splitlines()])] except ValueError: str_list += ['desc : '] + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.width' in found_struct}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.height' in found_struct}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.pitchInBytes' in found_struct}} try: str_list += ['pitchInBytes : ' + str(self.pitchInBytes)] except ValueError: str_list += ['pitchInBytes : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaResourceDesc.res.pitch2D.devPtr' in found_struct}} @property def devPtr(self): - return self._ptr[0].res.pitch2D.devPtr + return self._pvt_ptr[0].res.pitch2D.devPtr @devPtr.setter def devPtr(self, devPtr): - _cydevPtr = utils.HelperInputVoidPtr(devPtr) - self._ptr[0].res.pitch2D.devPtr = _cydevPtr.cptr + _cdevPtr = utils.HelperInputVoidPtr(devPtr) + self._pvt_ptr[0].res.pitch2D.devPtr = _cdevPtr.cptr + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.desc' in found_struct}} @property def desc(self): return self._desc @desc.setter def desc(self, desc not None : cudaChannelFormatDesc): - string.memcpy(&self._ptr[0].res.pitch2D.desc, desc.getPtr(), sizeof(self._ptr[0].res.pitch2D.desc)) + string.memcpy(&self._pvt_ptr[0].res.pitch2D.desc, desc.getPtr(), sizeof(self._pvt_ptr[0].res.pitch2D.desc)) + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.width' in found_struct}} @property def width(self): - return self._ptr[0].res.pitch2D.width + return self._pvt_ptr[0].res.pitch2D.width @width.setter def width(self, size_t width): - self._ptr[0].res.pitch2D.width = width + self._pvt_ptr[0].res.pitch2D.width = width + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.height' in found_struct}} @property def height(self): - return self._ptr[0].res.pitch2D.height + return self._pvt_ptr[0].res.pitch2D.height @height.setter def height(self, size_t height): - self._ptr[0].res.pitch2D.height = height + self._pvt_ptr[0].res.pitch2D.height = height + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D.pitchInBytes' in found_struct}} @property def pitchInBytes(self): - return self._ptr[0].res.pitch2D.pitchInBytes + return self._pvt_ptr[0].res.pitch2D.pitchInBytes @pitchInBytes.setter def pitchInBytes(self, size_t pitchInBytes): - self._ptr[0].res.pitch2D.pitchInBytes = pitchInBytes + self._pvt_ptr[0].res.pitch2D.pitchInBytes = pitchInBytes + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc.res' in found_struct}} cdef class anon_union0: """ Attributes ---------- + {{if 'cudaResourceDesc.res.array' in found_struct}} array : anon_struct1 + {{endif}} + {{if 'cudaResourceDesc.res.mipmap' in found_struct}} mipmap : anon_struct2 + {{endif}} + {{if 'cudaResourceDesc.res.linear' in found_struct}} linear : anon_struct3 + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D' in found_struct}} pitch2D : anon_struct4 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._array = anon_struct1(_ptr=self._ptr) - self._mipmap = anon_struct2(_ptr=self._ptr) - self._linear = anon_struct3(_ptr=self._ptr) - self._pitch2D = anon_struct4(_ptr=self._ptr) + pass + {{if 'cudaResourceDesc.res.array' in found_struct}} + self._array = anon_struct1(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaResourceDesc.res.mipmap' in found_struct}} + self._mipmap = anon_struct2(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaResourceDesc.res.linear' in found_struct}} + self._linear = anon_struct3(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D' in found_struct}} + self._pitch2D = anon_struct4(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].res + return &self._pvt_ptr[0].res def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaResourceDesc.res.array' in found_struct}} try: str_list += ['array :\n' + '\n'.join([' ' + line for line in str(self.array).splitlines()])] except ValueError: str_list += ['array : '] + {{endif}} + {{if 'cudaResourceDesc.res.mipmap' in found_struct}} try: str_list += ['mipmap :\n' + '\n'.join([' ' + line for line in str(self.mipmap).splitlines()])] except ValueError: str_list += ['mipmap : '] + {{endif}} + {{if 'cudaResourceDesc.res.linear' in found_struct}} try: str_list += ['linear :\n' + '\n'.join([' ' + line for line in str(self.linear).splitlines()])] except ValueError: str_list += ['linear : '] + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D' in found_struct}} try: str_list += ['pitch2D :\n' + '\n'.join([' ' + line for line in str(self.pitch2D).splitlines()])] except ValueError: str_list += ['pitch2D : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaResourceDesc.res.array' in found_struct}} @property def array(self): return self._array @array.setter def array(self, array not None : anon_struct1): - string.memcpy(&self._ptr[0].res.array, array.getPtr(), sizeof(self._ptr[0].res.array)) + string.memcpy(&self._pvt_ptr[0].res.array, array.getPtr(), sizeof(self._pvt_ptr[0].res.array)) + {{endif}} + {{if 'cudaResourceDesc.res.mipmap' in found_struct}} @property def mipmap(self): return self._mipmap @mipmap.setter def mipmap(self, mipmap not None : anon_struct2): - string.memcpy(&self._ptr[0].res.mipmap, mipmap.getPtr(), sizeof(self._ptr[0].res.mipmap)) + string.memcpy(&self._pvt_ptr[0].res.mipmap, mipmap.getPtr(), sizeof(self._pvt_ptr[0].res.mipmap)) + {{endif}} + {{if 'cudaResourceDesc.res.linear' in found_struct}} @property def linear(self): return self._linear @linear.setter def linear(self, linear not None : anon_struct3): - string.memcpy(&self._ptr[0].res.linear, linear.getPtr(), sizeof(self._ptr[0].res.linear)) + string.memcpy(&self._pvt_ptr[0].res.linear, linear.getPtr(), sizeof(self._pvt_ptr[0].res.linear)) + {{endif}} + {{if 'cudaResourceDesc.res.pitch2D' in found_struct}} @property def pitch2D(self): return self._pitch2D @pitch2D.setter def pitch2D(self, pitch2D not None : anon_struct4): - string.memcpy(&self._ptr[0].res.pitch2D, pitch2D.getPtr(), sizeof(self._ptr[0].res.pitch2D)) + string.memcpy(&self._pvt_ptr[0].res.pitch2D, pitch2D.getPtr(), sizeof(self._pvt_ptr[0].res.pitch2D)) + {{endif}} {{endif}} -{{if 'struct cudaResourceDesc' in found_types}} +{{if 'cudaResourceDesc' in found_struct}} cdef class cudaResourceDesc: """ @@ -6801,58 +7836,72 @@ cdef class cudaResourceDesc: Attributes ---------- + {{if 'cudaResourceDesc.resType' in found_struct}} resType : cudaResourceType Resource type + {{endif}} + {{if 'cudaResourceDesc.res' in found_struct}} res : anon_union0 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cyruntime.cudaResourceDesc)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._res = anon_union0(_ptr=self._ptr) + pass + {{if 'cudaResourceDesc.res' in found_struct}} + self._res = anon_union0(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaResourceDesc.resType' in found_struct}} try: str_list += ['resType : ' + str(self.resType)] except ValueError: str_list += ['resType : '] + {{endif}} + {{if 'cudaResourceDesc.res' in found_struct}} try: str_list += ['res :\n' + '\n'.join([' ' + line for line in str(self.res).splitlines()])] except ValueError: str_list += ['res : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaResourceDesc.resType' in found_struct}} @property def resType(self): - return cudaResourceType(self._ptr[0].resType) + return cudaResourceType(self._pvt_ptr[0].resType) @resType.setter def resType(self, resType not None : cudaResourceType): - self._ptr[0].resType = resType.value + self._pvt_ptr[0].resType = resType.value + {{endif}} + {{if 'cudaResourceDesc.res' in found_struct}} @property def res(self): return self._res @res.setter def res(self, res not None : anon_union0): - string.memcpy(&self._ptr[0].res, res.getPtr(), sizeof(self._ptr[0].res)) + string.memcpy(&self._pvt_ptr[0].res, res.getPtr(), sizeof(self._pvt_ptr[0].res)) + {{endif}} {{endif}} -{{if 'struct cudaResourceViewDesc' in found_types}} +{{if 'cudaResourceViewDesc' in found_struct}} cdef class cudaResourceViewDesc: """ @@ -6860,128 +7909,175 @@ cdef class cudaResourceViewDesc: Attributes ---------- + {{if 'cudaResourceViewDesc.format' in found_struct}} format : cudaResourceViewFormat Resource view format + {{endif}} + {{if 'cudaResourceViewDesc.width' in found_struct}} width : size_t Width of the resource view + {{endif}} + {{if 'cudaResourceViewDesc.height' in found_struct}} height : size_t Height of the resource view + {{endif}} + {{if 'cudaResourceViewDesc.depth' in found_struct}} depth : size_t Depth of the resource view + {{endif}} + {{if 'cudaResourceViewDesc.firstMipmapLevel' in found_struct}} firstMipmapLevel : unsigned int First defined mipmap level + {{endif}} + {{if 'cudaResourceViewDesc.lastMipmapLevel' in found_struct}} lastMipmapLevel : unsigned int Last defined mipmap level + {{endif}} + {{if 'cudaResourceViewDesc.firstLayer' in found_struct}} firstLayer : unsigned int First layer index + {{endif}} + {{if 'cudaResourceViewDesc.lastLayer' in found_struct}} lastLayer : unsigned int Last layer index + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaResourceViewDesc.format' in found_struct}} try: str_list += ['format : ' + str(self.format)] except ValueError: str_list += ['format : '] + {{endif}} + {{if 'cudaResourceViewDesc.width' in found_struct}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if 'cudaResourceViewDesc.height' in found_struct}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} + {{if 'cudaResourceViewDesc.depth' in found_struct}} try: str_list += ['depth : ' + str(self.depth)] except ValueError: str_list += ['depth : '] + {{endif}} + {{if 'cudaResourceViewDesc.firstMipmapLevel' in found_struct}} try: str_list += ['firstMipmapLevel : ' + str(self.firstMipmapLevel)] except ValueError: str_list += ['firstMipmapLevel : '] + {{endif}} + {{if 'cudaResourceViewDesc.lastMipmapLevel' in found_struct}} try: str_list += ['lastMipmapLevel : ' + str(self.lastMipmapLevel)] except ValueError: str_list += ['lastMipmapLevel : '] + {{endif}} + {{if 'cudaResourceViewDesc.firstLayer' in found_struct}} try: str_list += ['firstLayer : ' + str(self.firstLayer)] except ValueError: str_list += ['firstLayer : '] + {{endif}} + {{if 'cudaResourceViewDesc.lastLayer' in found_struct}} try: str_list += ['lastLayer : ' + str(self.lastLayer)] except ValueError: str_list += ['lastLayer : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaResourceViewDesc.format' in found_struct}} @property def format(self): - return cudaResourceViewFormat(self._ptr[0].format) + return cudaResourceViewFormat(self._pvt_ptr[0].format) @format.setter def format(self, format not None : cudaResourceViewFormat): - self._ptr[0].format = format.value + self._pvt_ptr[0].format = format.value + {{endif}} + {{if 'cudaResourceViewDesc.width' in found_struct}} @property def width(self): - return self._ptr[0].width + return self._pvt_ptr[0].width @width.setter def width(self, size_t width): - self._ptr[0].width = width + self._pvt_ptr[0].width = width + {{endif}} + {{if 'cudaResourceViewDesc.height' in found_struct}} @property def height(self): - return self._ptr[0].height + return self._pvt_ptr[0].height @height.setter def height(self, size_t height): - self._ptr[0].height = height + self._pvt_ptr[0].height = height + {{endif}} + {{if 'cudaResourceViewDesc.depth' in found_struct}} @property def depth(self): - return self._ptr[0].depth + return self._pvt_ptr[0].depth @depth.setter def depth(self, size_t depth): - self._ptr[0].depth = depth + self._pvt_ptr[0].depth = depth + {{endif}} + {{if 'cudaResourceViewDesc.firstMipmapLevel' in found_struct}} @property def firstMipmapLevel(self): - return self._ptr[0].firstMipmapLevel + return self._pvt_ptr[0].firstMipmapLevel @firstMipmapLevel.setter def firstMipmapLevel(self, unsigned int firstMipmapLevel): - self._ptr[0].firstMipmapLevel = firstMipmapLevel + self._pvt_ptr[0].firstMipmapLevel = firstMipmapLevel + {{endif}} + {{if 'cudaResourceViewDesc.lastMipmapLevel' in found_struct}} @property def lastMipmapLevel(self): - return self._ptr[0].lastMipmapLevel + return self._pvt_ptr[0].lastMipmapLevel @lastMipmapLevel.setter def lastMipmapLevel(self, unsigned int lastMipmapLevel): - self._ptr[0].lastMipmapLevel = lastMipmapLevel + self._pvt_ptr[0].lastMipmapLevel = lastMipmapLevel + {{endif}} + {{if 'cudaResourceViewDesc.firstLayer' in found_struct}} @property def firstLayer(self): - return self._ptr[0].firstLayer + return self._pvt_ptr[0].firstLayer @firstLayer.setter def firstLayer(self, unsigned int firstLayer): - self._ptr[0].firstLayer = firstLayer + self._pvt_ptr[0].firstLayer = firstLayer + {{endif}} + {{if 'cudaResourceViewDesc.lastLayer' in found_struct}} @property def lastLayer(self): - return self._ptr[0].lastLayer + return self._pvt_ptr[0].lastLayer @lastLayer.setter def lastLayer(self, unsigned int lastLayer): - self._ptr[0].lastLayer = lastLayer + self._pvt_ptr[0].lastLayer = lastLayer + {{endif}} {{endif}} -{{if 'struct cudaPointerAttributes' in found_types}} +{{if 'cudaPointerAttributes' in found_struct}} cdef class cudaPointerAttributes: """ @@ -6989,9 +8085,12 @@ cdef class cudaPointerAttributes: Attributes ---------- + {{if 'cudaPointerAttributes.type' in found_struct}} type : cudaMemoryType The type of memory - cudaMemoryTypeUnregistered, cudaMemoryTypeHost, cudaMemoryTypeDevice or cudaMemoryTypeManaged. + {{endif}} + {{if 'cudaPointerAttributes.device' in found_struct}} device : int The device against which the memory was allocated or registered. If the memory type is cudaMemoryTypeDevice then this identifies the @@ -7000,82 +8099,102 @@ cdef class cudaPointerAttributes: this identifies the device which was current when the memory was allocated or registered (and if that device is deinitialized then this allocation will vanish with that device's state). + {{endif}} + {{if 'cudaPointerAttributes.devicePointer' in found_struct}} devicePointer : Any The address which may be dereferenced on the current device to access the memory or NULL if no such address exists. + {{endif}} + {{if 'cudaPointerAttributes.hostPointer' in found_struct}} hostPointer : Any The address which may be dereferenced on the host to access the memory or NULL if no such address exists. CUDA doesn't check if unregistered memory is allocated so this field may contain invalid pointer if an invalid pointer has been passed to CUDA. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaPointerAttributes.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'cudaPointerAttributes.device' in found_struct}} try: str_list += ['device : ' + str(self.device)] except ValueError: str_list += ['device : '] + {{endif}} + {{if 'cudaPointerAttributes.devicePointer' in found_struct}} try: str_list += ['devicePointer : ' + hex(self.devicePointer)] except ValueError: str_list += ['devicePointer : '] + {{endif}} + {{if 'cudaPointerAttributes.hostPointer' in found_struct}} try: str_list += ['hostPointer : ' + hex(self.hostPointer)] except ValueError: str_list += ['hostPointer : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaPointerAttributes.type' in found_struct}} @property def type(self): - return cudaMemoryType(self._ptr[0].type) + return cudaMemoryType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaMemoryType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'cudaPointerAttributes.device' in found_struct}} @property def device(self): - return self._ptr[0].device + return self._pvt_ptr[0].device @device.setter def device(self, int device): - self._ptr[0].device = device + self._pvt_ptr[0].device = device + {{endif}} + {{if 'cudaPointerAttributes.devicePointer' in found_struct}} @property def devicePointer(self): - return self._ptr[0].devicePointer + return self._pvt_ptr[0].devicePointer @devicePointer.setter def devicePointer(self, devicePointer): - _cydevicePointer = utils.HelperInputVoidPtr(devicePointer) - self._ptr[0].devicePointer = _cydevicePointer.cptr + _cdevicePointer = utils.HelperInputVoidPtr(devicePointer) + self._pvt_ptr[0].devicePointer = _cdevicePointer.cptr + {{endif}} + {{if 'cudaPointerAttributes.hostPointer' in found_struct}} @property def hostPointer(self): - return self._ptr[0].hostPointer + return self._pvt_ptr[0].hostPointer @hostPointer.setter def hostPointer(self, hostPointer): - _cyhostPointer = utils.HelperInputVoidPtr(hostPointer) - self._ptr[0].hostPointer = _cyhostPointer.cptr + _chostPointer = utils.HelperInputVoidPtr(hostPointer) + self._pvt_ptr[0].hostPointer = _chostPointer.cptr + {{endif}} {{endif}} -{{if 'struct cudaFuncAttributes' in found_types}} +{{if 'cudaFuncAttributes' in found_struct}} cdef class cudaFuncAttributes: """ @@ -7083,38 +8202,57 @@ cdef class cudaFuncAttributes: Attributes ---------- + {{if 'cudaFuncAttributes.sharedSizeBytes' in found_struct}} sharedSizeBytes : size_t The size in bytes of statically-allocated shared memory per block required by this function. This does not include dynamically- allocated shared memory requested by the user at runtime. + {{endif}} + {{if 'cudaFuncAttributes.constSizeBytes' in found_struct}} constSizeBytes : size_t The size in bytes of user-allocated constant memory required by this function. + {{endif}} + {{if 'cudaFuncAttributes.localSizeBytes' in found_struct}} localSizeBytes : size_t The size in bytes of local memory used by each thread of this function. + {{endif}} + {{if 'cudaFuncAttributes.maxThreadsPerBlock' in found_struct}} maxThreadsPerBlock : int The maximum number of threads per block, beyond which a launch of the function would fail. This number depends on both the function and the device on which the function is currently loaded. + {{endif}} + {{if 'cudaFuncAttributes.numRegs' in found_struct}} numRegs : int The number of registers used by each thread of this function. + {{endif}} + {{if 'cudaFuncAttributes.ptxVersion' in found_struct}} ptxVersion : int The PTX virtual architecture version for which the function was compiled. This value is the major PTX version * 10 + the minor PTX version, so a PTX version 1.3 function would return the value 13. + {{endif}} + {{if 'cudaFuncAttributes.binaryVersion' in found_struct}} binaryVersion : int The binary architecture version for which the function was compiled. This value is the major binary version * 10 + the minor binary version, so a binary version 1.3 function would return the value 13. + {{endif}} + {{if 'cudaFuncAttributes.cacheModeCA' in found_struct}} cacheModeCA : int The attribute to indicate whether the function has been compiled with user specified option "-Xptxas --dlcm=ca" set. + {{endif}} + {{if 'cudaFuncAttributes.maxDynamicSharedSizeBytes' in found_struct}} maxDynamicSharedSizeBytes : int The maximum size in bytes of dynamic shared memory per block for this function. Any launch must have a dynamic shared memory size smaller than this value. + {{endif}} + {{if 'cudaFuncAttributes.preferredShmemCarveout' in found_struct}} preferredShmemCarveout : int On devices where the L1 cache and shared memory use the same hardware resources, this sets the shared memory carveout @@ -7122,9 +8260,13 @@ cdef class cudaFuncAttributes: cudaDevAttrMaxSharedMemoryPerMultiprocessor. This is only a hint, and the driver can choose a different ratio if required to execute the function. See cudaFuncSetAttribute + {{endif}} + {{if 'cudaFuncAttributes.clusterDimMustBeSet' in found_struct}} clusterDimMustBeSet : int If this attribute is set, the kernel must launch with a valid cluster dimension specified. + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterWidth' in found_struct}} requiredClusterWidth : int The required cluster width/height/depth in blocks. The values must either all be 0 or all be positive. The validity of the cluster @@ -7132,12 +8274,20 @@ cdef class cudaFuncAttributes: set during compile time, it cannot be set at runtime. Setting it at runtime should return cudaErrorNotPermitted. See cudaFuncSetAttribute + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterHeight' in found_struct}} requiredClusterHeight : int + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterDepth' in found_struct}} requiredClusterDepth : int + {{endif}} + {{if 'cudaFuncAttributes.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : int The block scheduling policy of a function. See cudaFuncSetAttribute + {{endif}} + {{if 'cudaFuncAttributes.nonPortableClusterSizeAllowed' in found_struct}} nonPortableClusterSizeAllowed : int Whether the function can be launched with non-portable cluster size. 1 is allowed, 0 is disallowed. A non-portable cluster size @@ -7152,204 +8302,274 @@ cdef class cudaFuncAttributes: compute capabilities. The specific hardware unit may support higher cluster sizes that’s not guaranteed to be portable. See cudaFuncSetAttribute + {{endif}} + {{if 'cudaFuncAttributes.reserved' in found_struct}} reserved : List[int] Reserved for future use. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaFuncAttributes.sharedSizeBytes' in found_struct}} try: str_list += ['sharedSizeBytes : ' + str(self.sharedSizeBytes)] except ValueError: str_list += ['sharedSizeBytes : '] + {{endif}} + {{if 'cudaFuncAttributes.constSizeBytes' in found_struct}} try: str_list += ['constSizeBytes : ' + str(self.constSizeBytes)] except ValueError: str_list += ['constSizeBytes : '] + {{endif}} + {{if 'cudaFuncAttributes.localSizeBytes' in found_struct}} try: str_list += ['localSizeBytes : ' + str(self.localSizeBytes)] except ValueError: str_list += ['localSizeBytes : '] + {{endif}} + {{if 'cudaFuncAttributes.maxThreadsPerBlock' in found_struct}} try: str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)] except ValueError: str_list += ['maxThreadsPerBlock : '] + {{endif}} + {{if 'cudaFuncAttributes.numRegs' in found_struct}} try: str_list += ['numRegs : ' + str(self.numRegs)] except ValueError: str_list += ['numRegs : '] + {{endif}} + {{if 'cudaFuncAttributes.ptxVersion' in found_struct}} try: str_list += ['ptxVersion : ' + str(self.ptxVersion)] except ValueError: str_list += ['ptxVersion : '] + {{endif}} + {{if 'cudaFuncAttributes.binaryVersion' in found_struct}} try: str_list += ['binaryVersion : ' + str(self.binaryVersion)] except ValueError: str_list += ['binaryVersion : '] + {{endif}} + {{if 'cudaFuncAttributes.cacheModeCA' in found_struct}} try: str_list += ['cacheModeCA : ' + str(self.cacheModeCA)] except ValueError: str_list += ['cacheModeCA : '] + {{endif}} + {{if 'cudaFuncAttributes.maxDynamicSharedSizeBytes' in found_struct}} try: str_list += ['maxDynamicSharedSizeBytes : ' + str(self.maxDynamicSharedSizeBytes)] except ValueError: str_list += ['maxDynamicSharedSizeBytes : '] + {{endif}} + {{if 'cudaFuncAttributes.preferredShmemCarveout' in found_struct}} try: str_list += ['preferredShmemCarveout : ' + str(self.preferredShmemCarveout)] except ValueError: str_list += ['preferredShmemCarveout : '] + {{endif}} + {{if 'cudaFuncAttributes.clusterDimMustBeSet' in found_struct}} try: str_list += ['clusterDimMustBeSet : ' + str(self.clusterDimMustBeSet)] except ValueError: str_list += ['clusterDimMustBeSet : '] + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterWidth' in found_struct}} try: str_list += ['requiredClusterWidth : ' + str(self.requiredClusterWidth)] except ValueError: str_list += ['requiredClusterWidth : '] + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterHeight' in found_struct}} try: str_list += ['requiredClusterHeight : ' + str(self.requiredClusterHeight)] except ValueError: str_list += ['requiredClusterHeight : '] + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterDepth' in found_struct}} try: str_list += ['requiredClusterDepth : ' + str(self.requiredClusterDepth)] except ValueError: str_list += ['requiredClusterDepth : '] + {{endif}} + {{if 'cudaFuncAttributes.clusterSchedulingPolicyPreference' in found_struct}} try: str_list += ['clusterSchedulingPolicyPreference : ' + str(self.clusterSchedulingPolicyPreference)] except ValueError: str_list += ['clusterSchedulingPolicyPreference : '] + {{endif}} + {{if 'cudaFuncAttributes.nonPortableClusterSizeAllowed' in found_struct}} try: str_list += ['nonPortableClusterSizeAllowed : ' + str(self.nonPortableClusterSizeAllowed)] except ValueError: str_list += ['nonPortableClusterSizeAllowed : '] + {{endif}} + {{if 'cudaFuncAttributes.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaFuncAttributes.sharedSizeBytes' in found_struct}} @property def sharedSizeBytes(self): - return self._ptr[0].sharedSizeBytes + return self._pvt_ptr[0].sharedSizeBytes @sharedSizeBytes.setter def sharedSizeBytes(self, size_t sharedSizeBytes): - self._ptr[0].sharedSizeBytes = sharedSizeBytes + self._pvt_ptr[0].sharedSizeBytes = sharedSizeBytes + {{endif}} + {{if 'cudaFuncAttributes.constSizeBytes' in found_struct}} @property def constSizeBytes(self): - return self._ptr[0].constSizeBytes + return self._pvt_ptr[0].constSizeBytes @constSizeBytes.setter def constSizeBytes(self, size_t constSizeBytes): - self._ptr[0].constSizeBytes = constSizeBytes + self._pvt_ptr[0].constSizeBytes = constSizeBytes + {{endif}} + {{if 'cudaFuncAttributes.localSizeBytes' in found_struct}} @property def localSizeBytes(self): - return self._ptr[0].localSizeBytes + return self._pvt_ptr[0].localSizeBytes @localSizeBytes.setter def localSizeBytes(self, size_t localSizeBytes): - self._ptr[0].localSizeBytes = localSizeBytes + self._pvt_ptr[0].localSizeBytes = localSizeBytes + {{endif}} + {{if 'cudaFuncAttributes.maxThreadsPerBlock' in found_struct}} @property def maxThreadsPerBlock(self): - return self._ptr[0].maxThreadsPerBlock + return self._pvt_ptr[0].maxThreadsPerBlock @maxThreadsPerBlock.setter def maxThreadsPerBlock(self, int maxThreadsPerBlock): - self._ptr[0].maxThreadsPerBlock = maxThreadsPerBlock + self._pvt_ptr[0].maxThreadsPerBlock = maxThreadsPerBlock + {{endif}} + {{if 'cudaFuncAttributes.numRegs' in found_struct}} @property def numRegs(self): - return self._ptr[0].numRegs + return self._pvt_ptr[0].numRegs @numRegs.setter def numRegs(self, int numRegs): - self._ptr[0].numRegs = numRegs + self._pvt_ptr[0].numRegs = numRegs + {{endif}} + {{if 'cudaFuncAttributes.ptxVersion' in found_struct}} @property def ptxVersion(self): - return self._ptr[0].ptxVersion + return self._pvt_ptr[0].ptxVersion @ptxVersion.setter def ptxVersion(self, int ptxVersion): - self._ptr[0].ptxVersion = ptxVersion + self._pvt_ptr[0].ptxVersion = ptxVersion + {{endif}} + {{if 'cudaFuncAttributes.binaryVersion' in found_struct}} @property def binaryVersion(self): - return self._ptr[0].binaryVersion + return self._pvt_ptr[0].binaryVersion @binaryVersion.setter def binaryVersion(self, int binaryVersion): - self._ptr[0].binaryVersion = binaryVersion + self._pvt_ptr[0].binaryVersion = binaryVersion + {{endif}} + {{if 'cudaFuncAttributes.cacheModeCA' in found_struct}} @property def cacheModeCA(self): - return self._ptr[0].cacheModeCA + return self._pvt_ptr[0].cacheModeCA @cacheModeCA.setter def cacheModeCA(self, int cacheModeCA): - self._ptr[0].cacheModeCA = cacheModeCA + self._pvt_ptr[0].cacheModeCA = cacheModeCA + {{endif}} + {{if 'cudaFuncAttributes.maxDynamicSharedSizeBytes' in found_struct}} @property def maxDynamicSharedSizeBytes(self): - return self._ptr[0].maxDynamicSharedSizeBytes + return self._pvt_ptr[0].maxDynamicSharedSizeBytes @maxDynamicSharedSizeBytes.setter def maxDynamicSharedSizeBytes(self, int maxDynamicSharedSizeBytes): - self._ptr[0].maxDynamicSharedSizeBytes = maxDynamicSharedSizeBytes + self._pvt_ptr[0].maxDynamicSharedSizeBytes = maxDynamicSharedSizeBytes + {{endif}} + {{if 'cudaFuncAttributes.preferredShmemCarveout' in found_struct}} @property def preferredShmemCarveout(self): - return self._ptr[0].preferredShmemCarveout + return self._pvt_ptr[0].preferredShmemCarveout @preferredShmemCarveout.setter def preferredShmemCarveout(self, int preferredShmemCarveout): - self._ptr[0].preferredShmemCarveout = preferredShmemCarveout + self._pvt_ptr[0].preferredShmemCarveout = preferredShmemCarveout + {{endif}} + {{if 'cudaFuncAttributes.clusterDimMustBeSet' in found_struct}} @property def clusterDimMustBeSet(self): - return self._ptr[0].clusterDimMustBeSet + return self._pvt_ptr[0].clusterDimMustBeSet @clusterDimMustBeSet.setter def clusterDimMustBeSet(self, int clusterDimMustBeSet): - self._ptr[0].clusterDimMustBeSet = clusterDimMustBeSet + self._pvt_ptr[0].clusterDimMustBeSet = clusterDimMustBeSet + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterWidth' in found_struct}} @property def requiredClusterWidth(self): - return self._ptr[0].requiredClusterWidth + return self._pvt_ptr[0].requiredClusterWidth @requiredClusterWidth.setter def requiredClusterWidth(self, int requiredClusterWidth): - self._ptr[0].requiredClusterWidth = requiredClusterWidth + self._pvt_ptr[0].requiredClusterWidth = requiredClusterWidth + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterHeight' in found_struct}} @property def requiredClusterHeight(self): - return self._ptr[0].requiredClusterHeight + return self._pvt_ptr[0].requiredClusterHeight @requiredClusterHeight.setter def requiredClusterHeight(self, int requiredClusterHeight): - self._ptr[0].requiredClusterHeight = requiredClusterHeight + self._pvt_ptr[0].requiredClusterHeight = requiredClusterHeight + {{endif}} + {{if 'cudaFuncAttributes.requiredClusterDepth' in found_struct}} @property def requiredClusterDepth(self): - return self._ptr[0].requiredClusterDepth + return self._pvt_ptr[0].requiredClusterDepth @requiredClusterDepth.setter def requiredClusterDepth(self, int requiredClusterDepth): - self._ptr[0].requiredClusterDepth = requiredClusterDepth + self._pvt_ptr[0].requiredClusterDepth = requiredClusterDepth + {{endif}} + {{if 'cudaFuncAttributes.clusterSchedulingPolicyPreference' in found_struct}} @property def clusterSchedulingPolicyPreference(self): - return self._ptr[0].clusterSchedulingPolicyPreference + return self._pvt_ptr[0].clusterSchedulingPolicyPreference @clusterSchedulingPolicyPreference.setter def clusterSchedulingPolicyPreference(self, int clusterSchedulingPolicyPreference): - self._ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference + self._pvt_ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference + {{endif}} + {{if 'cudaFuncAttributes.nonPortableClusterSizeAllowed' in found_struct}} @property def nonPortableClusterSizeAllowed(self): - return self._ptr[0].nonPortableClusterSizeAllowed + return self._pvt_ptr[0].nonPortableClusterSizeAllowed @nonPortableClusterSizeAllowed.setter def nonPortableClusterSizeAllowed(self, int nonPortableClusterSizeAllowed): - self._ptr[0].nonPortableClusterSizeAllowed = nonPortableClusterSizeAllowed + self._pvt_ptr[0].nonPortableClusterSizeAllowed = nonPortableClusterSizeAllowed + {{endif}} + {{if 'cudaFuncAttributes.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct cudaMemLocation' in found_types}} +{{if 'cudaMemLocation' in found_struct}} cdef class cudaMemLocation: """ @@ -7360,56 +8580,67 @@ cdef class cudaMemLocation: Attributes ---------- + {{if 'cudaMemLocation.type' in found_struct}} type : cudaMemLocationType Specifies the location type, which modifies the meaning of id. + {{endif}} + {{if 'cudaMemLocation.id' in found_struct}} id : int identifier for a given this location's ::CUmemLocationType. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemLocation.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'cudaMemLocation.id' in found_struct}} try: str_list += ['id : ' + str(self.id)] except ValueError: str_list += ['id : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemLocation.type' in found_struct}} @property def type(self): - return cudaMemLocationType(self._ptr[0].type) + return cudaMemLocationType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaMemLocationType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'cudaMemLocation.id' in found_struct}} @property def id(self): - return self._ptr[0].id + return self._pvt_ptr[0].id @id.setter def id(self, int id): - self._ptr[0].id = id + self._pvt_ptr[0].id = id + {{endif}} {{endif}} -{{if 'struct cudaMemAccessDesc' in found_types}} +{{if 'cudaMemAccessDesc' in found_struct}} cdef class cudaMemAccessDesc: """ @@ -7417,56 +8648,70 @@ cdef class cudaMemAccessDesc: Attributes ---------- + {{if 'cudaMemAccessDesc.location' in found_struct}} location : cudaMemLocation Location on which the request is to change it's accessibility + {{endif}} + {{if 'cudaMemAccessDesc.flags' in found_struct}} flags : cudaMemAccessFlags ::CUmemProt accessibility flags to set on the request + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._location = cudaMemLocation(_ptr=&self._ptr[0].location) + pass + {{if 'cudaMemAccessDesc.location' in found_struct}} + self._location = cudaMemLocation(_ptr=&self._pvt_ptr[0].location) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemAccessDesc.location' in found_struct}} try: str_list += ['location :\n' + '\n'.join([' ' + line for line in str(self.location).splitlines()])] except ValueError: str_list += ['location : '] + {{endif}} + {{if 'cudaMemAccessDesc.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemAccessDesc.location' in found_struct}} @property def location(self): return self._location @location.setter def location(self, location not None : cudaMemLocation): - string.memcpy(&self._ptr[0].location, location.getPtr(), sizeof(self._ptr[0].location)) + string.memcpy(&self._pvt_ptr[0].location, location.getPtr(), sizeof(self._pvt_ptr[0].location)) + {{endif}} + {{if 'cudaMemAccessDesc.flags' in found_struct}} @property def flags(self): - return cudaMemAccessFlags(self._ptr[0].flags) + return cudaMemAccessFlags(self._pvt_ptr[0].flags) @flags.setter def flags(self, flags not None : cudaMemAccessFlags): - self._ptr[0].flags = flags.value + self._pvt_ptr[0].flags = flags.value + {{endif}} {{endif}} -{{if 'struct cudaMemPoolProps' in found_types}} +{{if 'cudaMemPoolProps' in found_struct}} cdef class cudaMemPoolProps: """ @@ -7474,126 +8719,170 @@ cdef class cudaMemPoolProps: Attributes ---------- + {{if 'cudaMemPoolProps.allocType' in found_struct}} allocType : cudaMemAllocationType Allocation type. Currently must be specified as cudaMemAllocationTypePinned + {{endif}} + {{if 'cudaMemPoolProps.handleTypes' in found_struct}} handleTypes : cudaMemAllocationHandleType Handle types that will be supported by allocations from the pool. + {{endif}} + {{if 'cudaMemPoolProps.location' in found_struct}} location : cudaMemLocation Location allocations should reside. + {{endif}} + {{if 'cudaMemPoolProps.win32SecurityAttributes' in found_struct}} win32SecurityAttributes : Any Windows-specific LPSECURITYATTRIBUTES required when cudaMemHandleTypeWin32 is specified. This security attribute defines the scope of which exported allocations may be tranferred to other processes. In all other cases, this field is required to be zero. + {{endif}} + {{if 'cudaMemPoolProps.maxSize' in found_struct}} maxSize : size_t Maximum pool size. When set to 0, defaults to a system dependent value. + {{endif}} + {{if 'cudaMemPoolProps.usage' in found_struct}} usage : unsigned short Bitmask indicating intended usage for the pool. + {{endif}} + {{if 'cudaMemPoolProps.reserved' in found_struct}} reserved : bytes reserved for future use, must be 0 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._location = cudaMemLocation(_ptr=&self._ptr[0].location) + pass + {{if 'cudaMemPoolProps.location' in found_struct}} + self._location = cudaMemLocation(_ptr=&self._pvt_ptr[0].location) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemPoolProps.allocType' in found_struct}} try: str_list += ['allocType : ' + str(self.allocType)] except ValueError: str_list += ['allocType : '] + {{endif}} + {{if 'cudaMemPoolProps.handleTypes' in found_struct}} try: str_list += ['handleTypes : ' + str(self.handleTypes)] except ValueError: str_list += ['handleTypes : '] + {{endif}} + {{if 'cudaMemPoolProps.location' in found_struct}} try: str_list += ['location :\n' + '\n'.join([' ' + line for line in str(self.location).splitlines()])] except ValueError: str_list += ['location : '] + {{endif}} + {{if 'cudaMemPoolProps.win32SecurityAttributes' in found_struct}} try: str_list += ['win32SecurityAttributes : ' + hex(self.win32SecurityAttributes)] except ValueError: str_list += ['win32SecurityAttributes : '] + {{endif}} + {{if 'cudaMemPoolProps.maxSize' in found_struct}} try: str_list += ['maxSize : ' + str(self.maxSize)] except ValueError: str_list += ['maxSize : '] + {{endif}} + {{if 'cudaMemPoolProps.usage' in found_struct}} try: str_list += ['usage : ' + str(self.usage)] except ValueError: str_list += ['usage : '] + {{endif}} + {{if 'cudaMemPoolProps.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemPoolProps.allocType' in found_struct}} @property def allocType(self): - return cudaMemAllocationType(self._ptr[0].allocType) + return cudaMemAllocationType(self._pvt_ptr[0].allocType) @allocType.setter def allocType(self, allocType not None : cudaMemAllocationType): - self._ptr[0].allocType = allocType.value + self._pvt_ptr[0].allocType = allocType.value + {{endif}} + {{if 'cudaMemPoolProps.handleTypes' in found_struct}} @property def handleTypes(self): - return cudaMemAllocationHandleType(self._ptr[0].handleTypes) + return cudaMemAllocationHandleType(self._pvt_ptr[0].handleTypes) @handleTypes.setter def handleTypes(self, handleTypes not None : cudaMemAllocationHandleType): - self._ptr[0].handleTypes = handleTypes.value + self._pvt_ptr[0].handleTypes = handleTypes.value + {{endif}} + {{if 'cudaMemPoolProps.location' in found_struct}} @property def location(self): return self._location @location.setter def location(self, location not None : cudaMemLocation): - string.memcpy(&self._ptr[0].location, location.getPtr(), sizeof(self._ptr[0].location)) + string.memcpy(&self._pvt_ptr[0].location, location.getPtr(), sizeof(self._pvt_ptr[0].location)) + {{endif}} + {{if 'cudaMemPoolProps.win32SecurityAttributes' in found_struct}} @property def win32SecurityAttributes(self): - return self._ptr[0].win32SecurityAttributes + return self._pvt_ptr[0].win32SecurityAttributes @win32SecurityAttributes.setter def win32SecurityAttributes(self, win32SecurityAttributes): - _cywin32SecurityAttributes = utils.HelperInputVoidPtr(win32SecurityAttributes) - self._ptr[0].win32SecurityAttributes = _cywin32SecurityAttributes.cptr + _cwin32SecurityAttributes = utils.HelperInputVoidPtr(win32SecurityAttributes) + self._pvt_ptr[0].win32SecurityAttributes = _cwin32SecurityAttributes.cptr + {{endif}} + {{if 'cudaMemPoolProps.maxSize' in found_struct}} @property def maxSize(self): - return self._ptr[0].maxSize + return self._pvt_ptr[0].maxSize @maxSize.setter def maxSize(self, size_t maxSize): - self._ptr[0].maxSize = maxSize + self._pvt_ptr[0].maxSize = maxSize + {{endif}} + {{if 'cudaMemPoolProps.usage' in found_struct}} @property def usage(self): - return self._ptr[0].usage + return self._pvt_ptr[0].usage @usage.setter def usage(self, unsigned short usage): - self._ptr[0].usage = usage + self._pvt_ptr[0].usage = usage + {{endif}} + {{if 'cudaMemPoolProps.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].reserved, 54) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 54) @reserved.setter def reserved(self, reserved): if len(reserved) != 54: raise ValueError("reserved length must be 54, is " + str(len(reserved))) for i, b in enumerate(reserved): - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b + {{endif}} {{endif}} -{{if 'struct cudaMemPoolPtrExportData' in found_types}} +{{if 'cudaMemPoolPtrExportData' in found_struct}} cdef class cudaMemPoolPtrExportData: """ @@ -7601,47 +8890,52 @@ cdef class cudaMemPoolPtrExportData: Attributes ---------- + {{if 'cudaMemPoolPtrExportData.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemPoolPtrExportData.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemPoolPtrExportData.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) @reserved.setter def reserved(self, reserved): if len(reserved) != 64: raise ValueError("reserved length must be 64, is " + str(len(reserved))) for i, b in enumerate(reserved): - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b + {{endif}} {{endif}} -{{if 'struct cudaMemAllocNodeParams' in found_types}} +{{if 'cudaMemAllocNodeParams' in found_struct}} cdef class cudaMemAllocNodeParams: """ @@ -7649,81 +8943,109 @@ cdef class cudaMemAllocNodeParams: Attributes ---------- + {{if 'cudaMemAllocNodeParams.poolProps' in found_struct}} poolProps : cudaMemPoolProps in: location where the allocation should reside (specified in ::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is not supported. in: array of memory access descriptors. Used to describe peer GPU access + {{endif}} + {{if 'cudaMemAllocNodeParams.accessDescs' in found_struct}} accessDescs : cudaMemAccessDesc in: number of memory access descriptors. Must not exceed the number of GPUs. + {{endif}} + {{if 'cudaMemAllocNodeParams.accessDescCount' in found_struct}} accessDescCount : size_t in: Number of `accessDescs`s + {{endif}} + {{if 'cudaMemAllocNodeParams.bytesize' in found_struct}} bytesize : size_t in: size in bytes of the requested allocation + {{endif}} + {{if 'cudaMemAllocNodeParams.dptr' in found_struct}} dptr : Any out: address of the allocation returned by CUDA + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._poolProps = cudaMemPoolProps(_ptr=&self._ptr[0].poolProps) + pass + {{if 'cudaMemAllocNodeParams.poolProps' in found_struct}} + self._poolProps = cudaMemPoolProps(_ptr=&self._pvt_ptr[0].poolProps) + {{endif}} def __dealloc__(self): + pass + {{if 'cudaMemAllocNodeParams.accessDescs' in found_struct}} if self._accessDescs is not NULL: free(self._accessDescs) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemAllocNodeParams.poolProps' in found_struct}} try: str_list += ['poolProps :\n' + '\n'.join([' ' + line for line in str(self.poolProps).splitlines()])] except ValueError: str_list += ['poolProps : '] + {{endif}} + {{if 'cudaMemAllocNodeParams.accessDescs' in found_struct}} try: str_list += ['accessDescs : ' + str(self.accessDescs)] except ValueError: str_list += ['accessDescs : '] + {{endif}} + {{if 'cudaMemAllocNodeParams.accessDescCount' in found_struct}} try: str_list += ['accessDescCount : ' + str(self.accessDescCount)] except ValueError: str_list += ['accessDescCount : '] + {{endif}} + {{if 'cudaMemAllocNodeParams.bytesize' in found_struct}} try: str_list += ['bytesize : ' + str(self.bytesize)] except ValueError: str_list += ['bytesize : '] + {{endif}} + {{if 'cudaMemAllocNodeParams.dptr' in found_struct}} try: str_list += ['dptr : ' + hex(self.dptr)] except ValueError: str_list += ['dptr : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemAllocNodeParams.poolProps' in found_struct}} @property def poolProps(self): return self._poolProps @poolProps.setter def poolProps(self, poolProps not None : cudaMemPoolProps): - string.memcpy(&self._ptr[0].poolProps, poolProps.getPtr(), sizeof(self._ptr[0].poolProps)) + string.memcpy(&self._pvt_ptr[0].poolProps, poolProps.getPtr(), sizeof(self._pvt_ptr[0].poolProps)) + {{endif}} + {{if 'cudaMemAllocNodeParams.accessDescs' in found_struct}} @property def accessDescs(self): - arrs = [self._ptr[0].accessDescs + x*sizeof(cyruntime.cudaMemAccessDesc) for x in range(self._accessDescs_length)] + arrs = [self._pvt_ptr[0].accessDescs + x*sizeof(cyruntime.cudaMemAccessDesc) for x in range(self._accessDescs_length)] return [cudaMemAccessDesc(_ptr=arr) for arr in arrs] @accessDescs.setter def accessDescs(self, val): if len(val) == 0: free(self._accessDescs) self._accessDescs_length = 0 - self._ptr[0].accessDescs = NULL + self._pvt_ptr[0].accessDescs = NULL else: if self._accessDescs_length != len(val): free(self._accessDescs) @@ -7731,31 +9053,38 @@ cdef class cudaMemAllocNodeParams: if self._accessDescs is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaMemAccessDesc))) self._accessDescs_length = len(val) - self._ptr[0].accessDescs = self._accessDescs + self._pvt_ptr[0].accessDescs = self._accessDescs for idx in range(len(val)): - string.memcpy(&self._accessDescs[idx], (val[idx])._ptr, sizeof(cyruntime.cudaMemAccessDesc)) + string.memcpy(&self._accessDescs[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaMemAccessDesc)) + {{endif}} + {{if 'cudaMemAllocNodeParams.accessDescCount' in found_struct}} @property def accessDescCount(self): - return self._ptr[0].accessDescCount + return self._pvt_ptr[0].accessDescCount @accessDescCount.setter def accessDescCount(self, size_t accessDescCount): - self._ptr[0].accessDescCount = accessDescCount + self._pvt_ptr[0].accessDescCount = accessDescCount + {{endif}} + {{if 'cudaMemAllocNodeParams.bytesize' in found_struct}} @property def bytesize(self): - return self._ptr[0].bytesize + return self._pvt_ptr[0].bytesize @bytesize.setter def bytesize(self, size_t bytesize): - self._ptr[0].bytesize = bytesize + self._pvt_ptr[0].bytesize = bytesize + {{endif}} + {{if 'cudaMemAllocNodeParams.dptr' in found_struct}} @property def dptr(self): - return self._ptr[0].dptr + return self._pvt_ptr[0].dptr @dptr.setter def dptr(self, dptr): - _cydptr = utils.HelperInputVoidPtr(dptr) - self._ptr[0].dptr = _cydptr.cptr + _cdptr = utils.HelperInputVoidPtr(dptr) + self._pvt_ptr[0].dptr = _cdptr.cptr + {{endif}} {{endif}} -{{if 'struct cudaMemAllocNodeParamsV2' in found_types}} +{{if 'cudaMemAllocNodeParamsV2' in found_struct}} cdef class cudaMemAllocNodeParamsV2: """ @@ -7763,81 +9092,109 @@ cdef class cudaMemAllocNodeParamsV2: Attributes ---------- + {{if 'cudaMemAllocNodeParamsV2.poolProps' in found_struct}} poolProps : cudaMemPoolProps in: location where the allocation should reside (specified in ::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is not supported. in: array of memory access descriptors. Used to describe peer GPU access + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.accessDescs' in found_struct}} accessDescs : cudaMemAccessDesc in: number of memory access descriptors. Must not exceed the number of GPUs. + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.accessDescCount' in found_struct}} accessDescCount : size_t in: Number of `accessDescs`s + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.bytesize' in found_struct}} bytesize : size_t in: size in bytes of the requested allocation + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.dptr' in found_struct}} dptr : Any out: address of the allocation returned by CUDA + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._poolProps = cudaMemPoolProps(_ptr=&self._ptr[0].poolProps) + pass + {{if 'cudaMemAllocNodeParamsV2.poolProps' in found_struct}} + self._poolProps = cudaMemPoolProps(_ptr=&self._pvt_ptr[0].poolProps) + {{endif}} def __dealloc__(self): + pass + {{if 'cudaMemAllocNodeParamsV2.accessDescs' in found_struct}} if self._accessDescs is not NULL: free(self._accessDescs) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemAllocNodeParamsV2.poolProps' in found_struct}} try: str_list += ['poolProps :\n' + '\n'.join([' ' + line for line in str(self.poolProps).splitlines()])] except ValueError: str_list += ['poolProps : '] + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.accessDescs' in found_struct}} try: str_list += ['accessDescs : ' + str(self.accessDescs)] except ValueError: str_list += ['accessDescs : '] + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.accessDescCount' in found_struct}} try: str_list += ['accessDescCount : ' + str(self.accessDescCount)] except ValueError: str_list += ['accessDescCount : '] + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.bytesize' in found_struct}} try: str_list += ['bytesize : ' + str(self.bytesize)] except ValueError: str_list += ['bytesize : '] + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.dptr' in found_struct}} try: str_list += ['dptr : ' + hex(self.dptr)] except ValueError: str_list += ['dptr : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemAllocNodeParamsV2.poolProps' in found_struct}} @property def poolProps(self): return self._poolProps @poolProps.setter def poolProps(self, poolProps not None : cudaMemPoolProps): - string.memcpy(&self._ptr[0].poolProps, poolProps.getPtr(), sizeof(self._ptr[0].poolProps)) + string.memcpy(&self._pvt_ptr[0].poolProps, poolProps.getPtr(), sizeof(self._pvt_ptr[0].poolProps)) + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.accessDescs' in found_struct}} @property def accessDescs(self): - arrs = [self._ptr[0].accessDescs + x*sizeof(cyruntime.cudaMemAccessDesc) for x in range(self._accessDescs_length)] + arrs = [self._pvt_ptr[0].accessDescs + x*sizeof(cyruntime.cudaMemAccessDesc) for x in range(self._accessDescs_length)] return [cudaMemAccessDesc(_ptr=arr) for arr in arrs] @accessDescs.setter def accessDescs(self, val): if len(val) == 0: free(self._accessDescs) self._accessDescs_length = 0 - self._ptr[0].accessDescs = NULL + self._pvt_ptr[0].accessDescs = NULL else: if self._accessDescs_length != len(val): free(self._accessDescs) @@ -7845,31 +9202,38 @@ cdef class cudaMemAllocNodeParamsV2: if self._accessDescs is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaMemAccessDesc))) self._accessDescs_length = len(val) - self._ptr[0].accessDescs = self._accessDescs + self._pvt_ptr[0].accessDescs = self._accessDescs for idx in range(len(val)): - string.memcpy(&self._accessDescs[idx], (val[idx])._ptr, sizeof(cyruntime.cudaMemAccessDesc)) + string.memcpy(&self._accessDescs[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaMemAccessDesc)) + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.accessDescCount' in found_struct}} @property def accessDescCount(self): - return self._ptr[0].accessDescCount + return self._pvt_ptr[0].accessDescCount @accessDescCount.setter def accessDescCount(self, size_t accessDescCount): - self._ptr[0].accessDescCount = accessDescCount + self._pvt_ptr[0].accessDescCount = accessDescCount + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.bytesize' in found_struct}} @property def bytesize(self): - return self._ptr[0].bytesize + return self._pvt_ptr[0].bytesize @bytesize.setter def bytesize(self, size_t bytesize): - self._ptr[0].bytesize = bytesize + self._pvt_ptr[0].bytesize = bytesize + {{endif}} + {{if 'cudaMemAllocNodeParamsV2.dptr' in found_struct}} @property def dptr(self): - return self._ptr[0].dptr + return self._pvt_ptr[0].dptr @dptr.setter def dptr(self, dptr): - _cydptr = utils.HelperInputVoidPtr(dptr) - self._ptr[0].dptr = _cydptr.cptr + _cdptr = utils.HelperInputVoidPtr(dptr) + self._pvt_ptr[0].dptr = _cdptr.cptr + {{endif}} {{endif}} -{{if 'struct cudaMemFreeNodeParams' in found_types}} +{{if 'cudaMemFreeNodeParams' in found_struct}} cdef class cudaMemFreeNodeParams: """ @@ -7877,731 +9241,1768 @@ cdef class cudaMemFreeNodeParams: Attributes ---------- + {{if 'cudaMemFreeNodeParams.dptr' in found_struct}} dptr : Any in: the pointer to free + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemFreeNodeParams.dptr' in found_struct}} try: str_list += ['dptr : ' + hex(self.dptr)] except ValueError: str_list += ['dptr : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemFreeNodeParams.dptr' in found_struct}} @property def dptr(self): - return self._ptr[0].dptr + return self._pvt_ptr[0].dptr @dptr.setter def dptr(self, dptr): - _cydptr = utils.HelperInputVoidPtr(dptr) - self._ptr[0].dptr = _cydptr.cptr + _cdptr = utils.HelperInputVoidPtr(dptr) + self._pvt_ptr[0].dptr = _cdptr.cptr + {{endif}} {{endif}} -{{if 'struct CUuuid_st' in found_types}} +{{if 'cudaMemcpyAttributes' in found_struct}} -cdef class CUuuid_st: +cdef class cudaMemcpyAttributes: """ + Attributes specific to copies within a batch. For more details on + usage see cudaMemcpyBatchAsync. + Attributes ---------- - bytes : bytes - < CUDA definition of UUID + {{if 'cudaMemcpyAttributes.srcAccessOrder' in found_struct}} + srcAccessOrder : cudaMemcpySrcAccessOrder + Source access ordering to be observed for copies with this + attribute. + {{endif}} + {{if 'cudaMemcpyAttributes.srcLocHint' in found_struct}} + srcLocHint : cudaMemLocation + Hint location for the source operand. Ignored when the pointers are + not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'cudaMemcpyAttributes.dstLocHint' in found_struct}} + dstLocHint : cudaMemLocation + Hint location for the destination operand. Ignored when the + pointers are not managed memory or memory allocated outside CUDA. + {{endif}} + {{if 'cudaMemcpyAttributes.flags' in found_struct}} + flags : unsigned int + Additional flags for copies with this attribute. See + cudaMemcpyFlags. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass + {{if 'cudaMemcpyAttributes.srcLocHint' in found_struct}} + self._srcLocHint = cudaMemLocation(_ptr=&self._pvt_ptr[0].srcLocHint) + {{endif}} + {{if 'cudaMemcpyAttributes.dstLocHint' in found_struct}} + self._dstLocHint = cudaMemLocation(_ptr=&self._pvt_ptr[0].dstLocHint) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemcpyAttributes.srcAccessOrder' in found_struct}} try: - str_list += ['bytes : ' + str(self.bytes.hex())] + str_list += ['srcAccessOrder : ' + str(self.srcAccessOrder)] except ValueError: - str_list += ['bytes : '] + str_list += ['srcAccessOrder : '] + {{endif}} + {{if 'cudaMemcpyAttributes.srcLocHint' in found_struct}} + try: + str_list += ['srcLocHint :\n' + '\n'.join([' ' + line for line in str(self.srcLocHint).splitlines()])] + except ValueError: + str_list += ['srcLocHint : '] + {{endif}} + {{if 'cudaMemcpyAttributes.dstLocHint' in found_struct}} + try: + str_list += ['dstLocHint :\n' + '\n'.join([' ' + line for line in str(self.dstLocHint).splitlines()])] + except ValueError: + str_list += ['dstLocHint : '] + {{endif}} + {{if 'cudaMemcpyAttributes.flags' in found_struct}} + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemcpyAttributes.srcAccessOrder' in found_struct}} + @property + def srcAccessOrder(self): + return cudaMemcpySrcAccessOrder(self._pvt_ptr[0].srcAccessOrder) + @srcAccessOrder.setter + def srcAccessOrder(self, srcAccessOrder not None : cudaMemcpySrcAccessOrder): + self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + {{endif}} + {{if 'cudaMemcpyAttributes.srcLocHint' in found_struct}} + @property + def srcLocHint(self): + return self._srcLocHint + @srcLocHint.setter + def srcLocHint(self, srcLocHint not None : cudaMemLocation): + string.memcpy(&self._pvt_ptr[0].srcLocHint, srcLocHint.getPtr(), sizeof(self._pvt_ptr[0].srcLocHint)) + {{endif}} + {{if 'cudaMemcpyAttributes.dstLocHint' in found_struct}} + @property + def dstLocHint(self): + return self._dstLocHint + @dstLocHint.setter + def dstLocHint(self, dstLocHint not None : cudaMemLocation): + string.memcpy(&self._pvt_ptr[0].dstLocHint, dstLocHint.getPtr(), sizeof(self._pvt_ptr[0].dstLocHint)) + {{endif}} + {{if 'cudaMemcpyAttributes.flags' in found_struct}} @property - def bytes(self): - return PyBytes_FromStringAndSize(self._ptr[0].bytes, 16) + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + {{endif}} +{{endif}} +{{if 'cudaOffset3D' in found_struct}} + +cdef class cudaOffset3D: + """ + Struct representing offset into a cudaArray_t in elements + + Attributes + ---------- + {{if 'cudaOffset3D.x' in found_struct}} + x : size_t + + {{endif}} + {{if 'cudaOffset3D.y' in found_struct}} + y : size_t + {{endif}} + {{if 'cudaOffset3D.z' in found_struct}} + z : size_t + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'cudaOffset3D.x' in found_struct}} + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + {{endif}} + {{if 'cudaOffset3D.y' in found_struct}} + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + {{endif}} + {{if 'cudaOffset3D.z' in found_struct}} + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'cudaOffset3D.x' in found_struct}} + @property + def x(self): + return self._pvt_ptr[0].x + @x.setter + def x(self, size_t x): + self._pvt_ptr[0].x = x + {{endif}} + {{if 'cudaOffset3D.y' in found_struct}} + @property + def y(self): + return self._pvt_ptr[0].y + @y.setter + def y(self, size_t y): + self._pvt_ptr[0].y = y + {{endif}} + {{if 'cudaOffset3D.z' in found_struct}} + @property + def z(self): + return self._pvt_ptr[0].z + @z.setter + def z(self, size_t z): + self._pvt_ptr[0].z = z + {{endif}} {{endif}} -{{if 'struct cudaDeviceProp' in found_types}} +{{if 'cudaMemcpy3DOperand.op.ptr' in found_struct}} -cdef class cudaDeviceProp: +cdef class anon_struct5: """ - CUDA device properties + Attributes + ---------- + {{if 'cudaMemcpy3DOperand.op.ptr.ptr' in found_struct}} + ptr : Any + + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.rowLength' in found_struct}} + rowLength : size_t + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.layerHeight' in found_struct}} + layerHeight : size_t + + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.locHint' in found_struct}} + locHint : cudaMemLocation + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + {{if 'cudaMemcpy3DOperand.op.ptr.locHint' in found_struct}} + self._locHint = cudaMemLocation(_ptr=&self._pvt_ptr[0].op.ptr.locHint) + {{endif}} + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op.ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'cudaMemcpy3DOperand.op.ptr.ptr' in found_struct}} + try: + str_list += ['ptr : ' + hex(self.ptr)] + except ValueError: + str_list += ['ptr : '] + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.rowLength' in found_struct}} + try: + str_list += ['rowLength : ' + str(self.rowLength)] + except ValueError: + str_list += ['rowLength : '] + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.layerHeight' in found_struct}} + try: + str_list += ['layerHeight : ' + str(self.layerHeight)] + except ValueError: + str_list += ['layerHeight : '] + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.locHint' in found_struct}} + try: + str_list += ['locHint :\n' + '\n'.join([' ' + line for line in str(self.locHint).splitlines()])] + except ValueError: + str_list += ['locHint : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'cudaMemcpy3DOperand.op.ptr.ptr' in found_struct}} + @property + def ptr(self): + return self._pvt_ptr[0].op.ptr.ptr + @ptr.setter + def ptr(self, ptr): + _cptr = utils.HelperInputVoidPtr(ptr) + self._pvt_ptr[0].op.ptr.ptr = _cptr.cptr + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.rowLength' in found_struct}} + @property + def rowLength(self): + return self._pvt_ptr[0].op.ptr.rowLength + @rowLength.setter + def rowLength(self, size_t rowLength): + self._pvt_ptr[0].op.ptr.rowLength = rowLength + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.layerHeight' in found_struct}} + @property + def layerHeight(self): + return self._pvt_ptr[0].op.ptr.layerHeight + @layerHeight.setter + def layerHeight(self, size_t layerHeight): + self._pvt_ptr[0].op.ptr.layerHeight = layerHeight + {{endif}} + {{if 'cudaMemcpy3DOperand.op.ptr.locHint' in found_struct}} + @property + def locHint(self): + return self._locHint + @locHint.setter + def locHint(self, locHint not None : cudaMemLocation): + string.memcpy(&self._pvt_ptr[0].op.ptr.locHint, locHint.getPtr(), sizeof(self._pvt_ptr[0].op.ptr.locHint)) + {{endif}} +{{endif}} +{{if 'cudaMemcpy3DOperand.op.array' in found_struct}} + +cdef class anon_struct6: + """ Attributes ---------- - name : bytes - ASCII string identifying device - uuid : cudaUUID_t - 16-byte unique identifier - luid : bytes - 8-byte locally unique identifier. Value is undefined on TCC and - non-Windows platforms - luidDeviceNodeMask : unsigned int - LUID device node mask. Value is undefined on TCC and non-Windows - platforms - totalGlobalMem : size_t - Global memory available on device in bytes - sharedMemPerBlock : size_t - Shared memory available per block in bytes - regsPerBlock : int - 32-bit registers available per block - warpSize : int - Warp size in threads - memPitch : size_t - Maximum pitch in bytes allowed by memory copies - maxThreadsPerBlock : int - Maximum number of threads per block - maxThreadsDim : List[int] - Maximum size of each dimension of a block - maxGridSize : List[int] - Maximum size of each dimension of a grid - clockRate : int + {{if 'cudaMemcpy3DOperand.op.array.array' in found_struct}} + array : cudaArray_t + + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array.offset' in found_struct}} + offset : cudaOffset3D + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + {{if 'cudaMemcpy3DOperand.op.array.array' in found_struct}} + self._array = cudaArray_t(_ptr=&self._pvt_ptr[0].op.array.array) + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array.offset' in found_struct}} + self._offset = cudaOffset3D(_ptr=&self._pvt_ptr[0].op.array.offset) + {{endif}} + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op.array + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'cudaMemcpy3DOperand.op.array.array' in found_struct}} + try: + str_list += ['array : ' + str(self.array)] + except ValueError: + str_list += ['array : '] + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array.offset' in found_struct}} + try: + str_list += ['offset :\n' + '\n'.join([' ' + line for line in str(self.offset).splitlines()])] + except ValueError: + str_list += ['offset : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'cudaMemcpy3DOperand.op.array.array' in found_struct}} + @property + def array(self): + return self._array + @array.setter + def array(self, array): + cdef cyruntime.cudaArray_t cyarray + if array is None: + cyarray = 0 + elif isinstance(array, (cudaArray_t,)): + parray = int(array) + cyarray = parray + else: + parray = int(cudaArray_t(array)) + cyarray = parray + self._array._pvt_ptr[0] = cyarray + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array.offset' in found_struct}} + @property + def offset(self): + return self._offset + @offset.setter + def offset(self, offset not None : cudaOffset3D): + string.memcpy(&self._pvt_ptr[0].op.array.offset, offset.getPtr(), sizeof(self._pvt_ptr[0].op.array.offset)) + {{endif}} +{{endif}} +{{if 'cudaMemcpy3DOperand.op' in found_struct}} + +cdef class anon_union1: + """ + Attributes + ---------- + {{if 'cudaMemcpy3DOperand.op.ptr' in found_struct}} + ptr : anon_struct5 + + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array' in found_struct}} + array : anon_struct6 + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + {{if 'cudaMemcpy3DOperand.op.ptr' in found_struct}} + self._ptr = anon_struct5(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array' in found_struct}} + self._array = anon_struct6(_ptr=self._pvt_ptr) + {{endif}} + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].op + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'cudaMemcpy3DOperand.op.ptr' in found_struct}} + try: + str_list += ['ptr :\n' + '\n'.join([' ' + line for line in str(self.ptr).splitlines()])] + except ValueError: + str_list += ['ptr : '] + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array' in found_struct}} + try: + str_list += ['array :\n' + '\n'.join([' ' + line for line in str(self.array).splitlines()])] + except ValueError: + str_list += ['array : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'cudaMemcpy3DOperand.op.ptr' in found_struct}} + @property + def ptr(self): + return self._ptr + @ptr.setter + def ptr(self, ptr not None : anon_struct5): + string.memcpy(&self._pvt_ptr[0].op.ptr, ptr.getPtr(), sizeof(self._pvt_ptr[0].op.ptr)) + {{endif}} + {{if 'cudaMemcpy3DOperand.op.array' in found_struct}} + @property + def array(self): + return self._array + @array.setter + def array(self, array not None : anon_struct6): + string.memcpy(&self._pvt_ptr[0].op.array, array.getPtr(), sizeof(self._pvt_ptr[0].op.array)) + {{endif}} +{{endif}} +{{if 'cudaMemcpy3DOperand' in found_struct}} + +cdef class cudaMemcpy3DOperand: + """ + Struct representing an operand for copy with cudaMemcpy3DBatchAsync + + Attributes + ---------- + {{if 'cudaMemcpy3DOperand.type' in found_struct}} + type : cudaMemcpy3DOperandType + + {{endif}} + {{if 'cudaMemcpy3DOperand.op' in found_struct}} + op : anon_union1 + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._val_ptr = calloc(1, sizeof(cyruntime.cudaMemcpy3DOperand)) + self._pvt_ptr = self._val_ptr + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + {{if 'cudaMemcpy3DOperand.op' in found_struct}} + self._op = anon_union1(_ptr=self._pvt_ptr) + {{endif}} + def __dealloc__(self): + if self._val_ptr is not NULL: + free(self._val_ptr) + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'cudaMemcpy3DOperand.type' in found_struct}} + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + {{endif}} + {{if 'cudaMemcpy3DOperand.op' in found_struct}} + try: + str_list += ['op :\n' + '\n'.join([' ' + line for line in str(self.op).splitlines()])] + except ValueError: + str_list += ['op : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'cudaMemcpy3DOperand.type' in found_struct}} + @property + def type(self): + return cudaMemcpy3DOperandType(self._pvt_ptr[0].type) + @type.setter + def type(self, type not None : cudaMemcpy3DOperandType): + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'cudaMemcpy3DOperand.op' in found_struct}} + @property + def op(self): + return self._op + @op.setter + def op(self, op not None : anon_union1): + string.memcpy(&self._pvt_ptr[0].op, op.getPtr(), sizeof(self._pvt_ptr[0].op)) + {{endif}} +{{endif}} +{{if 'cudaMemcpy3DBatchOp' in found_struct}} + +cdef class cudaMemcpy3DBatchOp: + """ + Attributes + ---------- + {{if 'cudaMemcpy3DBatchOp.src' in found_struct}} + src : cudaMemcpy3DOperand + Source memcpy operand. + {{endif}} + {{if 'cudaMemcpy3DBatchOp.dst' in found_struct}} + dst : cudaMemcpy3DOperand + Destination memcpy operand. + {{endif}} + {{if 'cudaMemcpy3DBatchOp.extent' in found_struct}} + extent : cudaExtent + Extents of the memcpy between src and dst. The width, height and + depth components must not be 0. + {{endif}} + {{if 'cudaMemcpy3DBatchOp.srcAccessOrder' in found_struct}} + srcAccessOrder : cudaMemcpySrcAccessOrder + Source access ordering to be observed for copy from src to dst. + {{endif}} + {{if 'cudaMemcpy3DBatchOp.flags' in found_struct}} + flags : unsigned int + Additional flags for copy from src to dst. See cudaMemcpyFlags. + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + {{if 'cudaMemcpy3DBatchOp.src' in found_struct}} + self._src = cudaMemcpy3DOperand(_ptr=&self._pvt_ptr[0].src) + {{endif}} + {{if 'cudaMemcpy3DBatchOp.dst' in found_struct}} + self._dst = cudaMemcpy3DOperand(_ptr=&self._pvt_ptr[0].dst) + {{endif}} + {{if 'cudaMemcpy3DBatchOp.extent' in found_struct}} + self._extent = cudaExtent(_ptr=&self._pvt_ptr[0].extent) + {{endif}} + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'cudaMemcpy3DBatchOp.src' in found_struct}} + try: + str_list += ['src :\n' + '\n'.join([' ' + line for line in str(self.src).splitlines()])] + except ValueError: + str_list += ['src : '] + {{endif}} + {{if 'cudaMemcpy3DBatchOp.dst' in found_struct}} + try: + str_list += ['dst :\n' + '\n'.join([' ' + line for line in str(self.dst).splitlines()])] + except ValueError: + str_list += ['dst : '] + {{endif}} + {{if 'cudaMemcpy3DBatchOp.extent' in found_struct}} + try: + str_list += ['extent :\n' + '\n'.join([' ' + line for line in str(self.extent).splitlines()])] + except ValueError: + str_list += ['extent : '] + {{endif}} + {{if 'cudaMemcpy3DBatchOp.srcAccessOrder' in found_struct}} + try: + str_list += ['srcAccessOrder : ' + str(self.srcAccessOrder)] + except ValueError: + str_list += ['srcAccessOrder : '] + {{endif}} + {{if 'cudaMemcpy3DBatchOp.flags' in found_struct}} + try: + str_list += ['flags : ' + str(self.flags)] + except ValueError: + str_list += ['flags : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'cudaMemcpy3DBatchOp.src' in found_struct}} + @property + def src(self): + return self._src + @src.setter + def src(self, src not None : cudaMemcpy3DOperand): + string.memcpy(&self._pvt_ptr[0].src, src.getPtr(), sizeof(self._pvt_ptr[0].src)) + {{endif}} + {{if 'cudaMemcpy3DBatchOp.dst' in found_struct}} + @property + def dst(self): + return self._dst + @dst.setter + def dst(self, dst not None : cudaMemcpy3DOperand): + string.memcpy(&self._pvt_ptr[0].dst, dst.getPtr(), sizeof(self._pvt_ptr[0].dst)) + {{endif}} + {{if 'cudaMemcpy3DBatchOp.extent' in found_struct}} + @property + def extent(self): + return self._extent + @extent.setter + def extent(self, extent not None : cudaExtent): + string.memcpy(&self._pvt_ptr[0].extent, extent.getPtr(), sizeof(self._pvt_ptr[0].extent)) + {{endif}} + {{if 'cudaMemcpy3DBatchOp.srcAccessOrder' in found_struct}} + @property + def srcAccessOrder(self): + return cudaMemcpySrcAccessOrder(self._pvt_ptr[0].srcAccessOrder) + @srcAccessOrder.setter + def srcAccessOrder(self, srcAccessOrder not None : cudaMemcpySrcAccessOrder): + self._pvt_ptr[0].srcAccessOrder = srcAccessOrder.value + {{endif}} + {{if 'cudaMemcpy3DBatchOp.flags' in found_struct}} + @property + def flags(self): + return self._pvt_ptr[0].flags + @flags.setter + def flags(self, unsigned int flags): + self._pvt_ptr[0].flags = flags + {{endif}} +{{endif}} +{{if 'CUuuid_st' in found_struct}} + +cdef class CUuuid_st: + """ + Attributes + ---------- + {{if 'CUuuid_st.bytes' in found_struct}} + bytes : bytes + < CUDA definition of UUID + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'CUuuid_st.bytes' in found_struct}} + try: + str_list += ['bytes : ' + str(self.bytes.hex())] + except ValueError: + str_list += ['bytes : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'CUuuid_st.bytes' in found_struct}} + @property + def bytes(self): + return PyBytes_FromStringAndSize(self._pvt_ptr[0].bytes, 16) + {{endif}} +{{endif}} +{{if 'cudaDeviceProp' in found_struct}} + +cdef class cudaDeviceProp: + """ + CUDA device properties + + Attributes + ---------- + {{if 'cudaDeviceProp.name' in found_struct}} + name : bytes + ASCII string identifying device + {{endif}} + {{if 'cudaDeviceProp.uuid' in found_struct}} + uuid : cudaUUID_t + 16-byte unique identifier + {{endif}} + {{if 'cudaDeviceProp.luid' in found_struct}} + luid : bytes + 8-byte locally unique identifier. Value is undefined on TCC and + non-Windows platforms + {{endif}} + {{if 'cudaDeviceProp.luidDeviceNodeMask' in found_struct}} + luidDeviceNodeMask : unsigned int + LUID device node mask. Value is undefined on TCC and non-Windows + platforms + {{endif}} + {{if 'cudaDeviceProp.totalGlobalMem' in found_struct}} + totalGlobalMem : size_t + Global memory available on device in bytes + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerBlock' in found_struct}} + sharedMemPerBlock : size_t + Shared memory available per block in bytes + {{endif}} + {{if 'cudaDeviceProp.regsPerBlock' in found_struct}} + regsPerBlock : int + 32-bit registers available per block + {{endif}} + {{if 'cudaDeviceProp.warpSize' in found_struct}} + warpSize : int + Warp size in threads + {{endif}} + {{if 'cudaDeviceProp.memPitch' in found_struct}} + memPitch : size_t + Maximum pitch in bytes allowed by memory copies + {{endif}} + {{if 'cudaDeviceProp.maxThreadsPerBlock' in found_struct}} + maxThreadsPerBlock : int + Maximum number of threads per block + {{endif}} + {{if 'cudaDeviceProp.maxThreadsDim' in found_struct}} + maxThreadsDim : List[int] + Maximum size of each dimension of a block + {{endif}} + {{if 'cudaDeviceProp.maxGridSize' in found_struct}} + maxGridSize : List[int] + Maximum size of each dimension of a grid + {{endif}} + {{if 'cudaDeviceProp.clockRate' in found_struct}} + clockRate : int Deprecated, Clock frequency in kilohertz + {{endif}} + {{if 'cudaDeviceProp.totalConstMem' in found_struct}} totalConstMem : size_t Constant memory available on device in bytes + {{endif}} + {{if 'cudaDeviceProp.major' in found_struct}} major : int Major compute capability + {{endif}} + {{if 'cudaDeviceProp.minor' in found_struct}} minor : int Minor compute capability + {{endif}} + {{if 'cudaDeviceProp.textureAlignment' in found_struct}} textureAlignment : size_t Alignment requirement for textures + {{endif}} + {{if 'cudaDeviceProp.texturePitchAlignment' in found_struct}} texturePitchAlignment : size_t Pitch alignment requirement for texture references bound to pitched memory + {{endif}} + {{if 'cudaDeviceProp.deviceOverlap' in found_struct}} deviceOverlap : int Device can concurrently copy memory and execute a kernel. Deprecated. Use instead asyncEngineCount. + {{endif}} + {{if 'cudaDeviceProp.multiProcessorCount' in found_struct}} multiProcessorCount : int Number of multiprocessors on device + {{endif}} + {{if 'cudaDeviceProp.kernelExecTimeoutEnabled' in found_struct}} kernelExecTimeoutEnabled : int Deprecated, Specified whether there is a run time limit on kernels + {{endif}} + {{if 'cudaDeviceProp.integrated' in found_struct}} integrated : int Device is integrated as opposed to discrete + {{endif}} + {{if 'cudaDeviceProp.canMapHostMemory' in found_struct}} canMapHostMemory : int Device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer + {{endif}} + {{if 'cudaDeviceProp.computeMode' in found_struct}} computeMode : int Deprecated, Compute mode (See cudaComputeMode) + {{endif}} + {{if 'cudaDeviceProp.maxTexture1D' in found_struct}} maxTexture1D : int Maximum 1D texture size + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DMipmap' in found_struct}} maxTexture1DMipmap : int Maximum 1D mipmapped texture size + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DLinear' in found_struct}} maxTexture1DLinear : int Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() or cuDeviceGetTexture1DLinearMaxWidth() instead. + {{endif}} + {{if 'cudaDeviceProp.maxTexture2D' in found_struct}} maxTexture2D : List[int] Maximum 2D texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DMipmap' in found_struct}} maxTexture2DMipmap : List[int] Maximum 2D mipmapped texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DLinear' in found_struct}} maxTexture2DLinear : List[int] Maximum dimensions (width, height, pitch) for 2D textures bound to pitched memory + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DGather' in found_struct}} maxTexture2DGather : List[int] Maximum 2D texture dimensions if texture gather operations have to be performed + {{endif}} + {{if 'cudaDeviceProp.maxTexture3D' in found_struct}} maxTexture3D : List[int] Maximum 3D texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTexture3DAlt' in found_struct}} maxTexture3DAlt : List[int] Maximum alternate 3D texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTextureCubemap' in found_struct}} maxTextureCubemap : int Maximum Cubemap texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DLayered' in found_struct}} maxTexture1DLayered : List[int] Maximum 1D layered texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DLayered' in found_struct}} maxTexture2DLayered : List[int] Maximum 2D layered texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxTextureCubemapLayered' in found_struct}} maxTextureCubemapLayered : List[int] Maximum Cubemap layered texture dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurface1D' in found_struct}} maxSurface1D : int Maximum 1D surface size + {{endif}} + {{if 'cudaDeviceProp.maxSurface2D' in found_struct}} maxSurface2D : List[int] Maximum 2D surface dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurface3D' in found_struct}} maxSurface3D : List[int] Maximum 3D surface dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurface1DLayered' in found_struct}} maxSurface1DLayered : List[int] Maximum 1D layered surface dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurface2DLayered' in found_struct}} maxSurface2DLayered : List[int] Maximum 2D layered surface dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurfaceCubemap' in found_struct}} maxSurfaceCubemap : int Maximum Cubemap surface dimensions + {{endif}} + {{if 'cudaDeviceProp.maxSurfaceCubemapLayered' in found_struct}} maxSurfaceCubemapLayered : List[int] Maximum Cubemap layered surface dimensions + {{endif}} + {{if 'cudaDeviceProp.surfaceAlignment' in found_struct}} surfaceAlignment : size_t Alignment requirements for surfaces + {{endif}} + {{if 'cudaDeviceProp.concurrentKernels' in found_struct}} concurrentKernels : int Device can possibly execute multiple kernels concurrently + {{endif}} + {{if 'cudaDeviceProp.ECCEnabled' in found_struct}} ECCEnabled : int Device has ECC support enabled + {{endif}} + {{if 'cudaDeviceProp.pciBusID' in found_struct}} pciBusID : int PCI bus ID of the device + {{endif}} + {{if 'cudaDeviceProp.pciDeviceID' in found_struct}} pciDeviceID : int PCI device ID of the device + {{endif}} + {{if 'cudaDeviceProp.pciDomainID' in found_struct}} pciDomainID : int PCI domain ID of the device + {{endif}} + {{if 'cudaDeviceProp.tccDriver' in found_struct}} tccDriver : int 1 if device is a Tesla device using TCC driver, 0 otherwise + {{endif}} + {{if 'cudaDeviceProp.asyncEngineCount' in found_struct}} asyncEngineCount : int Number of asynchronous engines + {{endif}} + {{if 'cudaDeviceProp.unifiedAddressing' in found_struct}} unifiedAddressing : int Device shares a unified address space with the host + {{endif}} + {{if 'cudaDeviceProp.memoryClockRate' in found_struct}} memoryClockRate : int Deprecated, Peak memory clock frequency in kilohertz + {{endif}} + {{if 'cudaDeviceProp.memoryBusWidth' in found_struct}} memoryBusWidth : int Global memory bus width in bits + {{endif}} + {{if 'cudaDeviceProp.l2CacheSize' in found_struct}} l2CacheSize : int Size of L2 cache in bytes + {{endif}} + {{if 'cudaDeviceProp.persistingL2CacheMaxSize' in found_struct}} persistingL2CacheMaxSize : int Device's maximum l2 persisting lines capacity setting in bytes + {{endif}} + {{if 'cudaDeviceProp.maxThreadsPerMultiProcessor' in found_struct}} maxThreadsPerMultiProcessor : int Maximum resident threads per multiprocessor + {{endif}} + {{if 'cudaDeviceProp.streamPrioritiesSupported' in found_struct}} streamPrioritiesSupported : int Device supports stream priorities + {{endif}} + {{if 'cudaDeviceProp.globalL1CacheSupported' in found_struct}} globalL1CacheSupported : int Device supports caching globals in L1 + {{endif}} + {{if 'cudaDeviceProp.localL1CacheSupported' in found_struct}} localL1CacheSupported : int Device supports caching locals in L1 + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerMultiprocessor' in found_struct}} sharedMemPerMultiprocessor : size_t Shared memory available per multiprocessor in bytes + {{endif}} + {{if 'cudaDeviceProp.regsPerMultiprocessor' in found_struct}} regsPerMultiprocessor : int 32-bit registers available per multiprocessor + {{endif}} + {{if 'cudaDeviceProp.managedMemory' in found_struct}} managedMemory : int Device supports allocating managed memory on this system + {{endif}} + {{if 'cudaDeviceProp.isMultiGpuBoard' in found_struct}} isMultiGpuBoard : int Device is on a multi-GPU board + {{endif}} + {{if 'cudaDeviceProp.multiGpuBoardGroupID' in found_struct}} multiGpuBoardGroupID : int Unique identifier for a group of devices on the same multi-GPU board + {{endif}} + {{if 'cudaDeviceProp.hostNativeAtomicSupported' in found_struct}} hostNativeAtomicSupported : int Link between the device and the host supports native atomic operations + {{endif}} + {{if 'cudaDeviceProp.singleToDoublePrecisionPerfRatio' in found_struct}} singleToDoublePrecisionPerfRatio : int Deprecated, Ratio of single precision performance (in floating- point operations per second) to double precision performance + {{endif}} + {{if 'cudaDeviceProp.pageableMemoryAccess' in found_struct}} pageableMemoryAccess : int Device supports coherently accessing pageable memory without calling cudaHostRegister on it + {{endif}} + {{if 'cudaDeviceProp.concurrentManagedAccess' in found_struct}} concurrentManagedAccess : int Device can coherently access managed memory concurrently with the CPU + {{endif}} + {{if 'cudaDeviceProp.computePreemptionSupported' in found_struct}} computePreemptionSupported : int Device supports Compute Preemption + {{endif}} + {{if 'cudaDeviceProp.canUseHostPointerForRegisteredMem' in found_struct}} canUseHostPointerForRegisteredMem : int Device can access host registered memory at the same virtual address as the CPU + {{endif}} + {{if 'cudaDeviceProp.cooperativeLaunch' in found_struct}} cooperativeLaunch : int Device supports launching cooperative kernels via cudaLaunchCooperativeKernel + {{endif}} + {{if 'cudaDeviceProp.cooperativeMultiDeviceLaunch' in found_struct}} cooperativeMultiDeviceLaunch : int Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated. + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerBlockOptin' in found_struct}} sharedMemPerBlockOptin : size_t Per device maximum shared memory per block usable by special opt in + {{endif}} + {{if 'cudaDeviceProp.pageableMemoryAccessUsesHostPageTables' in found_struct}} pageableMemoryAccessUsesHostPageTables : int Device accesses pageable memory via the host's page tables + {{endif}} + {{if 'cudaDeviceProp.directManagedMemAccessFromHost' in found_struct}} directManagedMemAccessFromHost : int Host can directly access managed memory on the device without migration. + {{endif}} + {{if 'cudaDeviceProp.maxBlocksPerMultiProcessor' in found_struct}} maxBlocksPerMultiProcessor : int Maximum number of resident blocks per multiprocessor + {{endif}} + {{if 'cudaDeviceProp.accessPolicyMaxWindowSize' in found_struct}} accessPolicyMaxWindowSize : int The maximum value of cudaAccessPolicyWindow::num_bytes. + {{endif}} + {{if 'cudaDeviceProp.reservedSharedMemPerBlock' in found_struct}} reservedSharedMemPerBlock : size_t Shared memory reserved by CUDA driver per block in bytes + {{endif}} + {{if 'cudaDeviceProp.hostRegisterSupported' in found_struct}} hostRegisterSupported : int Device supports host memory registration via cudaHostRegister. + {{endif}} + {{if 'cudaDeviceProp.sparseCudaArraySupported' in found_struct}} sparseCudaArraySupported : int 1 if the device supports sparse CUDA arrays and sparse CUDA mipmapped arrays, 0 otherwise + {{endif}} + {{if 'cudaDeviceProp.hostRegisterReadOnlySupported' in found_struct}} hostRegisterReadOnlySupported : int Device supports using the cudaHostRegister flag cudaHostRegisterReadOnly to register memory that must be mapped as read-only to the GPU + {{endif}} + {{if 'cudaDeviceProp.timelineSemaphoreInteropSupported' in found_struct}} timelineSemaphoreInteropSupported : int External timeline semaphore interop is supported on the device + {{endif}} + {{if 'cudaDeviceProp.memoryPoolsSupported' in found_struct}} memoryPoolsSupported : int 1 if the device supports using the cudaMallocAsync and cudaMemPool family of APIs, 0 otherwise + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMASupported' in found_struct}} gpuDirectRDMASupported : int 1 if the device supports GPUDirect RDMA APIs, 0 otherwise + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMAFlushWritesOptions' in found_struct}} gpuDirectRDMAFlushWritesOptions : unsigned int Bitmask to be interpreted according to the cudaFlushGPUDirectRDMAWritesOptions enum + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMAWritesOrdering' in found_struct}} gpuDirectRDMAWritesOrdering : int See the cudaGPUDirectRDMAWritesOrdering enum for numerical values + {{endif}} + {{if 'cudaDeviceProp.memoryPoolSupportedHandleTypes' in found_struct}} memoryPoolSupportedHandleTypes : unsigned int Bitmask of handle types supported with mempool-based IPC + {{endif}} + {{if 'cudaDeviceProp.deferredMappingCudaArraySupported' in found_struct}} deferredMappingCudaArraySupported : int 1 if the device supports deferred mapping CUDA arrays and CUDA mipmapped arrays + {{endif}} + {{if 'cudaDeviceProp.ipcEventSupported' in found_struct}} ipcEventSupported : int Device supports IPC Events. + {{endif}} + {{if 'cudaDeviceProp.clusterLaunch' in found_struct}} clusterLaunch : int Indicates device supports cluster launch + {{endif}} + {{if 'cudaDeviceProp.unifiedFunctionPointers' in found_struct}} unifiedFunctionPointers : int Indicates device supports unified pointers - reserved2 : List[int] - - reserved1 : List[int] - Reserved for future use + {{endif}} + {{if 'cudaDeviceProp.reserved' in found_struct}} reserved : List[int] Reserved for future use + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._uuid = cudaUUID_t(_ptr=&self._ptr[0].uuid) + pass + {{if 'cudaDeviceProp.uuid' in found_struct}} + self._uuid = cudaUUID_t(_ptr=&self._pvt_ptr[0].uuid) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaDeviceProp.name' in found_struct}} try: str_list += ['name : ' + self.name.decode('utf-8')] except ValueError: str_list += ['name : '] + {{endif}} + {{if 'cudaDeviceProp.uuid' in found_struct}} try: str_list += ['uuid :\n' + '\n'.join([' ' + line for line in str(self.uuid).splitlines()])] except ValueError: str_list += ['uuid : '] + {{endif}} + {{if 'cudaDeviceProp.luid' in found_struct}} try: str_list += ['luid : ' + self.luid.hex()] except ValueError: str_list += ['luid : '] + {{endif}} + {{if 'cudaDeviceProp.luidDeviceNodeMask' in found_struct}} try: str_list += ['luidDeviceNodeMask : ' + str(self.luidDeviceNodeMask)] except ValueError: str_list += ['luidDeviceNodeMask : '] + {{endif}} + {{if 'cudaDeviceProp.totalGlobalMem' in found_struct}} try: str_list += ['totalGlobalMem : ' + str(self.totalGlobalMem)] except ValueError: str_list += ['totalGlobalMem : '] + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerBlock' in found_struct}} try: str_list += ['sharedMemPerBlock : ' + str(self.sharedMemPerBlock)] except ValueError: str_list += ['sharedMemPerBlock : '] + {{endif}} + {{if 'cudaDeviceProp.regsPerBlock' in found_struct}} try: str_list += ['regsPerBlock : ' + str(self.regsPerBlock)] except ValueError: str_list += ['regsPerBlock : '] + {{endif}} + {{if 'cudaDeviceProp.warpSize' in found_struct}} try: str_list += ['warpSize : ' + str(self.warpSize)] except ValueError: str_list += ['warpSize : '] + {{endif}} + {{if 'cudaDeviceProp.memPitch' in found_struct}} try: str_list += ['memPitch : ' + str(self.memPitch)] except ValueError: str_list += ['memPitch : '] + {{endif}} + {{if 'cudaDeviceProp.maxThreadsPerBlock' in found_struct}} try: str_list += ['maxThreadsPerBlock : ' + str(self.maxThreadsPerBlock)] except ValueError: str_list += ['maxThreadsPerBlock : '] + {{endif}} + {{if 'cudaDeviceProp.maxThreadsDim' in found_struct}} try: str_list += ['maxThreadsDim : ' + str(self.maxThreadsDim)] except ValueError: str_list += ['maxThreadsDim : '] + {{endif}} + {{if 'cudaDeviceProp.maxGridSize' in found_struct}} try: str_list += ['maxGridSize : ' + str(self.maxGridSize)] except ValueError: str_list += ['maxGridSize : '] + {{endif}} + {{if 'cudaDeviceProp.clockRate' in found_struct}} try: str_list += ['clockRate : ' + str(self.clockRate)] except ValueError: str_list += ['clockRate : '] + {{endif}} + {{if 'cudaDeviceProp.totalConstMem' in found_struct}} try: str_list += ['totalConstMem : ' + str(self.totalConstMem)] except ValueError: str_list += ['totalConstMem : '] + {{endif}} + {{if 'cudaDeviceProp.major' in found_struct}} try: str_list += ['major : ' + str(self.major)] except ValueError: str_list += ['major : '] + {{endif}} + {{if 'cudaDeviceProp.minor' in found_struct}} try: str_list += ['minor : ' + str(self.minor)] except ValueError: str_list += ['minor : '] + {{endif}} + {{if 'cudaDeviceProp.textureAlignment' in found_struct}} try: str_list += ['textureAlignment : ' + str(self.textureAlignment)] except ValueError: str_list += ['textureAlignment : '] + {{endif}} + {{if 'cudaDeviceProp.texturePitchAlignment' in found_struct}} try: str_list += ['texturePitchAlignment : ' + str(self.texturePitchAlignment)] except ValueError: str_list += ['texturePitchAlignment : '] + {{endif}} + {{if 'cudaDeviceProp.deviceOverlap' in found_struct}} try: str_list += ['deviceOverlap : ' + str(self.deviceOverlap)] except ValueError: str_list += ['deviceOverlap : '] + {{endif}} + {{if 'cudaDeviceProp.multiProcessorCount' in found_struct}} try: str_list += ['multiProcessorCount : ' + str(self.multiProcessorCount)] except ValueError: str_list += ['multiProcessorCount : '] + {{endif}} + {{if 'cudaDeviceProp.kernelExecTimeoutEnabled' in found_struct}} try: str_list += ['kernelExecTimeoutEnabled : ' + str(self.kernelExecTimeoutEnabled)] except ValueError: str_list += ['kernelExecTimeoutEnabled : '] + {{endif}} + {{if 'cudaDeviceProp.integrated' in found_struct}} try: str_list += ['integrated : ' + str(self.integrated)] except ValueError: str_list += ['integrated : '] + {{endif}} + {{if 'cudaDeviceProp.canMapHostMemory' in found_struct}} try: str_list += ['canMapHostMemory : ' + str(self.canMapHostMemory)] except ValueError: str_list += ['canMapHostMemory : '] + {{endif}} + {{if 'cudaDeviceProp.computeMode' in found_struct}} try: str_list += ['computeMode : ' + str(self.computeMode)] except ValueError: str_list += ['computeMode : '] + {{endif}} + {{if 'cudaDeviceProp.maxTexture1D' in found_struct}} try: str_list += ['maxTexture1D : ' + str(self.maxTexture1D)] except ValueError: str_list += ['maxTexture1D : '] + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DMipmap' in found_struct}} try: str_list += ['maxTexture1DMipmap : ' + str(self.maxTexture1DMipmap)] except ValueError: str_list += ['maxTexture1DMipmap : '] + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DLinear' in found_struct}} try: str_list += ['maxTexture1DLinear : ' + str(self.maxTexture1DLinear)] except ValueError: str_list += ['maxTexture1DLinear : '] + {{endif}} + {{if 'cudaDeviceProp.maxTexture2D' in found_struct}} try: str_list += ['maxTexture2D : ' + str(self.maxTexture2D)] except ValueError: str_list += ['maxTexture2D : '] + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DMipmap' in found_struct}} try: str_list += ['maxTexture2DMipmap : ' + str(self.maxTexture2DMipmap)] except ValueError: str_list += ['maxTexture2DMipmap : '] + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DLinear' in found_struct}} try: str_list += ['maxTexture2DLinear : ' + str(self.maxTexture2DLinear)] except ValueError: str_list += ['maxTexture2DLinear : '] + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DGather' in found_struct}} try: str_list += ['maxTexture2DGather : ' + str(self.maxTexture2DGather)] except ValueError: str_list += ['maxTexture2DGather : '] + {{endif}} + {{if 'cudaDeviceProp.maxTexture3D' in found_struct}} try: str_list += ['maxTexture3D : ' + str(self.maxTexture3D)] except ValueError: str_list += ['maxTexture3D : '] + {{endif}} + {{if 'cudaDeviceProp.maxTexture3DAlt' in found_struct}} try: str_list += ['maxTexture3DAlt : ' + str(self.maxTexture3DAlt)] except ValueError: str_list += ['maxTexture3DAlt : '] + {{endif}} + {{if 'cudaDeviceProp.maxTextureCubemap' in found_struct}} try: str_list += ['maxTextureCubemap : ' + str(self.maxTextureCubemap)] except ValueError: str_list += ['maxTextureCubemap : '] + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DLayered' in found_struct}} try: str_list += ['maxTexture1DLayered : ' + str(self.maxTexture1DLayered)] except ValueError: str_list += ['maxTexture1DLayered : '] + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DLayered' in found_struct}} try: str_list += ['maxTexture2DLayered : ' + str(self.maxTexture2DLayered)] except ValueError: str_list += ['maxTexture2DLayered : '] + {{endif}} + {{if 'cudaDeviceProp.maxTextureCubemapLayered' in found_struct}} try: str_list += ['maxTextureCubemapLayered : ' + str(self.maxTextureCubemapLayered)] except ValueError: str_list += ['maxTextureCubemapLayered : '] + {{endif}} + {{if 'cudaDeviceProp.maxSurface1D' in found_struct}} try: str_list += ['maxSurface1D : ' + str(self.maxSurface1D)] except ValueError: str_list += ['maxSurface1D : '] + {{endif}} + {{if 'cudaDeviceProp.maxSurface2D' in found_struct}} try: str_list += ['maxSurface2D : ' + str(self.maxSurface2D)] except ValueError: str_list += ['maxSurface2D : '] + {{endif}} + {{if 'cudaDeviceProp.maxSurface3D' in found_struct}} try: str_list += ['maxSurface3D : ' + str(self.maxSurface3D)] except ValueError: str_list += ['maxSurface3D : '] + {{endif}} + {{if 'cudaDeviceProp.maxSurface1DLayered' in found_struct}} try: str_list += ['maxSurface1DLayered : ' + str(self.maxSurface1DLayered)] except ValueError: str_list += ['maxSurface1DLayered : '] + {{endif}} + {{if 'cudaDeviceProp.maxSurface2DLayered' in found_struct}} try: str_list += ['maxSurface2DLayered : ' + str(self.maxSurface2DLayered)] except ValueError: str_list += ['maxSurface2DLayered : '] + {{endif}} + {{if 'cudaDeviceProp.maxSurfaceCubemap' in found_struct}} try: str_list += ['maxSurfaceCubemap : ' + str(self.maxSurfaceCubemap)] except ValueError: str_list += ['maxSurfaceCubemap : '] + {{endif}} + {{if 'cudaDeviceProp.maxSurfaceCubemapLayered' in found_struct}} try: str_list += ['maxSurfaceCubemapLayered : ' + str(self.maxSurfaceCubemapLayered)] except ValueError: str_list += ['maxSurfaceCubemapLayered : '] + {{endif}} + {{if 'cudaDeviceProp.surfaceAlignment' in found_struct}} try: str_list += ['surfaceAlignment : ' + str(self.surfaceAlignment)] except ValueError: str_list += ['surfaceAlignment : '] + {{endif}} + {{if 'cudaDeviceProp.concurrentKernels' in found_struct}} try: str_list += ['concurrentKernels : ' + str(self.concurrentKernels)] except ValueError: str_list += ['concurrentKernels : '] + {{endif}} + {{if 'cudaDeviceProp.ECCEnabled' in found_struct}} try: str_list += ['ECCEnabled : ' + str(self.ECCEnabled)] except ValueError: str_list += ['ECCEnabled : '] + {{endif}} + {{if 'cudaDeviceProp.pciBusID' in found_struct}} try: str_list += ['pciBusID : ' + str(self.pciBusID)] except ValueError: str_list += ['pciBusID : '] + {{endif}} + {{if 'cudaDeviceProp.pciDeviceID' in found_struct}} try: str_list += ['pciDeviceID : ' + str(self.pciDeviceID)] except ValueError: str_list += ['pciDeviceID : '] + {{endif}} + {{if 'cudaDeviceProp.pciDomainID' in found_struct}} try: str_list += ['pciDomainID : ' + str(self.pciDomainID)] except ValueError: str_list += ['pciDomainID : '] + {{endif}} + {{if 'cudaDeviceProp.tccDriver' in found_struct}} try: str_list += ['tccDriver : ' + str(self.tccDriver)] except ValueError: str_list += ['tccDriver : '] + {{endif}} + {{if 'cudaDeviceProp.asyncEngineCount' in found_struct}} try: str_list += ['asyncEngineCount : ' + str(self.asyncEngineCount)] except ValueError: str_list += ['asyncEngineCount : '] + {{endif}} + {{if 'cudaDeviceProp.unifiedAddressing' in found_struct}} try: str_list += ['unifiedAddressing : ' + str(self.unifiedAddressing)] except ValueError: str_list += ['unifiedAddressing : '] + {{endif}} + {{if 'cudaDeviceProp.memoryClockRate' in found_struct}} try: str_list += ['memoryClockRate : ' + str(self.memoryClockRate)] except ValueError: str_list += ['memoryClockRate : '] + {{endif}} + {{if 'cudaDeviceProp.memoryBusWidth' in found_struct}} try: str_list += ['memoryBusWidth : ' + str(self.memoryBusWidth)] except ValueError: str_list += ['memoryBusWidth : '] + {{endif}} + {{if 'cudaDeviceProp.l2CacheSize' in found_struct}} try: str_list += ['l2CacheSize : ' + str(self.l2CacheSize)] except ValueError: str_list += ['l2CacheSize : '] + {{endif}} + {{if 'cudaDeviceProp.persistingL2CacheMaxSize' in found_struct}} try: str_list += ['persistingL2CacheMaxSize : ' + str(self.persistingL2CacheMaxSize)] except ValueError: str_list += ['persistingL2CacheMaxSize : '] + {{endif}} + {{if 'cudaDeviceProp.maxThreadsPerMultiProcessor' in found_struct}} try: str_list += ['maxThreadsPerMultiProcessor : ' + str(self.maxThreadsPerMultiProcessor)] except ValueError: str_list += ['maxThreadsPerMultiProcessor : '] + {{endif}} + {{if 'cudaDeviceProp.streamPrioritiesSupported' in found_struct}} try: str_list += ['streamPrioritiesSupported : ' + str(self.streamPrioritiesSupported)] except ValueError: str_list += ['streamPrioritiesSupported : '] + {{endif}} + {{if 'cudaDeviceProp.globalL1CacheSupported' in found_struct}} try: str_list += ['globalL1CacheSupported : ' + str(self.globalL1CacheSupported)] except ValueError: str_list += ['globalL1CacheSupported : '] + {{endif}} + {{if 'cudaDeviceProp.localL1CacheSupported' in found_struct}} try: str_list += ['localL1CacheSupported : ' + str(self.localL1CacheSupported)] except ValueError: str_list += ['localL1CacheSupported : '] + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerMultiprocessor' in found_struct}} try: str_list += ['sharedMemPerMultiprocessor : ' + str(self.sharedMemPerMultiprocessor)] except ValueError: str_list += ['sharedMemPerMultiprocessor : '] + {{endif}} + {{if 'cudaDeviceProp.regsPerMultiprocessor' in found_struct}} try: str_list += ['regsPerMultiprocessor : ' + str(self.regsPerMultiprocessor)] except ValueError: str_list += ['regsPerMultiprocessor : '] + {{endif}} + {{if 'cudaDeviceProp.managedMemory' in found_struct}} try: str_list += ['managedMemory : ' + str(self.managedMemory)] except ValueError: str_list += ['managedMemory : '] + {{endif}} + {{if 'cudaDeviceProp.isMultiGpuBoard' in found_struct}} try: str_list += ['isMultiGpuBoard : ' + str(self.isMultiGpuBoard)] except ValueError: str_list += ['isMultiGpuBoard : '] + {{endif}} + {{if 'cudaDeviceProp.multiGpuBoardGroupID' in found_struct}} try: str_list += ['multiGpuBoardGroupID : ' + str(self.multiGpuBoardGroupID)] except ValueError: str_list += ['multiGpuBoardGroupID : '] + {{endif}} + {{if 'cudaDeviceProp.hostNativeAtomicSupported' in found_struct}} try: str_list += ['hostNativeAtomicSupported : ' + str(self.hostNativeAtomicSupported)] except ValueError: str_list += ['hostNativeAtomicSupported : '] + {{endif}} + {{if 'cudaDeviceProp.singleToDoublePrecisionPerfRatio' in found_struct}} try: str_list += ['singleToDoublePrecisionPerfRatio : ' + str(self.singleToDoublePrecisionPerfRatio)] except ValueError: str_list += ['singleToDoublePrecisionPerfRatio : '] + {{endif}} + {{if 'cudaDeviceProp.pageableMemoryAccess' in found_struct}} try: str_list += ['pageableMemoryAccess : ' + str(self.pageableMemoryAccess)] except ValueError: str_list += ['pageableMemoryAccess : '] + {{endif}} + {{if 'cudaDeviceProp.concurrentManagedAccess' in found_struct}} try: str_list += ['concurrentManagedAccess : ' + str(self.concurrentManagedAccess)] except ValueError: str_list += ['concurrentManagedAccess : '] + {{endif}} + {{if 'cudaDeviceProp.computePreemptionSupported' in found_struct}} try: str_list += ['computePreemptionSupported : ' + str(self.computePreemptionSupported)] except ValueError: str_list += ['computePreemptionSupported : '] + {{endif}} + {{if 'cudaDeviceProp.canUseHostPointerForRegisteredMem' in found_struct}} try: str_list += ['canUseHostPointerForRegisteredMem : ' + str(self.canUseHostPointerForRegisteredMem)] except ValueError: str_list += ['canUseHostPointerForRegisteredMem : '] + {{endif}} + {{if 'cudaDeviceProp.cooperativeLaunch' in found_struct}} try: str_list += ['cooperativeLaunch : ' + str(self.cooperativeLaunch)] except ValueError: str_list += ['cooperativeLaunch : '] + {{endif}} + {{if 'cudaDeviceProp.cooperativeMultiDeviceLaunch' in found_struct}} try: str_list += ['cooperativeMultiDeviceLaunch : ' + str(self.cooperativeMultiDeviceLaunch)] except ValueError: str_list += ['cooperativeMultiDeviceLaunch : '] + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerBlockOptin' in found_struct}} try: str_list += ['sharedMemPerBlockOptin : ' + str(self.sharedMemPerBlockOptin)] except ValueError: str_list += ['sharedMemPerBlockOptin : '] + {{endif}} + {{if 'cudaDeviceProp.pageableMemoryAccessUsesHostPageTables' in found_struct}} try: str_list += ['pageableMemoryAccessUsesHostPageTables : ' + str(self.pageableMemoryAccessUsesHostPageTables)] except ValueError: str_list += ['pageableMemoryAccessUsesHostPageTables : '] + {{endif}} + {{if 'cudaDeviceProp.directManagedMemAccessFromHost' in found_struct}} try: str_list += ['directManagedMemAccessFromHost : ' + str(self.directManagedMemAccessFromHost)] except ValueError: str_list += ['directManagedMemAccessFromHost : '] + {{endif}} + {{if 'cudaDeviceProp.maxBlocksPerMultiProcessor' in found_struct}} try: str_list += ['maxBlocksPerMultiProcessor : ' + str(self.maxBlocksPerMultiProcessor)] except ValueError: str_list += ['maxBlocksPerMultiProcessor : '] + {{endif}} + {{if 'cudaDeviceProp.accessPolicyMaxWindowSize' in found_struct}} try: str_list += ['accessPolicyMaxWindowSize : ' + str(self.accessPolicyMaxWindowSize)] except ValueError: str_list += ['accessPolicyMaxWindowSize : '] + {{endif}} + {{if 'cudaDeviceProp.reservedSharedMemPerBlock' in found_struct}} try: str_list += ['reservedSharedMemPerBlock : ' + str(self.reservedSharedMemPerBlock)] except ValueError: str_list += ['reservedSharedMemPerBlock : '] + {{endif}} + {{if 'cudaDeviceProp.hostRegisterSupported' in found_struct}} try: str_list += ['hostRegisterSupported : ' + str(self.hostRegisterSupported)] except ValueError: str_list += ['hostRegisterSupported : '] + {{endif}} + {{if 'cudaDeviceProp.sparseCudaArraySupported' in found_struct}} try: str_list += ['sparseCudaArraySupported : ' + str(self.sparseCudaArraySupported)] except ValueError: str_list += ['sparseCudaArraySupported : '] + {{endif}} + {{if 'cudaDeviceProp.hostRegisterReadOnlySupported' in found_struct}} try: str_list += ['hostRegisterReadOnlySupported : ' + str(self.hostRegisterReadOnlySupported)] except ValueError: str_list += ['hostRegisterReadOnlySupported : '] + {{endif}} + {{if 'cudaDeviceProp.timelineSemaphoreInteropSupported' in found_struct}} try: str_list += ['timelineSemaphoreInteropSupported : ' + str(self.timelineSemaphoreInteropSupported)] except ValueError: str_list += ['timelineSemaphoreInteropSupported : '] + {{endif}} + {{if 'cudaDeviceProp.memoryPoolsSupported' in found_struct}} try: str_list += ['memoryPoolsSupported : ' + str(self.memoryPoolsSupported)] except ValueError: str_list += ['memoryPoolsSupported : '] + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMASupported' in found_struct}} try: str_list += ['gpuDirectRDMASupported : ' + str(self.gpuDirectRDMASupported)] except ValueError: str_list += ['gpuDirectRDMASupported : '] + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMAFlushWritesOptions' in found_struct}} try: str_list += ['gpuDirectRDMAFlushWritesOptions : ' + str(self.gpuDirectRDMAFlushWritesOptions)] except ValueError: str_list += ['gpuDirectRDMAFlushWritesOptions : '] + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMAWritesOrdering' in found_struct}} try: str_list += ['gpuDirectRDMAWritesOrdering : ' + str(self.gpuDirectRDMAWritesOrdering)] except ValueError: str_list += ['gpuDirectRDMAWritesOrdering : '] + {{endif}} + {{if 'cudaDeviceProp.memoryPoolSupportedHandleTypes' in found_struct}} try: str_list += ['memoryPoolSupportedHandleTypes : ' + str(self.memoryPoolSupportedHandleTypes)] except ValueError: str_list += ['memoryPoolSupportedHandleTypes : '] + {{endif}} + {{if 'cudaDeviceProp.deferredMappingCudaArraySupported' in found_struct}} try: str_list += ['deferredMappingCudaArraySupported : ' + str(self.deferredMappingCudaArraySupported)] except ValueError: str_list += ['deferredMappingCudaArraySupported : '] + {{endif}} + {{if 'cudaDeviceProp.ipcEventSupported' in found_struct}} try: str_list += ['ipcEventSupported : ' + str(self.ipcEventSupported)] except ValueError: str_list += ['ipcEventSupported : '] + {{endif}} + {{if 'cudaDeviceProp.clusterLaunch' in found_struct}} try: str_list += ['clusterLaunch : ' + str(self.clusterLaunch)] except ValueError: str_list += ['clusterLaunch : '] + {{endif}} + {{if 'cudaDeviceProp.unifiedFunctionPointers' in found_struct}} try: str_list += ['unifiedFunctionPointers : ' + str(self.unifiedFunctionPointers)] except ValueError: str_list += ['unifiedFunctionPointers : '] - try: - str_list += ['reserved2 : ' + str(self.reserved2)] - except ValueError: - str_list += ['reserved2 : '] - try: - str_list += ['reserved1 : ' + str(self.reserved1)] - except ValueError: - str_list += ['reserved1 : '] + {{endif}} + {{if 'cudaDeviceProp.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaDeviceProp.name' in found_struct}} @property def name(self): - return self._ptr[0].name + return self._pvt_ptr[0].name @name.setter def name(self, name): pass - self._ptr[0].name = name + self._pvt_ptr[0].name = name + {{endif}} + {{if 'cudaDeviceProp.uuid' in found_struct}} @property def uuid(self): return self._uuid @uuid.setter def uuid(self, uuid not None : cudaUUID_t): - string.memcpy(&self._ptr[0].uuid, uuid.getPtr(), sizeof(self._ptr[0].uuid)) + string.memcpy(&self._pvt_ptr[0].uuid, uuid.getPtr(), sizeof(self._pvt_ptr[0].uuid)) + {{endif}} + {{if 'cudaDeviceProp.luid' in found_struct}} @property def luid(self): - return PyBytes_FromStringAndSize(self._ptr[0].luid, 8) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].luid, 8) @luid.setter def luid(self, luid): if len(luid) != 8: @@ -8610,572 +11011,743 @@ cdef class cudaDeviceProp: for i, b in enumerate(luid): if b < 0 and b > -129: b = b + 256 - self._ptr[0].luid[i] = b + self._pvt_ptr[0].luid[i] = b else: for i, b in enumerate(luid): if b > 127 and b < 256: b = b - 256 - self._ptr[0].luid[i] = b + self._pvt_ptr[0].luid[i] = b + {{endif}} + {{if 'cudaDeviceProp.luidDeviceNodeMask' in found_struct}} @property def luidDeviceNodeMask(self): - return self._ptr[0].luidDeviceNodeMask + return self._pvt_ptr[0].luidDeviceNodeMask @luidDeviceNodeMask.setter def luidDeviceNodeMask(self, unsigned int luidDeviceNodeMask): - self._ptr[0].luidDeviceNodeMask = luidDeviceNodeMask + self._pvt_ptr[0].luidDeviceNodeMask = luidDeviceNodeMask + {{endif}} + {{if 'cudaDeviceProp.totalGlobalMem' in found_struct}} @property def totalGlobalMem(self): - return self._ptr[0].totalGlobalMem + return self._pvt_ptr[0].totalGlobalMem @totalGlobalMem.setter def totalGlobalMem(self, size_t totalGlobalMem): - self._ptr[0].totalGlobalMem = totalGlobalMem + self._pvt_ptr[0].totalGlobalMem = totalGlobalMem + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerBlock' in found_struct}} @property def sharedMemPerBlock(self): - return self._ptr[0].sharedMemPerBlock + return self._pvt_ptr[0].sharedMemPerBlock @sharedMemPerBlock.setter def sharedMemPerBlock(self, size_t sharedMemPerBlock): - self._ptr[0].sharedMemPerBlock = sharedMemPerBlock + self._pvt_ptr[0].sharedMemPerBlock = sharedMemPerBlock + {{endif}} + {{if 'cudaDeviceProp.regsPerBlock' in found_struct}} @property def regsPerBlock(self): - return self._ptr[0].regsPerBlock + return self._pvt_ptr[0].regsPerBlock @regsPerBlock.setter def regsPerBlock(self, int regsPerBlock): - self._ptr[0].regsPerBlock = regsPerBlock + self._pvt_ptr[0].regsPerBlock = regsPerBlock + {{endif}} + {{if 'cudaDeviceProp.warpSize' in found_struct}} @property def warpSize(self): - return self._ptr[0].warpSize + return self._pvt_ptr[0].warpSize @warpSize.setter def warpSize(self, int warpSize): - self._ptr[0].warpSize = warpSize + self._pvt_ptr[0].warpSize = warpSize + {{endif}} + {{if 'cudaDeviceProp.memPitch' in found_struct}} @property def memPitch(self): - return self._ptr[0].memPitch + return self._pvt_ptr[0].memPitch @memPitch.setter def memPitch(self, size_t memPitch): - self._ptr[0].memPitch = memPitch + self._pvt_ptr[0].memPitch = memPitch + {{endif}} + {{if 'cudaDeviceProp.maxThreadsPerBlock' in found_struct}} @property def maxThreadsPerBlock(self): - return self._ptr[0].maxThreadsPerBlock + return self._pvt_ptr[0].maxThreadsPerBlock @maxThreadsPerBlock.setter def maxThreadsPerBlock(self, int maxThreadsPerBlock): - self._ptr[0].maxThreadsPerBlock = maxThreadsPerBlock + self._pvt_ptr[0].maxThreadsPerBlock = maxThreadsPerBlock + {{endif}} + {{if 'cudaDeviceProp.maxThreadsDim' in found_struct}} @property def maxThreadsDim(self): - return self._ptr[0].maxThreadsDim + return self._pvt_ptr[0].maxThreadsDim @maxThreadsDim.setter def maxThreadsDim(self, maxThreadsDim): - self._ptr[0].maxThreadsDim = maxThreadsDim + self._pvt_ptr[0].maxThreadsDim = maxThreadsDim + {{endif}} + {{if 'cudaDeviceProp.maxGridSize' in found_struct}} @property def maxGridSize(self): - return self._ptr[0].maxGridSize + return self._pvt_ptr[0].maxGridSize @maxGridSize.setter def maxGridSize(self, maxGridSize): - self._ptr[0].maxGridSize = maxGridSize + self._pvt_ptr[0].maxGridSize = maxGridSize + {{endif}} + {{if 'cudaDeviceProp.clockRate' in found_struct}} @property def clockRate(self): - return self._ptr[0].clockRate + return self._pvt_ptr[0].clockRate @clockRate.setter def clockRate(self, int clockRate): - self._ptr[0].clockRate = clockRate + self._pvt_ptr[0].clockRate = clockRate + {{endif}} + {{if 'cudaDeviceProp.totalConstMem' in found_struct}} @property def totalConstMem(self): - return self._ptr[0].totalConstMem + return self._pvt_ptr[0].totalConstMem @totalConstMem.setter def totalConstMem(self, size_t totalConstMem): - self._ptr[0].totalConstMem = totalConstMem + self._pvt_ptr[0].totalConstMem = totalConstMem + {{endif}} + {{if 'cudaDeviceProp.major' in found_struct}} @property def major(self): - return self._ptr[0].major + return self._pvt_ptr[0].major @major.setter def major(self, int major): - self._ptr[0].major = major + self._pvt_ptr[0].major = major + {{endif}} + {{if 'cudaDeviceProp.minor' in found_struct}} @property def minor(self): - return self._ptr[0].minor + return self._pvt_ptr[0].minor @minor.setter def minor(self, int minor): - self._ptr[0].minor = minor + self._pvt_ptr[0].minor = minor + {{endif}} + {{if 'cudaDeviceProp.textureAlignment' in found_struct}} @property def textureAlignment(self): - return self._ptr[0].textureAlignment + return self._pvt_ptr[0].textureAlignment @textureAlignment.setter def textureAlignment(self, size_t textureAlignment): - self._ptr[0].textureAlignment = textureAlignment + self._pvt_ptr[0].textureAlignment = textureAlignment + {{endif}} + {{if 'cudaDeviceProp.texturePitchAlignment' in found_struct}} @property def texturePitchAlignment(self): - return self._ptr[0].texturePitchAlignment + return self._pvt_ptr[0].texturePitchAlignment @texturePitchAlignment.setter def texturePitchAlignment(self, size_t texturePitchAlignment): - self._ptr[0].texturePitchAlignment = texturePitchAlignment + self._pvt_ptr[0].texturePitchAlignment = texturePitchAlignment + {{endif}} + {{if 'cudaDeviceProp.deviceOverlap' in found_struct}} @property def deviceOverlap(self): - return self._ptr[0].deviceOverlap + return self._pvt_ptr[0].deviceOverlap @deviceOverlap.setter def deviceOverlap(self, int deviceOverlap): - self._ptr[0].deviceOverlap = deviceOverlap + self._pvt_ptr[0].deviceOverlap = deviceOverlap + {{endif}} + {{if 'cudaDeviceProp.multiProcessorCount' in found_struct}} @property def multiProcessorCount(self): - return self._ptr[0].multiProcessorCount + return self._pvt_ptr[0].multiProcessorCount @multiProcessorCount.setter def multiProcessorCount(self, int multiProcessorCount): - self._ptr[0].multiProcessorCount = multiProcessorCount + self._pvt_ptr[0].multiProcessorCount = multiProcessorCount + {{endif}} + {{if 'cudaDeviceProp.kernelExecTimeoutEnabled' in found_struct}} @property def kernelExecTimeoutEnabled(self): - return self._ptr[0].kernelExecTimeoutEnabled + return self._pvt_ptr[0].kernelExecTimeoutEnabled @kernelExecTimeoutEnabled.setter def kernelExecTimeoutEnabled(self, int kernelExecTimeoutEnabled): - self._ptr[0].kernelExecTimeoutEnabled = kernelExecTimeoutEnabled + self._pvt_ptr[0].kernelExecTimeoutEnabled = kernelExecTimeoutEnabled + {{endif}} + {{if 'cudaDeviceProp.integrated' in found_struct}} @property def integrated(self): - return self._ptr[0].integrated + return self._pvt_ptr[0].integrated @integrated.setter def integrated(self, int integrated): - self._ptr[0].integrated = integrated + self._pvt_ptr[0].integrated = integrated + {{endif}} + {{if 'cudaDeviceProp.canMapHostMemory' in found_struct}} @property def canMapHostMemory(self): - return self._ptr[0].canMapHostMemory + return self._pvt_ptr[0].canMapHostMemory @canMapHostMemory.setter def canMapHostMemory(self, int canMapHostMemory): - self._ptr[0].canMapHostMemory = canMapHostMemory + self._pvt_ptr[0].canMapHostMemory = canMapHostMemory + {{endif}} + {{if 'cudaDeviceProp.computeMode' in found_struct}} @property def computeMode(self): - return self._ptr[0].computeMode + return self._pvt_ptr[0].computeMode @computeMode.setter def computeMode(self, int computeMode): - self._ptr[0].computeMode = computeMode + self._pvt_ptr[0].computeMode = computeMode + {{endif}} + {{if 'cudaDeviceProp.maxTexture1D' in found_struct}} @property def maxTexture1D(self): - return self._ptr[0].maxTexture1D + return self._pvt_ptr[0].maxTexture1D @maxTexture1D.setter def maxTexture1D(self, int maxTexture1D): - self._ptr[0].maxTexture1D = maxTexture1D + self._pvt_ptr[0].maxTexture1D = maxTexture1D + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DMipmap' in found_struct}} @property def maxTexture1DMipmap(self): - return self._ptr[0].maxTexture1DMipmap + return self._pvt_ptr[0].maxTexture1DMipmap @maxTexture1DMipmap.setter def maxTexture1DMipmap(self, int maxTexture1DMipmap): - self._ptr[0].maxTexture1DMipmap = maxTexture1DMipmap + self._pvt_ptr[0].maxTexture1DMipmap = maxTexture1DMipmap + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DLinear' in found_struct}} @property def maxTexture1DLinear(self): - return self._ptr[0].maxTexture1DLinear + return self._pvt_ptr[0].maxTexture1DLinear @maxTexture1DLinear.setter def maxTexture1DLinear(self, int maxTexture1DLinear): - self._ptr[0].maxTexture1DLinear = maxTexture1DLinear + self._pvt_ptr[0].maxTexture1DLinear = maxTexture1DLinear + {{endif}} + {{if 'cudaDeviceProp.maxTexture2D' in found_struct}} @property def maxTexture2D(self): - return self._ptr[0].maxTexture2D + return self._pvt_ptr[0].maxTexture2D @maxTexture2D.setter def maxTexture2D(self, maxTexture2D): - self._ptr[0].maxTexture2D = maxTexture2D + self._pvt_ptr[0].maxTexture2D = maxTexture2D + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DMipmap' in found_struct}} @property def maxTexture2DMipmap(self): - return self._ptr[0].maxTexture2DMipmap + return self._pvt_ptr[0].maxTexture2DMipmap @maxTexture2DMipmap.setter def maxTexture2DMipmap(self, maxTexture2DMipmap): - self._ptr[0].maxTexture2DMipmap = maxTexture2DMipmap + self._pvt_ptr[0].maxTexture2DMipmap = maxTexture2DMipmap + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DLinear' in found_struct}} @property def maxTexture2DLinear(self): - return self._ptr[0].maxTexture2DLinear + return self._pvt_ptr[0].maxTexture2DLinear @maxTexture2DLinear.setter def maxTexture2DLinear(self, maxTexture2DLinear): - self._ptr[0].maxTexture2DLinear = maxTexture2DLinear + self._pvt_ptr[0].maxTexture2DLinear = maxTexture2DLinear + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DGather' in found_struct}} @property def maxTexture2DGather(self): - return self._ptr[0].maxTexture2DGather + return self._pvt_ptr[0].maxTexture2DGather @maxTexture2DGather.setter def maxTexture2DGather(self, maxTexture2DGather): - self._ptr[0].maxTexture2DGather = maxTexture2DGather + self._pvt_ptr[0].maxTexture2DGather = maxTexture2DGather + {{endif}} + {{if 'cudaDeviceProp.maxTexture3D' in found_struct}} @property def maxTexture3D(self): - return self._ptr[0].maxTexture3D + return self._pvt_ptr[0].maxTexture3D @maxTexture3D.setter def maxTexture3D(self, maxTexture3D): - self._ptr[0].maxTexture3D = maxTexture3D + self._pvt_ptr[0].maxTexture3D = maxTexture3D + {{endif}} + {{if 'cudaDeviceProp.maxTexture3DAlt' in found_struct}} @property def maxTexture3DAlt(self): - return self._ptr[0].maxTexture3DAlt + return self._pvt_ptr[0].maxTexture3DAlt @maxTexture3DAlt.setter def maxTexture3DAlt(self, maxTexture3DAlt): - self._ptr[0].maxTexture3DAlt = maxTexture3DAlt + self._pvt_ptr[0].maxTexture3DAlt = maxTexture3DAlt + {{endif}} + {{if 'cudaDeviceProp.maxTextureCubemap' in found_struct}} @property def maxTextureCubemap(self): - return self._ptr[0].maxTextureCubemap + return self._pvt_ptr[0].maxTextureCubemap @maxTextureCubemap.setter def maxTextureCubemap(self, int maxTextureCubemap): - self._ptr[0].maxTextureCubemap = maxTextureCubemap + self._pvt_ptr[0].maxTextureCubemap = maxTextureCubemap + {{endif}} + {{if 'cudaDeviceProp.maxTexture1DLayered' in found_struct}} @property def maxTexture1DLayered(self): - return self._ptr[0].maxTexture1DLayered + return self._pvt_ptr[0].maxTexture1DLayered @maxTexture1DLayered.setter def maxTexture1DLayered(self, maxTexture1DLayered): - self._ptr[0].maxTexture1DLayered = maxTexture1DLayered + self._pvt_ptr[0].maxTexture1DLayered = maxTexture1DLayered + {{endif}} + {{if 'cudaDeviceProp.maxTexture2DLayered' in found_struct}} @property def maxTexture2DLayered(self): - return self._ptr[0].maxTexture2DLayered + return self._pvt_ptr[0].maxTexture2DLayered @maxTexture2DLayered.setter def maxTexture2DLayered(self, maxTexture2DLayered): - self._ptr[0].maxTexture2DLayered = maxTexture2DLayered + self._pvt_ptr[0].maxTexture2DLayered = maxTexture2DLayered + {{endif}} + {{if 'cudaDeviceProp.maxTextureCubemapLayered' in found_struct}} @property def maxTextureCubemapLayered(self): - return self._ptr[0].maxTextureCubemapLayered + return self._pvt_ptr[0].maxTextureCubemapLayered @maxTextureCubemapLayered.setter def maxTextureCubemapLayered(self, maxTextureCubemapLayered): - self._ptr[0].maxTextureCubemapLayered = maxTextureCubemapLayered + self._pvt_ptr[0].maxTextureCubemapLayered = maxTextureCubemapLayered + {{endif}} + {{if 'cudaDeviceProp.maxSurface1D' in found_struct}} @property def maxSurface1D(self): - return self._ptr[0].maxSurface1D + return self._pvt_ptr[0].maxSurface1D @maxSurface1D.setter def maxSurface1D(self, int maxSurface1D): - self._ptr[0].maxSurface1D = maxSurface1D + self._pvt_ptr[0].maxSurface1D = maxSurface1D + {{endif}} + {{if 'cudaDeviceProp.maxSurface2D' in found_struct}} @property def maxSurface2D(self): - return self._ptr[0].maxSurface2D + return self._pvt_ptr[0].maxSurface2D @maxSurface2D.setter def maxSurface2D(self, maxSurface2D): - self._ptr[0].maxSurface2D = maxSurface2D + self._pvt_ptr[0].maxSurface2D = maxSurface2D + {{endif}} + {{if 'cudaDeviceProp.maxSurface3D' in found_struct}} @property def maxSurface3D(self): - return self._ptr[0].maxSurface3D + return self._pvt_ptr[0].maxSurface3D @maxSurface3D.setter def maxSurface3D(self, maxSurface3D): - self._ptr[0].maxSurface3D = maxSurface3D + self._pvt_ptr[0].maxSurface3D = maxSurface3D + {{endif}} + {{if 'cudaDeviceProp.maxSurface1DLayered' in found_struct}} @property def maxSurface1DLayered(self): - return self._ptr[0].maxSurface1DLayered + return self._pvt_ptr[0].maxSurface1DLayered @maxSurface1DLayered.setter def maxSurface1DLayered(self, maxSurface1DLayered): - self._ptr[0].maxSurface1DLayered = maxSurface1DLayered + self._pvt_ptr[0].maxSurface1DLayered = maxSurface1DLayered + {{endif}} + {{if 'cudaDeviceProp.maxSurface2DLayered' in found_struct}} @property def maxSurface2DLayered(self): - return self._ptr[0].maxSurface2DLayered + return self._pvt_ptr[0].maxSurface2DLayered @maxSurface2DLayered.setter def maxSurface2DLayered(self, maxSurface2DLayered): - self._ptr[0].maxSurface2DLayered = maxSurface2DLayered + self._pvt_ptr[0].maxSurface2DLayered = maxSurface2DLayered + {{endif}} + {{if 'cudaDeviceProp.maxSurfaceCubemap' in found_struct}} @property def maxSurfaceCubemap(self): - return self._ptr[0].maxSurfaceCubemap + return self._pvt_ptr[0].maxSurfaceCubemap @maxSurfaceCubemap.setter def maxSurfaceCubemap(self, int maxSurfaceCubemap): - self._ptr[0].maxSurfaceCubemap = maxSurfaceCubemap + self._pvt_ptr[0].maxSurfaceCubemap = maxSurfaceCubemap + {{endif}} + {{if 'cudaDeviceProp.maxSurfaceCubemapLayered' in found_struct}} @property def maxSurfaceCubemapLayered(self): - return self._ptr[0].maxSurfaceCubemapLayered + return self._pvt_ptr[0].maxSurfaceCubemapLayered @maxSurfaceCubemapLayered.setter def maxSurfaceCubemapLayered(self, maxSurfaceCubemapLayered): - self._ptr[0].maxSurfaceCubemapLayered = maxSurfaceCubemapLayered + self._pvt_ptr[0].maxSurfaceCubemapLayered = maxSurfaceCubemapLayered + {{endif}} + {{if 'cudaDeviceProp.surfaceAlignment' in found_struct}} @property def surfaceAlignment(self): - return self._ptr[0].surfaceAlignment + return self._pvt_ptr[0].surfaceAlignment @surfaceAlignment.setter def surfaceAlignment(self, size_t surfaceAlignment): - self._ptr[0].surfaceAlignment = surfaceAlignment + self._pvt_ptr[0].surfaceAlignment = surfaceAlignment + {{endif}} + {{if 'cudaDeviceProp.concurrentKernels' in found_struct}} @property def concurrentKernels(self): - return self._ptr[0].concurrentKernels + return self._pvt_ptr[0].concurrentKernels @concurrentKernels.setter def concurrentKernels(self, int concurrentKernels): - self._ptr[0].concurrentKernels = concurrentKernels + self._pvt_ptr[0].concurrentKernels = concurrentKernels + {{endif}} + {{if 'cudaDeviceProp.ECCEnabled' in found_struct}} @property def ECCEnabled(self): - return self._ptr[0].ECCEnabled + return self._pvt_ptr[0].ECCEnabled @ECCEnabled.setter def ECCEnabled(self, int ECCEnabled): - self._ptr[0].ECCEnabled = ECCEnabled + self._pvt_ptr[0].ECCEnabled = ECCEnabled + {{endif}} + {{if 'cudaDeviceProp.pciBusID' in found_struct}} @property def pciBusID(self): - return self._ptr[0].pciBusID + return self._pvt_ptr[0].pciBusID @pciBusID.setter def pciBusID(self, int pciBusID): - self._ptr[0].pciBusID = pciBusID + self._pvt_ptr[0].pciBusID = pciBusID + {{endif}} + {{if 'cudaDeviceProp.pciDeviceID' in found_struct}} @property def pciDeviceID(self): - return self._ptr[0].pciDeviceID + return self._pvt_ptr[0].pciDeviceID @pciDeviceID.setter def pciDeviceID(self, int pciDeviceID): - self._ptr[0].pciDeviceID = pciDeviceID + self._pvt_ptr[0].pciDeviceID = pciDeviceID + {{endif}} + {{if 'cudaDeviceProp.pciDomainID' in found_struct}} @property def pciDomainID(self): - return self._ptr[0].pciDomainID + return self._pvt_ptr[0].pciDomainID @pciDomainID.setter def pciDomainID(self, int pciDomainID): - self._ptr[0].pciDomainID = pciDomainID + self._pvt_ptr[0].pciDomainID = pciDomainID + {{endif}} + {{if 'cudaDeviceProp.tccDriver' in found_struct}} @property def tccDriver(self): - return self._ptr[0].tccDriver + return self._pvt_ptr[0].tccDriver @tccDriver.setter def tccDriver(self, int tccDriver): - self._ptr[0].tccDriver = tccDriver + self._pvt_ptr[0].tccDriver = tccDriver + {{endif}} + {{if 'cudaDeviceProp.asyncEngineCount' in found_struct}} @property def asyncEngineCount(self): - return self._ptr[0].asyncEngineCount + return self._pvt_ptr[0].asyncEngineCount @asyncEngineCount.setter def asyncEngineCount(self, int asyncEngineCount): - self._ptr[0].asyncEngineCount = asyncEngineCount + self._pvt_ptr[0].asyncEngineCount = asyncEngineCount + {{endif}} + {{if 'cudaDeviceProp.unifiedAddressing' in found_struct}} @property def unifiedAddressing(self): - return self._ptr[0].unifiedAddressing + return self._pvt_ptr[0].unifiedAddressing @unifiedAddressing.setter def unifiedAddressing(self, int unifiedAddressing): - self._ptr[0].unifiedAddressing = unifiedAddressing + self._pvt_ptr[0].unifiedAddressing = unifiedAddressing + {{endif}} + {{if 'cudaDeviceProp.memoryClockRate' in found_struct}} @property def memoryClockRate(self): - return self._ptr[0].memoryClockRate + return self._pvt_ptr[0].memoryClockRate @memoryClockRate.setter def memoryClockRate(self, int memoryClockRate): - self._ptr[0].memoryClockRate = memoryClockRate + self._pvt_ptr[0].memoryClockRate = memoryClockRate + {{endif}} + {{if 'cudaDeviceProp.memoryBusWidth' in found_struct}} @property def memoryBusWidth(self): - return self._ptr[0].memoryBusWidth + return self._pvt_ptr[0].memoryBusWidth @memoryBusWidth.setter def memoryBusWidth(self, int memoryBusWidth): - self._ptr[0].memoryBusWidth = memoryBusWidth + self._pvt_ptr[0].memoryBusWidth = memoryBusWidth + {{endif}} + {{if 'cudaDeviceProp.l2CacheSize' in found_struct}} @property def l2CacheSize(self): - return self._ptr[0].l2CacheSize + return self._pvt_ptr[0].l2CacheSize @l2CacheSize.setter def l2CacheSize(self, int l2CacheSize): - self._ptr[0].l2CacheSize = l2CacheSize + self._pvt_ptr[0].l2CacheSize = l2CacheSize + {{endif}} + {{if 'cudaDeviceProp.persistingL2CacheMaxSize' in found_struct}} @property def persistingL2CacheMaxSize(self): - return self._ptr[0].persistingL2CacheMaxSize + return self._pvt_ptr[0].persistingL2CacheMaxSize @persistingL2CacheMaxSize.setter def persistingL2CacheMaxSize(self, int persistingL2CacheMaxSize): - self._ptr[0].persistingL2CacheMaxSize = persistingL2CacheMaxSize + self._pvt_ptr[0].persistingL2CacheMaxSize = persistingL2CacheMaxSize + {{endif}} + {{if 'cudaDeviceProp.maxThreadsPerMultiProcessor' in found_struct}} @property def maxThreadsPerMultiProcessor(self): - return self._ptr[0].maxThreadsPerMultiProcessor + return self._pvt_ptr[0].maxThreadsPerMultiProcessor @maxThreadsPerMultiProcessor.setter def maxThreadsPerMultiProcessor(self, int maxThreadsPerMultiProcessor): - self._ptr[0].maxThreadsPerMultiProcessor = maxThreadsPerMultiProcessor + self._pvt_ptr[0].maxThreadsPerMultiProcessor = maxThreadsPerMultiProcessor + {{endif}} + {{if 'cudaDeviceProp.streamPrioritiesSupported' in found_struct}} @property def streamPrioritiesSupported(self): - return self._ptr[0].streamPrioritiesSupported + return self._pvt_ptr[0].streamPrioritiesSupported @streamPrioritiesSupported.setter def streamPrioritiesSupported(self, int streamPrioritiesSupported): - self._ptr[0].streamPrioritiesSupported = streamPrioritiesSupported + self._pvt_ptr[0].streamPrioritiesSupported = streamPrioritiesSupported + {{endif}} + {{if 'cudaDeviceProp.globalL1CacheSupported' in found_struct}} @property def globalL1CacheSupported(self): - return self._ptr[0].globalL1CacheSupported + return self._pvt_ptr[0].globalL1CacheSupported @globalL1CacheSupported.setter def globalL1CacheSupported(self, int globalL1CacheSupported): - self._ptr[0].globalL1CacheSupported = globalL1CacheSupported + self._pvt_ptr[0].globalL1CacheSupported = globalL1CacheSupported + {{endif}} + {{if 'cudaDeviceProp.localL1CacheSupported' in found_struct}} @property def localL1CacheSupported(self): - return self._ptr[0].localL1CacheSupported + return self._pvt_ptr[0].localL1CacheSupported @localL1CacheSupported.setter def localL1CacheSupported(self, int localL1CacheSupported): - self._ptr[0].localL1CacheSupported = localL1CacheSupported + self._pvt_ptr[0].localL1CacheSupported = localL1CacheSupported + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerMultiprocessor' in found_struct}} @property def sharedMemPerMultiprocessor(self): - return self._ptr[0].sharedMemPerMultiprocessor + return self._pvt_ptr[0].sharedMemPerMultiprocessor @sharedMemPerMultiprocessor.setter def sharedMemPerMultiprocessor(self, size_t sharedMemPerMultiprocessor): - self._ptr[0].sharedMemPerMultiprocessor = sharedMemPerMultiprocessor + self._pvt_ptr[0].sharedMemPerMultiprocessor = sharedMemPerMultiprocessor + {{endif}} + {{if 'cudaDeviceProp.regsPerMultiprocessor' in found_struct}} @property def regsPerMultiprocessor(self): - return self._ptr[0].regsPerMultiprocessor + return self._pvt_ptr[0].regsPerMultiprocessor @regsPerMultiprocessor.setter def regsPerMultiprocessor(self, int regsPerMultiprocessor): - self._ptr[0].regsPerMultiprocessor = regsPerMultiprocessor + self._pvt_ptr[0].regsPerMultiprocessor = regsPerMultiprocessor + {{endif}} + {{if 'cudaDeviceProp.managedMemory' in found_struct}} @property def managedMemory(self): - return self._ptr[0].managedMemory + return self._pvt_ptr[0].managedMemory @managedMemory.setter def managedMemory(self, int managedMemory): - self._ptr[0].managedMemory = managedMemory + self._pvt_ptr[0].managedMemory = managedMemory + {{endif}} + {{if 'cudaDeviceProp.isMultiGpuBoard' in found_struct}} @property def isMultiGpuBoard(self): - return self._ptr[0].isMultiGpuBoard + return self._pvt_ptr[0].isMultiGpuBoard @isMultiGpuBoard.setter def isMultiGpuBoard(self, int isMultiGpuBoard): - self._ptr[0].isMultiGpuBoard = isMultiGpuBoard + self._pvt_ptr[0].isMultiGpuBoard = isMultiGpuBoard + {{endif}} + {{if 'cudaDeviceProp.multiGpuBoardGroupID' in found_struct}} @property def multiGpuBoardGroupID(self): - return self._ptr[0].multiGpuBoardGroupID + return self._pvt_ptr[0].multiGpuBoardGroupID @multiGpuBoardGroupID.setter def multiGpuBoardGroupID(self, int multiGpuBoardGroupID): - self._ptr[0].multiGpuBoardGroupID = multiGpuBoardGroupID + self._pvt_ptr[0].multiGpuBoardGroupID = multiGpuBoardGroupID + {{endif}} + {{if 'cudaDeviceProp.hostNativeAtomicSupported' in found_struct}} @property def hostNativeAtomicSupported(self): - return self._ptr[0].hostNativeAtomicSupported + return self._pvt_ptr[0].hostNativeAtomicSupported @hostNativeAtomicSupported.setter def hostNativeAtomicSupported(self, int hostNativeAtomicSupported): - self._ptr[0].hostNativeAtomicSupported = hostNativeAtomicSupported + self._pvt_ptr[0].hostNativeAtomicSupported = hostNativeAtomicSupported + {{endif}} + {{if 'cudaDeviceProp.singleToDoublePrecisionPerfRatio' in found_struct}} @property def singleToDoublePrecisionPerfRatio(self): - return self._ptr[0].singleToDoublePrecisionPerfRatio + return self._pvt_ptr[0].singleToDoublePrecisionPerfRatio @singleToDoublePrecisionPerfRatio.setter def singleToDoublePrecisionPerfRatio(self, int singleToDoublePrecisionPerfRatio): - self._ptr[0].singleToDoublePrecisionPerfRatio = singleToDoublePrecisionPerfRatio + self._pvt_ptr[0].singleToDoublePrecisionPerfRatio = singleToDoublePrecisionPerfRatio + {{endif}} + {{if 'cudaDeviceProp.pageableMemoryAccess' in found_struct}} @property def pageableMemoryAccess(self): - return self._ptr[0].pageableMemoryAccess + return self._pvt_ptr[0].pageableMemoryAccess @pageableMemoryAccess.setter def pageableMemoryAccess(self, int pageableMemoryAccess): - self._ptr[0].pageableMemoryAccess = pageableMemoryAccess + self._pvt_ptr[0].pageableMemoryAccess = pageableMemoryAccess + {{endif}} + {{if 'cudaDeviceProp.concurrentManagedAccess' in found_struct}} @property def concurrentManagedAccess(self): - return self._ptr[0].concurrentManagedAccess + return self._pvt_ptr[0].concurrentManagedAccess @concurrentManagedAccess.setter def concurrentManagedAccess(self, int concurrentManagedAccess): - self._ptr[0].concurrentManagedAccess = concurrentManagedAccess + self._pvt_ptr[0].concurrentManagedAccess = concurrentManagedAccess + {{endif}} + {{if 'cudaDeviceProp.computePreemptionSupported' in found_struct}} @property def computePreemptionSupported(self): - return self._ptr[0].computePreemptionSupported + return self._pvt_ptr[0].computePreemptionSupported @computePreemptionSupported.setter def computePreemptionSupported(self, int computePreemptionSupported): - self._ptr[0].computePreemptionSupported = computePreemptionSupported + self._pvt_ptr[0].computePreemptionSupported = computePreemptionSupported + {{endif}} + {{if 'cudaDeviceProp.canUseHostPointerForRegisteredMem' in found_struct}} @property def canUseHostPointerForRegisteredMem(self): - return self._ptr[0].canUseHostPointerForRegisteredMem + return self._pvt_ptr[0].canUseHostPointerForRegisteredMem @canUseHostPointerForRegisteredMem.setter def canUseHostPointerForRegisteredMem(self, int canUseHostPointerForRegisteredMem): - self._ptr[0].canUseHostPointerForRegisteredMem = canUseHostPointerForRegisteredMem + self._pvt_ptr[0].canUseHostPointerForRegisteredMem = canUseHostPointerForRegisteredMem + {{endif}} + {{if 'cudaDeviceProp.cooperativeLaunch' in found_struct}} @property def cooperativeLaunch(self): - return self._ptr[0].cooperativeLaunch + return self._pvt_ptr[0].cooperativeLaunch @cooperativeLaunch.setter def cooperativeLaunch(self, int cooperativeLaunch): - self._ptr[0].cooperativeLaunch = cooperativeLaunch + self._pvt_ptr[0].cooperativeLaunch = cooperativeLaunch + {{endif}} + {{if 'cudaDeviceProp.cooperativeMultiDeviceLaunch' in found_struct}} @property def cooperativeMultiDeviceLaunch(self): - return self._ptr[0].cooperativeMultiDeviceLaunch + return self._pvt_ptr[0].cooperativeMultiDeviceLaunch @cooperativeMultiDeviceLaunch.setter def cooperativeMultiDeviceLaunch(self, int cooperativeMultiDeviceLaunch): - self._ptr[0].cooperativeMultiDeviceLaunch = cooperativeMultiDeviceLaunch + self._pvt_ptr[0].cooperativeMultiDeviceLaunch = cooperativeMultiDeviceLaunch + {{endif}} + {{if 'cudaDeviceProp.sharedMemPerBlockOptin' in found_struct}} @property def sharedMemPerBlockOptin(self): - return self._ptr[0].sharedMemPerBlockOptin + return self._pvt_ptr[0].sharedMemPerBlockOptin @sharedMemPerBlockOptin.setter def sharedMemPerBlockOptin(self, size_t sharedMemPerBlockOptin): - self._ptr[0].sharedMemPerBlockOptin = sharedMemPerBlockOptin + self._pvt_ptr[0].sharedMemPerBlockOptin = sharedMemPerBlockOptin + {{endif}} + {{if 'cudaDeviceProp.pageableMemoryAccessUsesHostPageTables' in found_struct}} @property def pageableMemoryAccessUsesHostPageTables(self): - return self._ptr[0].pageableMemoryAccessUsesHostPageTables + return self._pvt_ptr[0].pageableMemoryAccessUsesHostPageTables @pageableMemoryAccessUsesHostPageTables.setter def pageableMemoryAccessUsesHostPageTables(self, int pageableMemoryAccessUsesHostPageTables): - self._ptr[0].pageableMemoryAccessUsesHostPageTables = pageableMemoryAccessUsesHostPageTables + self._pvt_ptr[0].pageableMemoryAccessUsesHostPageTables = pageableMemoryAccessUsesHostPageTables + {{endif}} + {{if 'cudaDeviceProp.directManagedMemAccessFromHost' in found_struct}} @property def directManagedMemAccessFromHost(self): - return self._ptr[0].directManagedMemAccessFromHost + return self._pvt_ptr[0].directManagedMemAccessFromHost @directManagedMemAccessFromHost.setter def directManagedMemAccessFromHost(self, int directManagedMemAccessFromHost): - self._ptr[0].directManagedMemAccessFromHost = directManagedMemAccessFromHost + self._pvt_ptr[0].directManagedMemAccessFromHost = directManagedMemAccessFromHost + {{endif}} + {{if 'cudaDeviceProp.maxBlocksPerMultiProcessor' in found_struct}} @property def maxBlocksPerMultiProcessor(self): - return self._ptr[0].maxBlocksPerMultiProcessor + return self._pvt_ptr[0].maxBlocksPerMultiProcessor @maxBlocksPerMultiProcessor.setter def maxBlocksPerMultiProcessor(self, int maxBlocksPerMultiProcessor): - self._ptr[0].maxBlocksPerMultiProcessor = maxBlocksPerMultiProcessor + self._pvt_ptr[0].maxBlocksPerMultiProcessor = maxBlocksPerMultiProcessor + {{endif}} + {{if 'cudaDeviceProp.accessPolicyMaxWindowSize' in found_struct}} @property def accessPolicyMaxWindowSize(self): - return self._ptr[0].accessPolicyMaxWindowSize + return self._pvt_ptr[0].accessPolicyMaxWindowSize @accessPolicyMaxWindowSize.setter def accessPolicyMaxWindowSize(self, int accessPolicyMaxWindowSize): - self._ptr[0].accessPolicyMaxWindowSize = accessPolicyMaxWindowSize + self._pvt_ptr[0].accessPolicyMaxWindowSize = accessPolicyMaxWindowSize + {{endif}} + {{if 'cudaDeviceProp.reservedSharedMemPerBlock' in found_struct}} @property def reservedSharedMemPerBlock(self): - return self._ptr[0].reservedSharedMemPerBlock + return self._pvt_ptr[0].reservedSharedMemPerBlock @reservedSharedMemPerBlock.setter def reservedSharedMemPerBlock(self, size_t reservedSharedMemPerBlock): - self._ptr[0].reservedSharedMemPerBlock = reservedSharedMemPerBlock + self._pvt_ptr[0].reservedSharedMemPerBlock = reservedSharedMemPerBlock + {{endif}} + {{if 'cudaDeviceProp.hostRegisterSupported' in found_struct}} @property def hostRegisterSupported(self): - return self._ptr[0].hostRegisterSupported + return self._pvt_ptr[0].hostRegisterSupported @hostRegisterSupported.setter def hostRegisterSupported(self, int hostRegisterSupported): - self._ptr[0].hostRegisterSupported = hostRegisterSupported + self._pvt_ptr[0].hostRegisterSupported = hostRegisterSupported + {{endif}} + {{if 'cudaDeviceProp.sparseCudaArraySupported' in found_struct}} @property def sparseCudaArraySupported(self): - return self._ptr[0].sparseCudaArraySupported + return self._pvt_ptr[0].sparseCudaArraySupported @sparseCudaArraySupported.setter def sparseCudaArraySupported(self, int sparseCudaArraySupported): - self._ptr[0].sparseCudaArraySupported = sparseCudaArraySupported + self._pvt_ptr[0].sparseCudaArraySupported = sparseCudaArraySupported + {{endif}} + {{if 'cudaDeviceProp.hostRegisterReadOnlySupported' in found_struct}} @property def hostRegisterReadOnlySupported(self): - return self._ptr[0].hostRegisterReadOnlySupported + return self._pvt_ptr[0].hostRegisterReadOnlySupported @hostRegisterReadOnlySupported.setter def hostRegisterReadOnlySupported(self, int hostRegisterReadOnlySupported): - self._ptr[0].hostRegisterReadOnlySupported = hostRegisterReadOnlySupported + self._pvt_ptr[0].hostRegisterReadOnlySupported = hostRegisterReadOnlySupported + {{endif}} + {{if 'cudaDeviceProp.timelineSemaphoreInteropSupported' in found_struct}} @property def timelineSemaphoreInteropSupported(self): - return self._ptr[0].timelineSemaphoreInteropSupported + return self._pvt_ptr[0].timelineSemaphoreInteropSupported @timelineSemaphoreInteropSupported.setter def timelineSemaphoreInteropSupported(self, int timelineSemaphoreInteropSupported): - self._ptr[0].timelineSemaphoreInteropSupported = timelineSemaphoreInteropSupported + self._pvt_ptr[0].timelineSemaphoreInteropSupported = timelineSemaphoreInteropSupported + {{endif}} + {{if 'cudaDeviceProp.memoryPoolsSupported' in found_struct}} @property def memoryPoolsSupported(self): - return self._ptr[0].memoryPoolsSupported + return self._pvt_ptr[0].memoryPoolsSupported @memoryPoolsSupported.setter def memoryPoolsSupported(self, int memoryPoolsSupported): - self._ptr[0].memoryPoolsSupported = memoryPoolsSupported + self._pvt_ptr[0].memoryPoolsSupported = memoryPoolsSupported + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMASupported' in found_struct}} @property def gpuDirectRDMASupported(self): - return self._ptr[0].gpuDirectRDMASupported + return self._pvt_ptr[0].gpuDirectRDMASupported @gpuDirectRDMASupported.setter def gpuDirectRDMASupported(self, int gpuDirectRDMASupported): - self._ptr[0].gpuDirectRDMASupported = gpuDirectRDMASupported + self._pvt_ptr[0].gpuDirectRDMASupported = gpuDirectRDMASupported + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMAFlushWritesOptions' in found_struct}} @property def gpuDirectRDMAFlushWritesOptions(self): - return self._ptr[0].gpuDirectRDMAFlushWritesOptions + return self._pvt_ptr[0].gpuDirectRDMAFlushWritesOptions @gpuDirectRDMAFlushWritesOptions.setter def gpuDirectRDMAFlushWritesOptions(self, unsigned int gpuDirectRDMAFlushWritesOptions): - self._ptr[0].gpuDirectRDMAFlushWritesOptions = gpuDirectRDMAFlushWritesOptions + self._pvt_ptr[0].gpuDirectRDMAFlushWritesOptions = gpuDirectRDMAFlushWritesOptions + {{endif}} + {{if 'cudaDeviceProp.gpuDirectRDMAWritesOrdering' in found_struct}} @property def gpuDirectRDMAWritesOrdering(self): - return self._ptr[0].gpuDirectRDMAWritesOrdering + return self._pvt_ptr[0].gpuDirectRDMAWritesOrdering @gpuDirectRDMAWritesOrdering.setter def gpuDirectRDMAWritesOrdering(self, int gpuDirectRDMAWritesOrdering): - self._ptr[0].gpuDirectRDMAWritesOrdering = gpuDirectRDMAWritesOrdering + self._pvt_ptr[0].gpuDirectRDMAWritesOrdering = gpuDirectRDMAWritesOrdering + {{endif}} + {{if 'cudaDeviceProp.memoryPoolSupportedHandleTypes' in found_struct}} @property def memoryPoolSupportedHandleTypes(self): - return self._ptr[0].memoryPoolSupportedHandleTypes + return self._pvt_ptr[0].memoryPoolSupportedHandleTypes @memoryPoolSupportedHandleTypes.setter def memoryPoolSupportedHandleTypes(self, unsigned int memoryPoolSupportedHandleTypes): - self._ptr[0].memoryPoolSupportedHandleTypes = memoryPoolSupportedHandleTypes + self._pvt_ptr[0].memoryPoolSupportedHandleTypes = memoryPoolSupportedHandleTypes + {{endif}} + {{if 'cudaDeviceProp.deferredMappingCudaArraySupported' in found_struct}} @property def deferredMappingCudaArraySupported(self): - return self._ptr[0].deferredMappingCudaArraySupported + return self._pvt_ptr[0].deferredMappingCudaArraySupported @deferredMappingCudaArraySupported.setter def deferredMappingCudaArraySupported(self, int deferredMappingCudaArraySupported): - self._ptr[0].deferredMappingCudaArraySupported = deferredMappingCudaArraySupported + self._pvt_ptr[0].deferredMappingCudaArraySupported = deferredMappingCudaArraySupported + {{endif}} + {{if 'cudaDeviceProp.ipcEventSupported' in found_struct}} @property def ipcEventSupported(self): - return self._ptr[0].ipcEventSupported + return self._pvt_ptr[0].ipcEventSupported @ipcEventSupported.setter def ipcEventSupported(self, int ipcEventSupported): - self._ptr[0].ipcEventSupported = ipcEventSupported + self._pvt_ptr[0].ipcEventSupported = ipcEventSupported + {{endif}} + {{if 'cudaDeviceProp.clusterLaunch' in found_struct}} @property def clusterLaunch(self): - return self._ptr[0].clusterLaunch + return self._pvt_ptr[0].clusterLaunch @clusterLaunch.setter def clusterLaunch(self, int clusterLaunch): - self._ptr[0].clusterLaunch = clusterLaunch + self._pvt_ptr[0].clusterLaunch = clusterLaunch + {{endif}} + {{if 'cudaDeviceProp.unifiedFunctionPointers' in found_struct}} @property def unifiedFunctionPointers(self): - return self._ptr[0].unifiedFunctionPointers + return self._pvt_ptr[0].unifiedFunctionPointers @unifiedFunctionPointers.setter def unifiedFunctionPointers(self, int unifiedFunctionPointers): - self._ptr[0].unifiedFunctionPointers = unifiedFunctionPointers - @property - def reserved2(self): - return self._ptr[0].reserved2 - @reserved2.setter - def reserved2(self, reserved2): - self._ptr[0].reserved2 = reserved2 - @property - def reserved1(self): - return self._ptr[0].reserved1 - @reserved1.setter - def reserved1(self, reserved1): - self._ptr[0].reserved1 = reserved1 + self._pvt_ptr[0].unifiedFunctionPointers = unifiedFunctionPointers + {{endif}} + {{if 'cudaDeviceProp.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct cudaIpcEventHandle_st' in found_types}} +{{if 'cudaIpcEventHandle_st' in found_struct}} cdef class cudaIpcEventHandle_st: """ @@ -9183,39 +11755,43 @@ cdef class cudaIpcEventHandle_st: Attributes ---------- + {{if 'cudaIpcEventHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaIpcEventHandle_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaIpcEventHandle_st.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) @reserved.setter def reserved(self, reserved): if len(reserved) != 64: @@ -9224,14 +11800,15 @@ cdef class cudaIpcEventHandle_st: for i, b in enumerate(reserved): if b < 0 and b > -129: b = b + 256 - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b else: for i, b in enumerate(reserved): if b > 127 and b < 256: b = b - 256 - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b + {{endif}} {{endif}} -{{if 'struct cudaIpcMemHandle_st' in found_types}} +{{if 'cudaIpcMemHandle_st' in found_struct}} cdef class cudaIpcMemHandle_st: """ @@ -9239,39 +11816,43 @@ cdef class cudaIpcMemHandle_st: Attributes ---------- + {{if 'cudaIpcMemHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaIpcMemHandle_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaIpcMemHandle_st.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) @reserved.setter def reserved(self, reserved): if len(reserved) != 64: @@ -9280,52 +11861,57 @@ cdef class cudaIpcMemHandle_st: for i, b in enumerate(reserved): if b < 0 and b > -129: b = b + 256 - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b else: for i, b in enumerate(reserved): if b > 127 and b < 256: b = b - 256 - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b + {{endif}} {{endif}} -{{if 'struct cudaMemFabricHandle_st' in found_types}} +{{if 'cudaMemFabricHandle_st' in found_struct}} cdef class cudaMemFabricHandle_st: """ Attributes ---------- + {{if 'cudaMemFabricHandle_st.reserved' in found_struct}} reserved : bytes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaMemFabricHandle_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaMemFabricHandle_st.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].reserved, 64) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 64) @reserved.setter def reserved(self, reserved): if len(reserved) != 64: @@ -9334,135 +11920,167 @@ cdef class cudaMemFabricHandle_st: for i, b in enumerate(reserved): if b < 0 and b > -129: b = b + 256 - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b else: for i, b in enumerate(reserved): if b > 127 and b < 256: b = b - 256 - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b + {{endif}} {{endif}} -{{if 'struct cudaExternalMemoryHandleDesc' in found_types}} +{{if 'cudaExternalMemoryHandleDesc.handle.win32' in found_struct}} -cdef class anon_struct5: +cdef class anon_struct7: """ Attributes ---------- + {{if 'cudaExternalMemoryHandleDesc.handle.win32.handle' in found_struct}} handle : Any + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.win32.name' in found_struct}} name : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].handle.win32 + return &self._pvt_ptr[0].handle.win32 def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalMemoryHandleDesc.handle.win32.handle' in found_struct}} try: str_list += ['handle : ' + hex(self.handle)] except ValueError: str_list += ['handle : '] + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.win32.name' in found_struct}} try: str_list += ['name : ' + hex(self.name)] except ValueError: str_list += ['name : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalMemoryHandleDesc.handle.win32.handle' in found_struct}} @property def handle(self): - return self._ptr[0].handle.win32.handle + return self._pvt_ptr[0].handle.win32.handle @handle.setter def handle(self, handle): - _cyhandle = utils.HelperInputVoidPtr(handle) - self._ptr[0].handle.win32.handle = _cyhandle.cptr + _chandle = utils.HelperInputVoidPtr(handle) + self._pvt_ptr[0].handle.win32.handle = _chandle.cptr + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.win32.name' in found_struct}} @property def name(self): - return self._ptr[0].handle.win32.name + return self._pvt_ptr[0].handle.win32.name @name.setter def name(self, name): - _cyname = utils.HelperInputVoidPtr(name) - self._ptr[0].handle.win32.name = _cyname.cptr + _cname = utils.HelperInputVoidPtr(name) + self._pvt_ptr[0].handle.win32.name = _cname.cptr + {{endif}} {{endif}} -{{if 'struct cudaExternalMemoryHandleDesc' in found_types}} +{{if 'cudaExternalMemoryHandleDesc.handle' in found_struct}} -cdef class anon_union1: +cdef class anon_union2: """ Attributes ---------- + {{if 'cudaExternalMemoryHandleDesc.handle.fd' in found_struct}} fd : int - win32 : anon_struct5 + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.win32' in found_struct}} + win32 : anon_struct7 + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.nvSciBufObject' in found_struct}} nvSciBufObject : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._win32 = anon_struct5(_ptr=self._ptr) + pass + {{if 'cudaExternalMemoryHandleDesc.handle.win32' in found_struct}} + self._win32 = anon_struct7(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].handle + return &self._pvt_ptr[0].handle def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalMemoryHandleDesc.handle.fd' in found_struct}} try: str_list += ['fd : ' + str(self.fd)] except ValueError: str_list += ['fd : '] + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.win32' in found_struct}} try: str_list += ['win32 :\n' + '\n'.join([' ' + line for line in str(self.win32).splitlines()])] except ValueError: str_list += ['win32 : '] + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.nvSciBufObject' in found_struct}} try: str_list += ['nvSciBufObject : ' + hex(self.nvSciBufObject)] except ValueError: str_list += ['nvSciBufObject : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalMemoryHandleDesc.handle.fd' in found_struct}} @property def fd(self): - return self._ptr[0].handle.fd + return self._pvt_ptr[0].handle.fd @fd.setter def fd(self, int fd): - self._ptr[0].handle.fd = fd + self._pvt_ptr[0].handle.fd = fd + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.win32' in found_struct}} @property def win32(self): return self._win32 @win32.setter - def win32(self, win32 not None : anon_struct5): - string.memcpy(&self._ptr[0].handle.win32, win32.getPtr(), sizeof(self._ptr[0].handle.win32)) + def win32(self, win32 not None : anon_struct7): + string.memcpy(&self._pvt_ptr[0].handle.win32, win32.getPtr(), sizeof(self._pvt_ptr[0].handle.win32)) + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle.nvSciBufObject' in found_struct}} @property def nvSciBufObject(self): - return self._ptr[0].handle.nvSciBufObject + return self._pvt_ptr[0].handle.nvSciBufObject @nvSciBufObject.setter def nvSciBufObject(self, nvSciBufObject): - _cynvSciBufObject = utils.HelperInputVoidPtr(nvSciBufObject) - self._ptr[0].handle.nvSciBufObject = _cynvSciBufObject.cptr + _cnvSciBufObject = utils.HelperInputVoidPtr(nvSciBufObject) + self._pvt_ptr[0].handle.nvSciBufObject = _cnvSciBufObject.cptr + {{endif}} {{endif}} -{{if 'struct cudaExternalMemoryHandleDesc' in found_types}} +{{if 'cudaExternalMemoryHandleDesc' in found_struct}} cdef class cudaExternalMemoryHandleDesc: """ @@ -9470,82 +12088,108 @@ cdef class cudaExternalMemoryHandleDesc: Attributes ---------- + {{if 'cudaExternalMemoryHandleDesc.type' in found_struct}} type : cudaExternalMemoryHandleType Type of the handle - handle : anon_union1 + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle' in found_struct}} + handle : anon_union2 + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.size' in found_struct}} size : unsigned long long Size of the memory allocation + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.flags' in found_struct}} flags : unsigned int Flags must either be zero or cudaExternalMemoryDedicated + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cyruntime.cudaExternalMemoryHandleDesc)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._handle = anon_union1(_ptr=self._ptr) + pass + {{if 'cudaExternalMemoryHandleDesc.handle' in found_struct}} + self._handle = anon_union2(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalMemoryHandleDesc.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle' in found_struct}} try: str_list += ['handle :\n' + '\n'.join([' ' + line for line in str(self.handle).splitlines()])] except ValueError: str_list += ['handle : '] + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.size' in found_struct}} try: str_list += ['size : ' + str(self.size)] except ValueError: str_list += ['size : '] + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalMemoryHandleDesc.type' in found_struct}} @property def type(self): - return cudaExternalMemoryHandleType(self._ptr[0].type) + return cudaExternalMemoryHandleType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaExternalMemoryHandleType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.handle' in found_struct}} @property def handle(self): return self._handle @handle.setter - def handle(self, handle not None : anon_union1): - string.memcpy(&self._ptr[0].handle, handle.getPtr(), sizeof(self._ptr[0].handle)) + def handle(self, handle not None : anon_union2): + string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.size' in found_struct}} @property def size(self): - return self._ptr[0].size + return self._pvt_ptr[0].size @size.setter def size(self, unsigned long long size): - self._ptr[0].size = size + self._pvt_ptr[0].size = size + {{endif}} + {{if 'cudaExternalMemoryHandleDesc.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} {{endif}} -{{if 'struct cudaExternalMemoryBufferDesc' in found_types}} +{{if 'cudaExternalMemoryBufferDesc' in found_struct}} cdef class cudaExternalMemoryBufferDesc: """ @@ -9553,68 +12197,85 @@ cdef class cudaExternalMemoryBufferDesc: Attributes ---------- + {{if 'cudaExternalMemoryBufferDesc.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the buffer's base is + {{endif}} + {{if 'cudaExternalMemoryBufferDesc.size' in found_struct}} size : unsigned long long Size of the buffer + {{endif}} + {{if 'cudaExternalMemoryBufferDesc.flags' in found_struct}} flags : unsigned int Flags reserved for future use. Must be zero. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalMemoryBufferDesc.offset' in found_struct}} try: str_list += ['offset : ' + str(self.offset)] except ValueError: str_list += ['offset : '] + {{endif}} + {{if 'cudaExternalMemoryBufferDesc.size' in found_struct}} try: str_list += ['size : ' + str(self.size)] except ValueError: str_list += ['size : '] + {{endif}} + {{if 'cudaExternalMemoryBufferDesc.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalMemoryBufferDesc.offset' in found_struct}} @property def offset(self): - return self._ptr[0].offset + return self._pvt_ptr[0].offset @offset.setter def offset(self, unsigned long long offset): - self._ptr[0].offset = offset + self._pvt_ptr[0].offset = offset + {{endif}} + {{if 'cudaExternalMemoryBufferDesc.size' in found_struct}} @property def size(self): - return self._ptr[0].size + return self._pvt_ptr[0].size @size.setter def size(self, unsigned long long size): - self._ptr[0].size = size + self._pvt_ptr[0].size = size + {{endif}} + {{if 'cudaExternalMemoryBufferDesc.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} {{endif}} -{{if 'struct cudaExternalMemoryMipmappedArrayDesc' in found_types}} +{{if 'cudaExternalMemoryMipmappedArrayDesc' in found_struct}} cdef class cudaExternalMemoryMipmappedArrayDesc: """ @@ -9622,216 +12283,281 @@ cdef class cudaExternalMemoryMipmappedArrayDesc: Attributes ---------- + {{if 'cudaExternalMemoryMipmappedArrayDesc.offset' in found_struct}} offset : unsigned long long Offset into the memory object where the base level of the mipmap chain is. + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.formatDesc' in found_struct}} formatDesc : cudaChannelFormatDesc Format of base level of the mipmap chain + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.extent' in found_struct}} extent : cudaExtent Dimensions of base level of the mipmap chain + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.flags' in found_struct}} flags : unsigned int Flags associated with CUDA mipmapped arrays. See cudaMallocMipmappedArray + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.numLevels' in found_struct}} numLevels : unsigned int Total number of levels in the mipmap chain + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._formatDesc = cudaChannelFormatDesc(_ptr=&self._ptr[0].formatDesc) - self._extent = cudaExtent(_ptr=&self._ptr[0].extent) + pass + {{if 'cudaExternalMemoryMipmappedArrayDesc.formatDesc' in found_struct}} + self._formatDesc = cudaChannelFormatDesc(_ptr=&self._pvt_ptr[0].formatDesc) + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.extent' in found_struct}} + self._extent = cudaExtent(_ptr=&self._pvt_ptr[0].extent) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalMemoryMipmappedArrayDesc.offset' in found_struct}} try: str_list += ['offset : ' + str(self.offset)] except ValueError: str_list += ['offset : '] + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.formatDesc' in found_struct}} try: str_list += ['formatDesc :\n' + '\n'.join([' ' + line for line in str(self.formatDesc).splitlines()])] except ValueError: str_list += ['formatDesc : '] + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.extent' in found_struct}} try: str_list += ['extent :\n' + '\n'.join([' ' + line for line in str(self.extent).splitlines()])] except ValueError: str_list += ['extent : '] + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.numLevels' in found_struct}} try: str_list += ['numLevels : ' + str(self.numLevels)] except ValueError: str_list += ['numLevels : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalMemoryMipmappedArrayDesc.offset' in found_struct}} @property def offset(self): - return self._ptr[0].offset + return self._pvt_ptr[0].offset @offset.setter def offset(self, unsigned long long offset): - self._ptr[0].offset = offset + self._pvt_ptr[0].offset = offset + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.formatDesc' in found_struct}} @property def formatDesc(self): return self._formatDesc @formatDesc.setter def formatDesc(self, formatDesc not None : cudaChannelFormatDesc): - string.memcpy(&self._ptr[0].formatDesc, formatDesc.getPtr(), sizeof(self._ptr[0].formatDesc)) + string.memcpy(&self._pvt_ptr[0].formatDesc, formatDesc.getPtr(), sizeof(self._pvt_ptr[0].formatDesc)) + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.extent' in found_struct}} @property def extent(self): return self._extent @extent.setter def extent(self, extent not None : cudaExtent): - string.memcpy(&self._ptr[0].extent, extent.getPtr(), sizeof(self._ptr[0].extent)) + string.memcpy(&self._pvt_ptr[0].extent, extent.getPtr(), sizeof(self._pvt_ptr[0].extent)) + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'cudaExternalMemoryMipmappedArrayDesc.numLevels' in found_struct}} @property def numLevels(self): - return self._ptr[0].numLevels + return self._pvt_ptr[0].numLevels @numLevels.setter def numLevels(self, unsigned int numLevels): - self._ptr[0].numLevels = numLevels + self._pvt_ptr[0].numLevels = numLevels + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreHandleDesc' in found_types}} +{{if 'cudaExternalSemaphoreHandleDesc.handle.win32' in found_struct}} -cdef class anon_struct6: +cdef class anon_struct8: """ Attributes ---------- + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32.handle' in found_struct}} handle : Any + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32.name' in found_struct}} name : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].handle.win32 + return &self._pvt_ptr[0].handle.win32 def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32.handle' in found_struct}} try: str_list += ['handle : ' + hex(self.handle)] except ValueError: str_list += ['handle : '] + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32.name' in found_struct}} try: str_list += ['name : ' + hex(self.name)] except ValueError: str_list += ['name : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32.handle' in found_struct}} @property def handle(self): - return self._ptr[0].handle.win32.handle + return self._pvt_ptr[0].handle.win32.handle @handle.setter def handle(self, handle): - _cyhandle = utils.HelperInputVoidPtr(handle) - self._ptr[0].handle.win32.handle = _cyhandle.cptr + _chandle = utils.HelperInputVoidPtr(handle) + self._pvt_ptr[0].handle.win32.handle = _chandle.cptr + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32.name' in found_struct}} @property def name(self): - return self._ptr[0].handle.win32.name + return self._pvt_ptr[0].handle.win32.name @name.setter def name(self, name): - _cyname = utils.HelperInputVoidPtr(name) - self._ptr[0].handle.win32.name = _cyname.cptr + _cname = utils.HelperInputVoidPtr(name) + self._pvt_ptr[0].handle.win32.name = _cname.cptr + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreHandleDesc' in found_types}} +{{if 'cudaExternalSemaphoreHandleDesc.handle' in found_struct}} -cdef class anon_union2: +cdef class anon_union3: """ Attributes ---------- + {{if 'cudaExternalSemaphoreHandleDesc.handle.fd' in found_struct}} fd : int - win32 : anon_struct6 + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32' in found_struct}} + win32 : anon_struct8 + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.nvSciSyncObj' in found_struct}} nvSciSyncObj : Any + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._win32 = anon_struct6(_ptr=self._ptr) + pass + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32' in found_struct}} + self._win32 = anon_struct8(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].handle + return &self._pvt_ptr[0].handle def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreHandleDesc.handle.fd' in found_struct}} try: str_list += ['fd : ' + str(self.fd)] except ValueError: str_list += ['fd : '] + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32' in found_struct}} try: str_list += ['win32 :\n' + '\n'.join([' ' + line for line in str(self.win32).splitlines()])] except ValueError: str_list += ['win32 : '] + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.nvSciSyncObj' in found_struct}} try: str_list += ['nvSciSyncObj : ' + hex(self.nvSciSyncObj)] except ValueError: str_list += ['nvSciSyncObj : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreHandleDesc.handle.fd' in found_struct}} @property def fd(self): - return self._ptr[0].handle.fd + return self._pvt_ptr[0].handle.fd @fd.setter def fd(self, int fd): - self._ptr[0].handle.fd = fd + self._pvt_ptr[0].handle.fd = fd + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.win32' in found_struct}} @property def win32(self): return self._win32 @win32.setter - def win32(self, win32 not None : anon_struct6): - string.memcpy(&self._ptr[0].handle.win32, win32.getPtr(), sizeof(self._ptr[0].handle.win32)) + def win32(self, win32 not None : anon_struct8): + string.memcpy(&self._pvt_ptr[0].handle.win32, win32.getPtr(), sizeof(self._pvt_ptr[0].handle.win32)) + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle.nvSciSyncObj' in found_struct}} @property def nvSciSyncObj(self): - return self._ptr[0].handle.nvSciSyncObj + return self._pvt_ptr[0].handle.nvSciSyncObj @nvSciSyncObj.setter def nvSciSyncObj(self, nvSciSyncObj): - _cynvSciSyncObj = utils.HelperInputVoidPtr(nvSciSyncObj) - self._ptr[0].handle.nvSciSyncObj = _cynvSciSyncObj.cptr + _cnvSciSyncObj = utils.HelperInputVoidPtr(nvSciSyncObj) + self._pvt_ptr[0].handle.nvSciSyncObj = _cnvSciSyncObj.cptr + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreHandleDesc' in found_types}} +{{if 'cudaExternalSemaphoreHandleDesc' in found_struct}} cdef class cudaExternalSemaphoreHandleDesc: """ @@ -9839,285 +12565,356 @@ cdef class cudaExternalSemaphoreHandleDesc: Attributes ---------- + {{if 'cudaExternalSemaphoreHandleDesc.type' in found_struct}} type : cudaExternalSemaphoreHandleType Type of the handle - handle : anon_union2 + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle' in found_struct}} + handle : anon_union3 + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.flags' in found_struct}} flags : unsigned int Flags reserved for the future. Must be zero. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cyruntime.cudaExternalSemaphoreHandleDesc)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._handle = anon_union2(_ptr=self._ptr) + pass + {{if 'cudaExternalSemaphoreHandleDesc.handle' in found_struct}} + self._handle = anon_union3(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreHandleDesc.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle' in found_struct}} try: str_list += ['handle :\n' + '\n'.join([' ' + line for line in str(self.handle).splitlines()])] except ValueError: str_list += ['handle : '] + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreHandleDesc.type' in found_struct}} @property def type(self): - return cudaExternalSemaphoreHandleType(self._ptr[0].type) + return cudaExternalSemaphoreHandleType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaExternalSemaphoreHandleType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.handle' in found_struct}} @property def handle(self): return self._handle @handle.setter - def handle(self, handle not None : anon_union2): - string.memcpy(&self._ptr[0].handle, handle.getPtr(), sizeof(self._ptr[0].handle)) + def handle(self, handle not None : anon_union3): + string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) + {{endif}} + {{if 'cudaExternalSemaphoreHandleDesc.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreSignalParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalParams.params.fence' in found_struct}} -cdef class anon_struct13: +cdef class anon_struct15: """ Attributes ---------- + {{if 'cudaExternalSemaphoreSignalParams.params.fence.value' in found_struct}} value : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.fence + return &self._pvt_ptr[0].params.fence def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreSignalParams.params.fence.value' in found_struct}} try: str_list += ['value : ' + str(self.value)] except ValueError: str_list += ['value : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreSignalParams.params.fence.value' in found_struct}} @property def value(self): - return self._ptr[0].params.fence.value + return self._pvt_ptr[0].params.fence.value @value.setter def value(self, unsigned long long value): - self._ptr[0].params.fence.value = value + self._pvt_ptr[0].params.fence.value = value + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreSignalParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync' in found_struct}} -cdef class anon_union5: +cdef class anon_union6: """ Attributes ---------- + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync.fence' in found_struct}} fence : Any + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync.reserved' in found_struct}} reserved : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.nvSciSync + return &self._pvt_ptr[0].params.nvSciSync def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync.fence' in found_struct}} try: str_list += ['fence : ' + hex(self.fence)] except ValueError: str_list += ['fence : '] + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync.fence' in found_struct}} @property def fence(self): - return self._ptr[0].params.nvSciSync.fence + return self._pvt_ptr[0].params.nvSciSync.fence @fence.setter def fence(self, fence): - _cyfence = utils.HelperInputVoidPtr(fence) - self._ptr[0].params.nvSciSync.fence = _cyfence.cptr + _cfence = utils.HelperInputVoidPtr(fence) + self._pvt_ptr[0].params.nvSciSync.fence = _cfence.cptr + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].params.nvSciSync.reserved + return self._pvt_ptr[0].params.nvSciSync.reserved @reserved.setter def reserved(self, unsigned long long reserved): - self._ptr[0].params.nvSciSync.reserved = reserved + self._pvt_ptr[0].params.nvSciSync.reserved = reserved + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreSignalParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex' in found_struct}} -cdef class anon_struct14: +cdef class anon_struct16: """ Attributes ---------- + {{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex.key' in found_struct}} key : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.keyedMutex + return &self._pvt_ptr[0].params.keyedMutex def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex.key' in found_struct}} try: str_list += ['key : ' + str(self.key)] except ValueError: str_list += ['key : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex.key' in found_struct}} @property def key(self): - return self._ptr[0].params.keyedMutex.key + return self._pvt_ptr[0].params.keyedMutex.key @key.setter def key(self, unsigned long long key): - self._ptr[0].params.keyedMutex.key = key + self._pvt_ptr[0].params.keyedMutex.key = key + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreSignalParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalParams.params' in found_struct}} -cdef class anon_struct15: +cdef class anon_struct17: """ Attributes ---------- - fence : anon_struct13 + {{if 'cudaExternalSemaphoreSignalParams.params.fence' in found_struct}} + fence : anon_struct15 - nvSciSync : anon_union5 + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync' in found_struct}} + nvSciSync : anon_union6 - keyedMutex : anon_struct14 + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex' in found_struct}} + keyedMutex : anon_struct16 + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._fence = anon_struct13(_ptr=self._ptr) - self._nvSciSync = anon_union5(_ptr=self._ptr) - self._keyedMutex = anon_struct14(_ptr=self._ptr) + pass + {{if 'cudaExternalSemaphoreSignalParams.params.fence' in found_struct}} + self._fence = anon_struct15(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync' in found_struct}} + self._nvSciSync = anon_union6(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex' in found_struct}} + self._keyedMutex = anon_struct16(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params + return &self._pvt_ptr[0].params def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreSignalParams.params.fence' in found_struct}} try: str_list += ['fence :\n' + '\n'.join([' ' + line for line in str(self.fence).splitlines()])] except ValueError: str_list += ['fence : '] + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync' in found_struct}} try: str_list += ['nvSciSync :\n' + '\n'.join([' ' + line for line in str(self.nvSciSync).splitlines()])] except ValueError: str_list += ['nvSciSync : '] + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex' in found_struct}} try: str_list += ['keyedMutex :\n' + '\n'.join([' ' + line for line in str(self.keyedMutex).splitlines()])] except ValueError: str_list += ['keyedMutex : '] + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreSignalParams.params.fence' in found_struct}} @property def fence(self): return self._fence @fence.setter - def fence(self, fence not None : anon_struct13): - string.memcpy(&self._ptr[0].params.fence, fence.getPtr(), sizeof(self._ptr[0].params.fence)) + def fence(self, fence not None : anon_struct15): + string.memcpy(&self._pvt_ptr[0].params.fence, fence.getPtr(), sizeof(self._pvt_ptr[0].params.fence)) + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.nvSciSync' in found_struct}} @property def nvSciSync(self): return self._nvSciSync @nvSciSync.setter - def nvSciSync(self, nvSciSync not None : anon_union5): - string.memcpy(&self._ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._ptr[0].params.nvSciSync)) + def nvSciSync(self, nvSciSync not None : anon_union6): + string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.keyedMutex' in found_struct}} @property def keyedMutex(self): return self._keyedMutex @keyedMutex.setter - def keyedMutex(self, keyedMutex not None : anon_struct14): - string.memcpy(&self._ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._ptr[0].params.keyedMutex)) + def keyedMutex(self, keyedMutex not None : anon_struct16): + string.memcpy(&self._pvt_ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._pvt_ptr[0].params.keyedMutex)) + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.params.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].params.reserved + return self._pvt_ptr[0].params.reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].params.reserved = reserved + self._pvt_ptr[0].params.reserved = reserved + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreSignalParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalParams' in found_struct}} cdef class cudaExternalSemaphoreSignalParams: """ @@ -10125,8 +12922,11 @@ cdef class cudaExternalSemaphoreSignalParams: Attributes ---------- - params : anon_struct15 + {{if 'cudaExternalSemaphoreSignalParams.params' in found_struct}} + params : anon_struct17 + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.flags' in found_struct}} flags : unsigned int Only when cudaExternalSemaphoreSignalParams is used to signal a cudaExternalSemaphore_t of type @@ -10136,291 +12936,365 @@ cdef class cudaExternalSemaphoreSignalParams: synchronization operations should be performed for any external memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For all other types of cudaExternalSemaphore_t, flags must be zero. + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._params = anon_struct15(_ptr=self._ptr) + pass + {{if 'cudaExternalSemaphoreSignalParams.params' in found_struct}} + self._params = anon_struct17(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreSignalParams.params' in found_struct}} try: str_list += ['params :\n' + '\n'.join([' ' + line for line in str(self.params).splitlines()])] except ValueError: str_list += ['params : '] + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreSignalParams.params' in found_struct}} @property def params(self): return self._params @params.setter - def params(self, params not None : anon_struct15): - string.memcpy(&self._ptr[0].params, params.getPtr(), sizeof(self._ptr[0].params)) + def params(self, params not None : anon_struct17): + string.memcpy(&self._pvt_ptr[0].params, params.getPtr(), sizeof(self._pvt_ptr[0].params)) + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'cudaExternalSemaphoreSignalParams.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreWaitParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitParams.params.fence' in found_struct}} -cdef class anon_struct16: +cdef class anon_struct18: """ Attributes ---------- + {{if 'cudaExternalSemaphoreWaitParams.params.fence.value' in found_struct}} value : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.fence + return &self._pvt_ptr[0].params.fence def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreWaitParams.params.fence.value' in found_struct}} try: str_list += ['value : ' + str(self.value)] except ValueError: str_list += ['value : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreWaitParams.params.fence.value' in found_struct}} @property def value(self): - return self._ptr[0].params.fence.value + return self._pvt_ptr[0].params.fence.value @value.setter def value(self, unsigned long long value): - self._ptr[0].params.fence.value = value + self._pvt_ptr[0].params.fence.value = value + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreWaitParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync' in found_struct}} -cdef class anon_union6: +cdef class anon_union7: """ Attributes ---------- + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync.fence' in found_struct}} fence : Any + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync.reserved' in found_struct}} reserved : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.nvSciSync + return &self._pvt_ptr[0].params.nvSciSync def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync.fence' in found_struct}} try: str_list += ['fence : ' + hex(self.fence)] except ValueError: str_list += ['fence : '] + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync.fence' in found_struct}} @property def fence(self): - return self._ptr[0].params.nvSciSync.fence + return self._pvt_ptr[0].params.nvSciSync.fence @fence.setter def fence(self, fence): - _cyfence = utils.HelperInputVoidPtr(fence) - self._ptr[0].params.nvSciSync.fence = _cyfence.cptr + _cfence = utils.HelperInputVoidPtr(fence) + self._pvt_ptr[0].params.nvSciSync.fence = _cfence.cptr + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].params.nvSciSync.reserved + return self._pvt_ptr[0].params.nvSciSync.reserved @reserved.setter def reserved(self, unsigned long long reserved): - self._ptr[0].params.nvSciSync.reserved = reserved + self._pvt_ptr[0].params.nvSciSync.reserved = reserved + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreWaitParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex' in found_struct}} -cdef class anon_struct17: +cdef class anon_struct19: """ Attributes ---------- + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex.key' in found_struct}} key : unsigned long long + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex.timeoutMs' in found_struct}} timeoutMs : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params.keyedMutex + return &self._pvt_ptr[0].params.keyedMutex def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex.key' in found_struct}} try: str_list += ['key : ' + str(self.key)] except ValueError: str_list += ['key : '] + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex.timeoutMs' in found_struct}} try: str_list += ['timeoutMs : ' + str(self.timeoutMs)] except ValueError: str_list += ['timeoutMs : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex.key' in found_struct}} @property def key(self): - return self._ptr[0].params.keyedMutex.key + return self._pvt_ptr[0].params.keyedMutex.key @key.setter def key(self, unsigned long long key): - self._ptr[0].params.keyedMutex.key = key + self._pvt_ptr[0].params.keyedMutex.key = key + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex.timeoutMs' in found_struct}} @property def timeoutMs(self): - return self._ptr[0].params.keyedMutex.timeoutMs + return self._pvt_ptr[0].params.keyedMutex.timeoutMs @timeoutMs.setter def timeoutMs(self, unsigned int timeoutMs): - self._ptr[0].params.keyedMutex.timeoutMs = timeoutMs + self._pvt_ptr[0].params.keyedMutex.timeoutMs = timeoutMs + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreWaitParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitParams.params' in found_struct}} -cdef class anon_struct18: +cdef class anon_struct20: """ Attributes ---------- - fence : anon_struct16 + {{if 'cudaExternalSemaphoreWaitParams.params.fence' in found_struct}} + fence : anon_struct18 - nvSciSync : anon_union6 + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync' in found_struct}} + nvSciSync : anon_union7 - keyedMutex : anon_struct17 + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex' in found_struct}} + keyedMutex : anon_struct19 + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._fence = anon_struct16(_ptr=self._ptr) - self._nvSciSync = anon_union6(_ptr=self._ptr) - self._keyedMutex = anon_struct17(_ptr=self._ptr) + pass + {{if 'cudaExternalSemaphoreWaitParams.params.fence' in found_struct}} + self._fence = anon_struct18(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync' in found_struct}} + self._nvSciSync = anon_union7(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex' in found_struct}} + self._keyedMutex = anon_struct19(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].params + return &self._pvt_ptr[0].params def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreWaitParams.params.fence' in found_struct}} try: str_list += ['fence :\n' + '\n'.join([' ' + line for line in str(self.fence).splitlines()])] except ValueError: str_list += ['fence : '] + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync' in found_struct}} try: str_list += ['nvSciSync :\n' + '\n'.join([' ' + line for line in str(self.nvSciSync).splitlines()])] except ValueError: str_list += ['nvSciSync : '] + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex' in found_struct}} try: str_list += ['keyedMutex :\n' + '\n'.join([' ' + line for line in str(self.keyedMutex).splitlines()])] except ValueError: str_list += ['keyedMutex : '] + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreWaitParams.params.fence' in found_struct}} @property def fence(self): return self._fence @fence.setter - def fence(self, fence not None : anon_struct16): - string.memcpy(&self._ptr[0].params.fence, fence.getPtr(), sizeof(self._ptr[0].params.fence)) + def fence(self, fence not None : anon_struct18): + string.memcpy(&self._pvt_ptr[0].params.fence, fence.getPtr(), sizeof(self._pvt_ptr[0].params.fence)) + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.nvSciSync' in found_struct}} @property def nvSciSync(self): return self._nvSciSync @nvSciSync.setter - def nvSciSync(self, nvSciSync not None : anon_union6): - string.memcpy(&self._ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._ptr[0].params.nvSciSync)) + def nvSciSync(self, nvSciSync not None : anon_union7): + string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.keyedMutex' in found_struct}} @property def keyedMutex(self): return self._keyedMutex @keyedMutex.setter - def keyedMutex(self, keyedMutex not None : anon_struct17): - string.memcpy(&self._ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._ptr[0].params.keyedMutex)) + def keyedMutex(self, keyedMutex not None : anon_struct19): + string.memcpy(&self._pvt_ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._pvt_ptr[0].params.keyedMutex)) + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.params.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].params.reserved + return self._pvt_ptr[0].params.reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].params.reserved = reserved + self._pvt_ptr[0].params.reserved = reserved + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreWaitParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitParams' in found_struct}} cdef class cudaExternalSemaphoreWaitParams: """ @@ -10428,8 +13302,11 @@ cdef class cudaExternalSemaphoreWaitParams: Attributes ---------- - params : anon_struct18 + {{if 'cudaExternalSemaphoreWaitParams.params' in found_struct}} + params : anon_struct20 + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.flags' in found_struct}} flags : unsigned int Only when cudaExternalSemaphoreSignalParams is used to signal a cudaExternalSemaphore_t of type @@ -10439,64 +13316,185 @@ cdef class cudaExternalSemaphoreWaitParams: synchronization operations should be performed for any external memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For all other types of cudaExternalSemaphore_t, flags must be zero. + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.reserved' in found_struct}} reserved : List[unsigned int] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._params = anon_struct18(_ptr=self._ptr) + pass + {{if 'cudaExternalSemaphoreWaitParams.params' in found_struct}} + self._params = anon_struct20(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreWaitParams.params' in found_struct}} try: str_list += ['params :\n' + '\n'.join([' ' + line for line in str(self.params).splitlines()])] except ValueError: str_list += ['params : '] + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreWaitParams.params' in found_struct}} @property def params(self): return self._params @params.setter - def params(self, params not None : anon_struct18): - string.memcpy(&self._ptr[0].params, params.getPtr(), sizeof(self._ptr[0].params)) + def params(self, params not None : anon_struct20): + string.memcpy(&self._pvt_ptr[0].params, params.getPtr(), sizeof(self._pvt_ptr[0].params)) + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned int flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'cudaExternalSemaphoreWaitParams.reserved' in found_struct}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} -{{if 'struct cudaKernelNodeParams' in found_types}} +{{if 'cudalibraryHostUniversalFunctionAndDataTable' in found_struct}} + +cdef class cudalibraryHostUniversalFunctionAndDataTable: + """ + Attributes + ---------- + {{if 'cudalibraryHostUniversalFunctionAndDataTable.functionTable' in found_struct}} + functionTable : Any + + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.functionWindowSize' in found_struct}} + functionWindowSize : size_t + + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.dataTable' in found_struct}} + dataTable : Any + + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.dataWindowSize' in found_struct}} + dataWindowSize : size_t + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'cudalibraryHostUniversalFunctionAndDataTable.functionTable' in found_struct}} + try: + str_list += ['functionTable : ' + hex(self.functionTable)] + except ValueError: + str_list += ['functionTable : '] + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.functionWindowSize' in found_struct}} + try: + str_list += ['functionWindowSize : ' + str(self.functionWindowSize)] + except ValueError: + str_list += ['functionWindowSize : '] + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.dataTable' in found_struct}} + try: + str_list += ['dataTable : ' + hex(self.dataTable)] + except ValueError: + str_list += ['dataTable : '] + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.dataWindowSize' in found_struct}} + try: + str_list += ['dataWindowSize : ' + str(self.dataWindowSize)] + except ValueError: + str_list += ['dataWindowSize : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'cudalibraryHostUniversalFunctionAndDataTable.functionTable' in found_struct}} + @property + def functionTable(self): + return self._pvt_ptr[0].functionTable + @functionTable.setter + def functionTable(self, functionTable): + _cfunctionTable = utils.HelperInputVoidPtr(functionTable) + self._pvt_ptr[0].functionTable = _cfunctionTable.cptr + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.functionWindowSize' in found_struct}} + @property + def functionWindowSize(self): + return self._pvt_ptr[0].functionWindowSize + @functionWindowSize.setter + def functionWindowSize(self, size_t functionWindowSize): + self._pvt_ptr[0].functionWindowSize = functionWindowSize + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.dataTable' in found_struct}} + @property + def dataTable(self): + return self._pvt_ptr[0].dataTable + @dataTable.setter + def dataTable(self, dataTable): + _cdataTable = utils.HelperInputVoidPtr(dataTable) + self._pvt_ptr[0].dataTable = _cdataTable.cptr + {{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable.dataWindowSize' in found_struct}} + @property + def dataWindowSize(self): + return self._pvt_ptr[0].dataWindowSize + @dataWindowSize.setter + def dataWindowSize(self, size_t dataWindowSize): + self._pvt_ptr[0].dataWindowSize = dataWindowSize + {{endif}} +{{endif}} +{{if 'cudaKernelNodeParams' in found_struct}} cdef class cudaKernelNodeParams: """ @@ -10504,107 +13502,147 @@ cdef class cudaKernelNodeParams: Attributes ---------- + {{if 'cudaKernelNodeParams.func' in found_struct}} func : Any Kernel to launch + {{endif}} + {{if 'cudaKernelNodeParams.gridDim' in found_struct}} gridDim : dim3 Grid dimensions + {{endif}} + {{if 'cudaKernelNodeParams.blockDim' in found_struct}} blockDim : dim3 Block dimensions + {{endif}} + {{if 'cudaKernelNodeParams.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'cudaKernelNodeParams.kernelParams' in found_struct}} kernelParams : Any Array of pointers to individual kernel arguments + {{endif}} + {{if 'cudaKernelNodeParams.extra' in found_struct}} extra : Any Pointer to kernel arguments in the "extra" format + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._gridDim = dim3(_ptr=&self._ptr[0].gridDim) - self._blockDim = dim3(_ptr=&self._ptr[0].blockDim) + pass + {{if 'cudaKernelNodeParams.gridDim' in found_struct}} + self._gridDim = dim3(_ptr=&self._pvt_ptr[0].gridDim) + {{endif}} + {{if 'cudaKernelNodeParams.blockDim' in found_struct}} + self._blockDim = dim3(_ptr=&self._pvt_ptr[0].blockDim) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaKernelNodeParams.func' in found_struct}} try: str_list += ['func : ' + hex(self.func)] except ValueError: str_list += ['func : '] + {{endif}} + {{if 'cudaKernelNodeParams.gridDim' in found_struct}} try: str_list += ['gridDim :\n' + '\n'.join([' ' + line for line in str(self.gridDim).splitlines()])] except ValueError: str_list += ['gridDim : '] + {{endif}} + {{if 'cudaKernelNodeParams.blockDim' in found_struct}} try: str_list += ['blockDim :\n' + '\n'.join([' ' + line for line in str(self.blockDim).splitlines()])] except ValueError: str_list += ['blockDim : '] + {{endif}} + {{if 'cudaKernelNodeParams.sharedMemBytes' in found_struct}} try: str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] except ValueError: str_list += ['sharedMemBytes : '] + {{endif}} + {{if 'cudaKernelNodeParams.kernelParams' in found_struct}} try: str_list += ['kernelParams : ' + str(self.kernelParams)] except ValueError: str_list += ['kernelParams : '] + {{endif}} + {{if 'cudaKernelNodeParams.extra' in found_struct}} try: str_list += ['extra : ' + str(self.extra)] except ValueError: str_list += ['extra : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaKernelNodeParams.func' in found_struct}} @property def func(self): - return self._ptr[0].func + return self._pvt_ptr[0].func @func.setter def func(self, func): - _cyfunc = utils.HelperInputVoidPtr(func) - self._ptr[0].func = _cyfunc.cptr + _cfunc = utils.HelperInputVoidPtr(func) + self._pvt_ptr[0].func = _cfunc.cptr + {{endif}} + {{if 'cudaKernelNodeParams.gridDim' in found_struct}} @property def gridDim(self): return self._gridDim @gridDim.setter def gridDim(self, gridDim not None : dim3): - string.memcpy(&self._ptr[0].gridDim, gridDim.getPtr(), sizeof(self._ptr[0].gridDim)) + string.memcpy(&self._pvt_ptr[0].gridDim, gridDim.getPtr(), sizeof(self._pvt_ptr[0].gridDim)) + {{endif}} + {{if 'cudaKernelNodeParams.blockDim' in found_struct}} @property def blockDim(self): return self._blockDim @blockDim.setter def blockDim(self, blockDim not None : dim3): - string.memcpy(&self._ptr[0].blockDim, blockDim.getPtr(), sizeof(self._ptr[0].blockDim)) + string.memcpy(&self._pvt_ptr[0].blockDim, blockDim.getPtr(), sizeof(self._pvt_ptr[0].blockDim)) + {{endif}} + {{if 'cudaKernelNodeParams.sharedMemBytes' in found_struct}} @property def sharedMemBytes(self): - return self._ptr[0].sharedMemBytes + return self._pvt_ptr[0].sharedMemBytes @sharedMemBytes.setter def sharedMemBytes(self, unsigned int sharedMemBytes): - self._ptr[0].sharedMemBytes = sharedMemBytes + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + {{endif}} + {{if 'cudaKernelNodeParams.kernelParams' in found_struct}} @property def kernelParams(self): - return self._ptr[0].kernelParams + return self._pvt_ptr[0].kernelParams @kernelParams.setter def kernelParams(self, kernelParams): self._cykernelParams = utils.HelperKernelParams(kernelParams) - self._ptr[0].kernelParams = self._cykernelParams.ckernelParams + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + {{endif}} + {{if 'cudaKernelNodeParams.extra' in found_struct}} @property def extra(self): - return self._ptr[0].extra + return self._pvt_ptr[0].extra @extra.setter def extra(self, void_ptr extra): - self._ptr[0].extra = extra + self._pvt_ptr[0].extra = extra + {{endif}} {{endif}} -{{if 'struct cudaKernelNodeParamsV2' in found_types}} +{{if 'cudaKernelNodeParamsV2' in found_struct}} cdef class cudaKernelNodeParamsV2: """ @@ -10612,107 +13650,147 @@ cdef class cudaKernelNodeParamsV2: Attributes ---------- + {{if 'cudaKernelNodeParamsV2.func' in found_struct}} func : Any Kernel to launch + {{endif}} + {{if 'cudaKernelNodeParamsV2.gridDim' in found_struct}} gridDim : dim3 Grid dimensions + {{endif}} + {{if 'cudaKernelNodeParamsV2.blockDim' in found_struct}} blockDim : dim3 Block dimensions + {{endif}} + {{if 'cudaKernelNodeParamsV2.sharedMemBytes' in found_struct}} sharedMemBytes : unsigned int Dynamic shared-memory size per thread block in bytes + {{endif}} + {{if 'cudaKernelNodeParamsV2.kernelParams' in found_struct}} kernelParams : Any Array of pointers to individual kernel arguments + {{endif}} + {{if 'cudaKernelNodeParamsV2.extra' in found_struct}} extra : Any Pointer to kernel arguments in the "extra" format + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._gridDim = dim3(_ptr=&self._ptr[0].gridDim) - self._blockDim = dim3(_ptr=&self._ptr[0].blockDim) + pass + {{if 'cudaKernelNodeParamsV2.gridDim' in found_struct}} + self._gridDim = dim3(_ptr=&self._pvt_ptr[0].gridDim) + {{endif}} + {{if 'cudaKernelNodeParamsV2.blockDim' in found_struct}} + self._blockDim = dim3(_ptr=&self._pvt_ptr[0].blockDim) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaKernelNodeParamsV2.func' in found_struct}} try: str_list += ['func : ' + hex(self.func)] except ValueError: str_list += ['func : '] + {{endif}} + {{if 'cudaKernelNodeParamsV2.gridDim' in found_struct}} try: str_list += ['gridDim :\n' + '\n'.join([' ' + line for line in str(self.gridDim).splitlines()])] except ValueError: str_list += ['gridDim : '] + {{endif}} + {{if 'cudaKernelNodeParamsV2.blockDim' in found_struct}} try: str_list += ['blockDim :\n' + '\n'.join([' ' + line for line in str(self.blockDim).splitlines()])] except ValueError: str_list += ['blockDim : '] + {{endif}} + {{if 'cudaKernelNodeParamsV2.sharedMemBytes' in found_struct}} try: str_list += ['sharedMemBytes : ' + str(self.sharedMemBytes)] except ValueError: str_list += ['sharedMemBytes : '] + {{endif}} + {{if 'cudaKernelNodeParamsV2.kernelParams' in found_struct}} try: str_list += ['kernelParams : ' + str(self.kernelParams)] except ValueError: str_list += ['kernelParams : '] + {{endif}} + {{if 'cudaKernelNodeParamsV2.extra' in found_struct}} try: str_list += ['extra : ' + str(self.extra)] except ValueError: str_list += ['extra : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaKernelNodeParamsV2.func' in found_struct}} @property def func(self): - return self._ptr[0].func + return self._pvt_ptr[0].func @func.setter def func(self, func): - _cyfunc = utils.HelperInputVoidPtr(func) - self._ptr[0].func = _cyfunc.cptr + _cfunc = utils.HelperInputVoidPtr(func) + self._pvt_ptr[0].func = _cfunc.cptr + {{endif}} + {{if 'cudaKernelNodeParamsV2.gridDim' in found_struct}} @property def gridDim(self): return self._gridDim @gridDim.setter def gridDim(self, gridDim not None : dim3): - string.memcpy(&self._ptr[0].gridDim, gridDim.getPtr(), sizeof(self._ptr[0].gridDim)) + string.memcpy(&self._pvt_ptr[0].gridDim, gridDim.getPtr(), sizeof(self._pvt_ptr[0].gridDim)) + {{endif}} + {{if 'cudaKernelNodeParamsV2.blockDim' in found_struct}} @property def blockDim(self): return self._blockDim @blockDim.setter def blockDim(self, blockDim not None : dim3): - string.memcpy(&self._ptr[0].blockDim, blockDim.getPtr(), sizeof(self._ptr[0].blockDim)) + string.memcpy(&self._pvt_ptr[0].blockDim, blockDim.getPtr(), sizeof(self._pvt_ptr[0].blockDim)) + {{endif}} + {{if 'cudaKernelNodeParamsV2.sharedMemBytes' in found_struct}} @property def sharedMemBytes(self): - return self._ptr[0].sharedMemBytes + return self._pvt_ptr[0].sharedMemBytes @sharedMemBytes.setter def sharedMemBytes(self, unsigned int sharedMemBytes): - self._ptr[0].sharedMemBytes = sharedMemBytes + self._pvt_ptr[0].sharedMemBytes = sharedMemBytes + {{endif}} + {{if 'cudaKernelNodeParamsV2.kernelParams' in found_struct}} @property def kernelParams(self): - return self._ptr[0].kernelParams + return self._pvt_ptr[0].kernelParams @kernelParams.setter def kernelParams(self, kernelParams): self._cykernelParams = utils.HelperKernelParams(kernelParams) - self._ptr[0].kernelParams = self._cykernelParams.ckernelParams + self._pvt_ptr[0].kernelParams = self._cykernelParams.ckernelParams + {{endif}} + {{if 'cudaKernelNodeParamsV2.extra' in found_struct}} @property def extra(self): - return self._ptr[0].extra + return self._pvt_ptr[0].extra @extra.setter def extra(self, void_ptr extra): - self._ptr[0].extra = extra + self._pvt_ptr[0].extra = extra + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreSignalNodeParams' in found_types}} +{{if 'cudaExternalSemaphoreSignalNodeParams' in found_struct}} cdef class cudaExternalSemaphoreSignalNodeParams: """ @@ -10720,62 +13798,79 @@ cdef class cudaExternalSemaphoreSignalNodeParams: Attributes ---------- + {{if 'cudaExternalSemaphoreSignalNodeParams.extSemArray' in found_struct}} extSemArray : cudaExternalSemaphore_t Array of external semaphore handles. + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParams.paramsArray' in found_struct}} paramsArray : cudaExternalSemaphoreSignalParams Array of external semaphore signal parameters. + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParams.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): + pass + {{if 'cudaExternalSemaphoreSignalNodeParams.extSemArray' in found_struct}} if self._extSemArray is not NULL: free(self._extSemArray) + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParams.paramsArray' in found_struct}} if self._paramsArray is not NULL: free(self._paramsArray) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreSignalNodeParams.extSemArray' in found_struct}} try: str_list += ['extSemArray : ' + str(self.extSemArray)] except ValueError: str_list += ['extSemArray : '] + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParams.paramsArray' in found_struct}} try: str_list += ['paramsArray : ' + str(self.paramsArray)] except ValueError: str_list += ['paramsArray : '] + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParams.numExtSems' in found_struct}} try: str_list += ['numExtSems : ' + str(self.numExtSems)] except ValueError: str_list += ['numExtSems : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreSignalNodeParams.extSemArray' in found_struct}} @property def extSemArray(self): - arrs = [self._ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] return [cudaExternalSemaphore_t(_ptr=arr) for arr in arrs] @extSemArray.setter def extSemArray(self, val): if len(val) == 0: free(self._extSemArray) self._extSemArray_length = 0 - self._ptr[0].extSemArray = NULL + self._pvt_ptr[0].extSemArray = NULL else: if self._extSemArray_length != len(val): free(self._extSemArray) @@ -10783,20 +13878,22 @@ cdef class cudaExternalSemaphoreSignalNodeParams: if self._extSemArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) self._extSemArray_length = len(val) - self._ptr[0].extSemArray = self._extSemArray + self._pvt_ptr[0].extSemArray = self._extSemArray for idx in range(len(val)): - self._extSemArray[idx] = (val[idx])._ptr[0] + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParams.paramsArray' in found_struct}} @property def paramsArray(self): - arrs = [self._ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreSignalParams) for x in range(self._paramsArray_length)] + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreSignalParams) for x in range(self._paramsArray_length)] return [cudaExternalSemaphoreSignalParams(_ptr=arr) for arr in arrs] @paramsArray.setter def paramsArray(self, val): if len(val) == 0: free(self._paramsArray) self._paramsArray_length = 0 - self._ptr[0].paramsArray = NULL + self._pvt_ptr[0].paramsArray = NULL else: if self._paramsArray_length != len(val): free(self._paramsArray) @@ -10804,18 +13901,21 @@ cdef class cudaExternalSemaphoreSignalNodeParams: if self._paramsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreSignalParams))) self._paramsArray_length = len(val) - self._ptr[0].paramsArray = self._paramsArray + self._pvt_ptr[0].paramsArray = self._paramsArray for idx in range(len(val)): - string.memcpy(&self._paramsArray[idx], (val[idx])._ptr, sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParams.numExtSems' in found_struct}} @property def numExtSems(self): - return self._ptr[0].numExtSems + return self._pvt_ptr[0].numExtSems @numExtSems.setter def numExtSems(self, unsigned int numExtSems): - self._ptr[0].numExtSems = numExtSems + self._pvt_ptr[0].numExtSems = numExtSems + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreSignalNodeParamsV2' in found_types}} +{{if 'cudaExternalSemaphoreSignalNodeParamsV2' in found_struct}} cdef class cudaExternalSemaphoreSignalNodeParamsV2: """ @@ -10823,62 +13923,79 @@ cdef class cudaExternalSemaphoreSignalNodeParamsV2: Attributes ---------- + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.extSemArray' in found_struct}} extSemArray : cudaExternalSemaphore_t Array of external semaphore handles. + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.paramsArray' in found_struct}} paramsArray : cudaExternalSemaphoreSignalParams Array of external semaphore signal parameters. + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): + pass + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.extSemArray' in found_struct}} if self._extSemArray is not NULL: free(self._extSemArray) + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.paramsArray' in found_struct}} if self._paramsArray is not NULL: free(self._paramsArray) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.extSemArray' in found_struct}} try: str_list += ['extSemArray : ' + str(self.extSemArray)] except ValueError: str_list += ['extSemArray : '] + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.paramsArray' in found_struct}} try: str_list += ['paramsArray : ' + str(self.paramsArray)] except ValueError: str_list += ['paramsArray : '] + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.numExtSems' in found_struct}} try: str_list += ['numExtSems : ' + str(self.numExtSems)] except ValueError: str_list += ['numExtSems : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.extSemArray' in found_struct}} @property def extSemArray(self): - arrs = [self._ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] return [cudaExternalSemaphore_t(_ptr=arr) for arr in arrs] @extSemArray.setter def extSemArray(self, val): if len(val) == 0: free(self._extSemArray) self._extSemArray_length = 0 - self._ptr[0].extSemArray = NULL + self._pvt_ptr[0].extSemArray = NULL else: if self._extSemArray_length != len(val): free(self._extSemArray) @@ -10886,20 +14003,22 @@ cdef class cudaExternalSemaphoreSignalNodeParamsV2: if self._extSemArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) self._extSemArray_length = len(val) - self._ptr[0].extSemArray = self._extSemArray + self._pvt_ptr[0].extSemArray = self._extSemArray for idx in range(len(val)): - self._extSemArray[idx] = (val[idx])._ptr[0] + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.paramsArray' in found_struct}} @property def paramsArray(self): - arrs = [self._ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreSignalParams) for x in range(self._paramsArray_length)] + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreSignalParams) for x in range(self._paramsArray_length)] return [cudaExternalSemaphoreSignalParams(_ptr=arr) for arr in arrs] @paramsArray.setter def paramsArray(self, val): if len(val) == 0: free(self._paramsArray) self._paramsArray_length = 0 - self._ptr[0].paramsArray = NULL + self._pvt_ptr[0].paramsArray = NULL else: if self._paramsArray_length != len(val): free(self._paramsArray) @@ -10907,18 +14026,21 @@ cdef class cudaExternalSemaphoreSignalNodeParamsV2: if self._paramsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreSignalParams))) self._paramsArray_length = len(val) - self._ptr[0].paramsArray = self._paramsArray + self._pvt_ptr[0].paramsArray = self._paramsArray for idx in range(len(val)): - string.memcpy(&self._paramsArray[idx], (val[idx])._ptr, sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) + {{endif}} + {{if 'cudaExternalSemaphoreSignalNodeParamsV2.numExtSems' in found_struct}} @property def numExtSems(self): - return self._ptr[0].numExtSems + return self._pvt_ptr[0].numExtSems @numExtSems.setter def numExtSems(self, unsigned int numExtSems): - self._ptr[0].numExtSems = numExtSems + self._pvt_ptr[0].numExtSems = numExtSems + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreWaitNodeParams' in found_types}} +{{if 'cudaExternalSemaphoreWaitNodeParams' in found_struct}} cdef class cudaExternalSemaphoreWaitNodeParams: """ @@ -10926,62 +14048,79 @@ cdef class cudaExternalSemaphoreWaitNodeParams: Attributes ---------- + {{if 'cudaExternalSemaphoreWaitNodeParams.extSemArray' in found_struct}} extSemArray : cudaExternalSemaphore_t Array of external semaphore handles. + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParams.paramsArray' in found_struct}} paramsArray : cudaExternalSemaphoreWaitParams Array of external semaphore wait parameters. + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParams.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): + pass + {{if 'cudaExternalSemaphoreWaitNodeParams.extSemArray' in found_struct}} if self._extSemArray is not NULL: free(self._extSemArray) + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParams.paramsArray' in found_struct}} if self._paramsArray is not NULL: free(self._paramsArray) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreWaitNodeParams.extSemArray' in found_struct}} try: str_list += ['extSemArray : ' + str(self.extSemArray)] except ValueError: str_list += ['extSemArray : '] + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParams.paramsArray' in found_struct}} try: str_list += ['paramsArray : ' + str(self.paramsArray)] except ValueError: str_list += ['paramsArray : '] + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParams.numExtSems' in found_struct}} try: str_list += ['numExtSems : ' + str(self.numExtSems)] except ValueError: str_list += ['numExtSems : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreWaitNodeParams.extSemArray' in found_struct}} @property def extSemArray(self): - arrs = [self._ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] return [cudaExternalSemaphore_t(_ptr=arr) for arr in arrs] @extSemArray.setter def extSemArray(self, val): if len(val) == 0: free(self._extSemArray) self._extSemArray_length = 0 - self._ptr[0].extSemArray = NULL + self._pvt_ptr[0].extSemArray = NULL else: if self._extSemArray_length != len(val): free(self._extSemArray) @@ -10989,20 +14128,22 @@ cdef class cudaExternalSemaphoreWaitNodeParams: if self._extSemArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) self._extSemArray_length = len(val) - self._ptr[0].extSemArray = self._extSemArray + self._pvt_ptr[0].extSemArray = self._extSemArray for idx in range(len(val)): - self._extSemArray[idx] = (val[idx])._ptr[0] + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParams.paramsArray' in found_struct}} @property def paramsArray(self): - arrs = [self._ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreWaitParams) for x in range(self._paramsArray_length)] + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreWaitParams) for x in range(self._paramsArray_length)] return [cudaExternalSemaphoreWaitParams(_ptr=arr) for arr in arrs] @paramsArray.setter def paramsArray(self, val): if len(val) == 0: free(self._paramsArray) self._paramsArray_length = 0 - self._ptr[0].paramsArray = NULL + self._pvt_ptr[0].paramsArray = NULL else: if self._paramsArray_length != len(val): free(self._paramsArray) @@ -11010,18 +14151,21 @@ cdef class cudaExternalSemaphoreWaitNodeParams: if self._paramsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreWaitParams))) self._paramsArray_length = len(val) - self._ptr[0].paramsArray = self._paramsArray + self._pvt_ptr[0].paramsArray = self._paramsArray for idx in range(len(val)): - string.memcpy(&self._paramsArray[idx], (val[idx])._ptr, sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParams.numExtSems' in found_struct}} @property def numExtSems(self): - return self._ptr[0].numExtSems + return self._pvt_ptr[0].numExtSems @numExtSems.setter def numExtSems(self, unsigned int numExtSems): - self._ptr[0].numExtSems = numExtSems + self._pvt_ptr[0].numExtSems = numExtSems + {{endif}} {{endif}} -{{if 'struct cudaExternalSemaphoreWaitNodeParamsV2' in found_types}} +{{if 'cudaExternalSemaphoreWaitNodeParamsV2' in found_struct}} cdef class cudaExternalSemaphoreWaitNodeParamsV2: """ @@ -11029,62 +14173,79 @@ cdef class cudaExternalSemaphoreWaitNodeParamsV2: Attributes ---------- + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.extSemArray' in found_struct}} extSemArray : cudaExternalSemaphore_t Array of external semaphore handles. + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.paramsArray' in found_struct}} paramsArray : cudaExternalSemaphoreWaitParams Array of external semaphore wait parameters. + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.numExtSems' in found_struct}} numExtSems : unsigned int Number of handles and parameters supplied in extSemArray and paramsArray. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): + pass + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.extSemArray' in found_struct}} if self._extSemArray is not NULL: free(self._extSemArray) + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.paramsArray' in found_struct}} if self._paramsArray is not NULL: free(self._paramsArray) + {{endif}} def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.extSemArray' in found_struct}} try: str_list += ['extSemArray : ' + str(self.extSemArray)] except ValueError: str_list += ['extSemArray : '] + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.paramsArray' in found_struct}} try: str_list += ['paramsArray : ' + str(self.paramsArray)] except ValueError: str_list += ['paramsArray : '] + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.numExtSems' in found_struct}} try: str_list += ['numExtSems : ' + str(self.numExtSems)] except ValueError: str_list += ['numExtSems : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.extSemArray' in found_struct}} @property def extSemArray(self): - arrs = [self._ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] + arrs = [self._pvt_ptr[0].extSemArray + x*sizeof(cyruntime.cudaExternalSemaphore_t) for x in range(self._extSemArray_length)] return [cudaExternalSemaphore_t(_ptr=arr) for arr in arrs] @extSemArray.setter def extSemArray(self, val): if len(val) == 0: free(self._extSemArray) self._extSemArray_length = 0 - self._ptr[0].extSemArray = NULL + self._pvt_ptr[0].extSemArray = NULL else: if self._extSemArray_length != len(val): free(self._extSemArray) @@ -11092,20 +14253,22 @@ cdef class cudaExternalSemaphoreWaitNodeParamsV2: if self._extSemArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) self._extSemArray_length = len(val) - self._ptr[0].extSemArray = self._extSemArray + self._pvt_ptr[0].extSemArray = self._extSemArray for idx in range(len(val)): - self._extSemArray[idx] = (val[idx])._ptr[0] + self._extSemArray[idx] = (val[idx])._pvt_ptr[0] + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.paramsArray' in found_struct}} @property def paramsArray(self): - arrs = [self._ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreWaitParams) for x in range(self._paramsArray_length)] + arrs = [self._pvt_ptr[0].paramsArray + x*sizeof(cyruntime.cudaExternalSemaphoreWaitParams) for x in range(self._paramsArray_length)] return [cudaExternalSemaphoreWaitParams(_ptr=arr) for arr in arrs] @paramsArray.setter def paramsArray(self, val): if len(val) == 0: free(self._paramsArray) self._paramsArray_length = 0 - self._ptr[0].paramsArray = NULL + self._pvt_ptr[0].paramsArray = NULL else: if self._paramsArray_length != len(val): free(self._paramsArray) @@ -11113,18 +14276,21 @@ cdef class cudaExternalSemaphoreWaitNodeParamsV2: if self._paramsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreWaitParams))) self._paramsArray_length = len(val) - self._ptr[0].paramsArray = self._paramsArray + self._pvt_ptr[0].paramsArray = self._paramsArray for idx in range(len(val)): - string.memcpy(&self._paramsArray[idx], (val[idx])._ptr, sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) + string.memcpy(&self._paramsArray[idx], (val[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) + {{endif}} + {{if 'cudaExternalSemaphoreWaitNodeParamsV2.numExtSems' in found_struct}} @property def numExtSems(self): - return self._ptr[0].numExtSems + return self._pvt_ptr[0].numExtSems @numExtSems.setter def numExtSems(self, unsigned int numExtSems): - self._ptr[0].numExtSems = numExtSems + self._pvt_ptr[0].numExtSems = numExtSems + {{endif}} {{endif}} -{{if 'struct cudaConditionalNodeParams' in found_types}} +{{if 'cudaConditionalNodeParams' in found_struct}} cdef class cudaConditionalNodeParams: """ @@ -11132,13 +14298,22 @@ cdef class cudaConditionalNodeParams: Attributes ---------- + {{if 'cudaConditionalNodeParams.handle' in found_struct}} handle : cudaGraphConditionalHandle Conditional node handle. Handles must be created in advance of creating the node using cudaGraphConditionalHandleCreate. + {{endif}} + {{if 'cudaConditionalNodeParams.type' in found_struct}} type : cudaGraphConditionalNodeType Type of conditional node. + {{endif}} + {{if 'cudaConditionalNodeParams.size' in found_struct}} size : unsigned int - Size of graph output array. Must be 1. + Size of graph output array. Allowed values are 1 for + cudaGraphCondTypeWhile, 1 or 2 for cudaGraphCondTypeWhile, or any + value greater than zero for cudaGraphCondTypeSwitch. + {{endif}} + {{if 'cudaConditionalNodeParams.phGraph_out' in found_struct}} phGraph_out : cudaGraph_t CUDA-owned array populated with conditional node child graphs during creation of the node. Valid for the lifetime of the @@ -11149,47 +14324,65 @@ cdef class cudaConditionalNodeParams: - All kernels, including kernels in nested conditionals or child graphs at any level, must belong to the same CUDA context. These graphs may be populated using graph node creation APIs or - cudaStreamBeginCaptureToGraph. + cudaStreamBeginCaptureToGraph. cudaGraphCondTypeIf: phGraph_out[0] + is executed when the condition is non-zero. If `size` == 2, + phGraph_out[1] will be executed when the condition is zero. + cudaGraphCondTypeWhile: phGraph_out[0] is executed as long as the + condition is non-zero. cudaGraphCondTypeSwitch: phGraph_out[n] is + executed when the condition is equal to n. If the condition >= + `size`, no body graph is executed. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._handle = cudaGraphConditionalHandle(_ptr=&self._ptr[0].handle) + pass + {{if 'cudaConditionalNodeParams.handle' in found_struct}} + self._handle = cudaGraphConditionalHandle(_ptr=&self._pvt_ptr[0].handle) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaConditionalNodeParams.handle' in found_struct}} try: str_list += ['handle : ' + str(self.handle)] except ValueError: str_list += ['handle : '] + {{endif}} + {{if 'cudaConditionalNodeParams.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'cudaConditionalNodeParams.size' in found_struct}} try: str_list += ['size : ' + str(self.size)] except ValueError: str_list += ['size : '] + {{endif}} + {{if 'cudaConditionalNodeParams.phGraph_out' in found_struct}} try: str_list += ['phGraph_out : ' + str(self.phGraph_out)] except ValueError: str_list += ['phGraph_out : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaConditionalNodeParams.handle' in found_struct}} @property def handle(self): return self._handle @@ -11204,26 +14397,33 @@ cdef class cudaConditionalNodeParams: else: phandle = int(cudaGraphConditionalHandle(handle)) cyhandle = phandle - self._handle._ptr[0] = cyhandle + self._handle._pvt_ptr[0] = cyhandle + {{endif}} + {{if 'cudaConditionalNodeParams.type' in found_struct}} @property def type(self): - return cudaGraphConditionalNodeType(self._ptr[0].type) + return cudaGraphConditionalNodeType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaGraphConditionalNodeType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'cudaConditionalNodeParams.size' in found_struct}} @property def size(self): - return self._ptr[0].size + return self._pvt_ptr[0].size @size.setter def size(self, unsigned int size): - self._ptr[0].size = size + self._pvt_ptr[0].size = size + {{endif}} + {{if 'cudaConditionalNodeParams.phGraph_out' in found_struct}} @property def phGraph_out(self): - arrs = [self._ptr[0].phGraph_out + x*sizeof(cyruntime.cudaGraph_t) for x in range(self.size)] + arrs = [self._pvt_ptr[0].phGraph_out + x*sizeof(cyruntime.cudaGraph_t) for x in range(self.size)] return [cudaGraph_t(_ptr=arr) for arr in arrs] + {{endif}} {{endif}} -{{if 'struct cudaChildGraphNodeParams' in found_types}} +{{if 'cudaChildGraphNodeParams' in found_struct}} cdef class cudaChildGraphNodeParams: """ @@ -11231,37 +14431,44 @@ cdef class cudaChildGraphNodeParams: Attributes ---------- + {{if 'cudaChildGraphNodeParams.graph' in found_struct}} graph : cudaGraph_t The child graph to clone into the node for node creation, or a handle to the graph owned by the node for node query + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._graph = cudaGraph_t(_ptr=&self._ptr[0].graph) + pass + {{if 'cudaChildGraphNodeParams.graph' in found_struct}} + self._graph = cudaGraph_t(_ptr=&self._pvt_ptr[0].graph) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaChildGraphNodeParams.graph' in found_struct}} try: str_list += ['graph : ' + str(self.graph)] except ValueError: str_list += ['graph : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaChildGraphNodeParams.graph' in found_struct}} @property def graph(self): return self._graph @@ -11276,9 +14483,10 @@ cdef class cudaChildGraphNodeParams: else: pgraph = int(cudaGraph_t(graph)) cygraph = pgraph - self._graph._ptr[0] = cygraph + self._graph._pvt_ptr[0] = cygraph + {{endif}} {{endif}} -{{if 'struct cudaEventRecordNodeParams' in found_types}} +{{if 'cudaEventRecordNodeParams' in found_struct}} cdef class cudaEventRecordNodeParams: """ @@ -11286,36 +14494,43 @@ cdef class cudaEventRecordNodeParams: Attributes ---------- + {{if 'cudaEventRecordNodeParams.event' in found_struct}} event : cudaEvent_t The event to record when the node executes + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._event = cudaEvent_t(_ptr=&self._ptr[0].event) + pass + {{if 'cudaEventRecordNodeParams.event' in found_struct}} + self._event = cudaEvent_t(_ptr=&self._pvt_ptr[0].event) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaEventRecordNodeParams.event' in found_struct}} try: str_list += ['event : ' + str(self.event)] except ValueError: str_list += ['event : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaEventRecordNodeParams.event' in found_struct}} @property def event(self): return self._event @@ -11330,9 +14545,10 @@ cdef class cudaEventRecordNodeParams: else: pevent = int(cudaEvent_t(event)) cyevent = pevent - self._event._ptr[0] = cyevent + self._event._pvt_ptr[0] = cyevent + {{endif}} {{endif}} -{{if 'struct cudaEventWaitNodeParams' in found_types}} +{{if 'cudaEventWaitNodeParams' in found_struct}} cdef class cudaEventWaitNodeParams: """ @@ -11340,36 +14556,43 @@ cdef class cudaEventWaitNodeParams: Attributes ---------- + {{if 'cudaEventWaitNodeParams.event' in found_struct}} event : cudaEvent_t The event to wait on from the node + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._event = cudaEvent_t(_ptr=&self._ptr[0].event) + pass + {{if 'cudaEventWaitNodeParams.event' in found_struct}} + self._event = cudaEvent_t(_ptr=&self._pvt_ptr[0].event) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaEventWaitNodeParams.event' in found_struct}} try: str_list += ['event : ' + str(self.event)] except ValueError: str_list += ['event : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaEventWaitNodeParams.event' in found_struct}} @property def event(self): return self._event @@ -11384,9 +14607,10 @@ cdef class cudaEventWaitNodeParams: else: pevent = int(cudaEvent_t(event)) cyevent = pevent - self._event._ptr[0] = cyevent + self._event._pvt_ptr[0] = cyevent + {{endif}} {{endif}} -{{if 'struct cudaGraphNodeParams' in found_types}} +{{if 'cudaGraphNodeParams' in found_struct}} cdef class cudaGraphNodeParams: """ @@ -11394,237 +14618,357 @@ cdef class cudaGraphNodeParams: Attributes ---------- + {{if 'cudaGraphNodeParams.type' in found_struct}} type : cudaGraphNodeType Type of the node + {{endif}} + {{if 'cudaGraphNodeParams.reserved0' in found_struct}} reserved0 : List[int] Reserved. Must be zero. + {{endif}} + {{if 'cudaGraphNodeParams.reserved1' in found_struct}} reserved1 : List[long long] Padding. Unused bytes must be zero. + {{endif}} + {{if 'cudaGraphNodeParams.kernel' in found_struct}} kernel : cudaKernelNodeParamsV2 Kernel node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.memcpy' in found_struct}} memcpy : cudaMemcpyNodeParams Memcpy node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.memset' in found_struct}} memset : cudaMemsetParamsV2 Memset node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.host' in found_struct}} host : cudaHostNodeParamsV2 Host node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.graph' in found_struct}} graph : cudaChildGraphNodeParams Child graph node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.eventWait' in found_struct}} eventWait : cudaEventWaitNodeParams Event wait node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.eventRecord' in found_struct}} eventRecord : cudaEventRecordNodeParams Event record node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.extSemSignal' in found_struct}} extSemSignal : cudaExternalSemaphoreSignalNodeParamsV2 External semaphore signal node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.extSemWait' in found_struct}} extSemWait : cudaExternalSemaphoreWaitNodeParamsV2 External semaphore wait node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.alloc' in found_struct}} alloc : cudaMemAllocNodeParamsV2 Memory allocation node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.free' in found_struct}} free : cudaMemFreeNodeParams Memory free node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.conditional' in found_struct}} conditional : cudaConditionalNodeParams Conditional node parameters. + {{endif}} + {{if 'cudaGraphNodeParams.reserved2' in found_struct}} reserved2 : long long Reserved bytes. Must be zero. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cyruntime.cudaGraphNodeParams)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._kernel = cudaKernelNodeParamsV2(_ptr=&self._ptr[0].kernel) - self._memcpy = cudaMemcpyNodeParams(_ptr=&self._ptr[0].memcpy) - self._memset = cudaMemsetParamsV2(_ptr=&self._ptr[0].memset) - self._host = cudaHostNodeParamsV2(_ptr=&self._ptr[0].host) - self._graph = cudaChildGraphNodeParams(_ptr=&self._ptr[0].graph) - self._eventWait = cudaEventWaitNodeParams(_ptr=&self._ptr[0].eventWait) - self._eventRecord = cudaEventRecordNodeParams(_ptr=&self._ptr[0].eventRecord) - self._extSemSignal = cudaExternalSemaphoreSignalNodeParamsV2(_ptr=&self._ptr[0].extSemSignal) - self._extSemWait = cudaExternalSemaphoreWaitNodeParamsV2(_ptr=&self._ptr[0].extSemWait) - self._alloc = cudaMemAllocNodeParamsV2(_ptr=&self._ptr[0].alloc) - self._free = cudaMemFreeNodeParams(_ptr=&self._ptr[0].free) - self._conditional = cudaConditionalNodeParams(_ptr=&self._ptr[0].conditional) + pass + {{if 'cudaGraphNodeParams.kernel' in found_struct}} + self._kernel = cudaKernelNodeParamsV2(_ptr=&self._pvt_ptr[0].kernel) + {{endif}} + {{if 'cudaGraphNodeParams.memcpy' in found_struct}} + self._memcpy = cudaMemcpyNodeParams(_ptr=&self._pvt_ptr[0].memcpy) + {{endif}} + {{if 'cudaGraphNodeParams.memset' in found_struct}} + self._memset = cudaMemsetParamsV2(_ptr=&self._pvt_ptr[0].memset) + {{endif}} + {{if 'cudaGraphNodeParams.host' in found_struct}} + self._host = cudaHostNodeParamsV2(_ptr=&self._pvt_ptr[0].host) + {{endif}} + {{if 'cudaGraphNodeParams.graph' in found_struct}} + self._graph = cudaChildGraphNodeParams(_ptr=&self._pvt_ptr[0].graph) + {{endif}} + {{if 'cudaGraphNodeParams.eventWait' in found_struct}} + self._eventWait = cudaEventWaitNodeParams(_ptr=&self._pvt_ptr[0].eventWait) + {{endif}} + {{if 'cudaGraphNodeParams.eventRecord' in found_struct}} + self._eventRecord = cudaEventRecordNodeParams(_ptr=&self._pvt_ptr[0].eventRecord) + {{endif}} + {{if 'cudaGraphNodeParams.extSemSignal' in found_struct}} + self._extSemSignal = cudaExternalSemaphoreSignalNodeParamsV2(_ptr=&self._pvt_ptr[0].extSemSignal) + {{endif}} + {{if 'cudaGraphNodeParams.extSemWait' in found_struct}} + self._extSemWait = cudaExternalSemaphoreWaitNodeParamsV2(_ptr=&self._pvt_ptr[0].extSemWait) + {{endif}} + {{if 'cudaGraphNodeParams.alloc' in found_struct}} + self._alloc = cudaMemAllocNodeParamsV2(_ptr=&self._pvt_ptr[0].alloc) + {{endif}} + {{if 'cudaGraphNodeParams.free' in found_struct}} + self._free = cudaMemFreeNodeParams(_ptr=&self._pvt_ptr[0].free) + {{endif}} + {{if 'cudaGraphNodeParams.conditional' in found_struct}} + self._conditional = cudaConditionalNodeParams(_ptr=&self._pvt_ptr[0].conditional) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaGraphNodeParams.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'cudaGraphNodeParams.reserved0' in found_struct}} try: str_list += ['reserved0 : ' + str(self.reserved0)] except ValueError: str_list += ['reserved0 : '] + {{endif}} + {{if 'cudaGraphNodeParams.reserved1' in found_struct}} try: str_list += ['reserved1 : ' + str(self.reserved1)] except ValueError: str_list += ['reserved1 : '] + {{endif}} + {{if 'cudaGraphNodeParams.kernel' in found_struct}} try: str_list += ['kernel :\n' + '\n'.join([' ' + line for line in str(self.kernel).splitlines()])] except ValueError: str_list += ['kernel : '] + {{endif}} + {{if 'cudaGraphNodeParams.memcpy' in found_struct}} try: str_list += ['memcpy :\n' + '\n'.join([' ' + line for line in str(self.memcpy).splitlines()])] except ValueError: str_list += ['memcpy : '] + {{endif}} + {{if 'cudaGraphNodeParams.memset' in found_struct}} try: str_list += ['memset :\n' + '\n'.join([' ' + line for line in str(self.memset).splitlines()])] except ValueError: str_list += ['memset : '] + {{endif}} + {{if 'cudaGraphNodeParams.host' in found_struct}} try: str_list += ['host :\n' + '\n'.join([' ' + line for line in str(self.host).splitlines()])] except ValueError: str_list += ['host : '] + {{endif}} + {{if 'cudaGraphNodeParams.graph' in found_struct}} try: str_list += ['graph :\n' + '\n'.join([' ' + line for line in str(self.graph).splitlines()])] except ValueError: str_list += ['graph : '] + {{endif}} + {{if 'cudaGraphNodeParams.eventWait' in found_struct}} try: str_list += ['eventWait :\n' + '\n'.join([' ' + line for line in str(self.eventWait).splitlines()])] except ValueError: str_list += ['eventWait : '] + {{endif}} + {{if 'cudaGraphNodeParams.eventRecord' in found_struct}} try: str_list += ['eventRecord :\n' + '\n'.join([' ' + line for line in str(self.eventRecord).splitlines()])] except ValueError: str_list += ['eventRecord : '] + {{endif}} + {{if 'cudaGraphNodeParams.extSemSignal' in found_struct}} try: str_list += ['extSemSignal :\n' + '\n'.join([' ' + line for line in str(self.extSemSignal).splitlines()])] except ValueError: str_list += ['extSemSignal : '] + {{endif}} + {{if 'cudaGraphNodeParams.extSemWait' in found_struct}} try: str_list += ['extSemWait :\n' + '\n'.join([' ' + line for line in str(self.extSemWait).splitlines()])] except ValueError: str_list += ['extSemWait : '] + {{endif}} + {{if 'cudaGraphNodeParams.alloc' in found_struct}} try: str_list += ['alloc :\n' + '\n'.join([' ' + line for line in str(self.alloc).splitlines()])] except ValueError: str_list += ['alloc : '] + {{endif}} + {{if 'cudaGraphNodeParams.free' in found_struct}} try: str_list += ['free :\n' + '\n'.join([' ' + line for line in str(self.free).splitlines()])] except ValueError: str_list += ['free : '] + {{endif}} + {{if 'cudaGraphNodeParams.conditional' in found_struct}} try: str_list += ['conditional :\n' + '\n'.join([' ' + line for line in str(self.conditional).splitlines()])] except ValueError: str_list += ['conditional : '] + {{endif}} + {{if 'cudaGraphNodeParams.reserved2' in found_struct}} try: str_list += ['reserved2 : ' + str(self.reserved2)] except ValueError: str_list += ['reserved2 : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaGraphNodeParams.type' in found_struct}} @property def type(self): - return cudaGraphNodeType(self._ptr[0].type) + return cudaGraphNodeType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaGraphNodeType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'cudaGraphNodeParams.reserved0' in found_struct}} @property def reserved0(self): - return self._ptr[0].reserved0 + return self._pvt_ptr[0].reserved0 @reserved0.setter def reserved0(self, reserved0): - self._ptr[0].reserved0 = reserved0 + self._pvt_ptr[0].reserved0 = reserved0 + {{endif}} + {{if 'cudaGraphNodeParams.reserved1' in found_struct}} @property def reserved1(self): - return self._ptr[0].reserved1 + return self._pvt_ptr[0].reserved1 @reserved1.setter def reserved1(self, reserved1): - self._ptr[0].reserved1 = reserved1 + self._pvt_ptr[0].reserved1 = reserved1 + {{endif}} + {{if 'cudaGraphNodeParams.kernel' in found_struct}} @property def kernel(self): return self._kernel @kernel.setter def kernel(self, kernel not None : cudaKernelNodeParamsV2): - string.memcpy(&self._ptr[0].kernel, kernel.getPtr(), sizeof(self._ptr[0].kernel)) + string.memcpy(&self._pvt_ptr[0].kernel, kernel.getPtr(), sizeof(self._pvt_ptr[0].kernel)) + {{endif}} + {{if 'cudaGraphNodeParams.memcpy' in found_struct}} @property def memcpy(self): return self._memcpy @memcpy.setter def memcpy(self, memcpy not None : cudaMemcpyNodeParams): - string.memcpy(&self._ptr[0].memcpy, memcpy.getPtr(), sizeof(self._ptr[0].memcpy)) + string.memcpy(&self._pvt_ptr[0].memcpy, memcpy.getPtr(), sizeof(self._pvt_ptr[0].memcpy)) + {{endif}} + {{if 'cudaGraphNodeParams.memset' in found_struct}} @property def memset(self): return self._memset @memset.setter def memset(self, memset not None : cudaMemsetParamsV2): - string.memcpy(&self._ptr[0].memset, memset.getPtr(), sizeof(self._ptr[0].memset)) + string.memcpy(&self._pvt_ptr[0].memset, memset.getPtr(), sizeof(self._pvt_ptr[0].memset)) + {{endif}} + {{if 'cudaGraphNodeParams.host' in found_struct}} @property def host(self): return self._host @host.setter def host(self, host not None : cudaHostNodeParamsV2): - string.memcpy(&self._ptr[0].host, host.getPtr(), sizeof(self._ptr[0].host)) + string.memcpy(&self._pvt_ptr[0].host, host.getPtr(), sizeof(self._pvt_ptr[0].host)) + {{endif}} + {{if 'cudaGraphNodeParams.graph' in found_struct}} @property def graph(self): return self._graph @graph.setter def graph(self, graph not None : cudaChildGraphNodeParams): - string.memcpy(&self._ptr[0].graph, graph.getPtr(), sizeof(self._ptr[0].graph)) + string.memcpy(&self._pvt_ptr[0].graph, graph.getPtr(), sizeof(self._pvt_ptr[0].graph)) + {{endif}} + {{if 'cudaGraphNodeParams.eventWait' in found_struct}} @property def eventWait(self): return self._eventWait @eventWait.setter def eventWait(self, eventWait not None : cudaEventWaitNodeParams): - string.memcpy(&self._ptr[0].eventWait, eventWait.getPtr(), sizeof(self._ptr[0].eventWait)) + string.memcpy(&self._pvt_ptr[0].eventWait, eventWait.getPtr(), sizeof(self._pvt_ptr[0].eventWait)) + {{endif}} + {{if 'cudaGraphNodeParams.eventRecord' in found_struct}} @property def eventRecord(self): return self._eventRecord @eventRecord.setter def eventRecord(self, eventRecord not None : cudaEventRecordNodeParams): - string.memcpy(&self._ptr[0].eventRecord, eventRecord.getPtr(), sizeof(self._ptr[0].eventRecord)) + string.memcpy(&self._pvt_ptr[0].eventRecord, eventRecord.getPtr(), sizeof(self._pvt_ptr[0].eventRecord)) + {{endif}} + {{if 'cudaGraphNodeParams.extSemSignal' in found_struct}} @property def extSemSignal(self): return self._extSemSignal @extSemSignal.setter def extSemSignal(self, extSemSignal not None : cudaExternalSemaphoreSignalNodeParamsV2): - string.memcpy(&self._ptr[0].extSemSignal, extSemSignal.getPtr(), sizeof(self._ptr[0].extSemSignal)) + string.memcpy(&self._pvt_ptr[0].extSemSignal, extSemSignal.getPtr(), sizeof(self._pvt_ptr[0].extSemSignal)) + {{endif}} + {{if 'cudaGraphNodeParams.extSemWait' in found_struct}} @property def extSemWait(self): return self._extSemWait @extSemWait.setter def extSemWait(self, extSemWait not None : cudaExternalSemaphoreWaitNodeParamsV2): - string.memcpy(&self._ptr[0].extSemWait, extSemWait.getPtr(), sizeof(self._ptr[0].extSemWait)) + string.memcpy(&self._pvt_ptr[0].extSemWait, extSemWait.getPtr(), sizeof(self._pvt_ptr[0].extSemWait)) + {{endif}} + {{if 'cudaGraphNodeParams.alloc' in found_struct}} @property def alloc(self): return self._alloc @alloc.setter def alloc(self, alloc not None : cudaMemAllocNodeParamsV2): - string.memcpy(&self._ptr[0].alloc, alloc.getPtr(), sizeof(self._ptr[0].alloc)) + string.memcpy(&self._pvt_ptr[0].alloc, alloc.getPtr(), sizeof(self._pvt_ptr[0].alloc)) + {{endif}} + {{if 'cudaGraphNodeParams.free' in found_struct}} @property def free(self): return self._free @free.setter def free(self, free not None : cudaMemFreeNodeParams): - string.memcpy(&self._ptr[0].free, free.getPtr(), sizeof(self._ptr[0].free)) + string.memcpy(&self._pvt_ptr[0].free, free.getPtr(), sizeof(self._pvt_ptr[0].free)) + {{endif}} + {{if 'cudaGraphNodeParams.conditional' in found_struct}} @property def conditional(self): return self._conditional @conditional.setter def conditional(self, conditional not None : cudaConditionalNodeParams): - string.memcpy(&self._ptr[0].conditional, conditional.getPtr(), sizeof(self._ptr[0].conditional)) + string.memcpy(&self._pvt_ptr[0].conditional, conditional.getPtr(), sizeof(self._pvt_ptr[0].conditional)) + {{endif}} + {{if 'cudaGraphNodeParams.reserved2' in found_struct}} @property def reserved2(self): - return self._ptr[0].reserved2 + return self._pvt_ptr[0].reserved2 @reserved2.setter def reserved2(self, long long reserved2): - self._ptr[0].reserved2 = reserved2 + self._pvt_ptr[0].reserved2 = reserved2 + {{endif}} {{endif}} -{{if 'struct cudaGraphEdgeData_st' in found_types}} +{{if 'cudaGraphEdgeData_st' in found_struct}} cdef class cudaGraphEdgeData_st: """ @@ -11635,6 +14979,7 @@ cdef class cudaGraphEdgeData_st: Attributes ---------- + {{if 'cudaGraphEdgeData_st.from_port' in found_struct}} from_port : bytes This indicates when the dependency is triggered from the upstream node on the edge. The meaning is specfic to the node type. A value @@ -11645,6 +14990,8 @@ cdef class cudaGraphEdgeData_st: cudaGraphKernelNodePortDefault, cudaGraphKernelNodePortProgrammatic, or cudaGraphKernelNodePortLaunchCompletion. + {{endif}} + {{if 'cudaGraphEdgeData_st.to_port' in found_struct}} to_port : bytes This indicates what portion of the downstream node is dependent on the upstream node or portion thereof (indicated by `from_port`). @@ -11652,82 +14999,102 @@ cdef class cudaGraphEdgeData_st: means the entirety of the downstream node is dependent on the upstream work. Currently no node types define non-zero ports. Accordingly, this field must be set to zero. + {{endif}} + {{if 'cudaGraphEdgeData_st.type' in found_struct}} type : bytes This should be populated with a value from ::cudaGraphDependencyType. (It is typed as char due to compiler- specific layout of bitfields.) See ::cudaGraphDependencyType. + {{endif}} + {{if 'cudaGraphEdgeData_st.reserved' in found_struct}} reserved : bytes These bytes are unused and must be zeroed. This ensures compatibility if additional fields are added in the future. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaGraphEdgeData_st.from_port' in found_struct}} try: str_list += ['from_port : ' + str(self.from_port)] except ValueError: str_list += ['from_port : '] + {{endif}} + {{if 'cudaGraphEdgeData_st.to_port' in found_struct}} try: str_list += ['to_port : ' + str(self.to_port)] except ValueError: str_list += ['to_port : '] + {{endif}} + {{if 'cudaGraphEdgeData_st.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'cudaGraphEdgeData_st.reserved' in found_struct}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaGraphEdgeData_st.from_port' in found_struct}} @property def from_port(self): - return self._ptr[0].from_port + return self._pvt_ptr[0].from_port @from_port.setter def from_port(self, unsigned char from_port): - self._ptr[0].from_port = from_port + self._pvt_ptr[0].from_port = from_port + {{endif}} + {{if 'cudaGraphEdgeData_st.to_port' in found_struct}} @property def to_port(self): - return self._ptr[0].to_port + return self._pvt_ptr[0].to_port @to_port.setter def to_port(self, unsigned char to_port): - self._ptr[0].to_port = to_port + self._pvt_ptr[0].to_port = to_port + {{endif}} + {{if 'cudaGraphEdgeData_st.type' in found_struct}} @property def type(self): - return self._ptr[0].type + return self._pvt_ptr[0].type @type.setter def type(self, unsigned char type): - self._ptr[0].type = type + self._pvt_ptr[0].type = type + {{endif}} + {{if 'cudaGraphEdgeData_st.reserved' in found_struct}} @property def reserved(self): - return PyBytes_FromStringAndSize(self._ptr[0].reserved, 5) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].reserved, 5) @reserved.setter def reserved(self, reserved): if len(reserved) != 5: raise ValueError("reserved length must be 5, is " + str(len(reserved))) for i, b in enumerate(reserved): - self._ptr[0].reserved[i] = b + self._pvt_ptr[0].reserved[i] = b + {{endif}} {{endif}} -{{if 'struct cudaGraphInstantiateParams_st' in found_types}} +{{if 'cudaGraphInstantiateParams_st' in found_struct}} cdef class cudaGraphInstantiateParams_st: """ @@ -11735,61 +15102,84 @@ cdef class cudaGraphInstantiateParams_st: Attributes ---------- + {{if 'cudaGraphInstantiateParams_st.flags' in found_struct}} flags : unsigned long long Instantiation flags + {{endif}} + {{if 'cudaGraphInstantiateParams_st.uploadStream' in found_struct}} uploadStream : cudaStream_t Upload stream + {{endif}} + {{if 'cudaGraphInstantiateParams_st.errNode_out' in found_struct}} errNode_out : cudaGraphNode_t The node which caused instantiation to fail, if any + {{endif}} + {{if 'cudaGraphInstantiateParams_st.result_out' in found_struct}} result_out : cudaGraphInstantiateResult Whether instantiation was successful. If it failed, the reason why + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._uploadStream = cudaStream_t(_ptr=&self._ptr[0].uploadStream) - self._errNode_out = cudaGraphNode_t(_ptr=&self._ptr[0].errNode_out) + pass + {{if 'cudaGraphInstantiateParams_st.uploadStream' in found_struct}} + self._uploadStream = cudaStream_t(_ptr=&self._pvt_ptr[0].uploadStream) + {{endif}} + {{if 'cudaGraphInstantiateParams_st.errNode_out' in found_struct}} + self._errNode_out = cudaGraphNode_t(_ptr=&self._pvt_ptr[0].errNode_out) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaGraphInstantiateParams_st.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'cudaGraphInstantiateParams_st.uploadStream' in found_struct}} try: str_list += ['uploadStream : ' + str(self.uploadStream)] except ValueError: str_list += ['uploadStream : '] + {{endif}} + {{if 'cudaGraphInstantiateParams_st.errNode_out' in found_struct}} try: str_list += ['errNode_out : ' + str(self.errNode_out)] except ValueError: str_list += ['errNode_out : '] + {{endif}} + {{if 'cudaGraphInstantiateParams_st.result_out' in found_struct}} try: str_list += ['result_out : ' + str(self.result_out)] except ValueError: str_list += ['result_out : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaGraphInstantiateParams_st.flags' in found_struct}} @property def flags(self): - return self._ptr[0].flags + return self._pvt_ptr[0].flags @flags.setter def flags(self, unsigned long long flags): - self._ptr[0].flags = flags + self._pvt_ptr[0].flags = flags + {{endif}} + {{if 'cudaGraphInstantiateParams_st.uploadStream' in found_struct}} @property def uploadStream(self): return self._uploadStream @@ -11804,7 +15194,9 @@ cdef class cudaGraphInstantiateParams_st: else: puploadStream = int(cudaStream_t(uploadStream)) cyuploadStream = puploadStream - self._uploadStream._ptr[0] = cyuploadStream + self._uploadStream._pvt_ptr[0] = cyuploadStream + {{endif}} + {{if 'cudaGraphInstantiateParams_st.errNode_out' in found_struct}} @property def errNode_out(self): return self._errNode_out @@ -11819,15 +15211,18 @@ cdef class cudaGraphInstantiateParams_st: else: perrNode_out = int(cudaGraphNode_t(errNode_out)) cyerrNode_out = perrNode_out - self._errNode_out._ptr[0] = cyerrNode_out + self._errNode_out._pvt_ptr[0] = cyerrNode_out + {{endif}} + {{if 'cudaGraphInstantiateParams_st.result_out' in found_struct}} @property def result_out(self): - return cudaGraphInstantiateResult(self._ptr[0].result_out) + return cudaGraphInstantiateResult(self._pvt_ptr[0].result_out) @result_out.setter def result_out(self, result_out not None : cudaGraphInstantiateResult): - self._ptr[0].result_out = result_out.value + self._pvt_ptr[0].result_out = result_out.value + {{endif}} {{endif}} -{{if 'struct cudaGraphExecUpdateResultInfo_st' in found_types}} +{{if 'cudaGraphExecUpdateResultInfo_st' in found_struct}} cdef class cudaGraphExecUpdateResultInfo_st: """ @@ -11835,58 +15230,77 @@ cdef class cudaGraphExecUpdateResultInfo_st: Attributes ---------- + {{if 'cudaGraphExecUpdateResultInfo_st.result' in found_struct}} result : cudaGraphExecUpdateResult Gives more specific detail when a cuda graph update fails. + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorNode' in found_struct}} errorNode : cudaGraphNode_t The "to node" of the error edge when the topologies do not match. The error node when the error is associated with a specific node. NULL when the error is generic. + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} errorFromNode : cudaGraphNode_t The from node of error edge when the topologies do not match. Otherwise NULL. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._errorNode = cudaGraphNode_t(_ptr=&self._ptr[0].errorNode) - self._errorFromNode = cudaGraphNode_t(_ptr=&self._ptr[0].errorFromNode) + pass + {{if 'cudaGraphExecUpdateResultInfo_st.errorNode' in found_struct}} + self._errorNode = cudaGraphNode_t(_ptr=&self._pvt_ptr[0].errorNode) + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} + self._errorFromNode = cudaGraphNode_t(_ptr=&self._pvt_ptr[0].errorFromNode) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaGraphExecUpdateResultInfo_st.result' in found_struct}} try: str_list += ['result : ' + str(self.result)] except ValueError: str_list += ['result : '] + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorNode' in found_struct}} try: str_list += ['errorNode : ' + str(self.errorNode)] except ValueError: str_list += ['errorNode : '] + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} try: str_list += ['errorFromNode : ' + str(self.errorFromNode)] except ValueError: str_list += ['errorFromNode : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaGraphExecUpdateResultInfo_st.result' in found_struct}} @property def result(self): - return cudaGraphExecUpdateResult(self._ptr[0].result) + return cudaGraphExecUpdateResult(self._pvt_ptr[0].result) @result.setter def result(self, result not None : cudaGraphExecUpdateResult): - self._ptr[0].result = result.value + self._pvt_ptr[0].result = result.value + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorNode' in found_struct}} @property def errorNode(self): return self._errorNode @@ -11901,7 +15315,9 @@ cdef class cudaGraphExecUpdateResultInfo_st: else: perrorNode = int(cudaGraphNode_t(errorNode)) cyerrorNode = perrorNode - self._errorNode._ptr[0] = cyerrorNode + self._errorNode._pvt_ptr[0] = cyerrorNode + {{endif}} + {{if 'cudaGraphExecUpdateResultInfo_st.errorFromNode' in found_struct}} @property def errorFromNode(self): return self._errorFromNode @@ -11916,141 +15332,181 @@ cdef class cudaGraphExecUpdateResultInfo_st: else: perrorFromNode = int(cudaGraphNode_t(errorFromNode)) cyerrorFromNode = perrorFromNode - self._errorFromNode._ptr[0] = cyerrorFromNode + self._errorFromNode._pvt_ptr[0] = cyerrorFromNode + {{endif}} {{endif}} -{{if 'struct cudaGraphKernelNodeUpdate' in found_types}} +{{if 'cudaGraphKernelNodeUpdate.updateData.param' in found_struct}} -cdef class anon_struct19: +cdef class anon_struct21: """ Attributes ---------- + {{if 'cudaGraphKernelNodeUpdate.updateData.param.pValue' in found_struct}} pValue : Any + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param.offset' in found_struct}} offset : size_t + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param.size' in found_struct}} size : size_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].updateData.param + return &self._pvt_ptr[0].updateData.param def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaGraphKernelNodeUpdate.updateData.param.pValue' in found_struct}} try: str_list += ['pValue : ' + hex(self.pValue)] except ValueError: str_list += ['pValue : '] + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param.offset' in found_struct}} try: str_list += ['offset : ' + str(self.offset)] except ValueError: str_list += ['offset : '] + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param.size' in found_struct}} try: str_list += ['size : ' + str(self.size)] except ValueError: str_list += ['size : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaGraphKernelNodeUpdate.updateData.param.pValue' in found_struct}} @property def pValue(self): - return self._ptr[0].updateData.param.pValue + return self._pvt_ptr[0].updateData.param.pValue @pValue.setter def pValue(self, pValue): - _cypValue = utils.HelperInputVoidPtr(pValue) - self._ptr[0].updateData.param.pValue = _cypValue.cptr + _cpValue = utils.HelperInputVoidPtr(pValue) + self._pvt_ptr[0].updateData.param.pValue = _cpValue.cptr + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param.offset' in found_struct}} @property def offset(self): - return self._ptr[0].updateData.param.offset + return self._pvt_ptr[0].updateData.param.offset @offset.setter def offset(self, size_t offset): - self._ptr[0].updateData.param.offset = offset + self._pvt_ptr[0].updateData.param.offset = offset + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param.size' in found_struct}} @property def size(self): - return self._ptr[0].updateData.param.size + return self._pvt_ptr[0].updateData.param.size @size.setter def size(self, size_t size): - self._ptr[0].updateData.param.size = size + self._pvt_ptr[0].updateData.param.size = size + {{endif}} {{endif}} -{{if 'struct cudaGraphKernelNodeUpdate' in found_types}} +{{if 'cudaGraphKernelNodeUpdate.updateData' in found_struct}} -cdef class anon_union8: +cdef class anon_union9: """ Attributes ---------- + {{if 'cudaGraphKernelNodeUpdate.updateData.gridDim' in found_struct}} gridDim : dim3 - param : anon_struct19 + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param' in found_struct}} + param : anon_struct21 + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.isEnabled' in found_struct}} isEnabled : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._gridDim = dim3(_ptr=&self._ptr[0].updateData.gridDim) - self._param = anon_struct19(_ptr=self._ptr) + pass + {{if 'cudaGraphKernelNodeUpdate.updateData.gridDim' in found_struct}} + self._gridDim = dim3(_ptr=&self._pvt_ptr[0].updateData.gridDim) + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param' in found_struct}} + self._param = anon_struct21(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].updateData + return &self._pvt_ptr[0].updateData def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaGraphKernelNodeUpdate.updateData.gridDim' in found_struct}} try: str_list += ['gridDim :\n' + '\n'.join([' ' + line for line in str(self.gridDim).splitlines()])] except ValueError: str_list += ['gridDim : '] + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param' in found_struct}} try: str_list += ['param :\n' + '\n'.join([' ' + line for line in str(self.param).splitlines()])] except ValueError: str_list += ['param : '] + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.isEnabled' in found_struct}} try: str_list += ['isEnabled : ' + str(self.isEnabled)] except ValueError: str_list += ['isEnabled : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaGraphKernelNodeUpdate.updateData.gridDim' in found_struct}} @property def gridDim(self): return self._gridDim @gridDim.setter def gridDim(self, gridDim not None : dim3): - string.memcpy(&self._ptr[0].updateData.gridDim, gridDim.getPtr(), sizeof(self._ptr[0].updateData.gridDim)) + string.memcpy(&self._pvt_ptr[0].updateData.gridDim, gridDim.getPtr(), sizeof(self._pvt_ptr[0].updateData.gridDim)) + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.param' in found_struct}} @property def param(self): return self._param @param.setter - def param(self, param not None : anon_struct19): - string.memcpy(&self._ptr[0].updateData.param, param.getPtr(), sizeof(self._ptr[0].updateData.param)) + def param(self, param not None : anon_struct21): + string.memcpy(&self._pvt_ptr[0].updateData.param, param.getPtr(), sizeof(self._pvt_ptr[0].updateData.param)) + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData.isEnabled' in found_struct}} @property def isEnabled(self): - return self._ptr[0].updateData.isEnabled + return self._pvt_ptr[0].updateData.isEnabled @isEnabled.setter def isEnabled(self, unsigned int isEnabled): - self._ptr[0].updateData.isEnabled = isEnabled + self._pvt_ptr[0].updateData.isEnabled = isEnabled + {{endif}} {{endif}} -{{if 'struct cudaGraphKernelNodeUpdate' in found_types}} +{{if 'cudaGraphKernelNodeUpdate' in found_struct}} cdef class cudaGraphKernelNodeUpdate: """ @@ -12059,52 +15515,69 @@ cdef class cudaGraphKernelNodeUpdate: Attributes ---------- + {{if 'cudaGraphKernelNodeUpdate.node' in found_struct}} node : cudaGraphDeviceNode_t Node to update + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.field' in found_struct}} field : cudaGraphKernelNodeField Which type of update to apply. Determines how updateData is interpreted - updateData : anon_union8 + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData' in found_struct}} + updateData : anon_union9 Update data to apply. Which field is used depends on field's value + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cyruntime.cudaGraphKernelNodeUpdate)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._node = cudaGraphDeviceNode_t(_ptr=&self._ptr[0].node) - self._updateData = anon_union8(_ptr=self._ptr) + pass + {{if 'cudaGraphKernelNodeUpdate.node' in found_struct}} + self._node = cudaGraphDeviceNode_t(_ptr=&self._pvt_ptr[0].node) + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData' in found_struct}} + self._updateData = anon_union9(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaGraphKernelNodeUpdate.node' in found_struct}} try: str_list += ['node : ' + str(self.node)] except ValueError: str_list += ['node : '] + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.field' in found_struct}} try: str_list += ['field : ' + str(self.field)] except ValueError: str_list += ['field : '] + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData' in found_struct}} try: str_list += ['updateData :\n' + '\n'.join([' ' + line for line in str(self.updateData).splitlines()])] except ValueError: str_list += ['updateData : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaGraphKernelNodeUpdate.node' in found_struct}} @property def node(self): return self._node @@ -12119,21 +15592,26 @@ cdef class cudaGraphKernelNodeUpdate: else: pnode = int(cudaGraphDeviceNode_t(node)) cynode = pnode - self._node._ptr[0] = cynode + self._node._pvt_ptr[0] = cynode + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.field' in found_struct}} @property def field(self): - return cudaGraphKernelNodeField(self._ptr[0].field) + return cudaGraphKernelNodeField(self._pvt_ptr[0].field) @field.setter def field(self, field not None : cudaGraphKernelNodeField): - self._ptr[0].field = field.value + self._pvt_ptr[0].field = field.value + {{endif}} + {{if 'cudaGraphKernelNodeUpdate.updateData' in found_struct}} @property def updateData(self): return self._updateData @updateData.setter - def updateData(self, updateData not None : anon_union8): - string.memcpy(&self._ptr[0].updateData, updateData.getPtr(), sizeof(self._ptr[0].updateData)) + def updateData(self, updateData not None : anon_union9): + string.memcpy(&self._pvt_ptr[0].updateData, updateData.getPtr(), sizeof(self._pvt_ptr[0].updateData)) + {{endif}} {{endif}} -{{if 'struct cudaLaunchMemSyncDomainMap_st' in found_types}} +{{if 'cudaLaunchMemSyncDomainMap_st' in found_struct}} cdef class cudaLaunchMemSyncDomainMap_st: """ @@ -12147,166 +15625,209 @@ cdef class cudaLaunchMemSyncDomainMap_st: Attributes ---------- + {{if 'cudaLaunchMemSyncDomainMap_st.default_' in found_struct}} default_ : bytes The default domain ID to use for designated kernels + {{endif}} + {{if 'cudaLaunchMemSyncDomainMap_st.remote' in found_struct}} remote : bytes The remote domain ID to use for designated kernels + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaLaunchMemSyncDomainMap_st.default_' in found_struct}} try: str_list += ['default_ : ' + str(self.default_)] except ValueError: str_list += ['default_ : '] + {{endif}} + {{if 'cudaLaunchMemSyncDomainMap_st.remote' in found_struct}} try: str_list += ['remote : ' + str(self.remote)] except ValueError: str_list += ['remote : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaLaunchMemSyncDomainMap_st.default_' in found_struct}} @property def default_(self): - return self._ptr[0].default_ + return self._pvt_ptr[0].default_ @default_.setter def default_(self, unsigned char default_): - self._ptr[0].default_ = default_ + self._pvt_ptr[0].default_ = default_ + {{endif}} + {{if 'cudaLaunchMemSyncDomainMap_st.remote' in found_struct}} @property def remote(self): - return self._ptr[0].remote + return self._pvt_ptr[0].remote @remote.setter def remote(self, unsigned char remote): - self._ptr[0].remote = remote + self._pvt_ptr[0].remote = remote + {{endif}} {{endif}} -{{if 'union cudaLaunchAttributeValue' in found_types}} +{{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} -cdef class anon_struct20: +cdef class anon_struct22: """ Attributes ---------- + {{if 'cudaLaunchAttributeValue.clusterDim.x' in found_struct}} x : unsigned int + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim.y' in found_struct}} y : unsigned int + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim.z' in found_struct}} z : unsigned int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].clusterDim + return &self._pvt_ptr[0].clusterDim def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaLaunchAttributeValue.clusterDim.x' in found_struct}} try: str_list += ['x : ' + str(self.x)] except ValueError: str_list += ['x : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim.y' in found_struct}} try: str_list += ['y : ' + str(self.y)] except ValueError: str_list += ['y : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim.z' in found_struct}} try: str_list += ['z : ' + str(self.z)] except ValueError: str_list += ['z : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaLaunchAttributeValue.clusterDim.x' in found_struct}} @property def x(self): - return self._ptr[0].clusterDim.x + return self._pvt_ptr[0].clusterDim.x @x.setter def x(self, unsigned int x): - self._ptr[0].clusterDim.x = x + self._pvt_ptr[0].clusterDim.x = x + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim.y' in found_struct}} @property def y(self): - return self._ptr[0].clusterDim.y + return self._pvt_ptr[0].clusterDim.y @y.setter def y(self, unsigned int y): - self._ptr[0].clusterDim.y = y + self._pvt_ptr[0].clusterDim.y = y + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim.z' in found_struct}} @property def z(self): - return self._ptr[0].clusterDim.z + return self._pvt_ptr[0].clusterDim.z @z.setter def z(self, unsigned int z): - self._ptr[0].clusterDim.z = z + self._pvt_ptr[0].clusterDim.z = z + {{endif}} {{endif}} -{{if 'union cudaLaunchAttributeValue' in found_types}} +{{if 'cudaLaunchAttributeValue.programmaticEvent' in found_struct}} -cdef class anon_struct21: +cdef class anon_struct23: """ Attributes ---------- + {{if 'cudaLaunchAttributeValue.programmaticEvent.event' in found_struct}} event : cudaEvent_t + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent.flags' in found_struct}} flags : int + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent.triggerAtBlockStart' in found_struct}} triggerAtBlockStart : int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._event = cudaEvent_t(_ptr=&self._ptr[0].programmaticEvent.event) + pass + {{if 'cudaLaunchAttributeValue.programmaticEvent.event' in found_struct}} + self._event = cudaEvent_t(_ptr=&self._pvt_ptr[0].programmaticEvent.event) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].programmaticEvent + return &self._pvt_ptr[0].programmaticEvent def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaLaunchAttributeValue.programmaticEvent.event' in found_struct}} try: str_list += ['event : ' + str(self.event)] except ValueError: str_list += ['event : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent.triggerAtBlockStart' in found_struct}} try: str_list += ['triggerAtBlockStart : ' + str(self.triggerAtBlockStart)] except ValueError: str_list += ['triggerAtBlockStart : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaLaunchAttributeValue.programmaticEvent.event' in found_struct}} @property def event(self): return self._event @@ -12321,60 +15842,158 @@ cdef class anon_struct21: else: pevent = int(cudaEvent_t(event)) cyevent = pevent - self._event._ptr[0] = cyevent + self._event._pvt_ptr[0] = cyevent + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent.flags' in found_struct}} @property def flags(self): - return self._ptr[0].programmaticEvent.flags + return self._pvt_ptr[0].programmaticEvent.flags @flags.setter def flags(self, int flags): - self._ptr[0].programmaticEvent.flags = flags + self._pvt_ptr[0].programmaticEvent.flags = flags + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent.triggerAtBlockStart' in found_struct}} @property def triggerAtBlockStart(self): - return self._ptr[0].programmaticEvent.triggerAtBlockStart + return self._pvt_ptr[0].programmaticEvent.triggerAtBlockStart @triggerAtBlockStart.setter def triggerAtBlockStart(self, int triggerAtBlockStart): - self._ptr[0].programmaticEvent.triggerAtBlockStart = triggerAtBlockStart + self._pvt_ptr[0].programmaticEvent.triggerAtBlockStart = triggerAtBlockStart + {{endif}} {{endif}} -{{if 'union cudaLaunchAttributeValue' in found_types}} +{{if 'cudaLaunchAttributeValue.preferredClusterDim' in found_struct}} -cdef class anon_struct22: +cdef class anon_struct24: + """ + Attributes + ---------- + {{if 'cudaLaunchAttributeValue.preferredClusterDim.x' in found_struct}} + x : unsigned int + + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim.y' in found_struct}} + y : unsigned int + + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim.z' in found_struct}} + z : unsigned int + + {{endif}} + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].preferredClusterDim + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + {{if 'cudaLaunchAttributeValue.preferredClusterDim.x' in found_struct}} + try: + str_list += ['x : ' + str(self.x)] + except ValueError: + str_list += ['x : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim.y' in found_struct}} + try: + str_list += ['y : ' + str(self.y)] + except ValueError: + str_list += ['y : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim.z' in found_struct}} + try: + str_list += ['z : ' + str(self.z)] + except ValueError: + str_list += ['z : '] + {{endif}} + return '\n'.join(str_list) + else: + return '' + {{if 'cudaLaunchAttributeValue.preferredClusterDim.x' in found_struct}} + @property + def x(self): + return self._pvt_ptr[0].preferredClusterDim.x + @x.setter + def x(self, unsigned int x): + self._pvt_ptr[0].preferredClusterDim.x = x + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim.y' in found_struct}} + @property + def y(self): + return self._pvt_ptr[0].preferredClusterDim.y + @y.setter + def y(self, unsigned int y): + self._pvt_ptr[0].preferredClusterDim.y = y + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim.z' in found_struct}} + @property + def z(self): + return self._pvt_ptr[0].preferredClusterDim.z + @z.setter + def z(self, unsigned int z): + self._pvt_ptr[0].preferredClusterDim.z = z + {{endif}} +{{endif}} +{{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} + +cdef class anon_struct25: """ Attributes ---------- + {{if 'cudaLaunchAttributeValue.launchCompletionEvent.event' in found_struct}} event : cudaEvent_t + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent.flags' in found_struct}} flags : int + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._event = cudaEvent_t(_ptr=&self._ptr[0].launchCompletionEvent.event) + pass + {{if 'cudaLaunchAttributeValue.launchCompletionEvent.event' in found_struct}} + self._event = cudaEvent_t(_ptr=&self._pvt_ptr[0].launchCompletionEvent.event) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].launchCompletionEvent + return &self._pvt_ptr[0].launchCompletionEvent def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaLaunchAttributeValue.launchCompletionEvent.event' in found_struct}} try: str_list += ['event : ' + str(self.event)] except ValueError: str_list += ['event : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent.flags' in found_struct}} try: str_list += ['flags : ' + str(self.flags)] except ValueError: str_list += ['flags : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaLaunchAttributeValue.launchCompletionEvent.event' in found_struct}} @property def event(self): return self._event @@ -12389,60 +16008,76 @@ cdef class anon_struct22: else: pevent = int(cudaEvent_t(event)) cyevent = pevent - self._event._ptr[0] = cyevent + self._event._pvt_ptr[0] = cyevent + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent.flags' in found_struct}} @property def flags(self): - return self._ptr[0].launchCompletionEvent.flags + return self._pvt_ptr[0].launchCompletionEvent.flags @flags.setter def flags(self, int flags): - self._ptr[0].launchCompletionEvent.flags = flags + self._pvt_ptr[0].launchCompletionEvent.flags = flags + {{endif}} {{endif}} -{{if 'union cudaLaunchAttributeValue' in found_types}} +{{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} -cdef class anon_struct23: +cdef class anon_struct26: """ Attributes ---------- + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode.deviceUpdatable' in found_struct}} deviceUpdatable : int + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode.devNode' in found_struct}} devNode : cudaGraphDeviceNode_t + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._devNode = cudaGraphDeviceNode_t(_ptr=&self._ptr[0].deviceUpdatableKernelNode.devNode) + pass + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode.devNode' in found_struct}} + self._devNode = cudaGraphDeviceNode_t(_ptr=&self._pvt_ptr[0].deviceUpdatableKernelNode.devNode) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].deviceUpdatableKernelNode + return &self._pvt_ptr[0].deviceUpdatableKernelNode def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode.deviceUpdatable' in found_struct}} try: str_list += ['deviceUpdatable : ' + str(self.deviceUpdatable)] except ValueError: str_list += ['deviceUpdatable : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode.devNode' in found_struct}} try: str_list += ['devNode : ' + str(self.devNode)] except ValueError: str_list += ['devNode : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode.deviceUpdatable' in found_struct}} @property def deviceUpdatable(self): - return self._ptr[0].deviceUpdatableKernelNode.deviceUpdatable + return self._pvt_ptr[0].deviceUpdatableKernelNode.deviceUpdatable @deviceUpdatable.setter def deviceUpdatable(self, int deviceUpdatable): - self._ptr[0].deviceUpdatableKernelNode.deviceUpdatable = deviceUpdatable + self._pvt_ptr[0].deviceUpdatableKernelNode.deviceUpdatable = deviceUpdatable + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode.devNode' in found_struct}} @property def devNode(self): return self._devNode @@ -12457,9 +16092,10 @@ cdef class anon_struct23: else: pdevNode = int(cudaGraphDeviceNode_t(devNode)) cydevNode = pdevNode - self._devNode._ptr[0] = cydevNode + self._devNode._pvt_ptr[0] = cydevNode + {{endif}} {{endif}} -{{if 'union cudaLaunchAttributeValue' in found_types}} +{{if 'cudaLaunchAttributeValue' in found_struct}} cdef class cudaLaunchAttributeValue: """ @@ -12468,17 +16104,26 @@ cdef class cudaLaunchAttributeValue: Attributes ---------- + {{if 'cudaLaunchAttributeValue.pad' in found_struct}} pad : bytes + {{endif}} + {{if 'cudaLaunchAttributeValue.accessPolicyWindow' in found_struct}} accessPolicyWindow : cudaAccessPolicyWindow Value of launch attribute cudaLaunchAttributeAccessPolicyWindow. + {{endif}} + {{if 'cudaLaunchAttributeValue.cooperative' in found_struct}} cooperative : int Value of launch attribute cudaLaunchAttributeCooperative. Nonzero indicates a cooperative kernel (see cudaLaunchCooperativeKernel). + {{endif}} + {{if 'cudaLaunchAttributeValue.syncPolicy' in found_struct}} syncPolicy : cudaSynchronizationPolicy Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. ::cudaSynchronizationPolicy for work queued up in this stream. - clusterDim : anon_struct20 + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} + clusterDim : anon_struct22 Value of launch attribute cudaLaunchAttributeClusterDimension that represents the desired cluster dimensions for the kernel. Opaque type with the following fields: - `x` - The X dimension of the @@ -12486,133 +16131,217 @@ cdef class cudaLaunchAttributeValue: `y` - The Y dimension of the cluster, in blocks. Must be a divisor of the grid Y dimension. - `z` - The Z dimension of the cluster, in blocks. Must be a divisor of the grid Z dimension. + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterSchedulingPolicyPreference' in found_struct}} clusterSchedulingPolicyPreference : cudaClusterSchedulingPolicy Value of launch attribute cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster scheduling policy preference for the kernel. + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticStreamSerializationAllowed' in found_struct}} programmaticStreamSerializationAllowed : int Value of launch attribute cudaLaunchAttributeProgrammaticStreamSerialization. - programmaticEvent : anon_struct21 + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent' in found_struct}} + programmaticEvent : anon_struct23 Value of launch attribute cudaLaunchAttributeProgrammaticEvent with the following fields: - `cudaEvent_t` event - Event to fire when all blocks trigger it. - `int` flags; - Event record flags, see cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. - `int` triggerAtBlockStart - If this is set to non-0, each block launch will automatically trigger the event. + {{endif}} + {{if 'cudaLaunchAttributeValue.priority' in found_struct}} priority : int Value of launch attribute cudaLaunchAttributePriority. Execution priority of the kernel. + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomainMap' in found_struct}} memSyncDomainMap : cudaLaunchMemSyncDomainMap Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See ::cudaLaunchMemSyncDomainMap. + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomain' in found_struct}} memSyncDomain : cudaLaunchMemSyncDomain Value of launch attribute cudaLaunchAttributeMemSyncDomain. See cudaLaunchMemSyncDomain. - launchCompletionEvent : anon_struct22 + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim' in found_struct}} + preferredClusterDim : anon_struct24 + Value of launch attribute + cudaLaunchAttributePreferredClusterDimension that represents the + desired preferred cluster dimensions for the kernel. Opaque type + with the following fields: - `x` - The X dimension of the preferred + cluster, in blocks. Must be a divisor of the grid X dimension, and + must be a multiple of the `x` field of + cudaLaunchAttributeValue::clusterDim. - `y` - The Y dimension of + the preferred cluster, in blocks. Must be a divisor of the grid Y + dimension, and must be a multiple of the `y` field of + cudaLaunchAttributeValue::clusterDim. - `z` - The Z dimension of + the preferred cluster, in blocks. Must be equal to the `z` field of + cudaLaunchAttributeValue::clusterDim. + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} + launchCompletionEvent : anon_struct25 Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent with the following fields: - `cudaEvent_t` event - Event to fire when the last block launches. - `int` flags - Event record flags, see cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. - deviceUpdatableKernelNode : anon_struct23 + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} + deviceUpdatableKernelNode : anon_struct26 Value of launch attribute cudaLaunchAttributeDeviceUpdatableKernelNode with the following fields: - `int` deviceUpdatable - Whether or not the resulting kernel node should be device-updatable. - `cudaGraphDeviceNode_t` devNode - Returns a handle to pass to the various device-side update functions. + {{endif}} + {{if 'cudaLaunchAttributeValue.sharedMemCarveout' in found_struct}} sharedMemCarveout : unsigned int Value of launch attribute cudaLaunchAttributePreferredSharedMemoryCarveout. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._accessPolicyWindow = cudaAccessPolicyWindow(_ptr=&self._ptr[0].accessPolicyWindow) - self._clusterDim = anon_struct20(_ptr=self._ptr) - self._programmaticEvent = anon_struct21(_ptr=self._ptr) - self._memSyncDomainMap = cudaLaunchMemSyncDomainMap(_ptr=&self._ptr[0].memSyncDomainMap) - self._launchCompletionEvent = anon_struct22(_ptr=self._ptr) - self._deviceUpdatableKernelNode = anon_struct23(_ptr=self._ptr) + pass + {{if 'cudaLaunchAttributeValue.accessPolicyWindow' in found_struct}} + self._accessPolicyWindow = cudaAccessPolicyWindow(_ptr=&self._pvt_ptr[0].accessPolicyWindow) + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} + self._clusterDim = anon_struct22(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent' in found_struct}} + self._programmaticEvent = anon_struct23(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomainMap' in found_struct}} + self._memSyncDomainMap = cudaLaunchMemSyncDomainMap(_ptr=&self._pvt_ptr[0].memSyncDomainMap) + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim' in found_struct}} + self._preferredClusterDim = anon_struct24(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} + self._launchCompletionEvent = anon_struct25(_ptr=self._pvt_ptr) + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} + self._deviceUpdatableKernelNode = anon_struct26(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaLaunchAttributeValue.pad' in found_struct}} try: str_list += ['pad : ' + str(self.pad)] except ValueError: str_list += ['pad : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.accessPolicyWindow' in found_struct}} try: str_list += ['accessPolicyWindow :\n' + '\n'.join([' ' + line for line in str(self.accessPolicyWindow).splitlines()])] except ValueError: str_list += ['accessPolicyWindow : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.cooperative' in found_struct}} try: str_list += ['cooperative : ' + str(self.cooperative)] except ValueError: str_list += ['cooperative : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.syncPolicy' in found_struct}} try: str_list += ['syncPolicy : ' + str(self.syncPolicy)] except ValueError: str_list += ['syncPolicy : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} try: str_list += ['clusterDim :\n' + '\n'.join([' ' + line for line in str(self.clusterDim).splitlines()])] except ValueError: str_list += ['clusterDim : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterSchedulingPolicyPreference' in found_struct}} try: str_list += ['clusterSchedulingPolicyPreference : ' + str(self.clusterSchedulingPolicyPreference)] except ValueError: str_list += ['clusterSchedulingPolicyPreference : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticStreamSerializationAllowed' in found_struct}} try: str_list += ['programmaticStreamSerializationAllowed : ' + str(self.programmaticStreamSerializationAllowed)] except ValueError: str_list += ['programmaticStreamSerializationAllowed : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent' in found_struct}} try: str_list += ['programmaticEvent :\n' + '\n'.join([' ' + line for line in str(self.programmaticEvent).splitlines()])] except ValueError: str_list += ['programmaticEvent : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.priority' in found_struct}} try: str_list += ['priority : ' + str(self.priority)] except ValueError: str_list += ['priority : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomainMap' in found_struct}} try: str_list += ['memSyncDomainMap :\n' + '\n'.join([' ' + line for line in str(self.memSyncDomainMap).splitlines()])] except ValueError: str_list += ['memSyncDomainMap : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomain' in found_struct}} try: str_list += ['memSyncDomain : ' + str(self.memSyncDomain)] except ValueError: str_list += ['memSyncDomain : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim' in found_struct}} + try: + str_list += ['preferredClusterDim :\n' + '\n'.join([' ' + line for line in str(self.preferredClusterDim).splitlines()])] + except ValueError: + str_list += ['preferredClusterDim : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} try: str_list += ['launchCompletionEvent :\n' + '\n'.join([' ' + line for line in str(self.launchCompletionEvent).splitlines()])] except ValueError: str_list += ['launchCompletionEvent : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} try: str_list += ['deviceUpdatableKernelNode :\n' + '\n'.join([' ' + line for line in str(self.deviceUpdatableKernelNode).splitlines()])] except ValueError: str_list += ['deviceUpdatableKernelNode : '] + {{endif}} + {{if 'cudaLaunchAttributeValue.sharedMemCarveout' in found_struct}} try: str_list += ['sharedMemCarveout : ' + str(self.sharedMemCarveout)] except ValueError: str_list += ['sharedMemCarveout : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaLaunchAttributeValue.pad' in found_struct}} @property def pad(self): - return PyBytes_FromStringAndSize(self._ptr[0].pad, 64) + return PyBytes_FromStringAndSize(self._pvt_ptr[0].pad, 64) @pad.setter def pad(self, pad): if len(pad) != 64: @@ -12621,92 +16350,127 @@ cdef class cudaLaunchAttributeValue: for i, b in enumerate(pad): if b < 0 and b > -129: b = b + 256 - self._ptr[0].pad[i] = b + self._pvt_ptr[0].pad[i] = b else: for i, b in enumerate(pad): if b > 127 and b < 256: b = b - 256 - self._ptr[0].pad[i] = b + self._pvt_ptr[0].pad[i] = b + {{endif}} + {{if 'cudaLaunchAttributeValue.accessPolicyWindow' in found_struct}} @property def accessPolicyWindow(self): return self._accessPolicyWindow @accessPolicyWindow.setter def accessPolicyWindow(self, accessPolicyWindow not None : cudaAccessPolicyWindow): - string.memcpy(&self._ptr[0].accessPolicyWindow, accessPolicyWindow.getPtr(), sizeof(self._ptr[0].accessPolicyWindow)) + string.memcpy(&self._pvt_ptr[0].accessPolicyWindow, accessPolicyWindow.getPtr(), sizeof(self._pvt_ptr[0].accessPolicyWindow)) + {{endif}} + {{if 'cudaLaunchAttributeValue.cooperative' in found_struct}} @property def cooperative(self): - return self._ptr[0].cooperative + return self._pvt_ptr[0].cooperative @cooperative.setter def cooperative(self, int cooperative): - self._ptr[0].cooperative = cooperative + self._pvt_ptr[0].cooperative = cooperative + {{endif}} + {{if 'cudaLaunchAttributeValue.syncPolicy' in found_struct}} @property def syncPolicy(self): - return cudaSynchronizationPolicy(self._ptr[0].syncPolicy) + return cudaSynchronizationPolicy(self._pvt_ptr[0].syncPolicy) @syncPolicy.setter def syncPolicy(self, syncPolicy not None : cudaSynchronizationPolicy): - self._ptr[0].syncPolicy = syncPolicy.value + self._pvt_ptr[0].syncPolicy = syncPolicy.value + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterDim' in found_struct}} @property def clusterDim(self): return self._clusterDim @clusterDim.setter - def clusterDim(self, clusterDim not None : anon_struct20): - string.memcpy(&self._ptr[0].clusterDim, clusterDim.getPtr(), sizeof(self._ptr[0].clusterDim)) + def clusterDim(self, clusterDim not None : anon_struct22): + string.memcpy(&self._pvt_ptr[0].clusterDim, clusterDim.getPtr(), sizeof(self._pvt_ptr[0].clusterDim)) + {{endif}} + {{if 'cudaLaunchAttributeValue.clusterSchedulingPolicyPreference' in found_struct}} @property def clusterSchedulingPolicyPreference(self): - return cudaClusterSchedulingPolicy(self._ptr[0].clusterSchedulingPolicyPreference) + return cudaClusterSchedulingPolicy(self._pvt_ptr[0].clusterSchedulingPolicyPreference) @clusterSchedulingPolicyPreference.setter def clusterSchedulingPolicyPreference(self, clusterSchedulingPolicyPreference not None : cudaClusterSchedulingPolicy): - self._ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value + self._pvt_ptr[0].clusterSchedulingPolicyPreference = clusterSchedulingPolicyPreference.value + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticStreamSerializationAllowed' in found_struct}} @property def programmaticStreamSerializationAllowed(self): - return self._ptr[0].programmaticStreamSerializationAllowed + return self._pvt_ptr[0].programmaticStreamSerializationAllowed @programmaticStreamSerializationAllowed.setter def programmaticStreamSerializationAllowed(self, int programmaticStreamSerializationAllowed): - self._ptr[0].programmaticStreamSerializationAllowed = programmaticStreamSerializationAllowed + self._pvt_ptr[0].programmaticStreamSerializationAllowed = programmaticStreamSerializationAllowed + {{endif}} + {{if 'cudaLaunchAttributeValue.programmaticEvent' in found_struct}} @property def programmaticEvent(self): return self._programmaticEvent @programmaticEvent.setter - def programmaticEvent(self, programmaticEvent not None : anon_struct21): - string.memcpy(&self._ptr[0].programmaticEvent, programmaticEvent.getPtr(), sizeof(self._ptr[0].programmaticEvent)) + def programmaticEvent(self, programmaticEvent not None : anon_struct23): + string.memcpy(&self._pvt_ptr[0].programmaticEvent, programmaticEvent.getPtr(), sizeof(self._pvt_ptr[0].programmaticEvent)) + {{endif}} + {{if 'cudaLaunchAttributeValue.priority' in found_struct}} @property def priority(self): - return self._ptr[0].priority + return self._pvt_ptr[0].priority @priority.setter def priority(self, int priority): - self._ptr[0].priority = priority + self._pvt_ptr[0].priority = priority + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomainMap' in found_struct}} @property def memSyncDomainMap(self): return self._memSyncDomainMap @memSyncDomainMap.setter def memSyncDomainMap(self, memSyncDomainMap not None : cudaLaunchMemSyncDomainMap): - string.memcpy(&self._ptr[0].memSyncDomainMap, memSyncDomainMap.getPtr(), sizeof(self._ptr[0].memSyncDomainMap)) + string.memcpy(&self._pvt_ptr[0].memSyncDomainMap, memSyncDomainMap.getPtr(), sizeof(self._pvt_ptr[0].memSyncDomainMap)) + {{endif}} + {{if 'cudaLaunchAttributeValue.memSyncDomain' in found_struct}} @property def memSyncDomain(self): - return cudaLaunchMemSyncDomain(self._ptr[0].memSyncDomain) + return cudaLaunchMemSyncDomain(self._pvt_ptr[0].memSyncDomain) @memSyncDomain.setter def memSyncDomain(self, memSyncDomain not None : cudaLaunchMemSyncDomain): - self._ptr[0].memSyncDomain = memSyncDomain.value + self._pvt_ptr[0].memSyncDomain = memSyncDomain.value + {{endif}} + {{if 'cudaLaunchAttributeValue.preferredClusterDim' in found_struct}} + @property + def preferredClusterDim(self): + return self._preferredClusterDim + @preferredClusterDim.setter + def preferredClusterDim(self, preferredClusterDim not None : anon_struct24): + string.memcpy(&self._pvt_ptr[0].preferredClusterDim, preferredClusterDim.getPtr(), sizeof(self._pvt_ptr[0].preferredClusterDim)) + {{endif}} + {{if 'cudaLaunchAttributeValue.launchCompletionEvent' in found_struct}} @property def launchCompletionEvent(self): return self._launchCompletionEvent @launchCompletionEvent.setter - def launchCompletionEvent(self, launchCompletionEvent not None : anon_struct22): - string.memcpy(&self._ptr[0].launchCompletionEvent, launchCompletionEvent.getPtr(), sizeof(self._ptr[0].launchCompletionEvent)) + def launchCompletionEvent(self, launchCompletionEvent not None : anon_struct25): + string.memcpy(&self._pvt_ptr[0].launchCompletionEvent, launchCompletionEvent.getPtr(), sizeof(self._pvt_ptr[0].launchCompletionEvent)) + {{endif}} + {{if 'cudaLaunchAttributeValue.deviceUpdatableKernelNode' in found_struct}} @property def deviceUpdatableKernelNode(self): return self._deviceUpdatableKernelNode @deviceUpdatableKernelNode.setter - def deviceUpdatableKernelNode(self, deviceUpdatableKernelNode not None : anon_struct23): - string.memcpy(&self._ptr[0].deviceUpdatableKernelNode, deviceUpdatableKernelNode.getPtr(), sizeof(self._ptr[0].deviceUpdatableKernelNode)) + def deviceUpdatableKernelNode(self, deviceUpdatableKernelNode not None : anon_struct26): + string.memcpy(&self._pvt_ptr[0].deviceUpdatableKernelNode, deviceUpdatableKernelNode.getPtr(), sizeof(self._pvt_ptr[0].deviceUpdatableKernelNode)) + {{endif}} + {{if 'cudaLaunchAttributeValue.sharedMemCarveout' in found_struct}} @property def sharedMemCarveout(self): - return self._ptr[0].sharedMemCarveout + return self._pvt_ptr[0].sharedMemCarveout @sharedMemCarveout.setter def sharedMemCarveout(self, unsigned int sharedMemCarveout): - self._ptr[0].sharedMemCarveout = sharedMemCarveout + self._pvt_ptr[0].sharedMemCarveout = sharedMemCarveout + {{endif}} {{endif}} -{{if 'struct cudaLaunchAttribute_st' in found_types}} +{{if 'cudaLaunchAttribute_st' in found_struct}} cdef class cudaLaunchAttribute_st: """ @@ -12714,138 +16478,165 @@ cdef class cudaLaunchAttribute_st: Attributes ---------- + {{if 'cudaLaunchAttribute_st.id' in found_struct}} id : cudaLaunchAttributeID Attribute to set + {{endif}} + {{if 'cudaLaunchAttribute_st.val' in found_struct}} val : cudaLaunchAttributeValue Value of the attribute + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._val = cudaLaunchAttributeValue(_ptr=&self._ptr[0].val) + pass + {{if 'cudaLaunchAttribute_st.val' in found_struct}} + self._val = cudaLaunchAttributeValue(_ptr=&self._pvt_ptr[0].val) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaLaunchAttribute_st.id' in found_struct}} try: str_list += ['id : ' + str(self.id)] except ValueError: str_list += ['id : '] + {{endif}} + {{if 'cudaLaunchAttribute_st.val' in found_struct}} try: str_list += ['val :\n' + '\n'.join([' ' + line for line in str(self.val).splitlines()])] except ValueError: str_list += ['val : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaLaunchAttribute_st.id' in found_struct}} @property def id(self): - return cudaLaunchAttributeID(self._ptr[0].id) + return cudaLaunchAttributeID(self._pvt_ptr[0].id) @id.setter def id(self, id not None : cudaLaunchAttributeID): - self._ptr[0].id = id.value + self._pvt_ptr[0].id = id.value + {{endif}} + {{if 'cudaLaunchAttribute_st.val' in found_struct}} @property def val(self): return self._val @val.setter def val(self, val not None : cudaLaunchAttributeValue): - string.memcpy(&self._ptr[0].val, val.getPtr(), sizeof(self._ptr[0].val)) + string.memcpy(&self._pvt_ptr[0].val, val.getPtr(), sizeof(self._pvt_ptr[0].val)) + {{endif}} {{endif}} -{{if 'struct cudaAsyncNotificationInfo' in found_types}} +{{if 'cudaAsyncNotificationInfo.info.overBudget' in found_struct}} -cdef class anon_struct24: +cdef class anon_struct27: """ Attributes ---------- + {{if 'cudaAsyncNotificationInfo.info.overBudget.bytesOverBudget' in found_struct}} bytesOverBudget : unsigned long long + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].info.overBudget + return &self._pvt_ptr[0].info.overBudget def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaAsyncNotificationInfo.info.overBudget.bytesOverBudget' in found_struct}} try: str_list += ['bytesOverBudget : ' + str(self.bytesOverBudget)] except ValueError: str_list += ['bytesOverBudget : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaAsyncNotificationInfo.info.overBudget.bytesOverBudget' in found_struct}} @property def bytesOverBudget(self): - return self._ptr[0].info.overBudget.bytesOverBudget + return self._pvt_ptr[0].info.overBudget.bytesOverBudget @bytesOverBudget.setter def bytesOverBudget(self, unsigned long long bytesOverBudget): - self._ptr[0].info.overBudget.bytesOverBudget = bytesOverBudget + self._pvt_ptr[0].info.overBudget.bytesOverBudget = bytesOverBudget + {{endif}} {{endif}} -{{if 'struct cudaAsyncNotificationInfo' in found_types}} +{{if 'cudaAsyncNotificationInfo.info' in found_struct}} -cdef class anon_union9: +cdef class anon_union10: """ Attributes ---------- - overBudget : anon_struct24 + {{if 'cudaAsyncNotificationInfo.info.overBudget' in found_struct}} + overBudget : anon_struct27 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): - self._overBudget = anon_struct24(_ptr=self._ptr) + pass + {{if 'cudaAsyncNotificationInfo.info.overBudget' in found_struct}} + self._overBudget = anon_struct27(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].info + return &self._pvt_ptr[0].info def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaAsyncNotificationInfo.info.overBudget' in found_struct}} try: str_list += ['overBudget :\n' + '\n'.join([' ' + line for line in str(self.overBudget).splitlines()])] except ValueError: str_list += ['overBudget : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaAsyncNotificationInfo.info.overBudget' in found_struct}} @property def overBudget(self): return self._overBudget @overBudget.setter - def overBudget(self, overBudget not None : anon_struct24): - string.memcpy(&self._ptr[0].info.overBudget, overBudget.getPtr(), sizeof(self._ptr[0].info.overBudget)) + def overBudget(self, overBudget not None : anon_struct27): + string.memcpy(&self._pvt_ptr[0].info.overBudget, overBudget.getPtr(), sizeof(self._pvt_ptr[0].info.overBudget)) + {{endif}} {{endif}} -{{if 'struct cudaAsyncNotificationInfo' in found_types}} +{{if 'cudaAsyncNotificationInfo' in found_struct}} cdef class cudaAsyncNotificationInfo: """ @@ -12853,58 +16644,72 @@ cdef class cudaAsyncNotificationInfo: Attributes ---------- + {{if 'cudaAsyncNotificationInfo.type' in found_struct}} type : cudaAsyncNotificationType - info : anon_union9 + {{endif}} + {{if 'cudaAsyncNotificationInfo.info' in found_struct}} + info : anon_union10 + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cyruntime.cudaAsyncNotificationInfo)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._info = anon_union9(_ptr=self._ptr) + pass + {{if 'cudaAsyncNotificationInfo.info' in found_struct}} + self._info = anon_union10(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaAsyncNotificationInfo.type' in found_struct}} try: str_list += ['type : ' + str(self.type)] except ValueError: str_list += ['type : '] + {{endif}} + {{if 'cudaAsyncNotificationInfo.info' in found_struct}} try: str_list += ['info :\n' + '\n'.join([' ' + line for line in str(self.info).splitlines()])] except ValueError: str_list += ['info : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaAsyncNotificationInfo.type' in found_struct}} @property def type(self): - return cudaAsyncNotificationType(self._ptr[0].type) + return cudaAsyncNotificationType(self._pvt_ptr[0].type) @type.setter def type(self, type not None : cudaAsyncNotificationType): - self._ptr[0].type = type.value + self._pvt_ptr[0].type = type.value + {{endif}} + {{if 'cudaAsyncNotificationInfo.info' in found_struct}} @property def info(self): return self._info @info.setter - def info(self, info not None : anon_union9): - string.memcpy(&self._ptr[0].info, info.getPtr(), sizeof(self._ptr[0].info)) + def info(self, info not None : anon_union10): + string.memcpy(&self._pvt_ptr[0].info, info.getPtr(), sizeof(self._pvt_ptr[0].info)) + {{endif}} {{endif}} -{{if 'struct cudaTextureDesc' in found_types}} +{{if 'cudaTextureDesc' in found_struct}} cdef class cudaTextureDesc: """ @@ -12912,186 +16717,263 @@ cdef class cudaTextureDesc: Attributes ---------- + {{if 'cudaTextureDesc.addressMode' in found_struct}} addressMode : List[cudaTextureAddressMode] Texture address mode for up to 3 dimensions + {{endif}} + {{if 'cudaTextureDesc.filterMode' in found_struct}} filterMode : cudaTextureFilterMode Texture filter mode + {{endif}} + {{if 'cudaTextureDesc.readMode' in found_struct}} readMode : cudaTextureReadMode Texture read mode + {{endif}} + {{if 'cudaTextureDesc.sRGB' in found_struct}} sRGB : int Perform sRGB->linear conversion during texture read + {{endif}} + {{if 'cudaTextureDesc.borderColor' in found_struct}} borderColor : List[float] Texture Border Color + {{endif}} + {{if 'cudaTextureDesc.normalizedCoords' in found_struct}} normalizedCoords : int Indicates whether texture reads are normalized or not + {{endif}} + {{if 'cudaTextureDesc.maxAnisotropy' in found_struct}} maxAnisotropy : unsigned int Limit to the anisotropy ratio + {{endif}} + {{if 'cudaTextureDesc.mipmapFilterMode' in found_struct}} mipmapFilterMode : cudaTextureFilterMode Mipmap filter mode + {{endif}} + {{if 'cudaTextureDesc.mipmapLevelBias' in found_struct}} mipmapLevelBias : float Offset applied to the supplied mipmap level + {{endif}} + {{if 'cudaTextureDesc.minMipmapLevelClamp' in found_struct}} minMipmapLevelClamp : float Lower end of the mipmap level range to clamp access to + {{endif}} + {{if 'cudaTextureDesc.maxMipmapLevelClamp' in found_struct}} maxMipmapLevelClamp : float Upper end of the mipmap level range to clamp access to + {{endif}} + {{if 'cudaTextureDesc.disableTrilinearOptimization' in found_struct}} disableTrilinearOptimization : int Disable any trilinear filtering optimizations. + {{endif}} + {{if 'cudaTextureDesc.seamlessCubemap' in found_struct}} seamlessCubemap : int Enable seamless cube map filtering. + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if 'cudaTextureDesc.addressMode' in found_struct}} try: str_list += ['addressMode : ' + str(self.addressMode)] except ValueError: str_list += ['addressMode : '] + {{endif}} + {{if 'cudaTextureDesc.filterMode' in found_struct}} try: str_list += ['filterMode : ' + str(self.filterMode)] except ValueError: str_list += ['filterMode : '] + {{endif}} + {{if 'cudaTextureDesc.readMode' in found_struct}} try: str_list += ['readMode : ' + str(self.readMode)] except ValueError: str_list += ['readMode : '] + {{endif}} + {{if 'cudaTextureDesc.sRGB' in found_struct}} try: str_list += ['sRGB : ' + str(self.sRGB)] except ValueError: str_list += ['sRGB : '] + {{endif}} + {{if 'cudaTextureDesc.borderColor' in found_struct}} try: str_list += ['borderColor : ' + str(self.borderColor)] except ValueError: str_list += ['borderColor : '] + {{endif}} + {{if 'cudaTextureDesc.normalizedCoords' in found_struct}} try: str_list += ['normalizedCoords : ' + str(self.normalizedCoords)] except ValueError: str_list += ['normalizedCoords : '] + {{endif}} + {{if 'cudaTextureDesc.maxAnisotropy' in found_struct}} try: str_list += ['maxAnisotropy : ' + str(self.maxAnisotropy)] except ValueError: str_list += ['maxAnisotropy : '] + {{endif}} + {{if 'cudaTextureDesc.mipmapFilterMode' in found_struct}} try: str_list += ['mipmapFilterMode : ' + str(self.mipmapFilterMode)] except ValueError: str_list += ['mipmapFilterMode : '] + {{endif}} + {{if 'cudaTextureDesc.mipmapLevelBias' in found_struct}} try: str_list += ['mipmapLevelBias : ' + str(self.mipmapLevelBias)] except ValueError: str_list += ['mipmapLevelBias : '] + {{endif}} + {{if 'cudaTextureDesc.minMipmapLevelClamp' in found_struct}} try: str_list += ['minMipmapLevelClamp : ' + str(self.minMipmapLevelClamp)] except ValueError: str_list += ['minMipmapLevelClamp : '] + {{endif}} + {{if 'cudaTextureDesc.maxMipmapLevelClamp' in found_struct}} try: str_list += ['maxMipmapLevelClamp : ' + str(self.maxMipmapLevelClamp)] except ValueError: str_list += ['maxMipmapLevelClamp : '] + {{endif}} + {{if 'cudaTextureDesc.disableTrilinearOptimization' in found_struct}} try: str_list += ['disableTrilinearOptimization : ' + str(self.disableTrilinearOptimization)] except ValueError: str_list += ['disableTrilinearOptimization : '] + {{endif}} + {{if 'cudaTextureDesc.seamlessCubemap' in found_struct}} try: str_list += ['seamlessCubemap : ' + str(self.seamlessCubemap)] except ValueError: str_list += ['seamlessCubemap : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if 'cudaTextureDesc.addressMode' in found_struct}} @property def addressMode(self): - return [cudaTextureAddressMode(_x) for _x in list(self._ptr[0].addressMode)] + return [cudaTextureAddressMode(_x) for _x in list(self._pvt_ptr[0].addressMode)] @addressMode.setter def addressMode(self, addressMode): - self._ptr[0].addressMode = [_x.value for _x in addressMode] + self._pvt_ptr[0].addressMode = [_x.value for _x in addressMode] + {{endif}} + {{if 'cudaTextureDesc.filterMode' in found_struct}} @property def filterMode(self): - return cudaTextureFilterMode(self._ptr[0].filterMode) + return cudaTextureFilterMode(self._pvt_ptr[0].filterMode) @filterMode.setter def filterMode(self, filterMode not None : cudaTextureFilterMode): - self._ptr[0].filterMode = filterMode.value + self._pvt_ptr[0].filterMode = filterMode.value + {{endif}} + {{if 'cudaTextureDesc.readMode' in found_struct}} @property def readMode(self): - return cudaTextureReadMode(self._ptr[0].readMode) + return cudaTextureReadMode(self._pvt_ptr[0].readMode) @readMode.setter def readMode(self, readMode not None : cudaTextureReadMode): - self._ptr[0].readMode = readMode.value + self._pvt_ptr[0].readMode = readMode.value + {{endif}} + {{if 'cudaTextureDesc.sRGB' in found_struct}} @property def sRGB(self): - return self._ptr[0].sRGB + return self._pvt_ptr[0].sRGB @sRGB.setter def sRGB(self, int sRGB): - self._ptr[0].sRGB = sRGB + self._pvt_ptr[0].sRGB = sRGB + {{endif}} + {{if 'cudaTextureDesc.borderColor' in found_struct}} @property def borderColor(self): - return self._ptr[0].borderColor + return self._pvt_ptr[0].borderColor @borderColor.setter def borderColor(self, borderColor): - self._ptr[0].borderColor = borderColor + self._pvt_ptr[0].borderColor = borderColor + {{endif}} + {{if 'cudaTextureDesc.normalizedCoords' in found_struct}} @property def normalizedCoords(self): - return self._ptr[0].normalizedCoords + return self._pvt_ptr[0].normalizedCoords @normalizedCoords.setter def normalizedCoords(self, int normalizedCoords): - self._ptr[0].normalizedCoords = normalizedCoords + self._pvt_ptr[0].normalizedCoords = normalizedCoords + {{endif}} + {{if 'cudaTextureDesc.maxAnisotropy' in found_struct}} @property def maxAnisotropy(self): - return self._ptr[0].maxAnisotropy + return self._pvt_ptr[0].maxAnisotropy @maxAnisotropy.setter def maxAnisotropy(self, unsigned int maxAnisotropy): - self._ptr[0].maxAnisotropy = maxAnisotropy + self._pvt_ptr[0].maxAnisotropy = maxAnisotropy + {{endif}} + {{if 'cudaTextureDesc.mipmapFilterMode' in found_struct}} @property def mipmapFilterMode(self): - return cudaTextureFilterMode(self._ptr[0].mipmapFilterMode) + return cudaTextureFilterMode(self._pvt_ptr[0].mipmapFilterMode) @mipmapFilterMode.setter def mipmapFilterMode(self, mipmapFilterMode not None : cudaTextureFilterMode): - self._ptr[0].mipmapFilterMode = mipmapFilterMode.value + self._pvt_ptr[0].mipmapFilterMode = mipmapFilterMode.value + {{endif}} + {{if 'cudaTextureDesc.mipmapLevelBias' in found_struct}} @property def mipmapLevelBias(self): - return self._ptr[0].mipmapLevelBias + return self._pvt_ptr[0].mipmapLevelBias @mipmapLevelBias.setter def mipmapLevelBias(self, float mipmapLevelBias): - self._ptr[0].mipmapLevelBias = mipmapLevelBias + self._pvt_ptr[0].mipmapLevelBias = mipmapLevelBias + {{endif}} + {{if 'cudaTextureDesc.minMipmapLevelClamp' in found_struct}} @property def minMipmapLevelClamp(self): - return self._ptr[0].minMipmapLevelClamp + return self._pvt_ptr[0].minMipmapLevelClamp @minMipmapLevelClamp.setter def minMipmapLevelClamp(self, float minMipmapLevelClamp): - self._ptr[0].minMipmapLevelClamp = minMipmapLevelClamp + self._pvt_ptr[0].minMipmapLevelClamp = minMipmapLevelClamp + {{endif}} + {{if 'cudaTextureDesc.maxMipmapLevelClamp' in found_struct}} @property def maxMipmapLevelClamp(self): - return self._ptr[0].maxMipmapLevelClamp + return self._pvt_ptr[0].maxMipmapLevelClamp @maxMipmapLevelClamp.setter def maxMipmapLevelClamp(self, float maxMipmapLevelClamp): - self._ptr[0].maxMipmapLevelClamp = maxMipmapLevelClamp + self._pvt_ptr[0].maxMipmapLevelClamp = maxMipmapLevelClamp + {{endif}} + {{if 'cudaTextureDesc.disableTrilinearOptimization' in found_struct}} @property def disableTrilinearOptimization(self): - return self._ptr[0].disableTrilinearOptimization + return self._pvt_ptr[0].disableTrilinearOptimization @disableTrilinearOptimization.setter def disableTrilinearOptimization(self, int disableTrilinearOptimization): - self._ptr[0].disableTrilinearOptimization = disableTrilinearOptimization + self._pvt_ptr[0].disableTrilinearOptimization = disableTrilinearOptimization + {{endif}} + {{if 'cudaTextureDesc.seamlessCubemap' in found_struct}} @property def seamlessCubemap(self): - return self._ptr[0].seamlessCubemap + return self._pvt_ptr[0].seamlessCubemap @seamlessCubemap.setter def seamlessCubemap(self, int seamlessCubemap): - self._ptr[0].seamlessCubemap = seamlessCubemap + self._pvt_ptr[0].seamlessCubemap = seamlessCubemap + {{endif}} {{endif}} {{if True}} @@ -13102,179 +16984,234 @@ cdef class cudaEglPlaneDesc_st: Attributes ---------- + {{if True}} width : unsigned int Width of plane + {{endif}} + {{if True}} height : unsigned int Height of plane + {{endif}} + {{if True}} depth : unsigned int Depth of plane + {{endif}} + {{if True}} pitch : unsigned int Pitch of plane + {{endif}} + {{if True}} numChannels : unsigned int Number of channels for the plane + {{endif}} + {{if True}} channelDesc : cudaChannelFormatDesc Channel Format Descriptor + {{endif}} + {{if True}} reserved : List[unsigned int] Reserved for future use + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._channelDesc = cudaChannelFormatDesc(_ptr=&self._ptr[0].channelDesc) + pass + {{if True}} + self._channelDesc = cudaChannelFormatDesc(_ptr=&self._pvt_ptr[0].channelDesc) + {{endif}} def __dealloc__(self): pass def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if True}} try: str_list += ['width : ' + str(self.width)] except ValueError: str_list += ['width : '] + {{endif}} + {{if True}} try: str_list += ['height : ' + str(self.height)] except ValueError: str_list += ['height : '] + {{endif}} + {{if True}} try: str_list += ['depth : ' + str(self.depth)] except ValueError: str_list += ['depth : '] + {{endif}} + {{if True}} try: str_list += ['pitch : ' + str(self.pitch)] except ValueError: str_list += ['pitch : '] + {{endif}} + {{if True}} try: str_list += ['numChannels : ' + str(self.numChannels)] except ValueError: str_list += ['numChannels : '] + {{endif}} + {{if True}} try: str_list += ['channelDesc :\n' + '\n'.join([' ' + line for line in str(self.channelDesc).splitlines()])] except ValueError: str_list += ['channelDesc : '] + {{endif}} + {{if True}} try: str_list += ['reserved : ' + str(self.reserved)] except ValueError: str_list += ['reserved : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if True}} @property def width(self): - return self._ptr[0].width + return self._pvt_ptr[0].width @width.setter def width(self, unsigned int width): - self._ptr[0].width = width + self._pvt_ptr[0].width = width + {{endif}} + {{if True}} @property def height(self): - return self._ptr[0].height + return self._pvt_ptr[0].height @height.setter def height(self, unsigned int height): - self._ptr[0].height = height + self._pvt_ptr[0].height = height + {{endif}} + {{if True}} @property def depth(self): - return self._ptr[0].depth + return self._pvt_ptr[0].depth @depth.setter def depth(self, unsigned int depth): - self._ptr[0].depth = depth + self._pvt_ptr[0].depth = depth + {{endif}} + {{if True}} @property def pitch(self): - return self._ptr[0].pitch + return self._pvt_ptr[0].pitch @pitch.setter def pitch(self, unsigned int pitch): - self._ptr[0].pitch = pitch + self._pvt_ptr[0].pitch = pitch + {{endif}} + {{if True}} @property def numChannels(self): - return self._ptr[0].numChannels + return self._pvt_ptr[0].numChannels @numChannels.setter def numChannels(self, unsigned int numChannels): - self._ptr[0].numChannels = numChannels + self._pvt_ptr[0].numChannels = numChannels + {{endif}} + {{if True}} @property def channelDesc(self): return self._channelDesc @channelDesc.setter def channelDesc(self, channelDesc not None : cudaChannelFormatDesc): - string.memcpy(&self._ptr[0].channelDesc, channelDesc.getPtr(), sizeof(self._ptr[0].channelDesc)) + string.memcpy(&self._pvt_ptr[0].channelDesc, channelDesc.getPtr(), sizeof(self._pvt_ptr[0].channelDesc)) + {{endif}} + {{if True}} @property def reserved(self): - return self._ptr[0].reserved + return self._pvt_ptr[0].reserved @reserved.setter def reserved(self, reserved): - self._ptr[0].reserved = reserved + self._pvt_ptr[0].reserved = reserved + {{endif}} {{endif}} {{if True}} -cdef class anon_union10: +cdef class anon_union11: """ Attributes ---------- + {{if True}} pArray : List[cudaArray_t] + {{endif}} + {{if True}} pPitch : List[cudaPitchedPtr] + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr): - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr): pass def __dealloc__(self): pass def getPtr(self): - return &self._ptr[0].frame + return &self._pvt_ptr[0].frame def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if True}} try: str_list += ['pArray : ' + str(self.pArray)] except ValueError: str_list += ['pArray : '] + {{endif}} + {{if True}} try: str_list += ['pPitch :\n' + '\n'.join([' ' + line for line in str(self.pPitch).splitlines()])] except ValueError: str_list += ['pPitch : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if True}} @property def pArray(self): - return [cudaArray_t(init_value=_pArray) for _pArray in self._ptr[0].frame.pArray] + return [cudaArray_t(init_value=_pArray) for _pArray in self._pvt_ptr[0].frame.pArray] @pArray.setter def pArray(self, pArray : List[cudaArray_t]): if len(pArray) != 3: raise IndexError('not enough values found during array assignment, expected 3, got', len(pArray)) pArray = [int(_pArray) for _pArray in pArray] for _idx, _pArray in enumerate(pArray): - self._ptr[0].frame.pArray[_idx] = _pArray + self._pvt_ptr[0].frame.pArray[_idx] = _pArray + {{endif}} + {{if True}} @property def pPitch(self): - out_pPitch = [cudaPitchedPtr() for _pPitch in self._ptr[0].frame.pPitch] + out_pPitch = [cudaPitchedPtr() for _pPitch in self._pvt_ptr[0].frame.pPitch] for _idx in range(len(out_pPitch)): - string.memcpy(out_pPitch[_idx].getPtr(), &self._ptr[0].frame.pPitch[_idx], sizeof(cyruntime.cudaPitchedPtr)) + string.memcpy(out_pPitch[_idx].getPtr(), &self._pvt_ptr[0].frame.pPitch[_idx], sizeof(cyruntime.cudaPitchedPtr)) return out_pPitch @pPitch.setter def pPitch(self, pPitch : List[cudaPitchedPtr]): if len(pPitch) != 3: raise IndexError('not enough values found during array assignment, expected 3, got', len(pPitch)) for _idx in range(len(pPitch)): - string.memcpy(&self._ptr[0].frame.pPitch[_idx], pPitch[_idx].getPtr(), sizeof(cyruntime.cudaPitchedPtr)) + string.memcpy(&self._pvt_ptr[0].frame.pPitch[_idx], pPitch[_idx].getPtr(), sizeof(cyruntime.cudaPitchedPtr)) + {{endif}} {{endif}} {{if True}} @@ -13291,99 +17228,131 @@ cdef class cudaEglFrame_st: Attributes ---------- - frame : anon_union10 + {{if True}} + frame : anon_union11 + {{endif}} + {{if True}} planeDesc : List[cudaEglPlaneDesc] CUDA EGL Plane Descriptor cudaEglPlaneDesc + {{endif}} + {{if True}} planeCount : unsigned int Number of planes + {{endif}} + {{if True}} frameType : cudaEglFrameType Array or Pitch + {{endif}} + {{if True}} eglColorFormat : cudaEglColorFormat CUDA EGL Color Format + {{endif}} Methods ------- getPtr() Get memory address of class instance - """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: self._val_ptr = calloc(1, sizeof(cyruntime.cudaEglFrame_st)) - self._ptr = self._val_ptr + self._pvt_ptr = self._val_ptr else: - self._ptr = _ptr + self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): - self._frame = anon_union10(_ptr=self._ptr) + pass + {{if True}} + self._frame = anon_union11(_ptr=self._pvt_ptr) + {{endif}} def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) def getPtr(self): - return self._ptr + return self._pvt_ptr def __repr__(self): - if self._ptr is not NULL: + if self._pvt_ptr is not NULL: str_list = [] + {{if True}} try: str_list += ['frame :\n' + '\n'.join([' ' + line for line in str(self.frame).splitlines()])] except ValueError: str_list += ['frame : '] + {{endif}} + {{if True}} try: str_list += ['planeDesc :\n' + '\n'.join([' ' + line for line in str(self.planeDesc).splitlines()])] except ValueError: str_list += ['planeDesc : '] + {{endif}} + {{if True}} try: str_list += ['planeCount : ' + str(self.planeCount)] except ValueError: str_list += ['planeCount : '] + {{endif}} + {{if True}} try: str_list += ['frameType : ' + str(self.frameType)] except ValueError: str_list += ['frameType : '] + {{endif}} + {{if True}} try: str_list += ['eglColorFormat : ' + str(self.eglColorFormat)] except ValueError: str_list += ['eglColorFormat : '] + {{endif}} return '\n'.join(str_list) else: return '' + {{if True}} @property def frame(self): return self._frame @frame.setter - def frame(self, frame not None : anon_union10): - string.memcpy(&self._ptr[0].frame, frame.getPtr(), sizeof(self._ptr[0].frame)) + def frame(self, frame not None : anon_union11): + string.memcpy(&self._pvt_ptr[0].frame, frame.getPtr(), sizeof(self._pvt_ptr[0].frame)) + {{endif}} + {{if True}} @property def planeDesc(self): - out_planeDesc = [cudaEglPlaneDesc() for _planeDesc in self._ptr[0].planeDesc] + out_planeDesc = [cudaEglPlaneDesc() for _planeDesc in self._pvt_ptr[0].planeDesc] for _idx in range(len(out_planeDesc)): - string.memcpy(out_planeDesc[_idx].getPtr(), &self._ptr[0].planeDesc[_idx], sizeof(cyruntime.cudaEglPlaneDesc)) + string.memcpy(out_planeDesc[_idx].getPtr(), &self._pvt_ptr[0].planeDesc[_idx], sizeof(cyruntime.cudaEglPlaneDesc)) return out_planeDesc @planeDesc.setter def planeDesc(self, planeDesc : List[cudaEglPlaneDesc]): if len(planeDesc) != 3: raise IndexError('not enough values found during array assignment, expected 3, got', len(planeDesc)) for _idx in range(len(planeDesc)): - string.memcpy(&self._ptr[0].planeDesc[_idx], planeDesc[_idx].getPtr(), sizeof(cyruntime.cudaEglPlaneDesc)) + string.memcpy(&self._pvt_ptr[0].planeDesc[_idx], planeDesc[_idx].getPtr(), sizeof(cyruntime.cudaEglPlaneDesc)) + {{endif}} + {{if True}} @property def planeCount(self): - return self._ptr[0].planeCount + return self._pvt_ptr[0].planeCount @planeCount.setter def planeCount(self, unsigned int planeCount): - self._ptr[0].planeCount = planeCount + self._pvt_ptr[0].planeCount = planeCount + {{endif}} + {{if True}} @property def frameType(self): - return cudaEglFrameType(self._ptr[0].frameType) + return cudaEglFrameType(self._pvt_ptr[0].frameType) @frameType.setter def frameType(self, frameType not None : cudaEglFrameType): - self._ptr[0].frameType = frameType.value + self._pvt_ptr[0].frameType = frameType.value + {{endif}} + {{if True}} @property def eglColorFormat(self): - return cudaEglColorFormat(self._ptr[0].eglColorFormat) + return cudaEglColorFormat(self._pvt_ptr[0].eglColorFormat) @eglColorFormat.setter def eglColorFormat(self, eglColorFormat not None : cudaEglColorFormat): - self._ptr[0].eglColorFormat = eglColorFormat.value + self._pvt_ptr[0].eglColorFormat = eglColorFormat.value + {{endif}} {{endif}} {{if 'cudaGraphConditionalHandle' in found_types}} @@ -13400,19 +17369,19 @@ cdef class cudaGraphConditionalHandle: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaSurfaceObject_t' in found_types}} @@ -13430,19 +17399,19 @@ cdef class cudaSurfaceObject_t: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaTextureObject_t' in found_types}} @@ -13460,19 +17429,19 @@ cdef class cudaTextureObject_t: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -13488,19 +17457,19 @@ cdef class GLenum: """ def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -13516,19 +17485,19 @@ cdef class GLuint: """ def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -13544,19 +17513,19 @@ cdef class EGLint: """ def __cinit__(self, unsigned int init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -13572,19 +17541,19 @@ cdef class VdpDevice: """ def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -13600,19 +17569,19 @@ cdef class VdpGetProcAddress: """ def __cinit__(self, unsigned long long init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -13628,19 +17597,19 @@ cdef class VdpVideoSurface: """ def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if True}} @@ -13656,19 +17625,19 @@ cdef class VdpOutputSurface: """ def __cinit__(self, uint32_t init_value = 0, void_ptr _ptr = 0): if _ptr == 0: - self._ptr = &self.__val + self._pvt_ptr = &self._pvt_val else: - self._ptr = _ptr + self._pvt_ptr = _ptr if init_value: - self._ptr[0] = init_value + self._pvt_ptr[0] = init_value def __dealloc__(self): pass def __repr__(self): return '' def __int__(self): - return self._ptr[0] + return self._pvt_ptr[0] def getPtr(self): - return self._ptr + return self._pvt_ptr {{endif}} {{if 'cudaDeviceReset' in found_functions}} @@ -13934,7 +17903,7 @@ def cudaDeviceGetTexture1DLinearMaxWidth(fmtDesc : Optional[cudaChannelFormatDes :py:obj:`~.cuDeviceGetTexture1DLinearMaxWidth` """ cdef size_t maxWidthInElements = 0 - cdef cyruntime.cudaChannelFormatDesc* cyfmtDesc_ptr = fmtDesc._ptr if fmtDesc != None else NULL + cdef cyruntime.cudaChannelFormatDesc* cyfmtDesc_ptr = fmtDesc._pvt_ptr if fmtDesc != None else NULL err = cyruntime.cudaDeviceGetTexture1DLinearMaxWidth(&maxWidthInElements, cyfmtDesc_ptr, device) return (cudaError_t(err), maxWidthInElements) {{endif}} @@ -14212,7 +18181,7 @@ def cudaIpcGetEventHandle(event): pevent = int(cudaEvent_t(event)) cyevent = pevent cdef cudaIpcEventHandle_t handle = cudaIpcEventHandle_t() - err = cyruntime.cudaIpcGetEventHandle(handle._ptr, cyevent) + err = cyruntime.cudaIpcGetEventHandle(handle._pvt_ptr, cyevent) return (cudaError_t(err), handle) {{endif}} @@ -14256,7 +18225,7 @@ def cudaIpcOpenEventHandle(handle not None : cudaIpcEventHandle_t): :py:obj:`~.cudaEventCreate`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaIpcGetEventHandle`, :py:obj:`~.cudaIpcGetMemHandle`, :py:obj:`~.cudaIpcOpenMemHandle`, :py:obj:`~.cudaIpcCloseMemHandle`, :py:obj:`~.cuIpcOpenEventHandle` """ cdef cudaEvent_t event = cudaEvent_t() - err = cyruntime.cudaIpcOpenEventHandle(event._ptr, handle._ptr[0]) + err = cyruntime.cudaIpcOpenEventHandle(event._pvt_ptr, handle._pvt_ptr[0]) return (cudaError_t(err), event) {{endif}} @@ -14303,7 +18272,7 @@ def cudaIpcGetMemHandle(devPtr): cdef cudaIpcMemHandle_t handle = cudaIpcMemHandle_t() cydevPtr = utils.HelperInputVoidPtr(devPtr) cdef void* cydevPtr_ptr = cydevPtr.cptr - err = cyruntime.cudaIpcGetMemHandle(handle._ptr, cydevPtr_ptr) + err = cyruntime.cudaIpcGetMemHandle(handle._pvt_ptr, cydevPtr_ptr) return (cudaError_t(err), handle) {{endif}} @@ -14373,7 +18342,7 @@ def cudaIpcOpenMemHandle(handle not None : cudaIpcMemHandle_t, unsigned int flag In particular, multiple processes may not receive the same address for the same `handle`. """ cdef void_ptr devPtr = 0 - err = cyruntime.cudaIpcOpenMemHandle(&devPtr, handle._ptr[0], flags) + err = cyruntime.cudaIpcOpenMemHandle(&devPtr, handle._pvt_ptr[0], flags) return (cudaError_t(err), devPtr) {{endif}} @@ -14518,7 +18487,7 @@ def cudaDeviceRegisterAsyncNotification(int device, callbackFunc, userData): cyuserData = utils.HelperInputVoidPtr(userData) cdef void* cyuserData_ptr = cyuserData.cptr cdef cudaAsyncCallbackHandle_t callback = cudaAsyncCallbackHandle_t() - err = cyruntime.cudaDeviceRegisterAsyncNotification(device, cycallbackFunc, cyuserData_ptr, callback._ptr) + err = cyruntime.cudaDeviceRegisterAsyncNotification(device, cycallbackFunc, cyuserData_ptr, callback._pvt_ptr) return (cudaError_t(err), callback) {{endif}} @@ -15112,21 +19081,17 @@ def cudaGetDeviceProperties(int device): Parameters ---------- device : int - Device number to get properties for + None Returns ------- cudaError_t - :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDevice` - prop : :py:obj:`~.cudaDeviceProp` - Properties for the specified device - See Also - -------- - :py:obj:`~.cudaGetDeviceCount`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaChooseDevice`, :py:obj:`~.cudaDeviceGetAttribute`, :py:obj:`~.cudaInitDevice`, :py:obj:`~.cuDeviceGetAttribute`, :py:obj:`~.cuDeviceGetName` + prop : :py:obj:`~.cudaDeviceProp` + None """ cdef cudaDeviceProp prop = cudaDeviceProp() - err = cyruntime.cudaGetDeviceProperties(prop._ptr, device) + err = cyruntime.cudaGetDeviceProperties(prop._pvt_ptr, device) return (cudaError_t(err), prop) {{endif}} @@ -15476,6 +19441,12 @@ def cudaDeviceGetAttribute(attr not None : cudaDeviceAttr, int device): - :py:obj:`~.cudaDevAttrNumaId`: NUMA node ID of the GPU memory + - :py:obj:`~.cudaDevAttrGpuPciDeviceId`: The combined 16-bit PCI device + ID and 16-bit PCI vendor ID. + + - :py:obj:`~.cudaDevAttrGpuPciSubsystemId`: The combined 16-bit PCI + subsystem ID and 16-bit PCI vendor subsystem ID. + Parameters ---------- attr : :py:obj:`~.cudaDeviceAttr` @@ -15527,7 +19498,7 @@ def cudaDeviceGetDefaultMemPool(int device): """ cdef cudaMemPool_t memPool = cudaMemPool_t() with nogil: - err = cyruntime.cudaDeviceGetDefaultMemPool(memPool._ptr, device) + err = cyruntime.cudaDeviceGetDefaultMemPool(memPool._pvt_ptr, device) return (cudaError_t(err), memPool) {{endif}} @@ -15610,7 +19581,7 @@ def cudaDeviceGetMemPool(int device): """ cdef cudaMemPool_t memPool = cudaMemPool_t() with nogil: - err = cyruntime.cudaDeviceGetMemPool(memPool._ptr, device) + err = cyruntime.cudaDeviceGetMemPool(memPool._pvt_ptr, device) return (cudaError_t(err), memPool) {{endif}} @@ -15783,7 +19754,7 @@ def cudaChooseDevice(prop : Optional[cudaDeviceProp]): :py:obj:`~.cudaGetDeviceCount`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaGetDeviceProperties`, :py:obj:`~.cudaInitDevice` """ cdef int device = 0 - cdef cyruntime.cudaDeviceProp* cyprop_ptr = prop._ptr if prop != None else NULL + cdef cyruntime.cudaDeviceProp* cyprop_ptr = prop._pvt_ptr if prop != None else NULL err = cyruntime.cudaChooseDevice(&device, cyprop_ptr) return (cudaError_t(err), device) {{endif}} @@ -16063,10 +20034,10 @@ def cudaStreamCreate(): See Also -------- - :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamGetPriority`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cuStreamCreate` + :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamGetPriority`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cudaStreamGetDevice`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cuStreamCreate` """ cdef cudaStream_t pStream = cudaStream_t() - err = cyruntime.cudaStreamCreate(pStream._ptr) + err = cyruntime.cudaStreamCreate(pStream._pvt_ptr) return (cudaError_t(err), pStream) {{endif}} @@ -16104,10 +20075,10 @@ def cudaStreamCreateWithFlags(unsigned int flags): See Also -------- - :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cuStreamCreate` + :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cudaStreamGetDevice`, :py:obj:`~.cudaStreamQuery`, :py:obj:`~.cudaStreamSynchronize`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cudaStreamAddCallback`, :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaStreamDestroy`, :py:obj:`~.cuStreamCreate` """ cdef cudaStream_t pStream = cudaStream_t() - err = cyruntime.cudaStreamCreateWithFlags(pStream._ptr, flags) + err = cyruntime.cudaStreamCreateWithFlags(pStream._pvt_ptr, flags) return (cudaError_t(err), pStream) {{endif}} @@ -16165,7 +20136,7 @@ def cudaStreamCreateWithPriority(unsigned int flags, int priority): In the current implementation, only compute kernels launched in priority streams are affected by the stream's priority. Stream priorities have no effect on host-to-device and device-to-host memory operations. """ cdef cudaStream_t pStream = cudaStream_t() - err = cyruntime.cudaStreamCreateWithPriority(pStream._ptr, flags, priority) + err = cyruntime.cudaStreamCreateWithPriority(pStream._pvt_ptr, flags, priority) return (cudaError_t(err), pStream) {{endif}} @@ -16197,7 +20168,7 @@ def cudaStreamGetPriority(hStream): See Also -------- - :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaDeviceGetStreamPriorityRange`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cuStreamGetPriority` + :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaDeviceGetStreamPriorityRange`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cudaStreamGetDevice`, :py:obj:`~.cuStreamGetPriority` """ cdef cyruntime.cudaStream_t cyhStream if hStream is None: @@ -16237,7 +20208,7 @@ def cudaStreamGetFlags(hStream): See Also -------- - :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamGetPriority`, :py:obj:`~.cuStreamGetFlags` + :py:obj:`~.cudaStreamCreateWithPriority`, :py:obj:`~.cudaStreamCreateWithFlags`, :py:obj:`~.cudaStreamGetPriority`, :py:obj:`~.cudaStreamGetDevice`, :py:obj:`~.cuStreamGetFlags` """ cdef cyruntime.cudaStream_t cyhStream if hStream is None: @@ -16307,6 +20278,44 @@ def cudaStreamGetId(hStream): return (cudaError_t(err), streamId) {{endif}} +{{if 'cudaStreamGetDevice' in found_functions}} + +@cython.embedsignature(True) +def cudaStreamGetDevice(hStream): + """ Query the device of a stream. + + Returns in `*device` the device of the stream. + + Parameters + ---------- + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + Handle to the stream to be queried + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorDeviceUnavailable`, + device : int + Returns the device to which the stream belongs + + See Also + -------- + :py:obj:`~.cudaSetDevice`, :py:obj:`~.cudaGetDevice`, :py:obj:`~.cudaStreamCreate`, :py:obj:`~.cudaStreamGetPriority`, :py:obj:`~.cudaStreamGetFlags`, :py:obj:`~.cuStreamGetId` + """ + cdef cyruntime.cudaStream_t cyhStream + if hStream is None: + cyhStream = 0 + elif isinstance(hStream, (cudaStream_t,driver.CUstream)): + phStream = int(hStream) + cyhStream = phStream + else: + phStream = int(cudaStream_t(hStream)) + cyhStream = phStream + cdef int device = 0 + err = cyruntime.cudaStreamGetDevice(cyhStream, &device) + return (cudaError_t(err), device) +{{endif}} + {{if 'cudaCtxResetPersistingL2Cache' in found_functions}} @cython.embedsignature(True) @@ -16414,7 +20423,7 @@ def cudaStreamGetAttribute(hStream, attr not None : cudaStreamAttrID): cyhStream = phStream cdef cyruntime.cudaStreamAttrID cyattr = attr.value cdef cudaStreamAttrValue value_out = cudaStreamAttrValue() - err = cyruntime.cudaStreamGetAttribute(cyhStream, cyattr, value_out._ptr) + err = cyruntime.cudaStreamGetAttribute(cyhStream, cyattr, value_out._pvt_ptr) return (cudaError_t(err), value_out) {{endif}} @@ -16456,7 +20465,7 @@ def cudaStreamSetAttribute(hStream, attr not None : cudaStreamAttrID, value : Op phStream = int(cudaStream_t(hStream)) cyhStream = phStream cdef cyruntime.cudaStreamAttrID cyattr = attr.value - cdef cyruntime.cudaStreamAttrValue* cyvalue_ptr = value._ptr if value != None else NULL + cdef cyruntime.cudaStreamAttrValue* cyvalue_ptr = value._pvt_ptr if value != None else NULL err = cyruntime.cudaStreamSetAttribute(cyhStream, cyattr, cyvalue_ptr) return (cudaError_t(err),) {{endif}} @@ -16991,17 +21000,17 @@ def cudaStreamBeginCaptureToGraph(stream, graph, dependencies : Optional[Tuple[c raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] cdef cyruntime.cudaGraphEdgeData* cydependencyData = NULL if len(dependencyData) > 0: cydependencyData = calloc(len(dependencyData), sizeof(cyruntime.cudaGraphEdgeData)) if cydependencyData is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) for idx in range(len(dependencyData)): - string.memcpy(&cydependencyData[idx], (dependencyData[idx])._ptr, sizeof(cyruntime.cudaGraphEdgeData)) + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cyruntime.cudaGraphEdgeData)) if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) cdef cyruntime.cudaStreamCaptureMode cymode = mode.value - err = cyruntime.cudaStreamBeginCaptureToGraph(cystream, cygraph, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, (dependencyData[0])._ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, cymode) + err = cyruntime.cudaStreamBeginCaptureToGraph(cystream, cygraph, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, (dependencyData[0])._pvt_ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, cymode) if cydependencies is not NULL: free(cydependencies) if cydependencyData is not NULL: @@ -17122,7 +21131,7 @@ def cudaStreamEndCapture(stream): pstream = int(cudaStream_t(stream)) cystream = pstream cdef cudaGraph_t pGraph = cudaGraph_t() - err = cyruntime.cudaStreamEndCapture(cystream, pGraph._ptr) + err = cyruntime.cudaStreamEndCapture(cystream, pGraph._pvt_ptr) return (cudaError_t(err), pGraph) {{endif}} @@ -17262,7 +21271,7 @@ def cudaStreamGetCaptureInfo(stream): cdef const cyruntime.cudaGraphNode_t* cydependencies_out = NULL pydependencies_out = [] cdef size_t numDependencies_out = 0 - err = cyruntime.cudaStreamGetCaptureInfo(cystream, &captureStatus_out, &id_out, graph_out._ptr, &cydependencies_out, &numDependencies_out) + err = cyruntime.cudaStreamGetCaptureInfo(cystream, &captureStatus_out, &id_out, graph_out._pvt_ptr, &cydependencies_out, &numDependencies_out) if cudaError_t(err) == cudaError_t(0): pydependencies_out = [cudaGraphNode_t(init_value=cydependencies_out[idx]) for idx in range(numDependencies_out)] return (cudaError_t(err), cudaStreamCaptureStatus(captureStatus_out), id_out, graph_out, pydependencies_out, numDependencies_out) @@ -17358,7 +21367,7 @@ def cudaStreamGetCaptureInfo_v3(stream): cdef const cyruntime.cudaGraphEdgeData* cyedgeData_out = NULL pyedgeData_out = [] cdef size_t numDependencies_out = 0 - err = cyruntime.cudaStreamGetCaptureInfo_v3(cystream, &captureStatus_out, &id_out, graph_out._ptr, &cydependencies_out, &cyedgeData_out, &numDependencies_out) + err = cyruntime.cudaStreamGetCaptureInfo_v3(cystream, &captureStatus_out, &id_out, graph_out._pvt_ptr, &cydependencies_out, &cyedgeData_out, &numDependencies_out) if cudaError_t(err) == cudaError_t(0): pydependencies_out = [cudaGraphNode_t(init_value=cydependencies_out[idx]) for idx in range(numDependencies_out)] if cudaError_t(err) == cudaError_t(0): @@ -17432,9 +21441,9 @@ def cudaStreamUpdateCaptureDependencies(stream, dependencies : Optional[Tuple[cu raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] if numDependencies > len(dependencies): raise RuntimeError("List is too small: " + str(len(dependencies)) + " < " + str(numDependencies)) - err = cyruntime.cudaStreamUpdateCaptureDependencies(cystream, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, numDependencies, flags) + err = cyruntime.cudaStreamUpdateCaptureDependencies(cystream, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, numDependencies, flags) if cydependencies is not NULL: free(cydependencies) return (cudaError_t(err),) @@ -17507,15 +21516,15 @@ def cudaStreamUpdateCaptureDependencies_v2(stream, dependencies : Optional[Tuple raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(dependencies)): - cydependencies[idx] = (dependencies[idx])._ptr[0] + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] cdef cyruntime.cudaGraphEdgeData* cydependencyData = NULL if len(dependencyData) > 0: cydependencyData = calloc(len(dependencyData), sizeof(cyruntime.cudaGraphEdgeData)) if cydependencyData is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) for idx in range(len(dependencyData)): - string.memcpy(&cydependencyData[idx], (dependencyData[idx])._ptr, sizeof(cyruntime.cudaGraphEdgeData)) - err = cyruntime.cudaStreamUpdateCaptureDependencies_v2(cystream, (dependencies[0])._ptr if len(dependencies) == 1 else cydependencies, (dependencyData[0])._ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, flags) + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cyruntime.cudaGraphEdgeData)) + err = cyruntime.cudaStreamUpdateCaptureDependencies_v2(cystream, (dependencies[0])._pvt_ptr if len(dependencies) == 1 else cydependencies, (dependencyData[0])._pvt_ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, flags) if cydependencies is not NULL: free(cydependencies) if cydependencyData is not NULL: @@ -17544,7 +21553,7 @@ def cudaEventCreate(): cudaEventCreate (C++ API), :py:obj:`~.cudaEventCreateWithFlags`, :py:obj:`~.cudaEventRecord`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventElapsedTime`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cuEventCreate` """ cdef cudaEvent_t event = cudaEvent_t() - err = cyruntime.cudaEventCreate(event._ptr) + err = cyruntime.cudaEventCreate(event._pvt_ptr) return (cudaError_t(err), event) {{endif}} @@ -17593,7 +21602,7 @@ def cudaEventCreateWithFlags(unsigned int flags): :py:obj:`~.cudaEventCreate (C API)`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventElapsedTime`, :py:obj:`~.cudaStreamWaitEvent`, :py:obj:`~.cuEventCreate` """ cdef cudaEvent_t event = cudaEvent_t() - err = cyruntime.cudaEventCreateWithFlags(event._ptr, flags) + err = cyruntime.cudaEventCreateWithFlags(event._pvt_ptr, flags) return (cudaError_t(err), event) {{endif}} @@ -17924,6 +21933,78 @@ def cudaEventElapsedTime(start, end): return (cudaError_t(err), ms) {{endif}} +{{if 'cudaEventElapsedTime_v2' in found_functions}} + +@cython.embedsignature(True) +def cudaEventElapsedTime_v2(start, end): + """ Computes the elapsed time between events. + + Computes the elapsed time between two events (in milliseconds with a + resolution of around 0.5 microseconds). Note this API is not guaranteed + to return the latest errors for pending work. As such this API is + intended to serve as a elapsed time calculation only and polling for + completion on the events to be compared should be done with + :py:obj:`~.cudaEventQuery` instead. + + If either event was last recorded in a non-NULL stream, the resulting + time may be greater than expected (even if both used the same stream + handle). This happens because the :py:obj:`~.cudaEventRecord()` + operation takes place asynchronously and there is no guarantee that the + measured latency is actually just between the two events. Any number of + other different stream operations could execute in between the two + measured events, thus altering the timing in a significant way. + + If :py:obj:`~.cudaEventRecord()` has not been called on either event, + then :py:obj:`~.cudaErrorInvalidResourceHandle` is returned. If + :py:obj:`~.cudaEventRecord()` has been called on both events but one or + both of them has not yet been completed (that is, + :py:obj:`~.cudaEventQuery()` would return :py:obj:`~.cudaErrorNotReady` + on at least one of the events), :py:obj:`~.cudaErrorNotReady` is + returned. If either event was created with the + :py:obj:`~.cudaEventDisableTiming` flag, then this function will return + :py:obj:`~.cudaErrorInvalidResourceHandle`. + + Parameters + ---------- + start : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Starting event + end : :py:obj:`~.CUevent` or :py:obj:`~.cudaEvent_t` + Ending event + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorNotReady`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorLaunchFailure`, :py:obj:`~.cudaErrorUnknown` + ms : float + Time between `start` and `end` in ms + + See Also + -------- + :py:obj:`~.cudaEventCreate (C API)`, :py:obj:`~.cudaEventCreateWithFlags`, :py:obj:`~.cudaEventQuery`, :py:obj:`~.cudaEventSynchronize`, :py:obj:`~.cudaEventDestroy`, :py:obj:`~.cudaEventRecord`, :py:obj:`~.cuEventElapsedTime` + """ + cdef cyruntime.cudaEvent_t cyend + if end is None: + cyend = 0 + elif isinstance(end, (cudaEvent_t,driver.CUevent)): + pend = int(end) + cyend = pend + else: + pend = int(cudaEvent_t(end)) + cyend = pend + cdef cyruntime.cudaEvent_t cystart + if start is None: + cystart = 0 + elif isinstance(start, (cudaEvent_t,driver.CUevent)): + pstart = int(start) + cystart = pstart + else: + pstart = int(cudaEvent_t(start)) + cystart = pstart + cdef float ms = 0 + err = cyruntime.cudaEventElapsedTime_v2(&ms, cystart, cyend) + return (cudaError_t(err), ms) +{{endif}} + {{if 'cudaImportExternalMemory' in found_functions}} @cython.embedsignature(True) @@ -18070,8 +22151,8 @@ def cudaImportExternalMemory(memHandleDesc : Optional[cudaExternalMemoryHandleDe and Cache Control" chapter from Vulkan specification. """ cdef cudaExternalMemory_t extMem_out = cudaExternalMemory_t() - cdef cyruntime.cudaExternalMemoryHandleDesc* cymemHandleDesc_ptr = memHandleDesc._ptr if memHandleDesc != None else NULL - err = cyruntime.cudaImportExternalMemory(extMem_out._ptr, cymemHandleDesc_ptr) + cdef cyruntime.cudaExternalMemoryHandleDesc* cymemHandleDesc_ptr = memHandleDesc._pvt_ptr if memHandleDesc != None else NULL + err = cyruntime.cudaImportExternalMemory(extMem_out._pvt_ptr, cymemHandleDesc_ptr) return (cudaError_t(err), extMem_out) {{endif}} @@ -18136,7 +22217,7 @@ def cudaExternalMemoryGetMappedBuffer(extMem, bufferDesc : Optional[cudaExternal pextMem = int(cudaExternalMemory_t(extMem)) cyextMem = pextMem cdef void_ptr devPtr = 0 - cdef cyruntime.cudaExternalMemoryBufferDesc* cybufferDesc_ptr = bufferDesc._ptr if bufferDesc != None else NULL + cdef cyruntime.cudaExternalMemoryBufferDesc* cybufferDesc_ptr = bufferDesc._pvt_ptr if bufferDesc != None else NULL err = cyruntime.cudaExternalMemoryGetMappedBuffer(&devPtr, cyextMem, cybufferDesc_ptr) return (cudaError_t(err), devPtr) {{endif}} @@ -18206,8 +22287,8 @@ def cudaExternalMemoryGetMappedMipmappedArray(extMem, mipmapDesc : Optional[cuda pextMem = int(cudaExternalMemory_t(extMem)) cyextMem = pextMem cdef cudaMipmappedArray_t mipmap = cudaMipmappedArray_t() - cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc* cymipmapDesc_ptr = mipmapDesc._ptr if mipmapDesc != None else NULL - err = cyruntime.cudaExternalMemoryGetMappedMipmappedArray(mipmap._ptr, cyextMem, cymipmapDesc_ptr) + cdef cyruntime.cudaExternalMemoryMipmappedArrayDesc* cymipmapDesc_ptr = mipmapDesc._pvt_ptr if mipmapDesc != None else NULL + err = cyruntime.cudaExternalMemoryGetMappedMipmappedArray(mipmap._pvt_ptr, cyextMem, cymipmapDesc_ptr) return (cudaError_t(err), mipmap) {{endif}} @@ -18390,8 +22471,8 @@ def cudaImportExternalSemaphore(semHandleDesc : Optional[cudaExternalSemaphoreHa :py:obj:`~.cudaDestroyExternalSemaphore`, :py:obj:`~.cudaSignalExternalSemaphoresAsync`, :py:obj:`~.cudaWaitExternalSemaphoresAsync` """ cdef cudaExternalSemaphore_t extSem_out = cudaExternalSemaphore_t() - cdef cyruntime.cudaExternalSemaphoreHandleDesc* cysemHandleDesc_ptr = semHandleDesc._ptr if semHandleDesc != None else NULL - err = cyruntime.cudaImportExternalSemaphore(extSem_out._ptr, cysemHandleDesc_ptr) + cdef cyruntime.cudaExternalSemaphoreHandleDesc* cysemHandleDesc_ptr = semHandleDesc._pvt_ptr if semHandleDesc != None else NULL + err = cyruntime.cudaImportExternalSemaphore(extSem_out._pvt_ptr, cysemHandleDesc_ptr) return (cudaError_t(err), extSem_out) {{endif}} @@ -18513,17 +22594,17 @@ def cudaSignalExternalSemaphoresAsync(extSemArray : Optional[Tuple[cudaExternalS raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) else: for idx in range(len(extSemArray)): - cyextSemArray[idx] = (extSemArray[idx])._ptr[0] + cyextSemArray[idx] = (extSemArray[idx])._pvt_ptr[0] cdef cyruntime.cudaExternalSemaphoreSignalParams* cyparamsArray = NULL if len(paramsArray) > 0: cyparamsArray = calloc(len(paramsArray), sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) if cyparamsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreSignalParams))) for idx in range(len(paramsArray)): - string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._ptr, sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) + string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreSignalParams)) if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems)) if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems)) - err = cyruntime.cudaSignalExternalSemaphoresAsync((extSemArray[0])._ptr if len(extSemArray) == 1 else cyextSemArray, (paramsArray[0])._ptr if len(paramsArray) == 1 else cyparamsArray, numExtSems, cystream) + err = cyruntime.cudaSignalExternalSemaphoresAsync((extSemArray[0])._pvt_ptr if len(extSemArray) == 1 else cyextSemArray, (paramsArray[0])._pvt_ptr if len(paramsArray) == 1 else cyparamsArray, numExtSems, cystream) if cyextSemArray is not NULL: free(cyextSemArray) if cyparamsArray is not NULL: @@ -18638,17 +22719,17 @@ def cudaWaitExternalSemaphoresAsync(extSemArray : Optional[Tuple[cudaExternalSem raise MemoryError('Failed to allocate length x size memory: ' + str(len(extSemArray)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphore_t))) else: for idx in range(len(extSemArray)): - cyextSemArray[idx] = (extSemArray[idx])._ptr[0] + cyextSemArray[idx] = (extSemArray[idx])._pvt_ptr[0] cdef cyruntime.cudaExternalSemaphoreWaitParams* cyparamsArray = NULL if len(paramsArray) > 0: cyparamsArray = calloc(len(paramsArray), sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) if cyparamsArray is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(paramsArray)) + 'x' + str(sizeof(cyruntime.cudaExternalSemaphoreWaitParams))) for idx in range(len(paramsArray)): - string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._ptr, sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) + string.memcpy(&cyparamsArray[idx], (paramsArray[idx])._pvt_ptr, sizeof(cyruntime.cudaExternalSemaphoreWaitParams)) if numExtSems > len(extSemArray): raise RuntimeError("List is too small: " + str(len(extSemArray)) + " < " + str(numExtSems)) if numExtSems > len(paramsArray): raise RuntimeError("List is too small: " + str(len(paramsArray)) + " < " + str(numExtSems)) - err = cyruntime.cudaWaitExternalSemaphoresAsync((extSemArray[0])._ptr if len(extSemArray) == 1 else cyextSemArray, (paramsArray[0])._ptr if len(paramsArray) == 1 else cyparamsArray, numExtSems, cystream) + err = cyruntime.cudaWaitExternalSemaphoresAsync((extSemArray[0])._pvt_ptr if len(extSemArray) == 1 else cyextSemArray, (paramsArray[0])._pvt_ptr if len(paramsArray) == 1 else cyparamsArray, numExtSems, cystream) if cyextSemArray is not NULL: free(cyextSemArray) if cyparamsArray is not NULL: @@ -18747,6 +22828,10 @@ def cudaFuncSetCacheConfig(func, cacheConfig not None : cudaFuncCache): See Also -------- cudaFuncSetCacheConfig (C++ API), :py:obj:`~.cudaFuncGetAttributes (C API)`, :py:obj:`~.cudaLaunchKernel (C API)`, :py:obj:`~.cuFuncSetCacheConfig` + + Notes + ----- + This API does not accept a :py:obj:`~.cudaKernel_t` casted as void*. If cache config modification is required for a :py:obj:`~.cudaKernel_t` (or a global function), it can be replaced with a call to :py:obj:`~.cudaFuncSetAttributes` with the attribute :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout` to specify a more granular L1 cache and shared memory split configuration. """ cyfunc = utils.HelperInputVoidPtr(func) cdef void* cyfunc_ptr = cyfunc.cptr @@ -18764,9 +22849,9 @@ def cudaFuncGetAttributes(func): This function obtains the attributes of a function specified via `func`. `func` is a device function symbol and must be declared as a `None` function. The fetched attributes are placed in `attr`. If the - specified function does not exist, then - :py:obj:`~.cudaErrorInvalidDeviceFunction` is returned. For templated - functions, pass the function symbol as follows: + specified function does not exist, then it is assumed to be a + :py:obj:`~.cudaKernel_t` and used as is. For templated functions, pass + the function symbol as follows: func_name Note that some function attributes such as @@ -18792,7 +22877,7 @@ def cudaFuncGetAttributes(func): cdef cudaFuncAttributes attr = cudaFuncAttributes() cyfunc = utils.HelperInputVoidPtr(func) cdef void* cyfunc_ptr = cyfunc.cptr - err = cyruntime.cudaFuncGetAttributes(attr._ptr, cyfunc_ptr) + err = cyruntime.cudaFuncGetAttributes(attr._pvt_ptr, cyfunc_ptr) return (cudaError_t(err), attr) {{endif}} @@ -18806,8 +22891,8 @@ def cudaFuncSetAttribute(func, attr not None : cudaFuncAttribute, int value): The parameter `func` must be a pointer to a function that executes on the device. The parameter specified by `func` must be declared as a `None` function. The enumeration defined by `attr` is set to the value - defined by `value`. If the specified function does not exist, then - :py:obj:`~.cudaErrorInvalidDeviceFunction` is returned. If the + defined by `value`. If the specified function does not exist, then it + is assumed to be a :py:obj:`~.cudaKernel_t` and used as is. If the specified attribute cannot be written, or if the value is incorrect, then :py:obj:`~.cudaErrorInvalidValue` is returned. @@ -19501,9 +23586,9 @@ def cudaMallocArray(desc : Optional[cudaChannelFormatDesc], size_t width, size_t :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.cuArrayCreate` """ cdef cudaArray_t array = cudaArray_t() - cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._ptr if desc != None else NULL + cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc != None else NULL with nogil: - err = cyruntime.cudaMallocArray(array._ptr, cydesc_ptr, width, height, flags) + err = cyruntime.cudaMallocArray(array._pvt_ptr, cydesc_ptr, width, height, flags) return (cudaError_t(err), array) {{endif}} @@ -19804,10 +23889,11 @@ def cudaHostRegister(ptr, size_t size, unsigned int flags): :py:obj:`~.cudaDevAttrPageableMemoryAccessUsesHostPageTables`, this flag is required in order to register memory mapped to the CPU as read-only. Support for the use of this flag can be queried from the - device attribute cudaDeviceAttrReadOnlyHostRegisterSupported. Using - this flag with a current context associated with a device that does - not have this attribute set will cause :py:obj:`~.cudaHostRegister` - to error with cudaErrorNotSupported. + device attribute + :py:obj:`~.cudaDevAttrHostRegisterReadOnlySupported`. Using this flag + with a current context associated with a device that does not have + this attribute set will cause :py:obj:`~.cudaHostRegister` to error + with cudaErrorNotSupported. All of these flags are orthogonal to one another: a developer may page- lock memory that is portable or mapped with no restrictions. @@ -20035,7 +24121,7 @@ def cudaMalloc3D(extent not None : cudaExtent): :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaMemcpy3D`, :py:obj:`~.cudaMemset3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaMallocArray`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.make_cudaPitchedPtr`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.cuMemAllocPitch` """ cdef cudaPitchedPtr pitchedDevPtr = cudaPitchedPtr() - err = cyruntime.cudaMalloc3D(pitchedDevPtr._ptr, extent._ptr[0]) + err = cyruntime.cudaMalloc3D(pitchedDevPtr._pvt_ptr, extent._pvt_ptr[0]) return (cudaError_t(err), pitchedDevPtr) {{endif}} @@ -20154,9 +24240,9 @@ def cudaMalloc3DArray(desc : Optional[cudaChannelFormatDesc], extent not None : :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.cuArray3DCreate` """ cdef cudaArray_t array = cudaArray_t() - cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._ptr if desc != None else NULL + cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc != None else NULL with nogil: - err = cyruntime.cudaMalloc3DArray(array._ptr, cydesc_ptr, extent._ptr[0], flags) + err = cyruntime.cudaMalloc3DArray(array._pvt_ptr, cydesc_ptr, extent._pvt_ptr[0], flags) return (cudaError_t(err), array) {{endif}} @@ -20279,8 +24365,8 @@ def cudaMallocMipmappedArray(desc : Optional[cudaChannelFormatDesc], extent not :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc`, :py:obj:`~.cudaMallocPitch`, :py:obj:`~.cudaFree`, :py:obj:`~.cudaFreeArray`, :py:obj:`~.cudaMallocHost (C API)`, :py:obj:`~.cudaFreeHost`, :py:obj:`~.cudaHostAlloc`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.cuMipmappedArrayCreate` """ cdef cudaMipmappedArray_t mipmappedArray = cudaMipmappedArray_t() - cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._ptr if desc != None else NULL - err = cyruntime.cudaMallocMipmappedArray(mipmappedArray._ptr, cydesc_ptr, extent._ptr[0], numLevels, flags) + cdef cyruntime.cudaChannelFormatDesc* cydesc_ptr = desc._pvt_ptr if desc != None else NULL + err = cyruntime.cudaMallocMipmappedArray(mipmappedArray._pvt_ptr, cydesc_ptr, extent._pvt_ptr[0], numLevels, flags) return (cudaError_t(err), mipmappedArray) {{endif}} @@ -20327,7 +24413,7 @@ def cudaGetMipmappedArrayLevel(mipmappedArray, unsigned int level): pmipmappedArray = int(cudaMipmappedArray_const_t(mipmappedArray)) cymipmappedArray = pmipmappedArray cdef cudaArray_t levelArray = cudaArray_t() - err = cyruntime.cudaGetMipmappedArrayLevel(levelArray._ptr, cymipmappedArray, level) + err = cyruntime.cudaGetMipmappedArrayLevel(levelArray._pvt_ptr, cymipmappedArray, level) return (cudaError_t(err), levelArray) {{endif}} @@ -20409,7 +24495,7 @@ def cudaMemcpy3D(p : Optional[cudaMemcpy3DParms]): -------- :py:obj:`~.cudaMalloc3D`, :py:obj:`~.cudaMalloc3DArray`, :py:obj:`~.cudaMemset3D`, :py:obj:`~.cudaMemcpy3DAsync`, :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpy2D`, :py:obj:`~.cudaMemcpy2DToArray`, :py:obj:`~.cudaMemcpy2DFromArray`, :py:obj:`~.cudaMemcpy2DArrayToArray`, :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpy2DAsync`, :py:obj:`~.cudaMemcpy2DToArrayAsync`, :py:obj:`~.cudaMemcpy2DFromArrayAsync`, :py:obj:`~.cudaMemcpyToSymbolAsync`, :py:obj:`~.cudaMemcpyFromSymbolAsync`, :py:obj:`~.make_cudaExtent`, :py:obj:`~.make_cudaPos`, :py:obj:`~.cuMemcpy3D` """ - cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._ptr if p != None else NULL + cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p != None else NULL with nogil: err = cyruntime.cudaMemcpy3D(cyp_ptr) @@ -20447,7 +24533,7 @@ def cudaMemcpy3DPeer(p : Optional[cudaMemcpy3DPeerParms]): -------- :py:obj:`~.cudaMemcpy`, :py:obj:`~.cudaMemcpyPeer`, :py:obj:`~.cudaMemcpyAsync`, :py:obj:`~.cudaMemcpyPeerAsync`, :py:obj:`~.cudaMemcpy3DPeerAsync`, :py:obj:`~.cuMemcpy3DPeer` """ - cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._ptr if p != None else NULL + cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p != None else NULL err = cyruntime.cudaMemcpy3DPeer(cyp_ptr) return (cudaError_t(err),) {{endif}} @@ -20552,7 +24638,7 @@ def cudaMemcpy3DAsync(p : Optional[cudaMemcpy3DParms], stream): else: pstream = int(cudaStream_t(stream)) cystream = pstream - cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._ptr if p != None else NULL + cdef cyruntime.cudaMemcpy3DParms* cyp_ptr = p._pvt_ptr if p != None else NULL with nogil: err = cyruntime.cudaMemcpy3DAsync(cyp_ptr, cystream) @@ -20594,7 +24680,7 @@ def cudaMemcpy3DPeerAsync(p : Optional[cudaMemcpy3DPeerParms], stream): else: pstream = int(cudaStream_t(stream)) cystream = pstream - cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._ptr if p != None else NULL + cdef cyruntime.cudaMemcpy3DPeerParms* cyp_ptr = p._pvt_ptr if p != None else NULL err = cyruntime.cudaMemcpy3DPeerAsync(cyp_ptr, cystream) return (cudaError_t(err),) {{endif}} @@ -20684,7 +24770,7 @@ def cudaArrayGetInfo(array): cdef cudaChannelFormatDesc desc = cudaChannelFormatDesc() cdef cudaExtent extent = cudaExtent() cdef unsigned int flags = 0 - err = cyruntime.cudaArrayGetInfo(desc._ptr, extent._ptr, &flags, cyarray) + err = cyruntime.cudaArrayGetInfo(desc._pvt_ptr, extent._pvt_ptr, &flags, cyarray) return (cudaError_t(err), desc, extent, flags) {{endif}} @@ -20738,7 +24824,7 @@ def cudaArrayGetPlane(hArray, unsigned int planeIdx): phArray = int(cudaArray_t(hArray)) cyhArray = phArray cdef cudaArray_t pPlaneArray = cudaArray_t() - err = cyruntime.cudaArrayGetPlane(pPlaneArray._ptr, cyhArray, planeIdx) + err = cyruntime.cudaArrayGetPlane(pPlaneArray._pvt_ptr, cyhArray, planeIdx) return (cudaError_t(err), pPlaneArray) {{endif}} @@ -20786,7 +24872,7 @@ def cudaArrayGetMemoryRequirements(array, int device): parray = int(cudaArray_t(array)) cyarray = parray cdef cudaArrayMemoryRequirements memoryRequirements = cudaArrayMemoryRequirements() - err = cyruntime.cudaArrayGetMemoryRequirements(memoryRequirements._ptr, cyarray, device) + err = cyruntime.cudaArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cyarray, device) return (cudaError_t(err), memoryRequirements) {{endif}} @@ -20834,7 +24920,7 @@ def cudaMipmappedArrayGetMemoryRequirements(mipmap, int device): pmipmap = int(cudaMipmappedArray_t(mipmap)) cymipmap = pmipmap cdef cudaArrayMemoryRequirements memoryRequirements = cudaArrayMemoryRequirements() - err = cyruntime.cudaMipmappedArrayGetMemoryRequirements(memoryRequirements._ptr, cymipmap, device) + err = cyruntime.cudaMipmappedArrayGetMemoryRequirements(memoryRequirements._pvt_ptr, cymipmap, device) return (cudaError_t(err), memoryRequirements) {{endif}} @@ -20888,7 +24974,7 @@ def cudaArrayGetSparseProperties(array): parray = int(cudaArray_t(array)) cyarray = parray cdef cudaArraySparseProperties sparseProperties = cudaArraySparseProperties() - err = cyruntime.cudaArrayGetSparseProperties(sparseProperties._ptr, cyarray) + err = cyruntime.cudaArrayGetSparseProperties(sparseProperties._pvt_ptr, cyarray) return (cudaError_t(err), sparseProperties) {{endif}} @@ -20942,7 +25028,7 @@ def cudaMipmappedArrayGetSparseProperties(mipmap): pmipmap = int(cudaMipmappedArray_t(mipmap)) cymipmap = pmipmap cdef cudaArraySparseProperties sparseProperties = cudaArraySparseProperties() - err = cyruntime.cudaMipmappedArrayGetSparseProperties(sparseProperties._ptr, cymipmap) + err = cyruntime.cudaMipmappedArrayGetSparseProperties(sparseProperties._pvt_ptr, cymipmap) return (cudaError_t(err), sparseProperties) {{endif}} @@ -21449,6 +25535,298 @@ def cudaMemcpyPeerAsync(dst, int dstDevice, src, int srcDevice, size_t count, st return (cudaError_t(err),) {{endif}} +{{if 'cudaMemcpyBatchAsync' in found_functions}} + +@cython.embedsignature(True) +def cudaMemcpyBatchAsync(dsts : Optional[Tuple[Any] | List[Any]], srcs : Optional[Tuple[Any] | List[Any]], sizes : Tuple[int] | List[int], size_t count, attrs : Optional[Tuple[cudaMemcpyAttributes] | List[cudaMemcpyAttributes]], attrsIdxs : Tuple[int] | List[int], size_t numAttrs, stream): + """ Performs a batch of memory copies asynchronously. + + Performs a batch of memory copies. The batch as a whole executes in + stream order but copies within a batch are not guaranteed to execute in + any specific order. This API only supports pointer-to-pointer copies. + For copies involving CUDA arrays, please see + :py:obj:`~.cudaMemcpy3DBatchAsync`. + + Performs memory copies from source buffers specified in `srcs` to + destination buffers specified in `dsts`. The size of each copy is + specified in `sizes`. All three arrays must be of the same length as + specified by `count`. Since there are no ordering guarantees for copies + within a batch, specifying any dependent copies within a batch will + result in undefined behavior. + + Every copy in the batch has to be associated with a set of attributes + specified in the `attrs` array. Each entry in this array can apply to + more than one copy. This can be done by specifying in the `attrsIdxs` + array, the index of the first copy that the corresponding entry in the + `attrs` array applies to. Both `attrs` and `attrsIdxs` must be of the + same length as specified by `numAttrs`. For example, if a batch has 10 + copies listed in dst/src/sizes, the first 6 of which have one set of + attributes and the remaining 4 another, then `numAttrs` will be 2, + `attrsIdxs` will be {0, 6} and `attrs` will contains the two sets of + attributes. Note that the first entry in `attrsIdxs` must always be 0. + Also, each entry must be greater than the previous entry and the last + entry should be less than `count`. Furthermore, `numAttrs` must be + lesser than or equal to `count`. + + The :py:obj:`~.cudaMemcpyAttributes.srcAccessOrder` indicates the + source access ordering to be observed for copies associated with the + attribute. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderStream`, then the source will be + accessed in stream order. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderDuringApiCall` then it indicates + that access to the source pointer can be out of stream order and all + accesses must be complete before the API call returns. This flag is + suited for ephemeral sources (ex., stack variables) when it's known + that no prior operations in the stream can be accessing the memory and + also that the lifetime of the memory is limited to the scope that the + source variable was declared in. Specifying this flag allows the driver + to optimize the copy and removes the need for the user to synchronize + the stream after the API call. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderAny` then it indicates that access + to the source pointer can be out of stream order and the accesses can + happen even after the API call returns. This flag is suited for host + pointers allocated outside CUDA (ex., via malloc) when it's known that + no prior operations in the stream can be accessing the memory. + Specifying this flag allows the driver to optimize the copy on certain + platforms. Each memcpy operation in the batch must have a valid + :py:obj:`~.cudaMemcpyAttributes` corresponding to it including the + appropriate srcAccessOrder setting, otherwise the API will return + :py:obj:`~.cudaErrorInvalidValue`. + + The :py:obj:`~.cudaMemcpyAttributes.srcLocHint` and + :py:obj:`~.cudaMemcpyAttributes.dstLocHint` allows applications to + specify hint locations for operands of a copy when the operand doesn't + have a fixed location. That is, these hints are only applicable for + managed memory pointers on devices where + :py:obj:`~.cudaDevAttrConcurrentManagedAccess` is true or system- + allocated pageable memory on devices where + :py:obj:`~.cudaDevAttrPageableMemoryAccess` is true. For other cases, + these hints are ignored. + + The :py:obj:`~.cudaMemcpyAttributes.flags` field can be used to specify + certain flags for copies. Setting the + :py:obj:`~.cudaMemcpyFlagPreferOverlapWithCompute` flag indicates that + the associated copies should preferably overlap with any compute work. + Note that this flag is a hint and can be ignored depending on the + platform and other parameters of the copy. + + If any error is encountered while parsing the batch, the index within + the batch where the error was encountered will be returned in + `failIdx`. + + Parameters + ---------- + dsts : List[Any] + Array of destination pointers. + srcs : List[Any] + Array of memcpy source pointers. + sizes : List[int] + Array of sizes for memcpy operations. + count : size_t + Size of `dsts`, `srcs` and `sizes` arrays + attrs : List[:py:obj:`~.cudaMemcpyAttributes`] + Array of memcpy attributes. + attrsIdxs : List[int] + Array of indices to specify which copies each entry in the `attrs` + array applies to. The attributes specified in attrs[k] will be + applied to copies starting from attrsIdxs[k] through attrsIdxs[k+1] + - 1. Also attrs[numAttrs-1] will apply to copies starting from + attrsIdxs[numAttrs-1] through count - 1. + numAttrs : size_t + Size of `attrs` and `attrsIdxs` arrays. + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to enqueue the operations in. Must not be legacy NULL + stream. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` :py:obj:`~.cudaErrorInvalidValue` + failIdx : int + Pointer to a location to return the index of the copy where a + failure was encountered. The value will be SIZE_MAX if the error + doesn't pertain to any specific copy. + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + cystream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + cystream = pstream + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + if not all(isinstance(_x, (int)) for _x in attrsIdxs): + raise TypeError("Argument 'attrsIdxs' is not instance of type (expected Tuple[int] or List[int]") + attrs = [] if attrs is None else attrs + if not all(isinstance(_x, (cudaMemcpyAttributes,)) for _x in attrs): + raise TypeError("Argument 'attrs' is not instance of type (expected Tuple[cyruntime.cudaMemcpyAttributes,] or List[cyruntime.cudaMemcpyAttributes,]") + if not all(isinstance(_x, (int)) for _x in sizes): + raise TypeError("Argument 'sizes' is not instance of type (expected Tuple[int] or List[int]") + srcs = [] if srcs is None else srcs + dsts = [] if dsts is None else dsts + pylist = [utils.HelperInputVoidPtr(pydsts) for pydsts in dsts] + cdef utils.InputVoidPtrPtrHelper voidStarHelperdsts = utils.InputVoidPtrPtrHelper(pylist) + pylist = [utils.HelperInputVoidPtr(pysrcs) for pysrcs in srcs] + cdef utils.InputVoidPtrPtrHelper voidStarHelpersrcs = utils.InputVoidPtrPtrHelper(pylist) + cdef vector[size_t] cysizes = sizes + if count > len(dsts): raise RuntimeError("List is too small: " + str(len(dsts)) + " < " + str(count)) + if count > len(srcs): raise RuntimeError("List is too small: " + str(len(srcs)) + " < " + str(count)) + if count > len(sizes): raise RuntimeError("List is too small: " + str(len(sizes)) + " < " + str(count)) + cdef cyruntime.cudaMemcpyAttributes* cyattrs = NULL + if len(attrs) > 0: + cyattrs = calloc(len(attrs), sizeof(cyruntime.cudaMemcpyAttributes)) + if cyattrs is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(attrs)) + 'x' + str(sizeof(cyruntime.cudaMemcpyAttributes))) + for idx in range(len(attrs)): + string.memcpy(&cyattrs[idx], (attrs[idx])._pvt_ptr, sizeof(cyruntime.cudaMemcpyAttributes)) + cdef vector[size_t] cyattrsIdxs = attrsIdxs + if numAttrs > len(attrs): raise RuntimeError("List is too small: " + str(len(attrs)) + " < " + str(numAttrs)) + if numAttrs > len(attrsIdxs): raise RuntimeError("List is too small: " + str(len(attrsIdxs)) + " < " + str(numAttrs)) + cdef size_t failIdx = 0 + err = cyruntime.cudaMemcpyBatchAsync(voidStarHelperdsts.cptr, voidStarHelpersrcs.cptr, cysizes.data(), count, (attrs[0])._pvt_ptr if len(attrs) == 1 else cyattrs, cyattrsIdxs.data(), numAttrs, &failIdx, cystream) + if cyattrs is not NULL: + free(cyattrs) + return (cudaError_t(err), failIdx) +{{endif}} + +{{if 'cudaMemcpy3DBatchAsync' in found_functions}} + +@cython.embedsignature(True) +def cudaMemcpy3DBatchAsync(size_t numOps, opList : Optional[Tuple[cudaMemcpy3DBatchOp] | List[cudaMemcpy3DBatchOp]], unsigned long long flags, stream): + """ Performs a batch of 3D memory copies asynchronously. + + Performs a batch of memory copies. The batch as a whole executes in + stream order but copies within a batch are not guaranteed to execute in + any specific order. Note that this means specifying any dependent + copies within a batch will result in undefined behavior. + + Performs memory copies as specified in the `opList` array. The length + of this array is specified in `numOps`. Each entry in this array + describes a copy operation. This includes among other things, the + source and destination operands for the copy as specified in + :py:obj:`~.cudaMemcpy3DBatchOp.src` and + :py:obj:`~.cudaMemcpy3DBatchOp.dst` respectively. The source and + destination operands of a copy can either be a pointer or a CUDA array. + The width, height and depth of a copy is specified in + :py:obj:`~.cudaMemcpy3DBatchOp.extent`. The width, height and depth of + a copy are specified in elements and must not be zero. For pointer-to- + pointer copies, the element size is considered to be 1. For pointer to + CUDA array or vice versa copies, the element size is determined by the + CUDA array. For CUDA array to CUDA array copies, the element size of + the two CUDA arrays must match. + + For a given operand, if :py:obj:`~.cudaMemcpy3DOperand`::type is + specified as :py:obj:`~.cudaMemcpyOperandTypePointer`, then + :py:obj:`~.cudaMemcpy3DOperand`::op::ptr will be used. The + :py:obj:`~.cudaMemcpy3DOperand`::op::ptr::ptr field must contain the + pointer where the copy should begin. The + :py:obj:`~.cudaMemcpy3DOperand`::op::ptr::rowLength field specifies the + length of each row in elements and must either be zero or be greater + than or equal to the width of the copy specified in + :py:obj:`~.cudaMemcpy3DBatchOp`::extent::width. The + :py:obj:`~.cudaMemcpy3DOperand`::op::ptr::layerHeight field specifies + the height of each layer and must either be zero or be greater than or + equal to the height of the copy specified in + :py:obj:`~.cudaMemcpy3DBatchOp`::extent::height. When either of these + values is zero, that aspect of the operand is considered to be tightly + packed according to the copy extent. For managed memory pointers on + devices where :py:obj:`~.cudaDevAttrConcurrentManagedAccess` is true or + system-allocated pageable memory on devices where + :py:obj:`~.cudaDevAttrPageableMemoryAccess` is true, the + :py:obj:`~.cudaMemcpy3DOperand`::op::ptr::locHint field can be used to + hint the location of the operand. + + If an operand's type is specified as + :py:obj:`~.cudaMemcpyOperandTypeArray`, then + :py:obj:`~.cudaMemcpy3DOperand`::op::array will be used. The + :py:obj:`~.cudaMemcpy3DOperand`::op::array::array field specifies the + CUDA array and :py:obj:`~.cudaMemcpy3DOperand`::op::array::offset + specifies the 3D offset into that array where the copy begins. + + The :py:obj:`~.cudaMemcpyAttributes.srcAccessOrder` indicates the + source access ordering to be observed for copies associated with the + attribute. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderStream`, then the source will be + accessed in stream order. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderDuringApiCall` then it indicates + that access to the source pointer can be out of stream order and all + accesses must be complete before the API call returns. This flag is + suited for ephemeral sources (ex., stack variables) when it's known + that no prior operations in the stream can be accessing the memory and + also that the lifetime of the memory is limited to the scope that the + source variable was declared in. Specifying this flag allows the driver + to optimize the copy and removes the need for the user to synchronize + the stream after the API call. If the source access order is set to + :py:obj:`~.cudaMemcpySrcAccessOrderAny` then it indicates that access + to the source pointer can be out of stream order and the accesses can + happen even after the API call returns. This flag is suited for host + pointers allocated outside CUDA (ex., via malloc) when it's known that + no prior operations in the stream can be accessing the memory. + Specifying this flag allows the driver to optimize the copy on certain + platforms. Each memcopy operation in `opList` must have a valid + srcAccessOrder setting, otherwise this API will return + :py:obj:`~.cudaErrorInvalidValue`. + + The :py:obj:`~.cudaMemcpyAttributes.flags` field can be used to specify + certain flags for copies. Setting the + :py:obj:`~.cudaMemcpyFlagPreferOverlapWithCompute` flag indicates that + the associated copies should preferably overlap with any compute work. + Note that this flag is a hint and can be ignored depending on the + platform and other parameters of the copy. + + If any error is encountered while parsing the batch, the index within + the batch where the error was encountered will be returned in + `failIdx`. + + Parameters + ---------- + numOps : size_t + Total number of memcpy operations. + opList : List[:py:obj:`~.cudaMemcpy3DBatchOp`] + Array of size `numOps` containing the actual memcpy operations. + flags : unsigned long long + Flags for future use, must be zero now. + hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + The stream to enqueue the operations in. Must not be default NULL + stream. + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess` :py:obj:`~.cudaErrorInvalidValue` + failIdx : int + Pointer to a location to return the index of the copy where a + failure was encountered. The value will be SIZE_MAX if the error + doesn't pertain to any specific copy. + """ + cdef cyruntime.cudaStream_t cystream + if stream is None: + cystream = 0 + elif isinstance(stream, (cudaStream_t,driver.CUstream)): + pstream = int(stream) + cystream = pstream + else: + pstream = int(cudaStream_t(stream)) + cystream = pstream + opList = [] if opList is None else opList + if not all(isinstance(_x, (cudaMemcpy3DBatchOp,)) for _x in opList): + raise TypeError("Argument 'opList' is not instance of type (expected Tuple[cyruntime.cudaMemcpy3DBatchOp,] or List[cyruntime.cudaMemcpy3DBatchOp,]") + if numOps > len(opList): raise RuntimeError("List is too small: " + str(len(opList)) + " < " + str(numOps)) + cdef cyruntime.cudaMemcpy3DBatchOp* cyopList = NULL + if len(opList) > 0: + cyopList = calloc(len(opList), sizeof(cyruntime.cudaMemcpy3DBatchOp)) + if cyopList is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(opList)) + 'x' + str(sizeof(cyruntime.cudaMemcpy3DBatchOp))) + for idx in range(len(opList)): + string.memcpy(&cyopList[idx], (opList[idx])._pvt_ptr, sizeof(cyruntime.cudaMemcpy3DBatchOp)) + cdef size_t failIdx = 0 + err = cyruntime.cudaMemcpy3DBatchAsync(numOps, (opList[0])._pvt_ptr if len(opList) == 1 else cyopList, &failIdx, flags, cystream) + if cyopList is not NULL: + free(cyopList) + return (cudaError_t(err), failIdx) +{{endif}} + {{if 'cudaMemcpy2DAsync' in found_functions}} @cython.embedsignature(True) @@ -21843,7 +26221,7 @@ def cudaMemset3D(pitchedDevPtr not None : cudaPitchedPtr, int value, extent not -------- :py:obj:`~.cudaMemset`, :py:obj:`~.cudaMemset2D`, :py:obj:`~.cudaMemsetAsync`, :py:obj:`~.cudaMemset2DAsync`, :py:obj:`~.cudaMemset3DAsync`, :py:obj:`~.cudaMalloc3D`, :py:obj:`~.make_cudaPitchedPtr`, :py:obj:`~.make_cudaExtent` """ - err = cyruntime.cudaMemset3D(pitchedDevPtr._ptr[0], value, extent._ptr[0]) + err = cyruntime.cudaMemset3D(pitchedDevPtr._pvt_ptr[0], value, extent._pvt_ptr[0]) return (cudaError_t(err),) {{endif}} @@ -22028,7 +26406,7 @@ def cudaMemset3DAsync(pitchedDevPtr not None : cudaPitchedPtr, int value, extent else: pstream = int(cudaStream_t(stream)) cystream = pstream - err = cyruntime.cudaMemset3DAsync(pitchedDevPtr._ptr[0], value, extent._ptr[0], cystream) + err = cyruntime.cudaMemset3DAsync(pitchedDevPtr._pvt_ptr[0], value, extent._pvt_ptr[0], cystream) return (cudaError_t(err),) {{endif}} @@ -22247,7 +26625,7 @@ def cudaMemPrefetchAsync_v2(devPtr, size_t count, location not None : cudaMemLoc cydevPtr = utils.HelperInputVoidPtr(devPtr) cdef void* cydevPtr_ptr = cydevPtr.cptr with nogil: - err = cyruntime.cudaMemPrefetchAsync_v2(cydevPtr_ptr, count, location._ptr[0], flags, cystream) + err = cyruntime.cudaMemPrefetchAsync_v2(cydevPtr_ptr, count, location._pvt_ptr[0], flags, cystream) return (cudaError_t(err),) {{endif}} @@ -22612,7 +26990,7 @@ def cudaMemAdvise_v2(devPtr, size_t count, advice not None : cudaMemoryAdvise, l cdef void* cydevPtr_ptr = cydevPtr.cptr cdef cyruntime.cudaMemoryAdvise cyadvice = advice.value with nogil: - err = cyruntime.cudaMemAdvise_v2(cydevPtr_ptr, count, cyadvice, location._ptr[0]) + err = cyruntime.cudaMemAdvise_v2(cydevPtr_ptr, count, cyadvice, location._pvt_ptr[0]) return (cudaError_t(err),) {{endif}} @@ -23546,9 +27924,9 @@ def cudaMemPoolSetAccess(memPool, descList : Optional[Tuple[cudaMemAccessDesc] | if cydescList is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(descList)) + 'x' + str(sizeof(cyruntime.cudaMemAccessDesc))) for idx in range(len(descList)): - string.memcpy(&cydescList[idx], (descList[idx])._ptr, sizeof(cyruntime.cudaMemAccessDesc)) + string.memcpy(&cydescList[idx], (descList[idx])._pvt_ptr, sizeof(cyruntime.cudaMemAccessDesc)) if count > len(descList): raise RuntimeError("List is too small: " + str(len(descList)) + " < " + str(count)) - err = cyruntime.cudaMemPoolSetAccess(cymemPool, (descList[0])._ptr if len(descList) == 1 else cydescList, count) + err = cyruntime.cudaMemPoolSetAccess(cymemPool, (descList[0])._pvt_ptr if len(descList) == 1 else cydescList, count) if cydescList is not NULL: free(cydescList) return (cudaError_t(err),) @@ -23591,7 +27969,7 @@ def cudaMemPoolGetAccess(memPool, location : Optional[cudaMemLocation]): pmemPool = int(cudaMemPool_t(memPool)) cymemPool = pmemPool cdef cyruntime.cudaMemAccessFlags flags - cdef cyruntime.cudaMemLocation* cylocation_ptr = location._ptr if location != None else NULL + cdef cyruntime.cudaMemLocation* cylocation_ptr = location._pvt_ptr if location != None else NULL err = cyruntime.cudaMemPoolGetAccess(&flags, cymemPool, cylocation_ptr) return (cudaError_t(err), cudaMemAccessFlags(flags)) {{endif}} @@ -23623,20 +28001,25 @@ def cudaMemPoolCreate(poolProps : Optional[cudaMemPoolProps]): :py:obj:`~.cudaMemPoolProps.maxSize`. If set to 0, the maximum size of the pool will default to a system dependent value. - Applications can set :py:obj:`~.cudaMemPoolProps.handleTypes` to - :py:obj:`~.cudaMemHandleTypeFabric` in order to create - :py:obj:`~.cudaMemPool_t` suitable for sharing within an IMEX domain. - An IMEX domain is either an OS instance or a group of securely - connected OS instances using the NVIDIA IMEX daemon. An IMEX channel is - a global resource within the IMEX domain that represents a logical - entity that aims to provide fine grained accessibility control for the - participating processes. When exporter and importer CUDA processes have - been granted access to the same IMEX channel, they can securely share - memory. If the allocating process does not have access setup for an - IMEX channel, attempting to export a :py:obj:`~.CUmemoryPool` with - :py:obj:`~.cudaMemHandleTypeFabric` will result in - :py:obj:`~.cudaErrorNotPermitted`. The nvidia-modprobe CLI provides - more information regarding setting up of IMEX channels. + Applications that intend to use :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` + based memory sharing must ensure: (1) `nvidia-caps-imex-channels` + character device is created by the driver and is listed under + /proc/devices (2) have at least one IMEX channel file accessible by the + user launching the application. + + When exporter and importer CUDA processes have been granted access to + the same IMEX channel, they can securely share memory. + + The IMEX channel security model works on a per user basis. Which means + all processes under a user can share memory if the user has access to a + valid IMEX channel. When multi-user isolation is desired, a separate + IMEX channel is required for each user. + + These channel files exist in /dev/nvidia-caps-imex-channels/channel* + and can be created using standard OS native calls like mknod on Linux. + For example: To create channel0 with the major number from + /proc/devices users can execute the following command: `mknod + /dev/nvidia-caps-imex-channels/channel0 c 0` Parameters ---------- @@ -23659,8 +28042,8 @@ def cudaMemPoolCreate(poolProps : Optional[cudaMemPoolProps]): Specifying cudaMemHandleTypeNone creates a memory pool that will not support IPC. """ cdef cudaMemPool_t memPool = cudaMemPool_t() - cdef cyruntime.cudaMemPoolProps* cypoolProps_ptr = poolProps._ptr if poolProps != None else NULL - err = cyruntime.cudaMemPoolCreate(memPool._ptr, cypoolProps_ptr) + cdef cyruntime.cudaMemPoolProps* cypoolProps_ptr = poolProps._pvt_ptr if poolProps != None else NULL + err = cyruntime.cudaMemPoolCreate(memPool._pvt_ptr, cypoolProps_ptr) return (cudaError_t(err), memPool) {{endif}} @@ -23860,7 +28243,7 @@ def cudaMemPoolImportFromShareableHandle(shareableHandle, handleType not None : cyshareableHandle = utils.HelperInputVoidPtr(shareableHandle) cdef void* cyshareableHandle_ptr = cyshareableHandle.cptr cdef cyruntime.cudaMemAllocationHandleType cyhandleType = handleType.value - err = cyruntime.cudaMemPoolImportFromShareableHandle(memPool._ptr, cyshareableHandle_ptr, cyhandleType, flags) + err = cyruntime.cudaMemPoolImportFromShareableHandle(memPool._pvt_ptr, cyshareableHandle_ptr, cyhandleType, flags) return (cudaError_t(err), memPool) {{endif}} @@ -23894,7 +28277,7 @@ def cudaMemPoolExportPointer(ptr): cdef cudaMemPoolPtrExportData exportData = cudaMemPoolPtrExportData() cyptr = utils.HelperInputVoidPtr(ptr) cdef void* cyptr_ptr = cyptr.cptr - err = cyruntime.cudaMemPoolExportPointer(exportData._ptr, cyptr_ptr) + err = cyruntime.cudaMemPoolExportPointer(exportData._pvt_ptr, cyptr_ptr) return (cudaError_t(err), exportData) {{endif}} @@ -23944,7 +28327,7 @@ def cudaMemPoolImportPointer(memPool, exportData : Optional[cudaMemPoolPtrExport pmemPool = int(cudaMemPool_t(memPool)) cymemPool = pmemPool cdef void_ptr ptr = 0 - cdef cyruntime.cudaMemPoolPtrExportData* cyexportData_ptr = exportData._ptr if exportData != None else NULL + cdef cyruntime.cudaMemPoolPtrExportData* cyexportData_ptr = exportData._pvt_ptr if exportData != None else NULL err = cyruntime.cudaMemPoolImportPointer(&ptr, cymemPool, cyexportData_ptr) return (cudaError_t(err), ptr) {{endif}} @@ -24014,7 +28397,7 @@ def cudaPointerGetAttributes(ptr): cdef cudaPointerAttributes attributes = cudaPointerAttributes() cyptr = utils.HelperInputVoidPtr(ptr) cdef void* cyptr_ptr = cyptr.cptr - err = cyruntime.cudaPointerGetAttributes(attributes._ptr, cyptr_ptr) + err = cyruntime.cudaPointerGetAttributes(attributes._pvt_ptr, cyptr_ptr) return (cudaError_t(err), attributes) {{endif}} @@ -24446,7 +28829,7 @@ def cudaGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, uns presource = int(cudaGraphicsResource_t(resource)) cyresource = presource cdef cudaArray_t array = cudaArray_t() - err = cyruntime.cudaGraphicsSubResourceGetMappedArray(array._ptr, cyresource, arrayIndex, mipLevel) + err = cyruntime.cudaGraphicsSubResourceGetMappedArray(array._pvt_ptr, cyresource, arrayIndex, mipLevel) return (cudaError_t(err), array) {{endif}} @@ -24490,7 +28873,7 @@ def cudaGraphicsResourceGetMappedMipmappedArray(resource): presource = int(cudaGraphicsResource_t(resource)) cyresource = presource cdef cudaMipmappedArray_t mipmappedArray = cudaMipmappedArray_t() - err = cyruntime.cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray._ptr, cyresource) + err = cyruntime.cudaGraphicsResourceGetMappedMipmappedArray(mipmappedArray._pvt_ptr, cyresource) return (cudaError_t(err), mipmappedArray) {{endif}} @@ -24529,7 +28912,7 @@ def cudaGetChannelDesc(array): cyarray = parray cdef cudaChannelFormatDesc desc = cudaChannelFormatDesc() with nogil: - err = cyruntime.cudaGetChannelDesc(desc._ptr, cyarray) + err = cyruntime.cudaGetChannelDesc(desc._pvt_ptr, cyarray) return (cudaError_t(err), desc) {{endif}} @@ -24578,7 +28961,7 @@ def cudaCreateChannelDesc(int x, int y, int z, int w, f not None : cudaChannelFo cdef cyruntime.cudaChannelFormatKind cyf = f.value err = cyruntime.cudaCreateChannelDesc(x, y, z, w, cyf) cdef cudaChannelFormatDesc wrapper = cudaChannelFormatDesc() - wrapper._ptr[0] = err + wrapper._pvt_ptr[0] = err return (cudaError_t.cudaSuccess, wrapper) {{endif}} @@ -24817,10 +29200,10 @@ def cudaCreateTextureObject(pResDesc : Optional[cudaResourceDesc], pTexDesc : Op :py:obj:`~.cudaDestroyTextureObject`, :py:obj:`~.cuTexObjectCreate` """ cdef cudaTextureObject_t pTexObject = cudaTextureObject_t() - cdef cyruntime.cudaResourceDesc* cypResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL - cdef cyruntime.cudaTextureDesc* cypTexDesc_ptr = pTexDesc._ptr if pTexDesc != None else NULL - cdef cyruntime.cudaResourceViewDesc* cypResViewDesc_ptr = pResViewDesc._ptr if pResViewDesc != None else NULL - err = cyruntime.cudaCreateTextureObject(pTexObject._ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) + cdef cyruntime.cudaResourceDesc* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc != None else NULL + cdef cyruntime.cudaTextureDesc* cypTexDesc_ptr = pTexDesc._pvt_ptr if pTexDesc != None else NULL + cdef cyruntime.cudaResourceViewDesc* cypResViewDesc_ptr = pResViewDesc._pvt_ptr if pResViewDesc != None else NULL + err = cyruntime.cudaCreateTextureObject(pTexObject._pvt_ptr, cypResDesc_ptr, cypTexDesc_ptr, cypResViewDesc_ptr) return (cudaError_t(err), pTexObject) {{endif}} @@ -24897,7 +29280,7 @@ def cudaGetTextureObjectResourceDesc(texObject): cytexObject = ptexObject cdef cudaResourceDesc pResDesc = cudaResourceDesc() with nogil: - err = cyruntime.cudaGetTextureObjectResourceDesc(pResDesc._ptr, cytexObject) + err = cyruntime.cudaGetTextureObjectResourceDesc(pResDesc._pvt_ptr, cytexObject) return (cudaError_t(err), pResDesc) {{endif}} @@ -24938,7 +29321,7 @@ def cudaGetTextureObjectTextureDesc(texObject): cytexObject = ptexObject cdef cudaTextureDesc pTexDesc = cudaTextureDesc() with nogil: - err = cyruntime.cudaGetTextureObjectTextureDesc(pTexDesc._ptr, cytexObject) + err = cyruntime.cudaGetTextureObjectTextureDesc(pTexDesc._pvt_ptr, cytexObject) return (cudaError_t(err), pTexDesc) {{endif}} @@ -24979,7 +29362,7 @@ def cudaGetTextureObjectResourceViewDesc(texObject): ptexObject = int(cudaTextureObject_t(texObject)) cytexObject = ptexObject cdef cudaResourceViewDesc pResViewDesc = cudaResourceViewDesc() - err = cyruntime.cudaGetTextureObjectResourceViewDesc(pResViewDesc._ptr, cytexObject) + err = cyruntime.cudaGetTextureObjectResourceViewDesc(pResViewDesc._pvt_ptr, cytexObject) return (cudaError_t(err), pResViewDesc) {{endif}} @@ -25017,9 +29400,9 @@ def cudaCreateSurfaceObject(pResDesc : Optional[cudaResourceDesc]): :py:obj:`~.cudaDestroySurfaceObject`, :py:obj:`~.cuSurfObjectCreate` """ cdef cudaSurfaceObject_t pSurfObject = cudaSurfaceObject_t() - cdef cyruntime.cudaResourceDesc* cypResDesc_ptr = pResDesc._ptr if pResDesc != None else NULL + cdef cyruntime.cudaResourceDesc* cypResDesc_ptr = pResDesc._pvt_ptr if pResDesc != None else NULL with nogil: - err = cyruntime.cudaCreateSurfaceObject(pSurfObject._ptr, cypResDesc_ptr) + err = cyruntime.cudaCreateSurfaceObject(pSurfObject._pvt_ptr, cypResDesc_ptr) return (cudaError_t(err), pSurfObject) {{endif}} @@ -25093,7 +29476,7 @@ def cudaGetSurfaceObjectResourceDesc(surfObject): psurfObject = int(cudaSurfaceObject_t(surfObject)) cysurfObject = psurfObject cdef cudaResourceDesc pResDesc = cudaResourceDesc() - err = cyruntime.cudaGetSurfaceObjectResourceDesc(pResDesc._ptr, cysurfObject) + err = cyruntime.cudaGetSurfaceObjectResourceDesc(pResDesc._pvt_ptr, cysurfObject) return (cudaError_t(err), pResDesc) {{endif}} @@ -25185,7 +29568,7 @@ def cudaGraphCreate(unsigned int flags): :py:obj:`~.cudaGraphAddChildGraphNode`, :py:obj:`~.cudaGraphAddEmptyNode`, :py:obj:`~.cudaGraphAddKernelNode`, :py:obj:`~.cudaGraphAddHostNode`, :py:obj:`~.cudaGraphAddMemcpyNode`, :py:obj:`~.cudaGraphAddMemsetNode`, :py:obj:`~.cudaGraphInstantiate`, :py:obj:`~.cudaGraphDestroy`, :py:obj:`~.cudaGraphGetNodes`, :py:obj:`~.cudaGraphGetRootNodes`, :py:obj:`~.cudaGraphGetEdges`, :py:obj:`~.cudaGraphClone` """ cdef cudaGraph_t pGraph = cudaGraph_t() - err = cyruntime.cudaGraphCreate(pGraph._ptr, flags) + err = cyruntime.cudaGraphCreate(pGraph._pvt_ptr, flags) return (cudaError_t(err), pGraph) {{endif}} @@ -25298,10 +29681,10 @@ def cudaGraphAddKernelNode(graph, pDependencies : Optional[Tuple[cudaGraphNode_t raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._ptr if pNodeParams != None else NULL - err = cyruntime.cudaGraphAddKernelNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cypNodeParams_ptr) + cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL + err = cyruntime.cudaGraphAddKernelNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cypNodeParams_ptr) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -25350,7 +29733,7 @@ def cudaGraphKernelNodeGetParams(node): pnode = int(cudaGraphNode_t(node)) cynode = pnode cdef cudaKernelNodeParams pNodeParams = cudaKernelNodeParams() - err = cyruntime.cudaGraphKernelNodeGetParams(cynode, pNodeParams._ptr) + err = cyruntime.cudaGraphKernelNodeGetParams(cynode, pNodeParams._pvt_ptr) return (cudaError_t(err), pNodeParams) {{endif}} @@ -25387,7 +29770,7 @@ def cudaGraphKernelNodeSetParams(node, pNodeParams : Optional[cudaKernelNodePara else: pnode = int(cudaGraphNode_t(node)) cynode = pnode - cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._ptr if pNodeParams != None else NULL + cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL err = cyruntime.cudaGraphKernelNodeSetParams(cynode, cypNodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -25478,7 +29861,7 @@ def cudaGraphKernelNodeGetAttribute(hNode, attr not None : cudaKernelNodeAttrID) cyhNode = phNode cdef cyruntime.cudaKernelNodeAttrID cyattr = attr.value cdef cudaKernelNodeAttrValue value_out = cudaKernelNodeAttrValue() - err = cyruntime.cudaGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._ptr) + err = cyruntime.cudaGraphKernelNodeGetAttribute(cyhNode, cyattr, value_out._pvt_ptr) return (cudaError_t(err), value_out) {{endif}} @@ -25519,7 +29902,7 @@ def cudaGraphKernelNodeSetAttribute(hNode, attr not None : cudaKernelNodeAttrID, phNode = int(cudaGraphNode_t(hNode)) cyhNode = phNode cdef cyruntime.cudaKernelNodeAttrID cyattr = attr.value - cdef cyruntime.cudaKernelNodeAttrValue* cyvalue_ptr = value._ptr if value != None else NULL + cdef cyruntime.cudaKernelNodeAttrValue* cyvalue_ptr = value._pvt_ptr if value != None else NULL err = cyruntime.cudaGraphKernelNodeSetAttribute(cyhNode, cyattr, cyvalue_ptr) return (cudaError_t(err),) {{endif}} @@ -25587,10 +29970,10 @@ def cudaGraphAddMemcpyNode(graph, pDependencies : Optional[Tuple[cudaGraphNode_t raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaMemcpy3DParms* cypCopyParams_ptr = pCopyParams._ptr if pCopyParams != None else NULL - err = cyruntime.cudaGraphAddMemcpyNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cypCopyParams_ptr) + cdef cyruntime.cudaMemcpy3DParms* cypCopyParams_ptr = pCopyParams._pvt_ptr if pCopyParams != None else NULL + err = cyruntime.cudaGraphAddMemcpyNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cypCopyParams_ptr) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -25675,13 +30058,13 @@ def cudaGraphAddMemcpyNode1D(graph, pDependencies : Optional[Tuple[cudaGraphNode raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] cydst = utils.HelperInputVoidPtr(dst) cdef void* cydst_ptr = cydst.cptr cysrc = utils.HelperInputVoidPtr(src) cdef void* cysrc_ptr = cysrc.cptr cdef cyruntime.cudaMemcpyKind cykind = kind.value - err = cyruntime.cudaGraphAddMemcpyNode1D(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cydst_ptr, cysrc_ptr, count, cykind) + err = cyruntime.cudaGraphAddMemcpyNode1D(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cydst_ptr, cysrc_ptr, count, cykind) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -25721,7 +30104,7 @@ def cudaGraphMemcpyNodeGetParams(node): pnode = int(cudaGraphNode_t(node)) cynode = pnode cdef cudaMemcpy3DParms pNodeParams = cudaMemcpy3DParms() - err = cyruntime.cudaGraphMemcpyNodeGetParams(cynode, pNodeParams._ptr) + err = cyruntime.cudaGraphMemcpyNodeGetParams(cynode, pNodeParams._pvt_ptr) return (cudaError_t(err), pNodeParams) {{endif}} @@ -25758,7 +30141,7 @@ def cudaGraphMemcpyNodeSetParams(node, pNodeParams : Optional[cudaMemcpy3DParms] else: pnode = int(cudaGraphNode_t(node)) cynode = pnode - cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._ptr if pNodeParams != None else NULL + cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL err = cyruntime.cudaGraphMemcpyNodeSetParams(cynode, cypNodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -25882,10 +30265,10 @@ def cudaGraphAddMemsetNode(graph, pDependencies : Optional[Tuple[cudaGraphNode_t raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaMemsetParams* cypMemsetParams_ptr = pMemsetParams._ptr if pMemsetParams != None else NULL - err = cyruntime.cudaGraphAddMemsetNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cypMemsetParams_ptr) + cdef cyruntime.cudaMemsetParams* cypMemsetParams_ptr = pMemsetParams._pvt_ptr if pMemsetParams != None else NULL + err = cyruntime.cudaGraphAddMemsetNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cypMemsetParams_ptr) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -25925,7 +30308,7 @@ def cudaGraphMemsetNodeGetParams(node): pnode = int(cudaGraphNode_t(node)) cynode = pnode cdef cudaMemsetParams pNodeParams = cudaMemsetParams() - err = cyruntime.cudaGraphMemsetNodeGetParams(cynode, pNodeParams._ptr) + err = cyruntime.cudaGraphMemsetNodeGetParams(cynode, pNodeParams._pvt_ptr) return (cudaError_t(err), pNodeParams) {{endif}} @@ -25962,7 +30345,7 @@ def cudaGraphMemsetNodeSetParams(node, pNodeParams : Optional[cudaMemsetParams]) else: pnode = int(cudaGraphNode_t(node)) cynode = pnode - cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._ptr if pNodeParams != None else NULL + cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL err = cyruntime.cudaGraphMemsetNodeSetParams(cynode, cypNodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -26025,10 +30408,10 @@ def cudaGraphAddHostNode(graph, pDependencies : Optional[Tuple[cudaGraphNode_t] raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._ptr if pNodeParams != None else NULL - err = cyruntime.cudaGraphAddHostNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cypNodeParams_ptr) + cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL + err = cyruntime.cudaGraphAddHostNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cypNodeParams_ptr) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -26068,7 +30451,7 @@ def cudaGraphHostNodeGetParams(node): pnode = int(cudaGraphNode_t(node)) cynode = pnode cdef cudaHostNodeParams pNodeParams = cudaHostNodeParams() - err = cyruntime.cudaGraphHostNodeGetParams(cynode, pNodeParams._ptr) + err = cyruntime.cudaGraphHostNodeGetParams(cynode, pNodeParams._pvt_ptr) return (cudaError_t(err), pNodeParams) {{endif}} @@ -26105,7 +30488,7 @@ def cudaGraphHostNodeSetParams(node, pNodeParams : Optional[cudaHostNodeParams]) else: pnode = int(cudaGraphNode_t(node)) cynode = pnode - cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._ptr if pNodeParams != None else NULL + cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL err = cyruntime.cudaGraphHostNodeSetParams(cynode, cypNodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -26180,9 +30563,9 @@ def cudaGraphAddChildGraphNode(graph, pDependencies : Optional[Tuple[cudaGraphNo raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - err = cyruntime.cudaGraphAddChildGraphNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cychildGraph) + err = cyruntime.cudaGraphAddChildGraphNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cychildGraph) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -26227,7 +30610,7 @@ def cudaGraphChildGraphNodeGetGraph(node): pnode = int(cudaGraphNode_t(node)) cynode = pnode cdef cudaGraph_t pGraph = cudaGraph_t() - err = cyruntime.cudaGraphChildGraphNodeGetGraph(cynode, pGraph._ptr) + err = cyruntime.cudaGraphChildGraphNodeGetGraph(cynode, pGraph._pvt_ptr) return (cudaError_t(err), pGraph) {{endif}} @@ -26290,9 +30673,9 @@ def cudaGraphAddEmptyNode(graph, pDependencies : Optional[Tuple[cudaGraphNode_t] raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - err = cyruntime.cudaGraphAddEmptyNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies) + err = cyruntime.cudaGraphAddEmptyNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -26367,9 +30750,9 @@ def cudaGraphAddEventRecordNode(graph, pDependencies : Optional[Tuple[cudaGraphN raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - err = cyruntime.cudaGraphAddEventRecordNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cyevent) + err = cyruntime.cudaGraphAddEventRecordNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cyevent) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -26409,7 +30792,7 @@ def cudaGraphEventRecordNodeGetEvent(node): pnode = int(cudaGraphNode_t(node)) cynode = pnode cdef cudaEvent_t event_out = cudaEvent_t() - err = cyruntime.cudaGraphEventRecordNodeGetEvent(cynode, event_out._ptr) + err = cyruntime.cudaGraphEventRecordNodeGetEvent(cynode, event_out._pvt_ptr) return (cudaError_t(err), event_out) {{endif}} @@ -26531,9 +30914,9 @@ def cudaGraphAddEventWaitNode(graph, pDependencies : Optional[Tuple[cudaGraphNod raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - err = cyruntime.cudaGraphAddEventWaitNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cyevent) + err = cyruntime.cudaGraphAddEventWaitNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cyevent) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -26573,7 +30956,7 @@ def cudaGraphEventWaitNodeGetEvent(node): pnode = int(cudaGraphNode_t(node)) cynode = pnode cdef cudaEvent_t event_out = cudaEvent_t() - err = cyruntime.cudaGraphEventWaitNodeGetEvent(cynode, event_out._ptr) + err = cyruntime.cudaGraphEventWaitNodeGetEvent(cynode, event_out._pvt_ptr) return (cudaError_t(err), event_out) {{endif}} @@ -26682,10 +31065,10 @@ def cudaGraphAddExternalSemaphoresSignalNode(graph, pDependencies : Optional[Tup raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cyruntime.cudaGraphAddExternalSemaphoresSignalNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cynodeParams_ptr) + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cyruntime.cudaGraphAddExternalSemaphoresSignalNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cynodeParams_ptr) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -26731,7 +31114,7 @@ def cudaGraphExternalSemaphoresSignalNodeGetParams(hNode): phNode = int(cudaGraphNode_t(hNode)) cyhNode = phNode cdef cudaExternalSemaphoreSignalNodeParams params_out = cudaExternalSemaphoreSignalNodeParams() - err = cyruntime.cudaGraphExternalSemaphoresSignalNodeGetParams(cyhNode, params_out._ptr) + err = cyruntime.cudaGraphExternalSemaphoresSignalNodeGetParams(cyhNode, params_out._pvt_ptr) return (cudaError_t(err), params_out) {{endif}} @@ -26769,7 +31152,7 @@ def cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, nodeParams : Optional[ else: phNode = int(cudaGraphNode_t(hNode)) cyhNode = phNode - cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cyruntime.cudaGraphExternalSemaphoresSignalNodeSetParams(cyhNode, cynodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -26833,10 +31216,10 @@ def cudaGraphAddExternalSemaphoresWaitNode(graph, pDependencies : Optional[Tuple raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cyruntime.cudaGraphAddExternalSemaphoresWaitNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cynodeParams_ptr) + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cyruntime.cudaGraphAddExternalSemaphoresWaitNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cynodeParams_ptr) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -26882,7 +31265,7 @@ def cudaGraphExternalSemaphoresWaitNodeGetParams(hNode): phNode = int(cudaGraphNode_t(hNode)) cyhNode = phNode cdef cudaExternalSemaphoreWaitNodeParams params_out = cudaExternalSemaphoreWaitNodeParams() - err = cyruntime.cudaGraphExternalSemaphoresWaitNodeGetParams(cyhNode, params_out._ptr) + err = cyruntime.cudaGraphExternalSemaphoresWaitNodeGetParams(cyhNode, params_out._pvt_ptr) return (cudaError_t(err), params_out) {{endif}} @@ -26920,7 +31303,7 @@ def cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, nodeParams : Optional[cu else: phNode = int(cudaGraphNode_t(hNode)) cyhNode = phNode - cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cyruntime.cudaGraphExternalSemaphoresWaitNodeSetParams(cyhNode, cynodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -27022,10 +31405,10 @@ def cudaGraphAddMemAllocNode(graph, pDependencies : Optional[Tuple[cudaGraphNode raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaMemAllocNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cyruntime.cudaGraphAddMemAllocNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cynodeParams_ptr) + cdef cyruntime.cudaMemAllocNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cyruntime.cudaGraphAddMemAllocNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cynodeParams_ptr) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -27068,7 +31451,7 @@ def cudaGraphMemAllocNodeGetParams(node): pnode = int(cudaGraphNode_t(node)) cynode = pnode cdef cudaMemAllocNodeParams params_out = cudaMemAllocNodeParams() - err = cyruntime.cudaGraphMemAllocNodeGetParams(cynode, params_out._ptr) + err = cyruntime.cudaGraphMemAllocNodeGetParams(cynode, params_out._pvt_ptr) return (cudaError_t(err), params_out) {{endif}} @@ -27147,11 +31530,11 @@ def cudaGraphAddMemFreeNode(graph, pDependencies : Optional[Tuple[cudaGraphNode_ raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) cydptr = utils.HelperInputVoidPtr(dptr) cdef void* cydptr_ptr = cydptr.cptr - err = cyruntime.cudaGraphAddMemFreeNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cydptr_ptr) + err = cyruntime.cudaGraphAddMemFreeNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cydptr_ptr) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -27353,7 +31736,7 @@ def cudaGraphClone(originalGraph): poriginalGraph = int(cudaGraph_t(originalGraph)) cyoriginalGraph = poriginalGraph cdef cudaGraph_t pGraphClone = cudaGraph_t() - err = cyruntime.cudaGraphClone(pGraphClone._ptr, cyoriginalGraph) + err = cyruntime.cudaGraphClone(pGraphClone._pvt_ptr, cyoriginalGraph) return (cudaError_t(err), pGraphClone) {{endif}} @@ -27409,7 +31792,7 @@ def cudaGraphNodeFindInClone(originalNode, clonedGraph): poriginalNode = int(cudaGraphNode_t(originalNode)) cyoriginalNode = poriginalNode cdef cudaGraphNode_t pNode = cudaGraphNode_t() - err = cyruntime.cudaGraphNodeFindInClone(pNode._ptr, cyoriginalNode, cyclonedGraph) + err = cyruntime.cudaGraphNodeFindInClone(pNode._pvt_ptr, cyoriginalNode, cyclonedGraph) return (cudaError_t(err), pNode) {{endif}} @@ -28045,7 +32428,7 @@ def cudaGraphAddDependencies(graph, from_ : Optional[Tuple[cudaGraphNode_t] | Li raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(from_)): - cyfrom_[idx] = (from_[idx])._ptr[0] + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] cdef cyruntime.cudaGraphNode_t* cyto = NULL if len(to) > 0: cyto = calloc(len(to), sizeof(cyruntime.cudaGraphNode_t)) @@ -28053,10 +32436,10 @@ def cudaGraphAddDependencies(graph, from_ : Optional[Tuple[cudaGraphNode_t] | Li raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(to)): - cyto[idx] = (to[idx])._ptr[0] + cyto[idx] = (to[idx])._pvt_ptr[0] if numDependencies > len(from_): raise RuntimeError("List is too small: " + str(len(from_)) + " < " + str(numDependencies)) if numDependencies > len(to): raise RuntimeError("List is too small: " + str(len(to)) + " < " + str(numDependencies)) - err = cyruntime.cudaGraphAddDependencies(cygraph, (from_[0])._ptr if len(from_) == 1 else cyfrom_, (to[0])._ptr if len(to) == 1 else cyto, numDependencies) + err = cyruntime.cudaGraphAddDependencies(cygraph, (from_[0])._pvt_ptr if len(from_) == 1 else cyfrom_, (to[0])._pvt_ptr if len(to) == 1 else cyto, numDependencies) if cyfrom_ is not NULL: free(cyfrom_) if cyto is not NULL: @@ -28125,7 +32508,7 @@ def cudaGraphAddDependencies_v2(graph, from_ : Optional[Tuple[cudaGraphNode_t] | raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(from_)): - cyfrom_[idx] = (from_[idx])._ptr[0] + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] cdef cyruntime.cudaGraphNode_t* cyto = NULL if len(to) > 0: cyto = calloc(len(to), sizeof(cyruntime.cudaGraphNode_t)) @@ -28133,15 +32516,15 @@ def cudaGraphAddDependencies_v2(graph, from_ : Optional[Tuple[cudaGraphNode_t] | raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(to)): - cyto[idx] = (to[idx])._ptr[0] + cyto[idx] = (to[idx])._pvt_ptr[0] cdef cyruntime.cudaGraphEdgeData* cyedgeData = NULL if len(edgeData) > 0: cyedgeData = calloc(len(edgeData), sizeof(cyruntime.cudaGraphEdgeData)) if cyedgeData is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(edgeData)) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) for idx in range(len(edgeData)): - string.memcpy(&cyedgeData[idx], (edgeData[idx])._ptr, sizeof(cyruntime.cudaGraphEdgeData)) - err = cyruntime.cudaGraphAddDependencies_v2(cygraph, (from_[0])._ptr if len(from_) == 1 else cyfrom_, (to[0])._ptr if len(to) == 1 else cyto, (edgeData[0])._ptr if len(edgeData) == 1 else cyedgeData, numDependencies) + string.memcpy(&cyedgeData[idx], (edgeData[idx])._pvt_ptr, sizeof(cyruntime.cudaGraphEdgeData)) + err = cyruntime.cudaGraphAddDependencies_v2(cygraph, (from_[0])._pvt_ptr if len(from_) == 1 else cyfrom_, (to[0])._pvt_ptr if len(to) == 1 else cyto, (edgeData[0])._pvt_ptr if len(edgeData) == 1 else cyedgeData, numDependencies) if cyfrom_ is not NULL: free(cyfrom_) if cyto is not NULL: @@ -28207,7 +32590,7 @@ def cudaGraphRemoveDependencies(graph, from_ : Optional[Tuple[cudaGraphNode_t] | raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(from_)): - cyfrom_[idx] = (from_[idx])._ptr[0] + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] cdef cyruntime.cudaGraphNode_t* cyto = NULL if len(to) > 0: cyto = calloc(len(to), sizeof(cyruntime.cudaGraphNode_t)) @@ -28215,10 +32598,10 @@ def cudaGraphRemoveDependencies(graph, from_ : Optional[Tuple[cudaGraphNode_t] | raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(to)): - cyto[idx] = (to[idx])._ptr[0] + cyto[idx] = (to[idx])._pvt_ptr[0] if numDependencies > len(from_): raise RuntimeError("List is too small: " + str(len(from_)) + " < " + str(numDependencies)) if numDependencies > len(to): raise RuntimeError("List is too small: " + str(len(to)) + " < " + str(numDependencies)) - err = cyruntime.cudaGraphRemoveDependencies(cygraph, (from_[0])._ptr if len(from_) == 1 else cyfrom_, (to[0])._ptr if len(to) == 1 else cyto, numDependencies) + err = cyruntime.cudaGraphRemoveDependencies(cygraph, (from_[0])._pvt_ptr if len(from_) == 1 else cyfrom_, (to[0])._pvt_ptr if len(to) == 1 else cyto, numDependencies) if cyfrom_ is not NULL: free(cyfrom_) if cyto is not NULL: @@ -28290,7 +32673,7 @@ def cudaGraphRemoveDependencies_v2(graph, from_ : Optional[Tuple[cudaGraphNode_t raise MemoryError('Failed to allocate length x size memory: ' + str(len(from_)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(from_)): - cyfrom_[idx] = (from_[idx])._ptr[0] + cyfrom_[idx] = (from_[idx])._pvt_ptr[0] cdef cyruntime.cudaGraphNode_t* cyto = NULL if len(to) > 0: cyto = calloc(len(to), sizeof(cyruntime.cudaGraphNode_t)) @@ -28298,15 +32681,15 @@ def cudaGraphRemoveDependencies_v2(graph, from_ : Optional[Tuple[cudaGraphNode_t raise MemoryError('Failed to allocate length x size memory: ' + str(len(to)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(to)): - cyto[idx] = (to[idx])._ptr[0] + cyto[idx] = (to[idx])._pvt_ptr[0] cdef cyruntime.cudaGraphEdgeData* cyedgeData = NULL if len(edgeData) > 0: cyedgeData = calloc(len(edgeData), sizeof(cyruntime.cudaGraphEdgeData)) if cyedgeData is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(edgeData)) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) for idx in range(len(edgeData)): - string.memcpy(&cyedgeData[idx], (edgeData[idx])._ptr, sizeof(cyruntime.cudaGraphEdgeData)) - err = cyruntime.cudaGraphRemoveDependencies_v2(cygraph, (from_[0])._ptr if len(from_) == 1 else cyfrom_, (to[0])._ptr if len(to) == 1 else cyto, (edgeData[0])._ptr if len(edgeData) == 1 else cyedgeData, numDependencies) + string.memcpy(&cyedgeData[idx], (edgeData[idx])._pvt_ptr, sizeof(cyruntime.cudaGraphEdgeData)) + err = cyruntime.cudaGraphRemoveDependencies_v2(cygraph, (from_[0])._pvt_ptr if len(from_) == 1 else cyfrom_, (to[0])._pvt_ptr if len(to) == 1 else cyto, (edgeData[0])._pvt_ptr if len(edgeData) == 1 else cyedgeData, numDependencies) if cyfrom_ is not NULL: free(cyfrom_) if cyto is not NULL: @@ -28453,7 +32836,7 @@ def cudaGraphInstantiate(graph, unsigned long long flags): pgraph = int(cudaGraph_t(graph)) cygraph = pgraph cdef cudaGraphExec_t pGraphExec = cudaGraphExec_t() - err = cyruntime.cudaGraphInstantiate(pGraphExec._ptr, cygraph, flags) + err = cyruntime.cudaGraphInstantiate(pGraphExec._pvt_ptr, cygraph, flags) return (cudaError_t(err), pGraphExec) {{endif}} @@ -28557,7 +32940,7 @@ def cudaGraphInstantiateWithFlags(graph, unsigned long long flags): pgraph = int(cudaGraph_t(graph)) cygraph = pgraph cdef cudaGraphExec_t pGraphExec = cudaGraphExec_t() - err = cyruntime.cudaGraphInstantiateWithFlags(pGraphExec._ptr, cygraph, flags) + err = cyruntime.cudaGraphInstantiateWithFlags(pGraphExec._pvt_ptr, cygraph, flags) return (cudaError_t(err), pGraphExec) {{endif}} @@ -28701,8 +33084,8 @@ def cudaGraphInstantiateWithParams(graph, instantiateParams : Optional[cudaGraph pgraph = int(cudaGraph_t(graph)) cygraph = pgraph cdef cudaGraphExec_t pGraphExec = cudaGraphExec_t() - cdef cyruntime.cudaGraphInstantiateParams* cyinstantiateParams_ptr = instantiateParams._ptr if instantiateParams != None else NULL - err = cyruntime.cudaGraphInstantiateWithParams(pGraphExec._ptr, cygraph, cyinstantiateParams_ptr) + cdef cyruntime.cudaGraphInstantiateParams* cyinstantiateParams_ptr = instantiateParams._pvt_ptr if instantiateParams != None else NULL + err = cyruntime.cudaGraphInstantiateWithParams(pGraphExec._pvt_ptr, cygraph, cyinstantiateParams_ptr) return (cudaError_t(err), pGraphExec) {{endif}} @@ -28825,7 +33208,7 @@ def cudaGraphExecKernelNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._ptr if pNodeParams != None else NULL + cdef cyruntime.cudaKernelNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL err = cyruntime.cudaGraphExecKernelNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -28891,7 +33274,7 @@ def cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._ptr if pNodeParams != None else NULL + cdef cyruntime.cudaMemcpy3DParms* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL err = cyruntime.cudaGraphExecMemcpyNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -29036,7 +33419,7 @@ def cudaGraphExecMemsetNodeSetParams(hGraphExec, node, pNodeParams : Optional[cu else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._ptr if pNodeParams != None else NULL + cdef cyruntime.cudaMemsetParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL err = cyruntime.cudaGraphExecMemsetNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -29092,7 +33475,7 @@ def cudaGraphExecHostNodeSetParams(hGraphExec, node, pNodeParams : Optional[cuda else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._ptr if pNodeParams != None else NULL + cdef cyruntime.cudaHostNodeParams* cypNodeParams_ptr = pNodeParams._pvt_ptr if pNodeParams != None else NULL err = cyruntime.cudaGraphExecHostNodeSetParams(cyhGraphExec, cynode, cypNodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -29355,7 +33738,7 @@ def cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, nodePa else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cyruntime.cudaExternalSemaphoreSignalNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cyruntime.cudaGraphExecExternalSemaphoresSignalNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -29416,7 +33799,7 @@ def cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, nodePara else: phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec - cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cyruntime.cudaExternalSemaphoreWaitNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cyruntime.cudaGraphExecExternalSemaphoresWaitNodeSetParams(cyhGraphExec, cyhNode, cynodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -29714,7 +34097,7 @@ def cudaGraphExecUpdate(hGraphExec, hGraph): phGraphExec = int(cudaGraphExec_t(hGraphExec)) cyhGraphExec = phGraphExec cdef cudaGraphExecUpdateResultInfo resultInfo = cudaGraphExecUpdateResultInfo() - err = cyruntime.cudaGraphExecUpdate(cyhGraphExec, cyhGraph, resultInfo._ptr) + err = cyruntime.cudaGraphExecUpdate(cyhGraphExec, cyhGraph, resultInfo._pvt_ptr) return (cudaError_t(err), resultInfo) {{endif}} @@ -29989,7 +34372,7 @@ def cudaUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned in cdef cudaUserObject_t object_out = cudaUserObject_t() cyptr = utils.HelperInputVoidPtr(ptr) cdef void* cyptr_ptr = cyptr.cptr - err = cyruntime.cudaUserObjectCreate(object_out._ptr, cyptr_ptr, cydestroy, initialRefcount, flags) + err = cyruntime.cudaUserObjectCreate(object_out._pvt_ptr, cyptr_ptr, cydestroy, initialRefcount, flags) return (cudaError_t(err), object_out) {{endif}} @@ -30256,10 +34639,10 @@ def cudaGraphAddNode(graph, pDependencies : Optional[Tuple[cudaGraphNode_t] | Li raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) - cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cyruntime.cudaGraphAddNode(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cynodeParams_ptr) + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cyruntime.cudaGraphAddNode(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, numDependencies, cynodeParams_ptr) if cypDependencies is not NULL: free(cypDependencies) return (cudaError_t(err), pGraphNode) @@ -30338,18 +34721,18 @@ def cudaGraphAddNode_v2(graph, pDependencies : Optional[Tuple[cudaGraphNode_t] | raise MemoryError('Failed to allocate length x size memory: ' + str(len(pDependencies)) + 'x' + str(sizeof(cyruntime.cudaGraphNode_t))) else: for idx in range(len(pDependencies)): - cypDependencies[idx] = (pDependencies[idx])._ptr[0] + cypDependencies[idx] = (pDependencies[idx])._pvt_ptr[0] cdef cyruntime.cudaGraphEdgeData* cydependencyData = NULL if len(dependencyData) > 0: cydependencyData = calloc(len(dependencyData), sizeof(cyruntime.cudaGraphEdgeData)) if cydependencyData is NULL: raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cyruntime.cudaGraphEdgeData))) for idx in range(len(dependencyData)): - string.memcpy(&cydependencyData[idx], (dependencyData[idx])._ptr, sizeof(cyruntime.cudaGraphEdgeData)) + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cyruntime.cudaGraphEdgeData)) if numDependencies > len(pDependencies): raise RuntimeError("List is too small: " + str(len(pDependencies)) + " < " + str(numDependencies)) if numDependencies > len(dependencyData): raise RuntimeError("List is too small: " + str(len(dependencyData)) + " < " + str(numDependencies)) - cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL - err = cyruntime.cudaGraphAddNode_v2(pGraphNode._ptr, cygraph, (pDependencies[0])._ptr if len(pDependencies) == 1 else cypDependencies, (dependencyData[0])._ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, cynodeParams_ptr) + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL + err = cyruntime.cudaGraphAddNode_v2(pGraphNode._pvt_ptr, cygraph, (pDependencies[0])._pvt_ptr if len(pDependencies) == 1 else cypDependencies, (dependencyData[0])._pvt_ptr if len(dependencyData) == 1 else cydependencyData, numDependencies, cynodeParams_ptr) if cypDependencies is not NULL: free(cypDependencies) if cydependencyData is not NULL: @@ -30396,7 +34779,7 @@ def cudaGraphNodeSetParams(node, nodeParams : Optional[cudaGraphNodeParams]): else: pnode = int(cudaGraphNode_t(node)) cynode = pnode - cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cyruntime.cudaGraphNodeSetParams(cynode, cynodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -30457,7 +34840,7 @@ def cudaGraphExecNodeSetParams(graphExec, node, nodeParams : Optional[cudaGraphN else: pgraphExec = int(cudaGraphExec_t(graphExec)) cygraphExec = pgraphExec - cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._ptr if nodeParams != None else NULL + cdef cyruntime.cudaGraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams != None else NULL err = cyruntime.cudaGraphExecNodeSetParams(cygraphExec, cynode, cynodeParams_ptr) return (cudaError_t(err),) {{endif}} @@ -30481,7 +34864,9 @@ def cudaGraphConditionalHandleCreate(graph, unsigned int defaultLaunchValue, uns hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` Graph which will contain the conditional node using this handle. defaultLaunchValue : unsigned int - Optional initial value for the conditional variable. + Optional initial value for the conditional variable. Applied at the + beginning of each graph execution if cudaGraphCondAssignDefault is + set in `flags`. flags : unsigned int Currently must be cudaGraphCondAssignDefault or 0. @@ -30506,7 +34891,7 @@ def cudaGraphConditionalHandleCreate(graph, unsigned int defaultLaunchValue, uns pgraph = int(cudaGraph_t(graph)) cygraph = pgraph cdef cudaGraphConditionalHandle pHandle_out = cudaGraphConditionalHandle() - err = cyruntime.cudaGraphConditionalHandleCreate(pHandle_out._ptr, cygraph, defaultLaunchValue, flags) + err = cyruntime.cudaGraphConditionalHandleCreate(pHandle_out._pvt_ptr, cygraph, defaultLaunchValue, flags) return (cudaError_t(err), pHandle_out) {{endif}} @@ -30708,13 +35093,617 @@ def cudaGetDriverEntryPointByVersion(char* symbol, unsigned int cudaVersion, uns return (cudaError_t(err), funcPtr, cudaDriverEntryPointQueryResult(driverStatus)) {{endif}} +{{if 'cudaLibraryLoadData' in found_functions}} + +@cython.embedsignature(True) +def cudaLibraryLoadData(code, jitOptions : Optional[Tuple[cudaJitOption] | List[cudaJitOption]], jitOptionsValues : Optional[Tuple[Any] | List[Any]], unsigned int numJitOptions, libraryOptions : Optional[Tuple[cudaLibraryOption] | List[cudaLibraryOption]], libraryOptionValues : Optional[Tuple[Any] | List[Any]], unsigned int numLibraryOptions): + """ Load a library with specified code and options. + + Takes a pointer `code` and loads the corresponding library `library` + based on the application defined library loading mode: + + - If module loading is set to EAGER, via the environment variables + described in "Module loading", `library` is loaded eagerly into all + contexts at the time of the call and future contexts at the time of + creation until the library is unloaded with + :py:obj:`~.cudaLibraryUnload()`. + + - If the environment variables are set to LAZY, `library` is not + immediately loaded onto all existent contexts and will only be loaded + when a function is needed for that context, such as a kernel launch. + + These environment variables are described in the CUDA programming guide + under the "CUDA environment variables" section. + + The `code` may be a `cubin` or `fatbin` as output by nvcc, or a NULL- + terminated `PTX`, either as output by nvcc or hand-written. A fatbin + should also contain relocatable code when doing separate compilation. + Please also see the documentation for nvrtc + (https://docs.nvidia.com/cuda/nvrtc/index.html), nvjitlink + (https://docs.nvidia.com/cuda/nvjitlink/index.html), and nvfatbin + (https://docs.nvidia.com/cuda/nvfatbin/index.html) for more information + on generating loadable code at runtime. + + Options are passed as an array via `jitOptions` and any corresponding + parameters are passed in `jitOptionsValues`. The number of total JIT + options is supplied via `numJitOptions`. Any outputs will be returned + via `jitOptionsValues`. + + Library load options are passed as an array via `libraryOptions` and + any corresponding parameters are passed in `libraryOptionValues`. The + number of total library load options is supplied via + `numLibraryOptions`. + + Parameters + ---------- + code : Any + Code to load + jitOptions : List[:py:obj:`~.cudaJitOption`] + Options for JIT + jitOptionsValues : List[Any] + Option values for JIT + numJitOptions : unsigned int + Number of options + libraryOptions : List[:py:obj:`~.cudaLibraryOption`] + Options for loading + libraryOptionValues : List[Any] + Option values for loading + numLibraryOptions : unsigned int + Number of options for loading + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInvalidPtx`, :py:obj:`~.cudaErrorUnsupportedPtxVersion`, :py:obj:`~.cudaErrorNoKernelImageForDevice`, :py:obj:`~.cudaErrorSharedObjectSymbolNotFound`, :py:obj:`~.cudaErrorSharedObjectInitFailed`, :py:obj:`~.cudaErrorJitCompilerNotFound` + library : :py:obj:`~.cudaLibrary_t` + Returned library + + See Also + -------- + :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cuLibraryLoadData` + """ + libraryOptionValues = [] if libraryOptionValues is None else libraryOptionValues + libraryOptions = [] if libraryOptions is None else libraryOptions + if not all(isinstance(_x, (cudaLibraryOption)) for _x in libraryOptions): + raise TypeError("Argument 'libraryOptions' is not instance of type (expected Tuple[cyruntime.cudaLibraryOption] or List[cyruntime.cudaLibraryOption]") + jitOptionsValues = [] if jitOptionsValues is None else jitOptionsValues + jitOptions = [] if jitOptions is None else jitOptions + if not all(isinstance(_x, (cudaJitOption)) for _x in jitOptions): + raise TypeError("Argument 'jitOptions' is not instance of type (expected Tuple[cyruntime.cudaJitOption] or List[cyruntime.cudaJitOption]") + cdef cudaLibrary_t library = cudaLibrary_t() + cycode = utils.HelperInputVoidPtr(code) + cdef void* cycode_ptr = cycode.cptr + cdef vector[cyruntime.cudaJitOption] cyjitOptions = [pyjitOptions.value for pyjitOptions in (jitOptions)] + pylist = [utils.HelperCudaJitOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] + cdef utils.InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = utils.InputVoidPtrPtrHelper(pylist) + if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) + if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) + cdef vector[cyruntime.cudaLibraryOption] cylibraryOptions = [pylibraryOptions.value for pylibraryOptions in (libraryOptions)] + pylist = [utils.HelperCudaLibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] + cdef utils.InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = utils.InputVoidPtrPtrHelper(pylist) + if numLibraryOptions > len(libraryOptions): raise RuntimeError("List is too small: " + str(len(libraryOptions)) + " < " + str(numLibraryOptions)) + if numLibraryOptions > len(libraryOptionValues): raise RuntimeError("List is too small: " + str(len(libraryOptionValues)) + " < " + str(numLibraryOptions)) + err = cyruntime.cudaLibraryLoadData(library._pvt_ptr, cycode_ptr, cyjitOptions.data(), voidStarHelperjitOptionsValues.cptr, numJitOptions, cylibraryOptions.data(), voidStarHelperlibraryOptionValues.cptr, numLibraryOptions) + return (cudaError_t(err), library) +{{endif}} + +{{if 'cudaLibraryLoadFromFile' in found_functions}} + +@cython.embedsignature(True) +def cudaLibraryLoadFromFile(char* fileName, jitOptions : Optional[Tuple[cudaJitOption] | List[cudaJitOption]], jitOptionsValues : Optional[Tuple[Any] | List[Any]], unsigned int numJitOptions, libraryOptions : Optional[Tuple[cudaLibraryOption] | List[cudaLibraryOption]], libraryOptionValues : Optional[Tuple[Any] | List[Any]], unsigned int numLibraryOptions): + """ Load a library with specified file and options. + + Takes a pointer `code` and loads the corresponding library `library` + based on the application defined library loading mode: + + - If module loading is set to EAGER, via the environment variables + described in "Module loading", `library` is loaded eagerly into all + contexts at the time of the call and future contexts at the time of + creation until the library is unloaded with + :py:obj:`~.cudaLibraryUnload()`. + + - If the environment variables are set to LAZY, `library` is not + immediately loaded onto all existent contexts and will only be loaded + when a function is needed for that context, such as a kernel launch. + + These environment variables are described in the CUDA programming guide + under the "CUDA environment variables" section. + + The file should be a `cubin` file as output by nvcc, or a `PTX` file + either as output by nvcc or handwritten, or a `fatbin` file as output + by nvcc. A fatbin should also contain relocatable code when doing + separate compilation. Please also see the documentation for nvrtc + (https://docs.nvidia.com/cuda/nvrtc/index.html), nvjitlink + (https://docs.nvidia.com/cuda/nvjitlink/index.html), and nvfatbin + (https://docs.nvidia.com/cuda/nvfatbin/index.html) for more information + on generating loadable code at runtime. + + Options are passed as an array via `jitOptions` and any corresponding + parameters are passed in `jitOptionsValues`. The number of total + options is supplied via `numJitOptions`. Any outputs will be returned + via `jitOptionsValues`. + + Library load options are passed as an array via `libraryOptions` and + any corresponding parameters are passed in `libraryOptionValues`. The + number of total library load options is supplied via + `numLibraryOptions`. + + Parameters + ---------- + fileName : bytes + File to load from + jitOptions : List[:py:obj:`~.cudaJitOption`] + Options for JIT + jitOptionsValues : List[Any] + Option values for JIT + numJitOptions : unsigned int + Number of options + libraryOptions : List[:py:obj:`~.cudaLibraryOption`] + Options for loading + libraryOptionValues : List[Any] + Option values for loading + numLibraryOptions : unsigned int + Number of options for loading + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorMemoryAllocation`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInvalidPtx`, :py:obj:`~.cudaErrorUnsupportedPtxVersion`, :py:obj:`~.cudaErrorNoKernelImageForDevice`, :py:obj:`~.cudaErrorSharedObjectSymbolNotFound`, :py:obj:`~.cudaErrorSharedObjectInitFailed`, :py:obj:`~.cudaErrorJitCompilerNotFound` + library : :py:obj:`~.cudaLibrary_t` + Returned library + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cuLibraryLoadFromFile` + """ + libraryOptionValues = [] if libraryOptionValues is None else libraryOptionValues + libraryOptions = [] if libraryOptions is None else libraryOptions + if not all(isinstance(_x, (cudaLibraryOption)) for _x in libraryOptions): + raise TypeError("Argument 'libraryOptions' is not instance of type (expected Tuple[cyruntime.cudaLibraryOption] or List[cyruntime.cudaLibraryOption]") + jitOptionsValues = [] if jitOptionsValues is None else jitOptionsValues + jitOptions = [] if jitOptions is None else jitOptions + if not all(isinstance(_x, (cudaJitOption)) for _x in jitOptions): + raise TypeError("Argument 'jitOptions' is not instance of type (expected Tuple[cyruntime.cudaJitOption] or List[cyruntime.cudaJitOption]") + cdef cudaLibrary_t library = cudaLibrary_t() + cdef vector[cyruntime.cudaJitOption] cyjitOptions = [pyjitOptions.value for pyjitOptions in (jitOptions)] + pylist = [utils.HelperCudaJitOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] + cdef utils.InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = utils.InputVoidPtrPtrHelper(pylist) + if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) + if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) + cdef vector[cyruntime.cudaLibraryOption] cylibraryOptions = [pylibraryOptions.value for pylibraryOptions in (libraryOptions)] + pylist = [utils.HelperCudaLibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] + cdef utils.InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = utils.InputVoidPtrPtrHelper(pylist) + if numLibraryOptions > len(libraryOptions): raise RuntimeError("List is too small: " + str(len(libraryOptions)) + " < " + str(numLibraryOptions)) + if numLibraryOptions > len(libraryOptionValues): raise RuntimeError("List is too small: " + str(len(libraryOptionValues)) + " < " + str(numLibraryOptions)) + err = cyruntime.cudaLibraryLoadFromFile(library._pvt_ptr, fileName, cyjitOptions.data(), voidStarHelperjitOptionsValues.cptr, numJitOptions, cylibraryOptions.data(), voidStarHelperlibraryOptionValues.cptr, numLibraryOptions) + return (cudaError_t(err), library) +{{endif}} + +{{if 'cudaLibraryUnload' in found_functions}} + +@cython.embedsignature(True) +def cudaLibraryUnload(library): + """ Unloads a library. + + Unloads the library specified with `library` + + Parameters + ---------- + library : :py:obj:`~.cudaLibrary_t` + Library to unload + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cuLibraryUnload` + """ + cdef cyruntime.cudaLibrary_t cylibrary + if library is None: + cylibrary = 0 + elif isinstance(library, (cudaLibrary_t,)): + plibrary = int(library) + cylibrary = plibrary + else: + plibrary = int(cudaLibrary_t(library)) + cylibrary = plibrary + err = cyruntime.cudaLibraryUnload(cylibrary) + return (cudaError_t(err),) +{{endif}} + +{{if 'cudaLibraryGetKernel' in found_functions}} + +@cython.embedsignature(True) +def cudaLibraryGetKernel(library, char* name): + """ Returns a kernel handle. + + Returns in `pKernel` the handle of the kernel with name `name` located + in library `library`. If kernel handle is not found, the call returns + :py:obj:`~.cudaErrorSymbolNotFound`. + + Parameters + ---------- + library : :py:obj:`~.cudaLibrary_t` + Library to retrieve kernel from + name : bytes + Name of kernel to retrieve + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorSymbolNotFound` + pKernel : :py:obj:`~.cudaKernel_t` + Returned kernel handle + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cuLibraryGetKernel` + """ + cdef cyruntime.cudaLibrary_t cylibrary + if library is None: + cylibrary = 0 + elif isinstance(library, (cudaLibrary_t,)): + plibrary = int(library) + cylibrary = plibrary + else: + plibrary = int(cudaLibrary_t(library)) + cylibrary = plibrary + cdef cudaKernel_t pKernel = cudaKernel_t() + err = cyruntime.cudaLibraryGetKernel(pKernel._pvt_ptr, cylibrary, name) + return (cudaError_t(err), pKernel) +{{endif}} + +{{if 'cudaLibraryGetGlobal' in found_functions}} + +@cython.embedsignature(True) +def cudaLibraryGetGlobal(library, char* name): + """ Returns a global device pointer. + + Returns in `*dptr` and `*bytes` the base pointer and size of the global + with name `name` for the requested library `library` and the current + device. If no global for the requested name `name` exists, the call + returns :py:obj:`~.cudaErrorSymbolNotFound`. One of the parameters + `dptr` or `numbytes` (not both) can be NULL in which case it is + ignored. The returned `dptr` cannot be passed to the Symbol APIs such + as :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, + :py:obj:`~.cudaGetSymbolAddress`, or :py:obj:`~.cudaGetSymbolSize`. + + Parameters + ---------- + library : :py:obj:`~.cudaLibrary_t` + Library to retrieve global from + name : bytes + Name of global to retrieve + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorSymbolNotFound` :py:obj:`~.cudaErrorDeviceUninitialized`, :py:obj:`~.cudaErrorContextIsDestroyed` + dptr : Any + Returned global device pointer for the requested library + numbytes : int + Returned global size in bytes + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cudaLibraryGetManaged`, :py:obj:`~.cuLibraryGetGlobal` + """ + cdef cyruntime.cudaLibrary_t cylibrary + if library is None: + cylibrary = 0 + elif isinstance(library, (cudaLibrary_t,)): + plibrary = int(library) + cylibrary = plibrary + else: + plibrary = int(cudaLibrary_t(library)) + cylibrary = plibrary + cdef void_ptr dptr = 0 + cdef size_t numbytes = 0 + err = cyruntime.cudaLibraryGetGlobal(&dptr, &numbytes, cylibrary, name) + return (cudaError_t(err), dptr, numbytes) +{{endif}} + +{{if 'cudaLibraryGetManaged' in found_functions}} + +@cython.embedsignature(True) +def cudaLibraryGetManaged(library, char* name): + """ Returns a pointer to managed memory. + + Returns in `*dptr` and `*bytes` the base pointer and size of the + managed memory with name `name` for the requested library `library`. If + no managed memory with the requested name `name` exists, the call + returns :py:obj:`~.cudaErrorSymbolNotFound`. One of the parameters + `dptr` or `numbytes` (not both) can be NULL in which case it is + ignored. Note that managed memory for library `library` is shared + across devices and is registered when the library is loaded. The + returned `dptr` cannot be passed to the Symbol APIs such as + :py:obj:`~.cudaMemcpyToSymbol`, :py:obj:`~.cudaMemcpyFromSymbol`, + :py:obj:`~.cudaGetSymbolAddress`, or :py:obj:`~.cudaGetSymbolSize`. + + Parameters + ---------- + library : :py:obj:`~.cudaLibrary_t` + Library to retrieve managed memory from + name : bytes + Name of managed memory to retrieve + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorSymbolNotFound` + dptr : Any + Returned pointer to the managed memory + numbytes : int + Returned memory size in bytes + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cudaLibraryGetGlobal`, :py:obj:`~.cuLibraryGetManaged` + """ + cdef cyruntime.cudaLibrary_t cylibrary + if library is None: + cylibrary = 0 + elif isinstance(library, (cudaLibrary_t,)): + plibrary = int(library) + cylibrary = plibrary + else: + plibrary = int(cudaLibrary_t(library)) + cylibrary = plibrary + cdef void_ptr dptr = 0 + cdef size_t numbytes = 0 + err = cyruntime.cudaLibraryGetManaged(&dptr, &numbytes, cylibrary, name) + return (cudaError_t(err), dptr, numbytes) +{{endif}} + +{{if 'cudaLibraryGetUnifiedFunction' in found_functions}} + +@cython.embedsignature(True) +def cudaLibraryGetUnifiedFunction(library, char* symbol): + """ Returns a pointer to a unified function. + + Returns in `*fptr` the function pointer to a unified function denoted + by `symbol`. If no unified function with name `symbol` exists, the call + returns :py:obj:`~.cudaErrorSymbolNotFound`. If there is no device with + attribute :py:obj:`~.cudaDeviceProp.unifiedFunctionPointers` present in + the system, the call may return :py:obj:`~.cudaErrorSymbolNotFound`. + + Parameters + ---------- + library : :py:obj:`~.cudaLibrary_t` + Library to retrieve function pointer memory from + symbol : bytes + Name of function pointer to retrieve + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle`, :py:obj:`~.cudaErrorSymbolNotFound` + fptr : Any + Returned pointer to a unified function + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cuLibraryGetUnifiedFunction` + """ + cdef cyruntime.cudaLibrary_t cylibrary + if library is None: + cylibrary = 0 + elif isinstance(library, (cudaLibrary_t,)): + plibrary = int(library) + cylibrary = plibrary + else: + plibrary = int(cudaLibrary_t(library)) + cylibrary = plibrary + cdef void_ptr fptr = 0 + err = cyruntime.cudaLibraryGetUnifiedFunction(&fptr, cylibrary, symbol) + return (cudaError_t(err), fptr) +{{endif}} + +{{if 'cudaLibraryGetKernelCount' in found_functions}} + +@cython.embedsignature(True) +def cudaLibraryGetKernelCount(lib): + """ Returns the number of kernels within a library. + + Returns in `count` the number of kernels in `lib`. + + Parameters + ---------- + lib : :py:obj:`~.cudaLibrary_t` + Library to query + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + count : unsigned int + Number of kernels found within the library + + See Also + -------- + :py:obj:`~.cudaLibraryEnumerateKernels`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cuLibraryGetKernelCount` + """ + cdef cyruntime.cudaLibrary_t cylib + if lib is None: + cylib = 0 + elif isinstance(lib, (cudaLibrary_t,)): + plib = int(lib) + cylib = plib + else: + plib = int(cudaLibrary_t(lib)) + cylib = plib + cdef unsigned int count = 0 + err = cyruntime.cudaLibraryGetKernelCount(&count, cylib) + return (cudaError_t(err), count) +{{endif}} + +{{if 'cudaLibraryEnumerateKernels' in found_functions}} + +@cython.embedsignature(True) +def cudaLibraryEnumerateKernels(unsigned int numKernels, lib): + """ Retrieve the kernel handles within a library. + + Returns in `kernels` a maximum number of `numKernels` kernel handles + within `lib`. The returned kernel handle becomes invalid when the + library is unloaded. + + Parameters + ---------- + numKernels : unsigned int + Maximum number of kernel handles may be returned to the buffer + lib : :py:obj:`~.cudaLibrary_t` + Library to query from + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorCudartUnloading`, :py:obj:`~.cudaErrorInitializationError`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidResourceHandle` + kernels : List[:py:obj:`~.cudaKernel_t`] + Buffer where the kernel handles are returned to + + See Also + -------- + :py:obj:`~.cudaLibraryGetKernelCount`, :py:obj:`~.cuLibraryEnumerateKernels` + """ + cdef cyruntime.cudaLibrary_t cylib + if lib is None: + cylib = 0 + elif isinstance(lib, (cudaLibrary_t,)): + plib = int(lib) + cylib = plib + else: + plib = int(cudaLibrary_t(lib)) + cylib = plib + cdef cyruntime.cudaKernel_t* cykernels = NULL + pykernels = [] + if numKernels != 0: + cykernels = calloc(numKernels, sizeof(cyruntime.cudaKernel_t)) + if cykernels is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(numKernels) + 'x' + str(sizeof(cyruntime.cudaKernel_t))) + err = cyruntime.cudaLibraryEnumerateKernels(cykernels, numKernels, cylib) + if cudaError_t(err) == cudaError_t(0): + pykernels = [cudaKernel_t(init_value=cykernels[idx]) for idx in range(numKernels)] + if cykernels is not NULL: + free(cykernels) + return (cudaError_t(err), pykernels) +{{endif}} + +{{if 'cudaKernelSetAttributeForDevice' in found_functions}} + +@cython.embedsignature(True) +def cudaKernelSetAttributeForDevice(kernel, attr not None : cudaFuncAttribute, int value, int device): + """ Sets information about a kernel. + + This call sets the value of a specified attribute `attr` on the kernel + `kernel` for the requested device `device` to an integer value + specified by `value`. This function returns :py:obj:`~.cudaSuccess` if + the new value of the attribute could be successfully set. If the set + fails, this call will return an error. Not all attributes can have + values set. Attempting to set a value on a read-only attribute will + result in an error (:py:obj:`~.cudaErrorInvalidValue`) + + Note that attributes set using :py:obj:`~.cudaFuncSetAttribute()` will + override the attribute set by this API irrespective of whether the call + to :py:obj:`~.cudaFuncSetAttribute()` is made before or after this API + call. Because of this and the stricter locking requirements mentioned + below it is suggested that this call be used during the initialization + path and not on each thread accessing `kernel` such as on kernel + launches or on the critical path. + + Valid values for `attr` are: + + - :py:obj:`~.cudaFuncAttributeMaxDynamicSharedMemorySize` - The + requested maximum size in bytes of dynamically-allocated shared + memory. The sum of this value and the function attribute + :py:obj:`~.sharedSizeBytes` cannot exceed the device attribute + :py:obj:`~.cudaDevAttrMaxSharedMemoryPerBlockOptin`. The maximal size + of requestable dynamic shared memory may differ by GPU architecture. + + - :py:obj:`~.cudaFuncAttributePreferredSharedMemoryCarveout` - On + devices where the L1 cache and shared memory use the same hardware + resources, this sets the shared memory carveout preference, in + percent of the total shared memory. See + :py:obj:`~.cudaDevAttrMaxSharedMemoryPerMultiprocessor`. This is only + a hint, and the driver can choose a different ratio if required to + execute the function. + + - :py:obj:`~.cudaFuncAttributeRequiredClusterWidth`: The required + cluster width in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return cudaErrorNotPermitted. + + - :py:obj:`~.cudaFuncAttributeRequiredClusterHeight`: The required + cluster height in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return cudaErrorNotPermitted. + + - :py:obj:`~.cudaFuncAttributeRequiredClusterDepth`: The required + cluster depth in blocks. The width, height, and depth values must + either all be 0 or all be positive. The validity of the cluster + dimensions is checked at launch time. If the value is set during + compile time, it cannot be set at runtime. Setting it at runtime will + return cudaErrorNotPermitted. + + - :py:obj:`~.cudaFuncAttributeNonPortableClusterSizeAllowed`: Indicates + whether the function can be launched with non-portable cluster size. + 1 is allowed, 0 is disallowed. + + - :py:obj:`~.cudaFuncAttributeClusterSchedulingPolicyPreference`: The + block scheduling policy of a function. The value type is + cudaClusterSchedulingPolicy. + + Parameters + ---------- + kernel : :py:obj:`~.cudaKernel_t` + Kernel to set attribute of + attr : :py:obj:`~.cudaFuncAttribute` + Attribute requested + value : int + Value to set + device : int + Device to set attribute of + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidDeviceFunction`, :py:obj:`~.cudaErrorInvalidValue` + + See Also + -------- + :py:obj:`~.cudaLibraryLoadData`, :py:obj:`~.cudaLibraryLoadFromFile`, :py:obj:`~.cudaLibraryUnload`, :py:obj:`~.cudaLibraryGetKernel`, :py:obj:`~.cudaLaunchKernel`, :py:obj:`~.cudaFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + + Notes + ----- + The API has stricter locking requirements in comparison to its legacy counterpart :py:obj:`~.cudaFuncSetAttribute()` due to device-wide semantics. If multiple threads are trying to set the same attribute on the same device simultaneously, the attribute setting will depend on the interleavings chosen by the OS scheduler and memory consistency. + """ + cdef cyruntime.cudaKernel_t cykernel + if kernel is None: + cykernel = 0 + elif isinstance(kernel, (cudaKernel_t,)): + pkernel = int(kernel) + cykernel = pkernel + else: + pkernel = int(cudaKernel_t(kernel)) + cykernel = pkernel + cdef cyruntime.cudaFuncAttribute cyattr = attr.value + err = cyruntime.cudaKernelSetAttributeForDevice(cykernel, cyattr, value, device) + return (cudaError_t(err),) +{{endif}} + {{if 'cudaGetExportTable' in found_functions}} @cython.embedsignature(True) def cudaGetExportTable(pExportTableId : Optional[cudaUUID_t]): """""" cdef void_ptr ppExportTable = 0 - cdef cyruntime.cudaUUID_t* cypExportTableId_ptr = pExportTableId._ptr if pExportTableId != None else NULL + cdef cyruntime.cudaUUID_t* cypExportTableId_ptr = pExportTableId._pvt_ptr if pExportTableId != None else NULL err = cyruntime.cudaGetExportTable(&ppExportTable, cypExportTableId_ptr) return (cudaError_t(err), ppExportTable) {{endif}} @@ -30728,6 +35717,15 @@ def cudaGetKernel(entryFuncAddr): Returns in `kernelPtr` the device kernel corresponding to the entry function `entryFuncAddr`. + Note that it is possible that there are multiple symbols belonging to + different translation units with the same `entryFuncAddr` registered + with this CUDA Runtime and so the order which the translation units are + loaded and registered with the CUDA Runtime can lead to differing + return pointers in `kernelPtr` . Suggested methods of ensuring + uniqueness are to limit visibility of global device functions by using + static or hidden visibility attribute in the respective translation + units. + Parameters ---------- entryFuncAddr : Any @@ -30747,7 +35745,7 @@ def cudaGetKernel(entryFuncAddr): cdef cudaKernel_t kernelPtr = cudaKernel_t() cyentryFuncAddr = utils.HelperInputVoidPtr(entryFuncAddr) cdef void* cyentryFuncAddr_ptr = cyentryFuncAddr.cptr - err = cyruntime.cudaGetKernel(kernelPtr._ptr, cyentryFuncAddr_ptr) + err = cyruntime.cudaGetKernel(kernelPtr._pvt_ptr, cyentryFuncAddr_ptr) return (cudaError_t(err), kernelPtr) {{endif}} @@ -30786,7 +35784,7 @@ def make_cudaPitchedPtr(d, size_t p, size_t xsz, size_t ysz): cdef void* cyd_ptr = cyd.cptr err = cyruntime.make_cudaPitchedPtr(cyd_ptr, p, xsz, ysz) cdef cudaPitchedPtr wrapper = cudaPitchedPtr() - wrapper._ptr[0] = err + wrapper._pvt_ptr[0] = err return wrapper {{endif}} @@ -30821,7 +35819,7 @@ def make_cudaPos(size_t x, size_t y, size_t z): """ err = cyruntime.make_cudaPos(x, y, z) cdef cudaPos wrapper = cudaPos() - wrapper._ptr[0] = err + wrapper._pvt_ptr[0] = err return wrapper {{endif}} @@ -30857,7 +35855,7 @@ def make_cudaExtent(size_t w, size_t h, size_t d): """ err = cyruntime.make_cudaExtent(w, h, d) cdef cudaExtent wrapper = cudaExtent() - wrapper._ptr[0] = err + wrapper._pvt_ptr[0] = err return wrapper {{endif}} @@ -30931,7 +35929,7 @@ def cudaGraphicsEGLRegisterImage(image, unsigned int flags): pimage = int(EGLImageKHR(image)) cyimage = pimage cdef cudaGraphicsResource_t pCudaResource = cudaGraphicsResource_t() - err = cyruntime.cudaGraphicsEGLRegisterImage(pCudaResource._ptr, cyimage, flags) + err = cyruntime.cudaGraphicsEGLRegisterImage(pCudaResource._pvt_ptr, cyimage, flags) return (cudaError_t(err), pCudaResource) {{endif}} @@ -30972,7 +35970,7 @@ def cudaEGLStreamConsumerConnect(eglStream): peglStream = int(EGLStreamKHR(eglStream)) cyeglStream = peglStream cdef cudaEglStreamConnection conn = cudaEglStreamConnection() - err = cyruntime.cudaEGLStreamConsumerConnect(conn._ptr, cyeglStream) + err = cyruntime.cudaEGLStreamConsumerConnect(conn._pvt_ptr, cyeglStream) return (cudaError_t(err), conn) {{endif}} @@ -31017,7 +36015,7 @@ def cudaEGLStreamConsumerConnectWithFlags(eglStream, unsigned int flags): peglStream = int(EGLStreamKHR(eglStream)) cyeglStream = peglStream cdef cudaEglStreamConnection conn = cudaEglStreamConnection() - err = cyruntime.cudaEGLStreamConsumerConnectWithFlags(conn._ptr, cyeglStream, flags) + err = cyruntime.cudaEGLStreamConsumerConnectWithFlags(conn._pvt_ptr, cyeglStream, flags) return (cudaError_t(err), conn) {{endif}} @@ -31241,7 +36239,7 @@ def cudaEGLStreamProducerConnect(eglStream, width, height): peglStream = int(EGLStreamKHR(eglStream)) cyeglStream = peglStream cdef cudaEglStreamConnection conn = cudaEglStreamConnection() - err = cyruntime.cudaEGLStreamProducerConnect(conn._ptr, cyeglStream, cywidth, cyheight) + err = cyruntime.cudaEGLStreamProducerConnect(conn._pvt_ptr, cyeglStream, cywidth, cyheight) return (cudaError_t(err), conn) {{endif}} @@ -31336,7 +36334,7 @@ def cudaEGLStreamProducerPresentFrame(conn, eglframe not None : cudaEglFrame, pS cyconn = conn else: raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) - err = cyruntime.cudaEGLStreamProducerPresentFrame(cyconn, eglframe._ptr[0], cypStream) + err = cyruntime.cudaEGLStreamProducerPresentFrame(cyconn, eglframe._pvt_ptr[0], cypStream) return (cudaError_t(err),) {{endif}} @@ -31389,7 +36387,7 @@ def cudaEGLStreamProducerReturnFrame(conn, eglframe : Optional[cudaEglFrame], pS cyconn = conn else: raise TypeError("Argument 'conn' is not instance of type (expected , found " + str(type(conn))) - cdef cyruntime.cudaEglFrame* cyeglframe_ptr = eglframe._ptr if eglframe != None else NULL + cdef cyruntime.cudaEglFrame* cyeglframe_ptr = eglframe._pvt_ptr if eglframe != None else NULL err = cyruntime.cudaEGLStreamProducerReturnFrame(cyconn, cyeglframe_ptr, cypStream) return (cudaError_t(err),) {{endif}} @@ -31442,7 +36440,7 @@ def cudaGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned presource = int(cudaGraphicsResource_t(resource)) cyresource = presource cdef cudaEglFrame eglFrame = cudaEglFrame() - err = cyruntime.cudaGraphicsResourceGetMappedEglFrame(eglFrame._ptr, cyresource, index, mipLevel) + err = cyruntime.cudaGraphicsResourceGetMappedEglFrame(eglFrame._pvt_ptr, cyresource, index, mipLevel) return (cudaError_t(err), eglFrame) {{endif}} @@ -31496,7 +36494,7 @@ def cudaEventCreateFromEGLSync(eglSync, unsigned int flags): peglSync = int(EGLSyncKHR(eglSync)) cyeglSync = peglSync cdef cudaEvent_t phEvent = cudaEvent_t() - err = cyruntime.cudaEventCreateFromEGLSync(phEvent._ptr, cyeglSync, flags) + err = cyruntime.cudaEventCreateFromEGLSync(phEvent._pvt_ptr, cyeglSync, flags) return (cudaError_t(err), phEvent) {{endif}} @@ -31714,7 +36712,7 @@ def cudaGraphicsGLRegisterImage(image, target, unsigned int flags): pimage = int(GLuint(image)) cyimage = pimage cdef cudaGraphicsResource_t resource = cudaGraphicsResource_t() - err = cyruntime.cudaGraphicsGLRegisterImage(resource._ptr, cyimage, cytarget, flags) + err = cyruntime.cudaGraphicsGLRegisterImage(resource._pvt_ptr, cyimage, cytarget, flags) return (cudaError_t(err), resource) {{endif}} @@ -31769,7 +36767,7 @@ def cudaGraphicsGLRegisterBuffer(buffer, unsigned int flags): pbuffer = int(GLuint(buffer)) cybuffer = pbuffer cdef cudaGraphicsResource_t resource = cudaGraphicsResource_t() - err = cyruntime.cudaGraphicsGLRegisterBuffer(resource._ptr, cybuffer, flags) + err = cyruntime.cudaGraphicsGLRegisterBuffer(resource._pvt_ptr, cybuffer, flags) return (cudaError_t(err), resource) {{endif}} @@ -31934,7 +36932,7 @@ def cudaGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags): pvdpSurface = int(VdpVideoSurface(vdpSurface)) cyvdpSurface = pvdpSurface cdef cudaGraphicsResource_t resource = cudaGraphicsResource_t() - err = cyruntime.cudaGraphicsVDPAURegisterVideoSurface(resource._ptr, cyvdpSurface, flags) + err = cyruntime.cudaGraphicsVDPAURegisterVideoSurface(resource._pvt_ptr, cyvdpSurface, flags) return (cudaError_t(err), resource) {{endif}} @@ -31989,7 +36987,7 @@ def cudaGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags): pvdpSurface = int(VdpOutputSurface(vdpSurface)) cyvdpSurface = pvdpSurface cdef cudaGraphicsResource_t resource = cudaGraphicsResource_t() - err = cyruntime.cudaGraphicsVDPAURegisterOutputSurface(resource._ptr, cyvdpSurface, flags) + err = cyruntime.cudaGraphicsVDPAURegisterOutputSurface(resource._pvt_ptr, cyvdpSurface, flags) return (cudaError_t(err), resource) {{endif}} @@ -32039,10 +37037,10 @@ def sizeof(objType): lowered_name : int The size of `objType` in bytes """ - {{if 'struct dim3' in found_types}} + {{if 'dim3' in found_struct}} if objType == dim3: return sizeof(cyruntime.dim3){{endif}} - {{if 'struct cudaChannelFormatDesc' in found_types}} + {{if 'cudaChannelFormatDesc' in found_struct}} if objType == cudaChannelFormatDesc: return sizeof(cyruntime.cudaChannelFormatDesc){{endif}} {{if 'cudaArray_t' in found_types}} @@ -32057,82 +37055,94 @@ def sizeof(objType): {{if 'cudaMipmappedArray_const_t' in found_types}} if objType == cudaMipmappedArray_const_t: return sizeof(cyruntime.cudaMipmappedArray_const_t){{endif}} - {{if 'struct cudaArraySparseProperties' in found_types}} + {{if 'cudaArraySparseProperties' in found_struct}} if objType == cudaArraySparseProperties: return sizeof(cyruntime.cudaArraySparseProperties){{endif}} - {{if 'struct cudaArrayMemoryRequirements' in found_types}} + {{if 'cudaArrayMemoryRequirements' in found_struct}} if objType == cudaArrayMemoryRequirements: return sizeof(cyruntime.cudaArrayMemoryRequirements){{endif}} - {{if 'struct cudaPitchedPtr' in found_types}} + {{if 'cudaPitchedPtr' in found_struct}} if objType == cudaPitchedPtr: return sizeof(cyruntime.cudaPitchedPtr){{endif}} - {{if 'struct cudaExtent' in found_types}} + {{if 'cudaExtent' in found_struct}} if objType == cudaExtent: return sizeof(cyruntime.cudaExtent){{endif}} - {{if 'struct cudaPos' in found_types}} + {{if 'cudaPos' in found_struct}} if objType == cudaPos: return sizeof(cyruntime.cudaPos){{endif}} - {{if 'struct cudaMemcpy3DParms' in found_types}} + {{if 'cudaMemcpy3DParms' in found_struct}} if objType == cudaMemcpy3DParms: return sizeof(cyruntime.cudaMemcpy3DParms){{endif}} - {{if 'struct cudaMemcpyNodeParams' in found_types}} + {{if 'cudaMemcpyNodeParams' in found_struct}} if objType == cudaMemcpyNodeParams: return sizeof(cyruntime.cudaMemcpyNodeParams){{endif}} - {{if 'struct cudaMemcpy3DPeerParms' in found_types}} + {{if 'cudaMemcpy3DPeerParms' in found_struct}} if objType == cudaMemcpy3DPeerParms: return sizeof(cyruntime.cudaMemcpy3DPeerParms){{endif}} - {{if 'struct cudaMemsetParams' in found_types}} + {{if 'cudaMemsetParams' in found_struct}} if objType == cudaMemsetParams: return sizeof(cyruntime.cudaMemsetParams){{endif}} - {{if 'struct cudaMemsetParamsV2' in found_types}} + {{if 'cudaMemsetParamsV2' in found_struct}} if objType == cudaMemsetParamsV2: return sizeof(cyruntime.cudaMemsetParamsV2){{endif}} - {{if 'struct cudaAccessPolicyWindow' in found_types}} + {{if 'cudaAccessPolicyWindow' in found_struct}} if objType == cudaAccessPolicyWindow: return sizeof(cyruntime.cudaAccessPolicyWindow){{endif}} {{if 'cudaHostFn_t' in found_types}} if objType == cudaHostFn_t: return sizeof(cyruntime.cudaHostFn_t){{endif}} - {{if 'struct cudaHostNodeParams' in found_types}} + {{if 'cudaHostNodeParams' in found_struct}} if objType == cudaHostNodeParams: return sizeof(cyruntime.cudaHostNodeParams){{endif}} - {{if 'struct cudaHostNodeParamsV2' in found_types}} + {{if 'cudaHostNodeParamsV2' in found_struct}} if objType == cudaHostNodeParamsV2: return sizeof(cyruntime.cudaHostNodeParamsV2){{endif}} - {{if 'struct cudaResourceDesc' in found_types}} + {{if 'cudaResourceDesc' in found_struct}} if objType == cudaResourceDesc: return sizeof(cyruntime.cudaResourceDesc){{endif}} - {{if 'struct cudaResourceViewDesc' in found_types}} + {{if 'cudaResourceViewDesc' in found_struct}} if objType == cudaResourceViewDesc: return sizeof(cyruntime.cudaResourceViewDesc){{endif}} - {{if 'struct cudaPointerAttributes' in found_types}} + {{if 'cudaPointerAttributes' in found_struct}} if objType == cudaPointerAttributes: return sizeof(cyruntime.cudaPointerAttributes){{endif}} - {{if 'struct cudaFuncAttributes' in found_types}} + {{if 'cudaFuncAttributes' in found_struct}} if objType == cudaFuncAttributes: return sizeof(cyruntime.cudaFuncAttributes){{endif}} - {{if 'struct cudaMemLocation' in found_types}} + {{if 'cudaMemLocation' in found_struct}} if objType == cudaMemLocation: return sizeof(cyruntime.cudaMemLocation){{endif}} - {{if 'struct cudaMemAccessDesc' in found_types}} + {{if 'cudaMemAccessDesc' in found_struct}} if objType == cudaMemAccessDesc: return sizeof(cyruntime.cudaMemAccessDesc){{endif}} - {{if 'struct cudaMemPoolProps' in found_types}} + {{if 'cudaMemPoolProps' in found_struct}} if objType == cudaMemPoolProps: return sizeof(cyruntime.cudaMemPoolProps){{endif}} - {{if 'struct cudaMemPoolPtrExportData' in found_types}} + {{if 'cudaMemPoolPtrExportData' in found_struct}} if objType == cudaMemPoolPtrExportData: return sizeof(cyruntime.cudaMemPoolPtrExportData){{endif}} - {{if 'struct cudaMemAllocNodeParams' in found_types}} + {{if 'cudaMemAllocNodeParams' in found_struct}} if objType == cudaMemAllocNodeParams: return sizeof(cyruntime.cudaMemAllocNodeParams){{endif}} - {{if 'struct cudaMemAllocNodeParamsV2' in found_types}} + {{if 'cudaMemAllocNodeParamsV2' in found_struct}} if objType == cudaMemAllocNodeParamsV2: return sizeof(cyruntime.cudaMemAllocNodeParamsV2){{endif}} - {{if 'struct cudaMemFreeNodeParams' in found_types}} + {{if 'cudaMemFreeNodeParams' in found_struct}} if objType == cudaMemFreeNodeParams: return sizeof(cyruntime.cudaMemFreeNodeParams){{endif}} - {{if 'struct CUuuid_st' in found_types}} + {{if 'cudaMemcpyAttributes' in found_struct}} + if objType == cudaMemcpyAttributes: + return sizeof(cyruntime.cudaMemcpyAttributes){{endif}} + {{if 'cudaOffset3D' in found_struct}} + if objType == cudaOffset3D: + return sizeof(cyruntime.cudaOffset3D){{endif}} + {{if 'cudaMemcpy3DOperand' in found_struct}} + if objType == cudaMemcpy3DOperand: + return sizeof(cyruntime.cudaMemcpy3DOperand){{endif}} + {{if 'cudaMemcpy3DBatchOp' in found_struct}} + if objType == cudaMemcpy3DBatchOp: + return sizeof(cyruntime.cudaMemcpy3DBatchOp){{endif}} + {{if 'CUuuid_st' in found_struct}} if objType == CUuuid_st: return sizeof(cyruntime.CUuuid_st){{endif}} {{if 'CUuuid' in found_types}} @@ -32141,43 +37151,43 @@ def sizeof(objType): {{if 'cudaUUID_t' in found_types}} if objType == cudaUUID_t: return sizeof(cyruntime.cudaUUID_t){{endif}} - {{if 'struct cudaDeviceProp' in found_types}} + {{if 'cudaDeviceProp' in found_struct}} if objType == cudaDeviceProp: return sizeof(cyruntime.cudaDeviceProp){{endif}} - {{if 'struct cudaIpcEventHandle_st' in found_types}} + {{if 'cudaIpcEventHandle_st' in found_struct}} if objType == cudaIpcEventHandle_st: return sizeof(cyruntime.cudaIpcEventHandle_st){{endif}} {{if 'cudaIpcEventHandle_t' in found_types}} if objType == cudaIpcEventHandle_t: return sizeof(cyruntime.cudaIpcEventHandle_t){{endif}} - {{if 'struct cudaIpcMemHandle_st' in found_types}} + {{if 'cudaIpcMemHandle_st' in found_struct}} if objType == cudaIpcMemHandle_st: return sizeof(cyruntime.cudaIpcMemHandle_st){{endif}} {{if 'cudaIpcMemHandle_t' in found_types}} if objType == cudaIpcMemHandle_t: return sizeof(cyruntime.cudaIpcMemHandle_t){{endif}} - {{if 'struct cudaMemFabricHandle_st' in found_types}} + {{if 'cudaMemFabricHandle_st' in found_struct}} if objType == cudaMemFabricHandle_st: return sizeof(cyruntime.cudaMemFabricHandle_st){{endif}} {{if 'cudaMemFabricHandle_t' in found_types}} if objType == cudaMemFabricHandle_t: return sizeof(cyruntime.cudaMemFabricHandle_t){{endif}} - {{if 'struct cudaExternalMemoryHandleDesc' in found_types}} + {{if 'cudaExternalMemoryHandleDesc' in found_struct}} if objType == cudaExternalMemoryHandleDesc: return sizeof(cyruntime.cudaExternalMemoryHandleDesc){{endif}} - {{if 'struct cudaExternalMemoryBufferDesc' in found_types}} + {{if 'cudaExternalMemoryBufferDesc' in found_struct}} if objType == cudaExternalMemoryBufferDesc: return sizeof(cyruntime.cudaExternalMemoryBufferDesc){{endif}} - {{if 'struct cudaExternalMemoryMipmappedArrayDesc' in found_types}} + {{if 'cudaExternalMemoryMipmappedArrayDesc' in found_struct}} if objType == cudaExternalMemoryMipmappedArrayDesc: return sizeof(cyruntime.cudaExternalMemoryMipmappedArrayDesc){{endif}} - {{if 'struct cudaExternalSemaphoreHandleDesc' in found_types}} + {{if 'cudaExternalSemaphoreHandleDesc' in found_struct}} if objType == cudaExternalSemaphoreHandleDesc: return sizeof(cyruntime.cudaExternalSemaphoreHandleDesc){{endif}} - {{if 'struct cudaExternalSemaphoreSignalParams' in found_types}} + {{if 'cudaExternalSemaphoreSignalParams' in found_struct}} if objType == cudaExternalSemaphoreSignalParams: return sizeof(cyruntime.cudaExternalSemaphoreSignalParams){{endif}} - {{if 'struct cudaExternalSemaphoreWaitParams' in found_types}} + {{if 'cudaExternalSemaphoreWaitParams' in found_struct}} if objType == cudaExternalSemaphoreWaitParams: return sizeof(cyruntime.cudaExternalSemaphoreWaitParams){{endif}} {{if 'cudaStream_t' in found_types}} @@ -32213,43 +37223,49 @@ def sizeof(objType): {{if 'cudaKernel_t' in found_types}} if objType == cudaKernel_t: return sizeof(cyruntime.cudaKernel_t){{endif}} + {{if 'cudalibraryHostUniversalFunctionAndDataTable' in found_struct}} + if objType == cudalibraryHostUniversalFunctionAndDataTable: + return sizeof(cyruntime.cudalibraryHostUniversalFunctionAndDataTable){{endif}} + {{if 'cudaLibrary_t' in found_types}} + if objType == cudaLibrary_t: + return sizeof(cyruntime.cudaLibrary_t){{endif}} {{if 'cudaMemPool_t' in found_types}} if objType == cudaMemPool_t: return sizeof(cyruntime.cudaMemPool_t){{endif}} - {{if 'struct cudaKernelNodeParams' in found_types}} + {{if 'cudaKernelNodeParams' in found_struct}} if objType == cudaKernelNodeParams: return sizeof(cyruntime.cudaKernelNodeParams){{endif}} - {{if 'struct cudaKernelNodeParamsV2' in found_types}} + {{if 'cudaKernelNodeParamsV2' in found_struct}} if objType == cudaKernelNodeParamsV2: return sizeof(cyruntime.cudaKernelNodeParamsV2){{endif}} - {{if 'struct cudaExternalSemaphoreSignalNodeParams' in found_types}} + {{if 'cudaExternalSemaphoreSignalNodeParams' in found_struct}} if objType == cudaExternalSemaphoreSignalNodeParams: return sizeof(cyruntime.cudaExternalSemaphoreSignalNodeParams){{endif}} - {{if 'struct cudaExternalSemaphoreSignalNodeParamsV2' in found_types}} + {{if 'cudaExternalSemaphoreSignalNodeParamsV2' in found_struct}} if objType == cudaExternalSemaphoreSignalNodeParamsV2: return sizeof(cyruntime.cudaExternalSemaphoreSignalNodeParamsV2){{endif}} - {{if 'struct cudaExternalSemaphoreWaitNodeParams' in found_types}} + {{if 'cudaExternalSemaphoreWaitNodeParams' in found_struct}} if objType == cudaExternalSemaphoreWaitNodeParams: return sizeof(cyruntime.cudaExternalSemaphoreWaitNodeParams){{endif}} - {{if 'struct cudaExternalSemaphoreWaitNodeParamsV2' in found_types}} + {{if 'cudaExternalSemaphoreWaitNodeParamsV2' in found_struct}} if objType == cudaExternalSemaphoreWaitNodeParamsV2: return sizeof(cyruntime.cudaExternalSemaphoreWaitNodeParamsV2){{endif}} - {{if 'struct cudaConditionalNodeParams' in found_types}} + {{if 'cudaConditionalNodeParams' in found_struct}} if objType == cudaConditionalNodeParams: return sizeof(cyruntime.cudaConditionalNodeParams){{endif}} - {{if 'struct cudaChildGraphNodeParams' in found_types}} + {{if 'cudaChildGraphNodeParams' in found_struct}} if objType == cudaChildGraphNodeParams: return sizeof(cyruntime.cudaChildGraphNodeParams){{endif}} - {{if 'struct cudaEventRecordNodeParams' in found_types}} + {{if 'cudaEventRecordNodeParams' in found_struct}} if objType == cudaEventRecordNodeParams: return sizeof(cyruntime.cudaEventRecordNodeParams){{endif}} - {{if 'struct cudaEventWaitNodeParams' in found_types}} + {{if 'cudaEventWaitNodeParams' in found_struct}} if objType == cudaEventWaitNodeParams: return sizeof(cyruntime.cudaEventWaitNodeParams){{endif}} - {{if 'struct cudaGraphNodeParams' in found_types}} + {{if 'cudaGraphNodeParams' in found_struct}} if objType == cudaGraphNodeParams: return sizeof(cyruntime.cudaGraphNodeParams){{endif}} - {{if 'struct cudaGraphEdgeData_st' in found_types}} + {{if 'cudaGraphEdgeData_st' in found_struct}} if objType == cudaGraphEdgeData_st: return sizeof(cyruntime.cudaGraphEdgeData_st){{endif}} {{if 'cudaGraphEdgeData' in found_types}} @@ -32258,13 +37274,13 @@ def sizeof(objType): {{if 'cudaGraphExec_t' in found_types}} if objType == cudaGraphExec_t: return sizeof(cyruntime.cudaGraphExec_t){{endif}} - {{if 'struct cudaGraphInstantiateParams_st' in found_types}} + {{if 'cudaGraphInstantiateParams_st' in found_struct}} if objType == cudaGraphInstantiateParams_st: return sizeof(cyruntime.cudaGraphInstantiateParams_st){{endif}} {{if 'cudaGraphInstantiateParams' in found_types}} if objType == cudaGraphInstantiateParams: return sizeof(cyruntime.cudaGraphInstantiateParams){{endif}} - {{if 'struct cudaGraphExecUpdateResultInfo_st' in found_types}} + {{if 'cudaGraphExecUpdateResultInfo_st' in found_struct}} if objType == cudaGraphExecUpdateResultInfo_st: return sizeof(cyruntime.cudaGraphExecUpdateResultInfo_st){{endif}} {{if 'cudaGraphExecUpdateResultInfo' in found_types}} @@ -32273,19 +37289,19 @@ def sizeof(objType): {{if 'cudaGraphDeviceNode_t' in found_types}} if objType == cudaGraphDeviceNode_t: return sizeof(cyruntime.cudaGraphDeviceNode_t){{endif}} - {{if 'struct cudaGraphKernelNodeUpdate' in found_types}} + {{if 'cudaGraphKernelNodeUpdate' in found_struct}} if objType == cudaGraphKernelNodeUpdate: return sizeof(cyruntime.cudaGraphKernelNodeUpdate){{endif}} - {{if 'struct cudaLaunchMemSyncDomainMap_st' in found_types}} + {{if 'cudaLaunchMemSyncDomainMap_st' in found_struct}} if objType == cudaLaunchMemSyncDomainMap_st: return sizeof(cyruntime.cudaLaunchMemSyncDomainMap_st){{endif}} {{if 'cudaLaunchMemSyncDomainMap' in found_types}} if objType == cudaLaunchMemSyncDomainMap: return sizeof(cyruntime.cudaLaunchMemSyncDomainMap){{endif}} - {{if 'union cudaLaunchAttributeValue' in found_types}} + {{if 'cudaLaunchAttributeValue' in found_struct}} if objType == cudaLaunchAttributeValue: return sizeof(cyruntime.cudaLaunchAttributeValue){{endif}} - {{if 'struct cudaLaunchAttribute_st' in found_types}} + {{if 'cudaLaunchAttribute_st' in found_struct}} if objType == cudaLaunchAttribute_st: return sizeof(cyruntime.cudaLaunchAttribute_st){{endif}} {{if 'cudaLaunchAttribute' in found_types}} @@ -32294,7 +37310,7 @@ def sizeof(objType): {{if 'cudaAsyncCallbackHandle_t' in found_types}} if objType == cudaAsyncCallbackHandle_t: return sizeof(cyruntime.cudaAsyncCallbackHandle_t){{endif}} - {{if 'struct cudaAsyncNotificationInfo' in found_types}} + {{if 'cudaAsyncNotificationInfo' in found_struct}} if objType == cudaAsyncNotificationInfo: return sizeof(cyruntime.cudaAsyncNotificationInfo){{endif}} {{if 'cudaAsyncNotificationInfo_t' in found_types}} @@ -32306,7 +37322,7 @@ def sizeof(objType): {{if 'cudaSurfaceObject_t' in found_types}} if objType == cudaSurfaceObject_t: return sizeof(cyruntime.cudaSurfaceObject_t){{endif}} - {{if 'struct cudaTextureDesc' in found_types}} + {{if 'cudaTextureDesc' in found_struct}} if objType == cudaTextureDesc: return sizeof(cyruntime.cudaTextureDesc){{endif}} {{if 'cudaTextureObject_t' in found_types}} diff --git a/cuda_bindings/docs/source/module/driver.rst b/cuda_bindings/docs/source/module/driver.rst index c70f742dc..952ac48e1 100644 --- a/cuda_bindings/docs/source/module/driver.rst +++ b/cuda_bindings/docs/source/module/driver.rst @@ -75,6 +75,15 @@ Data types used by CUDA driver .. autoclass:: cuda.bindings.driver.CUDA_EVENT_RECORD_NODE_PARAMS_st .. autoclass:: cuda.bindings.driver.CUDA_EVENT_WAIT_NODE_PARAMS_st .. autoclass:: cuda.bindings.driver.CUgraphNodeParams_st +.. autoclass:: cuda.bindings.driver.CUcheckpointLockArgs_st +.. autoclass:: cuda.bindings.driver.CUcheckpointCheckpointArgs_st +.. autoclass:: cuda.bindings.driver.CUcheckpointRestoreArgs_st +.. autoclass:: cuda.bindings.driver.CUcheckpointUnlockArgs_st +.. autoclass:: cuda.bindings.driver.CUmemcpyAttributes_st +.. autoclass:: cuda.bindings.driver.CUoffset3D_st +.. autoclass:: cuda.bindings.driver.CUextent3D_st +.. autoclass:: cuda.bindings.driver.CUmemcpy3DOperand_st +.. autoclass:: cuda.bindings.driver.CUDA_MEMCPY3D_BATCH_OP_st .. autoclass:: cuda.bindings.driver.CUeglFrame_st .. autoclass:: cuda.bindings.driver.CUipcMem_flags @@ -722,6 +731,24 @@ Data types used by CUDA driver 3 channel 10-bit YUV planar format, with 4:4:4 sampling + .. autoattribute:: cuda.bindings.driver.CUarray_format.CU_AD_FORMAT_YUV444_8bit_SemiPlanar + + + 3 channel 8-bit YUV semi-planar format, with 4:4:4 sampling + + + .. autoattribute:: cuda.bindings.driver.CUarray_format.CU_AD_FORMAT_YUV444_16bit_SemiPlanar + + + 3 channel 16-bit YUV semi-planar format, with 4:4:4 sampling + + + .. autoattribute:: cuda.bindings.driver.CUarray_format.CU_AD_FORMAT_UNORM_INT_101010_2 + + + 4 channel unorm R10G10B10A2 RGB format + + .. autoattribute:: cuda.bindings.driver.CUarray_format.CU_AD_FORMAT_MAX .. autoclass:: cuda.bindings.driver.CUaddress_mode @@ -1610,6 +1637,36 @@ Data types used by CUDA driver Device supports CIG with D3D12. + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_ALGORITHM_MASK + + + The returned valued shall be interpreted as a bitmask, where the individual bits are described by the :py:obj:`~.CUmemDecompressAlgorithm` enum. + + + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_MEM_DECOMPRESS_MAXIMUM_LENGTH + + + The returned valued is the maximum length in bytes of a single decompress operation that is allowed. + + + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_GPU_PCI_DEVICE_ID + + + The combined 16-bit PCI device ID and 16-bit PCI vendor ID. + + + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_GPU_PCI_SUBSYSTEM_ID + + + The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor ID. + + + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_HOST_NUMA_MULTINODE_IPC_SUPPORTED + + + Device supports HOST_NUMA location IPC between nodes in a multi-node system. + + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_MAX .. autoclass:: cuda.bindings.driver.CUpointer_attribute @@ -1733,6 +1790,12 @@ Data types used by CUDA driver A process-wide unique id corresponding to the physical allocation the pointer belongs to + + .. autoattribute:: cuda.bindings.driver.CUpointer_attribute.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE + + + Returns in `*data` a boolean that indicates whether the pointer points to memory that is capable to be used for hardware accelerated decompression. + .. autoclass:: cuda.bindings.driver.CUfunction_attribute .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK @@ -2511,11 +2574,47 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_90 - Compute device class 9.0. Compute device class 9.0. with accelerated features. + Compute device class 9.0. + + + .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_100 + + + Compute device class 10.0. + + + .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_101 + + + Compute device class 10.1. + + + .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_120 + + + Compute device class 12.0. Compute device class 9.0. with accelerated features. .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_90A + + Compute device class 10.0. with accelerated features. + + + .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_100A + + + Compute device class 10.1 with accelerated features. + + + .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_101A + + + Compute device class 12.0. with accelerated features. + + + .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_120A + .. autoclass:: cuda.bindings.driver.CUjit_fallback .. autoattribute:: cuda.bindings.driver.CUjit_fallback.CU_PREFER_PTX @@ -2724,7 +2823,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUlimit.CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED - When set to a non-zero value, CUDA will fail to launch a kernel on a CIG context, instead of using the fallback path, if the kernel uses more shared memory than available + When set to zero, CUDA will fail to launch a kernel on a CIG context, instead of using the fallback path, if the kernel uses more shared memory than available .. autoattribute:: cuda.bindings.driver.CUlimit.CU_LIMIT_MAX @@ -2778,7 +2877,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUgraphConditionalNodeType.CU_GRAPH_COND_TYPE_IF - Conditional 'if' Node. Body executed once if condition value is non-zero. + Conditional 'if/else' Node. Body[0] executed if condition is non-zero. If `size` == 2, an optional ELSE graph is created and this is executed if the condition is zero. .. autoattribute:: cuda.bindings.driver.CUgraphConditionalNodeType.CU_GRAPH_COND_TYPE_WHILE @@ -2786,6 +2885,12 @@ Data types used by CUDA driver Conditional 'while' Node. Body executed repeatedly while condition value is non-zero. + + .. autoattribute:: cuda.bindings.driver.CUgraphConditionalNodeType.CU_GRAPH_COND_TYPE_SWITCH + + + Conditional 'switch' Node. Body[n] is executed once, where 'n' is the value of the condition. If the condition does not match a body index, no body is launched. + .. autoclass:: cuda.bindings.driver.CUgraphNodeType .. autoattribute:: cuda.bindings.driver.CUgraphNodeType.CU_GRAPH_NODE_TYPE_KERNEL @@ -2943,6 +3048,12 @@ Data types used by CUDA driver Instantiation for device launch failed due to the nodes belonging to different contexts + + .. autoattribute:: cuda.bindings.driver.CUgraphInstantiateResult.CUDA_GRAPH_INSTANTIATE_CONDITIONAL_HANDLE_UNUSED + + + One or more conditional handles are not associated with conditional nodes + .. autoclass:: cuda.bindings.driver.CUsynchronizationPolicy .. autoattribute:: cuda.bindings.driver.CUsynchronizationPolicy.CU_SYNC_POLICY_AUTO @@ -3058,6 +3169,16 @@ Data types used by CUDA driver Valid for streams, graph nodes, launches. See :py:obj:`~.CUlaunchAttributeValue.memSyncDomain`. + .. autoattribute:: cuda.bindings.driver.CUlaunchAttributeID.CU_LAUNCH_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION + + + Valid for graph nodes, launches. Set :py:obj:`~.CUlaunchAttributeValue.preferredClusterDim` to allow the kernel launch to specify a preferred substitute cluster dimension. Blocks may be grouped according to either the dimensions specified with this attribute (grouped into a "preferred substitute cluster"), or the one specified with :py:obj:`~.CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION` attribute (grouped into a "regular cluster"). The cluster dimensions of a "preferred substitute cluster" shall be an integer multiple greater than zero of the regular cluster dimensions. The device will attempt - on a best-effort basis - to group thread blocks into preferred clusters over grouping them into regular clusters. When it deems necessary (primarily when the device temporarily runs out of physical resources to launch the larger preferred clusters), the device may switch to launch the regular clusters instead to attempt to utilize as much of the physical device resources as possible. + + Each type of cluster will have its enumeration / coordinate setup as if the grid consists solely of its type of cluster. For example, if the preferred substitute cluster dimensions double the regular cluster dimensions, there might be simultaneously a regular cluster indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and (3,0,0) and groups their blocks. + + This attribute will only take effect when a regular cluster dimension has been specified. The preferred substitute cluster dimension must be an integer multiple greater than zero of the regular cluster dimension and must divide the grid. It must also be no more than `maxBlocksPerCluster`, if it is set in the kernel's `__launch_bounds__`. Otherwise it must be less than the maximum value the driver can support. Otherwise, setting this attribute to a value physically unable to fit on any particular device is permitted. + + .. autoattribute:: cuda.bindings.driver.CUlaunchAttributeID.CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT @@ -3411,6 +3532,12 @@ Data types used by CUDA driver This indicates that the code to be compiled by the PTX JIT contains unsupported call to cudaDeviceSynchronize. + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_CONTAINED + + + This indicates that an exception occurred on the device that is now contained by the GPU's error containment capability. Common causes are - a. Certain types of invalid accesses of peer GPU memory over nvlink b. Certain classes of hardware errors This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_INVALID_SOURCE @@ -3585,6 +3712,12 @@ Data types used by CUDA driver This error indicates that the number of blocks launched per grid for a kernel that was launched via either :py:obj:`~.cuLaunchCooperativeKernel` or :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` exceeds the maximum number of blocks as allowed by :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessor` or :py:obj:`~.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` times the number of multiprocessors as specified by the device attribute :py:obj:`~.CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT`. + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_TENSOR_MEMORY_LEAK + + + An exception occurred on the device while exiting a kernel using tensor memory: the tensor memory was not completely deallocated. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_NOT_PERMITTED @@ -3759,6 +3892,12 @@ Data types used by CUDA driver This error indicates one or more resources are insufficient or non-applicable for the operation. + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_KEY_ROTATION + + + This error indicates that an error happened during the key rotation sequence. + + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_UNKNOWN @@ -4046,6 +4185,15 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUtensorMapDataType.CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ + + .. autoattribute:: cuda.bindings.driver.CUtensorMapDataType.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN8B + + + .. autoattribute:: cuda.bindings.driver.CUtensorMapDataType.CU_TENSOR_MAP_DATA_TYPE_16U4_ALIGN16B + + + .. autoattribute:: cuda.bindings.driver.CUtensorMapDataType.CU_TENSOR_MAP_DATA_TYPE_16U6_ALIGN16B + .. autoclass:: cuda.bindings.driver.CUtensorMapInterleave .. autoattribute:: cuda.bindings.driver.CUtensorMapInterleave.CU_TENSOR_MAP_INTERLEAVE_NONE @@ -4069,6 +4217,15 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUtensorMapSwizzle.CU_TENSOR_MAP_SWIZZLE_128B + + .. autoattribute:: cuda.bindings.driver.CUtensorMapSwizzle.CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B + + + .. autoattribute:: cuda.bindings.driver.CUtensorMapSwizzle.CU_TENSOR_MAP_SWIZZLE_128B_ATOM_32B_FLIP_8B + + + .. autoattribute:: cuda.bindings.driver.CUtensorMapSwizzle.CU_TENSOR_MAP_SWIZZLE_128B_ATOM_64B + .. autoclass:: cuda.bindings.driver.CUtensorMapL2promotion .. autoattribute:: cuda.bindings.driver.CUtensorMapL2promotion.CU_TENSOR_MAP_L2_PROMOTION_NONE @@ -4089,6 +4246,13 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUtensorMapFloatOOBfill.CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA +.. autoclass:: cuda.bindings.driver.CUtensorMapIm2ColWideMode + + .. autoattribute:: cuda.bindings.driver.CUtensorMapIm2ColWideMode.CU_TENSOR_MAP_IM2COL_WIDE_MODE_W + + + .. autoattribute:: cuda.bindings.driver.CUtensorMapIm2ColWideMode.CU_TENSOR_MAP_IM2COL_WIDE_MODE_W128 + .. autoclass:: cuda.bindings.driver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS .. autoattribute:: cuda.bindings.driver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS.CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE @@ -4338,6 +4502,13 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUmemRangeHandleType.CU_MEM_RANGE_HANDLE_TYPE_MAX +.. autoclass:: cuda.bindings.driver.CUmemRangeFlags + + .. autoattribute:: cuda.bindings.driver.CUmemRangeFlags.CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE + + + Indicates that DMA_BUF handle should be mapped via PCIe BAR1 + .. autoclass:: cuda.bindings.driver.CUarraySparseSubresourceType .. autoattribute:: cuda.bindings.driver.CUarraySparseSubresourceType.CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL @@ -4712,6 +4883,85 @@ Data types used by CUDA driver The GPU is a NUMA node, CU_DEVICE_ATTRIBUTE_NUMA_ID contains its NUMA ID +.. autoclass:: cuda.bindings.driver.CUprocessState + + .. autoattribute:: cuda.bindings.driver.CUprocessState.CU_PROCESS_STATE_RUNNING + + + Default process state + + + .. autoattribute:: cuda.bindings.driver.CUprocessState.CU_PROCESS_STATE_LOCKED + + + CUDA API locks are taken so further CUDA API calls will block + + + .. autoattribute:: cuda.bindings.driver.CUprocessState.CU_PROCESS_STATE_CHECKPOINTED + + + Application memory contents have been checkpointed and underlying allocations and device handles have been released + + + .. autoattribute:: cuda.bindings.driver.CUprocessState.CU_PROCESS_STATE_FAILED + + + Application entered an uncorrectable error during the checkpoint/restore process + +.. autoclass:: cuda.bindings.driver.CUmemcpyFlags + + .. autoattribute:: cuda.bindings.driver.CUmemcpyFlags.CU_MEMCPY_FLAG_DEFAULT + + + .. autoattribute:: cuda.bindings.driver.CUmemcpyFlags.CU_MEMCPY_FLAG_PREFER_OVERLAP_WITH_COMPUTE + + + Hint to the driver to try and overlap the copy with compute work on the SMs. + +.. autoclass:: cuda.bindings.driver.CUmemcpySrcAccessOrder + + .. autoattribute:: cuda.bindings.driver.CUmemcpySrcAccessOrder.CU_MEMCPY_SRC_ACCESS_ORDER_INVALID + + + Default invalid. + + + .. autoattribute:: cuda.bindings.driver.CUmemcpySrcAccessOrder.CU_MEMCPY_SRC_ACCESS_ORDER_STREAM + + + Indicates that access to the source pointer must be in stream order. + + + .. autoattribute:: cuda.bindings.driver.CUmemcpySrcAccessOrder.CU_MEMCPY_SRC_ACCESS_ORDER_DURING_API_CALL + + + Indicates that access to the source pointer can be out of stream order and all accesses must be complete before the API call returns. This flag is suited for ephemeral sources (ex., stack variables) when it's known that no prior operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the need for the user to synchronize the stream after the API call. + + + .. autoattribute:: cuda.bindings.driver.CUmemcpySrcAccessOrder.CU_MEMCPY_SRC_ACCESS_ORDER_ANY + + + Indicates that access to the source pointer can be out of stream order and the accesses can happen even after the API call returns. This flag is suited for host pointers allocated outside CUDA (ex., via malloc) when it's known that no prior operations in the stream can be accessing the memory. Specifying this flag allows the driver to optimize the copy on certain platforms. + + + .. autoattribute:: cuda.bindings.driver.CUmemcpySrcAccessOrder.CU_MEMCPY_SRC_ACCESS_ORDER_MAX + +.. autoclass:: cuda.bindings.driver.CUmemcpy3DOperandType + + .. autoattribute:: cuda.bindings.driver.CUmemcpy3DOperandType.CU_MEMCPY_OPERAND_TYPE_POINTER + + + Memcpy operand is a valid pointer. + + + .. autoattribute:: cuda.bindings.driver.CUmemcpy3DOperandType.CU_MEMCPY_OPERAND_TYPE_ARRAY + + + Memcpy operand is a CUarray. + + + .. autoattribute:: cuda.bindings.driver.CUmemcpy3DOperandType.CU_MEMCPY_OPERAND_TYPE_MAX + .. autoclass:: cuda.bindings.driver.CUeglFrameType .. autoattribute:: cuda.bindings.driver.CUeglFrameType.CU_EGL_FRAME_TYPE_ARRAY @@ -5424,6 +5674,24 @@ Data types used by CUDA driver Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. + .. autoattribute:: cuda.bindings.driver.CUeglColorFormat.CU_EGL_COLOR_FORMAT_UYVY_709 + + + Y, U, V in one surface, interleaved as UYVY in one channel. + + + .. autoattribute:: cuda.bindings.driver.CUeglColorFormat.CU_EGL_COLOR_FORMAT_UYVY_709_ER + + + Extended Range Y, U, V in one surface, interleaved as UYVY in one channel. + + + .. autoattribute:: cuda.bindings.driver.CUeglColorFormat.CU_EGL_COLOR_FORMAT_UYVY_2020 + + + Y, U, V in one surface, interleaved as UYVY in one channel. + + .. autoattribute:: cuda.bindings.driver.CUeglColorFormat.CU_EGL_COLOR_FORMAT_MAX .. autoclass:: cuda.bindings.driver.CUdeviceptr_v2 @@ -5487,6 +5755,7 @@ Data types used by CUDA driver .. autoclass:: cuda.bindings.driver.CUDA_HOST_NODE_PARAMS_v1 .. autoclass:: cuda.bindings.driver.CUDA_HOST_NODE_PARAMS .. autoclass:: cuda.bindings.driver.CUDA_HOST_NODE_PARAMS_v2 +.. autoclass:: cuda.bindings.driver.CUDA_CONDITIONAL_NODE_PARAMS .. autoclass:: cuda.bindings.driver.CUgraphEdgeData .. autoclass:: cuda.bindings.driver.CUDA_GRAPH_INSTANTIATE_PARAMS .. autoclass:: cuda.bindings.driver.CUlaunchMemSyncDomainMap @@ -5578,6 +5847,20 @@ Data types used by CUDA driver .. autoclass:: cuda.bindings.driver.CUDA_EVENT_RECORD_NODE_PARAMS .. autoclass:: cuda.bindings.driver.CUDA_EVENT_WAIT_NODE_PARAMS .. autoclass:: cuda.bindings.driver.CUgraphNodeParams +.. autoclass:: cuda.bindings.driver.CUcheckpointLockArgs +.. autoclass:: cuda.bindings.driver.CUcheckpointCheckpointArgs +.. autoclass:: cuda.bindings.driver.CUcheckpointRestoreArgs +.. autoclass:: cuda.bindings.driver.CUcheckpointUnlockArgs +.. autoclass:: cuda.bindings.driver.CUmemcpyAttributes_v1 +.. autoclass:: cuda.bindings.driver.CUmemcpyAttributes +.. autoclass:: cuda.bindings.driver.CUoffset3D_v1 +.. autoclass:: cuda.bindings.driver.CUoffset3D +.. autoclass:: cuda.bindings.driver.CUextent3D_v1 +.. autoclass:: cuda.bindings.driver.CUextent3D +.. autoclass:: cuda.bindings.driver.CUmemcpy3DOperand_v1 +.. autoclass:: cuda.bindings.driver.CUmemcpy3DOperand +.. autoclass:: cuda.bindings.driver.CUDA_MEMCPY3D_BATCH_OP_v1 +.. autoclass:: cuda.bindings.driver.CUDA_MEMCPY3D_BATCH_OP .. autoclass:: cuda.bindings.driver.CUeglFrame_v1 .. autoclass:: cuda.bindings.driver.CUeglFrame .. autoclass:: cuda.bindings.driver.CUeglStreamConnection @@ -5585,6 +5868,10 @@ Data types used by CUDA driver CUDA API version number +.. autoattribute:: cuda.bindings.driver.CU_UUID_HAS_BEEN_DEFINED + + CUDA UUID types + .. autoattribute:: cuda.bindings.driver.CU_IPC_HANDLE_SIZE CUDA IPC handle size @@ -5614,6 +5901,7 @@ Data types used by CUDA driver See details of the \link_sync_behavior .. autoattribute:: cuda.bindings.driver.CU_COMPUTE_ACCELERATED_TARGET_BASE +.. autoattribute:: cuda.bindings.driver.CUDA_CB .. autoattribute:: cuda.bindings.driver.CU_GRAPH_COND_ASSIGN_DEFAULT Conditional node handle flags Default value is applied when graph is launched. @@ -5637,6 +5925,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CU_KERNEL_NODE_ATTRIBUTE_PRIORITY .. autoattribute:: cuda.bindings.driver.CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP .. autoattribute:: cuda.bindings.driver.CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN +.. autoattribute:: cuda.bindings.driver.CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_CLUSTER_DIMENSION .. autoattribute:: cuda.bindings.driver.CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE .. autoattribute:: cuda.bindings.driver.CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT .. autoattribute:: cuda.bindings.driver.CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW @@ -5704,6 +5993,14 @@ Data types used by CUDA driver This flag if set indicates that the memory will be used as a tile pool. +.. autoattribute:: cuda.bindings.driver.CU_MEM_CREATE_USAGE_HW_DECOMPRESS + + This flag, if set, indicates that the memory will be used as a buffer for hardware accelerated decompression. + +.. autoattribute:: cuda.bindings.driver.CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS + + This flag, if set, indicates that the memory will be used as a buffer for hardware accelerated decompression. + .. autoattribute:: cuda.bindings.driver.CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC If set, each kernel launched as part of :py:obj:`~.cuLaunchCooperativeKernelMultiDevice` only waits for prior work in the stream corresponding to that GPU to complete before the kernel begins execution. @@ -5974,6 +6271,27 @@ Memory Management This section describes the memory management functions of the low-level CUDA driver application programming interface. +.. autoclass:: cuda.bindings.driver.CUmemDecompressParams_st +.. autoclass:: cuda.bindings.driver.CUmemDecompressAlgorithm + + .. autoattribute:: cuda.bindings.driver.CUmemDecompressAlgorithm.CU_MEM_DECOMPRESS_UNSUPPORTED + + + Decompression is unsupported. + + + .. autoattribute:: cuda.bindings.driver.CUmemDecompressAlgorithm.CU_MEM_DECOMPRESS_ALGORITHM_DEFLATE + + + Deflate is supported. + + + .. autoattribute:: cuda.bindings.driver.CUmemDecompressAlgorithm.CU_MEM_DECOMPRESS_ALGORITHM_SNAPPY + + + Snappy is supported. + +.. autoclass:: cuda.bindings.driver.CUmemDecompressParams .. autofunction:: cuda.bindings.driver.cuMemGetInfo .. autofunction:: cuda.bindings.driver.cuMemAlloc .. autofunction:: cuda.bindings.driver.cuMemAllocPitch @@ -6020,6 +6338,8 @@ This section describes the memory management functions of the low-level CUDA dri .. autofunction:: cuda.bindings.driver.cuMemcpy2DAsync .. autofunction:: cuda.bindings.driver.cuMemcpy3DAsync .. autofunction:: cuda.bindings.driver.cuMemcpy3DPeerAsync +.. autofunction:: cuda.bindings.driver.cuMemcpyBatchAsync +.. autofunction:: cuda.bindings.driver.cuMemcpy3DBatchAsync .. autofunction:: cuda.bindings.driver.cuMemsetD8 .. autofunction:: cuda.bindings.driver.cuMemsetD16 .. autofunction:: cuda.bindings.driver.cuMemsetD32 @@ -6046,6 +6366,7 @@ This section describes the memory management functions of the low-level CUDA dri .. autofunction:: cuda.bindings.driver.cuMipmappedArrayGetLevel .. autofunction:: cuda.bindings.driver.cuMipmappedArrayDestroy .. autofunction:: cuda.bindings.driver.cuMemGetHandleForAddressRange +.. autofunction:: cuda.bindings.driver.cuMemBatchDecompressAsync Virtual Memory Management ------------------------- @@ -6234,6 +6555,7 @@ This section describes the stream management functions of the low-level CUDA dri .. autofunction:: cuda.bindings.driver.cuStreamCreate .. autofunction:: cuda.bindings.driver.cuStreamCreateWithPriority .. autofunction:: cuda.bindings.driver.cuStreamGetPriority +.. autofunction:: cuda.bindings.driver.cuStreamGetDevice .. autofunction:: cuda.bindings.driver.cuStreamGetFlags .. autofunction:: cuda.bindings.driver.cuStreamGetId .. autofunction:: cuda.bindings.driver.cuStreamGetCtx @@ -6269,6 +6591,7 @@ This section describes the event management functions of the low-level CUDA driv .. autofunction:: cuda.bindings.driver.cuEventSynchronize .. autofunction:: cuda.bindings.driver.cuEventDestroy .. autofunction:: cuda.bindings.driver.cuEventElapsedTime +.. autofunction:: cuda.bindings.driver.cuEventElapsedTime_v2 External Resource Interoperability ---------------------------------- @@ -6482,6 +6805,7 @@ This section describes the tensor map object management functions of the low-lev .. autofunction:: cuda.bindings.driver.cuTensorMapEncodeTiled .. autofunction:: cuda.bindings.driver.cuTensorMapEncodeIm2col +.. autofunction:: cuda.bindings.driver.cuTensorMapEncodeIm2colWide .. autofunction:: cuda.bindings.driver.cuTensorMapReplaceAddress Peer Context Memory Access @@ -6702,6 +7026,8 @@ Even if the green contexts have disjoint SM partitions, it is not guaranteed tha Streaming multiprocessors related information .. autoclass:: cuda.bindings.driver.CUdevResourceDesc +.. autoclass:: cuda.bindings.driver.CUdevSmResource +.. autofunction:: cuda.bindings.driver._CONCAT_OUTER .. autofunction:: cuda.bindings.driver.cuGreenCtxCreate .. autofunction:: cuda.bindings.driver.cuGreenCtxDestroy .. autofunction:: cuda.bindings.driver.cuCtxFromGreenCtx @@ -6716,6 +7042,36 @@ Even if the green contexts have disjoint SM partitions, it is not guaranteed tha .. autofunction:: cuda.bindings.driver.cuGreenCtxStreamCreate .. autoattribute:: cuda.bindings.driver.RESOURCE_ABI_VERSION .. autoattribute:: cuda.bindings.driver.RESOURCE_ABI_EXTERNAL_BYTES +.. autoattribute:: cuda.bindings.driver._CONCAT_INNER +.. autoattribute:: cuda.bindings.driver._CONCAT_OUTER + +CUDA Checkpointing +------------------ + +CUDA API versioning support + + + + + + + +This sections describes the checkpoint and restore functions of the low-level CUDA driver application programming interface. + + + +The CUDA checkpoint and restore API's provide a way to save and restore GPU state for full process checkpoints when used with CPU side process checkpointing solutions. They can also be used to pause GPU work and suspend a CUDA process to allow other applications to make use of GPU resources. + + + +Checkpoint and restore capabilities are currently restricted to Linux. + +.. autofunction:: cuda.bindings.driver.cuCheckpointProcessGetRestoreThreadId +.. autofunction:: cuda.bindings.driver.cuCheckpointProcessGetState +.. autofunction:: cuda.bindings.driver.cuCheckpointProcessLock +.. autofunction:: cuda.bindings.driver.cuCheckpointProcessCheckpoint +.. autofunction:: cuda.bindings.driver.cuCheckpointProcessRestore +.. autofunction:: cuda.bindings.driver.cuCheckpointProcessUnlock EGL Interoperability -------------------- diff --git a/cuda_bindings/docs/source/module/nvrtc.rst b/cuda_bindings/docs/source/module/nvrtc.rst index 2a1297c15..297cc125b 100644 --- a/cuda_bindings/docs/source/module/nvrtc.rst +++ b/cuda_bindings/docs/source/module/nvrtc.rst @@ -47,6 +47,18 @@ NVRTC defines the following enumeration type and function for API call error han .. autoattribute:: cuda.bindings.nvrtc.nvrtcResult.NVRTC_ERROR_TIME_FILE_WRITE_FAILED + + .. autoattribute:: cuda.bindings.nvrtc.nvrtcResult.NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED + + + .. autoattribute:: cuda.bindings.nvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED + + + .. autoattribute:: cuda.bindings.nvrtc.nvrtcResult.NVRTC_ERROR_PCH_CREATE + + + .. autoattribute:: cuda.bindings.nvrtc.nvrtcResult.NVRTC_ERROR_CANCELLED + .. autofunction:: cuda.bindings.nvrtc.nvrtcGetErrorString General Information Query @@ -81,6 +93,17 @@ NVRTC defines the following type and functions for actual compilation. .. autofunction:: cuda.bindings.nvrtc.nvrtcGetProgramLog .. autofunction:: cuda.bindings.nvrtc.nvrtcAddNameExpression .. autofunction:: cuda.bindings.nvrtc.nvrtcGetLoweredName +.. autofunction:: cuda.bindings.nvrtc.nvrtcSetFlowCallback + +Precompiled header (PCH) (CUDA 12.8+) +------------------------------------- + +NVRTC defines the following function related to PCH. Also see PCH related flags passed to nvrtcCompileProgram. + +.. autofunction:: cuda.bindings.nvrtc.nvrtcGetPCHHeapSize +.. autofunction:: cuda.bindings.nvrtc.nvrtcSetPCHHeapSize +.. autofunction:: cuda.bindings.nvrtc.nvrtcGetPCHCreateStatus +.. autofunction:: cuda.bindings.nvrtc.nvrtcGetPCHHeapSizeRequired Supported Compile Options ------------------------- @@ -103,249 +126,7 @@ The valid compiler options are: - ``--gpu-architecture=``\ (``-arch``\ ) - - - Specify the name of the class of GPU architectures for which the input must be compiled. - - - - - - - - - Valid ````\ s: - - - - - - - ``compute_50``\ - - - - - - - - - ``compute_52``\ - - - - - - - - - ``compute_53``\ - - - - - - - - - ``compute_60``\ - - - - - - - - - ``compute_61``\ - - - - - - - - - ``compute_62``\ - - - - - - - - - ``compute_70``\ - - - - - - - - - ``compute_72``\ - - - - - - - - - ``compute_75``\ - - - - - - - - - ``compute_80``\ - - - - - - - - - ``compute_87``\ - - - - - - - - - ``compute_89``\ - - - - - - - - - ``compute_90``\ - - - - - - - - - ``compute_90a``\ - - - - - - - - - ``sm_50``\ - - - - - - - - - ``sm_52``\ - - - - - - - - - ``sm_53``\ - - - - - - - - - ``sm_60``\ - - - - - - - - - ``sm_61``\ - - - - - - - - - ``sm_62``\ - - - - - - - - - ``sm_70``\ - - - - - - - - - ``sm_72``\ - - - - - - - - - ``sm_75``\ - - - - - - - - - ``sm_80``\ - - - - - - - - - ``sm_87``\ - - - - - - - - - ``sm_89``\ - - - - - - - - - ``sm_90``\ - - - - - - - - - ``sm_90a``\ - - - - - - - - - - - Default: ``compute_52``\ +Specify the name of the class of GPU architectures for which the input must be compiled. @@ -365,9 +146,7 @@ The valid compiler options are: - ``--device-c``\ (``-dc``\ ) - - - Generate relocatable code that can be linked with other relocatable device code. It is equivalent to --relocatable-device-code=true. +Generate relocatable code that can be linked with other relocatable device code. It is equivalent to ``--relocatable-device-code=true``\ . @@ -377,9 +156,7 @@ The valid compiler options are: - ``--device-w``\ (``-dw``\ ) - - - Generate non-relocatable code. It is equivalent to ``--relocatable-device-code=false``\ . +Generate non-relocatable code. It is equivalent to ``--relocatable-device-code=false``\ . @@ -389,17 +166,7 @@ The valid compiler options are: - ``--relocatable-device-code={true|false}``\ (``-rdc``\ ) - - - Enable (disable) the generation of relocatable device code. - - - - - - - Default: ``false``\ - - +Enable (disable) the generation of relocatable device code. @@ -409,17 +176,7 @@ The valid compiler options are: - ``--extensible-whole-program``\ (``-ewp``\ ) - - - Do extensible whole program compilation of device code. - - - - - - - Default: ``false``\ - - +Do extensible whole program compilation of device code. @@ -437,9 +194,7 @@ The valid compiler options are: - ``--device-debug``\ (``-G``\ ) - - - Generate debug information. If --dopt is not specified, then turns off all optimizations. +Generate debug information. If ``--dopt``\ is not specified, then turns off all optimizations. @@ -449,9 +204,7 @@ The valid compiler options are: - ``--generate-line-info``\ (``-lineinfo``\ ) - - - Generate line-number information. +Generate line-number information. @@ -467,9 +220,7 @@ The valid compiler options are: - - ``--dopt``\ on (``-dopt``\ ) - - + - ``--dopt``\ ``on``\ (``-dopt``\ ) @@ -479,9 +230,7 @@ The valid compiler options are: - ``--dopt=on``\ - - - Enable device code optimization. When specified along with '-G', enables limited debug information generation for optimized device code (currently, only line number information). When '-G' is not specified, '-dopt=on' is implicit. +Enable device code optimization. When specified along with ``-G``\ , enables limited debug information generation for optimized device code (currently, only line number information). When ``-G``\ is not specified, ``-dopt=on``\ is implicit. @@ -497,13 +246,9 @@ The valid compiler options are: - - - ``--ptxas-options=``\ - - - Specify options directly to ptxas, the PTX optimizing assembler. +Specify options directly to ptxas, the PTX optimizing assembler. @@ -513,9 +258,7 @@ The valid compiler options are: - ``--maxrregcount=``\ (``-maxrregcount``\ ) - - - Specify the maximum amount of registers that GPU functions can use. Until a function-specific limit, a higher value will generally increase the performance of individual GPU threads that execute this function. However, because thread registers are allocated from a global register pool on each GPU, a higher value of this option will also reduce the maximum thread block size, thereby reducing the amount of thread parallelism. Hence, a good maxrregcount value is the result of a trade-off. If this option is not specified, then no maximum is assumed. Value less than the minimum registers required by ABI will be bumped up by the compiler to ABI minimum limit. +Specify the maximum amount of registers that GPU functions can use. Until a function-specific limit, a higher value will generally increase the performance of individual GPU threads that execute this function. However, because thread registers are allocated from a global register pool on each GPU, a higher value of this option will also reduce the maximum thread block size, thereby reducing the amount of thread parallelism. Hence, a good maxrregcount value is the result of a trade-off. If this option is not specified, then no maximum is assumed. Value less than the minimum registers required by ABI will be bumped up by the compiler to ABI minimum limit. @@ -525,17 +268,9 @@ The valid compiler options are: - ``--ftz={true|false}``\ (``-ftz``\ ) +When performing single-precision floating-point operations, flush denormal values to zero or preserve denormal values. - - When performing single-precision floating-point operations, flush denormal values to zero or preserve denormal values. ``--use_fast_math``\ implies ``--ftz=true``\ . - - - - - - - Default: ``false``\ - - +``--use_fast_math``\ implies ``--ftz=true``\ . @@ -545,29 +280,15 @@ The valid compiler options are: - ``--prec-sqrt={true|false}``\ (``-prec-sqrt``\ ) +For single-precision floating-point square root, use IEEE round-to-nearest mode or use a faster approximation. ``--use_fast_math``\ implies ``--prec-sqrt=false``\ . - For single-precision floating-point square root, use IEEE round-to-nearest mode or use a faster approximation. ``--use_fast_math``\ implies ``--prec-sqrt=false``\ . - - - - - - - Default: ``true``\ - - - - - - ``--prec-div={true|false}``\ (``-prec-div``\ ) - - - - For single-precision floating-point division and reciprocals, use IEEE round-to-nearest mode or use a faster approximation. ``--use_fast_math``\ implies ``--prec-div=false``\ . + - ``--prec-div={true|false}``\ (``-prec-div``\ ) For single-precision floating-point division and reciprocals, use IEEE round-to-nearest mode or use a faster approximation. ``--use_fast_math``\ implies ``--prec-div=false``\ . @@ -585,17 +306,7 @@ The valid compiler options are: - ``--fmad={true|false}``\ (``-fmad``\ ) - - - Enables (disables) the contraction of floating-point multiplies and adds/subtracts into floating-point multiply-add operations (FMAD, FFMA, or DFMA). ``--use_fast_math``\ implies ``--fmad=true``\ . - - - - - - - Default: ``true``\ - - +Enables (disables) the contraction of floating-point multiplies and adds/subtracts into floating-point multiply-add operations (FMAD, FFMA, or DFMA). ``--use_fast_math``\ implies ``--fmad=true``\ . @@ -605,9 +316,7 @@ The valid compiler options are: - ``--use_fast_math``\ (``-use_fast_math``\ ) - - - Make use of fast math operations. ``--use_fast_math``\ implies ``--ftz=true``\ ``--prec-div=false``\ ``--prec-sqrt=false``\ ``--fmad=true``\ . +Make use of fast math operations. ``--use_fast_math``\ implies ``--ftz=true``\ ``--prec-div=false``\ ``--prec-sqrt=false``\ ``--fmad=true``\ . @@ -617,9 +326,7 @@ The valid compiler options are: - ``--extra-device-vectorization``\ (``-extra-device-vectorization``\ ) - - - Enables more aggressive device code vectorization in the NVVM optimizer. +Enables more aggressive device code vectorization in the NVVM optimizer. @@ -629,17 +336,7 @@ The valid compiler options are: - ``--modify-stack-limit={true|false}``\ (``-modify-stack-limit``\ ) - - - On Linux, during compilation, use ``setrlimit()``\ to increase stack size to maximum allowed. The limit is reset to the previous value at the end of compilation. Note: ``setrlimit()``\ changes the value for the entire process. - - - - - - - Default: ``true``\ - - +On Linux, during compilation, use ``setrlimit()``\ to increase stack size to maximum allowed. The limit is reset to the previous value at the end of compilation. Note: ``setrlimit()``\ changes the value for the entire process. @@ -649,9 +346,7 @@ The valid compiler options are: - ``--dlink-time-opt``\ (``-dlto``\ ) - - - Generate intermediate code for later link-time optimization. It implies ``-rdc=true``\ . Note: when this option is used the nvrtcGetLTOIR API should be used, as PTX or Cubin will not be generated. +Generate intermediate code for later link-time optimization. It implies ``-rdc=true``\ . Note: when this option is used the ``nvrtcGetLTOIR``\ API should be used, as PTX or Cubin will not be generated. @@ -661,9 +356,7 @@ The valid compiler options are: - ``--gen-opt-lto``\ (``-gen-opt-lto``\ ) - - - Run the optimizer passes before generating the LTO IR. +Run the optimizer passes before generating the LTO IR. @@ -673,11 +366,9 @@ The valid compiler options are: - ``--optix-ir``\ (``-optix-ir``\ ) +Generate OptiX IR. The Optix IR is only intended for consumption by OptiX through appropriate APIs. This feature is not supported with link-time-optimization (``-dlto``\ ). - - Generate OptiX IR. The Optix IR is only intended for consumption by OptiX through appropriate APIs. This feature is not supported with link-time-optimization (``-dlto``\ ) - -. Note: when this option is used the nvrtcGetOptiX API should be used, as PTX or Cubin will not be generated. +Note: when this option is used the nvrtcGetOptiX API should be used, as PTX or Cubin will not be generated. @@ -687,9 +378,7 @@ The valid compiler options are: - ``--jump-table-density=``\ [0-101] (``-jtd``\ ) - - - Specify the case density percentage in switch statements, and use it as a minimal threshold to determine whether jump table(brx.idx instruction) will be used to implement a switch statement. Default value is 101. The percentage ranges from 0 to 101 inclusively. +Specify the case density percentage in switch statements, and use it as a minimal threshold to determine whether jump table(brx.idx instruction) will be used to implement a switch statement. Default value is 101. The percentage ranges from 0 to 101 inclusively. @@ -699,175 +388,181 @@ The valid compiler options are: - ``--device-stack-protector={true|false}``\ (``-device-stack-protector``\ ) +Enable (disable) the generation of stack canaries in device code. - Enable (disable) the generation of stack canaries in device code. - - - Default: ``false``\ - +- Preprocessing + - ``--define-macro=``\ (``-D``\ ) +````\ can be either ````\ or ````\ . -- Preprocessing + - ``--undefine-macro=``\ (``-U``\ ) - - ``--define-macro=``\ (``-D``\ ) +Cancel any previous definition of ````\ . - ````\ can be either ````\ or ````\ . + - ``--include-path=``\ (``-I``\ ) - - ````\ +Add the directory ````\ to the list of directories to be searched for headers. These paths are searched after the list of headers given to nvrtcCreateProgram. - Predefine ````\ as a macro with definition ``1``\ . + - ``--pre-include=
``\ (``-include``\ ) +Preinclude ``
``\ during preprocessing. - - ``=``\ - The contents of ````\ are tokenized and preprocessed as if they appeared during translation phase three in a ``#define``\ directive. In particular, the definition will be truncated by embedded new line characters. + - ``--no-source-include``\ (``-no-source-include``\ ) +The preprocessor by default adds the directory of each input sources to the include path. This option disables this feature and only considers the path specified explicitly. - - ``--undefine-macro=``\ (``-U``\ ) - Cancel any previous definition of ````\ . +- Language Dialect + - ``--std={c++03|c++11|c++14|c++17|c++20}``\ (``-std``\ ) +Set language dialect to C++03, C++11, C++14, C++17 or C++20 - - ``--include-path=``\ (``-I``\ ) - Add the directory ````\ to the list of directories to be searched for headers. These paths are searched after the list of headers given to nvrtcCreateProgram. + - ``--builtin-move-forward={true|false}``\ (``-builtin-move-forward``\ ) +Provide builtin definitions of ``std::move``\ and ``std::forward``\ , when C++11 or later language dialect is selected. - - ``--pre-include=
``\ (``-include``\ ) - Preinclude ``
``\ during preprocessing. + - ``--builtin-initializer-list={true|false}``\ (``-builtin-initializer-list``\ ) +Provide builtin definitions of ``std::initializer_list``\ class and member functions when C++11 or later language dialect is selected. - - ``--no-source-include``\ (``-no-source-include``\ ) The preprocessor by default adds the directory of each input sources to the include path. This option disables this feature and only considers the path specified explicitly. +- Precompiled header support (CUDA 12.8+) -- Language Dialect + - ``--pch``\ (``-pch``\ ) +Enable automatic PCH processing. - - ``--std={c++03|c++11|c++14|c++17|c++20}``\ (``-std={c++11|c++14|c++17|c++20}``\ ) - Set language dialect to C++03, C++11, C++14, C++17 or C++20 + - ``--create-pch=``\ (``-create-pch``\ ) +Create a PCH file. - - Default: ``c++17``\ + - ``--use-pch=``\ (``-use-pch``\ ) +Use the specified PCH file. - - ``--builtin-move-forward={true|false}``\ (``-builtin-move-forward``\ ) + - ``--pch-dir=``\ (``-pch-dir``\ ) - Provide builtin definitions of ``std::move``\ and ``std::forward``\ , when C++11 or later language dialect is selected. +When using automatic PCH (``-pch``\ ), look for and create PCH files in the specified directory. When using explicit PCH (``-create-pch``\ or ``-use-pch``\ ), the directory name is prefixed before the specified file name, unless the file name is an absolute path name. - - Default: ``true``\ + - ``--pch-verbose={true|false}``\ (``-pch-verbose``\ ) +In automatic PCH mode, for each PCH file that could not be used in current compilation, print the reason in the compilation log. - - ``--builtin-initializer-list={true|false}``\ (``-builtin-initializer-list``\ ) + - ``--pch-messages={true|false}``\ (``-pch-messages``\ ) +Print a message in the compilation log, if a PCH file was created or used in the current compilation. - Provide builtin definitions of ``std::initializer_list``\ class and member functions when C++11 or later language dialect is selected. - - Default: ``true``\ + - ``--instantiate-templates-in-pch={true|false}``\ (``-instantiate-templates-in-pch``\ ) +Enable or disable instantiatiation of templates before PCH creation. Instantiating templates may increase the size of the PCH file, while reducing the compilation cost when using the PCH file (since some template instantiations can be skipped). @@ -885,9 +580,7 @@ The valid compiler options are: - ``--disable-warnings``\ (``-w``\ ) - - - Inhibit all warning messages. +Inhibit all warning messages. @@ -897,9 +590,7 @@ The valid compiler options are: - ``--restrict``\ (``-restrict``\ ) - - - Programmer assertion that all kernel pointer parameters are restrict pointers. +Programmer assertion that all kernel pointer parameters are restrict pointers. @@ -909,9 +600,7 @@ The valid compiler options are: - ``--device-as-default-execution-space``\ (``-default-device``\ ) - - - Treat entities with no execution space annotation as ``device``\ entities. +Treat entities with no execution space annotation as ``device``\ entities. @@ -921,9 +610,7 @@ The valid compiler options are: - ``--device-int128``\ (``-device-int128``\ ) - - - Allow the ``__int128``\ type in device code. Also causes the macro ``CUDACC_RTC_INT128``\ to be defined. +Allow the ``__int128``\ type in device code. Also causes the macro ``CUDACC_RTC_INT128``\ to be defined. @@ -931,19 +618,19 @@ The valid compiler options are: - - ``--optimization-info=``\ (``-opt-info``\ ) - + - ``--device-float128``\ (``-device-float128``\ ) +Allow the ``__float128``\ and ``_Float128``\ types in device code. Also causes the macro ``D__CUDACC_RTC_FLOAT128__``\ to be defined. - Provide optimization reports for the specified kind of optimization. The following kind tags are supported: - - ``inline``\ : emit a remark when a function is inlined. + - ``--optimization-info=``\ (``-opt-info``\ ) +Provide optimization reports for the specified kind of optimization. The following kind tags are supported: @@ -953,9 +640,7 @@ The valid compiler options are: - ``--display-error-number``\ (``-err-no``\ ) - - - Display diagnostic number for warning messages. (Default) +Display diagnostic number for warning messages. (Default) @@ -965,9 +650,7 @@ The valid compiler options are: - ``--no-display-error-number``\ (``-no-err-no``\ ) - - - Disables the display of a diagnostic number for warning messages. +Disables the display of a diagnostic number for warning messages. @@ -977,9 +660,7 @@ The valid compiler options are: - ``--diag-error=``\ ,... (``-diag-error``\ ) - - - Emit error for specified diagnostic message number(s). Message numbers can be separated by comma. +Emit error for specified diagnostic message number(s). Message numbers can be separated by comma. @@ -989,9 +670,7 @@ The valid compiler options are: - ``--diag-suppress=``\ ,... (``-diag-suppress``\ ) - - - Suppress specified diagnostic message number(s). Message numbers can be separated by comma. +Suppress specified diagnostic message number(s). Message numbers can be separated by comma. @@ -1001,9 +680,7 @@ The valid compiler options are: - ``--diag-warn=``\ ,... (``-diag-warn``\ ) - - - Emit warning for specified diagnostic message number(s). Message numbers can be separated by comma. +Emit warning for specified diagnostic message number(s). Message numbers can be separated by comma. @@ -1013,17 +690,7 @@ The valid compiler options are: - ``--brief-diagnostics={true|false}``\ (``-brief-diag``\ ) - - - This option disables or enables showing source line and column info in a diagnostic. The --brief-diagnostics=true will not show the source line and column info. - - - - - - - Default: ``false``\ - - +This option disables or enables showing source line and column info in a diagnostic. The ``--brief-diagnostics=true``\ will not show the source line and column info. @@ -1033,21 +700,17 @@ The valid compiler options are: - ``--time=``\ (``-time``\ ) - - - Generate a comma separated value table with the time taken by each compilation phase, and append it at the end of the file given as the option argument. If the file does not exist, the column headings are generated in the first row of the table. If the file name is '-', the timing data is written to the compilation log. - +Generate a comma separated value table with the time taken by each compilation phase, and append it at the end of the file given as the option argument. If the file does not exist, the column headings are generated in the first row of the table. If the file name is '-', the timing data is written to the compilation log. - - ``--split-compile=``\ (``-split-compile=``\ ) + - ``--split-compile=``\ (``-split-compile=``\ ) - - Perform compiler optimizations in parallel. Split compilation attempts to reduce compile time by enabling the compiler to run certain optimization passes concurrently. This option accepts a numerical value that specifies the maximum number of threads the compiler can use. One can also allow the compiler to use the maximum threads available on the system by setting --split-compile=0. Setting --split-compile=1 will cause this option to be ignored. +Perform compiler optimizations in parallel. Split compilation attempts to reduce compile time by enabling the compiler to run certain optimization passes concurrently. This option accepts a numerical value that specifies the maximum number of threads the compiler can use. One can also allow the compiler to use the maximum threads available on the system by setting ``--split-compile=0``\ . Setting ``--split-compile=1``\ will cause this option to be ignored. @@ -1057,9 +720,7 @@ The valid compiler options are: - ``--fdevice-syntax-only``\ (``-fdevice-syntax-only``\ ) - - - Ends device compilation after front-end syntax checking. This option does not generate valid device code. +Ends device compilation after front-end syntax checking. This option does not generate valid device code. @@ -1069,51 +730,23 @@ The valid compiler options are: - ``--minimal``\ (``-minimal``\ ) - - - Omit certain language features to reduce compile time for small programs. In particular, the following are omitted: - +Omit certain language features to reduce compile time for small programs. In particular, the following are omitted: - - Texture and surface functions and associated types, e.g., ``cudaTextureObject_t``\ . - - - - - - - - - CUDA Runtime Functions that are provided by the cudadevrt device code library, typically named with prefix "cuda", e.g., ``cudaMalloc``\ . - - - - - - - - - Kernel launch from device code. - - - - - - - - - Types and macros associated with CUDA Runtime and Driver APIs, provided by cuda/tools/cudart/driver_types.h, typically named with prefix "cuda", e.g., ``cudaError_t``\ . - + - ``--device-stack-protector``\ (``-device-stack-protector``\ ) +Enable stack canaries in device code. Stack canaries make it more difficult to exploit certain types of memory safety bugs involving stack-local variables. The compiler uses heuristics to assess the risk of such a bug in each function. Only those functions which are deemed high-risk make use of a stack canary. - - ``--device-stack-protector``\ (``-device-stack-protector``\ ) - Enable stack canaries in device code. Stack canaries make it more difficult to exploit certain types of memory safety bugs involving stack-local variables. The compiler uses heuristics to assess the risk of such a bug in each function. Only those functions which are deemed high-risk make use of a stack canary. + - ``--fdevice-time-trace=``\ (``-fdevice-time-trace=``\ ) Enables the time profiler, outputting a JSON file based on given . Results can be analyzed on chrome://tracing for a flamegraph visualization. diff --git a/cuda_bindings/docs/source/module/runtime.rst b/cuda_bindings/docs/source/module/runtime.rst index 3eaeb695a..39b3c9b34 100644 --- a/cuda_bindings/docs/source/module/runtime.rst +++ b/cuda_bindings/docs/source/module/runtime.rst @@ -78,6 +78,7 @@ This section describes the stream management functions of the CUDA runtime appli .. autofunction:: cuda.bindings.runtime.cudaStreamGetPriority .. autofunction:: cuda.bindings.runtime.cudaStreamGetFlags .. autofunction:: cuda.bindings.runtime.cudaStreamGetId +.. autofunction:: cuda.bindings.runtime.cudaStreamGetDevice .. autofunction:: cuda.bindings.runtime.cudaCtxResetPersistingL2Cache .. autofunction:: cuda.bindings.runtime.cudaStreamCopyAttributes .. autofunction:: cuda.bindings.runtime.cudaStreamGetAttribute @@ -111,6 +112,7 @@ This section describes the event management functions of the CUDA runtime applic .. autofunction:: cuda.bindings.runtime.cudaEventSynchronize .. autofunction:: cuda.bindings.runtime.cudaEventDestroy .. autofunction:: cuda.bindings.runtime.cudaEventElapsedTime +.. autofunction:: cuda.bindings.runtime.cudaEventElapsedTime_v2 External Resource Interoperability ---------------------------------- @@ -203,6 +205,8 @@ Some functions have overloaded C++ API template versions documented separately i .. autofunction:: cuda.bindings.runtime.cudaMemcpy2DArrayToArray .. autofunction:: cuda.bindings.runtime.cudaMemcpyAsync .. autofunction:: cuda.bindings.runtime.cudaMemcpyPeerAsync +.. autofunction:: cuda.bindings.runtime.cudaMemcpyBatchAsync +.. autofunction:: cuda.bindings.runtime.cudaMemcpy3DBatchAsync .. autofunction:: cuda.bindings.runtime.cudaMemcpy2DAsync .. autofunction:: cuda.bindings.runtime.cudaMemcpy2DToArrayAsync .. autofunction:: cuda.bindings.runtime.cudaMemcpy2DFromArrayAsync @@ -576,6 +580,22 @@ This section describes the driver entry point access functions of CUDA runtime a .. autofunction:: cuda.bindings.runtime.cudaGetDriverEntryPoint .. autofunction:: cuda.bindings.runtime.cudaGetDriverEntryPointByVersion +Library Management +------------------ + +This section describes the library management functions of the CUDA runtime application programming interface. + +.. autofunction:: cuda.bindings.runtime.cudaLibraryLoadData +.. autofunction:: cuda.bindings.runtime.cudaLibraryLoadFromFile +.. autofunction:: cuda.bindings.runtime.cudaLibraryUnload +.. autofunction:: cuda.bindings.runtime.cudaLibraryGetKernel +.. autofunction:: cuda.bindings.runtime.cudaLibraryGetGlobal +.. autofunction:: cuda.bindings.runtime.cudaLibraryGetManaged +.. autofunction:: cuda.bindings.runtime.cudaLibraryGetUnifiedFunction +.. autofunction:: cuda.bindings.runtime.cudaLibraryGetKernelCount +.. autofunction:: cuda.bindings.runtime.cudaLibraryEnumerateKernels +.. autofunction:: cuda.bindings.runtime.cudaKernelSetAttributeForDevice + C++ API Routines ---------------- C++-style interface built on top of CUDA runtime API. @@ -621,7 +641,7 @@ The function cudaSetDevice() initializes the primary context for the specified d The CUDA Runtime API will automatically initialize the primary context for a device at the first CUDA Runtime API call which requires an active context. If no ::CUcontext is current to the calling thread when a CUDA Runtime API call which requires an active context is made, then the primary context for a device will be selected, made current to the calling thread, and initialized. -The context which the CUDA Runtime API initializes will be initialized using the parameters specified by the CUDA Runtime API functions cudaSetDeviceFlags(), ::cudaD3D9SetDirect3DDevice(), ::cudaD3D10SetDirect3DDevice(), ::cudaD3D11SetDirect3DDevice(), cudaGLSetGLDevice(), and cudaVDPAUSetVDPAUDevice(). Note that these functions will fail with cudaErrorSetOnActiveProcess if they are called when the primary context for the specified device has already been initialized. (or if the current device has already been initialized, in the case of cudaSetDeviceFlags()). +The context which the CUDA Runtime API initializes will be initialized using the parameters specified by the CUDA Runtime API functions cudaSetDeviceFlags(), ::cudaD3D9SetDirect3DDevice(), ::cudaD3D10SetDirect3DDevice(), ::cudaD3D11SetDirect3DDevice(), cudaGLSetGLDevice(), and cudaVDPAUSetVDPAUDevice(). Note that these functions will fail with cudaErrorSetOnActiveProcess if they are called when the primary context for the specified device has already been initialized, except for cudaSetDeviceFlags() which will simply overwrite the previous settings. Primary contexts will remain active until they are explicitly deinitialized using cudaDeviceReset(). The function cudaDeviceReset() will deinitialize the primary context for the calling thread's current device immediately. The context will remain current to all of the threads that it was current to. The next CUDA Runtime API call on any thread which requires an active context will trigger the reinitialization of that device's primary context. @@ -735,6 +755,18 @@ The types ::CUfunction and cudaFunction_t represent the same data type and may b In order to use a cudaFunction_t in a CUDA Driver API function which takes a ::CUfunction, it is necessary to explicitly cast the cudaFunction_t to a ::CUfunction. + + + + +**Interactions between CUkernel and cudaKernel_t** + + + +The types ::CUkernel and cudaKernel_t represent the same data type and may be used interchangeably by casting the two types between each other. + +In order to use a cudaKernel_t in a CUDA Driver API function which takes a ::CUkernel, it is necessary to explicitly cast the cudaKernel_t to a ::CUkernel. + .. autofunction:: cuda.bindings.runtime.cudaGetKernel Data types used by CUDA Runtime @@ -769,6 +801,10 @@ Data types used by CUDA Runtime .. autoclass:: cuda.bindings.runtime.cudaMemAllocNodeParams .. autoclass:: cuda.bindings.runtime.cudaMemAllocNodeParamsV2 .. autoclass:: cuda.bindings.runtime.cudaMemFreeNodeParams +.. autoclass:: cuda.bindings.runtime.cudaMemcpyAttributes +.. autoclass:: cuda.bindings.runtime.cudaOffset3D +.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DOperand +.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DBatchOp .. autoclass:: cuda.bindings.runtime.CUuuid_st .. autoclass:: cuda.bindings.runtime.cudaDeviceProp .. autoclass:: cuda.bindings.runtime.cudaIpcEventHandle_st @@ -780,6 +816,7 @@ Data types used by CUDA Runtime .. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreHandleDesc .. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreSignalParams .. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreWaitParams +.. autoclass:: cuda.bindings.runtime.cudalibraryHostUniversalFunctionAndDataTable .. autoclass:: cuda.bindings.runtime.cudaKernelNodeParams .. autoclass:: cuda.bindings.runtime.cudaKernelNodeParamsV2 .. autoclass:: cuda.bindings.runtime.cudaExternalSemaphoreSignalNodeParams @@ -1487,6 +1524,24 @@ Data types used by CUDA Runtime Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height. + + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY709 + + + Y, U, V in one surface, interleaved as UYVY in one channel. + + + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY709_ER + + + Extended Range Y, U, V in one surface, interleaved as UYVY in one channel. + + + .. autoattribute:: cuda.bindings.runtime.cudaEglColorFormat.cudaEglColorFormatUYVY2020 + + + Y, U, V in one surface, interleaved as UYVY in one channel. + .. autoclass:: cuda.bindings.runtime.cudaError_t .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaSuccess @@ -1630,7 +1685,7 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidNormSetting - This indicates that an attempt was made to read a non-float texture as a normalized float. This is not supported by CUDA. + This indicates that an attempt was made to read an unsupported data type as a normalized float. This is not supported by CUDA. .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorMixedDeviceExecution @@ -1921,6 +1976,12 @@ Data types used by CUDA Runtime This indicates that the code to be compiled by the PTX JIT contains unsupported call to cudaDeviceSynchronize. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorContained + + + This indicates that an exception occurred on the device that is now contained by the GPU's error containment capability. Common causes are - a. Certain types of invalid accesses of peer GPU memory over nvlink b. Certain classes of hardware errors This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidSource @@ -2095,6 +2156,12 @@ Data types used by CUDA Runtime This error indicates that the number of blocks launched per grid for a kernel that was launched via either :py:obj:`~.cudaLaunchCooperativeKernel` or :py:obj:`~.cudaLaunchCooperativeKernelMultiDevice` exceeds the maximum number of blocks as allowed by :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessor` or :py:obj:`~.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags` times the number of multiprocessors as specified by the device attribute :py:obj:`~.cudaDevAttrMultiProcessorCount`. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorTensorMemoryLeak + + + An exception occurred on the device while exiting a kernel using tensor memory: the tensor memory was not completely deallocated. This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorNotPermitted @@ -2464,6 +2531,12 @@ Data types used by CUDA Runtime 4 channel unsigned normalized block-compressed (BC7 compression) format with sRGB encoding + + .. autoattribute:: cuda.bindings.runtime.cudaChannelFormatKind.cudaChannelFormatKindUnsignedNormalized1010102 + + + 4 channel unsigned normalized (10-bit, 10-bit, 10-bit, 2-bit) format + .. autoclass:: cuda.bindings.runtime.cudaMemoryType .. autoattribute:: cuda.bindings.runtime.cudaMemoryType.cudaMemoryTypeUnregistered @@ -3999,7 +4072,7 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostNumaId - NUMA ID of the host node closest to the device. Returns -1 when system does not support NUMA. + NUMA ID of the host node closest to the device or -1 when system does not support NUMA .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrD3D12CigSupported @@ -4008,6 +4081,24 @@ Data types used by CUDA Runtime Device supports CIG with D3D12. + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGpuPciDeviceId + + + The combined 16-bit PCI device ID and 16-bit PCI vendor ID. + + + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrGpuPciSubsystemId + + + The combined 16-bit PCI subsystem ID and 16-bit PCI subsystem vendor ID. + + + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrHostNumaMultinodeIpcSupported + + + Device supports HostNuma location IPC between nodes in a multi-node system. + + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMax .. autoclass:: cuda.bindings.runtime.cudaMemPoolAttr @@ -4175,6 +4266,60 @@ Data types used by CUDA Runtime (value type = cuuint64_t) High watermark of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator. +.. autoclass:: cuda.bindings.runtime.cudaMemcpyFlags + + .. autoattribute:: cuda.bindings.runtime.cudaMemcpyFlags.cudaMemcpyFlagDefault + + + .. autoattribute:: cuda.bindings.runtime.cudaMemcpyFlags.cudaMemcpyFlagPreferOverlapWithCompute + + + Hint to the driver to try and overlap the copy with compute work on the SMs. + +.. autoclass:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder + + .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderInvalid + + + Default invalid. + + + .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderStream + + + Indicates that access to the source pointer must be in stream order. + + + .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderDuringApiCall + + + Indicates that access to the source pointer can be out of stream order and all accesses must be complete before the API call returns. This flag is suited for ephemeral sources (ex., stack variables) when it's known that no prior operations in the stream can be accessing the memory and also that the lifetime of the memory is limited to the scope that the source variable was declared in. Specifying this flag allows the driver to optimize the copy and removes the need for the user to synchronize the stream after the API call. + + + .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderAny + + + Indicates that access to the source pointer can be out of stream order and the accesses can happen even after the API call returns. This flag is suited for host pointers allocated outside CUDA (ex., via malloc) when it's known that no prior operations in the stream can be accessing the memory. Specifying this flag allows the driver to optimize the copy on certain platforms. + + + .. autoattribute:: cuda.bindings.runtime.cudaMemcpySrcAccessOrder.cudaMemcpySrcAccessOrderMax + +.. autoclass:: cuda.bindings.runtime.cudaMemcpy3DOperandType + + .. autoattribute:: cuda.bindings.runtime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypePointer + + + Memcpy operand is a valid pointer. + + + .. autoattribute:: cuda.bindings.runtime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeArray + + + Memcpy operand is a CUarray. + + + .. autoattribute:: cuda.bindings.runtime.cudaMemcpy3DOperandType.cudaMemcpyOperandTypeMax + .. autoclass:: cuda.bindings.runtime.cudaDeviceP2PAttr .. autoattribute:: cuda.bindings.runtime.cudaDeviceP2PAttr.cudaDevP2PAttrPerformanceRank @@ -4310,6 +4455,219 @@ Data types used by CUDA Runtime Handle is an opaque handle file descriptor referencing a timeline semaphore +.. autoclass:: cuda.bindings.runtime.cudaJitOption + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitMaxRegisters + + + Max number of registers that a thread may use. + + Option type: unsigned int + + Applies to: compiler only + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitThreadsPerBlock + + + IN: Specifies minimum number of threads per block to target compilation for + + OUT: Returns the number of threads the compiler actually targeted. This restricts the resource utilization of the compiler (e.g. max registers) such that a block with the given number of threads should be able to launch based on register limitations. Note, this option does not currently take into account any other resource limitations, such as shared memory utilization. + + Option type: unsigned int + + Applies to: compiler only + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitWallTime + + + Overwrites the option value with the total wall clock time, in milliseconds, spent in the compiler and linker + + Option type: float + + Applies to: compiler and linker + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitInfoLogBuffer + + + Pointer to a buffer in which to print any log messages that are informational in nature (the buffer size is specified via option :py:obj:`~.cudaJitInfoLogBufferSizeBytes`) + + Option type: char * + + Applies to: compiler and linker + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitInfoLogBufferSizeBytes + + + IN: Log buffer size in bytes. Log messages will be capped at this size (including null terminator) + + OUT: Amount of log buffer filled with messages + + Option type: unsigned int + + Applies to: compiler and linker + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitErrorLogBuffer + + + Pointer to a buffer in which to print any log messages that reflect errors (the buffer size is specified via option :py:obj:`~.cudaJitErrorLogBufferSizeBytes`) + + Option type: char * + + Applies to: compiler and linker + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitErrorLogBufferSizeBytes + + + IN: Log buffer size in bytes. Log messages will be capped at this size (including null terminator) + + OUT: Amount of log buffer filled with messages + + Option type: unsigned int + + Applies to: compiler and linker + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitOptimizationLevel + + + Level of optimizations to apply to generated code (0 - 4), with 4 being the default and highest level of optimizations. + + Option type: unsigned int + + Applies to: compiler only + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitFallbackStrategy + + + Specifies choice of fallback strategy if matching cubin is not found. Choice is based on supplied :py:obj:`~.cudaJit_Fallback`. Option type: unsigned int for enumerated type :py:obj:`~.cudaJit_Fallback` + + Applies to: compiler only + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitGenerateDebugInfo + + + Specifies whether to create debug information in output (-g) (0: false, default) + + Option type: int + + Applies to: compiler and linker + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitLogVerbose + + + Generate verbose log messages (0: false, default) + + Option type: int + + Applies to: compiler and linker + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitGenerateLineInfo + + + Generate line number information (-lineinfo) (0: false, default) + + Option type: int + + Applies to: compiler only + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitCacheMode + + + Specifies whether to enable caching explicitly (-dlcm) + + Choice is based on supplied :py:obj:`~.cudaJit_CacheMode`. + + Option type: unsigned int for enumerated type :py:obj:`~.cudaJit_CacheMode` + + Applies to: compiler only + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitPositionIndependentCode + + + Generate position independent code (0: false) + + Option type: int + + Applies to: compiler only + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitMinCtaPerSm + + + This option hints to the JIT compiler the minimum number of CTAs from the kernel’s grid to be mapped to a SM. This option is ignored when used together with :py:obj:`~.cudaJitMaxRegisters` or :py:obj:`~.cudaJitThreadsPerBlock`. Optimizations based on this option need :py:obj:`~.cudaJitMaxThreadsPerBlock` to be specified as well. For kernels already using PTX directive .minnctapersm, this option will be ignored by default. Use :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take precedence over the PTX directive. Option type: unsigned int + + Applies to: compiler only + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitMaxThreadsPerBlock + + + Maximum number threads in a thread block, computed as the product of the maximum extent specifed for each dimension of the block. This limit is guaranteed not to be exeeded in any invocation of the kernel. Exceeding the the maximum number of threads results in runtime error or kernel launch failure. For kernels already using PTX directive .maxntid, this option will be ignored by default. Use :py:obj:`~.cudaJitOverrideDirectiveValues` to let this option take precedence over the PTX directive. Option type: int + + Applies to: compiler only + + + .. autoattribute:: cuda.bindings.runtime.cudaJitOption.cudaJitOverrideDirectiveValues + + + This option lets the values specified using :py:obj:`~.cudaJitMaxRegisters`, :py:obj:`~.cudaJitThreadsPerBlock`, :py:obj:`~.cudaJitMaxThreadsPerBlock` and :py:obj:`~.cudaJitMinCtaPerSm` take precedence over any PTX directives. (0: Disable, default; 1: Enable) Option type: int + + Applies to: compiler only + +.. autoclass:: cuda.bindings.runtime.cudaLibraryOption + + .. autoattribute:: cuda.bindings.runtime.cudaLibraryOption.cudaLibraryHostUniversalFunctionAndDataTable + + + .. autoattribute:: cuda.bindings.runtime.cudaLibraryOption.cudaLibraryBinaryIsPreserved + + + Specifes that the argument `code` passed to :py:obj:`~.cudaLibraryLoadData()` will be preserved. Specifying this option will let the driver know that `code` can be accessed at any point until :py:obj:`~.cudaLibraryUnload()`. The default behavior is for the driver to allocate and maintain its own copy of `code`. Note that this is only a memory usage optimization hint and the driver can choose to ignore it if required. Specifying this option with :py:obj:`~.cudaLibraryLoadFromFile()` is invalid and will return :py:obj:`~.cudaErrorInvalidValue`. + +.. autoclass:: cuda.bindings.runtime.cudaJit_CacheMode + + .. autoattribute:: cuda.bindings.runtime.cudaJit_CacheMode.cudaJitCacheOptionNone + + + Compile with no -dlcm flag specified + + + .. autoattribute:: cuda.bindings.runtime.cudaJit_CacheMode.cudaJitCacheOptionCG + + + Compile with L1 cache disabled + + + .. autoattribute:: cuda.bindings.runtime.cudaJit_CacheMode.cudaJitCacheOptionCA + + + Compile with L1 cache enabled + +.. autoclass:: cuda.bindings.runtime.cudaJit_Fallback + + .. autoattribute:: cuda.bindings.runtime.cudaJit_Fallback.cudaPreferPtx + + + Prefer to compile ptx if exact binary match not found + + + .. autoattribute:: cuda.bindings.runtime.cudaJit_Fallback.cudaPreferBinary + + + Prefer to fall back to compatible binary code if exact match not found + .. autoclass:: cuda.bindings.runtime.cudaCGScope .. autoattribute:: cuda.bindings.runtime.cudaCGScope.cudaCGScopeInvalid @@ -4341,7 +4699,7 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalNodeType.cudaGraphCondTypeIf - Conditional 'if' Node. Body executed once if condition value is non-zero. + Conditional 'if/else' Node. Body[0] executed if condition is non-zero. If `size` == 2, an optional ELSE graph is created and this is executed if the condition is zero. .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalNodeType.cudaGraphCondTypeWhile @@ -4349,6 +4707,12 @@ Data types used by CUDA Runtime Conditional 'while' Node. Body executed repeatedly while condition value is non-zero. + + .. autoattribute:: cuda.bindings.runtime.cudaGraphConditionalNodeType.cudaGraphCondTypeSwitch + + + Conditional 'switch' Node. Body[n] is executed once, where 'n' is the value of the condition. If the condition does not match a body index, no body is launched. + .. autoclass:: cuda.bindings.runtime.cudaGraphNodeType .. autoattribute:: cuda.bindings.runtime.cudaGraphNodeType.cudaGraphNodeTypeKernel @@ -4558,6 +4922,12 @@ Data types used by CUDA Runtime Instantiation for device launch failed due to the nodes belonging to different contexts + + .. autoattribute:: cuda.bindings.runtime.cudaGraphInstantiateResult.cudaGraphInstantiateConditionalHandleUnused + + + One or more conditional handles are not associated with conditional nodes + .. autoclass:: cuda.bindings.runtime.cudaGraphKernelNodeField .. autoattribute:: cuda.bindings.runtime.cudaGraphKernelNodeField.cudaGraphKernelNodeFieldInvalid @@ -4804,6 +5174,16 @@ Data types used by CUDA Runtime Valid for streams, graph nodes, launches. See :py:obj:`~.cudaLaunchAttributeValue.memSyncDomain`. + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributePreferredClusterDimension + + + Valid for graph nodes and launches. Set :py:obj:`~.cudaLaunchAttributeValue.preferredClusterDim` to allow the kernel launch to specify a preferred substitute cluster dimension. Blocks may be grouped according to either the dimensions specified with this attribute (grouped into a "preferred substitute cluster"), or the one specified with :py:obj:`~.cudaLaunchAttributeClusterDimension` attribute (grouped into a "regular cluster"). The cluster dimensions of a "preferred substitute cluster" shall be an integer multiple greater than zero of the regular cluster dimensions. The device will attempt - on a best-effort basis - to group thread blocks into preferred clusters over grouping them into regular clusters. When it deems necessary (primarily when the device temporarily runs out of physical resources to launch the larger preferred clusters), the device may switch to launch the regular clusters instead to attempt to utilize as much of the physical device resources as possible. + + Each type of cluster will have its enumeration / coordinate setup as if the grid consists solely of its type of cluster. For example, if the preferred substitute cluster dimensions double the regular cluster dimensions, there might be simultaneously a regular cluster indexed at (1,0,0), and a preferred cluster indexed at (1,0,0). In this example, the preferred substitute cluster (1,0,0) replaces regular clusters (2,0,0) and (3,0,0) and groups their blocks. + + This attribute will only take effect when a regular cluster dimension has been specified. The preferred substitute cluster dimension must be an integer multiple greater than zero of the regular cluster dimension and must divide the grid. It must also be no more than `maxBlocksPerCluster`, if it is set in the kernel's `__launch_bounds__`. Otherwise it must be less than the maximum value the driver can support. Otherwise, setting this attribute to a value physically unable to fit on any particular device is permitted. + + .. autoattribute:: cuda.bindings.runtime.cudaLaunchAttributeID.cudaLaunchAttributeLaunchCompletionEvent @@ -4957,6 +5337,7 @@ Data types used by CUDA Runtime .. autoclass:: cuda.bindings.runtime.cudaGraphConditionalHandle .. autoclass:: cuda.bindings.runtime.cudaFunction_t .. autoclass:: cuda.bindings.runtime.cudaKernel_t +.. autoclass:: cuda.bindings.runtime.cudaLibrary_t .. autoclass:: cuda.bindings.runtime.cudaMemPool_t .. autoclass:: cuda.bindings.runtime.cudaGraphEdgeData .. autoclass:: cuda.bindings.runtime.cudaGraphExec_t @@ -4964,6 +5345,7 @@ Data types used by CUDA Runtime .. autoclass:: cuda.bindings.runtime.cudaGraphExecUpdateResultInfo .. autoclass:: cuda.bindings.runtime.cudaGraphDeviceNode_t .. autoclass:: cuda.bindings.runtime.cudaLaunchMemSyncDomainMap +.. autoclass:: cuda.bindings.runtime.cudaLaunchAttributeValue .. autoclass:: cuda.bindings.runtime.cudaLaunchAttribute .. autoclass:: cuda.bindings.runtime.cudaAsyncCallbackHandle_t .. autoclass:: cuda.bindings.runtime.cudaAsyncNotificationInfo_t @@ -5198,6 +5580,15 @@ Data types used by CUDA Runtime Indicates that the layered sparse CUDA array or CUDA mipmapped array has a single mip tail region for all layers +.. autoattribute:: cuda.bindings.runtime.CUDART_CB +.. autoattribute:: cuda.bindings.runtime.cudaMemPoolCreateUsageHwDecompress + + This flag, if set, indicates that the memory will be used as a buffer for hardware accelerated decompression. + +.. autoattribute:: cuda.bindings.runtime.CU_UUID_HAS_BEEN_DEFINED + + CUDA UUID types + .. autoattribute:: cuda.bindings.runtime.CUDA_IPC_HANDLE_SIZE CUDA IPC Handle Size diff --git a/cuda_bindings/examples/0_Introduction/clock_nvrtc_test.py b/cuda_bindings/examples/0_Introduction/clock_nvrtc_test.py index 2717bd193..60b12caed 100644 --- a/cuda_bindings/examples/0_Introduction/clock_nvrtc_test.py +++ b/cuda_bindings/examples/0_Introduction/clock_nvrtc_test.py @@ -5,6 +5,8 @@ # this software. Any use, reproduction, disclosure, or distribution of # this software and related documentation outside the terms of the EULA # is strictly prohibited. +import platform + import numpy as np from common import common from common.helper_cuda import checkCudaErrors, findCudaDevice @@ -59,6 +61,10 @@ def main(): print("CUDA Clock sample") + if platform.machine() == "armv7l": + print("clock_nvrtc is not supported on ARMv7 - waiving sample") + return + timer = np.empty(NUM_BLOCKS * 2, dtype="int64") hinput = np.empty(NUM_THREADS * 2, dtype="float32") diff --git a/cuda_bindings/examples/0_Introduction/simpleP2P_test.py b/cuda_bindings/examples/0_Introduction/simpleP2P_test.py index 7ff1ae270..5689db610 100644 --- a/cuda_bindings/examples/0_Introduction/simpleP2P_test.py +++ b/cuda_bindings/examples/0_Introduction/simpleP2P_test.py @@ -6,6 +6,7 @@ # this software and related documentation outside the terms of the EULA # is strictly prohibited. import ctypes +import platform import sys import numpy as np @@ -29,6 +30,22 @@ def main(): print("Starting...") + if platform.system() == "Darwin": + print("simpleP2P is not supported on Mac OSX - waiving sample") + return + + if platform.machine() == "armv7l": + print("simpleP2P is not supported on ARMv7 - waiving sample") + return + + if platform.machine() == "aarch64": + print("simpleP2P is not supported on aarch64 - waiving sample") + return + + if platform.machine() == "sbsa": + print("simpleP2P is not supported on sbsa - waiving sample") + return + # Number of GPUs print("Checking for multiple GPUs...") gpu_n = checkCudaErrors(cudart.cudaGetDeviceCount()) diff --git a/cuda_bindings/examples/0_Introduction/simpleZeroCopy_test.py b/cuda_bindings/examples/0_Introduction/simpleZeroCopy_test.py index 267cb3924..4db002029 100644 --- a/cuda_bindings/examples/0_Introduction/simpleZeroCopy_test.py +++ b/cuda_bindings/examples/0_Introduction/simpleZeroCopy_test.py @@ -7,6 +7,7 @@ # is strictly prohibited. import ctypes import math +import platform import random as rnd import sys @@ -35,6 +36,22 @@ def main(): idev = 0 bPinGenericMemory = False + if platform.system() == "Darwin": + print("simpleZeroCopy is not supported on Mac OSX - waiving sample") + return + + if platform.machine() == "armv7l": + print("simpleZeroCopy is not supported on ARMv7 - waiving sample") + return + + if platform.machine() == "aarch64": + print("simpleZeroCopy is not supported on aarch64 - waiving sample") + return + + if platform.machine() == "sbsa": + print("simpleZeroCopy is not supported on sbsa - waiving sample") + return + if checkCmdLineFlag("help"): print("Usage: simpleZeroCopy [OPTION]\n") print("Options:") diff --git a/cuda_bindings/examples/0_Introduction/vectorAddMMAP_test.py b/cuda_bindings/examples/0_Introduction/vectorAddMMAP_test.py index b0044dbf9..3230b5071 100644 --- a/cuda_bindings/examples/0_Introduction/vectorAddMMAP_test.py +++ b/cuda_bindings/examples/0_Introduction/vectorAddMMAP_test.py @@ -7,6 +7,7 @@ # is strictly prohibited. import ctypes import math +import platform import sys import numpy as np @@ -194,6 +195,23 @@ def simpleFreeMultiDeviceMmap(dptr, size): def main(): print("Vector Addition (Driver API)") + + if platform.system() == "Darwin": + print("vectorAddMMAP is not supported on Mac OSX - waiving sample") + return + + if platform.machine() == "armv7l": + print("vectorAddMMAP is not supported on ARMv7 - waiving sample") + return + + if platform.machine() == "aarch64": + print("vectorAddMMAP is not supported on aarch64 - waiving sample") + return + + if platform.machine() == "sbsa": + print("vectorAddMMAP is not supported on sbsa - waiving sample") + return + N = 50000 size = N * np.dtype(np.float32).itemsize diff --git a/cuda_bindings/examples/2_Concepts_and_Techniques/streamOrderedAllocation_test.py b/cuda_bindings/examples/2_Concepts_and_Techniques/streamOrderedAllocation_test.py index 71dc797f7..4cba3ab07 100644 --- a/cuda_bindings/examples/2_Concepts_and_Techniques/streamOrderedAllocation_test.py +++ b/cuda_bindings/examples/2_Concepts_and_Techniques/streamOrderedAllocation_test.py @@ -7,6 +7,7 @@ # is strictly prohibited. import ctypes import math +import platform import random as rnd import sys @@ -200,6 +201,10 @@ def streamOrderedAllocationPostSync(dev, nelem, a, b, c): def main(): + if platform.system() == "Darwin": + print("streamOrderedAllocation is not supported on Mac OSX - waiving sample") + return + cuda.cuInit(0) if checkCmdLineFlag("help"): print("Usage: streamOrderedAllocation [OPTION]\n") diff --git a/cuda_bindings/examples/3_CUDA_Features/globalToShmemAsyncCopy_test.py b/cuda_bindings/examples/3_CUDA_Features/globalToShmemAsyncCopy_test.py index aacd99cf3..b973d0181 100644 --- a/cuda_bindings/examples/3_CUDA_Features/globalToShmemAsyncCopy_test.py +++ b/cuda_bindings/examples/3_CUDA_Features/globalToShmemAsyncCopy_test.py @@ -7,6 +7,7 @@ # is strictly prohibited. import ctypes import math +import platform import sys from enum import Enum @@ -1141,6 +1142,10 @@ def checkKernelCompiles(): def main(): print("[globalToShmemAsyncCopy] - Starting...") + if platform.machine() == "qnx": + print("globalToShmemAsyncCopy is not supported on QNX - waiving sample") + return + version = checkCudaErrors(cuda.cuDriverGetVersion()) if version < 11010: print("CUDA Toolkit 11.1 or greater is required") diff --git a/cuda_bindings/examples/4_CUDA_Libraries/conjugateGradientMultiBlockCG_test.py b/cuda_bindings/examples/4_CUDA_Libraries/conjugateGradientMultiBlockCG_test.py index 38be5798f..a83b4faee 100644 --- a/cuda_bindings/examples/4_CUDA_Libraries/conjugateGradientMultiBlockCG_test.py +++ b/cuda_bindings/examples/4_CUDA_Libraries/conjugateGradientMultiBlockCG_test.py @@ -7,6 +7,7 @@ # is strictly prohibited. import ctypes import math +import platform import sys from random import random @@ -205,6 +206,18 @@ def main(): # WAIVE: Due to bug in NVRTC return + if platform.system() == "Darwin": + print("conjugateGradientMultiBlockCG is not supported on Mac OSX - waiving sample") + return + + if platform.machine() == "armv7l": + print("conjugateGradientMultiBlockCG is not supported on ARMv7 - waiving sample") + return + + if platform.machine() == "qnx": + print("conjugateGradientMultiBlockCG is not supported on QNX - waiving sample") + return + # This will pick the best possible CUDA capable device devID = findCudaDevice() deviceProp = checkCudaErrors(cudart.cudaGetDeviceProperties(devID)) diff --git a/cuda_bindings/setup.py b/cuda_bindings/setup.py index 449da34c0..af9e474c9 100644 --- a/cuda_bindings/setup.py +++ b/cuda_bindings/setup.py @@ -83,10 +83,39 @@ } found_types = [] -found_structs = {} -found_unions = {} found_functions = [] found_values = [] +found_struct = [] +struct_list = {} + + +class Struct: + def __init__(self, name, members): + self._name = name + self._member_names = [] + self._member_types = [] + for var_name, var_type, _ in members: + var_type = var_type[0] + var_type = var_type.removeprefix("struct ") + var_type = var_type.removeprefix("union ") + + self._member_names += [var_name] + self._member_types += [var_type] + + def discoverMembers(self, memberDict, prefix): + discovered = [] + for memberName, memberType in zip(self._member_names, self._member_types): + if memberName: + discovered += [".".join([prefix, memberName])] + if memberType in memberDict: + discovered += memberDict[memberType].discoverMembers( + memberDict, discovered[-1] if memberName else prefix + ) + return discovered + + def __repr__(self): + return f"{self._name}: {self._member_names} with types {self._member_types}" + include_path_list = [os.path.join(path, "include") for path in CUDA_HOME] print(f'Parsing headers in "{include_path_list}" (Caching = {PARSER_CACHING})') @@ -113,26 +142,27 @@ # Combine types with others since they sometimes get tangled found_types += {key for key in parser.defs["types"]} found_types += {key for key in parser.defs["structs"]} - found_structs.update(parser.defs["structs"]) found_types += {key for key in parser.defs["unions"]} - found_unions.update(parser.defs["unions"]) found_types += {key for key in parser.defs["enums"]} found_functions += {key for key in parser.defs["functions"]} found_values += {key for key in parser.defs["values"]} -if len(found_functions) == 0: - raise RuntimeError(f'Parser found no functions. Is CUDA_HOME setup correctly? (CUDA_HOME="{CUDA_HOME}")') - + for key, value in parser.defs["structs"].items(): + struct_list[key] = Struct(key, value["members"]) + for key, value in parser.defs["unions"].items(): + struct_list[key] = Struct(key, value["members"]) -# Unwrap struct and union members -def unwrapMembers(found_dict): - for key in found_dict: - members = [var for var, _, _ in found_dict[key]["members"]] - found_dict[key]["members"] = members + for key, value in struct_list.items(): + if key.startswith("anon_union") or key.startswith("anon_struct"): + continue + found_struct += [key] + discovered = value.discoverMembers(struct_list, key) + if discovered: + found_struct += discovered -unwrapMembers(found_structs) -unwrapMembers(found_unions) +if len(found_functions) == 0: + raise RuntimeError(f'Parser found no functions. Is CUDA_HOME setup correctly? (CUDA_HOME="{CUDA_HOME}")') # ---------------------------------------------------------------------- # Generate @@ -282,7 +312,7 @@ def do_cythonize(extensions): ["cuda/bindings/*.pyx"], # public (deprecated, to be removed) ["cuda/*.pyx"], - # interal files used by generated bindings + # internal files used by generated bindings ["cuda/bindings/_internal/nvjitlink.pyx"], ["cuda/bindings/_internal/utils.pyx"], ] diff --git a/cuda_bindings/tests/cython/build_tests.bat b/cuda_bindings/tests/cython/build_tests.bat index 258bd8134..69d157ca8 100644 --- a/cuda_bindings/tests/cython/build_tests.bat +++ b/cuda_bindings/tests/cython/build_tests.bat @@ -1 +1,5 @@ -cmd /V /C "set CL=%CL% /I%CUDA_HOME%\\include && cythonize -3 -i test_*.pyx" +@echo off +setlocal + set CL=%CL% /I"%CUDA_HOME%\include" + cythonize -3 -i %~dp0test_*.pyx +endlocal diff --git a/cuda_bindings/tests/cython/build_tests.sh b/cuda_bindings/tests/cython/build_tests.sh index d18a6aaa0..82ef437c6 100755 --- a/cuda_bindings/tests/cython/build_tests.sh +++ b/cuda_bindings/tests/cython/build_tests.sh @@ -1,4 +1,3 @@ #!/bin/bash -cd "$(dirname "$0")" -CPLUS_INCLUDE_PATH=$CUDA_HOME/include:$CPLUS_INCLUDE_PATH cythonize -3 -i test_*.pyx +CPLUS_INCLUDE_PATH=$CUDA_HOME/include:$CPLUS_INCLUDE_PATH cythonize -3 -i $(dirname "$0")/test_*.pyx diff --git a/cuda_bindings/tests/test_cuda.py b/cuda_bindings/tests/test_cuda.py index 984f6aab0..7be1b0b95 100644 --- a/cuda_bindings/tests/test_cuda.py +++ b/cuda_bindings/tests/test_cuda.py @@ -943,3 +943,8 @@ def test_conditional(): assert len(params.conditional.phGraph_out) == 1 assert int(params.conditional.phGraph_out[0]) != 0 + + +def test_CUmemDecompressParams_st(): + desc = cuda.CUmemDecompressParams_st() + assert int(desc.dstActBytes) == 0