simt_cuda_sys/
bindings.rs

1/* automatically generated by rust-bindgen 0.65.1 */
2
3pub type cuuint32_t = u32;
4pub type cuuint64_t = u64;
5pub type CUdeviceptr_v2 = ::std::os::raw::c_ulonglong;
6pub type CUdeviceptr = CUdeviceptr_v2;
7pub type CUdevice_v1 = ::std::os::raw::c_int;
8pub type CUdevice = CUdevice_v1;
9#[repr(C)]
10#[derive(Debug, Copy, Clone)]
11pub struct CUctx_st {
12    _unused: [u8; 0],
13}
14pub type CUcontext = *mut CUctx_st;
15#[repr(C)]
16#[derive(Debug, Copy, Clone)]
17pub struct CUmod_st {
18    _unused: [u8; 0],
19}
20pub type CUmodule = *mut CUmod_st;
21#[repr(C)]
22#[derive(Debug, Copy, Clone)]
23pub struct CUfunc_st {
24    _unused: [u8; 0],
25}
26pub type CUfunction = *mut CUfunc_st;
27#[repr(C)]
28#[derive(Debug, Copy, Clone)]
29pub struct CUlib_st {
30    _unused: [u8; 0],
31}
32pub type CUlibrary = *mut CUlib_st;
33#[repr(C)]
34#[derive(Debug, Copy, Clone)]
35pub struct CUkern_st {
36    _unused: [u8; 0],
37}
38pub type CUkernel = *mut CUkern_st;
39#[repr(C)]
40#[derive(Debug, Copy, Clone)]
41pub struct CUarray_st {
42    _unused: [u8; 0],
43}
44pub type CUarray = *mut CUarray_st;
45#[repr(C)]
46#[derive(Debug, Copy, Clone)]
47pub struct CUmipmappedArray_st {
48    _unused: [u8; 0],
49}
50pub type CUmipmappedArray = *mut CUmipmappedArray_st;
51#[repr(C)]
52#[derive(Debug, Copy, Clone)]
53pub struct CUtexref_st {
54    _unused: [u8; 0],
55}
56pub type CUtexref = *mut CUtexref_st;
57#[repr(C)]
58#[derive(Debug, Copy, Clone)]
59pub struct CUsurfref_st {
60    _unused: [u8; 0],
61}
62pub type CUsurfref = *mut CUsurfref_st;
63#[repr(C)]
64#[derive(Debug, Copy, Clone)]
65pub struct CUevent_st {
66    _unused: [u8; 0],
67}
68pub type CUevent = *mut CUevent_st;
69#[repr(C)]
70#[derive(Debug, Copy, Clone)]
71pub struct CUstream_st {
72    _unused: [u8; 0],
73}
74pub type CUstream = *mut CUstream_st;
75#[repr(C)]
76#[derive(Debug, Copy, Clone)]
77pub struct CUgraphicsResource_st {
78    _unused: [u8; 0],
79}
80pub type CUgraphicsResource = *mut CUgraphicsResource_st;
81pub type CUtexObject_v1 = ::std::os::raw::c_ulonglong;
82pub type CUtexObject = CUtexObject_v1;
83pub type CUsurfObject_v1 = ::std::os::raw::c_ulonglong;
84pub type CUsurfObject = CUsurfObject_v1;
85#[repr(C)]
86#[derive(Debug, Copy, Clone)]
87pub struct CUextMemory_st {
88    _unused: [u8; 0],
89}
90pub type CUexternalMemory = *mut CUextMemory_st;
91#[repr(C)]
92#[derive(Debug, Copy, Clone)]
93pub struct CUextSemaphore_st {
94    _unused: [u8; 0],
95}
96pub type CUexternalSemaphore = *mut CUextSemaphore_st;
97#[repr(C)]
98#[derive(Debug, Copy, Clone)]
99pub struct CUgraph_st {
100    _unused: [u8; 0],
101}
102pub type CUgraph = *mut CUgraph_st;
103#[repr(C)]
104#[derive(Debug, Copy, Clone)]
105pub struct CUgraphNode_st {
106    _unused: [u8; 0],
107}
108pub type CUgraphNode = *mut CUgraphNode_st;
109#[repr(C)]
110#[derive(Debug, Copy, Clone)]
111pub struct CUgraphExec_st {
112    _unused: [u8; 0],
113}
114pub type CUgraphExec = *mut CUgraphExec_st;
115#[repr(C)]
116#[derive(Debug, Copy, Clone)]
117pub struct CUmemPoolHandle_st {
118    _unused: [u8; 0],
119}
120pub type CUmemoryPool = *mut CUmemPoolHandle_st;
121#[repr(C)]
122#[derive(Debug, Copy, Clone)]
123pub struct CUuserObject_st {
124    _unused: [u8; 0],
125}
126pub type CUuserObject = *mut CUuserObject_st;
127#[repr(C)]
128#[derive(Debug, Copy, Clone)]
129pub struct CUuuid_st {
130    pub bytes: [::std::os::raw::c_char; 16usize],
131}
132pub type CUuuid = CUuuid_st;
133#[doc = " CUDA IPC event handle"]
134#[repr(C)]
135#[derive(Debug, Copy, Clone)]
136pub struct CUipcEventHandle_st {
137    pub reserved: [::std::os::raw::c_char; 64usize],
138}
139#[doc = " CUDA IPC event handle"]
140pub type CUipcEventHandle_v1 = CUipcEventHandle_st;
141#[doc = " CUDA IPC event handle"]
142pub type CUipcEventHandle = CUipcEventHandle_v1;
143#[doc = " CUDA IPC mem handle"]
144#[repr(C)]
145#[derive(Debug, Copy, Clone)]
146pub struct CUipcMemHandle_st {
147    pub reserved: [::std::os::raw::c_char; 64usize],
148}
149#[doc = " CUDA IPC mem handle"]
150pub type CUipcMemHandle_v1 = CUipcMemHandle_st;
151#[doc = " CUDA IPC mem handle"]
152pub type CUipcMemHandle = CUipcMemHandle_v1;
153#[repr(u32)]
154#[doc = " Operations for ::cuStreamBatchMemOp"]
155#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
156pub enum CUstreamBatchMemOpType_enum {
157    #[doc = "< Represents a ::cuStreamWaitValue32 operation"]
158    CU_STREAM_MEM_OP_WAIT_VALUE_32 = 1,
159    #[doc = "< Represents a ::cuStreamWriteValue32 operation"]
160    CU_STREAM_MEM_OP_WRITE_VALUE_32 = 2,
161    #[doc = "< Represents a ::cuStreamWaitValue64 operation"]
162    CU_STREAM_MEM_OP_WAIT_VALUE_64 = 4,
163    #[doc = "< Represents a ::cuStreamWriteValue64 operation"]
164    CU_STREAM_MEM_OP_WRITE_VALUE_64 = 5,
165    #[doc = "< Insert a memory barrier of the specified type"]
166    CU_STREAM_MEM_OP_BARRIER = 6,
167    #[doc = "< This has the same effect as ::CU_STREAM_WAIT_VALUE_FLUSH, but as a\nstandalone operation."]
168    CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = 3,
169}
170#[doc = " Operations for ::cuStreamBatchMemOp"]
171pub use self::CUstreamBatchMemOpType_enum as CUstreamBatchMemOpType;
172#[doc = " Per-operation parameters for ::cuStreamBatchMemOp"]
173#[repr(C)]
174#[derive(Copy, Clone)]
175pub union CUstreamBatchMemOpParams_union {
176    pub operation: CUstreamBatchMemOpType,
177    pub waitValue: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st,
178    pub writeValue: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st,
179    pub flushRemoteWrites: CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st,
180    pub memoryBarrier: CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st,
181    pub pad: [cuuint64_t; 6usize],
182}
183#[repr(C)]
184#[derive(Copy, Clone)]
185pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st {
186    pub operation: CUstreamBatchMemOpType,
187    pub address: CUdeviceptr,
188    pub __bindgen_anon_1:
189        CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1,
190    pub flags: ::std::os::raw::c_uint,
191    #[doc = "< For driver internal use. Initial value is unimportant."]
192    pub alias: CUdeviceptr,
193}
194#[repr(C)]
195#[derive(Copy, Clone)]
196pub union CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 {
197    pub value: cuuint32_t,
198    pub value64: cuuint64_t,
199}
200#[repr(C)]
201#[derive(Copy, Clone)]
202pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st {
203    pub operation: CUstreamBatchMemOpType,
204    pub address: CUdeviceptr,
205    pub __bindgen_anon_1:
206        CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1,
207    pub flags: ::std::os::raw::c_uint,
208    #[doc = "< For driver internal use. Initial value is unimportant."]
209    pub alias: CUdeviceptr,
210}
211#[repr(C)]
212#[derive(Copy, Clone)]
213pub union CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 {
214    pub value: cuuint32_t,
215    pub value64: cuuint64_t,
216}
217#[repr(C)]
218#[derive(Debug, Copy, Clone)]
219pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st {
220    pub operation: CUstreamBatchMemOpType,
221    pub flags: ::std::os::raw::c_uint,
222}
223#[repr(C)]
224#[derive(Debug, Copy, Clone)]
225pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st {
226    pub operation: CUstreamBatchMemOpType,
227    pub flags: ::std::os::raw::c_uint,
228}
229#[doc = " Per-operation parameters for ::cuStreamBatchMemOp"]
230pub type CUstreamBatchMemOpParams_v1 = CUstreamBatchMemOpParams_union;
231#[doc = " Per-operation parameters for ::cuStreamBatchMemOp"]
232pub type CUstreamBatchMemOpParams = CUstreamBatchMemOpParams_v1;
233#[repr(C)]
234#[derive(Debug, Copy, Clone)]
235pub struct CUDA_BATCH_MEM_OP_NODE_PARAMS_st {
236    pub ctx: CUcontext,
237    pub count: ::std::os::raw::c_uint,
238    pub paramArray: *mut CUstreamBatchMemOpParams,
239    pub flags: ::std::os::raw::c_uint,
240}
241pub type CUDA_BATCH_MEM_OP_NODE_PARAMS = CUDA_BATCH_MEM_OP_NODE_PARAMS_st;
242#[repr(u32)]
243#[doc = " Array formats"]
244#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
245pub enum CUarray_format_enum {
246    #[doc = "< Unsigned 8-bit integers"]
247    CU_AD_FORMAT_UNSIGNED_INT8 = 1,
248    #[doc = "< Unsigned 16-bit integers"]
249    CU_AD_FORMAT_UNSIGNED_INT16 = 2,
250    #[doc = "< Unsigned 32-bit integers"]
251    CU_AD_FORMAT_UNSIGNED_INT32 = 3,
252    #[doc = "< Signed 8-bit integers"]
253    CU_AD_FORMAT_SIGNED_INT8 = 8,
254    #[doc = "< Signed 16-bit integers"]
255    CU_AD_FORMAT_SIGNED_INT16 = 9,
256    #[doc = "< Signed 32-bit integers"]
257    CU_AD_FORMAT_SIGNED_INT32 = 10,
258    #[doc = "< 16-bit floating point"]
259    CU_AD_FORMAT_HALF = 16,
260    #[doc = "< 32-bit floating point"]
261    CU_AD_FORMAT_FLOAT = 32,
262    #[doc = "< 8-bit YUV planar format, with 4:2:0 sampling"]
263    CU_AD_FORMAT_NV12 = 176,
264    #[doc = "< 1 channel unsigned 8-bit normalized integer"]
265    CU_AD_FORMAT_UNORM_INT8X1 = 192,
266    #[doc = "< 2 channel unsigned 8-bit normalized integer"]
267    CU_AD_FORMAT_UNORM_INT8X2 = 193,
268    #[doc = "< 4 channel unsigned 8-bit normalized integer"]
269    CU_AD_FORMAT_UNORM_INT8X4 = 194,
270    #[doc = "< 1 channel unsigned 16-bit normalized integer"]
271    CU_AD_FORMAT_UNORM_INT16X1 = 195,
272    #[doc = "< 2 channel unsigned 16-bit normalized integer"]
273    CU_AD_FORMAT_UNORM_INT16X2 = 196,
274    #[doc = "< 4 channel unsigned 16-bit normalized integer"]
275    CU_AD_FORMAT_UNORM_INT16X4 = 197,
276    #[doc = "< 1 channel signed 8-bit normalized integer"]
277    CU_AD_FORMAT_SNORM_INT8X1 = 198,
278    #[doc = "< 2 channel signed 8-bit normalized integer"]
279    CU_AD_FORMAT_SNORM_INT8X2 = 199,
280    #[doc = "< 4 channel signed 8-bit normalized integer"]
281    CU_AD_FORMAT_SNORM_INT8X4 = 200,
282    #[doc = "< 1 channel signed 16-bit normalized integer"]
283    CU_AD_FORMAT_SNORM_INT16X1 = 201,
284    #[doc = "< 2 channel signed 16-bit normalized integer"]
285    CU_AD_FORMAT_SNORM_INT16X2 = 202,
286    #[doc = "< 4 channel signed 16-bit normalized integer"]
287    CU_AD_FORMAT_SNORM_INT16X4 = 203,
288    #[doc = "< 4 channel unsigned normalized block-compressed (BC1 compression) format"]
289    CU_AD_FORMAT_BC1_UNORM = 145,
290    #[doc = "< 4 channel unsigned normalized block-compressed (BC1 compression) format with sRGB encoding"]
291    CU_AD_FORMAT_BC1_UNORM_SRGB = 146,
292    #[doc = "< 4 channel unsigned normalized block-compressed (BC2 compression) format"]
293    CU_AD_FORMAT_BC2_UNORM = 147,
294    #[doc = "< 4 channel unsigned normalized block-compressed (BC2 compression) format with sRGB encoding"]
295    CU_AD_FORMAT_BC2_UNORM_SRGB = 148,
296    #[doc = "< 4 channel unsigned normalized block-compressed (BC3 compression) format"]
297    CU_AD_FORMAT_BC3_UNORM = 149,
298    #[doc = "< 4 channel unsigned normalized block-compressed (BC3 compression) format with sRGB encoding"]
299    CU_AD_FORMAT_BC3_UNORM_SRGB = 150,
300    #[doc = "< 1 channel unsigned normalized block-compressed (BC4 compression) format"]
301    CU_AD_FORMAT_BC4_UNORM = 151,
302    #[doc = "< 1 channel signed normalized block-compressed (BC4 compression) format"]
303    CU_AD_FORMAT_BC4_SNORM = 152,
304    #[doc = "< 2 channel unsigned normalized block-compressed (BC5 compression) format"]
305    CU_AD_FORMAT_BC5_UNORM = 153,
306    #[doc = "< 2 channel signed normalized block-compressed (BC5 compression) format"]
307    CU_AD_FORMAT_BC5_SNORM = 154,
308    #[doc = "< 3 channel unsigned half-float block-compressed (BC6H compression) format"]
309    CU_AD_FORMAT_BC6H_UF16 = 155,
310    #[doc = "< 3 channel signed half-float block-compressed (BC6H compression) format"]
311    CU_AD_FORMAT_BC6H_SF16 = 156,
312    #[doc = "< 4 channel unsigned normalized block-compressed (BC7 compression) format"]
313    CU_AD_FORMAT_BC7_UNORM = 157,
314    #[doc = "< 4 channel unsigned normalized block-compressed (BC7 compression) format with sRGB encoding"]
315    CU_AD_FORMAT_BC7_UNORM_SRGB = 158,
316}
317#[doc = " Array formats"]
318pub use self::CUarray_format_enum as CUarray_format;
319#[repr(u32)]
320#[doc = " Texture reference addressing modes"]
321#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
322pub enum CUaddress_mode_enum {
323    #[doc = "< Wrapping address mode"]
324    CU_TR_ADDRESS_MODE_WRAP = 0,
325    #[doc = "< Clamp to edge address mode"]
326    CU_TR_ADDRESS_MODE_CLAMP = 1,
327    #[doc = "< Mirror address mode"]
328    CU_TR_ADDRESS_MODE_MIRROR = 2,
329    #[doc = "< Border address mode"]
330    CU_TR_ADDRESS_MODE_BORDER = 3,
331}
332#[doc = " Texture reference addressing modes"]
333pub use self::CUaddress_mode_enum as CUaddress_mode;
334#[repr(u32)]
335#[doc = " Texture reference filtering modes"]
336#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
337pub enum CUfilter_mode_enum {
338    #[doc = "< Point filter mode"]
339    CU_TR_FILTER_MODE_POINT = 0,
340    #[doc = "< Linear filter mode"]
341    CU_TR_FILTER_MODE_LINEAR = 1,
342}
343#[doc = " Texture reference filtering modes"]
344pub use self::CUfilter_mode_enum as CUfilter_mode;
345impl CUdevice_attribute_enum {
346    pub const CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK: CUdevice_attribute_enum =
347        CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK;
348}
349impl CUdevice_attribute_enum {
350    pub const CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK: CUdevice_attribute_enum =
351        CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK;
352}
353impl CUdevice_attribute_enum {
354    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH: CUdevice_attribute_enum =
355        CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH;
356}
357impl CUdevice_attribute_enum {
358    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT: CUdevice_attribute_enum =
359        CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT;
360}
361impl CUdevice_attribute_enum {
362    pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES: CUdevice_attribute_enum =
363        CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS;
364}
365impl CUdevice_attribute_enum {
366    pub const CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED: CUdevice_attribute_enum =
367        CUdevice_attribute_enum::CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED;
368}
369#[repr(u32)]
370#[doc = " Device properties"]
371#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
372pub enum CUdevice_attribute_enum {
373    #[doc = "< Maximum number of threads per block"]
374    CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1,
375    #[doc = "< Maximum block dimension X"]
376    CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = 2,
377    #[doc = "< Maximum block dimension Y"]
378    CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = 3,
379    #[doc = "< Maximum block dimension Z"]
380    CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = 4,
381    #[doc = "< Maximum grid dimension X"]
382    CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = 5,
383    #[doc = "< Maximum grid dimension Y"]
384    CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = 6,
385    #[doc = "< Maximum grid dimension Z"]
386    CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = 7,
387    #[doc = "< Maximum shared memory available per block in bytes"]
388    CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = 8,
389    #[doc = "< Memory available on device for __constant__ variables in a CUDA C kernel in bytes"]
390    CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = 9,
391    #[doc = "< Warp size in threads"]
392    CU_DEVICE_ATTRIBUTE_WARP_SIZE = 10,
393    #[doc = "< Maximum pitch in bytes allowed by memory copies"]
394    CU_DEVICE_ATTRIBUTE_MAX_PITCH = 11,
395    #[doc = "< Maximum number of 32-bit registers available per block"]
396    CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = 12,
397    #[doc = "< Typical clock frequency in kilohertz"]
398    CU_DEVICE_ATTRIBUTE_CLOCK_RATE = 13,
399    #[doc = "< Alignment requirement for textures"]
400    CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = 14,
401    #[doc = "< Device can possibly copy memory and execute a kernel concurrently. Deprecated. Use instead CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT."]
402    CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = 15,
403    #[doc = "< Number of multiprocessors on device"]
404    CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = 16,
405    #[doc = "< Specifies whether there is a run time limit on kernels"]
406    CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = 17,
407    #[doc = "< Device is integrated with host memory"]
408    CU_DEVICE_ATTRIBUTE_INTEGRATED = 18,
409    #[doc = "< Device can map host memory into CUDA address space"]
410    CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = 19,
411    #[doc = "< Compute mode (See ::CUcomputemode for details)"]
412    CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = 20,
413    #[doc = "< Maximum 1D texture width"]
414    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = 21,
415    #[doc = "< Maximum 2D texture width"]
416    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = 22,
417    #[doc = "< Maximum 2D texture height"]
418    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = 23,
419    #[doc = "< Maximum 3D texture width"]
420    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = 24,
421    #[doc = "< Maximum 3D texture height"]
422    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = 25,
423    #[doc = "< Maximum 3D texture depth"]
424    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = 26,
425    #[doc = "< Maximum 2D layered texture width"]
426    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH = 27,
427    #[doc = "< Maximum 2D layered texture height"]
428    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT = 28,
429    #[doc = "< Maximum layers in a 2D layered texture"]
430    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS = 29,
431    #[doc = "< Alignment requirement for surfaces"]
432    CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = 30,
433    #[doc = "< Device can possibly execute multiple kernels concurrently"]
434    CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = 31,
435    #[doc = "< Device has ECC support enabled"]
436    CU_DEVICE_ATTRIBUTE_ECC_ENABLED = 32,
437    #[doc = "< PCI bus ID of the device"]
438    CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = 33,
439    #[doc = "< PCI device ID of the device"]
440    CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = 34,
441    #[doc = "< Device is using TCC driver model"]
442    CU_DEVICE_ATTRIBUTE_TCC_DRIVER = 35,
443    #[doc = "< Peak memory clock frequency in kilohertz"]
444    CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = 36,
445    #[doc = "< Global memory bus width in bits"]
446    CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH = 37,
447    #[doc = "< Size of L2 cache in bytes"]
448    CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE = 38,
449    #[doc = "< Maximum resident threads per multiprocessor"]
450    CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = 39,
451    #[doc = "< Number of asynchronous engines"]
452    CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = 40,
453    #[doc = "< Device shares a unified address space with the host"]
454    CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = 41,
455    #[doc = "< Maximum 1D layered texture width"]
456    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH = 42,
457    #[doc = "< Maximum layers in a 1D layered texture"]
458    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS = 43,
459    #[doc = "< Deprecated, do not use."]
460    CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER = 44,
461    #[doc = "< Maximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set"]
462    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH = 45,
463    #[doc = "< Maximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set"]
464    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT = 46,
465    #[doc = "< Alternate maximum 3D texture width"]
466    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE = 47,
467    #[doc = "< Alternate maximum 3D texture height"]
468    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE = 48,
469    #[doc = "< Alternate maximum 3D texture depth"]
470    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE = 49,
471    #[doc = "< PCI domain ID of the device"]
472    CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = 50,
473    #[doc = "< Pitch alignment requirement for textures"]
474    CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = 51,
475    #[doc = "< Maximum cubemap texture width/height"]
476    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH = 52,
477    #[doc = "< Maximum cubemap layered texture width/height"]
478    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH = 53,
479    #[doc = "< Maximum layers in a cubemap layered texture"]
480    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS = 54,
481    #[doc = "< Maximum 1D surface width"]
482    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH = 55,
483    #[doc = "< Maximum 2D surface width"]
484    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH = 56,
485    #[doc = "< Maximum 2D surface height"]
486    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT = 57,
487    #[doc = "< Maximum 3D surface width"]
488    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH = 58,
489    #[doc = "< Maximum 3D surface height"]
490    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT = 59,
491    #[doc = "< Maximum 3D surface depth"]
492    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH = 60,
493    #[doc = "< Maximum 1D layered surface width"]
494    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH = 61,
495    #[doc = "< Maximum layers in a 1D layered surface"]
496    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS = 62,
497    #[doc = "< Maximum 2D layered surface width"]
498    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH = 63,
499    #[doc = "< Maximum 2D layered surface height"]
500    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT = 64,
501    #[doc = "< Maximum layers in a 2D layered surface"]
502    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS = 65,
503    #[doc = "< Maximum cubemap surface width"]
504    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH = 66,
505    #[doc = "< Maximum cubemap layered surface width"]
506    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH = 67,
507    #[doc = "< Maximum layers in a cubemap layered surface"]
508    CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS = 68,
509    #[doc = "< Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() or cuDeviceGetTexture1DLinearMaxWidth() instead."]
510    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH = 69,
511    #[doc = "< Maximum 2D linear texture width"]
512    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH = 70,
513    #[doc = "< Maximum 2D linear texture height"]
514    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT = 71,
515    #[doc = "< Maximum 2D linear texture pitch in bytes"]
516    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH = 72,
517    #[doc = "< Maximum mipmapped 2D texture width"]
518    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH = 73,
519    #[doc = "< Maximum mipmapped 2D texture height"]
520    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT = 74,
521    #[doc = "< Major compute capability version number"]
522    CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = 75,
523    #[doc = "< Minor compute capability version number"]
524    CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = 76,
525    #[doc = "< Maximum mipmapped 1D texture width"]
526    CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH = 77,
527    #[doc = "< Device supports stream priorities"]
528    CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED = 78,
529    #[doc = "< Device supports caching globals in L1"]
530    CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED = 79,
531    #[doc = "< Device supports caching locals in L1"]
532    CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED = 80,
533    #[doc = "< Maximum shared memory available per multiprocessor in bytes"]
534    CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = 81,
535    #[doc = "< Maximum number of 32-bit registers available per multiprocessor"]
536    CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR = 82,
537    #[doc = "< Device can allocate managed memory on this system"]
538    CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = 83,
539    #[doc = "< Device is on a multi-GPU board"]
540    CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = 84,
541    #[doc = "< Unique id for a group of devices on the same multi-GPU board"]
542    CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = 85,
543    #[doc = "< Link between the device and the host supports native atomic operations (this is a placeholder attribute, and is not supported on any current hardware)"]
544    CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = 86,
545    #[doc = "< Ratio of single precision performance (in floating-point operations per second) to double precision performance"]
546    CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = 87,
547    #[doc = "< Device supports coherently accessing pageable memory without calling cudaHostRegister on it"]
548    CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = 88,
549    #[doc = "< Device can coherently access managed memory concurrently with the CPU"]
550    CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = 89,
551    #[doc = "< Device supports compute preemption."]
552    CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = 90,
553    #[doc = "< Device can access host registered memory at the same virtual address as the CPU"]
554    CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = 91,
555    #[doc = "< Deprecated, along with v1 MemOps API, ::cuStreamBatchMemOp and related APIs are supported."]
556    CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1 = 92,
557    #[doc = "< Deprecated, along with v1 MemOps API, 64-bit operations are supported in ::cuStreamBatchMemOp and related APIs."]
558    CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1 = 93,
559    #[doc = "< Deprecated, along with v1 MemOps API, ::CU_STREAM_WAIT_VALUE_NOR is supported."]
560    CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1 = 94,
561    #[doc = "< Device supports launching cooperative kernels via ::cuLaunchCooperativeKernel"]
562    CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = 95,
563    #[doc = "< Deprecated, ::cuLaunchCooperativeKernelMultiDevice is deprecated."]
564    CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = 96,
565    #[doc = "< Maximum optin shared memory per block"]
566    CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = 97,
567    #[doc = "< The ::CU_STREAM_WAIT_VALUE_FLUSH flag and the ::CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES MemOp are supported on the device. See \\ref CUDA_MEMOP for additional details."]
568    CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES = 98,
569    #[doc = "< Device supports host memory registration via ::cudaHostRegister."]
570    CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = 99,
571    #[doc = "< Device accesses pageable memory via the host's page tables."]
572    CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = 100,
573    #[doc = "< The host can directly access managed memory on the device without migration."]
574    CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = 101,
575    #[doc = "< Deprecated, Use CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED"]
576    CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED = 102,
577    #[doc = "< Device supports exporting memory to a posix file descriptor with ::cuMemExportToShareableHandle, if requested via ::cuMemCreate"]
578    CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED = 103,
579    #[doc = "< Device supports exporting memory to a Win32 NT handle with ::cuMemExportToShareableHandle, if requested via ::cuMemCreate"]
580    CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED = 104,
581    #[doc = "< Device supports exporting memory to a Win32 KMT handle with ::cuMemExportToShareableHandle, if requested via ::cuMemCreate"]
582    CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED = 105,
583    #[doc = "< Maximum number of blocks per multiprocessor"]
584    CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = 106,
585    #[doc = "< Device supports compression of memory"]
586    CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED = 107,
587    #[doc = "< Maximum L2 persisting lines capacity setting in bytes."]
588    CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE = 108,
589    #[doc = "< Maximum value of CUaccessPolicyWindow::num_bytes."]
590    CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE = 109,
591    #[doc = "< Device supports specifying the GPUDirect RDMA flag with ::cuMemCreate"]
592    CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED = 110,
593    #[doc = "< Shared memory reserved by CUDA driver per block in bytes"]
594    CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK = 111,
595    #[doc = "< Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays"]
596    CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED = 112,
597    #[doc = "< Device supports using the ::cuMemHostRegister flag ::CU_MEMHOSTERGISTER_READ_ONLY to register memory that must be mapped as read-only to the GPU"]
598    CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED = 113,
599    #[doc = "< External timeline semaphore interop is supported on the device"]
600    CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED = 114,
601    #[doc = "< Device supports using the ::cuMemAllocAsync and ::cuMemPool family of APIs"]
602    CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = 115,
603    #[doc = "< Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see https://docs.nvidia.com/cuda/gpudirect-rdma for more information)"]
604    CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED = 116,
605    #[doc = "< The returned attribute shall be interpreted as a bitmask, where the individual bits are described by the ::CUflushGPUDirectRDMAWritesOptions enum"]
606    CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS = 117,
607    #[doc = "< GPUDirect RDMA writes to the device do not need to be flushed for consumers within the scope indicated by the returned attribute. See ::CUGPUDirectRDMAWritesOrdering for the numerical values returned here."]
608    CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING = 118,
609    #[doc = "< Handle types supported with mempool based IPC"]
610    CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES = 119,
611    #[doc = "< Indicates device supports cluster launch"]
612    CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH = 120,
613    #[doc = "< Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays"]
614    CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED = 121,
615    #[doc = "< 64-bit operations are supported in ::cuStreamBatchMemOp and related MemOp APIs."]
616    CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS = 122,
617    #[doc = "< ::CU_STREAM_WAIT_VALUE_NOR is supported by MemOp APIs."]
618    CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = 123,
619    #[doc = "< Device supports buffer sharing with dma_buf mechanism."]
620    CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED = 124,
621    #[doc = "< Device supports IPC Events."]
622    CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED = 125,
623    #[doc = "< Number of memory domains the device supports."]
624    CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT = 126,
625    #[doc = "< Device supports accessing memory using Tensor Map."]
626    CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED = 127,
627    #[doc = "< Device supports unified function pointers."]
628    CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS = 129,
629    CU_DEVICE_ATTRIBUTE_MAX = 130,
630}
631#[doc = " Device properties"]
632pub use self::CUdevice_attribute_enum as CUdevice_attribute;
633#[doc = " Legacy device properties"]
634#[repr(C)]
635#[derive(Debug, Copy, Clone)]
636pub struct CUdevprop_st {
637    #[doc = "< Maximum number of threads per block"]
638    pub maxThreadsPerBlock: ::std::os::raw::c_int,
639    #[doc = "< Maximum size of each dimension of a block"]
640    pub maxThreadsDim: [::std::os::raw::c_int; 3usize],
641    #[doc = "< Maximum size of each dimension of a grid"]
642    pub maxGridSize: [::std::os::raw::c_int; 3usize],
643    #[doc = "< Shared memory available per block in bytes"]
644    pub sharedMemPerBlock: ::std::os::raw::c_int,
645    #[doc = "< Constant memory available on device in bytes"]
646    pub totalConstantMemory: ::std::os::raw::c_int,
647    #[doc = "< Warp size in threads"]
648    pub SIMDWidth: ::std::os::raw::c_int,
649    #[doc = "< Maximum pitch in bytes allowed by memory copies"]
650    pub memPitch: ::std::os::raw::c_int,
651    #[doc = "< 32-bit registers available per block"]
652    pub regsPerBlock: ::std::os::raw::c_int,
653    #[doc = "< Clock frequency in kilohertz"]
654    pub clockRate: ::std::os::raw::c_int,
655    #[doc = "< Alignment requirement for textures"]
656    pub textureAlign: ::std::os::raw::c_int,
657}
658#[doc = " Legacy device properties"]
659pub type CUdevprop_v1 = CUdevprop_st;
660#[doc = " Legacy device properties"]
661pub type CUdevprop = CUdevprop_v1;
662#[repr(u32)]
663#[doc = " Pointer information"]
664#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
665pub enum CUpointer_attribute_enum {
666    #[doc = "< The ::CUcontext on which a pointer was allocated or registered"]
667    CU_POINTER_ATTRIBUTE_CONTEXT = 1,
668    #[doc = "< The ::CUmemorytype describing the physical location of a pointer"]
669    CU_POINTER_ATTRIBUTE_MEMORY_TYPE = 2,
670    #[doc = "< The address at which a pointer's memory may be accessed on the device"]
671    CU_POINTER_ATTRIBUTE_DEVICE_POINTER = 3,
672    #[doc = "< The address at which a pointer's memory may be accessed on the host"]
673    CU_POINTER_ATTRIBUTE_HOST_POINTER = 4,
674    #[doc = "< A pair of tokens for use with the nv-p2p.h Linux kernel interface"]
675    CU_POINTER_ATTRIBUTE_P2P_TOKENS = 5,
676    #[doc = "< Synchronize every synchronous memory operation initiated on this region"]
677    CU_POINTER_ATTRIBUTE_SYNC_MEMOPS = 6,
678    #[doc = "< A process-wide unique ID for an allocated memory region"]
679    CU_POINTER_ATTRIBUTE_BUFFER_ID = 7,
680    #[doc = "< Indicates if the pointer points to managed memory"]
681    CU_POINTER_ATTRIBUTE_IS_MANAGED = 8,
682    #[doc = "< A device ordinal of a device on which a pointer was allocated or registered"]
683    CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL = 9,
684    #[doc = "< 1 if this pointer maps to an allocation that is suitable for ::cudaIpcGetMemHandle, 0 otherwise"]
685    CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = 10,
686    #[doc = "< Starting address for this requested pointer"]
687    CU_POINTER_ATTRIBUTE_RANGE_START_ADDR = 11,
688    #[doc = "< Size of the address range for this requested pointer"]
689    CU_POINTER_ATTRIBUTE_RANGE_SIZE = 12,
690    #[doc = "< 1 if this pointer is in a valid address range that is mapped to a backing allocation, 0 otherwise"]
691    CU_POINTER_ATTRIBUTE_MAPPED = 13,
692    #[doc = "< Bitmask of allowed ::CUmemAllocationHandleType for this allocation"]
693    CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = 14,
694    #[doc = "< 1 if the memory this pointer is referencing can be used with the GPUDirect RDMA API"]
695    CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = 15,
696    #[doc = "< Returns the access flags the device associated with the current context has on the corresponding memory referenced by the pointer given"]
697    CU_POINTER_ATTRIBUTE_ACCESS_FLAGS = 16,
698    #[doc = "< Returns the mempool handle for the allocation if it was allocated from a mempool. Otherwise returns NULL."]
699    CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = 17,
700    #[doc = "< Size of the actual underlying mapping that the pointer belongs to"]
701    CU_POINTER_ATTRIBUTE_MAPPING_SIZE = 18,
702    #[doc = "< The start address of the mapping that the pointer belongs to"]
703    CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR = 19,
704    #[doc = "< A process-wide unique id corresponding to the physical allocation the pointer belongs to"]
705    CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID = 20,
706}
707#[doc = " Pointer information"]
708pub use self::CUpointer_attribute_enum as CUpointer_attribute;
709#[repr(u32)]
710#[doc = " Function properties"]
711#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
712pub enum CUfunction_attribute_enum {
713    #[doc = " The maximum number of threads per block, beyond which a launch of the\n function would fail. This number depends on both the function and the\n device on which the function is currently loaded."]
714    CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0,
715    #[doc = " The size in bytes of statically-allocated shared memory required by\n this function. This does not include dynamically-allocated shared\n memory requested by the user at runtime."]
716    CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1,
717    #[doc = " The size in bytes of user-allocated constant memory required by this\n function."]
718    CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2,
719    #[doc = " The size in bytes of local memory used by each thread of this function."]
720    CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3,
721    #[doc = " The number of registers used by each thread of this function."]
722    CU_FUNC_ATTRIBUTE_NUM_REGS = 4,
723    #[doc = " The PTX virtual architecture version for which the function was\n compiled. This value is the major PTX version * 10 + the minor PTX\n version, so a PTX version 1.3 function would return the value 13.\n Note that this may return the undefined value of 0 for cubins\n compiled prior to CUDA 3.0."]
724    CU_FUNC_ATTRIBUTE_PTX_VERSION = 5,
725    #[doc = " The binary architecture version for which the function was compiled.\n This value is the major binary version * 10 + the minor binary version,\n so a binary version 1.3 function would return the value 13. Note that\n this will return a value of 10 for legacy cubins that do not have a\n properly-encoded binary architecture version."]
726    CU_FUNC_ATTRIBUTE_BINARY_VERSION = 6,
727    #[doc = " The attribute to indicate whether the function has been compiled with\n user specified option \"-Xptxas --dlcm=ca\" set ."]
728    CU_FUNC_ATTRIBUTE_CACHE_MODE_CA = 7,
729    #[doc = " The maximum size in bytes of dynamically-allocated shared memory that can be used by\n this function. If the user-specified dynamic shared memory size is larger than this\n value, the launch will fail.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
730    CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = 8,
731    #[doc = " On devices where the L1 cache and shared memory use the same hardware resources,\n this sets the shared memory carveout preference, in percent of the total shared memory.\n Refer to ::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR.\n This is only a hint, and the driver can choose a different ratio if required to execute the function.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
732    CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 9,
733    #[doc = " If this attribute is set, the kernel must launch with a valid cluster\n size specified.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
734    CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET = 10,
735    #[doc = " The required cluster width in blocks. The values must either all be 0 or\n all be positive. The validity of the cluster dimensions is otherwise\n checked at launch time.\n\n If the value is set during compile time, it cannot be set at runtime.\n Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
736    CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH = 11,
737    #[doc = " The required cluster height in blocks. The values must either all be 0 or\n all be positive. The validity of the cluster dimensions is otherwise\n checked at launch time.\n\n If the value is set during compile time, it cannot be set at runtime.\n Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
738    CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT = 12,
739    #[doc = " The required cluster depth in blocks. The values must either all be 0 or\n all be positive. The validity of the cluster dimensions is otherwise\n checked at launch time.\n\n If the value is set during compile time, it cannot be set at runtime.\n Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
740    CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH = 13,
741    #[doc = " Whether the function can be launched with non-portable cluster size. 1 is\n allowed, 0 is disallowed. A non-portable cluster size may only function\n on the specific SKUs the program is tested on. The launch might fail if\n the program is run on a different hardware platform.\n\n CUDA API provides cudaOccupancyMaxActiveClusters to assist with checking\n whether the desired size can be launched on the current device.\n\n Portable Cluster Size\n\n A portable cluster size is guaranteed to be functional on all compute\n capabilities higher than the target compute capability. The portable\n cluster size for sm_90 is 8 blocks per cluster. This value may increase\n for future compute capabilities.\n\n The specific hardware unit may support higher cluster sizes that’s not\n guaranteed to be portable.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
742    CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED = 14,
743    #[doc = " The block scheduling policy of a function. The value type is\n CUclusterSchedulingPolicy / cudaClusterSchedulingPolicy.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
744    CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 15,
745    #[doc = " The block scheduling policy of a function. The value type is\n CUclusterSchedulingPolicy / cudaClusterSchedulingPolicy.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
746    CU_FUNC_ATTRIBUTE_MAX = 16,
747}
748#[doc = " Function properties"]
749pub use self::CUfunction_attribute_enum as CUfunction_attribute;
750#[repr(u32)]
751#[doc = " Function cache configurations"]
752#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
753pub enum CUfunc_cache_enum {
754    #[doc = "< no preference for shared memory or L1 (default)"]
755    CU_FUNC_CACHE_PREFER_NONE = 0,
756    #[doc = "< prefer larger shared memory and smaller L1 cache"]
757    CU_FUNC_CACHE_PREFER_SHARED = 1,
758    #[doc = "< prefer larger L1 cache and smaller shared memory"]
759    CU_FUNC_CACHE_PREFER_L1 = 2,
760    #[doc = "< prefer equal sized L1 cache and shared memory"]
761    CU_FUNC_CACHE_PREFER_EQUAL = 3,
762}
763#[doc = " Function cache configurations"]
764pub use self::CUfunc_cache_enum as CUfunc_cache;
765#[repr(u32)]
766#[doc = " Shared memory configurations"]
767#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
768pub enum CUsharedconfig_enum {
769    #[doc = "< set default shared memory bank size"]
770    CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = 0,
771    #[doc = "< set shared memory bank width to four bytes"]
772    CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = 1,
773    #[doc = "< set shared memory bank width to eight bytes"]
774    CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = 2,
775}
776#[doc = " Shared memory configurations"]
777pub use self::CUsharedconfig_enum as CUsharedconfig;
778#[repr(u32)]
779#[doc = " Memory types"]
780#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
781pub enum CUmemorytype_enum {
782    #[doc = "< Host memory"]
783    CU_MEMORYTYPE_HOST = 1,
784    #[doc = "< Device memory"]
785    CU_MEMORYTYPE_DEVICE = 2,
786    #[doc = "< Array memory"]
787    CU_MEMORYTYPE_ARRAY = 3,
788    #[doc = "< Unified device or host memory"]
789    CU_MEMORYTYPE_UNIFIED = 4,
790}
791#[doc = " Memory types"]
792pub use self::CUmemorytype_enum as CUmemorytype;
793#[repr(u32)]
794#[doc = " Memory advise values"]
795#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
796pub enum CUmem_advise_enum {
797    #[doc = "< Data will mostly be read and only occassionally be written to"]
798    CU_MEM_ADVISE_SET_READ_MOSTLY = 1,
799    #[doc = "< Undo the effect of ::CU_MEM_ADVISE_SET_READ_MOSTLY"]
800    CU_MEM_ADVISE_UNSET_READ_MOSTLY = 2,
801    #[doc = "< Set the preferred location for the data as the specified device"]
802    CU_MEM_ADVISE_SET_PREFERRED_LOCATION = 3,
803    #[doc = "< Clear the preferred location for the data"]
804    CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = 4,
805    #[doc = "< Data will be accessed by the specified device, so prevent page faults as much as possible"]
806    CU_MEM_ADVISE_SET_ACCESSED_BY = 5,
807    #[doc = "< Let the Unified Memory subsystem decide on the page faulting policy for the specified device"]
808    CU_MEM_ADVISE_UNSET_ACCESSED_BY = 6,
809}
810#[doc = " Memory advise values"]
811pub use self::CUmem_advise_enum as CUmem_advise;
812#[repr(u32)]
813#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
814pub enum CUmem_range_attribute_enum {
815    #[doc = "< Whether the range will mostly be read and only occassionally be written to"]
816    CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = 1,
817    #[doc = "< The preferred location of the range"]
818    CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = 2,
819    #[doc = "< Memory range has ::CU_MEM_ADVISE_SET_ACCESSED_BY set for specified device"]
820    CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = 3,
821    #[doc = "< The last location to which the range was prefetched"]
822    CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = 4,
823}
824pub use self::CUmem_range_attribute_enum as CUmem_range_attribute;
825#[repr(u32)]
826#[doc = " Online compiler and linker options"]
827#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
828pub enum CUjit_option_enum {
829    #[doc = " Max number of registers that a thread may use.\\n\n Option type: unsigned int\\n\n Applies to: compiler only"]
830    CU_JIT_MAX_REGISTERS = 0,
831    #[doc = " IN: Specifies minimum number of threads per block to target compilation\n for\\n\n OUT: Returns the number of threads the compiler actually targeted.\n This restricts the resource utilization fo the compiler (e.g. max\n registers) such that a block with the given number of threads should be\n able to launch based on register limitations. Note, this option does not\n currently take into account any other resource limitations, such as\n shared memory utilization.\\n\n Cannot be combined with ::CU_JIT_TARGET.\\n\n Option type: unsigned int\\n\n Applies to: compiler only"]
832    CU_JIT_THREADS_PER_BLOCK = 1,
833    #[doc = " Overwrites the option value with the total wall clock time, in\n milliseconds, spent in the compiler and linker\\n\n Option type: float\\n\n Applies to: compiler and linker"]
834    CU_JIT_WALL_TIME = 2,
835    #[doc = " Pointer to a buffer in which to print any log messages\n that are informational in nature (the buffer size is specified via\n option ::CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES)\\n\n Option type: char *\\n\n Applies to: compiler and linker"]
836    CU_JIT_INFO_LOG_BUFFER = 3,
837    #[doc = " IN: Log buffer size in bytes.  Log messages will be capped at this size\n (including null terminator)\\n\n OUT: Amount of log buffer filled with messages\\n\n Option type: unsigned int\\n\n Applies to: compiler and linker"]
838    CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES = 4,
839    #[doc = " Pointer to a buffer in which to print any log messages that\n reflect errors (the buffer size is specified via option\n ::CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES)\\n\n Option type: char *\\n\n Applies to: compiler and linker"]
840    CU_JIT_ERROR_LOG_BUFFER = 5,
841    #[doc = " IN: Log buffer size in bytes.  Log messages will be capped at this size\n (including null terminator)\\n\n OUT: Amount of log buffer filled with messages\\n\n Option type: unsigned int\\n\n Applies to: compiler and linker"]
842    CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = 6,
843    #[doc = " Level of optimizations to apply to generated code (0 - 4), with 4\n being the default and highest level of optimizations.\\n\n Option type: unsigned int\\n\n Applies to: compiler only"]
844    CU_JIT_OPTIMIZATION_LEVEL = 7,
845    #[doc = " No option value required. Determines the target based on the current\n attached context (default)\\n\n Option type: No option value needed\\n\n Applies to: compiler and linker"]
846    CU_JIT_TARGET_FROM_CUCONTEXT = 8,
847    #[doc = " Target is chosen based on supplied ::CUjit_target.  Cannot be\n combined with ::CU_JIT_THREADS_PER_BLOCK.\\n\n Option type: unsigned int for enumerated type ::CUjit_target\\n\n Applies to: compiler and linker"]
848    CU_JIT_TARGET = 9,
849    #[doc = " Specifies choice of fallback strategy if matching cubin is not found.\n Choice is based on supplied ::CUjit_fallback.  This option cannot be\n used with cuLink* APIs as the linker requires exact matches.\\n\n Option type: unsigned int for enumerated type ::CUjit_fallback\\n\n Applies to: compiler only"]
850    CU_JIT_FALLBACK_STRATEGY = 10,
851    #[doc = " Specifies whether to create debug information in output (-g)\n (0: false, default)\\n\n Option type: int\\n\n Applies to: compiler and linker"]
852    CU_JIT_GENERATE_DEBUG_INFO = 11,
853    #[doc = " Generate verbose log messages (0: false, default)\\n\n Option type: int\\n\n Applies to: compiler and linker"]
854    CU_JIT_LOG_VERBOSE = 12,
855    #[doc = " Generate line number information (-lineinfo) (0: false, default)\\n\n Option type: int\\n\n Applies to: compiler only"]
856    CU_JIT_GENERATE_LINE_INFO = 13,
857    #[doc = " Specifies whether to enable caching explicitly (-dlcm) \\n\n Choice is based on supplied ::CUjit_cacheMode_enum.\\n\n Option type: unsigned int for enumerated type ::CUjit_cacheMode_enum\\n\n Applies to: compiler only"]
858    CU_JIT_CACHE_MODE = 14,
859    #[doc = " \\deprecated\n This jit option is deprecated and should not be used."]
860    CU_JIT_NEW_SM3X_OPT = 15,
861    #[doc = " This jit option is used for internal purpose only."]
862    CU_JIT_FAST_COMPILE = 16,
863    #[doc = " Array of device symbol names that will be relocated to the corresponing\n host addresses stored in ::CU_JIT_GLOBAL_SYMBOL_ADDRESSES.\\n\n Must contain ::CU_JIT_GLOBAL_SYMBOL_COUNT entries.\\n\n When loding a device module, driver will relocate all encountered\n unresolved symbols to the host addresses.\\n\n It is only allowed to register symbols that correspond to unresolved\n global variables.\\n\n It is illegal to register the same device symbol at multiple addresses.\\n\n Option type: const char **\\n\n Applies to: dynamic linker only"]
864    CU_JIT_GLOBAL_SYMBOL_NAMES = 17,
865    #[doc = " Array of host addresses that will be used to relocate corresponding\n device symbols stored in ::CU_JIT_GLOBAL_SYMBOL_NAMES.\\n\n Must contain ::CU_JIT_GLOBAL_SYMBOL_COUNT entries.\\n\n Option type: void **\\n\n Applies to: dynamic linker only"]
866    CU_JIT_GLOBAL_SYMBOL_ADDRESSES = 18,
867    #[doc = " Number of entries in ::CU_JIT_GLOBAL_SYMBOL_NAMES and\n ::CU_JIT_GLOBAL_SYMBOL_ADDRESSES arrays.\\n\n Option type: unsigned int\\n\n Applies to: dynamic linker only"]
868    CU_JIT_GLOBAL_SYMBOL_COUNT = 19,
869    #[doc = " \\deprecated\n Enable link-time optimization (-dlto) for device code (Disabled by default).\\n\n This option is not supported on 32-bit platforms.\\n\n Option type: int\\n\n Applies to: compiler and linker\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
870    CU_JIT_LTO = 20,
871    #[doc = " \\deprecated\n Control single-precision denormals (-ftz) support (0: false, default).\n 1 : flushes denormal values to zero\n 0 : preserves denormal values\n Option type: int\\n\n Applies to: link-time optimization specified with CU_JIT_LTO\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
872    CU_JIT_FTZ = 21,
873    #[doc = " \\deprecated\n Control single-precision floating-point division and reciprocals\n (-prec-div) support (1: true, default).\n 1 : Enables the IEEE round-to-nearest mode\n 0 : Enables the fast approximation mode\n Option type: int\\n\n Applies to: link-time optimization specified with CU_JIT_LTO\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
874    CU_JIT_PREC_DIV = 22,
875    #[doc = " \\deprecated\n Control single-precision floating-point square root\n (-prec-sqrt) support (1: true, default).\n 1 : Enables the IEEE round-to-nearest mode\n 0 : Enables the fast approximation mode\n Option type: int\\n\n Applies to: link-time optimization specified with CU_JIT_LTO\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
876    CU_JIT_PREC_SQRT = 23,
877    #[doc = " \\deprecated\n Enable/Disable the contraction of floating-point multiplies\n and adds/subtracts into floating-point multiply-add (-fma)\n operations (1: Enable, default; 0: Disable).\n Option type: int\\n\n Applies to: link-time optimization specified with CU_JIT_LTO\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
878    CU_JIT_FMA = 24,
879    #[doc = " \\deprecated\n Array of kernel names that should be preserved at link time while others\n can be removed.\\n\n Must contain ::CU_JIT_REFERENCED_KERNEL_COUNT entries.\\n\n Note that kernel names can be mangled by the compiler in which case the\n mangled name needs to be specified.\\n\n Wildcard \"*\" can be used to represent zero or more characters instead of\n specifying the full or mangled name.\\n\n It is important to note that the wildcard \"*\" is also added implicitly.\n For example, specifying \"foo\" will match \"foobaz\", \"barfoo\", \"barfoobaz\" and\n thus preserve all kernels with those names. This can be avoided by providing\n a more specific name like \"barfoobaz\".\\n\n Option type: const char **\\n\n Applies to: dynamic linker only\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
880    CU_JIT_REFERENCED_KERNEL_NAMES = 25,
881    #[doc = " \\deprecated\n Number of entries in ::CU_JIT_REFERENCED_KERNEL_NAMES array.\\n\n Option type: unsigned int\\n\n Applies to: dynamic linker only\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
882    CU_JIT_REFERENCED_KERNEL_COUNT = 26,
883    #[doc = " \\deprecated\n Array of variable names (__device__ and/or __constant__) that should be\n preserved at link time while others can be removed.\\n\n Must contain ::CU_JIT_REFERENCED_VARIABLE_COUNT entries.\\n\n Note that variable names can be mangled by the compiler in which case the\n mangled name needs to be specified.\\n\n Wildcard \"*\" can be used to represent zero or more characters instead of\n specifying the full or mangled name.\\n\n It is important to note that the wildcard \"*\" is also added implicitly.\n For example, specifying \"foo\" will match \"foobaz\", \"barfoo\", \"barfoobaz\" and\n thus preserve all variables with those names. This can be avoided by providing\n a more specific name like \"barfoobaz\".\\n\n Option type: const char **\\n\n Applies to: link-time optimization specified with CU_JIT_LTO\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
884    CU_JIT_REFERENCED_VARIABLE_NAMES = 27,
885    #[doc = " \\deprecated\n Number of entries in ::CU_JIT_REFERENCED_VARIABLE_NAMES array.\\n\n Option type: unsigned int\\n\n Applies to: link-time optimization specified with CU_JIT_LTO\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
886    CU_JIT_REFERENCED_VARIABLE_COUNT = 28,
887    #[doc = " \\deprecated\n This option serves as a hint to enable the JIT compiler/linker\n to remove constant (__constant__) and device (__device__) variables\n unreferenced in device code (Disabled by default).\\n\n Note that host references to constant and device variables using APIs like\n ::cuModuleGetGlobal() with this option specified may result in undefined behavior unless\n the variables are explicitly specified using ::CU_JIT_REFERENCED_VARIABLE_NAMES.\\n\n Option type: int\\n\n Applies to: link-time optimization specified with CU_JIT_LTO\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
888    CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES = 29,
889    #[doc = " Generate position independent code (0: false)\\n\n Option type: int\\n\n Applies to: compiler only"]
890    CU_JIT_POSITION_INDEPENDENT_CODE = 30,
891    #[doc = " Generate position independent code (0: false)\\n\n Option type: int\\n\n Applies to: compiler only"]
892    CU_JIT_NUM_OPTIONS = 31,
893}
894#[doc = " Online compiler and linker options"]
895pub use self::CUjit_option_enum as CUjit_option;
896#[repr(u32)]
897#[doc = " Device code formats"]
898#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
899pub enum CUjitInputType_enum {
900    #[doc = " Compiled device-class-specific device code\\n\n Applicable options: none"]
901    CU_JIT_INPUT_CUBIN = 0,
902    #[doc = " PTX source code\\n\n Applicable options: PTX compiler options"]
903    CU_JIT_INPUT_PTX = 1,
904    #[doc = " Bundle of multiple cubins and/or PTX of some device code\\n\n Applicable options: PTX compiler options, ::CU_JIT_FALLBACK_STRATEGY"]
905    CU_JIT_INPUT_FATBINARY = 2,
906    #[doc = " Host object with embedded device code\\n\n Applicable options: PTX compiler options, ::CU_JIT_FALLBACK_STRATEGY"]
907    CU_JIT_INPUT_OBJECT = 3,
908    #[doc = " Archive of host objects with embedded device code\\n\n Applicable options: PTX compiler options, ::CU_JIT_FALLBACK_STRATEGY"]
909    CU_JIT_INPUT_LIBRARY = 4,
910    #[doc = " \\deprecated\n High-level intermediate code for link-time optimization\\n\n Applicable options: NVVM compiler options, PTX compiler options\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
911    CU_JIT_INPUT_NVVM = 5,
912    #[doc = " \\deprecated\n High-level intermediate code for link-time optimization\\n\n Applicable options: NVVM compiler options, PTX compiler options\n\n Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0"]
913    CU_JIT_NUM_INPUT_TYPES = 6,
914}
915#[doc = " Device code formats"]
916pub use self::CUjitInputType_enum as CUjitInputType;
917#[repr(C)]
918#[derive(Debug, Copy, Clone)]
919pub struct CUlinkState_st {
920    _unused: [u8; 0],
921}
922pub type CUlinkState = *mut CUlinkState_st;
923#[repr(u32)]
924#[doc = " Limits"]
925#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
926pub enum CUlimit_enum {
927    #[doc = "< GPU thread stack size"]
928    CU_LIMIT_STACK_SIZE = 0,
929    #[doc = "< GPU printf FIFO size"]
930    CU_LIMIT_PRINTF_FIFO_SIZE = 1,
931    #[doc = "< GPU malloc heap size"]
932    CU_LIMIT_MALLOC_HEAP_SIZE = 2,
933    #[doc = "< GPU device runtime launch synchronize depth"]
934    CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = 3,
935    #[doc = "< GPU device runtime pending launch count"]
936    CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = 4,
937    #[doc = "< A value between 0 and 128 that indicates the maximum fetch granularity of L2 (in Bytes). This is a hint"]
938    CU_LIMIT_MAX_L2_FETCH_GRANULARITY = 5,
939    #[doc = "< A size in bytes for L2 persisting lines cache size"]
940    CU_LIMIT_PERSISTING_L2_CACHE_SIZE = 6,
941    CU_LIMIT_MAX = 7,
942}
943#[doc = " Limits"]
944pub use self::CUlimit_enum as CUlimit;
945#[repr(u32)]
946#[doc = " Resource types"]
947#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
948pub enum CUresourcetype_enum {
949    #[doc = "< Array resoure"]
950    CU_RESOURCE_TYPE_ARRAY = 0,
951    #[doc = "< Mipmapped array resource"]
952    CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 1,
953    #[doc = "< Linear resource"]
954    CU_RESOURCE_TYPE_LINEAR = 2,
955    #[doc = "< Pitch 2D resource"]
956    CU_RESOURCE_TYPE_PITCH2D = 3,
957}
958#[doc = " Resource types"]
959pub use self::CUresourcetype_enum as CUresourcetype;
960#[doc = " CUDA host function\n \\param userData Argument value passed to the function"]
961pub type CUhostFn =
962    ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void)>;
963#[repr(u32)]
964#[doc = " Specifies performance hint with ::CUaccessPolicyWindow for hitProp and missProp members."]
965#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
966pub enum CUaccessProperty_enum {
967    #[doc = "< Normal cache persistence."]
968    CU_ACCESS_PROPERTY_NORMAL = 0,
969    #[doc = "< Streaming access is less likely to persit from cache."]
970    CU_ACCESS_PROPERTY_STREAMING = 1,
971    #[doc = "< Persisting access is more likely to persist in cache."]
972    CU_ACCESS_PROPERTY_PERSISTING = 2,
973}
974#[doc = " Specifies performance hint with ::CUaccessPolicyWindow for hitProp and missProp members."]
975pub use self::CUaccessProperty_enum as CUaccessProperty;
976#[doc = " Specifies an access policy for a window, a contiguous extent of memory\n beginning at base_ptr and ending at base_ptr + num_bytes.\n num_bytes is limited by CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE.\n Partition into many segments and assign segments such that:\n sum of \"hit segments\" / window == approx. ratio.\n sum of \"miss segments\" / window == approx 1-ratio.\n Segments and ratio specifications are fitted to the capabilities of\n the architecture.\n Accesses in a hit segment apply the hitProp access policy.\n Accesses in a miss segment apply the missProp access policy."]
977#[repr(C)]
978#[derive(Debug, Copy, Clone)]
979pub struct CUaccessPolicyWindow_st {
980    #[doc = "< Starting address of the access policy window. CUDA driver may align it."]
981    pub base_ptr: *mut ::std::os::raw::c_void,
982    #[doc = "< Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment."]
983    pub num_bytes: usize,
984    #[doc = "< hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp."]
985    pub hitRatio: f32,
986    #[doc = "< ::CUaccessProperty set for hit."]
987    pub hitProp: CUaccessProperty,
988    #[doc = "< ::CUaccessProperty set for miss. Must be either NORMAL or STREAMING"]
989    pub missProp: CUaccessProperty,
990}
991#[doc = " Specifies an access policy for a window, a contiguous extent of memory\n beginning at base_ptr and ending at base_ptr + num_bytes.\n num_bytes is limited by CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE.\n Partition into many segments and assign segments such that:\n sum of \"hit segments\" / window == approx. ratio.\n sum of \"miss segments\" / window == approx 1-ratio.\n Segments and ratio specifications are fitted to the capabilities of\n the architecture.\n Accesses in a hit segment apply the hitProp access policy.\n Accesses in a miss segment apply the missProp access policy."]
992pub type CUaccessPolicyWindow_v1 = CUaccessPolicyWindow_st;
993#[doc = " Access policy window"]
994pub type CUaccessPolicyWindow = CUaccessPolicyWindow_v1;
995#[doc = " GPU kernel node parameters"]
996#[repr(C)]
997#[derive(Debug, Copy, Clone)]
998pub struct CUDA_KERNEL_NODE_PARAMS_v2_st {
999    #[doc = "< Kernel to launch"]
1000    pub func: CUfunction,
1001    #[doc = "< Width of grid in blocks"]
1002    pub gridDimX: ::std::os::raw::c_uint,
1003    #[doc = "< Height of grid in blocks"]
1004    pub gridDimY: ::std::os::raw::c_uint,
1005    #[doc = "< Depth of grid in blocks"]
1006    pub gridDimZ: ::std::os::raw::c_uint,
1007    #[doc = "< X dimension of each thread block"]
1008    pub blockDimX: ::std::os::raw::c_uint,
1009    #[doc = "< Y dimension of each thread block"]
1010    pub blockDimY: ::std::os::raw::c_uint,
1011    #[doc = "< Z dimension of each thread block"]
1012    pub blockDimZ: ::std::os::raw::c_uint,
1013    #[doc = "< Dynamic shared-memory size per thread block in bytes"]
1014    pub sharedMemBytes: ::std::os::raw::c_uint,
1015    #[doc = "< Array of pointers to kernel parameters"]
1016    pub kernelParams: *mut *mut ::std::os::raw::c_void,
1017    #[doc = "< Extra options"]
1018    pub extra: *mut *mut ::std::os::raw::c_void,
1019    #[doc = "< Kernel to launch, will only be referenced if func is NULL"]
1020    pub kern: CUkernel,
1021    #[doc = "< 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."]
1022    pub ctx: CUcontext,
1023}
1024#[doc = " GPU kernel node parameters"]
1025pub type CUDA_KERNEL_NODE_PARAMS_v2 = CUDA_KERNEL_NODE_PARAMS_v2_st;
1026#[doc = " GPU kernel node parameters"]
1027pub type CUDA_KERNEL_NODE_PARAMS = CUDA_KERNEL_NODE_PARAMS_v2;
1028#[doc = " Memset node parameters"]
1029#[repr(C)]
1030#[derive(Debug, Copy, Clone)]
1031pub struct CUDA_MEMSET_NODE_PARAMS_st {
1032    #[doc = "< Destination device pointer"]
1033    pub dst: CUdeviceptr,
1034    #[doc = "< Pitch of destination device pointer. Unused if height is 1"]
1035    pub pitch: usize,
1036    #[doc = "< Value to be set"]
1037    pub value: ::std::os::raw::c_uint,
1038    #[doc = "< Size of each element in bytes. Must be 1, 2, or 4."]
1039    pub elementSize: ::std::os::raw::c_uint,
1040    #[doc = "< Width of the row in elements"]
1041    pub width: usize,
1042    #[doc = "< Number of rows"]
1043    pub height: usize,
1044}
1045#[doc = " Memset node parameters"]
1046pub type CUDA_MEMSET_NODE_PARAMS_v1 = CUDA_MEMSET_NODE_PARAMS_st;
1047#[doc = " Memset node parameters"]
1048pub type CUDA_MEMSET_NODE_PARAMS = CUDA_MEMSET_NODE_PARAMS_v1;
1049#[doc = " Host node parameters"]
1050#[repr(C)]
1051#[derive(Debug, Copy, Clone)]
1052pub struct CUDA_HOST_NODE_PARAMS_st {
1053    #[doc = "< The function to call when the node executes"]
1054    pub fn_: CUhostFn,
1055    #[doc = "< Argument to pass to the function"]
1056    pub userData: *mut ::std::os::raw::c_void,
1057}
1058#[doc = " Host node parameters"]
1059pub type CUDA_HOST_NODE_PARAMS_v1 = CUDA_HOST_NODE_PARAMS_st;
1060#[doc = " Host node parameters"]
1061pub type CUDA_HOST_NODE_PARAMS = CUDA_HOST_NODE_PARAMS_v1;
1062#[repr(u32)]
1063#[doc = " Graph node types"]
1064#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1065pub enum CUgraphNodeType_enum {
1066    #[doc = "< GPU kernel node"]
1067    CU_GRAPH_NODE_TYPE_KERNEL = 0,
1068    #[doc = "< Memcpy node"]
1069    CU_GRAPH_NODE_TYPE_MEMCPY = 1,
1070    #[doc = "< Memset node"]
1071    CU_GRAPH_NODE_TYPE_MEMSET = 2,
1072    #[doc = "< Host (executable) node"]
1073    CU_GRAPH_NODE_TYPE_HOST = 3,
1074    #[doc = "< Node which executes an embedded graph"]
1075    CU_GRAPH_NODE_TYPE_GRAPH = 4,
1076    #[doc = "< Empty (no-op) node"]
1077    CU_GRAPH_NODE_TYPE_EMPTY = 5,
1078    #[doc = "< External event wait node"]
1079    CU_GRAPH_NODE_TYPE_WAIT_EVENT = 6,
1080    #[doc = "< External event record node"]
1081    CU_GRAPH_NODE_TYPE_EVENT_RECORD = 7,
1082    #[doc = "< External semaphore signal node"]
1083    CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = 8,
1084    #[doc = "< External semaphore wait node"]
1085    CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = 9,
1086    #[doc = "< Memory Allocation Node"]
1087    CU_GRAPH_NODE_TYPE_MEM_ALLOC = 10,
1088    #[doc = "< Memory Free Node"]
1089    CU_GRAPH_NODE_TYPE_MEM_FREE = 11,
1090    #[doc = "< Batch MemOp Node"]
1091    CU_GRAPH_NODE_TYPE_BATCH_MEM_OP = 12,
1092}
1093#[doc = " Graph node types"]
1094pub use self::CUgraphNodeType_enum as CUgraphNodeType;
1095#[repr(u32)]
1096#[doc = " Graph instantiation results"]
1097#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1098pub enum CUgraphInstantiateResult_enum {
1099    #[doc = "< Instantiation succeeded"]
1100    CUDA_GRAPH_INSTANTIATE_SUCCESS = 0,
1101    #[doc = "< Instantiation failed for an unexpected reason which is described in the return value of the function"]
1102    CUDA_GRAPH_INSTANTIATE_ERROR = 1,
1103    #[doc = "< Instantiation failed due to invalid structure, such as cycles"]
1104    CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE = 2,
1105    #[doc = "< Instantiation for device launch failed because the graph contained an unsupported operation"]
1106    CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED = 3,
1107    #[doc = "< Instantiation for device launch failed due to the nodes belonging to different contexts"]
1108    CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED = 4,
1109}
1110#[doc = " Graph instantiation results"]
1111pub use self::CUgraphInstantiateResult_enum as CUgraphInstantiateResult;
1112#[doc = " Graph instantiation parameters"]
1113#[repr(C)]
1114#[derive(Debug, Copy, Clone)]
1115pub struct CUDA_GRAPH_INSTANTIATE_PARAMS_st {
1116    #[doc = "< Instantiation flags"]
1117    pub flags: cuuint64_t,
1118    #[doc = "< Upload stream"]
1119    pub hUploadStream: CUstream,
1120    #[doc = "< The node which caused instantiation to fail, if any"]
1121    pub hErrNode_out: CUgraphNode,
1122    #[doc = "< Whether instantiation was successful.  If it failed, the reason why"]
1123    pub result_out: CUgraphInstantiateResult,
1124}
1125#[doc = " Graph instantiation parameters"]
1126pub type CUDA_GRAPH_INSTANTIATE_PARAMS = CUDA_GRAPH_INSTANTIATE_PARAMS_st;
1127#[repr(u32)]
1128#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1129pub enum CUsynchronizationPolicy_enum {
1130    CU_SYNC_POLICY_AUTO = 1,
1131    CU_SYNC_POLICY_SPIN = 2,
1132    CU_SYNC_POLICY_YIELD = 3,
1133    CU_SYNC_POLICY_BLOCKING_SYNC = 4,
1134}
1135pub use self::CUsynchronizationPolicy_enum as CUsynchronizationPolicy;
1136#[repr(u32)]
1137#[doc = " Cluster scheduling policies. These may be passed to ::cuFuncSetAttribute or ::cuKernelSetAttribute"]
1138#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1139pub enum CUclusterSchedulingPolicy_enum {
1140    #[doc = "< the default policy"]
1141    CU_CLUSTER_SCHEDULING_POLICY_DEFAULT = 0,
1142    #[doc = "< spread the blocks within a cluster to the SMs"]
1143    CU_CLUSTER_SCHEDULING_POLICY_SPREAD = 1,
1144    #[doc = "< allow the hardware to load-balance the blocks in a cluster to the SMs"]
1145    CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING = 2,
1146}
1147#[doc = " Cluster scheduling policies. These may be passed to ::cuFuncSetAttribute or ::cuKernelSetAttribute"]
1148pub use self::CUclusterSchedulingPolicy_enum as CUclusterSchedulingPolicy;
1149#[repr(u32)]
1150#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1151pub enum CUlaunchMemSyncDomain_enum {
1152    CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT = 0,
1153    CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE = 1,
1154}
1155pub use self::CUlaunchMemSyncDomain_enum as CUlaunchMemSyncDomain;
1156#[repr(C)]
1157#[derive(Debug, Copy, Clone)]
1158pub struct CUlaunchMemSyncDomainMap_st {
1159    pub default_: ::std::os::raw::c_uchar,
1160    pub remote: ::std::os::raw::c_uchar,
1161}
1162pub type CUlaunchMemSyncDomainMap = CUlaunchMemSyncDomainMap_st;
1163#[repr(u32)]
1164#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1165pub enum CUlaunchAttributeID_enum {
1166    #[doc = "< Ignored entry, for convenient composition"]
1167    CU_LAUNCH_ATTRIBUTE_IGNORE = 0,
1168    #[doc = "< Valid for streams, graph nodes, launches."]
1169    CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1,
1170    #[doc = "< Valid for graph nodes, launches."]
1171    CU_LAUNCH_ATTRIBUTE_COOPERATIVE = 2,
1172    #[doc = "< Valid for streams."]
1173    CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3,
1174    #[doc = "< Valid for graph nodes, launches."]
1175    CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = 4,
1176    #[doc = "< Valid for graph nodes, launches."]
1177    CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5,
1178    #[doc = "< Valid for launches. Setting\nprogrammaticStreamSerializationAllowed to non-0\nsignals that the kernel will use programmatic\nmeans to resolve its stream dependency, so that\nthe CUDA runtime should opportunistically allow\nthe grid's execution to overlap with the previous\nkernel in the stream, if that kernel requests the\noverlap. The dependent launches can choose to wait\non the dependency using the programmatic sync\n(cudaGridDependencySynchronize() or equivalent PTX\ninstructions)."]
1179    CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = 6,
1180    #[doc = "< Valid for launches. Event recorded through this\nlaunch attribute is guaranteed to only trigger\nafter all block in the associated kernel trigger\nthe event. A block can trigger the event through\nPTX launchdep.release or CUDA builtin function\ncudaTriggerProgrammaticLaunchCompletion(). A\ntrigger can also be inserted at the beginning of\neach block's execution if triggerAtBlockStart is\nset to non-0. The dependent launches can choose to\nwait on the dependency using the programmatic sync\n(cudaGridDependencySynchronize() or equivalent PTX\ninstructions). Note that dependents (including the\nCPU thread calling cuEventSynchronize()) are not\nguaranteed to observe the release precisely when\nit is released.  For example, cuEventSynchronize()\nmay only observe the event trigger long after the\nassociated kernel has completed. This recording\ntype is primarily meant for establishing\nprogrammatic dependency between device tasks. The\nevent supplied must not be an interprocess or\ninterop event. The event must disable timing (i.e.\ncreated with ::CU_EVENT_DISABLE_TIMING flag set)."]
1181    CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = 7,
1182    #[doc = "< Valid for streams, graph nodes, launches."]
1183    CU_LAUNCH_ATTRIBUTE_PRIORITY = 8,
1184    CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9,
1185    CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = 10,
1186}
1187pub use self::CUlaunchAttributeID_enum as CUlaunchAttributeID;
1188#[repr(C)]
1189#[derive(Copy, Clone)]
1190pub union CUlaunchAttributeValue_union {
1191    #[doc = "< Pad to 64 bytes"]
1192    pub pad: [::std::os::raw::c_char; 64usize],
1193    #[doc = "< Attribute ::CUaccessPolicyWindow."]
1194    pub accessPolicyWindow: CUaccessPolicyWindow,
1195    #[doc = "< Nonzero indicates a cooperative kernel (see ::cuLaunchCooperativeKernel)."]
1196    pub cooperative: ::std::os::raw::c_int,
1197    #[doc = "< ::CUsynchronizationPolicy for work queued up in this stream"]
1198    pub syncPolicy: CUsynchronizationPolicy,
1199    #[doc = "< Cluster dimensions for the kernel node."]
1200    pub clusterDim: CUlaunchAttributeValue_union__bindgen_ty_1,
1201    #[doc = "< Cluster scheduling policy preference for the kernel node."]
1202    pub clusterSchedulingPolicyPreference: CUclusterSchedulingPolicy,
1203    pub programmaticStreamSerializationAllowed: ::std::os::raw::c_int,
1204    pub programmaticEvent: CUlaunchAttributeValue_union__bindgen_ty_2,
1205    #[doc = "< Execution priority of the kernel."]
1206    pub priority: ::std::os::raw::c_int,
1207    pub memSyncDomainMap: CUlaunchMemSyncDomainMap,
1208    pub memSyncDomain: CUlaunchMemSyncDomain,
1209}
1210#[repr(C)]
1211#[derive(Debug, Copy, Clone)]
1212pub struct CUlaunchAttributeValue_union__bindgen_ty_1 {
1213    pub x: ::std::os::raw::c_uint,
1214    pub y: ::std::os::raw::c_uint,
1215    pub z: ::std::os::raw::c_uint,
1216}
1217#[repr(C)]
1218#[derive(Debug, Copy, Clone)]
1219pub struct CUlaunchAttributeValue_union__bindgen_ty_2 {
1220    pub event: CUevent,
1221    pub flags: ::std::os::raw::c_int,
1222    pub triggerAtBlockStart: ::std::os::raw::c_int,
1223}
1224pub type CUlaunchAttributeValue = CUlaunchAttributeValue_union;
1225#[repr(C)]
1226#[derive(Copy, Clone)]
1227pub struct CUlaunchAttribute_st {
1228    pub id: CUlaunchAttributeID,
1229    pub pad: [::std::os::raw::c_char; 4usize],
1230    pub value: CUlaunchAttributeValue,
1231}
1232pub type CUlaunchAttribute = CUlaunchAttribute_st;
1233#[repr(C)]
1234#[derive(Debug, Copy, Clone)]
1235pub struct CUlaunchConfig_st {
1236    #[doc = "< Width of grid in blocks"]
1237    pub gridDimX: ::std::os::raw::c_uint,
1238    #[doc = "< Height of grid in blocks"]
1239    pub gridDimY: ::std::os::raw::c_uint,
1240    #[doc = "< Depth of grid in blocks"]
1241    pub gridDimZ: ::std::os::raw::c_uint,
1242    #[doc = "< X dimension of each thread block"]
1243    pub blockDimX: ::std::os::raw::c_uint,
1244    #[doc = "< Y dimension of each thread block"]
1245    pub blockDimY: ::std::os::raw::c_uint,
1246    #[doc = "< Z dimension of each thread block"]
1247    pub blockDimZ: ::std::os::raw::c_uint,
1248    #[doc = "< Dynamic shared-memory size per thread block in bytes"]
1249    pub sharedMemBytes: ::std::os::raw::c_uint,
1250    #[doc = "< Stream identifier"]
1251    pub hStream: CUstream,
1252    #[doc = "< nullable if numAttrs == 0"]
1253    pub attrs: *mut CUlaunchAttribute,
1254    #[doc = "< number of attributes populated in attrs"]
1255    pub numAttrs: ::std::os::raw::c_uint,
1256}
1257pub type CUlaunchConfig = CUlaunchConfig_st;
1258#[doc = " Graph kernel node Attributes"]
1259pub use self::CUlaunchAttributeID as CUkernelNodeAttrID;
1260#[doc = " Graph kernel node attributes union, used with ::cuKernelNodeSetAttribute/::cuKernelNodeGetAttribute"]
1261pub type CUkernelNodeAttrValue_v1 = CUlaunchAttributeValue;
1262pub type CUkernelNodeAttrValue = CUkernelNodeAttrValue_v1;
1263#[repr(u32)]
1264#[doc = " Possible stream capture statuses returned by ::cuStreamIsCapturing"]
1265#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1266pub enum CUstreamCaptureStatus_enum {
1267    #[doc = "< Stream is not capturing"]
1268    CU_STREAM_CAPTURE_STATUS_NONE = 0,
1269    #[doc = "< Stream is actively capturing"]
1270    CU_STREAM_CAPTURE_STATUS_ACTIVE = 1,
1271    #[doc = "< Stream is part of a capture sequence that\nhas been invalidated, but not terminated"]
1272    CU_STREAM_CAPTURE_STATUS_INVALIDATED = 2,
1273}
1274#[doc = " Possible stream capture statuses returned by ::cuStreamIsCapturing"]
1275pub use self::CUstreamCaptureStatus_enum as CUstreamCaptureStatus;
1276#[repr(u32)]
1277#[doc = " Possible modes for stream capture thread interactions. For more details see\n ::cuStreamBeginCapture and ::cuThreadExchangeStreamCaptureMode"]
1278#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1279pub enum CUstreamCaptureMode_enum {
1280    CU_STREAM_CAPTURE_MODE_GLOBAL = 0,
1281    CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = 1,
1282    CU_STREAM_CAPTURE_MODE_RELAXED = 2,
1283}
1284#[doc = " Stream Attributes"]
1285pub use self::CUlaunchAttributeID as CUstreamAttrID;
1286#[doc = " Possible modes for stream capture thread interactions. For more details see\n ::cuStreamBeginCapture and ::cuThreadExchangeStreamCaptureMode"]
1287pub use self::CUstreamCaptureMode_enum as CUstreamCaptureMode;
1288#[doc = " Stream attributes union, used with ::cuStreamSetAttribute/::cuStreamGetAttribute"]
1289pub type CUstreamAttrValue_v1 = CUlaunchAttributeValue;
1290pub type CUstreamAttrValue = CUstreamAttrValue_v1;
1291#[repr(u32)]
1292#[doc = " Flags to indicate search status. For more details see ::cuGetProcAddress"]
1293#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1294pub enum CUdriverProcAddressQueryResult_enum {
1295    #[doc = "< Symbol was succesfully found"]
1296    CU_GET_PROC_ADDRESS_SUCCESS = 0,
1297    #[doc = "< Symbol was not found in search"]
1298    CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND = 1,
1299    #[doc = "< Symbol was found but version supplied was not sufficient"]
1300    CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT = 2,
1301}
1302#[doc = " Flags to indicate search status. For more details see ::cuGetProcAddress"]
1303pub use self::CUdriverProcAddressQueryResult_enum as CUdriverProcAddressQueryResult;
1304#[repr(u32)]
1305#[doc = " Execution Affinity Types"]
1306#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1307pub enum CUexecAffinityType_enum {
1308    #[doc = "< Create a context with limited SMs."]
1309    CU_EXEC_AFFINITY_TYPE_SM_COUNT = 0,
1310    CU_EXEC_AFFINITY_TYPE_MAX = 1,
1311}
1312#[doc = " Execution Affinity Types"]
1313pub use self::CUexecAffinityType_enum as CUexecAffinityType;
1314#[doc = " Value for ::CU_EXEC_AFFINITY_TYPE_SM_COUNT"]
1315#[repr(C)]
1316#[derive(Debug, Copy, Clone)]
1317pub struct CUexecAffinitySmCount_st {
1318    #[doc = "< The number of SMs the context is limited to use."]
1319    pub val: ::std::os::raw::c_uint,
1320}
1321#[doc = " Value for ::CU_EXEC_AFFINITY_TYPE_SM_COUNT"]
1322pub type CUexecAffinitySmCount_v1 = CUexecAffinitySmCount_st;
1323#[doc = " Value for ::CU_EXEC_AFFINITY_TYPE_SM_COUNT"]
1324pub type CUexecAffinitySmCount = CUexecAffinitySmCount_v1;
1325#[doc = " Execution Affinity Parameters"]
1326#[repr(C)]
1327#[derive(Copy, Clone)]
1328pub struct CUexecAffinityParam_st {
1329    pub type_: CUexecAffinityType,
1330    pub param: CUexecAffinityParam_st__bindgen_ty_1,
1331}
1332#[repr(C)]
1333#[derive(Copy, Clone)]
1334pub union CUexecAffinityParam_st__bindgen_ty_1 {
1335    pub smCount: CUexecAffinitySmCount,
1336}
1337#[doc = " Execution Affinity Parameters"]
1338pub type CUexecAffinityParam_v1 = CUexecAffinityParam_st;
1339#[doc = " Execution Affinity Parameters"]
1340pub type CUexecAffinityParam = CUexecAffinityParam_v1;
1341#[repr(u32)]
1342#[doc = " Library options to be specified with ::cuLibraryLoadData() or ::cuLibraryLoadFromFile()"]
1343#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1344pub enum CUlibraryOption_enum {
1345    CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE = 0,
1346    #[doc = " Specifes that the argument \\p code passed to ::cuLibraryLoadData() will be preserved.\n Specifying this option will let the driver know that \\p code can be accessed at any point\n until ::cuLibraryUnload(). The default behavior is for the driver to allocate and\n maintain its own copy of \\p code. Note that this is only a memory usage optimization\n hint and the driver can choose to ignore it if required.\n Specifying this option with ::cuLibraryLoadFromFile() is invalid and\n will return ::CUDA_ERROR_INVALID_VALUE."]
1347    CU_LIBRARY_BINARY_IS_PRESERVED = 1,
1348    #[doc = " Specifes that the argument \\p code passed to ::cuLibraryLoadData() will be preserved.\n Specifying this option will let the driver know that \\p code can be accessed at any point\n until ::cuLibraryUnload(). The default behavior is for the driver to allocate and\n maintain its own copy of \\p code. Note that this is only a memory usage optimization\n hint and the driver can choose to ignore it if required.\n Specifying this option with ::cuLibraryLoadFromFile() is invalid and\n will return ::CUDA_ERROR_INVALID_VALUE."]
1349    CU_LIBRARY_NUM_OPTIONS = 2,
1350}
1351#[doc = " Library options to be specified with ::cuLibraryLoadData() or ::cuLibraryLoadFromFile()"]
1352pub use self::CUlibraryOption_enum as CUlibraryOption;
1353#[repr(u32)]
1354#[doc = " Error codes"]
1355#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1356pub enum cudaError_enum {
1357    #[doc = " The API call returned with no errors. In the case of query calls, this\n also means that the operation being queried is complete (see\n ::cuEventQuery() and ::cuStreamQuery())."]
1358    CUDA_SUCCESS = 0,
1359    #[doc = " This indicates that one or more of the parameters passed to the API call\n is not within an acceptable range of values."]
1360    CUDA_ERROR_INVALID_VALUE = 1,
1361    #[doc = " The API call failed because it was unable to allocate enough memory to\n perform the requested operation."]
1362    CUDA_ERROR_OUT_OF_MEMORY = 2,
1363    #[doc = " This indicates that the CUDA driver has not been initialized with\n ::cuInit() or that initialization has failed."]
1364    CUDA_ERROR_NOT_INITIALIZED = 3,
1365    #[doc = " This indicates that the CUDA driver is in the process of shutting down."]
1366    CUDA_ERROR_DEINITIALIZED = 4,
1367    #[doc = " This indicates profiler is not initialized for this run. This can\n happen when the application is running with external profiling tools\n like visual profiler."]
1368    CUDA_ERROR_PROFILER_DISABLED = 5,
1369    #[doc = " \\deprecated\n This error return is deprecated as of CUDA 5.0. It is no longer an error\n to attempt to enable/disable the profiling via ::cuProfilerStart or\n ::cuProfilerStop without initialization."]
1370    CUDA_ERROR_PROFILER_NOT_INITIALIZED = 6,
1371    #[doc = " \\deprecated\n This error return is deprecated as of CUDA 5.0. It is no longer an error\n to call cuProfilerStart() when profiling is already enabled."]
1372    CUDA_ERROR_PROFILER_ALREADY_STARTED = 7,
1373    #[doc = " \\deprecated\n This error return is deprecated as of CUDA 5.0. It is no longer an error\n to call cuProfilerStop() when profiling is already disabled."]
1374    CUDA_ERROR_PROFILER_ALREADY_STOPPED = 8,
1375    #[doc = " This indicates that the CUDA driver that the application has loaded is a\n stub library. Applications that run with the stub rather than a real\n driver loaded will result in CUDA API returning this error."]
1376    CUDA_ERROR_STUB_LIBRARY = 34,
1377    #[doc = " This indicates that requested CUDA device is unavailable at the current\n time. Devices are often unavailable due to use of\n ::CU_COMPUTEMODE_EXCLUSIVE_PROCESS or ::CU_COMPUTEMODE_PROHIBITED."]
1378    CUDA_ERROR_DEVICE_UNAVAILABLE = 46,
1379    #[doc = " This indicates that no CUDA-capable devices were detected by the installed\n CUDA driver."]
1380    CUDA_ERROR_NO_DEVICE = 100,
1381    #[doc = " This indicates that the device ordinal supplied by the user does not\n correspond to a valid CUDA device or that the action requested is\n invalid for the specified device."]
1382    CUDA_ERROR_INVALID_DEVICE = 101,
1383    #[doc = " This error indicates that the Grid license is not applied."]
1384    CUDA_ERROR_DEVICE_NOT_LICENSED = 102,
1385    #[doc = " This indicates that the device kernel image is invalid. This can also\n indicate an invalid CUDA module."]
1386    CUDA_ERROR_INVALID_IMAGE = 200,
1387    #[doc = " This most frequently indicates that there is no context bound to the\n current thread. This can also be returned if the context passed to an\n API call is not a valid handle (such as a context that has had\n ::cuCtxDestroy() invoked on it). This can also be returned if a user\n mixes different API versions (i.e. 3010 context with 3020 API calls).\n See ::cuCtxGetApiVersion() for more details."]
1388    CUDA_ERROR_INVALID_CONTEXT = 201,
1389    #[doc = " This indicated that the context being supplied as a parameter to the\n API call was already the active context.\n \\deprecated\n This error return is deprecated as of CUDA 3.2. It is no longer an\n error to attempt to push the active context via ::cuCtxPushCurrent()."]
1390    CUDA_ERROR_CONTEXT_ALREADY_CURRENT = 202,
1391    #[doc = " This indicates that a map or register operation has failed."]
1392    CUDA_ERROR_MAP_FAILED = 205,
1393    #[doc = " This indicates that an unmap or unregister operation has failed."]
1394    CUDA_ERROR_UNMAP_FAILED = 206,
1395    #[doc = " This indicates that the specified array is currently mapped and thus\n cannot be destroyed."]
1396    CUDA_ERROR_ARRAY_IS_MAPPED = 207,
1397    #[doc = " This indicates that the resource is already mapped."]
1398    CUDA_ERROR_ALREADY_MAPPED = 208,
1399    #[doc = " This indicates that there is no kernel image available that is suitable\n for the device. This can occur when a user specifies code generation\n options for a particular CUDA source file that do not include the\n corresponding device configuration."]
1400    CUDA_ERROR_NO_BINARY_FOR_GPU = 209,
1401    #[doc = " This indicates that a resource has already been acquired."]
1402    CUDA_ERROR_ALREADY_ACQUIRED = 210,
1403    #[doc = " This indicates that a resource is not mapped."]
1404    CUDA_ERROR_NOT_MAPPED = 211,
1405    #[doc = " This indicates that a mapped resource is not available for access as an\n array."]
1406    CUDA_ERROR_NOT_MAPPED_AS_ARRAY = 212,
1407    #[doc = " This indicates that a mapped resource is not available for access as a\n pointer."]
1408    CUDA_ERROR_NOT_MAPPED_AS_POINTER = 213,
1409    #[doc = " This indicates that an uncorrectable ECC error was detected during\n execution."]
1410    CUDA_ERROR_ECC_UNCORRECTABLE = 214,
1411    #[doc = " This indicates that the ::CUlimit passed to the API call is not\n supported by the active device."]
1412    CUDA_ERROR_UNSUPPORTED_LIMIT = 215,
1413    #[doc = " This indicates that the ::CUcontext passed to the API call can\n only be bound to a single CPU thread at a time but is already\n bound to a CPU thread."]
1414    CUDA_ERROR_CONTEXT_ALREADY_IN_USE = 216,
1415    #[doc = " This indicates that peer access is not supported across the given\n devices."]
1416    CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = 217,
1417    #[doc = " This indicates that a PTX JIT compilation failed."]
1418    CUDA_ERROR_INVALID_PTX = 218,
1419    #[doc = " This indicates an error with OpenGL or DirectX context."]
1420    CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = 219,
1421    #[doc = " This indicates that an uncorrectable NVLink error was detected during the\n execution."]
1422    CUDA_ERROR_NVLINK_UNCORRECTABLE = 220,
1423    #[doc = " This indicates that the PTX JIT compiler library was not found."]
1424    CUDA_ERROR_JIT_COMPILER_NOT_FOUND = 221,
1425    #[doc = " This indicates that the provided PTX was compiled with an unsupported toolchain."]
1426    CUDA_ERROR_UNSUPPORTED_PTX_VERSION = 222,
1427    #[doc = " This indicates that the PTX JIT compilation was disabled."]
1428    CUDA_ERROR_JIT_COMPILATION_DISABLED = 223,
1429    #[doc = " This indicates that the ::CUexecAffinityType passed to the API call is not\n supported by the active device."]
1430    CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY = 224,
1431    #[doc = " This indicates that the device kernel source is invalid. This includes\n compilation/linker errors encountered in device code or user error."]
1432    CUDA_ERROR_INVALID_SOURCE = 300,
1433    #[doc = " This indicates that the file specified was not found."]
1434    CUDA_ERROR_FILE_NOT_FOUND = 301,
1435    #[doc = " This indicates that a link to a shared object failed to resolve."]
1436    CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = 302,
1437    #[doc = " This indicates that initialization of a shared object failed."]
1438    CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = 303,
1439    #[doc = " This indicates that an OS call failed."]
1440    CUDA_ERROR_OPERATING_SYSTEM = 304,
1441    #[doc = " This indicates that a resource handle passed to the API call was not\n valid. Resource handles are opaque types like ::CUstream and ::CUevent."]
1442    CUDA_ERROR_INVALID_HANDLE = 400,
1443    #[doc = " This indicates that a resource required by the API call is not in a\n valid state to perform the requested operation."]
1444    CUDA_ERROR_ILLEGAL_STATE = 401,
1445    #[doc = " This indicates that a named symbol was not found. Examples of symbols\n are global/constant variable names, driver function names, texture names,\n and surface names."]
1446    CUDA_ERROR_NOT_FOUND = 500,
1447    #[doc = " This indicates that asynchronous operations issued previously have not\n completed yet. This result is not actually an error, but must be indicated\n differently than ::CUDA_SUCCESS (which indicates completion). Calls that\n may return this value include ::cuEventQuery() and ::cuStreamQuery()."]
1448    CUDA_ERROR_NOT_READY = 600,
1449    #[doc = " While executing a kernel, the device encountered a\n load or store instruction on an invalid memory address.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
1450    CUDA_ERROR_ILLEGAL_ADDRESS = 700,
1451    #[doc = " This indicates that a launch did not occur because it did not have\n appropriate resources. This error usually indicates that the user has\n attempted to pass too many arguments to the device kernel, or the\n kernel launch specifies too many threads for the kernel's register\n count. Passing arguments of the wrong size (i.e. a 64-bit pointer\n when a 32-bit int is expected) is equivalent to passing too many\n arguments and can also result in this error."]
1452    CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = 701,
1453    #[doc = " This indicates that the device kernel took too long to execute. This can\n only occur if timeouts are enabled - see the device attribute\n ::CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT for more information.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
1454    CUDA_ERROR_LAUNCH_TIMEOUT = 702,
1455    #[doc = " This error indicates a kernel launch that uses an incompatible texturing\n mode."]
1456    CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = 703,
1457    #[doc = " This error indicates that a call to ::cuCtxEnablePeerAccess() is\n trying to re-enable peer access to a context which has already\n had peer access to it enabled."]
1458    CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED = 704,
1459    #[doc = " This error indicates that ::cuCtxDisablePeerAccess() is\n trying to disable peer access which has not been enabled yet\n via ::cuCtxEnablePeerAccess()."]
1460    CUDA_ERROR_PEER_ACCESS_NOT_ENABLED = 705,
1461    #[doc = " This error indicates that the primary context for the specified device\n has already been initialized."]
1462    CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = 708,
1463    #[doc = " This error indicates that the context current to the calling thread\n has been destroyed using ::cuCtxDestroy, or is a primary context which\n has not yet been initialized."]
1464    CUDA_ERROR_CONTEXT_IS_DESTROYED = 709,
1465    #[doc = " A device-side assert triggered during kernel execution. The context\n cannot be used anymore, and must be destroyed. All existing device\n memory allocations from this context are invalid and must be\n reconstructed if the program is to continue using CUDA."]
1466    CUDA_ERROR_ASSERT = 710,
1467    #[doc = " This error indicates that the hardware resources required to enable\n peer access have been exhausted for one or more of the devices\n passed to ::cuCtxEnablePeerAccess()."]
1468    CUDA_ERROR_TOO_MANY_PEERS = 711,
1469    #[doc = " This error indicates that the memory range passed to ::cuMemHostRegister()\n has already been registered."]
1470    CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED = 712,
1471    #[doc = " This error indicates that the pointer passed to ::cuMemHostUnregister()\n does not correspond to any currently registered memory region."]
1472    CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED = 713,
1473    #[doc = " While executing a kernel, the device encountered a stack error.\n This can be due to stack corruption or exceeding the stack size limit.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
1474    CUDA_ERROR_HARDWARE_STACK_ERROR = 714,
1475    #[doc = " While executing a kernel, the device encountered an illegal instruction.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
1476    CUDA_ERROR_ILLEGAL_INSTRUCTION = 715,
1477    #[doc = " While executing a kernel, the device encountered a load or store instruction\n on a memory address which is not aligned.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
1478    CUDA_ERROR_MISALIGNED_ADDRESS = 716,
1479    #[doc = " While executing a kernel, the device encountered an instruction\n which can only operate on memory locations in certain address spaces\n (global, shared, or local), but was supplied a memory address not\n belonging to an allowed address space.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
1480    CUDA_ERROR_INVALID_ADDRESS_SPACE = 717,
1481    #[doc = " While executing a kernel, the device program counter wrapped its address space.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
1482    CUDA_ERROR_INVALID_PC = 718,
1483    #[doc = " An exception occurred on the device while executing a kernel. Common\n causes include dereferencing an invalid device pointer and accessing\n out of bounds shared memory. Less common cases can be system specific - more\n information about these cases can be found in the system specific user guide.\n This leaves the process in an inconsistent state and any further CUDA work\n will return the same error. To continue using CUDA, the process must be terminated\n and relaunched."]
1484    CUDA_ERROR_LAUNCH_FAILED = 719,
1485    #[doc = " This error indicates that the number of blocks launched per grid for a kernel that was\n launched via either ::cuLaunchCooperativeKernel or ::cuLaunchCooperativeKernelMultiDevice\n exceeds the maximum number of blocks as allowed by ::cuOccupancyMaxActiveBlocksPerMultiprocessor\n or ::cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags times the number of multiprocessors\n as specified by the device attribute ::CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT."]
1486    CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = 720,
1487    #[doc = " This error indicates that the attempted operation is not permitted."]
1488    CUDA_ERROR_NOT_PERMITTED = 800,
1489    #[doc = " This error indicates that the attempted operation is not supported\n on the current system or device."]
1490    CUDA_ERROR_NOT_SUPPORTED = 801,
1491    #[doc = " This error indicates that the system is not yet ready to start any CUDA\n work.  To continue using CUDA, verify the system configuration is in a\n valid state and all required driver daemons are actively running.\n More information about this error can be found in the system specific\n user guide."]
1492    CUDA_ERROR_SYSTEM_NOT_READY = 802,
1493    #[doc = " This error indicates that there is a mismatch between the versions of\n the display driver and the CUDA driver. Refer to the compatibility documentation\n for supported versions."]
1494    CUDA_ERROR_SYSTEM_DRIVER_MISMATCH = 803,
1495    #[doc = " This error indicates that the system was upgraded to run with forward compatibility\n but the visible hardware detected by CUDA does not support this configuration.\n Refer to the compatibility documentation for the supported hardware matrix or ensure\n that only supported hardware is visible during initialization via the CUDA_VISIBLE_DEVICES\n environment variable."]
1496    CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE = 804,
1497    #[doc = " This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server."]
1498    CUDA_ERROR_MPS_CONNECTION_FAILED = 805,
1499    #[doc = " This error indicates that the remote procedural call between the MPS server and the MPS client failed."]
1500    CUDA_ERROR_MPS_RPC_FAILURE = 806,
1501    #[doc = " This error indicates that the MPS server is not ready to accept new MPS client requests.\n This error can be returned when the MPS server is in the process of recovering from a fatal failure."]
1502    CUDA_ERROR_MPS_SERVER_NOT_READY = 807,
1503    #[doc = " This error indicates that the hardware resources required to create MPS client have been exhausted."]
1504    CUDA_ERROR_MPS_MAX_CLIENTS_REACHED = 808,
1505    #[doc = " This error indicates the the hardware resources required to support device connections have been exhausted."]
1506    CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED = 809,
1507    #[doc = " This error indicates that the MPS client has been terminated by the server. To continue using CUDA, the process must be terminated and relaunched."]
1508    CUDA_ERROR_MPS_CLIENT_TERMINATED = 810,
1509    #[doc = " This error indicates that the module is using CUDA Dynamic Parallelism, but the current configuration, like MPS, does not support it."]
1510    CUDA_ERROR_CDP_NOT_SUPPORTED = 811,
1511    #[doc = " This error indicates that a module contains an unsupported interaction between different versions of CUDA Dynamic Parallelism."]
1512    CUDA_ERROR_CDP_VERSION_MISMATCH = 812,
1513    #[doc = " This error indicates that the operation is not permitted when\n the stream is capturing."]
1514    CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = 900,
1515    #[doc = " This error indicates that the current capture sequence on the stream\n has been invalidated due to a previous error."]
1516    CUDA_ERROR_STREAM_CAPTURE_INVALIDATED = 901,
1517    #[doc = " This error indicates that the operation would have resulted in a merge\n of two independent capture sequences."]
1518    CUDA_ERROR_STREAM_CAPTURE_MERGE = 902,
1519    #[doc = " This error indicates that the capture was not initiated in this stream."]
1520    CUDA_ERROR_STREAM_CAPTURE_UNMATCHED = 903,
1521    #[doc = " This error indicates that the capture sequence contains a fork that was\n not joined to the primary stream."]
1522    CUDA_ERROR_STREAM_CAPTURE_UNJOINED = 904,
1523    #[doc = " This error indicates that a dependency would have been created which\n crosses the capture sequence boundary. Only implicit in-stream ordering\n dependencies are allowed to cross the boundary."]
1524    CUDA_ERROR_STREAM_CAPTURE_ISOLATION = 905,
1525    #[doc = " This error indicates a disallowed implicit dependency on a current capture\n sequence from cudaStreamLegacy."]
1526    CUDA_ERROR_STREAM_CAPTURE_IMPLICIT = 906,
1527    #[doc = " This error indicates that the operation is not permitted on an event which\n was last recorded in a capturing stream."]
1528    CUDA_ERROR_CAPTURED_EVENT = 907,
1529    #[doc = " A stream capture sequence not initiated with the ::CU_STREAM_CAPTURE_MODE_RELAXED\n argument to ::cuStreamBeginCapture was passed to ::cuStreamEndCapture in a\n different thread."]
1530    CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = 908,
1531    #[doc = " This error indicates that the timeout specified for the wait operation has lapsed."]
1532    CUDA_ERROR_TIMEOUT = 909,
1533    #[doc = " This error indicates that the graph update was not performed because it included\n changes which violated constraints specific to instantiated graph update."]
1534    CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE = 910,
1535    #[doc = " This indicates that an async error has occurred in a device outside of CUDA.\n If CUDA was waiting for an external device's signal before consuming shared data,\n the external device signaled an error indicating that the data is not valid for\n consumption. This leaves the process in an inconsistent state and any further CUDA\n work will return the same error. To continue using CUDA, the process must be\n terminated and relaunched."]
1536    CUDA_ERROR_EXTERNAL_DEVICE = 911,
1537    #[doc = " Indicates a kernel launch error due to cluster misconfiguration."]
1538    CUDA_ERROR_INVALID_CLUSTER_SIZE = 912,
1539    #[doc = " This indicates that an unknown internal error has occurred."]
1540    CUDA_ERROR_UNKNOWN = 999,
1541}
1542#[doc = " Error codes"]
1543pub use self::cudaError_enum as CUresult;
1544impl CUdevice_P2PAttribute_enum {
1545    pub const CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED: CUdevice_P2PAttribute_enum =
1546        CUdevice_P2PAttribute_enum::CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED;
1547}
1548#[repr(u32)]
1549#[doc = " P2P Attributes"]
1550#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1551pub enum CUdevice_P2PAttribute_enum {
1552    #[doc = "< A relative value indicating the performance of the link between two devices"]
1553    CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 1,
1554    #[doc = "< P2P Access is enable"]
1555    CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 2,
1556    #[doc = "< Atomic operation over the link supported"]
1557    CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = 3,
1558    #[doc = "< \\deprecated use CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED instead"]
1559    CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = 4,
1560}
1561#[doc = " P2P Attributes"]
1562pub use self::CUdevice_P2PAttribute_enum as CUdevice_P2PAttribute;
1563#[doc = " CUDA stream callback\n \\param hStream The stream the callback was added to, as passed to ::cuStreamAddCallback.  May be NULL.\n \\param status ::CUDA_SUCCESS or any persistent error on the stream.\n \\param userData User parameter provided at registration."]
1564pub type CUstreamCallback = ::std::option::Option<
1565    unsafe extern "C" fn(
1566        hStream: CUstream,
1567        status: CUresult,
1568        userData: *mut ::std::os::raw::c_void,
1569    ),
1570>;
1571#[doc = " Block size to per-block dynamic shared memory mapping for a certain\n kernel \\param blockSize Block size of the kernel.\n\n \\return The dynamic shared memory needed by a block."]
1572pub type CUoccupancyB2DSize =
1573    ::std::option::Option<unsafe extern "C" fn(blockSize: ::std::os::raw::c_int) -> usize>;
1574#[doc = " 2D memory copy parameters"]
1575#[repr(C)]
1576#[derive(Debug, Copy, Clone)]
1577pub struct CUDA_MEMCPY2D_st {
1578    #[doc = "< Source X in bytes"]
1579    pub srcXInBytes: usize,
1580    #[doc = "< Source Y"]
1581    pub srcY: usize,
1582    #[doc = "< Source memory type (host, device, array)"]
1583    pub srcMemoryType: CUmemorytype,
1584    #[doc = "< Source host pointer"]
1585    pub srcHost: *const ::std::os::raw::c_void,
1586    #[doc = "< Source device pointer"]
1587    pub srcDevice: CUdeviceptr,
1588    #[doc = "< Source array reference"]
1589    pub srcArray: CUarray,
1590    #[doc = "< Source pitch (ignored when src is array)"]
1591    pub srcPitch: usize,
1592    #[doc = "< Destination X in bytes"]
1593    pub dstXInBytes: usize,
1594    #[doc = "< Destination Y"]
1595    pub dstY: usize,
1596    #[doc = "< Destination memory type (host, device, array)"]
1597    pub dstMemoryType: CUmemorytype,
1598    #[doc = "< Destination host pointer"]
1599    pub dstHost: *mut ::std::os::raw::c_void,
1600    #[doc = "< Destination device pointer"]
1601    pub dstDevice: CUdeviceptr,
1602    #[doc = "< Destination array reference"]
1603    pub dstArray: CUarray,
1604    #[doc = "< Destination pitch (ignored when dst is array)"]
1605    pub dstPitch: usize,
1606    #[doc = "< Width of 2D memory copy in bytes"]
1607    pub WidthInBytes: usize,
1608    #[doc = "< Height of 2D memory copy"]
1609    pub Height: usize,
1610}
1611#[doc = " 2D memory copy parameters"]
1612pub type CUDA_MEMCPY2D_v2 = CUDA_MEMCPY2D_st;
1613#[doc = " 2D memory copy parameters"]
1614pub type CUDA_MEMCPY2D = CUDA_MEMCPY2D_v2;
1615#[doc = " 3D memory copy parameters"]
1616#[repr(C)]
1617#[derive(Debug, Copy, Clone)]
1618pub struct CUDA_MEMCPY3D_st {
1619    #[doc = "< Source X in bytes"]
1620    pub srcXInBytes: usize,
1621    #[doc = "< Source Y"]
1622    pub srcY: usize,
1623    #[doc = "< Source Z"]
1624    pub srcZ: usize,
1625    #[doc = "< Source LOD"]
1626    pub srcLOD: usize,
1627    #[doc = "< Source memory type (host, device, array)"]
1628    pub srcMemoryType: CUmemorytype,
1629    #[doc = "< Source host pointer"]
1630    pub srcHost: *const ::std::os::raw::c_void,
1631    #[doc = "< Source device pointer"]
1632    pub srcDevice: CUdeviceptr,
1633    #[doc = "< Source array reference"]
1634    pub srcArray: CUarray,
1635    #[doc = "< Must be NULL"]
1636    pub reserved0: *mut ::std::os::raw::c_void,
1637    #[doc = "< Source pitch (ignored when src is array)"]
1638    pub srcPitch: usize,
1639    #[doc = "< Source height (ignored when src is array; may be 0 if Depth==1)"]
1640    pub srcHeight: usize,
1641    #[doc = "< Destination X in bytes"]
1642    pub dstXInBytes: usize,
1643    #[doc = "< Destination Y"]
1644    pub dstY: usize,
1645    #[doc = "< Destination Z"]
1646    pub dstZ: usize,
1647    #[doc = "< Destination LOD"]
1648    pub dstLOD: usize,
1649    #[doc = "< Destination memory type (host, device, array)"]
1650    pub dstMemoryType: CUmemorytype,
1651    #[doc = "< Destination host pointer"]
1652    pub dstHost: *mut ::std::os::raw::c_void,
1653    #[doc = "< Destination device pointer"]
1654    pub dstDevice: CUdeviceptr,
1655    #[doc = "< Destination array reference"]
1656    pub dstArray: CUarray,
1657    #[doc = "< Must be NULL"]
1658    pub reserved1: *mut ::std::os::raw::c_void,
1659    #[doc = "< Destination pitch (ignored when dst is array)"]
1660    pub dstPitch: usize,
1661    #[doc = "< Destination height (ignored when dst is array; may be 0 if Depth==1)"]
1662    pub dstHeight: usize,
1663    #[doc = "< Width of 3D memory copy in bytes"]
1664    pub WidthInBytes: usize,
1665    #[doc = "< Height of 3D memory copy"]
1666    pub Height: usize,
1667    #[doc = "< Depth of 3D memory copy"]
1668    pub Depth: usize,
1669}
1670#[doc = " 3D memory copy parameters"]
1671pub type CUDA_MEMCPY3D_v2 = CUDA_MEMCPY3D_st;
1672#[doc = " 3D memory copy parameters"]
1673pub type CUDA_MEMCPY3D = CUDA_MEMCPY3D_v2;
1674#[doc = " 3D memory cross-context copy parameters"]
1675#[repr(C)]
1676#[derive(Debug, Copy, Clone)]
1677pub struct CUDA_MEMCPY3D_PEER_st {
1678    #[doc = "< Source X in bytes"]
1679    pub srcXInBytes: usize,
1680    #[doc = "< Source Y"]
1681    pub srcY: usize,
1682    #[doc = "< Source Z"]
1683    pub srcZ: usize,
1684    #[doc = "< Source LOD"]
1685    pub srcLOD: usize,
1686    #[doc = "< Source memory type (host, device, array)"]
1687    pub srcMemoryType: CUmemorytype,
1688    #[doc = "< Source host pointer"]
1689    pub srcHost: *const ::std::os::raw::c_void,
1690    #[doc = "< Source device pointer"]
1691    pub srcDevice: CUdeviceptr,
1692    #[doc = "< Source array reference"]
1693    pub srcArray: CUarray,
1694    #[doc = "< Source context (ignored with srcMemoryType is ::CU_MEMORYTYPE_ARRAY)"]
1695    pub srcContext: CUcontext,
1696    #[doc = "< Source pitch (ignored when src is array)"]
1697    pub srcPitch: usize,
1698    #[doc = "< Source height (ignored when src is array; may be 0 if Depth==1)"]
1699    pub srcHeight: usize,
1700    #[doc = "< Destination X in bytes"]
1701    pub dstXInBytes: usize,
1702    #[doc = "< Destination Y"]
1703    pub dstY: usize,
1704    #[doc = "< Destination Z"]
1705    pub dstZ: usize,
1706    #[doc = "< Destination LOD"]
1707    pub dstLOD: usize,
1708    #[doc = "< Destination memory type (host, device, array)"]
1709    pub dstMemoryType: CUmemorytype,
1710    #[doc = "< Destination host pointer"]
1711    pub dstHost: *mut ::std::os::raw::c_void,
1712    #[doc = "< Destination device pointer"]
1713    pub dstDevice: CUdeviceptr,
1714    #[doc = "< Destination array reference"]
1715    pub dstArray: CUarray,
1716    #[doc = "< Destination context (ignored with dstMemoryType is ::CU_MEMORYTYPE_ARRAY)"]
1717    pub dstContext: CUcontext,
1718    #[doc = "< Destination pitch (ignored when dst is array)"]
1719    pub dstPitch: usize,
1720    #[doc = "< Destination height (ignored when dst is array; may be 0 if Depth==1)"]
1721    pub dstHeight: usize,
1722    #[doc = "< Width of 3D memory copy in bytes"]
1723    pub WidthInBytes: usize,
1724    #[doc = "< Height of 3D memory copy"]
1725    pub Height: usize,
1726    #[doc = "< Depth of 3D memory copy"]
1727    pub Depth: usize,
1728}
1729#[doc = " 3D memory cross-context copy parameters"]
1730pub type CUDA_MEMCPY3D_PEER_v1 = CUDA_MEMCPY3D_PEER_st;
1731#[doc = " 3D memory cross-context copy parameters"]
1732pub type CUDA_MEMCPY3D_PEER = CUDA_MEMCPY3D_PEER_v1;
1733#[doc = " Array descriptor"]
1734#[repr(C)]
1735#[derive(Debug, Copy, Clone)]
1736pub struct CUDA_ARRAY_DESCRIPTOR_st {
1737    #[doc = "< Width of array"]
1738    pub Width: usize,
1739    #[doc = "< Height of array"]
1740    pub Height: usize,
1741    #[doc = "< Array format"]
1742    pub Format: CUarray_format,
1743    #[doc = "< Channels per array element"]
1744    pub NumChannels: ::std::os::raw::c_uint,
1745}
1746#[doc = " Array descriptor"]
1747pub type CUDA_ARRAY_DESCRIPTOR_v2 = CUDA_ARRAY_DESCRIPTOR_st;
1748#[doc = " Array descriptor"]
1749pub type CUDA_ARRAY_DESCRIPTOR = CUDA_ARRAY_DESCRIPTOR_v2;
1750#[doc = " 3D array descriptor"]
1751#[repr(C)]
1752#[derive(Debug, Copy, Clone)]
1753pub struct CUDA_ARRAY3D_DESCRIPTOR_st {
1754    #[doc = "< Width of 3D array"]
1755    pub Width: usize,
1756    #[doc = "< Height of 3D array"]
1757    pub Height: usize,
1758    #[doc = "< Depth of 3D array"]
1759    pub Depth: usize,
1760    #[doc = "< Array format"]
1761    pub Format: CUarray_format,
1762    #[doc = "< Channels per array element"]
1763    pub NumChannels: ::std::os::raw::c_uint,
1764    #[doc = "< Flags"]
1765    pub Flags: ::std::os::raw::c_uint,
1766}
1767#[doc = " 3D array descriptor"]
1768pub type CUDA_ARRAY3D_DESCRIPTOR_v2 = CUDA_ARRAY3D_DESCRIPTOR_st;
1769#[doc = " 3D array descriptor"]
1770pub type CUDA_ARRAY3D_DESCRIPTOR = CUDA_ARRAY3D_DESCRIPTOR_v2;
1771#[doc = " CUDA array sparse properties"]
1772#[repr(C)]
1773#[derive(Debug, Copy, Clone)]
1774pub struct CUDA_ARRAY_SPARSE_PROPERTIES_st {
1775    pub tileExtent: CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1,
1776    #[doc = " First mip level at which the mip tail begins."]
1777    pub miptailFirstLevel: ::std::os::raw::c_uint,
1778    #[doc = " Total size of the mip tail."]
1779    pub miptailSize: ::std::os::raw::c_ulonglong,
1780    #[doc = " Flags will either be zero or ::CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL"]
1781    pub flags: ::std::os::raw::c_uint,
1782    pub reserved: [::std::os::raw::c_uint; 4usize],
1783}
1784#[repr(C)]
1785#[derive(Debug, Copy, Clone)]
1786pub struct CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1 {
1787    #[doc = "< Width of sparse tile in elements"]
1788    pub width: ::std::os::raw::c_uint,
1789    #[doc = "< Height of sparse tile in elements"]
1790    pub height: ::std::os::raw::c_uint,
1791    #[doc = "< Depth of sparse tile in elements"]
1792    pub depth: ::std::os::raw::c_uint,
1793}
1794#[doc = " CUDA array sparse properties"]
1795pub type CUDA_ARRAY_SPARSE_PROPERTIES_v1 = CUDA_ARRAY_SPARSE_PROPERTIES_st;
1796#[doc = " CUDA array sparse properties"]
1797pub type CUDA_ARRAY_SPARSE_PROPERTIES = CUDA_ARRAY_SPARSE_PROPERTIES_v1;
1798#[doc = " CUDA array memory requirements"]
1799#[repr(C)]
1800#[derive(Debug, Copy, Clone)]
1801pub struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st {
1802    #[doc = "< Total required memory size"]
1803    pub size: usize,
1804    #[doc = "< alignment requirement"]
1805    pub alignment: usize,
1806    pub reserved: [::std::os::raw::c_uint; 4usize],
1807}
1808#[doc = " CUDA array memory requirements"]
1809pub type CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 = CUDA_ARRAY_MEMORY_REQUIREMENTS_st;
1810#[doc = " CUDA array memory requirements"]
1811pub type CUDA_ARRAY_MEMORY_REQUIREMENTS = CUDA_ARRAY_MEMORY_REQUIREMENTS_v1;
1812#[doc = " CUDA Resource descriptor"]
1813#[repr(C)]
1814#[derive(Copy, Clone)]
1815pub struct CUDA_RESOURCE_DESC_st {
1816    #[doc = "< Resource type"]
1817    pub resType: CUresourcetype,
1818    pub res: CUDA_RESOURCE_DESC_st__bindgen_ty_1,
1819    #[doc = "< Flags (must be zero)"]
1820    pub flags: ::std::os::raw::c_uint,
1821}
1822#[repr(C)]
1823#[derive(Copy, Clone)]
1824pub union CUDA_RESOURCE_DESC_st__bindgen_ty_1 {
1825    pub array: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1,
1826    pub mipmap: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2,
1827    pub linear: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3,
1828    pub pitch2D: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
1829    pub reserved: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5,
1830}
1831#[repr(C)]
1832#[derive(Debug, Copy, Clone)]
1833pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
1834    #[doc = "< CUDA array"]
1835    pub hArray: CUarray,
1836}
1837#[repr(C)]
1838#[derive(Debug, Copy, Clone)]
1839pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 {
1840    #[doc = "< CUDA mipmapped array"]
1841    pub hMipmappedArray: CUmipmappedArray,
1842}
1843#[repr(C)]
1844#[derive(Debug, Copy, Clone)]
1845pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 {
1846    #[doc = "< Device pointer"]
1847    pub devPtr: CUdeviceptr,
1848    #[doc = "< Array format"]
1849    pub format: CUarray_format,
1850    #[doc = "< Channels per array element"]
1851    pub numChannels: ::std::os::raw::c_uint,
1852    #[doc = "< Size in bytes"]
1853    pub sizeInBytes: usize,
1854}
1855#[repr(C)]
1856#[derive(Debug, Copy, Clone)]
1857pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 {
1858    #[doc = "< Device pointer"]
1859    pub devPtr: CUdeviceptr,
1860    #[doc = "< Array format"]
1861    pub format: CUarray_format,
1862    #[doc = "< Channels per array element"]
1863    pub numChannels: ::std::os::raw::c_uint,
1864    #[doc = "< Width of the array in elements"]
1865    pub width: usize,
1866    #[doc = "< Height of the array in elements"]
1867    pub height: usize,
1868    #[doc = "< Pitch between two rows in bytes"]
1869    pub pitchInBytes: usize,
1870}
1871#[repr(C)]
1872#[derive(Debug, Copy, Clone)]
1873pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5 {
1874    pub reserved: [::std::os::raw::c_int; 32usize],
1875}
1876#[doc = " CUDA Resource descriptor"]
1877pub type CUDA_RESOURCE_DESC_v1 = CUDA_RESOURCE_DESC_st;
1878#[doc = " CUDA Resource descriptor"]
1879pub type CUDA_RESOURCE_DESC = CUDA_RESOURCE_DESC_v1;
1880#[doc = " Texture descriptor"]
1881#[repr(C)]
1882#[derive(Debug, Copy, Clone)]
1883pub struct CUDA_TEXTURE_DESC_st {
1884    #[doc = "< Address modes"]
1885    pub addressMode: [CUaddress_mode; 3usize],
1886    #[doc = "< Filter mode"]
1887    pub filterMode: CUfilter_mode,
1888    #[doc = "< Flags"]
1889    pub flags: ::std::os::raw::c_uint,
1890    #[doc = "< Maximum anisotropy ratio"]
1891    pub maxAnisotropy: ::std::os::raw::c_uint,
1892    #[doc = "< Mipmap filter mode"]
1893    pub mipmapFilterMode: CUfilter_mode,
1894    #[doc = "< Mipmap level bias"]
1895    pub mipmapLevelBias: f32,
1896    #[doc = "< Mipmap minimum level clamp"]
1897    pub minMipmapLevelClamp: f32,
1898    #[doc = "< Mipmap maximum level clamp"]
1899    pub maxMipmapLevelClamp: f32,
1900    #[doc = "< Border Color"]
1901    pub borderColor: [f32; 4usize],
1902    pub reserved: [::std::os::raw::c_int; 12usize],
1903}
1904#[doc = " Texture descriptor"]
1905pub type CUDA_TEXTURE_DESC_v1 = CUDA_TEXTURE_DESC_st;
1906#[doc = " Texture descriptor"]
1907pub type CUDA_TEXTURE_DESC = CUDA_TEXTURE_DESC_v1;
1908#[repr(u32)]
1909#[doc = " Resource view format"]
1910#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1911pub enum CUresourceViewFormat_enum {
1912    #[doc = "< No resource view format (use underlying resource format)"]
1913    CU_RES_VIEW_FORMAT_NONE = 0,
1914    #[doc = "< 1 channel unsigned 8-bit integers"]
1915    CU_RES_VIEW_FORMAT_UINT_1X8 = 1,
1916    #[doc = "< 2 channel unsigned 8-bit integers"]
1917    CU_RES_VIEW_FORMAT_UINT_2X8 = 2,
1918    #[doc = "< 4 channel unsigned 8-bit integers"]
1919    CU_RES_VIEW_FORMAT_UINT_4X8 = 3,
1920    #[doc = "< 1 channel signed 8-bit integers"]
1921    CU_RES_VIEW_FORMAT_SINT_1X8 = 4,
1922    #[doc = "< 2 channel signed 8-bit integers"]
1923    CU_RES_VIEW_FORMAT_SINT_2X8 = 5,
1924    #[doc = "< 4 channel signed 8-bit integers"]
1925    CU_RES_VIEW_FORMAT_SINT_4X8 = 6,
1926    #[doc = "< 1 channel unsigned 16-bit integers"]
1927    CU_RES_VIEW_FORMAT_UINT_1X16 = 7,
1928    #[doc = "< 2 channel unsigned 16-bit integers"]
1929    CU_RES_VIEW_FORMAT_UINT_2X16 = 8,
1930    #[doc = "< 4 channel unsigned 16-bit integers"]
1931    CU_RES_VIEW_FORMAT_UINT_4X16 = 9,
1932    #[doc = "< 1 channel signed 16-bit integers"]
1933    CU_RES_VIEW_FORMAT_SINT_1X16 = 10,
1934    #[doc = "< 2 channel signed 16-bit integers"]
1935    CU_RES_VIEW_FORMAT_SINT_2X16 = 11,
1936    #[doc = "< 4 channel signed 16-bit integers"]
1937    CU_RES_VIEW_FORMAT_SINT_4X16 = 12,
1938    #[doc = "< 1 channel unsigned 32-bit integers"]
1939    CU_RES_VIEW_FORMAT_UINT_1X32 = 13,
1940    #[doc = "< 2 channel unsigned 32-bit integers"]
1941    CU_RES_VIEW_FORMAT_UINT_2X32 = 14,
1942    #[doc = "< 4 channel unsigned 32-bit integers"]
1943    CU_RES_VIEW_FORMAT_UINT_4X32 = 15,
1944    #[doc = "< 1 channel signed 32-bit integers"]
1945    CU_RES_VIEW_FORMAT_SINT_1X32 = 16,
1946    #[doc = "< 2 channel signed 32-bit integers"]
1947    CU_RES_VIEW_FORMAT_SINT_2X32 = 17,
1948    #[doc = "< 4 channel signed 32-bit integers"]
1949    CU_RES_VIEW_FORMAT_SINT_4X32 = 18,
1950    #[doc = "< 1 channel 16-bit floating point"]
1951    CU_RES_VIEW_FORMAT_FLOAT_1X16 = 19,
1952    #[doc = "< 2 channel 16-bit floating point"]
1953    CU_RES_VIEW_FORMAT_FLOAT_2X16 = 20,
1954    #[doc = "< 4 channel 16-bit floating point"]
1955    CU_RES_VIEW_FORMAT_FLOAT_4X16 = 21,
1956    #[doc = "< 1 channel 32-bit floating point"]
1957    CU_RES_VIEW_FORMAT_FLOAT_1X32 = 22,
1958    #[doc = "< 2 channel 32-bit floating point"]
1959    CU_RES_VIEW_FORMAT_FLOAT_2X32 = 23,
1960    #[doc = "< 4 channel 32-bit floating point"]
1961    CU_RES_VIEW_FORMAT_FLOAT_4X32 = 24,
1962    #[doc = "< Block compressed 1"]
1963    CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = 25,
1964    #[doc = "< Block compressed 2"]
1965    CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = 26,
1966    #[doc = "< Block compressed 3"]
1967    CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = 27,
1968    #[doc = "< Block compressed 4 unsigned"]
1969    CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = 28,
1970    #[doc = "< Block compressed 4 signed"]
1971    CU_RES_VIEW_FORMAT_SIGNED_BC4 = 29,
1972    #[doc = "< Block compressed 5 unsigned"]
1973    CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = 30,
1974    #[doc = "< Block compressed 5 signed"]
1975    CU_RES_VIEW_FORMAT_SIGNED_BC5 = 31,
1976    #[doc = "< Block compressed 6 unsigned half-float"]
1977    CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = 32,
1978    #[doc = "< Block compressed 6 signed half-float"]
1979    CU_RES_VIEW_FORMAT_SIGNED_BC6H = 33,
1980    #[doc = "< Block compressed 7"]
1981    CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = 34,
1982}
1983#[doc = " Resource view format"]
1984pub use self::CUresourceViewFormat_enum as CUresourceViewFormat;
1985#[doc = " Resource view descriptor"]
1986#[repr(C)]
1987#[derive(Debug, Copy, Clone)]
1988pub struct CUDA_RESOURCE_VIEW_DESC_st {
1989    #[doc = "< Resource view format"]
1990    pub format: CUresourceViewFormat,
1991    #[doc = "< Width of the resource view"]
1992    pub width: usize,
1993    #[doc = "< Height of the resource view"]
1994    pub height: usize,
1995    #[doc = "< Depth of the resource view"]
1996    pub depth: usize,
1997    #[doc = "< First defined mipmap level"]
1998    pub firstMipmapLevel: ::std::os::raw::c_uint,
1999    #[doc = "< Last defined mipmap level"]
2000    pub lastMipmapLevel: ::std::os::raw::c_uint,
2001    #[doc = "< First layer index"]
2002    pub firstLayer: ::std::os::raw::c_uint,
2003    #[doc = "< Last layer index"]
2004    pub lastLayer: ::std::os::raw::c_uint,
2005    pub reserved: [::std::os::raw::c_uint; 16usize],
2006}
2007#[doc = " Resource view descriptor"]
2008pub type CUDA_RESOURCE_VIEW_DESC_v1 = CUDA_RESOURCE_VIEW_DESC_st;
2009#[doc = " Resource view descriptor"]
2010pub type CUDA_RESOURCE_VIEW_DESC = CUDA_RESOURCE_VIEW_DESC_v1;
2011#[doc = " Tensor map descriptor. Requires compiler support for aligning to 64 bytes."]
2012#[repr(C)]
2013#[repr(align(64))]
2014#[derive(Debug, Copy, Clone)]
2015pub struct CUtensorMap_st {
2016    pub opaque: [cuuint64_t; 16usize],
2017}
2018#[doc = " Tensor map descriptor. Requires compiler support for aligning to 64 bytes."]
2019pub type CUtensorMap = CUtensorMap_st;
2020#[repr(u32)]
2021#[doc = " Tensor map data type"]
2022#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2023pub enum CUtensorMapDataType_enum {
2024    CU_TENSOR_MAP_DATA_TYPE_UINT8 = 0,
2025    CU_TENSOR_MAP_DATA_TYPE_UINT16 = 1,
2026    CU_TENSOR_MAP_DATA_TYPE_UINT32 = 2,
2027    CU_TENSOR_MAP_DATA_TYPE_INT32 = 3,
2028    CU_TENSOR_MAP_DATA_TYPE_UINT64 = 4,
2029    CU_TENSOR_MAP_DATA_TYPE_INT64 = 5,
2030    CU_TENSOR_MAP_DATA_TYPE_FLOAT16 = 6,
2031    CU_TENSOR_MAP_DATA_TYPE_FLOAT32 = 7,
2032    CU_TENSOR_MAP_DATA_TYPE_FLOAT64 = 8,
2033    CU_TENSOR_MAP_DATA_TYPE_BFLOAT16 = 9,
2034    CU_TENSOR_MAP_DATA_TYPE_FLOAT32_FTZ = 10,
2035    CU_TENSOR_MAP_DATA_TYPE_TFLOAT32 = 11,
2036    CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ = 12,
2037}
2038#[doc = " Tensor map data type"]
2039pub use self::CUtensorMapDataType_enum as CUtensorMapDataType;
2040#[repr(u32)]
2041#[doc = " Tensor map interleave layout type"]
2042#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2043pub enum CUtensorMapInterleave_enum {
2044    CU_TENSOR_MAP_INTERLEAVE_NONE = 0,
2045    CU_TENSOR_MAP_INTERLEAVE_16B = 1,
2046    CU_TENSOR_MAP_INTERLEAVE_32B = 2,
2047}
2048#[doc = " Tensor map interleave layout type"]
2049pub use self::CUtensorMapInterleave_enum as CUtensorMapInterleave;
2050#[repr(u32)]
2051#[doc = " Tensor map swizzling mode of shared memory banks"]
2052#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2053pub enum CUtensorMapSwizzle_enum {
2054    CU_TENSOR_MAP_SWIZZLE_NONE = 0,
2055    CU_TENSOR_MAP_SWIZZLE_32B = 1,
2056    CU_TENSOR_MAP_SWIZZLE_64B = 2,
2057    CU_TENSOR_MAP_SWIZZLE_128B = 3,
2058}
2059#[doc = " Tensor map swizzling mode of shared memory banks"]
2060pub use self::CUtensorMapSwizzle_enum as CUtensorMapSwizzle;
2061#[repr(u32)]
2062#[doc = " Tensor map L2 promotion type"]
2063#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2064pub enum CUtensorMapL2promotion_enum {
2065    CU_TENSOR_MAP_L2_PROMOTION_NONE = 0,
2066    CU_TENSOR_MAP_L2_PROMOTION_L2_64B = 1,
2067    CU_TENSOR_MAP_L2_PROMOTION_L2_128B = 2,
2068    CU_TENSOR_MAP_L2_PROMOTION_L2_256B = 3,
2069}
2070#[doc = " Tensor map L2 promotion type"]
2071pub use self::CUtensorMapL2promotion_enum as CUtensorMapL2promotion;
2072#[repr(u32)]
2073#[doc = " Tensor map out-of-bounds fill type"]
2074#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2075pub enum CUtensorMapFloatOOBfill_enum {
2076    CU_TENSOR_MAP_FLOAT_OOB_FILL_NONE = 0,
2077    CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA = 1,
2078}
2079#[doc = " Tensor map out-of-bounds fill type"]
2080pub use self::CUtensorMapFloatOOBfill_enum as CUtensorMapFloatOOBfill;
2081#[doc = " Kernel launch parameters"]
2082#[repr(C)]
2083#[derive(Debug, Copy, Clone)]
2084pub struct CUDA_LAUNCH_PARAMS_st {
2085    #[doc = "< Kernel to launch"]
2086    pub function: CUfunction,
2087    #[doc = "< Width of grid in blocks"]
2088    pub gridDimX: ::std::os::raw::c_uint,
2089    #[doc = "< Height of grid in blocks"]
2090    pub gridDimY: ::std::os::raw::c_uint,
2091    #[doc = "< Depth of grid in blocks"]
2092    pub gridDimZ: ::std::os::raw::c_uint,
2093    #[doc = "< X dimension of each thread block"]
2094    pub blockDimX: ::std::os::raw::c_uint,
2095    #[doc = "< Y dimension of each thread block"]
2096    pub blockDimY: ::std::os::raw::c_uint,
2097    #[doc = "< Z dimension of each thread block"]
2098    pub blockDimZ: ::std::os::raw::c_uint,
2099    #[doc = "< Dynamic shared-memory size per thread block in bytes"]
2100    pub sharedMemBytes: ::std::os::raw::c_uint,
2101    #[doc = "< Stream identifier"]
2102    pub hStream: CUstream,
2103    #[doc = "< Array of pointers to kernel parameters"]
2104    pub kernelParams: *mut *mut ::std::os::raw::c_void,
2105}
2106#[doc = " Kernel launch parameters"]
2107pub type CUDA_LAUNCH_PARAMS_v1 = CUDA_LAUNCH_PARAMS_st;
2108#[doc = " Kernel launch parameters"]
2109pub type CUDA_LAUNCH_PARAMS = CUDA_LAUNCH_PARAMS_v1;
2110#[repr(u32)]
2111#[doc = " External memory handle types"]
2112#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2113pub enum CUexternalMemoryHandleType_enum {
2114    #[doc = " Handle is an opaque file descriptor"]
2115    CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = 1,
2116    #[doc = " Handle is an opaque shared NT handle"]
2117    CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = 2,
2118    #[doc = " Handle is an opaque, globally shared handle"]
2119    CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3,
2120    #[doc = " Handle is a D3D12 heap object"]
2121    CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = 4,
2122    #[doc = " Handle is a D3D12 committed resource"]
2123    CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = 5,
2124    #[doc = " Handle is a shared NT handle to a D3D11 resource"]
2125    CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = 6,
2126    #[doc = " Handle is a globally shared handle to a D3D11 resource"]
2127    CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = 7,
2128    #[doc = " Handle is an NvSciBuf object"]
2129    CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = 8,
2130}
2131#[doc = " External memory handle types"]
2132pub use self::CUexternalMemoryHandleType_enum as CUexternalMemoryHandleType;
2133#[doc = " External memory handle descriptor"]
2134#[repr(C)]
2135#[derive(Copy, Clone)]
2136pub struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st {
2137    #[doc = " Type of the handle"]
2138    pub type_: CUexternalMemoryHandleType,
2139    pub handle: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1,
2140    #[doc = " Size of the memory allocation"]
2141    pub size: ::std::os::raw::c_ulonglong,
2142    #[doc = " Flags must either be zero or ::CUDA_EXTERNAL_MEMORY_DEDICATED"]
2143    pub flags: ::std::os::raw::c_uint,
2144    pub reserved: [::std::os::raw::c_uint; 16usize],
2145}
2146#[repr(C)]
2147#[derive(Copy, Clone)]
2148pub union CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1 {
2149    #[doc = " File descriptor referencing the memory object. Valid\n when type is\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD"]
2150    pub fd: ::std::os::raw::c_int,
2151    pub win32: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1,
2152    #[doc = " A handle representing an NvSciBuf Object. Valid when type\n is ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF"]
2153    pub nvSciBufObject: *const ::std::os::raw::c_void,
2154}
2155#[doc = " Win32 handle referencing the semaphore object. Valid when\n type is one of the following:\n - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32\n - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT\n - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP\n - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE\n - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE\n - ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT\n Exactly one of 'handle' and 'name' must be non-NULL. If\n type is one of the following:\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT\n then 'name' must be NULL."]
2156#[repr(C)]
2157#[derive(Debug, Copy, Clone)]
2158pub struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
2159    #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"]
2160    pub handle: *mut ::std::os::raw::c_void,
2161    #[doc = " Name of a valid memory object.\n Must be NULL if 'handle' is non-NULL."]
2162    pub name: *const ::std::os::raw::c_void,
2163}
2164#[doc = " External memory handle descriptor"]
2165pub type CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 = CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st;
2166#[doc = " External memory handle descriptor"]
2167pub type CUDA_EXTERNAL_MEMORY_HANDLE_DESC = CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1;
2168#[doc = " External memory buffer descriptor"]
2169#[repr(C)]
2170#[derive(Debug, Copy, Clone)]
2171pub struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st {
2172    #[doc = " Offset into the memory object where the buffer's base is"]
2173    pub offset: ::std::os::raw::c_ulonglong,
2174    #[doc = " Size of the buffer"]
2175    pub size: ::std::os::raw::c_ulonglong,
2176    #[doc = " Flags reserved for future use. Must be zero."]
2177    pub flags: ::std::os::raw::c_uint,
2178    pub reserved: [::std::os::raw::c_uint; 16usize],
2179}
2180#[doc = " External memory buffer descriptor"]
2181pub type CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 = CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st;
2182#[doc = " External memory buffer descriptor"]
2183pub type CUDA_EXTERNAL_MEMORY_BUFFER_DESC = CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1;
2184#[doc = " External memory mipmap descriptor"]
2185#[repr(C)]
2186#[derive(Debug, Copy, Clone)]
2187pub struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st {
2188    #[doc = " Offset into the memory object where the base level of the\n mipmap chain is."]
2189    pub offset: ::std::os::raw::c_ulonglong,
2190    #[doc = " Format, dimension and type of base level of the mipmap chain"]
2191    pub arrayDesc: CUDA_ARRAY3D_DESCRIPTOR,
2192    #[doc = " Total number of levels in the mipmap chain"]
2193    pub numLevels: ::std::os::raw::c_uint,
2194    pub reserved: [::std::os::raw::c_uint; 16usize],
2195}
2196#[doc = " External memory mipmap descriptor"]
2197pub type CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 =
2198    CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st;
2199#[doc = " External memory mipmap descriptor"]
2200pub type CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC = CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1;
2201#[repr(u32)]
2202#[doc = " External semaphore handle types"]
2203#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2204pub enum CUexternalSemaphoreHandleType_enum {
2205    #[doc = " Handle is an opaque file descriptor"]
2206    CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = 1,
2207    #[doc = " Handle is an opaque shared NT handle"]
2208    CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = 2,
2209    #[doc = " Handle is an opaque, globally shared handle"]
2210    CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3,
2211    #[doc = " Handle is a shared NT handle referencing a D3D12 fence object"]
2212    CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = 4,
2213    #[doc = " Handle is a shared NT handle referencing a D3D11 fence object"]
2214    CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE = 5,
2215    #[doc = " Opaque handle to NvSciSync Object"]
2216    CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC = 6,
2217    #[doc = " Handle is a shared NT handle referencing a D3D11 keyed mutex object"]
2218    CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX = 7,
2219    #[doc = " Handle is a globally shared handle referencing a D3D11 keyed mutex object"]
2220    CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT = 8,
2221    #[doc = " Handle is an opaque file descriptor referencing a timeline semaphore"]
2222    CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD = 9,
2223    #[doc = " Handle is an opaque shared NT handle referencing a timeline semaphore"]
2224    CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = 10,
2225}
2226#[doc = " External semaphore handle types"]
2227pub use self::CUexternalSemaphoreHandleType_enum as CUexternalSemaphoreHandleType;
2228#[doc = " External semaphore handle descriptor"]
2229#[repr(C)]
2230#[derive(Copy, Clone)]
2231pub struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st {
2232    #[doc = " Type of the handle"]
2233    pub type_: CUexternalSemaphoreHandleType,
2234    pub handle: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1,
2235    #[doc = " Flags reserved for the future. Must be zero."]
2236    pub flags: ::std::os::raw::c_uint,
2237    pub reserved: [::std::os::raw::c_uint; 16usize],
2238}
2239#[repr(C)]
2240#[derive(Copy, Clone)]
2241pub union CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1 {
2242    #[doc = " File descriptor referencing the semaphore object. Valid\n when type is one of the following:\n - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD\n - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD"]
2243    pub fd: ::std::os::raw::c_int,
2244    pub win32: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1,
2245    #[doc = " Valid NvSciSyncObj. Must be non NULL"]
2246    pub nvSciSyncObj: *const ::std::os::raw::c_void,
2247}
2248#[doc = " Win32 handle referencing the semaphore object. Valid when\n type is one of the following:\n - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32\n - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT\n - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE\n - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE\n - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX\n - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32\n Exactly one of 'handle' and 'name' must be non-NULL. If\n type is one of the following:\n - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT\n - ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT\n then 'name' must be NULL."]
2249#[repr(C)]
2250#[derive(Debug, Copy, Clone)]
2251pub struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
2252    #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"]
2253    pub handle: *mut ::std::os::raw::c_void,
2254    #[doc = " Name of a valid synchronization primitive.\n Must be NULL if 'handle' is non-NULL."]
2255    pub name: *const ::std::os::raw::c_void,
2256}
2257#[doc = " External semaphore handle descriptor"]
2258pub type CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 = CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st;
2259#[doc = " External semaphore handle descriptor"]
2260pub type CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC = CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1;
2261#[doc = " External semaphore signal parameters"]
2262#[repr(C)]
2263#[derive(Copy, Clone)]
2264pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st {
2265    pub params: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1,
2266    #[doc = " Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to\n signal a ::CUexternalSemaphore of type\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is\n ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which indicates\n that while signaling the ::CUexternalSemaphore, no memory synchronization\n operations should be performed for any external memory object imported\n as ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF.\n For all other types of ::CUexternalSemaphore, flags must be zero."]
2267    pub flags: ::std::os::raw::c_uint,
2268    pub reserved: [::std::os::raw::c_uint; 16usize],
2269}
2270#[repr(C)]
2271#[derive(Copy, Clone)]
2272pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1 {
2273    pub fence: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1,
2274    pub nvSciSync: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2,
2275    pub keyedMutex: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3,
2276    pub reserved: [::std::os::raw::c_uint; 12usize],
2277}
2278#[doc = " Parameters for fence objects"]
2279#[repr(C)]
2280#[derive(Debug, Copy, Clone)]
2281pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1 {
2282    #[doc = " Value of fence to be signaled"]
2283    pub value: ::std::os::raw::c_ulonglong,
2284}
2285#[repr(C)]
2286#[derive(Copy, Clone)]
2287pub union CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2 {
2288    #[doc = " Pointer to NvSciSyncFence. Valid if ::CUexternalSemaphoreHandleType\n is of type ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC."]
2289    pub fence: *mut ::std::os::raw::c_void,
2290    pub reserved: ::std::os::raw::c_ulonglong,
2291}
2292#[doc = " Parameters for keyed mutex objects"]
2293#[repr(C)]
2294#[derive(Debug, Copy, Clone)]
2295pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3 {
2296    #[doc = " Value of key to release the mutex with"]
2297    pub key: ::std::os::raw::c_ulonglong,
2298}
2299#[doc = " External semaphore signal parameters"]
2300pub type CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 = CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st;
2301#[doc = " External semaphore signal parameters"]
2302pub type CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS = CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1;
2303#[doc = " External semaphore wait parameters"]
2304#[repr(C)]
2305#[derive(Copy, Clone)]
2306pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st {
2307    pub params: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1,
2308    #[doc = " Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on\n a ::CUexternalSemaphore of type ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC,\n the valid flag is ::CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC\n which indicates that while waiting for the ::CUexternalSemaphore, no memory\n synchronization operations should be performed for any external memory\n object imported as ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF.\n For all other types of ::CUexternalSemaphore, flags must be zero."]
2309    pub flags: ::std::os::raw::c_uint,
2310    pub reserved: [::std::os::raw::c_uint; 16usize],
2311}
2312#[repr(C)]
2313#[derive(Copy, Clone)]
2314pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1 {
2315    pub fence: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1,
2316    pub nvSciSync: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2,
2317    pub keyedMutex: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3,
2318    pub reserved: [::std::os::raw::c_uint; 10usize],
2319}
2320#[doc = " Parameters for fence objects"]
2321#[repr(C)]
2322#[derive(Debug, Copy, Clone)]
2323pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1 {
2324    #[doc = " Value of fence to be waited on"]
2325    pub value: ::std::os::raw::c_ulonglong,
2326}
2327#[doc = " Pointer to NvSciSyncFence. Valid if CUexternalSemaphoreHandleType\n is of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC."]
2328#[repr(C)]
2329#[derive(Copy, Clone)]
2330pub union CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2 {
2331    pub fence: *mut ::std::os::raw::c_void,
2332    pub reserved: ::std::os::raw::c_ulonglong,
2333}
2334#[doc = " Parameters for keyed mutex objects"]
2335#[repr(C)]
2336#[derive(Debug, Copy, Clone)]
2337pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3 {
2338    #[doc = " Value of key to acquire the mutex with"]
2339    pub key: ::std::os::raw::c_ulonglong,
2340    #[doc = " Timeout in milliseconds to wait to acquire the mutex"]
2341    pub timeoutMs: ::std::os::raw::c_uint,
2342}
2343#[doc = " External semaphore wait parameters"]
2344pub type CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 = CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st;
2345#[doc = " External semaphore wait parameters"]
2346pub type CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS = CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1;
2347#[doc = " Semaphore signal node parameters"]
2348#[repr(C)]
2349#[derive(Debug, Copy, Clone)]
2350pub struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st {
2351    #[doc = "< Array of external semaphore handles."]
2352    pub extSemArray: *mut CUexternalSemaphore,
2353    #[doc = "< Array of external semaphore signal parameters."]
2354    pub paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,
2355    #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
2356    pub numExtSems: ::std::os::raw::c_uint,
2357}
2358#[doc = " Semaphore signal node parameters"]
2359pub type CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st;
2360#[doc = " Semaphore signal node parameters"]
2361pub type CUDA_EXT_SEM_SIGNAL_NODE_PARAMS = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1;
2362#[doc = " Semaphore wait node parameters"]
2363#[repr(C)]
2364#[derive(Debug, Copy, Clone)]
2365pub struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st {
2366    #[doc = "< Array of external semaphore handles."]
2367    pub extSemArray: *mut CUexternalSemaphore,
2368    #[doc = "< Array of external semaphore wait parameters."]
2369    pub paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,
2370    #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
2371    pub numExtSems: ::std::os::raw::c_uint,
2372}
2373#[doc = " Semaphore wait node parameters"]
2374pub type CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 = CUDA_EXT_SEM_WAIT_NODE_PARAMS_st;
2375#[doc = " Semaphore wait node parameters"]
2376pub type CUDA_EXT_SEM_WAIT_NODE_PARAMS = CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1;
2377pub type CUmemGenericAllocationHandle_v1 = ::std::os::raw::c_ulonglong;
2378pub type CUmemGenericAllocationHandle = CUmemGenericAllocationHandle_v1;
2379#[repr(u32)]
2380#[doc = " Flags for specifying particular handle types"]
2381#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2382pub enum CUmemAllocationHandleType_enum {
2383    #[doc = "< Does not allow any export mechanism. >"]
2384    CU_MEM_HANDLE_TYPE_NONE = 0,
2385    #[doc = "< Allows a file descriptor to be used for exporting. Permitted only on POSIX systems. (int)"]
2386    CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 1,
2387    #[doc = "< Allows a Win32 NT handle to be used for exporting. (HANDLE)"]
2388    CU_MEM_HANDLE_TYPE_WIN32 = 2,
2389    #[doc = "< Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)"]
2390    CU_MEM_HANDLE_TYPE_WIN32_KMT = 4,
2391    CU_MEM_HANDLE_TYPE_MAX = 2147483647,
2392}
2393#[doc = " Flags for specifying particular handle types"]
2394pub use self::CUmemAllocationHandleType_enum as CUmemAllocationHandleType;
2395#[repr(u32)]
2396#[doc = " Specifies the memory protection flags for mapping."]
2397#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2398pub enum CUmemAccess_flags_enum {
2399    #[doc = "< Default, make the address range not accessible"]
2400    CU_MEM_ACCESS_FLAGS_PROT_NONE = 0,
2401    #[doc = "< Make the address range read accessible"]
2402    CU_MEM_ACCESS_FLAGS_PROT_READ = 1,
2403    #[doc = "< Make the address range read-write accessible"]
2404    CU_MEM_ACCESS_FLAGS_PROT_READWRITE = 3,
2405    CU_MEM_ACCESS_FLAGS_PROT_MAX = 2147483647,
2406}
2407#[doc = " Specifies the memory protection flags for mapping."]
2408pub use self::CUmemAccess_flags_enum as CUmemAccess_flags;
2409#[repr(u32)]
2410#[doc = " Specifies the type of location"]
2411#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2412pub enum CUmemLocationType_enum {
2413    CU_MEM_LOCATION_TYPE_INVALID = 0,
2414    #[doc = "< Location is a device location, thus id is a device ordinal"]
2415    CU_MEM_LOCATION_TYPE_DEVICE = 1,
2416    CU_MEM_LOCATION_TYPE_MAX = 2147483647,
2417}
2418#[doc = " Specifies the type of location"]
2419pub use self::CUmemLocationType_enum as CUmemLocationType;
2420#[repr(u32)]
2421#[doc = " Defines the allocation types available"]
2422#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2423pub enum CUmemAllocationType_enum {
2424    CU_MEM_ALLOCATION_TYPE_INVALID = 0,
2425    #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
2426    CU_MEM_ALLOCATION_TYPE_PINNED = 1,
2427    #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
2428    CU_MEM_ALLOCATION_TYPE_MAX = 2147483647,
2429}
2430#[doc = " Defines the allocation types available"]
2431pub use self::CUmemAllocationType_enum as CUmemAllocationType;
2432#[repr(u32)]
2433#[doc = " Flag for requesting different optimal and required granularities for an allocation."]
2434#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2435pub enum CUmemAllocationGranularity_flags_enum {
2436    #[doc = "< Minimum required granularity for allocation"]
2437    CU_MEM_ALLOC_GRANULARITY_MINIMUM = 0,
2438    #[doc = "< Recommended granularity for allocation for best performance"]
2439    CU_MEM_ALLOC_GRANULARITY_RECOMMENDED = 1,
2440}
2441#[doc = " Flag for requesting different optimal and required granularities for an allocation."]
2442pub use self::CUmemAllocationGranularity_flags_enum as CUmemAllocationGranularity_flags;
2443#[repr(u32)]
2444#[doc = " Specifies the handle type for address range"]
2445#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2446pub enum CUmemRangeHandleType_enum {
2447    CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD = 1,
2448    CU_MEM_RANGE_HANDLE_TYPE_MAX = 2147483647,
2449}
2450#[doc = " Specifies the handle type for address range"]
2451pub use self::CUmemRangeHandleType_enum as CUmemRangeHandleType;
2452#[repr(u32)]
2453#[doc = " Sparse subresource types"]
2454#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2455pub enum CUarraySparseSubresourceType_enum {
2456    CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = 0,
2457    CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = 1,
2458}
2459#[doc = " Sparse subresource types"]
2460pub use self::CUarraySparseSubresourceType_enum as CUarraySparseSubresourceType;
2461#[repr(u32)]
2462#[doc = " Memory operation types"]
2463#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2464pub enum CUmemOperationType_enum {
2465    CU_MEM_OPERATION_TYPE_MAP = 1,
2466    CU_MEM_OPERATION_TYPE_UNMAP = 2,
2467}
2468#[doc = " Memory operation types"]
2469pub use self::CUmemOperationType_enum as CUmemOperationType;
2470#[repr(u32)]
2471#[doc = " Memory handle types"]
2472#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2473pub enum CUmemHandleType_enum {
2474    CU_MEM_HANDLE_TYPE_GENERIC = 0,
2475}
2476#[doc = " Memory handle types"]
2477pub use self::CUmemHandleType_enum as CUmemHandleType;
2478#[doc = " Specifies the CUDA array or CUDA mipmapped array memory mapping information"]
2479#[repr(C)]
2480#[derive(Copy, Clone)]
2481pub struct CUarrayMapInfo_st {
2482    #[doc = "< Resource type"]
2483    pub resourceType: CUresourcetype,
2484    pub resource: CUarrayMapInfo_st__bindgen_ty_1,
2485    #[doc = "< Sparse subresource type"]
2486    pub subresourceType: CUarraySparseSubresourceType,
2487    pub subresource: CUarrayMapInfo_st__bindgen_ty_2,
2488    #[doc = "< Memory operation type"]
2489    pub memOperationType: CUmemOperationType,
2490    #[doc = "< Memory handle type"]
2491    pub memHandleType: CUmemHandleType,
2492    pub memHandle: CUarrayMapInfo_st__bindgen_ty_3,
2493    #[doc = "< Offset within the memory"]
2494    pub offset: ::std::os::raw::c_ulonglong,
2495    #[doc = "< Device ordinal bit mask"]
2496    pub deviceBitMask: ::std::os::raw::c_uint,
2497    #[doc = "< flags for future use, must be zero now."]
2498    pub flags: ::std::os::raw::c_uint,
2499    #[doc = "< Reserved for future use, must be zero now."]
2500    pub reserved: [::std::os::raw::c_uint; 2usize],
2501}
2502#[repr(C)]
2503#[derive(Copy, Clone)]
2504pub union CUarrayMapInfo_st__bindgen_ty_1 {
2505    pub mipmap: CUmipmappedArray,
2506    pub array: CUarray,
2507}
2508#[repr(C)]
2509#[derive(Copy, Clone)]
2510pub union CUarrayMapInfo_st__bindgen_ty_2 {
2511    pub sparseLevel: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1,
2512    pub miptail: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2,
2513}
2514#[repr(C)]
2515#[derive(Debug, Copy, Clone)]
2516pub struct CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1 {
2517    #[doc = "< For CUDA mipmapped arrays must a valid mipmap level. For CUDA arrays must be zero"]
2518    pub level: ::std::os::raw::c_uint,
2519    #[doc = "< For CUDA layered arrays must be a valid layer index. Otherwise, must be zero"]
2520    pub layer: ::std::os::raw::c_uint,
2521    #[doc = "< Starting X offset in elements"]
2522    pub offsetX: ::std::os::raw::c_uint,
2523    #[doc = "< Starting Y offset in elements"]
2524    pub offsetY: ::std::os::raw::c_uint,
2525    #[doc = "< Starting Z offset in elements"]
2526    pub offsetZ: ::std::os::raw::c_uint,
2527    #[doc = "< Width in elements"]
2528    pub extentWidth: ::std::os::raw::c_uint,
2529    #[doc = "< Height in elements"]
2530    pub extentHeight: ::std::os::raw::c_uint,
2531    #[doc = "< Depth in elements"]
2532    pub extentDepth: ::std::os::raw::c_uint,
2533}
2534#[repr(C)]
2535#[derive(Debug, Copy, Clone)]
2536pub struct CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2 {
2537    #[doc = "< For CUDA layered arrays must be a valid layer index. Otherwise, must be zero"]
2538    pub layer: ::std::os::raw::c_uint,
2539    #[doc = "< Offset within mip tail"]
2540    pub offset: ::std::os::raw::c_ulonglong,
2541    #[doc = "< Extent in bytes"]
2542    pub size: ::std::os::raw::c_ulonglong,
2543}
2544#[repr(C)]
2545#[derive(Copy, Clone)]
2546pub union CUarrayMapInfo_st__bindgen_ty_3 {
2547    pub memHandle: CUmemGenericAllocationHandle,
2548}
2549#[doc = " Specifies the CUDA array or CUDA mipmapped array memory mapping information"]
2550pub type CUarrayMapInfo_v1 = CUarrayMapInfo_st;
2551#[doc = " Specifies the CUDA array or CUDA mipmapped array memory mapping information"]
2552pub type CUarrayMapInfo = CUarrayMapInfo_v1;
2553#[doc = " Specifies a memory location."]
2554#[repr(C)]
2555#[derive(Debug, Copy, Clone)]
2556pub struct CUmemLocation_st {
2557    #[doc = "< Specifies the location type, which modifies the meaning of id."]
2558    pub type_: CUmemLocationType,
2559    #[doc = "< identifier for a given this location's ::CUmemLocationType."]
2560    pub id: ::std::os::raw::c_int,
2561}
2562#[doc = " Specifies a memory location."]
2563pub type CUmemLocation_v1 = CUmemLocation_st;
2564#[doc = " Specifies a memory location."]
2565pub type CUmemLocation = CUmemLocation_v1;
2566#[doc = " Specifies the allocation properties for a allocation."]
2567#[repr(C)]
2568#[derive(Debug, Copy, Clone)]
2569pub struct CUmemAllocationProp_st {
2570    #[doc = " Allocation type"]
2571    pub type_: CUmemAllocationType,
2572    #[doc = " requested ::CUmemAllocationHandleType"]
2573    pub requestedHandleTypes: CUmemAllocationHandleType,
2574    #[doc = " Location of allocation"]
2575    pub location: CUmemLocation,
2576    #[doc = " Windows-specific POBJECT_ATTRIBUTES required when\n ::CU_MEM_HANDLE_TYPE_WIN32 is specified.  This object atributes structure\n includes security attributes that define\n the scope of which exported allocations may be tranferred to other\n processes.  In all other cases, this field is required to be zero."]
2577    pub win32HandleMetaData: *mut ::std::os::raw::c_void,
2578    pub allocFlags: CUmemAllocationProp_st__bindgen_ty_1,
2579}
2580#[repr(C)]
2581#[derive(Debug, Copy, Clone)]
2582pub struct CUmemAllocationProp_st__bindgen_ty_1 {
2583    #[doc = " Allocation hint for requesting compressible memory.\n On devices that support Compute Data Compression, compressible\n memory can be used to accelerate accesses to data with unstructured\n sparsity and other compressible data patterns. Applications are\n expected to query allocation property of the handle obtained with\n ::cuMemCreate using ::cuMemGetAllocationPropertiesFromHandle to\n validate if the obtained allocation is compressible or not. Note that\n compressed memory may not be mappable on all devices."]
2584    pub compressionType: ::std::os::raw::c_uchar,
2585    pub gpuDirectRDMACapable: ::std::os::raw::c_uchar,
2586    #[doc = " Bitmask indicating intended usage for this allocation"]
2587    pub usage: ::std::os::raw::c_ushort,
2588    pub reserved: [::std::os::raw::c_uchar; 4usize],
2589}
2590#[doc = " Specifies the allocation properties for a allocation."]
2591pub type CUmemAllocationProp_v1 = CUmemAllocationProp_st;
2592#[doc = " Specifies the allocation properties for a allocation."]
2593pub type CUmemAllocationProp = CUmemAllocationProp_v1;
2594#[doc = " Memory access descriptor"]
2595#[repr(C)]
2596#[derive(Debug, Copy, Clone)]
2597pub struct CUmemAccessDesc_st {
2598    #[doc = "< Location on which the request is to change it's accessibility"]
2599    pub location: CUmemLocation,
2600    #[doc = "< ::CUmemProt accessibility flags to set on the request"]
2601    pub flags: CUmemAccess_flags,
2602}
2603#[doc = " Memory access descriptor"]
2604pub type CUmemAccessDesc_v1 = CUmemAccessDesc_st;
2605#[doc = " Memory access descriptor"]
2606pub type CUmemAccessDesc = CUmemAccessDesc_v1;
2607#[repr(u32)]
2608#[doc = " CUDA Graph Update error types"]
2609#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2610pub enum CUgraphExecUpdateResult_enum {
2611    #[doc = "< The update succeeded"]
2612    CU_GRAPH_EXEC_UPDATE_SUCCESS = 0,
2613    #[doc = "< The update failed for an unexpected reason which is described in the return value of the function"]
2614    CU_GRAPH_EXEC_UPDATE_ERROR = 1,
2615    #[doc = "< The update failed because the topology changed"]
2616    CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = 2,
2617    #[doc = "< The update failed because a node type changed"]
2618    CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = 3,
2619    #[doc = "< The update failed because the function of a kernel node changed (CUDA driver < 11.2)"]
2620    CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = 4,
2621    #[doc = "< The update failed because the parameters changed in a way that is not supported"]
2622    CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = 5,
2623    #[doc = "< The update failed because something about the node is not supported"]
2624    CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = 6,
2625    #[doc = "< The update failed because the function of a kernel node changed in an unsupported way"]
2626    CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = 7,
2627    #[doc = "< The update failed because the node attributes changed in a way that is not supported"]
2628    CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = 8,
2629}
2630#[doc = " CUDA Graph Update error types"]
2631pub use self::CUgraphExecUpdateResult_enum as CUgraphExecUpdateResult;
2632#[doc = " Result information returned by cuGraphExecUpdate"]
2633#[repr(C)]
2634#[derive(Debug, Copy, Clone)]
2635pub struct CUgraphExecUpdateResultInfo_st {
2636    #[doc = " Gives more specific detail when a cuda graph update fails."]
2637    pub result: CUgraphExecUpdateResult,
2638    #[doc = " The \"to node\" of the error edge when the topologies do not match.\n The error node when the error is associated with a specific node.\n NULL when the error is generic."]
2639    pub errorNode: CUgraphNode,
2640    #[doc = " The from node of error edge when the topologies do not match. Otherwise NULL."]
2641    pub errorFromNode: CUgraphNode,
2642}
2643#[doc = " Result information returned by cuGraphExecUpdate"]
2644pub type CUgraphExecUpdateResultInfo_v1 = CUgraphExecUpdateResultInfo_st;
2645#[doc = " Result information returned by cuGraphExecUpdate"]
2646pub type CUgraphExecUpdateResultInfo = CUgraphExecUpdateResultInfo_v1;
2647#[repr(u32)]
2648#[doc = " CUDA memory pool attributes"]
2649#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2650pub enum CUmemPool_attribute_enum {
2651    #[doc = " (value type = int)\n Allow cuMemAllocAsync to use memory asynchronously freed\n in another streams as long as a stream ordering dependency\n of the allocating stream on the free action exists.\n Cuda events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)"]
2652    CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = 1,
2653    #[doc = " (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)"]
2654    CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = 2,
2655    #[doc = " (value type = int)\n Allow cuMemAllocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by cuFreeAsync (default enabled)."]
2656    CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = 3,
2657    #[doc = " (value type = cuuint64_t)\n Amount of reserved memory in bytes to hold onto before trying\n to release memory back to the OS. When more than the release\n threshold bytes of memory are held by the memory pool, the\n allocator will try to release memory back to the OS on the\n next call to stream, event or context synchronize. (default 0)"]
2658    CU_MEMPOOL_ATTR_RELEASE_THRESHOLD = 4,
2659    #[doc = " (value type = cuuint64_t)\n Amount of backing memory currently allocated for the mempool."]
2660    CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT = 5,
2661    #[doc = " (value type = cuuint64_t)\n High watermark of backing memory allocated for the mempool since the\n last time it was reset. High watermark can only be reset to zero."]
2662    CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH = 6,
2663    #[doc = " (value type = cuuint64_t)\n Amount of memory from the pool that is currently in use by the application."]
2664    CU_MEMPOOL_ATTR_USED_MEM_CURRENT = 7,
2665    #[doc = " (value type = cuuint64_t)\n High watermark of the amount of memory from the pool that was in use by the application since\n the last time it was reset. High watermark can only be reset to zero."]
2666    CU_MEMPOOL_ATTR_USED_MEM_HIGH = 8,
2667}
2668#[doc = " CUDA memory pool attributes"]
2669pub use self::CUmemPool_attribute_enum as CUmemPool_attribute;
2670#[doc = " Specifies the properties of allocations made from the pool."]
2671#[repr(C)]
2672#[derive(Debug, Copy, Clone)]
2673pub struct CUmemPoolProps_st {
2674    #[doc = "< Allocation type. Currently must be specified as CU_MEM_ALLOCATION_TYPE_PINNED"]
2675    pub allocType: CUmemAllocationType,
2676    #[doc = "< Handle types that will be supported by allocations from the pool."]
2677    pub handleTypes: CUmemAllocationHandleType,
2678    #[doc = "< Location where allocations should reside."]
2679    pub location: CUmemLocation,
2680    #[doc = " Windows-specific LPSECURITYATTRIBUTES required when\n ::CU_MEM_HANDLE_TYPE_WIN32 is specified.  This security attribute defines\n the scope of which exported allocations may be tranferred to other\n processes.  In all other cases, this field is required to be zero."]
2681    pub win32SecurityAttributes: *mut ::std::os::raw::c_void,
2682    #[doc = "< reserved for future use, must be 0"]
2683    pub reserved: [::std::os::raw::c_uchar; 64usize],
2684}
2685#[doc = " Specifies the properties of allocations made from the pool."]
2686pub type CUmemPoolProps_v1 = CUmemPoolProps_st;
2687#[doc = " Specifies the properties of allocations made from the pool."]
2688pub type CUmemPoolProps = CUmemPoolProps_v1;
2689#[doc = " Opaque data for exporting a pool allocation"]
2690#[repr(C)]
2691#[derive(Debug, Copy, Clone)]
2692pub struct CUmemPoolPtrExportData_st {
2693    pub reserved: [::std::os::raw::c_uchar; 64usize],
2694}
2695#[doc = " Opaque data for exporting a pool allocation"]
2696pub type CUmemPoolPtrExportData_v1 = CUmemPoolPtrExportData_st;
2697#[doc = " Opaque data for exporting a pool allocation"]
2698pub type CUmemPoolPtrExportData = CUmemPoolPtrExportData_v1;
2699#[doc = " Memory allocation node parameters"]
2700#[repr(C)]
2701#[derive(Debug, Copy, Clone)]
2702pub struct CUDA_MEM_ALLOC_NODE_PARAMS_st {
2703    #[doc = " in: location where the allocation should reside (specified in ::location).\n ::handleTypes must be ::CU_MEM_HANDLE_TYPE_NONE. IPC is not supported."]
2704    pub poolProps: CUmemPoolProps,
2705    #[doc = "< in: array of memory access descriptors. Used to describe peer GPU access"]
2706    pub accessDescs: *const CUmemAccessDesc,
2707    #[doc = "< in: number of memory access descriptors.  Must not exceed the number of GPUs."]
2708    pub accessDescCount: usize,
2709    #[doc = "< in: size in bytes of the requested allocation"]
2710    pub bytesize: usize,
2711    #[doc = "< out: address of the allocation returned by CUDA"]
2712    pub dptr: CUdeviceptr,
2713}
2714#[doc = " Memory allocation node parameters"]
2715pub type CUDA_MEM_ALLOC_NODE_PARAMS = CUDA_MEM_ALLOC_NODE_PARAMS_st;
2716#[repr(u32)]
2717#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2718pub enum CUgraphMem_attribute_enum {
2719    #[doc = " (value type = cuuint64_t)\n Amount of memory, in bytes, currently associated with graphs"]
2720    CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT = 0,
2721    #[doc = " (value type = cuuint64_t)\n High watermark of memory, in bytes, associated with graphs since the\n last time it was reset.  High watermark can only be reset to zero."]
2722    CU_GRAPH_MEM_ATTR_USED_MEM_HIGH = 1,
2723    #[doc = " (value type = cuuint64_t)\n Amount of memory, in bytes, currently allocated for use by\n the CUDA graphs asynchronous allocator."]
2724    CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT = 2,
2725    #[doc = " (value type = cuuint64_t)\n High watermark of memory, in bytes, currently allocated for use by\n the CUDA graphs asynchronous allocator."]
2726    CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = 3,
2727}
2728pub use self::CUgraphMem_attribute_enum as CUgraphMem_attribute;
2729#[repr(u32)]
2730#[doc = " The scopes for ::cuFlushGPUDirectRDMAWrites"]
2731#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2732pub enum CUflushGPUDirectRDMAWritesScope_enum {
2733    #[doc = "< Blocks until remote writes are visible to the CUDA device context owning the data."]
2734    CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER = 100,
2735    #[doc = "< Blocks until remote writes are visible to all CUDA device contexts."]
2736    CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = 200,
2737}
2738#[doc = " The scopes for ::cuFlushGPUDirectRDMAWrites"]
2739pub use self::CUflushGPUDirectRDMAWritesScope_enum as CUflushGPUDirectRDMAWritesScope;
2740#[repr(u32)]
2741#[doc = " The targets for ::cuFlushGPUDirectRDMAWrites"]
2742#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2743pub enum CUflushGPUDirectRDMAWritesTarget_enum {
2744    #[doc = "< Sets the target for ::cuFlushGPUDirectRDMAWrites() to the currently active CUDA device context."]
2745    CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = 0,
2746}
2747#[doc = " The targets for ::cuFlushGPUDirectRDMAWrites"]
2748pub use self::CUflushGPUDirectRDMAWritesTarget_enum as CUflushGPUDirectRDMAWritesTarget;
2749#[repr(u32)]
2750#[doc = " CUDA Lazy Loading status"]
2751#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2752pub enum CUmoduleLoadingMode_enum {
2753    #[doc = "< Lazy Kernel Loading is not enabled"]
2754    CU_MODULE_EAGER_LOADING = 1,
2755    #[doc = "< Lazy Kernel Loading is enabled"]
2756    CU_MODULE_LAZY_LOADING = 2,
2757}
2758#[doc = " CUDA Lazy Loading status"]
2759pub use self::CUmoduleLoadingMode_enum as CUmoduleLoadingMode;
2760extern crate libloading;
2761pub struct cuda {
2762    __library: ::libloading::Library,
2763    pub cuGetErrorString: Result<
2764        unsafe extern "C" fn(error: CUresult, pStr: *mut *const ::std::os::raw::c_char) -> CUresult,
2765        ::libloading::Error,
2766    >,
2767    pub cuGetErrorName: Result<
2768        unsafe extern "C" fn(error: CUresult, pStr: *mut *const ::std::os::raw::c_char) -> CUresult,
2769        ::libloading::Error,
2770    >,
2771    pub cuInit: Result<
2772        unsafe extern "C" fn(Flags: ::std::os::raw::c_uint) -> CUresult,
2773        ::libloading::Error,
2774    >,
2775    pub cuDriverGetVersion: Result<
2776        unsafe extern "C" fn(driverVersion: *mut ::std::os::raw::c_int) -> CUresult,
2777        ::libloading::Error,
2778    >,
2779    pub cuDeviceGet: Result<
2780        unsafe extern "C" fn(device: *mut CUdevice, ordinal: ::std::os::raw::c_int) -> CUresult,
2781        ::libloading::Error,
2782    >,
2783    pub cuDeviceGetCount: Result<
2784        unsafe extern "C" fn(count: *mut ::std::os::raw::c_int) -> CUresult,
2785        ::libloading::Error,
2786    >,
2787    pub cuDeviceGetName: Result<
2788        unsafe extern "C" fn(
2789            name: *mut ::std::os::raw::c_char,
2790            len: ::std::os::raw::c_int,
2791            dev: CUdevice,
2792        ) -> CUresult,
2793        ::libloading::Error,
2794    >,
2795    pub cuDeviceGetUuid: Result<
2796        unsafe extern "C" fn(uuid: *mut CUuuid, dev: CUdevice) -> CUresult,
2797        ::libloading::Error,
2798    >,
2799    pub cuDeviceGetUuid_v2: Result<
2800        unsafe extern "C" fn(uuid: *mut CUuuid, dev: CUdevice) -> CUresult,
2801        ::libloading::Error,
2802    >,
2803    pub cuDeviceGetLuid: Result<
2804        unsafe extern "C" fn(
2805            luid: *mut ::std::os::raw::c_char,
2806            deviceNodeMask: *mut ::std::os::raw::c_uint,
2807            dev: CUdevice,
2808        ) -> CUresult,
2809        ::libloading::Error,
2810    >,
2811    pub cuDeviceTotalMem_v2: Result<
2812        unsafe extern "C" fn(bytes: *mut usize, dev: CUdevice) -> CUresult,
2813        ::libloading::Error,
2814    >,
2815    pub cuDeviceGetTexture1DLinearMaxWidth: Result<
2816        unsafe extern "C" fn(
2817            maxWidthInElements: *mut usize,
2818            format: CUarray_format,
2819            numChannels: ::std::os::raw::c_uint,
2820            dev: CUdevice,
2821        ) -> CUresult,
2822        ::libloading::Error,
2823    >,
2824    pub cuDeviceGetAttribute: Result<
2825        unsafe extern "C" fn(
2826            pi: *mut ::std::os::raw::c_int,
2827            attrib: CUdevice_attribute,
2828            dev: CUdevice,
2829        ) -> CUresult,
2830        ::libloading::Error,
2831    >,
2832    pub cuDeviceGetNvSciSyncAttributes: Result<
2833        unsafe extern "C" fn(
2834            nvSciSyncAttrList: *mut ::std::os::raw::c_void,
2835            dev: CUdevice,
2836            flags: ::std::os::raw::c_int,
2837        ) -> CUresult,
2838        ::libloading::Error,
2839    >,
2840    pub cuDeviceSetMemPool: Result<
2841        unsafe extern "C" fn(dev: CUdevice, pool: CUmemoryPool) -> CUresult,
2842        ::libloading::Error,
2843    >,
2844    pub cuDeviceGetMemPool: Result<
2845        unsafe extern "C" fn(pool: *mut CUmemoryPool, dev: CUdevice) -> CUresult,
2846        ::libloading::Error,
2847    >,
2848    pub cuDeviceGetDefaultMemPool: Result<
2849        unsafe extern "C" fn(pool_out: *mut CUmemoryPool, dev: CUdevice) -> CUresult,
2850        ::libloading::Error,
2851    >,
2852    pub cuDeviceGetExecAffinitySupport: Result<
2853        unsafe extern "C" fn(
2854            pi: *mut ::std::os::raw::c_int,
2855            type_: CUexecAffinityType,
2856            dev: CUdevice,
2857        ) -> CUresult,
2858        ::libloading::Error,
2859    >,
2860    pub cuFlushGPUDirectRDMAWrites: Result<
2861        unsafe extern "C" fn(
2862            target: CUflushGPUDirectRDMAWritesTarget,
2863            scope: CUflushGPUDirectRDMAWritesScope,
2864        ) -> CUresult,
2865        ::libloading::Error,
2866    >,
2867    pub cuDeviceGetProperties: Result<
2868        unsafe extern "C" fn(prop: *mut CUdevprop, dev: CUdevice) -> CUresult,
2869        ::libloading::Error,
2870    >,
2871    pub cuDeviceComputeCapability: Result<
2872        unsafe extern "C" fn(
2873            major: *mut ::std::os::raw::c_int,
2874            minor: *mut ::std::os::raw::c_int,
2875            dev: CUdevice,
2876        ) -> CUresult,
2877        ::libloading::Error,
2878    >,
2879    pub cuDevicePrimaryCtxRetain: Result<
2880        unsafe extern "C" fn(pctx: *mut CUcontext, dev: CUdevice) -> CUresult,
2881        ::libloading::Error,
2882    >,
2883    pub cuDevicePrimaryCtxRelease_v2:
2884        Result<unsafe extern "C" fn(dev: CUdevice) -> CUresult, ::libloading::Error>,
2885    pub cuDevicePrimaryCtxSetFlags_v2: Result<
2886        unsafe extern "C" fn(dev: CUdevice, flags: ::std::os::raw::c_uint) -> CUresult,
2887        ::libloading::Error,
2888    >,
2889    pub cuDevicePrimaryCtxGetState: Result<
2890        unsafe extern "C" fn(
2891            dev: CUdevice,
2892            flags: *mut ::std::os::raw::c_uint,
2893            active: *mut ::std::os::raw::c_int,
2894        ) -> CUresult,
2895        ::libloading::Error,
2896    >,
2897    pub cuDevicePrimaryCtxReset_v2:
2898        Result<unsafe extern "C" fn(dev: CUdevice) -> CUresult, ::libloading::Error>,
2899    pub cuCtxCreate_v2: Result<
2900        unsafe extern "C" fn(
2901            pctx: *mut CUcontext,
2902            flags: ::std::os::raw::c_uint,
2903            dev: CUdevice,
2904        ) -> CUresult,
2905        ::libloading::Error,
2906    >,
2907    pub cuCtxCreate_v3: Result<
2908        unsafe extern "C" fn(
2909            pctx: *mut CUcontext,
2910            paramsArray: *mut CUexecAffinityParam,
2911            numParams: ::std::os::raw::c_int,
2912            flags: ::std::os::raw::c_uint,
2913            dev: CUdevice,
2914        ) -> CUresult,
2915        ::libloading::Error,
2916    >,
2917    pub cuCtxDestroy_v2:
2918        Result<unsafe extern "C" fn(ctx: CUcontext) -> CUresult, ::libloading::Error>,
2919    pub cuCtxPushCurrent_v2:
2920        Result<unsafe extern "C" fn(ctx: CUcontext) -> CUresult, ::libloading::Error>,
2921    pub cuCtxPopCurrent_v2:
2922        Result<unsafe extern "C" fn(pctx: *mut CUcontext) -> CUresult, ::libloading::Error>,
2923    pub cuCtxSetCurrent:
2924        Result<unsafe extern "C" fn(ctx: CUcontext) -> CUresult, ::libloading::Error>,
2925    pub cuCtxGetCurrent:
2926        Result<unsafe extern "C" fn(pctx: *mut CUcontext) -> CUresult, ::libloading::Error>,
2927    pub cuCtxGetDevice:
2928        Result<unsafe extern "C" fn(device: *mut CUdevice) -> CUresult, ::libloading::Error>,
2929    pub cuCtxGetFlags: Result<
2930        unsafe extern "C" fn(flags: *mut ::std::os::raw::c_uint) -> CUresult,
2931        ::libloading::Error,
2932    >,
2933    pub cuCtxGetId: Result<
2934        unsafe extern "C" fn(ctx: CUcontext, ctxId: *mut ::std::os::raw::c_ulonglong) -> CUresult,
2935        ::libloading::Error,
2936    >,
2937    pub cuCtxSynchronize: Result<unsafe extern "C" fn() -> CUresult, ::libloading::Error>,
2938    pub cuCtxSetLimit:
2939        Result<unsafe extern "C" fn(limit: CUlimit, value: usize) -> CUresult, ::libloading::Error>,
2940    pub cuCtxGetLimit: Result<
2941        unsafe extern "C" fn(pvalue: *mut usize, limit: CUlimit) -> CUresult,
2942        ::libloading::Error,
2943    >,
2944    pub cuCtxGetCacheConfig:
2945        Result<unsafe extern "C" fn(pconfig: *mut CUfunc_cache) -> CUresult, ::libloading::Error>,
2946    pub cuCtxSetCacheConfig:
2947        Result<unsafe extern "C" fn(config: CUfunc_cache) -> CUresult, ::libloading::Error>,
2948    pub cuCtxGetSharedMemConfig:
2949        Result<unsafe extern "C" fn(pConfig: *mut CUsharedconfig) -> CUresult, ::libloading::Error>,
2950    pub cuCtxSetSharedMemConfig:
2951        Result<unsafe extern "C" fn(config: CUsharedconfig) -> CUresult, ::libloading::Error>,
2952    pub cuCtxGetApiVersion: Result<
2953        unsafe extern "C" fn(ctx: CUcontext, version: *mut ::std::os::raw::c_uint) -> CUresult,
2954        ::libloading::Error,
2955    >,
2956    pub cuCtxGetStreamPriorityRange: Result<
2957        unsafe extern "C" fn(
2958            leastPriority: *mut ::std::os::raw::c_int,
2959            greatestPriority: *mut ::std::os::raw::c_int,
2960        ) -> CUresult,
2961        ::libloading::Error,
2962    >,
2963    pub cuCtxResetPersistingL2Cache:
2964        Result<unsafe extern "C" fn() -> CUresult, ::libloading::Error>,
2965    pub cuCtxGetExecAffinity: Result<
2966        unsafe extern "C" fn(
2967            pExecAffinity: *mut CUexecAffinityParam,
2968            type_: CUexecAffinityType,
2969        ) -> CUresult,
2970        ::libloading::Error,
2971    >,
2972    pub cuCtxAttach: Result<
2973        unsafe extern "C" fn(pctx: *mut CUcontext, flags: ::std::os::raw::c_uint) -> CUresult,
2974        ::libloading::Error,
2975    >,
2976    pub cuCtxDetach: Result<unsafe extern "C" fn(ctx: CUcontext) -> CUresult, ::libloading::Error>,
2977    pub cuModuleLoad: Result<
2978        unsafe extern "C" fn(
2979            module: *mut CUmodule,
2980            fname: *const ::std::os::raw::c_char,
2981        ) -> CUresult,
2982        ::libloading::Error,
2983    >,
2984    pub cuModuleLoadData: Result<
2985        unsafe extern "C" fn(
2986            module: *mut CUmodule,
2987            image: *const ::std::os::raw::c_void,
2988        ) -> CUresult,
2989        ::libloading::Error,
2990    >,
2991    pub cuModuleLoadDataEx: Result<
2992        unsafe extern "C" fn(
2993            module: *mut CUmodule,
2994            image: *const ::std::os::raw::c_void,
2995            numOptions: ::std::os::raw::c_uint,
2996            options: *mut CUjit_option,
2997            optionValues: *mut *mut ::std::os::raw::c_void,
2998        ) -> CUresult,
2999        ::libloading::Error,
3000    >,
3001    pub cuModuleLoadFatBinary: Result<
3002        unsafe extern "C" fn(
3003            module: *mut CUmodule,
3004            fatCubin: *const ::std::os::raw::c_void,
3005        ) -> CUresult,
3006        ::libloading::Error,
3007    >,
3008    pub cuModuleUnload:
3009        Result<unsafe extern "C" fn(hmod: CUmodule) -> CUresult, ::libloading::Error>,
3010    pub cuModuleGetLoadingMode: Result<
3011        unsafe extern "C" fn(mode: *mut CUmoduleLoadingMode) -> CUresult,
3012        ::libloading::Error,
3013    >,
3014    pub cuModuleGetFunction: Result<
3015        unsafe extern "C" fn(
3016            hfunc: *mut CUfunction,
3017            hmod: CUmodule,
3018            name: *const ::std::os::raw::c_char,
3019        ) -> CUresult,
3020        ::libloading::Error,
3021    >,
3022    pub cuModuleGetGlobal_v2: Result<
3023        unsafe extern "C" fn(
3024            dptr: *mut CUdeviceptr,
3025            bytes: *mut usize,
3026            hmod: CUmodule,
3027            name: *const ::std::os::raw::c_char,
3028        ) -> CUresult,
3029        ::libloading::Error,
3030    >,
3031    pub cuLinkCreate_v2: Result<
3032        unsafe extern "C" fn(
3033            numOptions: ::std::os::raw::c_uint,
3034            options: *mut CUjit_option,
3035            optionValues: *mut *mut ::std::os::raw::c_void,
3036            stateOut: *mut CUlinkState,
3037        ) -> CUresult,
3038        ::libloading::Error,
3039    >,
3040    pub cuLinkAddData_v2: Result<
3041        unsafe extern "C" fn(
3042            state: CUlinkState,
3043            type_: CUjitInputType,
3044            data: *mut ::std::os::raw::c_void,
3045            size: usize,
3046            name: *const ::std::os::raw::c_char,
3047            numOptions: ::std::os::raw::c_uint,
3048            options: *mut CUjit_option,
3049            optionValues: *mut *mut ::std::os::raw::c_void,
3050        ) -> CUresult,
3051        ::libloading::Error,
3052    >,
3053    pub cuLinkAddFile_v2: Result<
3054        unsafe extern "C" fn(
3055            state: CUlinkState,
3056            type_: CUjitInputType,
3057            path: *const ::std::os::raw::c_char,
3058            numOptions: ::std::os::raw::c_uint,
3059            options: *mut CUjit_option,
3060            optionValues: *mut *mut ::std::os::raw::c_void,
3061        ) -> CUresult,
3062        ::libloading::Error,
3063    >,
3064    pub cuLinkComplete: Result<
3065        unsafe extern "C" fn(
3066            state: CUlinkState,
3067            cubinOut: *mut *mut ::std::os::raw::c_void,
3068            sizeOut: *mut usize,
3069        ) -> CUresult,
3070        ::libloading::Error,
3071    >,
3072    pub cuLinkDestroy:
3073        Result<unsafe extern "C" fn(state: CUlinkState) -> CUresult, ::libloading::Error>,
3074    pub cuModuleGetTexRef: Result<
3075        unsafe extern "C" fn(
3076            pTexRef: *mut CUtexref,
3077            hmod: CUmodule,
3078            name: *const ::std::os::raw::c_char,
3079        ) -> CUresult,
3080        ::libloading::Error,
3081    >,
3082    pub cuModuleGetSurfRef: Result<
3083        unsafe extern "C" fn(
3084            pSurfRef: *mut CUsurfref,
3085            hmod: CUmodule,
3086            name: *const ::std::os::raw::c_char,
3087        ) -> CUresult,
3088        ::libloading::Error,
3089    >,
3090    pub cuLibraryLoadData: Result<
3091        unsafe extern "C" fn(
3092            library: *mut CUlibrary,
3093            code: *const ::std::os::raw::c_void,
3094            jitOptions: *mut CUjit_option,
3095            jitOptionsValues: *mut *mut ::std::os::raw::c_void,
3096            numJitOptions: ::std::os::raw::c_uint,
3097            libraryOptions: *mut CUlibraryOption,
3098            libraryOptionValues: *mut *mut ::std::os::raw::c_void,
3099            numLibraryOptions: ::std::os::raw::c_uint,
3100        ) -> CUresult,
3101        ::libloading::Error,
3102    >,
3103    pub cuLibraryLoadFromFile: Result<
3104        unsafe extern "C" fn(
3105            library: *mut CUlibrary,
3106            fileName: *const ::std::os::raw::c_char,
3107            jitOptions: *mut CUjit_option,
3108            jitOptionsValues: *mut *mut ::std::os::raw::c_void,
3109            numJitOptions: ::std::os::raw::c_uint,
3110            libraryOptions: *mut CUlibraryOption,
3111            libraryOptionValues: *mut *mut ::std::os::raw::c_void,
3112            numLibraryOptions: ::std::os::raw::c_uint,
3113        ) -> CUresult,
3114        ::libloading::Error,
3115    >,
3116    pub cuLibraryUnload:
3117        Result<unsafe extern "C" fn(library: CUlibrary) -> CUresult, ::libloading::Error>,
3118    pub cuLibraryGetKernel: Result<
3119        unsafe extern "C" fn(
3120            pKernel: *mut CUkernel,
3121            library: CUlibrary,
3122            name: *const ::std::os::raw::c_char,
3123        ) -> CUresult,
3124        ::libloading::Error,
3125    >,
3126    pub cuLibraryGetModule: Result<
3127        unsafe extern "C" fn(pMod: *mut CUmodule, library: CUlibrary) -> CUresult,
3128        ::libloading::Error,
3129    >,
3130    pub cuKernelGetFunction: Result<
3131        unsafe extern "C" fn(pFunc: *mut CUfunction, kernel: CUkernel) -> CUresult,
3132        ::libloading::Error,
3133    >,
3134    pub cuLibraryGetGlobal: Result<
3135        unsafe extern "C" fn(
3136            dptr: *mut CUdeviceptr,
3137            bytes: *mut usize,
3138            library: CUlibrary,
3139            name: *const ::std::os::raw::c_char,
3140        ) -> CUresult,
3141        ::libloading::Error,
3142    >,
3143    pub cuLibraryGetManaged: Result<
3144        unsafe extern "C" fn(
3145            dptr: *mut CUdeviceptr,
3146            bytes: *mut usize,
3147            library: CUlibrary,
3148            name: *const ::std::os::raw::c_char,
3149        ) -> CUresult,
3150        ::libloading::Error,
3151    >,
3152    pub cuLibraryGetUnifiedFunction: Result<
3153        unsafe extern "C" fn(
3154            fptr: *mut *mut ::std::os::raw::c_void,
3155            library: CUlibrary,
3156            symbol: *const ::std::os::raw::c_char,
3157        ) -> CUresult,
3158        ::libloading::Error,
3159    >,
3160    pub cuKernelGetAttribute: Result<
3161        unsafe extern "C" fn(
3162            pi: *mut ::std::os::raw::c_int,
3163            attrib: CUfunction_attribute,
3164            kernel: CUkernel,
3165            dev: CUdevice,
3166        ) -> CUresult,
3167        ::libloading::Error,
3168    >,
3169    pub cuKernelSetAttribute: Result<
3170        unsafe extern "C" fn(
3171            attrib: CUfunction_attribute,
3172            val: ::std::os::raw::c_int,
3173            kernel: CUkernel,
3174            dev: CUdevice,
3175        ) -> CUresult,
3176        ::libloading::Error,
3177    >,
3178    pub cuKernelSetCacheConfig: Result<
3179        unsafe extern "C" fn(kernel: CUkernel, config: CUfunc_cache, dev: CUdevice) -> CUresult,
3180        ::libloading::Error,
3181    >,
3182    pub cuMemGetInfo_v2: Result<
3183        unsafe extern "C" fn(free: *mut usize, total: *mut usize) -> CUresult,
3184        ::libloading::Error,
3185    >,
3186    pub cuMemAlloc_v2: Result<
3187        unsafe extern "C" fn(dptr: *mut CUdeviceptr, bytesize: usize) -> CUresult,
3188        ::libloading::Error,
3189    >,
3190    pub cuMemAllocPitch_v2: Result<
3191        unsafe extern "C" fn(
3192            dptr: *mut CUdeviceptr,
3193            pPitch: *mut usize,
3194            WidthInBytes: usize,
3195            Height: usize,
3196            ElementSizeBytes: ::std::os::raw::c_uint,
3197        ) -> CUresult,
3198        ::libloading::Error,
3199    >,
3200    pub cuMemFree_v2:
3201        Result<unsafe extern "C" fn(dptr: CUdeviceptr) -> CUresult, ::libloading::Error>,
3202    pub cuMemGetAddressRange_v2: Result<
3203        unsafe extern "C" fn(
3204            pbase: *mut CUdeviceptr,
3205            psize: *mut usize,
3206            dptr: CUdeviceptr,
3207        ) -> CUresult,
3208        ::libloading::Error,
3209    >,
3210    pub cuMemAllocHost_v2: Result<
3211        unsafe extern "C" fn(pp: *mut *mut ::std::os::raw::c_void, bytesize: usize) -> CUresult,
3212        ::libloading::Error,
3213    >,
3214    pub cuMemFreeHost: Result<
3215        unsafe extern "C" fn(p: *mut ::std::os::raw::c_void) -> CUresult,
3216        ::libloading::Error,
3217    >,
3218    pub cuMemHostAlloc: Result<
3219        unsafe extern "C" fn(
3220            pp: *mut *mut ::std::os::raw::c_void,
3221            bytesize: usize,
3222            Flags: ::std::os::raw::c_uint,
3223        ) -> CUresult,
3224        ::libloading::Error,
3225    >,
3226    pub cuMemHostGetDevicePointer_v2: Result<
3227        unsafe extern "C" fn(
3228            pdptr: *mut CUdeviceptr,
3229            p: *mut ::std::os::raw::c_void,
3230            Flags: ::std::os::raw::c_uint,
3231        ) -> CUresult,
3232        ::libloading::Error,
3233    >,
3234    pub cuMemHostGetFlags: Result<
3235        unsafe extern "C" fn(
3236            pFlags: *mut ::std::os::raw::c_uint,
3237            p: *mut ::std::os::raw::c_void,
3238        ) -> CUresult,
3239        ::libloading::Error,
3240    >,
3241    pub cuMemAllocManaged: Result<
3242        unsafe extern "C" fn(
3243            dptr: *mut CUdeviceptr,
3244            bytesize: usize,
3245            flags: ::std::os::raw::c_uint,
3246        ) -> CUresult,
3247        ::libloading::Error,
3248    >,
3249    pub cuDeviceGetByPCIBusId: Result<
3250        unsafe extern "C" fn(
3251            dev: *mut CUdevice,
3252            pciBusId: *const ::std::os::raw::c_char,
3253        ) -> CUresult,
3254        ::libloading::Error,
3255    >,
3256    pub cuDeviceGetPCIBusId: Result<
3257        unsafe extern "C" fn(
3258            pciBusId: *mut ::std::os::raw::c_char,
3259            len: ::std::os::raw::c_int,
3260            dev: CUdevice,
3261        ) -> CUresult,
3262        ::libloading::Error,
3263    >,
3264    pub cuIpcGetEventHandle: Result<
3265        unsafe extern "C" fn(pHandle: *mut CUipcEventHandle, event: CUevent) -> CUresult,
3266        ::libloading::Error,
3267    >,
3268    pub cuIpcOpenEventHandle: Result<
3269        unsafe extern "C" fn(phEvent: *mut CUevent, handle: CUipcEventHandle) -> CUresult,
3270        ::libloading::Error,
3271    >,
3272    pub cuIpcGetMemHandle: Result<
3273        unsafe extern "C" fn(pHandle: *mut CUipcMemHandle, dptr: CUdeviceptr) -> CUresult,
3274        ::libloading::Error,
3275    >,
3276    pub cuIpcOpenMemHandle_v2: Result<
3277        unsafe extern "C" fn(
3278            pdptr: *mut CUdeviceptr,
3279            handle: CUipcMemHandle,
3280            Flags: ::std::os::raw::c_uint,
3281        ) -> CUresult,
3282        ::libloading::Error,
3283    >,
3284    pub cuIpcCloseMemHandle:
3285        Result<unsafe extern "C" fn(dptr: CUdeviceptr) -> CUresult, ::libloading::Error>,
3286    pub cuMemHostRegister_v2: Result<
3287        unsafe extern "C" fn(
3288            p: *mut ::std::os::raw::c_void,
3289            bytesize: usize,
3290            Flags: ::std::os::raw::c_uint,
3291        ) -> CUresult,
3292        ::libloading::Error,
3293    >,
3294    pub cuMemHostUnregister: Result<
3295        unsafe extern "C" fn(p: *mut ::std::os::raw::c_void) -> CUresult,
3296        ::libloading::Error,
3297    >,
3298    pub cuMemcpy: Result<
3299        unsafe extern "C" fn(dst: CUdeviceptr, src: CUdeviceptr, ByteCount: usize) -> CUresult,
3300        ::libloading::Error,
3301    >,
3302    pub cuMemcpyPeer: Result<
3303        unsafe extern "C" fn(
3304            dstDevice: CUdeviceptr,
3305            dstContext: CUcontext,
3306            srcDevice: CUdeviceptr,
3307            srcContext: CUcontext,
3308            ByteCount: usize,
3309        ) -> CUresult,
3310        ::libloading::Error,
3311    >,
3312    pub cuMemcpyHtoD_v2: Result<
3313        unsafe extern "C" fn(
3314            dstDevice: CUdeviceptr,
3315            srcHost: *const ::std::os::raw::c_void,
3316            ByteCount: usize,
3317        ) -> CUresult,
3318        ::libloading::Error,
3319    >,
3320    pub cuMemcpyDtoH_v2: Result<
3321        unsafe extern "C" fn(
3322            dstHost: *mut ::std::os::raw::c_void,
3323            srcDevice: CUdeviceptr,
3324            ByteCount: usize,
3325        ) -> CUresult,
3326        ::libloading::Error,
3327    >,
3328    pub cuMemcpyDtoD_v2: Result<
3329        unsafe extern "C" fn(
3330            dstDevice: CUdeviceptr,
3331            srcDevice: CUdeviceptr,
3332            ByteCount: usize,
3333        ) -> CUresult,
3334        ::libloading::Error,
3335    >,
3336    pub cuMemcpyDtoA_v2: Result<
3337        unsafe extern "C" fn(
3338            dstArray: CUarray,
3339            dstOffset: usize,
3340            srcDevice: CUdeviceptr,
3341            ByteCount: usize,
3342        ) -> CUresult,
3343        ::libloading::Error,
3344    >,
3345    pub cuMemcpyAtoD_v2: Result<
3346        unsafe extern "C" fn(
3347            dstDevice: CUdeviceptr,
3348            srcArray: CUarray,
3349            srcOffset: usize,
3350            ByteCount: usize,
3351        ) -> CUresult,
3352        ::libloading::Error,
3353    >,
3354    pub cuMemcpyHtoA_v2: Result<
3355        unsafe extern "C" fn(
3356            dstArray: CUarray,
3357            dstOffset: usize,
3358            srcHost: *const ::std::os::raw::c_void,
3359            ByteCount: usize,
3360        ) -> CUresult,
3361        ::libloading::Error,
3362    >,
3363    pub cuMemcpyAtoH_v2: Result<
3364        unsafe extern "C" fn(
3365            dstHost: *mut ::std::os::raw::c_void,
3366            srcArray: CUarray,
3367            srcOffset: usize,
3368            ByteCount: usize,
3369        ) -> CUresult,
3370        ::libloading::Error,
3371    >,
3372    pub cuMemcpyAtoA_v2: Result<
3373        unsafe extern "C" fn(
3374            dstArray: CUarray,
3375            dstOffset: usize,
3376            srcArray: CUarray,
3377            srcOffset: usize,
3378            ByteCount: usize,
3379        ) -> CUresult,
3380        ::libloading::Error,
3381    >,
3382    pub cuMemcpy2D_v2:
3383        Result<unsafe extern "C" fn(pCopy: *const CUDA_MEMCPY2D) -> CUresult, ::libloading::Error>,
3384    pub cuMemcpy2DUnaligned_v2:
3385        Result<unsafe extern "C" fn(pCopy: *const CUDA_MEMCPY2D) -> CUresult, ::libloading::Error>,
3386    pub cuMemcpy3D_v2:
3387        Result<unsafe extern "C" fn(pCopy: *const CUDA_MEMCPY3D) -> CUresult, ::libloading::Error>,
3388    pub cuMemcpy3DPeer: Result<
3389        unsafe extern "C" fn(pCopy: *const CUDA_MEMCPY3D_PEER) -> CUresult,
3390        ::libloading::Error,
3391    >,
3392    pub cuMemcpyAsync: Result<
3393        unsafe extern "C" fn(
3394            dst: CUdeviceptr,
3395            src: CUdeviceptr,
3396            ByteCount: usize,
3397            hStream: CUstream,
3398        ) -> CUresult,
3399        ::libloading::Error,
3400    >,
3401    pub cuMemcpyPeerAsync: Result<
3402        unsafe extern "C" fn(
3403            dstDevice: CUdeviceptr,
3404            dstContext: CUcontext,
3405            srcDevice: CUdeviceptr,
3406            srcContext: CUcontext,
3407            ByteCount: usize,
3408            hStream: CUstream,
3409        ) -> CUresult,
3410        ::libloading::Error,
3411    >,
3412    pub cuMemcpyHtoDAsync_v2: Result<
3413        unsafe extern "C" fn(
3414            dstDevice: CUdeviceptr,
3415            srcHost: *const ::std::os::raw::c_void,
3416            ByteCount: usize,
3417            hStream: CUstream,
3418        ) -> CUresult,
3419        ::libloading::Error,
3420    >,
3421    pub cuMemcpyDtoHAsync_v2: Result<
3422        unsafe extern "C" fn(
3423            dstHost: *mut ::std::os::raw::c_void,
3424            srcDevice: CUdeviceptr,
3425            ByteCount: usize,
3426            hStream: CUstream,
3427        ) -> CUresult,
3428        ::libloading::Error,
3429    >,
3430    pub cuMemcpyDtoDAsync_v2: Result<
3431        unsafe extern "C" fn(
3432            dstDevice: CUdeviceptr,
3433            srcDevice: CUdeviceptr,
3434            ByteCount: usize,
3435            hStream: CUstream,
3436        ) -> CUresult,
3437        ::libloading::Error,
3438    >,
3439    pub cuMemcpyHtoAAsync_v2: Result<
3440        unsafe extern "C" fn(
3441            dstArray: CUarray,
3442            dstOffset: usize,
3443            srcHost: *const ::std::os::raw::c_void,
3444            ByteCount: usize,
3445            hStream: CUstream,
3446        ) -> CUresult,
3447        ::libloading::Error,
3448    >,
3449    pub cuMemcpyAtoHAsync_v2: Result<
3450        unsafe extern "C" fn(
3451            dstHost: *mut ::std::os::raw::c_void,
3452            srcArray: CUarray,
3453            srcOffset: usize,
3454            ByteCount: usize,
3455            hStream: CUstream,
3456        ) -> CUresult,
3457        ::libloading::Error,
3458    >,
3459    pub cuMemcpy2DAsync_v2: Result<
3460        unsafe extern "C" fn(pCopy: *const CUDA_MEMCPY2D, hStream: CUstream) -> CUresult,
3461        ::libloading::Error,
3462    >,
3463    pub cuMemcpy3DAsync_v2: Result<
3464        unsafe extern "C" fn(pCopy: *const CUDA_MEMCPY3D, hStream: CUstream) -> CUresult,
3465        ::libloading::Error,
3466    >,
3467    pub cuMemcpy3DPeerAsync: Result<
3468        unsafe extern "C" fn(pCopy: *const CUDA_MEMCPY3D_PEER, hStream: CUstream) -> CUresult,
3469        ::libloading::Error,
3470    >,
3471    pub cuMemsetD8_v2: Result<
3472        unsafe extern "C" fn(
3473            dstDevice: CUdeviceptr,
3474            uc: ::std::os::raw::c_uchar,
3475            N: usize,
3476        ) -> CUresult,
3477        ::libloading::Error,
3478    >,
3479    pub cuMemsetD16_v2: Result<
3480        unsafe extern "C" fn(
3481            dstDevice: CUdeviceptr,
3482            us: ::std::os::raw::c_ushort,
3483            N: usize,
3484        ) -> CUresult,
3485        ::libloading::Error,
3486    >,
3487    pub cuMemsetD32_v2: Result<
3488        unsafe extern "C" fn(
3489            dstDevice: CUdeviceptr,
3490            ui: ::std::os::raw::c_uint,
3491            N: usize,
3492        ) -> CUresult,
3493        ::libloading::Error,
3494    >,
3495    pub cuMemsetD2D8_v2: Result<
3496        unsafe extern "C" fn(
3497            dstDevice: CUdeviceptr,
3498            dstPitch: usize,
3499            uc: ::std::os::raw::c_uchar,
3500            Width: usize,
3501            Height: usize,
3502        ) -> CUresult,
3503        ::libloading::Error,
3504    >,
3505    pub cuMemsetD2D16_v2: Result<
3506        unsafe extern "C" fn(
3507            dstDevice: CUdeviceptr,
3508            dstPitch: usize,
3509            us: ::std::os::raw::c_ushort,
3510            Width: usize,
3511            Height: usize,
3512        ) -> CUresult,
3513        ::libloading::Error,
3514    >,
3515    pub cuMemsetD2D32_v2: Result<
3516        unsafe extern "C" fn(
3517            dstDevice: CUdeviceptr,
3518            dstPitch: usize,
3519            ui: ::std::os::raw::c_uint,
3520            Width: usize,
3521            Height: usize,
3522        ) -> CUresult,
3523        ::libloading::Error,
3524    >,
3525    pub cuMemsetD8Async: Result<
3526        unsafe extern "C" fn(
3527            dstDevice: CUdeviceptr,
3528            uc: ::std::os::raw::c_uchar,
3529            N: usize,
3530            hStream: CUstream,
3531        ) -> CUresult,
3532        ::libloading::Error,
3533    >,
3534    pub cuMemsetD16Async: Result<
3535        unsafe extern "C" fn(
3536            dstDevice: CUdeviceptr,
3537            us: ::std::os::raw::c_ushort,
3538            N: usize,
3539            hStream: CUstream,
3540        ) -> CUresult,
3541        ::libloading::Error,
3542    >,
3543    pub cuMemsetD32Async: Result<
3544        unsafe extern "C" fn(
3545            dstDevice: CUdeviceptr,
3546            ui: ::std::os::raw::c_uint,
3547            N: usize,
3548            hStream: CUstream,
3549        ) -> CUresult,
3550        ::libloading::Error,
3551    >,
3552    pub cuMemsetD2D8Async: Result<
3553        unsafe extern "C" fn(
3554            dstDevice: CUdeviceptr,
3555            dstPitch: usize,
3556            uc: ::std::os::raw::c_uchar,
3557            Width: usize,
3558            Height: usize,
3559            hStream: CUstream,
3560        ) -> CUresult,
3561        ::libloading::Error,
3562    >,
3563    pub cuMemsetD2D16Async: Result<
3564        unsafe extern "C" fn(
3565            dstDevice: CUdeviceptr,
3566            dstPitch: usize,
3567            us: ::std::os::raw::c_ushort,
3568            Width: usize,
3569            Height: usize,
3570            hStream: CUstream,
3571        ) -> CUresult,
3572        ::libloading::Error,
3573    >,
3574    pub cuMemsetD2D32Async: Result<
3575        unsafe extern "C" fn(
3576            dstDevice: CUdeviceptr,
3577            dstPitch: usize,
3578            ui: ::std::os::raw::c_uint,
3579            Width: usize,
3580            Height: usize,
3581            hStream: CUstream,
3582        ) -> CUresult,
3583        ::libloading::Error,
3584    >,
3585    pub cuArrayCreate_v2: Result<
3586        unsafe extern "C" fn(
3587            pHandle: *mut CUarray,
3588            pAllocateArray: *const CUDA_ARRAY_DESCRIPTOR,
3589        ) -> CUresult,
3590        ::libloading::Error,
3591    >,
3592    pub cuArrayGetDescriptor_v2: Result<
3593        unsafe extern "C" fn(
3594            pArrayDescriptor: *mut CUDA_ARRAY_DESCRIPTOR,
3595            hArray: CUarray,
3596        ) -> CUresult,
3597        ::libloading::Error,
3598    >,
3599    pub cuArrayGetSparseProperties: Result<
3600        unsafe extern "C" fn(
3601            sparseProperties: *mut CUDA_ARRAY_SPARSE_PROPERTIES,
3602            array: CUarray,
3603        ) -> CUresult,
3604        ::libloading::Error,
3605    >,
3606    pub cuMipmappedArrayGetSparseProperties: Result<
3607        unsafe extern "C" fn(
3608            sparseProperties: *mut CUDA_ARRAY_SPARSE_PROPERTIES,
3609            mipmap: CUmipmappedArray,
3610        ) -> CUresult,
3611        ::libloading::Error,
3612    >,
3613    pub cuArrayGetMemoryRequirements: Result<
3614        unsafe extern "C" fn(
3615            memoryRequirements: *mut CUDA_ARRAY_MEMORY_REQUIREMENTS,
3616            array: CUarray,
3617            device: CUdevice,
3618        ) -> CUresult,
3619        ::libloading::Error,
3620    >,
3621    pub cuMipmappedArrayGetMemoryRequirements: Result<
3622        unsafe extern "C" fn(
3623            memoryRequirements: *mut CUDA_ARRAY_MEMORY_REQUIREMENTS,
3624            mipmap: CUmipmappedArray,
3625            device: CUdevice,
3626        ) -> CUresult,
3627        ::libloading::Error,
3628    >,
3629    pub cuArrayGetPlane: Result<
3630        unsafe extern "C" fn(
3631            pPlaneArray: *mut CUarray,
3632            hArray: CUarray,
3633            planeIdx: ::std::os::raw::c_uint,
3634        ) -> CUresult,
3635        ::libloading::Error,
3636    >,
3637    pub cuArrayDestroy:
3638        Result<unsafe extern "C" fn(hArray: CUarray) -> CUresult, ::libloading::Error>,
3639    pub cuArray3DCreate_v2: Result<
3640        unsafe extern "C" fn(
3641            pHandle: *mut CUarray,
3642            pAllocateArray: *const CUDA_ARRAY3D_DESCRIPTOR,
3643        ) -> CUresult,
3644        ::libloading::Error,
3645    >,
3646    pub cuArray3DGetDescriptor_v2: Result<
3647        unsafe extern "C" fn(
3648            pArrayDescriptor: *mut CUDA_ARRAY3D_DESCRIPTOR,
3649            hArray: CUarray,
3650        ) -> CUresult,
3651        ::libloading::Error,
3652    >,
3653    pub cuMipmappedArrayCreate: Result<
3654        unsafe extern "C" fn(
3655            pHandle: *mut CUmipmappedArray,
3656            pMipmappedArrayDesc: *const CUDA_ARRAY3D_DESCRIPTOR,
3657            numMipmapLevels: ::std::os::raw::c_uint,
3658        ) -> CUresult,
3659        ::libloading::Error,
3660    >,
3661    pub cuMipmappedArrayGetLevel: Result<
3662        unsafe extern "C" fn(
3663            pLevelArray: *mut CUarray,
3664            hMipmappedArray: CUmipmappedArray,
3665            level: ::std::os::raw::c_uint,
3666        ) -> CUresult,
3667        ::libloading::Error,
3668    >,
3669    pub cuMipmappedArrayDestroy: Result<
3670        unsafe extern "C" fn(hMipmappedArray: CUmipmappedArray) -> CUresult,
3671        ::libloading::Error,
3672    >,
3673    pub cuMemGetHandleForAddressRange: Result<
3674        unsafe extern "C" fn(
3675            handle: *mut ::std::os::raw::c_void,
3676            dptr: CUdeviceptr,
3677            size: usize,
3678            handleType: CUmemRangeHandleType,
3679            flags: ::std::os::raw::c_ulonglong,
3680        ) -> CUresult,
3681        ::libloading::Error,
3682    >,
3683    pub cuMemAddressReserve: Result<
3684        unsafe extern "C" fn(
3685            ptr: *mut CUdeviceptr,
3686            size: usize,
3687            alignment: usize,
3688            addr: CUdeviceptr,
3689            flags: ::std::os::raw::c_ulonglong,
3690        ) -> CUresult,
3691        ::libloading::Error,
3692    >,
3693    pub cuMemAddressFree: Result<
3694        unsafe extern "C" fn(ptr: CUdeviceptr, size: usize) -> CUresult,
3695        ::libloading::Error,
3696    >,
3697    pub cuMemCreate: Result<
3698        unsafe extern "C" fn(
3699            handle: *mut CUmemGenericAllocationHandle,
3700            size: usize,
3701            prop: *const CUmemAllocationProp,
3702            flags: ::std::os::raw::c_ulonglong,
3703        ) -> CUresult,
3704        ::libloading::Error,
3705    >,
3706    pub cuMemRelease: Result<
3707        unsafe extern "C" fn(handle: CUmemGenericAllocationHandle) -> CUresult,
3708        ::libloading::Error,
3709    >,
3710    pub cuMemMap: Result<
3711        unsafe extern "C" fn(
3712            ptr: CUdeviceptr,
3713            size: usize,
3714            offset: usize,
3715            handle: CUmemGenericAllocationHandle,
3716            flags: ::std::os::raw::c_ulonglong,
3717        ) -> CUresult,
3718        ::libloading::Error,
3719    >,
3720    pub cuMemMapArrayAsync: Result<
3721        unsafe extern "C" fn(
3722            mapInfoList: *mut CUarrayMapInfo,
3723            count: ::std::os::raw::c_uint,
3724            hStream: CUstream,
3725        ) -> CUresult,
3726        ::libloading::Error,
3727    >,
3728    pub cuMemUnmap: Result<
3729        unsafe extern "C" fn(ptr: CUdeviceptr, size: usize) -> CUresult,
3730        ::libloading::Error,
3731    >,
3732    pub cuMemSetAccess: Result<
3733        unsafe extern "C" fn(
3734            ptr: CUdeviceptr,
3735            size: usize,
3736            desc: *const CUmemAccessDesc,
3737            count: usize,
3738        ) -> CUresult,
3739        ::libloading::Error,
3740    >,
3741    pub cuMemGetAccess: Result<
3742        unsafe extern "C" fn(
3743            flags: *mut ::std::os::raw::c_ulonglong,
3744            location: *const CUmemLocation,
3745            ptr: CUdeviceptr,
3746        ) -> CUresult,
3747        ::libloading::Error,
3748    >,
3749    pub cuMemExportToShareableHandle: Result<
3750        unsafe extern "C" fn(
3751            shareableHandle: *mut ::std::os::raw::c_void,
3752            handle: CUmemGenericAllocationHandle,
3753            handleType: CUmemAllocationHandleType,
3754            flags: ::std::os::raw::c_ulonglong,
3755        ) -> CUresult,
3756        ::libloading::Error,
3757    >,
3758    pub cuMemImportFromShareableHandle: Result<
3759        unsafe extern "C" fn(
3760            handle: *mut CUmemGenericAllocationHandle,
3761            osHandle: *mut ::std::os::raw::c_void,
3762            shHandleType: CUmemAllocationHandleType,
3763        ) -> CUresult,
3764        ::libloading::Error,
3765    >,
3766    pub cuMemGetAllocationGranularity: Result<
3767        unsafe extern "C" fn(
3768            granularity: *mut usize,
3769            prop: *const CUmemAllocationProp,
3770            option: CUmemAllocationGranularity_flags,
3771        ) -> CUresult,
3772        ::libloading::Error,
3773    >,
3774    pub cuMemGetAllocationPropertiesFromHandle: Result<
3775        unsafe extern "C" fn(
3776            prop: *mut CUmemAllocationProp,
3777            handle: CUmemGenericAllocationHandle,
3778        ) -> CUresult,
3779        ::libloading::Error,
3780    >,
3781    pub cuMemRetainAllocationHandle: Result<
3782        unsafe extern "C" fn(
3783            handle: *mut CUmemGenericAllocationHandle,
3784            addr: *mut ::std::os::raw::c_void,
3785        ) -> CUresult,
3786        ::libloading::Error,
3787    >,
3788    pub cuMemFreeAsync: Result<
3789        unsafe extern "C" fn(dptr: CUdeviceptr, hStream: CUstream) -> CUresult,
3790        ::libloading::Error,
3791    >,
3792    pub cuMemAllocAsync: Result<
3793        unsafe extern "C" fn(
3794            dptr: *mut CUdeviceptr,
3795            bytesize: usize,
3796            hStream: CUstream,
3797        ) -> CUresult,
3798        ::libloading::Error,
3799    >,
3800    pub cuMemPoolTrimTo: Result<
3801        unsafe extern "C" fn(pool: CUmemoryPool, minBytesToKeep: usize) -> CUresult,
3802        ::libloading::Error,
3803    >,
3804    pub cuMemPoolSetAttribute: Result<
3805        unsafe extern "C" fn(
3806            pool: CUmemoryPool,
3807            attr: CUmemPool_attribute,
3808            value: *mut ::std::os::raw::c_void,
3809        ) -> CUresult,
3810        ::libloading::Error,
3811    >,
3812    pub cuMemPoolGetAttribute: Result<
3813        unsafe extern "C" fn(
3814            pool: CUmemoryPool,
3815            attr: CUmemPool_attribute,
3816            value: *mut ::std::os::raw::c_void,
3817        ) -> CUresult,
3818        ::libloading::Error,
3819    >,
3820    pub cuMemPoolSetAccess: Result<
3821        unsafe extern "C" fn(
3822            pool: CUmemoryPool,
3823            map: *const CUmemAccessDesc,
3824            count: usize,
3825        ) -> CUresult,
3826        ::libloading::Error,
3827    >,
3828    pub cuMemPoolGetAccess: Result<
3829        unsafe extern "C" fn(
3830            flags: *mut CUmemAccess_flags,
3831            memPool: CUmemoryPool,
3832            location: *mut CUmemLocation,
3833        ) -> CUresult,
3834        ::libloading::Error,
3835    >,
3836    pub cuMemPoolCreate: Result<
3837        unsafe extern "C" fn(pool: *mut CUmemoryPool, poolProps: *const CUmemPoolProps) -> CUresult,
3838        ::libloading::Error,
3839    >,
3840    pub cuMemPoolDestroy:
3841        Result<unsafe extern "C" fn(pool: CUmemoryPool) -> CUresult, ::libloading::Error>,
3842    pub cuMemAllocFromPoolAsync: Result<
3843        unsafe extern "C" fn(
3844            dptr: *mut CUdeviceptr,
3845            bytesize: usize,
3846            pool: CUmemoryPool,
3847            hStream: CUstream,
3848        ) -> CUresult,
3849        ::libloading::Error,
3850    >,
3851    pub cuMemPoolExportToShareableHandle: Result<
3852        unsafe extern "C" fn(
3853            handle_out: *mut ::std::os::raw::c_void,
3854            pool: CUmemoryPool,
3855            handleType: CUmemAllocationHandleType,
3856            flags: ::std::os::raw::c_ulonglong,
3857        ) -> CUresult,
3858        ::libloading::Error,
3859    >,
3860    pub cuMemPoolImportFromShareableHandle: Result<
3861        unsafe extern "C" fn(
3862            pool_out: *mut CUmemoryPool,
3863            handle: *mut ::std::os::raw::c_void,
3864            handleType: CUmemAllocationHandleType,
3865            flags: ::std::os::raw::c_ulonglong,
3866        ) -> CUresult,
3867        ::libloading::Error,
3868    >,
3869    pub cuMemPoolExportPointer: Result<
3870        unsafe extern "C" fn(
3871            shareData_out: *mut CUmemPoolPtrExportData,
3872            ptr: CUdeviceptr,
3873        ) -> CUresult,
3874        ::libloading::Error,
3875    >,
3876    pub cuMemPoolImportPointer: Result<
3877        unsafe extern "C" fn(
3878            ptr_out: *mut CUdeviceptr,
3879            pool: CUmemoryPool,
3880            shareData: *mut CUmemPoolPtrExportData,
3881        ) -> CUresult,
3882        ::libloading::Error,
3883    >,
3884    pub cuPointerGetAttribute: Result<
3885        unsafe extern "C" fn(
3886            data: *mut ::std::os::raw::c_void,
3887            attribute: CUpointer_attribute,
3888            ptr: CUdeviceptr,
3889        ) -> CUresult,
3890        ::libloading::Error,
3891    >,
3892    pub cuMemPrefetchAsync: Result<
3893        unsafe extern "C" fn(
3894            devPtr: CUdeviceptr,
3895            count: usize,
3896            dstDevice: CUdevice,
3897            hStream: CUstream,
3898        ) -> CUresult,
3899        ::libloading::Error,
3900    >,
3901    pub cuMemAdvise: Result<
3902        unsafe extern "C" fn(
3903            devPtr: CUdeviceptr,
3904            count: usize,
3905            advice: CUmem_advise,
3906            device: CUdevice,
3907        ) -> CUresult,
3908        ::libloading::Error,
3909    >,
3910    pub cuMemRangeGetAttribute: Result<
3911        unsafe extern "C" fn(
3912            data: *mut ::std::os::raw::c_void,
3913            dataSize: usize,
3914            attribute: CUmem_range_attribute,
3915            devPtr: CUdeviceptr,
3916            count: usize,
3917        ) -> CUresult,
3918        ::libloading::Error,
3919    >,
3920    pub cuMemRangeGetAttributes: Result<
3921        unsafe extern "C" fn(
3922            data: *mut *mut ::std::os::raw::c_void,
3923            dataSizes: *mut usize,
3924            attributes: *mut CUmem_range_attribute,
3925            numAttributes: usize,
3926            devPtr: CUdeviceptr,
3927            count: usize,
3928        ) -> CUresult,
3929        ::libloading::Error,
3930    >,
3931    pub cuPointerSetAttribute: Result<
3932        unsafe extern "C" fn(
3933            value: *const ::std::os::raw::c_void,
3934            attribute: CUpointer_attribute,
3935            ptr: CUdeviceptr,
3936        ) -> CUresult,
3937        ::libloading::Error,
3938    >,
3939    pub cuPointerGetAttributes: Result<
3940        unsafe extern "C" fn(
3941            numAttributes: ::std::os::raw::c_uint,
3942            attributes: *mut CUpointer_attribute,
3943            data: *mut *mut ::std::os::raw::c_void,
3944            ptr: CUdeviceptr,
3945        ) -> CUresult,
3946        ::libloading::Error,
3947    >,
3948    pub cuStreamCreate: Result<
3949        unsafe extern "C" fn(phStream: *mut CUstream, Flags: ::std::os::raw::c_uint) -> CUresult,
3950        ::libloading::Error,
3951    >,
3952    pub cuStreamCreateWithPriority: Result<
3953        unsafe extern "C" fn(
3954            phStream: *mut CUstream,
3955            flags: ::std::os::raw::c_uint,
3956            priority: ::std::os::raw::c_int,
3957        ) -> CUresult,
3958        ::libloading::Error,
3959    >,
3960    pub cuStreamGetPriority: Result<
3961        unsafe extern "C" fn(hStream: CUstream, priority: *mut ::std::os::raw::c_int) -> CUresult,
3962        ::libloading::Error,
3963    >,
3964    pub cuStreamGetFlags: Result<
3965        unsafe extern "C" fn(hStream: CUstream, flags: *mut ::std::os::raw::c_uint) -> CUresult,
3966        ::libloading::Error,
3967    >,
3968    pub cuStreamGetId: Result<
3969        unsafe extern "C" fn(
3970            hStream: CUstream,
3971            streamId: *mut ::std::os::raw::c_ulonglong,
3972        ) -> CUresult,
3973        ::libloading::Error,
3974    >,
3975    pub cuStreamGetCtx: Result<
3976        unsafe extern "C" fn(hStream: CUstream, pctx: *mut CUcontext) -> CUresult,
3977        ::libloading::Error,
3978    >,
3979    pub cuStreamWaitEvent: Result<
3980        unsafe extern "C" fn(
3981            hStream: CUstream,
3982            hEvent: CUevent,
3983            Flags: ::std::os::raw::c_uint,
3984        ) -> CUresult,
3985        ::libloading::Error,
3986    >,
3987    pub cuStreamAddCallback: Result<
3988        unsafe extern "C" fn(
3989            hStream: CUstream,
3990            callback: CUstreamCallback,
3991            userData: *mut ::std::os::raw::c_void,
3992            flags: ::std::os::raw::c_uint,
3993        ) -> CUresult,
3994        ::libloading::Error,
3995    >,
3996    pub cuStreamBeginCapture_v2: Result<
3997        unsafe extern "C" fn(hStream: CUstream, mode: CUstreamCaptureMode) -> CUresult,
3998        ::libloading::Error,
3999    >,
4000    pub cuThreadExchangeStreamCaptureMode: Result<
4001        unsafe extern "C" fn(mode: *mut CUstreamCaptureMode) -> CUresult,
4002        ::libloading::Error,
4003    >,
4004    pub cuStreamEndCapture: Result<
4005        unsafe extern "C" fn(hStream: CUstream, phGraph: *mut CUgraph) -> CUresult,
4006        ::libloading::Error,
4007    >,
4008    pub cuStreamIsCapturing: Result<
4009        unsafe extern "C" fn(
4010            hStream: CUstream,
4011            captureStatus: *mut CUstreamCaptureStatus,
4012        ) -> CUresult,
4013        ::libloading::Error,
4014    >,
4015    pub cuStreamGetCaptureInfo_v2: Result<
4016        unsafe extern "C" fn(
4017            hStream: CUstream,
4018            captureStatus_out: *mut CUstreamCaptureStatus,
4019            id_out: *mut cuuint64_t,
4020            graph_out: *mut CUgraph,
4021            dependencies_out: *mut *const CUgraphNode,
4022            numDependencies_out: *mut usize,
4023        ) -> CUresult,
4024        ::libloading::Error,
4025    >,
4026    pub cuStreamUpdateCaptureDependencies: Result<
4027        unsafe extern "C" fn(
4028            hStream: CUstream,
4029            dependencies: *mut CUgraphNode,
4030            numDependencies: usize,
4031            flags: ::std::os::raw::c_uint,
4032        ) -> CUresult,
4033        ::libloading::Error,
4034    >,
4035    pub cuStreamAttachMemAsync: Result<
4036        unsafe extern "C" fn(
4037            hStream: CUstream,
4038            dptr: CUdeviceptr,
4039            length: usize,
4040            flags: ::std::os::raw::c_uint,
4041        ) -> CUresult,
4042        ::libloading::Error,
4043    >,
4044    pub cuStreamQuery:
4045        Result<unsafe extern "C" fn(hStream: CUstream) -> CUresult, ::libloading::Error>,
4046    pub cuStreamSynchronize:
4047        Result<unsafe extern "C" fn(hStream: CUstream) -> CUresult, ::libloading::Error>,
4048    pub cuStreamDestroy_v2:
4049        Result<unsafe extern "C" fn(hStream: CUstream) -> CUresult, ::libloading::Error>,
4050    pub cuStreamCopyAttributes:
4051        Result<unsafe extern "C" fn(dst: CUstream, src: CUstream) -> CUresult, ::libloading::Error>,
4052    pub cuStreamGetAttribute: Result<
4053        unsafe extern "C" fn(
4054            hStream: CUstream,
4055            attr: CUstreamAttrID,
4056            value_out: *mut CUstreamAttrValue,
4057        ) -> CUresult,
4058        ::libloading::Error,
4059    >,
4060    pub cuStreamSetAttribute: Result<
4061        unsafe extern "C" fn(
4062            hStream: CUstream,
4063            attr: CUstreamAttrID,
4064            value: *const CUstreamAttrValue,
4065        ) -> CUresult,
4066        ::libloading::Error,
4067    >,
4068    pub cuEventCreate: Result<
4069        unsafe extern "C" fn(phEvent: *mut CUevent, Flags: ::std::os::raw::c_uint) -> CUresult,
4070        ::libloading::Error,
4071    >,
4072    pub cuEventRecord: Result<
4073        unsafe extern "C" fn(hEvent: CUevent, hStream: CUstream) -> CUresult,
4074        ::libloading::Error,
4075    >,
4076    pub cuEventRecordWithFlags: Result<
4077        unsafe extern "C" fn(
4078            hEvent: CUevent,
4079            hStream: CUstream,
4080            flags: ::std::os::raw::c_uint,
4081        ) -> CUresult,
4082        ::libloading::Error,
4083    >,
4084    pub cuEventQuery:
4085        Result<unsafe extern "C" fn(hEvent: CUevent) -> CUresult, ::libloading::Error>,
4086    pub cuEventSynchronize:
4087        Result<unsafe extern "C" fn(hEvent: CUevent) -> CUresult, ::libloading::Error>,
4088    pub cuEventDestroy_v2:
4089        Result<unsafe extern "C" fn(hEvent: CUevent) -> CUresult, ::libloading::Error>,
4090    pub cuEventElapsedTime: Result<
4091        unsafe extern "C" fn(pMilliseconds: *mut f32, hStart: CUevent, hEnd: CUevent) -> CUresult,
4092        ::libloading::Error,
4093    >,
4094    pub cuImportExternalMemory: Result<
4095        unsafe extern "C" fn(
4096            extMem_out: *mut CUexternalMemory,
4097            memHandleDesc: *const CUDA_EXTERNAL_MEMORY_HANDLE_DESC,
4098        ) -> CUresult,
4099        ::libloading::Error,
4100    >,
4101    pub cuExternalMemoryGetMappedBuffer: Result<
4102        unsafe extern "C" fn(
4103            devPtr: *mut CUdeviceptr,
4104            extMem: CUexternalMemory,
4105            bufferDesc: *const CUDA_EXTERNAL_MEMORY_BUFFER_DESC,
4106        ) -> CUresult,
4107        ::libloading::Error,
4108    >,
4109    pub cuExternalMemoryGetMappedMipmappedArray: Result<
4110        unsafe extern "C" fn(
4111            mipmap: *mut CUmipmappedArray,
4112            extMem: CUexternalMemory,
4113            mipmapDesc: *const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC,
4114        ) -> CUresult,
4115        ::libloading::Error,
4116    >,
4117    pub cuDestroyExternalMemory:
4118        Result<unsafe extern "C" fn(extMem: CUexternalMemory) -> CUresult, ::libloading::Error>,
4119    pub cuImportExternalSemaphore: Result<
4120        unsafe extern "C" fn(
4121            extSem_out: *mut CUexternalSemaphore,
4122            semHandleDesc: *const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC,
4123        ) -> CUresult,
4124        ::libloading::Error,
4125    >,
4126    pub cuSignalExternalSemaphoresAsync: Result<
4127        unsafe extern "C" fn(
4128            extSemArray: *const CUexternalSemaphore,
4129            paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,
4130            numExtSems: ::std::os::raw::c_uint,
4131            stream: CUstream,
4132        ) -> CUresult,
4133        ::libloading::Error,
4134    >,
4135    pub cuWaitExternalSemaphoresAsync: Result<
4136        unsafe extern "C" fn(
4137            extSemArray: *const CUexternalSemaphore,
4138            paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,
4139            numExtSems: ::std::os::raw::c_uint,
4140            stream: CUstream,
4141        ) -> CUresult,
4142        ::libloading::Error,
4143    >,
4144    pub cuDestroyExternalSemaphore:
4145        Result<unsafe extern "C" fn(extSem: CUexternalSemaphore) -> CUresult, ::libloading::Error>,
4146    pub cuStreamWaitValue32_v2: Result<
4147        unsafe extern "C" fn(
4148            stream: CUstream,
4149            addr: CUdeviceptr,
4150            value: cuuint32_t,
4151            flags: ::std::os::raw::c_uint,
4152        ) -> CUresult,
4153        ::libloading::Error,
4154    >,
4155    pub cuStreamWaitValue64_v2: Result<
4156        unsafe extern "C" fn(
4157            stream: CUstream,
4158            addr: CUdeviceptr,
4159            value: cuuint64_t,
4160            flags: ::std::os::raw::c_uint,
4161        ) -> CUresult,
4162        ::libloading::Error,
4163    >,
4164    pub cuStreamWriteValue32_v2: Result<
4165        unsafe extern "C" fn(
4166            stream: CUstream,
4167            addr: CUdeviceptr,
4168            value: cuuint32_t,
4169            flags: ::std::os::raw::c_uint,
4170        ) -> CUresult,
4171        ::libloading::Error,
4172    >,
4173    pub cuStreamWriteValue64_v2: Result<
4174        unsafe extern "C" fn(
4175            stream: CUstream,
4176            addr: CUdeviceptr,
4177            value: cuuint64_t,
4178            flags: ::std::os::raw::c_uint,
4179        ) -> CUresult,
4180        ::libloading::Error,
4181    >,
4182    pub cuStreamBatchMemOp_v2: Result<
4183        unsafe extern "C" fn(
4184            stream: CUstream,
4185            count: ::std::os::raw::c_uint,
4186            paramArray: *mut CUstreamBatchMemOpParams,
4187            flags: ::std::os::raw::c_uint,
4188        ) -> CUresult,
4189        ::libloading::Error,
4190    >,
4191    pub cuFuncGetAttribute: Result<
4192        unsafe extern "C" fn(
4193            pi: *mut ::std::os::raw::c_int,
4194            attrib: CUfunction_attribute,
4195            hfunc: CUfunction,
4196        ) -> CUresult,
4197        ::libloading::Error,
4198    >,
4199    pub cuFuncSetAttribute: Result<
4200        unsafe extern "C" fn(
4201            hfunc: CUfunction,
4202            attrib: CUfunction_attribute,
4203            value: ::std::os::raw::c_int,
4204        ) -> CUresult,
4205        ::libloading::Error,
4206    >,
4207    pub cuFuncSetCacheConfig: Result<
4208        unsafe extern "C" fn(hfunc: CUfunction, config: CUfunc_cache) -> CUresult,
4209        ::libloading::Error,
4210    >,
4211    pub cuFuncSetSharedMemConfig: Result<
4212        unsafe extern "C" fn(hfunc: CUfunction, config: CUsharedconfig) -> CUresult,
4213        ::libloading::Error,
4214    >,
4215    pub cuFuncGetModule: Result<
4216        unsafe extern "C" fn(hmod: *mut CUmodule, hfunc: CUfunction) -> CUresult,
4217        ::libloading::Error,
4218    >,
4219    pub cuLaunchKernel: Result<
4220        unsafe extern "C" fn(
4221            f: CUfunction,
4222            gridDimX: ::std::os::raw::c_uint,
4223            gridDimY: ::std::os::raw::c_uint,
4224            gridDimZ: ::std::os::raw::c_uint,
4225            blockDimX: ::std::os::raw::c_uint,
4226            blockDimY: ::std::os::raw::c_uint,
4227            blockDimZ: ::std::os::raw::c_uint,
4228            sharedMemBytes: ::std::os::raw::c_uint,
4229            hStream: CUstream,
4230            kernelParams: *mut *mut ::std::os::raw::c_void,
4231            extra: *mut *mut ::std::os::raw::c_void,
4232        ) -> CUresult,
4233        ::libloading::Error,
4234    >,
4235    pub cuLaunchKernelEx: Result<
4236        unsafe extern "C" fn(
4237            config: *const CUlaunchConfig,
4238            f: CUfunction,
4239            kernelParams: *mut *mut ::std::os::raw::c_void,
4240            extra: *mut *mut ::std::os::raw::c_void,
4241        ) -> CUresult,
4242        ::libloading::Error,
4243    >,
4244    pub cuLaunchCooperativeKernel: Result<
4245        unsafe extern "C" fn(
4246            f: CUfunction,
4247            gridDimX: ::std::os::raw::c_uint,
4248            gridDimY: ::std::os::raw::c_uint,
4249            gridDimZ: ::std::os::raw::c_uint,
4250            blockDimX: ::std::os::raw::c_uint,
4251            blockDimY: ::std::os::raw::c_uint,
4252            blockDimZ: ::std::os::raw::c_uint,
4253            sharedMemBytes: ::std::os::raw::c_uint,
4254            hStream: CUstream,
4255            kernelParams: *mut *mut ::std::os::raw::c_void,
4256        ) -> CUresult,
4257        ::libloading::Error,
4258    >,
4259    pub cuLaunchCooperativeKernelMultiDevice: Result<
4260        unsafe extern "C" fn(
4261            launchParamsList: *mut CUDA_LAUNCH_PARAMS,
4262            numDevices: ::std::os::raw::c_uint,
4263            flags: ::std::os::raw::c_uint,
4264        ) -> CUresult,
4265        ::libloading::Error,
4266    >,
4267    pub cuLaunchHostFunc: Result<
4268        unsafe extern "C" fn(
4269            hStream: CUstream,
4270            fn_: CUhostFn,
4271            userData: *mut ::std::os::raw::c_void,
4272        ) -> CUresult,
4273        ::libloading::Error,
4274    >,
4275    pub cuFuncSetBlockShape: Result<
4276        unsafe extern "C" fn(
4277            hfunc: CUfunction,
4278            x: ::std::os::raw::c_int,
4279            y: ::std::os::raw::c_int,
4280            z: ::std::os::raw::c_int,
4281        ) -> CUresult,
4282        ::libloading::Error,
4283    >,
4284    pub cuFuncSetSharedSize: Result<
4285        unsafe extern "C" fn(hfunc: CUfunction, bytes: ::std::os::raw::c_uint) -> CUresult,
4286        ::libloading::Error,
4287    >,
4288    pub cuParamSetSize: Result<
4289        unsafe extern "C" fn(hfunc: CUfunction, numbytes: ::std::os::raw::c_uint) -> CUresult,
4290        ::libloading::Error,
4291    >,
4292    pub cuParamSeti: Result<
4293        unsafe extern "C" fn(
4294            hfunc: CUfunction,
4295            offset: ::std::os::raw::c_int,
4296            value: ::std::os::raw::c_uint,
4297        ) -> CUresult,
4298        ::libloading::Error,
4299    >,
4300    pub cuParamSetf: Result<
4301        unsafe extern "C" fn(
4302            hfunc: CUfunction,
4303            offset: ::std::os::raw::c_int,
4304            value: f32,
4305        ) -> CUresult,
4306        ::libloading::Error,
4307    >,
4308    pub cuParamSetv: Result<
4309        unsafe extern "C" fn(
4310            hfunc: CUfunction,
4311            offset: ::std::os::raw::c_int,
4312            ptr: *mut ::std::os::raw::c_void,
4313            numbytes: ::std::os::raw::c_uint,
4314        ) -> CUresult,
4315        ::libloading::Error,
4316    >,
4317    pub cuLaunch: Result<unsafe extern "C" fn(f: CUfunction) -> CUresult, ::libloading::Error>,
4318    pub cuLaunchGrid: Result<
4319        unsafe extern "C" fn(
4320            f: CUfunction,
4321            grid_width: ::std::os::raw::c_int,
4322            grid_height: ::std::os::raw::c_int,
4323        ) -> CUresult,
4324        ::libloading::Error,
4325    >,
4326    pub cuLaunchGridAsync: Result<
4327        unsafe extern "C" fn(
4328            f: CUfunction,
4329            grid_width: ::std::os::raw::c_int,
4330            grid_height: ::std::os::raw::c_int,
4331            hStream: CUstream,
4332        ) -> CUresult,
4333        ::libloading::Error,
4334    >,
4335    pub cuParamSetTexRef: Result<
4336        unsafe extern "C" fn(
4337            hfunc: CUfunction,
4338            texunit: ::std::os::raw::c_int,
4339            hTexRef: CUtexref,
4340        ) -> CUresult,
4341        ::libloading::Error,
4342    >,
4343    pub cuGraphCreate: Result<
4344        unsafe extern "C" fn(phGraph: *mut CUgraph, flags: ::std::os::raw::c_uint) -> CUresult,
4345        ::libloading::Error,
4346    >,
4347    pub cuGraphAddKernelNode_v2: Result<
4348        unsafe extern "C" fn(
4349            phGraphNode: *mut CUgraphNode,
4350            hGraph: CUgraph,
4351            dependencies: *const CUgraphNode,
4352            numDependencies: usize,
4353            nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
4354        ) -> CUresult,
4355        ::libloading::Error,
4356    >,
4357    pub cuGraphKernelNodeGetParams_v2: Result<
4358        unsafe extern "C" fn(
4359            hNode: CUgraphNode,
4360            nodeParams: *mut CUDA_KERNEL_NODE_PARAMS,
4361        ) -> CUresult,
4362        ::libloading::Error,
4363    >,
4364    pub cuGraphKernelNodeSetParams_v2: Result<
4365        unsafe extern "C" fn(
4366            hNode: CUgraphNode,
4367            nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
4368        ) -> CUresult,
4369        ::libloading::Error,
4370    >,
4371    pub cuGraphAddMemcpyNode: Result<
4372        unsafe extern "C" fn(
4373            phGraphNode: *mut CUgraphNode,
4374            hGraph: CUgraph,
4375            dependencies: *const CUgraphNode,
4376            numDependencies: usize,
4377            copyParams: *const CUDA_MEMCPY3D,
4378            ctx: CUcontext,
4379        ) -> CUresult,
4380        ::libloading::Error,
4381    >,
4382    pub cuGraphMemcpyNodeGetParams: Result<
4383        unsafe extern "C" fn(hNode: CUgraphNode, nodeParams: *mut CUDA_MEMCPY3D) -> CUresult,
4384        ::libloading::Error,
4385    >,
4386    pub cuGraphMemcpyNodeSetParams: Result<
4387        unsafe extern "C" fn(hNode: CUgraphNode, nodeParams: *const CUDA_MEMCPY3D) -> CUresult,
4388        ::libloading::Error,
4389    >,
4390    pub cuGraphAddMemsetNode: Result<
4391        unsafe extern "C" fn(
4392            phGraphNode: *mut CUgraphNode,
4393            hGraph: CUgraph,
4394            dependencies: *const CUgraphNode,
4395            numDependencies: usize,
4396            memsetParams: *const CUDA_MEMSET_NODE_PARAMS,
4397            ctx: CUcontext,
4398        ) -> CUresult,
4399        ::libloading::Error,
4400    >,
4401    pub cuGraphMemsetNodeGetParams: Result<
4402        unsafe extern "C" fn(
4403            hNode: CUgraphNode,
4404            nodeParams: *mut CUDA_MEMSET_NODE_PARAMS,
4405        ) -> CUresult,
4406        ::libloading::Error,
4407    >,
4408    pub cuGraphMemsetNodeSetParams: Result<
4409        unsafe extern "C" fn(
4410            hNode: CUgraphNode,
4411            nodeParams: *const CUDA_MEMSET_NODE_PARAMS,
4412        ) -> CUresult,
4413        ::libloading::Error,
4414    >,
4415    pub cuGraphAddHostNode: Result<
4416        unsafe extern "C" fn(
4417            phGraphNode: *mut CUgraphNode,
4418            hGraph: CUgraph,
4419            dependencies: *const CUgraphNode,
4420            numDependencies: usize,
4421            nodeParams: *const CUDA_HOST_NODE_PARAMS,
4422        ) -> CUresult,
4423        ::libloading::Error,
4424    >,
4425    pub cuGraphHostNodeGetParams: Result<
4426        unsafe extern "C" fn(
4427            hNode: CUgraphNode,
4428            nodeParams: *mut CUDA_HOST_NODE_PARAMS,
4429        ) -> CUresult,
4430        ::libloading::Error,
4431    >,
4432    pub cuGraphHostNodeSetParams: Result<
4433        unsafe extern "C" fn(
4434            hNode: CUgraphNode,
4435            nodeParams: *const CUDA_HOST_NODE_PARAMS,
4436        ) -> CUresult,
4437        ::libloading::Error,
4438    >,
4439    pub cuGraphAddChildGraphNode: Result<
4440        unsafe extern "C" fn(
4441            phGraphNode: *mut CUgraphNode,
4442            hGraph: CUgraph,
4443            dependencies: *const CUgraphNode,
4444            numDependencies: usize,
4445            childGraph: CUgraph,
4446        ) -> CUresult,
4447        ::libloading::Error,
4448    >,
4449    pub cuGraphChildGraphNodeGetGraph: Result<
4450        unsafe extern "C" fn(hNode: CUgraphNode, phGraph: *mut CUgraph) -> CUresult,
4451        ::libloading::Error,
4452    >,
4453    pub cuGraphAddEmptyNode: Result<
4454        unsafe extern "C" fn(
4455            phGraphNode: *mut CUgraphNode,
4456            hGraph: CUgraph,
4457            dependencies: *const CUgraphNode,
4458            numDependencies: usize,
4459        ) -> CUresult,
4460        ::libloading::Error,
4461    >,
4462    pub cuGraphAddEventRecordNode: Result<
4463        unsafe extern "C" fn(
4464            phGraphNode: *mut CUgraphNode,
4465            hGraph: CUgraph,
4466            dependencies: *const CUgraphNode,
4467            numDependencies: usize,
4468            event: CUevent,
4469        ) -> CUresult,
4470        ::libloading::Error,
4471    >,
4472    pub cuGraphEventRecordNodeGetEvent: Result<
4473        unsafe extern "C" fn(hNode: CUgraphNode, event_out: *mut CUevent) -> CUresult,
4474        ::libloading::Error,
4475    >,
4476    pub cuGraphEventRecordNodeSetEvent: Result<
4477        unsafe extern "C" fn(hNode: CUgraphNode, event: CUevent) -> CUresult,
4478        ::libloading::Error,
4479    >,
4480    pub cuGraphAddEventWaitNode: Result<
4481        unsafe extern "C" fn(
4482            phGraphNode: *mut CUgraphNode,
4483            hGraph: CUgraph,
4484            dependencies: *const CUgraphNode,
4485            numDependencies: usize,
4486            event: CUevent,
4487        ) -> CUresult,
4488        ::libloading::Error,
4489    >,
4490    pub cuGraphEventWaitNodeGetEvent: Result<
4491        unsafe extern "C" fn(hNode: CUgraphNode, event_out: *mut CUevent) -> CUresult,
4492        ::libloading::Error,
4493    >,
4494    pub cuGraphEventWaitNodeSetEvent: Result<
4495        unsafe extern "C" fn(hNode: CUgraphNode, event: CUevent) -> CUresult,
4496        ::libloading::Error,
4497    >,
4498    pub cuGraphAddExternalSemaphoresSignalNode: Result<
4499        unsafe extern "C" fn(
4500            phGraphNode: *mut CUgraphNode,
4501            hGraph: CUgraph,
4502            dependencies: *const CUgraphNode,
4503            numDependencies: usize,
4504            nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
4505        ) -> CUresult,
4506        ::libloading::Error,
4507    >,
4508    pub cuGraphExternalSemaphoresSignalNodeGetParams: Result<
4509        unsafe extern "C" fn(
4510            hNode: CUgraphNode,
4511            params_out: *mut CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
4512        ) -> CUresult,
4513        ::libloading::Error,
4514    >,
4515    pub cuGraphExternalSemaphoresSignalNodeSetParams: Result<
4516        unsafe extern "C" fn(
4517            hNode: CUgraphNode,
4518            nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
4519        ) -> CUresult,
4520        ::libloading::Error,
4521    >,
4522    pub cuGraphAddExternalSemaphoresWaitNode: Result<
4523        unsafe extern "C" fn(
4524            phGraphNode: *mut CUgraphNode,
4525            hGraph: CUgraph,
4526            dependencies: *const CUgraphNode,
4527            numDependencies: usize,
4528            nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
4529        ) -> CUresult,
4530        ::libloading::Error,
4531    >,
4532    pub cuGraphExternalSemaphoresWaitNodeGetParams: Result<
4533        unsafe extern "C" fn(
4534            hNode: CUgraphNode,
4535            params_out: *mut CUDA_EXT_SEM_WAIT_NODE_PARAMS,
4536        ) -> CUresult,
4537        ::libloading::Error,
4538    >,
4539    pub cuGraphExternalSemaphoresWaitNodeSetParams: Result<
4540        unsafe extern "C" fn(
4541            hNode: CUgraphNode,
4542            nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
4543        ) -> CUresult,
4544        ::libloading::Error,
4545    >,
4546    pub cuGraphAddBatchMemOpNode: Result<
4547        unsafe extern "C" fn(
4548            phGraphNode: *mut CUgraphNode,
4549            hGraph: CUgraph,
4550            dependencies: *const CUgraphNode,
4551            numDependencies: usize,
4552            nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
4553        ) -> CUresult,
4554        ::libloading::Error,
4555    >,
4556    pub cuGraphBatchMemOpNodeGetParams: Result<
4557        unsafe extern "C" fn(
4558            hNode: CUgraphNode,
4559            nodeParams_out: *mut CUDA_BATCH_MEM_OP_NODE_PARAMS,
4560        ) -> CUresult,
4561        ::libloading::Error,
4562    >,
4563    pub cuGraphBatchMemOpNodeSetParams: Result<
4564        unsafe extern "C" fn(
4565            hNode: CUgraphNode,
4566            nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
4567        ) -> CUresult,
4568        ::libloading::Error,
4569    >,
4570    pub cuGraphExecBatchMemOpNodeSetParams: Result<
4571        unsafe extern "C" fn(
4572            hGraphExec: CUgraphExec,
4573            hNode: CUgraphNode,
4574            nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
4575        ) -> CUresult,
4576        ::libloading::Error,
4577    >,
4578    pub cuGraphAddMemAllocNode: Result<
4579        unsafe extern "C" fn(
4580            phGraphNode: *mut CUgraphNode,
4581            hGraph: CUgraph,
4582            dependencies: *const CUgraphNode,
4583            numDependencies: usize,
4584            nodeParams: *mut CUDA_MEM_ALLOC_NODE_PARAMS,
4585        ) -> CUresult,
4586        ::libloading::Error,
4587    >,
4588    pub cuGraphMemAllocNodeGetParams: Result<
4589        unsafe extern "C" fn(
4590            hNode: CUgraphNode,
4591            params_out: *mut CUDA_MEM_ALLOC_NODE_PARAMS,
4592        ) -> CUresult,
4593        ::libloading::Error,
4594    >,
4595    pub cuGraphAddMemFreeNode: Result<
4596        unsafe extern "C" fn(
4597            phGraphNode: *mut CUgraphNode,
4598            hGraph: CUgraph,
4599            dependencies: *const CUgraphNode,
4600            numDependencies: usize,
4601            dptr: CUdeviceptr,
4602        ) -> CUresult,
4603        ::libloading::Error,
4604    >,
4605    pub cuGraphMemFreeNodeGetParams: Result<
4606        unsafe extern "C" fn(hNode: CUgraphNode, dptr_out: *mut CUdeviceptr) -> CUresult,
4607        ::libloading::Error,
4608    >,
4609    pub cuDeviceGraphMemTrim:
4610        Result<unsafe extern "C" fn(device: CUdevice) -> CUresult, ::libloading::Error>,
4611    pub cuDeviceGetGraphMemAttribute: Result<
4612        unsafe extern "C" fn(
4613            device: CUdevice,
4614            attr: CUgraphMem_attribute,
4615            value: *mut ::std::os::raw::c_void,
4616        ) -> CUresult,
4617        ::libloading::Error,
4618    >,
4619    pub cuDeviceSetGraphMemAttribute: Result<
4620        unsafe extern "C" fn(
4621            device: CUdevice,
4622            attr: CUgraphMem_attribute,
4623            value: *mut ::std::os::raw::c_void,
4624        ) -> CUresult,
4625        ::libloading::Error,
4626    >,
4627    pub cuGraphClone: Result<
4628        unsafe extern "C" fn(phGraphClone: *mut CUgraph, originalGraph: CUgraph) -> CUresult,
4629        ::libloading::Error,
4630    >,
4631    pub cuGraphNodeFindInClone: Result<
4632        unsafe extern "C" fn(
4633            phNode: *mut CUgraphNode,
4634            hOriginalNode: CUgraphNode,
4635            hClonedGraph: CUgraph,
4636        ) -> CUresult,
4637        ::libloading::Error,
4638    >,
4639    pub cuGraphNodeGetType: Result<
4640        unsafe extern "C" fn(hNode: CUgraphNode, type_: *mut CUgraphNodeType) -> CUresult,
4641        ::libloading::Error,
4642    >,
4643    pub cuGraphGetNodes: Result<
4644        unsafe extern "C" fn(
4645            hGraph: CUgraph,
4646            nodes: *mut CUgraphNode,
4647            numNodes: *mut usize,
4648        ) -> CUresult,
4649        ::libloading::Error,
4650    >,
4651    pub cuGraphGetRootNodes: Result<
4652        unsafe extern "C" fn(
4653            hGraph: CUgraph,
4654            rootNodes: *mut CUgraphNode,
4655            numRootNodes: *mut usize,
4656        ) -> CUresult,
4657        ::libloading::Error,
4658    >,
4659    pub cuGraphGetEdges: Result<
4660        unsafe extern "C" fn(
4661            hGraph: CUgraph,
4662            from: *mut CUgraphNode,
4663            to: *mut CUgraphNode,
4664            numEdges: *mut usize,
4665        ) -> CUresult,
4666        ::libloading::Error,
4667    >,
4668    pub cuGraphNodeGetDependencies: Result<
4669        unsafe extern "C" fn(
4670            hNode: CUgraphNode,
4671            dependencies: *mut CUgraphNode,
4672            numDependencies: *mut usize,
4673        ) -> CUresult,
4674        ::libloading::Error,
4675    >,
4676    pub cuGraphNodeGetDependentNodes: Result<
4677        unsafe extern "C" fn(
4678            hNode: CUgraphNode,
4679            dependentNodes: *mut CUgraphNode,
4680            numDependentNodes: *mut usize,
4681        ) -> CUresult,
4682        ::libloading::Error,
4683    >,
4684    pub cuGraphAddDependencies: Result<
4685        unsafe extern "C" fn(
4686            hGraph: CUgraph,
4687            from: *const CUgraphNode,
4688            to: *const CUgraphNode,
4689            numDependencies: usize,
4690        ) -> CUresult,
4691        ::libloading::Error,
4692    >,
4693    pub cuGraphRemoveDependencies: Result<
4694        unsafe extern "C" fn(
4695            hGraph: CUgraph,
4696            from: *const CUgraphNode,
4697            to: *const CUgraphNode,
4698            numDependencies: usize,
4699        ) -> CUresult,
4700        ::libloading::Error,
4701    >,
4702    pub cuGraphDestroyNode:
4703        Result<unsafe extern "C" fn(hNode: CUgraphNode) -> CUresult, ::libloading::Error>,
4704    pub cuGraphInstantiateWithFlags: Result<
4705        unsafe extern "C" fn(
4706            phGraphExec: *mut CUgraphExec,
4707            hGraph: CUgraph,
4708            flags: ::std::os::raw::c_ulonglong,
4709        ) -> CUresult,
4710        ::libloading::Error,
4711    >,
4712    pub cuGraphInstantiateWithParams: Result<
4713        unsafe extern "C" fn(
4714            phGraphExec: *mut CUgraphExec,
4715            hGraph: CUgraph,
4716            instantiateParams: *mut CUDA_GRAPH_INSTANTIATE_PARAMS,
4717        ) -> CUresult,
4718        ::libloading::Error,
4719    >,
4720    pub cuGraphExecGetFlags: Result<
4721        unsafe extern "C" fn(hGraphExec: CUgraphExec, flags: *mut cuuint64_t) -> CUresult,
4722        ::libloading::Error,
4723    >,
4724    pub cuGraphExecKernelNodeSetParams_v2: Result<
4725        unsafe extern "C" fn(
4726            hGraphExec: CUgraphExec,
4727            hNode: CUgraphNode,
4728            nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
4729        ) -> CUresult,
4730        ::libloading::Error,
4731    >,
4732    pub cuGraphExecMemcpyNodeSetParams: Result<
4733        unsafe extern "C" fn(
4734            hGraphExec: CUgraphExec,
4735            hNode: CUgraphNode,
4736            copyParams: *const CUDA_MEMCPY3D,
4737            ctx: CUcontext,
4738        ) -> CUresult,
4739        ::libloading::Error,
4740    >,
4741    pub cuGraphExecMemsetNodeSetParams: Result<
4742        unsafe extern "C" fn(
4743            hGraphExec: CUgraphExec,
4744            hNode: CUgraphNode,
4745            memsetParams: *const CUDA_MEMSET_NODE_PARAMS,
4746            ctx: CUcontext,
4747        ) -> CUresult,
4748        ::libloading::Error,
4749    >,
4750    pub cuGraphExecHostNodeSetParams: Result<
4751        unsafe extern "C" fn(
4752            hGraphExec: CUgraphExec,
4753            hNode: CUgraphNode,
4754            nodeParams: *const CUDA_HOST_NODE_PARAMS,
4755        ) -> CUresult,
4756        ::libloading::Error,
4757    >,
4758    pub cuGraphExecChildGraphNodeSetParams: Result<
4759        unsafe extern "C" fn(
4760            hGraphExec: CUgraphExec,
4761            hNode: CUgraphNode,
4762            childGraph: CUgraph,
4763        ) -> CUresult,
4764        ::libloading::Error,
4765    >,
4766    pub cuGraphExecEventRecordNodeSetEvent: Result<
4767        unsafe extern "C" fn(
4768            hGraphExec: CUgraphExec,
4769            hNode: CUgraphNode,
4770            event: CUevent,
4771        ) -> CUresult,
4772        ::libloading::Error,
4773    >,
4774    pub cuGraphExecEventWaitNodeSetEvent: Result<
4775        unsafe extern "C" fn(
4776            hGraphExec: CUgraphExec,
4777            hNode: CUgraphNode,
4778            event: CUevent,
4779        ) -> CUresult,
4780        ::libloading::Error,
4781    >,
4782    pub cuGraphExecExternalSemaphoresSignalNodeSetParams: Result<
4783        unsafe extern "C" fn(
4784            hGraphExec: CUgraphExec,
4785            hNode: CUgraphNode,
4786            nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
4787        ) -> CUresult,
4788        ::libloading::Error,
4789    >,
4790    pub cuGraphExecExternalSemaphoresWaitNodeSetParams: Result<
4791        unsafe extern "C" fn(
4792            hGraphExec: CUgraphExec,
4793            hNode: CUgraphNode,
4794            nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
4795        ) -> CUresult,
4796        ::libloading::Error,
4797    >,
4798    pub cuGraphNodeSetEnabled: Result<
4799        unsafe extern "C" fn(
4800            hGraphExec: CUgraphExec,
4801            hNode: CUgraphNode,
4802            isEnabled: ::std::os::raw::c_uint,
4803        ) -> CUresult,
4804        ::libloading::Error,
4805    >,
4806    pub cuGraphNodeGetEnabled: Result<
4807        unsafe extern "C" fn(
4808            hGraphExec: CUgraphExec,
4809            hNode: CUgraphNode,
4810            isEnabled: *mut ::std::os::raw::c_uint,
4811        ) -> CUresult,
4812        ::libloading::Error,
4813    >,
4814    pub cuGraphUpload: Result<
4815        unsafe extern "C" fn(hGraphExec: CUgraphExec, hStream: CUstream) -> CUresult,
4816        ::libloading::Error,
4817    >,
4818    pub cuGraphLaunch: Result<
4819        unsafe extern "C" fn(hGraphExec: CUgraphExec, hStream: CUstream) -> CUresult,
4820        ::libloading::Error,
4821    >,
4822    pub cuGraphExecDestroy:
4823        Result<unsafe extern "C" fn(hGraphExec: CUgraphExec) -> CUresult, ::libloading::Error>,
4824    pub cuGraphDestroy:
4825        Result<unsafe extern "C" fn(hGraph: CUgraph) -> CUresult, ::libloading::Error>,
4826    pub cuGraphExecUpdate_v2: Result<
4827        unsafe extern "C" fn(
4828            hGraphExec: CUgraphExec,
4829            hGraph: CUgraph,
4830            resultInfo: *mut CUgraphExecUpdateResultInfo,
4831        ) -> CUresult,
4832        ::libloading::Error,
4833    >,
4834    pub cuGraphKernelNodeCopyAttributes: Result<
4835        unsafe extern "C" fn(dst: CUgraphNode, src: CUgraphNode) -> CUresult,
4836        ::libloading::Error,
4837    >,
4838    pub cuGraphKernelNodeGetAttribute: Result<
4839        unsafe extern "C" fn(
4840            hNode: CUgraphNode,
4841            attr: CUkernelNodeAttrID,
4842            value_out: *mut CUkernelNodeAttrValue,
4843        ) -> CUresult,
4844        ::libloading::Error,
4845    >,
4846    pub cuGraphKernelNodeSetAttribute: Result<
4847        unsafe extern "C" fn(
4848            hNode: CUgraphNode,
4849            attr: CUkernelNodeAttrID,
4850            value: *const CUkernelNodeAttrValue,
4851        ) -> CUresult,
4852        ::libloading::Error,
4853    >,
4854    pub cuGraphDebugDotPrint: Result<
4855        unsafe extern "C" fn(
4856            hGraph: CUgraph,
4857            path: *const ::std::os::raw::c_char,
4858            flags: ::std::os::raw::c_uint,
4859        ) -> CUresult,
4860        ::libloading::Error,
4861    >,
4862    pub cuUserObjectCreate: Result<
4863        unsafe extern "C" fn(
4864            object_out: *mut CUuserObject,
4865            ptr: *mut ::std::os::raw::c_void,
4866            destroy: CUhostFn,
4867            initialRefcount: ::std::os::raw::c_uint,
4868            flags: ::std::os::raw::c_uint,
4869        ) -> CUresult,
4870        ::libloading::Error,
4871    >,
4872    pub cuUserObjectRetain: Result<
4873        unsafe extern "C" fn(object: CUuserObject, count: ::std::os::raw::c_uint) -> CUresult,
4874        ::libloading::Error,
4875    >,
4876    pub cuUserObjectRelease: Result<
4877        unsafe extern "C" fn(object: CUuserObject, count: ::std::os::raw::c_uint) -> CUresult,
4878        ::libloading::Error,
4879    >,
4880    pub cuGraphRetainUserObject: Result<
4881        unsafe extern "C" fn(
4882            graph: CUgraph,
4883            object: CUuserObject,
4884            count: ::std::os::raw::c_uint,
4885            flags: ::std::os::raw::c_uint,
4886        ) -> CUresult,
4887        ::libloading::Error,
4888    >,
4889    pub cuGraphReleaseUserObject: Result<
4890        unsafe extern "C" fn(
4891            graph: CUgraph,
4892            object: CUuserObject,
4893            count: ::std::os::raw::c_uint,
4894        ) -> CUresult,
4895        ::libloading::Error,
4896    >,
4897    pub cuOccupancyMaxActiveBlocksPerMultiprocessor: Result<
4898        unsafe extern "C" fn(
4899            numBlocks: *mut ::std::os::raw::c_int,
4900            func: CUfunction,
4901            blockSize: ::std::os::raw::c_int,
4902            dynamicSMemSize: usize,
4903        ) -> CUresult,
4904        ::libloading::Error,
4905    >,
4906    pub cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags: Result<
4907        unsafe extern "C" fn(
4908            numBlocks: *mut ::std::os::raw::c_int,
4909            func: CUfunction,
4910            blockSize: ::std::os::raw::c_int,
4911            dynamicSMemSize: usize,
4912            flags: ::std::os::raw::c_uint,
4913        ) -> CUresult,
4914        ::libloading::Error,
4915    >,
4916    pub cuOccupancyMaxPotentialBlockSize: Result<
4917        unsafe extern "C" fn(
4918            minGridSize: *mut ::std::os::raw::c_int,
4919            blockSize: *mut ::std::os::raw::c_int,
4920            func: CUfunction,
4921            blockSizeToDynamicSMemSize: CUoccupancyB2DSize,
4922            dynamicSMemSize: usize,
4923            blockSizeLimit: ::std::os::raw::c_int,
4924        ) -> CUresult,
4925        ::libloading::Error,
4926    >,
4927    pub cuOccupancyMaxPotentialBlockSizeWithFlags: Result<
4928        unsafe extern "C" fn(
4929            minGridSize: *mut ::std::os::raw::c_int,
4930            blockSize: *mut ::std::os::raw::c_int,
4931            func: CUfunction,
4932            blockSizeToDynamicSMemSize: CUoccupancyB2DSize,
4933            dynamicSMemSize: usize,
4934            blockSizeLimit: ::std::os::raw::c_int,
4935            flags: ::std::os::raw::c_uint,
4936        ) -> CUresult,
4937        ::libloading::Error,
4938    >,
4939    pub cuOccupancyAvailableDynamicSMemPerBlock: Result<
4940        unsafe extern "C" fn(
4941            dynamicSmemSize: *mut usize,
4942            func: CUfunction,
4943            numBlocks: ::std::os::raw::c_int,
4944            blockSize: ::std::os::raw::c_int,
4945        ) -> CUresult,
4946        ::libloading::Error,
4947    >,
4948    pub cuOccupancyMaxPotentialClusterSize: Result<
4949        unsafe extern "C" fn(
4950            clusterSize: *mut ::std::os::raw::c_int,
4951            func: CUfunction,
4952            config: *const CUlaunchConfig,
4953        ) -> CUresult,
4954        ::libloading::Error,
4955    >,
4956    pub cuOccupancyMaxActiveClusters: Result<
4957        unsafe extern "C" fn(
4958            numClusters: *mut ::std::os::raw::c_int,
4959            func: CUfunction,
4960            config: *const CUlaunchConfig,
4961        ) -> CUresult,
4962        ::libloading::Error,
4963    >,
4964    pub cuTexRefSetArray: Result<
4965        unsafe extern "C" fn(
4966            hTexRef: CUtexref,
4967            hArray: CUarray,
4968            Flags: ::std::os::raw::c_uint,
4969        ) -> CUresult,
4970        ::libloading::Error,
4971    >,
4972    pub cuTexRefSetMipmappedArray: Result<
4973        unsafe extern "C" fn(
4974            hTexRef: CUtexref,
4975            hMipmappedArray: CUmipmappedArray,
4976            Flags: ::std::os::raw::c_uint,
4977        ) -> CUresult,
4978        ::libloading::Error,
4979    >,
4980    pub cuTexRefSetAddress_v2: Result<
4981        unsafe extern "C" fn(
4982            ByteOffset: *mut usize,
4983            hTexRef: CUtexref,
4984            dptr: CUdeviceptr,
4985            bytes: usize,
4986        ) -> CUresult,
4987        ::libloading::Error,
4988    >,
4989    pub cuTexRefSetAddress2D_v3: Result<
4990        unsafe extern "C" fn(
4991            hTexRef: CUtexref,
4992            desc: *const CUDA_ARRAY_DESCRIPTOR,
4993            dptr: CUdeviceptr,
4994            Pitch: usize,
4995        ) -> CUresult,
4996        ::libloading::Error,
4997    >,
4998    pub cuTexRefSetFormat: Result<
4999        unsafe extern "C" fn(
5000            hTexRef: CUtexref,
5001            fmt: CUarray_format,
5002            NumPackedComponents: ::std::os::raw::c_int,
5003        ) -> CUresult,
5004        ::libloading::Error,
5005    >,
5006    pub cuTexRefSetAddressMode: Result<
5007        unsafe extern "C" fn(
5008            hTexRef: CUtexref,
5009            dim: ::std::os::raw::c_int,
5010            am: CUaddress_mode,
5011        ) -> CUresult,
5012        ::libloading::Error,
5013    >,
5014    pub cuTexRefSetFilterMode: Result<
5015        unsafe extern "C" fn(hTexRef: CUtexref, fm: CUfilter_mode) -> CUresult,
5016        ::libloading::Error,
5017    >,
5018    pub cuTexRefSetMipmapFilterMode: Result<
5019        unsafe extern "C" fn(hTexRef: CUtexref, fm: CUfilter_mode) -> CUresult,
5020        ::libloading::Error,
5021    >,
5022    pub cuTexRefSetMipmapLevelBias:
5023        Result<unsafe extern "C" fn(hTexRef: CUtexref, bias: f32) -> CUresult, ::libloading::Error>,
5024    pub cuTexRefSetMipmapLevelClamp: Result<
5025        unsafe extern "C" fn(
5026            hTexRef: CUtexref,
5027            minMipmapLevelClamp: f32,
5028            maxMipmapLevelClamp: f32,
5029        ) -> CUresult,
5030        ::libloading::Error,
5031    >,
5032    pub cuTexRefSetMaxAnisotropy: Result<
5033        unsafe extern "C" fn(hTexRef: CUtexref, maxAniso: ::std::os::raw::c_uint) -> CUresult,
5034        ::libloading::Error,
5035    >,
5036    pub cuTexRefSetBorderColor: Result<
5037        unsafe extern "C" fn(hTexRef: CUtexref, pBorderColor: *mut f32) -> CUresult,
5038        ::libloading::Error,
5039    >,
5040    pub cuTexRefSetFlags: Result<
5041        unsafe extern "C" fn(hTexRef: CUtexref, Flags: ::std::os::raw::c_uint) -> CUresult,
5042        ::libloading::Error,
5043    >,
5044    pub cuTexRefGetAddress_v2: Result<
5045        unsafe extern "C" fn(pdptr: *mut CUdeviceptr, hTexRef: CUtexref) -> CUresult,
5046        ::libloading::Error,
5047    >,
5048    pub cuTexRefGetArray: Result<
5049        unsafe extern "C" fn(phArray: *mut CUarray, hTexRef: CUtexref) -> CUresult,
5050        ::libloading::Error,
5051    >,
5052    pub cuTexRefGetMipmappedArray: Result<
5053        unsafe extern "C" fn(
5054            phMipmappedArray: *mut CUmipmappedArray,
5055            hTexRef: CUtexref,
5056        ) -> CUresult,
5057        ::libloading::Error,
5058    >,
5059    pub cuTexRefGetAddressMode: Result<
5060        unsafe extern "C" fn(
5061            pam: *mut CUaddress_mode,
5062            hTexRef: CUtexref,
5063            dim: ::std::os::raw::c_int,
5064        ) -> CUresult,
5065        ::libloading::Error,
5066    >,
5067    pub cuTexRefGetFilterMode: Result<
5068        unsafe extern "C" fn(pfm: *mut CUfilter_mode, hTexRef: CUtexref) -> CUresult,
5069        ::libloading::Error,
5070    >,
5071    pub cuTexRefGetFormat: Result<
5072        unsafe extern "C" fn(
5073            pFormat: *mut CUarray_format,
5074            pNumChannels: *mut ::std::os::raw::c_int,
5075            hTexRef: CUtexref,
5076        ) -> CUresult,
5077        ::libloading::Error,
5078    >,
5079    pub cuTexRefGetMipmapFilterMode: Result<
5080        unsafe extern "C" fn(pfm: *mut CUfilter_mode, hTexRef: CUtexref) -> CUresult,
5081        ::libloading::Error,
5082    >,
5083    pub cuTexRefGetMipmapLevelBias: Result<
5084        unsafe extern "C" fn(pbias: *mut f32, hTexRef: CUtexref) -> CUresult,
5085        ::libloading::Error,
5086    >,
5087    pub cuTexRefGetMipmapLevelClamp: Result<
5088        unsafe extern "C" fn(
5089            pminMipmapLevelClamp: *mut f32,
5090            pmaxMipmapLevelClamp: *mut f32,
5091            hTexRef: CUtexref,
5092        ) -> CUresult,
5093        ::libloading::Error,
5094    >,
5095    pub cuTexRefGetMaxAnisotropy: Result<
5096        unsafe extern "C" fn(pmaxAniso: *mut ::std::os::raw::c_int, hTexRef: CUtexref) -> CUresult,
5097        ::libloading::Error,
5098    >,
5099    pub cuTexRefGetBorderColor: Result<
5100        unsafe extern "C" fn(pBorderColor: *mut f32, hTexRef: CUtexref) -> CUresult,
5101        ::libloading::Error,
5102    >,
5103    pub cuTexRefGetFlags: Result<
5104        unsafe extern "C" fn(pFlags: *mut ::std::os::raw::c_uint, hTexRef: CUtexref) -> CUresult,
5105        ::libloading::Error,
5106    >,
5107    pub cuTexRefCreate:
5108        Result<unsafe extern "C" fn(pTexRef: *mut CUtexref) -> CUresult, ::libloading::Error>,
5109    pub cuTexRefDestroy:
5110        Result<unsafe extern "C" fn(hTexRef: CUtexref) -> CUresult, ::libloading::Error>,
5111    pub cuSurfRefSetArray: Result<
5112        unsafe extern "C" fn(
5113            hSurfRef: CUsurfref,
5114            hArray: CUarray,
5115            Flags: ::std::os::raw::c_uint,
5116        ) -> CUresult,
5117        ::libloading::Error,
5118    >,
5119    pub cuSurfRefGetArray: Result<
5120        unsafe extern "C" fn(phArray: *mut CUarray, hSurfRef: CUsurfref) -> CUresult,
5121        ::libloading::Error,
5122    >,
5123    pub cuTexObjectCreate: Result<
5124        unsafe extern "C" fn(
5125            pTexObject: *mut CUtexObject,
5126            pResDesc: *const CUDA_RESOURCE_DESC,
5127            pTexDesc: *const CUDA_TEXTURE_DESC,
5128            pResViewDesc: *const CUDA_RESOURCE_VIEW_DESC,
5129        ) -> CUresult,
5130        ::libloading::Error,
5131    >,
5132    pub cuTexObjectDestroy:
5133        Result<unsafe extern "C" fn(texObject: CUtexObject) -> CUresult, ::libloading::Error>,
5134    pub cuTexObjectGetResourceDesc: Result<
5135        unsafe extern "C" fn(pResDesc: *mut CUDA_RESOURCE_DESC, texObject: CUtexObject) -> CUresult,
5136        ::libloading::Error,
5137    >,
5138    pub cuTexObjectGetTextureDesc: Result<
5139        unsafe extern "C" fn(pTexDesc: *mut CUDA_TEXTURE_DESC, texObject: CUtexObject) -> CUresult,
5140        ::libloading::Error,
5141    >,
5142    pub cuTexObjectGetResourceViewDesc: Result<
5143        unsafe extern "C" fn(
5144            pResViewDesc: *mut CUDA_RESOURCE_VIEW_DESC,
5145            texObject: CUtexObject,
5146        ) -> CUresult,
5147        ::libloading::Error,
5148    >,
5149    pub cuSurfObjectCreate: Result<
5150        unsafe extern "C" fn(
5151            pSurfObject: *mut CUsurfObject,
5152            pResDesc: *const CUDA_RESOURCE_DESC,
5153        ) -> CUresult,
5154        ::libloading::Error,
5155    >,
5156    pub cuSurfObjectDestroy:
5157        Result<unsafe extern "C" fn(surfObject: CUsurfObject) -> CUresult, ::libloading::Error>,
5158    pub cuSurfObjectGetResourceDesc: Result<
5159        unsafe extern "C" fn(
5160            pResDesc: *mut CUDA_RESOURCE_DESC,
5161            surfObject: CUsurfObject,
5162        ) -> CUresult,
5163        ::libloading::Error,
5164    >,
5165    pub cuTensorMapEncodeTiled: Result<
5166        unsafe extern "C" fn(
5167            tensorMap: *mut CUtensorMap,
5168            tensorDataType: CUtensorMapDataType,
5169            tensorRank: cuuint32_t,
5170            globalAddress: *mut ::std::os::raw::c_void,
5171            globalDim: *const cuuint64_t,
5172            globalStrides: *const cuuint64_t,
5173            boxDim: *const cuuint32_t,
5174            elementStrides: *const cuuint32_t,
5175            interleave: CUtensorMapInterleave,
5176            swizzle: CUtensorMapSwizzle,
5177            l2Promotion: CUtensorMapL2promotion,
5178            oobFill: CUtensorMapFloatOOBfill,
5179        ) -> CUresult,
5180        ::libloading::Error,
5181    >,
5182    pub cuTensorMapEncodeIm2col: Result<
5183        unsafe extern "C" fn(
5184            tensorMap: *mut CUtensorMap,
5185            tensorDataType: CUtensorMapDataType,
5186            tensorRank: cuuint32_t,
5187            globalAddress: *mut ::std::os::raw::c_void,
5188            globalDim: *const cuuint64_t,
5189            globalStrides: *const cuuint64_t,
5190            pixelBoxLowerCorner: *const ::std::os::raw::c_int,
5191            pixelBoxUpperCorner: *const ::std::os::raw::c_int,
5192            channelsPerPixel: cuuint32_t,
5193            pixelsPerColumn: cuuint32_t,
5194            elementStrides: *const cuuint32_t,
5195            interleave: CUtensorMapInterleave,
5196            swizzle: CUtensorMapSwizzle,
5197            l2Promotion: CUtensorMapL2promotion,
5198            oobFill: CUtensorMapFloatOOBfill,
5199        ) -> CUresult,
5200        ::libloading::Error,
5201    >,
5202    pub cuTensorMapReplaceAddress: Result<
5203        unsafe extern "C" fn(
5204            tensorMap: *mut CUtensorMap,
5205            globalAddress: *mut ::std::os::raw::c_void,
5206        ) -> CUresult,
5207        ::libloading::Error,
5208    >,
5209    pub cuDeviceCanAccessPeer: Result<
5210        unsafe extern "C" fn(
5211            canAccessPeer: *mut ::std::os::raw::c_int,
5212            dev: CUdevice,
5213            peerDev: CUdevice,
5214        ) -> CUresult,
5215        ::libloading::Error,
5216    >,
5217    pub cuCtxEnablePeerAccess: Result<
5218        unsafe extern "C" fn(peerContext: CUcontext, Flags: ::std::os::raw::c_uint) -> CUresult,
5219        ::libloading::Error,
5220    >,
5221    pub cuCtxDisablePeerAccess:
5222        Result<unsafe extern "C" fn(peerContext: CUcontext) -> CUresult, ::libloading::Error>,
5223    pub cuDeviceGetP2PAttribute: Result<
5224        unsafe extern "C" fn(
5225            value: *mut ::std::os::raw::c_int,
5226            attrib: CUdevice_P2PAttribute,
5227            srcDevice: CUdevice,
5228            dstDevice: CUdevice,
5229        ) -> CUresult,
5230        ::libloading::Error,
5231    >,
5232    pub cuGraphicsUnregisterResource:
5233        Result<unsafe extern "C" fn(resource: CUgraphicsResource) -> CUresult, ::libloading::Error>,
5234    pub cuGraphicsSubResourceGetMappedArray: Result<
5235        unsafe extern "C" fn(
5236            pArray: *mut CUarray,
5237            resource: CUgraphicsResource,
5238            arrayIndex: ::std::os::raw::c_uint,
5239            mipLevel: ::std::os::raw::c_uint,
5240        ) -> CUresult,
5241        ::libloading::Error,
5242    >,
5243    pub cuGraphicsResourceGetMappedMipmappedArray: Result<
5244        unsafe extern "C" fn(
5245            pMipmappedArray: *mut CUmipmappedArray,
5246            resource: CUgraphicsResource,
5247        ) -> CUresult,
5248        ::libloading::Error,
5249    >,
5250    pub cuGraphicsResourceGetMappedPointer_v2: Result<
5251        unsafe extern "C" fn(
5252            pDevPtr: *mut CUdeviceptr,
5253            pSize: *mut usize,
5254            resource: CUgraphicsResource,
5255        ) -> CUresult,
5256        ::libloading::Error,
5257    >,
5258    pub cuGraphicsResourceSetMapFlags_v2: Result<
5259        unsafe extern "C" fn(
5260            resource: CUgraphicsResource,
5261            flags: ::std::os::raw::c_uint,
5262        ) -> CUresult,
5263        ::libloading::Error,
5264    >,
5265    pub cuGraphicsMapResources: Result<
5266        unsafe extern "C" fn(
5267            count: ::std::os::raw::c_uint,
5268            resources: *mut CUgraphicsResource,
5269            hStream: CUstream,
5270        ) -> CUresult,
5271        ::libloading::Error,
5272    >,
5273    pub cuGraphicsUnmapResources: Result<
5274        unsafe extern "C" fn(
5275            count: ::std::os::raw::c_uint,
5276            resources: *mut CUgraphicsResource,
5277            hStream: CUstream,
5278        ) -> CUresult,
5279        ::libloading::Error,
5280    >,
5281    pub cuGetProcAddress_v2: Result<
5282        unsafe extern "C" fn(
5283            symbol: *const ::std::os::raw::c_char,
5284            pfn: *mut *mut ::std::os::raw::c_void,
5285            cudaVersion: ::std::os::raw::c_int,
5286            flags: cuuint64_t,
5287            symbolStatus: *mut CUdriverProcAddressQueryResult,
5288        ) -> CUresult,
5289        ::libloading::Error,
5290    >,
5291    pub cuGetExportTable: Result<
5292        unsafe extern "C" fn(
5293            ppExportTable: *mut *const ::std::os::raw::c_void,
5294            pExportTableId: *const CUuuid,
5295        ) -> CUresult,
5296        ::libloading::Error,
5297    >,
5298}
5299impl cuda {
5300    pub unsafe fn new<P>(path: P) -> Result<Self, ::libloading::Error>
5301    where
5302        P: AsRef<::std::ffi::OsStr>,
5303    {
5304        let library = ::libloading::Library::new(path)?;
5305        Self::from_library(library)
5306    }
5307    pub unsafe fn from_library<L>(library: L) -> Result<Self, ::libloading::Error>
5308    where
5309        L: Into<::libloading::Library>,
5310    {
5311        let __library = library.into();
5312        let cuGetErrorString = __library.get(b"cuGetErrorString\0").map(|sym| *sym);
5313        let cuGetErrorName = __library.get(b"cuGetErrorName\0").map(|sym| *sym);
5314        let cuInit = __library.get(b"cuInit\0").map(|sym| *sym);
5315        let cuDriverGetVersion = __library.get(b"cuDriverGetVersion\0").map(|sym| *sym);
5316        let cuDeviceGet = __library.get(b"cuDeviceGet\0").map(|sym| *sym);
5317        let cuDeviceGetCount = __library.get(b"cuDeviceGetCount\0").map(|sym| *sym);
5318        let cuDeviceGetName = __library.get(b"cuDeviceGetName\0").map(|sym| *sym);
5319        let cuDeviceGetUuid = __library.get(b"cuDeviceGetUuid\0").map(|sym| *sym);
5320        let cuDeviceGetUuid_v2 = __library.get(b"cuDeviceGetUuid_v2\0").map(|sym| *sym);
5321        let cuDeviceGetLuid = __library.get(b"cuDeviceGetLuid\0").map(|sym| *sym);
5322        let cuDeviceTotalMem_v2 = __library.get(b"cuDeviceTotalMem_v2\0").map(|sym| *sym);
5323        let cuDeviceGetTexture1DLinearMaxWidth = __library
5324            .get(b"cuDeviceGetTexture1DLinearMaxWidth\0")
5325            .map(|sym| *sym);
5326        let cuDeviceGetAttribute = __library.get(b"cuDeviceGetAttribute\0").map(|sym| *sym);
5327        let cuDeviceGetNvSciSyncAttributes = __library
5328            .get(b"cuDeviceGetNvSciSyncAttributes\0")
5329            .map(|sym| *sym);
5330        let cuDeviceSetMemPool = __library.get(b"cuDeviceSetMemPool\0").map(|sym| *sym);
5331        let cuDeviceGetMemPool = __library.get(b"cuDeviceGetMemPool\0").map(|sym| *sym);
5332        let cuDeviceGetDefaultMemPool = __library
5333            .get(b"cuDeviceGetDefaultMemPool\0")
5334            .map(|sym| *sym);
5335        let cuDeviceGetExecAffinitySupport = __library
5336            .get(b"cuDeviceGetExecAffinitySupport\0")
5337            .map(|sym| *sym);
5338        let cuFlushGPUDirectRDMAWrites = __library
5339            .get(b"cuFlushGPUDirectRDMAWrites\0")
5340            .map(|sym| *sym);
5341        let cuDeviceGetProperties = __library.get(b"cuDeviceGetProperties\0").map(|sym| *sym);
5342        let cuDeviceComputeCapability = __library
5343            .get(b"cuDeviceComputeCapability\0")
5344            .map(|sym| *sym);
5345        let cuDevicePrimaryCtxRetain = __library.get(b"cuDevicePrimaryCtxRetain\0").map(|sym| *sym);
5346        let cuDevicePrimaryCtxRelease_v2 = __library
5347            .get(b"cuDevicePrimaryCtxRelease_v2\0")
5348            .map(|sym| *sym);
5349        let cuDevicePrimaryCtxSetFlags_v2 = __library
5350            .get(b"cuDevicePrimaryCtxSetFlags_v2\0")
5351            .map(|sym| *sym);
5352        let cuDevicePrimaryCtxGetState = __library
5353            .get(b"cuDevicePrimaryCtxGetState\0")
5354            .map(|sym| *sym);
5355        let cuDevicePrimaryCtxReset_v2 = __library
5356            .get(b"cuDevicePrimaryCtxReset_v2\0")
5357            .map(|sym| *sym);
5358        let cuCtxCreate_v2 = __library.get(b"cuCtxCreate_v2\0").map(|sym| *sym);
5359        let cuCtxCreate_v3 = __library.get(b"cuCtxCreate_v3\0").map(|sym| *sym);
5360        let cuCtxDestroy_v2 = __library.get(b"cuCtxDestroy_v2\0").map(|sym| *sym);
5361        let cuCtxPushCurrent_v2 = __library.get(b"cuCtxPushCurrent_v2\0").map(|sym| *sym);
5362        let cuCtxPopCurrent_v2 = __library.get(b"cuCtxPopCurrent_v2\0").map(|sym| *sym);
5363        let cuCtxSetCurrent = __library.get(b"cuCtxSetCurrent\0").map(|sym| *sym);
5364        let cuCtxGetCurrent = __library.get(b"cuCtxGetCurrent\0").map(|sym| *sym);
5365        let cuCtxGetDevice = __library.get(b"cuCtxGetDevice\0").map(|sym| *sym);
5366        let cuCtxGetFlags = __library.get(b"cuCtxGetFlags\0").map(|sym| *sym);
5367        let cuCtxGetId = __library.get(b"cuCtxGetId\0").map(|sym| *sym);
5368        let cuCtxSynchronize = __library.get(b"cuCtxSynchronize\0").map(|sym| *sym);
5369        let cuCtxSetLimit = __library.get(b"cuCtxSetLimit\0").map(|sym| *sym);
5370        let cuCtxGetLimit = __library.get(b"cuCtxGetLimit\0").map(|sym| *sym);
5371        let cuCtxGetCacheConfig = __library.get(b"cuCtxGetCacheConfig\0").map(|sym| *sym);
5372        let cuCtxSetCacheConfig = __library.get(b"cuCtxSetCacheConfig\0").map(|sym| *sym);
5373        let cuCtxGetSharedMemConfig = __library.get(b"cuCtxGetSharedMemConfig\0").map(|sym| *sym);
5374        let cuCtxSetSharedMemConfig = __library.get(b"cuCtxSetSharedMemConfig\0").map(|sym| *sym);
5375        let cuCtxGetApiVersion = __library.get(b"cuCtxGetApiVersion\0").map(|sym| *sym);
5376        let cuCtxGetStreamPriorityRange = __library
5377            .get(b"cuCtxGetStreamPriorityRange\0")
5378            .map(|sym| *sym);
5379        let cuCtxResetPersistingL2Cache = __library
5380            .get(b"cuCtxResetPersistingL2Cache\0")
5381            .map(|sym| *sym);
5382        let cuCtxGetExecAffinity = __library.get(b"cuCtxGetExecAffinity\0").map(|sym| *sym);
5383        let cuCtxAttach = __library.get(b"cuCtxAttach\0").map(|sym| *sym);
5384        let cuCtxDetach = __library.get(b"cuCtxDetach\0").map(|sym| *sym);
5385        let cuModuleLoad = __library.get(b"cuModuleLoad\0").map(|sym| *sym);
5386        let cuModuleLoadData = __library.get(b"cuModuleLoadData\0").map(|sym| *sym);
5387        let cuModuleLoadDataEx = __library.get(b"cuModuleLoadDataEx\0").map(|sym| *sym);
5388        let cuModuleLoadFatBinary = __library.get(b"cuModuleLoadFatBinary\0").map(|sym| *sym);
5389        let cuModuleUnload = __library.get(b"cuModuleUnload\0").map(|sym| *sym);
5390        let cuModuleGetLoadingMode = __library.get(b"cuModuleGetLoadingMode\0").map(|sym| *sym);
5391        let cuModuleGetFunction = __library.get(b"cuModuleGetFunction\0").map(|sym| *sym);
5392        let cuModuleGetGlobal_v2 = __library.get(b"cuModuleGetGlobal_v2\0").map(|sym| *sym);
5393        let cuLinkCreate_v2 = __library.get(b"cuLinkCreate_v2\0").map(|sym| *sym);
5394        let cuLinkAddData_v2 = __library.get(b"cuLinkAddData_v2\0").map(|sym| *sym);
5395        let cuLinkAddFile_v2 = __library.get(b"cuLinkAddFile_v2\0").map(|sym| *sym);
5396        let cuLinkComplete = __library.get(b"cuLinkComplete\0").map(|sym| *sym);
5397        let cuLinkDestroy = __library.get(b"cuLinkDestroy\0").map(|sym| *sym);
5398        let cuModuleGetTexRef = __library.get(b"cuModuleGetTexRef\0").map(|sym| *sym);
5399        let cuModuleGetSurfRef = __library.get(b"cuModuleGetSurfRef\0").map(|sym| *sym);
5400        let cuLibraryLoadData = __library.get(b"cuLibraryLoadData\0").map(|sym| *sym);
5401        let cuLibraryLoadFromFile = __library.get(b"cuLibraryLoadFromFile\0").map(|sym| *sym);
5402        let cuLibraryUnload = __library.get(b"cuLibraryUnload\0").map(|sym| *sym);
5403        let cuLibraryGetKernel = __library.get(b"cuLibraryGetKernel\0").map(|sym| *sym);
5404        let cuLibraryGetModule = __library.get(b"cuLibraryGetModule\0").map(|sym| *sym);
5405        let cuKernelGetFunction = __library.get(b"cuKernelGetFunction\0").map(|sym| *sym);
5406        let cuLibraryGetGlobal = __library.get(b"cuLibraryGetGlobal\0").map(|sym| *sym);
5407        let cuLibraryGetManaged = __library.get(b"cuLibraryGetManaged\0").map(|sym| *sym);
5408        let cuLibraryGetUnifiedFunction = __library
5409            .get(b"cuLibraryGetUnifiedFunction\0")
5410            .map(|sym| *sym);
5411        let cuKernelGetAttribute = __library.get(b"cuKernelGetAttribute\0").map(|sym| *sym);
5412        let cuKernelSetAttribute = __library.get(b"cuKernelSetAttribute\0").map(|sym| *sym);
5413        let cuKernelSetCacheConfig = __library.get(b"cuKernelSetCacheConfig\0").map(|sym| *sym);
5414        let cuMemGetInfo_v2 = __library.get(b"cuMemGetInfo_v2\0").map(|sym| *sym);
5415        let cuMemAlloc_v2 = __library.get(b"cuMemAlloc_v2\0").map(|sym| *sym);
5416        let cuMemAllocPitch_v2 = __library.get(b"cuMemAllocPitch_v2\0").map(|sym| *sym);
5417        let cuMemFree_v2 = __library.get(b"cuMemFree_v2\0").map(|sym| *sym);
5418        let cuMemGetAddressRange_v2 = __library.get(b"cuMemGetAddressRange_v2\0").map(|sym| *sym);
5419        let cuMemAllocHost_v2 = __library.get(b"cuMemAllocHost_v2\0").map(|sym| *sym);
5420        let cuMemFreeHost = __library.get(b"cuMemFreeHost\0").map(|sym| *sym);
5421        let cuMemHostAlloc = __library.get(b"cuMemHostAlloc\0").map(|sym| *sym);
5422        let cuMemHostGetDevicePointer_v2 = __library
5423            .get(b"cuMemHostGetDevicePointer_v2\0")
5424            .map(|sym| *sym);
5425        let cuMemHostGetFlags = __library.get(b"cuMemHostGetFlags\0").map(|sym| *sym);
5426        let cuMemAllocManaged = __library.get(b"cuMemAllocManaged\0").map(|sym| *sym);
5427        let cuDeviceGetByPCIBusId = __library.get(b"cuDeviceGetByPCIBusId\0").map(|sym| *sym);
5428        let cuDeviceGetPCIBusId = __library.get(b"cuDeviceGetPCIBusId\0").map(|sym| *sym);
5429        let cuIpcGetEventHandle = __library.get(b"cuIpcGetEventHandle\0").map(|sym| *sym);
5430        let cuIpcOpenEventHandle = __library.get(b"cuIpcOpenEventHandle\0").map(|sym| *sym);
5431        let cuIpcGetMemHandle = __library.get(b"cuIpcGetMemHandle\0").map(|sym| *sym);
5432        let cuIpcOpenMemHandle_v2 = __library.get(b"cuIpcOpenMemHandle_v2\0").map(|sym| *sym);
5433        let cuIpcCloseMemHandle = __library.get(b"cuIpcCloseMemHandle\0").map(|sym| *sym);
5434        let cuMemHostRegister_v2 = __library.get(b"cuMemHostRegister_v2\0").map(|sym| *sym);
5435        let cuMemHostUnregister = __library.get(b"cuMemHostUnregister\0").map(|sym| *sym);
5436        let cuMemcpy = __library.get(b"cuMemcpy\0").map(|sym| *sym);
5437        let cuMemcpyPeer = __library.get(b"cuMemcpyPeer\0").map(|sym| *sym);
5438        let cuMemcpyHtoD_v2 = __library.get(b"cuMemcpyHtoD_v2\0").map(|sym| *sym);
5439        let cuMemcpyDtoH_v2 = __library.get(b"cuMemcpyDtoH_v2\0").map(|sym| *sym);
5440        let cuMemcpyDtoD_v2 = __library.get(b"cuMemcpyDtoD_v2\0").map(|sym| *sym);
5441        let cuMemcpyDtoA_v2 = __library.get(b"cuMemcpyDtoA_v2\0").map(|sym| *sym);
5442        let cuMemcpyAtoD_v2 = __library.get(b"cuMemcpyAtoD_v2\0").map(|sym| *sym);
5443        let cuMemcpyHtoA_v2 = __library.get(b"cuMemcpyHtoA_v2\0").map(|sym| *sym);
5444        let cuMemcpyAtoH_v2 = __library.get(b"cuMemcpyAtoH_v2\0").map(|sym| *sym);
5445        let cuMemcpyAtoA_v2 = __library.get(b"cuMemcpyAtoA_v2\0").map(|sym| *sym);
5446        let cuMemcpy2D_v2 = __library.get(b"cuMemcpy2D_v2\0").map(|sym| *sym);
5447        let cuMemcpy2DUnaligned_v2 = __library.get(b"cuMemcpy2DUnaligned_v2\0").map(|sym| *sym);
5448        let cuMemcpy3D_v2 = __library.get(b"cuMemcpy3D_v2\0").map(|sym| *sym);
5449        let cuMemcpy3DPeer = __library.get(b"cuMemcpy3DPeer\0").map(|sym| *sym);
5450        let cuMemcpyAsync = __library.get(b"cuMemcpyAsync\0").map(|sym| *sym);
5451        let cuMemcpyPeerAsync = __library.get(b"cuMemcpyPeerAsync\0").map(|sym| *sym);
5452        let cuMemcpyHtoDAsync_v2 = __library.get(b"cuMemcpyHtoDAsync_v2\0").map(|sym| *sym);
5453        let cuMemcpyDtoHAsync_v2 = __library.get(b"cuMemcpyDtoHAsync_v2\0").map(|sym| *sym);
5454        let cuMemcpyDtoDAsync_v2 = __library.get(b"cuMemcpyDtoDAsync_v2\0").map(|sym| *sym);
5455        let cuMemcpyHtoAAsync_v2 = __library.get(b"cuMemcpyHtoAAsync_v2\0").map(|sym| *sym);
5456        let cuMemcpyAtoHAsync_v2 = __library.get(b"cuMemcpyAtoHAsync_v2\0").map(|sym| *sym);
5457        let cuMemcpy2DAsync_v2 = __library.get(b"cuMemcpy2DAsync_v2\0").map(|sym| *sym);
5458        let cuMemcpy3DAsync_v2 = __library.get(b"cuMemcpy3DAsync_v2\0").map(|sym| *sym);
5459        let cuMemcpy3DPeerAsync = __library.get(b"cuMemcpy3DPeerAsync\0").map(|sym| *sym);
5460        let cuMemsetD8_v2 = __library.get(b"cuMemsetD8_v2\0").map(|sym| *sym);
5461        let cuMemsetD16_v2 = __library.get(b"cuMemsetD16_v2\0").map(|sym| *sym);
5462        let cuMemsetD32_v2 = __library.get(b"cuMemsetD32_v2\0").map(|sym| *sym);
5463        let cuMemsetD2D8_v2 = __library.get(b"cuMemsetD2D8_v2\0").map(|sym| *sym);
5464        let cuMemsetD2D16_v2 = __library.get(b"cuMemsetD2D16_v2\0").map(|sym| *sym);
5465        let cuMemsetD2D32_v2 = __library.get(b"cuMemsetD2D32_v2\0").map(|sym| *sym);
5466        let cuMemsetD8Async = __library.get(b"cuMemsetD8Async\0").map(|sym| *sym);
5467        let cuMemsetD16Async = __library.get(b"cuMemsetD16Async\0").map(|sym| *sym);
5468        let cuMemsetD32Async = __library.get(b"cuMemsetD32Async\0").map(|sym| *sym);
5469        let cuMemsetD2D8Async = __library.get(b"cuMemsetD2D8Async\0").map(|sym| *sym);
5470        let cuMemsetD2D16Async = __library.get(b"cuMemsetD2D16Async\0").map(|sym| *sym);
5471        let cuMemsetD2D32Async = __library.get(b"cuMemsetD2D32Async\0").map(|sym| *sym);
5472        let cuArrayCreate_v2 = __library.get(b"cuArrayCreate_v2\0").map(|sym| *sym);
5473        let cuArrayGetDescriptor_v2 = __library.get(b"cuArrayGetDescriptor_v2\0").map(|sym| *sym);
5474        let cuArrayGetSparseProperties = __library
5475            .get(b"cuArrayGetSparseProperties\0")
5476            .map(|sym| *sym);
5477        let cuMipmappedArrayGetSparseProperties = __library
5478            .get(b"cuMipmappedArrayGetSparseProperties\0")
5479            .map(|sym| *sym);
5480        let cuArrayGetMemoryRequirements = __library
5481            .get(b"cuArrayGetMemoryRequirements\0")
5482            .map(|sym| *sym);
5483        let cuMipmappedArrayGetMemoryRequirements = __library
5484            .get(b"cuMipmappedArrayGetMemoryRequirements\0")
5485            .map(|sym| *sym);
5486        let cuArrayGetPlane = __library.get(b"cuArrayGetPlane\0").map(|sym| *sym);
5487        let cuArrayDestroy = __library.get(b"cuArrayDestroy\0").map(|sym| *sym);
5488        let cuArray3DCreate_v2 = __library.get(b"cuArray3DCreate_v2\0").map(|sym| *sym);
5489        let cuArray3DGetDescriptor_v2 = __library
5490            .get(b"cuArray3DGetDescriptor_v2\0")
5491            .map(|sym| *sym);
5492        let cuMipmappedArrayCreate = __library.get(b"cuMipmappedArrayCreate\0").map(|sym| *sym);
5493        let cuMipmappedArrayGetLevel = __library.get(b"cuMipmappedArrayGetLevel\0").map(|sym| *sym);
5494        let cuMipmappedArrayDestroy = __library.get(b"cuMipmappedArrayDestroy\0").map(|sym| *sym);
5495        let cuMemGetHandleForAddressRange = __library
5496            .get(b"cuMemGetHandleForAddressRange\0")
5497            .map(|sym| *sym);
5498        let cuMemAddressReserve = __library.get(b"cuMemAddressReserve\0").map(|sym| *sym);
5499        let cuMemAddressFree = __library.get(b"cuMemAddressFree\0").map(|sym| *sym);
5500        let cuMemCreate = __library.get(b"cuMemCreate\0").map(|sym| *sym);
5501        let cuMemRelease = __library.get(b"cuMemRelease\0").map(|sym| *sym);
5502        let cuMemMap = __library.get(b"cuMemMap\0").map(|sym| *sym);
5503        let cuMemMapArrayAsync = __library.get(b"cuMemMapArrayAsync\0").map(|sym| *sym);
5504        let cuMemUnmap = __library.get(b"cuMemUnmap\0").map(|sym| *sym);
5505        let cuMemSetAccess = __library.get(b"cuMemSetAccess\0").map(|sym| *sym);
5506        let cuMemGetAccess = __library.get(b"cuMemGetAccess\0").map(|sym| *sym);
5507        let cuMemExportToShareableHandle = __library
5508            .get(b"cuMemExportToShareableHandle\0")
5509            .map(|sym| *sym);
5510        let cuMemImportFromShareableHandle = __library
5511            .get(b"cuMemImportFromShareableHandle\0")
5512            .map(|sym| *sym);
5513        let cuMemGetAllocationGranularity = __library
5514            .get(b"cuMemGetAllocationGranularity\0")
5515            .map(|sym| *sym);
5516        let cuMemGetAllocationPropertiesFromHandle = __library
5517            .get(b"cuMemGetAllocationPropertiesFromHandle\0")
5518            .map(|sym| *sym);
5519        let cuMemRetainAllocationHandle = __library
5520            .get(b"cuMemRetainAllocationHandle\0")
5521            .map(|sym| *sym);
5522        let cuMemFreeAsync = __library.get(b"cuMemFreeAsync\0").map(|sym| *sym);
5523        let cuMemAllocAsync = __library.get(b"cuMemAllocAsync\0").map(|sym| *sym);
5524        let cuMemPoolTrimTo = __library.get(b"cuMemPoolTrimTo\0").map(|sym| *sym);
5525        let cuMemPoolSetAttribute = __library.get(b"cuMemPoolSetAttribute\0").map(|sym| *sym);
5526        let cuMemPoolGetAttribute = __library.get(b"cuMemPoolGetAttribute\0").map(|sym| *sym);
5527        let cuMemPoolSetAccess = __library.get(b"cuMemPoolSetAccess\0").map(|sym| *sym);
5528        let cuMemPoolGetAccess = __library.get(b"cuMemPoolGetAccess\0").map(|sym| *sym);
5529        let cuMemPoolCreate = __library.get(b"cuMemPoolCreate\0").map(|sym| *sym);
5530        let cuMemPoolDestroy = __library.get(b"cuMemPoolDestroy\0").map(|sym| *sym);
5531        let cuMemAllocFromPoolAsync = __library.get(b"cuMemAllocFromPoolAsync\0").map(|sym| *sym);
5532        let cuMemPoolExportToShareableHandle = __library
5533            .get(b"cuMemPoolExportToShareableHandle\0")
5534            .map(|sym| *sym);
5535        let cuMemPoolImportFromShareableHandle = __library
5536            .get(b"cuMemPoolImportFromShareableHandle\0")
5537            .map(|sym| *sym);
5538        let cuMemPoolExportPointer = __library.get(b"cuMemPoolExportPointer\0").map(|sym| *sym);
5539        let cuMemPoolImportPointer = __library.get(b"cuMemPoolImportPointer\0").map(|sym| *sym);
5540        let cuPointerGetAttribute = __library.get(b"cuPointerGetAttribute\0").map(|sym| *sym);
5541        let cuMemPrefetchAsync = __library.get(b"cuMemPrefetchAsync\0").map(|sym| *sym);
5542        let cuMemAdvise = __library.get(b"cuMemAdvise\0").map(|sym| *sym);
5543        let cuMemRangeGetAttribute = __library.get(b"cuMemRangeGetAttribute\0").map(|sym| *sym);
5544        let cuMemRangeGetAttributes = __library.get(b"cuMemRangeGetAttributes\0").map(|sym| *sym);
5545        let cuPointerSetAttribute = __library.get(b"cuPointerSetAttribute\0").map(|sym| *sym);
5546        let cuPointerGetAttributes = __library.get(b"cuPointerGetAttributes\0").map(|sym| *sym);
5547        let cuStreamCreate = __library.get(b"cuStreamCreate\0").map(|sym| *sym);
5548        let cuStreamCreateWithPriority = __library
5549            .get(b"cuStreamCreateWithPriority\0")
5550            .map(|sym| *sym);
5551        let cuStreamGetPriority = __library.get(b"cuStreamGetPriority\0").map(|sym| *sym);
5552        let cuStreamGetFlags = __library.get(b"cuStreamGetFlags\0").map(|sym| *sym);
5553        let cuStreamGetId = __library.get(b"cuStreamGetId\0").map(|sym| *sym);
5554        let cuStreamGetCtx = __library.get(b"cuStreamGetCtx\0").map(|sym| *sym);
5555        let cuStreamWaitEvent = __library.get(b"cuStreamWaitEvent\0").map(|sym| *sym);
5556        let cuStreamAddCallback = __library.get(b"cuStreamAddCallback\0").map(|sym| *sym);
5557        let cuStreamBeginCapture_v2 = __library.get(b"cuStreamBeginCapture_v2\0").map(|sym| *sym);
5558        let cuThreadExchangeStreamCaptureMode = __library
5559            .get(b"cuThreadExchangeStreamCaptureMode\0")
5560            .map(|sym| *sym);
5561        let cuStreamEndCapture = __library.get(b"cuStreamEndCapture\0").map(|sym| *sym);
5562        let cuStreamIsCapturing = __library.get(b"cuStreamIsCapturing\0").map(|sym| *sym);
5563        let cuStreamGetCaptureInfo_v2 = __library
5564            .get(b"cuStreamGetCaptureInfo_v2\0")
5565            .map(|sym| *sym);
5566        let cuStreamUpdateCaptureDependencies = __library
5567            .get(b"cuStreamUpdateCaptureDependencies\0")
5568            .map(|sym| *sym);
5569        let cuStreamAttachMemAsync = __library.get(b"cuStreamAttachMemAsync\0").map(|sym| *sym);
5570        let cuStreamQuery = __library.get(b"cuStreamQuery\0").map(|sym| *sym);
5571        let cuStreamSynchronize = __library.get(b"cuStreamSynchronize\0").map(|sym| *sym);
5572        let cuStreamDestroy_v2 = __library.get(b"cuStreamDestroy_v2\0").map(|sym| *sym);
5573        let cuStreamCopyAttributes = __library.get(b"cuStreamCopyAttributes\0").map(|sym| *sym);
5574        let cuStreamGetAttribute = __library.get(b"cuStreamGetAttribute\0").map(|sym| *sym);
5575        let cuStreamSetAttribute = __library.get(b"cuStreamSetAttribute\0").map(|sym| *sym);
5576        let cuEventCreate = __library.get(b"cuEventCreate\0").map(|sym| *sym);
5577        let cuEventRecord = __library.get(b"cuEventRecord\0").map(|sym| *sym);
5578        let cuEventRecordWithFlags = __library.get(b"cuEventRecordWithFlags\0").map(|sym| *sym);
5579        let cuEventQuery = __library.get(b"cuEventQuery\0").map(|sym| *sym);
5580        let cuEventSynchronize = __library.get(b"cuEventSynchronize\0").map(|sym| *sym);
5581        let cuEventDestroy_v2 = __library.get(b"cuEventDestroy_v2\0").map(|sym| *sym);
5582        let cuEventElapsedTime = __library.get(b"cuEventElapsedTime\0").map(|sym| *sym);
5583        let cuImportExternalMemory = __library.get(b"cuImportExternalMemory\0").map(|sym| *sym);
5584        let cuExternalMemoryGetMappedBuffer = __library
5585            .get(b"cuExternalMemoryGetMappedBuffer\0")
5586            .map(|sym| *sym);
5587        let cuExternalMemoryGetMappedMipmappedArray = __library
5588            .get(b"cuExternalMemoryGetMappedMipmappedArray\0")
5589            .map(|sym| *sym);
5590        let cuDestroyExternalMemory = __library.get(b"cuDestroyExternalMemory\0").map(|sym| *sym);
5591        let cuImportExternalSemaphore = __library
5592            .get(b"cuImportExternalSemaphore\0")
5593            .map(|sym| *sym);
5594        let cuSignalExternalSemaphoresAsync = __library
5595            .get(b"cuSignalExternalSemaphoresAsync\0")
5596            .map(|sym| *sym);
5597        let cuWaitExternalSemaphoresAsync = __library
5598            .get(b"cuWaitExternalSemaphoresAsync\0")
5599            .map(|sym| *sym);
5600        let cuDestroyExternalSemaphore = __library
5601            .get(b"cuDestroyExternalSemaphore\0")
5602            .map(|sym| *sym);
5603        let cuStreamWaitValue32_v2 = __library.get(b"cuStreamWaitValue32_v2\0").map(|sym| *sym);
5604        let cuStreamWaitValue64_v2 = __library.get(b"cuStreamWaitValue64_v2\0").map(|sym| *sym);
5605        let cuStreamWriteValue32_v2 = __library.get(b"cuStreamWriteValue32_v2\0").map(|sym| *sym);
5606        let cuStreamWriteValue64_v2 = __library.get(b"cuStreamWriteValue64_v2\0").map(|sym| *sym);
5607        let cuStreamBatchMemOp_v2 = __library.get(b"cuStreamBatchMemOp_v2\0").map(|sym| *sym);
5608        let cuFuncGetAttribute = __library.get(b"cuFuncGetAttribute\0").map(|sym| *sym);
5609        let cuFuncSetAttribute = __library.get(b"cuFuncSetAttribute\0").map(|sym| *sym);
5610        let cuFuncSetCacheConfig = __library.get(b"cuFuncSetCacheConfig\0").map(|sym| *sym);
5611        let cuFuncSetSharedMemConfig = __library.get(b"cuFuncSetSharedMemConfig\0").map(|sym| *sym);
5612        let cuFuncGetModule = __library.get(b"cuFuncGetModule\0").map(|sym| *sym);
5613        let cuLaunchKernel = __library.get(b"cuLaunchKernel\0").map(|sym| *sym);
5614        let cuLaunchKernelEx = __library.get(b"cuLaunchKernelEx\0").map(|sym| *sym);
5615        let cuLaunchCooperativeKernel = __library
5616            .get(b"cuLaunchCooperativeKernel\0")
5617            .map(|sym| *sym);
5618        let cuLaunchCooperativeKernelMultiDevice = __library
5619            .get(b"cuLaunchCooperativeKernelMultiDevice\0")
5620            .map(|sym| *sym);
5621        let cuLaunchHostFunc = __library.get(b"cuLaunchHostFunc\0").map(|sym| *sym);
5622        let cuFuncSetBlockShape = __library.get(b"cuFuncSetBlockShape\0").map(|sym| *sym);
5623        let cuFuncSetSharedSize = __library.get(b"cuFuncSetSharedSize\0").map(|sym| *sym);
5624        let cuParamSetSize = __library.get(b"cuParamSetSize\0").map(|sym| *sym);
5625        let cuParamSeti = __library.get(b"cuParamSeti\0").map(|sym| *sym);
5626        let cuParamSetf = __library.get(b"cuParamSetf\0").map(|sym| *sym);
5627        let cuParamSetv = __library.get(b"cuParamSetv\0").map(|sym| *sym);
5628        let cuLaunch = __library.get(b"cuLaunch\0").map(|sym| *sym);
5629        let cuLaunchGrid = __library.get(b"cuLaunchGrid\0").map(|sym| *sym);
5630        let cuLaunchGridAsync = __library.get(b"cuLaunchGridAsync\0").map(|sym| *sym);
5631        let cuParamSetTexRef = __library.get(b"cuParamSetTexRef\0").map(|sym| *sym);
5632        let cuGraphCreate = __library.get(b"cuGraphCreate\0").map(|sym| *sym);
5633        let cuGraphAddKernelNode_v2 = __library.get(b"cuGraphAddKernelNode_v2\0").map(|sym| *sym);
5634        let cuGraphKernelNodeGetParams_v2 = __library
5635            .get(b"cuGraphKernelNodeGetParams_v2\0")
5636            .map(|sym| *sym);
5637        let cuGraphKernelNodeSetParams_v2 = __library
5638            .get(b"cuGraphKernelNodeSetParams_v2\0")
5639            .map(|sym| *sym);
5640        let cuGraphAddMemcpyNode = __library.get(b"cuGraphAddMemcpyNode\0").map(|sym| *sym);
5641        let cuGraphMemcpyNodeGetParams = __library
5642            .get(b"cuGraphMemcpyNodeGetParams\0")
5643            .map(|sym| *sym);
5644        let cuGraphMemcpyNodeSetParams = __library
5645            .get(b"cuGraphMemcpyNodeSetParams\0")
5646            .map(|sym| *sym);
5647        let cuGraphAddMemsetNode = __library.get(b"cuGraphAddMemsetNode\0").map(|sym| *sym);
5648        let cuGraphMemsetNodeGetParams = __library
5649            .get(b"cuGraphMemsetNodeGetParams\0")
5650            .map(|sym| *sym);
5651        let cuGraphMemsetNodeSetParams = __library
5652            .get(b"cuGraphMemsetNodeSetParams\0")
5653            .map(|sym| *sym);
5654        let cuGraphAddHostNode = __library.get(b"cuGraphAddHostNode\0").map(|sym| *sym);
5655        let cuGraphHostNodeGetParams = __library.get(b"cuGraphHostNodeGetParams\0").map(|sym| *sym);
5656        let cuGraphHostNodeSetParams = __library.get(b"cuGraphHostNodeSetParams\0").map(|sym| *sym);
5657        let cuGraphAddChildGraphNode = __library.get(b"cuGraphAddChildGraphNode\0").map(|sym| *sym);
5658        let cuGraphChildGraphNodeGetGraph = __library
5659            .get(b"cuGraphChildGraphNodeGetGraph\0")
5660            .map(|sym| *sym);
5661        let cuGraphAddEmptyNode = __library.get(b"cuGraphAddEmptyNode\0").map(|sym| *sym);
5662        let cuGraphAddEventRecordNode = __library
5663            .get(b"cuGraphAddEventRecordNode\0")
5664            .map(|sym| *sym);
5665        let cuGraphEventRecordNodeGetEvent = __library
5666            .get(b"cuGraphEventRecordNodeGetEvent\0")
5667            .map(|sym| *sym);
5668        let cuGraphEventRecordNodeSetEvent = __library
5669            .get(b"cuGraphEventRecordNodeSetEvent\0")
5670            .map(|sym| *sym);
5671        let cuGraphAddEventWaitNode = __library.get(b"cuGraphAddEventWaitNode\0").map(|sym| *sym);
5672        let cuGraphEventWaitNodeGetEvent = __library
5673            .get(b"cuGraphEventWaitNodeGetEvent\0")
5674            .map(|sym| *sym);
5675        let cuGraphEventWaitNodeSetEvent = __library
5676            .get(b"cuGraphEventWaitNodeSetEvent\0")
5677            .map(|sym| *sym);
5678        let cuGraphAddExternalSemaphoresSignalNode = __library
5679            .get(b"cuGraphAddExternalSemaphoresSignalNode\0")
5680            .map(|sym| *sym);
5681        let cuGraphExternalSemaphoresSignalNodeGetParams = __library
5682            .get(b"cuGraphExternalSemaphoresSignalNodeGetParams\0")
5683            .map(|sym| *sym);
5684        let cuGraphExternalSemaphoresSignalNodeSetParams = __library
5685            .get(b"cuGraphExternalSemaphoresSignalNodeSetParams\0")
5686            .map(|sym| *sym);
5687        let cuGraphAddExternalSemaphoresWaitNode = __library
5688            .get(b"cuGraphAddExternalSemaphoresWaitNode\0")
5689            .map(|sym| *sym);
5690        let cuGraphExternalSemaphoresWaitNodeGetParams = __library
5691            .get(b"cuGraphExternalSemaphoresWaitNodeGetParams\0")
5692            .map(|sym| *sym);
5693        let cuGraphExternalSemaphoresWaitNodeSetParams = __library
5694            .get(b"cuGraphExternalSemaphoresWaitNodeSetParams\0")
5695            .map(|sym| *sym);
5696        let cuGraphAddBatchMemOpNode = __library.get(b"cuGraphAddBatchMemOpNode\0").map(|sym| *sym);
5697        let cuGraphBatchMemOpNodeGetParams = __library
5698            .get(b"cuGraphBatchMemOpNodeGetParams\0")
5699            .map(|sym| *sym);
5700        let cuGraphBatchMemOpNodeSetParams = __library
5701            .get(b"cuGraphBatchMemOpNodeSetParams\0")
5702            .map(|sym| *sym);
5703        let cuGraphExecBatchMemOpNodeSetParams = __library
5704            .get(b"cuGraphExecBatchMemOpNodeSetParams\0")
5705            .map(|sym| *sym);
5706        let cuGraphAddMemAllocNode = __library.get(b"cuGraphAddMemAllocNode\0").map(|sym| *sym);
5707        let cuGraphMemAllocNodeGetParams = __library
5708            .get(b"cuGraphMemAllocNodeGetParams\0")
5709            .map(|sym| *sym);
5710        let cuGraphAddMemFreeNode = __library.get(b"cuGraphAddMemFreeNode\0").map(|sym| *sym);
5711        let cuGraphMemFreeNodeGetParams = __library
5712            .get(b"cuGraphMemFreeNodeGetParams\0")
5713            .map(|sym| *sym);
5714        let cuDeviceGraphMemTrim = __library.get(b"cuDeviceGraphMemTrim\0").map(|sym| *sym);
5715        let cuDeviceGetGraphMemAttribute = __library
5716            .get(b"cuDeviceGetGraphMemAttribute\0")
5717            .map(|sym| *sym);
5718        let cuDeviceSetGraphMemAttribute = __library
5719            .get(b"cuDeviceSetGraphMemAttribute\0")
5720            .map(|sym| *sym);
5721        let cuGraphClone = __library.get(b"cuGraphClone\0").map(|sym| *sym);
5722        let cuGraphNodeFindInClone = __library.get(b"cuGraphNodeFindInClone\0").map(|sym| *sym);
5723        let cuGraphNodeGetType = __library.get(b"cuGraphNodeGetType\0").map(|sym| *sym);
5724        let cuGraphGetNodes = __library.get(b"cuGraphGetNodes\0").map(|sym| *sym);
5725        let cuGraphGetRootNodes = __library.get(b"cuGraphGetRootNodes\0").map(|sym| *sym);
5726        let cuGraphGetEdges = __library.get(b"cuGraphGetEdges\0").map(|sym| *sym);
5727        let cuGraphNodeGetDependencies = __library
5728            .get(b"cuGraphNodeGetDependencies\0")
5729            .map(|sym| *sym);
5730        let cuGraphNodeGetDependentNodes = __library
5731            .get(b"cuGraphNodeGetDependentNodes\0")
5732            .map(|sym| *sym);
5733        let cuGraphAddDependencies = __library.get(b"cuGraphAddDependencies\0").map(|sym| *sym);
5734        let cuGraphRemoveDependencies = __library
5735            .get(b"cuGraphRemoveDependencies\0")
5736            .map(|sym| *sym);
5737        let cuGraphDestroyNode = __library.get(b"cuGraphDestroyNode\0").map(|sym| *sym);
5738        let cuGraphInstantiateWithFlags = __library
5739            .get(b"cuGraphInstantiateWithFlags\0")
5740            .map(|sym| *sym);
5741        let cuGraphInstantiateWithParams = __library
5742            .get(b"cuGraphInstantiateWithParams\0")
5743            .map(|sym| *sym);
5744        let cuGraphExecGetFlags = __library.get(b"cuGraphExecGetFlags\0").map(|sym| *sym);
5745        let cuGraphExecKernelNodeSetParams_v2 = __library
5746            .get(b"cuGraphExecKernelNodeSetParams_v2\0")
5747            .map(|sym| *sym);
5748        let cuGraphExecMemcpyNodeSetParams = __library
5749            .get(b"cuGraphExecMemcpyNodeSetParams\0")
5750            .map(|sym| *sym);
5751        let cuGraphExecMemsetNodeSetParams = __library
5752            .get(b"cuGraphExecMemsetNodeSetParams\0")
5753            .map(|sym| *sym);
5754        let cuGraphExecHostNodeSetParams = __library
5755            .get(b"cuGraphExecHostNodeSetParams\0")
5756            .map(|sym| *sym);
5757        let cuGraphExecChildGraphNodeSetParams = __library
5758            .get(b"cuGraphExecChildGraphNodeSetParams\0")
5759            .map(|sym| *sym);
5760        let cuGraphExecEventRecordNodeSetEvent = __library
5761            .get(b"cuGraphExecEventRecordNodeSetEvent\0")
5762            .map(|sym| *sym);
5763        let cuGraphExecEventWaitNodeSetEvent = __library
5764            .get(b"cuGraphExecEventWaitNodeSetEvent\0")
5765            .map(|sym| *sym);
5766        let cuGraphExecExternalSemaphoresSignalNodeSetParams = __library
5767            .get(b"cuGraphExecExternalSemaphoresSignalNodeSetParams\0")
5768            .map(|sym| *sym);
5769        let cuGraphExecExternalSemaphoresWaitNodeSetParams = __library
5770            .get(b"cuGraphExecExternalSemaphoresWaitNodeSetParams\0")
5771            .map(|sym| *sym);
5772        let cuGraphNodeSetEnabled = __library.get(b"cuGraphNodeSetEnabled\0").map(|sym| *sym);
5773        let cuGraphNodeGetEnabled = __library.get(b"cuGraphNodeGetEnabled\0").map(|sym| *sym);
5774        let cuGraphUpload = __library.get(b"cuGraphUpload\0").map(|sym| *sym);
5775        let cuGraphLaunch = __library.get(b"cuGraphLaunch\0").map(|sym| *sym);
5776        let cuGraphExecDestroy = __library.get(b"cuGraphExecDestroy\0").map(|sym| *sym);
5777        let cuGraphDestroy = __library.get(b"cuGraphDestroy\0").map(|sym| *sym);
5778        let cuGraphExecUpdate_v2 = __library.get(b"cuGraphExecUpdate_v2\0").map(|sym| *sym);
5779        let cuGraphKernelNodeCopyAttributes = __library
5780            .get(b"cuGraphKernelNodeCopyAttributes\0")
5781            .map(|sym| *sym);
5782        let cuGraphKernelNodeGetAttribute = __library
5783            .get(b"cuGraphKernelNodeGetAttribute\0")
5784            .map(|sym| *sym);
5785        let cuGraphKernelNodeSetAttribute = __library
5786            .get(b"cuGraphKernelNodeSetAttribute\0")
5787            .map(|sym| *sym);
5788        let cuGraphDebugDotPrint = __library.get(b"cuGraphDebugDotPrint\0").map(|sym| *sym);
5789        let cuUserObjectCreate = __library.get(b"cuUserObjectCreate\0").map(|sym| *sym);
5790        let cuUserObjectRetain = __library.get(b"cuUserObjectRetain\0").map(|sym| *sym);
5791        let cuUserObjectRelease = __library.get(b"cuUserObjectRelease\0").map(|sym| *sym);
5792        let cuGraphRetainUserObject = __library.get(b"cuGraphRetainUserObject\0").map(|sym| *sym);
5793        let cuGraphReleaseUserObject = __library.get(b"cuGraphReleaseUserObject\0").map(|sym| *sym);
5794        let cuOccupancyMaxActiveBlocksPerMultiprocessor = __library
5795            .get(b"cuOccupancyMaxActiveBlocksPerMultiprocessor\0")
5796            .map(|sym| *sym);
5797        let cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags = __library
5798            .get(b"cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags\0")
5799            .map(|sym| *sym);
5800        let cuOccupancyMaxPotentialBlockSize = __library
5801            .get(b"cuOccupancyMaxPotentialBlockSize\0")
5802            .map(|sym| *sym);
5803        let cuOccupancyMaxPotentialBlockSizeWithFlags = __library
5804            .get(b"cuOccupancyMaxPotentialBlockSizeWithFlags\0")
5805            .map(|sym| *sym);
5806        let cuOccupancyAvailableDynamicSMemPerBlock = __library
5807            .get(b"cuOccupancyAvailableDynamicSMemPerBlock\0")
5808            .map(|sym| *sym);
5809        let cuOccupancyMaxPotentialClusterSize = __library
5810            .get(b"cuOccupancyMaxPotentialClusterSize\0")
5811            .map(|sym| *sym);
5812        let cuOccupancyMaxActiveClusters = __library
5813            .get(b"cuOccupancyMaxActiveClusters\0")
5814            .map(|sym| *sym);
5815        let cuTexRefSetArray = __library.get(b"cuTexRefSetArray\0").map(|sym| *sym);
5816        let cuTexRefSetMipmappedArray = __library
5817            .get(b"cuTexRefSetMipmappedArray\0")
5818            .map(|sym| *sym);
5819        let cuTexRefSetAddress_v2 = __library.get(b"cuTexRefSetAddress_v2\0").map(|sym| *sym);
5820        let cuTexRefSetAddress2D_v3 = __library.get(b"cuTexRefSetAddress2D_v3\0").map(|sym| *sym);
5821        let cuTexRefSetFormat = __library.get(b"cuTexRefSetFormat\0").map(|sym| *sym);
5822        let cuTexRefSetAddressMode = __library.get(b"cuTexRefSetAddressMode\0").map(|sym| *sym);
5823        let cuTexRefSetFilterMode = __library.get(b"cuTexRefSetFilterMode\0").map(|sym| *sym);
5824        let cuTexRefSetMipmapFilterMode = __library
5825            .get(b"cuTexRefSetMipmapFilterMode\0")
5826            .map(|sym| *sym);
5827        let cuTexRefSetMipmapLevelBias = __library
5828            .get(b"cuTexRefSetMipmapLevelBias\0")
5829            .map(|sym| *sym);
5830        let cuTexRefSetMipmapLevelClamp = __library
5831            .get(b"cuTexRefSetMipmapLevelClamp\0")
5832            .map(|sym| *sym);
5833        let cuTexRefSetMaxAnisotropy = __library.get(b"cuTexRefSetMaxAnisotropy\0").map(|sym| *sym);
5834        let cuTexRefSetBorderColor = __library.get(b"cuTexRefSetBorderColor\0").map(|sym| *sym);
5835        let cuTexRefSetFlags = __library.get(b"cuTexRefSetFlags\0").map(|sym| *sym);
5836        let cuTexRefGetAddress_v2 = __library.get(b"cuTexRefGetAddress_v2\0").map(|sym| *sym);
5837        let cuTexRefGetArray = __library.get(b"cuTexRefGetArray\0").map(|sym| *sym);
5838        let cuTexRefGetMipmappedArray = __library
5839            .get(b"cuTexRefGetMipmappedArray\0")
5840            .map(|sym| *sym);
5841        let cuTexRefGetAddressMode = __library.get(b"cuTexRefGetAddressMode\0").map(|sym| *sym);
5842        let cuTexRefGetFilterMode = __library.get(b"cuTexRefGetFilterMode\0").map(|sym| *sym);
5843        let cuTexRefGetFormat = __library.get(b"cuTexRefGetFormat\0").map(|sym| *sym);
5844        let cuTexRefGetMipmapFilterMode = __library
5845            .get(b"cuTexRefGetMipmapFilterMode\0")
5846            .map(|sym| *sym);
5847        let cuTexRefGetMipmapLevelBias = __library
5848            .get(b"cuTexRefGetMipmapLevelBias\0")
5849            .map(|sym| *sym);
5850        let cuTexRefGetMipmapLevelClamp = __library
5851            .get(b"cuTexRefGetMipmapLevelClamp\0")
5852            .map(|sym| *sym);
5853        let cuTexRefGetMaxAnisotropy = __library.get(b"cuTexRefGetMaxAnisotropy\0").map(|sym| *sym);
5854        let cuTexRefGetBorderColor = __library.get(b"cuTexRefGetBorderColor\0").map(|sym| *sym);
5855        let cuTexRefGetFlags = __library.get(b"cuTexRefGetFlags\0").map(|sym| *sym);
5856        let cuTexRefCreate = __library.get(b"cuTexRefCreate\0").map(|sym| *sym);
5857        let cuTexRefDestroy = __library.get(b"cuTexRefDestroy\0").map(|sym| *sym);
5858        let cuSurfRefSetArray = __library.get(b"cuSurfRefSetArray\0").map(|sym| *sym);
5859        let cuSurfRefGetArray = __library.get(b"cuSurfRefGetArray\0").map(|sym| *sym);
5860        let cuTexObjectCreate = __library.get(b"cuTexObjectCreate\0").map(|sym| *sym);
5861        let cuTexObjectDestroy = __library.get(b"cuTexObjectDestroy\0").map(|sym| *sym);
5862        let cuTexObjectGetResourceDesc = __library
5863            .get(b"cuTexObjectGetResourceDesc\0")
5864            .map(|sym| *sym);
5865        let cuTexObjectGetTextureDesc = __library
5866            .get(b"cuTexObjectGetTextureDesc\0")
5867            .map(|sym| *sym);
5868        let cuTexObjectGetResourceViewDesc = __library
5869            .get(b"cuTexObjectGetResourceViewDesc\0")
5870            .map(|sym| *sym);
5871        let cuSurfObjectCreate = __library.get(b"cuSurfObjectCreate\0").map(|sym| *sym);
5872        let cuSurfObjectDestroy = __library.get(b"cuSurfObjectDestroy\0").map(|sym| *sym);
5873        let cuSurfObjectGetResourceDesc = __library
5874            .get(b"cuSurfObjectGetResourceDesc\0")
5875            .map(|sym| *sym);
5876        let cuTensorMapEncodeTiled = __library.get(b"cuTensorMapEncodeTiled\0").map(|sym| *sym);
5877        let cuTensorMapEncodeIm2col = __library.get(b"cuTensorMapEncodeIm2col\0").map(|sym| *sym);
5878        let cuTensorMapReplaceAddress = __library
5879            .get(b"cuTensorMapReplaceAddress\0")
5880            .map(|sym| *sym);
5881        let cuDeviceCanAccessPeer = __library.get(b"cuDeviceCanAccessPeer\0").map(|sym| *sym);
5882        let cuCtxEnablePeerAccess = __library.get(b"cuCtxEnablePeerAccess\0").map(|sym| *sym);
5883        let cuCtxDisablePeerAccess = __library.get(b"cuCtxDisablePeerAccess\0").map(|sym| *sym);
5884        let cuDeviceGetP2PAttribute = __library.get(b"cuDeviceGetP2PAttribute\0").map(|sym| *sym);
5885        let cuGraphicsUnregisterResource = __library
5886            .get(b"cuGraphicsUnregisterResource\0")
5887            .map(|sym| *sym);
5888        let cuGraphicsSubResourceGetMappedArray = __library
5889            .get(b"cuGraphicsSubResourceGetMappedArray\0")
5890            .map(|sym| *sym);
5891        let cuGraphicsResourceGetMappedMipmappedArray = __library
5892            .get(b"cuGraphicsResourceGetMappedMipmappedArray\0")
5893            .map(|sym| *sym);
5894        let cuGraphicsResourceGetMappedPointer_v2 = __library
5895            .get(b"cuGraphicsResourceGetMappedPointer_v2\0")
5896            .map(|sym| *sym);
5897        let cuGraphicsResourceSetMapFlags_v2 = __library
5898            .get(b"cuGraphicsResourceSetMapFlags_v2\0")
5899            .map(|sym| *sym);
5900        let cuGraphicsMapResources = __library.get(b"cuGraphicsMapResources\0").map(|sym| *sym);
5901        let cuGraphicsUnmapResources = __library.get(b"cuGraphicsUnmapResources\0").map(|sym| *sym);
5902        let cuGetProcAddress_v2 = __library.get(b"cuGetProcAddress_v2\0").map(|sym| *sym);
5903        let cuGetExportTable = __library.get(b"cuGetExportTable\0").map(|sym| *sym);
5904        Ok(cuda {
5905            __library,
5906            cuGetErrorString,
5907            cuGetErrorName,
5908            cuInit,
5909            cuDriverGetVersion,
5910            cuDeviceGet,
5911            cuDeviceGetCount,
5912            cuDeviceGetName,
5913            cuDeviceGetUuid,
5914            cuDeviceGetUuid_v2,
5915            cuDeviceGetLuid,
5916            cuDeviceTotalMem_v2,
5917            cuDeviceGetTexture1DLinearMaxWidth,
5918            cuDeviceGetAttribute,
5919            cuDeviceGetNvSciSyncAttributes,
5920            cuDeviceSetMemPool,
5921            cuDeviceGetMemPool,
5922            cuDeviceGetDefaultMemPool,
5923            cuDeviceGetExecAffinitySupport,
5924            cuFlushGPUDirectRDMAWrites,
5925            cuDeviceGetProperties,
5926            cuDeviceComputeCapability,
5927            cuDevicePrimaryCtxRetain,
5928            cuDevicePrimaryCtxRelease_v2,
5929            cuDevicePrimaryCtxSetFlags_v2,
5930            cuDevicePrimaryCtxGetState,
5931            cuDevicePrimaryCtxReset_v2,
5932            cuCtxCreate_v2,
5933            cuCtxCreate_v3,
5934            cuCtxDestroy_v2,
5935            cuCtxPushCurrent_v2,
5936            cuCtxPopCurrent_v2,
5937            cuCtxSetCurrent,
5938            cuCtxGetCurrent,
5939            cuCtxGetDevice,
5940            cuCtxGetFlags,
5941            cuCtxGetId,
5942            cuCtxSynchronize,
5943            cuCtxSetLimit,
5944            cuCtxGetLimit,
5945            cuCtxGetCacheConfig,
5946            cuCtxSetCacheConfig,
5947            cuCtxGetSharedMemConfig,
5948            cuCtxSetSharedMemConfig,
5949            cuCtxGetApiVersion,
5950            cuCtxGetStreamPriorityRange,
5951            cuCtxResetPersistingL2Cache,
5952            cuCtxGetExecAffinity,
5953            cuCtxAttach,
5954            cuCtxDetach,
5955            cuModuleLoad,
5956            cuModuleLoadData,
5957            cuModuleLoadDataEx,
5958            cuModuleLoadFatBinary,
5959            cuModuleUnload,
5960            cuModuleGetLoadingMode,
5961            cuModuleGetFunction,
5962            cuModuleGetGlobal_v2,
5963            cuLinkCreate_v2,
5964            cuLinkAddData_v2,
5965            cuLinkAddFile_v2,
5966            cuLinkComplete,
5967            cuLinkDestroy,
5968            cuModuleGetTexRef,
5969            cuModuleGetSurfRef,
5970            cuLibraryLoadData,
5971            cuLibraryLoadFromFile,
5972            cuLibraryUnload,
5973            cuLibraryGetKernel,
5974            cuLibraryGetModule,
5975            cuKernelGetFunction,
5976            cuLibraryGetGlobal,
5977            cuLibraryGetManaged,
5978            cuLibraryGetUnifiedFunction,
5979            cuKernelGetAttribute,
5980            cuKernelSetAttribute,
5981            cuKernelSetCacheConfig,
5982            cuMemGetInfo_v2,
5983            cuMemAlloc_v2,
5984            cuMemAllocPitch_v2,
5985            cuMemFree_v2,
5986            cuMemGetAddressRange_v2,
5987            cuMemAllocHost_v2,
5988            cuMemFreeHost,
5989            cuMemHostAlloc,
5990            cuMemHostGetDevicePointer_v2,
5991            cuMemHostGetFlags,
5992            cuMemAllocManaged,
5993            cuDeviceGetByPCIBusId,
5994            cuDeviceGetPCIBusId,
5995            cuIpcGetEventHandle,
5996            cuIpcOpenEventHandle,
5997            cuIpcGetMemHandle,
5998            cuIpcOpenMemHandle_v2,
5999            cuIpcCloseMemHandle,
6000            cuMemHostRegister_v2,
6001            cuMemHostUnregister,
6002            cuMemcpy,
6003            cuMemcpyPeer,
6004            cuMemcpyHtoD_v2,
6005            cuMemcpyDtoH_v2,
6006            cuMemcpyDtoD_v2,
6007            cuMemcpyDtoA_v2,
6008            cuMemcpyAtoD_v2,
6009            cuMemcpyHtoA_v2,
6010            cuMemcpyAtoH_v2,
6011            cuMemcpyAtoA_v2,
6012            cuMemcpy2D_v2,
6013            cuMemcpy2DUnaligned_v2,
6014            cuMemcpy3D_v2,
6015            cuMemcpy3DPeer,
6016            cuMemcpyAsync,
6017            cuMemcpyPeerAsync,
6018            cuMemcpyHtoDAsync_v2,
6019            cuMemcpyDtoHAsync_v2,
6020            cuMemcpyDtoDAsync_v2,
6021            cuMemcpyHtoAAsync_v2,
6022            cuMemcpyAtoHAsync_v2,
6023            cuMemcpy2DAsync_v2,
6024            cuMemcpy3DAsync_v2,
6025            cuMemcpy3DPeerAsync,
6026            cuMemsetD8_v2,
6027            cuMemsetD16_v2,
6028            cuMemsetD32_v2,
6029            cuMemsetD2D8_v2,
6030            cuMemsetD2D16_v2,
6031            cuMemsetD2D32_v2,
6032            cuMemsetD8Async,
6033            cuMemsetD16Async,
6034            cuMemsetD32Async,
6035            cuMemsetD2D8Async,
6036            cuMemsetD2D16Async,
6037            cuMemsetD2D32Async,
6038            cuArrayCreate_v2,
6039            cuArrayGetDescriptor_v2,
6040            cuArrayGetSparseProperties,
6041            cuMipmappedArrayGetSparseProperties,
6042            cuArrayGetMemoryRequirements,
6043            cuMipmappedArrayGetMemoryRequirements,
6044            cuArrayGetPlane,
6045            cuArrayDestroy,
6046            cuArray3DCreate_v2,
6047            cuArray3DGetDescriptor_v2,
6048            cuMipmappedArrayCreate,
6049            cuMipmappedArrayGetLevel,
6050            cuMipmappedArrayDestroy,
6051            cuMemGetHandleForAddressRange,
6052            cuMemAddressReserve,
6053            cuMemAddressFree,
6054            cuMemCreate,
6055            cuMemRelease,
6056            cuMemMap,
6057            cuMemMapArrayAsync,
6058            cuMemUnmap,
6059            cuMemSetAccess,
6060            cuMemGetAccess,
6061            cuMemExportToShareableHandle,
6062            cuMemImportFromShareableHandle,
6063            cuMemGetAllocationGranularity,
6064            cuMemGetAllocationPropertiesFromHandle,
6065            cuMemRetainAllocationHandle,
6066            cuMemFreeAsync,
6067            cuMemAllocAsync,
6068            cuMemPoolTrimTo,
6069            cuMemPoolSetAttribute,
6070            cuMemPoolGetAttribute,
6071            cuMemPoolSetAccess,
6072            cuMemPoolGetAccess,
6073            cuMemPoolCreate,
6074            cuMemPoolDestroy,
6075            cuMemAllocFromPoolAsync,
6076            cuMemPoolExportToShareableHandle,
6077            cuMemPoolImportFromShareableHandle,
6078            cuMemPoolExportPointer,
6079            cuMemPoolImportPointer,
6080            cuPointerGetAttribute,
6081            cuMemPrefetchAsync,
6082            cuMemAdvise,
6083            cuMemRangeGetAttribute,
6084            cuMemRangeGetAttributes,
6085            cuPointerSetAttribute,
6086            cuPointerGetAttributes,
6087            cuStreamCreate,
6088            cuStreamCreateWithPriority,
6089            cuStreamGetPriority,
6090            cuStreamGetFlags,
6091            cuStreamGetId,
6092            cuStreamGetCtx,
6093            cuStreamWaitEvent,
6094            cuStreamAddCallback,
6095            cuStreamBeginCapture_v2,
6096            cuThreadExchangeStreamCaptureMode,
6097            cuStreamEndCapture,
6098            cuStreamIsCapturing,
6099            cuStreamGetCaptureInfo_v2,
6100            cuStreamUpdateCaptureDependencies,
6101            cuStreamAttachMemAsync,
6102            cuStreamQuery,
6103            cuStreamSynchronize,
6104            cuStreamDestroy_v2,
6105            cuStreamCopyAttributes,
6106            cuStreamGetAttribute,
6107            cuStreamSetAttribute,
6108            cuEventCreate,
6109            cuEventRecord,
6110            cuEventRecordWithFlags,
6111            cuEventQuery,
6112            cuEventSynchronize,
6113            cuEventDestroy_v2,
6114            cuEventElapsedTime,
6115            cuImportExternalMemory,
6116            cuExternalMemoryGetMappedBuffer,
6117            cuExternalMemoryGetMappedMipmappedArray,
6118            cuDestroyExternalMemory,
6119            cuImportExternalSemaphore,
6120            cuSignalExternalSemaphoresAsync,
6121            cuWaitExternalSemaphoresAsync,
6122            cuDestroyExternalSemaphore,
6123            cuStreamWaitValue32_v2,
6124            cuStreamWaitValue64_v2,
6125            cuStreamWriteValue32_v2,
6126            cuStreamWriteValue64_v2,
6127            cuStreamBatchMemOp_v2,
6128            cuFuncGetAttribute,
6129            cuFuncSetAttribute,
6130            cuFuncSetCacheConfig,
6131            cuFuncSetSharedMemConfig,
6132            cuFuncGetModule,
6133            cuLaunchKernel,
6134            cuLaunchKernelEx,
6135            cuLaunchCooperativeKernel,
6136            cuLaunchCooperativeKernelMultiDevice,
6137            cuLaunchHostFunc,
6138            cuFuncSetBlockShape,
6139            cuFuncSetSharedSize,
6140            cuParamSetSize,
6141            cuParamSeti,
6142            cuParamSetf,
6143            cuParamSetv,
6144            cuLaunch,
6145            cuLaunchGrid,
6146            cuLaunchGridAsync,
6147            cuParamSetTexRef,
6148            cuGraphCreate,
6149            cuGraphAddKernelNode_v2,
6150            cuGraphKernelNodeGetParams_v2,
6151            cuGraphKernelNodeSetParams_v2,
6152            cuGraphAddMemcpyNode,
6153            cuGraphMemcpyNodeGetParams,
6154            cuGraphMemcpyNodeSetParams,
6155            cuGraphAddMemsetNode,
6156            cuGraphMemsetNodeGetParams,
6157            cuGraphMemsetNodeSetParams,
6158            cuGraphAddHostNode,
6159            cuGraphHostNodeGetParams,
6160            cuGraphHostNodeSetParams,
6161            cuGraphAddChildGraphNode,
6162            cuGraphChildGraphNodeGetGraph,
6163            cuGraphAddEmptyNode,
6164            cuGraphAddEventRecordNode,
6165            cuGraphEventRecordNodeGetEvent,
6166            cuGraphEventRecordNodeSetEvent,
6167            cuGraphAddEventWaitNode,
6168            cuGraphEventWaitNodeGetEvent,
6169            cuGraphEventWaitNodeSetEvent,
6170            cuGraphAddExternalSemaphoresSignalNode,
6171            cuGraphExternalSemaphoresSignalNodeGetParams,
6172            cuGraphExternalSemaphoresSignalNodeSetParams,
6173            cuGraphAddExternalSemaphoresWaitNode,
6174            cuGraphExternalSemaphoresWaitNodeGetParams,
6175            cuGraphExternalSemaphoresWaitNodeSetParams,
6176            cuGraphAddBatchMemOpNode,
6177            cuGraphBatchMemOpNodeGetParams,
6178            cuGraphBatchMemOpNodeSetParams,
6179            cuGraphExecBatchMemOpNodeSetParams,
6180            cuGraphAddMemAllocNode,
6181            cuGraphMemAllocNodeGetParams,
6182            cuGraphAddMemFreeNode,
6183            cuGraphMemFreeNodeGetParams,
6184            cuDeviceGraphMemTrim,
6185            cuDeviceGetGraphMemAttribute,
6186            cuDeviceSetGraphMemAttribute,
6187            cuGraphClone,
6188            cuGraphNodeFindInClone,
6189            cuGraphNodeGetType,
6190            cuGraphGetNodes,
6191            cuGraphGetRootNodes,
6192            cuGraphGetEdges,
6193            cuGraphNodeGetDependencies,
6194            cuGraphNodeGetDependentNodes,
6195            cuGraphAddDependencies,
6196            cuGraphRemoveDependencies,
6197            cuGraphDestroyNode,
6198            cuGraphInstantiateWithFlags,
6199            cuGraphInstantiateWithParams,
6200            cuGraphExecGetFlags,
6201            cuGraphExecKernelNodeSetParams_v2,
6202            cuGraphExecMemcpyNodeSetParams,
6203            cuGraphExecMemsetNodeSetParams,
6204            cuGraphExecHostNodeSetParams,
6205            cuGraphExecChildGraphNodeSetParams,
6206            cuGraphExecEventRecordNodeSetEvent,
6207            cuGraphExecEventWaitNodeSetEvent,
6208            cuGraphExecExternalSemaphoresSignalNodeSetParams,
6209            cuGraphExecExternalSemaphoresWaitNodeSetParams,
6210            cuGraphNodeSetEnabled,
6211            cuGraphNodeGetEnabled,
6212            cuGraphUpload,
6213            cuGraphLaunch,
6214            cuGraphExecDestroy,
6215            cuGraphDestroy,
6216            cuGraphExecUpdate_v2,
6217            cuGraphKernelNodeCopyAttributes,
6218            cuGraphKernelNodeGetAttribute,
6219            cuGraphKernelNodeSetAttribute,
6220            cuGraphDebugDotPrint,
6221            cuUserObjectCreate,
6222            cuUserObjectRetain,
6223            cuUserObjectRelease,
6224            cuGraphRetainUserObject,
6225            cuGraphReleaseUserObject,
6226            cuOccupancyMaxActiveBlocksPerMultiprocessor,
6227            cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags,
6228            cuOccupancyMaxPotentialBlockSize,
6229            cuOccupancyMaxPotentialBlockSizeWithFlags,
6230            cuOccupancyAvailableDynamicSMemPerBlock,
6231            cuOccupancyMaxPotentialClusterSize,
6232            cuOccupancyMaxActiveClusters,
6233            cuTexRefSetArray,
6234            cuTexRefSetMipmappedArray,
6235            cuTexRefSetAddress_v2,
6236            cuTexRefSetAddress2D_v3,
6237            cuTexRefSetFormat,
6238            cuTexRefSetAddressMode,
6239            cuTexRefSetFilterMode,
6240            cuTexRefSetMipmapFilterMode,
6241            cuTexRefSetMipmapLevelBias,
6242            cuTexRefSetMipmapLevelClamp,
6243            cuTexRefSetMaxAnisotropy,
6244            cuTexRefSetBorderColor,
6245            cuTexRefSetFlags,
6246            cuTexRefGetAddress_v2,
6247            cuTexRefGetArray,
6248            cuTexRefGetMipmappedArray,
6249            cuTexRefGetAddressMode,
6250            cuTexRefGetFilterMode,
6251            cuTexRefGetFormat,
6252            cuTexRefGetMipmapFilterMode,
6253            cuTexRefGetMipmapLevelBias,
6254            cuTexRefGetMipmapLevelClamp,
6255            cuTexRefGetMaxAnisotropy,
6256            cuTexRefGetBorderColor,
6257            cuTexRefGetFlags,
6258            cuTexRefCreate,
6259            cuTexRefDestroy,
6260            cuSurfRefSetArray,
6261            cuSurfRefGetArray,
6262            cuTexObjectCreate,
6263            cuTexObjectDestroy,
6264            cuTexObjectGetResourceDesc,
6265            cuTexObjectGetTextureDesc,
6266            cuTexObjectGetResourceViewDesc,
6267            cuSurfObjectCreate,
6268            cuSurfObjectDestroy,
6269            cuSurfObjectGetResourceDesc,
6270            cuTensorMapEncodeTiled,
6271            cuTensorMapEncodeIm2col,
6272            cuTensorMapReplaceAddress,
6273            cuDeviceCanAccessPeer,
6274            cuCtxEnablePeerAccess,
6275            cuCtxDisablePeerAccess,
6276            cuDeviceGetP2PAttribute,
6277            cuGraphicsUnregisterResource,
6278            cuGraphicsSubResourceGetMappedArray,
6279            cuGraphicsResourceGetMappedMipmappedArray,
6280            cuGraphicsResourceGetMappedPointer_v2,
6281            cuGraphicsResourceSetMapFlags_v2,
6282            cuGraphicsMapResources,
6283            cuGraphicsUnmapResources,
6284            cuGetProcAddress_v2,
6285            cuGetExportTable,
6286        })
6287    }
6288    #[doc = " \\brief Gets the string description of an error code\n\n Sets \\p *pStr to the address of a NULL-terminated string description\n of the error code \\p error.\n If the error code is not recognized, ::CUDA_ERROR_INVALID_VALUE\n will be returned and \\p *pStr will be set to the NULL address.\n\n \\param error - Error code to convert to string\n \\param pStr - Address of the string pointer.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::CUresult,\n ::cudaGetErrorString"]
6289    pub unsafe fn cuGetErrorString(
6290        &self,
6291        error: CUresult,
6292        pStr: *mut *const ::std::os::raw::c_char,
6293    ) -> CUresult {
6294        (self
6295            .cuGetErrorString
6296            .as_ref()
6297            .expect("Expected function, got error."))(error, pStr)
6298    }
6299    #[doc = " \\brief Gets the string representation of an error code enum name\n\n Sets \\p *pStr to the address of a NULL-terminated string representation\n of the name of the enum error code \\p error.\n If the error code is not recognized, ::CUDA_ERROR_INVALID_VALUE\n will be returned and \\p *pStr will be set to the NULL address.\n\n \\param error - Error code to convert to string\n \\param pStr - Address of the string pointer.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::CUresult,\n ::cudaGetErrorName"]
6300    pub unsafe fn cuGetErrorName(
6301        &self,
6302        error: CUresult,
6303        pStr: *mut *const ::std::os::raw::c_char,
6304    ) -> CUresult {
6305        (self
6306            .cuGetErrorName
6307            .as_ref()
6308            .expect("Expected function, got error."))(error, pStr)
6309    }
6310    #[doc = " \\brief Initialize the CUDA driver API\n Initializes the driver API and must be called before any other function from\n the driver API in the current process. Currently, the \\p Flags parameter must be 0. If ::cuInit()\n has not been called, any function from the driver API will return\n ::CUDA_ERROR_NOT_INITIALIZED.\n\n \\param Flags - Initialization flag for CUDA.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_SYSTEM_DRIVER_MISMATCH,\n ::CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE\n \\notefnerr"]
6311    pub unsafe fn cuInit(&self, Flags: ::std::os::raw::c_uint) -> CUresult {
6312        (self.cuInit.as_ref().expect("Expected function, got error."))(Flags)
6313    }
6314    #[doc = " \\brief Returns the latest CUDA version supported by driver\n\n Returns in \\p *driverVersion the version of CUDA supported by\n the driver.  The version is returned as\n (1000 &times; major + 10 &times; minor). For example, CUDA 9.2\n would be represented by 9020.\n\n This function automatically returns ::CUDA_ERROR_INVALID_VALUE if\n \\p driverVersion is NULL.\n\n \\param driverVersion - Returns the CUDA driver version\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa\n ::cudaDriverGetVersion,\n ::cudaRuntimeGetVersion"]
6315    pub unsafe fn cuDriverGetVersion(&self, driverVersion: *mut ::std::os::raw::c_int) -> CUresult {
6316        (self
6317            .cuDriverGetVersion
6318            .as_ref()
6319            .expect("Expected function, got error."))(driverVersion)
6320    }
6321    #[doc = " \\brief Returns a handle to a compute device\n\n Returns in \\p *device a device handle given an ordinal in the range <b>[0,\n ::cuDeviceGetCount()-1]</b>.\n\n \\param device  - Returned device handle\n \\param ordinal - Device number to get handle for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuDeviceGetAttribute,\n ::cuDeviceGetCount,\n ::cuDeviceGetName,\n ::cuDeviceGetUuid,\n ::cuDeviceGetLuid,\n ::cuDeviceTotalMem,\n ::cuDeviceGetExecAffinitySupport"]
6322    pub unsafe fn cuDeviceGet(
6323        &self,
6324        device: *mut CUdevice,
6325        ordinal: ::std::os::raw::c_int,
6326    ) -> CUresult {
6327        (self
6328            .cuDeviceGet
6329            .as_ref()
6330            .expect("Expected function, got error."))(device, ordinal)
6331    }
6332    #[doc = " \\brief Returns the number of compute-capable devices\n\n Returns in \\p *count the number of devices with compute capability greater\n than or equal to 2.0 that are available for execution. If there is no such\n device, ::cuDeviceGetCount() returns 0.\n\n \\param count - Returned number of compute-capable devices\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa\n ::cuDeviceGetAttribute,\n ::cuDeviceGetName,\n ::cuDeviceGetUuid,\n ::cuDeviceGetLuid,\n ::cuDeviceGet,\n ::cuDeviceTotalMem,\n ::cuDeviceGetExecAffinitySupport,\n ::cudaGetDeviceCount"]
6333    pub unsafe fn cuDeviceGetCount(&self, count: *mut ::std::os::raw::c_int) -> CUresult {
6334        (self
6335            .cuDeviceGetCount
6336            .as_ref()
6337            .expect("Expected function, got error."))(count)
6338    }
6339    #[doc = " \\brief Returns an identifer string for the device\n\n Returns an ASCII string identifying the device \\p dev in the NULL-terminated\n string pointed to by \\p name. \\p len specifies the maximum length of the\n string that may be returned.\n\n \\param name - Returned identifier string for the device\n \\param len  - Maximum length of string to store in \\p name\n \\param dev  - Device to get identifier string for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuDeviceGetAttribute,\n ::cuDeviceGetUuid,\n ::cuDeviceGetLuid,\n ::cuDeviceGetCount,\n ::cuDeviceGet,\n ::cuDeviceTotalMem,\n ::cuDeviceGetExecAffinitySupport,\n ::cudaGetDeviceProperties"]
6340    pub unsafe fn cuDeviceGetName(
6341        &self,
6342        name: *mut ::std::os::raw::c_char,
6343        len: ::std::os::raw::c_int,
6344        dev: CUdevice,
6345    ) -> CUresult {
6346        (self
6347            .cuDeviceGetName
6348            .as_ref()
6349            .expect("Expected function, got error."))(name, len, dev)
6350    }
6351    #[doc = " \\brief Return an UUID for the device\n\n Note there is a later version of this API, ::cuDeviceGetUuid_v2. It will\n supplant this version in 12.0, which is retained for minor version compatibility.\n\n Returns 16-octets identifing the device \\p dev in the structure\n pointed by the \\p uuid.\n\n \\param uuid - Returned UUID\n \\param dev  - Device to get identifier string for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuDeviceGetUuid_v2\n ::cuDeviceGetAttribute,\n ::cuDeviceGetCount,\n ::cuDeviceGetName,\n ::cuDeviceGetLuid,\n ::cuDeviceGet,\n ::cuDeviceTotalMem,\n ::cuDeviceGetExecAffinitySupport,\n ::cudaGetDeviceProperties"]
6352    pub unsafe fn cuDeviceGetUuid(&self, uuid: *mut CUuuid, dev: CUdevice) -> CUresult {
6353        (self
6354            .cuDeviceGetUuid
6355            .as_ref()
6356            .expect("Expected function, got error."))(uuid, dev)
6357    }
6358    pub unsafe fn cuDeviceGetUuid_v2(&self, uuid: *mut CUuuid, dev: CUdevice) -> CUresult {
6359        (self
6360            .cuDeviceGetUuid_v2
6361            .as_ref()
6362            .expect("Expected function, got error."))(uuid, dev)
6363    }
6364    #[doc = " \\brief Return an LUID and device node mask for the device\n\n Return identifying information (\\p luid and \\p deviceNodeMask) to allow\n matching device with graphics APIs.\n\n \\param luid - Returned LUID\n \\param deviceNodeMask - Returned device node mask\n \\param dev  - Device to get identifier string for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuDeviceGetAttribute,\n ::cuDeviceGetCount,\n ::cuDeviceGetName,\n ::cuDeviceGet,\n ::cuDeviceTotalMem,\n ::cuDeviceGetExecAffinitySupport,\n ::cudaGetDeviceProperties"]
6365    pub unsafe fn cuDeviceGetLuid(
6366        &self,
6367        luid: *mut ::std::os::raw::c_char,
6368        deviceNodeMask: *mut ::std::os::raw::c_uint,
6369        dev: CUdevice,
6370    ) -> CUresult {
6371        (self
6372            .cuDeviceGetLuid
6373            .as_ref()
6374            .expect("Expected function, got error."))(luid, deviceNodeMask, dev)
6375    }
6376    pub unsafe fn cuDeviceTotalMem_v2(&self, bytes: *mut usize, dev: CUdevice) -> CUresult {
6377        (self
6378            .cuDeviceTotalMem_v2
6379            .as_ref()
6380            .expect("Expected function, got error."))(bytes, dev)
6381    }
6382    #[doc = " \\brief Returns the maximum number of elements allocatable in a 1D linear texture for a given texture element size.\n\n Returns in \\p maxWidthInElements the maximum number of texture elements allocatable in a 1D linear texture\n for given \\p format and \\p numChannels.\n\n \\param maxWidthInElements    - Returned maximum number of texture elements allocatable for given \\p format and \\p numChannels.\n \\param format                - Texture format.\n \\param numChannels           - Number of channels per texture element.\n \\param dev                   - Device handle.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuDeviceGetAttribute,\n ::cuDeviceGetCount,\n ::cuDeviceGetName,\n ::cuDeviceGetUuid,\n ::cuDeviceGet,\n ::cudaMemGetInfo,\n ::cuDeviceTotalMem"]
6383    pub unsafe fn cuDeviceGetTexture1DLinearMaxWidth(
6384        &self,
6385        maxWidthInElements: *mut usize,
6386        format: CUarray_format,
6387        numChannels: ::std::os::raw::c_uint,
6388        dev: CUdevice,
6389    ) -> CUresult {
6390        (self
6391            .cuDeviceGetTexture1DLinearMaxWidth
6392            .as_ref()
6393            .expect("Expected function, got error."))(
6394            maxWidthInElements, format, numChannels, dev
6395        )
6396    }
6397    #[doc = " \\brief Returns information about the device\n\n Returns in \\p *pi the integer value of the attribute \\p attrib on device\n \\p dev. The supported attributes are:\n - ::CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK: Maximum number of threads per\n   block;\n - ::CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X: Maximum x-dimension of a block\n - ::CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y: Maximum y-dimension of a block\n - ::CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z: Maximum z-dimension of a block\n - ::CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X: Maximum x-dimension of a grid\n - ::CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y: Maximum y-dimension of a grid\n - ::CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z: Maximum z-dimension of a grid\n - ::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK: Maximum amount of\n   shared memory available to a thread block in bytes\n - ::CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY: Memory available on device for\n   __constant__ variables in a CUDA C kernel in bytes\n - ::CU_DEVICE_ATTRIBUTE_WARP_SIZE: Warp size in threads\n - ::CU_DEVICE_ATTRIBUTE_MAX_PITCH: Maximum pitch in bytes allowed by the\n   memory copy functions that involve memory regions allocated through\n   ::cuMemAllocPitch()\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH: Maximum 1D\n  texture width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH: Maximum width\n  for a 1D texture bound to linear memory\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH: Maximum\n  mipmapped 1D texture width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH: Maximum 2D\n  texture width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT: Maximum 2D\n  texture height\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH: Maximum width\n  for a 2D texture bound to linear memory\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT: Maximum height\n  for a 2D texture bound to linear memory\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH: Maximum pitch\n  in bytes for a 2D texture bound to linear memory\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH: Maximum\n  mipmapped 2D texture width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT: Maximum\n  mipmapped 2D texture height\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH: Maximum 3D\n  texture width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT: Maximum 3D\n  texture height\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH: Maximum 3D\n  texture depth\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE:\n  Alternate maximum 3D texture width, 0 if no alternate\n  maximum 3D texture size is supported\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE:\n  Alternate maximum 3D texture height, 0 if no alternate\n  maximum 3D texture size is supported\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE:\n  Alternate maximum 3D texture depth, 0 if no alternate\n  maximum 3D texture size is supported\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH:\n  Maximum cubemap texture width or height\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH:\n  Maximum 1D layered texture width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS:\n   Maximum layers in a 1D layered texture\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH:\n  Maximum 2D layered texture width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT:\n   Maximum 2D layered texture height\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS:\n   Maximum layers in a 2D layered texture\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH:\n   Maximum cubemap layered texture width or height\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS:\n   Maximum layers in a cubemap layered texture\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH:\n   Maximum 1D surface width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH:\n   Maximum 2D surface width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT:\n   Maximum 2D surface height\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH:\n   Maximum 3D surface width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT:\n   Maximum 3D surface height\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH:\n   Maximum 3D surface depth\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH:\n   Maximum 1D layered surface width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS:\n   Maximum layers in a 1D layered surface\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH:\n   Maximum 2D layered surface width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT:\n   Maximum 2D layered surface height\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS:\n   Maximum layers in a 2D layered surface\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH:\n   Maximum cubemap surface width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH:\n   Maximum cubemap layered surface width\n - ::CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS:\n   Maximum layers in a cubemap layered surface\n - ::CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK: Maximum number of 32-bit\n   registers available to a thread block\n - ::CU_DEVICE_ATTRIBUTE_CLOCK_RATE: The typical clock frequency in kilohertz\n - ::CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT: Alignment requirement; texture\n   base addresses aligned to ::textureAlign bytes do not need an offset\n   applied to texture fetches\n - ::CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT: Pitch alignment requirement\n   for 2D texture references bound to pitched memory\n - ::CU_DEVICE_ATTRIBUTE_GPU_OVERLAP: 1 if the device can concurrently copy\n   memory between host and device while executing a kernel, or 0 if not\n - ::CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT: Number of multiprocessors on\n   the device\n - ::CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT: 1 if there is a run time limit\n   for kernels executed on the device, or 0 if not\n - ::CU_DEVICE_ATTRIBUTE_INTEGRATED: 1 if the device is integrated with the\n   memory subsystem, or 0 if not\n - ::CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY: 1 if the device can map host\n   memory into the CUDA address space, or 0 if not\n - ::CU_DEVICE_ATTRIBUTE_COMPUTE_MODE: Compute mode that device is currently\n   in. Available modes are as follows:\n   - ::CU_COMPUTEMODE_DEFAULT: Default mode - Device is not restricted and\n     can have multiple CUDA contexts present at a single time.\n   - ::CU_COMPUTEMODE_PROHIBITED: Compute-prohibited mode - Device is\n     prohibited from creating new CUDA contexts.\n   - ::CU_COMPUTEMODE_EXCLUSIVE_PROCESS:  Compute-exclusive-process mode - Device\n     can have only one context used by a single process at a time.\n - ::CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS: 1 if the device supports\n   executing multiple kernels within the same context simultaneously, or 0 if\n   not. It is not guaranteed that multiple kernels will be resident\n   on the device concurrently so this feature should not be relied upon for\n   correctness.\n - ::CU_DEVICE_ATTRIBUTE_ECC_ENABLED: 1 if error correction is enabled on the\n    device, 0 if error correction is disabled or not supported by the device\n - ::CU_DEVICE_ATTRIBUTE_PCI_BUS_ID: PCI bus identifier of the device\n - ::CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID: PCI device (also known as slot) identifier\n   of the device\n - ::CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID: PCI domain identifier of the device\n - ::CU_DEVICE_ATTRIBUTE_TCC_DRIVER: 1 if the device is using a TCC driver. TCC\n    is only available on Tesla hardware running Windows Vista or later\n - ::CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE: Peak memory clock frequency in kilohertz\n - ::CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH: Global memory bus width in bits\n - ::CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE: Size of L2 cache in bytes. 0 if the device doesn't have L2 cache\n - ::CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR: Maximum resident threads per multiprocessor\n - ::CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING: 1 if the device shares a unified address space with\n   the host, or 0 if not\n - ::CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR: Major compute capability version number\n - ::CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR: Minor compute capability version number\n - ::CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED: 1 if device supports caching globals\n    in L1 cache, 0 if caching globals in L1 cache is not supported by the device\n - ::CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED: 1 if device supports caching locals\n    in L1 cache, 0 if caching locals in L1 cache is not supported by the device\n - ::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR: Maximum amount of\n   shared memory available to a multiprocessor in bytes; this amount is shared\n   by all thread blocks simultaneously resident on a multiprocessor\n - ::CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR: Maximum number of 32-bit\n   registers available to a multiprocessor; this number is shared by all thread\n   blocks simultaneously resident on a multiprocessor\n - ::CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY: 1 if device supports allocating managed memory\n   on this system, 0 if allocating managed memory is not supported by the device on this system.\n - ::CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD: 1 if device is on a multi-GPU board, 0 if not.\n - ::CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID: Unique identifier for a group of devices\n   associated with the same board. Devices on the same multi-GPU board will share the same identifier.\n - ::CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED: 1 if Link between the device and the host\n   supports native atomic operations.\n - ::CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO: Ratio of single precision performance\n   (in floating-point operations per second) to double precision performance.\n - ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS: Device suppports coherently accessing\n   pageable memory without calling cudaHostRegister on it.\n - ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS: Device can coherently access managed memory\n   concurrently with the CPU.\n - ::CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED: Device supports Compute Preemption.\n - ::CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM: Device can access host registered\n   memory at the same virtual address as the CPU.\n -  ::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN: The maximum per block shared memory size\n    suported on this device. This is the maximum value that can be opted into when using the cuFuncSetAttribute() or cuKernelSetAttribute() call.\n    For more details see ::CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES\n - ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES: Device accesses pageable memory via the host's\n   page tables.\n - ::CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST: The host can directly access managed memory on the device without migration.\n - ::CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED:  Device supports virtual memory management APIs like ::cuMemAddressReserve, ::cuMemCreate, ::cuMemMap and related APIs\n - ::CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED: Device supports exporting memory to a posix file descriptor with ::cuMemExportToShareableHandle, if requested via ::cuMemCreate\n - ::CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED:  Device supports exporting memory to a Win32 NT handle with ::cuMemExportToShareableHandle, if requested via ::cuMemCreate\n - ::CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED: Device supports exporting memory to a Win32 KMT handle with ::cuMemExportToShareableHandle, if requested via ::cuMemCreate\n - ::CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR: Maximum number of thread blocks that can reside on a multiprocessor\n - ::CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED: Device supports compressible memory allocation via ::cuMemCreate\n - ::CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE: Maximum L2 persisting lines capacity setting in bytes\n - ::CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE: Maximum value of CUaccessPolicyWindow::num_bytes\n - ::CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED: Device supports specifying the GPUDirect RDMA flag with ::cuMemCreate.\n - ::CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK: Amount of shared memory per block reserved by CUDA driver in bytes\n - ::CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED: Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays.\n - ::CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED: Device supports using the ::cuMemHostRegister flag ::CU_MEMHOSTERGISTER_READ_ONLY to register memory that must be mapped as read-only to the GPU\n - ::CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED: Device supports using the ::cuMemAllocAsync and ::cuMemPool family of APIs\n - ::CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED: Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see https://docs.nvidia.com/cuda/gpudirect-rdma for more information)\n - ::CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS: The returned attribute shall be interpreted as a bitmask, where the individual bits are described by the ::CUflushGPUDirectRDMAWritesOptions enum\n - ::CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING: GPUDirect RDMA writes to the device do not need to be flushed for consumers within the scope indicated by the returned attribute. See ::CUGPUDirectRDMAWritesOrdering for the numerical values returned here.\n - ::CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES: Bitmask of handle types supported with mempool based IPC\n - ::CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED: Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays.\n\n \\param pi     - Returned device attribute value\n \\param attrib - Device attribute to query\n \\param dev    - Device handle\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuDeviceGetCount,\n ::cuDeviceGetName,\n ::cuDeviceGetUuid,\n ::cuDeviceGet,\n ::cuDeviceTotalMem,\n ::cuDeviceGetExecAffinitySupport,\n ::cudaDeviceGetAttribute,\n ::cudaGetDeviceProperties"]
6398    pub unsafe fn cuDeviceGetAttribute(
6399        &self,
6400        pi: *mut ::std::os::raw::c_int,
6401        attrib: CUdevice_attribute,
6402        dev: CUdevice,
6403    ) -> CUresult {
6404        (self
6405            .cuDeviceGetAttribute
6406            .as_ref()
6407            .expect("Expected function, got error."))(pi, attrib, dev)
6408    }
6409    #[doc = " \\brief Return NvSciSync attributes that this device can support.\n\n Returns in \\p nvSciSyncAttrList, the properties of NvSciSync that\n this CUDA device, \\p dev can support. The returned \\p nvSciSyncAttrList\n can be used to create an NvSciSync object that matches this device's capabilities.\n\n If NvSciSyncAttrKey_RequiredPerm field in \\p nvSciSyncAttrList is\n already set this API will return ::CUDA_ERROR_INVALID_VALUE.\n\n The applications should set \\p nvSciSyncAttrList to a valid\n NvSciSyncAttrList failing which this API will return\n ::CUDA_ERROR_INVALID_HANDLE.\n\n The \\p flags controls how applications intends to use\n the NvSciSync created from the \\p nvSciSyncAttrList. The valid flags are:\n - ::CUDA_NVSCISYNC_ATTR_SIGNAL, specifies that the applications intends to\n signal an NvSciSync on this CUDA device.\n - ::CUDA_NVSCISYNC_ATTR_WAIT, specifies that the applications intends to\n wait on an NvSciSync on this CUDA device.\n\n At least one of these flags must be set, failing which the API\n returns ::CUDA_ERROR_INVALID_VALUE. Both the flags are orthogonal\n to one another: a developer may set both these flags that allows to\n set both wait and signal specific attributes in the same \\p nvSciSyncAttrList.\n\n \\param nvSciSyncAttrList     - Return NvSciSync attributes supported.\n \\param dev                   - Valid Cuda Device to get NvSciSync attributes for.\n \\param flags                 - flags describing NvSciSync usage.\n\n \\return\n\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa\n ::cuImportExternalSemaphore,\n ::cuDestroyExternalSemaphore,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync"]
6410    pub unsafe fn cuDeviceGetNvSciSyncAttributes(
6411        &self,
6412        nvSciSyncAttrList: *mut ::std::os::raw::c_void,
6413        dev: CUdevice,
6414        flags: ::std::os::raw::c_int,
6415    ) -> CUresult {
6416        (self
6417            .cuDeviceGetNvSciSyncAttributes
6418            .as_ref()
6419            .expect("Expected function, got error."))(nvSciSyncAttrList, dev, flags)
6420    }
6421    #[doc = " \\brief Sets the current memory pool of a device\n\n The memory pool must be local to the specified device.\n ::cuMemAllocAsync allocates from the current mempool of the provided stream's device.\n By default, a device's current memory pool is its default memory pool.\n\n \\note Use ::cuMemAllocFromPoolAsync to specify asynchronous allocations from a device different\n than the one the stream runs on.\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuDeviceGetDefaultMemPool, ::cuDeviceGetMemPool, ::cuMemPoolCreate, ::cuMemPoolDestroy, ::cuMemAllocFromPoolAsync"]
6422    pub unsafe fn cuDeviceSetMemPool(&self, dev: CUdevice, pool: CUmemoryPool) -> CUresult {
6423        (self
6424            .cuDeviceSetMemPool
6425            .as_ref()
6426            .expect("Expected function, got error."))(dev, pool)
6427    }
6428    #[doc = " \\brief Gets the current mempool for a device\n\n Returns the last pool provided to ::cuDeviceSetMemPool for this device\n or the device's default memory pool if ::cuDeviceSetMemPool has never been called.\n By default the current mempool is the default mempool for a device.\n Otherwise the returned pool must have been set with ::cuDeviceSetMemPool.\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuDeviceGetDefaultMemPool, ::cuMemPoolCreate, ::cuDeviceSetMemPool"]
6429    pub unsafe fn cuDeviceGetMemPool(&self, pool: *mut CUmemoryPool, dev: CUdevice) -> CUresult {
6430        (self
6431            .cuDeviceGetMemPool
6432            .as_ref()
6433            .expect("Expected function, got error."))(pool, dev)
6434    }
6435    #[doc = " \\brief Returns the default mempool of a device\n\n The default mempool of a device contains device memory from that device.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa ::cuMemAllocAsync, ::cuMemPoolTrimTo, ::cuMemPoolGetAttribute, ::cuMemPoolSetAttribute, cuMemPoolSetAccess, ::cuDeviceGetMemPool, ::cuMemPoolCreate"]
6436    pub unsafe fn cuDeviceGetDefaultMemPool(
6437        &self,
6438        pool_out: *mut CUmemoryPool,
6439        dev: CUdevice,
6440    ) -> CUresult {
6441        (self
6442            .cuDeviceGetDefaultMemPool
6443            .as_ref()
6444            .expect("Expected function, got error."))(pool_out, dev)
6445    }
6446    #[doc = " \\brief Returns information about the execution affinity support of the device.\n\n Returns in \\p *pi whether execution affinity type \\p type is supported by device \\p dev.\n The supported types are:\n - ::CU_EXEC_AFFINITY_TYPE_SM_COUNT: 1 if context with limited SMs is supported by the device,\n   or 0 if not;\n\n \\param pi   - 1 if the execution affinity type \\p type is supported by the device, or 0 if not\n \\param type - Execution affinity type to query\n \\param dev  - Device handle\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuDeviceGetAttribute,\n ::cuDeviceGetCount,\n ::cuDeviceGetName,\n ::cuDeviceGetUuid,\n ::cuDeviceGet,\n ::cuDeviceTotalMem"]
6447    pub unsafe fn cuDeviceGetExecAffinitySupport(
6448        &self,
6449        pi: *mut ::std::os::raw::c_int,
6450        type_: CUexecAffinityType,
6451        dev: CUdevice,
6452    ) -> CUresult {
6453        (self
6454            .cuDeviceGetExecAffinitySupport
6455            .as_ref()
6456            .expect("Expected function, got error."))(pi, type_, dev)
6457    }
6458    #[doc = " \\brief Blocks until remote writes are visible to the specified scope\n\n Blocks until GPUDirect RDMA writes to the target context via mappings\n created through APIs like nvidia_p2p_get_pages (see\n https://docs.nvidia.com/cuda/gpudirect-rdma for more information), are\n visible to the specified scope.\n\n If the scope equals or lies within the scope indicated by\n ::CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING, the call\n will be a no-op and can be safely omitted for performance. This can be\n determined by comparing the numerical values between the two enums, with\n smaller scopes having smaller values.\n\n Users may query support for this API via\n ::CU_DEVICE_ATTRIBUTE_FLUSH_FLUSH_GPU_DIRECT_RDMA_OPTIONS.\n\n \\param target - The target of the operation, see ::CUflushGPUDirectRDMAWritesTarget\n \\param scope  - The scope of the operation, see ::CUflushGPUDirectRDMAWritesScope\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n \\notefnerr\n"]
6459    pub unsafe fn cuFlushGPUDirectRDMAWrites(
6460        &self,
6461        target: CUflushGPUDirectRDMAWritesTarget,
6462        scope: CUflushGPUDirectRDMAWritesScope,
6463    ) -> CUresult {
6464        (self
6465            .cuFlushGPUDirectRDMAWrites
6466            .as_ref()
6467            .expect("Expected function, got error."))(target, scope)
6468    }
6469    #[doc = " \\brief Returns properties for a selected device\n\n \\deprecated\n\n This function was deprecated as of CUDA 5.0 and replaced by ::cuDeviceGetAttribute().\n\n Returns in \\p *prop the properties of device \\p dev. The ::CUdevprop\n structure is defined as:\n\n \\code\ntypedef struct CUdevprop_st {\nint maxThreadsPerBlock;\nint maxThreadsDim[3];\nint maxGridSize[3];\nint sharedMemPerBlock;\nint totalConstantMemory;\nint SIMDWidth;\nint memPitch;\nint regsPerBlock;\nint clockRate;\nint textureAlign\n} CUdevprop;\n \\endcode\n where:\n\n - ::maxThreadsPerBlock is the maximum number of threads per block;\n - ::maxThreadsDim[3] is the maximum sizes of each dimension of a block;\n - ::maxGridSize[3] is the maximum sizes of each dimension of a grid;\n - ::sharedMemPerBlock is the total amount of shared memory available per\n   block in bytes;\n - ::totalConstantMemory is the total amount of constant memory available on\n   the device in bytes;\n - ::SIMDWidth is the warp size;\n - ::memPitch is the maximum pitch allowed by the memory copy functions that\n   involve memory regions allocated through ::cuMemAllocPitch();\n - ::regsPerBlock is the total number of registers available per block;\n - ::clockRate is the clock frequency in kilohertz;\n - ::textureAlign is the alignment requirement; texture base addresses that\n   are aligned to ::textureAlign bytes do not need an offset applied to\n   texture fetches.\n\n \\param prop - Returned properties of device\n \\param dev  - Device to get properties for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuDeviceGetAttribute,\n ::cuDeviceGetCount,\n ::cuDeviceGetName,\n ::cuDeviceGetUuid,\n ::cuDeviceGet,\n ::cuDeviceTotalMem"]
6470    pub unsafe fn cuDeviceGetProperties(&self, prop: *mut CUdevprop, dev: CUdevice) -> CUresult {
6471        (self
6472            .cuDeviceGetProperties
6473            .as_ref()
6474            .expect("Expected function, got error."))(prop, dev)
6475    }
6476    #[doc = " \\brief Returns the compute capability of the device\n\n \\deprecated\n\n This function was deprecated as of CUDA 5.0 and its functionality superceded\n by ::cuDeviceGetAttribute().\n\n Returns in \\p *major and \\p *minor the major and minor revision numbers that\n define the compute capability of the device \\p dev.\n\n \\param major - Major revision number\n \\param minor - Minor revision number\n \\param dev   - Device handle\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuDeviceGetAttribute,\n ::cuDeviceGetCount,\n ::cuDeviceGetName,\n ::cuDeviceGetUuid,\n ::cuDeviceGet,\n ::cuDeviceTotalMem"]
6477    pub unsafe fn cuDeviceComputeCapability(
6478        &self,
6479        major: *mut ::std::os::raw::c_int,
6480        minor: *mut ::std::os::raw::c_int,
6481        dev: CUdevice,
6482    ) -> CUresult {
6483        (self
6484            .cuDeviceComputeCapability
6485            .as_ref()
6486            .expect("Expected function, got error."))(major, minor, dev)
6487    }
6488    #[doc = " \\brief Retain the primary context on the GPU\n\n Retains the primary context on the device.\n Once the user successfully retains the primary context, the primary context\n will be active and available to the user until the user releases it\n with ::cuDevicePrimaryCtxRelease() or resets it with ::cuDevicePrimaryCtxReset().\n Unlike ::cuCtxCreate() the newly retained context is not pushed onto the stack.\n\n Retaining the primary context for the first time will fail with ::CUDA_ERROR_UNKNOWN\n if the compute mode of the device is ::CU_COMPUTEMODE_PROHIBITED. The function\n ::cuDeviceGetAttribute() can be used with ::CU_DEVICE_ATTRIBUTE_COMPUTE_MODE to\n determine the compute mode  of the device.\n The <i>nvidia-smi</i> tool can be used to set the compute mode for\n devices. Documentation for <i>nvidia-smi</i> can be obtained by passing a\n -h option to it.\n\n Please note that the primary context always supports pinned allocations. Other\n flags can be specified by ::cuDevicePrimaryCtxSetFlags().\n\n \\param pctx  - Returned context handle of the new context\n \\param dev   - Device for which primary context is requested\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa ::cuDevicePrimaryCtxRelease,\n ::cuDevicePrimaryCtxSetFlags,\n ::cuCtxCreate,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize"]
6489    pub unsafe fn cuDevicePrimaryCtxRetain(&self, pctx: *mut CUcontext, dev: CUdevice) -> CUresult {
6490        (self
6491            .cuDevicePrimaryCtxRetain
6492            .as_ref()
6493            .expect("Expected function, got error."))(pctx, dev)
6494    }
6495    pub unsafe fn cuDevicePrimaryCtxRelease_v2(&self, dev: CUdevice) -> CUresult {
6496        (self
6497            .cuDevicePrimaryCtxRelease_v2
6498            .as_ref()
6499            .expect("Expected function, got error."))(dev)
6500    }
6501    pub unsafe fn cuDevicePrimaryCtxSetFlags_v2(
6502        &self,
6503        dev: CUdevice,
6504        flags: ::std::os::raw::c_uint,
6505    ) -> CUresult {
6506        (self
6507            .cuDevicePrimaryCtxSetFlags_v2
6508            .as_ref()
6509            .expect("Expected function, got error."))(dev, flags)
6510    }
6511    #[doc = " \\brief Get the state of the primary context\n\n Returns in \\p *flags the flags for the primary context of \\p dev, and in\n \\p *active whether it is active.  See ::cuDevicePrimaryCtxSetFlags for flag\n values.\n\n \\param dev    - Device to get primary context flags for\n \\param flags  - Pointer to store flags\n \\param active - Pointer to store context state; 0 = inactive, 1 = active\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_INVALID_VALUE,\n \\notefnerr\n\n \\sa\n ::cuDevicePrimaryCtxSetFlags,\n ::cuCtxGetFlags,\n ::cudaGetDeviceFlags"]
6512    pub unsafe fn cuDevicePrimaryCtxGetState(
6513        &self,
6514        dev: CUdevice,
6515        flags: *mut ::std::os::raw::c_uint,
6516        active: *mut ::std::os::raw::c_int,
6517    ) -> CUresult {
6518        (self
6519            .cuDevicePrimaryCtxGetState
6520            .as_ref()
6521            .expect("Expected function, got error."))(dev, flags, active)
6522    }
6523    pub unsafe fn cuDevicePrimaryCtxReset_v2(&self, dev: CUdevice) -> CUresult {
6524        (self
6525            .cuDevicePrimaryCtxReset_v2
6526            .as_ref()
6527            .expect("Expected function, got error."))(dev)
6528    }
6529    pub unsafe fn cuCtxCreate_v2(
6530        &self,
6531        pctx: *mut CUcontext,
6532        flags: ::std::os::raw::c_uint,
6533        dev: CUdevice,
6534    ) -> CUresult {
6535        (self
6536            .cuCtxCreate_v2
6537            .as_ref()
6538            .expect("Expected function, got error."))(pctx, flags, dev)
6539    }
6540    pub unsafe fn cuCtxCreate_v3(
6541        &self,
6542        pctx: *mut CUcontext,
6543        paramsArray: *mut CUexecAffinityParam,
6544        numParams: ::std::os::raw::c_int,
6545        flags: ::std::os::raw::c_uint,
6546        dev: CUdevice,
6547    ) -> CUresult {
6548        (self
6549            .cuCtxCreate_v3
6550            .as_ref()
6551            .expect("Expected function, got error."))(
6552            pctx, paramsArray, numParams, flags, dev
6553        )
6554    }
6555    pub unsafe fn cuCtxDestroy_v2(&self, ctx: CUcontext) -> CUresult {
6556        (self
6557            .cuCtxDestroy_v2
6558            .as_ref()
6559            .expect("Expected function, got error."))(ctx)
6560    }
6561    pub unsafe fn cuCtxPushCurrent_v2(&self, ctx: CUcontext) -> CUresult {
6562        (self
6563            .cuCtxPushCurrent_v2
6564            .as_ref()
6565            .expect("Expected function, got error."))(ctx)
6566    }
6567    pub unsafe fn cuCtxPopCurrent_v2(&self, pctx: *mut CUcontext) -> CUresult {
6568        (self
6569            .cuCtxPopCurrent_v2
6570            .as_ref()
6571            .expect("Expected function, got error."))(pctx)
6572    }
6573    #[doc = " \\brief Binds the specified CUDA context to the calling CPU thread\n\n Binds the specified CUDA context to the calling CPU thread.\n If \\p ctx is NULL then the CUDA context previously bound to the\n calling CPU thread is unbound and ::CUDA_SUCCESS is returned.\n\n If there exists a CUDA context stack on the calling CPU thread, this\n will replace the top of that stack with \\p ctx.\n If \\p ctx is NULL then this will be equivalent to popping the top\n of the calling CPU thread's CUDA context stack (or a no-op if the\n calling CPU thread's CUDA context stack is empty).\n\n \\param ctx - Context to bind to the calling CPU thread\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT\n \\notefnerr\n\n \\sa\n ::cuCtxGetCurrent,\n ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cudaSetDevice"]
6574    pub unsafe fn cuCtxSetCurrent(&self, ctx: CUcontext) -> CUresult {
6575        (self
6576            .cuCtxSetCurrent
6577            .as_ref()
6578            .expect("Expected function, got error."))(ctx)
6579    }
6580    #[doc = " \\brief Returns the CUDA context bound to the calling CPU thread.\n\n Returns in \\p *pctx the CUDA context bound to the calling CPU thread.\n If no context is bound to the calling CPU thread then \\p *pctx is\n set to NULL and ::CUDA_SUCCESS is returned.\n\n \\param pctx - Returned context handle\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n \\notefnerr\n\n \\sa\n ::cuCtxSetCurrent,\n ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cudaGetDevice"]
6581    pub unsafe fn cuCtxGetCurrent(&self, pctx: *mut CUcontext) -> CUresult {
6582        (self
6583            .cuCtxGetCurrent
6584            .as_ref()
6585            .expect("Expected function, got error."))(pctx)
6586    }
6587    #[doc = " \\brief Returns the device ID for the current context\n\n Returns in \\p *device the ordinal of the current context's device.\n\n \\param device - Returned device ID for the current context\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize,\n ::cudaGetDevice"]
6588    pub unsafe fn cuCtxGetDevice(&self, device: *mut CUdevice) -> CUresult {
6589        (self
6590            .cuCtxGetDevice
6591            .as_ref()
6592            .expect("Expected function, got error."))(device)
6593    }
6594    #[doc = " \\brief Returns the flags for the current context\n\n Returns in \\p *flags the flags of the current context. See ::cuCtxCreate\n for flag values.\n\n \\param flags - Pointer to store flags of current context\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetCurrent,\n ::cuCtxGetDevice,\n ::cuCtxGetLimit,\n ::cuCtxGetSharedMemConfig,\n ::cuCtxGetStreamPriorityRange,\n ::cudaGetDeviceFlags"]
6595    pub unsafe fn cuCtxGetFlags(&self, flags: *mut ::std::os::raw::c_uint) -> CUresult {
6596        (self
6597            .cuCtxGetFlags
6598            .as_ref()
6599            .expect("Expected function, got error."))(flags)
6600    }
6601    #[doc = " \\brief Returns the unique Id associated with the context supplied\n\n Returns in \\p ctxId the unique Id which is associated with a given context.\n The Id is unique for the life of the program for this instance of CUDA.\n If context is supplied as NULL and there is one current, the Id of the\n current context is returned.\n\n \\param ctx - Context for which to obtain the Id\n \\param ctxId - Pointer to store the Id of the context\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_CONTEXT_IS_DESTROYED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPushCurrent"]
6602    pub unsafe fn cuCtxGetId(
6603        &self,
6604        ctx: CUcontext,
6605        ctxId: *mut ::std::os::raw::c_ulonglong,
6606    ) -> CUresult {
6607        (self
6608            .cuCtxGetId
6609            .as_ref()
6610            .expect("Expected function, got error."))(ctx, ctxId)
6611    }
6612    #[doc = " \\brief Block for a context's tasks to complete\n\n Blocks until the device has completed all preceding requested tasks.\n ::cuCtxSynchronize() returns an error if one of the preceding tasks failed.\n If the context was created with the ::CU_CTX_SCHED_BLOCKING_SYNC flag, the\n CPU thread will block until the GPU context has finished its work.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cudaDeviceSynchronize"]
6613    pub unsafe fn cuCtxSynchronize(&self) -> CUresult {
6614        (self
6615            .cuCtxSynchronize
6616            .as_ref()
6617            .expect("Expected function, got error."))()
6618    }
6619    #[doc = " \\brief Set resource limits\n\n Setting \\p limit to \\p value is a request by the application to update\n the current limit maintained by the context. The driver is free to\n modify the requested value to meet h/w requirements (this could be\n clamping to minimum or maximum values, rounding up to nearest element\n size, etc). The application can use ::cuCtxGetLimit() to find out exactly\n what the limit has been set to.\n\n Setting each ::CUlimit has its own specific restrictions, so each is\n discussed here.\n\n - ::CU_LIMIT_STACK_SIZE controls the stack size in bytes of each GPU thread.\n   The driver automatically increases the per-thread stack size\n   for each kernel launch as needed. This size isn't reset back to the\n   original value after each launch. Setting this value will take effect\n   immediately, and if necessary, the device will block until all preceding\n   requested tasks are complete.\n\n - ::CU_LIMIT_PRINTF_FIFO_SIZE controls the size in bytes of the FIFO used\n   by the ::printf() device system call. Setting ::CU_LIMIT_PRINTF_FIFO_SIZE\n   must be performed before launching any kernel that uses the ::printf()\n   device system call, otherwise ::CUDA_ERROR_INVALID_VALUE will be returned.\n\n - ::CU_LIMIT_MALLOC_HEAP_SIZE controls the size in bytes of the heap used\n   by the ::malloc() and ::free() device system calls. Setting\n   ::CU_LIMIT_MALLOC_HEAP_SIZE must be performed before launching any kernel\n   that uses the ::malloc() or ::free() device system calls, otherwise\n   ::CUDA_ERROR_INVALID_VALUE will be returned.\n\n - ::CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH controls the maximum nesting depth of\n   a grid at which a thread can safely call ::cudaDeviceSynchronize(). Setting\n   this limit must be performed before any launch of a kernel that uses the\n   device runtime and calls ::cudaDeviceSynchronize() above the default sync\n   depth, two levels of grids. Calls to ::cudaDeviceSynchronize() will fail\n   with error code ::cudaErrorSyncDepthExceeded if the limitation is\n   violated. This limit can be set smaller than the default or up the maximum\n   launch depth of 24. When setting this limit, keep in mind that additional\n   levels of sync depth require the driver to reserve large amounts of device\n   memory which can no longer be used for user allocations. If these\n   reservations of device memory fail, ::cuCtxSetLimit() will return\n   ::CUDA_ERROR_OUT_OF_MEMORY, and the limit can be reset to a lower value.\n   This limit is only applicable to devices of compute capability < 9.0.\n   Attempting to set this limit on devices of other compute capability\n   versions will result in the error ::CUDA_ERROR_UNSUPPORTED_LIMIT being\n   returned.\n\n - ::CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT controls the maximum number of\n   outstanding device runtime launches that can be made from the current\n   context. A grid is outstanding from the point of launch up until the grid\n   is known to have been completed. Device runtime launches which violate\n   this limitation fail and return ::cudaErrorLaunchPendingCountExceeded when\n   ::cudaGetLastError() is called after launch. If more pending launches than\n   the default (2048 launches) are needed for a module using the device\n   runtime, this limit can be increased. Keep in mind that being able to\n   sustain additional pending launches will require the driver to reserve\n   larger amounts of device memory upfront which can no longer be used for\n   allocations. If these reservations fail, ::cuCtxSetLimit() will return\n   ::CUDA_ERROR_OUT_OF_MEMORY, and the limit can be reset to a lower value.\n   This limit is only applicable to devices of compute capability 3.5 and\n   higher. Attempting to set this limit on devices of compute capability less\n   than 3.5 will result in the error ::CUDA_ERROR_UNSUPPORTED_LIMIT being\n   returned.\n\n - ::CU_LIMIT_MAX_L2_FETCH_GRANULARITY controls the L2 cache fetch granularity.\n   Values can range from 0B to 128B. This is purely a performence hint and\n   it can be ignored or clamped depending on the platform.\n\n - ::CU_LIMIT_PERSISTING_L2_CACHE_SIZE controls size in bytes availabe for\n   persisting L2 cache. This is purely a performance hint and it can be\n   ignored or clamped depending on the platform.\n\n \\param limit - Limit to set\n \\param value - Size of limit\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_UNSUPPORTED_LIMIT,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_INVALID_CONTEXT\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSynchronize,\n ::cudaDeviceSetLimit"]
6620    pub unsafe fn cuCtxSetLimit(&self, limit: CUlimit, value: usize) -> CUresult {
6621        (self
6622            .cuCtxSetLimit
6623            .as_ref()
6624            .expect("Expected function, got error."))(limit, value)
6625    }
6626    #[doc = " \\brief Returns resource limits\n\n Returns in \\p *pvalue the current size of \\p limit.  The supported\n ::CUlimit values are:\n - ::CU_LIMIT_STACK_SIZE: stack size in bytes of each GPU thread.\n - ::CU_LIMIT_PRINTF_FIFO_SIZE: size in bytes of the FIFO used by the\n   ::printf() device system call.\n - ::CU_LIMIT_MALLOC_HEAP_SIZE: size in bytes of the heap used by the\n   ::malloc() and ::free() device system calls.\n - ::CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH: maximum grid depth at which a thread\n   can issue the device runtime call ::cudaDeviceSynchronize() to wait on\n   child grid launches to complete.\n - ::CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT: maximum number of outstanding\n   device runtime launches that can be made from this context.\n - ::CU_LIMIT_MAX_L2_FETCH_GRANULARITY: L2 cache fetch granularity.\n - ::CU_LIMIT_PERSISTING_L2_CACHE_SIZE: Persisting L2 cache size in bytes\n\n \\param limit  - Limit to query\n \\param pvalue - Returned size of limit\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_UNSUPPORTED_LIMIT\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize,\n ::cudaDeviceGetLimit"]
6627    pub unsafe fn cuCtxGetLimit(&self, pvalue: *mut usize, limit: CUlimit) -> CUresult {
6628        (self
6629            .cuCtxGetLimit
6630            .as_ref()
6631            .expect("Expected function, got error."))(pvalue, limit)
6632    }
6633    #[doc = " \\brief Returns the preferred cache configuration for the current context.\n\n On devices where the L1 cache and shared memory use the same hardware\n resources, this function returns through \\p pconfig the preferred cache configuration\n for the current context. This is only a preference. The driver will use\n the requested configuration if possible, but it is free to choose a different\n configuration if required to execute functions.\n\n This will return a \\p pconfig of ::CU_FUNC_CACHE_PREFER_NONE on devices\n where the size of the L1 cache and shared memory are fixed.\n\n The supported cache configurations are:\n - ::CU_FUNC_CACHE_PREFER_NONE: no preference for shared memory or L1 (default)\n - ::CU_FUNC_CACHE_PREFER_SHARED: prefer larger shared memory and smaller L1 cache\n - ::CU_FUNC_CACHE_PREFER_L1: prefer larger L1 cache and smaller shared memory\n - ::CU_FUNC_CACHE_PREFER_EQUAL: prefer equal sized L1 cache and shared memory\n\n \\param pconfig - Returned cache configuration\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize,\n ::cuFuncSetCacheConfig,\n ::cudaDeviceGetCacheConfig"]
6634    pub unsafe fn cuCtxGetCacheConfig(&self, pconfig: *mut CUfunc_cache) -> CUresult {
6635        (self
6636            .cuCtxGetCacheConfig
6637            .as_ref()
6638            .expect("Expected function, got error."))(pconfig)
6639    }
6640    #[doc = " \\brief Sets the preferred cache configuration for the current context.\n\n On devices where the L1 cache and shared memory use the same hardware\n resources, this sets through \\p config the preferred cache configuration for\n the current context. This is only a preference. The driver will use\n the requested configuration if possible, but it is free to choose a different\n configuration if required to execute the function. Any function preference\n set via ::cuFuncSetCacheConfig() or ::cuKernelSetCacheConfig() will be preferred over this context-wide\n setting. Setting the context-wide cache configuration to\n ::CU_FUNC_CACHE_PREFER_NONE will cause subsequent kernel launches to prefer\n to not change the cache configuration unless required to launch the kernel.\n\n This setting does nothing on devices where the size of the L1 cache and\n shared memory are fixed.\n\n Launching a kernel with a different preference than the most recent\n preference setting may insert a device-side synchronization point.\n\n The supported cache configurations are:\n - ::CU_FUNC_CACHE_PREFER_NONE: no preference for shared memory or L1 (default)\n - ::CU_FUNC_CACHE_PREFER_SHARED: prefer larger shared memory and smaller L1 cache\n - ::CU_FUNC_CACHE_PREFER_L1: prefer larger L1 cache and smaller shared memory\n - ::CU_FUNC_CACHE_PREFER_EQUAL: prefer equal sized L1 cache and shared memory\n\n \\param config - Requested cache configuration\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize,\n ::cuFuncSetCacheConfig,\n ::cudaDeviceSetCacheConfig,\n ::cuKernelSetCacheConfig"]
6641    pub unsafe fn cuCtxSetCacheConfig(&self, config: CUfunc_cache) -> CUresult {
6642        (self
6643            .cuCtxSetCacheConfig
6644            .as_ref()
6645            .expect("Expected function, got error."))(config)
6646    }
6647    #[doc = " \\brief Returns the current shared memory configuration for the current context.\n\n This function will return in \\p pConfig the current size of shared memory banks\n in the current context. On devices with configurable shared memory banks,\n ::cuCtxSetSharedMemConfig can be used to change this setting, so that all\n subsequent kernel launches will by default use the new bank size. When\n ::cuCtxGetSharedMemConfig is called on devices without configurable shared\n memory, it will return the fixed bank size of the hardware.\n\n The returned bank configurations can be either:\n - ::CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE:  shared memory bank width is\n   four bytes.\n - ::CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE: shared memory bank width will\n   eight bytes.\n\n \\param pConfig - returned shared memory configuration\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize,\n ::cuCtxGetSharedMemConfig,\n ::cuFuncSetCacheConfig,\n ::cudaDeviceGetSharedMemConfig"]
6648    pub unsafe fn cuCtxGetSharedMemConfig(&self, pConfig: *mut CUsharedconfig) -> CUresult {
6649        (self
6650            .cuCtxGetSharedMemConfig
6651            .as_ref()
6652            .expect("Expected function, got error."))(pConfig)
6653    }
6654    #[doc = " \\brief Sets the shared memory configuration for the current context.\n\n On devices with configurable shared memory banks, this function will set\n the context's shared memory bank size which is used for subsequent kernel\n launches.\n\n Changed the shared memory configuration between launches may insert a device\n side synchronization point between those launches.\n\n Changing the shared memory bank size will not increase shared memory usage\n or affect occupancy of kernels, but may have major effects on performance.\n Larger bank sizes will allow for greater potential bandwidth to shared memory,\n but will change what kinds of accesses to shared memory will result in bank\n conflicts.\n\n This function will do nothing on devices with fixed shared memory bank size.\n\n The supported bank configurations are:\n - ::CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE: set bank width to the default initial\n   setting (currently, four bytes).\n - ::CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE: set shared memory bank width to\n   be natively four bytes.\n - ::CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE: set shared memory bank width to\n   be natively eight bytes.\n\n \\param config - requested shared memory configuration\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize,\n ::cuCtxGetSharedMemConfig,\n ::cuFuncSetCacheConfig,\n ::cudaDeviceSetSharedMemConfig"]
6655    pub unsafe fn cuCtxSetSharedMemConfig(&self, config: CUsharedconfig) -> CUresult {
6656        (self
6657            .cuCtxSetSharedMemConfig
6658            .as_ref()
6659            .expect("Expected function, got error."))(config)
6660    }
6661    #[doc = " \\brief Gets the context's API version.\n\n Returns a version number in \\p version corresponding to the capabilities of\n the context (e.g. 3010 or 3020), which library developers can use to direct\n callers to a specific API version. If \\p ctx is NULL, returns the API version\n used to create the currently bound context.\n\n Note that new API versions are only introduced when context capabilities are\n changed that break binary compatibility, so the API version and driver version\n may be different. For example, it is valid for the API version to be 3020 while\n the driver version is 4020.\n\n \\param ctx     - Context to check\n \\param version - Pointer to version\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize"]
6662    pub unsafe fn cuCtxGetApiVersion(
6663        &self,
6664        ctx: CUcontext,
6665        version: *mut ::std::os::raw::c_uint,
6666    ) -> CUresult {
6667        (self
6668            .cuCtxGetApiVersion
6669            .as_ref()
6670            .expect("Expected function, got error."))(ctx, version)
6671    }
6672    #[doc = " \\brief Returns numerical values that correspond to the least and\n greatest stream priorities.\n\n Returns in \\p *leastPriority and \\p *greatestPriority the numerical values that correspond\n to the least and greatest stream priorities respectively. Stream priorities\n follow a convention where lower numbers imply greater priorities. The range of\n meaningful stream priorities is given by [\\p *greatestPriority, \\p *leastPriority].\n If the user attempts to create a stream with a priority value that is\n outside the meaningful range as specified by this API, the priority is\n automatically clamped down or up to either \\p *leastPriority or \\p *greatestPriority\n respectively. See ::cuStreamCreateWithPriority for details on creating a\n priority stream.\n A NULL may be passed in for \\p *leastPriority or \\p *greatestPriority if the value\n is not desired.\n\n This function will return '0' in both \\p *leastPriority and \\p *greatestPriority if\n the current context's device does not support stream priorities\n (see ::cuDeviceGetAttribute).\n\n \\param leastPriority    - Pointer to an int in which the numerical value for least\n                           stream priority is returned\n \\param greatestPriority - Pointer to an int in which the numerical value for greatest\n                           stream priority is returned\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\notefnerr\n\n \\sa ::cuStreamCreateWithPriority,\n ::cuStreamGetPriority,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize,\n ::cudaDeviceGetStreamPriorityRange"]
6673    pub unsafe fn cuCtxGetStreamPriorityRange(
6674        &self,
6675        leastPriority: *mut ::std::os::raw::c_int,
6676        greatestPriority: *mut ::std::os::raw::c_int,
6677    ) -> CUresult {
6678        (self
6679            .cuCtxGetStreamPriorityRange
6680            .as_ref()
6681            .expect("Expected function, got error."))(leastPriority, greatestPriority)
6682    }
6683    #[doc = " \\brief Resets all persisting lines in cache to normal status.\n\n ::cuCtxResetPersistingL2Cache Resets all persisting lines in cache to normal\n status. Takes effect on function return.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa\n ::CUaccessPolicyWindow"]
6684    pub unsafe fn cuCtxResetPersistingL2Cache(&self) -> CUresult {
6685        (self
6686            .cuCtxResetPersistingL2Cache
6687            .as_ref()
6688            .expect("Expected function, got error."))()
6689    }
6690    #[doc = " \\brief Returns the execution affinity setting for the current context.\n\n Returns in \\p *pExecAffinity the current value of \\p type. The supported\n ::CUexecAffinityType values are:\n - ::CU_EXEC_AFFINITY_TYPE_SM_COUNT: number of SMs the context is limited to use.\n\n \\param type          - Execution affinity type to query\n \\param pExecAffinity - Returned execution affinity\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY\n \\notefnerr\n\n \\sa\n ::CUexecAffinityParam"]
6691    pub unsafe fn cuCtxGetExecAffinity(
6692        &self,
6693        pExecAffinity: *mut CUexecAffinityParam,
6694        type_: CUexecAffinityType,
6695    ) -> CUresult {
6696        (self
6697            .cuCtxGetExecAffinity
6698            .as_ref()
6699            .expect("Expected function, got error."))(pExecAffinity, type_)
6700    }
6701    #[doc = " \\brief Increment a context's usage-count\n\n \\deprecated\n\n Note that this function is deprecated and should not be used.\n\n Increments the usage count of the context and passes back a context handle\n in \\p *pctx that must be passed to ::cuCtxDetach() when the application is\n done with the context. ::cuCtxAttach() fails if there is no context current\n to the thread.\n\n Currently, the \\p flags parameter must be 0.\n\n \\param pctx  - Returned context handle of the current context\n \\param flags - Context attach flags (must be 0)\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxDetach,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize"]
6702    pub unsafe fn cuCtxAttach(
6703        &self,
6704        pctx: *mut CUcontext,
6705        flags: ::std::os::raw::c_uint,
6706    ) -> CUresult {
6707        (self
6708            .cuCtxAttach
6709            .as_ref()
6710            .expect("Expected function, got error."))(pctx, flags)
6711    }
6712    #[doc = " \\brief Decrement a context's usage-count\n\n \\deprecated\n\n Note that this function is deprecated and should not be used.\n\n Decrements the usage count of the context \\p ctx, and destroys the context\n if the usage count goes to 0. The context must be a handle that was passed\n back by ::cuCtxCreate() or ::cuCtxAttach(), and must be current to the\n calling thread.\n\n \\param ctx - Context to destroy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize"]
6713    pub unsafe fn cuCtxDetach(&self, ctx: CUcontext) -> CUresult {
6714        (self
6715            .cuCtxDetach
6716            .as_ref()
6717            .expect("Expected function, got error."))(ctx)
6718    }
6719    #[doc = " \\brief Loads a compute module\n\n Takes a filename \\p fname and loads the corresponding module \\p module into\n the current context. The CUDA driver API does not attempt to lazily\n allocate the resources needed by a module; if the memory for functions and\n data (constant and global) needed by the module cannot be allocated,\n ::cuModuleLoad() fails. The file should be a \\e cubin file as output by\n \\b nvcc, or a \\e PTX file either as output by \\b nvcc or handwritten, or\n a \\e fatbin file as output by \\b nvcc from toolchain 4.0 or later.\n\n \\param module - Returned module\n \\param fname  - Filename of module to load\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_PTX,\n ::CUDA_ERROR_UNSUPPORTED_PTX_VERSION,\n ::CUDA_ERROR_NOT_FOUND,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_FILE_NOT_FOUND,\n ::CUDA_ERROR_NO_BINARY_FOR_GPU,\n ::CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED,\n ::CUDA_ERROR_JIT_COMPILER_NOT_FOUND\n \\notefnerr\n\n \\sa ::cuModuleGetFunction,\n ::cuModuleGetGlobal,\n ::cuModuleGetTexRef,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx,\n ::cuModuleLoadFatBinary,\n ::cuModuleUnload"]
6720    pub unsafe fn cuModuleLoad(
6721        &self,
6722        module: *mut CUmodule,
6723        fname: *const ::std::os::raw::c_char,
6724    ) -> CUresult {
6725        (self
6726            .cuModuleLoad
6727            .as_ref()
6728            .expect("Expected function, got error."))(module, fname)
6729    }
6730    #[doc = " \\brief Load a module's data\n\n Takes a pointer \\p image and loads the corresponding module \\p module into\n the current context. The pointer may be obtained by mapping a \\e cubin or\n \\e PTX or \\e fatbin file, passing a \\e cubin or \\e PTX or \\e fatbin file\n as a NULL-terminated text string, or incorporating a \\e cubin or \\e fatbin\n object into the executable resources and using operating system calls such\n as Windows \\c FindResource() to obtain the pointer.\n\n \\param module - Returned module\n \\param image  - Module data to load\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_PTX,\n ::CUDA_ERROR_UNSUPPORTED_PTX_VERSION,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_NO_BINARY_FOR_GPU,\n ::CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED,\n ::CUDA_ERROR_JIT_COMPILER_NOT_FOUND\n \\notefnerr\n\n \\sa ::cuModuleGetFunction,\n ::cuModuleGetGlobal,\n ::cuModuleGetTexRef,\n ::cuModuleLoad,\n ::cuModuleLoadDataEx,\n ::cuModuleLoadFatBinary,\n ::cuModuleUnload"]
6731    pub unsafe fn cuModuleLoadData(
6732        &self,
6733        module: *mut CUmodule,
6734        image: *const ::std::os::raw::c_void,
6735    ) -> CUresult {
6736        (self
6737            .cuModuleLoadData
6738            .as_ref()
6739            .expect("Expected function, got error."))(module, image)
6740    }
6741    #[doc = " \\brief Load a module's data with options\n\n Takes a pointer \\p image and loads the corresponding module \\p module into\n the current context. The pointer may be obtained by mapping a \\e cubin or\n \\e PTX or \\e fatbin file, passing a \\e cubin or \\e PTX or \\e fatbin file\n as a NULL-terminated text string, or incorporating a \\e cubin or \\e fatbin\n object into the executable resources and using operating system calls such\n as Windows \\c FindResource() to obtain the pointer. Options are passed as\n an array via \\p options and any corresponding parameters are passed in\n \\p optionValues. The number of total options is supplied via \\p numOptions.\n Any outputs will be returned via \\p optionValues.\n\n \\param module       - Returned module\n \\param image        - Module data to load\n \\param numOptions   - Number of options\n \\param options      - Options for JIT\n \\param optionValues - Option values for JIT\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_PTX,\n ::CUDA_ERROR_UNSUPPORTED_PTX_VERSION,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_NO_BINARY_FOR_GPU,\n ::CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED,\n ::CUDA_ERROR_JIT_COMPILER_NOT_FOUND\n \\notefnerr\n\n \\sa ::cuModuleGetFunction,\n ::cuModuleGetGlobal,\n ::cuModuleGetTexRef,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadFatBinary,\n ::cuModuleUnload"]
6742    pub unsafe fn cuModuleLoadDataEx(
6743        &self,
6744        module: *mut CUmodule,
6745        image: *const ::std::os::raw::c_void,
6746        numOptions: ::std::os::raw::c_uint,
6747        options: *mut CUjit_option,
6748        optionValues: *mut *mut ::std::os::raw::c_void,
6749    ) -> CUresult {
6750        (self
6751            .cuModuleLoadDataEx
6752            .as_ref()
6753            .expect("Expected function, got error."))(
6754            module,
6755            image,
6756            numOptions,
6757            options,
6758            optionValues,
6759        )
6760    }
6761    #[doc = " \\brief Load a module's data\n\n Takes a pointer \\p fatCubin and loads the corresponding module \\p module\n into the current context. The pointer represents a <i>fat binary</i> object,\n which is a collection of different \\e cubin and/or \\e PTX files, all\n representing the same device code, but compiled and optimized for different\n architectures.\n\n Prior to CUDA 4.0, there was no documented API for constructing and using\n fat binary objects by programmers.  Starting with CUDA 4.0, fat binary\n objects can be constructed by providing the <i>-fatbin option</i> to \\b nvcc.\n More information can be found in the \\b nvcc document.\n\n \\param module   - Returned module\n \\param fatCubin - Fat binary to load\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_PTX,\n ::CUDA_ERROR_UNSUPPORTED_PTX_VERSION,\n ::CUDA_ERROR_NOT_FOUND,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_NO_BINARY_FOR_GPU,\n ::CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED,\n ::CUDA_ERROR_JIT_COMPILER_NOT_FOUND\n \\notefnerr\n\n \\sa ::cuModuleGetFunction,\n ::cuModuleGetGlobal,\n ::cuModuleGetTexRef,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx,\n ::cuModuleUnload"]
6762    pub unsafe fn cuModuleLoadFatBinary(
6763        &self,
6764        module: *mut CUmodule,
6765        fatCubin: *const ::std::os::raw::c_void,
6766    ) -> CUresult {
6767        (self
6768            .cuModuleLoadFatBinary
6769            .as_ref()
6770            .expect("Expected function, got error."))(module, fatCubin)
6771    }
6772    #[doc = " \\brief Unloads a module\n\n Unloads a module \\p hmod from the current context.\n\n \\param hmod - Module to unload\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n \\note_destroy_ub\n\n \\sa ::cuModuleGetFunction,\n ::cuModuleGetGlobal,\n ::cuModuleGetTexRef,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx,\n ::cuModuleLoadFatBinary"]
6773    pub unsafe fn cuModuleUnload(&self, hmod: CUmodule) -> CUresult {
6774        (self
6775            .cuModuleUnload
6776            .as_ref()
6777            .expect("Expected function, got error."))(hmod)
6778    }
6779    #[doc = " \\brief Query lazy loading mode\n\n Returns lazy loading mode\n Module loading mode is controlled by CUDA_MODULE_LOADING env variable\n\n \\param mode      - Returns the lazy loading mode\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\notefnerr\n\n \\sa\n ::cuModuleLoad,"]
6780    pub unsafe fn cuModuleGetLoadingMode(&self, mode: *mut CUmoduleLoadingMode) -> CUresult {
6781        (self
6782            .cuModuleGetLoadingMode
6783            .as_ref()
6784            .expect("Expected function, got error."))(mode)
6785    }
6786    #[doc = " \\brief Returns a function handle\n\n Returns in \\p *hfunc the handle of the function of name \\p name located in\n module \\p hmod. If no function of that name exists, ::cuModuleGetFunction()\n returns ::CUDA_ERROR_NOT_FOUND.\n\n \\param hfunc - Returned function handle\n \\param hmod  - Module to retrieve function from\n \\param name  - Name of function to retrieve\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_FOUND\n \\notefnerr\n\n \\sa ::cuModuleGetGlobal,\n ::cuModuleGetTexRef,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx,\n ::cuModuleLoadFatBinary,\n ::cuModuleUnload"]
6787    pub unsafe fn cuModuleGetFunction(
6788        &self,
6789        hfunc: *mut CUfunction,
6790        hmod: CUmodule,
6791        name: *const ::std::os::raw::c_char,
6792    ) -> CUresult {
6793        (self
6794            .cuModuleGetFunction
6795            .as_ref()
6796            .expect("Expected function, got error."))(hfunc, hmod, name)
6797    }
6798    pub unsafe fn cuModuleGetGlobal_v2(
6799        &self,
6800        dptr: *mut CUdeviceptr,
6801        bytes: *mut usize,
6802        hmod: CUmodule,
6803        name: *const ::std::os::raw::c_char,
6804    ) -> CUresult {
6805        (self
6806            .cuModuleGetGlobal_v2
6807            .as_ref()
6808            .expect("Expected function, got error."))(dptr, bytes, hmod, name)
6809    }
6810    pub unsafe fn cuLinkCreate_v2(
6811        &self,
6812        numOptions: ::std::os::raw::c_uint,
6813        options: *mut CUjit_option,
6814        optionValues: *mut *mut ::std::os::raw::c_void,
6815        stateOut: *mut CUlinkState,
6816    ) -> CUresult {
6817        (self
6818            .cuLinkCreate_v2
6819            .as_ref()
6820            .expect("Expected function, got error."))(
6821            numOptions, options, optionValues, stateOut
6822        )
6823    }
6824    pub unsafe fn cuLinkAddData_v2(
6825        &self,
6826        state: CUlinkState,
6827        type_: CUjitInputType,
6828        data: *mut ::std::os::raw::c_void,
6829        size: usize,
6830        name: *const ::std::os::raw::c_char,
6831        numOptions: ::std::os::raw::c_uint,
6832        options: *mut CUjit_option,
6833        optionValues: *mut *mut ::std::os::raw::c_void,
6834    ) -> CUresult {
6835        (self
6836            .cuLinkAddData_v2
6837            .as_ref()
6838            .expect("Expected function, got error."))(
6839            state,
6840            type_,
6841            data,
6842            size,
6843            name,
6844            numOptions,
6845            options,
6846            optionValues,
6847        )
6848    }
6849    pub unsafe fn cuLinkAddFile_v2(
6850        &self,
6851        state: CUlinkState,
6852        type_: CUjitInputType,
6853        path: *const ::std::os::raw::c_char,
6854        numOptions: ::std::os::raw::c_uint,
6855        options: *mut CUjit_option,
6856        optionValues: *mut *mut ::std::os::raw::c_void,
6857    ) -> CUresult {
6858        (self
6859            .cuLinkAddFile_v2
6860            .as_ref()
6861            .expect("Expected function, got error."))(
6862            state,
6863            type_,
6864            path,
6865            numOptions,
6866            options,
6867            optionValues,
6868        )
6869    }
6870    #[doc = " \\brief Complete a pending linker invocation\n\n Completes the pending linker action and returns the cubin image for the linked\n device code, which can be used with ::cuModuleLoadData.  The cubin is owned by\n \\p state, so it should be loaded before \\p state is destroyed via ::cuLinkDestroy.\n This call does not destroy \\p state.\n\n \\param state    A pending linker invocation\n \\param cubinOut On success, this will point to the output image\n \\param sizeOut  Optional parameter to receive the size of the generated image\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa ::cuLinkCreate,\n ::cuLinkAddData,\n ::cuLinkAddFile,\n ::cuLinkDestroy,\n ::cuModuleLoadData"]
6871    pub unsafe fn cuLinkComplete(
6872        &self,
6873        state: CUlinkState,
6874        cubinOut: *mut *mut ::std::os::raw::c_void,
6875        sizeOut: *mut usize,
6876    ) -> CUresult {
6877        (self
6878            .cuLinkComplete
6879            .as_ref()
6880            .expect("Expected function, got error."))(state, cubinOut, sizeOut)
6881    }
6882    #[doc = " \\brief Destroys state for a JIT linker invocation.\n\n \\param state State object for the linker invocation\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_HANDLE\n\n \\sa ::cuLinkCreate"]
6883    pub unsafe fn cuLinkDestroy(&self, state: CUlinkState) -> CUresult {
6884        (self
6885            .cuLinkDestroy
6886            .as_ref()
6887            .expect("Expected function, got error."))(state)
6888    }
6889    #[doc = " \\brief Returns a handle to a texture reference\n\n \\deprecated\n\n Returns in \\p *pTexRef the handle of the texture reference of name \\p name\n in the module \\p hmod. If no texture reference of that name exists,\n ::cuModuleGetTexRef() returns ::CUDA_ERROR_NOT_FOUND. This texture reference\n handle should not be destroyed, since it will be destroyed when the module\n is unloaded.\n\n \\param pTexRef  - Returned texture reference\n \\param hmod     - Module to retrieve texture reference from\n \\param name     - Name of texture reference to retrieve\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_FOUND\n \\notefnerr\n\n \\sa\n ::cuModuleGetFunction,\n ::cuModuleGetGlobal,\n ::cuModuleGetSurfRef,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx,\n ::cuModuleLoadFatBinary,\n ::cuModuleUnload"]
6890    pub unsafe fn cuModuleGetTexRef(
6891        &self,
6892        pTexRef: *mut CUtexref,
6893        hmod: CUmodule,
6894        name: *const ::std::os::raw::c_char,
6895    ) -> CUresult {
6896        (self
6897            .cuModuleGetTexRef
6898            .as_ref()
6899            .expect("Expected function, got error."))(pTexRef, hmod, name)
6900    }
6901    #[doc = " \\brief Returns a handle to a surface reference\n\n \\deprecated\n\n Returns in \\p *pSurfRef the handle of the surface reference of name \\p name\n in the module \\p hmod. If no surface reference of that name exists,\n ::cuModuleGetSurfRef() returns ::CUDA_ERROR_NOT_FOUND.\n\n \\param pSurfRef  - Returned surface reference\n \\param hmod     - Module to retrieve surface reference from\n \\param name     - Name of surface reference to retrieve\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_FOUND\n \\notefnerr\n\n \\sa\n ::cuModuleGetFunction,\n ::cuModuleGetGlobal,\n ::cuModuleGetTexRef,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx,\n ::cuModuleLoadFatBinary,\n ::cuModuleUnload"]
6902    pub unsafe fn cuModuleGetSurfRef(
6903        &self,
6904        pSurfRef: *mut CUsurfref,
6905        hmod: CUmodule,
6906        name: *const ::std::os::raw::c_char,
6907    ) -> CUresult {
6908        (self
6909            .cuModuleGetSurfRef
6910            .as_ref()
6911            .expect("Expected function, got error."))(pSurfRef, hmod, name)
6912    }
6913    #[doc = " \\brief Load a library with specified code and options\n\n Takes a pointer \\p code and loads the corresponding library \\p library into\n all contexts existent at the time of the call and future contexts at the time\n of creation until the library is unloaded with ::cuLibraryUnload().\n\n The pointer may be obtained by mapping a \\e cubin or \\e PTX or \\e fatbin file,\n passing a \\e cubin or \\e PTX or \\e fatbin file as a NULL-terminated text string, or\n incorporating a \\e cubin or \\e fatbin object into the executable resources and\n using operating system calls such as Windows \\c FindResource() to obtain the pointer.\n Options are passed as an array via \\p jitOptions and any corresponding parameters are passed in\n \\p jitOptionsValues. The number of total JTT options is supplied via \\p numJitOptions.\n Any outputs will be returned via \\p jitOptionsValues.\n\n \\param library             - Returned library\n \\param code                - Code to load\n \\param jitOptions          - Options for JIT\n \\param jitOptionsValues    - Option values for JIT\n \\param numJitOptions       - Number of options\n \\param libraryOptions      - Options for loading\n \\param libraryOptionValues - Option values for loading\n \\param numLibraryOptions   - Number of options for loading\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_PTX,\n ::CUDA_ERROR_UNSUPPORTED_PTX_VERSION,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_NO_BINARY_FOR_GPU,\n ::CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED,\n ::CUDA_ERROR_JIT_COMPILER_NOT_FOUND\n\n \\sa ::cuLibraryLoadFromFile,\n ::cuLibraryUnload,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx"]
6914    pub unsafe fn cuLibraryLoadData(
6915        &self,
6916        library: *mut CUlibrary,
6917        code: *const ::std::os::raw::c_void,
6918        jitOptions: *mut CUjit_option,
6919        jitOptionsValues: *mut *mut ::std::os::raw::c_void,
6920        numJitOptions: ::std::os::raw::c_uint,
6921        libraryOptions: *mut CUlibraryOption,
6922        libraryOptionValues: *mut *mut ::std::os::raw::c_void,
6923        numLibraryOptions: ::std::os::raw::c_uint,
6924    ) -> CUresult {
6925        (self
6926            .cuLibraryLoadData
6927            .as_ref()
6928            .expect("Expected function, got error."))(
6929            library,
6930            code,
6931            jitOptions,
6932            jitOptionsValues,
6933            numJitOptions,
6934            libraryOptions,
6935            libraryOptionValues,
6936            numLibraryOptions,
6937        )
6938    }
6939    #[doc = " \\brief Load a library with specified file and options\n\n Takes a filename \\p fileName and loads the corresponding library \\p library into\n all contexts existent at the time of the call and future contexts at the time of\n creation until the library is unloaded with ::cuLibraryUnload().\n\n The file should be a \\e cubin file as output by \\b nvcc, or a \\e PTX file either\n as output by \\b nvcc or handwritten, or a \\e fatbin file as output by \\b nvcc\n from toolchain 4.0 or later.\n\n Options are passed as an array via \\p jitOptions and any corresponding parameters are\n passed in \\p jitOptionsValues. The number of total options is supplied via \\p numJitOptions.\n Any outputs will be returned via \\p jitOptionsValues.\n\n \\param library             - Returned library\n \\param code                - Code to load\n \\param jitOptions          - Options for JIT\n \\param jitOptionsValues    - Option values for JIT\n \\param numJitOptions       - Number of options\n \\param libraryOptions      - Options for loading\n \\param libraryOptionValues - Option values for loading\n \\param numLibraryOptions   - Number of options for loading\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_PTX,\n ::CUDA_ERROR_UNSUPPORTED_PTX_VERSION,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_NO_BINARY_FOR_GPU,\n ::CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED,\n ::CUDA_ERROR_JIT_COMPILER_NOT_FOUND\n\n \\sa ::cuLibraryLoadData,\n :: cuLibraryUnload,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx"]
6940    pub unsafe fn cuLibraryLoadFromFile(
6941        &self,
6942        library: *mut CUlibrary,
6943        fileName: *const ::std::os::raw::c_char,
6944        jitOptions: *mut CUjit_option,
6945        jitOptionsValues: *mut *mut ::std::os::raw::c_void,
6946        numJitOptions: ::std::os::raw::c_uint,
6947        libraryOptions: *mut CUlibraryOption,
6948        libraryOptionValues: *mut *mut ::std::os::raw::c_void,
6949        numLibraryOptions: ::std::os::raw::c_uint,
6950    ) -> CUresult {
6951        (self
6952            .cuLibraryLoadFromFile
6953            .as_ref()
6954            .expect("Expected function, got error."))(
6955            library,
6956            fileName,
6957            jitOptions,
6958            jitOptionsValues,
6959            numJitOptions,
6960            libraryOptions,
6961            libraryOptionValues,
6962            numLibraryOptions,
6963        )
6964    }
6965    #[doc = " \\brief Unloads a library\n\n Unloads the library specified with \\p library\n\n \\param library - Library to unload\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuLibraryLoadData\n ::cuLibraryLoadFromFile,\n ::cuModuleUnload"]
6966    pub unsafe fn cuLibraryUnload(&self, library: CUlibrary) -> CUresult {
6967        (self
6968            .cuLibraryUnload
6969            .as_ref()
6970            .expect("Expected function, got error."))(library)
6971    }
6972    #[doc = " \\brief Returns a kernel handle\n\n Returns in \\p pKernel the handle of the kernel with name \\p name located in library \\p library.\n If kernel handle is not found, the call returns ::CUDA_ERROR_NOT_FOUND.\n\n \\param pKernel - Returned kernel handle\n \\param library - Library to retrieve kernel from\n \\param name - Name of kernel to retrieve\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_FOUND,\n\n \\sa ::cuLibraryLoadData,\n ::cuLibraryLoadFromFile,\n ::cuLibraryUnload,\n ::cuKernelGetFunction,\n ::cuLibraryGetModule,\n ::cuModuleGetFunction"]
6973    pub unsafe fn cuLibraryGetKernel(
6974        &self,
6975        pKernel: *mut CUkernel,
6976        library: CUlibrary,
6977        name: *const ::std::os::raw::c_char,
6978    ) -> CUresult {
6979        (self
6980            .cuLibraryGetKernel
6981            .as_ref()
6982            .expect("Expected function, got error."))(pKernel, library, name)
6983    }
6984    #[doc = " \\brief Returns a module handle\n\n Returns in \\p pMod the module handle associated with the current context located in\n library \\p library. If module handle is not found, the call returns ::CUDA_ERROR_NOT_FOUND.\n\n \\param pMod - Returned module handle\n \\param library - Library to retrieve module from\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_FOUND,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_CONTEXT_IS_DESTROYED\n\n \\sa ::cuLibraryLoadData,\n ::cuLibraryLoadFromFile,\n ::cuLibraryUnload,\n ::cuModuleGetFunction"]
6985    pub unsafe fn cuLibraryGetModule(&self, pMod: *mut CUmodule, library: CUlibrary) -> CUresult {
6986        (self
6987            .cuLibraryGetModule
6988            .as_ref()
6989            .expect("Expected function, got error."))(pMod, library)
6990    }
6991    #[doc = " \\brief Returns a function handle\n\n Returns in \\p pFunc the handle of the function for the requested kernel \\p kernel and\n the current context. If function handle is not found, the call returns ::CUDA_ERROR_NOT_FOUND.\n\n \\param pFunc - Returned function handle\n \\param kernel - Kernel to retrieve function for the requested context\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_FOUND,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_CONTEXT_IS_DESTROYED\n\n \\sa ::cuLibraryLoadData,\n ::cuLibraryLoadFromFile,\n ::cuLibraryUnload,\n ::cuLibraryGetKernel,\n ::cuLibraryGetModule,\n ::cuModuleGetFunction"]
6992    pub unsafe fn cuKernelGetFunction(&self, pFunc: *mut CUfunction, kernel: CUkernel) -> CUresult {
6993        (self
6994            .cuKernelGetFunction
6995            .as_ref()
6996            .expect("Expected function, got error."))(pFunc, kernel)
6997    }
6998    #[doc = " \\brief Returns a global device pointer\n\n Returns in \\p *dptr and \\p *bytes the base pointer and size of the global with\n name \\p name for the requested library \\p library and the current context.\n If no global for the requested name \\p name exists, the call returns ::CUDA_ERROR_NOT_FOUND.\n One of the parameters \\p dptr or \\p bytes (not both) can be NULL in which\n case it is ignored.\n\n \\param dptr - Returned global device pointer for the requested context\n \\param bytes - Returned global size in bytes\n \\param library - Library to retrieve global from\n \\param name - Name of global to retrieve\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_FOUND,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_CONTEXT_IS_DESTROYED\n\n \\sa ::cuLibraryLoadData,\n ::cuLibraryLoadFromFile,\n ::cuLibraryUnload,\n ::cuLibraryGetModule,\n cuModuleGetGlobal"]
6999    pub unsafe fn cuLibraryGetGlobal(
7000        &self,
7001        dptr: *mut CUdeviceptr,
7002        bytes: *mut usize,
7003        library: CUlibrary,
7004        name: *const ::std::os::raw::c_char,
7005    ) -> CUresult {
7006        (self
7007            .cuLibraryGetGlobal
7008            .as_ref()
7009            .expect("Expected function, got error."))(dptr, bytes, library, name)
7010    }
7011    #[doc = " \\brief Returns a pointer to managed memory\n\n Returns in \\p *dptr and \\p *bytes the base pointer and size of the managed memory with\n name \\p name for the requested library \\p library. If no managed memory with the\n requested name \\p name exists, the call returns ::CUDA_ERROR_NOT_FOUND. One of the parameters\n \\p dptr or \\p bytes (not both) can be NULL in which case it is ignored.\n Note that managed memory for library \\p library is shared across devices and is registered\n when the library is loaded into atleast one context.\n\n \\note The API requires a CUDA context to be present and initialized on at least one device.\n If no context is present, the call returns ::CUDA_ERROR_NOT_FOUND.\n\n \\param dptr - Returned pointer to the managed memory\n \\param bytes - Returned memory size in bytes\n \\param library - Library to retrieve managed memory from\n \\param name - Name of managed memory to retrieve\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_FOUND,\n\n \\sa ::cuLibraryLoadData,\n ::cuLibraryLoadFromFile,\n ::cuLibraryUnload,"]
7012    pub unsafe fn cuLibraryGetManaged(
7013        &self,
7014        dptr: *mut CUdeviceptr,
7015        bytes: *mut usize,
7016        library: CUlibrary,
7017        name: *const ::std::os::raw::c_char,
7018    ) -> CUresult {
7019        (self
7020            .cuLibraryGetManaged
7021            .as_ref()
7022            .expect("Expected function, got error."))(dptr, bytes, library, name)
7023    }
7024    #[doc = " \\brief Returns a pointer to a universal function\n\n Returns in \\p *fptr the function pointer to a global function denoted by \\p symbol.\n If no universal function with name \\p symbol exists, the call returns ::CUDA_ERROR_NOT_FOUND.\n If there is no device with attrubute ::CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS present in the system,\n the call may return ::CUDA_ERROR_NOT_FOUND.\n\n \\param fptr - Returned pointer to a universal function\n \\param library - Library to retrieve function pointer memory from\n \\param symbol - Name of function pointer to retrieve\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_FOUND,\n\n \\sa ::cuLibraryLoadData,\n ::cuLibraryLoadFromFile,\n ::cuLibraryUnload,"]
7025    pub unsafe fn cuLibraryGetUnifiedFunction(
7026        &self,
7027        fptr: *mut *mut ::std::os::raw::c_void,
7028        library: CUlibrary,
7029        symbol: *const ::std::os::raw::c_char,
7030    ) -> CUresult {
7031        (self
7032            .cuLibraryGetUnifiedFunction
7033            .as_ref()
7034            .expect("Expected function, got error."))(fptr, library, symbol)
7035    }
7036    #[doc = " \\brief Returns information about a kernel\n\n Returns in \\p *pi the integer value of the attribute \\p attrib for the kernel\n \\p kernel for the requested device \\p dev. The supported attributes are:\n - ::CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: The maximum number of threads\n   per block, beyond which a launch of the kernel would fail. This number\n   depends on both the kernel and the requested device.\n - ::CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: The size in bytes of\n   statically-allocated shared memory per block required by this kernel.\n   This does not include dynamically-allocated shared memory requested by\n   the user at runtime.\n - ::CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: The size in bytes of user-allocated\n   constant memory required by this kernel.\n - ::CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: The size in bytes of local memory\n   used by each thread of this kernel.\n - ::CU_FUNC_ATTRIBUTE_NUM_REGS: The number of registers used by each thread\n   of this kernel.\n - ::CU_FUNC_ATTRIBUTE_PTX_VERSION: The PTX virtual architecture version for\n   which the kernel was compiled. This value is the major PTX version * 10\n   + the minor PTX version, so a PTX version 1.3 function would return the\n   value 13. Note that this may return the undefined value of 0 for cubins\n   compiled prior to CUDA 3.0.\n - ::CU_FUNC_ATTRIBUTE_BINARY_VERSION: The binary architecture version for\n   which the kernel was compiled. This value is the major binary\n   version * 10 + the minor binary version, so a binary version 1.3 function\n   would return the value 13. Note that this will return a value of 10 for\n   legacy cubins that do not have a properly-encoded binary architecture\n   version.\n - ::CU_FUNC_CACHE_MODE_CA: The attribute to indicate whether the kernel has\n   been compiled with user specified option \"-Xptxas --dlcm=ca\" set.\n - ::CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: The maximum size in bytes of\n   dynamically-allocated shared memory.\n - ::CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: Preferred shared memory-L1\n   cache split ratio in percent of total shared memory.\n - ::CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET: If this attribute is set, the\n   kernel must launch with a valid cluster size specified.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH: The required cluster width in\n   blocks.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT: The required cluster height in\n   blocks.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH: The required cluster depth in\n   blocks.\n - ::CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED: Indicates whether\n   the function can be launched with non-portable cluster size. 1 is allowed,\n   0 is disallowed. A non-portable cluster size may only function on the\n   specific SKUs the program is tested on. The launch might fail if the\n   program is run on a different hardware platform. CUDA API provides\n   cudaOccupancyMaxActiveClusters to assist with checking whether the desired\n   size can be launched on the current device. A portable cluster size is\n   guaranteed to be functional on all compute capabilities higher than the\n   target compute capability. The portable cluster size for sm_90 is 8 blocks\n   per cluster. This value may increase for future compute capabilities. The\n   specific hardware unit may support higher cluster sizes that’s not\n   guaranteed to be portable.\n - ::CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE: The block\n   scheduling policy of a function. The value type is CUclusterSchedulingPolicy.\n\n \\note If another thread is trying to set the same attribute on the same device using\n ::cuKernelSetAttribute() simultaneously, the attribute query will give the old or new\n value depending on the interleavings chosen by the OS scheduler and memory consistency.\n\n \\param pi     - Returned attribute value\n \\param attrib - Attribute requested\n \\param kernel  - Kernel to query attribute of\n \\param dev - Device to query attribute of\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n\n \\sa ::cuLibraryLoadData,\n ::cuLibraryLoadFromFile,\n ::cuLibraryUnload,\n ::cuKernelSetAttribute,\n ::cuLibraryGetKernel,\n ::cuLaunchKernel,\n ::cuKernelGetFunction,\n ::cuLibraryGetModule,\n ::cuModuleGetFunction,\n ::cuFuncGetAttribute"]
7037    pub unsafe fn cuKernelGetAttribute(
7038        &self,
7039        pi: *mut ::std::os::raw::c_int,
7040        attrib: CUfunction_attribute,
7041        kernel: CUkernel,
7042        dev: CUdevice,
7043    ) -> CUresult {
7044        (self
7045            .cuKernelGetAttribute
7046            .as_ref()
7047            .expect("Expected function, got error."))(pi, attrib, kernel, dev)
7048    }
7049    #[doc = " \\brief Sets information about a kernel\n\n This call sets the value of a specified attribute \\p attrib on the kernel \\p kernel\n for the requested device \\p dev to an integer value specified by \\p val.\n This function returns CUDA_SUCCESS if the new value of the attribute could be\n successfully set. If the set fails, this call will return an error.\n Not all attributes can have values set. Attempting to set a value on a read-only\n attribute will result in an error (CUDA_ERROR_INVALID_VALUE)\n\n Note that attributes set using ::cuFuncSetAttribute() will override the attribute\n set by this API irrespective of whether the call to ::cuFuncSetAttribute() is made\n before or after this API call. However, ::cuKernelGetAttribute() will always\n return the attribute value set by this API.\n\n Supported attributes are:\n - ::CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: This is the maximum size in bytes of\n   dynamically-allocated shared memory. The value should contain the requested\n   maximum size of dynamically-allocated shared memory. The sum of this value and\n   the function attribute ::CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES cannot exceed the\n   device attribute ::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN.\n   The maximal size of requestable dynamic shared memory may differ by GPU\n   architecture.\n - ::CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: On devices where the L1\n   cache and shared memory use the same hardware resources, this sets the shared memory\n   carveout preference, in percent of the total shared memory.\n   See ::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR\n   This is only a hint, and the driver can choose a different ratio if required to execute the function.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH: The required cluster width in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT: The required cluster height in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH: The required cluster depth in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED.\n - ::CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE: The block\n   scheduling policy of a function. The value type is CUclusterSchedulingPolicy.\n\n \\note The API has stricter locking requirements in comparison to its legacy counterpart\n ::cuFuncSetAttribute() due to device-wide semantics. If multiple threads are trying to\n set the same attribute on the same device simultaneously, the attribute setting will depend\n on the interleavings chosen by the OS scheduler and memory consistency.\n\n \\param attrib - Attribute requested\n \\param val - Value to set\n \\param kernel  - Kernel to set attribute of\n \\param dev - Device to set attribute of\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa ::cuLibraryLoadData,\n ::cuLibraryLoadFromFile,\n ::cuLibraryUnload,\n ::cuKernelGetAttribute,\n ::cuLibraryGetKernel,\n ::cuLaunchKernel,\n ::cuKernelGetFunction,\n ::cuLibraryGetModule,\n ::cuModuleGetFunction,\n ::cuFuncSetAttribute"]
7050    pub unsafe fn cuKernelSetAttribute(
7051        &self,
7052        attrib: CUfunction_attribute,
7053        val: ::std::os::raw::c_int,
7054        kernel: CUkernel,
7055        dev: CUdevice,
7056    ) -> CUresult {
7057        (self
7058            .cuKernelSetAttribute
7059            .as_ref()
7060            .expect("Expected function, got error."))(attrib, val, kernel, dev)
7061    }
7062    #[doc = " \\brief Sets the preferred cache configuration for a device kernel.\n\n On devices where the L1 cache and shared memory use the same hardware\n resources, this sets through \\p config the preferred cache configuration for\n the device kernel \\p kernel on the requested device \\p dev. This is only a preference.\n The driver will use the requested configuration if possible, but it is free to choose a different\n configuration if required to execute \\p kernel.  Any context-wide preference\n set via ::cuCtxSetCacheConfig() will be overridden by this per-kernel\n setting.\n\n Note that attributes set using ::cuFuncSetCacheConfig() will override the attribute\n set by this API irrespective of whether the call to ::cuFuncSetCacheConfig() is made\n before or after this API call.\n\n This setting does nothing on devices where the size of the L1 cache and\n shared memory are fixed.\n\n Launching a kernel with a different preference than the most recent\n preference setting may insert a device-side synchronization point.\n\n\n The supported cache configurations are:\n - ::CU_FUNC_CACHE_PREFER_NONE: no preference for shared memory or L1 (default)\n - ::CU_FUNC_CACHE_PREFER_SHARED: prefer larger shared memory and smaller L1 cache\n - ::CU_FUNC_CACHE_PREFER_L1: prefer larger L1 cache and smaller shared memory\n - ::CU_FUNC_CACHE_PREFER_EQUAL: prefer equal sized L1 cache and shared memory\n\n \\note The API has stricter locking requirements in comparison to its legacy counterpart\n ::cuFuncSetCacheConfig() due to device-wide semantics. If multiple threads are trying to\n set a config on the same device simultaneously, the cache config setting will depend\n on the interleavings chosen by the OS scheduler and memory consistency.\n\n \\param kernel  - Kernel to configure cache for\n \\param config - Requested cache configuration\n \\param dev - Device to set attribute of\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa ::cuLibraryLoadData,\n ::cuLibraryLoadFromFile,\n ::cuLibraryUnload,\n ::cuLibraryGetKernel,\n ::cuKernelGetFunction,\n ::cuLibraryGetModule,\n ::cuModuleGetFunction,\n ::cuFuncSetCacheConfig,\n ::cuCtxSetCacheConfig,\n ::cuLaunchKernel"]
7063    pub unsafe fn cuKernelSetCacheConfig(
7064        &self,
7065        kernel: CUkernel,
7066        config: CUfunc_cache,
7067        dev: CUdevice,
7068    ) -> CUresult {
7069        (self
7070            .cuKernelSetCacheConfig
7071            .as_ref()
7072            .expect("Expected function, got error."))(kernel, config, dev)
7073    }
7074    pub unsafe fn cuMemGetInfo_v2(&self, free: *mut usize, total: *mut usize) -> CUresult {
7075        (self
7076            .cuMemGetInfo_v2
7077            .as_ref()
7078            .expect("Expected function, got error."))(free, total)
7079    }
7080    pub unsafe fn cuMemAlloc_v2(&self, dptr: *mut CUdeviceptr, bytesize: usize) -> CUresult {
7081        (self
7082            .cuMemAlloc_v2
7083            .as_ref()
7084            .expect("Expected function, got error."))(dptr, bytesize)
7085    }
7086    pub unsafe fn cuMemAllocPitch_v2(
7087        &self,
7088        dptr: *mut CUdeviceptr,
7089        pPitch: *mut usize,
7090        WidthInBytes: usize,
7091        Height: usize,
7092        ElementSizeBytes: ::std::os::raw::c_uint,
7093    ) -> CUresult {
7094        (self
7095            .cuMemAllocPitch_v2
7096            .as_ref()
7097            .expect("Expected function, got error."))(
7098            dptr,
7099            pPitch,
7100            WidthInBytes,
7101            Height,
7102            ElementSizeBytes,
7103        )
7104    }
7105    pub unsafe fn cuMemFree_v2(&self, dptr: CUdeviceptr) -> CUresult {
7106        (self
7107            .cuMemFree_v2
7108            .as_ref()
7109            .expect("Expected function, got error."))(dptr)
7110    }
7111    pub unsafe fn cuMemGetAddressRange_v2(
7112        &self,
7113        pbase: *mut CUdeviceptr,
7114        psize: *mut usize,
7115        dptr: CUdeviceptr,
7116    ) -> CUresult {
7117        (self
7118            .cuMemGetAddressRange_v2
7119            .as_ref()
7120            .expect("Expected function, got error."))(pbase, psize, dptr)
7121    }
7122    pub unsafe fn cuMemAllocHost_v2(
7123        &self,
7124        pp: *mut *mut ::std::os::raw::c_void,
7125        bytesize: usize,
7126    ) -> CUresult {
7127        (self
7128            .cuMemAllocHost_v2
7129            .as_ref()
7130            .expect("Expected function, got error."))(pp, bytesize)
7131    }
7132    #[doc = " \\brief Frees page-locked host memory\n\n Frees the memory space pointed to by \\p p, which must have been returned by\n a previous call to ::cuMemAllocHost().\n\n \\param p - Pointer to memory to free\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaFreeHost"]
7133    pub unsafe fn cuMemFreeHost(&self, p: *mut ::std::os::raw::c_void) -> CUresult {
7134        (self
7135            .cuMemFreeHost
7136            .as_ref()
7137            .expect("Expected function, got error."))(p)
7138    }
7139    #[doc = " \\brief Allocates page-locked host memory\n\n Allocates \\p bytesize bytes of host memory that is page-locked and accessible\n to the device. The driver tracks the virtual memory ranges allocated with\n this function and automatically accelerates calls to functions such as\n ::cuMemcpyHtoD(). Since the memory can be accessed directly by the device,\n it can be read or written with much higher bandwidth than pageable memory\n obtained with functions such as ::malloc(). Allocating excessive amounts of\n pinned memory may degrade system performance, since it reduces the amount\n of memory available to the system for paging. As a result, this function is\n best used sparingly to allocate staging areas for data exchange between\n host and device.\n\n The \\p Flags parameter enables different options to be specified that\n affect the allocation, as follows.\n\n - ::CU_MEMHOSTALLOC_PORTABLE: The memory returned by this call will be\n   considered as pinned memory by all CUDA contexts, not just the one that\n   performed the allocation.\n\n - ::CU_MEMHOSTALLOC_DEVICEMAP: Maps the allocation into the CUDA address\n   space. The device pointer to the memory may be obtained by calling\n   ::cuMemHostGetDevicePointer().\n\n - ::CU_MEMHOSTALLOC_WRITECOMBINED: Allocates the memory as write-combined\n   (WC). WC memory can be transferred across the PCI Express bus more\n   quickly on some system configurations, but cannot be read efficiently by\n   most CPUs. WC memory is a good option for buffers that will be written by\n   the CPU and read by the GPU via mapped pinned memory or host->device\n   transfers.\n\n All of these flags are orthogonal to one another: a developer may allocate\n memory that is portable, mapped and/or write-combined with no restrictions.\n\n The ::CU_MEMHOSTALLOC_DEVICEMAP flag may be specified on CUDA contexts for\n devices that do not support mapped pinned memory. The failure is deferred\n to ::cuMemHostGetDevicePointer() because the memory may be mapped into\n other CUDA contexts via the ::CU_MEMHOSTALLOC_PORTABLE flag.\n\n The memory allocated by this function must be freed with ::cuMemFreeHost().\n\n Note all host memory allocated using ::cuMemHostAlloc() will automatically\n be immediately accessible to all contexts on all devices which support unified\n addressing (as may be queried using ::CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING).\n Unless the flag ::CU_MEMHOSTALLOC_WRITECOMBINED is specified, the device pointer\n that may be used to access this host memory from those contexts is always equal\n to the returned host pointer \\p *pp.  If the flag ::CU_MEMHOSTALLOC_WRITECOMBINED\n is specified, then the function ::cuMemHostGetDevicePointer() must be used\n to query the device pointer, even if the context supports unified addressing.\n See \\ref CUDA_UNIFIED for additional details.\n\n \\param pp       - Returned host pointer to page-locked memory\n \\param bytesize - Requested allocation size in bytes\n \\param Flags    - Flags for allocation request\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\notefnerr\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaHostAlloc"]
7140    pub unsafe fn cuMemHostAlloc(
7141        &self,
7142        pp: *mut *mut ::std::os::raw::c_void,
7143        bytesize: usize,
7144        Flags: ::std::os::raw::c_uint,
7145    ) -> CUresult {
7146        (self
7147            .cuMemHostAlloc
7148            .as_ref()
7149            .expect("Expected function, got error."))(pp, bytesize, Flags)
7150    }
7151    pub unsafe fn cuMemHostGetDevicePointer_v2(
7152        &self,
7153        pdptr: *mut CUdeviceptr,
7154        p: *mut ::std::os::raw::c_void,
7155        Flags: ::std::os::raw::c_uint,
7156    ) -> CUresult {
7157        (self
7158            .cuMemHostGetDevicePointer_v2
7159            .as_ref()
7160            .expect("Expected function, got error."))(pdptr, p, Flags)
7161    }
7162    #[doc = " \\brief Passes back flags that were used for a pinned allocation\n\n Passes back the flags \\p pFlags that were specified when allocating\n the pinned host buffer \\p p allocated by ::cuMemHostAlloc.\n\n ::cuMemHostGetFlags() will fail if the pointer does not reside in\n an allocation performed by ::cuMemAllocHost() or ::cuMemHostAlloc().\n\n \\param pFlags - Returned flags word\n \\param p     - Host pointer\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa\n ::cuMemAllocHost,\n ::cuMemHostAlloc,\n ::cudaHostGetFlags"]
7163    pub unsafe fn cuMemHostGetFlags(
7164        &self,
7165        pFlags: *mut ::std::os::raw::c_uint,
7166        p: *mut ::std::os::raw::c_void,
7167    ) -> CUresult {
7168        (self
7169            .cuMemHostGetFlags
7170            .as_ref()
7171            .expect("Expected function, got error."))(pFlags, p)
7172    }
7173    #[doc = " \\brief Allocates memory that will be automatically managed by the Unified Memory system\n\n Allocates \\p bytesize bytes of managed memory on the device and returns in\n \\p *dptr a pointer to the allocated memory. If the device doesn't support\n allocating managed memory, ::CUDA_ERROR_NOT_SUPPORTED is returned. Support\n for managed memory can be queried using the device attribute\n ::CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY. The allocated memory is suitably\n aligned for any kind of variable. The memory is not cleared. If \\p bytesize\n is 0, ::cuMemAllocManaged returns ::CUDA_ERROR_INVALID_VALUE. The pointer\n is valid on the CPU and on all GPUs in the system that support managed memory.\n All accesses to this pointer must obey the Unified Memory programming model.\n\n \\p flags specifies the default stream association for this allocation.\n \\p flags must be one of ::CU_MEM_ATTACH_GLOBAL or ::CU_MEM_ATTACH_HOST. If\n ::CU_MEM_ATTACH_GLOBAL is specified, then this memory is accessible from\n any stream on any device. If ::CU_MEM_ATTACH_HOST is specified, then the\n allocation should not be accessed from devices that have a zero value for the\n device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS; an explicit call to\n ::cuStreamAttachMemAsync will be required to enable access on such devices.\n\n If the association is later changed via ::cuStreamAttachMemAsync to\n a single stream, the default association as specifed during ::cuMemAllocManaged\n is restored when that stream is destroyed. For __managed__ variables, the\n default association is always ::CU_MEM_ATTACH_GLOBAL. Note that destroying a\n stream is an asynchronous operation, and as a result, the change to default\n association won't happen until all work in the stream has completed.\n\n Memory allocated with ::cuMemAllocManaged should be released with ::cuMemFree.\n\n Device memory oversubscription is possible for GPUs that have a non-zero value for the\n device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. Managed memory on\n such GPUs may be evicted from device memory to host memory at any time by the Unified\n Memory driver in order to make room for other allocations.\n\n In a multi-GPU system where all GPUs have a non-zero value for the device attribute\n ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, managed memory may not be populated when this\n API returns and instead may be populated on access. In such systems, managed memory can\n migrate to any processor's memory at any time. The Unified Memory driver will employ heuristics to\n maintain data locality and prevent excessive page faults to the extent possible. The application\n can also guide the driver about memory usage patterns via ::cuMemAdvise. The application\n can also explicitly migrate memory to a desired processor's memory via\n ::cuMemPrefetchAsync.\n\n In a multi-GPU system where all of the GPUs have a zero value for the device attribute\n ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS and all the GPUs have peer-to-peer support\n with each other, the physical storage for managed memory is created on the GPU which is active\n at the time ::cuMemAllocManaged is called. All other GPUs will reference the data at reduced\n bandwidth via peer mappings over the PCIe bus. The Unified Memory driver does not migrate\n memory among such GPUs.\n\n In a multi-GPU system where not all GPUs have peer-to-peer support with each other and\n where the value of the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS\n is zero for at least one of those GPUs, the location chosen for physical storage of managed\n memory is system-dependent.\n - On Linux, the location chosen will be device memory as long as the current set of active\n contexts are on devices that either have peer-to-peer support with each other or have a\n non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS.\n If there is an active context on a GPU that does not have a non-zero value for that device\n attribute and it does not have peer-to-peer support with the other devices that have active\n contexts on them, then the location for physical storage will be 'zero-copy' or host memory.\n Note that this means that managed memory that is located in device memory is migrated to\n host memory if a new context is created on a GPU that doesn't have a non-zero value for\n the device attribute and does not support peer-to-peer with at least one of the other devices\n that has an active context. This in turn implies that context creation may fail if there is\n insufficient host memory to migrate all managed allocations.\n - On Windows, the physical storage is always created in 'zero-copy' or host memory.\n All GPUs will reference the data at reduced bandwidth over the PCIe bus. In these\n circumstances, use of the environment variable CUDA_VISIBLE_DEVICES is recommended to\n restrict CUDA to only use those GPUs that have peer-to-peer support.\n Alternatively, users can also set CUDA_MANAGED_FORCE_DEVICE_ALLOC to a\n non-zero value to force the driver to always use device memory for physical storage.\n When this environment variable is set to a non-zero value, all contexts created in\n that process on devices that support managed memory have to be peer-to-peer compatible\n with each other. Context creation will fail if a context is created on a device that\n supports managed memory and is not peer-to-peer compatible with any of the other\n managed memory supporting devices on which contexts were previously created, even if\n those contexts have been destroyed. These environment variables are described\n in the CUDA programming guide under the \"CUDA environment variables\" section.\n - On ARM, managed memory is not available on discrete gpu with Drive PX-2.\n\n \\param dptr     - Returned device pointer\n \\param bytesize - Requested allocation size in bytes\n \\param flags    - Must be one of ::CU_MEM_ATTACH_GLOBAL or ::CU_MEM_ATTACH_HOST\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\notefnerr\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cuDeviceGetAttribute, ::cuStreamAttachMemAsync,\n ::cudaMallocManaged"]
7174    pub unsafe fn cuMemAllocManaged(
7175        &self,
7176        dptr: *mut CUdeviceptr,
7177        bytesize: usize,
7178        flags: ::std::os::raw::c_uint,
7179    ) -> CUresult {
7180        (self
7181            .cuMemAllocManaged
7182            .as_ref()
7183            .expect("Expected function, got error."))(dptr, bytesize, flags)
7184    }
7185    #[doc = " \\brief Returns a handle to a compute device\n\n Returns in \\p *device a device handle given a PCI bus ID string.\n\n \\param dev      - Returned device handle\n\n \\param pciBusId - String in one of the following forms:\n [domain]:[bus]:[device].[function]\n [domain]:[bus]:[device]\n [bus]:[device].[function]\n where \\p domain, \\p bus, \\p device, and \\p function are all hexadecimal values\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuDeviceGet,\n ::cuDeviceGetAttribute,\n ::cuDeviceGetPCIBusId,\n ::cudaDeviceGetByPCIBusId"]
7186    pub unsafe fn cuDeviceGetByPCIBusId(
7187        &self,
7188        dev: *mut CUdevice,
7189        pciBusId: *const ::std::os::raw::c_char,
7190    ) -> CUresult {
7191        (self
7192            .cuDeviceGetByPCIBusId
7193            .as_ref()
7194            .expect("Expected function, got error."))(dev, pciBusId)
7195    }
7196    #[doc = " \\brief Returns a PCI Bus Id string for the device\n\n Returns an ASCII string identifying the device \\p dev in the NULL-terminated\n string pointed to by \\p pciBusId. \\p len specifies the maximum length of the\n string that may be returned.\n\n \\param pciBusId - Returned identifier string for the device in the following format\n [domain]:[bus]:[device].[function]\n where \\p domain, \\p bus, \\p device, and \\p function are all hexadecimal values.\n pciBusId should be large enough to store 13 characters including the NULL-terminator.\n\n \\param len      - Maximum length of string to store in \\p name\n\n \\param dev      - Device to get identifier string for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuDeviceGet,\n ::cuDeviceGetAttribute,\n ::cuDeviceGetByPCIBusId,\n ::cudaDeviceGetPCIBusId"]
7197    pub unsafe fn cuDeviceGetPCIBusId(
7198        &self,
7199        pciBusId: *mut ::std::os::raw::c_char,
7200        len: ::std::os::raw::c_int,
7201        dev: CUdevice,
7202    ) -> CUresult {
7203        (self
7204            .cuDeviceGetPCIBusId
7205            .as_ref()
7206            .expect("Expected function, got error."))(pciBusId, len, dev)
7207    }
7208    #[doc = " \\brief Gets an interprocess handle for a previously allocated event\n\n Takes as input a previously allocated event. This event must have been\n created with the ::CU_EVENT_INTERPROCESS and ::CU_EVENT_DISABLE_TIMING\n flags set. This opaque handle may be copied into other processes and\n opened with ::cuIpcOpenEventHandle to allow efficient hardware\n synchronization between GPU work in different processes.\n\n After the event has been opened in the importing process,\n ::cuEventRecord, ::cuEventSynchronize, ::cuStreamWaitEvent and\n ::cuEventQuery may be used in either process. Performing operations\n on the imported event after the exported event has been freed\n with ::cuEventDestroy will result in undefined behavior.\n\n IPC functionality is restricted to devices with support for unified\n addressing on Linux and Windows operating systems.\n IPC functionality on Windows is restricted to GPUs in TCC mode\n Users can test their device for IPC functionality by calling\n ::cuapiDeviceGetAttribute with ::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED\n\n \\param pHandle - Pointer to a user allocated CUipcEventHandle\n                    in which to return the opaque event handle\n \\param event   - Event allocated with ::CU_EVENT_INTERPROCESS and\n                    ::CU_EVENT_DISABLE_TIMING flags.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_MAP_FAILED,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuEventCreate,\n ::cuEventDestroy,\n ::cuEventSynchronize,\n ::cuEventQuery,\n ::cuStreamWaitEvent,\n ::cuIpcOpenEventHandle,\n ::cuIpcGetMemHandle,\n ::cuIpcOpenMemHandle,\n ::cuIpcCloseMemHandle,\n ::cudaIpcGetEventHandle"]
7209    pub unsafe fn cuIpcGetEventHandle(
7210        &self,
7211        pHandle: *mut CUipcEventHandle,
7212        event: CUevent,
7213    ) -> CUresult {
7214        (self
7215            .cuIpcGetEventHandle
7216            .as_ref()
7217            .expect("Expected function, got error."))(pHandle, event)
7218    }
7219    #[doc = " \\brief Opens an interprocess event handle for use in the current process\n\n Opens an interprocess event handle exported from another process with\n ::cuIpcGetEventHandle. This function returns a ::CUevent that behaves like\n a locally created event with the ::CU_EVENT_DISABLE_TIMING flag specified.\n This event must be freed with ::cuEventDestroy.\n\n Performing operations on the imported event after the exported event has\n been freed with ::cuEventDestroy will result in undefined behavior.\n\n IPC functionality is restricted to devices with support for unified\n addressing on Linux and Windows operating systems.\n IPC functionality on Windows is restricted to GPUs in TCC mode\n Users can test their device for IPC functionality by calling\n ::cuapiDeviceGetAttribute with ::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED\n\n \\param phEvent - Returns the imported event\n \\param handle  - Interprocess handle to open\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_MAP_FAILED,\n ::CUDA_ERROR_PEER_ACCESS_UNSUPPORTED,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuEventCreate,\n ::cuEventDestroy,\n ::cuEventSynchronize,\n ::cuEventQuery,\n ::cuStreamWaitEvent,\n ::cuIpcGetEventHandle,\n ::cuIpcGetMemHandle,\n ::cuIpcOpenMemHandle,\n ::cuIpcCloseMemHandle,\n ::cudaIpcOpenEventHandle"]
7220    pub unsafe fn cuIpcOpenEventHandle(
7221        &self,
7222        phEvent: *mut CUevent,
7223        handle: CUipcEventHandle,
7224    ) -> CUresult {
7225        (self
7226            .cuIpcOpenEventHandle
7227            .as_ref()
7228            .expect("Expected function, got error."))(phEvent, handle)
7229    }
7230    #[doc = " \\brief Gets an interprocess memory handle for an existing device memory\n allocation\n\n Takes a pointer to the base of an existing device memory allocation created\n with ::cuMemAlloc and exports it for use in another process. This is a\n lightweight operation and may be called multiple times on an allocation\n without adverse effects.\n\n If a region of memory is freed with ::cuMemFree and a subsequent call\n to ::cuMemAlloc returns memory with the same device address,\n ::cuIpcGetMemHandle will return a unique handle for the\n new memory.\n\n IPC functionality is restricted to devices with support for unified\n addressing on Linux and Windows operating systems.\n IPC functionality on Windows is restricted to GPUs in TCC mode\n Users can test their device for IPC functionality by calling\n ::cuapiDeviceGetAttribute with ::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED\n\n \\param pHandle - Pointer to user allocated ::CUipcMemHandle to return\n                    the handle in.\n \\param dptr    - Base pointer to previously allocated device memory\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_MAP_FAILED,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuMemAlloc,\n ::cuMemFree,\n ::cuIpcGetEventHandle,\n ::cuIpcOpenEventHandle,\n ::cuIpcOpenMemHandle,\n ::cuIpcCloseMemHandle,\n ::cudaIpcGetMemHandle"]
7231    pub unsafe fn cuIpcGetMemHandle(
7232        &self,
7233        pHandle: *mut CUipcMemHandle,
7234        dptr: CUdeviceptr,
7235    ) -> CUresult {
7236        (self
7237            .cuIpcGetMemHandle
7238            .as_ref()
7239            .expect("Expected function, got error."))(pHandle, dptr)
7240    }
7241    pub unsafe fn cuIpcOpenMemHandle_v2(
7242        &self,
7243        pdptr: *mut CUdeviceptr,
7244        handle: CUipcMemHandle,
7245        Flags: ::std::os::raw::c_uint,
7246    ) -> CUresult {
7247        (self
7248            .cuIpcOpenMemHandle_v2
7249            .as_ref()
7250            .expect("Expected function, got error."))(pdptr, handle, Flags)
7251    }
7252    #[doc = " \\brief Attempts to close memory mapped with ::cuIpcOpenMemHandle\n\n Decrements the reference count of the memory returned by ::cuIpcOpenMemHandle by 1.\n When the reference count reaches 0, this API unmaps the memory. The original allocation\n in the exporting process as well as imported mappings in other processes\n will be unaffected.\n\n Any resources used to enable peer access will be freed if this is the\n last mapping using them.\n\n IPC functionality is restricted to devices with support for unified\n addressing on Linux and Windows operating systems.\n IPC functionality on Windows is restricted to GPUs in TCC mode\n Users can test their device for IPC functionality by calling\n ::cuapiDeviceGetAttribute with ::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED\n\n \\param dptr - Device pointer returned by ::cuIpcOpenMemHandle\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_MAP_FAILED,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n \\sa\n ::cuMemAlloc,\n ::cuMemFree,\n ::cuIpcGetEventHandle,\n ::cuIpcOpenEventHandle,\n ::cuIpcGetMemHandle,\n ::cuIpcOpenMemHandle,\n ::cudaIpcCloseMemHandle"]
7253    pub unsafe fn cuIpcCloseMemHandle(&self, dptr: CUdeviceptr) -> CUresult {
7254        (self
7255            .cuIpcCloseMemHandle
7256            .as_ref()
7257            .expect("Expected function, got error."))(dptr)
7258    }
7259    pub unsafe fn cuMemHostRegister_v2(
7260        &self,
7261        p: *mut ::std::os::raw::c_void,
7262        bytesize: usize,
7263        Flags: ::std::os::raw::c_uint,
7264    ) -> CUresult {
7265        (self
7266            .cuMemHostRegister_v2
7267            .as_ref()
7268            .expect("Expected function, got error."))(p, bytesize, Flags)
7269    }
7270    #[doc = " \\brief Unregisters a memory range that was registered with cuMemHostRegister.\n\n Unmaps the memory range whose base address is specified by \\p p, and makes\n it pageable again.\n\n The base address must be the same one specified to ::cuMemHostRegister().\n\n \\param p - Host pointer to memory to unregister\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED,\n \\notefnerr\n\n \\sa\n ::cuMemHostRegister,\n ::cudaHostUnregister"]
7271    pub unsafe fn cuMemHostUnregister(&self, p: *mut ::std::os::raw::c_void) -> CUresult {
7272        (self
7273            .cuMemHostUnregister
7274            .as_ref()
7275            .expect("Expected function, got error."))(p)
7276    }
7277    #[doc = " \\brief Copies memory\n\n Copies data between two pointers.\n \\p dst and \\p src are base pointers of the destination and source, respectively.\n \\p ByteCount specifies the number of bytes to copy.\n Note that this function infers the type of the transfer (host to host, host to\n   device, device to device, or device to host) from the pointer values.  This\n   function is only allowed in contexts which support unified addressing.\n\n \\param dst - Destination unified virtual address space pointer\n \\param src - Source unified virtual address space pointer\n \\param ByteCount - Size of memory copy in bytes\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n \\note_sync\n \\note_memcpy\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaMemcpy,\n ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol"]
7278    pub unsafe fn cuMemcpy(
7279        &self,
7280        dst: CUdeviceptr,
7281        src: CUdeviceptr,
7282        ByteCount: usize,
7283    ) -> CUresult {
7284        (self
7285            .cuMemcpy
7286            .as_ref()
7287            .expect("Expected function, got error."))(dst, src, ByteCount)
7288    }
7289    #[doc = " \\brief Copies device memory between two contexts\n\n Copies from device memory in one context to device memory in another\n context. \\p dstDevice is the base device pointer of the destination memory\n and \\p dstContext is the destination context.  \\p srcDevice is the base\n device pointer of the source memory and \\p srcContext is the source pointer.\n \\p ByteCount specifies the number of bytes to copy.\n\n \\param dstDevice  - Destination device pointer\n \\param dstContext - Destination context\n \\param srcDevice  - Source device pointer\n \\param srcContext - Source context\n \\param ByteCount  - Size of memory copy in bytes\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n \\note_sync\n\n \\sa ::cuMemcpyDtoD, ::cuMemcpy3DPeer, ::cuMemcpyDtoDAsync, ::cuMemcpyPeerAsync,\n ::cuMemcpy3DPeerAsync,\n ::cudaMemcpyPeer"]
7290    pub unsafe fn cuMemcpyPeer(
7291        &self,
7292        dstDevice: CUdeviceptr,
7293        dstContext: CUcontext,
7294        srcDevice: CUdeviceptr,
7295        srcContext: CUcontext,
7296        ByteCount: usize,
7297    ) -> CUresult {
7298        (self
7299            .cuMemcpyPeer
7300            .as_ref()
7301            .expect("Expected function, got error."))(
7302            dstDevice, dstContext, srcDevice, srcContext, ByteCount,
7303        )
7304    }
7305    pub unsafe fn cuMemcpyHtoD_v2(
7306        &self,
7307        dstDevice: CUdeviceptr,
7308        srcHost: *const ::std::os::raw::c_void,
7309        ByteCount: usize,
7310    ) -> CUresult {
7311        (self
7312            .cuMemcpyHtoD_v2
7313            .as_ref()
7314            .expect("Expected function, got error."))(dstDevice, srcHost, ByteCount)
7315    }
7316    pub unsafe fn cuMemcpyDtoH_v2(
7317        &self,
7318        dstHost: *mut ::std::os::raw::c_void,
7319        srcDevice: CUdeviceptr,
7320        ByteCount: usize,
7321    ) -> CUresult {
7322        (self
7323            .cuMemcpyDtoH_v2
7324            .as_ref()
7325            .expect("Expected function, got error."))(dstHost, srcDevice, ByteCount)
7326    }
7327    pub unsafe fn cuMemcpyDtoD_v2(
7328        &self,
7329        dstDevice: CUdeviceptr,
7330        srcDevice: CUdeviceptr,
7331        ByteCount: usize,
7332    ) -> CUresult {
7333        (self
7334            .cuMemcpyDtoD_v2
7335            .as_ref()
7336            .expect("Expected function, got error."))(dstDevice, srcDevice, ByteCount)
7337    }
7338    pub unsafe fn cuMemcpyDtoA_v2(
7339        &self,
7340        dstArray: CUarray,
7341        dstOffset: usize,
7342        srcDevice: CUdeviceptr,
7343        ByteCount: usize,
7344    ) -> CUresult {
7345        (self
7346            .cuMemcpyDtoA_v2
7347            .as_ref()
7348            .expect("Expected function, got error."))(
7349            dstArray, dstOffset, srcDevice, ByteCount
7350        )
7351    }
7352    pub unsafe fn cuMemcpyAtoD_v2(
7353        &self,
7354        dstDevice: CUdeviceptr,
7355        srcArray: CUarray,
7356        srcOffset: usize,
7357        ByteCount: usize,
7358    ) -> CUresult {
7359        (self
7360            .cuMemcpyAtoD_v2
7361            .as_ref()
7362            .expect("Expected function, got error."))(
7363            dstDevice, srcArray, srcOffset, ByteCount
7364        )
7365    }
7366    pub unsafe fn cuMemcpyHtoA_v2(
7367        &self,
7368        dstArray: CUarray,
7369        dstOffset: usize,
7370        srcHost: *const ::std::os::raw::c_void,
7371        ByteCount: usize,
7372    ) -> CUresult {
7373        (self
7374            .cuMemcpyHtoA_v2
7375            .as_ref()
7376            .expect("Expected function, got error."))(
7377            dstArray, dstOffset, srcHost, ByteCount
7378        )
7379    }
7380    pub unsafe fn cuMemcpyAtoH_v2(
7381        &self,
7382        dstHost: *mut ::std::os::raw::c_void,
7383        srcArray: CUarray,
7384        srcOffset: usize,
7385        ByteCount: usize,
7386    ) -> CUresult {
7387        (self
7388            .cuMemcpyAtoH_v2
7389            .as_ref()
7390            .expect("Expected function, got error."))(
7391            dstHost, srcArray, srcOffset, ByteCount
7392        )
7393    }
7394    pub unsafe fn cuMemcpyAtoA_v2(
7395        &self,
7396        dstArray: CUarray,
7397        dstOffset: usize,
7398        srcArray: CUarray,
7399        srcOffset: usize,
7400        ByteCount: usize,
7401    ) -> CUresult {
7402        (self
7403            .cuMemcpyAtoA_v2
7404            .as_ref()
7405            .expect("Expected function, got error."))(
7406            dstArray, dstOffset, srcArray, srcOffset, ByteCount,
7407        )
7408    }
7409    pub unsafe fn cuMemcpy2D_v2(&self, pCopy: *const CUDA_MEMCPY2D) -> CUresult {
7410        (self
7411            .cuMemcpy2D_v2
7412            .as_ref()
7413            .expect("Expected function, got error."))(pCopy)
7414    }
7415    pub unsafe fn cuMemcpy2DUnaligned_v2(&self, pCopy: *const CUDA_MEMCPY2D) -> CUresult {
7416        (self
7417            .cuMemcpy2DUnaligned_v2
7418            .as_ref()
7419            .expect("Expected function, got error."))(pCopy)
7420    }
7421    pub unsafe fn cuMemcpy3D_v2(&self, pCopy: *const CUDA_MEMCPY3D) -> CUresult {
7422        (self
7423            .cuMemcpy3D_v2
7424            .as_ref()
7425            .expect("Expected function, got error."))(pCopy)
7426    }
7427    #[doc = " \\brief Copies memory between contexts\n\n Perform a 3D memory copy according to the parameters specified in\n \\p pCopy.  See the definition of the ::CUDA_MEMCPY3D_PEER structure\n for documentation of its parameters.\n\n \\param pCopy - Parameters for the memory copy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n \\note_sync\n\n \\sa ::cuMemcpyDtoD, ::cuMemcpyPeer, ::cuMemcpyDtoDAsync, ::cuMemcpyPeerAsync,\n ::cuMemcpy3DPeerAsync,\n ::cudaMemcpy3DPeer"]
7428    pub unsafe fn cuMemcpy3DPeer(&self, pCopy: *const CUDA_MEMCPY3D_PEER) -> CUresult {
7429        (self
7430            .cuMemcpy3DPeer
7431            .as_ref()
7432            .expect("Expected function, got error."))(pCopy)
7433    }
7434    #[doc = " \\brief Copies memory asynchronously\n\n Copies data between two pointers.\n \\p dst and \\p src are base pointers of the destination and source, respectively.\n \\p ByteCount specifies the number of bytes to copy.\n Note that this function infers the type of the transfer (host to host, host to\n   device, device to device, or device to host) from the pointer values.  This\n   function is only allowed in contexts which support unified addressing.\n\n \\param dst       - Destination unified virtual address space pointer\n \\param src       - Source unified virtual address space pointer\n \\param ByteCount - Size of memory copy in bytes\n \\param hStream   - Stream identifier\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_memcpy\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async,\n ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async,\n ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemcpyAsync,\n ::cudaMemcpyToSymbolAsync,\n ::cudaMemcpyFromSymbolAsync"]
7435    pub unsafe fn cuMemcpyAsync(
7436        &self,
7437        dst: CUdeviceptr,
7438        src: CUdeviceptr,
7439        ByteCount: usize,
7440        hStream: CUstream,
7441    ) -> CUresult {
7442        (self
7443            .cuMemcpyAsync
7444            .as_ref()
7445            .expect("Expected function, got error."))(dst, src, ByteCount, hStream)
7446    }
7447    #[doc = " \\brief Copies device memory between two contexts asynchronously.\n\n Copies from device memory in one context to device memory in another\n context. \\p dstDevice is the base device pointer of the destination memory\n and \\p dstContext is the destination context.  \\p srcDevice is the base\n device pointer of the source memory and \\p srcContext is the source pointer.\n \\p ByteCount specifies the number of bytes to copy.\n\n \\param dstDevice  - Destination device pointer\n \\param dstContext - Destination context\n \\param srcDevice  - Source device pointer\n \\param srcContext - Source context\n \\param ByteCount  - Size of memory copy in bytes\n \\param hStream    - Stream identifier\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n \\note_async\n \\note_null_stream\n\n \\sa ::cuMemcpyDtoD, ::cuMemcpyPeer, ::cuMemcpy3DPeer, ::cuMemcpyDtoDAsync,\n ::cuMemcpy3DPeerAsync,\n ::cudaMemcpyPeerAsync"]
7448    pub unsafe fn cuMemcpyPeerAsync(
7449        &self,
7450        dstDevice: CUdeviceptr,
7451        dstContext: CUcontext,
7452        srcDevice: CUdeviceptr,
7453        srcContext: CUcontext,
7454        ByteCount: usize,
7455        hStream: CUstream,
7456    ) -> CUresult {
7457        (self
7458            .cuMemcpyPeerAsync
7459            .as_ref()
7460            .expect("Expected function, got error."))(
7461            dstDevice, dstContext, srcDevice, srcContext, ByteCount, hStream,
7462        )
7463    }
7464    pub unsafe fn cuMemcpyHtoDAsync_v2(
7465        &self,
7466        dstDevice: CUdeviceptr,
7467        srcHost: *const ::std::os::raw::c_void,
7468        ByteCount: usize,
7469        hStream: CUstream,
7470    ) -> CUresult {
7471        (self
7472            .cuMemcpyHtoDAsync_v2
7473            .as_ref()
7474            .expect("Expected function, got error."))(dstDevice, srcHost, ByteCount, hStream)
7475    }
7476    pub unsafe fn cuMemcpyDtoHAsync_v2(
7477        &self,
7478        dstHost: *mut ::std::os::raw::c_void,
7479        srcDevice: CUdeviceptr,
7480        ByteCount: usize,
7481        hStream: CUstream,
7482    ) -> CUresult {
7483        (self
7484            .cuMemcpyDtoHAsync_v2
7485            .as_ref()
7486            .expect("Expected function, got error."))(dstHost, srcDevice, ByteCount, hStream)
7487    }
7488    pub unsafe fn cuMemcpyDtoDAsync_v2(
7489        &self,
7490        dstDevice: CUdeviceptr,
7491        srcDevice: CUdeviceptr,
7492        ByteCount: usize,
7493        hStream: CUstream,
7494    ) -> CUresult {
7495        (self
7496            .cuMemcpyDtoDAsync_v2
7497            .as_ref()
7498            .expect("Expected function, got error."))(
7499            dstDevice, srcDevice, ByteCount, hStream
7500        )
7501    }
7502    pub unsafe fn cuMemcpyHtoAAsync_v2(
7503        &self,
7504        dstArray: CUarray,
7505        dstOffset: usize,
7506        srcHost: *const ::std::os::raw::c_void,
7507        ByteCount: usize,
7508        hStream: CUstream,
7509    ) -> CUresult {
7510        (self
7511            .cuMemcpyHtoAAsync_v2
7512            .as_ref()
7513            .expect("Expected function, got error."))(
7514            dstArray, dstOffset, srcHost, ByteCount, hStream,
7515        )
7516    }
7517    pub unsafe fn cuMemcpyAtoHAsync_v2(
7518        &self,
7519        dstHost: *mut ::std::os::raw::c_void,
7520        srcArray: CUarray,
7521        srcOffset: usize,
7522        ByteCount: usize,
7523        hStream: CUstream,
7524    ) -> CUresult {
7525        (self
7526            .cuMemcpyAtoHAsync_v2
7527            .as_ref()
7528            .expect("Expected function, got error."))(
7529            dstHost, srcArray, srcOffset, ByteCount, hStream,
7530        )
7531    }
7532    pub unsafe fn cuMemcpy2DAsync_v2(
7533        &self,
7534        pCopy: *const CUDA_MEMCPY2D,
7535        hStream: CUstream,
7536    ) -> CUresult {
7537        (self
7538            .cuMemcpy2DAsync_v2
7539            .as_ref()
7540            .expect("Expected function, got error."))(pCopy, hStream)
7541    }
7542    pub unsafe fn cuMemcpy3DAsync_v2(
7543        &self,
7544        pCopy: *const CUDA_MEMCPY3D,
7545        hStream: CUstream,
7546    ) -> CUresult {
7547        (self
7548            .cuMemcpy3DAsync_v2
7549            .as_ref()
7550            .expect("Expected function, got error."))(pCopy, hStream)
7551    }
7552    #[doc = " \\brief Copies memory between contexts asynchronously.\n\n Perform a 3D memory copy according to the parameters specified in\n \\p pCopy.  See the definition of the ::CUDA_MEMCPY3D_PEER structure\n for documentation of its parameters.\n\n \\param pCopy - Parameters for the memory copy\n \\param hStream - Stream identifier\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n \\note_async\n \\note_null_stream\n\n \\sa ::cuMemcpyDtoD, ::cuMemcpyPeer, ::cuMemcpyDtoDAsync, ::cuMemcpyPeerAsync,\n ::cuMemcpy3DPeerAsync,\n ::cudaMemcpy3DPeerAsync"]
7553    pub unsafe fn cuMemcpy3DPeerAsync(
7554        &self,
7555        pCopy: *const CUDA_MEMCPY3D_PEER,
7556        hStream: CUstream,
7557    ) -> CUresult {
7558        (self
7559            .cuMemcpy3DPeerAsync
7560            .as_ref()
7561            .expect("Expected function, got error."))(pCopy, hStream)
7562    }
7563    pub unsafe fn cuMemsetD8_v2(
7564        &self,
7565        dstDevice: CUdeviceptr,
7566        uc: ::std::os::raw::c_uchar,
7567        N: usize,
7568    ) -> CUresult {
7569        (self
7570            .cuMemsetD8_v2
7571            .as_ref()
7572            .expect("Expected function, got error."))(dstDevice, uc, N)
7573    }
7574    pub unsafe fn cuMemsetD16_v2(
7575        &self,
7576        dstDevice: CUdeviceptr,
7577        us: ::std::os::raw::c_ushort,
7578        N: usize,
7579    ) -> CUresult {
7580        (self
7581            .cuMemsetD16_v2
7582            .as_ref()
7583            .expect("Expected function, got error."))(dstDevice, us, N)
7584    }
7585    pub unsafe fn cuMemsetD32_v2(
7586        &self,
7587        dstDevice: CUdeviceptr,
7588        ui: ::std::os::raw::c_uint,
7589        N: usize,
7590    ) -> CUresult {
7591        (self
7592            .cuMemsetD32_v2
7593            .as_ref()
7594            .expect("Expected function, got error."))(dstDevice, ui, N)
7595    }
7596    pub unsafe fn cuMemsetD2D8_v2(
7597        &self,
7598        dstDevice: CUdeviceptr,
7599        dstPitch: usize,
7600        uc: ::std::os::raw::c_uchar,
7601        Width: usize,
7602        Height: usize,
7603    ) -> CUresult {
7604        (self
7605            .cuMemsetD2D8_v2
7606            .as_ref()
7607            .expect("Expected function, got error."))(dstDevice, dstPitch, uc, Width, Height)
7608    }
7609    pub unsafe fn cuMemsetD2D16_v2(
7610        &self,
7611        dstDevice: CUdeviceptr,
7612        dstPitch: usize,
7613        us: ::std::os::raw::c_ushort,
7614        Width: usize,
7615        Height: usize,
7616    ) -> CUresult {
7617        (self
7618            .cuMemsetD2D16_v2
7619            .as_ref()
7620            .expect("Expected function, got error."))(dstDevice, dstPitch, us, Width, Height)
7621    }
7622    pub unsafe fn cuMemsetD2D32_v2(
7623        &self,
7624        dstDevice: CUdeviceptr,
7625        dstPitch: usize,
7626        ui: ::std::os::raw::c_uint,
7627        Width: usize,
7628        Height: usize,
7629    ) -> CUresult {
7630        (self
7631            .cuMemsetD2D32_v2
7632            .as_ref()
7633            .expect("Expected function, got error."))(dstDevice, dstPitch, ui, Width, Height)
7634    }
7635    #[doc = " \\brief Sets device memory\n\n Sets the memory range of \\p N 8-bit values to the specified value\n \\p uc.\n\n \\param dstDevice - Destination device pointer\n \\param uc        - Value to set\n \\param N         - Number of elements\n \\param hStream   - Stream identifier\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n \\note_memset\n \\note_null_stream\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async,\n ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async,\n ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD16Async,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemsetAsync"]
7636    pub unsafe fn cuMemsetD8Async(
7637        &self,
7638        dstDevice: CUdeviceptr,
7639        uc: ::std::os::raw::c_uchar,
7640        N: usize,
7641        hStream: CUstream,
7642    ) -> CUresult {
7643        (self
7644            .cuMemsetD8Async
7645            .as_ref()
7646            .expect("Expected function, got error."))(dstDevice, uc, N, hStream)
7647    }
7648    #[doc = " \\brief Sets device memory\n\n Sets the memory range of \\p N 16-bit values to the specified value\n \\p us. The \\p dstDevice pointer must be two byte aligned.\n\n \\param dstDevice - Destination device pointer\n \\param us        - Value to set\n \\param N         - Number of elements\n \\param hStream   - Stream identifier\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n \\note_memset\n \\note_null_stream\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async,\n ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async,\n ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemsetAsync"]
7649    pub unsafe fn cuMemsetD16Async(
7650        &self,
7651        dstDevice: CUdeviceptr,
7652        us: ::std::os::raw::c_ushort,
7653        N: usize,
7654        hStream: CUstream,
7655    ) -> CUresult {
7656        (self
7657            .cuMemsetD16Async
7658            .as_ref()
7659            .expect("Expected function, got error."))(dstDevice, us, N, hStream)
7660    }
7661    #[doc = " \\brief Sets device memory\n\n Sets the memory range of \\p N 32-bit values to the specified value\n \\p ui. The \\p dstDevice pointer must be four byte aligned.\n\n \\param dstDevice - Destination device pointer\n \\param ui        - Value to set\n \\param N         - Number of elements\n \\param hStream   - Stream identifier\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n \\note_memset\n \\note_null_stream\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async,\n ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async,\n ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async, ::cuMemsetD32,\n ::cudaMemsetAsync"]
7662    pub unsafe fn cuMemsetD32Async(
7663        &self,
7664        dstDevice: CUdeviceptr,
7665        ui: ::std::os::raw::c_uint,
7666        N: usize,
7667        hStream: CUstream,
7668    ) -> CUresult {
7669        (self
7670            .cuMemsetD32Async
7671            .as_ref()
7672            .expect("Expected function, got error."))(dstDevice, ui, N, hStream)
7673    }
7674    #[doc = " \\brief Sets device memory\n\n Sets the 2D memory range of \\p Width 8-bit values to the specified value\n \\p uc. \\p Height specifies the number of rows to set, and \\p dstPitch\n specifies the number of bytes between each row. This function performs\n fastest when the pitch is one that has been passed back by\n ::cuMemAllocPitch().\n\n \\param dstDevice - Destination device pointer\n \\param dstPitch  - Pitch of destination device pointer(Unused if \\p Height is 1)\n \\param uc        - Value to set\n \\param Width     - Width of row\n \\param Height    - Number of rows\n \\param hStream   - Stream identifier\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n \\note_memset\n \\note_null_stream\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8,\n ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async,\n ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemset2DAsync"]
7675    pub unsafe fn cuMemsetD2D8Async(
7676        &self,
7677        dstDevice: CUdeviceptr,
7678        dstPitch: usize,
7679        uc: ::std::os::raw::c_uchar,
7680        Width: usize,
7681        Height: usize,
7682        hStream: CUstream,
7683    ) -> CUresult {
7684        (self
7685            .cuMemsetD2D8Async
7686            .as_ref()
7687            .expect("Expected function, got error."))(
7688            dstDevice, dstPitch, uc, Width, Height, hStream,
7689        )
7690    }
7691    #[doc = " \\brief Sets device memory\n\n Sets the 2D memory range of \\p Width 16-bit values to the specified value\n \\p us. \\p Height specifies the number of rows to set, and \\p dstPitch\n specifies the number of bytes between each row. The \\p dstDevice pointer\n and \\p dstPitch offset must be two byte aligned. This function performs\n fastest when the pitch is one that has been passed back by\n ::cuMemAllocPitch().\n\n \\param dstDevice - Destination device pointer\n \\param dstPitch  - Pitch of destination device pointer(Unused if \\p Height is 1)\n \\param us        - Value to set\n \\param Width     - Width of row\n \\param Height    - Number of rows\n \\param hStream   - Stream identifier\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n \\note_memset\n \\note_null_stream\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async,\n ::cuMemsetD2D16, ::cuMemsetD2D32, ::cuMemsetD2D32Async,\n ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemset2DAsync"]
7692    pub unsafe fn cuMemsetD2D16Async(
7693        &self,
7694        dstDevice: CUdeviceptr,
7695        dstPitch: usize,
7696        us: ::std::os::raw::c_ushort,
7697        Width: usize,
7698        Height: usize,
7699        hStream: CUstream,
7700    ) -> CUresult {
7701        (self
7702            .cuMemsetD2D16Async
7703            .as_ref()
7704            .expect("Expected function, got error."))(
7705            dstDevice, dstPitch, us, Width, Height, hStream,
7706        )
7707    }
7708    #[doc = " \\brief Sets device memory\n\n Sets the 2D memory range of \\p Width 32-bit values to the specified value\n \\p ui. \\p Height specifies the number of rows to set, and \\p dstPitch\n specifies the number of bytes between each row. The \\p dstDevice pointer\n and \\p dstPitch offset must be four byte aligned. This function performs\n fastest when the pitch is one that has been passed back by\n ::cuMemAllocPitch().\n\n \\param dstDevice - Destination device pointer\n \\param dstPitch  - Pitch of destination device pointer(Unused if \\p Height is 1)\n \\param ui        - Value to set\n \\param Width     - Width of row\n \\param Height    - Number of rows\n \\param hStream   - Stream identifier\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n \\note_memset\n \\note_null_stream\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D8Async,\n ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32,\n ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemset2DAsync"]
7709    pub unsafe fn cuMemsetD2D32Async(
7710        &self,
7711        dstDevice: CUdeviceptr,
7712        dstPitch: usize,
7713        ui: ::std::os::raw::c_uint,
7714        Width: usize,
7715        Height: usize,
7716        hStream: CUstream,
7717    ) -> CUresult {
7718        (self
7719            .cuMemsetD2D32Async
7720            .as_ref()
7721            .expect("Expected function, got error."))(
7722            dstDevice, dstPitch, ui, Width, Height, hStream,
7723        )
7724    }
7725    pub unsafe fn cuArrayCreate_v2(
7726        &self,
7727        pHandle: *mut CUarray,
7728        pAllocateArray: *const CUDA_ARRAY_DESCRIPTOR,
7729    ) -> CUresult {
7730        (self
7731            .cuArrayCreate_v2
7732            .as_ref()
7733            .expect("Expected function, got error."))(pHandle, pAllocateArray)
7734    }
7735    pub unsafe fn cuArrayGetDescriptor_v2(
7736        &self,
7737        pArrayDescriptor: *mut CUDA_ARRAY_DESCRIPTOR,
7738        hArray: CUarray,
7739    ) -> CUresult {
7740        (self
7741            .cuArrayGetDescriptor_v2
7742            .as_ref()
7743            .expect("Expected function, got error."))(pArrayDescriptor, hArray)
7744    }
7745    #[doc = " \\brief Returns the layout properties of a sparse CUDA array\n\n Returns the layout properties of a sparse CUDA array in \\p sparseProperties\n If the CUDA array is not allocated with flag ::CUDA_ARRAY3D_SPARSE\n ::CUDA_ERROR_INVALID_VALUE will be returned.\n\n If the returned value in ::CUDA_ARRAY_SPARSE_PROPERTIES::flags contains ::CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL,\n then ::CUDA_ARRAY_SPARSE_PROPERTIES::miptailSize represents the total size of the array. Otherwise, it will be zero.\n Also, the returned value in ::CUDA_ARRAY_SPARSE_PROPERTIES::miptailFirstLevel is always zero.\n Note that the \\p array must have been allocated using ::cuArrayCreate or ::cuArray3DCreate. For CUDA arrays obtained\n using ::cuMipmappedArrayGetLevel, ::CUDA_ERROR_INVALID_VALUE will be returned. Instead, ::cuMipmappedArrayGetSparseProperties\n must be used to obtain the sparse properties of the entire CUDA mipmapped array to which \\p array belongs to.\n\n \\return\n ::CUDA_SUCCESS\n ::CUDA_ERROR_INVALID_VALUE\n\n \\param[out] sparseProperties - Pointer to ::CUDA_ARRAY_SPARSE_PROPERTIES\n \\param[in] array - CUDA array to get the sparse properties of\n \\sa ::cuMipmappedArrayGetSparseProperties, ::cuMemMapArrayAsync"]
7746    pub unsafe fn cuArrayGetSparseProperties(
7747        &self,
7748        sparseProperties: *mut CUDA_ARRAY_SPARSE_PROPERTIES,
7749        array: CUarray,
7750    ) -> CUresult {
7751        (self
7752            .cuArrayGetSparseProperties
7753            .as_ref()
7754            .expect("Expected function, got error."))(sparseProperties, array)
7755    }
7756    #[doc = " \\brief Returns the layout properties of a sparse CUDA mipmapped array\n\n Returns the sparse array layout properties in \\p sparseProperties\n If the CUDA mipmapped array is not allocated with flag ::CUDA_ARRAY3D_SPARSE\n ::CUDA_ERROR_INVALID_VALUE will be returned.\n\n For non-layered CUDA mipmapped arrays, ::CUDA_ARRAY_SPARSE_PROPERTIES::miptailSize returns the\n size of the mip tail region. The mip tail region includes all mip levels whose width, height or depth\n is less than that of the tile.\n For layered CUDA mipmapped arrays, if ::CUDA_ARRAY_SPARSE_PROPERTIES::flags contains ::CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL,\n then ::CUDA_ARRAY_SPARSE_PROPERTIES::miptailSize specifies the size of the mip tail of all layers combined.\n Otherwise, ::CUDA_ARRAY_SPARSE_PROPERTIES::miptailSize specifies mip tail size per layer.\n The returned value of ::CUDA_ARRAY_SPARSE_PROPERTIES::miptailFirstLevel is valid only if ::CUDA_ARRAY_SPARSE_PROPERTIES::miptailSize is non-zero.\n\n \\return\n ::CUDA_SUCCESS\n ::CUDA_ERROR_INVALID_VALUE\n\n \\param[out] sparseProperties - Pointer to ::CUDA_ARRAY_SPARSE_PROPERTIES\n \\param[in] mipmap - CUDA mipmapped array to get the sparse properties of\n \\sa ::cuArrayGetSparseProperties, ::cuMemMapArrayAsync"]
7757    pub unsafe fn cuMipmappedArrayGetSparseProperties(
7758        &self,
7759        sparseProperties: *mut CUDA_ARRAY_SPARSE_PROPERTIES,
7760        mipmap: CUmipmappedArray,
7761    ) -> CUresult {
7762        (self
7763            .cuMipmappedArrayGetSparseProperties
7764            .as_ref()
7765            .expect("Expected function, got error."))(sparseProperties, mipmap)
7766    }
7767    #[doc = " \\brief Returns the memory requirements of a CUDA array\n\n Returns the memory requirements of a CUDA array in \\p memoryRequirements\n If the CUDA array is not allocated with flag ::CUDA_ARRAY3D_DEFERRED_MAPPING\n ::CUDA_ERROR_INVALID_VALUE will be returned.\n\n The returned value in ::CUDA_ARRAY_MEMORY_REQUIREMENTS::size\n represents the total size of the CUDA array.\n The returned value in ::CUDA_ARRAY_MEMORY_REQUIREMENTS::alignment\n represents the alignment necessary for mapping the CUDA array.\n\n \\return\n ::CUDA_SUCCESS\n ::CUDA_ERROR_INVALID_VALUE\n\n \\param[out] memoryRequirements - Pointer to ::CUDA_ARRAY_MEMORY_REQUIREMENTS\n \\param[in] array - CUDA array to get the memory requirements of\n \\param[in] device - Device to get the memory requirements for\n \\sa ::cuMipmappedArrayGetMemoryRequirements, ::cuMemMapArrayAsync"]
7768    pub unsafe fn cuArrayGetMemoryRequirements(
7769        &self,
7770        memoryRequirements: *mut CUDA_ARRAY_MEMORY_REQUIREMENTS,
7771        array: CUarray,
7772        device: CUdevice,
7773    ) -> CUresult {
7774        (self
7775            .cuArrayGetMemoryRequirements
7776            .as_ref()
7777            .expect("Expected function, got error."))(memoryRequirements, array, device)
7778    }
7779    #[doc = " \\brief Returns the memory requirements of a CUDA mipmapped array\n\n Returns the memory requirements of a CUDA mipmapped array in \\p memoryRequirements\n If the CUDA mipmapped array is not allocated with flag ::CUDA_ARRAY3D_DEFERRED_MAPPING\n ::CUDA_ERROR_INVALID_VALUE will be returned.\n\n The returned value in ::CUDA_ARRAY_MEMORY_REQUIREMENTS::size\n represents the total size of the CUDA mipmapped array.\n The returned value in ::CUDA_ARRAY_MEMORY_REQUIREMENTS::alignment\n represents the alignment necessary for mapping the CUDA mipmapped\n array.\n\n \\return\n ::CUDA_SUCCESS\n ::CUDA_ERROR_INVALID_VALUE\n\n \\param[out] memoryRequirements - Pointer to ::CUDA_ARRAY_MEMORY_REQUIREMENTS\n \\param[in] mipmap - CUDA mipmapped array to get the memory requirements of\n \\param[in] device - Device to get the memory requirements for\n \\sa ::cuArrayGetMemoryRequirements, ::cuMemMapArrayAsync"]
7780    pub unsafe fn cuMipmappedArrayGetMemoryRequirements(
7781        &self,
7782        memoryRequirements: *mut CUDA_ARRAY_MEMORY_REQUIREMENTS,
7783        mipmap: CUmipmappedArray,
7784        device: CUdevice,
7785    ) -> CUresult {
7786        (self
7787            .cuMipmappedArrayGetMemoryRequirements
7788            .as_ref()
7789            .expect("Expected function, got error."))(memoryRequirements, mipmap, device)
7790    }
7791    #[doc = " \\brief Gets a CUDA array plane from a CUDA array\n\n Returns in \\p pPlaneArray a CUDA array that represents a single format plane\n of the CUDA array \\p hArray.\n\n If \\p planeIdx is greater than the maximum number of planes in this array or if the array does\n not have a multi-planar format e.g: ::CU_AD_FORMAT_NV12, then ::CUDA_ERROR_INVALID_VALUE is returned.\n\n Note that if the \\p hArray has format ::CU_AD_FORMAT_NV12, then passing in 0 for \\p planeIdx returns\n a CUDA array of the same size as \\p hArray but with one channel and ::CU_AD_FORMAT_UNSIGNED_INT8 as its format.\n If 1 is passed for \\p planeIdx, then the returned CUDA array has half the height and width\n of \\p hArray with two channels and ::CU_AD_FORMAT_UNSIGNED_INT8 as its format.\n\n \\param pPlaneArray   - Returned CUDA array referenced by the \\p planeIdx\n \\param hArray        - Multiplanar CUDA array\n \\param planeIdx      - Plane index\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa\n ::cuArrayCreate,\n ::cudaArrayGetPlane"]
7792    pub unsafe fn cuArrayGetPlane(
7793        &self,
7794        pPlaneArray: *mut CUarray,
7795        hArray: CUarray,
7796        planeIdx: ::std::os::raw::c_uint,
7797    ) -> CUresult {
7798        (self
7799            .cuArrayGetPlane
7800            .as_ref()
7801            .expect("Expected function, got error."))(pPlaneArray, hArray, planeIdx)
7802    }
7803    #[doc = " \\brief Destroys a CUDA array\n\n Destroys the CUDA array \\p hArray.\n\n \\param hArray - Array to destroy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_ARRAY_IS_MAPPED,\n ::CUDA_ERROR_CONTEXT_IS_DESTROYED\n \\notefnerr\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaFreeArray"]
7804    pub unsafe fn cuArrayDestroy(&self, hArray: CUarray) -> CUresult {
7805        (self
7806            .cuArrayDestroy
7807            .as_ref()
7808            .expect("Expected function, got error."))(hArray)
7809    }
7810    pub unsafe fn cuArray3DCreate_v2(
7811        &self,
7812        pHandle: *mut CUarray,
7813        pAllocateArray: *const CUDA_ARRAY3D_DESCRIPTOR,
7814    ) -> CUresult {
7815        (self
7816            .cuArray3DCreate_v2
7817            .as_ref()
7818            .expect("Expected function, got error."))(pHandle, pAllocateArray)
7819    }
7820    pub unsafe fn cuArray3DGetDescriptor_v2(
7821        &self,
7822        pArrayDescriptor: *mut CUDA_ARRAY3D_DESCRIPTOR,
7823        hArray: CUarray,
7824    ) -> CUresult {
7825        (self
7826            .cuArray3DGetDescriptor_v2
7827            .as_ref()
7828            .expect("Expected function, got error."))(pArrayDescriptor, hArray)
7829    }
7830    #[doc = " \\brief Creates a CUDA mipmapped array\n\n Creates a CUDA mipmapped array according to the ::CUDA_ARRAY3D_DESCRIPTOR structure\n \\p pMipmappedArrayDesc and returns a handle to the new CUDA mipmapped array in \\p *pHandle.\n \\p numMipmapLevels specifies the number of mipmap levels to be allocated. This value is\n clamped to the range [1, 1 + floor(log2(max(width, height, depth)))].\n\n The ::CUDA_ARRAY3D_DESCRIPTOR is defined as:\n\n \\code\ntypedef struct {\nunsigned int Width;\nunsigned int Height;\nunsigned int Depth;\nCUarray_format Format;\nunsigned int NumChannels;\nunsigned int Flags;\n} CUDA_ARRAY3D_DESCRIPTOR;\n \\endcode\n where:\n\n - \\p Width, \\p Height, and \\p Depth are the width, height, and depth of the\n CUDA array (in elements); the following types of CUDA arrays can be allocated:\n     - A 1D mipmapped array is allocated if \\p Height and \\p Depth extents are both zero.\n     - A 2D mipmapped array is allocated if only \\p Depth extent is zero.\n     - A 3D mipmapped array is allocated if all three extents are non-zero.\n     - A 1D layered CUDA mipmapped array is allocated if only \\p Height is zero and the\n       ::CUDA_ARRAY3D_LAYERED flag is set. Each layer is a 1D array. The number\n       of layers is determined by the depth extent.\n     - A 2D layered CUDA mipmapped array is allocated if all three extents are non-zero and\n       the ::CUDA_ARRAY3D_LAYERED flag is set. Each layer is a 2D array. The number\n       of layers is determined by the depth extent.\n     - A cubemap CUDA mipmapped array is allocated if all three extents are non-zero and the\n       ::CUDA_ARRAY3D_CUBEMAP flag is set. \\p Width must be equal to \\p Height, and\n       \\p Depth must be six. A cubemap is a special type of 2D layered CUDA array,\n       where the six layers represent the six faces of a cube. The order of the six\n       layers in memory is the same as that listed in ::CUarray_cubemap_face.\n     - A cubemap layered CUDA mipmapped array is allocated if all three extents are non-zero,\n       and both, ::CUDA_ARRAY3D_CUBEMAP and ::CUDA_ARRAY3D_LAYERED flags are set.\n       \\p Width must be equal to \\p Height, and \\p Depth must be a multiple of six.\n       A cubemap layered CUDA array is a special type of 2D layered CUDA array that\n       consists of a collection of cubemaps. The first six layers represent the first\n       cubemap, the next six layers form the second cubemap, and so on.\n\n - ::Format specifies the format of the elements; ::CUarray_format is\n defined as:\n \\code\ntypedef enum CUarray_format_enum {\nCU_AD_FORMAT_UNSIGNED_INT8 = 0x01,\nCU_AD_FORMAT_UNSIGNED_INT16 = 0x02,\nCU_AD_FORMAT_UNSIGNED_INT32 = 0x03,\nCU_AD_FORMAT_SIGNED_INT8 = 0x08,\nCU_AD_FORMAT_SIGNED_INT16 = 0x09,\nCU_AD_FORMAT_SIGNED_INT32 = 0x0a,\nCU_AD_FORMAT_HALF = 0x10,\nCU_AD_FORMAT_FLOAT = 0x20\n} CUarray_format;\n  \\endcode\n\n - \\p NumChannels specifies the number of packed components per CUDA array\n element; it may be 1, 2, or 4;\n\n - ::Flags may be set to\n   - ::CUDA_ARRAY3D_LAYERED to enable creation of layered CUDA mipmapped arrays. If this flag is set,\n     \\p Depth specifies the number of layers, not the depth of a 3D array.\n   - ::CUDA_ARRAY3D_SURFACE_LDST to enable surface references to be bound to individual mipmap levels of\n     the CUDA mipmapped array. If this flag is not set, ::cuSurfRefSetArray will fail when attempting to\n     bind a mipmap level of the CUDA mipmapped array to a surface reference.\n   - ::CUDA_ARRAY3D_CUBEMAP to enable creation of mipmapped cubemaps. If this flag is set, \\p Width must be\n     equal to \\p Height, and \\p Depth must be six. If the ::CUDA_ARRAY3D_LAYERED flag is also set,\n     then \\p Depth must be a multiple of six.\n   - ::CUDA_ARRAY3D_TEXTURE_GATHER to indicate that the CUDA mipmapped array will be used for texture gather.\n     Texture gather can only be performed on 2D CUDA mipmapped arrays.\n\n \\p Width, \\p Height and \\p Depth must meet certain size requirements as listed in the following table.\n All values are specified in elements. Note that for brevity's sake, the full name of the device attribute\n is not specified. For ex., TEXTURE1D_MIPMAPPED_WIDTH refers to the device attribute\n ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH.\n\n <table>\n <tr><td><b>CUDA array type</b></td>\n <td><b>Valid extents that must always be met<br>{(width range in elements), (height range),\n (depth range)}</b></td>\n <td><b>Valid extents with CUDA_ARRAY3D_SURFACE_LDST set<br>\n {(width range in elements), (height range), (depth range)}</b></td></tr>\n <tr><td>1D</td>\n <td><small>{ (1,TEXTURE1D_MIPMAPPED_WIDTH), 0, 0 }</small></td>\n <td><small>{ (1,SURFACE1D_WIDTH), 0, 0 }</small></td></tr>\n <tr><td>2D</td>\n <td><small>{ (1,TEXTURE2D_MIPMAPPED_WIDTH), (1,TEXTURE2D_MIPMAPPED_HEIGHT), 0 }</small></td>\n <td><small>{ (1,SURFACE2D_WIDTH), (1,SURFACE2D_HEIGHT), 0 }</small></td></tr>\n <tr><td>3D</td>\n <td><small>{ (1,TEXTURE3D_WIDTH), (1,TEXTURE3D_HEIGHT), (1,TEXTURE3D_DEPTH) }\n <br>OR<br>{ (1,TEXTURE3D_WIDTH_ALTERNATE), (1,TEXTURE3D_HEIGHT_ALTERNATE),\n (1,TEXTURE3D_DEPTH_ALTERNATE) }</small></td>\n <td><small>{ (1,SURFACE3D_WIDTH), (1,SURFACE3D_HEIGHT),\n (1,SURFACE3D_DEPTH) }</small></td></tr>\n <tr><td>1D Layered</td>\n <td><small>{ (1,TEXTURE1D_LAYERED_WIDTH), 0,\n (1,TEXTURE1D_LAYERED_LAYERS) }</small></td>\n <td><small>{ (1,SURFACE1D_LAYERED_WIDTH), 0,\n (1,SURFACE1D_LAYERED_LAYERS) }</small></td></tr>\n <tr><td>2D Layered</td>\n <td><small>{ (1,TEXTURE2D_LAYERED_WIDTH), (1,TEXTURE2D_LAYERED_HEIGHT),\n (1,TEXTURE2D_LAYERED_LAYERS) }</small></td>\n <td><small>{ (1,SURFACE2D_LAYERED_WIDTH), (1,SURFACE2D_LAYERED_HEIGHT),\n (1,SURFACE2D_LAYERED_LAYERS) }</small></td></tr>\n <tr><td>Cubemap</td>\n <td><small>{ (1,TEXTURECUBEMAP_WIDTH), (1,TEXTURECUBEMAP_WIDTH), 6 }</small></td>\n <td><small>{ (1,SURFACECUBEMAP_WIDTH),\n (1,SURFACECUBEMAP_WIDTH), 6 }</small></td></tr>\n <tr><td>Cubemap Layered</td>\n <td><small>{ (1,TEXTURECUBEMAP_LAYERED_WIDTH), (1,TEXTURECUBEMAP_LAYERED_WIDTH),\n (1,TEXTURECUBEMAP_LAYERED_LAYERS) }</small></td>\n <td><small>{ (1,SURFACECUBEMAP_LAYERED_WIDTH), (1,SURFACECUBEMAP_LAYERED_WIDTH),\n (1,SURFACECUBEMAP_LAYERED_LAYERS) }</small></td></tr>\n </table>\n\n\n \\param pHandle             - Returned mipmapped array\n \\param pMipmappedArrayDesc - mipmapped array descriptor\n \\param numMipmapLevels     - Number of mipmap levels\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa\n ::cuMipmappedArrayDestroy,\n ::cuMipmappedArrayGetLevel,\n ::cuArrayCreate,\n ::cudaMallocMipmappedArray"]
7831    pub unsafe fn cuMipmappedArrayCreate(
7832        &self,
7833        pHandle: *mut CUmipmappedArray,
7834        pMipmappedArrayDesc: *const CUDA_ARRAY3D_DESCRIPTOR,
7835        numMipmapLevels: ::std::os::raw::c_uint,
7836    ) -> CUresult {
7837        (self
7838            .cuMipmappedArrayCreate
7839            .as_ref()
7840            .expect("Expected function, got error."))(
7841            pHandle, pMipmappedArrayDesc, numMipmapLevels
7842        )
7843    }
7844    #[doc = " \\brief Gets a mipmap level of a CUDA mipmapped array\n\n Returns in \\p *pLevelArray a CUDA array that represents a single mipmap level\n of the CUDA mipmapped array \\p hMipmappedArray.\n\n If \\p level is greater than the maximum number of levels in this mipmapped array,\n ::CUDA_ERROR_INVALID_VALUE is returned.\n\n \\param pLevelArray     - Returned mipmap level CUDA array\n \\param hMipmappedArray - CUDA mipmapped array\n \\param level           - Mipmap level\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa\n ::cuMipmappedArrayCreate,\n ::cuMipmappedArrayDestroy,\n ::cuArrayCreate,\n ::cudaGetMipmappedArrayLevel"]
7845    pub unsafe fn cuMipmappedArrayGetLevel(
7846        &self,
7847        pLevelArray: *mut CUarray,
7848        hMipmappedArray: CUmipmappedArray,
7849        level: ::std::os::raw::c_uint,
7850    ) -> CUresult {
7851        (self
7852            .cuMipmappedArrayGetLevel
7853            .as_ref()
7854            .expect("Expected function, got error."))(pLevelArray, hMipmappedArray, level)
7855    }
7856    #[doc = " \\brief Destroys a CUDA mipmapped array\n\n Destroys the CUDA mipmapped array \\p hMipmappedArray.\n\n \\param hMipmappedArray - Mipmapped array to destroy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_ARRAY_IS_MAPPED,\n ::CUDA_ERROR_CONTEXT_IS_DESTROYED\n \\notefnerr\n\n \\sa\n ::cuMipmappedArrayCreate,\n ::cuMipmappedArrayGetLevel,\n ::cuArrayCreate,\n ::cudaFreeMipmappedArray"]
7857    pub unsafe fn cuMipmappedArrayDestroy(&self, hMipmappedArray: CUmipmappedArray) -> CUresult {
7858        (self
7859            .cuMipmappedArrayDestroy
7860            .as_ref()
7861            .expect("Expected function, got error."))(hMipmappedArray)
7862    }
7863    #[doc = " \\brief Retrieve handle for an address range\n\n Get a handle of the specified type to an address range. The address range\n must have been obtained by a prior call to either ::cuMemAlloc or ::cuMemAddressReserve.\n If the address range was obtained via ::cuMemAddressReserve, it must also be fully mapped via ::cuMemMap.\n\n Users must ensure the \\p dptr and \\p size are aligned to the host page size.\n\n When requesting CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD,\n users are expected to query for dma_buf support for the platform\n by using ::CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED device attribute before calling\n this API. The \\p handle will be interpreted as a pointer to an integer to store the dma_buf file descriptor.\n Users must ensure the entire address range is backed and mapped when\n the address range is allocated by ::cuMemAddressReserve. All the physical\n allocations backing the address range must be resident on the same device and\n have identical allocation properties. Users are also expected to retrieve a\n new handle every time the underlying physical allocation(s) corresponding\n to a previously queried VA range are changed.\n\n \\param[out] handle     - Pointer to the location where the returned handle will be stored.\n \\param[in] dptr        - Pointer to a valid CUDA device allocation. Must be aligned to host page size.\n \\param[in] size        - Length of the address range. Must be aligned to host page size.\n \\param[in] handleType  - Type of handle requested (defines type and size of the \\p handle output parameter)\n \\param[in] flags       - Reserved, must be zero\n\n \\return\n CUDA_SUCCESS\n CUDA_ERROR_INVALID_VALUE\n CUDA_ERROR_NOT_SUPPORTED"]
7864    pub unsafe fn cuMemGetHandleForAddressRange(
7865        &self,
7866        handle: *mut ::std::os::raw::c_void,
7867        dptr: CUdeviceptr,
7868        size: usize,
7869        handleType: CUmemRangeHandleType,
7870        flags: ::std::os::raw::c_ulonglong,
7871    ) -> CUresult {
7872        (self
7873            .cuMemGetHandleForAddressRange
7874            .as_ref()
7875            .expect("Expected function, got error."))(handle, dptr, size, handleType, flags)
7876    }
7877    #[doc = " \\brief Allocate an address range reservation.\n\n Reserves a virtual address range based on the given parameters, giving\n the starting address of the range in \\p ptr.  This API requires a system that\n supports UVA.  The size and address parameters must be a multiple of the\n host page size and the alignment must be a power of two or zero for default\n alignment.\n\n \\param[out] ptr       - Resulting pointer to start of virtual address range allocated\n \\param[in]  size      - Size of the reserved virtual address range requested\n \\param[in]  alignment - Alignment of the reserved virtual address range requested\n \\param[in]  addr      - Fixed starting address range requested\n \\param[in]  flags     - Currently unused, must be zero\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuMemAddressFree"]
7878    pub unsafe fn cuMemAddressReserve(
7879        &self,
7880        ptr: *mut CUdeviceptr,
7881        size: usize,
7882        alignment: usize,
7883        addr: CUdeviceptr,
7884        flags: ::std::os::raw::c_ulonglong,
7885    ) -> CUresult {
7886        (self
7887            .cuMemAddressReserve
7888            .as_ref()
7889            .expect("Expected function, got error."))(ptr, size, alignment, addr, flags)
7890    }
7891    #[doc = " \\brief Free an address range reservation.\n\n Frees a virtual address range reserved by cuMemAddressReserve.  The size\n must match what was given to memAddressReserve and the ptr given must\n match what was returned from memAddressReserve.\n\n \\param[in] ptr  - Starting address of the virtual address range to free\n \\param[in] size - Size of the virtual address region to free\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuMemAddressReserve"]
7892    pub unsafe fn cuMemAddressFree(&self, ptr: CUdeviceptr, size: usize) -> CUresult {
7893        (self
7894            .cuMemAddressFree
7895            .as_ref()
7896            .expect("Expected function, got error."))(ptr, size)
7897    }
7898    #[doc = " \\brief Create a CUDA memory handle representing a memory allocation of a given size described by the given properties\n\n This creates a memory allocation on the target device specified through the\n \\p prop strcuture. The created allocation will not have any device or host\n mappings. The generic memory \\p handle for the allocation can be\n mapped to the address space of calling process via ::cuMemMap. This handle\n cannot be transmitted directly to other processes (see\n ::cuMemExportToShareableHandle).  On Windows, the caller must also pass\n an LPSECURITYATTRIBUTE in \\p prop to be associated with this handle which\n limits or allows access to this handle for a recepient process (see\n ::CUmemAllocationProp::win32HandleMetaData for more).  The \\p size of this\n allocation must be a multiple of the the value given via\n ::cuMemGetAllocationGranularity with the ::CU_MEM_ALLOC_GRANULARITY_MINIMUM\n flag.\n If ::CUmemAllocationProp::allocFlags::usage contains ::CU_MEM_CREATE_USAGE_TILE_POOL flag then\n the memory allocation is intended only to be used as backing tile pool for sparse CUDA arrays\n and sparse CUDA mipmapped arrays.\n (see ::cuMemMapArrayAsync).\n\n \\param[out] handle - Value of handle returned. All operations on this allocation are to be performed using this handle.\n \\param[in]  size   - Size of the allocation requested\n \\param[in]  prop   - Properties of the allocation to create.\n \\param[in]  flags  - flags for future use, must be zero now.\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa ::cuMemRelease, ::cuMemExportToShareableHandle, ::cuMemImportFromShareableHandle"]
7899    pub unsafe fn cuMemCreate(
7900        &self,
7901        handle: *mut CUmemGenericAllocationHandle,
7902        size: usize,
7903        prop: *const CUmemAllocationProp,
7904        flags: ::std::os::raw::c_ulonglong,
7905    ) -> CUresult {
7906        (self
7907            .cuMemCreate
7908            .as_ref()
7909            .expect("Expected function, got error."))(handle, size, prop, flags)
7910    }
7911    #[doc = " \\brief Release a memory handle representing a memory allocation which was previously allocated through cuMemCreate.\n\n Frees the memory that was allocated on a device through cuMemCreate.\n\n The memory allocation will be freed when all outstanding mappings to the memory\n are unmapped and when all outstanding references to the handle (including it's\n shareable counterparts) are also released. The generic memory handle can be\n freed when there are still outstanding mappings made with this handle. Each\n time a recepient process imports a shareable handle, it needs to pair it with\n ::cuMemRelease for the handle to be freed.  If \\p handle is not a valid handle\n the behavior is undefined.\n\n \\param[in] handle Value of handle which was returned previously by cuMemCreate.\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa ::cuMemCreate"]
7912    pub unsafe fn cuMemRelease(&self, handle: CUmemGenericAllocationHandle) -> CUresult {
7913        (self
7914            .cuMemRelease
7915            .as_ref()
7916            .expect("Expected function, got error."))(handle)
7917    }
7918    #[doc = " \\brief Maps an allocation handle to a reserved virtual address range.\n\n Maps bytes of memory represented by \\p handle starting from byte \\p offset to\n \\p size to address range [\\p addr, \\p addr + \\p size]. This range must be an\n address reservation previously reserved with ::cuMemAddressReserve, and\n \\p offset + \\p size must be less than the size of the memory allocation.\n Both \\p ptr, \\p size, and \\p offset must be a multiple of the value given via\n ::cuMemGetAllocationGranularity with the ::CU_MEM_ALLOC_GRANULARITY_MINIMUM flag.\n\n Please note calling ::cuMemMap does not make the address accessible,\n the caller needs to update accessibility of a contiguous mapped VA\n range by calling ::cuMemSetAccess.\n\n Once a recipient process obtains a shareable memory handle\n from ::cuMemImportFromShareableHandle, the process must\n use ::cuMemMap to map the memory into its address ranges before\n setting accessibility with ::cuMemSetAccess.\n\n ::cuMemMap can only create mappings on VA range reservations\n that are not currently mapped.\n\n \\param[in] ptr    - Address where memory will be mapped.\n \\param[in] size   - Size of the memory mapping.\n \\param[in] offset - Offset into the memory represented by\n                   - \\p handle from which to start mapping\n                   - Note: currently must be zero.\n \\param[in] handle - Handle to a shareable memory\n \\param[in] flags  - flags for future use, must be zero now.\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa ::cuMemUnmap, ::cuMemSetAccess, ::cuMemCreate, ::cuMemAddressReserve, ::cuMemImportFromShareableHandle"]
7919    pub unsafe fn cuMemMap(
7920        &self,
7921        ptr: CUdeviceptr,
7922        size: usize,
7923        offset: usize,
7924        handle: CUmemGenericAllocationHandle,
7925        flags: ::std::os::raw::c_ulonglong,
7926    ) -> CUresult {
7927        (self
7928            .cuMemMap
7929            .as_ref()
7930            .expect("Expected function, got error."))(ptr, size, offset, handle, flags)
7931    }
7932    #[doc = " \\brief Maps or unmaps subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays\n\n Performs map or unmap operations on subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays.\n Each operation is specified by a ::CUarrayMapInfo entry in the \\p mapInfoList array of size \\p count.\n The structure ::CUarrayMapInfo is defined as follow:\n\\code\ntypedef struct CUarrayMapInfo_st {\nCUresourcetype resourceType;\nunion {\nCUmipmappedArray mipmap;\nCUarray array;\n} resource;\n\nCUarraySparseSubresourceType subresourceType;\nunion {\nstruct {\nunsigned int level;\nunsigned int layer;\nunsigned int offsetX;\nunsigned int offsetY;\nunsigned int offsetZ;\nunsigned int extentWidth;\nunsigned int extentHeight;\nunsigned int extentDepth;\n} sparseLevel;\nstruct {\nunsigned int layer;\nunsigned long long offset;\nunsigned long long size;\n} miptail;\n} subresource;\n\nCUmemOperationType memOperationType;\n\nCUmemHandleType memHandleType;\nunion {\nCUmemGenericAllocationHandle memHandle;\n} memHandle;\n\nunsigned long long offset;\nunsigned int deviceBitMask;\nunsigned int flags;\nunsigned int reserved[2];\n} CUarrayMapInfo;\n\\endcode\n\n where ::CUarrayMapInfo::resourceType specifies the type of resource to be operated on.\n If ::CUarrayMapInfo::resourceType is set to ::CUresourcetype::CU_RESOURCE_TYPE_ARRAY then\n ::CUarrayMapInfo::resource::array must be set to a valid sparse CUDA array handle.\n The CUDA array must be either a 2D, 2D layered or 3D CUDA array and must have been allocated using\n ::cuArrayCreate or ::cuArray3DCreate with the flag ::CUDA_ARRAY3D_SPARSE\n or ::CUDA_ARRAY3D_DEFERRED_MAPPING.\n For CUDA arrays obtained using ::cuMipmappedArrayGetLevel, ::CUDA_ERROR_INVALID_VALUE will be returned.\n If ::CUarrayMapInfo::resourceType is set to ::CUresourcetype::CU_RESOURCE_TYPE_MIPMAPPED_ARRAY\n then ::CUarrayMapInfo::resource::mipmap must be set to a valid sparse CUDA mipmapped array handle.\n The CUDA mipmapped array must be either a 2D, 2D layered or 3D CUDA mipmapped array and must have been\n allocated using ::cuMipmappedArrayCreate with the flag ::CUDA_ARRAY3D_SPARSE\n or ::CUDA_ARRAY3D_DEFERRED_MAPPING.\n\n ::CUarrayMapInfo::subresourceType specifies the type of subresource within the resource.\n ::CUarraySparseSubresourceType_enum is defined as:\n\\code\ntypedef enum CUarraySparseSubresourceType_enum {\nCU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = 0,\nCU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = 1\n} CUarraySparseSubresourceType;\n\\endcode\n\n where ::CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL indicates a\n sparse-miplevel which spans at least one tile in every dimension. The remaining miplevels which\n are too small to span at least one tile in any dimension constitute the mip tail region as indicated by\n ::CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL subresource type.\n\n If ::CUarrayMapInfo::subresourceType is set to ::CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL\n then ::CUarrayMapInfo::subresource::sparseLevel struct must contain valid array subregion offsets and extents.\n The ::CUarrayMapInfo::subresource::sparseLevel::offsetX, ::CUarrayMapInfo::subresource::sparseLevel::offsetY\n and ::CUarrayMapInfo::subresource::sparseLevel::offsetZ must specify valid X, Y and Z offsets respectively.\n The ::CUarrayMapInfo::subresource::sparseLevel::extentWidth, ::CUarrayMapInfo::subresource::sparseLevel::extentHeight\n and ::CUarrayMapInfo::subresource::sparseLevel::extentDepth must specify valid width, height and depth extents respectively.\n These offsets and extents must be aligned to the corresponding tile dimension.\n For CUDA mipmapped arrays ::CUarrayMapInfo::subresource::sparseLevel::level must specify a valid mip level index. Otherwise,\n must be zero.\n For layered CUDA arrays and layered CUDA mipmapped arrays ::CUarrayMapInfo::subresource::sparseLevel::layer must specify a valid layer index. Otherwise,\n must be zero.\n ::CUarrayMapInfo::subresource::sparseLevel::offsetZ must be zero and ::CUarrayMapInfo::subresource::sparseLevel::extentDepth\n must be set to 1 for 2D and 2D layered CUDA arrays and CUDA mipmapped arrays.\n Tile extents can be obtained by calling ::cuArrayGetSparseProperties and ::cuMipmappedArrayGetSparseProperties\n\n If ::CUarrayMapInfo::subresourceType is set to ::CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL\n then ::CUarrayMapInfo::subresource::miptail struct must contain valid mip tail offset in\n ::CUarrayMapInfo::subresource::miptail::offset and size in ::CUarrayMapInfo::subresource::miptail::size.\n Both, mip tail offset and mip tail size must be aligned to the tile size.\n For layered CUDA mipmapped arrays which don't have the flag ::CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL set in ::CUDA_ARRAY_SPARSE_PROPERTIES::flags\n as returned by ::cuMipmappedArrayGetSparseProperties, ::CUarrayMapInfo::subresource::miptail::layer must specify a valid layer index.\n Otherwise, must be zero.\n\n If ::CUarrayMapInfo::resource::array or ::CUarrayMapInfo::resource::mipmap was created with ::CUDA_ARRAY3D_DEFERRED_MAPPING\n flag set the ::CUarrayMapInfo::subresourceType and the contents of ::CUarrayMapInfo::subresource will be ignored.\n\n ::CUarrayMapInfo::memOperationType specifies the type of operation. ::CUmemOperationType is defined as:\n\\code\ntypedef enum CUmemOperationType_enum {\nCU_MEM_OPERATION_TYPE_MAP = 1,\nCU_MEM_OPERATION_TYPE_UNMAP = 2\n} CUmemOperationType;\n\\endcode\n If ::CUarrayMapInfo::memOperationType is set to ::CUmemOperationType::CU_MEM_OPERATION_TYPE_MAP then the subresource\n will be mapped onto the tile pool memory specified by ::CUarrayMapInfo::memHandle at offset ::CUarrayMapInfo::offset.\n The tile pool allocation has to be created by specifying the ::CU_MEM_CREATE_USAGE_TILE_POOL flag when calling ::cuMemCreate. Also,\n ::CUarrayMapInfo::memHandleType must be set to ::CUmemHandleType::CU_MEM_HANDLE_TYPE_GENERIC.\n\n If ::CUarrayMapInfo::memOperationType is set to ::CUmemOperationType::CU_MEM_OPERATION_TYPE_UNMAP then an unmapping operation\n is performed. ::CUarrayMapInfo::memHandle must be NULL.\n\n ::CUarrayMapInfo::deviceBitMask specifies the list of devices that must map or unmap physical memory.\n Currently, this mask must have exactly one bit set, and the corresponding device must match the device associated with the stream.\n If ::CUarrayMapInfo::memOperationType is set to ::CUmemOperationType::CU_MEM_OPERATION_TYPE_MAP, the device must also match\n the device associated with the tile pool memory allocation as specified by ::CUarrayMapInfo::memHandle.\n\n ::CUarrayMapInfo::flags and ::CUarrayMapInfo::reserved[] are unused and must be set to zero.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n\n \\param[in] mapInfoList - List of ::CUarrayMapInfo\n \\param[in] count       - Count of ::CUarrayMapInfo  in \\p mapInfoList\n \\param[in] hStream     - Stream identifier for the stream to use for map or unmap operations\n\n \\sa ::cuMipmappedArrayCreate, ::cuArrayCreate, ::cuArray3DCreate, ::cuMemCreate, ::cuArrayGetSparseProperties, ::cuMipmappedArrayGetSparseProperties"]
7933    pub unsafe fn cuMemMapArrayAsync(
7934        &self,
7935        mapInfoList: *mut CUarrayMapInfo,
7936        count: ::std::os::raw::c_uint,
7937        hStream: CUstream,
7938    ) -> CUresult {
7939        (self
7940            .cuMemMapArrayAsync
7941            .as_ref()
7942            .expect("Expected function, got error."))(mapInfoList, count, hStream)
7943    }
7944    #[doc = " \\brief Unmap the backing memory of a given address range.\n\n The range must be the entire contiguous address range that was mapped to.  In\n other words, ::cuMemUnmap cannot unmap a sub-range of an address range mapped\n by ::cuMemCreate / ::cuMemMap.  Any backing memory allocations will be freed\n if there are no existing mappings and there are no unreleased memory handles.\n\n When ::cuMemUnmap returns successfully the address range is converted to an\n address reservation and can be used for a future calls to ::cuMemMap.  Any new\n mapping to this virtual address will need to have access granted through\n ::cuMemSetAccess, as all mappings start with no accessibility setup.\n\n \\param[in] ptr  - Starting address for the virtual address range to unmap\n \\param[in] size - Size of the virtual address range to unmap\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n \\note_sync\n\n \\sa ::cuMemCreate, ::cuMemAddressReserve"]
7945    pub unsafe fn cuMemUnmap(&self, ptr: CUdeviceptr, size: usize) -> CUresult {
7946        (self
7947            .cuMemUnmap
7948            .as_ref()
7949            .expect("Expected function, got error."))(ptr, size)
7950    }
7951    #[doc = " \\brief Set the access flags for each location specified in \\p desc for the given virtual address range\n\n Given the virtual address range via \\p ptr and \\p size, and the locations\n in the array given by \\p desc and \\p count, set the access flags for the\n target locations.  The range must be a fully mapped address range\n containing all allocations created by ::cuMemMap / ::cuMemCreate.\n\n \\param[in] ptr   - Starting address for the virtual address range\n \\param[in] size  - Length of the virtual address range\n \\param[in] desc  - Array of ::CUmemAccessDesc that describe how to change the\n                  - mapping for each location specified\n \\param[in] count - Number of ::CUmemAccessDesc in \\p desc\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n \\note_sync\n\n \\sa ::cuMemSetAccess, ::cuMemCreate, :cuMemMap"]
7952    pub unsafe fn cuMemSetAccess(
7953        &self,
7954        ptr: CUdeviceptr,
7955        size: usize,
7956        desc: *const CUmemAccessDesc,
7957        count: usize,
7958    ) -> CUresult {
7959        (self
7960            .cuMemSetAccess
7961            .as_ref()
7962            .expect("Expected function, got error."))(ptr, size, desc, count)
7963    }
7964    #[doc = " \\brief Get the access \\p flags set for the given \\p location and \\p ptr\n\n \\param[out] flags   - Flags set for this location\n \\param[in] location - Location in which to check the flags for\n \\param[in] ptr      - Address in which to check the access flags for\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuMemSetAccess"]
7965    pub unsafe fn cuMemGetAccess(
7966        &self,
7967        flags: *mut ::std::os::raw::c_ulonglong,
7968        location: *const CUmemLocation,
7969        ptr: CUdeviceptr,
7970    ) -> CUresult {
7971        (self
7972            .cuMemGetAccess
7973            .as_ref()
7974            .expect("Expected function, got error."))(flags, location, ptr)
7975    }
7976    #[doc = " \\brief Exports an allocation to a requested shareable handle type\n\n Given a CUDA memory handle, create a shareable memory\n allocation handle that can be used to share the memory with other\n processes. The recipient process can convert the shareable handle back into a\n CUDA memory handle using ::cuMemImportFromShareableHandle and map\n it with ::cuMemMap. The implementation of what this handle is and how it\n can be transferred is defined by the requested handle type in \\p handleType\n\n Once all shareable handles are closed and the allocation is released, the allocated\n memory referenced will be released back to the OS and uses of the CUDA handle afterward\n will lead to undefined behavior.\n\n This API can also be used in conjunction with other APIs (e.g. Vulkan, OpenGL)\n that support importing memory from the shareable type\n\n \\param[out] shareableHandle - Pointer to the location in which to store the requested handle type\n \\param[in] handle           - CUDA handle for the memory allocation\n \\param[in] handleType       - Type of shareable handle requested (defines type and size of the \\p shareableHandle output parameter)\n \\param[in] flags            - Reserved, must be zero\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuMemImportFromShareableHandle"]
7977    pub unsafe fn cuMemExportToShareableHandle(
7978        &self,
7979        shareableHandle: *mut ::std::os::raw::c_void,
7980        handle: CUmemGenericAllocationHandle,
7981        handleType: CUmemAllocationHandleType,
7982        flags: ::std::os::raw::c_ulonglong,
7983    ) -> CUresult {
7984        (self
7985            .cuMemExportToShareableHandle
7986            .as_ref()
7987            .expect("Expected function, got error."))(
7988            shareableHandle, handle, handleType, flags
7989        )
7990    }
7991    #[doc = " \\brief Imports an allocation from a requested shareable handle type.\n\n If the current process cannot support the memory described by this shareable\n handle, this API will error as CUDA_ERROR_NOT_SUPPORTED.\n\n \\note Importing shareable handles exported from some graphics APIs(VUlkan, OpenGL, etc)\n created on devices under an SLI group may not be supported, and thus this API will\n return CUDA_ERROR_NOT_SUPPORTED.\n There is no guarantee that the contents of \\p handle will be the same CUDA memory handle\n for the same given OS shareable handle, or the same underlying allocation.\n\n \\param[out] handle       - CUDA Memory handle for the memory allocation.\n \\param[in]  osHandle     - Shareable Handle representing the memory allocation that is to be imported.\n \\param[in]  shHandleType - handle type of the exported handle ::CUmemAllocationHandleType.\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuMemExportToShareableHandle, ::cuMemMap, ::cuMemRelease"]
7992    pub unsafe fn cuMemImportFromShareableHandle(
7993        &self,
7994        handle: *mut CUmemGenericAllocationHandle,
7995        osHandle: *mut ::std::os::raw::c_void,
7996        shHandleType: CUmemAllocationHandleType,
7997    ) -> CUresult {
7998        (self
7999            .cuMemImportFromShareableHandle
8000            .as_ref()
8001            .expect("Expected function, got error."))(handle, osHandle, shHandleType)
8002    }
8003    #[doc = " \\brief Calculates either the minimal or recommended granularity\n\n Calculates either the minimal or recommended granularity\n for a given allocation specification and returns it in granularity.  This\n granularity can be used as a multiple for alignment, size, or address mapping.\n\n \\param[out] granularity Returned granularity.\n \\param[in]  prop Property for which to determine the granularity for\n \\param[in]  option Determines which granularity to return\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuMemCreate, ::cuMemMap"]
8004    pub unsafe fn cuMemGetAllocationGranularity(
8005        &self,
8006        granularity: *mut usize,
8007        prop: *const CUmemAllocationProp,
8008        option: CUmemAllocationGranularity_flags,
8009    ) -> CUresult {
8010        (self
8011            .cuMemGetAllocationGranularity
8012            .as_ref()
8013            .expect("Expected function, got error."))(granularity, prop, option)
8014    }
8015    #[doc = " \\brief Retrieve the contents of the property structure defining properties for this handle\n\n \\param[out] prop  - Pointer to a properties structure which will hold the information about this handle\n \\param[in] handle - Handle which to perform the query on\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuMemCreate, ::cuMemImportFromShareableHandle"]
8016    pub unsafe fn cuMemGetAllocationPropertiesFromHandle(
8017        &self,
8018        prop: *mut CUmemAllocationProp,
8019        handle: CUmemGenericAllocationHandle,
8020    ) -> CUresult {
8021        (self
8022            .cuMemGetAllocationPropertiesFromHandle
8023            .as_ref()
8024            .expect("Expected function, got error."))(prop, handle)
8025    }
8026    #[doc = " \\brief Given an address \\p addr, returns the allocation handle of the backing memory allocation.\n\n The handle is guaranteed to be the same handle value used to map the memory. If the address\n requested is not mapped, the function will fail. The returned handle must be released with\n corresponding number of calls to ::cuMemRelease.\n\n \\note The address \\p addr, can be any address in a range previously mapped\n by ::cuMemMap, and not necessarily the start address.\n\n \\param[out] handle CUDA Memory handle for the backing memory allocation.\n \\param[in] addr Memory address to query, that has been mapped previously.\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuMemCreate, ::cuMemRelease, ::cuMemMap"]
8027    pub unsafe fn cuMemRetainAllocationHandle(
8028        &self,
8029        handle: *mut CUmemGenericAllocationHandle,
8030        addr: *mut ::std::os::raw::c_void,
8031    ) -> CUresult {
8032        (self
8033            .cuMemRetainAllocationHandle
8034            .as_ref()
8035            .expect("Expected function, got error."))(handle, addr)
8036    }
8037    #[doc = " \\brief Frees memory with stream ordered semantics\n\n Inserts a free operation into \\p hStream.\n The allocation must not be accessed after stream execution reaches the free.\n After this API returns, accessing the memory from any subsequent work launched on the GPU\n or querying its pointer attributes results in undefined behavior.\n\n \\note During stream capture, this function results in the creation of a free node and\n       must therefore be passed the address of a graph allocation.\n\n \\param dptr - memory to free\n \\param hStream - The stream establishing the stream ordering contract.\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT (default stream specified with no current context),\n ::CUDA_ERROR_NOT_SUPPORTED"]
8038    pub unsafe fn cuMemFreeAsync(&self, dptr: CUdeviceptr, hStream: CUstream) -> CUresult {
8039        (self
8040            .cuMemFreeAsync
8041            .as_ref()
8042            .expect("Expected function, got error."))(dptr, hStream)
8043    }
8044    #[doc = " \\brief Allocates memory with stream ordered semantics\n\n Inserts an allocation operation into \\p hStream.\n A pointer to the allocated memory is returned immediately in *dptr.\n The allocation must not be accessed until the the allocation operation completes.\n The allocation comes from the memory pool current to the stream's device.\n\n \\note The default memory pool of a device contains device memory from that device.\n \\note Basic stream ordering allows future work submitted into the same stream to use the allocation.\n       Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation\n       operation completes before work submitted in a separate stream runs.\n \\note During stream capture, this function results in the creation of an allocation node.  In this case,\n       the allocation is owned by the graph instead of the memory pool. The memory pool's properties\n       are used to set the node's creation parameters.\n\n \\param[out] dptr    - Returned device pointer\n \\param[in] bytesize - Number of bytes to allocate\n \\param[in] hStream  - The stream establishing the stream ordering contract and the memory pool to allocate from\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT (default stream specified with no current context),\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa ::cuMemAllocFromPoolAsync, ::cuMemFreeAsync, ::cuDeviceSetMemPool,\n     ::cuDeviceGetDefaultMemPool, ::cuDeviceGetMemPool, ::cuMemPoolCreate,\n     ::cuMemPoolSetAccess, ::cuMemPoolSetAttribute"]
8045    pub unsafe fn cuMemAllocAsync(
8046        &self,
8047        dptr: *mut CUdeviceptr,
8048        bytesize: usize,
8049        hStream: CUstream,
8050    ) -> CUresult {
8051        (self
8052            .cuMemAllocAsync
8053            .as_ref()
8054            .expect("Expected function, got error."))(dptr, bytesize, hStream)
8055    }
8056    #[doc = " \\brief Tries to release memory back to the OS\n\n Releases memory back to the OS until the pool contains fewer than minBytesToKeep\n reserved bytes, or there is no more memory that the allocator can safely release.\n The allocator cannot release OS allocations that back outstanding asynchronous allocations.\n The OS allocations may happen at different granularity from the user allocations.\n\n \\note: Allocations that have not been freed count as outstanding.\n \\note: Allocations that have been asynchronously freed but whose completion has\n        not been observed on the host (eg. by a synchronize) can count as outstanding.\n\n \\param[in] pool           - The memory pool to trim\n \\param[in] minBytesToKeep - If the pool has less than minBytesToKeep reserved,\n the TrimTo operation is a no-op.  Otherwise the pool will be guaranteed to have\n at least minBytesToKeep bytes reserved after the operation.\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuMemAllocAsync, ::cuMemFreeAsync, ::cuDeviceGetDefaultMemPool,\n     ::cuDeviceGetMemPool, ::cuMemPoolCreate"]
8057    pub unsafe fn cuMemPoolTrimTo(&self, pool: CUmemoryPool, minBytesToKeep: usize) -> CUresult {
8058        (self
8059            .cuMemPoolTrimTo
8060            .as_ref()
8061            .expect("Expected function, got error."))(pool, minBytesToKeep)
8062    }
8063    #[doc = " \\brief Sets attributes of a memory pool\n\n Supported attributes are:\n - ::CU_MEMPOOL_ATTR_RELEASE_THRESHOLD: (value type = cuuint64_t)\n                    Amount of reserved memory in bytes to hold onto before trying\n                    to release memory back to the OS. When more than the release\n                    threshold bytes of memory are held by the memory pool, the\n                    allocator will try to release memory back to the OS on the\n                    next call to stream, event or context synchronize. (default 0)\n - ::CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES: (value type = int)\n                    Allow ::cuMemAllocAsync to use memory asynchronously freed\n                    in another stream as long as a stream ordering dependency\n                    of the allocating stream on the free action exists.\n                    Cuda events and null stream interactions can create the required\n                    stream ordered dependencies. (default enabled)\n - ::CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC: (value type = int)\n                    Allow reuse of already completed frees when there is no dependency\n                    between the free and allocation. (default enabled)\n - ::CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES: (value type = int)\n                    Allow ::cuMemAllocAsync to insert new stream dependencies\n                    in order to establish the stream ordering required to reuse\n                    a piece of memory released by ::cuMemFreeAsync (default enabled).\n - ::CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH: (value type = cuuint64_t)\n                    Reset the high watermark that tracks the amount of backing memory that was\n                    allocated for the memory pool. It is illegal to set this attribute to a non-zero value.\n - ::CU_MEMPOOL_ATTR_USED_MEM_HIGH: (value type = cuuint64_t)\n                    Reset the high watermark that tracks the amount of used memory that was\n                    allocated for the memory pool.\n\n \\param[in] pool  - The memory pool to modify\n \\param[in] attr  - The attribute to modify\n \\param[in] value - Pointer to the value to assign\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuMemAllocAsync, ::cuMemFreeAsync, ::cuDeviceGetDefaultMemPool,\n     ::cuDeviceGetMemPool, ::cuMemPoolCreate"]
8064    pub unsafe fn cuMemPoolSetAttribute(
8065        &self,
8066        pool: CUmemoryPool,
8067        attr: CUmemPool_attribute,
8068        value: *mut ::std::os::raw::c_void,
8069    ) -> CUresult {
8070        (self
8071            .cuMemPoolSetAttribute
8072            .as_ref()
8073            .expect("Expected function, got error."))(pool, attr, value)
8074    }
8075    #[doc = " \\brief Gets attributes of a memory pool\n\n Supported attributes are:\n - ::CU_MEMPOOL_ATTR_RELEASE_THRESHOLD: (value type = cuuint64_t)\n                    Amount of reserved memory in bytes to hold onto before trying\n                    to release memory back to the OS. When more than the release\n                    threshold bytes of memory are held by the memory pool, the\n                    allocator will try to release memory back to the OS on the\n                    next call to stream, event or context synchronize. (default 0)\n - ::CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES: (value type = int)\n                    Allow ::cuMemAllocAsync to use memory asynchronously freed\n                    in another stream as long as a stream ordering dependency\n                    of the allocating stream on the free action exists.\n                    Cuda events and null stream interactions can create the required\n                    stream ordered dependencies. (default enabled)\n - ::CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC: (value type = int)\n                    Allow reuse of already completed frees when there is no dependency\n                    between the free and allocation. (default enabled)\n - ::CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES: (value type = int)\n                    Allow ::cuMemAllocAsync to insert new stream dependencies\n                    in order to establish the stream ordering required to reuse\n                    a piece of memory released by ::cuMemFreeAsync (default enabled).\n - ::CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT: (value type = cuuint64_t)\n                    Amount of backing memory currently allocated for the mempool\n - ::CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH: (value type = cuuint64_t)\n                    High watermark of backing memory allocated for the mempool since the\n                    last time it was reset.\n - ::CU_MEMPOOL_ATTR_USED_MEM_CURRENT: (value type = cuuint64_t)\n                    Amount of memory from the pool that is currently in use by the application.\n - ::CU_MEMPOOL_ATTR_USED_MEM_HIGH: (value type = cuuint64_t)\n                    High watermark of the amount of memory from the pool that was in use by the application.\n\n \\param[in] pool   - The memory pool to get attributes of\n \\param[in] attr   - The attribute to get\n \\param[out] value - Retrieved value\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuMemAllocAsync, ::cuMemFreeAsync, ::cuDeviceGetDefaultMemPool,\n     ::cuDeviceGetMemPool, ::cuMemPoolCreate"]
8076    pub unsafe fn cuMemPoolGetAttribute(
8077        &self,
8078        pool: CUmemoryPool,
8079        attr: CUmemPool_attribute,
8080        value: *mut ::std::os::raw::c_void,
8081    ) -> CUresult {
8082        (self
8083            .cuMemPoolGetAttribute
8084            .as_ref()
8085            .expect("Expected function, got error."))(pool, attr, value)
8086    }
8087    #[doc = " \\brief Controls visibility of pools between devices\n\n \\param[in] pool  - The pool being modified\n \\param[in] map   - Array of access descriptors. Each descriptor instructs the access to enable for a single gpu.\n \\param[in] count - Number of descriptors in the map array.\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuMemAllocAsync, ::cuMemFreeAsync, ::cuDeviceGetDefaultMemPool,\n     ::cuDeviceGetMemPool, ::cuMemPoolCreate"]
8088    pub unsafe fn cuMemPoolSetAccess(
8089        &self,
8090        pool: CUmemoryPool,
8091        map: *const CUmemAccessDesc,
8092        count: usize,
8093    ) -> CUresult {
8094        (self
8095            .cuMemPoolSetAccess
8096            .as_ref()
8097            .expect("Expected function, got error."))(pool, map, count)
8098    }
8099    #[doc = " \\brief Returns the accessibility of a pool from a device\n\n Returns the accessibility of the pool's memory from the specified location.\n\n \\param[out] flags   - the accessibility of the pool from the specified location\n \\param[in] memPool  - the pool being queried\n \\param[in] location - the location accessing the pool\n\n \\sa ::cuMemAllocAsync, ::cuMemFreeAsync, ::cuDeviceGetDefaultMemPool,\n     ::cuDeviceGetMemPool, ::cuMemPoolCreate"]
8100    pub unsafe fn cuMemPoolGetAccess(
8101        &self,
8102        flags: *mut CUmemAccess_flags,
8103        memPool: CUmemoryPool,
8104        location: *mut CUmemLocation,
8105    ) -> CUresult {
8106        (self
8107            .cuMemPoolGetAccess
8108            .as_ref()
8109            .expect("Expected function, got error."))(flags, memPool, location)
8110    }
8111    #[doc = " \\brief Creates a memory pool\n\n Creates a CUDA memory pool and returns the handle in \\p pool.  The \\p poolProps determines\n the properties of the pool such as the backing device and IPC capabilities.\n\n By default, the pool's memory will be accessible from the device it is allocated on.\n\n \\note Specifying CU_MEM_HANDLE_TYPE_NONE creates a memory pool that will not support IPC.\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuDeviceSetMemPool, ::cuDeviceGetMemPool, ::cuDeviceGetDefaultMemPool,\n     ::cuMemAllocFromPoolAsync, ::cuMemPoolExportToShareableHandle"]
8112    pub unsafe fn cuMemPoolCreate(
8113        &self,
8114        pool: *mut CUmemoryPool,
8115        poolProps: *const CUmemPoolProps,
8116    ) -> CUresult {
8117        (self
8118            .cuMemPoolCreate
8119            .as_ref()
8120            .expect("Expected function, got error."))(pool, poolProps)
8121    }
8122    #[doc = " \\brief Destroys the specified memory pool\n\n If any pointers obtained from this pool haven't been freed or\n the pool has free operations that haven't completed\n when ::cuMemPoolDestroy is invoked, the function will return immediately and the\n resources associated with the pool will be released automatically\n once there are no more outstanding allocations.\n\n Destroying the current mempool of a device sets the default mempool of\n that device as the current mempool for that device.\n\n \\note A device's default memory pool cannot be destroyed.\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuMemFreeAsync, ::cuDeviceSetMemPool, ::cuDeviceGetMemPool,\n     ::cuDeviceGetDefaultMemPool, ::cuMemPoolCreate"]
8123    pub unsafe fn cuMemPoolDestroy(&self, pool: CUmemoryPool) -> CUresult {
8124        (self
8125            .cuMemPoolDestroy
8126            .as_ref()
8127            .expect("Expected function, got error."))(pool)
8128    }
8129    #[doc = " \\brief Allocates memory from a specified pool with stream ordered semantics.\n\n Inserts an allocation operation into \\p hStream.\n A pointer to the allocated memory is returned immediately in *dptr.\n The allocation must not be accessed until the the allocation operation completes.\n The allocation comes from the specified memory pool.\n\n \\note\n    -  The specified memory pool may be from a device different than that of the specified \\p hStream.\n\n    -  Basic stream ordering allows future work submitted into the same stream to use the allocation.\n       Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation\n       operation completes before work submitted in a separate stream runs.\n\n \\note During stream capture, this function results in the creation of an allocation node.  In this case,\n       the allocation is owned by the graph instead of the memory pool. The memory pool's properties\n       are used to set the node's creation parameters.\n\n \\param[out] dptr    - Returned device pointer\n \\param[in] bytesize - Number of bytes to allocate\n \\param[in] pool     - The pool to allocate from\n \\param[in] hStream  - The stream establishing the stream ordering semantic\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT (default stream specified with no current context),\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa ::cuMemAllocAsync, ::cuMemFreeAsync, ::cuDeviceGetDefaultMemPool,\n     ::cuDeviceGetMemPool, ::cuMemPoolCreate, ::cuMemPoolSetAccess,\n     ::cuMemPoolSetAttribute"]
8130    pub unsafe fn cuMemAllocFromPoolAsync(
8131        &self,
8132        dptr: *mut CUdeviceptr,
8133        bytesize: usize,
8134        pool: CUmemoryPool,
8135        hStream: CUstream,
8136    ) -> CUresult {
8137        (self
8138            .cuMemAllocFromPoolAsync
8139            .as_ref()
8140            .expect("Expected function, got error."))(dptr, bytesize, pool, hStream)
8141    }
8142    #[doc = " \\brief Exports a memory pool to the requested handle type.\n\n Given an IPC capable mempool, create an OS handle to share the pool with another process.\n A recipient process can convert the shareable handle into a mempool with ::cuMemPoolImportFromShareableHandle.\n Individual pointers can then be shared with the ::cuMemPoolExportPointer and ::cuMemPoolImportPointer APIs.\n The implementation of what the shareable handle is and how it can be transferred is defined by the requested\n handle type.\n\n \\note: To create an IPC capable mempool, create a mempool with a CUmemAllocationHandleType other than CU_MEM_HANDLE_TYPE_NONE.\n\n \\param[out] handle_out  - Returned OS handle\n \\param[in] pool         - pool to export\n \\param[in] handleType   - the type of handle to create\n \\param[in] flags        - must be 0\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa ::cuMemPoolImportFromShareableHandle, ::cuMemPoolExportPointer,\n     ::cuMemPoolImportPointer, ::cuMemAllocAsync, ::cuMemFreeAsync,\n     ::cuDeviceGetDefaultMemPool, ::cuDeviceGetMemPool, ::cuMemPoolCreate,\n     ::cuMemPoolSetAccess, ::cuMemPoolSetAttribute"]
8143    pub unsafe fn cuMemPoolExportToShareableHandle(
8144        &self,
8145        handle_out: *mut ::std::os::raw::c_void,
8146        pool: CUmemoryPool,
8147        handleType: CUmemAllocationHandleType,
8148        flags: ::std::os::raw::c_ulonglong,
8149    ) -> CUresult {
8150        (self
8151            .cuMemPoolExportToShareableHandle
8152            .as_ref()
8153            .expect("Expected function, got error."))(handle_out, pool, handleType, flags)
8154    }
8155    #[doc = " \\brief imports a memory pool from a shared handle.\n\n Specific allocations can be imported from the imported pool with cuMemPoolImportPointer.\n\n \\note Imported memory pools do not support creating new allocations.\n       As such imported memory pools may not be used in cuDeviceSetMemPool\n       or ::cuMemAllocFromPoolAsync calls.\n\n \\param[out] pool_out    - Returned memory pool\n \\param[in] handle       - OS handle of the pool to open\n \\param[in] handleType   - The type of handle being imported\n \\param[in] flags        - must be 0\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa ::cuMemPoolExportToShareableHandle, ::cuMemPoolExportPointer, ::cuMemPoolImportPointer"]
8156    pub unsafe fn cuMemPoolImportFromShareableHandle(
8157        &self,
8158        pool_out: *mut CUmemoryPool,
8159        handle: *mut ::std::os::raw::c_void,
8160        handleType: CUmemAllocationHandleType,
8161        flags: ::std::os::raw::c_ulonglong,
8162    ) -> CUresult {
8163        (self
8164            .cuMemPoolImportFromShareableHandle
8165            .as_ref()
8166            .expect("Expected function, got error."))(pool_out, handle, handleType, flags)
8167    }
8168    #[doc = " \\brief Export data to share a memory pool allocation between processes.\n\n Constructs \\p shareData_out for sharing a specific allocation from an already shared memory pool.\n The recipient process can import the allocation with the ::cuMemPoolImportPointer api.\n The data is not a handle and may be shared through any IPC mechanism.\n\n \\param[out] shareData_out - Returned export data\n \\param[in] ptr            - pointer to memory being exported\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa ::cuMemPoolExportToShareableHandle, ::cuMemPoolImportFromShareableHandle, ::cuMemPoolImportPointer"]
8169    pub unsafe fn cuMemPoolExportPointer(
8170        &self,
8171        shareData_out: *mut CUmemPoolPtrExportData,
8172        ptr: CUdeviceptr,
8173    ) -> CUresult {
8174        (self
8175            .cuMemPoolExportPointer
8176            .as_ref()
8177            .expect("Expected function, got error."))(shareData_out, ptr)
8178    }
8179    #[doc = " \\brief Import a memory pool allocation from another process.\n\n Returns in \\p ptr_out a pointer to the imported memory.\n The imported memory must not be accessed before the allocation operation completes\n in the exporting process. The imported memory must be freed from all importing processes before\n being freed in the exporting process. The pointer may be freed with cuMemFree\n or cuMemFreeAsync.  If cuMemFreeAsync is used, the free must be completed\n on the importing process before the free operation on the exporting process.\n\n \\note The cuMemFreeAsync api may be used in the exporting process before\n       the cuMemFreeAsync operation completes in its stream as long as the\n       cuMemFreeAsync in the exporting process specifies a stream with\n       a stream dependency on the importing process's cuMemFreeAsync.\n\n \\param[out] ptr_out  - pointer to imported memory\n \\param[in] pool      - pool from which to import\n \\param[in] shareData - data specifying the memory to import\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa ::cuMemPoolExportToShareableHandle, ::cuMemPoolImportFromShareableHandle, ::cuMemPoolExportPointer"]
8180    pub unsafe fn cuMemPoolImportPointer(
8181        &self,
8182        ptr_out: *mut CUdeviceptr,
8183        pool: CUmemoryPool,
8184        shareData: *mut CUmemPoolPtrExportData,
8185    ) -> CUresult {
8186        (self
8187            .cuMemPoolImportPointer
8188            .as_ref()
8189            .expect("Expected function, got error."))(ptr_out, pool, shareData)
8190    }
8191    #[doc = " \\brief Returns information about a pointer\n\n The supported attributes are:\n\n - ::CU_POINTER_ATTRIBUTE_CONTEXT:\n\n      Returns in \\p *data the ::CUcontext in which \\p ptr was allocated or\n      registered.\n      The type of \\p data must be ::CUcontext *.\n\n      If \\p ptr was not allocated by, mapped by, or registered with\n      a ::CUcontext which uses unified virtual addressing then\n      ::CUDA_ERROR_INVALID_VALUE is returned.\n\n - ::CU_POINTER_ATTRIBUTE_MEMORY_TYPE:\n\n      Returns in \\p *data the physical memory type of the memory that\n      \\p ptr addresses as a ::CUmemorytype enumerated value.\n      The type of \\p data must be unsigned int.\n\n      If \\p ptr addresses device memory then \\p *data is set to\n      ::CU_MEMORYTYPE_DEVICE.  The particular ::CUdevice on which the\n      memory resides is the ::CUdevice of the ::CUcontext returned by the\n      ::CU_POINTER_ATTRIBUTE_CONTEXT attribute of \\p ptr.\n\n      If \\p ptr addresses host memory then \\p *data is set to\n      ::CU_MEMORYTYPE_HOST.\n\n      If \\p ptr was not allocated by, mapped by, or registered with\n      a ::CUcontext which uses unified virtual addressing then\n      ::CUDA_ERROR_INVALID_VALUE is returned.\n\n      If the current ::CUcontext does not support unified virtual\n      addressing then ::CUDA_ERROR_INVALID_CONTEXT is returned.\n\n - ::CU_POINTER_ATTRIBUTE_DEVICE_POINTER:\n\n      Returns in \\p *data the device pointer value through which\n      \\p ptr may be accessed by kernels running in the current\n      ::CUcontext.\n      The type of \\p data must be CUdeviceptr *.\n\n      If there exists no device pointer value through which\n      kernels running in the current ::CUcontext may access\n      \\p ptr then ::CUDA_ERROR_INVALID_VALUE is returned.\n\n      If there is no current ::CUcontext then\n      ::CUDA_ERROR_INVALID_CONTEXT is returned.\n\n      Except in the exceptional disjoint addressing cases discussed\n      below, the value returned in \\p *data will equal the input\n      value \\p ptr.\n\n - ::CU_POINTER_ATTRIBUTE_HOST_POINTER:\n\n      Returns in \\p *data the host pointer value through which\n      \\p ptr may be accessed by by the host program.\n      The type of \\p data must be void **.\n      If there exists no host pointer value through which\n      the host program may directly access \\p ptr then\n      ::CUDA_ERROR_INVALID_VALUE is returned.\n\n      Except in the exceptional disjoint addressing cases discussed\n      below, the value returned in \\p *data will equal the input\n      value \\p ptr.\n\n - ::CU_POINTER_ATTRIBUTE_P2P_TOKENS:\n\n      Returns in \\p *data two tokens for use with the nv-p2p.h Linux\n      kernel interface. \\p data must be a struct of type\n      CUDA_POINTER_ATTRIBUTE_P2P_TOKENS.\n\n      \\p ptr must be a pointer to memory obtained from :cuMemAlloc().\n      Note that p2pToken and vaSpaceToken are only valid for the\n      lifetime of the source allocation. A subsequent allocation at\n      the same address may return completely different tokens.\n      Querying this attribute has a side effect of setting the attribute\n      ::CU_POINTER_ATTRIBUTE_SYNC_MEMOPS for the region of memory that\n      \\p ptr points to.\n\n - ::CU_POINTER_ATTRIBUTE_SYNC_MEMOPS:\n\n      A boolean attribute which when set, ensures that synchronous memory operations\n      initiated on the region of memory that \\p ptr points to will always synchronize.\n      See further documentation in the section titled \"API synchronization behavior\"\n      to learn more about cases when synchronous memory operations can\n      exhibit asynchronous behavior.\n\n - ::CU_POINTER_ATTRIBUTE_BUFFER_ID:\n\n      Returns in \\p *data a buffer ID which is guaranteed to be unique within the process.\n      \\p data must point to an unsigned long long.\n\n      \\p ptr must be a pointer to memory obtained from a CUDA memory allocation API.\n      Every memory allocation from any of the CUDA memory allocation APIs will\n      have a unique ID over a process lifetime. Subsequent allocations do not reuse IDs\n      from previous freed allocations. IDs are only unique within a single process.\n\n\n - ::CU_POINTER_ATTRIBUTE_IS_MANAGED:\n\n      Returns in \\p *data a boolean that indicates whether the pointer points to\n      managed memory or not.\n\n      If \\p ptr is not a valid CUDA pointer then ::CUDA_ERROR_INVALID_VALUE is returned.\n\n - ::CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL:\n\n      Returns in \\p *data an integer representing a device ordinal of a device against\n      which the memory was allocated or registered.\n\n - ::CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE:\n\n      Returns in \\p *data a boolean that indicates if this pointer maps to\n      an allocation that is suitable for ::cudaIpcGetMemHandle.\n\n - ::CU_POINTER_ATTRIBUTE_RANGE_START_ADDR:\n\n      Returns in \\p *data the starting address for the allocation referenced\n      by the device pointer \\p ptr.  Note that this is not necessarily the\n      address of the mapped region, but the address of the mappable address\n      range \\p ptr references (e.g. from ::cuMemAddressReserve).\n\n - ::CU_POINTER_ATTRIBUTE_RANGE_SIZE:\n\n      Returns in \\p *data the size for the allocation referenced by the device\n      pointer \\p ptr.  Note that this is not necessarily the size of the mapped\n      region, but the size of the mappable address range \\p ptr references\n      (e.g. from ::cuMemAddressReserve).  To retrieve the size of the mapped\n      region, see ::cuMemGetAddressRange\n\n - ::CU_POINTER_ATTRIBUTE_MAPPED:\n\n      Returns in \\p *data a boolean that indicates if this pointer is in a\n      valid address range that is mapped to a backing allocation.\n\n - ::CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES:\n\n      Returns a bitmask of the allowed handle types for an allocation that may\n      be passed to ::cuMemExportToShareableHandle.\n\n - ::CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE:\n\n      Returns in \\p *data the handle to the mempool that the allocation was obtained from.\n\n \\par\n\n Note that for most allocations in the unified virtual address space\n the host and device pointer for accessing the allocation will be the\n same.  The exceptions to this are\n  - user memory registered using ::cuMemHostRegister\n  - host memory allocated using ::cuMemHostAlloc with the\n    ::CU_MEMHOSTALLOC_WRITECOMBINED flag\n For these types of allocation there will exist separate, disjoint host\n and device addresses for accessing the allocation.  In particular\n  - The host address will correspond to an invalid unmapped device address\n    (which will result in an exception if accessed from the device)\n  - The device address will correspond to an invalid unmapped host address\n    (which will result in an exception if accessed from the host).\n For these types of allocations, querying ::CU_POINTER_ATTRIBUTE_HOST_POINTER\n and ::CU_POINTER_ATTRIBUTE_DEVICE_POINTER may be used to retrieve the host\n and device addresses from either address.\n\n \\param data      - Returned pointer attribute value\n \\param attribute - Pointer attribute to query\n \\param ptr       - Pointer\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuPointerSetAttribute,\n ::cuMemAlloc,\n ::cuMemFree,\n ::cuMemAllocHost,\n ::cuMemFreeHost,\n ::cuMemHostAlloc,\n ::cuMemHostRegister,\n ::cuMemHostUnregister,\n ::cudaPointerGetAttributes"]
8192    pub unsafe fn cuPointerGetAttribute(
8193        &self,
8194        data: *mut ::std::os::raw::c_void,
8195        attribute: CUpointer_attribute,
8196        ptr: CUdeviceptr,
8197    ) -> CUresult {
8198        (self
8199            .cuPointerGetAttribute
8200            .as_ref()
8201            .expect("Expected function, got error."))(data, attribute, ptr)
8202    }
8203    #[doc = " \\brief Prefetches memory to the specified destination device\n\n Prefetches memory to the specified destination device.  \\p devPtr is the\n base device pointer of the memory to be prefetched and \\p dstDevice is the\n destination device. \\p count specifies the number of bytes to copy. \\p hStream\n is the stream in which the operation is enqueued. The memory range must refer\n to managed memory allocated via ::cuMemAllocManaged or declared via __managed__ variables.\n\n Passing in CU_DEVICE_CPU for \\p dstDevice will prefetch the data to host memory. If\n \\p dstDevice is a GPU, then the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS\n must be non-zero. Additionally, \\p hStream must be associated with a device that has a\n non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS.\n\n The start address and end address of the memory range will be rounded down and rounded up\n respectively to be aligned to CPU page size before the prefetch operation is enqueued\n in the stream.\n\n If no physical memory has been allocated for this region, then this memory region\n will be populated and mapped on the destination device. If there's insufficient\n memory to prefetch the desired region, the Unified Memory driver may evict pages from other\n ::cuMemAllocManaged allocations to host memory in order to make room. Device memory\n allocated using ::cuMemAlloc or ::cuArrayCreate will not be evicted.\n\n By default, any mappings to the previous location of the migrated pages are removed and\n mappings for the new location are only setup on \\p dstDevice. The exact behavior however\n also depends on the settings applied to this memory range via ::cuMemAdvise as described\n below:\n\n If ::CU_MEM_ADVISE_SET_READ_MOSTLY was set on any subset of this memory range,\n then that subset will create a read-only copy of the pages on \\p dstDevice.\n\n If ::CU_MEM_ADVISE_SET_PREFERRED_LOCATION was called on any subset of this memory\n range, then the pages will be migrated to \\p dstDevice even if \\p dstDevice is not the\n preferred location of any pages in the memory range.\n\n If ::CU_MEM_ADVISE_SET_ACCESSED_BY was called on any subset of this memory range,\n then mappings to those pages from all the appropriate processors are updated to\n refer to the new location if establishing such a mapping is possible. Otherwise,\n those mappings are cleared.\n\n Note that this API is not required for functionality and only serves to improve performance\n by allowing the application to migrate data to a suitable location before it is accessed.\n Memory accesses to this range are always coherent and are allowed even when the data is\n actively being migrated.\n\n Note that this function is asynchronous with respect to the host and all work\n on other devices.\n\n \\param devPtr    - Pointer to be prefetched\n \\param count     - Size in bytes\n \\param dstDevice - Destination device to prefetch to\n \\param hStream    - Stream to enqueue prefetch operation\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n \\note_async\n \\note_null_stream\n\n \\sa ::cuMemcpy, ::cuMemcpyPeer, ::cuMemcpyAsync,\n ::cuMemcpy3DPeerAsync, ::cuMemAdvise,\n ::cudaMemPrefetchAsync"]
8204    pub unsafe fn cuMemPrefetchAsync(
8205        &self,
8206        devPtr: CUdeviceptr,
8207        count: usize,
8208        dstDevice: CUdevice,
8209        hStream: CUstream,
8210    ) -> CUresult {
8211        (self
8212            .cuMemPrefetchAsync
8213            .as_ref()
8214            .expect("Expected function, got error."))(devPtr, count, dstDevice, hStream)
8215    }
8216    #[doc = " \\brief Advise about the usage of a given memory range\n\n Advise the Unified Memory subsystem about the usage pattern for the memory range\n starting at \\p devPtr with a size of \\p count bytes. The start address and end address of the memory\n range will be rounded down and rounded up respectively to be aligned to CPU page size before the\n advice is applied. The memory range must refer to managed memory allocated via ::cuMemAllocManaged\n or declared via __managed__ variables. The memory range could also refer to system-allocated pageable\n memory provided it represents a valid, host-accessible region of memory and all additional constraints\n imposed by \\p advice as outlined below are also satisfied. Specifying an invalid system-allocated pageable\n memory range results in an error being returned.\n\n The \\p advice parameter can take the following values:\n - ::CU_MEM_ADVISE_SET_READ_MOSTLY: This implies that the data is mostly going to be read\n from and only occasionally written to. Any read accesses from any processor to this region will create a\n read-only copy of at least the accessed pages in that processor's memory. Additionally, if ::cuMemPrefetchAsync\n is called on this region, it will create a read-only copy of the data on the destination processor.\n If any processor writes to this region, all copies of the corresponding page will be invalidated\n except for the one where the write occurred. The \\p device argument is ignored for this advice.\n Note that for a page to be read-duplicated, the accessing processor must either be the CPU or a GPU\n that has a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS.\n Also, if a context is created on a device that does not have the device attribute\n ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS set, then read-duplication will not occur until\n all such contexts are destroyed.\n If the memory region refers to valid system-allocated pageable memory, then the accessing device must\n have a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS for a read-only\n copy to be created on that device. Note however that if the accessing device also has a non-zero value for the\n device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, then setting this advice\n will not create a read-only copy when that device accesses this memory region.\n\n - ::CU_MEM_ADVISE_UNSET_READ_MOSTLY:  Undoes the effect of ::CU_MEM_ADVISE_SET_READ_MOSTLY and also prevents the\n Unified Memory driver from attempting heuristic read-duplication on the memory range. Any read-duplicated\n copies of the data will be collapsed into a single copy. The location for the collapsed\n copy will be the preferred location if the page has a preferred location and one of the read-duplicated\n copies was resident at that location. Otherwise, the location chosen is arbitrary.\n\n - ::CU_MEM_ADVISE_SET_PREFERRED_LOCATION: This advice sets the preferred location for the\n data to be the memory belonging to \\p device. Passing in CU_DEVICE_CPU for \\p device sets the\n preferred location as host memory. If \\p device is a GPU, then it must have a non-zero value for the\n device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. Setting the preferred location\n does not cause data to migrate to that location immediately. Instead, it guides the migration policy\n when a fault occurs on that memory region. If the data is already in its preferred location and the\n faulting processor can establish a mapping without requiring the data to be migrated, then\n data migration will be avoided. On the other hand, if the data is not in its preferred location\n or if a direct mapping cannot be established, then it will be migrated to the processor accessing\n it. It is important to note that setting the preferred location does not prevent data prefetching\n done using ::cuMemPrefetchAsync.\n Having a preferred location can override the page thrash detection and resolution logic in the Unified\n Memory driver. Normally, if a page is detected to be constantly thrashing between for example host and device\n memory, the page may eventually be pinned to host memory by the Unified Memory driver. But\n if the preferred location is set as device memory, then the page will continue to thrash indefinitely.\n If ::CU_MEM_ADVISE_SET_READ_MOSTLY is also set on this memory region or any subset of it, then the\n policies associated with that advice will override the policies of this advice, unless read accesses from\n \\p device will not result in a read-only copy being created on that device as outlined in description for\n the advice ::CU_MEM_ADVISE_SET_READ_MOSTLY.\n If the memory region refers to valid system-allocated pageable memory, then \\p device must have a non-zero\n value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS. Additionally, if \\p device has\n a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES,\n then this call has no effect. Note however that this behavior may change in the future.\n\n - ::CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION: Undoes the effect of ::CU_MEM_ADVISE_SET_PREFERRED_LOCATION\n and changes the preferred location to none.\n\n - ::CU_MEM_ADVISE_SET_ACCESSED_BY: This advice implies that the data will be accessed by \\p device.\n Passing in ::CU_DEVICE_CPU for \\p device will set the advice for the CPU. If \\p device is a GPU, then\n the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS must be non-zero.\n This advice does not cause data migration and has no impact on the location of the data per se. Instead,\n it causes the data to always be mapped in the specified processor's page tables, as long as the\n location of the data permits a mapping to be established. If the data gets migrated for any reason,\n the mappings are updated accordingly.\n This advice is recommended in scenarios where data locality is not important, but avoiding faults is.\n Consider for example a system containing multiple GPUs with peer-to-peer access enabled, where the\n data located on one GPU is occasionally accessed by peer GPUs. In such scenarios, migrating data\n over to the other GPUs is not as important because the accesses are infrequent and the overhead of\n migration may be too high. But preventing faults can still help improve performance, and so having\n a mapping set up in advance is useful. Note that on CPU access of this data, the data may be migrated\n to host memory because the CPU typically cannot access device memory directly. Any GPU that had the\n ::CU_MEM_ADVISE_SET_ACCESSED_BY flag set for this data will now have its mapping updated to point to the\n page in host memory.\n If ::CU_MEM_ADVISE_SET_READ_MOSTLY is also set on this memory region or any subset of it, then the\n policies associated with that advice will override the policies of this advice. Additionally, if the\n preferred location of this memory region or any subset of it is also \\p device, then the policies\n associated with ::CU_MEM_ADVISE_SET_PREFERRED_LOCATION will override the policies of this advice.\n If the memory region refers to valid system-allocated pageable memory, then \\p device must have a non-zero\n value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS. Additionally, if \\p device has\n a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES,\n then this call has no effect.\n\n - ::CU_MEM_ADVISE_UNSET_ACCESSED_BY: Undoes the effect of ::CU_MEM_ADVISE_SET_ACCESSED_BY. Any mappings to\n the data from \\p device may be removed at any time causing accesses to result in non-fatal page faults.\n If the memory region refers to valid system-allocated pageable memory, then \\p device must have a non-zero\n value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS. Additionally, if \\p device has\n a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES,\n then this call has no effect.\n\n \\param devPtr - Pointer to memory to set the advice for\n \\param count  - Size in bytes of the memory range\n \\param advice - Advice to be applied for the specified memory range\n \\param device - Device to apply the advice for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n \\note_async\n \\note_null_stream\n\n \\sa ::cuMemcpy, ::cuMemcpyPeer, ::cuMemcpyAsync,\n ::cuMemcpy3DPeerAsync, ::cuMemPrefetchAsync,\n ::cudaMemAdvise"]
8217    pub unsafe fn cuMemAdvise(
8218        &self,
8219        devPtr: CUdeviceptr,
8220        count: usize,
8221        advice: CUmem_advise,
8222        device: CUdevice,
8223    ) -> CUresult {
8224        (self
8225            .cuMemAdvise
8226            .as_ref()
8227            .expect("Expected function, got error."))(devPtr, count, advice, device)
8228    }
8229    #[doc = " \\brief Query an attribute of a given memory range\n\n Query an attribute about the memory range starting at \\p devPtr with a size of \\p count bytes. The\n memory range must refer to managed memory allocated via ::cuMemAllocManaged or declared via\n __managed__ variables.\n\n The \\p attribute parameter can take the following values:\n - ::CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY: If this attribute is specified, \\p data will be interpreted\n as a 32-bit integer, and \\p dataSize must be 4. The result returned will be 1 if all pages in the given\n memory range have read-duplication enabled, or 0 otherwise.\n - ::CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION: If this attribute is specified, \\p data will be\n interpreted as a 32-bit integer, and \\p dataSize must be 4. The result returned will be a GPU device\n id if all pages in the memory range have that GPU as their preferred location, or it will be CU_DEVICE_CPU\n if all pages in the memory range have the CPU as their preferred location, or it will be CU_DEVICE_INVALID\n if either all the pages don't have the same preferred location or some of the pages don't have a\n preferred location at all. Note that the actual location of the pages in the memory range at the time of\n the query may be different from the preferred location.\n - ::CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY: If this attribute is specified, \\p data will be interpreted\n as an array of 32-bit integers, and \\p dataSize must be a non-zero multiple of 4. The result returned\n will be a list of device ids that had ::CU_MEM_ADVISE_SET_ACCESSED_BY set for that entire memory range.\n If any device does not have that advice set for the entire memory range, that device will not be included.\n If \\p data is larger than the number of devices that have that advice set for that memory range,\n CU_DEVICE_INVALID will be returned in all the extra space provided. For ex., if \\p dataSize is 12\n (i.e. \\p data has 3 elements) and only device 0 has the advice set, then the result returned will be\n { 0, CU_DEVICE_INVALID, CU_DEVICE_INVALID }. If \\p data is smaller than the number of devices that have\n that advice set, then only as many devices will be returned as can fit in the array. There is no\n guarantee on which specific devices will be returned, however.\n - ::CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION: If this attribute is specified, \\p data will be\n interpreted as a 32-bit integer, and \\p dataSize must be 4. The result returned will be the last location\n to which all pages in the memory range were prefetched explicitly via ::cuMemPrefetchAsync. This will either be\n a GPU id or CU_DEVICE_CPU depending on whether the last location for prefetch was a GPU or the CPU\n respectively. If any page in the memory range was never explicitly prefetched or if all pages were not\n prefetched to the same location, CU_DEVICE_INVALID will be returned. Note that this simply returns the\n last location that the applicaton requested to prefetch the memory range to. It gives no indication as to\n whether the prefetch operation to that location has completed or even begun.\n\n \\param data      - A pointers to a memory location where the result\n                    of each attribute query will be written to.\n \\param dataSize  - Array containing the size of data\n \\param attribute - The attribute to query\n \\param devPtr    - Start of the range to query\n \\param count     - Size of the range to query\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n \\note_async\n \\note_null_stream\n\n \\sa ::cuMemRangeGetAttributes, ::cuMemPrefetchAsync,\n ::cuMemAdvise,\n ::cudaMemRangeGetAttribute"]
8230    pub unsafe fn cuMemRangeGetAttribute(
8231        &self,
8232        data: *mut ::std::os::raw::c_void,
8233        dataSize: usize,
8234        attribute: CUmem_range_attribute,
8235        devPtr: CUdeviceptr,
8236        count: usize,
8237    ) -> CUresult {
8238        (self
8239            .cuMemRangeGetAttribute
8240            .as_ref()
8241            .expect("Expected function, got error."))(
8242            data, dataSize, attribute, devPtr, count
8243        )
8244    }
8245    #[doc = " \\brief Query attributes of a given memory range.\n\n Query attributes of the memory range starting at \\p devPtr with a size of \\p count bytes. The\n memory range must refer to managed memory allocated via ::cuMemAllocManaged or declared via\n __managed__ variables. The \\p attributes array will be interpreted to have \\p numAttributes\n entries. The \\p dataSizes array will also be interpreted to have \\p numAttributes entries.\n The results of the query will be stored in \\p data.\n\n The list of supported attributes are given below. Please refer to ::cuMemRangeGetAttribute for\n attribute descriptions and restrictions.\n\n - ::CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY\n - ::CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION\n - ::CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY\n - ::CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION\n\n \\param data          - A two-dimensional array containing pointers to memory\n                        locations where the result of each attribute query will be written to.\n \\param dataSizes     - Array containing the sizes of each result\n \\param attributes    - An array of attributes to query\n                        (numAttributes and the number of attributes in this array should match)\n \\param numAttributes - Number of attributes to query\n \\param devPtr        - Start of the range to query\n \\param count         - Size of the range to query\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa ::cuMemRangeGetAttribute, ::cuMemAdvise,\n ::cuMemPrefetchAsync,\n ::cudaMemRangeGetAttributes"]
8246    pub unsafe fn cuMemRangeGetAttributes(
8247        &self,
8248        data: *mut *mut ::std::os::raw::c_void,
8249        dataSizes: *mut usize,
8250        attributes: *mut CUmem_range_attribute,
8251        numAttributes: usize,
8252        devPtr: CUdeviceptr,
8253        count: usize,
8254    ) -> CUresult {
8255        (self
8256            .cuMemRangeGetAttributes
8257            .as_ref()
8258            .expect("Expected function, got error."))(
8259            data,
8260            dataSizes,
8261            attributes,
8262            numAttributes,
8263            devPtr,
8264            count,
8265        )
8266    }
8267    #[doc = " \\brief Set attributes on a previously allocated memory region\n\n The supported attributes are:\n\n - ::CU_POINTER_ATTRIBUTE_SYNC_MEMOPS:\n\n      A boolean attribute that can either be set (1) or unset (0). When set,\n      the region of memory that \\p ptr points to is guaranteed to always synchronize\n      memory operations that are synchronous. If there are some previously initiated\n      synchronous memory operations that are pending when this attribute is set, the\n      function does not return until those memory operations are complete.\n      See further documentation in the section titled \"API synchronization behavior\"\n      to learn more about cases when synchronous memory operations can\n      exhibit asynchronous behavior.\n      \\p value will be considered as a pointer to an unsigned integer to which this attribute is to be set.\n\n \\param value     - Pointer to memory containing the value to be set\n \\param attribute - Pointer attribute to set\n \\param ptr       - Pointer to a memory region allocated using CUDA memory allocation APIs\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa ::cuPointerGetAttribute,\n ::cuPointerGetAttributes,\n ::cuMemAlloc,\n ::cuMemFree,\n ::cuMemAllocHost,\n ::cuMemFreeHost,\n ::cuMemHostAlloc,\n ::cuMemHostRegister,\n ::cuMemHostUnregister"]
8268    pub unsafe fn cuPointerSetAttribute(
8269        &self,
8270        value: *const ::std::os::raw::c_void,
8271        attribute: CUpointer_attribute,
8272        ptr: CUdeviceptr,
8273    ) -> CUresult {
8274        (self
8275            .cuPointerSetAttribute
8276            .as_ref()
8277            .expect("Expected function, got error."))(value, attribute, ptr)
8278    }
8279    #[doc = " \\brief Returns information about a pointer.\n\n The supported attributes are (refer to ::cuPointerGetAttribute for attribute descriptions and restrictions):\n\n - ::CU_POINTER_ATTRIBUTE_CONTEXT\n - ::CU_POINTER_ATTRIBUTE_MEMORY_TYPE\n - ::CU_POINTER_ATTRIBUTE_DEVICE_POINTER\n - ::CU_POINTER_ATTRIBUTE_HOST_POINTER\n - ::CU_POINTER_ATTRIBUTE_SYNC_MEMOPS\n - ::CU_POINTER_ATTRIBUTE_BUFFER_ID\n - ::CU_POINTER_ATTRIBUTE_IS_MANAGED\n - ::CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL\n - ::CU_POINTER_ATTRIBUTE_RANGE_START_ADDR\n - ::CU_POINTER_ATTRIBUTE_RANGE_SIZE\n - ::CU_POINTER_ATTRIBUTE_MAPPED\n - ::CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE\n - ::CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES\n - ::CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE\n\n \\param numAttributes - Number of attributes to query\n \\param attributes    - An array of attributes to query\n                      (numAttributes and the number of attributes in this array should match)\n \\param data          - A two-dimensional array containing pointers to memory\n                      locations where the result of each attribute query will be written to.\n \\param ptr           - Pointer to query\n\n Unlike ::cuPointerGetAttribute, this function will not return an error when the \\p ptr\n encountered is not a valid CUDA pointer. Instead, the attributes are assigned default NULL values\n and CUDA_SUCCESS is returned.\n\n If \\p ptr was not allocated by, mapped by, or registered with a ::CUcontext which uses UVA\n (Unified Virtual Addressing), ::CUDA_ERROR_INVALID_CONTEXT is returned.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuPointerGetAttribute,\n ::cuPointerSetAttribute,\n ::cudaPointerGetAttributes"]
8280    pub unsafe fn cuPointerGetAttributes(
8281        &self,
8282        numAttributes: ::std::os::raw::c_uint,
8283        attributes: *mut CUpointer_attribute,
8284        data: *mut *mut ::std::os::raw::c_void,
8285        ptr: CUdeviceptr,
8286    ) -> CUresult {
8287        (self
8288            .cuPointerGetAttributes
8289            .as_ref()
8290            .expect("Expected function, got error."))(numAttributes, attributes, data, ptr)
8291    }
8292    #[doc = " \\brief Create a stream\n\n Creates a stream and returns a handle in \\p phStream.  The \\p Flags argument\n determines behaviors of the stream.\n\n Valid values for \\p Flags are:\n - ::CU_STREAM_DEFAULT: Default stream creation flag.\n - ::CU_STREAM_NON_BLOCKING: Specifies that work running in the created\n   stream may run concurrently with work in stream 0 (the NULL stream), and that\n   the created stream should perform no implicit synchronization with stream 0.\n\n \\param phStream - Returned newly created stream\n \\param Flags    - Parameters for stream creation\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\notefnerr\n\n \\sa ::cuStreamDestroy,\n ::cuStreamCreateWithPriority,\n ::cuStreamGetPriority,\n ::cuStreamGetFlags,\n ::cuStreamWaitEvent,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cudaStreamCreate,\n ::cudaStreamCreateWithFlags"]
8293    pub unsafe fn cuStreamCreate(
8294        &self,
8295        phStream: *mut CUstream,
8296        Flags: ::std::os::raw::c_uint,
8297    ) -> CUresult {
8298        (self
8299            .cuStreamCreate
8300            .as_ref()
8301            .expect("Expected function, got error."))(phStream, Flags)
8302    }
8303    #[doc = " \\brief Create a stream with the given priority\n\n Creates a stream with the specified priority and returns a handle in \\p phStream.\n This API alters the scheduler priority of work in the stream. Work in a higher\n priority stream may preempt work already executing in a low priority stream.\n\n \\p priority follows a convention where lower numbers represent higher priorities.\n '0' represents default priority. The range of meaningful numerical priorities can\n be queried using ::cuCtxGetStreamPriorityRange. If the specified priority is\n outside the numerical range returned by ::cuCtxGetStreamPriorityRange,\n it will automatically be clamped to the lowest or the highest number in the range.\n\n \\param phStream    - Returned newly created stream\n \\param flags       - Flags for stream creation. See ::cuStreamCreate for a list of\n                      valid flags\n \\param priority    - Stream priority. Lower numbers represent higher priorities.\n                      See ::cuCtxGetStreamPriorityRange for more information about\n                      meaningful stream priorities that can be passed.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\notefnerr\n\n \\note Stream priorities are supported only on GPUs\n with compute capability 3.5 or higher.\n\n \\note In the current implementation, only compute kernels launched in\n priority streams are affected by the stream's priority. Stream priorities have\n no effect on host-to-device and device-to-host memory operations.\n\n \\sa ::cuStreamDestroy,\n ::cuStreamCreate,\n ::cuStreamGetPriority,\n ::cuCtxGetStreamPriorityRange,\n ::cuStreamGetFlags,\n ::cuStreamWaitEvent,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cudaStreamCreateWithPriority"]
8304    pub unsafe fn cuStreamCreateWithPriority(
8305        &self,
8306        phStream: *mut CUstream,
8307        flags: ::std::os::raw::c_uint,
8308        priority: ::std::os::raw::c_int,
8309    ) -> CUresult {
8310        (self
8311            .cuStreamCreateWithPriority
8312            .as_ref()
8313            .expect("Expected function, got error."))(phStream, flags, priority)
8314    }
8315    #[doc = " \\brief Query the priority of a given stream\n\n Query the priority of a stream created using ::cuStreamCreate or ::cuStreamCreateWithPriority\n and return the priority in \\p priority. Note that if the stream was created with a\n priority outside the numerical range returned by ::cuCtxGetStreamPriorityRange,\n this function returns the clamped priority.\n See ::cuStreamCreateWithPriority for details about priority clamping.\n\n \\param hStream    - Handle to the stream to be queried\n \\param priority   - Pointer to a signed integer in which the stream's priority is returned\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\notefnerr\n\n \\sa ::cuStreamDestroy,\n ::cuStreamCreate,\n ::cuStreamCreateWithPriority,\n ::cuCtxGetStreamPriorityRange,\n ::cuStreamGetFlags,\n ::cudaStreamGetPriority"]
8316    pub unsafe fn cuStreamGetPriority(
8317        &self,
8318        hStream: CUstream,
8319        priority: *mut ::std::os::raw::c_int,
8320    ) -> CUresult {
8321        (self
8322            .cuStreamGetPriority
8323            .as_ref()
8324            .expect("Expected function, got error."))(hStream, priority)
8325    }
8326    #[doc = " \\brief Query the flags of a given stream\n\n Query the flags of a stream created using ::cuStreamCreate or ::cuStreamCreateWithPriority\n and return the flags in \\p flags.\n\n \\param hStream    - Handle to the stream to be queried\n \\param flags      - Pointer to an unsigned integer in which the stream's flags are returned\n                     The value returned in \\p flags is a logical 'OR' of all flags that\n                     were used while creating this stream. See ::cuStreamCreate for the list\n                     of valid flags\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\notefnerr\n\n \\sa ::cuStreamDestroy,\n ::cuStreamCreate,\n ::cuStreamGetPriority,\n ::cudaStreamGetFlags"]
8327    pub unsafe fn cuStreamGetFlags(
8328        &self,
8329        hStream: CUstream,
8330        flags: *mut ::std::os::raw::c_uint,
8331    ) -> CUresult {
8332        (self
8333            .cuStreamGetFlags
8334            .as_ref()
8335            .expect("Expected function, got error."))(hStream, flags)
8336    }
8337    #[doc = " \\brief Returns the unique Id associated with the stream handle supplied\n\n Returns in \\p streamId the unique Id which is associated with the given stream handle.\n The Id is unique for the life of the program for this instance of CUDA.\n\n The stream handle \\p hStream can refer to any of the following:\n <ul>\n   <li>a stream created via any of the CUDA driver APIs such as ::cuStreamCreate\n   and ::cuStreamCreateWithPriority, or their runtime API equivalents such as\n   ::cudaStreamCreate, ::cudaStreamCreateWithFlags and ::cudaStreamCreateWithPriority.\n   Passing an invalid handle will result in undefined behavior.</li>\n   <li>any of the special streams such as the NULL stream, ::CU_STREAM_LEGACY and\n   ::CU_STREAM_PER_THREAD. The runtime API equivalents of these are also accepted,\n   which are NULL, ::cudaStreamLegacy and ::cudaStreamPerThread respectively.</li>\n </ul>\n\n \\param hStream    - Handle to the stream to be queried\n \\param streamId   - Pointer to store the Id of the stream\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa ::cuStreamDestroy,\n ::cuStreamCreate,\n ::cuStreamGetPriority,\n ::cudaStreamGetId"]
8338    pub unsafe fn cuStreamGetId(
8339        &self,
8340        hStream: CUstream,
8341        streamId: *mut ::std::os::raw::c_ulonglong,
8342    ) -> CUresult {
8343        (self
8344            .cuStreamGetId
8345            .as_ref()
8346            .expect("Expected function, got error."))(hStream, streamId)
8347    }
8348    #[doc = " \\brief Query the context associated with a stream\n\n Returns the CUDA context that the stream is associated with.\n\n The stream handle \\p hStream can refer to any of the following:\n <ul>\n   <li>a stream created via any of the CUDA driver APIs such as ::cuStreamCreate\n   and ::cuStreamCreateWithPriority, or their runtime API equivalents such as\n   ::cudaStreamCreate, ::cudaStreamCreateWithFlags and ::cudaStreamCreateWithPriority.\n   The returned context is the context that was active in the calling thread when the\n   stream was created. Passing an invalid handle will result in undefined behavior.</li>\n   <li>any of the special streams such as the NULL stream, ::CU_STREAM_LEGACY and\n   ::CU_STREAM_PER_THREAD. The runtime API equivalents of these are also accepted,\n   which are NULL, ::cudaStreamLegacy and ::cudaStreamPerThread respectively.\n   Specifying any of the special handles will return the context current to the\n   calling thread. If no context is current to the calling thread,\n   ::CUDA_ERROR_INVALID_CONTEXT is returned.</li>\n </ul>\n\n \\param hStream - Handle to the stream to be queried\n \\param pctx    - Returned context associated with the stream\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n \\notefnerr\n\n \\sa ::cuStreamDestroy,\n ::cuStreamCreateWithPriority,\n ::cuStreamGetPriority,\n ::cuStreamGetFlags,\n ::cuStreamWaitEvent,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cudaStreamCreate,\n ::cudaStreamCreateWithFlags"]
8349    pub unsafe fn cuStreamGetCtx(&self, hStream: CUstream, pctx: *mut CUcontext) -> CUresult {
8350        (self
8351            .cuStreamGetCtx
8352            .as_ref()
8353            .expect("Expected function, got error."))(hStream, pctx)
8354    }
8355    #[doc = " \\brief Make a compute stream wait on an event\n\n Makes all future work submitted to \\p hStream wait for all work captured in\n \\p hEvent.  See ::cuEventRecord() for details on what is captured by an event.\n The synchronization will be performed efficiently on the device when applicable.\n \\p hEvent may be from a different context or device than \\p hStream.\n\n flags include:\n - ::CU_EVENT_WAIT_DEFAULT: Default event creation flag.\n - ::CU_EVENT_WAIT_EXTERNAL: Event is captured in the graph as an external\n   event node when performing stream capture. This flag is invalid outside\n   of stream capture.\n\n \\param hStream - Stream to wait\n \\param hEvent  - Event to wait on (may not be NULL)\n \\param Flags   - See ::CUevent_capture_flags\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuStreamCreate,\n ::cuEventRecord,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cuStreamDestroy,\n ::cudaStreamWaitEvent"]
8356    pub unsafe fn cuStreamWaitEvent(
8357        &self,
8358        hStream: CUstream,
8359        hEvent: CUevent,
8360        Flags: ::std::os::raw::c_uint,
8361    ) -> CUresult {
8362        (self
8363            .cuStreamWaitEvent
8364            .as_ref()
8365            .expect("Expected function, got error."))(hStream, hEvent, Flags)
8366    }
8367    #[doc = " \\brief Add a callback to a compute stream\n\n \\note This function is slated for eventual deprecation and removal. If\n you do not require the callback to execute in case of a device error,\n consider using ::cuLaunchHostFunc. Additionally, this function is not\n supported with ::cuStreamBeginCapture and ::cuStreamEndCapture, unlike\n ::cuLaunchHostFunc.\n\n Adds a callback to be called on the host after all currently enqueued\n items in the stream have completed.  For each\n cuStreamAddCallback call, the callback will be executed exactly once.\n The callback will block later work in the stream until it is finished.\n\n The callback may be passed ::CUDA_SUCCESS or an error code.  In the event\n of a device error, all subsequently executed callbacks will receive an\n appropriate ::CUresult.\n\n Callbacks must not make any CUDA API calls.  Attempting to use a CUDA API\n will result in ::CUDA_ERROR_NOT_PERMITTED.  Callbacks must not perform any\n synchronization that may depend on outstanding device work or other callbacks\n that are not mandated to run earlier.  Callbacks without a mandated order\n (in independent streams) execute in undefined order and may be serialized.\n\n For the purposes of Unified Memory, callback execution makes a number of\n guarantees:\n <ul>\n   <li>The callback stream is considered idle for the duration of the\n   callback.  Thus, for example, a callback may always use memory attached\n   to the callback stream.</li>\n   <li>The start of execution of a callback has the same effect as\n   synchronizing an event recorded in the same stream immediately prior to\n   the callback.  It thus synchronizes streams which have been \"joined\"\n   prior to the callback.</li>\n   <li>Adding device work to any stream does not have the effect of making\n   the stream active until all preceding host functions and stream callbacks\n   have executed.  Thus, for\n   example, a callback might use global attached memory even if work has\n   been added to another stream, if the work has been ordered behind the\n   callback with an event.</li>\n   <li>Completion of a callback does not cause a stream to become\n   active except as described above.  The callback stream will remain idle\n   if no device work follows the callback, and will remain idle across\n   consecutive callbacks without device work in between.  Thus, for example,\n   stream synchronization can be done by signaling from a callback at the\n   end of the stream.</li>\n </ul>\n\n \\param hStream  - Stream to add callback to\n \\param callback - The function to call once preceding stream operations are complete\n \\param userData - User specified data to be passed to the callback function\n \\param flags    - Reserved for future use, must be 0\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuStreamCreate,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamWaitEvent,\n ::cuStreamDestroy,\n ::cuMemAllocManaged,\n ::cuStreamAttachMemAsync,\n ::cuLaunchHostFunc,\n ::cudaStreamAddCallback"]
8368    pub unsafe fn cuStreamAddCallback(
8369        &self,
8370        hStream: CUstream,
8371        callback: CUstreamCallback,
8372        userData: *mut ::std::os::raw::c_void,
8373        flags: ::std::os::raw::c_uint,
8374    ) -> CUresult {
8375        (self
8376            .cuStreamAddCallback
8377            .as_ref()
8378            .expect("Expected function, got error."))(hStream, callback, userData, flags)
8379    }
8380    pub unsafe fn cuStreamBeginCapture_v2(
8381        &self,
8382        hStream: CUstream,
8383        mode: CUstreamCaptureMode,
8384    ) -> CUresult {
8385        (self
8386            .cuStreamBeginCapture_v2
8387            .as_ref()
8388            .expect("Expected function, got error."))(hStream, mode)
8389    }
8390    #[doc = " \\brief Swaps the stream capture interaction mode for a thread\n\n Sets the calling thread's stream capture interaction mode to the value contained\n in \\p *mode, and overwrites \\p *mode with the previous mode for the thread. To\n facilitate deterministic behavior across function or module boundaries, callers\n are encouraged to use this API in a push-pop fashion: \\code\nCUstreamCaptureMode mode = desiredMode;\ncuThreadExchangeStreamCaptureMode(&mode);\n...\ncuThreadExchangeStreamCaptureMode(&mode); // restore previous mode\n \\endcode\n\n During stream capture (see ::cuStreamBeginCapture), some actions, such as a call\n to ::cudaMalloc, may be unsafe. In the case of ::cudaMalloc, the operation is\n not enqueued asynchronously to a stream, and is not observed by stream capture.\n Therefore, if the sequence of operations captured via ::cuStreamBeginCapture\n depended on the allocation being replayed whenever the graph is launched, the\n captured graph would be invalid.\n\n Therefore, stream capture places restrictions on API calls that can be made within\n or concurrently to a ::cuStreamBeginCapture-::cuStreamEndCapture sequence. This\n behavior can be controlled via this API and flags to ::cuStreamBeginCapture.\n\n A thread's mode is one of the following:\n - \\p CU_STREAM_CAPTURE_MODE_GLOBAL: This is the default mode. If the local thread has\n   an ongoing capture sequence that was not initiated with\n   \\p CU_STREAM_CAPTURE_MODE_RELAXED at \\p cuStreamBeginCapture, or if any other thread\n   has a concurrent capture sequence initiated with \\p CU_STREAM_CAPTURE_MODE_GLOBAL,\n   this thread is prohibited from potentially unsafe API calls.\n - \\p CU_STREAM_CAPTURE_MODE_THREAD_LOCAL: If the local thread has an ongoing capture\n   sequence not initiated with \\p CU_STREAM_CAPTURE_MODE_RELAXED, it is prohibited\n   from potentially unsafe API calls. Concurrent capture sequences in other threads\n   are ignored.\n - \\p CU_STREAM_CAPTURE_MODE_RELAXED: The local thread is not prohibited from potentially\n   unsafe API calls. Note that the thread is still prohibited from API calls which\n   necessarily conflict with stream capture, for example, attempting ::cuEventQuery\n   on an event that was last recorded inside a capture sequence.\n\n \\param mode - Pointer to mode value to swap with the current mode\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa\n ::cuStreamBeginCapture"]
8391    pub unsafe fn cuThreadExchangeStreamCaptureMode(
8392        &self,
8393        mode: *mut CUstreamCaptureMode,
8394    ) -> CUresult {
8395        (self
8396            .cuThreadExchangeStreamCaptureMode
8397            .as_ref()
8398            .expect("Expected function, got error."))(mode)
8399    }
8400    #[doc = " \\brief Ends capture on a stream, returning the captured graph\n\n End capture on \\p hStream, returning the captured graph via \\p phGraph.\n Capture must have been initiated on \\p hStream via a call to ::cuStreamBeginCapture.\n If capture was invalidated, due to a violation of the rules of stream capture, then\n a NULL graph will be returned.\n\n If the \\p mode argument to ::cuStreamBeginCapture was not\n ::CU_STREAM_CAPTURE_MODE_RELAXED, this call must be from the same thread as\n ::cuStreamBeginCapture.\n\n \\param hStream - Stream to query\n \\param phGraph - The captured graph\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD\n \\notefnerr\n\n \\sa\n ::cuStreamCreate,\n ::cuStreamBeginCapture,\n ::cuStreamIsCapturing"]
8401    pub unsafe fn cuStreamEndCapture(&self, hStream: CUstream, phGraph: *mut CUgraph) -> CUresult {
8402        (self
8403            .cuStreamEndCapture
8404            .as_ref()
8405            .expect("Expected function, got error."))(hStream, phGraph)
8406    }
8407    #[doc = " \\brief Returns a stream's capture status\n\n Return the capture status of \\p hStream via \\p captureStatus. After a successful\n call, \\p *captureStatus will contain one of the following:\n - ::CU_STREAM_CAPTURE_STATUS_NONE: The stream is not capturing.\n - ::CU_STREAM_CAPTURE_STATUS_ACTIVE: The stream is capturing.\n - ::CU_STREAM_CAPTURE_STATUS_INVALIDATED: The stream was capturing but an error\n   has invalidated the capture sequence. The capture sequence must be terminated\n   with ::cuStreamEndCapture on the stream where it was initiated in order to\n   continue using \\p hStream.\n\n Note that, if this is called on ::CU_STREAM_LEGACY (the \"null stream\") while\n a blocking stream in the same context is capturing, it will return\n ::CUDA_ERROR_STREAM_CAPTURE_IMPLICIT and \\p *captureStatus is unspecified\n after the call. The blocking stream capture is not invalidated.\n\n When a blocking stream is capturing, the legacy stream is in an\n unusable state until the blocking stream capture is terminated. The legacy\n stream is not supported for stream capture, but attempted use would have an\n implicit dependency on the capturing stream(s).\n\n \\param hStream       - Stream to query\n \\param captureStatus - Returns the stream's capture status\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_STREAM_CAPTURE_IMPLICIT\n \\notefnerr\n\n \\sa\n ::cuStreamCreate,\n ::cuStreamBeginCapture,\n ::cuStreamEndCapture"]
8408    pub unsafe fn cuStreamIsCapturing(
8409        &self,
8410        hStream: CUstream,
8411        captureStatus: *mut CUstreamCaptureStatus,
8412    ) -> CUresult {
8413        (self
8414            .cuStreamIsCapturing
8415            .as_ref()
8416            .expect("Expected function, got error."))(hStream, captureStatus)
8417    }
8418    pub unsafe fn cuStreamGetCaptureInfo_v2(
8419        &self,
8420        hStream: CUstream,
8421        captureStatus_out: *mut CUstreamCaptureStatus,
8422        id_out: *mut cuuint64_t,
8423        graph_out: *mut CUgraph,
8424        dependencies_out: *mut *const CUgraphNode,
8425        numDependencies_out: *mut usize,
8426    ) -> CUresult {
8427        (self
8428            .cuStreamGetCaptureInfo_v2
8429            .as_ref()
8430            .expect("Expected function, got error."))(
8431            hStream,
8432            captureStatus_out,
8433            id_out,
8434            graph_out,
8435            dependencies_out,
8436            numDependencies_out,
8437        )
8438    }
8439    #[doc = " \\brief Update the set of dependencies in a capturing stream (11.3+)\n\n Modifies the dependency set of a capturing stream. The dependency set is the set\n of nodes that the next captured node in the stream will depend on.\n\n Valid flags are ::CU_STREAM_ADD_CAPTURE_DEPENDENCIES and\n ::CU_STREAM_SET_CAPTURE_DEPENDENCIES. These control whether the set passed to\n the API is added to the existing set or replaces it. A flags value of 0 defaults\n to ::CU_STREAM_ADD_CAPTURE_DEPENDENCIES.\n\n Nodes that are removed from the dependency set via this API do not result in\n ::CUDA_ERROR_STREAM_CAPTURE_UNJOINED if they are unreachable from the stream at\n ::cuStreamEndCapture.\n\n Returns ::CUDA_ERROR_ILLEGAL_STATE if the stream is not capturing.\n\n This API is new in CUDA 11.3. Developers requiring compatibility across minor\n versions to CUDA 11.0 should not use this API or provide a fallback.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_ILLEGAL_STATE\n\n \\sa\n ::cuStreamBeginCapture,\n ::cuStreamGetCaptureInfo,"]
8440    pub unsafe fn cuStreamUpdateCaptureDependencies(
8441        &self,
8442        hStream: CUstream,
8443        dependencies: *mut CUgraphNode,
8444        numDependencies: usize,
8445        flags: ::std::os::raw::c_uint,
8446    ) -> CUresult {
8447        (self
8448            .cuStreamUpdateCaptureDependencies
8449            .as_ref()
8450            .expect("Expected function, got error."))(
8451            hStream, dependencies, numDependencies, flags
8452        )
8453    }
8454    #[doc = " \\brief Attach memory to a stream asynchronously\n\n Enqueues an operation in \\p hStream to specify stream association of\n \\p length bytes of memory starting from \\p dptr. This function is a\n stream-ordered operation, meaning that it is dependent on, and will\n only take effect when, previous work in stream has completed. Any\n previous association is automatically replaced.\n\n \\p dptr must point to one of the following types of memories:\n - managed memory declared using the __managed__ keyword or allocated with\n   ::cuMemAllocManaged.\n - a valid host-accessible region of system-allocated pageable memory. This\n   type of memory may only be specified if the device associated with the\n   stream reports a non-zero value for the device attribute\n   ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS.\n\n For managed allocations, \\p length must be either zero or the entire\n allocation's size. Both indicate that the entire allocation's stream\n association is being changed. Currently, it is not possible to change stream\n association for a portion of a managed allocation.\n\n For pageable host allocations, \\p length must be non-zero.\n\n The stream association is specified using \\p flags which must be\n one of ::CUmemAttach_flags.\n If the ::CU_MEM_ATTACH_GLOBAL flag is specified, the memory can be accessed\n by any stream on any device.\n If the ::CU_MEM_ATTACH_HOST flag is specified, the program makes a guarantee\n that it won't access the memory on the device from any stream on a device that\n has a zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS.\n If the ::CU_MEM_ATTACH_SINGLE flag is specified and \\p hStream is associated with\n a device that has a zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS,\n the program makes a guarantee that it will only access the memory on the device\n from \\p hStream. It is illegal to attach singly to the NULL stream, because the\n NULL stream is a virtual global stream and not a specific stream. An error will\n be returned in this case.\n\n When memory is associated with a single stream, the Unified Memory system will\n allow CPU access to this memory region so long as all operations in \\p hStream\n have completed, regardless of whether other streams are active. In effect,\n this constrains exclusive ownership of the managed memory region by\n an active GPU to per-stream activity instead of whole-GPU activity.\n\n Accessing memory on the device from streams that are not associated with\n it will produce undefined results. No error checking is performed by the\n Unified Memory system to ensure that kernels launched into other streams\n do not access this region.\n\n It is a program's responsibility to order calls to ::cuStreamAttachMemAsync\n via events, synchronization or other means to ensure legal access to memory\n at all times. Data visibility and coherency will be changed appropriately\n for all kernels which follow a stream-association change.\n\n If \\p hStream is destroyed while data is associated with it, the association is\n removed and the association reverts to the default visibility of the allocation\n as specified at ::cuMemAllocManaged. For __managed__ variables, the default\n association is always ::CU_MEM_ATTACH_GLOBAL. Note that destroying a stream is an\n asynchronous operation, and as a result, the change to default association won't\n happen until all work in the stream has completed.\n\n \\param hStream - Stream in which to enqueue the attach operation\n \\param dptr    - Pointer to memory (must be a pointer to managed memory or\n                  to a valid host-accessible region of system-allocated\n                  pageable memory)\n \\param length  - Length of memory\n \\param flags   - Must be one of ::CUmemAttach_flags\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuStreamCreate,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamWaitEvent,\n ::cuStreamDestroy,\n ::cuMemAllocManaged,\n ::cudaStreamAttachMemAsync"]
8455    pub unsafe fn cuStreamAttachMemAsync(
8456        &self,
8457        hStream: CUstream,
8458        dptr: CUdeviceptr,
8459        length: usize,
8460        flags: ::std::os::raw::c_uint,
8461    ) -> CUresult {
8462        (self
8463            .cuStreamAttachMemAsync
8464            .as_ref()
8465            .expect("Expected function, got error."))(hStream, dptr, length, flags)
8466    }
8467    #[doc = " \\brief Determine status of a compute stream\n\n Returns ::CUDA_SUCCESS if all operations in the stream specified by\n \\p hStream have completed, or ::CUDA_ERROR_NOT_READY if not.\n\n For the purposes of Unified Memory, a return value of ::CUDA_SUCCESS\n is equivalent to having called ::cuStreamSynchronize().\n\n \\param hStream - Stream to query status of\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_READY\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuStreamCreate,\n ::cuStreamWaitEvent,\n ::cuStreamDestroy,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cudaStreamQuery"]
8468    pub unsafe fn cuStreamQuery(&self, hStream: CUstream) -> CUresult {
8469        (self
8470            .cuStreamQuery
8471            .as_ref()
8472            .expect("Expected function, got error."))(hStream)
8473    }
8474    #[doc = " \\brief Wait until a stream's tasks are completed\n\n Waits until the device has completed all operations in the stream specified\n by \\p hStream. If the context was created with the\n ::CU_CTX_SCHED_BLOCKING_SYNC flag, the CPU thread will block until the\n stream is finished with all of its tasks.\n\n \\param hStream - Stream to wait for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE\n\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuStreamCreate,\n ::cuStreamDestroy,\n ::cuStreamWaitEvent,\n ::cuStreamQuery,\n ::cuStreamAddCallback,\n ::cudaStreamSynchronize"]
8475    pub unsafe fn cuStreamSynchronize(&self, hStream: CUstream) -> CUresult {
8476        (self
8477            .cuStreamSynchronize
8478            .as_ref()
8479            .expect("Expected function, got error."))(hStream)
8480    }
8481    pub unsafe fn cuStreamDestroy_v2(&self, hStream: CUstream) -> CUresult {
8482        (self
8483            .cuStreamDestroy_v2
8484            .as_ref()
8485            .expect("Expected function, got error."))(hStream)
8486    }
8487    #[doc = " \\brief Copies attributes from source stream to destination stream.\n\n Copies attributes from source stream \\p src to destination stream \\p dst.\n Both streams must have the same context.\n\n \\param[out] dst Destination stream\n \\param[in] src Source stream\n For list of attributes see ::CUstreamAttrID\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa\n ::CUaccessPolicyWindow"]
8488    pub unsafe fn cuStreamCopyAttributes(&self, dst: CUstream, src: CUstream) -> CUresult {
8489        (self
8490            .cuStreamCopyAttributes
8491            .as_ref()
8492            .expect("Expected function, got error."))(dst, src)
8493    }
8494    #[doc = " \\brief Queries stream attribute.\n\n Queries attribute \\p attr from \\p hStream and stores it in corresponding\n member of \\p value_out.\n\n \\param[in] hStream\n \\param[in] attr\n \\param[out] value_out\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa\n ::CUaccessPolicyWindow"]
8495    pub unsafe fn cuStreamGetAttribute(
8496        &self,
8497        hStream: CUstream,
8498        attr: CUstreamAttrID,
8499        value_out: *mut CUstreamAttrValue,
8500    ) -> CUresult {
8501        (self
8502            .cuStreamGetAttribute
8503            .as_ref()
8504            .expect("Expected function, got error."))(hStream, attr, value_out)
8505    }
8506    #[doc = " \\brief Sets stream attribute.\n\n Sets attribute \\p attr on \\p hStream from corresponding attribute of\n \\p value. The updated attribute will be applied to subsequent work\n submitted to the stream. It will not affect previously submitted work.\n\n \\param[out] hStream\n \\param[in] attr\n \\param[in] value\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa\n ::CUaccessPolicyWindow"]
8507    pub unsafe fn cuStreamSetAttribute(
8508        &self,
8509        hStream: CUstream,
8510        attr: CUstreamAttrID,
8511        value: *const CUstreamAttrValue,
8512    ) -> CUresult {
8513        (self
8514            .cuStreamSetAttribute
8515            .as_ref()
8516            .expect("Expected function, got error."))(hStream, attr, value)
8517    }
8518    #[doc = " \\brief Creates an event\n\n Creates an event *phEvent for the current context with the flags specified via\n \\p Flags. Valid flags include:\n - ::CU_EVENT_DEFAULT: Default event creation flag.\n - ::CU_EVENT_BLOCKING_SYNC: Specifies that the created event should use blocking\n   synchronization.  A CPU thread that uses ::cuEventSynchronize() to wait on\n   an event created with this flag will block until the event has actually\n   been recorded.\n - ::CU_EVENT_DISABLE_TIMING: Specifies that the created event does not need\n   to record timing data.  Events created with this flag specified and\n   the ::CU_EVENT_BLOCKING_SYNC flag not specified will provide the best\n   performance when used with ::cuStreamWaitEvent() and ::cuEventQuery().\n - ::CU_EVENT_INTERPROCESS: Specifies that the created event may be used as an\n   interprocess event by ::cuIpcGetEventHandle(). ::CU_EVENT_INTERPROCESS must\n   be specified along with ::CU_EVENT_DISABLE_TIMING.\n\n \\param phEvent - Returns newly created event\n \\param Flags   - Event creation flags\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\notefnerr\n\n \\sa\n ::cuEventRecord,\n ::cuEventQuery,\n ::cuEventSynchronize,\n ::cuEventDestroy,\n ::cuEventElapsedTime,\n ::cudaEventCreate,\n ::cudaEventCreateWithFlags"]
8519    pub unsafe fn cuEventCreate(
8520        &self,
8521        phEvent: *mut CUevent,
8522        Flags: ::std::os::raw::c_uint,
8523    ) -> CUresult {
8524        (self
8525            .cuEventCreate
8526            .as_ref()
8527            .expect("Expected function, got error."))(phEvent, Flags)
8528    }
8529    #[doc = " \\brief Records an event\n\n Captures in \\p hEvent the contents of \\p hStream at the time of this call.\n \\p hEvent and \\p hStream must be from the same context.\n Calls such as ::cuEventQuery() or ::cuStreamWaitEvent() will then\n examine or wait for completion of the work that was captured. Uses of\n \\p hStream after this call do not modify \\p hEvent. See note on default\n stream behavior for what is captured in the default case.\n\n ::cuEventRecord() can be called multiple times on the same event and\n will overwrite the previously captured state. Other APIs such as\n ::cuStreamWaitEvent() use the most recently captured state at the time\n of the API call, and are not affected by later calls to\n ::cuEventRecord(). Before the first call to ::cuEventRecord(), an\n event represents an empty set of work, so for example ::cuEventQuery()\n would return ::CUDA_SUCCESS.\n\n \\param hEvent  - Event to record\n \\param hStream - Stream to record event for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuEventCreate,\n ::cuEventQuery,\n ::cuEventSynchronize,\n ::cuStreamWaitEvent,\n ::cuEventDestroy,\n ::cuEventElapsedTime,\n ::cudaEventRecord,\n ::cuEventRecordWithFlags"]
8530    pub unsafe fn cuEventRecord(&self, hEvent: CUevent, hStream: CUstream) -> CUresult {
8531        (self
8532            .cuEventRecord
8533            .as_ref()
8534            .expect("Expected function, got error."))(hEvent, hStream)
8535    }
8536    #[doc = " \\brief Records an event\n\n Captures in \\p hEvent the contents of \\p hStream at the time of this call.\n \\p hEvent and \\p hStream must be from the same context.\n Calls such as ::cuEventQuery() or ::cuStreamWaitEvent() will then\n examine or wait for completion of the work that was captured. Uses of\n \\p hStream after this call do not modify \\p hEvent. See note on default\n stream behavior for what is captured in the default case.\n\n ::cuEventRecordWithFlags() can be called multiple times on the same event and\n will overwrite the previously captured state. Other APIs such as\n ::cuStreamWaitEvent() use the most recently captured state at the time\n of the API call, and are not affected by later calls to\n ::cuEventRecordWithFlags(). Before the first call to ::cuEventRecordWithFlags(), an\n event represents an empty set of work, so for example ::cuEventQuery()\n would return ::CUDA_SUCCESS.\n\n flags include:\n - ::CU_EVENT_RECORD_DEFAULT: Default event creation flag.\n - ::CU_EVENT_RECORD_EXTERNAL: Event is captured in the graph as an external\n   event node when performing stream capture. This flag is invalid outside\n   of stream capture.\n\n \\param hEvent  - Event to record\n \\param hStream - Stream to record event for\n \\param flags   - See ::CUevent_capture_flags\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuEventCreate,\n ::cuEventQuery,\n ::cuEventSynchronize,\n ::cuStreamWaitEvent,\n ::cuEventDestroy,\n ::cuEventElapsedTime,\n ::cuEventRecord,\n ::cudaEventRecord"]
8537    pub unsafe fn cuEventRecordWithFlags(
8538        &self,
8539        hEvent: CUevent,
8540        hStream: CUstream,
8541        flags: ::std::os::raw::c_uint,
8542    ) -> CUresult {
8543        (self
8544            .cuEventRecordWithFlags
8545            .as_ref()
8546            .expect("Expected function, got error."))(hEvent, hStream, flags)
8547    }
8548    #[doc = " \\brief Queries an event's status\n\n Queries the status of all work currently captured by \\p hEvent. See\n ::cuEventRecord() for details on what is captured by an event.\n\n Returns ::CUDA_SUCCESS if all captured work has been completed, or\n ::CUDA_ERROR_NOT_READY if any captured work is incomplete.\n\n For the purposes of Unified Memory, a return value of ::CUDA_SUCCESS\n is equivalent to having called ::cuEventSynchronize().\n\n \\param hEvent - Event to query\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_READY\n \\notefnerr\n\n \\sa ::cuEventCreate,\n ::cuEventRecord,\n ::cuEventSynchronize,\n ::cuEventDestroy,\n ::cuEventElapsedTime,\n ::cudaEventQuery"]
8549    pub unsafe fn cuEventQuery(&self, hEvent: CUevent) -> CUresult {
8550        (self
8551            .cuEventQuery
8552            .as_ref()
8553            .expect("Expected function, got error."))(hEvent)
8554    }
8555    #[doc = " \\brief Waits for an event to complete\n\n Waits until the completion of all work currently captured in \\p hEvent.\n See ::cuEventRecord() for details on what is captured by an event.\n\n Waiting for an event that was created with the ::CU_EVENT_BLOCKING_SYNC\n flag will cause the calling CPU thread to block until the event has\n been completed by the device.  If the ::CU_EVENT_BLOCKING_SYNC flag has\n not been set, then the CPU thread will busy-wait until the event has\n been completed by the device.\n\n \\param hEvent - Event to wait for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa ::cuEventCreate,\n ::cuEventRecord,\n ::cuEventQuery,\n ::cuEventDestroy,\n ::cuEventElapsedTime,\n ::cudaEventSynchronize"]
8556    pub unsafe fn cuEventSynchronize(&self, hEvent: CUevent) -> CUresult {
8557        (self
8558            .cuEventSynchronize
8559            .as_ref()
8560            .expect("Expected function, got error."))(hEvent)
8561    }
8562    pub unsafe fn cuEventDestroy_v2(&self, hEvent: CUevent) -> CUresult {
8563        (self
8564            .cuEventDestroy_v2
8565            .as_ref()
8566            .expect("Expected function, got error."))(hEvent)
8567    }
8568    #[doc = " \\brief Computes the elapsed time between two events\n\n Computes the elapsed time between two events (in milliseconds with a\n resolution of around 0.5 microseconds).\n\n If either event was last recorded in a non-NULL stream, the resulting time\n may be greater than expected (even if both used the same stream handle). This\n happens because the ::cuEventRecord() operation takes place asynchronously\n and there is no guarantee that the measured latency is actually just between\n the two events. Any number of other different stream operations could execute\n in between the two measured events, thus altering the timing in a significant\n way.\n\n If ::cuEventRecord() has not been called on either event then\n ::CUDA_ERROR_INVALID_HANDLE is returned. If ::cuEventRecord() has been called\n on both events but one or both of them has not yet been completed (that is,\n ::cuEventQuery() would return ::CUDA_ERROR_NOT_READY on at least one of the\n events), ::CUDA_ERROR_NOT_READY is returned. If either event was created with\n the ::CU_EVENT_DISABLE_TIMING flag, then this function will return\n ::CUDA_ERROR_INVALID_HANDLE.\n\n \\param pMilliseconds - Time between \\p hStart and \\p hEnd in ms\n \\param hStart        - Starting event\n \\param hEnd          - Ending event\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_READY,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa ::cuEventCreate,\n ::cuEventRecord,\n ::cuEventQuery,\n ::cuEventSynchronize,\n ::cuEventDestroy,\n ::cudaEventElapsedTime"]
8569    pub unsafe fn cuEventElapsedTime(
8570        &self,
8571        pMilliseconds: *mut f32,
8572        hStart: CUevent,
8573        hEnd: CUevent,
8574    ) -> CUresult {
8575        (self
8576            .cuEventElapsedTime
8577            .as_ref()
8578            .expect("Expected function, got error."))(pMilliseconds, hStart, hEnd)
8579    }
8580    #[doc = " \\brief Imports an external memory object\n\n Imports an externally allocated memory object and returns\n a handle to that in \\p extMem_out.\n\n The properties of the handle being imported must be described in\n \\p memHandleDesc. The ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC structure\n is defined as follows:\n\n \\code\ntypedef struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st {\nCUexternalMemoryHandleType type;\nunion {\nint fd;\nstruct {\nvoid *handle;\nconst void *name;\n} win32;\nconst void *nvSciBufObject;\n} handle;\nunsigned long long size;\nunsigned int flags;\n} CUDA_EXTERNAL_MEMORY_HANDLE_DESC;\n \\endcode\n\n where ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type specifies the type\n of handle being imported. ::CUexternalMemoryHandleType is\n defined as:\n\n \\code\ntypedef enum CUexternalMemoryHandleType_enum {\nCU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD          = 1,\nCU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32       = 2,\nCU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT   = 3,\nCU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP         = 4,\nCU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE     = 5,\nCU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE     = 6,\nCU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = 7,\nCU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF           = 8\n} CUexternalMemoryHandleType;\n \\endcode\n\n If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type is\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD, then\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::fd must be a valid\n file descriptor referencing a memory object. Ownership of\n the file descriptor is transferred to the CUDA driver when the\n handle is imported successfully. Performing any operations on the\n file descriptor after it is imported results in undefined behavior.\n\n If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type is\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32, then exactly one\n of ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle and\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name must not be\n NULL. If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n references a memory object. Ownership of this handle is\n not transferred to CUDA after the import operation, so the\n application must release the handle using the appropriate system\n call. If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name\n is not NULL, then it must point to a NULL-terminated array of\n UTF-16 characters that refers to a memory object.\n\n If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type is\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT, then\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle must\n be non-NULL and\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name\n must be NULL. The handle specified must be a globally shared KMT\n handle. This handle does not hold a reference to the underlying\n object, and thus will be invalid when all references to the\n memory object are destroyed.\n\n If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type is\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP, then exactly one\n of ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle and\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name must not be\n NULL. If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n is returned by ID3D12Device::CreateSharedHandle when referring to a\n ID3D12Heap object. This handle holds a reference to the underlying\n object. If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name\n is not NULL, then it must point to a NULL-terminated array of\n UTF-16 characters that refers to a ID3D12Heap object.\n\n If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type is\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE, then exactly one\n of ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle and\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name must not be\n NULL. If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n is returned by ID3D12Device::CreateSharedHandle when referring to a\n ID3D12Resource object. This handle holds a reference to the\n underlying object. If\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name\n is not NULL, then it must point to a NULL-terminated array of\n UTF-16 characters that refers to a ID3D12Resource object.\n\n If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type is\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE, then\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle must\n represent a valid shared NT handle that is returned by\n IDXGIResource1::CreateSharedHandle when referring to a\n ID3D11Resource object. If\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name\n is not NULL, then it must point to a NULL-terminated array of\n UTF-16 characters that refers to a ID3D11Resource object.\n\n If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type is\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT, then\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle must\n represent a valid shared KMT handle that is returned by\n IDXGIResource::GetSharedHandle when referring to a\n ID3D11Resource object and\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name\n must be NULL.\n\n If ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type is\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF, then\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::nvSciBufObject must be non-NULL\n and reference a valid NvSciBuf object.\n If the NvSciBuf object imported into CUDA is also mapped by other drivers, then the\n application must use ::cuWaitExternalSemaphoresAsync or ::cuSignalExternalSemaphoresAsync\n as appropriate barriers to maintain coherence between CUDA and the other drivers.\n See ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC and ::CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC\n for memory synchronization.\n\n\n The size of the memory object must be specified in\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::size.\n\n Specifying the flag ::CUDA_EXTERNAL_MEMORY_DEDICATED in\n ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::flags indicates that the\n resource is a dedicated resource. The definition of what a\n dedicated resource is outside the scope of this extension.\n This flag must be set if ::CUDA_EXTERNAL_MEMORY_HANDLE_DESC::type\n is one of the following:\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT\n\n \\param extMem_out    - Returned handle to an external memory object\n \\param memHandleDesc - Memory import handle descriptor\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_OPERATING_SYSTEM\n \\notefnerr\n\n \\note If the Vulkan memory imported into CUDA is mapped on the CPU then the\n application must use vkInvalidateMappedMemoryRanges/vkFlushMappedMemoryRanges\n as well as appropriate Vulkan pipeline barriers to maintain coherence between\n CPU and GPU. For more information on these APIs, please refer to \"Synchronization\n and Cache Control\" chapter from Vulkan specification.\n\n \\sa ::cuDestroyExternalMemory,\n ::cuExternalMemoryGetMappedBuffer,\n ::cuExternalMemoryGetMappedMipmappedArray"]
8581    pub unsafe fn cuImportExternalMemory(
8582        &self,
8583        extMem_out: *mut CUexternalMemory,
8584        memHandleDesc: *const CUDA_EXTERNAL_MEMORY_HANDLE_DESC,
8585    ) -> CUresult {
8586        (self
8587            .cuImportExternalMemory
8588            .as_ref()
8589            .expect("Expected function, got error."))(extMem_out, memHandleDesc)
8590    }
8591    #[doc = " \\brief Maps a buffer onto an imported memory object\n\n Maps a buffer onto an imported memory object and returns a device\n pointer in \\p devPtr.\n\n The properties of the buffer being mapped must be described in\n \\p bufferDesc. The ::CUDA_EXTERNAL_MEMORY_BUFFER_DESC structure is\n defined as follows:\n\n \\code\ntypedef struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st {\nunsigned long long offset;\nunsigned long long size;\nunsigned int flags;\n} CUDA_EXTERNAL_MEMORY_BUFFER_DESC;\n \\endcode\n\n where ::CUDA_EXTERNAL_MEMORY_BUFFER_DESC::offset is the offset in\n the memory object where the buffer's base address is.\n ::CUDA_EXTERNAL_MEMORY_BUFFER_DESC::size is the size of the buffer.\n ::CUDA_EXTERNAL_MEMORY_BUFFER_DESC::flags must be zero.\n\n The offset and size have to be suitably aligned to match the\n requirements of the external API. Mapping two buffers whose ranges\n overlap may or may not result in the same virtual address being\n returned for the overlapped portion. In such cases, the application\n must ensure that all accesses to that region from the GPU are\n volatile. Otherwise writes made via one address are not guaranteed\n to be visible via the other address, even if they're issued by the\n same thread. It is recommended that applications map the combined\n range instead of mapping separate buffers and then apply the\n appropriate offsets to the returned pointer to derive the\n individual buffers.\n\n The returned pointer \\p devPtr must be freed using ::cuMemFree.\n\n \\param devPtr     - Returned device pointer to buffer\n \\param extMem     - Handle to external memory object\n \\param bufferDesc - Buffer descriptor\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa ::cuImportExternalMemory,\n ::cuDestroyExternalMemory,\n ::cuExternalMemoryGetMappedMipmappedArray"]
8592    pub unsafe fn cuExternalMemoryGetMappedBuffer(
8593        &self,
8594        devPtr: *mut CUdeviceptr,
8595        extMem: CUexternalMemory,
8596        bufferDesc: *const CUDA_EXTERNAL_MEMORY_BUFFER_DESC,
8597    ) -> CUresult {
8598        (self
8599            .cuExternalMemoryGetMappedBuffer
8600            .as_ref()
8601            .expect("Expected function, got error."))(devPtr, extMem, bufferDesc)
8602    }
8603    #[doc = " \\brief Maps a CUDA mipmapped array onto an external memory object\n\n Maps a CUDA mipmapped array onto an external object and returns a\n handle to it in \\p mipmap.\n\n The properties of the CUDA mipmapped array being mapped must be\n described in \\p mipmapDesc. The structure\n ::CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC is defined as follows:\n\n \\code\ntypedef struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st {\nunsigned long long offset;\nCUDA_ARRAY3D_DESCRIPTOR arrayDesc;\nunsigned int numLevels;\n} CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC;\n \\endcode\n\n where ::CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC::offset is the\n offset in the memory object where the base level of the mipmap\n chain is.\n ::CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC::arrayDesc describes\n the format, dimensions and type of the base level of the mipmap\n chain. For further details on these parameters, please refer to the\n documentation for ::cuMipmappedArrayCreate. Note that if the mipmapped\n array is bound as a color target in the graphics API, then the flag\n ::CUDA_ARRAY3D_COLOR_ATTACHMENT must be specified in\n ::CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC::arrayDesc::Flags.\n ::CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC::numLevels specifies\n the total number of levels in the mipmap chain.\n\n If \\p extMem was imported from a handle of type ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF, then\n ::CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC::numLevels must be equal to 1.\n\n The returned CUDA mipmapped array must be freed using ::cuMipmappedArrayDestroy.\n\n \\param mipmap     - Returned CUDA mipmapped array\n \\param extMem     - Handle to external memory object\n \\param mipmapDesc - CUDA array descriptor\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa ::cuImportExternalMemory,\n ::cuDestroyExternalMemory,\n ::cuExternalMemoryGetMappedBuffer"]
8604    pub unsafe fn cuExternalMemoryGetMappedMipmappedArray(
8605        &self,
8606        mipmap: *mut CUmipmappedArray,
8607        extMem: CUexternalMemory,
8608        mipmapDesc: *const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC,
8609    ) -> CUresult {
8610        (self
8611            .cuExternalMemoryGetMappedMipmappedArray
8612            .as_ref()
8613            .expect("Expected function, got error."))(mipmap, extMem, mipmapDesc)
8614    }
8615    #[doc = " \\brief Destroys an external memory object.\n\n Destroys the specified external memory object. Any existing buffers\n and CUDA mipmapped arrays mapped onto this object must no longer be\n used and must be explicitly freed using ::cuMemFree and\n ::cuMipmappedArrayDestroy respectively.\n\n \\param extMem - External memory object to be destroyed\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa ::cuImportExternalMemory,\n ::cuExternalMemoryGetMappedBuffer,\n ::cuExternalMemoryGetMappedMipmappedArray"]
8616    pub unsafe fn cuDestroyExternalMemory(&self, extMem: CUexternalMemory) -> CUresult {
8617        (self
8618            .cuDestroyExternalMemory
8619            .as_ref()
8620            .expect("Expected function, got error."))(extMem)
8621    }
8622    #[doc = " \\brief Imports an external semaphore\n\n Imports an externally allocated synchronization object and returns\n a handle to that in \\p extSem_out.\n\n The properties of the handle being imported must be described in\n \\p semHandleDesc. The ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC is\n defined as follows:\n\n \\code\ntypedef struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st {\nCUexternalSemaphoreHandleType type;\nunion {\nint fd;\nstruct {\nvoid *handle;\nconst void *name;\n} win32;\nconst void* NvSciSyncObj;\n} handle;\nunsigned int flags;\n} CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC;\n \\endcode\n\n where ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type specifies the type of\n handle being imported. ::CUexternalSemaphoreHandleType is defined\n as:\n\n \\code\ntypedef enum CUexternalSemaphoreHandleType_enum {\nCU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD                = 1,\nCU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32             = 2,\nCU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT         = 3,\nCU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE              = 4,\nCU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE              = 5,\nCU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC                = 6,\nCU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX        = 7,\nCU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT    = 8,\nCU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD    = 9,\nCU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = 10\n} CUexternalSemaphoreHandleType;\n \\endcode\n\n If ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type is\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD, then\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::fd must be a valid\n file descriptor referencing a synchronization object. Ownership of\n the file descriptor is transferred to the CUDA driver when the\n handle is imported successfully. Performing any operations on the\n file descriptor after it is imported results in undefined behavior.\n\n If ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type is\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32, then exactly one\n of ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle and\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name must not be\n NULL. If\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n references a synchronization object. Ownership of this handle is\n not transferred to CUDA after the import operation, so the\n application must release the handle using the appropriate system\n call. If ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name\n is not NULL, then it must name a valid synchronization object.\n\n If ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type is\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT, then\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle must\n be non-NULL and\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name\n must be NULL. The handle specified must be a globally shared KMT\n handle. This handle does not hold a reference to the underlying\n object, and thus will be invalid when all references to the\n synchronization object are destroyed.\n\n If ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type is\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE, then exactly one\n of ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle and\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name must not be\n NULL. If\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n is returned by ID3D12Device::CreateSharedHandle when referring to a\n ID3D12Fence object. This handle holds a reference to the underlying\n object. If\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name\n is not NULL, then it must name a valid synchronization object that\n refers to a valid ID3D12Fence object.\n\n If ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type is\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE, then\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle\n represents a valid shared NT handle that is returned by\n ID3D11Fence::CreateSharedHandle. If\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name\n is not NULL, then it must name a valid synchronization object that\n refers to a valid ID3D11Fence object.\n\n If ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type is\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, then\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::nvSciSyncObj\n represents a valid NvSciSyncObj.\n\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX, then\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle\n represents a valid shared NT handle that\n is returned by IDXGIResource1::CreateSharedHandle when referring to\n a IDXGIKeyedMutex object. If\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name\n is not NULL, then it must name a valid synchronization object that\n refers to a valid IDXGIKeyedMutex object.\n\n If ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type is\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT, then\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle\n represents a valid shared KMT handle that\n is returned by IDXGIResource::GetSharedHandle when referring to\n a IDXGIKeyedMutex object and\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name must be NULL.\n\n If ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type is\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD, then\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::fd must be a valid\n file descriptor referencing a synchronization object. Ownership of\n the file descriptor is transferred to the CUDA driver when the\n handle is imported successfully. Performing any operations on the\n file descriptor after it is imported results in undefined behavior.\n\n If ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::type is\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32, then exactly one\n of ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle and\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name must not be\n NULL. If\n ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n references a synchronization object. Ownership of this handle is\n not transferred to CUDA after the import operation, so the\n application must release the handle using the appropriate system\n call. If ::CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name\n is not NULL, then it must name a valid synchronization object.\n\n \\param extSem_out    - Returned handle to an external semaphore\n \\param semHandleDesc - Semaphore import handle descriptor\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_OPERATING_SYSTEM\n \\notefnerr\n\n \\sa ::cuDestroyExternalSemaphore,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync"]
8623    pub unsafe fn cuImportExternalSemaphore(
8624        &self,
8625        extSem_out: *mut CUexternalSemaphore,
8626        semHandleDesc: *const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC,
8627    ) -> CUresult {
8628        (self
8629            .cuImportExternalSemaphore
8630            .as_ref()
8631            .expect("Expected function, got error."))(extSem_out, semHandleDesc)
8632    }
8633    #[doc = " \\brief Signals a set of external semaphore objects\n\n Enqueues a signal operation on a set of externally allocated\n semaphore object in the specified stream. The operations will be\n executed when all prior operations in the stream complete.\n\n The exact semantics of signaling a semaphore depends on the type of\n the object.\n\n If the semaphore object is any one of the following types:\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT\n then signaling the semaphore will set it to the signaled state.\n\n If the semaphore object is any one of the following types:\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32\n then the semaphore will be set to the value specified in\n ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::fence::value.\n\n If the semaphore object is of the type ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC\n this API sets ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::nvSciSync::fence\n to a value that can be used by subsequent waiters of the same NvSciSync object\n to order operations with those currently submitted in \\p stream. Such an update\n will overwrite previous contents of\n ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::nvSciSync::fence. By default,\n signaling such an external semaphore object causes appropriate memory synchronization\n operations to be performed over all external memory objects that are imported as\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. This ensures that any subsequent accesses\n made by other importers of the same set of NvSciBuf memory object(s) are coherent.\n These operations can be skipped by specifying the flag\n ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC, which can be used as a\n performance optimization when data coherency is not required. But specifying this\n flag in scenarios where data coherency is required results in undefined behavior.\n Also, for semaphore object of the type ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC,\n if the NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags in\n ::cuDeviceGetNvSciSyncAttributes to CUDA_NVSCISYNC_ATTR_SIGNAL, this API will return\n CUDA_ERROR_NOT_SUPPORTED.\n NvSciSyncFence associated with semaphore object of the type\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC can be deterministic. For this the\n NvSciSyncAttrList used to create the semaphore object must have value of\n NvSciSyncAttrKey_RequireDeterministicFences key set to true. Deterministic fences\n allow users to enqueue a wait over the semaphore object even before corresponding\n signal is enqueued. For such a semaphore object, CUDA guarantees that each signal\n operation will increment the fence value by '1'. Users are expected to track count\n of signals enqueued on the semaphore object and insert waits accordingly. When such\n a semaphore object is signaled from multiple streams, due to concurrent stream\n execution, it is possible that the order in which the semaphore gets signaled is\n indeterministic. This could lead to waiters of the semaphore getting unblocked\n incorrectly. Users are expected to handle such situations, either by not using the\n same semaphore object with deterministic fence support enabled in different streams\n or by adding explicit dependency amongst such streams so that the semaphore is\n signaled in order.\n\n If the semaphore object is any one of the following types:\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT\n then the keyed mutex will be released with the key specified in\n ::CUDA_EXTERNAL_SEMAPHORE_PARAMS::params::keyedmutex::key.\n\n \\param extSemArray - Set of external semaphores to be signaled\n \\param paramsArray - Array of semaphore parameters\n \\param numExtSems  - Number of semaphores to signal\n \\param stream      - Stream to enqueue the signal operations in\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa ::cuImportExternalSemaphore,\n ::cuDestroyExternalSemaphore,\n ::cuWaitExternalSemaphoresAsync"]
8634    pub unsafe fn cuSignalExternalSemaphoresAsync(
8635        &self,
8636        extSemArray: *const CUexternalSemaphore,
8637        paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,
8638        numExtSems: ::std::os::raw::c_uint,
8639        stream: CUstream,
8640    ) -> CUresult {
8641        (self
8642            .cuSignalExternalSemaphoresAsync
8643            .as_ref()
8644            .expect("Expected function, got error."))(
8645            extSemArray, paramsArray, numExtSems, stream
8646        )
8647    }
8648    #[doc = " \\brief Waits on a set of external semaphore objects\n\n Enqueues a wait operation on a set of externally allocated\n semaphore object in the specified stream. The operations will be\n executed when all prior operations in the stream complete.\n\n The exact semantics of waiting on a semaphore depends on the type\n of the object.\n\n If the semaphore object is any one of the following types:\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT\n then waiting on the semaphore will wait until the semaphore reaches\n the signaled state. The semaphore will then be reset to the\n unsignaled state. Therefore for every signal operation, there can\n only be one wait operation.\n\n If the semaphore object is any one of the following types:\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32\n then waiting on the semaphore will wait until the value of the\n semaphore is greater than or equal to\n ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS::params::fence::value.\n\n If the semaphore object is of the type ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC\n then, waiting on the semaphore will wait until the\n ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::nvSciSync::fence is signaled by the\n signaler of the NvSciSyncObj that was associated with this semaphore object.\n By default, waiting on such an external semaphore object causes appropriate\n memory synchronization operations to be performed over all external memory objects\n that are imported as ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. This ensures that\n any subsequent accesses made by other importers of the same set of NvSciBuf memory\n object(s) are coherent. These operations can be skipped by specifying the flag\n ::CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC, which can be used as a\n performance optimization when data coherency is not required. But specifying this\n flag in scenarios where data coherency is required results in undefined behavior.\n Also, for semaphore object of the type ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC,\n if the NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags in\n ::cuDeviceGetNvSciSyncAttributes to CUDA_NVSCISYNC_ATTR_WAIT, this API will return\n CUDA_ERROR_NOT_SUPPORTED.\n\n If the semaphore object is any one of the following types:\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX,\n ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT\n then the keyed mutex will be acquired when it is released with the key\n specified in ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS::params::keyedmutex::key\n or until the timeout specified by\n ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS::params::keyedmutex::timeoutMs\n has lapsed. The timeout interval can either be a finite value\n specified in milliseconds or an infinite value. In case an infinite\n value is specified the timeout never elapses. The windows INFINITE\n macro must be used to specify infinite timeout.\n\n \\param extSemArray - External semaphores to be waited on\n \\param paramsArray - Array of semaphore parameters\n \\param numExtSems  - Number of semaphores to wait on\n \\param stream      - Stream to enqueue the wait operations in\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_TIMEOUT\n \\notefnerr\n\n \\sa ::cuImportExternalSemaphore,\n ::cuDestroyExternalSemaphore,\n ::cuSignalExternalSemaphoresAsync"]
8649    pub unsafe fn cuWaitExternalSemaphoresAsync(
8650        &self,
8651        extSemArray: *const CUexternalSemaphore,
8652        paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,
8653        numExtSems: ::std::os::raw::c_uint,
8654        stream: CUstream,
8655    ) -> CUresult {
8656        (self
8657            .cuWaitExternalSemaphoresAsync
8658            .as_ref()
8659            .expect("Expected function, got error."))(
8660            extSemArray, paramsArray, numExtSems, stream
8661        )
8662    }
8663    #[doc = " \\brief Destroys an external semaphore\n\n Destroys an external semaphore object and releases any references\n to the underlying resource. Any outstanding signals or waits must\n have completed before the semaphore is destroyed.\n\n \\param extSem - External semaphore to be destroyed\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa ::cuImportExternalSemaphore,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync"]
8664    pub unsafe fn cuDestroyExternalSemaphore(&self, extSem: CUexternalSemaphore) -> CUresult {
8665        (self
8666            .cuDestroyExternalSemaphore
8667            .as_ref()
8668            .expect("Expected function, got error."))(extSem)
8669    }
8670    pub unsafe fn cuStreamWaitValue32_v2(
8671        &self,
8672        stream: CUstream,
8673        addr: CUdeviceptr,
8674        value: cuuint32_t,
8675        flags: ::std::os::raw::c_uint,
8676    ) -> CUresult {
8677        (self
8678            .cuStreamWaitValue32_v2
8679            .as_ref()
8680            .expect("Expected function, got error."))(stream, addr, value, flags)
8681    }
8682    pub unsafe fn cuStreamWaitValue64_v2(
8683        &self,
8684        stream: CUstream,
8685        addr: CUdeviceptr,
8686        value: cuuint64_t,
8687        flags: ::std::os::raw::c_uint,
8688    ) -> CUresult {
8689        (self
8690            .cuStreamWaitValue64_v2
8691            .as_ref()
8692            .expect("Expected function, got error."))(stream, addr, value, flags)
8693    }
8694    pub unsafe fn cuStreamWriteValue32_v2(
8695        &self,
8696        stream: CUstream,
8697        addr: CUdeviceptr,
8698        value: cuuint32_t,
8699        flags: ::std::os::raw::c_uint,
8700    ) -> CUresult {
8701        (self
8702            .cuStreamWriteValue32_v2
8703            .as_ref()
8704            .expect("Expected function, got error."))(stream, addr, value, flags)
8705    }
8706    pub unsafe fn cuStreamWriteValue64_v2(
8707        &self,
8708        stream: CUstream,
8709        addr: CUdeviceptr,
8710        value: cuuint64_t,
8711        flags: ::std::os::raw::c_uint,
8712    ) -> CUresult {
8713        (self
8714            .cuStreamWriteValue64_v2
8715            .as_ref()
8716            .expect("Expected function, got error."))(stream, addr, value, flags)
8717    }
8718    pub unsafe fn cuStreamBatchMemOp_v2(
8719        &self,
8720        stream: CUstream,
8721        count: ::std::os::raw::c_uint,
8722        paramArray: *mut CUstreamBatchMemOpParams,
8723        flags: ::std::os::raw::c_uint,
8724    ) -> CUresult {
8725        (self
8726            .cuStreamBatchMemOp_v2
8727            .as_ref()
8728            .expect("Expected function, got error."))(stream, count, paramArray, flags)
8729    }
8730    #[doc = " \\brief Returns information about a function\n\n Returns in \\p *pi the integer value of the attribute \\p attrib on the kernel\n given by \\p hfunc. The supported attributes are:\n - ::CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: The maximum number of threads\n   per block, beyond which a launch of the function would fail. This number\n   depends on both the function and the device on which the function is\n   currently loaded.\n - ::CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: The size in bytes of\n   statically-allocated shared memory per block required by this function.\n   This does not include dynamically-allocated shared memory requested by\n   the user at runtime.\n - ::CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: The size in bytes of user-allocated\n   constant memory required by this function.\n - ::CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: The size in bytes of local memory\n   used by each thread of this function.\n - ::CU_FUNC_ATTRIBUTE_NUM_REGS: The number of registers used by each thread\n   of this function.\n - ::CU_FUNC_ATTRIBUTE_PTX_VERSION: The PTX virtual architecture version for\n   which the function was compiled. This value is the major PTX version * 10\n   + the minor PTX version, so a PTX version 1.3 function would return the\n   value 13. Note that this may return the undefined value of 0 for cubins\n   compiled prior to CUDA 3.0.\n - ::CU_FUNC_ATTRIBUTE_BINARY_VERSION: The binary architecture version for\n   which the function was compiled. This value is the major binary\n   version * 10 + the minor binary version, so a binary version 1.3 function\n   would return the value 13. Note that this will return a value of 10 for\n   legacy cubins that do not have a properly-encoded binary architecture\n   version.\n - ::CU_FUNC_CACHE_MODE_CA: The attribute to indicate whether the function has\n   been compiled with user specified option \"-Xptxas --dlcm=ca\" set .\n - ::CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: The maximum size in bytes of\n   dynamically-allocated shared memory.\n - ::CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: Preferred shared memory-L1\n   cache split ratio in percent of total shared memory.\n - ::CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET: If this attribute is set, the\n   kernel must launch with a valid cluster size specified.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH: The required cluster width in\n   blocks.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT: The required cluster height in\n   blocks.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH: The required cluster depth in\n   blocks.\n - ::CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED: Indicates whether\n   the function can be launched with non-portable cluster size. 1 is allowed,\n   0 is disallowed. A non-portable cluster size may only function on the\n   specific SKUs the program is tested on. The launch might fail if the\n   program is run on a different hardware platform. CUDA API provides\n   cudaOccupancyMaxActiveClusters to assist with checking whether the desired\n   size can be launched on the current device. A portable cluster size is\n   guaranteed to be functional on all compute capabilities higher than the\n   target compute capability. The portable cluster size for sm_90 is 8 blocks\n   per cluster. This value may increase for future compute capabilities. The\n   specific hardware unit may support higher cluster sizes that’s not\n   guaranteed to be portable.\n - ::CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE: The block\n   scheduling policy of a function. The value type is CUclusterSchedulingPolicy.\n\n \\param pi     - Returned attribute value\n \\param attrib - Attribute requested\n \\param hfunc  - Function to query attribute of\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuCtxGetCacheConfig,\n ::cuCtxSetCacheConfig,\n ::cuFuncSetCacheConfig,\n ::cuLaunchKernel,\n ::cudaFuncGetAttributes,\n ::cudaFuncSetAttribute,\n ::cuKernelGetAttribute"]
8731    pub unsafe fn cuFuncGetAttribute(
8732        &self,
8733        pi: *mut ::std::os::raw::c_int,
8734        attrib: CUfunction_attribute,
8735        hfunc: CUfunction,
8736    ) -> CUresult {
8737        (self
8738            .cuFuncGetAttribute
8739            .as_ref()
8740            .expect("Expected function, got error."))(pi, attrib, hfunc)
8741    }
8742    #[doc = " \\brief Sets information about a function\n\n This call sets the value of a specified attribute \\p attrib on the kernel given\n by \\p hfunc to an integer value specified by \\p val\n This function returns CUDA_SUCCESS if the new value of the attribute could be\n successfully set. If the set fails, this call will return an error.\n Not all attributes can have values set. Attempting to set a value on a read-only\n attribute will result in an error (CUDA_ERROR_INVALID_VALUE)\n\n Supported attributes for the cuFuncSetAttribute call are:\n - ::CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: This maximum size in bytes of\n   dynamically-allocated shared memory. The value should contain the requested\n   maximum size of dynamically-allocated shared memory. The sum of this value and\n   the function attribute ::CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES cannot exceed the\n   device attribute ::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN.\n   The maximal size of requestable dynamic shared memory may differ by GPU\n   architecture.\n - ::CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: On devices where the L1\n   cache and shared memory use the same hardware resources, this sets the shared memory\n   carveout preference, in percent of the total shared memory.\n   See ::CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR\n   This is only a hint, and the driver can choose a different ratio if required to execute the function.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH: The required cluster width in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT: The required cluster height in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED.\n - ::CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH: The required cluster depth in\n   blocks. The width, height, and depth values must either all be 0 or all be\n   positive. The validity of the cluster dimensions is checked at launch time.\n   If the value is set during compile time, it cannot be set at runtime.\n   Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED.\n - ::CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE: The block\n   scheduling policy of a function. The value type is CUclusterSchedulingPolicy.\n\n \\param hfunc  - Function to query attribute of\n \\param attrib - Attribute requested\n \\param value   - The value to set\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuCtxGetCacheConfig,\n ::cuCtxSetCacheConfig,\n ::cuFuncSetCacheConfig,\n ::cuLaunchKernel,\n ::cudaFuncGetAttributes,\n ::cudaFuncSetAttribute,\n ::cuKernelSetAttribute"]
8743    pub unsafe fn cuFuncSetAttribute(
8744        &self,
8745        hfunc: CUfunction,
8746        attrib: CUfunction_attribute,
8747        value: ::std::os::raw::c_int,
8748    ) -> CUresult {
8749        (self
8750            .cuFuncSetAttribute
8751            .as_ref()
8752            .expect("Expected function, got error."))(hfunc, attrib, value)
8753    }
8754    #[doc = " \\brief Sets the preferred cache configuration for a device function\n\n On devices where the L1 cache and shared memory use the same hardware\n resources, this sets through \\p config the preferred cache configuration for\n the device function \\p hfunc. This is only a preference. The driver will use\n the requested configuration if possible, but it is free to choose a different\n configuration if required to execute \\p hfunc.  Any context-wide preference\n set via ::cuCtxSetCacheConfig() will be overridden by this per-function\n setting unless the per-function setting is ::CU_FUNC_CACHE_PREFER_NONE. In\n that case, the current context-wide setting will be used.\n\n This setting does nothing on devices where the size of the L1 cache and\n shared memory are fixed.\n\n Launching a kernel with a different preference than the most recent\n preference setting may insert a device-side synchronization point.\n\n\n The supported cache configurations are:\n - ::CU_FUNC_CACHE_PREFER_NONE: no preference for shared memory or L1 (default)\n - ::CU_FUNC_CACHE_PREFER_SHARED: prefer larger shared memory and smaller L1 cache\n - ::CU_FUNC_CACHE_PREFER_L1: prefer larger L1 cache and smaller shared memory\n - ::CU_FUNC_CACHE_PREFER_EQUAL: prefer equal sized L1 cache and shared memory\n\n \\param hfunc  - Kernel to configure cache for\n \\param config - Requested cache configuration\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT\n \\notefnerr\n\n \\sa ::cuCtxGetCacheConfig,\n ::cuCtxSetCacheConfig,\n ::cuFuncGetAttribute,\n ::cuLaunchKernel,\n ::cudaFuncSetCacheConfig,\n ::cuKernelSetCacheConfig"]
8755    pub unsafe fn cuFuncSetCacheConfig(&self, hfunc: CUfunction, config: CUfunc_cache) -> CUresult {
8756        (self
8757            .cuFuncSetCacheConfig
8758            .as_ref()
8759            .expect("Expected function, got error."))(hfunc, config)
8760    }
8761    #[doc = " \\brief Sets the shared memory configuration for a device function.\n\n On devices with configurable shared memory banks, this function will\n force all subsequent launches of the specified device function to have\n the given shared memory bank size configuration. On any given launch of the\n function, the shared memory configuration of the device will be temporarily\n changed if needed to suit the function's preferred configuration. Changes in\n shared memory configuration between subsequent launches of functions,\n may introduce a device side synchronization point.\n\n Any per-function setting of shared memory bank size set via\n ::cuFuncSetSharedMemConfig will override the context wide setting set with\n ::cuCtxSetSharedMemConfig.\n\n Changing the shared memory bank size will not increase shared memory usage\n or affect occupancy of kernels, but may have major effects on performance.\n Larger bank sizes will allow for greater potential bandwidth to shared memory,\n but will change what kinds of accesses to shared memory will result in bank\n conflicts.\n\n This function will do nothing on devices with fixed shared memory bank size.\n\n The supported bank configurations are:\n - ::CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE: use the context's shared memory\n   configuration when launching this function.\n - ::CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE: set shared memory bank width to\n   be natively four bytes when launching this function.\n - ::CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE: set shared memory bank width to\n   be natively eight bytes when launching this function.\n\n \\param hfunc  - kernel to be given a shared memory config\n \\param config - requested shared memory configuration\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT\n \\notefnerr\n\n \\sa ::cuCtxGetCacheConfig,\n ::cuCtxSetCacheConfig,\n ::cuCtxGetSharedMemConfig,\n ::cuCtxSetSharedMemConfig,\n ::cuFuncGetAttribute,\n ::cuLaunchKernel,\n ::cudaFuncSetSharedMemConfig"]
8762    pub unsafe fn cuFuncSetSharedMemConfig(
8763        &self,
8764        hfunc: CUfunction,
8765        config: CUsharedconfig,
8766    ) -> CUresult {
8767        (self
8768            .cuFuncSetSharedMemConfig
8769            .as_ref()
8770            .expect("Expected function, got error."))(hfunc, config)
8771    }
8772    #[doc = " \\brief Returns a module handle\n\n Returns in \\p *hmod the handle of the module that function \\p hfunc\n is located in. The lifetime of the module corresponds to the lifetime of\n the context it was loaded in or until the module is explicitly unloaded.\n\n The CUDA runtime manages its own modules loaded into the primary context.\n If the handle returned by this API refers to a module loaded by the CUDA runtime,\n calling ::cuModuleUnload() on that module will result in undefined behavior.\n\n \\param hmod - Returned module handle\n \\param hfunc   - Function to retrieve module for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_FOUND\n \\notefnerr\n"]
8773    pub unsafe fn cuFuncGetModule(&self, hmod: *mut CUmodule, hfunc: CUfunction) -> CUresult {
8774        (self
8775            .cuFuncGetModule
8776            .as_ref()
8777            .expect("Expected function, got error."))(hmod, hfunc)
8778    }
8779    #[doc = " \\brief Launches a CUDA function ::CUfunction or a CUDA kernel ::CUkernel\n\n Invokes the function ::CUfunction or the kernel ::CUkernel \\p f\n on a \\p gridDimX x \\p gridDimY x \\p gridDimZ grid of blocks.\n Each block contains \\p blockDimX x \\p blockDimY x\n \\p blockDimZ threads.\n\n \\p sharedMemBytes sets the amount of dynamic shared memory that will be\n available to each thread block.\n\n Kernel parameters to \\p f can be specified in one of two ways:\n\n 1) Kernel parameters can be specified via \\p kernelParams.  If \\p f\n has N parameters, then \\p kernelParams needs to be an array of N\n pointers.  Each of \\p kernelParams[0] through \\p kernelParams[N-1]\n must point to a region of memory from which the actual kernel\n parameter will be copied.  The number of kernel parameters and their\n offsets and sizes do not need to be specified as that information is\n retrieved directly from the kernel's image.\n\n 2) Kernel parameters can also be packaged by the application into\n a single buffer that is passed in via the \\p extra parameter.\n This places the burden on the application of knowing each kernel\n parameter's size and alignment/padding within the buffer.  Here is\n an example of using the \\p extra parameter in this manner:\n \\code\nsize_t argBufferSize;\nchar argBuffer[256];\n\n// populate argBuffer and argBufferSize\n\nvoid *config[] = {\nCU_LAUNCH_PARAM_BUFFER_POINTER, argBuffer,\nCU_LAUNCH_PARAM_BUFFER_SIZE,    &argBufferSize,\nCU_LAUNCH_PARAM_END\n};\nstatus = cuLaunchKernel(f, gx, gy, gz, bx, by, bz, sh, s, NULL, config);\n \\endcode\n\n The \\p extra parameter exists to allow ::cuLaunchKernel to take\n additional less commonly used arguments.  \\p extra specifies a list of\n names of extra settings and their corresponding values.  Each extra\n setting name is immediately followed by the corresponding value.  The\n list must be terminated with either NULL or ::CU_LAUNCH_PARAM_END.\n\n - ::CU_LAUNCH_PARAM_END, which indicates the end of the \\p extra\n   array;\n - ::CU_LAUNCH_PARAM_BUFFER_POINTER, which specifies that the next\n   value in \\p extra will be a pointer to a buffer containing all\n   the kernel parameters for launching kernel \\p f;\n - ::CU_LAUNCH_PARAM_BUFFER_SIZE, which specifies that the next\n   value in \\p extra will be a pointer to a size_t containing the\n   size of the buffer specified with ::CU_LAUNCH_PARAM_BUFFER_POINTER;\n\n The error ::CUDA_ERROR_INVALID_VALUE will be returned if kernel\n parameters are specified with both \\p kernelParams and \\p extra\n (i.e. both \\p kernelParams and \\p extra are non-NULL).\n\n Calling ::cuLaunchKernel() invalidates the persistent function state\n set through the following deprecated APIs:\n  ::cuFuncSetBlockShape(),\n  ::cuFuncSetSharedSize(),\n  ::cuParamSetSize(),\n  ::cuParamSeti(),\n  ::cuParamSetf(),\n  ::cuParamSetv().\n\n Note that to use ::cuLaunchKernel(), the kernel \\p f must either have\n been compiled with toolchain version 3.2 or later so that it will\n contain kernel parameter information, or have no kernel parameters.\n If either of these conditions is not met, then ::cuLaunchKernel() will\n return ::CUDA_ERROR_INVALID_IMAGE.\n\n Note that the API can also be used to launch context-less kernel ::CUkernel\n by querying the handle using ::cuLibraryGetKernel() and then passing it\n to the API by casting to ::CUfunction. Here, the context to launch\n the kernel on will either be taken from the specified stream \\p hStream\n or the current context in case of NULL stream.\n\n \\param f              - Function ::CUfunction or Kernel ::CUkernel to launch\n \\param gridDimX       - Width of grid in blocks\n \\param gridDimY       - Height of grid in blocks\n \\param gridDimZ       - Depth of grid in blocks\n \\param blockDimX      - X dimension of each thread block\n \\param blockDimY      - Y dimension of each thread block\n \\param blockDimZ      - Z dimension of each thread block\n \\param sharedMemBytes - Dynamic shared-memory size per thread block in bytes\n \\param hStream        - Stream identifier\n \\param kernelParams   - Array of pointers to kernel parameters\n \\param extra          - Extra options\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_IMAGE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_LAUNCH_FAILED,\n ::CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES,\n ::CUDA_ERROR_LAUNCH_TIMEOUT,\n ::CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED,\n ::CUDA_ERROR_NOT_FOUND\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuCtxGetCacheConfig,\n ::cuCtxSetCacheConfig,\n ::cuFuncSetCacheConfig,\n ::cuFuncGetAttribute,\n ::cudaLaunchKernel,\n ::cuLibraryGetKernel,\n ::cuKernelSetCacheConfig,\n ::cuKernelGetAttribute,\n ::cuKernelSetAttribute"]
8780    pub unsafe fn cuLaunchKernel(
8781        &self,
8782        f: CUfunction,
8783        gridDimX: ::std::os::raw::c_uint,
8784        gridDimY: ::std::os::raw::c_uint,
8785        gridDimZ: ::std::os::raw::c_uint,
8786        blockDimX: ::std::os::raw::c_uint,
8787        blockDimY: ::std::os::raw::c_uint,
8788        blockDimZ: ::std::os::raw::c_uint,
8789        sharedMemBytes: ::std::os::raw::c_uint,
8790        hStream: CUstream,
8791        kernelParams: *mut *mut ::std::os::raw::c_void,
8792        extra: *mut *mut ::std::os::raw::c_void,
8793    ) -> CUresult {
8794        (self
8795            .cuLaunchKernel
8796            .as_ref()
8797            .expect("Expected function, got error."))(
8798            f,
8799            gridDimX,
8800            gridDimY,
8801            gridDimZ,
8802            blockDimX,
8803            blockDimY,
8804            blockDimZ,
8805            sharedMemBytes,
8806            hStream,
8807            kernelParams,
8808            extra,
8809        )
8810    }
8811    #[doc = " \\brief Launches a CUDA function ::CUfunction or a CUDA kernel ::CUkernel with launch-time configuration\n\n Invokes the function ::CUfunction or the kernel ::CUkernel \\p f with the specified launch-time configuration\n \\p config.\n\n The ::CUlaunchConfig structure is defined as:\n \\code\ntypedef struct CUlaunchConfig_st {\nunsigned int gridDimX;\nunsigned int gridDimY;\nunsigned int gridDimZ;\nunsigned int blockDimX;\nunsigned int blockDimY;\nunsigned int blockDimZ;\nunsigned int sharedMemBytes;\nCUstream hStream;\nCUlaunchAttribute *attrs;\nunsigned int numAttrs;\n} CUlaunchConfig;\n \\endcode\n where:\n - ::CUlaunchConfig::gridDimX is the width of the grid in blocks.\n - ::CUlaunchConfig::gridDimY is the height of the grid in blocks.\n - ::CUlaunchConfig::gridDimZ is the depth of the grid in blocks.\n - ::CUlaunchConfig::blockDimX is the X dimension of each thread block.\n - ::CUlaunchConfig::blockDimX is the Y dimension of each thread block.\n - ::CUlaunchConfig::blockDimZ is the Z dimension of each thread block.\n - ::CUlaunchConfig::sharedMemBytes is the dynamic shared-memory size per\n   thread block in bytes.\n - ::CUlaunchConfig::hStream is the handle to the stream to perform the launch\n   in. The CUDA context associated with this stream must match that associated\n   with function f.\n - ::CUlaunchConfig::attrs is an array of ::CUlaunchConfig::numAttrs\n   continguous ::CUlaunchAttribute elements. The value of this pointer is not\n   considered if ::CUlaunchConfig::numAttrs is zero. However, in that case, it\n   is recommended to set the pointer to NULL.\n - ::CUlaunchConfig::numAttrs is the numbers of attributes populating the\n   first ::CUlaunchConfig::numAttrs positions of the ::CUlaunchConfig::attrs\n   array.\n\n Launch-time configuration is specified by adding entries to\n ::CUlaunchConfig::attrs. Each entry is an attribute ID and a corresponding\n attribute value.\n\n The ::CUlaunchAttribute structure is defined as:\n \\code\ntypedef struct CUlaunchAttribute_st {\nCUlaunchAttributeID id;\nCUlaunchAttributeValue value;\n} CUlaunchAttribute;\n \\endcode\n where:\n - ::CUlaunchAttribute::id is a unique enum identifying the attribute.\n - ::CUlaunchAttribute::value is a union that hold the attribute value.\n\n An example of using the \\p config parameter:\n \\code\nCUlaunchAttribute coopAttr = {.id = CU_LAUNCH_ATTRIBUTE_COOPERATIVE,\n.value = 1};\nCUlaunchConfig config = {... // set block and grid dimensions\n.attrs = &coopAttr,\n.numAttrs = 1};\n\ncuLaunchKernelEx(&config, kernel, NULL, NULL);\n \\endcode\n\n The ::CUlaunchAttributeID enum is defined as:\n \\code\ntypedef enum CUlaunchAttributeID_enum {\nCU_LAUNCH_ATTRIBUTE_IGNORE = 0,\nCU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW   = 1,\nCU_LAUNCH_ATTRIBUTE_COOPERATIVE            = 2,\nCU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3,\nCU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION                    = 4,\nCU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5,\nCU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION    = 6,\nCU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT                   = 7,\n} CUlaunchAttributeID;\n \\endcode\n\n and the corresponding ::CUlaunchAttributeValue union as :\n \\code\ntypedef union CUlaunchAttributeValue_union {\ncuuint64_t pad[8];\nCUaccessPolicyWindow accessPolicyWindow;\nint cooperative;\nCUsynchronizationPolicy syncPolicy;\nstruct {\nunsigned int x;\nunsigned int y;\nunsigned int z;\n} clusterDim;\nCUclusterSchedulingPolicy clusterSchedulingPolicyPreference;\nint programmaticStreamSerializationAllowed;\nstruct {\nCUevent event;\nint flags;\nint triggerAtBlockStart;\n} programmaticEvent;\n} CUlaunchAttributeValue;\n \\endcode\n\n Setting ::CU_LAUNCH_ATTRIBUTE_COOPERATIVE to a non-zero value causes the\n kernel launch to be a cooperative launch, with exactly the same usage and\n semantics of ::cuLaunchCooperativeKernel.\n\n Setting ::CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION to a non-zero\n values causes the kernel to use programmatic means to resolve its stream\n dependency -- enabling the CUDA runtime to opportunistically allow the grid's\n execution to overlap with the previous kernel in the stream, if that kernel\n requests the overlap.\n\n ::CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT records an event along with the\n kernel launch. Event recorded through this launch attribute is guaranteed to\n only trigger after all block in the associated kernel trigger the event. A\n block can trigger the event through PTX launchdep.release or CUDA builtin\n function cudaTriggerProgrammaticLaunchCompletion(). A trigger can also be\n inserted at the beginning of each block's execution if triggerAtBlockStart is\n set to non-0. Note that dependents (including the CPU thread calling\n cuEventSynchronize()) are not guaranteed to observe the release precisely\n when it is released. For example, cuEventSynchronize() may only observe the\n event trigger long after the associated kernel has completed. This recording\n type is primarily meant for establishing programmatic dependency between\n device tasks. The event supplied must not be an interprocess or interop\n event. The event must disable timing (i.e. created with\n ::CU_EVENT_DISABLE_TIMING flag set).\n\n The effect of other attributes is consistent with their effect when set via\n persistent APIs.\n\n See ::cuStreamSetAttribute for\n - ::CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW\n - ::CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY\n\n See ::cuFunctionSetAttribute for\n - ::CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION\n - ::CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE\n\n Kernel parameters to \\p f can be specified in the same ways that they can be\n using ::cuLaunchKernel.\n\n Note that the API can also be used to launch context-less kernel ::CUkernel\n by querying the handle using ::cuLibraryGetKernel() and then passing it\n to the API by casting to ::CUfunction. Here, the context to launch\n the kernel on will either be taken from the specified stream ::CUlaunchConfig::hStream\n or the current context in case of NULL stream.\n\n \\param config         - Config to launch\n \\param f              - Function ::CUfunction or Kernel ::CUkernel to launch\n \\param kernelParams   - Array of pointers to kernel parameters\n \\param extra          - Extra options\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_IMAGE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_LAUNCH_FAILED,\n ::CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES,\n ::CUDA_ERROR_LAUNCH_TIMEOUT,\n ::CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING,\n ::CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED,\n ::CUDA_ERROR_NOT_FOUND\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuCtxGetCacheConfig,\n ::cuCtxSetCacheConfig,\n ::cuFuncSetCacheConfig,\n ::cuFuncGetAttribute,\n ::cudaLaunchKernel,\n ::cudaLaunchKernelEx,\n ::cuLibraryGetKernel,\n ::cuKernelSetCacheConfig,\n ::cuKernelGetAttribute,\n ::cuKernelSetAttribute"]
8812    pub unsafe fn cuLaunchKernelEx(
8813        &self,
8814        config: *const CUlaunchConfig,
8815        f: CUfunction,
8816        kernelParams: *mut *mut ::std::os::raw::c_void,
8817        extra: *mut *mut ::std::os::raw::c_void,
8818    ) -> CUresult {
8819        (self
8820            .cuLaunchKernelEx
8821            .as_ref()
8822            .expect("Expected function, got error."))(config, f, kernelParams, extra)
8823    }
8824    #[doc = " \\brief Launches a CUDA function ::CUfunction or a CUDA kernel ::CUkernel where thread blocks\n can cooperate and synchronize as they execute\n\n Invokes the function ::CUfunction or the kernel ::CUkernel \\p f on a \\p gridDimX x \\p gridDimY x \\p gridDimZ\n grid of blocks. Each block contains \\p blockDimX x \\p blockDimY x\n \\p blockDimZ threads.\n\n Note that the API can also be used to launch context-less kernel ::CUkernel\n by querying the handle using ::cuLibraryGetKernel() and then passing it\n to the API by casting to ::CUfunction. Here, the context to launch\n the kernel on will either be taken from the specified stream \\p hStream\n or the current context in case of NULL stream.\n\n \\p sharedMemBytes sets the amount of dynamic shared memory that will be\n available to each thread block.\n\n The device on which this kernel is invoked must have a non-zero value for\n the device attribute ::CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH.\n\n The total number of blocks launched cannot exceed the maximum number of blocks per\n multiprocessor as returned by ::cuOccupancyMaxActiveBlocksPerMultiprocessor (or\n ::cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times the number of multiprocessors\n as specified by the device attribute ::CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT.\n\n The kernel cannot make use of CUDA dynamic parallelism.\n\n Kernel parameters must be specified via \\p kernelParams.  If \\p f\n has N parameters, then \\p kernelParams needs to be an array of N\n pointers.  Each of \\p kernelParams[0] through \\p kernelParams[N-1]\n must point to a region of memory from which the actual kernel\n parameter will be copied.  The number of kernel parameters and their\n offsets and sizes do not need to be specified as that information is\n retrieved directly from the kernel's image.\n\n Calling ::cuLaunchCooperativeKernel() sets persistent function state that is\n the same as function state set through ::cuLaunchKernel API\n\n When the kernel \\p f is launched via ::cuLaunchCooperativeKernel(), the previous\n block shape, shared size and parameter info associated with \\p f\n is overwritten.\n\n Note that to use ::cuLaunchCooperativeKernel(), the kernel \\p f must either have\n been compiled with toolchain version 3.2 or later so that it will\n contain kernel parameter information, or have no kernel parameters.\n If either of these conditions is not met, then ::cuLaunchCooperativeKernel() will\n return ::CUDA_ERROR_INVALID_IMAGE.\n\n Note that the API can also be used to launch context-less kernel ::CUkernel\n by querying the handle using ::cuLibraryGetKernel() and then passing it\n to the API by casting to ::CUfunction. Here, the context to launch\n the kernel on will either be taken from the specified stream \\p hStream\n or the current context in case of NULL stream.\n\n \\param f              - Function ::CUfunction or Kernel ::CUkernel to launch\n \\param gridDimX       - Width of grid in blocks\n \\param gridDimY       - Height of grid in blocks\n \\param gridDimZ       - Depth of grid in blocks\n \\param blockDimX      - X dimension of each thread block\n \\param blockDimY      - Y dimension of each thread block\n \\param blockDimZ      - Z dimension of each thread block\n \\param sharedMemBytes - Dynamic shared-memory size per thread block in bytes\n \\param hStream        - Stream identifier\n \\param kernelParams   - Array of pointers to kernel parameters\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_IMAGE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_LAUNCH_FAILED,\n ::CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES,\n ::CUDA_ERROR_LAUNCH_TIMEOUT,\n ::CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING,\n ::CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED,\n ::CUDA_ERROR_NOT_FOUND\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuCtxGetCacheConfig,\n ::cuCtxSetCacheConfig,\n ::cuFuncSetCacheConfig,\n ::cuFuncGetAttribute,\n ::cuLaunchCooperativeKernelMultiDevice,\n ::cudaLaunchCooperativeKernel,\n ::cuLibraryGetKernel,\n ::cuKernelSetCacheConfig,\n ::cuKernelGetAttribute,\n ::cuKernelSetAttribute"]
8825    pub unsafe fn cuLaunchCooperativeKernel(
8826        &self,
8827        f: CUfunction,
8828        gridDimX: ::std::os::raw::c_uint,
8829        gridDimY: ::std::os::raw::c_uint,
8830        gridDimZ: ::std::os::raw::c_uint,
8831        blockDimX: ::std::os::raw::c_uint,
8832        blockDimY: ::std::os::raw::c_uint,
8833        blockDimZ: ::std::os::raw::c_uint,
8834        sharedMemBytes: ::std::os::raw::c_uint,
8835        hStream: CUstream,
8836        kernelParams: *mut *mut ::std::os::raw::c_void,
8837    ) -> CUresult {
8838        (self
8839            .cuLaunchCooperativeKernel
8840            .as_ref()
8841            .expect("Expected function, got error."))(
8842            f,
8843            gridDimX,
8844            gridDimY,
8845            gridDimZ,
8846            blockDimX,
8847            blockDimY,
8848            blockDimZ,
8849            sharedMemBytes,
8850            hStream,
8851            kernelParams,
8852        )
8853    }
8854    #[doc = " \\brief Launches CUDA functions on multiple devices where thread blocks can cooperate and synchronize as they execute\n\n \\deprecated This function is deprecated as of CUDA 11.3.\n\n Invokes kernels as specified in the \\p launchParamsList array where each element\n of the array specifies all the parameters required to perform a single kernel launch.\n These kernels can cooperate and synchronize as they execute. The size of the array is\n specified by \\p numDevices.\n\n No two kernels can be launched on the same device. All the devices targeted by this\n multi-device launch must be identical. All devices must have a non-zero value for the\n device attribute ::CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH.\n\n All kernels launched must be identical with respect to the compiled code. Note that\n any __device__, __constant__ or __managed__ variables present in the module that owns\n the kernel launched on each device, are independently instantiated on every device.\n It is the application's responsiblity to ensure these variables are initialized and\n used appropriately.\n\n The size of the grids as specified in blocks, the size of the blocks themselves\n and the amount of shared memory used by each thread block must also match across\n all launched kernels.\n\n The streams used to launch these kernels must have been created via either ::cuStreamCreate\n or ::cuStreamCreateWithPriority. The NULL stream or ::CU_STREAM_LEGACY or ::CU_STREAM_PER_THREAD\n cannot be used.\n\n The total number of blocks launched per kernel cannot exceed the maximum number of blocks\n per multiprocessor as returned by ::cuOccupancyMaxActiveBlocksPerMultiprocessor (or\n ::cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times the number of multiprocessors\n as specified by the device attribute ::CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT. Since the\n total number of blocks launched per device has to match across all devices, the maximum\n number of blocks that can be launched per device will be limited by the device with the\n least number of multiprocessors.\n\n The kernels cannot make use of CUDA dynamic parallelism.\n\n The ::CUDA_LAUNCH_PARAMS structure is defined as:\n \\code\ntypedef struct CUDA_LAUNCH_PARAMS_st\n{\nCUfunction function;\nunsigned int gridDimX;\nunsigned int gridDimY;\nunsigned int gridDimZ;\nunsigned int blockDimX;\nunsigned int blockDimY;\nunsigned int blockDimZ;\nunsigned int sharedMemBytes;\nCUstream hStream;\nvoid **kernelParams;\n} CUDA_LAUNCH_PARAMS;\n \\endcode\n where:\n - ::CUDA_LAUNCH_PARAMS::function specifies the kernel to be launched. All functions must\n   be identical with respect to the compiled code.\n   Note that you can also specify context-less kernel ::CUkernel by querying the handle\n   using ::cuLibraryGetKernel() and then casting to ::CUfunction. In this case, the context to\n   launch the kernel on be taken from the specified stream ::CUDA_LAUNCH_PARAMS::hStream.\n - ::CUDA_LAUNCH_PARAMS::gridDimX is the width of the grid in blocks. This must match across\n   all kernels launched.\n - ::CUDA_LAUNCH_PARAMS::gridDimY is the height of the grid in blocks. This must match across\n   all kernels launched.\n - ::CUDA_LAUNCH_PARAMS::gridDimZ is the depth of the grid in blocks. This must match across\n   all kernels launched.\n - ::CUDA_LAUNCH_PARAMS::blockDimX is the X dimension of each thread block. This must match across\n   all kernels launched.\n - ::CUDA_LAUNCH_PARAMS::blockDimX is the Y dimension of each thread block. This must match across\n   all kernels launched.\n - ::CUDA_LAUNCH_PARAMS::blockDimZ is the Z dimension of each thread block. This must match across\n   all kernels launched.\n - ::CUDA_LAUNCH_PARAMS::sharedMemBytes is the dynamic shared-memory size per thread block in bytes.\n   This must match across all kernels launched.\n - ::CUDA_LAUNCH_PARAMS::hStream is the handle to the stream to perform the launch in. This cannot\n   be the NULL stream or ::CU_STREAM_LEGACY or ::CU_STREAM_PER_THREAD. The CUDA context associated\n   with this stream must match that associated with ::CUDA_LAUNCH_PARAMS::function.\n - ::CUDA_LAUNCH_PARAMS::kernelParams is an array of pointers to kernel parameters. If\n   ::CUDA_LAUNCH_PARAMS::function has N parameters, then ::CUDA_LAUNCH_PARAMS::kernelParams\n   needs to be an array of N pointers. Each of ::CUDA_LAUNCH_PARAMS::kernelParams[0] through\n   ::CUDA_LAUNCH_PARAMS::kernelParams[N-1] must point to a region of memory from which the actual\n   kernel parameter will be copied. The number of kernel parameters and their offsets and sizes\n   do not need to be specified as that information is retrieved directly from the kernel's image.\n\n By default, the kernel won't begin execution on any GPU until all prior work in all the specified\n streams has completed. This behavior can be overridden by specifying the flag\n ::CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC. When this flag is specified, each kernel\n will only wait for prior work in the stream corresponding to that GPU to complete before it begins\n execution.\n\n Similarly, by default, any subsequent work pushed in any of the specified streams will not begin\n execution until the kernels on all GPUs have completed. This behavior can be overridden by specifying\n the flag ::CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC. When this flag is specified,\n any subsequent work pushed in any of the specified streams will only wait for the kernel launched\n on the GPU corresponding to that stream to complete before it begins execution.\n\n Calling ::cuLaunchCooperativeKernelMultiDevice() sets persistent function state that is\n the same as function state set through ::cuLaunchKernel API when called individually for each\n element in \\p launchParamsList.\n\n When kernels are launched via ::cuLaunchCooperativeKernelMultiDevice(), the previous\n block shape, shared size and parameter info associated with each ::CUDA_LAUNCH_PARAMS::function\n in \\p launchParamsList is overwritten.\n\n Note that to use ::cuLaunchCooperativeKernelMultiDevice(), the kernels must either have\n been compiled with toolchain version 3.2 or later so that it will\n contain kernel parameter information, or have no kernel parameters.\n If either of these conditions is not met, then ::cuLaunchCooperativeKernelMultiDevice() will\n return ::CUDA_ERROR_INVALID_IMAGE.\n\n \\param launchParamsList - List of launch parameters, one per device\n \\param numDevices       - Size of the \\p launchParamsList array\n \\param flags            - Flags to control launch behavior\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_IMAGE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_LAUNCH_FAILED,\n ::CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES,\n ::CUDA_ERROR_LAUNCH_TIMEOUT,\n ::CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING,\n ::CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuCtxGetCacheConfig,\n ::cuCtxSetCacheConfig,\n ::cuFuncSetCacheConfig,\n ::cuFuncGetAttribute,\n ::cuLaunchCooperativeKernel,\n ::cudaLaunchCooperativeKernelMultiDevice"]
8855    pub unsafe fn cuLaunchCooperativeKernelMultiDevice(
8856        &self,
8857        launchParamsList: *mut CUDA_LAUNCH_PARAMS,
8858        numDevices: ::std::os::raw::c_uint,
8859        flags: ::std::os::raw::c_uint,
8860    ) -> CUresult {
8861        (self
8862            .cuLaunchCooperativeKernelMultiDevice
8863            .as_ref()
8864            .expect("Expected function, got error."))(launchParamsList, numDevices, flags)
8865    }
8866    #[doc = " \\brief Enqueues a host function call in a stream\n\n Enqueues a host function to run in a stream.  The function will be called\n after currently enqueued work and will block work added after it.\n\n The host function must not make any CUDA API calls.  Attempting to use a\n CUDA API may result in ::CUDA_ERROR_NOT_PERMITTED, but this is not required.\n The host function must not perform any synchronization that may depend on\n outstanding CUDA work not mandated to run earlier.  Host functions without a\n mandated order (such as in independent streams) execute in undefined order\n and may be serialized.\n\n For the purposes of Unified Memory, execution makes a number of guarantees:\n <ul>\n   <li>The stream is considered idle for the duration of the function's\n   execution.  Thus, for example, the function may always use memory attached\n   to the stream it was enqueued in.</li>\n   <li>The start of execution of the function has the same effect as\n   synchronizing an event recorded in the same stream immediately prior to\n   the function.  It thus synchronizes streams which have been \"joined\"\n   prior to the function.</li>\n   <li>Adding device work to any stream does not have the effect of making\n   the stream active until all preceding host functions and stream callbacks\n   have executed.  Thus, for\n   example, a function might use global attached memory even if work has\n   been added to another stream, if the work has been ordered behind the\n   function call with an event.</li>\n   <li>Completion of the function does not cause a stream to become\n   active except as described above.  The stream will remain idle\n   if no device work follows the function, and will remain idle across\n   consecutive host functions or stream callbacks without device work in\n   between.  Thus, for example,\n   stream synchronization can be done by signaling from a host function at the\n   end of the stream.</li>\n </ul>\n\n Note that, in contrast to ::cuStreamAddCallback, the function will not be\n called in the event of an error in the CUDA context.\n\n \\param hStream  - Stream to enqueue function call in\n \\param fn       - The function to call once preceding stream operations are complete\n \\param userData - User-specified data to be passed to the function\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuStreamCreate,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamWaitEvent,\n ::cuStreamDestroy,\n ::cuMemAllocManaged,\n ::cuStreamAttachMemAsync,\n ::cuStreamAddCallback"]
8867    pub unsafe fn cuLaunchHostFunc(
8868        &self,
8869        hStream: CUstream,
8870        fn_: CUhostFn,
8871        userData: *mut ::std::os::raw::c_void,
8872    ) -> CUresult {
8873        (self
8874            .cuLaunchHostFunc
8875            .as_ref()
8876            .expect("Expected function, got error."))(hStream, fn_, userData)
8877    }
8878    #[doc = " \\brief Sets the block-dimensions for the function\n\n \\deprecated\n\n Specifies the \\p x, \\p y, and \\p z dimensions of the thread blocks that are\n created when the kernel given by \\p hfunc is launched.\n\n \\param hfunc - Kernel to specify dimensions of\n \\param x     - X dimension\n \\param y     - Y dimension\n \\param z     - Z dimension\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuFuncSetSharedSize,\n ::cuFuncSetCacheConfig,\n ::cuFuncGetAttribute,\n ::cuParamSetSize,\n ::cuParamSeti,\n ::cuParamSetf,\n ::cuParamSetv,\n ::cuLaunch,\n ::cuLaunchGrid,\n ::cuLaunchGridAsync,\n ::cuLaunchKernel"]
8879    pub unsafe fn cuFuncSetBlockShape(
8880        &self,
8881        hfunc: CUfunction,
8882        x: ::std::os::raw::c_int,
8883        y: ::std::os::raw::c_int,
8884        z: ::std::os::raw::c_int,
8885    ) -> CUresult {
8886        (self
8887            .cuFuncSetBlockShape
8888            .as_ref()
8889            .expect("Expected function, got error."))(hfunc, x, y, z)
8890    }
8891    #[doc = " \\brief Sets the dynamic shared-memory size for the function\n\n \\deprecated\n\n Sets through \\p bytes the amount of dynamic shared memory that will be\n available to each thread block when the kernel given by \\p hfunc is launched.\n\n \\param hfunc - Kernel to specify dynamic shared-memory size for\n \\param bytes - Dynamic shared-memory size per thread in bytes\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuFuncSetBlockShape,\n ::cuFuncSetCacheConfig,\n ::cuFuncGetAttribute,\n ::cuParamSetSize,\n ::cuParamSeti,\n ::cuParamSetf,\n ::cuParamSetv,\n ::cuLaunch,\n ::cuLaunchGrid,\n ::cuLaunchGridAsync,\n ::cuLaunchKernel"]
8892    pub unsafe fn cuFuncSetSharedSize(
8893        &self,
8894        hfunc: CUfunction,
8895        bytes: ::std::os::raw::c_uint,
8896    ) -> CUresult {
8897        (self
8898            .cuFuncSetSharedSize
8899            .as_ref()
8900            .expect("Expected function, got error."))(hfunc, bytes)
8901    }
8902    #[doc = " \\brief Sets the parameter size for the function\n\n \\deprecated\n\n Sets through \\p numbytes the total size in bytes needed by the function\n parameters of the kernel corresponding to \\p hfunc.\n\n \\param hfunc    - Kernel to set parameter size for\n \\param numbytes - Size of parameter list in bytes\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuFuncSetBlockShape,\n ::cuFuncSetSharedSize,\n ::cuFuncGetAttribute,\n ::cuParamSetf,\n ::cuParamSeti,\n ::cuParamSetv,\n ::cuLaunch,\n ::cuLaunchGrid,\n ::cuLaunchGridAsync,\n ::cuLaunchKernel"]
8903    pub unsafe fn cuParamSetSize(
8904        &self,
8905        hfunc: CUfunction,
8906        numbytes: ::std::os::raw::c_uint,
8907    ) -> CUresult {
8908        (self
8909            .cuParamSetSize
8910            .as_ref()
8911            .expect("Expected function, got error."))(hfunc, numbytes)
8912    }
8913    #[doc = " \\brief Adds an integer parameter to the function's argument list\n\n \\deprecated\n\n Sets an integer parameter that will be specified the next time the\n kernel corresponding to \\p hfunc will be invoked. \\p offset is a byte offset.\n\n \\param hfunc  - Kernel to add parameter to\n \\param offset - Offset to add parameter to argument list\n \\param value  - Value of parameter\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuFuncSetBlockShape,\n ::cuFuncSetSharedSize,\n ::cuFuncGetAttribute,\n ::cuParamSetSize,\n ::cuParamSetf,\n ::cuParamSetv,\n ::cuLaunch,\n ::cuLaunchGrid,\n ::cuLaunchGridAsync,\n ::cuLaunchKernel"]
8914    pub unsafe fn cuParamSeti(
8915        &self,
8916        hfunc: CUfunction,
8917        offset: ::std::os::raw::c_int,
8918        value: ::std::os::raw::c_uint,
8919    ) -> CUresult {
8920        (self
8921            .cuParamSeti
8922            .as_ref()
8923            .expect("Expected function, got error."))(hfunc, offset, value)
8924    }
8925    #[doc = " \\brief Adds a floating-point parameter to the function's argument list\n\n \\deprecated\n\n Sets a floating-point parameter that will be specified the next time the\n kernel corresponding to \\p hfunc will be invoked. \\p offset is a byte offset.\n\n \\param hfunc  - Kernel to add parameter to\n \\param offset - Offset to add parameter to argument list\n \\param value  - Value of parameter\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuFuncSetBlockShape,\n ::cuFuncSetSharedSize,\n ::cuFuncGetAttribute,\n ::cuParamSetSize,\n ::cuParamSeti,\n ::cuParamSetv,\n ::cuLaunch,\n ::cuLaunchGrid,\n ::cuLaunchGridAsync,\n ::cuLaunchKernel"]
8926    pub unsafe fn cuParamSetf(
8927        &self,
8928        hfunc: CUfunction,
8929        offset: ::std::os::raw::c_int,
8930        value: f32,
8931    ) -> CUresult {
8932        (self
8933            .cuParamSetf
8934            .as_ref()
8935            .expect("Expected function, got error."))(hfunc, offset, value)
8936    }
8937    #[doc = " \\brief Adds arbitrary data to the function's argument list\n\n \\deprecated\n\n Copies an arbitrary amount of data (specified in \\p numbytes) from \\p ptr\n into the parameter space of the kernel corresponding to \\p hfunc. \\p offset\n is a byte offset.\n\n \\param hfunc    - Kernel to add data to\n \\param offset   - Offset to add data to argument list\n \\param ptr      - Pointer to arbitrary data\n \\param numbytes - Size of data to copy in bytes\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuFuncSetBlockShape,\n ::cuFuncSetSharedSize,\n ::cuFuncGetAttribute,\n ::cuParamSetSize,\n ::cuParamSetf,\n ::cuParamSeti,\n ::cuLaunch,\n ::cuLaunchGrid,\n ::cuLaunchGridAsync,\n ::cuLaunchKernel"]
8938    pub unsafe fn cuParamSetv(
8939        &self,
8940        hfunc: CUfunction,
8941        offset: ::std::os::raw::c_int,
8942        ptr: *mut ::std::os::raw::c_void,
8943        numbytes: ::std::os::raw::c_uint,
8944    ) -> CUresult {
8945        (self
8946            .cuParamSetv
8947            .as_ref()
8948            .expect("Expected function, got error."))(hfunc, offset, ptr, numbytes)
8949    }
8950    #[doc = " \\brief Launches a CUDA function\n\n \\deprecated\n\n Invokes the kernel \\p f on a 1 x 1 x 1 grid of blocks. The block\n contains the number of threads specified by a previous call to\n ::cuFuncSetBlockShape().\n\n The block shape, dynamic shared memory size, and parameter information\n must be set using\n  ::cuFuncSetBlockShape(),\n  ::cuFuncSetSharedSize(),\n  ::cuParamSetSize(),\n  ::cuParamSeti(),\n  ::cuParamSetf(), and\n  ::cuParamSetv()\n prior to calling this function.\n\n Launching a function via ::cuLaunchKernel() invalidates the function's\n block shape, dynamic shared memory size, and parameter information. After\n launching via cuLaunchKernel, this state must be re-initialized prior to\n calling this function. Failure to do so results in undefined behavior.\n\n \\param f - Kernel to launch\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_LAUNCH_FAILED,\n ::CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES,\n ::CUDA_ERROR_LAUNCH_TIMEOUT,\n ::CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED\n \\notefnerr\n\n \\sa ::cuFuncSetBlockShape,\n ::cuFuncSetSharedSize,\n ::cuFuncGetAttribute,\n ::cuParamSetSize,\n ::cuParamSetf,\n ::cuParamSeti,\n ::cuParamSetv,\n ::cuLaunchGrid,\n ::cuLaunchGridAsync,\n ::cuLaunchKernel"]
8951    pub unsafe fn cuLaunch(&self, f: CUfunction) -> CUresult {
8952        (self
8953            .cuLaunch
8954            .as_ref()
8955            .expect("Expected function, got error."))(f)
8956    }
8957    #[doc = " \\brief Launches a CUDA function\n\n \\deprecated\n\n Invokes the kernel \\p f on a \\p grid_width x \\p grid_height grid of\n blocks. Each block contains the number of threads specified by a previous\n call to ::cuFuncSetBlockShape().\n\n The block shape, dynamic shared memory size, and parameter information\n must be set using\n  ::cuFuncSetBlockShape(),\n  ::cuFuncSetSharedSize(),\n  ::cuParamSetSize(),\n  ::cuParamSeti(),\n  ::cuParamSetf(), and\n  ::cuParamSetv()\n prior to calling this function.\n\n Launching a function via ::cuLaunchKernel() invalidates the function's\n block shape, dynamic shared memory size, and parameter information. After\n launching via cuLaunchKernel, this state must be re-initialized prior to\n calling this function. Failure to do so results in undefined behavior.\n\n \\param f           - Kernel to launch\n \\param grid_width  - Width of grid in blocks\n \\param grid_height - Height of grid in blocks\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_LAUNCH_FAILED,\n ::CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES,\n ::CUDA_ERROR_LAUNCH_TIMEOUT,\n ::CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED\n \\notefnerr\n\n \\sa ::cuFuncSetBlockShape,\n ::cuFuncSetSharedSize,\n ::cuFuncGetAttribute,\n ::cuParamSetSize,\n ::cuParamSetf,\n ::cuParamSeti,\n ::cuParamSetv,\n ::cuLaunch,\n ::cuLaunchGridAsync,\n ::cuLaunchKernel"]
8958    pub unsafe fn cuLaunchGrid(
8959        &self,
8960        f: CUfunction,
8961        grid_width: ::std::os::raw::c_int,
8962        grid_height: ::std::os::raw::c_int,
8963    ) -> CUresult {
8964        (self
8965            .cuLaunchGrid
8966            .as_ref()
8967            .expect("Expected function, got error."))(f, grid_width, grid_height)
8968    }
8969    #[doc = " \\brief Launches a CUDA function\n\n \\deprecated\n\n Invokes the kernel \\p f on a \\p grid_width x \\p grid_height grid of\n blocks. Each block contains the number of threads specified by a previous\n call to ::cuFuncSetBlockShape().\n\n The block shape, dynamic shared memory size, and parameter information\n must be set using\n  ::cuFuncSetBlockShape(),\n  ::cuFuncSetSharedSize(),\n  ::cuParamSetSize(),\n  ::cuParamSeti(),\n  ::cuParamSetf(), and\n  ::cuParamSetv()\n prior to calling this function.\n\n Launching a function via ::cuLaunchKernel() invalidates the function's\n block shape, dynamic shared memory size, and parameter information. After\n launching via cuLaunchKernel, this state must be re-initialized prior to\n calling this function. Failure to do so results in undefined behavior.\n\n \\param f           - Kernel to launch\n \\param grid_width  - Width of grid in blocks\n \\param grid_height - Height of grid in blocks\n \\param hStream     - Stream identifier\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_LAUNCH_FAILED,\n ::CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES,\n ::CUDA_ERROR_LAUNCH_TIMEOUT,\n ::CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING,\n ::CUDA_ERROR_SHARED_OBJECT_INIT_FAILED\n\n \\note In certain cases where cubins are created with no ABI (i.e., using \\p ptxas \\p --abi-compile \\p no),\n       this function may serialize kernel launches. The CUDA driver retains asynchronous behavior by\n       growing the per-thread stack as needed per launch and not shrinking it afterwards.\n\n \\note_null_stream\n \\notefnerr\n\n \\sa ::cuFuncSetBlockShape,\n ::cuFuncSetSharedSize,\n ::cuFuncGetAttribute,\n ::cuParamSetSize,\n ::cuParamSetf,\n ::cuParamSeti,\n ::cuParamSetv,\n ::cuLaunch,\n ::cuLaunchGrid,\n ::cuLaunchKernel"]
8970    pub unsafe fn cuLaunchGridAsync(
8971        &self,
8972        f: CUfunction,
8973        grid_width: ::std::os::raw::c_int,
8974        grid_height: ::std::os::raw::c_int,
8975        hStream: CUstream,
8976    ) -> CUresult {
8977        (self
8978            .cuLaunchGridAsync
8979            .as_ref()
8980            .expect("Expected function, got error."))(f, grid_width, grid_height, hStream)
8981    }
8982    #[doc = " \\brief Adds a texture-reference to the function's argument list\n\n \\deprecated\n\n Makes the CUDA array or linear memory bound to the texture reference\n \\p hTexRef available to a device program as a texture. In this version of\n CUDA, the texture-reference must be obtained via ::cuModuleGetTexRef() and\n the \\p texunit parameter must be set to ::CU_PARAM_TR_DEFAULT.\n\n \\param hfunc   - Kernel to add texture-reference to\n \\param texunit - Texture unit (must be ::CU_PARAM_TR_DEFAULT)\n \\param hTexRef - Texture-reference to add to argument list\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr"]
8983    pub unsafe fn cuParamSetTexRef(
8984        &self,
8985        hfunc: CUfunction,
8986        texunit: ::std::os::raw::c_int,
8987        hTexRef: CUtexref,
8988    ) -> CUresult {
8989        (self
8990            .cuParamSetTexRef
8991            .as_ref()
8992            .expect("Expected function, got error."))(hfunc, texunit, hTexRef)
8993    }
8994    #[doc = " \\brief Creates a graph\n\n Creates an empty graph, which is returned via \\p phGraph.\n\n \\param phGraph - Returns newly created graph\n \\param flags   - Graph creation flags, must be 0\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddHostNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode,\n ::cuGraphInstantiate,\n ::cuGraphDestroy,\n ::cuGraphGetNodes,\n ::cuGraphGetRootNodes,\n ::cuGraphGetEdges,\n ::cuGraphClone"]
8995    pub unsafe fn cuGraphCreate(
8996        &self,
8997        phGraph: *mut CUgraph,
8998        flags: ::std::os::raw::c_uint,
8999    ) -> CUresult {
9000        (self
9001            .cuGraphCreate
9002            .as_ref()
9003            .expect("Expected function, got error."))(phGraph, flags)
9004    }
9005    pub unsafe fn cuGraphAddKernelNode_v2(
9006        &self,
9007        phGraphNode: *mut CUgraphNode,
9008        hGraph: CUgraph,
9009        dependencies: *const CUgraphNode,
9010        numDependencies: usize,
9011        nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
9012    ) -> CUresult {
9013        (self
9014            .cuGraphAddKernelNode_v2
9015            .as_ref()
9016            .expect("Expected function, got error."))(
9017            phGraphNode,
9018            hGraph,
9019            dependencies,
9020            numDependencies,
9021            nodeParams,
9022        )
9023    }
9024    pub unsafe fn cuGraphKernelNodeGetParams_v2(
9025        &self,
9026        hNode: CUgraphNode,
9027        nodeParams: *mut CUDA_KERNEL_NODE_PARAMS,
9028    ) -> CUresult {
9029        (self
9030            .cuGraphKernelNodeGetParams_v2
9031            .as_ref()
9032            .expect("Expected function, got error."))(hNode, nodeParams)
9033    }
9034    pub unsafe fn cuGraphKernelNodeSetParams_v2(
9035        &self,
9036        hNode: CUgraphNode,
9037        nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
9038    ) -> CUresult {
9039        (self
9040            .cuGraphKernelNodeSetParams_v2
9041            .as_ref()
9042            .expect("Expected function, got error."))(hNode, nodeParams)
9043    }
9044    #[doc = " \\brief Creates a memcpy node and adds it to a graph\n\n Creates a new memcpy node and adds it to \\p hGraph with \\p numDependencies\n dependencies specified via \\p dependencies.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p dependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p phGraphNode.\n\n When the graph is launched, the node will perform the memcpy described by \\p copyParams.\n See ::cuMemcpy3D() for a description of the structure and its restrictions.\n\n Memcpy nodes have some additional restrictions with regards to managed memory, if the\n system contains at least one device which has a zero value for the device attribute\n ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. If one or more of the operands refer\n to managed memory, then using the memory type ::CU_MEMORYTYPE_UNIFIED is disallowed\n for those operand(s). The managed memory will be treated as residing on either the\n host or the device, depending on which memory type is specified.\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param copyParams      - Parameters for the memory copy\n \\param ctx             - Context on which to run the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuMemcpy3D,\n ::cuGraphMemcpyNodeGetParams,\n ::cuGraphMemcpyNodeSetParams,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddHostNode,\n ::cuGraphAddMemsetNode"]
9045    pub unsafe fn cuGraphAddMemcpyNode(
9046        &self,
9047        phGraphNode: *mut CUgraphNode,
9048        hGraph: CUgraph,
9049        dependencies: *const CUgraphNode,
9050        numDependencies: usize,
9051        copyParams: *const CUDA_MEMCPY3D,
9052        ctx: CUcontext,
9053    ) -> CUresult {
9054        (self
9055            .cuGraphAddMemcpyNode
9056            .as_ref()
9057            .expect("Expected function, got error."))(
9058            phGraphNode,
9059            hGraph,
9060            dependencies,
9061            numDependencies,
9062            copyParams,
9063            ctx,
9064        )
9065    }
9066    #[doc = " \\brief Returns a memcpy node's parameters\n\n Returns the parameters of memcpy node \\p hNode in \\p nodeParams.\n\n \\param hNode      - Node to get the parameters for\n \\param nodeParams - Pointer to return the parameters\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuMemcpy3D,\n ::cuGraphAddMemcpyNode,\n ::cuGraphMemcpyNodeSetParams"]
9067    pub unsafe fn cuGraphMemcpyNodeGetParams(
9068        &self,
9069        hNode: CUgraphNode,
9070        nodeParams: *mut CUDA_MEMCPY3D,
9071    ) -> CUresult {
9072        (self
9073            .cuGraphMemcpyNodeGetParams
9074            .as_ref()
9075            .expect("Expected function, got error."))(hNode, nodeParams)
9076    }
9077    #[doc = " \\brief Sets a memcpy node's parameters\n\n Sets the parameters of memcpy node \\p hNode to \\p nodeParams.\n\n \\param hNode      - Node to set the parameters for\n \\param nodeParams - Parameters to copy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuMemcpy3D,\n ::cuGraphAddMemcpyNode,\n ::cuGraphMemcpyNodeGetParams"]
9078    pub unsafe fn cuGraphMemcpyNodeSetParams(
9079        &self,
9080        hNode: CUgraphNode,
9081        nodeParams: *const CUDA_MEMCPY3D,
9082    ) -> CUresult {
9083        (self
9084            .cuGraphMemcpyNodeSetParams
9085            .as_ref()
9086            .expect("Expected function, got error."))(hNode, nodeParams)
9087    }
9088    #[doc = " \\brief Creates a memset node and adds it to a graph\n\n Creates a new memset node and adds it to \\p hGraph with \\p numDependencies\n dependencies specified via \\p dependencies.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p dependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p phGraphNode.\n\n The element size must be 1, 2, or 4 bytes.\n When the graph is launched, the node will perform the memset described by \\p memsetParams.\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param memsetParams    - Parameters for the memory set\n \\param ctx             - Context on which to run the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_CONTEXT\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuMemsetD2D32,\n ::cuGraphMemsetNodeGetParams,\n ::cuGraphMemsetNodeSetParams,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddHostNode,\n ::cuGraphAddMemcpyNode"]
9089    pub unsafe fn cuGraphAddMemsetNode(
9090        &self,
9091        phGraphNode: *mut CUgraphNode,
9092        hGraph: CUgraph,
9093        dependencies: *const CUgraphNode,
9094        numDependencies: usize,
9095        memsetParams: *const CUDA_MEMSET_NODE_PARAMS,
9096        ctx: CUcontext,
9097    ) -> CUresult {
9098        (self
9099            .cuGraphAddMemsetNode
9100            .as_ref()
9101            .expect("Expected function, got error."))(
9102            phGraphNode,
9103            hGraph,
9104            dependencies,
9105            numDependencies,
9106            memsetParams,
9107            ctx,
9108        )
9109    }
9110    #[doc = " \\brief Returns a memset node's parameters\n\n Returns the parameters of memset node \\p hNode in \\p nodeParams.\n\n \\param hNode      - Node to get the parameters for\n \\param nodeParams - Pointer to return the parameters\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuMemsetD2D32,\n ::cuGraphAddMemsetNode,\n ::cuGraphMemsetNodeSetParams"]
9111    pub unsafe fn cuGraphMemsetNodeGetParams(
9112        &self,
9113        hNode: CUgraphNode,
9114        nodeParams: *mut CUDA_MEMSET_NODE_PARAMS,
9115    ) -> CUresult {
9116        (self
9117            .cuGraphMemsetNodeGetParams
9118            .as_ref()
9119            .expect("Expected function, got error."))(hNode, nodeParams)
9120    }
9121    #[doc = " \\brief Sets a memset node's parameters\n\n Sets the parameters of memset node \\p hNode to \\p nodeParams.\n\n \\param hNode      - Node to set the parameters for\n \\param nodeParams - Parameters to copy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuMemsetD2D32,\n ::cuGraphAddMemsetNode,\n ::cuGraphMemsetNodeGetParams"]
9122    pub unsafe fn cuGraphMemsetNodeSetParams(
9123        &self,
9124        hNode: CUgraphNode,
9125        nodeParams: *const CUDA_MEMSET_NODE_PARAMS,
9126    ) -> CUresult {
9127        (self
9128            .cuGraphMemsetNodeSetParams
9129            .as_ref()
9130            .expect("Expected function, got error."))(hNode, nodeParams)
9131    }
9132    #[doc = " \\brief Creates a host execution node and adds it to a graph\n\n Creates a new CPU execution node and adds it to \\p hGraph with \\p numDependencies\n dependencies specified via \\p dependencies and arguments specified in \\p nodeParams.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p dependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p phGraphNode.\n\n When the graph is launched, the node will invoke the specified CPU function.\n Host nodes are not supported under MPS with pre-Volta GPUs.\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param nodeParams      - Parameters for the host node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuLaunchHostFunc,\n ::cuGraphHostNodeGetParams,\n ::cuGraphHostNodeSetParams,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9133    pub unsafe fn cuGraphAddHostNode(
9134        &self,
9135        phGraphNode: *mut CUgraphNode,
9136        hGraph: CUgraph,
9137        dependencies: *const CUgraphNode,
9138        numDependencies: usize,
9139        nodeParams: *const CUDA_HOST_NODE_PARAMS,
9140    ) -> CUresult {
9141        (self
9142            .cuGraphAddHostNode
9143            .as_ref()
9144            .expect("Expected function, got error."))(
9145            phGraphNode,
9146            hGraph,
9147            dependencies,
9148            numDependencies,
9149            nodeParams,
9150        )
9151    }
9152    #[doc = " \\brief Returns a host node's parameters\n\n Returns the parameters of host node \\p hNode in \\p nodeParams.\n\n \\param hNode      - Node to get the parameters for\n \\param nodeParams - Pointer to return the parameters\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuLaunchHostFunc,\n ::cuGraphAddHostNode,\n ::cuGraphHostNodeSetParams"]
9153    pub unsafe fn cuGraphHostNodeGetParams(
9154        &self,
9155        hNode: CUgraphNode,
9156        nodeParams: *mut CUDA_HOST_NODE_PARAMS,
9157    ) -> CUresult {
9158        (self
9159            .cuGraphHostNodeGetParams
9160            .as_ref()
9161            .expect("Expected function, got error."))(hNode, nodeParams)
9162    }
9163    #[doc = " \\brief Sets a host node's parameters\n\n Sets the parameters of host node \\p hNode to \\p nodeParams.\n\n \\param hNode      - Node to set the parameters for\n \\param nodeParams - Parameters to copy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuLaunchHostFunc,\n ::cuGraphAddHostNode,\n ::cuGraphHostNodeGetParams"]
9164    pub unsafe fn cuGraphHostNodeSetParams(
9165        &self,
9166        hNode: CUgraphNode,
9167        nodeParams: *const CUDA_HOST_NODE_PARAMS,
9168    ) -> CUresult {
9169        (self
9170            .cuGraphHostNodeSetParams
9171            .as_ref()
9172            .expect("Expected function, got error."))(hNode, nodeParams)
9173    }
9174    #[doc = " \\brief Creates a child graph node and adds it to a graph\n\n Creates a new node which executes an embedded graph, and adds it to \\p hGraph with\n \\p numDependencies dependencies specified via \\p dependencies.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p dependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p phGraphNode.\n\n If \\p hGraph contains allocation or free nodes, this call will return an error.\n\n The node executes an embedded child graph. The child graph is cloned in this call.\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param childGraph      - The graph to clone into this node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphChildGraphNodeGetGraph,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddHostNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode,\n ::cuGraphClone"]
9175    pub unsafe fn cuGraphAddChildGraphNode(
9176        &self,
9177        phGraphNode: *mut CUgraphNode,
9178        hGraph: CUgraph,
9179        dependencies: *const CUgraphNode,
9180        numDependencies: usize,
9181        childGraph: CUgraph,
9182    ) -> CUresult {
9183        (self
9184            .cuGraphAddChildGraphNode
9185            .as_ref()
9186            .expect("Expected function, got error."))(
9187            phGraphNode,
9188            hGraph,
9189            dependencies,
9190            numDependencies,
9191            childGraph,
9192        )
9193    }
9194    #[doc = " \\brief Gets a handle to the embedded graph of a child graph node\n\n Gets a handle to the embedded graph in a child graph node. This call\n does not clone the graph. Changes to the graph will be reflected in\n the node, and the node retains ownership of the graph.\n\n Allocation and free nodes cannot be added to the returned graph.\n Attempting to do so will return an error.\n\n \\param hNode   - Node to get the embedded graph for\n \\param phGraph - Location to store a handle to the graph\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddChildGraphNode,\n ::cuGraphNodeFindInClone"]
9195    pub unsafe fn cuGraphChildGraphNodeGetGraph(
9196        &self,
9197        hNode: CUgraphNode,
9198        phGraph: *mut CUgraph,
9199    ) -> CUresult {
9200        (self
9201            .cuGraphChildGraphNodeGetGraph
9202            .as_ref()
9203            .expect("Expected function, got error."))(hNode, phGraph)
9204    }
9205    #[doc = " \\brief Creates an empty node and adds it to a graph\n\n Creates a new node which performs no operation, and adds it to \\p hGraph with\n \\p numDependencies dependencies specified via \\p dependencies.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p dependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p phGraphNode.\n\n An empty node performs no operation during execution, but can be used for\n transitive ordering. For example, a phased execution graph with 2 groups of n\n nodes with a barrier between them can be represented using an empty node and\n 2*n dependency edges, rather than no empty node and n^2 dependency edges.\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddHostNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9206    pub unsafe fn cuGraphAddEmptyNode(
9207        &self,
9208        phGraphNode: *mut CUgraphNode,
9209        hGraph: CUgraph,
9210        dependencies: *const CUgraphNode,
9211        numDependencies: usize,
9212    ) -> CUresult {
9213        (self
9214            .cuGraphAddEmptyNode
9215            .as_ref()
9216            .expect("Expected function, got error."))(
9217            phGraphNode,
9218            hGraph,
9219            dependencies,
9220            numDependencies,
9221        )
9222    }
9223    #[doc = " \\brief Creates an event record node and adds it to a graph\n\n Creates a new event record node and adds it to \\p hGraph with \\p numDependencies\n dependencies specified via \\p dependencies and event specified in \\p event.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p dependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p phGraphNode.\n\n Each launch of the graph will record \\p event to capture execution of the\n node's dependencies.\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param event           - Event for the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddEventWaitNode,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9224    pub unsafe fn cuGraphAddEventRecordNode(
9225        &self,
9226        phGraphNode: *mut CUgraphNode,
9227        hGraph: CUgraph,
9228        dependencies: *const CUgraphNode,
9229        numDependencies: usize,
9230        event: CUevent,
9231    ) -> CUresult {
9232        (self
9233            .cuGraphAddEventRecordNode
9234            .as_ref()
9235            .expect("Expected function, got error."))(
9236            phGraphNode,
9237            hGraph,
9238            dependencies,
9239            numDependencies,
9240            event,
9241        )
9242    }
9243    #[doc = " \\brief Returns the event associated with an event record node\n\n Returns the event of event record node \\p hNode in \\p event_out.\n\n \\param hNode     - Node to get the event for\n \\param event_out - Pointer to return the event\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddEventRecordNode,\n ::cuGraphEventRecordNodeSetEvent,\n ::cuGraphEventWaitNodeGetEvent,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent"]
9244    pub unsafe fn cuGraphEventRecordNodeGetEvent(
9245        &self,
9246        hNode: CUgraphNode,
9247        event_out: *mut CUevent,
9248    ) -> CUresult {
9249        (self
9250            .cuGraphEventRecordNodeGetEvent
9251            .as_ref()
9252            .expect("Expected function, got error."))(hNode, event_out)
9253    }
9254    #[doc = " \\brief Sets an event record node's event\n\n Sets the event of event record node \\p hNode to \\p event.\n\n \\param hNode - Node to set the event for\n \\param event - Event to use\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddEventRecordNode,\n ::cuGraphEventRecordNodeGetEvent,\n ::cuGraphEventWaitNodeSetEvent,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent"]
9255    pub unsafe fn cuGraphEventRecordNodeSetEvent(
9256        &self,
9257        hNode: CUgraphNode,
9258        event: CUevent,
9259    ) -> CUresult {
9260        (self
9261            .cuGraphEventRecordNodeSetEvent
9262            .as_ref()
9263            .expect("Expected function, got error."))(hNode, event)
9264    }
9265    #[doc = " \\brief Creates an event wait node and adds it to a graph\n\n Creates a new event wait node and adds it to \\p hGraph with \\p numDependencies\n dependencies specified via \\p dependencies and event specified in \\p event.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p dependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p phGraphNode.\n\n The graph node will wait for all work captured in \\p event.  See ::cuEventRecord()\n for details on what is captured by an event. \\p event may be from a different context\n or device than the launch stream.\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param event           - Event for the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddEventRecordNode,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9266    pub unsafe fn cuGraphAddEventWaitNode(
9267        &self,
9268        phGraphNode: *mut CUgraphNode,
9269        hGraph: CUgraph,
9270        dependencies: *const CUgraphNode,
9271        numDependencies: usize,
9272        event: CUevent,
9273    ) -> CUresult {
9274        (self
9275            .cuGraphAddEventWaitNode
9276            .as_ref()
9277            .expect("Expected function, got error."))(
9278            phGraphNode,
9279            hGraph,
9280            dependencies,
9281            numDependencies,
9282            event,
9283        )
9284    }
9285    #[doc = " \\brief Returns the event associated with an event wait node\n\n Returns the event of event wait node \\p hNode in \\p event_out.\n\n \\param hNode     - Node to get the event for\n \\param event_out - Pointer to return the event\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddEventWaitNode,\n ::cuGraphEventWaitNodeSetEvent,\n ::cuGraphEventRecordNodeGetEvent,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent"]
9286    pub unsafe fn cuGraphEventWaitNodeGetEvent(
9287        &self,
9288        hNode: CUgraphNode,
9289        event_out: *mut CUevent,
9290    ) -> CUresult {
9291        (self
9292            .cuGraphEventWaitNodeGetEvent
9293            .as_ref()
9294            .expect("Expected function, got error."))(hNode, event_out)
9295    }
9296    #[doc = " \\brief Sets an event wait node's event\n\n Sets the event of event wait node \\p hNode to \\p event.\n\n \\param hNode - Node to set the event for\n \\param event - Event to use\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddEventWaitNode,\n ::cuGraphEventWaitNodeGetEvent,\n ::cuGraphEventRecordNodeSetEvent,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent"]
9297    pub unsafe fn cuGraphEventWaitNodeSetEvent(
9298        &self,
9299        hNode: CUgraphNode,
9300        event: CUevent,
9301    ) -> CUresult {
9302        (self
9303            .cuGraphEventWaitNodeSetEvent
9304            .as_ref()
9305            .expect("Expected function, got error."))(hNode, event)
9306    }
9307    #[doc = " \\brief Creates an external semaphore signal node and adds it to a graph\n\n Creates a new external semaphore signal node and adds it to \\p hGraph with \\p\n numDependencies dependencies specified via \\p dependencies and arguments specified\n in \\p nodeParams. It is possible for \\p numDependencies to be 0, in which case the\n node will be placed at the root of the graph. \\p dependencies may not have any\n duplicate entries. A handle to the new node will be returned in \\p phGraphNode.\n\n Performs a signal operation on a set of externally allocated semaphore objects\n when the node is launched.  The operation(s) will occur after all of the node's\n dependencies have completed.\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param nodeParams      - Parameters for the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphExternalSemaphoresSignalNodeGetParams,\n ::cuGraphExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuImportExternalSemaphore,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddEventRecordNode,\n ::cuGraphAddEventWaitNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9308    pub unsafe fn cuGraphAddExternalSemaphoresSignalNode(
9309        &self,
9310        phGraphNode: *mut CUgraphNode,
9311        hGraph: CUgraph,
9312        dependencies: *const CUgraphNode,
9313        numDependencies: usize,
9314        nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
9315    ) -> CUresult {
9316        (self
9317            .cuGraphAddExternalSemaphoresSignalNode
9318            .as_ref()
9319            .expect("Expected function, got error."))(
9320            phGraphNode,
9321            hGraph,
9322            dependencies,
9323            numDependencies,
9324            nodeParams,
9325        )
9326    }
9327    #[doc = " \\brief Returns an external semaphore signal node's parameters\n\n Returns the parameters of an external semaphore signal node \\p hNode in \\p params_out.\n The \\p extSemArray and \\p paramsArray returned in \\p params_out,\n are owned by the node.  This memory remains valid until the node is destroyed or its\n parameters are modified, and should not be modified\n directly. Use ::cuGraphExternalSemaphoresSignalNodeSetParams to update the\n parameters of this node.\n\n \\param hNode      - Node to get the parameters for\n \\param params_out - Pointer to return the parameters\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuLaunchKernel,\n ::cuGraphAddExternalSemaphoresSignalNode,\n ::cuGraphExternalSemaphoresSignalNodeSetParams,\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync"]
9328    pub unsafe fn cuGraphExternalSemaphoresSignalNodeGetParams(
9329        &self,
9330        hNode: CUgraphNode,
9331        params_out: *mut CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
9332    ) -> CUresult {
9333        (self
9334            .cuGraphExternalSemaphoresSignalNodeGetParams
9335            .as_ref()
9336            .expect("Expected function, got error."))(hNode, params_out)
9337    }
9338    #[doc = " \\brief Sets an external semaphore signal node's parameters\n\n Sets the parameters of an external semaphore signal node \\p hNode to \\p nodeParams.\n\n \\param hNode      - Node to set the parameters for\n \\param nodeParams - Parameters to copy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddExternalSemaphoresSignalNode,\n ::cuGraphExternalSemaphoresSignalNodeSetParams,\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync"]
9339    pub unsafe fn cuGraphExternalSemaphoresSignalNodeSetParams(
9340        &self,
9341        hNode: CUgraphNode,
9342        nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
9343    ) -> CUresult {
9344        (self
9345            .cuGraphExternalSemaphoresSignalNodeSetParams
9346            .as_ref()
9347            .expect("Expected function, got error."))(hNode, nodeParams)
9348    }
9349    #[doc = " \\brief Creates an external semaphore wait node and adds it to a graph\n\n Creates a new external semaphore wait node and adds it to \\p hGraph with \\p numDependencies\n dependencies specified via \\p dependencies and arguments specified in \\p nodeParams.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p dependencies may not have any duplicate entries. A handle\n to the new node will be returned in \\p phGraphNode.\n\n Performs a wait operation on a set of externally allocated semaphore objects\n when the node is launched.  The node's dependencies will not be launched until\n the wait operation has completed.\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param nodeParams      - Parameters for the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphExternalSemaphoresWaitNodeGetParams,\n ::cuGraphExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphAddExternalSemaphoresSignalNode,\n ::cuImportExternalSemaphore,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddEventRecordNode,\n ::cuGraphAddEventWaitNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9350    pub unsafe fn cuGraphAddExternalSemaphoresWaitNode(
9351        &self,
9352        phGraphNode: *mut CUgraphNode,
9353        hGraph: CUgraph,
9354        dependencies: *const CUgraphNode,
9355        numDependencies: usize,
9356        nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
9357    ) -> CUresult {
9358        (self
9359            .cuGraphAddExternalSemaphoresWaitNode
9360            .as_ref()
9361            .expect("Expected function, got error."))(
9362            phGraphNode,
9363            hGraph,
9364            dependencies,
9365            numDependencies,
9366            nodeParams,
9367        )
9368    }
9369    #[doc = " \\brief Returns an external semaphore wait node's parameters\n\n Returns the parameters of an external semaphore wait node \\p hNode in \\p params_out.\n The \\p extSemArray and \\p paramsArray returned in \\p params_out,\n are owned by the node.  This memory remains valid until the node is destroyed or its\n parameters are modified, and should not be modified\n directly. Use ::cuGraphExternalSemaphoresSignalNodeSetParams to update the\n parameters of this node.\n\n \\param hNode      - Node to get the parameters for\n \\param params_out - Pointer to return the parameters\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuLaunchKernel,\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuGraphExternalSemaphoresWaitNodeSetParams,\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync"]
9370    pub unsafe fn cuGraphExternalSemaphoresWaitNodeGetParams(
9371        &self,
9372        hNode: CUgraphNode,
9373        params_out: *mut CUDA_EXT_SEM_WAIT_NODE_PARAMS,
9374    ) -> CUresult {
9375        (self
9376            .cuGraphExternalSemaphoresWaitNodeGetParams
9377            .as_ref()
9378            .expect("Expected function, got error."))(hNode, params_out)
9379    }
9380    #[doc = " \\brief Sets an external semaphore wait node's parameters\n\n Sets the parameters of an external semaphore wait node \\p hNode to \\p nodeParams.\n\n \\param hNode      - Node to set the parameters for\n \\param nodeParams - Parameters to copy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuGraphExternalSemaphoresWaitNodeSetParams,\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync"]
9381    pub unsafe fn cuGraphExternalSemaphoresWaitNodeSetParams(
9382        &self,
9383        hNode: CUgraphNode,
9384        nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
9385    ) -> CUresult {
9386        (self
9387            .cuGraphExternalSemaphoresWaitNodeSetParams
9388            .as_ref()
9389            .expect("Expected function, got error."))(hNode, nodeParams)
9390    }
9391    #[doc = " \\brief Creates a batch memory operation node and adds it to a graph\n\n Creates a new batch memory operation node and adds it to \\p hGraph with \\p\n numDependencies dependencies specified via \\p dependencies and arguments specified in \\p nodeParams.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p dependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p phGraphNode.\n\n When the node is added, the paramArray inside \\p nodeParams is copied and therefore it can be\n freed after the call returns.\n\n \\note\n Warning:\n Improper use of this API may deadlock the application. Synchronization\n ordering established through this API is not visible to CUDA. CUDA tasks\n that are (even indirectly) ordered by this API should also have that order\n expressed with CUDA-visible dependencies such as events. This ensures that\n the scheduler does not serialize them in an improper order. For more\n information, see the Stream Memory Operations section in the programming\n guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param nodeParams      - Parameters for the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuStreamBatchMemOp,\n ::cuStreamWaitValue32,\n ::cuStreamWriteValue32,\n ::cuStreamWaitValue64,\n ::cuStreamWriteValue64,\n ::cuGraphBatchMemOpNodeGetParams,\n ::cuGraphBatchMemOpNodeSetParams,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9392    pub unsafe fn cuGraphAddBatchMemOpNode(
9393        &self,
9394        phGraphNode: *mut CUgraphNode,
9395        hGraph: CUgraph,
9396        dependencies: *const CUgraphNode,
9397        numDependencies: usize,
9398        nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
9399    ) -> CUresult {
9400        (self
9401            .cuGraphAddBatchMemOpNode
9402            .as_ref()
9403            .expect("Expected function, got error."))(
9404            phGraphNode,
9405            hGraph,
9406            dependencies,
9407            numDependencies,
9408            nodeParams,
9409        )
9410    }
9411    #[doc = " \\brief Returns a batch mem op node's parameters\n\n Returns the parameters of batch mem op node \\p hNode in \\p nodeParams_out.\n The \\p paramArray returned in \\p nodeParams_out is owned by the node.\n This memory remains valid until the node is destroyed or its\n parameters are modified, and should not be modified\n directly. Use ::cuGraphBatchMemOpNodeSetParams to update the\n parameters of this node.\n\n \\param hNode          - Node to get the parameters for\n \\param nodeParams_out - Pointer to return the parameters\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuStreamBatchMemOp,\n ::cuGraphAddBatchMemOpNode,\n ::cuGraphBatchMemOpNodeSetParams"]
9412    pub unsafe fn cuGraphBatchMemOpNodeGetParams(
9413        &self,
9414        hNode: CUgraphNode,
9415        nodeParams_out: *mut CUDA_BATCH_MEM_OP_NODE_PARAMS,
9416    ) -> CUresult {
9417        (self
9418            .cuGraphBatchMemOpNodeGetParams
9419            .as_ref()
9420            .expect("Expected function, got error."))(hNode, nodeParams_out)
9421    }
9422    #[doc = " \\brief Sets a batch mem op node's parameters\n\n Sets the parameters of batch mem op node \\p hNode to \\p nodeParams.\n\n The paramArray inside \\p nodeParams is copied and therefore it can be\n freed after the call returns.\n\n \\param hNode      - Node to set the parameters for\n \\param nodeParams - Parameters to copy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuStreamBatchMemOp,\n ::cuGraphAddBatchMemOpNode,\n ::cuGraphBatchMemOpNodeGetParams"]
9423    pub unsafe fn cuGraphBatchMemOpNodeSetParams(
9424        &self,
9425        hNode: CUgraphNode,
9426        nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
9427    ) -> CUresult {
9428        (self
9429            .cuGraphBatchMemOpNodeSetParams
9430            .as_ref()
9431            .expect("Expected function, got error."))(hNode, nodeParams)
9432    }
9433    #[doc = " \\brief Sets the parameters for a batch mem op node in the given graphExec\n\n Sets the parameters of a batch mem op node in an executable graph \\p hGraphExec.\n The node is identified by the corresponding node \\p hNode in the\n non-executable graph, from which the executable graph was instantiated.\n\n The following fields on operations may be modified on an executable graph:\n\n  op.waitValue.address\n  op.waitValue.value[64]\n  op.waitValue.flags bits corresponding to wait type (i.e. CU_STREAM_WAIT_VALUE_FLUSH bit cannot be modified)\n  op.writeValue.address\n  op.writeValue.value[64]\n\n Other fields, such as the context, count or type of operations, and other types of operations such as membars,\n may not be modified.\n\n \\p hNode must not have been removed from the original graph.\n\n The modifications only affect future launches of \\p hGraphExec. Already\n enqueued or running launches of \\p hGraphExec are not affected by this call.\n \\p hNode is also not modified by this call.\n\n The paramArray inside \\p nodeParams is copied and therefore it can be\n freed after the call returns.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param hNode      - Batch mem op node from the graph from which graphExec was instantiated\n \\param nodeParams - Updated Parameters to set\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuStreamBatchMemOp,\n ::cuGraphAddBatchMemOpNode,\n ::cuGraphBatchMemOpNodeGetParams,\n ::cuGraphBatchMemOpNodeSetParams,\n ::cuGraphInstantiate"]
9434    pub unsafe fn cuGraphExecBatchMemOpNodeSetParams(
9435        &self,
9436        hGraphExec: CUgraphExec,
9437        hNode: CUgraphNode,
9438        nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
9439    ) -> CUresult {
9440        (self
9441            .cuGraphExecBatchMemOpNodeSetParams
9442            .as_ref()
9443            .expect("Expected function, got error."))(hGraphExec, hNode, nodeParams)
9444    }
9445    #[doc = " \\brief Creates an allocation node and adds it to a graph\n\n Creates a new allocation node and adds it to \\p hGraph with \\p numDependencies\n dependencies specified via \\p dependencies and arguments specified in \\p nodeParams.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p dependencies may not have any duplicate entries. A handle\n to the new node will be returned in \\p phGraphNode.\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param nodeParams      - Parameters for the node\n\n When ::cuGraphAddMemAllocNode creates an allocation node, it returns the address of the allocation in\n \\p nodeParams.dptr.  The allocation's address remains fixed across instantiations and launches.\n\n If the allocation is freed in the same graph, by creating a free node using ::cuGraphAddMemFreeNode,\n the allocation can be accessed by nodes ordered after the allocation node but before the free node.\n These allocations cannot be freed outside the owning graph, and they can only be freed once in the\n owning graph.\n\n If the allocation is not freed in the same graph, then it can be accessed not only by nodes in the\n graph which are ordered after the allocation node, but also by stream operations ordered after the\n graph's execution but before the allocation is freed.\n\n Allocations which are not freed in the same graph can be freed by:\n - passing the allocation to ::cuMemFreeAsync or ::cuMemFree;\n - launching a graph with a free node for that allocation; or\n - specifying ::CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH during instantiation, which makes\n each launch behave as though it called ::cuMemFreeAsync for every unfreed allocation.\n\n It is not possible to free an allocation in both the owning graph and another graph.  If the allocation\n is freed in the same graph, a free node cannot be added to another graph.  If the allocation is freed\n in another graph, a free node can no longer be added to the owning graph.\n\n The following restrictions apply to graphs which contain allocation and/or memory free nodes:\n - Nodes and edges of the graph cannot be deleted.\n - The graph cannot be used in a child node.\n - Only one instantiation of the graph may exist at any point in time.\n - The graph cannot be cloned.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddMemFreeNode,\n ::cuGraphMemAllocNodeGetParams,\n ::cuDeviceGraphMemTrim,\n ::cuDeviceGetGraphMemAttribute,\n ::cuDeviceSetGraphMemAttribute,\n ::cuMemAllocAsync,\n ::cuMemFreeAsync,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddEventRecordNode,\n ::cuGraphAddEventWaitNode,\n ::cuGraphAddExternalSemaphoresSignalNode,\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9446    pub unsafe fn cuGraphAddMemAllocNode(
9447        &self,
9448        phGraphNode: *mut CUgraphNode,
9449        hGraph: CUgraph,
9450        dependencies: *const CUgraphNode,
9451        numDependencies: usize,
9452        nodeParams: *mut CUDA_MEM_ALLOC_NODE_PARAMS,
9453    ) -> CUresult {
9454        (self
9455            .cuGraphAddMemAllocNode
9456            .as_ref()
9457            .expect("Expected function, got error."))(
9458            phGraphNode,
9459            hGraph,
9460            dependencies,
9461            numDependencies,
9462            nodeParams,
9463        )
9464    }
9465    #[doc = " \\brief Returns a memory alloc node's parameters\n\n Returns the parameters of a memory alloc node \\p hNode in \\p params_out.\n The \\p poolProps and \\p accessDescs returned in \\p params_out, are owned by the\n node.  This memory remains valid until the node is destroyed.  The returned\n parameters must not be modified.\n\n \\param hNode      - Node to get the parameters for\n \\param params_out - Pointer to return the parameters\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddMemAllocNode,\n ::cuGraphMemFreeNodeGetParams"]
9466    pub unsafe fn cuGraphMemAllocNodeGetParams(
9467        &self,
9468        hNode: CUgraphNode,
9469        params_out: *mut CUDA_MEM_ALLOC_NODE_PARAMS,
9470    ) -> CUresult {
9471        (self
9472            .cuGraphMemAllocNodeGetParams
9473            .as_ref()
9474            .expect("Expected function, got error."))(hNode, params_out)
9475    }
9476    #[doc = " \\brief Creates a memory free node and adds it to a graph\n\n Creates a new memory free node and adds it to \\p hGraph with \\p numDependencies\n dependencies specified via \\p dependencies and arguments specified in \\p nodeParams.\n It is possible for \\p numDependencies to be 0, in which case the node will be placed\n at the root of the graph. \\p dependencies may not have any duplicate entries. A handle\n to the new node will be returned in \\p phGraphNode.\n\n \\param phGraphNode     - Returns newly created node\n \\param hGraph          - Graph to which to add the node\n \\param dependencies    - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param dptr            - Address of memory to free\n\n ::cuGraphAddMemFreeNode will return ::CUDA_ERROR_INVALID_VALUE if the user attempts to free:\n - an allocation twice in the same graph.\n - an address that was not returned by an allocation node.\n - an invalid address.\n\n The following restrictions apply to graphs which contain allocation and/or memory free nodes:\n - Nodes and edges of the graph cannot be deleted.\n - The graph cannot be used in a child node.\n - Only one instantiation of the graph may exist at any point in time.\n - The graph cannot be cloned.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddMemAllocNode,\n ::cuGraphMemFreeNodeGetParams,\n ::cuDeviceGraphMemTrim,\n ::cuDeviceGetGraphMemAttribute,\n ::cuDeviceSetGraphMemAttribute,\n ::cuMemAllocAsync,\n ::cuMemFreeAsync,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddEventRecordNode,\n ::cuGraphAddEventWaitNode,\n ::cuGraphAddExternalSemaphoresSignalNode,\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9477    pub unsafe fn cuGraphAddMemFreeNode(
9478        &self,
9479        phGraphNode: *mut CUgraphNode,
9480        hGraph: CUgraph,
9481        dependencies: *const CUgraphNode,
9482        numDependencies: usize,
9483        dptr: CUdeviceptr,
9484    ) -> CUresult {
9485        (self
9486            .cuGraphAddMemFreeNode
9487            .as_ref()
9488            .expect("Expected function, got error."))(
9489            phGraphNode,
9490            hGraph,
9491            dependencies,
9492            numDependencies,
9493            dptr,
9494        )
9495    }
9496    #[doc = " \\brief Returns a memory free node's parameters\n\n Returns the address of a memory free node \\p hNode in \\p dptr_out.\n\n \\param hNode    - Node to get the parameters for\n \\param dptr_out - Pointer to return the device address\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddMemFreeNode,\n ::cuGraphMemAllocNodeGetParams"]
9497    pub unsafe fn cuGraphMemFreeNodeGetParams(
9498        &self,
9499        hNode: CUgraphNode,
9500        dptr_out: *mut CUdeviceptr,
9501    ) -> CUresult {
9502        (self
9503            .cuGraphMemFreeNodeGetParams
9504            .as_ref()
9505            .expect("Expected function, got error."))(hNode, dptr_out)
9506    }
9507    #[doc = " \\brief Free unused memory that was cached on the specified device for use with graphs back to the OS.\n\n Blocks which are not in use by a graph that is either currently executing or scheduled to execute are\n freed back to the operating system.\n\n \\param device - The device for which cached memory should be freed.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_DEVICE\n\n \\sa\n ::cuGraphAddMemAllocNode,\n ::cuGraphAddMemFreeNode,\n ::cuDeviceSetGraphMemAttribute,\n ::cuDeviceGetGraphMemAttribute"]
9508    pub unsafe fn cuDeviceGraphMemTrim(&self, device: CUdevice) -> CUresult {
9509        (self
9510            .cuDeviceGraphMemTrim
9511            .as_ref()
9512            .expect("Expected function, got error."))(device)
9513    }
9514    #[doc = " \\brief Query asynchronous allocation attributes related to graphs\n\n Valid attributes are:\n\n - ::CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT: Amount of memory, in bytes, currently associated with graphs\n - ::CU_GRAPH_MEM_ATTR_USED_MEM_HIGH: High watermark of memory, in bytes, associated with graphs since the\n   last time it was reset.  High watermark can only be reset to zero.\n - ::CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT: Amount of memory, in bytes, currently allocated for use by\n   the CUDA graphs asynchronous allocator.\n - ::CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH: High watermark of memory, in bytes, currently allocated for use by\n   the CUDA graphs asynchronous allocator.\n\n \\param device - Specifies the scope of the query\n \\param attr - attribute to get\n \\param value - retrieved value\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_DEVICE\n\n \\sa\n ::cuDeviceSetGraphMemAttribute,\n ::cuGraphAddMemAllocNode,\n ::cuGraphAddMemFreeNode"]
9515    pub unsafe fn cuDeviceGetGraphMemAttribute(
9516        &self,
9517        device: CUdevice,
9518        attr: CUgraphMem_attribute,
9519        value: *mut ::std::os::raw::c_void,
9520    ) -> CUresult {
9521        (self
9522            .cuDeviceGetGraphMemAttribute
9523            .as_ref()
9524            .expect("Expected function, got error."))(device, attr, value)
9525    }
9526    #[doc = " \\brief Set asynchronous allocation attributes related to graphs\n\n Valid attributes are:\n\n - ::CU_GRAPH_MEM_ATTR_USED_MEM_HIGH: High watermark of memory, in bytes, associated with graphs since the\n   last time it was reset.  High watermark can only be reset to zero.\n - ::CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH: High watermark of memory, in bytes, currently allocated for use by\n   the CUDA graphs asynchronous allocator.\n\n \\param device - Specifies the scope of the query\n \\param attr - attribute to get\n \\param value - pointer to value to set\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_DEVICE\n\n \\sa\n ::cuDeviceGetGraphMemAttribute,\n ::cuGraphAddMemAllocNode,\n ::cuGraphAddMemFreeNode"]
9527    pub unsafe fn cuDeviceSetGraphMemAttribute(
9528        &self,
9529        device: CUdevice,
9530        attr: CUgraphMem_attribute,
9531        value: *mut ::std::os::raw::c_void,
9532    ) -> CUresult {
9533        (self
9534            .cuDeviceSetGraphMemAttribute
9535            .as_ref()
9536            .expect("Expected function, got error."))(device, attr, value)
9537    }
9538    #[doc = " \\brief Clones a graph\n\n This function creates a copy of \\p originalGraph and returns it in \\p phGraphClone.\n All parameters are copied into the cloned graph. The original graph may be modified\n after this call without affecting the clone.\n\n Child graph nodes in the original graph are recursively copied into the clone.\n\n \\param phGraphClone  - Returns newly created cloned graph\n \\param originalGraph - Graph to clone\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OUT_OF_MEMORY\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphCreate,\n ::cuGraphNodeFindInClone"]
9539    pub unsafe fn cuGraphClone(
9540        &self,
9541        phGraphClone: *mut CUgraph,
9542        originalGraph: CUgraph,
9543    ) -> CUresult {
9544        (self
9545            .cuGraphClone
9546            .as_ref()
9547            .expect("Expected function, got error."))(phGraphClone, originalGraph)
9548    }
9549    #[doc = " \\brief Finds a cloned version of a node\n\n This function returns the node in \\p hClonedGraph corresponding to \\p hOriginalNode\n in the original graph.\n\n \\p hClonedGraph must have been cloned from \\p hOriginalGraph via ::cuGraphClone.\n \\p hOriginalNode must have been in \\p hOriginalGraph at the time of the call to\n ::cuGraphClone, and the corresponding cloned node in \\p hClonedGraph must not have\n been removed. The cloned node is then returned via \\p phClonedNode.\n\n \\param phNode  - Returns handle to the cloned node\n \\param hOriginalNode - Handle to the original node\n \\param hClonedGraph - Cloned graph to query\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphClone"]
9550    pub unsafe fn cuGraphNodeFindInClone(
9551        &self,
9552        phNode: *mut CUgraphNode,
9553        hOriginalNode: CUgraphNode,
9554        hClonedGraph: CUgraph,
9555    ) -> CUresult {
9556        (self
9557            .cuGraphNodeFindInClone
9558            .as_ref()
9559            .expect("Expected function, got error."))(phNode, hOriginalNode, hClonedGraph)
9560    }
9561    #[doc = " \\brief Returns a node's type\n\n Returns the node type of \\p hNode in \\p type.\n\n \\param hNode - Node to query\n \\param type  - Pointer to return the node type\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphGetNodes,\n ::cuGraphGetRootNodes,\n ::cuGraphChildGraphNodeGetGraph,\n ::cuGraphKernelNodeGetParams,\n ::cuGraphKernelNodeSetParams,\n ::cuGraphHostNodeGetParams,\n ::cuGraphHostNodeSetParams,\n ::cuGraphMemcpyNodeGetParams,\n ::cuGraphMemcpyNodeSetParams,\n ::cuGraphMemsetNodeGetParams,\n ::cuGraphMemsetNodeSetParams"]
9562    pub unsafe fn cuGraphNodeGetType(
9563        &self,
9564        hNode: CUgraphNode,
9565        type_: *mut CUgraphNodeType,
9566    ) -> CUresult {
9567        (self
9568            .cuGraphNodeGetType
9569            .as_ref()
9570            .expect("Expected function, got error."))(hNode, type_)
9571    }
9572    #[doc = " \\brief Returns a graph's nodes\n\n Returns a list of \\p hGraph's nodes. \\p nodes may be NULL, in which case this\n function will return the number of nodes in \\p numNodes. Otherwise,\n \\p numNodes entries will be filled in. If \\p numNodes is higher than the actual\n number of nodes, the remaining entries in \\p nodes will be set to NULL, and the\n number of nodes actually obtained will be returned in \\p numNodes.\n\n \\param hGraph   - Graph to query\n \\param nodes    - Pointer to return the nodes\n \\param numNodes - See description\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphCreate,\n ::cuGraphGetRootNodes,\n ::cuGraphGetEdges,\n ::cuGraphNodeGetType,\n ::cuGraphNodeGetDependencies,\n ::cuGraphNodeGetDependentNodes"]
9573    pub unsafe fn cuGraphGetNodes(
9574        &self,
9575        hGraph: CUgraph,
9576        nodes: *mut CUgraphNode,
9577        numNodes: *mut usize,
9578    ) -> CUresult {
9579        (self
9580            .cuGraphGetNodes
9581            .as_ref()
9582            .expect("Expected function, got error."))(hGraph, nodes, numNodes)
9583    }
9584    #[doc = " \\brief Returns a graph's root nodes\n\n Returns a list of \\p hGraph's root nodes. \\p rootNodes may be NULL, in which case this\n function will return the number of root nodes in \\p numRootNodes. Otherwise,\n \\p numRootNodes entries will be filled in. If \\p numRootNodes is higher than the actual\n number of root nodes, the remaining entries in \\p rootNodes will be set to NULL, and the\n number of nodes actually obtained will be returned in \\p numRootNodes.\n\n \\param hGraph       - Graph to query\n \\param rootNodes    - Pointer to return the root nodes\n \\param numRootNodes - See description\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphCreate,\n ::cuGraphGetNodes,\n ::cuGraphGetEdges,\n ::cuGraphNodeGetType,\n ::cuGraphNodeGetDependencies,\n ::cuGraphNodeGetDependentNodes"]
9585    pub unsafe fn cuGraphGetRootNodes(
9586        &self,
9587        hGraph: CUgraph,
9588        rootNodes: *mut CUgraphNode,
9589        numRootNodes: *mut usize,
9590    ) -> CUresult {
9591        (self
9592            .cuGraphGetRootNodes
9593            .as_ref()
9594            .expect("Expected function, got error."))(hGraph, rootNodes, numRootNodes)
9595    }
9596    #[doc = " \\brief Returns a graph's dependency edges\n\n Returns a list of \\p hGraph's dependency edges. Edges are returned via corresponding\n indices in \\p from and \\p to; that is, the node in \\p to[i] has a dependency on the\n node in \\p from[i]. \\p from and \\p to may both be NULL, in which\n case this function only returns the number of edges in \\p numEdges. Otherwise,\n \\p numEdges entries will be filled in. If \\p numEdges is higher than the actual\n number of edges, the remaining entries in \\p from and \\p to will be set to NULL, and\n the number of edges actually returned will be written to \\p numEdges.\n\n \\param hGraph   - Graph to get the edges from\n \\param from     - Location to return edge endpoints\n \\param to       - Location to return edge endpoints\n \\param numEdges - See description\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphGetNodes,\n ::cuGraphGetRootNodes,\n ::cuGraphAddDependencies,\n ::cuGraphRemoveDependencies,\n ::cuGraphNodeGetDependencies,\n ::cuGraphNodeGetDependentNodes"]
9597    pub unsafe fn cuGraphGetEdges(
9598        &self,
9599        hGraph: CUgraph,
9600        from: *mut CUgraphNode,
9601        to: *mut CUgraphNode,
9602        numEdges: *mut usize,
9603    ) -> CUresult {
9604        (self
9605            .cuGraphGetEdges
9606            .as_ref()
9607            .expect("Expected function, got error."))(hGraph, from, to, numEdges)
9608    }
9609    #[doc = " \\brief Returns a node's dependencies\n\n Returns a list of \\p node's dependencies. \\p dependencies may be NULL, in which case this\n function will return the number of dependencies in \\p numDependencies. Otherwise,\n \\p numDependencies entries will be filled in. If \\p numDependencies is higher than the actual\n number of dependencies, the remaining entries in \\p dependencies will be set to NULL, and the\n number of nodes actually obtained will be returned in \\p numDependencies.\n\n \\param hNode           - Node to query\n \\param dependencies    - Pointer to return the dependencies\n \\param numDependencies - See description\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphNodeGetDependentNodes,\n ::cuGraphGetNodes,\n ::cuGraphGetRootNodes,\n ::cuGraphGetEdges,\n ::cuGraphAddDependencies,\n ::cuGraphRemoveDependencies"]
9610    pub unsafe fn cuGraphNodeGetDependencies(
9611        &self,
9612        hNode: CUgraphNode,
9613        dependencies: *mut CUgraphNode,
9614        numDependencies: *mut usize,
9615    ) -> CUresult {
9616        (self
9617            .cuGraphNodeGetDependencies
9618            .as_ref()
9619            .expect("Expected function, got error."))(hNode, dependencies, numDependencies)
9620    }
9621    #[doc = " \\brief Returns a node's dependent nodes\n\n Returns a list of \\p node's dependent nodes. \\p dependentNodes may be NULL, in which\n case this function will return the number of dependent nodes in \\p numDependentNodes.\n Otherwise, \\p numDependentNodes entries will be filled in. If \\p numDependentNodes is\n higher than the actual number of dependent nodes, the remaining entries in\n \\p dependentNodes will be set to NULL, and the number of nodes actually obtained will\n be returned in \\p numDependentNodes.\n\n \\param hNode             - Node to query\n \\param dependentNodes    - Pointer to return the dependent nodes\n \\param numDependentNodes - See description\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphNodeGetDependencies,\n ::cuGraphGetNodes,\n ::cuGraphGetRootNodes,\n ::cuGraphGetEdges,\n ::cuGraphAddDependencies,\n ::cuGraphRemoveDependencies"]
9622    pub unsafe fn cuGraphNodeGetDependentNodes(
9623        &self,
9624        hNode: CUgraphNode,
9625        dependentNodes: *mut CUgraphNode,
9626        numDependentNodes: *mut usize,
9627    ) -> CUresult {
9628        (self
9629            .cuGraphNodeGetDependentNodes
9630            .as_ref()
9631            .expect("Expected function, got error."))(
9632            hNode, dependentNodes, numDependentNodes
9633        )
9634    }
9635    #[doc = " \\brief Adds dependency edges to a graph\n\n The number of dependencies to be added is defined by \\p numDependencies\n Elements in \\p from and \\p to at corresponding indices define a dependency.\n Each node in \\p from and \\p to must belong to \\p hGraph.\n\n If \\p numDependencies is 0, elements in \\p from and \\p to will be ignored.\n Specifying an existing dependency will return an error.\n\n \\param hGraph - Graph to which dependencies are added\n \\param from - Array of nodes that provide the dependencies\n \\param to - Array of dependent nodes\n \\param numDependencies - Number of dependencies to be added\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphRemoveDependencies,\n ::cuGraphGetEdges,\n ::cuGraphNodeGetDependencies,\n ::cuGraphNodeGetDependentNodes"]
9636    pub unsafe fn cuGraphAddDependencies(
9637        &self,
9638        hGraph: CUgraph,
9639        from: *const CUgraphNode,
9640        to: *const CUgraphNode,
9641        numDependencies: usize,
9642    ) -> CUresult {
9643        (self
9644            .cuGraphAddDependencies
9645            .as_ref()
9646            .expect("Expected function, got error."))(hGraph, from, to, numDependencies)
9647    }
9648    #[doc = " \\brief Removes dependency edges from a graph\n\n The number of \\p dependencies to be removed is defined by \\p numDependencies.\n Elements in \\p from and \\p to at corresponding indices define a dependency.\n Each node in \\p from and \\p to must belong to \\p hGraph.\n\n If \\p numDependencies is 0, elements in \\p from and \\p to will be ignored.\n Specifying a non-existing dependency will return an error.\n\n Dependencies cannot be removed from graphs which contain allocation or free nodes.\n Any attempt to do so will return an error.\n\n \\param hGraph - Graph from which to remove dependencies\n \\param from - Array of nodes that provide the dependencies\n \\param to - Array of dependent nodes\n \\param numDependencies - Number of dependencies to be removed\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddDependencies,\n ::cuGraphGetEdges,\n ::cuGraphNodeGetDependencies,\n ::cuGraphNodeGetDependentNodes"]
9649    pub unsafe fn cuGraphRemoveDependencies(
9650        &self,
9651        hGraph: CUgraph,
9652        from: *const CUgraphNode,
9653        to: *const CUgraphNode,
9654        numDependencies: usize,
9655    ) -> CUresult {
9656        (self
9657            .cuGraphRemoveDependencies
9658            .as_ref()
9659            .expect("Expected function, got error."))(hGraph, from, to, numDependencies)
9660    }
9661    #[doc = " \\brief Remove a node from the graph\n\n Removes \\p hNode from its graph. This operation also severs any dependencies of other nodes\n on \\p hNode and vice versa.\n\n Nodes which belong to a graph which contains allocation or free nodes cannot be destroyed.\n Any attempt to do so will return an error.\n\n \\param hNode  - Node to remove\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddHostNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9662    pub unsafe fn cuGraphDestroyNode(&self, hNode: CUgraphNode) -> CUresult {
9663        (self
9664            .cuGraphDestroyNode
9665            .as_ref()
9666            .expect("Expected function, got error."))(hNode)
9667    }
9668    pub unsafe fn cuGraphInstantiateWithFlags(
9669        &self,
9670        phGraphExec: *mut CUgraphExec,
9671        hGraph: CUgraph,
9672        flags: ::std::os::raw::c_ulonglong,
9673    ) -> CUresult {
9674        (self
9675            .cuGraphInstantiateWithFlags
9676            .as_ref()
9677            .expect("Expected function, got error."))(phGraphExec, hGraph, flags)
9678    }
9679    #[doc = " \\brief Creates an executable graph from a graph\n\n Instantiates \\p hGraph as an executable graph according to the \\p instantiateParams structure.\n The graph is validated for any structural constraints or intra-node constraints\n which were not previously validated. If instantiation is successful, a handle to\n the instantiated graph is returned in \\p phGraphExec.\n\n \\p instantiateParams controls the behavior of instantiation and subsequent\n graph launches, as well as returning more detailed information in the event of an error.\n ::CUDA_GRAPH_INSTANTIATE_PARAMS is defined as:\n\n \\code\ntypedef struct {\ncuuint64_t flags;\nCUstream hUploadStream;\nCUgraphNode hErrNode_out;\nCUgraphInstantiateResult result_out;\n} CUDA_GRAPH_INSTANTIATE_PARAMS;\n \\endcode\n\n The \\p flags field controls the behavior of instantiation and subsequent\n graph launches. Valid flags are:\n\n - ::CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH, which configures a\n graph containing memory allocation nodes to automatically free any\n unfreed memory allocations before the graph is relaunched.\n\n - ::CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD, which will perform an upload of the graph\n into \\p hUploadStream once the graph has been instantiated.\n\n - ::CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH, which configures the graph for launch\n from the device. If this flag is passed, the executable graph handle returned can be\n used to launch the graph from both the host and device. This flag can only be used\n on platforms which support unified addressing. This flag cannot be used in\n conjunction with ::CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH.\n\n - ::CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY, which causes the graph\n to use the priorities from the per-node attributes rather than the priority\n of the launch stream during execution. Note that priorities are only available\n on kernel nodes, and are copied from stream priority during stream capture.\n\n If \\p hGraph contains any allocation or free nodes, there can be at most one\n executable graph in existence for that graph at a time. An attempt to instantiate a\n second executable graph before destroying the first with ::cuGraphExecDestroy will\n result in an error.\n\n If \\p hGraph contains kernels which call device-side cudaGraphLaunch() from multiple\n contexts, this will result in an error.\n\n Graphs instantiated for launch on the device have additional restrictions which do not\n apply to host graphs:\n\n - The graph's nodes must reside on a single context.\n - The graph can only contain kernel nodes, memcpy nodes, memset nodes, and child graph nodes.\n   Operation-specific restrictions are outlined below.\n - Kernel nodes:\n   - Use of CUDA Dynamic Parallelism is not permitted.\n   - Cooperative launches are permitted as long as MPS is not in use.\n - Memcpy nodes:\n   - Only copies involving device memory and/or pinned device-mapped host memory are permitted.\n   - Copies involving CUDA arrays are not permitted.\n   - Both operands must be accessible from the current context, and the current context must\n     match the context of other nodes in the graph.\n\n In the event of an error, the \\p result_out and \\p hErrNode_out fields will contain more\n information about the nature of the error. Possible error reporting includes:\n\n - ::CUDA_GRAPH_INSTANTIATE_ERROR, if passed an invalid value or if an unexpected error occurred\n   which is described by the return value of the function. \\p hErrNode_out will be set to NULL.\n - ::CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE, if the graph structure is invalid. \\p hErrNode_out\n   will be set to one of the offending nodes.\n - ::CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED, if the graph is instantiated for device\n   launch but contains a node of an unsupported node type, or a node which performs unsupported\n   operations, such as use of CUDA dynamic parallelism within a kernel node. \\p hErrNode_out will\n   be set to this node.\n - ::CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED, if the graph is instantiated for device\n   launch but a node’s context differs from that of another node. This error can also be returned\n   if a graph is not instantiated for device launch and it contains kernels which call device-side\n   cudaGraphLaunch() from multiple contexts. \\p hErrNode_out will be set to this node.\n\n If instantiation is successful, \\p result_out will be set to ::CUDA_GRAPH_INSTANTIATE_SUCCESS,\n and \\p hErrNode_out will be set to NULL.\n\n \\param phGraphExec       - Returns instantiated graph\n \\param hGraph            - Graph to instantiate\n \\param instantiateParams - Instantiation parameters\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphCreate,\n ::cuGraphInstantiate,\n ::cuGraphExecDestroy"]
9680    pub unsafe fn cuGraphInstantiateWithParams(
9681        &self,
9682        phGraphExec: *mut CUgraphExec,
9683        hGraph: CUgraph,
9684        instantiateParams: *mut CUDA_GRAPH_INSTANTIATE_PARAMS,
9685    ) -> CUresult {
9686        (self
9687            .cuGraphInstantiateWithParams
9688            .as_ref()
9689            .expect("Expected function, got error."))(phGraphExec, hGraph, instantiateParams)
9690    }
9691    #[doc = " \\brief Query the instantiation flags of an executable graph\n\n Returns the flags that were passed to instantiation for the given executable graph.\n ::CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD will not be returned by this API as it does\n not affect the resulting executable graph.\n\n \\param hGraphExec - The executable graph to query\n \\param flags      - Returns the instantiation flags\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphInstantiate,\n ::cuGraphInstantiateWithParams"]
9692    pub unsafe fn cuGraphExecGetFlags(
9693        &self,
9694        hGraphExec: CUgraphExec,
9695        flags: *mut cuuint64_t,
9696    ) -> CUresult {
9697        (self
9698            .cuGraphExecGetFlags
9699            .as_ref()
9700            .expect("Expected function, got error."))(hGraphExec, flags)
9701    }
9702    pub unsafe fn cuGraphExecKernelNodeSetParams_v2(
9703        &self,
9704        hGraphExec: CUgraphExec,
9705        hNode: CUgraphNode,
9706        nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
9707    ) -> CUresult {
9708        (self
9709            .cuGraphExecKernelNodeSetParams_v2
9710            .as_ref()
9711            .expect("Expected function, got error."))(hGraphExec, hNode, nodeParams)
9712    }
9713    #[doc = " \\brief Sets the parameters for a memcpy node in the given graphExec.\n\n Updates the work represented by \\p hNode in \\p hGraphExec as though \\p hNode had\n contained \\p copyParams at instantiation.  hNode must remain in the graph which was\n used to instantiate \\p hGraphExec.  Changed edges to and from hNode are ignored.\n\n The source and destination memory in \\p copyParams must be allocated from the same\n contexts as the original source and destination memory.  Both the instantiation-time\n memory operands and the memory operands in \\p copyParams must be 1-dimensional.\n Zero-length operations are not supported.\n\n The modifications only affect future launches of \\p hGraphExec.  Already enqueued\n or running launches of \\p hGraphExec are not affected by this call.  hNode is also\n not modified by this call.\n\n Returns CUDA_ERROR_INVALID_VALUE if the memory operands' mappings changed or\n either the original or new memory operands are multidimensional.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param hNode      - Memcpy node from the graph which was used to instantiate graphExec\n \\param copyParams - The updated parameters to set\n \\param ctx        - Context on which to run the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddMemcpyNode,\n ::cuGraphMemcpyNodeSetParams,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemsetNodeSetParams,\n ::cuGraphExecHostNodeSetParams,\n ::cuGraphExecChildGraphNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9714    pub unsafe fn cuGraphExecMemcpyNodeSetParams(
9715        &self,
9716        hGraphExec: CUgraphExec,
9717        hNode: CUgraphNode,
9718        copyParams: *const CUDA_MEMCPY3D,
9719        ctx: CUcontext,
9720    ) -> CUresult {
9721        (self
9722            .cuGraphExecMemcpyNodeSetParams
9723            .as_ref()
9724            .expect("Expected function, got error."))(hGraphExec, hNode, copyParams, ctx)
9725    }
9726    #[doc = " \\brief Sets the parameters for a memset node in the given graphExec.\n\n Updates the work represented by \\p hNode in \\p hGraphExec as though \\p hNode had\n contained \\p memsetParams at instantiation.  hNode must remain in the graph which was\n used to instantiate \\p hGraphExec.  Changed edges to and from hNode are ignored.\n\n The destination memory in \\p memsetParams must be allocated from the same\n contexts as the original destination memory.  Both the instantiation-time\n memory operand and the memory operand in \\p memsetParams must be 1-dimensional.\n Zero-length operations are not supported.\n\n The modifications only affect future launches of \\p hGraphExec.  Already enqueued\n or running launches of \\p hGraphExec are not affected by this call.  hNode is also\n not modified by this call.\n\n Returns CUDA_ERROR_INVALID_VALUE if the memory operand's mappings changed or\n either the original or new memory operand are multidimensional.\n\n \\param hGraphExec   - The executable graph in which to set the specified node\n \\param hNode        - Memset node from the graph which was used to instantiate graphExec\n \\param memsetParams - The updated parameters to set\n \\param ctx          - Context on which to run the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddMemsetNode,\n ::cuGraphMemsetNodeSetParams,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemcpyNodeSetParams,\n ::cuGraphExecHostNodeSetParams,\n ::cuGraphExecChildGraphNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9727    pub unsafe fn cuGraphExecMemsetNodeSetParams(
9728        &self,
9729        hGraphExec: CUgraphExec,
9730        hNode: CUgraphNode,
9731        memsetParams: *const CUDA_MEMSET_NODE_PARAMS,
9732        ctx: CUcontext,
9733    ) -> CUresult {
9734        (self
9735            .cuGraphExecMemsetNodeSetParams
9736            .as_ref()
9737            .expect("Expected function, got error."))(hGraphExec, hNode, memsetParams, ctx)
9738    }
9739    #[doc = " \\brief Sets the parameters for a host node in the given graphExec.\n\n Updates the work represented by \\p hNode in \\p hGraphExec as though \\p hNode had\n contained \\p nodeParams at instantiation.  hNode must remain in the graph which was\n used to instantiate \\p hGraphExec.  Changed edges to and from hNode are ignored.\n\n The modifications only affect future launches of \\p hGraphExec.  Already enqueued\n or running launches of \\p hGraphExec are not affected by this call.  hNode is also\n not modified by this call.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param hNode      - Host node from the graph which was used to instantiate graphExec\n \\param nodeParams - The updated parameters to set\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddHostNode,\n ::cuGraphHostNodeSetParams,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemcpyNodeSetParams,\n ::cuGraphExecMemsetNodeSetParams,\n ::cuGraphExecChildGraphNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9740    pub unsafe fn cuGraphExecHostNodeSetParams(
9741        &self,
9742        hGraphExec: CUgraphExec,
9743        hNode: CUgraphNode,
9744        nodeParams: *const CUDA_HOST_NODE_PARAMS,
9745    ) -> CUresult {
9746        (self
9747            .cuGraphExecHostNodeSetParams
9748            .as_ref()
9749            .expect("Expected function, got error."))(hGraphExec, hNode, nodeParams)
9750    }
9751    #[doc = " \\brief Updates node parameters in the child graph node in the given graphExec.\n\n Updates the work represented by \\p hNode in \\p hGraphExec as though the nodes contained\n in \\p hNode's graph had the parameters contained in \\p childGraph's nodes at instantiation.\n \\p hNode must remain in the graph which was used to instantiate \\p hGraphExec.\n Changed edges to and from \\p hNode are ignored.\n\n The modifications only affect future launches of \\p hGraphExec.  Already enqueued\n or running launches of \\p hGraphExec are not affected by this call.  \\p hNode is also\n not modified by this call.\n\n The topology of \\p childGraph, as well as the node insertion order,  must match that\n of the graph contained in \\p hNode.  See ::cuGraphExecUpdate() for a list of restrictions\n on what can be updated in an instantiated graph.  The update is recursive, so child graph\n nodes contained within the top level child graph will also be updated.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param hNode      - Host node from the graph which was used to instantiate graphExec\n \\param childGraph - The graph supplying the updated parameters\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddChildGraphNode,\n ::cuGraphChildGraphNodeGetGraph,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemcpyNodeSetParams,\n ::cuGraphExecMemsetNodeSetParams,\n ::cuGraphExecHostNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9752    pub unsafe fn cuGraphExecChildGraphNodeSetParams(
9753        &self,
9754        hGraphExec: CUgraphExec,
9755        hNode: CUgraphNode,
9756        childGraph: CUgraph,
9757    ) -> CUresult {
9758        (self
9759            .cuGraphExecChildGraphNodeSetParams
9760            .as_ref()
9761            .expect("Expected function, got error."))(hGraphExec, hNode, childGraph)
9762    }
9763    #[doc = " \\brief Sets the event for an event record node in the given graphExec\n\n Sets the event of an event record node in an executable graph \\p hGraphExec.\n The node is identified by the corresponding node \\p hNode in the\n non-executable graph, from which the executable graph was instantiated.\n\n The modifications only affect future launches of \\p hGraphExec. Already\n enqueued or running launches of \\p hGraphExec are not affected by this call.\n \\p hNode is also not modified by this call.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param hNode      - event record node from the graph from which graphExec was instantiated\n \\param event      - Updated event to use\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddEventRecordNode,\n ::cuGraphEventRecordNodeGetEvent,\n ::cuGraphEventWaitNodeSetEvent,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemcpyNodeSetParams,\n ::cuGraphExecMemsetNodeSetParams,\n ::cuGraphExecHostNodeSetParams,\n ::cuGraphExecChildGraphNodeSetParams,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9764    pub unsafe fn cuGraphExecEventRecordNodeSetEvent(
9765        &self,
9766        hGraphExec: CUgraphExec,
9767        hNode: CUgraphNode,
9768        event: CUevent,
9769    ) -> CUresult {
9770        (self
9771            .cuGraphExecEventRecordNodeSetEvent
9772            .as_ref()
9773            .expect("Expected function, got error."))(hGraphExec, hNode, event)
9774    }
9775    #[doc = " \\brief Sets the event for an event wait node in the given graphExec\n\n Sets the event of an event wait node in an executable graph \\p hGraphExec.\n The node is identified by the corresponding node \\p hNode in the\n non-executable graph, from which the executable graph was instantiated.\n\n The modifications only affect future launches of \\p hGraphExec. Already\n enqueued or running launches of \\p hGraphExec are not affected by this call.\n \\p hNode is also not modified by this call.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param hNode      - event wait node from the graph from which graphExec was instantiated\n \\param event      - Updated event to use\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddEventWaitNode,\n ::cuGraphEventWaitNodeGetEvent,\n ::cuGraphEventRecordNodeSetEvent,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemcpyNodeSetParams,\n ::cuGraphExecMemsetNodeSetParams,\n ::cuGraphExecHostNodeSetParams,\n ::cuGraphExecChildGraphNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9776    pub unsafe fn cuGraphExecEventWaitNodeSetEvent(
9777        &self,
9778        hGraphExec: CUgraphExec,
9779        hNode: CUgraphNode,
9780        event: CUevent,
9781    ) -> CUresult {
9782        (self
9783            .cuGraphExecEventWaitNodeSetEvent
9784            .as_ref()
9785            .expect("Expected function, got error."))(hGraphExec, hNode, event)
9786    }
9787    #[doc = " \\brief Sets the parameters for an external semaphore signal node in the given graphExec\n\n Sets the parameters of an external semaphore signal node in an executable graph \\p hGraphExec.\n The node is identified by the corresponding node \\p hNode in the\n non-executable graph, from which the executable graph was instantiated.\n\n \\p hNode must not have been removed from the original graph.\n\n The modifications only affect future launches of \\p hGraphExec. Already\n enqueued or running launches of \\p hGraphExec are not affected by this call.\n \\p hNode is also not modified by this call.\n\n Changing \\p nodeParams->numExtSems is not supported.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param hNode      - semaphore signal node from the graph from which graphExec was instantiated\n \\param nodeParams - Updated Parameters to set\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddExternalSemaphoresSignalNode,\n ::cuImportExternalSemaphore,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemcpyNodeSetParams,\n ::cuGraphExecMemsetNodeSetParams,\n ::cuGraphExecHostNodeSetParams,\n ::cuGraphExecChildGraphNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9788    pub unsafe fn cuGraphExecExternalSemaphoresSignalNodeSetParams(
9789        &self,
9790        hGraphExec: CUgraphExec,
9791        hNode: CUgraphNode,
9792        nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
9793    ) -> CUresult {
9794        (self
9795            .cuGraphExecExternalSemaphoresSignalNodeSetParams
9796            .as_ref()
9797            .expect("Expected function, got error."))(hGraphExec, hNode, nodeParams)
9798    }
9799    #[doc = " \\brief Sets the parameters for an external semaphore wait node in the given graphExec\n\n Sets the parameters of an external semaphore wait node in an executable graph \\p hGraphExec.\n The node is identified by the corresponding node \\p hNode in the\n non-executable graph, from which the executable graph was instantiated.\n\n \\p hNode must not have been removed from the original graph.\n\n The modifications only affect future launches of \\p hGraphExec. Already\n enqueued or running launches of \\p hGraphExec are not affected by this call.\n \\p hNode is also not modified by this call.\n\n Changing \\p nodeParams->numExtSems is not supported.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param hNode      - semaphore wait node from the graph from which graphExec was instantiated\n \\param nodeParams - Updated Parameters to set\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuImportExternalSemaphore,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemcpyNodeSetParams,\n ::cuGraphExecMemsetNodeSetParams,\n ::cuGraphExecHostNodeSetParams,\n ::cuGraphExecChildGraphNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9800    pub unsafe fn cuGraphExecExternalSemaphoresWaitNodeSetParams(
9801        &self,
9802        hGraphExec: CUgraphExec,
9803        hNode: CUgraphNode,
9804        nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
9805    ) -> CUresult {
9806        (self
9807            .cuGraphExecExternalSemaphoresWaitNodeSetParams
9808            .as_ref()
9809            .expect("Expected function, got error."))(hGraphExec, hNode, nodeParams)
9810    }
9811    #[doc = " \\brief Enables or disables the specified node in the given graphExec\n\n Sets \\p hNode to be either enabled or disabled. Disabled nodes are functionally equivalent\n to empty nodes until they are reenabled. Existing node parameters are not affected by\n disabling/enabling the node.\n\n The node is identified by the corresponding node \\p hNode in the non-executable\n graph, from which the executable graph was instantiated.\n\n \\p hNode must not have been removed from the original graph.\n\n The modifications only affect future launches of \\p hGraphExec. Already\n enqueued or running launches of \\p hGraphExec are not affected by this call.\n \\p hNode is also not modified by this call.\n\n \\note Currently only kernel, memset and memcpy nodes are supported.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param hNode      - Node from the graph from which graphExec was instantiated\n \\param isEnabled  - Node is enabled if != 0, otherwise the node is disabled\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphNodeGetEnabled,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate\n ::cuGraphLaunch"]
9812    pub unsafe fn cuGraphNodeSetEnabled(
9813        &self,
9814        hGraphExec: CUgraphExec,
9815        hNode: CUgraphNode,
9816        isEnabled: ::std::os::raw::c_uint,
9817    ) -> CUresult {
9818        (self
9819            .cuGraphNodeSetEnabled
9820            .as_ref()
9821            .expect("Expected function, got error."))(hGraphExec, hNode, isEnabled)
9822    }
9823    #[doc = " \\brief Query whether a node in the given graphExec is enabled\n\n Sets isEnabled to 1 if \\p hNode is enabled, or 0 if \\p hNode is disabled.\n\n The node is identified by the corresponding node \\p hNode in the non-executable\n graph, from which the executable graph was instantiated.\n\n \\p hNode must not have been removed from the original graph.\n\n \\note Currently only kernel, memset and memcpy nodes are supported.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param hNode      - Node from the graph from which graphExec was instantiated\n \\param isEnabled  - Location to return the enabled status of the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphNodeSetEnabled,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate\n ::cuGraphLaunch"]
9824    pub unsafe fn cuGraphNodeGetEnabled(
9825        &self,
9826        hGraphExec: CUgraphExec,
9827        hNode: CUgraphNode,
9828        isEnabled: *mut ::std::os::raw::c_uint,
9829    ) -> CUresult {
9830        (self
9831            .cuGraphNodeGetEnabled
9832            .as_ref()
9833            .expect("Expected function, got error."))(hGraphExec, hNode, isEnabled)
9834    }
9835    #[doc = " \\brief Uploads an executable graph in a stream\n\n Uploads \\p hGraphExec to the device in \\p hStream without executing it. Uploads of\n the same \\p hGraphExec will be serialized. Each upload is ordered behind both any\n previous work in \\p hStream and any previous launches of \\p hGraphExec.\n Uses memory cached by \\p stream to back the allocations owned by \\p hGraphExec.\n\n \\param hGraphExec - Executable graph to upload\n \\param hStream    - Stream in which to upload the graph\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphInstantiate,\n ::cuGraphLaunch,\n ::cuGraphExecDestroy"]
9836    pub unsafe fn cuGraphUpload(&self, hGraphExec: CUgraphExec, hStream: CUstream) -> CUresult {
9837        (self
9838            .cuGraphUpload
9839            .as_ref()
9840            .expect("Expected function, got error."))(hGraphExec, hStream)
9841    }
9842    #[doc = " \\brief Launches an executable graph in a stream\n\n Executes \\p hGraphExec in \\p hStream. Only one instance of \\p hGraphExec may be executing\n at a time. Each launch is ordered behind both any previous work in \\p hStream\n and any previous launches of \\p hGraphExec. To execute a graph concurrently, it must be\n instantiated multiple times into multiple executable graphs.\n\n If any allocations created by \\p hGraphExec remain unfreed (from a previous launch) and\n \\p hGraphExec was not instantiated with ::CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH,\n the launch will fail with ::CUDA_ERROR_INVALID_VALUE.\n\n \\param hGraphExec - Executable graph to launch\n \\param hStream    - Stream in which to launch the graph\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphInstantiate,\n ::cuGraphUpload,\n ::cuGraphExecDestroy"]
9843    pub unsafe fn cuGraphLaunch(&self, hGraphExec: CUgraphExec, hStream: CUstream) -> CUresult {
9844        (self
9845            .cuGraphLaunch
9846            .as_ref()
9847            .expect("Expected function, got error."))(hGraphExec, hStream)
9848    }
9849    #[doc = " \\brief Destroys an executable graph\n\n Destroys the executable graph specified by \\p hGraphExec, as well\n as all of its executable nodes. If the executable graph is\n in-flight, it will not be terminated, but rather freed\n asynchronously on completion.\n\n \\param hGraphExec - Executable graph to destroy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphInstantiate,\n ::cuGraphUpload,\n ::cuGraphLaunch"]
9850    pub unsafe fn cuGraphExecDestroy(&self, hGraphExec: CUgraphExec) -> CUresult {
9851        (self
9852            .cuGraphExecDestroy
9853            .as_ref()
9854            .expect("Expected function, got error."))(hGraphExec)
9855    }
9856    #[doc = " \\brief Destroys a graph\n\n Destroys the graph specified by \\p hGraph, as well as all of its nodes.\n\n \\param hGraph - Graph to destroy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphCreate"]
9857    pub unsafe fn cuGraphDestroy(&self, hGraph: CUgraph) -> CUresult {
9858        (self
9859            .cuGraphDestroy
9860            .as_ref()
9861            .expect("Expected function, got error."))(hGraph)
9862    }
9863    pub unsafe fn cuGraphExecUpdate_v2(
9864        &self,
9865        hGraphExec: CUgraphExec,
9866        hGraph: CUgraph,
9867        resultInfo: *mut CUgraphExecUpdateResultInfo,
9868    ) -> CUresult {
9869        (self
9870            .cuGraphExecUpdate_v2
9871            .as_ref()
9872            .expect("Expected function, got error."))(hGraphExec, hGraph, resultInfo)
9873    }
9874    #[doc = " \\brief Copies attributes from source node to destination node.\n\n Copies attributes from source node \\p src to destination node \\p dst.\n Both node must have the same context.\n\n \\param[out] dst Destination node\n \\param[in] src Source node\n For list of attributes see ::CUkernelNodeAttrID\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa\n ::CUaccessPolicyWindow"]
9875    pub unsafe fn cuGraphKernelNodeCopyAttributes(
9876        &self,
9877        dst: CUgraphNode,
9878        src: CUgraphNode,
9879    ) -> CUresult {
9880        (self
9881            .cuGraphKernelNodeCopyAttributes
9882            .as_ref()
9883            .expect("Expected function, got error."))(dst, src)
9884    }
9885    #[doc = " \\brief Queries node attribute.\n\n Queries attribute \\p attr from node \\p hNode and stores it in corresponding\n member of \\p value_out.\n\n \\param[in] hNode\n \\param[in] attr\n \\param[out] value_out\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa\n ::CUaccessPolicyWindow"]
9886    pub unsafe fn cuGraphKernelNodeGetAttribute(
9887        &self,
9888        hNode: CUgraphNode,
9889        attr: CUkernelNodeAttrID,
9890        value_out: *mut CUkernelNodeAttrValue,
9891    ) -> CUresult {
9892        (self
9893            .cuGraphKernelNodeGetAttribute
9894            .as_ref()
9895            .expect("Expected function, got error."))(hNode, attr, value_out)
9896    }
9897    #[doc = " \\brief Sets node attribute.\n\n Sets attribute \\p attr on node \\p hNode from corresponding attribute of\n \\p value.\n\n \\param[out] hNode\n \\param[in] attr\n \\param[out] value\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa\n ::CUaccessPolicyWindow"]
9898    pub unsafe fn cuGraphKernelNodeSetAttribute(
9899        &self,
9900        hNode: CUgraphNode,
9901        attr: CUkernelNodeAttrID,
9902        value: *const CUkernelNodeAttrValue,
9903    ) -> CUresult {
9904        (self
9905            .cuGraphKernelNodeSetAttribute
9906            .as_ref()
9907            .expect("Expected function, got error."))(hNode, attr, value)
9908    }
9909    #[doc = " \\brief Write a DOT file describing graph structure\n\n Using the provided \\p hGraph, write to \\p path a DOT formatted description of the graph.\n By default this includes the graph topology, node types, node id, kernel names and memcpy direction.\n \\p flags can be specified to write more detailed information about each node type such as\n parameter values, kernel attributes, node and function handles.\n\n \\param hGraph - The graph to create a DOT file from\n \\param path   - The path to write the DOT file to\n \\param flags  - Flags from CUgraphDebugDot_flags for specifying which additional node information to write\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_OPERATING_SYSTEM"]
9910    pub unsafe fn cuGraphDebugDotPrint(
9911        &self,
9912        hGraph: CUgraph,
9913        path: *const ::std::os::raw::c_char,
9914        flags: ::std::os::raw::c_uint,
9915    ) -> CUresult {
9916        (self
9917            .cuGraphDebugDotPrint
9918            .as_ref()
9919            .expect("Expected function, got error."))(hGraph, path, flags)
9920    }
9921    #[doc = " \\brief Create a user object\n\n Create a user object with the specified destructor callback and initial reference count. The\n initial references are owned by the caller.\n\n Destructor callbacks cannot make CUDA API calls and should avoid blocking behavior, as they\n are executed by a shared internal thread. Another thread may be signaled to perform such\n actions, if it does not block forward progress of tasks scheduled through CUDA.\n\n See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.\n\n \\param object_out      - Location to return the user object handle\n \\param ptr             - The pointer to pass to the destroy function\n \\param destroy         - Callback to free the user object when it is no longer in use\n \\param initialRefcount - The initial refcount to create the object with, typically 1. The\n                          initial references are owned by the calling thread.\n \\param flags           - Currently it is required to pass ::CU_USER_OBJECT_NO_DESTRUCTOR_SYNC,\n                          which is the only defined flag. This indicates that the destroy\n                          callback cannot be waited on by any CUDA API. Users requiring\n                          synchronization of the callback should signal its completion\n                          manually.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuUserObjectRetain,\n ::cuUserObjectRelease,\n ::cuGraphRetainUserObject,\n ::cuGraphReleaseUserObject,\n ::cuGraphCreate"]
9922    pub unsafe fn cuUserObjectCreate(
9923        &self,
9924        object_out: *mut CUuserObject,
9925        ptr: *mut ::std::os::raw::c_void,
9926        destroy: CUhostFn,
9927        initialRefcount: ::std::os::raw::c_uint,
9928        flags: ::std::os::raw::c_uint,
9929    ) -> CUresult {
9930        (self
9931            .cuUserObjectCreate
9932            .as_ref()
9933            .expect("Expected function, got error."))(
9934            object_out,
9935            ptr,
9936            destroy,
9937            initialRefcount,
9938            flags,
9939        )
9940    }
9941    #[doc = " \\brief Retain a reference to a user object\n\n Retains new references to a user object. The new references are owned by the caller.\n\n See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.\n\n \\param object - The object to retain\n \\param count  - The number of references to retain, typically 1. Must be nonzero\n                 and not larger than INT_MAX.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuUserObjectCreate,\n ::cuUserObjectRelease,\n ::cuGraphRetainUserObject,\n ::cuGraphReleaseUserObject,\n ::cuGraphCreate"]
9942    pub unsafe fn cuUserObjectRetain(
9943        &self,
9944        object: CUuserObject,
9945        count: ::std::os::raw::c_uint,
9946    ) -> CUresult {
9947        (self
9948            .cuUserObjectRetain
9949            .as_ref()
9950            .expect("Expected function, got error."))(object, count)
9951    }
9952    #[doc = " \\brief Release a reference to a user object\n\n Releases user object references owned by the caller. The object's destructor is invoked if\n the reference count reaches zero.\n\n It is undefined behavior to release references not owned by the caller, or to use a user\n object handle after all references are released.\n\n See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.\n\n \\param object - The object to release\n \\param count  - The number of references to release, typically 1. Must be nonzero\n                 and not larger than INT_MAX.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuUserObjectCreate,\n ::cuUserObjectRetain,\n ::cuGraphRetainUserObject,\n ::cuGraphReleaseUserObject,\n ::cuGraphCreate"]
9953    pub unsafe fn cuUserObjectRelease(
9954        &self,
9955        object: CUuserObject,
9956        count: ::std::os::raw::c_uint,
9957    ) -> CUresult {
9958        (self
9959            .cuUserObjectRelease
9960            .as_ref()
9961            .expect("Expected function, got error."))(object, count)
9962    }
9963    #[doc = " \\brief Retain a reference to a user object from a graph\n\n Creates or moves user object references that will be owned by a CUDA graph.\n\n See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.\n\n \\param graph  - The graph to associate the reference with\n \\param object - The user object to retain a reference for\n \\param count  - The number of references to add to the graph, typically 1. Must be\n                 nonzero and not larger than INT_MAX.\n \\param flags  - The optional flag ::CU_GRAPH_USER_OBJECT_MOVE transfers references\n                 from the calling thread, rather than create new references. Pass 0\n                 to create new references.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuUserObjectCreate,\n ::cuUserObjectRetain,\n ::cuUserObjectRelease,\n ::cuGraphReleaseUserObject,\n ::cuGraphCreate"]
9964    pub unsafe fn cuGraphRetainUserObject(
9965        &self,
9966        graph: CUgraph,
9967        object: CUuserObject,
9968        count: ::std::os::raw::c_uint,
9969        flags: ::std::os::raw::c_uint,
9970    ) -> CUresult {
9971        (self
9972            .cuGraphRetainUserObject
9973            .as_ref()
9974            .expect("Expected function, got error."))(graph, object, count, flags)
9975    }
9976    #[doc = " \\brief Release a user object reference from a graph\n\n Releases user object references owned by a graph.\n\n See CUDA User Objects in the CUDA C++ Programming Guide for more information on user objects.\n\n \\param graph  - The graph that will release the reference\n \\param object - The user object to release a reference for\n \\param count  - The number of references to release, typically 1. Must be nonzero\n                 and not larger than INT_MAX.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuUserObjectCreate,\n ::cuUserObjectRetain,\n ::cuUserObjectRelease,\n ::cuGraphRetainUserObject,\n ::cuGraphCreate"]
9977    pub unsafe fn cuGraphReleaseUserObject(
9978        &self,
9979        graph: CUgraph,
9980        object: CUuserObject,
9981        count: ::std::os::raw::c_uint,
9982    ) -> CUresult {
9983        (self
9984            .cuGraphReleaseUserObject
9985            .as_ref()
9986            .expect("Expected function, got error."))(graph, object, count)
9987    }
9988    #[doc = " \\brief Returns occupancy of a function\n\n Returns in \\p *numBlocks the number of the maximum active blocks per\n streaming multiprocessor.\n\n \\param numBlocks       - Returned occupancy\n \\param func            - Kernel for which occupancy is calculated\n \\param blockSize       - Block size the kernel is intended to be launched with\n \\param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa\n ::cudaOccupancyMaxActiveBlocksPerMultiprocessor"]
9989    pub unsafe fn cuOccupancyMaxActiveBlocksPerMultiprocessor(
9990        &self,
9991        numBlocks: *mut ::std::os::raw::c_int,
9992        func: CUfunction,
9993        blockSize: ::std::os::raw::c_int,
9994        dynamicSMemSize: usize,
9995    ) -> CUresult {
9996        (self
9997            .cuOccupancyMaxActiveBlocksPerMultiprocessor
9998            .as_ref()
9999            .expect("Expected function, got error."))(
10000            numBlocks, func, blockSize, dynamicSMemSize
10001        )
10002    }
10003    #[doc = " \\brief Returns occupancy of a function\n\n Returns in \\p *numBlocks the number of the maximum active blocks per\n streaming multiprocessor.\n\n The \\p Flags parameter controls how special cases are handled. The\n valid flags are:\n\n - ::CU_OCCUPANCY_DEFAULT, which maintains the default behavior as\n   ::cuOccupancyMaxActiveBlocksPerMultiprocessor;\n\n - ::CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE, which suppresses the\n   default behavior on platform where global caching affects\n   occupancy. On such platforms, if caching is enabled, but\n   per-block SM resource usage would result in zero occupancy, the\n   occupancy calculator will calculate the occupancy as if caching\n   is disabled. Setting ::CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE makes\n   the occupancy calculator to return 0 in such cases. More information\n   can be found about this feature in the \"Unified L1/Texture Cache\"\n   section of the Maxwell tuning guide.\n\n \\param numBlocks       - Returned occupancy\n \\param func            - Kernel for which occupancy is calculated\n \\param blockSize       - Block size the kernel is intended to be launched with\n \\param dynamicSMemSize - Per-block dynamic shared memory usage intended, in bytes\n \\param flags           - Requested behavior for the occupancy calculator\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa\n ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"]
10004    pub unsafe fn cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
10005        &self,
10006        numBlocks: *mut ::std::os::raw::c_int,
10007        func: CUfunction,
10008        blockSize: ::std::os::raw::c_int,
10009        dynamicSMemSize: usize,
10010        flags: ::std::os::raw::c_uint,
10011    ) -> CUresult {
10012        (self
10013            .cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags
10014            .as_ref()
10015            .expect("Expected function, got error."))(
10016            numBlocks,
10017            func,
10018            blockSize,
10019            dynamicSMemSize,
10020            flags,
10021        )
10022    }
10023    #[doc = " \\brief Suggest a launch configuration with reasonable occupancy\n\n Returns in \\p *blockSize a reasonable block size that can achieve\n the maximum occupancy (or, the maximum number of active warps with\n the fewest blocks per multiprocessor), and in \\p *minGridSize the\n minimum grid size to achieve the maximum occupancy.\n\n If \\p blockSizeLimit is 0, the configurator will use the maximum\n block size permitted by the device / function instead.\n\n If per-block dynamic shared memory allocation is not needed, the\n user should leave both \\p blockSizeToDynamicSMemSize and \\p\n dynamicSMemSize as 0.\n\n If per-block dynamic shared memory allocation is needed, then if\n the dynamic shared memory size is constant regardless of block\n size, the size should be passed through \\p dynamicSMemSize, and \\p\n blockSizeToDynamicSMemSize should be NULL.\n\n Otherwise, if the per-block dynamic shared memory size varies with\n different block sizes, the user needs to provide a unary function\n through \\p blockSizeToDynamicSMemSize that computes the dynamic\n shared memory needed by \\p func for any given block size. \\p\n dynamicSMemSize is ignored. An example signature is:\n\n \\code\n    // Take block size, returns dynamic shared memory needed\n    size_t blockToSmem(int blockSize);\n \\endcode\n\n \\param minGridSize - Returned minimum grid size needed to achieve the maximum occupancy\n \\param blockSize   - Returned maximum block size that can achieve the maximum occupancy\n \\param func        - Kernel for which launch configuration is calculated\n \\param blockSizeToDynamicSMemSize - A function that calculates how much per-block dynamic shared memory \\p func uses based on the block size\n \\param dynamicSMemSize - Dynamic shared memory usage intended, in bytes\n \\param blockSizeLimit  - The maximum block size \\p func is designed to handle\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa\n ::cudaOccupancyMaxPotentialBlockSize"]
10024    pub unsafe fn cuOccupancyMaxPotentialBlockSize(
10025        &self,
10026        minGridSize: *mut ::std::os::raw::c_int,
10027        blockSize: *mut ::std::os::raw::c_int,
10028        func: CUfunction,
10029        blockSizeToDynamicSMemSize: CUoccupancyB2DSize,
10030        dynamicSMemSize: usize,
10031        blockSizeLimit: ::std::os::raw::c_int,
10032    ) -> CUresult {
10033        (self
10034            .cuOccupancyMaxPotentialBlockSize
10035            .as_ref()
10036            .expect("Expected function, got error."))(
10037            minGridSize,
10038            blockSize,
10039            func,
10040            blockSizeToDynamicSMemSize,
10041            dynamicSMemSize,
10042            blockSizeLimit,
10043        )
10044    }
10045    #[doc = " \\brief Suggest a launch configuration with reasonable occupancy\n\n An extended version of ::cuOccupancyMaxPotentialBlockSize. In\n addition to arguments passed to ::cuOccupancyMaxPotentialBlockSize,\n ::cuOccupancyMaxPotentialBlockSizeWithFlags also takes a \\p Flags\n parameter.\n\n The \\p Flags parameter controls how special cases are handled. The\n valid flags are:\n\n - ::CU_OCCUPANCY_DEFAULT, which maintains the default behavior as\n   ::cuOccupancyMaxPotentialBlockSize;\n\n - ::CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE, which suppresses the\n   default behavior on platform where global caching affects\n   occupancy. On such platforms, the launch configurations that\n   produces maximal occupancy might not support global\n   caching. Setting ::CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE\n   guarantees that the the produced launch configuration is global\n   caching compatible at a potential cost of occupancy. More information\n   can be found about this feature in the \"Unified L1/Texture Cache\"\n   section of the Maxwell tuning guide.\n\n \\param minGridSize - Returned minimum grid size needed to achieve the maximum occupancy\n \\param blockSize   - Returned maximum block size that can achieve the maximum occupancy\n \\param func        - Kernel for which launch configuration is calculated\n \\param blockSizeToDynamicSMemSize - A function that calculates how much per-block dynamic shared memory \\p func uses based on the block size\n \\param dynamicSMemSize - Dynamic shared memory usage intended, in bytes\n \\param blockSizeLimit  - The maximum block size \\p func is designed to handle\n \\param flags       - Options\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa\n ::cudaOccupancyMaxPotentialBlockSizeWithFlags"]
10046    pub unsafe fn cuOccupancyMaxPotentialBlockSizeWithFlags(
10047        &self,
10048        minGridSize: *mut ::std::os::raw::c_int,
10049        blockSize: *mut ::std::os::raw::c_int,
10050        func: CUfunction,
10051        blockSizeToDynamicSMemSize: CUoccupancyB2DSize,
10052        dynamicSMemSize: usize,
10053        blockSizeLimit: ::std::os::raw::c_int,
10054        flags: ::std::os::raw::c_uint,
10055    ) -> CUresult {
10056        (self
10057            .cuOccupancyMaxPotentialBlockSizeWithFlags
10058            .as_ref()
10059            .expect("Expected function, got error."))(
10060            minGridSize,
10061            blockSize,
10062            func,
10063            blockSizeToDynamicSMemSize,
10064            dynamicSMemSize,
10065            blockSizeLimit,
10066            flags,
10067        )
10068    }
10069    #[doc = " \\brief Returns dynamic shared memory available per block when launching \\p numBlocks blocks on SM\n\n Returns in \\p *dynamicSmemSize the maximum size of dynamic shared memory to allow \\p numBlocks blocks per SM.\n\n \\param dynamicSmemSize - Returned maximum dynamic shared memory\n \\param func            - Kernel function for which occupancy is calculated\n \\param numBlocks       - Number of blocks to fit on SM\n \\param blockSize       - Size of the blocks\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr"]
10070    pub unsafe fn cuOccupancyAvailableDynamicSMemPerBlock(
10071        &self,
10072        dynamicSmemSize: *mut usize,
10073        func: CUfunction,
10074        numBlocks: ::std::os::raw::c_int,
10075        blockSize: ::std::os::raw::c_int,
10076    ) -> CUresult {
10077        (self
10078            .cuOccupancyAvailableDynamicSMemPerBlock
10079            .as_ref()
10080            .expect("Expected function, got error."))(
10081            dynamicSmemSize, func, numBlocks, blockSize
10082        )
10083    }
10084    #[doc = " \\brief Given the kernel function (\\p func) and launch configuration\n (\\p config), return the maximum cluster size in \\p *clusterSize.\n\n The cluster dimensions in \\p config are ignored. If func has a required\n cluster size set (see ::cudaFuncGetAttributes / ::cuFuncGetAttribute),\\p\n *clusterSize will reflect the required cluster size.\n\n By default this function will always return a value that's portable on\n future hardware. A higher value may be returned if the kernel function\n allows non-portable cluster sizes.\n\n This function will respect the compile time launch bounds.\n\n \\param clusterSize - Returned maximum cluster size that can be launched\n                      for the given kernel function and launch configuration\n \\param func        - Kernel function for which maximum cluster\n                      size is calculated\n \\param config      - Launch configuration for the given kernel function\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa\n ::cudaFuncGetAttributes,\n ::cuFuncGetAttribute"]
10085    pub unsafe fn cuOccupancyMaxPotentialClusterSize(
10086        &self,
10087        clusterSize: *mut ::std::os::raw::c_int,
10088        func: CUfunction,
10089        config: *const CUlaunchConfig,
10090    ) -> CUresult {
10091        (self
10092            .cuOccupancyMaxPotentialClusterSize
10093            .as_ref()
10094            .expect("Expected function, got error."))(clusterSize, func, config)
10095    }
10096    #[doc = " \\brief Given the kernel function (\\p func) and launch configuration\n (\\p config), return the maximum number of clusters that could co-exist\n on the target device in \\p *numClusters.\n\n If the function has required cluster size already set (see\n ::cudaFuncGetAttributes / ::cuFuncGetAttribute), the cluster size\n from config must either be unspecified or match the required size.\n Without required sizes, the cluster size must be specified in config,\n else the function will return an error.\n\n Note that various attributes of the kernel function may affect occupancy\n calculation. Runtime environment may affect how the hardware schedules\n the clusters, so the calculated occupancy is not guaranteed to be achievable.\n\n \\param numClusters - Returned maximum number of clusters that\n                      could co-exist on the target device\n \\param func        - Kernel function for which maximum number\n                      of clusters are calculated\n \\param config      - Launch configuration for the given kernel function\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_CLUSTER_SIZE,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa\n ::cudaFuncGetAttributes,\n ::cuFuncGetAttribute"]
10097    pub unsafe fn cuOccupancyMaxActiveClusters(
10098        &self,
10099        numClusters: *mut ::std::os::raw::c_int,
10100        func: CUfunction,
10101        config: *const CUlaunchConfig,
10102    ) -> CUresult {
10103        (self
10104            .cuOccupancyMaxActiveClusters
10105            .as_ref()
10106            .expect("Expected function, got error."))(numClusters, func, config)
10107    }
10108    #[doc = " \\brief Binds an array as a texture reference\n\n \\deprecated\n\n Binds the CUDA array \\p hArray to the texture reference \\p hTexRef. Any\n previous address or CUDA array state associated with the texture reference\n is superseded by this function. \\p Flags must be set to\n ::CU_TRSA_OVERRIDE_FORMAT. Any CUDA array previously bound to \\p hTexRef is\n unbound.\n\n \\param hTexRef - Texture reference to bind\n \\param hArray  - Array to bind\n \\param Flags   - Options (must be ::CU_TRSA_OVERRIDE_FORMAT)\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10109    pub unsafe fn cuTexRefSetArray(
10110        &self,
10111        hTexRef: CUtexref,
10112        hArray: CUarray,
10113        Flags: ::std::os::raw::c_uint,
10114    ) -> CUresult {
10115        (self
10116            .cuTexRefSetArray
10117            .as_ref()
10118            .expect("Expected function, got error."))(hTexRef, hArray, Flags)
10119    }
10120    #[doc = " \\brief Binds a mipmapped array to a texture reference\n\n \\deprecated\n\n Binds the CUDA mipmapped array \\p hMipmappedArray to the texture reference \\p hTexRef.\n Any previous address or CUDA array state associated with the texture reference\n is superseded by this function. \\p Flags must be set to ::CU_TRSA_OVERRIDE_FORMAT.\n Any CUDA array previously bound to \\p hTexRef is unbound.\n\n \\param hTexRef         - Texture reference to bind\n \\param hMipmappedArray - Mipmapped array to bind\n \\param Flags           - Options (must be ::CU_TRSA_OVERRIDE_FORMAT)\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10121    pub unsafe fn cuTexRefSetMipmappedArray(
10122        &self,
10123        hTexRef: CUtexref,
10124        hMipmappedArray: CUmipmappedArray,
10125        Flags: ::std::os::raw::c_uint,
10126    ) -> CUresult {
10127        (self
10128            .cuTexRefSetMipmappedArray
10129            .as_ref()
10130            .expect("Expected function, got error."))(hTexRef, hMipmappedArray, Flags)
10131    }
10132    pub unsafe fn cuTexRefSetAddress_v2(
10133        &self,
10134        ByteOffset: *mut usize,
10135        hTexRef: CUtexref,
10136        dptr: CUdeviceptr,
10137        bytes: usize,
10138    ) -> CUresult {
10139        (self
10140            .cuTexRefSetAddress_v2
10141            .as_ref()
10142            .expect("Expected function, got error."))(ByteOffset, hTexRef, dptr, bytes)
10143    }
10144    pub unsafe fn cuTexRefSetAddress2D_v3(
10145        &self,
10146        hTexRef: CUtexref,
10147        desc: *const CUDA_ARRAY_DESCRIPTOR,
10148        dptr: CUdeviceptr,
10149        Pitch: usize,
10150    ) -> CUresult {
10151        (self
10152            .cuTexRefSetAddress2D_v3
10153            .as_ref()
10154            .expect("Expected function, got error."))(hTexRef, desc, dptr, Pitch)
10155    }
10156    #[doc = " \\brief Sets the format for a texture reference\n\n \\deprecated\n\n Specifies the format of the data to be read by the texture reference\n \\p hTexRef. \\p fmt and \\p NumPackedComponents are exactly analogous to the\n ::Format and ::NumChannels members of the ::CUDA_ARRAY_DESCRIPTOR structure:\n They specify the format of each component and the number of components per\n array element.\n\n \\param hTexRef             - Texture reference\n \\param fmt                 - Format to set\n \\param NumPackedComponents - Number of components per array element\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat,\n ::cudaCreateChannelDesc"]
10157    pub unsafe fn cuTexRefSetFormat(
10158        &self,
10159        hTexRef: CUtexref,
10160        fmt: CUarray_format,
10161        NumPackedComponents: ::std::os::raw::c_int,
10162    ) -> CUresult {
10163        (self
10164            .cuTexRefSetFormat
10165            .as_ref()
10166            .expect("Expected function, got error."))(hTexRef, fmt, NumPackedComponents)
10167    }
10168    #[doc = " \\brief Sets the addressing mode for a texture reference\n\n \\deprecated\n\n Specifies the addressing mode \\p am for the given dimension \\p dim of the\n texture reference \\p hTexRef. If \\p dim is zero, the addressing mode is\n applied to the first parameter of the functions used to fetch from the\n texture; if \\p dim is 1, the second, and so on. ::CUaddress_mode is defined\n as:\n \\code\ntypedef enum CUaddress_mode_enum {\nCU_TR_ADDRESS_MODE_WRAP = 0,\nCU_TR_ADDRESS_MODE_CLAMP = 1,\nCU_TR_ADDRESS_MODE_MIRROR = 2,\nCU_TR_ADDRESS_MODE_BORDER = 3\n} CUaddress_mode;\n \\endcode\n\n Note that this call has no effect if \\p hTexRef is bound to linear memory.\n Also, if the flag, ::CU_TRSF_NORMALIZED_COORDINATES, is not set, the only\n supported address mode is ::CU_TR_ADDRESS_MODE_CLAMP.\n\n \\param hTexRef - Texture reference\n \\param dim     - Dimension\n \\param am      - Addressing mode to set\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetArray,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10169    pub unsafe fn cuTexRefSetAddressMode(
10170        &self,
10171        hTexRef: CUtexref,
10172        dim: ::std::os::raw::c_int,
10173        am: CUaddress_mode,
10174    ) -> CUresult {
10175        (self
10176            .cuTexRefSetAddressMode
10177            .as_ref()
10178            .expect("Expected function, got error."))(hTexRef, dim, am)
10179    }
10180    #[doc = " \\brief Sets the filtering mode for a texture reference\n\n \\deprecated\n\n Specifies the filtering mode \\p fm to be used when reading memory through\n the texture reference \\p hTexRef. ::CUfilter_mode_enum is defined as:\n\n \\code\ntypedef enum CUfilter_mode_enum {\nCU_TR_FILTER_MODE_POINT = 0,\nCU_TR_FILTER_MODE_LINEAR = 1\n} CUfilter_mode;\n \\endcode\n\n Note that this call has no effect if \\p hTexRef is bound to linear memory.\n\n \\param hTexRef - Texture reference\n \\param fm      - Filtering mode to set\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10181    pub unsafe fn cuTexRefSetFilterMode(&self, hTexRef: CUtexref, fm: CUfilter_mode) -> CUresult {
10182        (self
10183            .cuTexRefSetFilterMode
10184            .as_ref()
10185            .expect("Expected function, got error."))(hTexRef, fm)
10186    }
10187    #[doc = " \\brief Sets the mipmap filtering mode for a texture reference\n\n \\deprecated\n\n Specifies the mipmap filtering mode \\p fm to be used when reading memory through\n the texture reference \\p hTexRef. ::CUfilter_mode_enum is defined as:\n\n \\code\ntypedef enum CUfilter_mode_enum {\nCU_TR_FILTER_MODE_POINT = 0,\nCU_TR_FILTER_MODE_LINEAR = 1\n} CUfilter_mode;\n \\endcode\n\n Note that this call has no effect if \\p hTexRef is not bound to a mipmapped array.\n\n \\param hTexRef - Texture reference\n \\param fm      - Filtering mode to set\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10188    pub unsafe fn cuTexRefSetMipmapFilterMode(
10189        &self,
10190        hTexRef: CUtexref,
10191        fm: CUfilter_mode,
10192    ) -> CUresult {
10193        (self
10194            .cuTexRefSetMipmapFilterMode
10195            .as_ref()
10196            .expect("Expected function, got error."))(hTexRef, fm)
10197    }
10198    #[doc = " \\brief Sets the mipmap level bias for a texture reference\n\n \\deprecated\n\n Specifies the mipmap level bias \\p bias to be added to the specified mipmap level when\n reading memory through the texture reference \\p hTexRef.\n\n Note that this call has no effect if \\p hTexRef is not bound to a mipmapped array.\n\n \\param hTexRef - Texture reference\n \\param bias    - Mipmap level bias\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10199    pub unsafe fn cuTexRefSetMipmapLevelBias(&self, hTexRef: CUtexref, bias: f32) -> CUresult {
10200        (self
10201            .cuTexRefSetMipmapLevelBias
10202            .as_ref()
10203            .expect("Expected function, got error."))(hTexRef, bias)
10204    }
10205    #[doc = " \\brief Sets the mipmap min/max mipmap level clamps for a texture reference\n\n \\deprecated\n\n Specifies the min/max mipmap level clamps, \\p minMipmapLevelClamp and \\p maxMipmapLevelClamp\n respectively, to be used when reading memory through the texture reference\n \\p hTexRef.\n\n Note that this call has no effect if \\p hTexRef is not bound to a mipmapped array.\n\n \\param hTexRef        - Texture reference\n \\param minMipmapLevelClamp - Mipmap min level clamp\n \\param maxMipmapLevelClamp - Mipmap max level clamp\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10206    pub unsafe fn cuTexRefSetMipmapLevelClamp(
10207        &self,
10208        hTexRef: CUtexref,
10209        minMipmapLevelClamp: f32,
10210        maxMipmapLevelClamp: f32,
10211    ) -> CUresult {
10212        (self
10213            .cuTexRefSetMipmapLevelClamp
10214            .as_ref()
10215            .expect("Expected function, got error."))(
10216            hTexRef,
10217            minMipmapLevelClamp,
10218            maxMipmapLevelClamp,
10219        )
10220    }
10221    #[doc = " \\brief Sets the maximum anisotropy for a texture reference\n\n \\deprecated\n\n Specifies the maximum anisotropy \\p maxAniso to be used when reading memory through\n the texture reference \\p hTexRef.\n\n Note that this call has no effect if \\p hTexRef is bound to linear memory.\n\n \\param hTexRef  - Texture reference\n \\param maxAniso - Maximum anisotropy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10222    pub unsafe fn cuTexRefSetMaxAnisotropy(
10223        &self,
10224        hTexRef: CUtexref,
10225        maxAniso: ::std::os::raw::c_uint,
10226    ) -> CUresult {
10227        (self
10228            .cuTexRefSetMaxAnisotropy
10229            .as_ref()
10230            .expect("Expected function, got error."))(hTexRef, maxAniso)
10231    }
10232    #[doc = " \\brief Sets the border color for a texture reference\n\n \\deprecated\n\n Specifies the value of the RGBA color via the \\p pBorderColor to the texture reference\n \\p hTexRef. The color value supports only float type and holds color components in\n the following sequence:\n pBorderColor[0] holds 'R' component\n pBorderColor[1] holds 'G' component\n pBorderColor[2] holds 'B' component\n pBorderColor[3] holds 'A' component\n\n Note that the color values can be set only when the Address mode is set to\n CU_TR_ADDRESS_MODE_BORDER using ::cuTexRefSetAddressMode.\n Applications using integer border color values have to \"reinterpret_cast\" their values to float.\n\n \\param hTexRef       - Texture reference\n \\param pBorderColor  - RGBA color\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexRefSetAddressMode,\n ::cuTexRefGetAddressMode, ::cuTexRefGetBorderColor"]
10233    pub unsafe fn cuTexRefSetBorderColor(
10234        &self,
10235        hTexRef: CUtexref,
10236        pBorderColor: *mut f32,
10237    ) -> CUresult {
10238        (self
10239            .cuTexRefSetBorderColor
10240            .as_ref()
10241            .expect("Expected function, got error."))(hTexRef, pBorderColor)
10242    }
10243    #[doc = " \\brief Sets the flags for a texture reference\n\n \\deprecated\n\n Specifies optional flags via \\p Flags to specify the behavior of data\n returned through the texture reference \\p hTexRef. The valid flags are:\n\n - ::CU_TRSF_READ_AS_INTEGER, which suppresses the default behavior of\n   having the texture promote integer data to floating point data in the\n   range [0, 1]. Note that texture with 32-bit integer format\n   would not be promoted, regardless of whether or not this\n   flag is specified;\n - ::CU_TRSF_NORMALIZED_COORDINATES, which suppresses the\n   default behavior of having the texture coordinates range\n   from [0, Dim) where Dim is the width or height of the CUDA\n   array. Instead, the texture coordinates [0, 1.0) reference\n   the entire breadth of the array dimension;\n - ::CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION, which disables any trilinear\n   filtering optimizations. Trilinear optimizations improve texture filtering\n   performance by allowing bilinear filtering on textures in scenarios where\n   it can closely approximate the expected results.\n\n \\param hTexRef - Texture reference\n \\param Flags   - Optional flags to set\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10244    pub unsafe fn cuTexRefSetFlags(
10245        &self,
10246        hTexRef: CUtexref,
10247        Flags: ::std::os::raw::c_uint,
10248    ) -> CUresult {
10249        (self
10250            .cuTexRefSetFlags
10251            .as_ref()
10252            .expect("Expected function, got error."))(hTexRef, Flags)
10253    }
10254    pub unsafe fn cuTexRefGetAddress_v2(
10255        &self,
10256        pdptr: *mut CUdeviceptr,
10257        hTexRef: CUtexref,
10258    ) -> CUresult {
10259        (self
10260            .cuTexRefGetAddress_v2
10261            .as_ref()
10262            .expect("Expected function, got error."))(pdptr, hTexRef)
10263    }
10264    #[doc = " \\brief Gets the array bound to a texture reference\n\n \\deprecated\n\n Returns in \\p *phArray the CUDA array bound to the texture reference\n \\p hTexRef, or returns ::CUDA_ERROR_INVALID_VALUE if the texture reference\n is not bound to any CUDA array.\n\n \\param phArray - Returned array\n \\param hTexRef - Texture reference\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10265    pub unsafe fn cuTexRefGetArray(&self, phArray: *mut CUarray, hTexRef: CUtexref) -> CUresult {
10266        (self
10267            .cuTexRefGetArray
10268            .as_ref()
10269            .expect("Expected function, got error."))(phArray, hTexRef)
10270    }
10271    #[doc = " \\brief Gets the mipmapped array bound to a texture reference\n\n \\deprecated\n\n Returns in \\p *phMipmappedArray the CUDA mipmapped array bound to the texture\n reference \\p hTexRef, or returns ::CUDA_ERROR_INVALID_VALUE if the texture reference\n is not bound to any CUDA mipmapped array.\n\n \\param phMipmappedArray - Returned mipmapped array\n \\param hTexRef          - Texture reference\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10272    pub unsafe fn cuTexRefGetMipmappedArray(
10273        &self,
10274        phMipmappedArray: *mut CUmipmappedArray,
10275        hTexRef: CUtexref,
10276    ) -> CUresult {
10277        (self
10278            .cuTexRefGetMipmappedArray
10279            .as_ref()
10280            .expect("Expected function, got error."))(phMipmappedArray, hTexRef)
10281    }
10282    #[doc = " \\brief Gets the addressing mode used by a texture reference\n\n \\deprecated\n\n Returns in \\p *pam the addressing mode corresponding to the\n dimension \\p dim of the texture reference \\p hTexRef. Currently, the only\n valid value for \\p dim are 0 and 1.\n\n \\param pam     - Returned addressing mode\n \\param hTexRef - Texture reference\n \\param dim     - Dimension\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10283    pub unsafe fn cuTexRefGetAddressMode(
10284        &self,
10285        pam: *mut CUaddress_mode,
10286        hTexRef: CUtexref,
10287        dim: ::std::os::raw::c_int,
10288    ) -> CUresult {
10289        (self
10290            .cuTexRefGetAddressMode
10291            .as_ref()
10292            .expect("Expected function, got error."))(pam, hTexRef, dim)
10293    }
10294    #[doc = " \\brief Gets the filter-mode used by a texture reference\n\n \\deprecated\n\n Returns in \\p *pfm the filtering mode of the texture reference\n \\p hTexRef.\n\n \\param pfm     - Returned filtering mode\n \\param hTexRef - Texture reference\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10295    pub unsafe fn cuTexRefGetFilterMode(
10296        &self,
10297        pfm: *mut CUfilter_mode,
10298        hTexRef: CUtexref,
10299    ) -> CUresult {
10300        (self
10301            .cuTexRefGetFilterMode
10302            .as_ref()
10303            .expect("Expected function, got error."))(pfm, hTexRef)
10304    }
10305    #[doc = " \\brief Gets the format used by a texture reference\n\n \\deprecated\n\n Returns in \\p *pFormat and \\p *pNumChannels the format and number\n of components of the CUDA array bound to the texture reference \\p hTexRef.\n If \\p pFormat or \\p pNumChannels is NULL, it will be ignored.\n\n \\param pFormat      - Returned format\n \\param pNumChannels - Returned number of components\n \\param hTexRef      - Texture reference\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags"]
10306    pub unsafe fn cuTexRefGetFormat(
10307        &self,
10308        pFormat: *mut CUarray_format,
10309        pNumChannels: *mut ::std::os::raw::c_int,
10310        hTexRef: CUtexref,
10311    ) -> CUresult {
10312        (self
10313            .cuTexRefGetFormat
10314            .as_ref()
10315            .expect("Expected function, got error."))(pFormat, pNumChannels, hTexRef)
10316    }
10317    #[doc = " \\brief Gets the mipmap filtering mode for a texture reference\n\n \\deprecated\n\n Returns the mipmap filtering mode in \\p pfm that's used when reading memory through\n the texture reference \\p hTexRef.\n\n \\param pfm     - Returned mipmap filtering mode\n \\param hTexRef - Texture reference\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10318    pub unsafe fn cuTexRefGetMipmapFilterMode(
10319        &self,
10320        pfm: *mut CUfilter_mode,
10321        hTexRef: CUtexref,
10322    ) -> CUresult {
10323        (self
10324            .cuTexRefGetMipmapFilterMode
10325            .as_ref()
10326            .expect("Expected function, got error."))(pfm, hTexRef)
10327    }
10328    #[doc = " \\brief Gets the mipmap level bias for a texture reference\n\n \\deprecated\n\n Returns the mipmap level bias in \\p pBias that's added to the specified mipmap\n level when reading memory through the texture reference \\p hTexRef.\n\n \\param pbias   - Returned mipmap level bias\n \\param hTexRef - Texture reference\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10329    pub unsafe fn cuTexRefGetMipmapLevelBias(
10330        &self,
10331        pbias: *mut f32,
10332        hTexRef: CUtexref,
10333    ) -> CUresult {
10334        (self
10335            .cuTexRefGetMipmapLevelBias
10336            .as_ref()
10337            .expect("Expected function, got error."))(pbias, hTexRef)
10338    }
10339    #[doc = " \\brief Gets the min/max mipmap level clamps for a texture reference\n\n \\deprecated\n\n Returns the min/max mipmap level clamps in \\p pminMipmapLevelClamp and \\p pmaxMipmapLevelClamp\n that's used when reading memory through the texture reference \\p hTexRef.\n\n \\param pminMipmapLevelClamp - Returned mipmap min level clamp\n \\param pmaxMipmapLevelClamp - Returned mipmap max level clamp\n \\param hTexRef              - Texture reference\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10340    pub unsafe fn cuTexRefGetMipmapLevelClamp(
10341        &self,
10342        pminMipmapLevelClamp: *mut f32,
10343        pmaxMipmapLevelClamp: *mut f32,
10344        hTexRef: CUtexref,
10345    ) -> CUresult {
10346        (self
10347            .cuTexRefGetMipmapLevelClamp
10348            .as_ref()
10349            .expect("Expected function, got error."))(
10350            pminMipmapLevelClamp,
10351            pmaxMipmapLevelClamp,
10352            hTexRef,
10353        )
10354    }
10355    #[doc = " \\brief Gets the maximum anisotropy for a texture reference\n\n \\deprecated\n\n Returns the maximum anisotropy in \\p pmaxAniso that's used when reading memory through\n the texture reference \\p hTexRef.\n\n \\param pmaxAniso - Returned maximum anisotropy\n \\param hTexRef   - Texture reference\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10356    pub unsafe fn cuTexRefGetMaxAnisotropy(
10357        &self,
10358        pmaxAniso: *mut ::std::os::raw::c_int,
10359        hTexRef: CUtexref,
10360    ) -> CUresult {
10361        (self
10362            .cuTexRefGetMaxAnisotropy
10363            .as_ref()
10364            .expect("Expected function, got error."))(pmaxAniso, hTexRef)
10365    }
10366    #[doc = " \\brief Gets the border color used by a texture reference\n\n \\deprecated\n\n Returns in \\p pBorderColor, values of the RGBA color used by\n the texture reference \\p hTexRef.\n The color value is of type float and holds color components in\n the following sequence:\n pBorderColor[0] holds 'R' component\n pBorderColor[1] holds 'G' component\n pBorderColor[2] holds 'B' component\n pBorderColor[3] holds 'A' component\n\n \\param hTexRef  - Texture reference\n \\param pBorderColor   - Returned Type and Value of RGBA color\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefSetAddressMode,\n ::cuTexRefSetAddressMode, ::cuTexRefSetBorderColor"]
10367    pub unsafe fn cuTexRefGetBorderColor(
10368        &self,
10369        pBorderColor: *mut f32,
10370        hTexRef: CUtexref,
10371    ) -> CUresult {
10372        (self
10373            .cuTexRefGetBorderColor
10374            .as_ref()
10375            .expect("Expected function, got error."))(pBorderColor, hTexRef)
10376    }
10377    #[doc = " \\brief Gets the flags used by a texture reference\n\n \\deprecated\n\n Returns in \\p *pFlags the flags of the texture reference \\p hTexRef.\n\n \\param pFlags  - Returned flags\n \\param hTexRef - Texture reference\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefSetAddress,\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFormat"]
10378    pub unsafe fn cuTexRefGetFlags(
10379        &self,
10380        pFlags: *mut ::std::os::raw::c_uint,
10381        hTexRef: CUtexref,
10382    ) -> CUresult {
10383        (self
10384            .cuTexRefGetFlags
10385            .as_ref()
10386            .expect("Expected function, got error."))(pFlags, hTexRef)
10387    }
10388    #[doc = " \\brief Creates a texture reference\n\n \\deprecated\n\n Creates a texture reference and returns its handle in \\p *pTexRef. Once\n created, the application must call ::cuTexRefSetArray() or\n ::cuTexRefSetAddress() to associate the reference with allocated memory.\n Other texture reference functions are used to specify the format and\n interpretation (addressing, filtering, etc.) to be used when the memory is\n read through this texture reference.\n\n \\param pTexRef - Returned texture reference\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefDestroy"]
10389    pub unsafe fn cuTexRefCreate(&self, pTexRef: *mut CUtexref) -> CUresult {
10390        (self
10391            .cuTexRefCreate
10392            .as_ref()
10393            .expect("Expected function, got error."))(pTexRef)
10394    }
10395    #[doc = " \\brief Destroys a texture reference\n\n \\deprecated\n\n Destroys the texture reference specified by \\p hTexRef.\n\n \\param hTexRef - Texture reference to destroy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuTexRefCreate"]
10396    pub unsafe fn cuTexRefDestroy(&self, hTexRef: CUtexref) -> CUresult {
10397        (self
10398            .cuTexRefDestroy
10399            .as_ref()
10400            .expect("Expected function, got error."))(hTexRef)
10401    }
10402    #[doc = " \\brief Sets the CUDA array for a surface reference.\n\n \\deprecated\n\n Sets the CUDA array \\p hArray to be read and written by the surface reference\n \\p hSurfRef.  Any previous CUDA array state associated with the surface\n reference is superseded by this function.  \\p Flags must be set to 0.\n The ::CUDA_ARRAY3D_SURFACE_LDST flag must have been set for the CUDA array.\n Any CUDA array previously bound to \\p hSurfRef is unbound.\n\n \\param hSurfRef - Surface reference handle\n \\param hArray - CUDA array handle\n \\param Flags - set to 0\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuModuleGetSurfRef,\n ::cuSurfRefGetArray"]
10403    pub unsafe fn cuSurfRefSetArray(
10404        &self,
10405        hSurfRef: CUsurfref,
10406        hArray: CUarray,
10407        Flags: ::std::os::raw::c_uint,
10408    ) -> CUresult {
10409        (self
10410            .cuSurfRefSetArray
10411            .as_ref()
10412            .expect("Expected function, got error."))(hSurfRef, hArray, Flags)
10413    }
10414    #[doc = " \\brief Passes back the CUDA array bound to a surface reference.\n\n \\deprecated\n\n Returns in \\p *phArray the CUDA array bound to the surface reference\n \\p hSurfRef, or returns ::CUDA_ERROR_INVALID_VALUE if the surface reference\n is not bound to any CUDA array.\n\n \\param phArray - Surface reference handle\n \\param hSurfRef - Surface reference handle\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuModuleGetSurfRef, ::cuSurfRefSetArray"]
10415    pub unsafe fn cuSurfRefGetArray(&self, phArray: *mut CUarray, hSurfRef: CUsurfref) -> CUresult {
10416        (self
10417            .cuSurfRefGetArray
10418            .as_ref()
10419            .expect("Expected function, got error."))(phArray, hSurfRef)
10420    }
10421    #[doc = " \\brief Creates a texture object\n\n Creates a texture object and returns it in \\p pTexObject. \\p pResDesc describes\n the data to texture from. \\p pTexDesc describes how the data should be sampled.\n \\p pResViewDesc is an optional argument that specifies an alternate format for\n the data described by \\p pResDesc, and also describes the subresource region\n to restrict access to when texturing. \\p pResViewDesc can only be specified if\n the type of resource is a CUDA array or a CUDA mipmapped array.\n\n Texture objects are only supported on devices of compute capability 3.0 or higher.\n Additionally, a texture object is an opaque value, and, as such, should only be\n accessed through CUDA API calls.\n\n The ::CUDA_RESOURCE_DESC structure is defined as:\n \\code\ntypedef struct CUDA_RESOURCE_DESC_st\n{\nCUresourcetype resType;\n\nunion {\nstruct {\nCUarray hArray;\n} array;\nstruct {\nCUmipmappedArray hMipmappedArray;\n} mipmap;\nstruct {\nCUdeviceptr devPtr;\nCUarray_format format;\nunsigned int numChannels;\nsize_t sizeInBytes;\n} linear;\nstruct {\nCUdeviceptr devPtr;\nCUarray_format format;\nunsigned int numChannels;\nsize_t width;\nsize_t height;\nsize_t pitchInBytes;\n} pitch2D;\n} res;\n\nunsigned int flags;\n} CUDA_RESOURCE_DESC;\n\n \\endcode\n where:\n - ::CUDA_RESOURCE_DESC::resType specifies the type of resource to texture from.\n CUresourceType is defined as:\n \\code\ntypedef enum CUresourcetype_enum {\nCU_RESOURCE_TYPE_ARRAY           = 0x00,\nCU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 0x01,\nCU_RESOURCE_TYPE_LINEAR          = 0x02,\nCU_RESOURCE_TYPE_PITCH2D         = 0x03\n} CUresourcetype;\n \\endcode\n\n \\par\n If ::CUDA_RESOURCE_DESC::resType is set to ::CU_RESOURCE_TYPE_ARRAY, ::CUDA_RESOURCE_DESC::res::array::hArray\n must be set to a valid CUDA array handle.\n\n \\par\n If ::CUDA_RESOURCE_DESC::resType is set to ::CU_RESOURCE_TYPE_MIPMAPPED_ARRAY, ::CUDA_RESOURCE_DESC::res::mipmap::hMipmappedArray\n must be set to a valid CUDA mipmapped array handle.\n\n \\par\n If ::CUDA_RESOURCE_DESC::resType is set to ::CU_RESOURCE_TYPE_LINEAR, ::CUDA_RESOURCE_DESC::res::linear::devPtr\n must be set to a valid device pointer, that is aligned to ::CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT.\n ::CUDA_RESOURCE_DESC::res::linear::format and ::CUDA_RESOURCE_DESC::res::linear::numChannels\n describe the format of each component and the number of components per array element. ::CUDA_RESOURCE_DESC::res::linear::sizeInBytes\n specifies the size of the array in bytes. The total number of elements in the linear address range cannot exceed\n ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH. The number of elements is computed as (sizeInBytes / (sizeof(format) * numChannels)).\n\n \\par\n If ::CUDA_RESOURCE_DESC::resType is set to ::CU_RESOURCE_TYPE_PITCH2D, ::CUDA_RESOURCE_DESC::res::pitch2D::devPtr\n must be set to a valid device pointer, that is aligned to ::CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT.\n ::CUDA_RESOURCE_DESC::res::pitch2D::format and ::CUDA_RESOURCE_DESC::res::pitch2D::numChannels\n describe the format of each component and the number of components per array element. ::CUDA_RESOURCE_DESC::res::pitch2D::width\n and ::CUDA_RESOURCE_DESC::res::pitch2D::height specify the width and height of the array in elements, and cannot exceed\n ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH and ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT respectively.\n ::CUDA_RESOURCE_DESC::res::pitch2D::pitchInBytes specifies the pitch between two rows in bytes and has to be aligned to\n ::CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT. Pitch cannot exceed ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH.\n\n - ::flags must be set to zero.\n\n\n The ::CUDA_TEXTURE_DESC struct is defined as\n \\code\ntypedef struct CUDA_TEXTURE_DESC_st {\nCUaddress_mode addressMode[3];\nCUfilter_mode filterMode;\nunsigned int flags;\nunsigned int maxAnisotropy;\nCUfilter_mode mipmapFilterMode;\nfloat mipmapLevelBias;\nfloat minMipmapLevelClamp;\nfloat maxMipmapLevelClamp;\n} CUDA_TEXTURE_DESC;\n \\endcode\n where\n - ::CUDA_TEXTURE_DESC::addressMode specifies the addressing mode for each dimension of the texture data. ::CUaddress_mode is defined as:\n   \\code\ntypedef enum CUaddress_mode_enum {\nCU_TR_ADDRESS_MODE_WRAP = 0,\nCU_TR_ADDRESS_MODE_CLAMP = 1,\nCU_TR_ADDRESS_MODE_MIRROR = 2,\nCU_TR_ADDRESS_MODE_BORDER = 3\n} CUaddress_mode;\n   \\endcode\n   This is ignored if ::CUDA_RESOURCE_DESC::resType is ::CU_RESOURCE_TYPE_LINEAR. Also, if the flag, ::CU_TRSF_NORMALIZED_COORDINATES\n   is not set, the only supported address mode is ::CU_TR_ADDRESS_MODE_CLAMP.\n\n - ::CUDA_TEXTURE_DESC::filterMode specifies the filtering mode to be used when fetching from the texture. CUfilter_mode is defined as:\n   \\code\ntypedef enum CUfilter_mode_enum {\nCU_TR_FILTER_MODE_POINT = 0,\nCU_TR_FILTER_MODE_LINEAR = 1\n} CUfilter_mode;\n   \\endcode\n   This is ignored if ::CUDA_RESOURCE_DESC::resType is ::CU_RESOURCE_TYPE_LINEAR.\n\n - ::CUDA_TEXTURE_DESC::flags can be any combination of the following:\n   - ::CU_TRSF_READ_AS_INTEGER, which suppresses the default behavior of\n   having the texture promote integer data to floating point data in the\n   range [0, 1]. Note that texture with 32-bit integer format would not be\n   promoted, regardless of whether or not this flag is specified.\n   - ::CU_TRSF_NORMALIZED_COORDINATES, which suppresses the default behavior\n   of having the texture coordinates range from [0, Dim) where Dim is the\n   width or height of the CUDA array. Instead, the texture coordinates\n   [0, 1.0) reference the entire breadth of the array dimension; Note that\n   for CUDA mipmapped arrays, this flag has to be set.\n   - ::CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION, which disables any trilinear\n   filtering optimizations. Trilinear optimizations improve texture filtering\n   performance by allowing bilinear filtering on textures in scenarios where\n   it can closely approximate the expected results.\n   - ::CU_TRSF_SEAMLESS_CUBEMAP, which enables seamless cube map filtering.\n   This flag can only be specified if the underlying resource is a CUDA array\n   or a CUDA mipmapped array that was created with the flag ::CUDA_ARRAY3D_CUBEMAP.\n   When seamless cube map filtering is enabled, texture address modes specified\n   by ::CUDA_TEXTURE_DESC::addressMode are ignored. Instead, if the ::CUDA_TEXTURE_DESC::filterMode\n   is set to ::CU_TR_FILTER_MODE_POINT the address mode ::CU_TR_ADDRESS_MODE_CLAMP\n   will be applied for all dimensions. If the ::CUDA_TEXTURE_DESC::filterMode is\n   set to ::CU_TR_FILTER_MODE_LINEAR seamless cube map filtering will be performed\n   when sampling along the cube face borders.\n\n - ::CUDA_TEXTURE_DESC::maxAnisotropy specifies the maximum anisotropy ratio to be used when doing anisotropic filtering. This value will be\n   clamped to the range [1,16].\n\n - ::CUDA_TEXTURE_DESC::mipmapFilterMode specifies the filter mode when the calculated mipmap level lies between two defined mipmap levels.\n\n - ::CUDA_TEXTURE_DESC::mipmapLevelBias specifies the offset to be applied to the calculated mipmap level.\n\n - ::CUDA_TEXTURE_DESC::minMipmapLevelClamp specifies the lower end of the mipmap level range to clamp access to.\n\n - ::CUDA_TEXTURE_DESC::maxMipmapLevelClamp specifies the upper end of the mipmap level range to clamp access to.\n\n\n The ::CUDA_RESOURCE_VIEW_DESC struct is defined as\n \\code\ntypedef struct CUDA_RESOURCE_VIEW_DESC_st\n{\nCUresourceViewFormat format;\nsize_t width;\nsize_t height;\nsize_t depth;\nunsigned int firstMipmapLevel;\nunsigned int lastMipmapLevel;\nunsigned int firstLayer;\nunsigned int lastLayer;\n} CUDA_RESOURCE_VIEW_DESC;\n \\endcode\n where:\n - ::CUDA_RESOURCE_VIEW_DESC::format specifies how the data contained in the CUDA array or CUDA mipmapped array should\n   be interpreted. Note that this can incur a change in size of the texture data. If the resource view format is a block\n   compressed format, then the underlying CUDA array or CUDA mipmapped array has to have a base of format ::CU_AD_FORMAT_UNSIGNED_INT32.\n   with 2 or 4 channels, depending on the block compressed format. For ex., BC1 and BC4 require the underlying CUDA array to have\n   a format of ::CU_AD_FORMAT_UNSIGNED_INT32 with 2 channels. The other BC formats require the underlying resource to have the same base\n   format but with 4 channels.\n\n - ::CUDA_RESOURCE_VIEW_DESC::width specifies the new width of the texture data. If the resource view format is a block\n   compressed format, this value has to be 4 times the original width of the resource. For non block compressed formats,\n   this value has to be equal to that of the original resource.\n\n - ::CUDA_RESOURCE_VIEW_DESC::height specifies the new height of the texture data. If the resource view format is a block\n   compressed format, this value has to be 4 times the original height of the resource. For non block compressed formats,\n   this value has to be equal to that of the original resource.\n\n - ::CUDA_RESOURCE_VIEW_DESC::depth specifies the new depth of the texture data. This value has to be equal to that of the\n   original resource.\n\n - ::CUDA_RESOURCE_VIEW_DESC::firstMipmapLevel specifies the most detailed mipmap level. This will be the new mipmap level zero.\n   For non-mipmapped resources, this value has to be zero.::CUDA_TEXTURE_DESC::minMipmapLevelClamp and ::CUDA_TEXTURE_DESC::maxMipmapLevelClamp\n   will be relative to this value. For ex., if the firstMipmapLevel is set to 2, and a minMipmapLevelClamp of 1.2 is specified,\n   then the actual minimum mipmap level clamp will be 3.2.\n\n - ::CUDA_RESOURCE_VIEW_DESC::lastMipmapLevel specifies the least detailed mipmap level. For non-mipmapped resources, this value\n   has to be zero.\n\n - ::CUDA_RESOURCE_VIEW_DESC::firstLayer specifies the first layer index for layered textures. This will be the new layer zero.\n   For non-layered resources, this value has to be zero.\n\n - ::CUDA_RESOURCE_VIEW_DESC::lastLayer specifies the last layer index for layered textures. For non-layered resources,\n   this value has to be zero.\n\n\n \\param pTexObject   - Texture object to create\n \\param pResDesc     - Resource descriptor\n \\param pTexDesc     - Texture descriptor\n \\param pResViewDesc - Resource view descriptor\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexObjectDestroy,\n ::cudaCreateTextureObject"]
10422    pub unsafe fn cuTexObjectCreate(
10423        &self,
10424        pTexObject: *mut CUtexObject,
10425        pResDesc: *const CUDA_RESOURCE_DESC,
10426        pTexDesc: *const CUDA_TEXTURE_DESC,
10427        pResViewDesc: *const CUDA_RESOURCE_VIEW_DESC,
10428    ) -> CUresult {
10429        (self
10430            .cuTexObjectCreate
10431            .as_ref()
10432            .expect("Expected function, got error."))(
10433            pTexObject, pResDesc, pTexDesc, pResViewDesc
10434        )
10435    }
10436    #[doc = " \\brief Destroys a texture object\n\n Destroys the texture object specified by \\p texObject.\n\n \\param texObject - Texture object to destroy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexObjectCreate,\n ::cudaDestroyTextureObject"]
10437    pub unsafe fn cuTexObjectDestroy(&self, texObject: CUtexObject) -> CUresult {
10438        (self
10439            .cuTexObjectDestroy
10440            .as_ref()
10441            .expect("Expected function, got error."))(texObject)
10442    }
10443    #[doc = " \\brief Returns a texture object's resource descriptor\n\n Returns the resource descriptor for the texture object specified by \\p texObject.\n\n \\param pResDesc  - Resource descriptor\n \\param texObject - Texture object\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexObjectCreate,\n ::cudaGetTextureObjectResourceDesc,"]
10444    pub unsafe fn cuTexObjectGetResourceDesc(
10445        &self,
10446        pResDesc: *mut CUDA_RESOURCE_DESC,
10447        texObject: CUtexObject,
10448    ) -> CUresult {
10449        (self
10450            .cuTexObjectGetResourceDesc
10451            .as_ref()
10452            .expect("Expected function, got error."))(pResDesc, texObject)
10453    }
10454    #[doc = " \\brief Returns a texture object's texture descriptor\n\n Returns the texture descriptor for the texture object specified by \\p texObject.\n\n \\param pTexDesc  - Texture descriptor\n \\param texObject - Texture object\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexObjectCreate,\n ::cudaGetTextureObjectTextureDesc"]
10455    pub unsafe fn cuTexObjectGetTextureDesc(
10456        &self,
10457        pTexDesc: *mut CUDA_TEXTURE_DESC,
10458        texObject: CUtexObject,
10459    ) -> CUresult {
10460        (self
10461            .cuTexObjectGetTextureDesc
10462            .as_ref()
10463            .expect("Expected function, got error."))(pTexDesc, texObject)
10464    }
10465    #[doc = " \\brief Returns a texture object's resource view descriptor\n\n Returns the resource view descriptor for the texture object specified by \\p texObject.\n If no resource view was set for \\p texObject, the ::CUDA_ERROR_INVALID_VALUE is returned.\n\n \\param pResViewDesc - Resource view descriptor\n \\param texObject    - Texture object\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTexObjectCreate,\n ::cudaGetTextureObjectResourceViewDesc"]
10466    pub unsafe fn cuTexObjectGetResourceViewDesc(
10467        &self,
10468        pResViewDesc: *mut CUDA_RESOURCE_VIEW_DESC,
10469        texObject: CUtexObject,
10470    ) -> CUresult {
10471        (self
10472            .cuTexObjectGetResourceViewDesc
10473            .as_ref()
10474            .expect("Expected function, got error."))(pResViewDesc, texObject)
10475    }
10476    #[doc = " \\brief Creates a surface object\n\n Creates a surface object and returns it in \\p pSurfObject. \\p pResDesc describes\n the data to perform surface load/stores on. ::CUDA_RESOURCE_DESC::resType must be\n ::CU_RESOURCE_TYPE_ARRAY and  ::CUDA_RESOURCE_DESC::res::array::hArray\n must be set to a valid CUDA array handle. ::CUDA_RESOURCE_DESC::flags must be set to zero.\n\n Surface objects are only supported on devices of compute capability 3.0 or higher.\n Additionally, a surface object is an opaque value, and, as such, should only be\n accessed through CUDA API calls.\n\n \\param pSurfObject - Surface object to create\n \\param pResDesc    - Resource descriptor\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuSurfObjectDestroy,\n ::cudaCreateSurfaceObject"]
10477    pub unsafe fn cuSurfObjectCreate(
10478        &self,
10479        pSurfObject: *mut CUsurfObject,
10480        pResDesc: *const CUDA_RESOURCE_DESC,
10481    ) -> CUresult {
10482        (self
10483            .cuSurfObjectCreate
10484            .as_ref()
10485            .expect("Expected function, got error."))(pSurfObject, pResDesc)
10486    }
10487    #[doc = " \\brief Destroys a surface object\n\n Destroys the surface object specified by \\p surfObject.\n\n \\param surfObject - Surface object to destroy\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuSurfObjectCreate,\n ::cudaDestroySurfaceObject"]
10488    pub unsafe fn cuSurfObjectDestroy(&self, surfObject: CUsurfObject) -> CUresult {
10489        (self
10490            .cuSurfObjectDestroy
10491            .as_ref()
10492            .expect("Expected function, got error."))(surfObject)
10493    }
10494    #[doc = " \\brief Returns a surface object's resource descriptor\n\n Returns the resource descriptor for the surface object specified by \\p surfObject.\n\n \\param pResDesc   - Resource descriptor\n \\param surfObject - Surface object\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuSurfObjectCreate,\n ::cudaGetSurfaceObjectResourceDesc"]
10495    pub unsafe fn cuSurfObjectGetResourceDesc(
10496        &self,
10497        pResDesc: *mut CUDA_RESOURCE_DESC,
10498        surfObject: CUsurfObject,
10499    ) -> CUresult {
10500        (self
10501            .cuSurfObjectGetResourceDesc
10502            .as_ref()
10503            .expect("Expected function, got error."))(pResDesc, surfObject)
10504    }
10505    #[doc = " \\brief Create a tensor map descriptor object representing tiled memory region\n\n Creates a descriptor for Tensor Memory Access (TMA) object specified\n by the parameters describing a tiled region and returns it in \\p tensorMap.\n\n Tensor map objects are only supported on devices of compute capability 9.0 or higher.\n Additionally, a tensor map object is an opaque value, and, as such, should only be\n accessed through CUDA API calls.\n\n The parameters passed are bound to the following requirements:\n\n - \\p tensorMap address must be aligned to 64 bytes.\n\n - \\p tensorDataType has to be an enum from ::CUtensorMapDataType which is defined as:\n \\code\ntypedef enum CUtensorMapDataType_enum {\nCU_TENSOR_MAP_DATA_TYPE_UINT8 = 0,       // 1 byte\nCU_TENSOR_MAP_DATA_TYPE_UINT16,          // 2 bytes\nCU_TENSOR_MAP_DATA_TYPE_UINT32,          // 4 bytes\nCU_TENSOR_MAP_DATA_TYPE_INT32,           // 4 bytes\nCU_TENSOR_MAP_DATA_TYPE_UINT64,          // 8 bytes\nCU_TENSOR_MAP_DATA_TYPE_INT64,           // 8 bytes\nCU_TENSOR_MAP_DATA_TYPE_FLOAT16,         // 2 bytes\nCU_TENSOR_MAP_DATA_TYPE_FLOAT32,         // 4 bytes\nCU_TENSOR_MAP_DATA_TYPE_FLOAT64,         // 8 bytes\nCU_TENSOR_MAP_DATA_TYPE_BFLOAT16,        // 2 bytes\nCU_TENSOR_MAP_DATA_TYPE_FLOAT32_FTZ,     // 4 bytes\nCU_TENSOR_MAP_DATA_TYPE_TFLOAT32,        // 4 bytes\nCU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ     // 4 bytes\n} CUtensorMapDataType;\n \\endcode\n\n - \\p tensorRank must be non-zero and less than or equal to the maximum supported dimensionality of 5. If \\p interleave is not\n ::CU_TENSOR_MAP_INTERLEAVE_NONE, then \\p tensorRank must additionally be greater than or equal to 3.\n\n - \\p globalAddress, which specifies the starting address of the memory region described, must be 32 byte aligned when \\p interleave is\n ::CU_TENSOR_MAP_INTERLEAVE_32B and 16 byte aligned otherwise.\n\n - \\p globalDim array, which specifies tensor size of each of the \\p tensorRank dimensions, must be non-zero and less than or\n equal to 2^32.\n\n - \\p globalStrides array, which specifies tensor stride of each of the lower \\p tensorRank - 1 dimensions in bytes, must be a\n multiple of 16 and less than 2^40. Additionally, the stride must be a multiple of 32 when \\p interleave is ::CU_TENSOR_MAP_INTERLEAVE_32B.\n Each following dimension specified includes previous dimension stride:\n \\code\nglobalStrides[0] = globalDim[0] * elementSizeInBytes(tensorDataType) + padding[0];\nfor (i = 1; i < tensorRank - 1; i++)\nglobalStrides[i] = globalStrides[i – 1] * globalStrides[i] + padding[i];\nassert(globalStrides[i] >= globalDim[i]);\n \\endcode\n\n - \\p boxDim array, which specifies number of elements to be traversed along each of the \\p tensorRank dimensions, must be less\n than or equal to 8.\n When \\p interleave is ::CU_TENSOR_MAP_INTERLEAVE_NONE, { \\p boxDim[0] * elementSizeInBytes( \\p tensorDataType ) } must be a multiple\n of 16 bytes.\n\n - \\p elementStrides array, which specifies the iteration step along each of the \\p tensorRank dimensions, must be non-zero and less\n than or equal to 8. Note that when \\p interleave is ::CU_TENSOR_MAP_INTERLEAVE_NONE, the first element of this array is ignored since\n TMA doesn’t support the stride for dimension zero.\n When all elemets of \\p elementStrides array is one, \\p boxDim specifies the number of elements to load. However, if the \\p elementStrides[i]\n is not equal to one, then TMA loads ceil( \\p boxDim[i] / \\p elementStrides[i]) number of elements along i-th dimension. To load N elements along\n i-th dimension, \\p boxDim[i] must be set to N * \\p elementStrides[i].\n\n - \\p interleave specifies the interleaved layout of type ::CUtensorMapInterleave, which is defined as:\n \\code\ntypedef enum CUtensorMapInterleave_enum {\nCU_TENSOR_MAP_INTERLEAVE_NONE = 0,\nCU_TENSOR_MAP_INTERLEAVE_16B,\nCU_TENSOR_MAP_INTERLEAVE_32B\n} CUtensorMapInterleave;\n \\endcode\n TMA supports interleaved layouts like NC/8HWC8 where C8 utilizes 16 bytes in memory assuming 2 byte per channel or NC/16HWC16 where C16\n uses 32 bytes.\n When \\p interleave is ::CU_TENSOR_MAP_INTERLEAVE_NONE and \\p swizzle is not ::CU_TENSOR_MAP_SWIZZLE_NONE, the bounding box inner dimension\n (computed as \\p boxDim[0] multiplied by element size derived from \\p tensorDataType) must be less than or equal to the swizzle size.\n    - CU_TENSOR_MAP_SWIZZLE_32B implies the bounding box inner dimension will be <= 32.\n    - CU_TENSOR_MAP_SWIZZLE_64B implies the bounding box inner dimension will be <= 64.\n    - CU_TENSOR_MAP_SWIZZLE_128B implies the bounding box inner dimension will be <= 128.\n\n - \\p swizzle, which specifies the shared memory bank swizzling pattern, has to be of type ::CUtensorMapSwizzle which is defined as:\n \\code\ntypedef enum CUtensorMapSwizzle_enum {\nCU_TENSOR_MAP_SWIZZLE_NONE = 0,\nCU_TENSOR_MAP_SWIZZLE_32B,\nCU_TENSOR_MAP_SWIZZLE_64B,\nCU_TENSOR_MAP_SWIZZLE_128B\n} CUtensorMapSwizzle;\n \\endcode\n Data is organized in specific order in global memory; however, it may not match the order in which data are accessed by application in\n the shared memory. This difference in data organization may cause bank conflicts when shared memory is accessed. In order to avoid this\n problem, data can be loaded to shard memory with shuffling across shared memory banks.\n Note that it’s expected that when \\p interleave is ::CU_TENSOR_MAP_INTERLEAVE_32B, \\p swizzle should be ::CU_TENSOR_MAP_SWIZZLE_32B mode.\n Other interleave modes can have any swizzling patterns.\n\n - \\p l2Promotion specifies L2 fetch size which indicates the byte granurality at which L2 requests is filled from DRAM. It must be of\n type ::CUtensorMapL2promotion, which is defined as:\n \\code\ntypedef enum CUtensorMapL2promotion_enum {\nCU_TENSOR_MAP_L2_PROMOTION_NONE = 0,\nCU_TENSOR_MAP_L2_PROMOTION_L2_64B,\nCU_TENSOR_MAP_L2_PROMOTION_L2_128B,\nCU_TENSOR_MAP_L2_PROMOTION_L2_256B\n} CUtensorMapL2promotion;\n \\endcode\n\n - \\p oobFill, which indicates whether zero or a special NaN constant should be used to fill out-of-bound elements, must be of type\n ::CUtensorMapFloatOOBfill which is defined as:\n \\code\ntypedef enum CUtensorMapFloatOOBfill_enum {\nCU_TENSOR_MAP_FLOAT_OOB_FILL_NONE = 0,\nCU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA\n} CUtensorMapFloatOOBfill;\n \\endcode\n Note that ::CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA can only be used when \\p tensorDataType represents a floating data type.\n\n \\param tensorMap         - Tensor map object to create\n \\param tensorDataType    - Tensor data type\n \\param tensorRank        - Dimensionality of tensor\n \\param globalAddress     - Starting address of memory region described by tensor\n \\param globalDim         - Array containing tensor size (number of elements) along each of the \\p tensorRank dimensions\n \\param globalStrides     - Array containing stride size (in bytes) along each of the \\p tensorRank - 1 dimensions\n \\param boxDim            - Array containing traversal box size (number of elments) along each of the \\p tensorRank dimensions. Specifies how many elements to be traversed along each tensor dimension.\n \\param elementStrides    - Array containing traversal stride in each of the \\p tensorRank dimensions\n \\param interleave        - Type of interleaved layout the tensor addresses\n \\param swizzle           - Bank swizzling pattern inside shared memory\n \\param l2Promotion       - L2 promotion size\n \\param oobFill           - Indicate whether zero or special NaN constant must be used to fill out-of-bound elements\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTensorMapEncodeIm2col,\n ::cuTensorMapReplaceAddress"]
10506    pub unsafe fn cuTensorMapEncodeTiled(
10507        &self,
10508        tensorMap: *mut CUtensorMap,
10509        tensorDataType: CUtensorMapDataType,
10510        tensorRank: cuuint32_t,
10511        globalAddress: *mut ::std::os::raw::c_void,
10512        globalDim: *const cuuint64_t,
10513        globalStrides: *const cuuint64_t,
10514        boxDim: *const cuuint32_t,
10515        elementStrides: *const cuuint32_t,
10516        interleave: CUtensorMapInterleave,
10517        swizzle: CUtensorMapSwizzle,
10518        l2Promotion: CUtensorMapL2promotion,
10519        oobFill: CUtensorMapFloatOOBfill,
10520    ) -> CUresult {
10521        (self
10522            .cuTensorMapEncodeTiled
10523            .as_ref()
10524            .expect("Expected function, got error."))(
10525            tensorMap,
10526            tensorDataType,
10527            tensorRank,
10528            globalAddress,
10529            globalDim,
10530            globalStrides,
10531            boxDim,
10532            elementStrides,
10533            interleave,
10534            swizzle,
10535            l2Promotion,
10536            oobFill,
10537        )
10538    }
10539    #[doc = " \\brief Create a tensor map descriptor object representing im2col memory region\n\n Creates a descriptor for Tensor Memory Access (TMA) object specified\n by the parameters describing a im2col memory layout and returns it in \\p tensorMap.\n\n Tensor map objects are only supported on devices of compute capability 9.0 or higher.\n Additionally, a tensor map object is an opaque value, and, as such, should only be\n accessed through CUDA API calls.\n\n The parameters passed are bound to the following requirements:\n\n - \\p tensorMap address must be aligned to 64 bytes.\n\n - \\p tensorDataType has to be an enum from ::CUtensorMapDataType which is defined as:\n \\code\ntypedef enum CUtensorMapDataType_enum {\nCU_TENSOR_MAP_DATA_TYPE_UINT8 = 0,       // 1 byte\nCU_TENSOR_MAP_DATA_TYPE_UINT16,          // 2 bytes\nCU_TENSOR_MAP_DATA_TYPE_UINT32,          // 4 bytes\nCU_TENSOR_MAP_DATA_TYPE_INT32,           // 4 bytes\nCU_TENSOR_MAP_DATA_TYPE_UINT64,          // 8 bytes\nCU_TENSOR_MAP_DATA_TYPE_INT64,           // 8 bytes\nCU_TENSOR_MAP_DATA_TYPE_FLOAT16,         // 2 bytes\nCU_TENSOR_MAP_DATA_TYPE_FLOAT32,         // 4 bytes\nCU_TENSOR_MAP_DATA_TYPE_FLOAT64,         // 8 bytes\nCU_TENSOR_MAP_DATA_TYPE_BFLOAT16,        // 2 bytes\nCU_TENSOR_MAP_DATA_TYPE_FLOAT32_FTZ,     // 4 bytes\nCU_TENSOR_MAP_DATA_TYPE_TFLOAT32,        // 4 bytes\nCU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ     // 4 bytes\n} CUtensorMapDataType;\n \\endcode\n\n - \\p tensorRank must be one of dimensions 3, 4, or 5.\n\n - \\p globalAddress, which specifies the starting address of the memory region described, must be 32 byte aligned when \\p interleave is\n ::CU_TENSOR_MAP_INTERLEAVE_32B and 16 byte aligned otherwise.\n\n - \\p globalDim array, which specifies tensor size of each of the \\p tensorRank dimensions, must be non-zero and less than or\n equal to 2^32.\n\n - \\p globalStrides array, which specifies tensor stride of each of the lower \\p tensorRank - 1 dimensions in bytes, must be a\n multiple of 16 and less than 2^40. Additionally, the stride must be a multiple of 32 when \\p interleave is ::CU_TENSOR_MAP_INTERLEAVE_32B.\n Each following dimension specified includes previous dimension stride:\n \\code\nglobalStrides[0] = globalDim[0] * elementSizeInBytes(tensorDataType) + padding[0];\nfor (i = 1; i < tensorRank - 1; i++)\nglobalStrides[i] = globalStrides[i – 1] * globalStrides[i] + padding[i];\nassert(globalStrides[i] >= globalDim[i]);\n \\endcode\n\n - \\p pixelBoxLowerCorner array specifies the coordinate offsets {D, H, W} of the bounding box from top/left/front corner. The number of\n offsets and their precision depends on the tensor dimensionality:\n    - When \\p tensorRank is 3, one signed offset within range [-32768, 32767] is supported.\n    - When \\p tensorRank is 4, two signed offsets each within range [-128, 127] are supported.\n    - When \\p tensorRank is 5, three offsets each within range [-16, 15] are supported.\n\n - \\p pixelBoxUpperCorner array specifies the coordinate offsets {D, H, W} of the bounding box from bottom/right/back corner. The number of\n offsets and their precision depends on the tensor dimensionality:\n    - When \\p tensorRank is 3, one signed offset within range [-32768, 32767] is supported.\n    - When \\p tensorRank is 4, two signed offsets each within range [-128, 127] are supported.\n    - When \\p tensorRank is 5, three offsets each within range [-16, 15] are supported.\n The bounding box specified by \\p pixelBoxLowerCorner and \\p pixelBoxUpperCorner must have non-zero area.\n\n - \\p channelsPerPixel, which specifies the number of elements which must be accessed along C dimension, must be less than or equal to 256.\n\n - \\p pixelsPerColumn, which specifies the number of elements that must be accessed along the {N, D, H, W} dimensions, must be less than or\n equal to 1024.\n\n - \\p elementStrides array, which specifies the iteration step along each of the \\p tensorRank dimensions, must be non-zero and less\n than or equal to 8. Note that when \\p interleave is ::CU_TENSOR_MAP_INTERLEAVE_NONE, the first element of this array is ignored since\n TMA doesn’t support the stride for dimension zero.\n When all elemets of \\p elementStrides array is one, \\p boxDim specifies the number of elements to load. However, if the \\p elementStrides[i]\n is not equal to one, then TMA loads ceil( \\p boxDim[i] / \\p elementStrides[i]) number of elements along i-th dimension. To load N elements along\n i-th dimension, \\p boxDim[i] must be set to N * \\p elementStrides[i].\n\n - \\p interleave specifies the interleaved layout of type ::CUtensorMapInterleave, which is defined as:\n \\code\ntypedef enum CUtensorMapInterleave_enum {\nCU_TENSOR_MAP_INTERLEAVE_NONE = 0,\nCU_TENSOR_MAP_INTERLEAVE_16B,\nCU_TENSOR_MAP_INTERLEAVE_32B\n} CUtensorMapInterleave;\n \\endcode\n TMA supports interleaved layouts like NC/8HWC8 where C8 utilizes 16 bytes in memory assuming 2 byte per channel or NC/16HWC16 where C16\n uses 32 bytes.\n When \\p interleave is ::CU_TENSOR_MAP_INTERLEAVE_NONE and \\p swizzle is not ::CU_TENSOR_MAP_SWIZZLE_NONE, the bounding box inner dimension\n (computed as \\p boxDim[0] multiplied by element size derived from \\p tensorDataType) must be less than or equal to the swizzle size.\n    - CU_TENSOR_MAP_SWIZZLE_32B implies the bounding box inner dimension will be <= 32.\n    - CU_TENSOR_MAP_SWIZZLE_64B implies the bounding box inner dimension will be <= 64.\n    - CU_TENSOR_MAP_SWIZZLE_128B implies the bounding box inner dimension will be <= 128.\n\n - \\p swizzle, which specifies the shared memory bank swizzling pattern, has to be of type ::CUtensorMapSwizzle which is defined as:\n \\code\ntypedef enum CUtensorMapSwizzle_enum {\nCU_TENSOR_MAP_SWIZZLE_NONE = 0,\nCU_TENSOR_MAP_SWIZZLE_32B,\nCU_TENSOR_MAP_SWIZZLE_64B,\nCU_TENSOR_MAP_SWIZZLE_128B\n} CUtensorMapSwizzle;\n \\endcode\n Data is organized in specific order in global memory; however, it may not match the order in which data are accessed by application in\n the shared memory. This difference in data organization may cause bank conflicts when shared memory is accessed. In order to avoid this\n problem, data can be loaded to shard memory with shuffling across shared memory banks.\n Note that it’s expected that when \\p interleave is ::CU_TENSOR_MAP_INTERLEAVE_32B, \\p swizzle should be ::CU_TENSOR_MAP_SWIZZLE_32B mode.\n Other interleave modes can have any swizzling patterns.\n\n - \\p l2Promotion specifies L2 fetch size which indicates the byte granurality at which L2 requests is filled from DRAM. It must be of\n type ::CUtensorMapL2promotion, which is defined as:\n \\code\ntypedef enum CUtensorMapL2promotion_enum {\nCU_TENSOR_MAP_L2_PROMOTION_NONE = 0,\nCU_TENSOR_MAP_L2_PROMOTION_L2_64B,\nCU_TENSOR_MAP_L2_PROMOTION_L2_128B,\nCU_TENSOR_MAP_L2_PROMOTION_L2_256B\n} CUtensorMapL2promotion;\n \\endcode\n\n - \\p oobFill, which indicates whether zero or a special NaN constant should be used to fill out-of-bound elements, must be of type\n ::CUtensorMapFloatOOBfill which is defined as:\n \\code\ntypedef enum CUtensorMapFloatOOBfill_enum {\nCU_TENSOR_MAP_FLOAT_OOB_FILL_NONE = 0,\nCU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA\n} CUtensorMapFloatOOBfill;\n \\endcode\n Note that ::CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA can only be used when \\p tensorDataType represents a floating data type.\n\n \\param tensorMap             - Tensor map object to create\n \\param tensorDataType        - Tensor data type\n \\param tensorRank            - Dimensionality of tensor, needs to be at least of dimension 3\n \\param globalAddress         - Starting address of memory region described by tensor\n \\param globalDim             - Array containing tensor size (number of elements) along each of the \\p tensorRank dimensions\n \\param globalStrides         - Array containing stride size (in bytes) along each of the \\p tensorRank - 1 dimensions\n \\param pixelBoxLowerCorner   - Array containing DHW dimentions of lower box corner\n \\param pixelBoxUpperCorner   - Array containing DHW dimentions of upper box corner\n \\param channelsPerPixel      - Number of channels per pixel\n \\param pixelsPerColumn       - Number of pixels per column\n \\param elementStrides        - Array containing traversal stride in each of the \\p tensorRank dimensions\n \\param interleave            - Type of interleaved layout the tensor addresses\n \\param swizzle               - Bank swizzling pattern inside shared memory\n \\param l2Promotion           - L2 promotion size\n \\param oobFill               - Indicate whether zero or special NaN constant must be used to fill out-of-bound elements\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTensorMapEncodeTiled,\n ::cuTensorMapReplaceAddress"]
10540    pub unsafe fn cuTensorMapEncodeIm2col(
10541        &self,
10542        tensorMap: *mut CUtensorMap,
10543        tensorDataType: CUtensorMapDataType,
10544        tensorRank: cuuint32_t,
10545        globalAddress: *mut ::std::os::raw::c_void,
10546        globalDim: *const cuuint64_t,
10547        globalStrides: *const cuuint64_t,
10548        pixelBoxLowerCorner: *const ::std::os::raw::c_int,
10549        pixelBoxUpperCorner: *const ::std::os::raw::c_int,
10550        channelsPerPixel: cuuint32_t,
10551        pixelsPerColumn: cuuint32_t,
10552        elementStrides: *const cuuint32_t,
10553        interleave: CUtensorMapInterleave,
10554        swizzle: CUtensorMapSwizzle,
10555        l2Promotion: CUtensorMapL2promotion,
10556        oobFill: CUtensorMapFloatOOBfill,
10557    ) -> CUresult {
10558        (self
10559            .cuTensorMapEncodeIm2col
10560            .as_ref()
10561            .expect("Expected function, got error."))(
10562            tensorMap,
10563            tensorDataType,
10564            tensorRank,
10565            globalAddress,
10566            globalDim,
10567            globalStrides,
10568            pixelBoxLowerCorner,
10569            pixelBoxUpperCorner,
10570            channelsPerPixel,
10571            pixelsPerColumn,
10572            elementStrides,
10573            interleave,
10574            swizzle,
10575            l2Promotion,
10576            oobFill,
10577        )
10578    }
10579    #[doc = " \\brief Modify an existing tensor map descriptor with an updated global address\n\n Modifies the descriptor for Tensor Memory Access (TMA) object passed in \\p tensorMap with\n an updated \\p globalAddress.\n\n Tensor map objects are only supported on devices of compute capability 9.0 or higher.\n Additionally, a tensor map object is an opaque value, and, as such, should only be\n accessed through CUDA API calls.\n\n \\param tensorMap             - Tensor map object to modify\n \\param globalAddress         - Starting address of memory region described by tensor, must follow previous alignment requirements\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuTensorMapEncodeTiled,\n ::cuTensorMapEncodeIm2col"]
10580    pub unsafe fn cuTensorMapReplaceAddress(
10581        &self,
10582        tensorMap: *mut CUtensorMap,
10583        globalAddress: *mut ::std::os::raw::c_void,
10584    ) -> CUresult {
10585        (self
10586            .cuTensorMapReplaceAddress
10587            .as_ref()
10588            .expect("Expected function, got error."))(tensorMap, globalAddress)
10589    }
10590    #[doc = " \\brief Queries if a device may directly access a peer device's memory.\n\n Returns in \\p *canAccessPeer a value of 1 if contexts on \\p dev are capable of\n directly accessing memory from contexts on \\p peerDev and 0 otherwise.\n If direct access of \\p peerDev from \\p dev is possible, then access may be\n enabled on two specific contexts by calling ::cuCtxEnablePeerAccess().\n\n \\param canAccessPeer - Returned access capability\n \\param dev           - Device from which allocations on \\p peerDev are to\n                        be directly accessed.\n \\param peerDev       - Device on which the allocations to be directly accessed\n                        by \\p dev reside.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_DEVICE\n \\notefnerr\n\n \\sa\n ::cuCtxEnablePeerAccess,\n ::cuCtxDisablePeerAccess,\n ::cudaDeviceCanAccessPeer"]
10591    pub unsafe fn cuDeviceCanAccessPeer(
10592        &self,
10593        canAccessPeer: *mut ::std::os::raw::c_int,
10594        dev: CUdevice,
10595        peerDev: CUdevice,
10596    ) -> CUresult {
10597        (self
10598            .cuDeviceCanAccessPeer
10599            .as_ref()
10600            .expect("Expected function, got error."))(canAccessPeer, dev, peerDev)
10601    }
10602    #[doc = " \\brief Enables direct access to memory allocations in a peer context.\n\n If both the current context and \\p peerContext are on devices which support unified\n addressing (as may be queried using ::CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING) and same\n major compute capability, then on success all allocations from \\p peerContext will\n immediately be accessible by the current context.  See \\ref CUDA_UNIFIED for additional\n details.\n\n Note that access granted by this call is unidirectional and that in order to access\n memory from the current context in \\p peerContext, a separate symmetric call\n to ::cuCtxEnablePeerAccess() is required.\n\n Note that there are both device-wide and system-wide limitations per system\n configuration, as noted in the CUDA Programming Guide under the section\n \"Peer-to-Peer Memory Access\".\n\n Returns ::CUDA_ERROR_PEER_ACCESS_UNSUPPORTED if ::cuDeviceCanAccessPeer() indicates\n that the ::CUdevice of the current context cannot directly access memory\n from the ::CUdevice of \\p peerContext.\n\n Returns ::CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED if direct access of\n \\p peerContext from the current context has already been enabled.\n\n Returns ::CUDA_ERROR_TOO_MANY_PEERS if direct peer access is not possible\n because hardware resources required for peer access have been exhausted.\n\n Returns ::CUDA_ERROR_INVALID_CONTEXT if there is no current context, \\p peerContext\n is not a valid context, or if the current context is \\p peerContext.\n\n Returns ::CUDA_ERROR_INVALID_VALUE if \\p Flags is not 0.\n\n \\param peerContext - Peer context to enable direct access to from the current context\n \\param Flags       - Reserved for future use and must be set to 0\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED,\n ::CUDA_ERROR_TOO_MANY_PEERS,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_PEER_ACCESS_UNSUPPORTED,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa\n ::cuDeviceCanAccessPeer,\n ::cuCtxDisablePeerAccess,\n ::cudaDeviceEnablePeerAccess"]
10603    pub unsafe fn cuCtxEnablePeerAccess(
10604        &self,
10605        peerContext: CUcontext,
10606        Flags: ::std::os::raw::c_uint,
10607    ) -> CUresult {
10608        (self
10609            .cuCtxEnablePeerAccess
10610            .as_ref()
10611            .expect("Expected function, got error."))(peerContext, Flags)
10612    }
10613    #[doc = " \\brief Disables direct access to memory allocations in a peer context and\n unregisters any registered allocations.\n\nReturns ::CUDA_ERROR_PEER_ACCESS_NOT_ENABLED if direct peer access has\n not yet been enabled from \\p peerContext to the current context.\n\n Returns ::CUDA_ERROR_INVALID_CONTEXT if there is no current context, or if\n \\p peerContext is not a valid context.\n\n \\param peerContext - Peer context to disable direct access to\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_PEER_ACCESS_NOT_ENABLED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n \\notefnerr\n\n \\sa\n ::cuDeviceCanAccessPeer,\n ::cuCtxEnablePeerAccess,\n ::cudaDeviceDisablePeerAccess"]
10614    pub unsafe fn cuCtxDisablePeerAccess(&self, peerContext: CUcontext) -> CUresult {
10615        (self
10616            .cuCtxDisablePeerAccess
10617            .as_ref()
10618            .expect("Expected function, got error."))(peerContext)
10619    }
10620    #[doc = " \\brief Queries attributes of the link between two devices.\n\n Returns in \\p *value the value of the requested attribute \\p attrib of the\n link between \\p srcDevice and \\p dstDevice. The supported attributes are:\n - ::CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK: A relative value indicating the\n   performance of the link between two devices.\n - ::CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED P2P: 1 if P2P Access is enable.\n - ::CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED: 1 if Atomic operations over\n   the link are supported.\n - ::CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED: 1 if cudaArray can\n   be accessed over the link.\n\n Returns ::CUDA_ERROR_INVALID_DEVICE if \\p srcDevice or \\p dstDevice are not valid\n or if they represent the same device.\n\n Returns ::CUDA_ERROR_INVALID_VALUE if \\p attrib is not valid or if \\p value is\n a null pointer.\n\n \\param value         - Returned value of the requested attribute\n \\param attrib        - The requested attribute of the link between \\p srcDevice and \\p dstDevice.\n \\param srcDevice     - The source device of the target link.\n \\param dstDevice     - The destination device of the target link.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa\n ::cuCtxEnablePeerAccess,\n ::cuCtxDisablePeerAccess,\n ::cuDeviceCanAccessPeer,\n ::cudaDeviceGetP2PAttribute"]
10621    pub unsafe fn cuDeviceGetP2PAttribute(
10622        &self,
10623        value: *mut ::std::os::raw::c_int,
10624        attrib: CUdevice_P2PAttribute,
10625        srcDevice: CUdevice,
10626        dstDevice: CUdevice,
10627    ) -> CUresult {
10628        (self
10629            .cuDeviceGetP2PAttribute
10630            .as_ref()
10631            .expect("Expected function, got error."))(value, attrib, srcDevice, dstDevice)
10632    }
10633    #[doc = " \\brief Unregisters a graphics resource for access by CUDA\n\n Unregisters the graphics resource \\p resource so it is not accessible by\n CUDA unless registered again.\n\n If \\p resource is invalid then ::CUDA_ERROR_INVALID_HANDLE is\n returned.\n\n \\param resource - Resource to unregister\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa\n ::cuGraphicsD3D9RegisterResource,\n ::cuGraphicsD3D10RegisterResource,\n ::cuGraphicsD3D11RegisterResource,\n ::cuGraphicsGLRegisterBuffer,\n ::cuGraphicsGLRegisterImage,\n ::cudaGraphicsUnregisterResource"]
10634    pub unsafe fn cuGraphicsUnregisterResource(&self, resource: CUgraphicsResource) -> CUresult {
10635        (self
10636            .cuGraphicsUnregisterResource
10637            .as_ref()
10638            .expect("Expected function, got error."))(resource)
10639    }
10640    #[doc = " \\brief Get an array through which to access a subresource of a mapped graphics resource.\n\n Returns in \\p *pArray an array through which the subresource of the mapped\n graphics resource \\p resource which corresponds to array index \\p arrayIndex\n and mipmap level \\p mipLevel may be accessed.  The value set in \\p *pArray may\n change every time that \\p resource is mapped.\n\n If \\p resource is not a texture then it cannot be accessed via an array and\n ::CUDA_ERROR_NOT_MAPPED_AS_ARRAY is returned.\n If \\p arrayIndex is not a valid array index for \\p resource then\n ::CUDA_ERROR_INVALID_VALUE is returned.\n If \\p mipLevel is not a valid mipmap level for \\p resource then\n ::CUDA_ERROR_INVALID_VALUE is returned.\n If \\p resource is not mapped then ::CUDA_ERROR_NOT_MAPPED is returned.\n\n \\param pArray      - Returned array through which a subresource of \\p resource may be accessed\n \\param resource    - Mapped resource to access\n \\param arrayIndex  - Array index for array textures or cubemap face\n                      index as defined by ::CUarray_cubemap_face for\n                      cubemap textures for the subresource to access\n \\param mipLevel    - Mipmap level for the subresource to access\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_MAPPED,\n ::CUDA_ERROR_NOT_MAPPED_AS_ARRAY\n \\notefnerr\n\n \\sa\n ::cuGraphicsResourceGetMappedPointer,\n ::cudaGraphicsSubResourceGetMappedArray"]
10641    pub unsafe fn cuGraphicsSubResourceGetMappedArray(
10642        &self,
10643        pArray: *mut CUarray,
10644        resource: CUgraphicsResource,
10645        arrayIndex: ::std::os::raw::c_uint,
10646        mipLevel: ::std::os::raw::c_uint,
10647    ) -> CUresult {
10648        (self
10649            .cuGraphicsSubResourceGetMappedArray
10650            .as_ref()
10651            .expect("Expected function, got error."))(pArray, resource, arrayIndex, mipLevel)
10652    }
10653    #[doc = " \\brief Get a mipmapped array through which to access a mapped graphics resource.\n\n Returns in \\p *pMipmappedArray a mipmapped array through which the mapped graphics\n resource \\p resource. The value set in \\p *pMipmappedArray may change every time\n that \\p resource is mapped.\n\n If \\p resource is not a texture then it cannot be accessed via a mipmapped array and\n ::CUDA_ERROR_NOT_MAPPED_AS_ARRAY is returned.\n If \\p resource is not mapped then ::CUDA_ERROR_NOT_MAPPED is returned.\n\n \\param pMipmappedArray - Returned mipmapped array through which \\p resource may be accessed\n \\param resource        - Mapped resource to access\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_MAPPED,\n ::CUDA_ERROR_NOT_MAPPED_AS_ARRAY\n \\notefnerr\n\n \\sa\n ::cuGraphicsResourceGetMappedPointer,\n ::cudaGraphicsResourceGetMappedMipmappedArray"]
10654    pub unsafe fn cuGraphicsResourceGetMappedMipmappedArray(
10655        &self,
10656        pMipmappedArray: *mut CUmipmappedArray,
10657        resource: CUgraphicsResource,
10658    ) -> CUresult {
10659        (self
10660            .cuGraphicsResourceGetMappedMipmappedArray
10661            .as_ref()
10662            .expect("Expected function, got error."))(pMipmappedArray, resource)
10663    }
10664    pub unsafe fn cuGraphicsResourceGetMappedPointer_v2(
10665        &self,
10666        pDevPtr: *mut CUdeviceptr,
10667        pSize: *mut usize,
10668        resource: CUgraphicsResource,
10669    ) -> CUresult {
10670        (self
10671            .cuGraphicsResourceGetMappedPointer_v2
10672            .as_ref()
10673            .expect("Expected function, got error."))(pDevPtr, pSize, resource)
10674    }
10675    pub unsafe fn cuGraphicsResourceSetMapFlags_v2(
10676        &self,
10677        resource: CUgraphicsResource,
10678        flags: ::std::os::raw::c_uint,
10679    ) -> CUresult {
10680        (self
10681            .cuGraphicsResourceSetMapFlags_v2
10682            .as_ref()
10683            .expect("Expected function, got error."))(resource, flags)
10684    }
10685    #[doc = " \\brief Map graphics resources for access by CUDA\n\n Maps the \\p count graphics resources in \\p resources for access by CUDA.\n\n The resources in \\p resources may be accessed by CUDA until they\n are unmapped. The graphics API from which \\p resources were registered\n should not access any resources while they are mapped by CUDA. If an\n application does so, the results are undefined.\n\n This function provides the synchronization guarantee that any graphics calls\n issued before ::cuGraphicsMapResources() will complete before any subsequent CUDA\n work issued in \\p stream begins.\n\n If \\p resources includes any duplicate entries then ::CUDA_ERROR_INVALID_HANDLE is returned.\n If any of \\p resources are presently mapped for access by CUDA then ::CUDA_ERROR_ALREADY_MAPPED is returned.\n\n \\param count      - Number of resources to map\n \\param resources  - Resources to map for CUDA usage\n \\param hStream    - Stream with which to synchronize\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_ALREADY_MAPPED,\n ::CUDA_ERROR_UNKNOWN\n \\note_null_stream\n \\notefnerr\n\n \\sa\n ::cuGraphicsResourceGetMappedPointer,\n ::cuGraphicsSubResourceGetMappedArray,\n ::cuGraphicsUnmapResources,\n ::cudaGraphicsMapResources"]
10686    pub unsafe fn cuGraphicsMapResources(
10687        &self,
10688        count: ::std::os::raw::c_uint,
10689        resources: *mut CUgraphicsResource,
10690        hStream: CUstream,
10691    ) -> CUresult {
10692        (self
10693            .cuGraphicsMapResources
10694            .as_ref()
10695            .expect("Expected function, got error."))(count, resources, hStream)
10696    }
10697    #[doc = " \\brief Unmap graphics resources.\n\n Unmaps the \\p count graphics resources in \\p resources.\n\n Once unmapped, the resources in \\p resources may not be accessed by CUDA\n until they are mapped again.\n\n This function provides the synchronization guarantee that any CUDA work issued\n in \\p stream before ::cuGraphicsUnmapResources() will complete before any\n subsequently issued graphics work begins.\n\n\n If \\p resources includes any duplicate entries then ::CUDA_ERROR_INVALID_HANDLE is returned.\n If any of \\p resources are not presently mapped for access by CUDA then ::CUDA_ERROR_NOT_MAPPED is returned.\n\n \\param count      - Number of resources to unmap\n \\param resources  - Resources to unmap\n \\param hStream    - Stream with which to synchronize\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_NOT_MAPPED,\n ::CUDA_ERROR_UNKNOWN\n \\note_null_stream\n \\notefnerr\n\n \\sa\n ::cuGraphicsMapResources,\n ::cudaGraphicsUnmapResources"]
10698    pub unsafe fn cuGraphicsUnmapResources(
10699        &self,
10700        count: ::std::os::raw::c_uint,
10701        resources: *mut CUgraphicsResource,
10702        hStream: CUstream,
10703    ) -> CUresult {
10704        (self
10705            .cuGraphicsUnmapResources
10706            .as_ref()
10707            .expect("Expected function, got error."))(count, resources, hStream)
10708    }
10709    pub unsafe fn cuGetProcAddress_v2(
10710        &self,
10711        symbol: *const ::std::os::raw::c_char,
10712        pfn: *mut *mut ::std::os::raw::c_void,
10713        cudaVersion: ::std::os::raw::c_int,
10714        flags: cuuint64_t,
10715        symbolStatus: *mut CUdriverProcAddressQueryResult,
10716    ) -> CUresult {
10717        (self
10718            .cuGetProcAddress_v2
10719            .as_ref()
10720            .expect("Expected function, got error."))(
10721            symbol, pfn, cudaVersion, flags, symbolStatus
10722        )
10723    }
10724    #[doc = " @}"]
10725    pub unsafe fn cuGetExportTable(
10726        &self,
10727        ppExportTable: *mut *const ::std::os::raw::c_void,
10728        pExportTableId: *const CUuuid,
10729    ) -> CUresult {
10730        (self
10731            .cuGetExportTable
10732            .as_ref()
10733            .expect("Expected function, got error."))(ppExportTable, pExportTableId)
10734    }
10735}