|
1 | 1 | # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
2 | 2 | # SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE |
3 | 3 |
|
4 | | -# This code was automatically generated with version 13.1.0, generator version fd3f910. Do not modify it directly. |
| 4 | +# This code was automatically generated with version 13.1.0, generator version c185cc3. Do not modify it directly. |
5 | 5 | from typing import Any, Optional |
6 | 6 | import cython |
7 | 7 | import ctypes |
@@ -26111,7 +26111,7 @@ def cuDeviceGetHostAtomicCapabilities(operations : Optional[tuple[CUatomicOperat |
26111 | 26111 | cycapabilities = <unsigned int*>calloc(count, sizeof(unsigned int)) |
26112 | 26112 | if cycapabilities is NULL: |
26113 | 26113 | raise MemoryError('Failed to allocate length x size memory: ' + str(count) + 'x' + str(sizeof(unsigned int))) |
26114 | | - cdef vector[cydriver.CUatomicOperation] cyoperations = [int(pyoperations) for pyoperations in (operations)] |
| 26114 | + cdef vector[cydriver.CUatomicOperation] cyoperations = operations |
26115 | 26115 | if count > len(operations): raise RuntimeError("List is too small: " + str(len(operations)) + " < " + str(count)) |
26116 | 26116 | with nogil: |
26117 | 26117 | err = cydriver.cuDeviceGetHostAtomicCapabilities(cycapabilities, cyoperations.data(), count, cydev) |
@@ -28374,7 +28374,7 @@ def cuModuleLoadDataEx(image, unsigned int numOptions, options : Optional[tuple[ |
28374 | 28374 | cdef void* cyimage = _helper_input_void_ptr(image, &cyimageHelper) |
28375 | 28375 | if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) |
28376 | 28376 | if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) |
28377 | | - cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)] |
| 28377 | + cdef vector[cydriver.CUjit_option] cyoptions = options |
28378 | 28378 | pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] |
28379 | 28379 | cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) |
28380 | 28380 | cdef void** cyoptionValues_ptr = <void**><void_ptr>voidStarHelperoptionValues.cptr |
@@ -28744,7 +28744,7 @@ def cuLinkCreate(unsigned int numOptions, options : Optional[tuple[CUjit_option] |
28744 | 28744 | raise TypeError("Argument 'options' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]") |
28745 | 28745 | if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) |
28746 | 28746 | if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) |
28747 | | - cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)] |
| 28747 | + cdef vector[cydriver.CUjit_option] cyoptions = options |
28748 | 28748 | pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] |
28749 | 28749 | cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) |
28750 | 28750 | cdef void** cyoptionValues_ptr = <void**><void_ptr>voidStarHelperoptionValues.cptr |
@@ -28824,7 +28824,7 @@ def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size, |
28824 | 28824 | cdef void* cydata = _helper_input_void_ptr(data, &cydataHelper) |
28825 | 28825 | if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) |
28826 | 28826 | if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) |
28827 | | - cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)] |
| 28827 | + cdef vector[cydriver.CUjit_option] cyoptions = options |
28828 | 28828 | pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] |
28829 | 28829 | cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) |
28830 | 28830 | cdef void** cyoptionValues_ptr = <void**><void_ptr>voidStarHelperoptionValues.cptr |
@@ -28895,7 +28895,7 @@ def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigne |
28895 | 28895 | cdef cydriver.CUjitInputType cytypename = int(typename) |
28896 | 28896 | if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions)) |
28897 | 28897 | if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions)) |
28898 | | - cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)] |
| 28898 | + cdef vector[cydriver.CUjit_option] cyoptions = options |
28899 | 28899 | pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)] |
28900 | 28900 | cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist) |
28901 | 28901 | cdef void** cyoptionValues_ptr = <void**><void_ptr>voidStarHelperoptionValues.cptr |
@@ -29160,13 +29160,13 @@ def cuLibraryLoadData(code, jitOptions : Optional[tuple[CUjit_option] | list[CUj |
29160 | 29160 | cdef CUlibrary library = CUlibrary() |
29161 | 29161 | cdef _HelperInputVoidPtrStruct cycodeHelper |
29162 | 29162 | cdef void* cycode = _helper_input_void_ptr(code, &cycodeHelper) |
29163 | | - cdef vector[cydriver.CUjit_option] cyjitOptions = [int(pyjitOptions) for pyjitOptions in (jitOptions)] |
| 29163 | + cdef vector[cydriver.CUjit_option] cyjitOptions = jitOptions |
29164 | 29164 | pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] |
29165 | 29165 | cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist) |
29166 | 29166 | cdef void** cyjitOptionsValues_ptr = <void**><void_ptr>voidStarHelperjitOptionsValues.cptr |
29167 | 29167 | if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) |
29168 | 29168 | if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) |
29169 | | - cdef vector[cydriver.CUlibraryOption] cylibraryOptions = [int(pylibraryOptions) for pylibraryOptions in (libraryOptions)] |
| 29169 | + cdef vector[cydriver.CUlibraryOption] cylibraryOptions = libraryOptions |
29170 | 29170 | pylist = [_HelperCUlibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] |
29171 | 29171 | cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist) |
29172 | 29172 | cdef void** cylibraryOptionValues_ptr = <void**><void_ptr>voidStarHelperlibraryOptionValues.cptr |
@@ -29258,13 +29258,13 @@ def cuLibraryLoadFromFile(char* fileName, jitOptions : Optional[tuple[CUjit_opti |
29258 | 29258 | if not all(isinstance(_x, (CUjit_option)) for _x in jitOptions): |
29259 | 29259 | raise TypeError("Argument 'jitOptions' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]") |
29260 | 29260 | cdef CUlibrary library = CUlibrary() |
29261 | | - cdef vector[cydriver.CUjit_option] cyjitOptions = [int(pyjitOptions) for pyjitOptions in (jitOptions)] |
| 29261 | + cdef vector[cydriver.CUjit_option] cyjitOptions = jitOptions |
29262 | 29262 | pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)] |
29263 | 29263 | cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist) |
29264 | 29264 | cdef void** cyjitOptionsValues_ptr = <void**><void_ptr>voidStarHelperjitOptionsValues.cptr |
29265 | 29265 | if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions)) |
29266 | 29266 | if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions)) |
29267 | | - cdef vector[cydriver.CUlibraryOption] cylibraryOptions = [int(pylibraryOptions) for pylibraryOptions in (libraryOptions)] |
| 29267 | + cdef vector[cydriver.CUlibraryOption] cylibraryOptions = libraryOptions |
29268 | 29268 | pylist = [_HelperCUlibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)] |
29269 | 29269 | cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist) |
29270 | 29270 | cdef void** cylibraryOptionValues_ptr = <void**><void_ptr>voidStarHelperlibraryOptionValues.cptr |
@@ -38566,7 +38566,7 @@ def cuMemRangeGetAttributes(dataSizes : tuple[int] | list[int], attributes : Opt |
38566 | 38566 | cdef _InputVoidPtrPtrHelper voidStarHelperdata = _InputVoidPtrPtrHelper(pylist) |
38567 | 38567 | cdef void** cyvoidStarHelper_ptr = <void**><void_ptr>voidStarHelperdata.cptr |
38568 | 38568 | cdef vector[size_t] cydataSizes = dataSizes |
38569 | | - cdef vector[cydriver.CUmem_range_attribute] cyattributes = [int(pyattributes) for pyattributes in (attributes)] |
| 38569 | + cdef vector[cydriver.CUmem_range_attribute] cyattributes = attributes |
38570 | 38570 | if numAttributes > <size_t>len(dataSizes): raise RuntimeError("List is too small: " + str(len(dataSizes)) + " < " + str(numAttributes)) |
38571 | 38571 | if numAttributes > <size_t>len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes)) |
38572 | 38572 | with nogil: |
@@ -38715,7 +38715,7 @@ def cuPointerGetAttributes(unsigned int numAttributes, attributes : Optional[tup |
38715 | 38715 | if not all(isinstance(_x, (CUpointer_attribute)) for _x in attributes): |
38716 | 38716 | raise TypeError("Argument 'attributes' is not instance of type (expected tuple[cydriver.CUpointer_attribute] or list[cydriver.CUpointer_attribute]") |
38717 | 38717 | if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes)) |
38718 | | - cdef vector[cydriver.CUpointer_attribute] cyattributes = [int(pyattributes) for pyattributes in (attributes)] |
| 38718 | + cdef vector[cydriver.CUpointer_attribute] cyattributes = attributes |
38719 | 38719 | pylist = [_HelperCUpointer_attribute(pyattributes, 0, is_getter=True) for pyattributes in attributes] |
38720 | 38720 | cdef _InputVoidPtrPtrHelper voidStarHelperdata = _InputVoidPtrPtrHelper(pylist) |
38721 | 38721 | cdef void** cyvoidStarHelper_ptr = <void**><void_ptr>voidStarHelperdata.cptr |
@@ -52586,7 +52586,7 @@ def cuDeviceGetP2PAtomicCapabilities(operations : Optional[tuple[CUatomicOperati |
52586 | 52586 | cycapabilities = <unsigned int*>calloc(count, sizeof(unsigned int)) |
52587 | 52587 | if cycapabilities is NULL: |
52588 | 52588 | raise MemoryError('Failed to allocate length x size memory: ' + str(count) + 'x' + str(sizeof(unsigned int))) |
52589 | | - cdef vector[cydriver.CUatomicOperation] cyoperations = [int(pyoperations) for pyoperations in (operations)] |
| 52589 | + cdef vector[cydriver.CUatomicOperation] cyoperations = operations |
52590 | 52590 | if count > len(operations): raise RuntimeError("List is too small: " + str(len(operations)) + " < " + str(count)) |
52591 | 52591 | with nogil: |
52592 | 52592 | err = cydriver.cuDeviceGetP2PAtomicCapabilities(cycapabilities, cyoperations.data(), count, cysrcDevice, cydstDevice) |
|
0 commit comments