1pub 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;
127pub type CUgraphConditionalHandle = cuuint64_t;
128#[repr(C)]
129#[derive(Debug, Copy, Clone)]
130pub struct CUgraphDeviceUpdatableNode_st {
131 _unused: [u8; 0],
132}
133pub type CUgraphDeviceNode = *mut CUgraphDeviceUpdatableNode_st;
134#[repr(C)]
135#[derive(Debug, Copy, Clone)]
136pub struct CUasyncCallbackEntry_st {
137 _unused: [u8; 0],
138}
139pub type CUasyncCallbackHandle = *mut CUasyncCallbackEntry_st;
140#[repr(C)]
141#[derive(Debug, Copy, Clone)]
142pub struct CUgreenCtx_st {
143 _unused: [u8; 0],
144}
145#[doc = " \\typedef typedef struct CUgreenCtx_st* CUgreenCtx\n A green context handle. This handle can be used safely from only one CPU thread at a time.\n Created via ::cuGreenCtxCreate"]
146pub type CUgreenCtx = *mut CUgreenCtx_st;
147#[repr(C)]
148#[derive(Debug, Copy, Clone)]
149pub struct CUuuid_st {
150 pub bytes: [::std::os::raw::c_char; 16usize],
151}
152#[allow(clippy::unnecessary_operation, clippy::identity_op)]
153const _: () = {
154 ["Size of CUuuid_st"][::std::mem::size_of::<CUuuid_st>() - 16usize];
155 ["Alignment of CUuuid_st"][::std::mem::align_of::<CUuuid_st>() - 1usize];
156 ["Offset of field: CUuuid_st::bytes"][::std::mem::offset_of!(CUuuid_st, bytes) - 0usize];
157};
158pub type CUuuid = CUuuid_st;
159#[doc = " Fabric handle - An opaque handle representing a memory allocation\n that can be exported to processes in same or different nodes. For IPC\n between processes on different nodes they must be connected via the\n NVSwitch fabric."]
160#[repr(C)]
161#[derive(Debug, Copy, Clone)]
162pub struct CUmemFabricHandle_st {
163 pub data: [::std::os::raw::c_uchar; 64usize],
164}
165#[allow(clippy::unnecessary_operation, clippy::identity_op)]
166const _: () = {
167 ["Size of CUmemFabricHandle_st"][::std::mem::size_of::<CUmemFabricHandle_st>() - 64usize];
168 ["Alignment of CUmemFabricHandle_st"][::std::mem::align_of::<CUmemFabricHandle_st>() - 1usize];
169 ["Offset of field: CUmemFabricHandle_st::data"]
170 [::std::mem::offset_of!(CUmemFabricHandle_st, data) - 0usize];
171};
172#[doc = " Fabric handle - An opaque handle representing a memory allocation\n that can be exported to processes in same or different nodes. For IPC\n between processes on different nodes they must be connected via the\n NVSwitch fabric."]
173pub type CUmemFabricHandle_v1 = CUmemFabricHandle_st;
174#[doc = " Fabric handle - An opaque handle representing a memory allocation\n that can be exported to processes in same or different nodes. For IPC\n between processes on different nodes they must be connected via the\n NVSwitch fabric."]
175pub type CUmemFabricHandle = CUmemFabricHandle_v1;
176#[doc = " CUDA IPC event handle"]
177#[repr(C)]
178#[derive(Debug, Copy, Clone)]
179pub struct CUipcEventHandle_st {
180 pub reserved: [::std::os::raw::c_char; 64usize],
181}
182#[allow(clippy::unnecessary_operation, clippy::identity_op)]
183const _: () = {
184 ["Size of CUipcEventHandle_st"][::std::mem::size_of::<CUipcEventHandle_st>() - 64usize];
185 ["Alignment of CUipcEventHandle_st"][::std::mem::align_of::<CUipcEventHandle_st>() - 1usize];
186 ["Offset of field: CUipcEventHandle_st::reserved"]
187 [::std::mem::offset_of!(CUipcEventHandle_st, reserved) - 0usize];
188};
189#[doc = " CUDA IPC event handle"]
190pub type CUipcEventHandle_v1 = CUipcEventHandle_st;
191#[doc = " CUDA IPC event handle"]
192pub type CUipcEventHandle = CUipcEventHandle_v1;
193#[doc = " CUDA IPC mem handle"]
194#[repr(C)]
195#[derive(Debug, Copy, Clone)]
196pub struct CUipcMemHandle_st {
197 pub reserved: [::std::os::raw::c_char; 64usize],
198}
199#[allow(clippy::unnecessary_operation, clippy::identity_op)]
200const _: () = {
201 ["Size of CUipcMemHandle_st"][::std::mem::size_of::<CUipcMemHandle_st>() - 64usize];
202 ["Alignment of CUipcMemHandle_st"][::std::mem::align_of::<CUipcMemHandle_st>() - 1usize];
203 ["Offset of field: CUipcMemHandle_st::reserved"]
204 [::std::mem::offset_of!(CUipcMemHandle_st, reserved) - 0usize];
205};
206#[doc = " CUDA IPC mem handle"]
207pub type CUipcMemHandle_v1 = CUipcMemHandle_st;
208#[doc = " CUDA IPC mem handle"]
209pub type CUipcMemHandle = CUipcMemHandle_v1;
210impl CUipcMem_flags_enum {
211 #[doc = "< Automatically enable peer access between remote devices as needed"]
212 pub const CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS: CUipcMem_flags_enum = CUipcMem_flags_enum(1);
213}
214#[repr(transparent)]
215#[doc = " CUDA Ipc Mem Flags"]
216#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
217pub struct CUipcMem_flags_enum(pub ::std::os::raw::c_uint);
218#[doc = " CUDA Ipc Mem Flags"]
219pub use self::CUipcMem_flags_enum as CUipcMem_flags;
220impl CUmemAttach_flags_enum {
221 #[doc = "< Memory can be accessed by any stream on any device"]
222 pub const CU_MEM_ATTACH_GLOBAL: CUmemAttach_flags_enum = CUmemAttach_flags_enum(1);
223}
224impl CUmemAttach_flags_enum {
225 #[doc = "< Memory cannot be accessed by any stream on any device"]
226 pub const CU_MEM_ATTACH_HOST: CUmemAttach_flags_enum = CUmemAttach_flags_enum(2);
227}
228impl CUmemAttach_flags_enum {
229 #[doc = "< Memory can only be accessed by a single stream on the associated device"]
230 pub const CU_MEM_ATTACH_SINGLE: CUmemAttach_flags_enum = CUmemAttach_flags_enum(4);
231}
232#[repr(transparent)]
233#[doc = " CUDA Mem Attach Flags"]
234#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
235pub struct CUmemAttach_flags_enum(pub ::std::os::raw::c_uint);
236#[doc = " CUDA Mem Attach Flags"]
237pub use self::CUmemAttach_flags_enum as CUmemAttach_flags;
238impl CUctx_flags_enum {
239 #[doc = "< Automatic scheduling"]
240 pub const CU_CTX_SCHED_AUTO: CUctx_flags_enum = CUctx_flags_enum(0);
241}
242impl CUctx_flags_enum {
243 #[doc = "< Set spin as default scheduling"]
244 pub const CU_CTX_SCHED_SPIN: CUctx_flags_enum = CUctx_flags_enum(1);
245}
246impl CUctx_flags_enum {
247 #[doc = "< Set yield as default scheduling"]
248 pub const CU_CTX_SCHED_YIELD: CUctx_flags_enum = CUctx_flags_enum(2);
249}
250impl CUctx_flags_enum {
251 #[doc = "< Set blocking synchronization as default scheduling"]
252 pub const CU_CTX_SCHED_BLOCKING_SYNC: CUctx_flags_enum = CUctx_flags_enum(4);
253}
254impl CUctx_flags_enum {
255 #[doc = "< Set blocking synchronization as default scheduling\n \\deprecated This flag was deprecated as of CUDA 4.0\n and was replaced with ::CU_CTX_SCHED_BLOCKING_SYNC."]
256 pub const CU_CTX_BLOCKING_SYNC: CUctx_flags_enum = CUctx_flags_enum(4);
257}
258impl CUctx_flags_enum {
259 pub const CU_CTX_SCHED_MASK: CUctx_flags_enum = CUctx_flags_enum(7);
260}
261impl CUctx_flags_enum {
262 #[doc = "< \\deprecated This flag was deprecated as of CUDA 11.0\n and it no longer has any effect. All contexts\n as of CUDA 3.2 behave as though the flag is enabled."]
263 pub const CU_CTX_MAP_HOST: CUctx_flags_enum = CUctx_flags_enum(8);
264}
265impl CUctx_flags_enum {
266 #[doc = "< Keep local memory allocation after launch"]
267 pub const CU_CTX_LMEM_RESIZE_TO_MAX: CUctx_flags_enum = CUctx_flags_enum(16);
268}
269impl CUctx_flags_enum {
270 #[doc = "< Trigger coredumps from exceptions in this context"]
271 pub const CU_CTX_COREDUMP_ENABLE: CUctx_flags_enum = CUctx_flags_enum(32);
272}
273impl CUctx_flags_enum {
274 #[doc = "< Enable user pipe to trigger coredumps in this context"]
275 pub const CU_CTX_USER_COREDUMP_ENABLE: CUctx_flags_enum = CUctx_flags_enum(64);
276}
277impl CUctx_flags_enum {
278 #[doc = "< Ensure synchronous memory operations on this context will synchronize"]
279 pub const CU_CTX_SYNC_MEMOPS: CUctx_flags_enum = CUctx_flags_enum(128);
280}
281impl CUctx_flags_enum {
282 pub const CU_CTX_FLAGS_MASK: CUctx_flags_enum = CUctx_flags_enum(255);
283}
284#[repr(transparent)]
285#[doc = " Context creation flags"]
286#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
287pub struct CUctx_flags_enum(pub ::std::os::raw::c_uint);
288#[doc = " Context creation flags"]
289pub use self::CUctx_flags_enum as CUctx_flags;
290impl CUevent_sched_flags_enum {
291 #[doc = "< Automatic scheduling"]
292 pub const CU_EVENT_SCHED_AUTO: CUevent_sched_flags_enum = CUevent_sched_flags_enum(0);
293}
294impl CUevent_sched_flags_enum {
295 #[doc = "< Set spin as default scheduling"]
296 pub const CU_EVENT_SCHED_SPIN: CUevent_sched_flags_enum = CUevent_sched_flags_enum(1);
297}
298impl CUevent_sched_flags_enum {
299 #[doc = "< Set yield as default scheduling"]
300 pub const CU_EVENT_SCHED_YIELD: CUevent_sched_flags_enum = CUevent_sched_flags_enum(2);
301}
302impl CUevent_sched_flags_enum {
303 #[doc = "< Set blocking synchronization as default scheduling"]
304 pub const CU_EVENT_SCHED_BLOCKING_SYNC: CUevent_sched_flags_enum = CUevent_sched_flags_enum(4);
305}
306#[repr(transparent)]
307#[doc = " Event sched flags"]
308#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
309pub struct CUevent_sched_flags_enum(pub ::std::os::raw::c_uint);
310#[doc = " Event sched flags"]
311pub use self::CUevent_sched_flags_enum as CUevent_sched_flags;
312impl CUstream_flags_enum {
313 #[doc = "< Default stream flag"]
314 pub const CU_STREAM_DEFAULT: CUstream_flags_enum = CUstream_flags_enum(0);
315}
316impl CUstream_flags_enum {
317 #[doc = "< Stream does not synchronize with stream 0 (the NULL stream)"]
318 pub const CU_STREAM_NON_BLOCKING: CUstream_flags_enum = CUstream_flags_enum(1);
319}
320#[repr(transparent)]
321#[doc = " Stream creation flags"]
322#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
323pub struct CUstream_flags_enum(pub ::std::os::raw::c_uint);
324#[doc = " Stream creation flags"]
325pub use self::CUstream_flags_enum as CUstream_flags;
326impl CUevent_flags_enum {
327 #[doc = "< Default event flag"]
328 pub const CU_EVENT_DEFAULT: CUevent_flags_enum = CUevent_flags_enum(0);
329}
330impl CUevent_flags_enum {
331 #[doc = "< Event uses blocking synchronization"]
332 pub const CU_EVENT_BLOCKING_SYNC: CUevent_flags_enum = CUevent_flags_enum(1);
333}
334impl CUevent_flags_enum {
335 #[doc = "< Event will not record timing data"]
336 pub const CU_EVENT_DISABLE_TIMING: CUevent_flags_enum = CUevent_flags_enum(2);
337}
338impl CUevent_flags_enum {
339 #[doc = "< Event is suitable for interprocess use. CU_EVENT_DISABLE_TIMING must be set"]
340 pub const CU_EVENT_INTERPROCESS: CUevent_flags_enum = CUevent_flags_enum(4);
341}
342#[repr(transparent)]
343#[doc = " Event creation flags"]
344#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
345pub struct CUevent_flags_enum(pub ::std::os::raw::c_uint);
346#[doc = " Event creation flags"]
347pub use self::CUevent_flags_enum as CUevent_flags;
348impl CUevent_record_flags_enum {
349 #[doc = "< Default event record flag"]
350 pub const CU_EVENT_RECORD_DEFAULT: CUevent_record_flags_enum = CUevent_record_flags_enum(0);
351}
352impl CUevent_record_flags_enum {
353 #[doc = "< When using stream capture, create an event record node\n instead of the default behavior. This flag is invalid\n when used outside of capture."]
354 pub const CU_EVENT_RECORD_EXTERNAL: CUevent_record_flags_enum = CUevent_record_flags_enum(1);
355}
356#[repr(transparent)]
357#[doc = " Event record flags"]
358#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
359pub struct CUevent_record_flags_enum(pub ::std::os::raw::c_uint);
360#[doc = " Event record flags"]
361pub use self::CUevent_record_flags_enum as CUevent_record_flags;
362impl CUevent_wait_flags_enum {
363 #[doc = "< Default event wait flag"]
364 pub const CU_EVENT_WAIT_DEFAULT: CUevent_wait_flags_enum = CUevent_wait_flags_enum(0);
365}
366impl CUevent_wait_flags_enum {
367 #[doc = "< When using stream capture, create an event wait node\n instead of the default behavior. This flag is invalid\n when used outside of capture."]
368 pub const CU_EVENT_WAIT_EXTERNAL: CUevent_wait_flags_enum = CUevent_wait_flags_enum(1);
369}
370#[repr(transparent)]
371#[doc = " Event wait flags"]
372#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
373pub struct CUevent_wait_flags_enum(pub ::std::os::raw::c_uint);
374#[doc = " Event wait flags"]
375pub use self::CUevent_wait_flags_enum as CUevent_wait_flags;
376impl CUstreamWaitValue_flags_enum {
377 #[doc = "< Wait until (int32_t)(*addr - value) >= 0 (or int64_t for 64 bit\nvalues). Note this is a cyclic comparison which ignores wraparound.\n(Default behavior.)"]
378 pub const CU_STREAM_WAIT_VALUE_GEQ: CUstreamWaitValue_flags_enum =
379 CUstreamWaitValue_flags_enum(0);
380}
381impl CUstreamWaitValue_flags_enum {
382 #[doc = "< Wait until *addr == value."]
383 pub const CU_STREAM_WAIT_VALUE_EQ: CUstreamWaitValue_flags_enum =
384 CUstreamWaitValue_flags_enum(1);
385}
386impl CUstreamWaitValue_flags_enum {
387 #[doc = "< Wait until (*addr & value) != 0."]
388 pub const CU_STREAM_WAIT_VALUE_AND: CUstreamWaitValue_flags_enum =
389 CUstreamWaitValue_flags_enum(2);
390}
391impl CUstreamWaitValue_flags_enum {
392 #[doc = "< Wait until ~(*addr | value) != 0. Support for this operation can be\nqueried with ::cuDeviceGetAttribute() and\n::CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR."]
393 pub const CU_STREAM_WAIT_VALUE_NOR: CUstreamWaitValue_flags_enum =
394 CUstreamWaitValue_flags_enum(3);
395}
396impl CUstreamWaitValue_flags_enum {
397 #[doc = "< Follow the wait operation with a flush of outstanding remote writes. This\nmeans that, if a remote write operation is guaranteed to have reached the\ndevice before the wait can be satisfied, that write is guaranteed to be\nvisible to downstream device work. The device is permitted to reorder\nremote writes internally. For example, this flag would be required if\ntwo remote writes arrive in a defined order, the wait is satisfied by the\nsecond write, and downstream work needs to observe the first write.\nSupport for this operation is restricted to selected platforms and can be\nqueried with ::CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES."]
398 pub const CU_STREAM_WAIT_VALUE_FLUSH: CUstreamWaitValue_flags_enum =
399 CUstreamWaitValue_flags_enum(1073741824);
400}
401#[repr(transparent)]
402#[doc = " Flags for ::cuStreamWaitValue32 and ::cuStreamWaitValue64"]
403#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
404pub struct CUstreamWaitValue_flags_enum(pub ::std::os::raw::c_uint);
405#[doc = " Flags for ::cuStreamWaitValue32 and ::cuStreamWaitValue64"]
406pub use self::CUstreamWaitValue_flags_enum as CUstreamWaitValue_flags;
407impl CUstreamWriteValue_flags_enum {
408 #[doc = "< Default behavior"]
409 pub const CU_STREAM_WRITE_VALUE_DEFAULT: CUstreamWriteValue_flags_enum =
410 CUstreamWriteValue_flags_enum(0);
411}
412impl CUstreamWriteValue_flags_enum {
413 #[doc = "< Permits the write to be reordered with writes which were issued\nbefore it, as a performance optimization. Normally,\n::cuStreamWriteValue32 will provide a memory fence before the\nwrite, which has similar semantics to\n__threadfence_system() but is scoped to the stream\nrather than a CUDA thread.\nThis flag is not supported in the v2 API."]
414 pub const CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER: CUstreamWriteValue_flags_enum =
415 CUstreamWriteValue_flags_enum(1);
416}
417#[repr(transparent)]
418#[doc = " Flags for ::cuStreamWriteValue32"]
419#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
420pub struct CUstreamWriteValue_flags_enum(pub ::std::os::raw::c_uint);
421#[doc = " Flags for ::cuStreamWriteValue32"]
422pub use self::CUstreamWriteValue_flags_enum as CUstreamWriteValue_flags;
423impl CUstreamBatchMemOpType_enum {
424 #[doc = "< Represents a ::cuStreamWaitValue32 operation"]
425 pub const CU_STREAM_MEM_OP_WAIT_VALUE_32: CUstreamBatchMemOpType_enum =
426 CUstreamBatchMemOpType_enum(1);
427}
428impl CUstreamBatchMemOpType_enum {
429 #[doc = "< Represents a ::cuStreamWriteValue32 operation"]
430 pub const CU_STREAM_MEM_OP_WRITE_VALUE_32: CUstreamBatchMemOpType_enum =
431 CUstreamBatchMemOpType_enum(2);
432}
433impl CUstreamBatchMemOpType_enum {
434 #[doc = "< Represents a ::cuStreamWaitValue64 operation"]
435 pub const CU_STREAM_MEM_OP_WAIT_VALUE_64: CUstreamBatchMemOpType_enum =
436 CUstreamBatchMemOpType_enum(4);
437}
438impl CUstreamBatchMemOpType_enum {
439 #[doc = "< Represents a ::cuStreamWriteValue64 operation"]
440 pub const CU_STREAM_MEM_OP_WRITE_VALUE_64: CUstreamBatchMemOpType_enum =
441 CUstreamBatchMemOpType_enum(5);
442}
443impl CUstreamBatchMemOpType_enum {
444 #[doc = "< Insert a memory barrier of the specified type"]
445 pub const CU_STREAM_MEM_OP_BARRIER: CUstreamBatchMemOpType_enum =
446 CUstreamBatchMemOpType_enum(6);
447}
448impl CUstreamBatchMemOpType_enum {
449 #[doc = "< This has the same effect as ::CU_STREAM_WAIT_VALUE_FLUSH, but as a\nstandalone operation."]
450 pub const CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES: CUstreamBatchMemOpType_enum =
451 CUstreamBatchMemOpType_enum(3);
452}
453#[repr(transparent)]
454#[doc = " Operations for ::cuStreamBatchMemOp"]
455#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
456pub struct CUstreamBatchMemOpType_enum(pub ::std::os::raw::c_uint);
457#[doc = " Operations for ::cuStreamBatchMemOp"]
458pub use self::CUstreamBatchMemOpType_enum as CUstreamBatchMemOpType;
459impl CUstreamMemoryBarrier_flags_enum {
460 #[doc = "< System-wide memory barrier."]
461 pub const CU_STREAM_MEMORY_BARRIER_TYPE_SYS: CUstreamMemoryBarrier_flags_enum =
462 CUstreamMemoryBarrier_flags_enum(0);
463}
464impl CUstreamMemoryBarrier_flags_enum {
465 #[doc = "< Limit memory barrier scope to the GPU."]
466 pub const CU_STREAM_MEMORY_BARRIER_TYPE_GPU: CUstreamMemoryBarrier_flags_enum =
467 CUstreamMemoryBarrier_flags_enum(1);
468}
469#[repr(transparent)]
470#[doc = " Flags for ::cuStreamMemoryBarrier"]
471#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
472pub struct CUstreamMemoryBarrier_flags_enum(pub ::std::os::raw::c_uint);
473#[doc = " Flags for ::cuStreamMemoryBarrier"]
474pub use self::CUstreamMemoryBarrier_flags_enum as CUstreamMemoryBarrier_flags;
475#[doc = " Per-operation parameters for ::cuStreamBatchMemOp"]
476#[repr(C)]
477#[derive(Copy, Clone)]
478pub union CUstreamBatchMemOpParams_union {
479 pub operation: CUstreamBatchMemOpType,
480 pub waitValue: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st,
481 pub writeValue: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st,
482 pub flushRemoteWrites: CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st,
483 pub memoryBarrier: CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st,
484 pub pad: [cuuint64_t; 6usize],
485}
486#[repr(C)]
487#[derive(Copy, Clone)]
488pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st {
489 pub operation: CUstreamBatchMemOpType,
490 pub address: CUdeviceptr,
491 pub __bindgen_anon_1:
492 CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1,
493 pub flags: ::std::os::raw::c_uint,
494 #[doc = "< For driver internal use. Initial value is unimportant."]
495 pub alias: CUdeviceptr,
496}
497#[repr(C)]
498#[derive(Copy, Clone)]
499pub union CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1 {
500 pub value: cuuint32_t,
501 pub value64: cuuint64_t,
502}
503#[allow(clippy::unnecessary_operation, clippy::identity_op)]
504const _: () = {
505 ["Size of CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1"]
506 [::std::mem::size_of::<
507 CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1,
508 >() - 8usize];
509 ["Alignment of CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1"]
510 [::std::mem::align_of::<
511 CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1,
512 >() - 8usize];
513 [
514 "Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1::value",
515 ][::std::mem::offset_of!(
516 CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1,
517 value
518 ) - 0usize];
519 [
520 "Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1::value64",
521 ][::std::mem::offset_of!(
522 CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st__bindgen_ty_1,
523 value64
524 ) - 0usize];
525};
526#[allow(clippy::unnecessary_operation, clippy::identity_op)]
527const _: () = {
528 ["Size of CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st"][::std::mem::size_of::<
529 CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st,
530 >() - 40usize];
531 ["Alignment of CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st"]
532 [::std::mem::align_of::<CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st>()
533 - 8usize];
534 ["Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st::operation"]
535 [::std::mem::offset_of!(
536 CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st,
537 operation
538 ) - 0usize];
539 ["Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st::address"][::std::mem::offset_of!(
540 CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st,
541 address
542 )
543 - 8usize];
544 ["Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st::flags"][::std::mem::offset_of!(
545 CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st,
546 flags
547 )
548 - 24usize];
549 ["Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st::alias"][::std::mem::offset_of!(
550 CUstreamBatchMemOpParams_union_CUstreamMemOpWaitValueParams_st,
551 alias
552 )
553 - 32usize];
554};
555#[repr(C)]
556#[derive(Copy, Clone)]
557pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st {
558 pub operation: CUstreamBatchMemOpType,
559 pub address: CUdeviceptr,
560 pub __bindgen_anon_1:
561 CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1,
562 pub flags: ::std::os::raw::c_uint,
563 #[doc = "< For driver internal use. Initial value is unimportant."]
564 pub alias: CUdeviceptr,
565}
566#[repr(C)]
567#[derive(Copy, Clone)]
568pub union CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1 {
569 pub value: cuuint32_t,
570 pub value64: cuuint64_t,
571}
572#[allow(clippy::unnecessary_operation, clippy::identity_op)]
573const _: () = {
574 ["Size of CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1"]
575 [::std::mem::size_of::<
576 CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1,
577 >() - 8usize];
578 ["Alignment of CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1"]
579 [::std::mem::align_of::<
580 CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1,
581 >() - 8usize];
582 [
583 "Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1::value",
584 ][::std::mem::offset_of!(
585 CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1,
586 value
587 ) - 0usize];
588 [
589 "Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1::value64",
590 ][::std::mem::offset_of!(
591 CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st__bindgen_ty_1,
592 value64
593 ) - 0usize];
594};
595#[allow(clippy::unnecessary_operation, clippy::identity_op)]
596const _: () = {
597 ["Size of CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st"][::std::mem::size_of::<
598 CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st,
599 >() - 40usize];
600 ["Alignment of CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st"]
601 [::std::mem::align_of::<CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st>()
602 - 8usize];
603 ["Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st::operation"]
604 [::std::mem::offset_of!(
605 CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st,
606 operation
607 ) - 0usize];
608 ["Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st::address"][::std::mem::offset_of!(
609 CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st,
610 address
611 )
612 - 8usize];
613 ["Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st::flags"][::std::mem::offset_of!(
614 CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st,
615 flags
616 )
617 - 24usize];
618 ["Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st::alias"][::std::mem::offset_of!(
619 CUstreamBatchMemOpParams_union_CUstreamMemOpWriteValueParams_st,
620 alias
621 )
622 - 32usize];
623};
624#[repr(C)]
625#[derive(Debug, Copy, Clone)]
626pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st {
627 pub operation: CUstreamBatchMemOpType,
628 pub flags: ::std::os::raw::c_uint,
629}
630#[allow(clippy::unnecessary_operation, clippy::identity_op)]
631const _: () = {
632 ["Size of CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st"]
633 [::std::mem::size_of::<
634 CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st,
635 >() - 8usize];
636 ["Alignment of CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st"]
637 [::std::mem::align_of::<
638 CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st,
639 >() - 4usize];
640 [
641 "Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st::operation",
642 ][::std::mem::offset_of!(
643 CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st,
644 operation
645 ) - 0usize];
646 [
647 "Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st::flags",
648 ][::std::mem::offset_of!(
649 CUstreamBatchMemOpParams_union_CUstreamMemOpFlushRemoteWritesParams_st,
650 flags
651 ) - 4usize];
652};
653#[repr(C)]
654#[derive(Debug, Copy, Clone)]
655pub struct CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st {
656 pub operation: CUstreamBatchMemOpType,
657 pub flags: ::std::os::raw::c_uint,
658}
659#[allow(clippy::unnecessary_operation, clippy::identity_op)]
660const _: () = {
661 ["Size of CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st"]
662 [::std::mem::size_of::<CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st>(
663 ) - 8usize];
664 ["Alignment of CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st"]
665 [::std::mem::align_of::<CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st>(
666 ) - 4usize];
667 [
668 "Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st::operation",
669 ][::std::mem::offset_of!(
670 CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st,
671 operation
672 ) - 0usize];
673 ["Offset of field: CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st::flags"]
674 [::std::mem::offset_of!(
675 CUstreamBatchMemOpParams_union_CUstreamMemOpMemoryBarrierParams_st,
676 flags
677 ) - 4usize];
678};
679#[allow(clippy::unnecessary_operation, clippy::identity_op)]
680const _: () = {
681 ["Size of CUstreamBatchMemOpParams_union"]
682 [::std::mem::size_of::<CUstreamBatchMemOpParams_union>() - 48usize];
683 ["Alignment of CUstreamBatchMemOpParams_union"]
684 [::std::mem::align_of::<CUstreamBatchMemOpParams_union>() - 8usize];
685 ["Offset of field: CUstreamBatchMemOpParams_union::operation"]
686 [::std::mem::offset_of!(CUstreamBatchMemOpParams_union, operation) - 0usize];
687 ["Offset of field: CUstreamBatchMemOpParams_union::waitValue"]
688 [::std::mem::offset_of!(CUstreamBatchMemOpParams_union, waitValue) - 0usize];
689 ["Offset of field: CUstreamBatchMemOpParams_union::writeValue"]
690 [::std::mem::offset_of!(CUstreamBatchMemOpParams_union, writeValue) - 0usize];
691 ["Offset of field: CUstreamBatchMemOpParams_union::flushRemoteWrites"]
692 [::std::mem::offset_of!(CUstreamBatchMemOpParams_union, flushRemoteWrites) - 0usize];
693 ["Offset of field: CUstreamBatchMemOpParams_union::memoryBarrier"]
694 [::std::mem::offset_of!(CUstreamBatchMemOpParams_union, memoryBarrier) - 0usize];
695 ["Offset of field: CUstreamBatchMemOpParams_union::pad"]
696 [::std::mem::offset_of!(CUstreamBatchMemOpParams_union, pad) - 0usize];
697};
698#[doc = " Per-operation parameters for ::cuStreamBatchMemOp"]
699pub type CUstreamBatchMemOpParams_v1 = CUstreamBatchMemOpParams_union;
700#[doc = " Per-operation parameters for ::cuStreamBatchMemOp"]
701pub type CUstreamBatchMemOpParams = CUstreamBatchMemOpParams_v1;
702#[repr(C)]
703#[derive(Debug, Copy, Clone)]
704pub struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st {
705 pub ctx: CUcontext,
706 pub count: ::std::os::raw::c_uint,
707 pub paramArray: *mut CUstreamBatchMemOpParams,
708 pub flags: ::std::os::raw::c_uint,
709}
710#[allow(clippy::unnecessary_operation, clippy::identity_op)]
711const _: () = {
712 ["Size of CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st"]
713 [::std::mem::size_of::<CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st>() - 32usize];
714 ["Alignment of CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st"]
715 [::std::mem::align_of::<CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st>() - 8usize];
716 ["Offset of field: CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st::ctx"]
717 [::std::mem::offset_of!(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st, ctx) - 0usize];
718 ["Offset of field: CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st::count"]
719 [::std::mem::offset_of!(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st, count) - 8usize];
720 ["Offset of field: CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st::paramArray"]
721 [::std::mem::offset_of!(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st, paramArray) - 16usize];
722 ["Offset of field: CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st::flags"]
723 [::std::mem::offset_of!(CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st, flags) - 24usize];
724};
725pub type CUDA_BATCH_MEM_OP_NODE_PARAMS_v1 = CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st;
726pub type CUDA_BATCH_MEM_OP_NODE_PARAMS = CUDA_BATCH_MEM_OP_NODE_PARAMS_v1;
727#[doc = " Batch memory operation node parameters"]
728#[repr(C)]
729#[derive(Debug, Copy, Clone)]
730pub struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st {
731 #[doc = "< Context to use for the operations."]
732 pub ctx: CUcontext,
733 #[doc = "< Number of operations in paramArray."]
734 pub count: ::std::os::raw::c_uint,
735 #[doc = "< Array of batch memory operations."]
736 pub paramArray: *mut CUstreamBatchMemOpParams,
737 #[doc = "< Flags to control the node."]
738 pub flags: ::std::os::raw::c_uint,
739}
740#[allow(clippy::unnecessary_operation, clippy::identity_op)]
741const _: () = {
742 ["Size of CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st"]
743 [::std::mem::size_of::<CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st>() - 32usize];
744 ["Alignment of CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st"]
745 [::std::mem::align_of::<CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st>() - 8usize];
746 ["Offset of field: CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st::ctx"]
747 [::std::mem::offset_of!(CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st, ctx) - 0usize];
748 ["Offset of field: CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st::count"]
749 [::std::mem::offset_of!(CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st, count) - 8usize];
750 ["Offset of field: CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st::paramArray"]
751 [::std::mem::offset_of!(CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st, paramArray) - 16usize];
752 ["Offset of field: CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st::flags"]
753 [::std::mem::offset_of!(CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st, flags) - 24usize];
754};
755#[doc = " Batch memory operation node parameters"]
756pub type CUDA_BATCH_MEM_OP_NODE_PARAMS_v2 = CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st;
757impl CUoccupancy_flags_enum {
758 #[doc = "< Default behavior"]
759 pub const CU_OCCUPANCY_DEFAULT: CUoccupancy_flags_enum = CUoccupancy_flags_enum(0);
760}
761impl CUoccupancy_flags_enum {
762 #[doc = "< Assume global caching is enabled and cannot be automatically turned off"]
763 pub const CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE: CUoccupancy_flags_enum =
764 CUoccupancy_flags_enum(1);
765}
766#[repr(transparent)]
767#[doc = " Occupancy calculator flag"]
768#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
769pub struct CUoccupancy_flags_enum(pub ::std::os::raw::c_uint);
770#[doc = " Occupancy calculator flag"]
771pub use self::CUoccupancy_flags_enum as CUoccupancy_flags;
772impl CUstreamUpdateCaptureDependencies_flags_enum {
773 #[doc = "< Add new nodes to the dependency set"]
774 pub const CU_STREAM_ADD_CAPTURE_DEPENDENCIES: CUstreamUpdateCaptureDependencies_flags_enum =
775 CUstreamUpdateCaptureDependencies_flags_enum(0);
776}
777impl CUstreamUpdateCaptureDependencies_flags_enum {
778 #[doc = "< Replace the dependency set with the new nodes"]
779 pub const CU_STREAM_SET_CAPTURE_DEPENDENCIES: CUstreamUpdateCaptureDependencies_flags_enum =
780 CUstreamUpdateCaptureDependencies_flags_enum(1);
781}
782#[repr(transparent)]
783#[doc = " Flags for ::cuStreamUpdateCaptureDependencies"]
784#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
785pub struct CUstreamUpdateCaptureDependencies_flags_enum(pub ::std::os::raw::c_uint);
786#[doc = " Flags for ::cuStreamUpdateCaptureDependencies"]
787pub use self::CUstreamUpdateCaptureDependencies_flags_enum as CUstreamUpdateCaptureDependencies_flags;
788impl CUasyncNotificationType_enum {
789 pub const CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET: CUasyncNotificationType_enum =
790 CUasyncNotificationType_enum(1);
791}
792#[repr(transparent)]
793#[doc = " Types of async notification that can be sent"]
794#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
795pub struct CUasyncNotificationType_enum(pub ::std::os::raw::c_uint);
796#[doc = " Types of async notification that can be sent"]
797pub use self::CUasyncNotificationType_enum as CUasyncNotificationType;
798#[doc = " Information passed to the user via the async notification callback"]
799#[repr(C)]
800#[derive(Copy, Clone)]
801pub struct CUasyncNotificationInfo_st {
802 pub type_: CUasyncNotificationType,
803 pub info: CUasyncNotificationInfo_st__bindgen_ty_1,
804}
805#[repr(C)]
806#[derive(Copy, Clone)]
807pub union CUasyncNotificationInfo_st__bindgen_ty_1 {
808 pub overBudget: CUasyncNotificationInfo_st__bindgen_ty_1__bindgen_ty_1,
809}
810#[repr(C)]
811#[derive(Debug, Copy, Clone)]
812pub struct CUasyncNotificationInfo_st__bindgen_ty_1__bindgen_ty_1 {
813 pub bytesOverBudget: ::std::os::raw::c_ulonglong,
814}
815#[allow(clippy::unnecessary_operation, clippy::identity_op)]
816const _: () = {
817 ["Size of CUasyncNotificationInfo_st__bindgen_ty_1__bindgen_ty_1"]
818 [::std::mem::size_of::<CUasyncNotificationInfo_st__bindgen_ty_1__bindgen_ty_1>() - 8usize];
819 ["Alignment of CUasyncNotificationInfo_st__bindgen_ty_1__bindgen_ty_1"]
820 [::std::mem::align_of::<CUasyncNotificationInfo_st__bindgen_ty_1__bindgen_ty_1>() - 8usize];
821 ["Offset of field: CUasyncNotificationInfo_st__bindgen_ty_1__bindgen_ty_1::bytesOverBudget"][::std::mem::offset_of!(
822 CUasyncNotificationInfo_st__bindgen_ty_1__bindgen_ty_1,
823 bytesOverBudget
824 )
825 - 0usize];
826};
827#[allow(clippy::unnecessary_operation, clippy::identity_op)]
828const _: () = {
829 ["Size of CUasyncNotificationInfo_st__bindgen_ty_1"]
830 [::std::mem::size_of::<CUasyncNotificationInfo_st__bindgen_ty_1>() - 8usize];
831 ["Alignment of CUasyncNotificationInfo_st__bindgen_ty_1"]
832 [::std::mem::align_of::<CUasyncNotificationInfo_st__bindgen_ty_1>() - 8usize];
833 ["Offset of field: CUasyncNotificationInfo_st__bindgen_ty_1::overBudget"]
834 [::std::mem::offset_of!(CUasyncNotificationInfo_st__bindgen_ty_1, overBudget) - 0usize];
835};
836#[allow(clippy::unnecessary_operation, clippy::identity_op)]
837const _: () = {
838 ["Size of CUasyncNotificationInfo_st"]
839 [::std::mem::size_of::<CUasyncNotificationInfo_st>() - 16usize];
840 ["Alignment of CUasyncNotificationInfo_st"]
841 [::std::mem::align_of::<CUasyncNotificationInfo_st>() - 8usize];
842 ["Offset of field: CUasyncNotificationInfo_st::type_"]
843 [::std::mem::offset_of!(CUasyncNotificationInfo_st, type_) - 0usize];
844 ["Offset of field: CUasyncNotificationInfo_st::info"]
845 [::std::mem::offset_of!(CUasyncNotificationInfo_st, info) - 8usize];
846};
847#[doc = " Information passed to the user via the async notification callback"]
848pub type CUasyncNotificationInfo = CUasyncNotificationInfo_st;
849#[doc = " CUDA async notification callback\n \\param info Information describing what actions to take as a result of this trim notification.\n \\param userData Pointer to user defined data provided at registration.\n \\param callback The callback handle associated with this specific callback."]
850pub type CUasyncCallback = ::std::option::Option<
851 unsafe extern "C" fn(
852 info: *mut CUasyncNotificationInfo,
853 userData: *mut ::std::os::raw::c_void,
854 callback: CUasyncCallbackHandle,
855 ),
856>;
857impl CUarray_format_enum {
858 #[doc = "< Unsigned 8-bit integers"]
859 pub const CU_AD_FORMAT_UNSIGNED_INT8: CUarray_format_enum = CUarray_format_enum(1);
860}
861impl CUarray_format_enum {
862 #[doc = "< Unsigned 16-bit integers"]
863 pub const CU_AD_FORMAT_UNSIGNED_INT16: CUarray_format_enum = CUarray_format_enum(2);
864}
865impl CUarray_format_enum {
866 #[doc = "< Unsigned 32-bit integers"]
867 pub const CU_AD_FORMAT_UNSIGNED_INT32: CUarray_format_enum = CUarray_format_enum(3);
868}
869impl CUarray_format_enum {
870 #[doc = "< Signed 8-bit integers"]
871 pub const CU_AD_FORMAT_SIGNED_INT8: CUarray_format_enum = CUarray_format_enum(8);
872}
873impl CUarray_format_enum {
874 #[doc = "< Signed 16-bit integers"]
875 pub const CU_AD_FORMAT_SIGNED_INT16: CUarray_format_enum = CUarray_format_enum(9);
876}
877impl CUarray_format_enum {
878 #[doc = "< Signed 32-bit integers"]
879 pub const CU_AD_FORMAT_SIGNED_INT32: CUarray_format_enum = CUarray_format_enum(10);
880}
881impl CUarray_format_enum {
882 #[doc = "< 16-bit floating point"]
883 pub const CU_AD_FORMAT_HALF: CUarray_format_enum = CUarray_format_enum(16);
884}
885impl CUarray_format_enum {
886 #[doc = "< 32-bit floating point"]
887 pub const CU_AD_FORMAT_FLOAT: CUarray_format_enum = CUarray_format_enum(32);
888}
889impl CUarray_format_enum {
890 #[doc = "< 8-bit YUV planar format, with 4:2:0 sampling"]
891 pub const CU_AD_FORMAT_NV12: CUarray_format_enum = CUarray_format_enum(176);
892}
893impl CUarray_format_enum {
894 #[doc = "< 1 channel unsigned 8-bit normalized integer"]
895 pub const CU_AD_FORMAT_UNORM_INT8X1: CUarray_format_enum = CUarray_format_enum(192);
896}
897impl CUarray_format_enum {
898 #[doc = "< 2 channel unsigned 8-bit normalized integer"]
899 pub const CU_AD_FORMAT_UNORM_INT8X2: CUarray_format_enum = CUarray_format_enum(193);
900}
901impl CUarray_format_enum {
902 #[doc = "< 4 channel unsigned 8-bit normalized integer"]
903 pub const CU_AD_FORMAT_UNORM_INT8X4: CUarray_format_enum = CUarray_format_enum(194);
904}
905impl CUarray_format_enum {
906 #[doc = "< 1 channel unsigned 16-bit normalized integer"]
907 pub const CU_AD_FORMAT_UNORM_INT16X1: CUarray_format_enum = CUarray_format_enum(195);
908}
909impl CUarray_format_enum {
910 #[doc = "< 2 channel unsigned 16-bit normalized integer"]
911 pub const CU_AD_FORMAT_UNORM_INT16X2: CUarray_format_enum = CUarray_format_enum(196);
912}
913impl CUarray_format_enum {
914 #[doc = "< 4 channel unsigned 16-bit normalized integer"]
915 pub const CU_AD_FORMAT_UNORM_INT16X4: CUarray_format_enum = CUarray_format_enum(197);
916}
917impl CUarray_format_enum {
918 #[doc = "< 1 channel signed 8-bit normalized integer"]
919 pub const CU_AD_FORMAT_SNORM_INT8X1: CUarray_format_enum = CUarray_format_enum(198);
920}
921impl CUarray_format_enum {
922 #[doc = "< 2 channel signed 8-bit normalized integer"]
923 pub const CU_AD_FORMAT_SNORM_INT8X2: CUarray_format_enum = CUarray_format_enum(199);
924}
925impl CUarray_format_enum {
926 #[doc = "< 4 channel signed 8-bit normalized integer"]
927 pub const CU_AD_FORMAT_SNORM_INT8X4: CUarray_format_enum = CUarray_format_enum(200);
928}
929impl CUarray_format_enum {
930 #[doc = "< 1 channel signed 16-bit normalized integer"]
931 pub const CU_AD_FORMAT_SNORM_INT16X1: CUarray_format_enum = CUarray_format_enum(201);
932}
933impl CUarray_format_enum {
934 #[doc = "< 2 channel signed 16-bit normalized integer"]
935 pub const CU_AD_FORMAT_SNORM_INT16X2: CUarray_format_enum = CUarray_format_enum(202);
936}
937impl CUarray_format_enum {
938 #[doc = "< 4 channel signed 16-bit normalized integer"]
939 pub const CU_AD_FORMAT_SNORM_INT16X4: CUarray_format_enum = CUarray_format_enum(203);
940}
941impl CUarray_format_enum {
942 #[doc = "< 4 channel unsigned normalized block-compressed (BC1 compression) format"]
943 pub const CU_AD_FORMAT_BC1_UNORM: CUarray_format_enum = CUarray_format_enum(145);
944}
945impl CUarray_format_enum {
946 #[doc = "< 4 channel unsigned normalized block-compressed (BC1 compression) format with sRGB encoding"]
947 pub const CU_AD_FORMAT_BC1_UNORM_SRGB: CUarray_format_enum = CUarray_format_enum(146);
948}
949impl CUarray_format_enum {
950 #[doc = "< 4 channel unsigned normalized block-compressed (BC2 compression) format"]
951 pub const CU_AD_FORMAT_BC2_UNORM: CUarray_format_enum = CUarray_format_enum(147);
952}
953impl CUarray_format_enum {
954 #[doc = "< 4 channel unsigned normalized block-compressed (BC2 compression) format with sRGB encoding"]
955 pub const CU_AD_FORMAT_BC2_UNORM_SRGB: CUarray_format_enum = CUarray_format_enum(148);
956}
957impl CUarray_format_enum {
958 #[doc = "< 4 channel unsigned normalized block-compressed (BC3 compression) format"]
959 pub const CU_AD_FORMAT_BC3_UNORM: CUarray_format_enum = CUarray_format_enum(149);
960}
961impl CUarray_format_enum {
962 #[doc = "< 4 channel unsigned normalized block-compressed (BC3 compression) format with sRGB encoding"]
963 pub const CU_AD_FORMAT_BC3_UNORM_SRGB: CUarray_format_enum = CUarray_format_enum(150);
964}
965impl CUarray_format_enum {
966 #[doc = "< 1 channel unsigned normalized block-compressed (BC4 compression) format"]
967 pub const CU_AD_FORMAT_BC4_UNORM: CUarray_format_enum = CUarray_format_enum(151);
968}
969impl CUarray_format_enum {
970 #[doc = "< 1 channel signed normalized block-compressed (BC4 compression) format"]
971 pub const CU_AD_FORMAT_BC4_SNORM: CUarray_format_enum = CUarray_format_enum(152);
972}
973impl CUarray_format_enum {
974 #[doc = "< 2 channel unsigned normalized block-compressed (BC5 compression) format"]
975 pub const CU_AD_FORMAT_BC5_UNORM: CUarray_format_enum = CUarray_format_enum(153);
976}
977impl CUarray_format_enum {
978 #[doc = "< 2 channel signed normalized block-compressed (BC5 compression) format"]
979 pub const CU_AD_FORMAT_BC5_SNORM: CUarray_format_enum = CUarray_format_enum(154);
980}
981impl CUarray_format_enum {
982 #[doc = "< 3 channel unsigned half-float block-compressed (BC6H compression) format"]
983 pub const CU_AD_FORMAT_BC6H_UF16: CUarray_format_enum = CUarray_format_enum(155);
984}
985impl CUarray_format_enum {
986 #[doc = "< 3 channel signed half-float block-compressed (BC6H compression) format"]
987 pub const CU_AD_FORMAT_BC6H_SF16: CUarray_format_enum = CUarray_format_enum(156);
988}
989impl CUarray_format_enum {
990 #[doc = "< 4 channel unsigned normalized block-compressed (BC7 compression) format"]
991 pub const CU_AD_FORMAT_BC7_UNORM: CUarray_format_enum = CUarray_format_enum(157);
992}
993impl CUarray_format_enum {
994 #[doc = "< 4 channel unsigned normalized block-compressed (BC7 compression) format with sRGB encoding"]
995 pub const CU_AD_FORMAT_BC7_UNORM_SRGB: CUarray_format_enum = CUarray_format_enum(158);
996}
997impl CUarray_format_enum {
998 #[doc = "< 10-bit YUV planar format, with 4:2:0 sampling"]
999 pub const CU_AD_FORMAT_P010: CUarray_format_enum = CUarray_format_enum(159);
1000}
1001impl CUarray_format_enum {
1002 #[doc = "< 16-bit YUV planar format, with 4:2:0 sampling"]
1003 pub const CU_AD_FORMAT_P016: CUarray_format_enum = CUarray_format_enum(161);
1004}
1005impl CUarray_format_enum {
1006 #[doc = "< 8-bit YUV planar format, with 4:2:2 sampling"]
1007 pub const CU_AD_FORMAT_NV16: CUarray_format_enum = CUarray_format_enum(162);
1008}
1009impl CUarray_format_enum {
1010 #[doc = "< 10-bit YUV planar format, with 4:2:2 sampling"]
1011 pub const CU_AD_FORMAT_P210: CUarray_format_enum = CUarray_format_enum(163);
1012}
1013impl CUarray_format_enum {
1014 #[doc = "< 16-bit YUV planar format, with 4:2:2 sampling"]
1015 pub const CU_AD_FORMAT_P216: CUarray_format_enum = CUarray_format_enum(164);
1016}
1017impl CUarray_format_enum {
1018 #[doc = "< 2 channel, 8-bit YUV packed planar format, with 4:2:2 sampling"]
1019 pub const CU_AD_FORMAT_YUY2: CUarray_format_enum = CUarray_format_enum(165);
1020}
1021impl CUarray_format_enum {
1022 #[doc = "< 2 channel, 10-bit YUV packed planar format, with 4:2:2 sampling"]
1023 pub const CU_AD_FORMAT_Y210: CUarray_format_enum = CUarray_format_enum(166);
1024}
1025impl CUarray_format_enum {
1026 #[doc = "< 2 channel, 16-bit YUV packed planar format, with 4:2:2 sampling"]
1027 pub const CU_AD_FORMAT_Y216: CUarray_format_enum = CUarray_format_enum(167);
1028}
1029impl CUarray_format_enum {
1030 #[doc = "< 4 channel, 8-bit YUV packed planar format, with 4:4:4 sampling"]
1031 pub const CU_AD_FORMAT_AYUV: CUarray_format_enum = CUarray_format_enum(168);
1032}
1033impl CUarray_format_enum {
1034 #[doc = "< 10-bit YUV packed planar format, with 4:4:4 sampling"]
1035 pub const CU_AD_FORMAT_Y410: CUarray_format_enum = CUarray_format_enum(169);
1036}
1037impl CUarray_format_enum {
1038 #[doc = "< 4 channel, 12-bit YUV packed planar format, with 4:4:4 sampling"]
1039 pub const CU_AD_FORMAT_Y416: CUarray_format_enum = CUarray_format_enum(177);
1040}
1041impl CUarray_format_enum {
1042 #[doc = "< 3 channel 8-bit YUV planar format, with 4:4:4 sampling"]
1043 pub const CU_AD_FORMAT_Y444_PLANAR8: CUarray_format_enum = CUarray_format_enum(178);
1044}
1045impl CUarray_format_enum {
1046 #[doc = "< 3 channel 10-bit YUV planar format, with 4:4:4 sampling"]
1047 pub const CU_AD_FORMAT_Y444_PLANAR10: CUarray_format_enum = CUarray_format_enum(179);
1048}
1049impl CUarray_format_enum {
1050 pub const CU_AD_FORMAT_MAX: CUarray_format_enum = CUarray_format_enum(2147483647);
1051}
1052#[repr(transparent)]
1053#[doc = " Array formats"]
1054#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1055pub struct CUarray_format_enum(pub ::std::os::raw::c_uint);
1056#[doc = " Array formats"]
1057pub use self::CUarray_format_enum as CUarray_format;
1058impl CUaddress_mode_enum {
1059 #[doc = "< Wrapping address mode"]
1060 pub const CU_TR_ADDRESS_MODE_WRAP: CUaddress_mode_enum = CUaddress_mode_enum(0);
1061}
1062impl CUaddress_mode_enum {
1063 #[doc = "< Clamp to edge address mode"]
1064 pub const CU_TR_ADDRESS_MODE_CLAMP: CUaddress_mode_enum = CUaddress_mode_enum(1);
1065}
1066impl CUaddress_mode_enum {
1067 #[doc = "< Mirror address mode"]
1068 pub const CU_TR_ADDRESS_MODE_MIRROR: CUaddress_mode_enum = CUaddress_mode_enum(2);
1069}
1070impl CUaddress_mode_enum {
1071 #[doc = "< Border address mode"]
1072 pub const CU_TR_ADDRESS_MODE_BORDER: CUaddress_mode_enum = CUaddress_mode_enum(3);
1073}
1074#[repr(transparent)]
1075#[doc = " Texture reference addressing modes"]
1076#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1077pub struct CUaddress_mode_enum(pub ::std::os::raw::c_uint);
1078#[doc = " Texture reference addressing modes"]
1079pub use self::CUaddress_mode_enum as CUaddress_mode;
1080impl CUfilter_mode_enum {
1081 #[doc = "< Point filter mode"]
1082 pub const CU_TR_FILTER_MODE_POINT: CUfilter_mode_enum = CUfilter_mode_enum(0);
1083}
1084impl CUfilter_mode_enum {
1085 #[doc = "< Linear filter mode"]
1086 pub const CU_TR_FILTER_MODE_LINEAR: CUfilter_mode_enum = CUfilter_mode_enum(1);
1087}
1088#[repr(transparent)]
1089#[doc = " Texture reference filtering modes"]
1090#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1091pub struct CUfilter_mode_enum(pub ::std::os::raw::c_uint);
1092#[doc = " Texture reference filtering modes"]
1093pub use self::CUfilter_mode_enum as CUfilter_mode;
1094impl CUdevice_attribute_enum {
1095 #[doc = "< Maximum number of threads per block"]
1096 pub const CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK: CUdevice_attribute_enum =
1097 CUdevice_attribute_enum(1);
1098}
1099impl CUdevice_attribute_enum {
1100 #[doc = "< Maximum block dimension X"]
1101 pub const CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X: CUdevice_attribute_enum =
1102 CUdevice_attribute_enum(2);
1103}
1104impl CUdevice_attribute_enum {
1105 #[doc = "< Maximum block dimension Y"]
1106 pub const CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y: CUdevice_attribute_enum =
1107 CUdevice_attribute_enum(3);
1108}
1109impl CUdevice_attribute_enum {
1110 #[doc = "< Maximum block dimension Z"]
1111 pub const CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z: CUdevice_attribute_enum =
1112 CUdevice_attribute_enum(4);
1113}
1114impl CUdevice_attribute_enum {
1115 #[doc = "< Maximum grid dimension X"]
1116 pub const CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X: CUdevice_attribute_enum =
1117 CUdevice_attribute_enum(5);
1118}
1119impl CUdevice_attribute_enum {
1120 #[doc = "< Maximum grid dimension Y"]
1121 pub const CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y: CUdevice_attribute_enum =
1122 CUdevice_attribute_enum(6);
1123}
1124impl CUdevice_attribute_enum {
1125 #[doc = "< Maximum grid dimension Z"]
1126 pub const CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z: CUdevice_attribute_enum =
1127 CUdevice_attribute_enum(7);
1128}
1129impl CUdevice_attribute_enum {
1130 #[doc = "< Maximum shared memory available per block in bytes"]
1131 pub const CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK: CUdevice_attribute_enum =
1132 CUdevice_attribute_enum(8);
1133}
1134impl CUdevice_attribute_enum {
1135 #[doc = "< Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK"]
1136 pub const CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK: CUdevice_attribute_enum =
1137 CUdevice_attribute_enum(8);
1138}
1139impl CUdevice_attribute_enum {
1140 #[doc = "< Memory available on device for __constant__ variables in a CUDA C kernel in bytes"]
1141 pub const CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY: CUdevice_attribute_enum =
1142 CUdevice_attribute_enum(9);
1143}
1144impl CUdevice_attribute_enum {
1145 #[doc = "< Warp size in threads"]
1146 pub const CU_DEVICE_ATTRIBUTE_WARP_SIZE: CUdevice_attribute_enum = CUdevice_attribute_enum(10);
1147}
1148impl CUdevice_attribute_enum {
1149 #[doc = "< Maximum pitch in bytes allowed by memory copies"]
1150 pub const CU_DEVICE_ATTRIBUTE_MAX_PITCH: CUdevice_attribute_enum = CUdevice_attribute_enum(11);
1151}
1152impl CUdevice_attribute_enum {
1153 #[doc = "< Maximum number of 32-bit registers available per block"]
1154 pub const CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK: CUdevice_attribute_enum =
1155 CUdevice_attribute_enum(12);
1156}
1157impl CUdevice_attribute_enum {
1158 #[doc = "< Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK"]
1159 pub const CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK: CUdevice_attribute_enum =
1160 CUdevice_attribute_enum(12);
1161}
1162impl CUdevice_attribute_enum {
1163 #[doc = "< Typical clock frequency in kilohertz"]
1164 pub const CU_DEVICE_ATTRIBUTE_CLOCK_RATE: CUdevice_attribute_enum = CUdevice_attribute_enum(13);
1165}
1166impl CUdevice_attribute_enum {
1167 #[doc = "< Alignment requirement for textures"]
1168 pub const CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT: CUdevice_attribute_enum =
1169 CUdevice_attribute_enum(14);
1170}
1171impl CUdevice_attribute_enum {
1172 #[doc = "< Device can possibly copy memory and execute a kernel concurrently. Deprecated. Use instead CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT."]
1173 pub const CU_DEVICE_ATTRIBUTE_GPU_OVERLAP: CUdevice_attribute_enum =
1174 CUdevice_attribute_enum(15);
1175}
1176impl CUdevice_attribute_enum {
1177 #[doc = "< Number of multiprocessors on device"]
1178 pub const CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT: CUdevice_attribute_enum =
1179 CUdevice_attribute_enum(16);
1180}
1181impl CUdevice_attribute_enum {
1182 #[doc = "< Specifies whether there is a run time limit on kernels"]
1183 pub const CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT: CUdevice_attribute_enum =
1184 CUdevice_attribute_enum(17);
1185}
1186impl CUdevice_attribute_enum {
1187 #[doc = "< Device is integrated with host memory"]
1188 pub const CU_DEVICE_ATTRIBUTE_INTEGRATED: CUdevice_attribute_enum = CUdevice_attribute_enum(18);
1189}
1190impl CUdevice_attribute_enum {
1191 #[doc = "< Device can map host memory into CUDA address space"]
1192 pub const CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY: CUdevice_attribute_enum =
1193 CUdevice_attribute_enum(19);
1194}
1195impl CUdevice_attribute_enum {
1196 #[doc = "< Compute mode (See ::CUcomputemode for details)"]
1197 pub const CU_DEVICE_ATTRIBUTE_COMPUTE_MODE: CUdevice_attribute_enum =
1198 CUdevice_attribute_enum(20);
1199}
1200impl CUdevice_attribute_enum {
1201 #[doc = "< Maximum 1D texture width"]
1202 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH: CUdevice_attribute_enum =
1203 CUdevice_attribute_enum(21);
1204}
1205impl CUdevice_attribute_enum {
1206 #[doc = "< Maximum 2D texture width"]
1207 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH: CUdevice_attribute_enum =
1208 CUdevice_attribute_enum(22);
1209}
1210impl CUdevice_attribute_enum {
1211 #[doc = "< Maximum 2D texture height"]
1212 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT: CUdevice_attribute_enum =
1213 CUdevice_attribute_enum(23);
1214}
1215impl CUdevice_attribute_enum {
1216 #[doc = "< Maximum 3D texture width"]
1217 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH: CUdevice_attribute_enum =
1218 CUdevice_attribute_enum(24);
1219}
1220impl CUdevice_attribute_enum {
1221 #[doc = "< Maximum 3D texture height"]
1222 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT: CUdevice_attribute_enum =
1223 CUdevice_attribute_enum(25);
1224}
1225impl CUdevice_attribute_enum {
1226 #[doc = "< Maximum 3D texture depth"]
1227 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH: CUdevice_attribute_enum =
1228 CUdevice_attribute_enum(26);
1229}
1230impl CUdevice_attribute_enum {
1231 #[doc = "< Maximum 2D layered texture width"]
1232 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH: CUdevice_attribute_enum =
1233 CUdevice_attribute_enum(27);
1234}
1235impl CUdevice_attribute_enum {
1236 #[doc = "< Maximum 2D layered texture height"]
1237 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT: CUdevice_attribute_enum =
1238 CUdevice_attribute_enum(28);
1239}
1240impl CUdevice_attribute_enum {
1241 #[doc = "< Maximum layers in a 2D layered texture"]
1242 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS: CUdevice_attribute_enum =
1243 CUdevice_attribute_enum(29);
1244}
1245impl CUdevice_attribute_enum {
1246 #[doc = "< Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH"]
1247 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH: CUdevice_attribute_enum =
1248 CUdevice_attribute_enum(27);
1249}
1250impl CUdevice_attribute_enum {
1251 #[doc = "< Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT"]
1252 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT: CUdevice_attribute_enum =
1253 CUdevice_attribute_enum(28);
1254}
1255impl CUdevice_attribute_enum {
1256 #[doc = "< Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS"]
1257 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES: CUdevice_attribute_enum =
1258 CUdevice_attribute_enum(29);
1259}
1260impl CUdevice_attribute_enum {
1261 #[doc = "< Alignment requirement for surfaces"]
1262 pub const CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT: CUdevice_attribute_enum =
1263 CUdevice_attribute_enum(30);
1264}
1265impl CUdevice_attribute_enum {
1266 #[doc = "< Device can possibly execute multiple kernels concurrently"]
1267 pub const CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS: CUdevice_attribute_enum =
1268 CUdevice_attribute_enum(31);
1269}
1270impl CUdevice_attribute_enum {
1271 #[doc = "< Device has ECC support enabled"]
1272 pub const CU_DEVICE_ATTRIBUTE_ECC_ENABLED: CUdevice_attribute_enum =
1273 CUdevice_attribute_enum(32);
1274}
1275impl CUdevice_attribute_enum {
1276 #[doc = "< PCI bus ID of the device"]
1277 pub const CU_DEVICE_ATTRIBUTE_PCI_BUS_ID: CUdevice_attribute_enum = CUdevice_attribute_enum(33);
1278}
1279impl CUdevice_attribute_enum {
1280 #[doc = "< PCI device ID of the device"]
1281 pub const CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID: CUdevice_attribute_enum =
1282 CUdevice_attribute_enum(34);
1283}
1284impl CUdevice_attribute_enum {
1285 #[doc = "< Device is using TCC driver model"]
1286 pub const CU_DEVICE_ATTRIBUTE_TCC_DRIVER: CUdevice_attribute_enum = CUdevice_attribute_enum(35);
1287}
1288impl CUdevice_attribute_enum {
1289 #[doc = "< Peak memory clock frequency in kilohertz"]
1290 pub const CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE: CUdevice_attribute_enum =
1291 CUdevice_attribute_enum(36);
1292}
1293impl CUdevice_attribute_enum {
1294 #[doc = "< Global memory bus width in bits"]
1295 pub const CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH: CUdevice_attribute_enum =
1296 CUdevice_attribute_enum(37);
1297}
1298impl CUdevice_attribute_enum {
1299 #[doc = "< Size of L2 cache in bytes"]
1300 pub const CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE: CUdevice_attribute_enum =
1301 CUdevice_attribute_enum(38);
1302}
1303impl CUdevice_attribute_enum {
1304 #[doc = "< Maximum resident threads per multiprocessor"]
1305 pub const CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR: CUdevice_attribute_enum =
1306 CUdevice_attribute_enum(39);
1307}
1308impl CUdevice_attribute_enum {
1309 #[doc = "< Number of asynchronous engines"]
1310 pub const CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT: CUdevice_attribute_enum =
1311 CUdevice_attribute_enum(40);
1312}
1313impl CUdevice_attribute_enum {
1314 #[doc = "< Device shares a unified address space with the host"]
1315 pub const CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING: CUdevice_attribute_enum =
1316 CUdevice_attribute_enum(41);
1317}
1318impl CUdevice_attribute_enum {
1319 #[doc = "< Maximum 1D layered texture width"]
1320 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH: CUdevice_attribute_enum =
1321 CUdevice_attribute_enum(42);
1322}
1323impl CUdevice_attribute_enum {
1324 #[doc = "< Maximum layers in a 1D layered texture"]
1325 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS: CUdevice_attribute_enum =
1326 CUdevice_attribute_enum(43);
1327}
1328impl CUdevice_attribute_enum {
1329 #[doc = "< Deprecated, do not use."]
1330 pub const CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER: CUdevice_attribute_enum =
1331 CUdevice_attribute_enum(44);
1332}
1333impl CUdevice_attribute_enum {
1334 #[doc = "< Maximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set"]
1335 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH: CUdevice_attribute_enum =
1336 CUdevice_attribute_enum(45);
1337}
1338impl CUdevice_attribute_enum {
1339 #[doc = "< Maximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set"]
1340 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT: CUdevice_attribute_enum =
1341 CUdevice_attribute_enum(46);
1342}
1343impl CUdevice_attribute_enum {
1344 #[doc = "< Alternate maximum 3D texture width"]
1345 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE: CUdevice_attribute_enum =
1346 CUdevice_attribute_enum(47);
1347}
1348impl CUdevice_attribute_enum {
1349 #[doc = "< Alternate maximum 3D texture height"]
1350 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE: CUdevice_attribute_enum =
1351 CUdevice_attribute_enum(48);
1352}
1353impl CUdevice_attribute_enum {
1354 #[doc = "< Alternate maximum 3D texture depth"]
1355 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE: CUdevice_attribute_enum =
1356 CUdevice_attribute_enum(49);
1357}
1358impl CUdevice_attribute_enum {
1359 #[doc = "< PCI domain ID of the device"]
1360 pub const CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID: CUdevice_attribute_enum =
1361 CUdevice_attribute_enum(50);
1362}
1363impl CUdevice_attribute_enum {
1364 #[doc = "< Pitch alignment requirement for textures"]
1365 pub const CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT: CUdevice_attribute_enum =
1366 CUdevice_attribute_enum(51);
1367}
1368impl CUdevice_attribute_enum {
1369 #[doc = "< Maximum cubemap texture width/height"]
1370 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH: CUdevice_attribute_enum =
1371 CUdevice_attribute_enum(52);
1372}
1373impl CUdevice_attribute_enum {
1374 #[doc = "< Maximum cubemap layered texture width/height"]
1375 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH: CUdevice_attribute_enum =
1376 CUdevice_attribute_enum(53);
1377}
1378impl CUdevice_attribute_enum {
1379 #[doc = "< Maximum layers in a cubemap layered texture"]
1380 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS: CUdevice_attribute_enum =
1381 CUdevice_attribute_enum(54);
1382}
1383impl CUdevice_attribute_enum {
1384 #[doc = "< Maximum 1D surface width"]
1385 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH: CUdevice_attribute_enum =
1386 CUdevice_attribute_enum(55);
1387}
1388impl CUdevice_attribute_enum {
1389 #[doc = "< Maximum 2D surface width"]
1390 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH: CUdevice_attribute_enum =
1391 CUdevice_attribute_enum(56);
1392}
1393impl CUdevice_attribute_enum {
1394 #[doc = "< Maximum 2D surface height"]
1395 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT: CUdevice_attribute_enum =
1396 CUdevice_attribute_enum(57);
1397}
1398impl CUdevice_attribute_enum {
1399 #[doc = "< Maximum 3D surface width"]
1400 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH: CUdevice_attribute_enum =
1401 CUdevice_attribute_enum(58);
1402}
1403impl CUdevice_attribute_enum {
1404 #[doc = "< Maximum 3D surface height"]
1405 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT: CUdevice_attribute_enum =
1406 CUdevice_attribute_enum(59);
1407}
1408impl CUdevice_attribute_enum {
1409 #[doc = "< Maximum 3D surface depth"]
1410 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH: CUdevice_attribute_enum =
1411 CUdevice_attribute_enum(60);
1412}
1413impl CUdevice_attribute_enum {
1414 #[doc = "< Maximum 1D layered surface width"]
1415 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH: CUdevice_attribute_enum =
1416 CUdevice_attribute_enum(61);
1417}
1418impl CUdevice_attribute_enum {
1419 #[doc = "< Maximum layers in a 1D layered surface"]
1420 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS: CUdevice_attribute_enum =
1421 CUdevice_attribute_enum(62);
1422}
1423impl CUdevice_attribute_enum {
1424 #[doc = "< Maximum 2D layered surface width"]
1425 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH: CUdevice_attribute_enum =
1426 CUdevice_attribute_enum(63);
1427}
1428impl CUdevice_attribute_enum {
1429 #[doc = "< Maximum 2D layered surface height"]
1430 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT: CUdevice_attribute_enum =
1431 CUdevice_attribute_enum(64);
1432}
1433impl CUdevice_attribute_enum {
1434 #[doc = "< Maximum layers in a 2D layered surface"]
1435 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS: CUdevice_attribute_enum =
1436 CUdevice_attribute_enum(65);
1437}
1438impl CUdevice_attribute_enum {
1439 #[doc = "< Maximum cubemap surface width"]
1440 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH: CUdevice_attribute_enum =
1441 CUdevice_attribute_enum(66);
1442}
1443impl CUdevice_attribute_enum {
1444 #[doc = "< Maximum cubemap layered surface width"]
1445 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH: CUdevice_attribute_enum =
1446 CUdevice_attribute_enum(67);
1447}
1448impl CUdevice_attribute_enum {
1449 #[doc = "< Maximum layers in a cubemap layered surface"]
1450 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS: CUdevice_attribute_enum =
1451 CUdevice_attribute_enum(68);
1452}
1453impl CUdevice_attribute_enum {
1454 #[doc = "< Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() or cuDeviceGetTexture1DLinearMaxWidth() instead."]
1455 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH: CUdevice_attribute_enum =
1456 CUdevice_attribute_enum(69);
1457}
1458impl CUdevice_attribute_enum {
1459 #[doc = "< Maximum 2D linear texture width"]
1460 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH: CUdevice_attribute_enum =
1461 CUdevice_attribute_enum(70);
1462}
1463impl CUdevice_attribute_enum {
1464 #[doc = "< Maximum 2D linear texture height"]
1465 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT: CUdevice_attribute_enum =
1466 CUdevice_attribute_enum(71);
1467}
1468impl CUdevice_attribute_enum {
1469 #[doc = "< Maximum 2D linear texture pitch in bytes"]
1470 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH: CUdevice_attribute_enum =
1471 CUdevice_attribute_enum(72);
1472}
1473impl CUdevice_attribute_enum {
1474 #[doc = "< Maximum mipmapped 2D texture width"]
1475 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH: CUdevice_attribute_enum =
1476 CUdevice_attribute_enum(73);
1477}
1478impl CUdevice_attribute_enum {
1479 #[doc = "< Maximum mipmapped 2D texture height"]
1480 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT: CUdevice_attribute_enum =
1481 CUdevice_attribute_enum(74);
1482}
1483impl CUdevice_attribute_enum {
1484 #[doc = "< Major compute capability version number"]
1485 pub const CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR: CUdevice_attribute_enum =
1486 CUdevice_attribute_enum(75);
1487}
1488impl CUdevice_attribute_enum {
1489 #[doc = "< Minor compute capability version number"]
1490 pub const CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR: CUdevice_attribute_enum =
1491 CUdevice_attribute_enum(76);
1492}
1493impl CUdevice_attribute_enum {
1494 #[doc = "< Maximum mipmapped 1D texture width"]
1495 pub const CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH: CUdevice_attribute_enum =
1496 CUdevice_attribute_enum(77);
1497}
1498impl CUdevice_attribute_enum {
1499 #[doc = "< Device supports stream priorities"]
1500 pub const CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED: CUdevice_attribute_enum =
1501 CUdevice_attribute_enum(78);
1502}
1503impl CUdevice_attribute_enum {
1504 #[doc = "< Device supports caching globals in L1"]
1505 pub const CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED: CUdevice_attribute_enum =
1506 CUdevice_attribute_enum(79);
1507}
1508impl CUdevice_attribute_enum {
1509 #[doc = "< Device supports caching locals in L1"]
1510 pub const CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED: CUdevice_attribute_enum =
1511 CUdevice_attribute_enum(80);
1512}
1513impl CUdevice_attribute_enum {
1514 #[doc = "< Maximum shared memory available per multiprocessor in bytes"]
1515 pub const CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR: CUdevice_attribute_enum =
1516 CUdevice_attribute_enum(81);
1517}
1518impl CUdevice_attribute_enum {
1519 #[doc = "< Maximum number of 32-bit registers available per multiprocessor"]
1520 pub const CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR: CUdevice_attribute_enum =
1521 CUdevice_attribute_enum(82);
1522}
1523impl CUdevice_attribute_enum {
1524 #[doc = "< Device can allocate managed memory on this system"]
1525 pub const CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY: CUdevice_attribute_enum =
1526 CUdevice_attribute_enum(83);
1527}
1528impl CUdevice_attribute_enum {
1529 #[doc = "< Device is on a multi-GPU board"]
1530 pub const CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD: CUdevice_attribute_enum =
1531 CUdevice_attribute_enum(84);
1532}
1533impl CUdevice_attribute_enum {
1534 #[doc = "< Unique id for a group of devices on the same multi-GPU board"]
1535 pub const CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID: CUdevice_attribute_enum =
1536 CUdevice_attribute_enum(85);
1537}
1538impl CUdevice_attribute_enum {
1539 #[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)"]
1540 pub const CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED: CUdevice_attribute_enum =
1541 CUdevice_attribute_enum(86);
1542}
1543impl CUdevice_attribute_enum {
1544 #[doc = "< Ratio of single precision performance (in floating-point operations per second) to double precision performance"]
1545 pub const CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO: CUdevice_attribute_enum =
1546 CUdevice_attribute_enum(87);
1547}
1548impl CUdevice_attribute_enum {
1549 #[doc = "< Device supports coherently accessing pageable memory without calling cudaHostRegister on it"]
1550 pub const CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS: CUdevice_attribute_enum =
1551 CUdevice_attribute_enum(88);
1552}
1553impl CUdevice_attribute_enum {
1554 #[doc = "< Device can coherently access managed memory concurrently with the CPU"]
1555 pub const CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS: CUdevice_attribute_enum =
1556 CUdevice_attribute_enum(89);
1557}
1558impl CUdevice_attribute_enum {
1559 #[doc = "< Device supports compute preemption."]
1560 pub const CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED: CUdevice_attribute_enum =
1561 CUdevice_attribute_enum(90);
1562}
1563impl CUdevice_attribute_enum {
1564 #[doc = "< Device can access host registered memory at the same virtual address as the CPU"]
1565 pub const CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM: CUdevice_attribute_enum =
1566 CUdevice_attribute_enum(91);
1567}
1568impl CUdevice_attribute_enum {
1569 #[doc = "< Deprecated, along with v1 MemOps API, ::cuStreamBatchMemOp and related APIs are supported."]
1570 pub const CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1: CUdevice_attribute_enum =
1571 CUdevice_attribute_enum(92);
1572}
1573impl CUdevice_attribute_enum {
1574 #[doc = "< Deprecated, along with v1 MemOps API, 64-bit operations are supported in ::cuStreamBatchMemOp and related APIs."]
1575 pub const CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1: CUdevice_attribute_enum =
1576 CUdevice_attribute_enum(93);
1577}
1578impl CUdevice_attribute_enum {
1579 #[doc = "< Deprecated, along with v1 MemOps API, ::CU_STREAM_WAIT_VALUE_NOR is supported."]
1580 pub const CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1: CUdevice_attribute_enum =
1581 CUdevice_attribute_enum(94);
1582}
1583impl CUdevice_attribute_enum {
1584 #[doc = "< Device supports launching cooperative kernels via ::cuLaunchCooperativeKernel"]
1585 pub const CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH: CUdevice_attribute_enum =
1586 CUdevice_attribute_enum(95);
1587}
1588impl CUdevice_attribute_enum {
1589 #[doc = "< Deprecated, ::cuLaunchCooperativeKernelMultiDevice is deprecated."]
1590 pub const CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH: CUdevice_attribute_enum =
1591 CUdevice_attribute_enum(96);
1592}
1593impl CUdevice_attribute_enum {
1594 #[doc = "< Maximum optin shared memory per block"]
1595 pub const CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN: CUdevice_attribute_enum =
1596 CUdevice_attribute_enum(97);
1597}
1598impl CUdevice_attribute_enum {
1599 #[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."]
1600 pub const CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES: CUdevice_attribute_enum =
1601 CUdevice_attribute_enum(98);
1602}
1603impl CUdevice_attribute_enum {
1604 #[doc = "< Device supports host memory registration via ::cudaHostRegister."]
1605 pub const CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED: CUdevice_attribute_enum =
1606 CUdevice_attribute_enum(99);
1607}
1608impl CUdevice_attribute_enum {
1609 #[doc = "< Device accesses pageable memory via the host's page tables."]
1610 pub const CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES:
1611 CUdevice_attribute_enum = CUdevice_attribute_enum(100);
1612}
1613impl CUdevice_attribute_enum {
1614 #[doc = "< The host can directly access managed memory on the device without migration."]
1615 pub const CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST: CUdevice_attribute_enum =
1616 CUdevice_attribute_enum(101);
1617}
1618impl CUdevice_attribute_enum {
1619 #[doc = "< Deprecated, Use CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED"]
1620 pub const CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED: CUdevice_attribute_enum =
1621 CUdevice_attribute_enum(102);
1622}
1623impl CUdevice_attribute_enum {
1624 #[doc = "< Device supports virtual memory management APIs like ::cuMemAddressReserve, ::cuMemCreate, ::cuMemMap and related APIs"]
1625 pub const CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED: CUdevice_attribute_enum =
1626 CUdevice_attribute_enum(102);
1627}
1628impl CUdevice_attribute_enum {
1629 #[doc = "< Device supports exporting memory to a posix file descriptor with ::cuMemExportToShareableHandle, if requested via ::cuMemCreate"]
1630 pub const CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED:
1631 CUdevice_attribute_enum = CUdevice_attribute_enum(103);
1632}
1633impl CUdevice_attribute_enum {
1634 #[doc = "< Device supports exporting memory to a Win32 NT handle with ::cuMemExportToShareableHandle, if requested via ::cuMemCreate"]
1635 pub const CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED: CUdevice_attribute_enum =
1636 CUdevice_attribute_enum(104);
1637}
1638impl CUdevice_attribute_enum {
1639 #[doc = "< Device supports exporting memory to a Win32 KMT handle with ::cuMemExportToShareableHandle, if requested via ::cuMemCreate"]
1640 pub const CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED: CUdevice_attribute_enum =
1641 CUdevice_attribute_enum(105);
1642}
1643impl CUdevice_attribute_enum {
1644 #[doc = "< Maximum number of blocks per multiprocessor"]
1645 pub const CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR: CUdevice_attribute_enum =
1646 CUdevice_attribute_enum(106);
1647}
1648impl CUdevice_attribute_enum {
1649 #[doc = "< Device supports compression of memory"]
1650 pub const CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED: CUdevice_attribute_enum =
1651 CUdevice_attribute_enum(107);
1652}
1653impl CUdevice_attribute_enum {
1654 #[doc = "< Maximum L2 persisting lines capacity setting in bytes."]
1655 pub const CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE: CUdevice_attribute_enum =
1656 CUdevice_attribute_enum(108);
1657}
1658impl CUdevice_attribute_enum {
1659 #[doc = "< Maximum value of CUaccessPolicyWindow::num_bytes."]
1660 pub const CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE: CUdevice_attribute_enum =
1661 CUdevice_attribute_enum(109);
1662}
1663impl CUdevice_attribute_enum {
1664 #[doc = "< Device supports specifying the GPUDirect RDMA flag with ::cuMemCreate"]
1665 pub const CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED: CUdevice_attribute_enum =
1666 CUdevice_attribute_enum(110);
1667}
1668impl CUdevice_attribute_enum {
1669 #[doc = "< Shared memory reserved by CUDA driver per block in bytes"]
1670 pub const CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK: CUdevice_attribute_enum =
1671 CUdevice_attribute_enum(111);
1672}
1673impl CUdevice_attribute_enum {
1674 #[doc = "< Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays"]
1675 pub const CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED: CUdevice_attribute_enum =
1676 CUdevice_attribute_enum(112);
1677}
1678impl CUdevice_attribute_enum {
1679 #[doc = "< Device supports using the ::cuMemHostRegister flag ::CU_MEMHOSTERGISTER_READ_ONLY to register memory that must be mapped as read-only to the GPU"]
1680 pub const CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED: CUdevice_attribute_enum =
1681 CUdevice_attribute_enum(113);
1682}
1683impl CUdevice_attribute_enum {
1684 #[doc = "< External timeline semaphore interop is supported on the device"]
1685 pub const CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED: CUdevice_attribute_enum =
1686 CUdevice_attribute_enum(114);
1687}
1688impl CUdevice_attribute_enum {
1689 #[doc = "< Device supports using the ::cuMemAllocAsync and ::cuMemPool family of APIs"]
1690 pub const CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED: CUdevice_attribute_enum =
1691 CUdevice_attribute_enum(115);
1692}
1693impl CUdevice_attribute_enum {
1694 #[doc = "< Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see https://docs.nvidia.com/cuda/gpudirect-rdma for more information)"]
1695 pub const CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED: CUdevice_attribute_enum =
1696 CUdevice_attribute_enum(116);
1697}
1698impl CUdevice_attribute_enum {
1699 #[doc = "< The returned attribute shall be interpreted as a bitmask, where the individual bits are described by the ::CUflushGPUDirectRDMAWritesOptions enum"]
1700 pub const CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS: CUdevice_attribute_enum =
1701 CUdevice_attribute_enum(117);
1702}
1703impl CUdevice_attribute_enum {
1704 #[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."]
1705 pub const CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING: CUdevice_attribute_enum =
1706 CUdevice_attribute_enum(118);
1707}
1708impl CUdevice_attribute_enum {
1709 #[doc = "< Handle types supported with mempool based IPC"]
1710 pub const CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES: CUdevice_attribute_enum =
1711 CUdevice_attribute_enum(119);
1712}
1713impl CUdevice_attribute_enum {
1714 #[doc = "< Indicates device supports cluster launch"]
1715 pub const CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH: CUdevice_attribute_enum =
1716 CUdevice_attribute_enum(120);
1717}
1718impl CUdevice_attribute_enum {
1719 #[doc = "< Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays"]
1720 pub const CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED: CUdevice_attribute_enum =
1721 CUdevice_attribute_enum(121);
1722}
1723impl CUdevice_attribute_enum {
1724 #[doc = "< 64-bit operations are supported in ::cuStreamBatchMemOp and related MemOp APIs."]
1725 pub const CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS: CUdevice_attribute_enum =
1726 CUdevice_attribute_enum(122);
1727}
1728impl CUdevice_attribute_enum {
1729 #[doc = "< ::CU_STREAM_WAIT_VALUE_NOR is supported by MemOp APIs."]
1730 pub const CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR: CUdevice_attribute_enum =
1731 CUdevice_attribute_enum(123);
1732}
1733impl CUdevice_attribute_enum {
1734 #[doc = "< Device supports buffer sharing with dma_buf mechanism."]
1735 pub const CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED: CUdevice_attribute_enum =
1736 CUdevice_attribute_enum(124);
1737}
1738impl CUdevice_attribute_enum {
1739 #[doc = "< Device supports IPC Events."]
1740 pub const CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED: CUdevice_attribute_enum =
1741 CUdevice_attribute_enum(125);
1742}
1743impl CUdevice_attribute_enum {
1744 #[doc = "< Number of memory domains the device supports."]
1745 pub const CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT: CUdevice_attribute_enum =
1746 CUdevice_attribute_enum(126);
1747}
1748impl CUdevice_attribute_enum {
1749 #[doc = "< Device supports accessing memory using Tensor Map."]
1750 pub const CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED: CUdevice_attribute_enum =
1751 CUdevice_attribute_enum(127);
1752}
1753impl CUdevice_attribute_enum {
1754 #[doc = "< Device supports exporting memory to a fabric handle with cuMemExportToShareableHandle() or requested with cuMemCreate()"]
1755 pub const CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED: CUdevice_attribute_enum =
1756 CUdevice_attribute_enum(128);
1757}
1758impl CUdevice_attribute_enum {
1759 #[doc = "< Device supports unified function pointers."]
1760 pub const CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS: CUdevice_attribute_enum =
1761 CUdevice_attribute_enum(129);
1762}
1763impl CUdevice_attribute_enum {
1764 #[doc = "< NUMA configuration of a device: value is of type ::CUdeviceNumaConfig enum"]
1765 pub const CU_DEVICE_ATTRIBUTE_NUMA_CONFIG: CUdevice_attribute_enum =
1766 CUdevice_attribute_enum(130);
1767}
1768impl CUdevice_attribute_enum {
1769 #[doc = "< NUMA node ID of the GPU memory"]
1770 pub const CU_DEVICE_ATTRIBUTE_NUMA_ID: CUdevice_attribute_enum = CUdevice_attribute_enum(131);
1771}
1772impl CUdevice_attribute_enum {
1773 #[doc = "< Device supports switch multicast and reduction operations."]
1774 pub const CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED: CUdevice_attribute_enum =
1775 CUdevice_attribute_enum(132);
1776}
1777impl CUdevice_attribute_enum {
1778 #[doc = "< Indicates if contexts created on this device will be shared via MPS"]
1779 pub const CU_DEVICE_ATTRIBUTE_MPS_ENABLED: CUdevice_attribute_enum =
1780 CUdevice_attribute_enum(133);
1781}
1782impl CUdevice_attribute_enum {
1783 #[doc = "< NUMA ID of the host node closest to the device. Returns -1 when system does not support NUMA."]
1784 pub const CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID: CUdevice_attribute_enum =
1785 CUdevice_attribute_enum(134);
1786}
1787impl CUdevice_attribute_enum {
1788 #[doc = "< Device supports CIG with D3D12."]
1789 pub const CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED: CUdevice_attribute_enum =
1790 CUdevice_attribute_enum(135);
1791}
1792impl CUdevice_attribute_enum {
1793 pub const CU_DEVICE_ATTRIBUTE_MAX: CUdevice_attribute_enum = CUdevice_attribute_enum(136);
1794}
1795#[repr(transparent)]
1796#[doc = " Device properties"]
1797#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1798pub struct CUdevice_attribute_enum(pub ::std::os::raw::c_uint);
1799#[doc = " Device properties"]
1800pub use self::CUdevice_attribute_enum as CUdevice_attribute;
1801#[doc = " Legacy device properties"]
1802#[repr(C)]
1803#[derive(Debug, Copy, Clone)]
1804pub struct CUdevprop_st {
1805 #[doc = "< Maximum number of threads per block"]
1806 pub maxThreadsPerBlock: ::std::os::raw::c_int,
1807 #[doc = "< Maximum size of each dimension of a block"]
1808 pub maxThreadsDim: [::std::os::raw::c_int; 3usize],
1809 #[doc = "< Maximum size of each dimension of a grid"]
1810 pub maxGridSize: [::std::os::raw::c_int; 3usize],
1811 #[doc = "< Shared memory available per block in bytes"]
1812 pub sharedMemPerBlock: ::std::os::raw::c_int,
1813 #[doc = "< Constant memory available on device in bytes"]
1814 pub totalConstantMemory: ::std::os::raw::c_int,
1815 #[doc = "< Warp size in threads"]
1816 pub SIMDWidth: ::std::os::raw::c_int,
1817 #[doc = "< Maximum pitch in bytes allowed by memory copies"]
1818 pub memPitch: ::std::os::raw::c_int,
1819 #[doc = "< 32-bit registers available per block"]
1820 pub regsPerBlock: ::std::os::raw::c_int,
1821 #[doc = "< Clock frequency in kilohertz"]
1822 pub clockRate: ::std::os::raw::c_int,
1823 #[doc = "< Alignment requirement for textures"]
1824 pub textureAlign: ::std::os::raw::c_int,
1825}
1826#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1827const _: () = {
1828 ["Size of CUdevprop_st"][::std::mem::size_of::<CUdevprop_st>() - 56usize];
1829 ["Alignment of CUdevprop_st"][::std::mem::align_of::<CUdevprop_st>() - 4usize];
1830 ["Offset of field: CUdevprop_st::maxThreadsPerBlock"]
1831 [::std::mem::offset_of!(CUdevprop_st, maxThreadsPerBlock) - 0usize];
1832 ["Offset of field: CUdevprop_st::maxThreadsDim"]
1833 [::std::mem::offset_of!(CUdevprop_st, maxThreadsDim) - 4usize];
1834 ["Offset of field: CUdevprop_st::maxGridSize"]
1835 [::std::mem::offset_of!(CUdevprop_st, maxGridSize) - 16usize];
1836 ["Offset of field: CUdevprop_st::sharedMemPerBlock"]
1837 [::std::mem::offset_of!(CUdevprop_st, sharedMemPerBlock) - 28usize];
1838 ["Offset of field: CUdevprop_st::totalConstantMemory"]
1839 [::std::mem::offset_of!(CUdevprop_st, totalConstantMemory) - 32usize];
1840 ["Offset of field: CUdevprop_st::SIMDWidth"]
1841 [::std::mem::offset_of!(CUdevprop_st, SIMDWidth) - 36usize];
1842 ["Offset of field: CUdevprop_st::memPitch"]
1843 [::std::mem::offset_of!(CUdevprop_st, memPitch) - 40usize];
1844 ["Offset of field: CUdevprop_st::regsPerBlock"]
1845 [::std::mem::offset_of!(CUdevprop_st, regsPerBlock) - 44usize];
1846 ["Offset of field: CUdevprop_st::clockRate"]
1847 [::std::mem::offset_of!(CUdevprop_st, clockRate) - 48usize];
1848 ["Offset of field: CUdevprop_st::textureAlign"]
1849 [::std::mem::offset_of!(CUdevprop_st, textureAlign) - 52usize];
1850};
1851#[doc = " Legacy device properties"]
1852pub type CUdevprop_v1 = CUdevprop_st;
1853#[doc = " Legacy device properties"]
1854pub type CUdevprop = CUdevprop_v1;
1855impl CUpointer_attribute_enum {
1856 #[doc = "< The ::CUcontext on which a pointer was allocated or registered"]
1857 pub const CU_POINTER_ATTRIBUTE_CONTEXT: CUpointer_attribute_enum = CUpointer_attribute_enum(1);
1858}
1859impl CUpointer_attribute_enum {
1860 #[doc = "< The ::CUmemorytype describing the physical location of a pointer"]
1861 pub const CU_POINTER_ATTRIBUTE_MEMORY_TYPE: CUpointer_attribute_enum =
1862 CUpointer_attribute_enum(2);
1863}
1864impl CUpointer_attribute_enum {
1865 #[doc = "< The address at which a pointer's memory may be accessed on the device"]
1866 pub const CU_POINTER_ATTRIBUTE_DEVICE_POINTER: CUpointer_attribute_enum =
1867 CUpointer_attribute_enum(3);
1868}
1869impl CUpointer_attribute_enum {
1870 #[doc = "< The address at which a pointer's memory may be accessed on the host"]
1871 pub const CU_POINTER_ATTRIBUTE_HOST_POINTER: CUpointer_attribute_enum =
1872 CUpointer_attribute_enum(4);
1873}
1874impl CUpointer_attribute_enum {
1875 #[doc = "< A pair of tokens for use with the nv-p2p.h Linux kernel interface"]
1876 pub const CU_POINTER_ATTRIBUTE_P2P_TOKENS: CUpointer_attribute_enum =
1877 CUpointer_attribute_enum(5);
1878}
1879impl CUpointer_attribute_enum {
1880 #[doc = "< Synchronize every synchronous memory operation initiated on this region"]
1881 pub const CU_POINTER_ATTRIBUTE_SYNC_MEMOPS: CUpointer_attribute_enum =
1882 CUpointer_attribute_enum(6);
1883}
1884impl CUpointer_attribute_enum {
1885 #[doc = "< A process-wide unique ID for an allocated memory region"]
1886 pub const CU_POINTER_ATTRIBUTE_BUFFER_ID: CUpointer_attribute_enum =
1887 CUpointer_attribute_enum(7);
1888}
1889impl CUpointer_attribute_enum {
1890 #[doc = "< Indicates if the pointer points to managed memory"]
1891 pub const CU_POINTER_ATTRIBUTE_IS_MANAGED: CUpointer_attribute_enum =
1892 CUpointer_attribute_enum(8);
1893}
1894impl CUpointer_attribute_enum {
1895 #[doc = "< A device ordinal of a device on which a pointer was allocated or registered"]
1896 pub const CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL: CUpointer_attribute_enum =
1897 CUpointer_attribute_enum(9);
1898}
1899impl CUpointer_attribute_enum {
1900 #[doc = "< 1 if this pointer maps to an allocation that is suitable for ::cudaIpcGetMemHandle, 0 otherwise"]
1901 pub const CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE: CUpointer_attribute_enum =
1902 CUpointer_attribute_enum(10);
1903}
1904impl CUpointer_attribute_enum {
1905 #[doc = "< Starting address for this requested pointer"]
1906 pub const CU_POINTER_ATTRIBUTE_RANGE_START_ADDR: CUpointer_attribute_enum =
1907 CUpointer_attribute_enum(11);
1908}
1909impl CUpointer_attribute_enum {
1910 #[doc = "< Size of the address range for this requested pointer"]
1911 pub const CU_POINTER_ATTRIBUTE_RANGE_SIZE: CUpointer_attribute_enum =
1912 CUpointer_attribute_enum(12);
1913}
1914impl CUpointer_attribute_enum {
1915 #[doc = "< 1 if this pointer is in a valid address range that is mapped to a backing allocation, 0 otherwise"]
1916 pub const CU_POINTER_ATTRIBUTE_MAPPED: CUpointer_attribute_enum = CUpointer_attribute_enum(13);
1917}
1918impl CUpointer_attribute_enum {
1919 #[doc = "< Bitmask of allowed ::CUmemAllocationHandleType for this allocation"]
1920 pub const CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES: CUpointer_attribute_enum =
1921 CUpointer_attribute_enum(14);
1922}
1923impl CUpointer_attribute_enum {
1924 #[doc = "< 1 if the memory this pointer is referencing can be used with the GPUDirect RDMA API"]
1925 pub const CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE: CUpointer_attribute_enum =
1926 CUpointer_attribute_enum(15);
1927}
1928impl CUpointer_attribute_enum {
1929 #[doc = "< Returns the access flags the device associated with the current context has on the corresponding memory referenced by the pointer given"]
1930 pub const CU_POINTER_ATTRIBUTE_ACCESS_FLAGS: CUpointer_attribute_enum =
1931 CUpointer_attribute_enum(16);
1932}
1933impl CUpointer_attribute_enum {
1934 #[doc = "< Returns the mempool handle for the allocation if it was allocated from a mempool. Otherwise returns NULL."]
1935 pub const CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE: CUpointer_attribute_enum =
1936 CUpointer_attribute_enum(17);
1937}
1938impl CUpointer_attribute_enum {
1939 #[doc = "< Size of the actual underlying mapping that the pointer belongs to"]
1940 pub const CU_POINTER_ATTRIBUTE_MAPPING_SIZE: CUpointer_attribute_enum =
1941 CUpointer_attribute_enum(18);
1942}
1943impl CUpointer_attribute_enum {
1944 #[doc = "< The start address of the mapping that the pointer belongs to"]
1945 pub const CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR: CUpointer_attribute_enum =
1946 CUpointer_attribute_enum(19);
1947}
1948impl CUpointer_attribute_enum {
1949 #[doc = "< A process-wide unique id corresponding to the physical allocation the pointer belongs to"]
1950 pub const CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID: CUpointer_attribute_enum =
1951 CUpointer_attribute_enum(20);
1952}
1953#[repr(transparent)]
1954#[doc = " Pointer information"]
1955#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
1956pub struct CUpointer_attribute_enum(pub ::std::os::raw::c_uint);
1957#[doc = " Pointer information"]
1958pub use self::CUpointer_attribute_enum as CUpointer_attribute;
1959impl CUfunction_attribute_enum {
1960 #[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."]
1961 pub const CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: CUfunction_attribute_enum =
1962 CUfunction_attribute_enum(0);
1963}
1964impl CUfunction_attribute_enum {
1965 #[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."]
1966 pub const CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: CUfunction_attribute_enum =
1967 CUfunction_attribute_enum(1);
1968}
1969impl CUfunction_attribute_enum {
1970 #[doc = " The size in bytes of user-allocated constant memory required by this\n function."]
1971 pub const CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: CUfunction_attribute_enum =
1972 CUfunction_attribute_enum(2);
1973}
1974impl CUfunction_attribute_enum {
1975 #[doc = " The size in bytes of local memory used by each thread of this function."]
1976 pub const CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: CUfunction_attribute_enum =
1977 CUfunction_attribute_enum(3);
1978}
1979impl CUfunction_attribute_enum {
1980 #[doc = " The number of registers used by each thread of this function."]
1981 pub const CU_FUNC_ATTRIBUTE_NUM_REGS: CUfunction_attribute_enum = CUfunction_attribute_enum(4);
1982}
1983impl CUfunction_attribute_enum {
1984 #[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."]
1985 pub const CU_FUNC_ATTRIBUTE_PTX_VERSION: CUfunction_attribute_enum =
1986 CUfunction_attribute_enum(5);
1987}
1988impl CUfunction_attribute_enum {
1989 #[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."]
1990 pub const CU_FUNC_ATTRIBUTE_BINARY_VERSION: CUfunction_attribute_enum =
1991 CUfunction_attribute_enum(6);
1992}
1993impl CUfunction_attribute_enum {
1994 #[doc = " The attribute to indicate whether the function has been compiled with\n user specified option \"-Xptxas --dlcm=ca\" set ."]
1995 pub const CU_FUNC_ATTRIBUTE_CACHE_MODE_CA: CUfunction_attribute_enum =
1996 CUfunction_attribute_enum(7);
1997}
1998impl CUfunction_attribute_enum {
1999 #[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"]
2000 pub const CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: CUfunction_attribute_enum =
2001 CUfunction_attribute_enum(8);
2002}
2003impl CUfunction_attribute_enum {
2004 #[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"]
2005 pub const CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: CUfunction_attribute_enum =
2006 CUfunction_attribute_enum(9);
2007}
2008impl CUfunction_attribute_enum {
2009 #[doc = " If this attribute is set, the kernel must launch with a valid cluster\n size specified.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
2010 pub const CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET: CUfunction_attribute_enum =
2011 CUfunction_attribute_enum(10);
2012}
2013impl CUfunction_attribute_enum {
2014 #[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"]
2015 pub const CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH: CUfunction_attribute_enum =
2016 CUfunction_attribute_enum(11);
2017}
2018impl CUfunction_attribute_enum {
2019 #[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"]
2020 pub const CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT: CUfunction_attribute_enum =
2021 CUfunction_attribute_enum(12);
2022}
2023impl CUfunction_attribute_enum {
2024 #[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"]
2025 pub const CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH: CUfunction_attribute_enum =
2026 CUfunction_attribute_enum(13);
2027}
2028impl CUfunction_attribute_enum {
2029 #[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"]
2030 pub const CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED: CUfunction_attribute_enum =
2031 CUfunction_attribute_enum(14);
2032}
2033impl CUfunction_attribute_enum {
2034 #[doc = " The block scheduling policy of a function. The value type is\n CUclusterSchedulingPolicy / cudaClusterSchedulingPolicy.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
2035 pub const CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE: CUfunction_attribute_enum =
2036 CUfunction_attribute_enum(15);
2037}
2038impl CUfunction_attribute_enum {
2039 #[doc = " The block scheduling policy of a function. The value type is\n CUclusterSchedulingPolicy / cudaClusterSchedulingPolicy.\n See ::cuFuncSetAttribute, ::cuKernelSetAttribute"]
2040 pub const CU_FUNC_ATTRIBUTE_MAX: CUfunction_attribute_enum = CUfunction_attribute_enum(16);
2041}
2042#[repr(transparent)]
2043#[doc = " Function properties"]
2044#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2045pub struct CUfunction_attribute_enum(pub ::std::os::raw::c_uint);
2046#[doc = " Function properties"]
2047pub use self::CUfunction_attribute_enum as CUfunction_attribute;
2048impl CUfunc_cache_enum {
2049 #[doc = "< no preference for shared memory or L1 (default)"]
2050 pub const CU_FUNC_CACHE_PREFER_NONE: CUfunc_cache_enum = CUfunc_cache_enum(0);
2051}
2052impl CUfunc_cache_enum {
2053 #[doc = "< prefer larger shared memory and smaller L1 cache"]
2054 pub const CU_FUNC_CACHE_PREFER_SHARED: CUfunc_cache_enum = CUfunc_cache_enum(1);
2055}
2056impl CUfunc_cache_enum {
2057 #[doc = "< prefer larger L1 cache and smaller shared memory"]
2058 pub const CU_FUNC_CACHE_PREFER_L1: CUfunc_cache_enum = CUfunc_cache_enum(2);
2059}
2060impl CUfunc_cache_enum {
2061 #[doc = "< prefer equal sized L1 cache and shared memory"]
2062 pub const CU_FUNC_CACHE_PREFER_EQUAL: CUfunc_cache_enum = CUfunc_cache_enum(3);
2063}
2064#[repr(transparent)]
2065#[doc = " Function cache configurations"]
2066#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2067pub struct CUfunc_cache_enum(pub ::std::os::raw::c_uint);
2068#[doc = " Function cache configurations"]
2069pub use self::CUfunc_cache_enum as CUfunc_cache;
2070impl CUsharedconfig_enum {
2071 #[doc = "< set default shared memory bank size"]
2072 pub const CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE: CUsharedconfig_enum = CUsharedconfig_enum(0);
2073}
2074impl CUsharedconfig_enum {
2075 #[doc = "< set shared memory bank width to four bytes"]
2076 pub const CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE: CUsharedconfig_enum =
2077 CUsharedconfig_enum(1);
2078}
2079impl CUsharedconfig_enum {
2080 #[doc = "< set shared memory bank width to eight bytes"]
2081 pub const CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE: CUsharedconfig_enum =
2082 CUsharedconfig_enum(2);
2083}
2084#[repr(transparent)]
2085#[doc = " \\deprecated\n\n Shared memory configurations"]
2086#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2087pub struct CUsharedconfig_enum(pub ::std::os::raw::c_uint);
2088#[doc = " \\deprecated\n\n Shared memory configurations"]
2089pub use self::CUsharedconfig_enum as CUsharedconfig;
2090impl CUshared_carveout_enum {
2091 #[doc = "< No preference for shared memory or L1 (default)"]
2092 pub const CU_SHAREDMEM_CARVEOUT_DEFAULT: CUshared_carveout_enum = CUshared_carveout_enum(-1);
2093}
2094impl CUshared_carveout_enum {
2095 #[doc = "< Prefer maximum available shared memory, minimum L1 cache"]
2096 pub const CU_SHAREDMEM_CARVEOUT_MAX_SHARED: CUshared_carveout_enum =
2097 CUshared_carveout_enum(100);
2098}
2099impl CUshared_carveout_enum {
2100 #[doc = "< Prefer maximum available L1 cache, minimum shared memory"]
2101 pub const CU_SHAREDMEM_CARVEOUT_MAX_L1: CUshared_carveout_enum = CUshared_carveout_enum(0);
2102}
2103#[repr(transparent)]
2104#[doc = " Shared memory carveout configurations. These may be passed to ::cuFuncSetAttribute or ::cuKernelSetAttribute"]
2105#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2106pub struct CUshared_carveout_enum(pub ::std::os::raw::c_int);
2107#[doc = " Shared memory carveout configurations. These may be passed to ::cuFuncSetAttribute or ::cuKernelSetAttribute"]
2108pub use self::CUshared_carveout_enum as CUshared_carveout;
2109impl CUmemorytype_enum {
2110 #[doc = "< Host memory"]
2111 pub const CU_MEMORYTYPE_HOST: CUmemorytype_enum = CUmemorytype_enum(1);
2112}
2113impl CUmemorytype_enum {
2114 #[doc = "< Device memory"]
2115 pub const CU_MEMORYTYPE_DEVICE: CUmemorytype_enum = CUmemorytype_enum(2);
2116}
2117impl CUmemorytype_enum {
2118 #[doc = "< Array memory"]
2119 pub const CU_MEMORYTYPE_ARRAY: CUmemorytype_enum = CUmemorytype_enum(3);
2120}
2121impl CUmemorytype_enum {
2122 #[doc = "< Unified device or host memory"]
2123 pub const CU_MEMORYTYPE_UNIFIED: CUmemorytype_enum = CUmemorytype_enum(4);
2124}
2125#[repr(transparent)]
2126#[doc = " Memory types"]
2127#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2128pub struct CUmemorytype_enum(pub ::std::os::raw::c_uint);
2129#[doc = " Memory types"]
2130pub use self::CUmemorytype_enum as CUmemorytype;
2131impl CUcomputemode_enum {
2132 #[doc = "< Default compute mode (Multiple contexts allowed per device)"]
2133 pub const CU_COMPUTEMODE_DEFAULT: CUcomputemode_enum = CUcomputemode_enum(0);
2134}
2135impl CUcomputemode_enum {
2136 #[doc = "< Compute-prohibited mode (No contexts can be created on this device at this time)"]
2137 pub const CU_COMPUTEMODE_PROHIBITED: CUcomputemode_enum = CUcomputemode_enum(2);
2138}
2139impl CUcomputemode_enum {
2140 #[doc = "< Compute-exclusive-process mode (Only one context used by a single process can be present on this device at a time)"]
2141 pub const CU_COMPUTEMODE_EXCLUSIVE_PROCESS: CUcomputemode_enum = CUcomputemode_enum(3);
2142}
2143#[repr(transparent)]
2144#[doc = " Compute Modes"]
2145#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2146pub struct CUcomputemode_enum(pub ::std::os::raw::c_uint);
2147#[doc = " Compute Modes"]
2148pub use self::CUcomputemode_enum as CUcomputemode;
2149impl CUmem_advise_enum {
2150 #[doc = "< Data will mostly be read and only occasionally be written to"]
2151 pub const CU_MEM_ADVISE_SET_READ_MOSTLY: CUmem_advise_enum = CUmem_advise_enum(1);
2152}
2153impl CUmem_advise_enum {
2154 #[doc = "< Undo the effect of ::CU_MEM_ADVISE_SET_READ_MOSTLY"]
2155 pub const CU_MEM_ADVISE_UNSET_READ_MOSTLY: CUmem_advise_enum = CUmem_advise_enum(2);
2156}
2157impl CUmem_advise_enum {
2158 #[doc = "< Set the preferred location for the data as the specified device"]
2159 pub const CU_MEM_ADVISE_SET_PREFERRED_LOCATION: CUmem_advise_enum = CUmem_advise_enum(3);
2160}
2161impl CUmem_advise_enum {
2162 #[doc = "< Clear the preferred location for the data"]
2163 pub const CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION: CUmem_advise_enum = CUmem_advise_enum(4);
2164}
2165impl CUmem_advise_enum {
2166 #[doc = "< Data will be accessed by the specified device, so prevent page faults as much as possible"]
2167 pub const CU_MEM_ADVISE_SET_ACCESSED_BY: CUmem_advise_enum = CUmem_advise_enum(5);
2168}
2169impl CUmem_advise_enum {
2170 #[doc = "< Let the Unified Memory subsystem decide on the page faulting policy for the specified device"]
2171 pub const CU_MEM_ADVISE_UNSET_ACCESSED_BY: CUmem_advise_enum = CUmem_advise_enum(6);
2172}
2173#[repr(transparent)]
2174#[doc = " Memory advise values"]
2175#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2176pub struct CUmem_advise_enum(pub ::std::os::raw::c_uint);
2177#[doc = " Memory advise values"]
2178pub use self::CUmem_advise_enum as CUmem_advise;
2179impl CUmem_range_attribute_enum {
2180 #[doc = "< Whether the range will mostly be read and only occasionally be written to"]
2181 pub const CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY: CUmem_range_attribute_enum =
2182 CUmem_range_attribute_enum(1);
2183}
2184impl CUmem_range_attribute_enum {
2185 #[doc = "< The preferred location of the range"]
2186 pub const CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION: CUmem_range_attribute_enum =
2187 CUmem_range_attribute_enum(2);
2188}
2189impl CUmem_range_attribute_enum {
2190 #[doc = "< Memory range has ::CU_MEM_ADVISE_SET_ACCESSED_BY set for specified device"]
2191 pub const CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY: CUmem_range_attribute_enum =
2192 CUmem_range_attribute_enum(3);
2193}
2194impl CUmem_range_attribute_enum {
2195 #[doc = "< The last location to which the range was prefetched"]
2196 pub const CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION: CUmem_range_attribute_enum =
2197 CUmem_range_attribute_enum(4);
2198}
2199impl CUmem_range_attribute_enum {
2200 #[doc = "< The preferred location type of the range"]
2201 pub const CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE: CUmem_range_attribute_enum =
2202 CUmem_range_attribute_enum(5);
2203}
2204impl CUmem_range_attribute_enum {
2205 #[doc = "< The preferred location id of the range"]
2206 pub const CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID: CUmem_range_attribute_enum =
2207 CUmem_range_attribute_enum(6);
2208}
2209impl CUmem_range_attribute_enum {
2210 #[doc = "< The last location type to which the range was prefetched"]
2211 pub const CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE: CUmem_range_attribute_enum =
2212 CUmem_range_attribute_enum(7);
2213}
2214impl CUmem_range_attribute_enum {
2215 #[doc = "< The last location id to which the range was prefetched"]
2216 pub const CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID: CUmem_range_attribute_enum =
2217 CUmem_range_attribute_enum(8);
2218}
2219#[repr(transparent)]
2220#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2221pub struct CUmem_range_attribute_enum(pub ::std::os::raw::c_uint);
2222pub use self::CUmem_range_attribute_enum as CUmem_range_attribute;
2223impl CUjit_option_enum {
2224 #[doc = " Max number of registers that a thread may use.\\n\n Option type: unsigned int\\n\n Applies to: compiler only"]
2225 pub const CU_JIT_MAX_REGISTERS: CUjit_option_enum = CUjit_option_enum(0);
2226}
2227impl CUjit_option_enum {
2228 #[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 of 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"]
2229 pub const CU_JIT_THREADS_PER_BLOCK: CUjit_option_enum = CUjit_option_enum(1);
2230}
2231impl CUjit_option_enum {
2232 #[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"]
2233 pub const CU_JIT_WALL_TIME: CUjit_option_enum = CUjit_option_enum(2);
2234}
2235impl CUjit_option_enum {
2236 #[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"]
2237 pub const CU_JIT_INFO_LOG_BUFFER: CUjit_option_enum = CUjit_option_enum(3);
2238}
2239impl CUjit_option_enum {
2240 #[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"]
2241 pub const CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES: CUjit_option_enum = CUjit_option_enum(4);
2242}
2243impl CUjit_option_enum {
2244 #[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"]
2245 pub const CU_JIT_ERROR_LOG_BUFFER: CUjit_option_enum = CUjit_option_enum(5);
2246}
2247impl CUjit_option_enum {
2248 #[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"]
2249 pub const CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES: CUjit_option_enum = CUjit_option_enum(6);
2250}
2251impl CUjit_option_enum {
2252 #[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"]
2253 pub const CU_JIT_OPTIMIZATION_LEVEL: CUjit_option_enum = CUjit_option_enum(7);
2254}
2255impl CUjit_option_enum {
2256 #[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"]
2257 pub const CU_JIT_TARGET_FROM_CUCONTEXT: CUjit_option_enum = CUjit_option_enum(8);
2258}
2259impl CUjit_option_enum {
2260 #[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"]
2261 pub const CU_JIT_TARGET: CUjit_option_enum = CUjit_option_enum(9);
2262}
2263impl CUjit_option_enum {
2264 #[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"]
2265 pub const CU_JIT_FALLBACK_STRATEGY: CUjit_option_enum = CUjit_option_enum(10);
2266}
2267impl CUjit_option_enum {
2268 #[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"]
2269 pub const CU_JIT_GENERATE_DEBUG_INFO: CUjit_option_enum = CUjit_option_enum(11);
2270}
2271impl CUjit_option_enum {
2272 #[doc = " Generate verbose log messages (0: false, default)\\n\n Option type: int\\n\n Applies to: compiler and linker"]
2273 pub const CU_JIT_LOG_VERBOSE: CUjit_option_enum = CUjit_option_enum(12);
2274}
2275impl CUjit_option_enum {
2276 #[doc = " Generate line number information (-lineinfo) (0: false, default)\\n\n Option type: int\\n\n Applies to: compiler only"]
2277 pub const CU_JIT_GENERATE_LINE_INFO: CUjit_option_enum = CUjit_option_enum(13);
2278}
2279impl CUjit_option_enum {
2280 #[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"]
2281 pub const CU_JIT_CACHE_MODE: CUjit_option_enum = CUjit_option_enum(14);
2282}
2283impl CUjit_option_enum {
2284 #[doc = " \\deprecated\n This jit option is deprecated and should not be used."]
2285 pub const CU_JIT_NEW_SM3X_OPT: CUjit_option_enum = CUjit_option_enum(15);
2286}
2287impl CUjit_option_enum {
2288 #[doc = " This jit option is used for internal purpose only."]
2289 pub const CU_JIT_FAST_COMPILE: CUjit_option_enum = CUjit_option_enum(16);
2290}
2291impl CUjit_option_enum {
2292 #[doc = " Array of device symbol names that will be relocated to the corresponding\n host addresses stored in ::CU_JIT_GLOBAL_SYMBOL_ADDRESSES.\\n\n Must contain ::CU_JIT_GLOBAL_SYMBOL_COUNT entries.\\n\n When loading 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"]
2293 pub const CU_JIT_GLOBAL_SYMBOL_NAMES: CUjit_option_enum = CUjit_option_enum(17);
2294}
2295impl CUjit_option_enum {
2296 #[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"]
2297 pub const CU_JIT_GLOBAL_SYMBOL_ADDRESSES: CUjit_option_enum = CUjit_option_enum(18);
2298}
2299impl CUjit_option_enum {
2300 #[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"]
2301 pub const CU_JIT_GLOBAL_SYMBOL_COUNT: CUjit_option_enum = CUjit_option_enum(19);
2302}
2303impl CUjit_option_enum {
2304 #[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"]
2305 pub const CU_JIT_LTO: CUjit_option_enum = CUjit_option_enum(20);
2306}
2307impl CUjit_option_enum {
2308 #[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"]
2309 pub const CU_JIT_FTZ: CUjit_option_enum = CUjit_option_enum(21);
2310}
2311impl CUjit_option_enum {
2312 #[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"]
2313 pub const CU_JIT_PREC_DIV: CUjit_option_enum = CUjit_option_enum(22);
2314}
2315impl CUjit_option_enum {
2316 #[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"]
2317 pub const CU_JIT_PREC_SQRT: CUjit_option_enum = CUjit_option_enum(23);
2318}
2319impl CUjit_option_enum {
2320 #[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"]
2321 pub const CU_JIT_FMA: CUjit_option_enum = CUjit_option_enum(24);
2322}
2323impl CUjit_option_enum {
2324 #[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"]
2325 pub const CU_JIT_REFERENCED_KERNEL_NAMES: CUjit_option_enum = CUjit_option_enum(25);
2326}
2327impl CUjit_option_enum {
2328 #[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"]
2329 pub const CU_JIT_REFERENCED_KERNEL_COUNT: CUjit_option_enum = CUjit_option_enum(26);
2330}
2331impl CUjit_option_enum {
2332 #[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"]
2333 pub const CU_JIT_REFERENCED_VARIABLE_NAMES: CUjit_option_enum = CUjit_option_enum(27);
2334}
2335impl CUjit_option_enum {
2336 #[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"]
2337 pub const CU_JIT_REFERENCED_VARIABLE_COUNT: CUjit_option_enum = CUjit_option_enum(28);
2338}
2339impl CUjit_option_enum {
2340 #[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"]
2341 pub const CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES: CUjit_option_enum = CUjit_option_enum(29);
2342}
2343impl CUjit_option_enum {
2344 #[doc = " Generate position independent code (0: false)\\n\n Option type: int\\n\n Applies to: compiler only"]
2345 pub const CU_JIT_POSITION_INDEPENDENT_CODE: CUjit_option_enum = CUjit_option_enum(30);
2346}
2347impl CUjit_option_enum {
2348 #[doc = " This option hints to the JIT compiler the minimum number of CTAs from the\n kernel’s grid to be mapped to a SM. This option is ignored when used together\n with ::CU_JIT_MAX_REGISTERS or ::CU_JIT_THREADS_PER_BLOCK.\n Optimizations based on this option need ::CU_JIT_MAX_THREADS_PER_BLOCK to\n be specified as well. For kernels already using PTX directive .minnctapersm,\n this option will be ignored by default. Use ::CU_JIT_OVERRIDE_DIRECTIVE_VALUES\n to let this option take precedence over the PTX directive.\n Option type: unsigned int\\n\n Applies to: compiler only"]
2349 pub const CU_JIT_MIN_CTA_PER_SM: CUjit_option_enum = CUjit_option_enum(31);
2350}
2351impl CUjit_option_enum {
2352 #[doc = " Maximum number threads in a thread block, computed as the product of\n the maximum extent specifed for each dimension of the block. This limit\n is guaranteed not to be exeeded in any invocation of the kernel. Exceeding\n the the maximum number of threads results in runtime error or kernel launch\n failure. For kernels already using PTX directive .maxntid, this option will\n be ignored by default. Use ::CU_JIT_OVERRIDE_DIRECTIVE_VALUES to let this\n option take precedence over the PTX directive.\n Option type: int\\n\n Applies to: compiler only"]
2353 pub const CU_JIT_MAX_THREADS_PER_BLOCK: CUjit_option_enum = CUjit_option_enum(32);
2354}
2355impl CUjit_option_enum {
2356 #[doc = " This option lets the values specified using ::CU_JIT_MAX_REGISTERS,\n ::CU_JIT_THREADS_PER_BLOCK, ::CU_JIT_MAX_THREADS_PER_BLOCK and\n ::CU_JIT_MIN_CTA_PER_SM take precedence over any PTX directives.\n (0: Disable, default; 1: Enable)\n Option type: int\\n\n Applies to: compiler only"]
2357 pub const CU_JIT_OVERRIDE_DIRECTIVE_VALUES: CUjit_option_enum = CUjit_option_enum(33);
2358}
2359impl CUjit_option_enum {
2360 #[doc = " This option lets the values specified using ::CU_JIT_MAX_REGISTERS,\n ::CU_JIT_THREADS_PER_BLOCK, ::CU_JIT_MAX_THREADS_PER_BLOCK and\n ::CU_JIT_MIN_CTA_PER_SM take precedence over any PTX directives.\n (0: Disable, default; 1: Enable)\n Option type: int\\n\n Applies to: compiler only"]
2361 pub const CU_JIT_NUM_OPTIONS: CUjit_option_enum = CUjit_option_enum(34);
2362}
2363#[repr(transparent)]
2364#[doc = " Online compiler and linker options"]
2365#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2366pub struct CUjit_option_enum(pub ::std::os::raw::c_uint);
2367#[doc = " Online compiler and linker options"]
2368pub use self::CUjit_option_enum as CUjit_option;
2369impl CUjit_target_enum {
2370 #[doc = "< Compute device class 3.0"]
2371 pub const CU_TARGET_COMPUTE_30: CUjit_target_enum = CUjit_target_enum(30);
2372}
2373impl CUjit_target_enum {
2374 #[doc = "< Compute device class 3.2"]
2375 pub const CU_TARGET_COMPUTE_32: CUjit_target_enum = CUjit_target_enum(32);
2376}
2377impl CUjit_target_enum {
2378 #[doc = "< Compute device class 3.5"]
2379 pub const CU_TARGET_COMPUTE_35: CUjit_target_enum = CUjit_target_enum(35);
2380}
2381impl CUjit_target_enum {
2382 #[doc = "< Compute device class 3.7"]
2383 pub const CU_TARGET_COMPUTE_37: CUjit_target_enum = CUjit_target_enum(37);
2384}
2385impl CUjit_target_enum {
2386 #[doc = "< Compute device class 5.0"]
2387 pub const CU_TARGET_COMPUTE_50: CUjit_target_enum = CUjit_target_enum(50);
2388}
2389impl CUjit_target_enum {
2390 #[doc = "< Compute device class 5.2"]
2391 pub const CU_TARGET_COMPUTE_52: CUjit_target_enum = CUjit_target_enum(52);
2392}
2393impl CUjit_target_enum {
2394 #[doc = "< Compute device class 5.3"]
2395 pub const CU_TARGET_COMPUTE_53: CUjit_target_enum = CUjit_target_enum(53);
2396}
2397impl CUjit_target_enum {
2398 #[doc = "< Compute device class 6.0."]
2399 pub const CU_TARGET_COMPUTE_60: CUjit_target_enum = CUjit_target_enum(60);
2400}
2401impl CUjit_target_enum {
2402 #[doc = "< Compute device class 6.1."]
2403 pub const CU_TARGET_COMPUTE_61: CUjit_target_enum = CUjit_target_enum(61);
2404}
2405impl CUjit_target_enum {
2406 #[doc = "< Compute device class 6.2."]
2407 pub const CU_TARGET_COMPUTE_62: CUjit_target_enum = CUjit_target_enum(62);
2408}
2409impl CUjit_target_enum {
2410 #[doc = "< Compute device class 7.0."]
2411 pub const CU_TARGET_COMPUTE_70: CUjit_target_enum = CUjit_target_enum(70);
2412}
2413impl CUjit_target_enum {
2414 #[doc = "< Compute device class 7.2."]
2415 pub const CU_TARGET_COMPUTE_72: CUjit_target_enum = CUjit_target_enum(72);
2416}
2417impl CUjit_target_enum {
2418 #[doc = "< Compute device class 7.5."]
2419 pub const CU_TARGET_COMPUTE_75: CUjit_target_enum = CUjit_target_enum(75);
2420}
2421impl CUjit_target_enum {
2422 #[doc = "< Compute device class 8.0."]
2423 pub const CU_TARGET_COMPUTE_80: CUjit_target_enum = CUjit_target_enum(80);
2424}
2425impl CUjit_target_enum {
2426 #[doc = "< Compute device class 8.6."]
2427 pub const CU_TARGET_COMPUTE_86: CUjit_target_enum = CUjit_target_enum(86);
2428}
2429impl CUjit_target_enum {
2430 #[doc = "< Compute device class 8.7."]
2431 pub const CU_TARGET_COMPUTE_87: CUjit_target_enum = CUjit_target_enum(87);
2432}
2433impl CUjit_target_enum {
2434 #[doc = "< Compute device class 8.9."]
2435 pub const CU_TARGET_COMPUTE_89: CUjit_target_enum = CUjit_target_enum(89);
2436}
2437impl CUjit_target_enum {
2438 #[doc = "< Compute device class 9.0."]
2439 pub const CU_TARGET_COMPUTE_90: CUjit_target_enum = CUjit_target_enum(90);
2440}
2441impl CUjit_target_enum {
2442 pub const CU_TARGET_COMPUTE_90A: CUjit_target_enum = CUjit_target_enum(65626);
2443}
2444#[repr(transparent)]
2445#[doc = " Online compilation targets"]
2446#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2447pub struct CUjit_target_enum(pub ::std::os::raw::c_uint);
2448#[doc = " Online compilation targets"]
2449pub use self::CUjit_target_enum as CUjit_target;
2450impl CUjit_fallback_enum {
2451 #[doc = "< Prefer to compile ptx if exact binary match not found"]
2452 pub const CU_PREFER_PTX: CUjit_fallback_enum = CUjit_fallback_enum(0);
2453}
2454impl CUjit_fallback_enum {
2455 #[doc = "< Prefer to fall back to compatible binary code if exact match not found"]
2456 pub const CU_PREFER_BINARY: CUjit_fallback_enum = CUjit_fallback_enum(1);
2457}
2458#[repr(transparent)]
2459#[doc = " Cubin matching fallback strategies"]
2460#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2461pub struct CUjit_fallback_enum(pub ::std::os::raw::c_uint);
2462#[doc = " Cubin matching fallback strategies"]
2463pub use self::CUjit_fallback_enum as CUjit_fallback;
2464impl CUjit_cacheMode_enum {
2465 #[doc = "< Compile with no -dlcm flag specified"]
2466 pub const CU_JIT_CACHE_OPTION_NONE: CUjit_cacheMode_enum = CUjit_cacheMode_enum(0);
2467}
2468impl CUjit_cacheMode_enum {
2469 #[doc = "< Compile with L1 cache disabled"]
2470 pub const CU_JIT_CACHE_OPTION_CG: CUjit_cacheMode_enum = CUjit_cacheMode_enum(1);
2471}
2472impl CUjit_cacheMode_enum {
2473 #[doc = "< Compile with L1 cache enabled"]
2474 pub const CU_JIT_CACHE_OPTION_CA: CUjit_cacheMode_enum = CUjit_cacheMode_enum(2);
2475}
2476#[repr(transparent)]
2477#[doc = " Caching modes for dlcm"]
2478#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2479pub struct CUjit_cacheMode_enum(pub ::std::os::raw::c_uint);
2480#[doc = " Caching modes for dlcm"]
2481pub use self::CUjit_cacheMode_enum as CUjit_cacheMode;
2482impl CUjitInputType_enum {
2483 #[doc = " Compiled device-class-specific device code\\n\n Applicable options: none"]
2484 pub const CU_JIT_INPUT_CUBIN: CUjitInputType_enum = CUjitInputType_enum(0);
2485}
2486impl CUjitInputType_enum {
2487 #[doc = " PTX source code\\n\n Applicable options: PTX compiler options"]
2488 pub const CU_JIT_INPUT_PTX: CUjitInputType_enum = CUjitInputType_enum(1);
2489}
2490impl CUjitInputType_enum {
2491 #[doc = " Bundle of multiple cubins and/or PTX of some device code\\n\n Applicable options: PTX compiler options, ::CU_JIT_FALLBACK_STRATEGY"]
2492 pub const CU_JIT_INPUT_FATBINARY: CUjitInputType_enum = CUjitInputType_enum(2);
2493}
2494impl CUjitInputType_enum {
2495 #[doc = " Host object with embedded device code\\n\n Applicable options: PTX compiler options, ::CU_JIT_FALLBACK_STRATEGY"]
2496 pub const CU_JIT_INPUT_OBJECT: CUjitInputType_enum = CUjitInputType_enum(3);
2497}
2498impl CUjitInputType_enum {
2499 #[doc = " Archive of host objects with embedded device code\\n\n Applicable options: PTX compiler options, ::CU_JIT_FALLBACK_STRATEGY"]
2500 pub const CU_JIT_INPUT_LIBRARY: CUjitInputType_enum = CUjitInputType_enum(4);
2501}
2502impl CUjitInputType_enum {
2503 #[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"]
2504 pub const CU_JIT_INPUT_NVVM: CUjitInputType_enum = CUjitInputType_enum(5);
2505}
2506impl CUjitInputType_enum {
2507 #[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"]
2508 pub const CU_JIT_NUM_INPUT_TYPES: CUjitInputType_enum = CUjitInputType_enum(6);
2509}
2510#[repr(transparent)]
2511#[doc = " Device code formats"]
2512#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2513pub struct CUjitInputType_enum(pub ::std::os::raw::c_uint);
2514#[doc = " Device code formats"]
2515pub use self::CUjitInputType_enum as CUjitInputType;
2516#[repr(C)]
2517#[derive(Debug, Copy, Clone)]
2518pub struct CUlinkState_st {
2519 _unused: [u8; 0],
2520}
2521pub type CUlinkState = *mut CUlinkState_st;
2522impl CUgraphicsRegisterFlags_enum {
2523 pub const CU_GRAPHICS_REGISTER_FLAGS_NONE: CUgraphicsRegisterFlags_enum =
2524 CUgraphicsRegisterFlags_enum(0);
2525}
2526impl CUgraphicsRegisterFlags_enum {
2527 pub const CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY: CUgraphicsRegisterFlags_enum =
2528 CUgraphicsRegisterFlags_enum(1);
2529}
2530impl CUgraphicsRegisterFlags_enum {
2531 pub const CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD: CUgraphicsRegisterFlags_enum =
2532 CUgraphicsRegisterFlags_enum(2);
2533}
2534impl CUgraphicsRegisterFlags_enum {
2535 pub const CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST: CUgraphicsRegisterFlags_enum =
2536 CUgraphicsRegisterFlags_enum(4);
2537}
2538impl CUgraphicsRegisterFlags_enum {
2539 pub const CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER: CUgraphicsRegisterFlags_enum =
2540 CUgraphicsRegisterFlags_enum(8);
2541}
2542#[repr(transparent)]
2543#[doc = " Flags to register a graphics resource"]
2544#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2545pub struct CUgraphicsRegisterFlags_enum(pub ::std::os::raw::c_uint);
2546#[doc = " Flags to register a graphics resource"]
2547pub use self::CUgraphicsRegisterFlags_enum as CUgraphicsRegisterFlags;
2548impl CUgraphicsMapResourceFlags_enum {
2549 pub const CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: CUgraphicsMapResourceFlags_enum =
2550 CUgraphicsMapResourceFlags_enum(0);
2551}
2552impl CUgraphicsMapResourceFlags_enum {
2553 pub const CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY: CUgraphicsMapResourceFlags_enum =
2554 CUgraphicsMapResourceFlags_enum(1);
2555}
2556impl CUgraphicsMapResourceFlags_enum {
2557 pub const CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD: CUgraphicsMapResourceFlags_enum =
2558 CUgraphicsMapResourceFlags_enum(2);
2559}
2560#[repr(transparent)]
2561#[doc = " Flags for mapping and unmapping interop resources"]
2562#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2563pub struct CUgraphicsMapResourceFlags_enum(pub ::std::os::raw::c_uint);
2564#[doc = " Flags for mapping and unmapping interop resources"]
2565pub use self::CUgraphicsMapResourceFlags_enum as CUgraphicsMapResourceFlags;
2566impl CUarray_cubemap_face_enum {
2567 #[doc = "< Positive X face of cubemap"]
2568 pub const CU_CUBEMAP_FACE_POSITIVE_X: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(0);
2569}
2570impl CUarray_cubemap_face_enum {
2571 #[doc = "< Negative X face of cubemap"]
2572 pub const CU_CUBEMAP_FACE_NEGATIVE_X: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(1);
2573}
2574impl CUarray_cubemap_face_enum {
2575 #[doc = "< Positive Y face of cubemap"]
2576 pub const CU_CUBEMAP_FACE_POSITIVE_Y: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(2);
2577}
2578impl CUarray_cubemap_face_enum {
2579 #[doc = "< Negative Y face of cubemap"]
2580 pub const CU_CUBEMAP_FACE_NEGATIVE_Y: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(3);
2581}
2582impl CUarray_cubemap_face_enum {
2583 #[doc = "< Positive Z face of cubemap"]
2584 pub const CU_CUBEMAP_FACE_POSITIVE_Z: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(4);
2585}
2586impl CUarray_cubemap_face_enum {
2587 #[doc = "< Negative Z face of cubemap"]
2588 pub const CU_CUBEMAP_FACE_NEGATIVE_Z: CUarray_cubemap_face_enum = CUarray_cubemap_face_enum(5);
2589}
2590#[repr(transparent)]
2591#[doc = " Array indices for cube faces"]
2592#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2593pub struct CUarray_cubemap_face_enum(pub ::std::os::raw::c_uint);
2594#[doc = " Array indices for cube faces"]
2595pub use self::CUarray_cubemap_face_enum as CUarray_cubemap_face;
2596impl CUlimit_enum {
2597 #[doc = "< GPU thread stack size"]
2598 pub const CU_LIMIT_STACK_SIZE: CUlimit_enum = CUlimit_enum(0);
2599}
2600impl CUlimit_enum {
2601 #[doc = "< GPU printf FIFO size"]
2602 pub const CU_LIMIT_PRINTF_FIFO_SIZE: CUlimit_enum = CUlimit_enum(1);
2603}
2604impl CUlimit_enum {
2605 #[doc = "< GPU malloc heap size"]
2606 pub const CU_LIMIT_MALLOC_HEAP_SIZE: CUlimit_enum = CUlimit_enum(2);
2607}
2608impl CUlimit_enum {
2609 #[doc = "< GPU device runtime launch synchronize depth"]
2610 pub const CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH: CUlimit_enum = CUlimit_enum(3);
2611}
2612impl CUlimit_enum {
2613 #[doc = "< GPU device runtime pending launch count"]
2614 pub const CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT: CUlimit_enum = CUlimit_enum(4);
2615}
2616impl CUlimit_enum {
2617 #[doc = "< A value between 0 and 128 that indicates the maximum fetch granularity of L2 (in Bytes). This is a hint"]
2618 pub const CU_LIMIT_MAX_L2_FETCH_GRANULARITY: CUlimit_enum = CUlimit_enum(5);
2619}
2620impl CUlimit_enum {
2621 #[doc = "< A size in bytes for L2 persisting lines cache size"]
2622 pub const CU_LIMIT_PERSISTING_L2_CACHE_SIZE: CUlimit_enum = CUlimit_enum(6);
2623}
2624impl CUlimit_enum {
2625 #[doc = "< A maximum size in bytes of shared memory available to CUDA kernels on a CIG context. Can only be queried, cannot be set"]
2626 pub const CU_LIMIT_SHMEM_SIZE: CUlimit_enum = CUlimit_enum(7);
2627}
2628impl CUlimit_enum {
2629 #[doc = "< A non-zero value indicates this CUDA context is a CIG-enabled context. Can only be queried, cannot be set"]
2630 pub const CU_LIMIT_CIG_ENABLED: CUlimit_enum = CUlimit_enum(8);
2631}
2632impl CUlimit_enum {
2633 #[doc = "< When set to a non-zero value, CUDA will fail to launch a kernel on a CIG context, instead of using the fallback path, if the kernel uses more shared memory than available"]
2634 pub const CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED: CUlimit_enum = CUlimit_enum(9);
2635}
2636impl CUlimit_enum {
2637 pub const CU_LIMIT_MAX: CUlimit_enum = CUlimit_enum(10);
2638}
2639#[repr(transparent)]
2640#[doc = " Limits"]
2641#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2642pub struct CUlimit_enum(pub ::std::os::raw::c_uint);
2643#[doc = " Limits"]
2644pub use self::CUlimit_enum as CUlimit;
2645impl CUresourcetype_enum {
2646 #[doc = "< Array resource"]
2647 pub const CU_RESOURCE_TYPE_ARRAY: CUresourcetype_enum = CUresourcetype_enum(0);
2648}
2649impl CUresourcetype_enum {
2650 #[doc = "< Mipmapped array resource"]
2651 pub const CU_RESOURCE_TYPE_MIPMAPPED_ARRAY: CUresourcetype_enum = CUresourcetype_enum(1);
2652}
2653impl CUresourcetype_enum {
2654 #[doc = "< Linear resource"]
2655 pub const CU_RESOURCE_TYPE_LINEAR: CUresourcetype_enum = CUresourcetype_enum(2);
2656}
2657impl CUresourcetype_enum {
2658 #[doc = "< Pitch 2D resource"]
2659 pub const CU_RESOURCE_TYPE_PITCH2D: CUresourcetype_enum = CUresourcetype_enum(3);
2660}
2661#[repr(transparent)]
2662#[doc = " Resource types"]
2663#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2664pub struct CUresourcetype_enum(pub ::std::os::raw::c_uint);
2665#[doc = " Resource types"]
2666pub use self::CUresourcetype_enum as CUresourcetype;
2667#[doc = " CUDA host function\n \\param userData Argument value passed to the function"]
2668pub type CUhostFn =
2669 ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void)>;
2670impl CUaccessProperty_enum {
2671 #[doc = "< Normal cache persistence."]
2672 pub const CU_ACCESS_PROPERTY_NORMAL: CUaccessProperty_enum = CUaccessProperty_enum(0);
2673}
2674impl CUaccessProperty_enum {
2675 #[doc = "< Streaming access is less likely to persit from cache."]
2676 pub const CU_ACCESS_PROPERTY_STREAMING: CUaccessProperty_enum = CUaccessProperty_enum(1);
2677}
2678impl CUaccessProperty_enum {
2679 #[doc = "< Persisting access is more likely to persist in cache."]
2680 pub const CU_ACCESS_PROPERTY_PERSISTING: CUaccessProperty_enum = CUaccessProperty_enum(2);
2681}
2682#[repr(transparent)]
2683#[doc = " Specifies performance hint with ::CUaccessPolicyWindow for hitProp and missProp members."]
2684#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
2685pub struct CUaccessProperty_enum(pub ::std::os::raw::c_uint);
2686#[doc = " Specifies performance hint with ::CUaccessPolicyWindow for hitProp and missProp members."]
2687pub use self::CUaccessProperty_enum as CUaccessProperty;
2688#[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."]
2689#[repr(C)]
2690#[derive(Debug, Copy, Clone)]
2691pub struct CUaccessPolicyWindow_st {
2692 #[doc = "< Starting address of the access policy window. CUDA driver may align it."]
2693 pub base_ptr: *mut ::std::os::raw::c_void,
2694 #[doc = "< Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment."]
2695 pub num_bytes: usize,
2696 #[doc = "< hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp."]
2697 pub hitRatio: f32,
2698 #[doc = "< ::CUaccessProperty set for hit."]
2699 pub hitProp: CUaccessProperty,
2700 #[doc = "< ::CUaccessProperty set for miss. Must be either NORMAL or STREAMING"]
2701 pub missProp: CUaccessProperty,
2702}
2703#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2704const _: () = {
2705 ["Size of CUaccessPolicyWindow_st"][::std::mem::size_of::<CUaccessPolicyWindow_st>() - 32usize];
2706 ["Alignment of CUaccessPolicyWindow_st"]
2707 [::std::mem::align_of::<CUaccessPolicyWindow_st>() - 8usize];
2708 ["Offset of field: CUaccessPolicyWindow_st::base_ptr"]
2709 [::std::mem::offset_of!(CUaccessPolicyWindow_st, base_ptr) - 0usize];
2710 ["Offset of field: CUaccessPolicyWindow_st::num_bytes"]
2711 [::std::mem::offset_of!(CUaccessPolicyWindow_st, num_bytes) - 8usize];
2712 ["Offset of field: CUaccessPolicyWindow_st::hitRatio"]
2713 [::std::mem::offset_of!(CUaccessPolicyWindow_st, hitRatio) - 16usize];
2714 ["Offset of field: CUaccessPolicyWindow_st::hitProp"]
2715 [::std::mem::offset_of!(CUaccessPolicyWindow_st, hitProp) - 20usize];
2716 ["Offset of field: CUaccessPolicyWindow_st::missProp"]
2717 [::std::mem::offset_of!(CUaccessPolicyWindow_st, missProp) - 24usize];
2718};
2719#[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."]
2720pub type CUaccessPolicyWindow_v1 = CUaccessPolicyWindow_st;
2721#[doc = " Access policy window"]
2722pub type CUaccessPolicyWindow = CUaccessPolicyWindow_v1;
2723#[doc = " GPU kernel node parameters"]
2724#[repr(C)]
2725#[derive(Debug, Copy, Clone)]
2726pub struct CUDA_KERNEL_NODE_PARAMS_st {
2727 #[doc = "< Kernel to launch"]
2728 pub func: CUfunction,
2729 #[doc = "< Width of grid in blocks"]
2730 pub gridDimX: ::std::os::raw::c_uint,
2731 #[doc = "< Height of grid in blocks"]
2732 pub gridDimY: ::std::os::raw::c_uint,
2733 #[doc = "< Depth of grid in blocks"]
2734 pub gridDimZ: ::std::os::raw::c_uint,
2735 #[doc = "< X dimension of each thread block"]
2736 pub blockDimX: ::std::os::raw::c_uint,
2737 #[doc = "< Y dimension of each thread block"]
2738 pub blockDimY: ::std::os::raw::c_uint,
2739 #[doc = "< Z dimension of each thread block"]
2740 pub blockDimZ: ::std::os::raw::c_uint,
2741 #[doc = "< Dynamic shared-memory size per thread block in bytes"]
2742 pub sharedMemBytes: ::std::os::raw::c_uint,
2743 #[doc = "< Array of pointers to kernel parameters"]
2744 pub kernelParams: *mut *mut ::std::os::raw::c_void,
2745 #[doc = "< Extra options"]
2746 pub extra: *mut *mut ::std::os::raw::c_void,
2747}
2748#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2749const _: () = {
2750 ["Size of CUDA_KERNEL_NODE_PARAMS_st"]
2751 [::std::mem::size_of::<CUDA_KERNEL_NODE_PARAMS_st>() - 56usize];
2752 ["Alignment of CUDA_KERNEL_NODE_PARAMS_st"]
2753 [::std::mem::align_of::<CUDA_KERNEL_NODE_PARAMS_st>() - 8usize];
2754 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_st::func"]
2755 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_st, func) - 0usize];
2756 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_st::gridDimX"]
2757 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_st, gridDimX) - 8usize];
2758 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_st::gridDimY"]
2759 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_st, gridDimY) - 12usize];
2760 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_st::gridDimZ"]
2761 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_st, gridDimZ) - 16usize];
2762 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_st::blockDimX"]
2763 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_st, blockDimX) - 20usize];
2764 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_st::blockDimY"]
2765 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_st, blockDimY) - 24usize];
2766 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_st::blockDimZ"]
2767 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_st, blockDimZ) - 28usize];
2768 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_st::sharedMemBytes"]
2769 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_st, sharedMemBytes) - 32usize];
2770 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_st::kernelParams"]
2771 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_st, kernelParams) - 40usize];
2772 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_st::extra"]
2773 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_st, extra) - 48usize];
2774};
2775#[doc = " GPU kernel node parameters"]
2776pub type CUDA_KERNEL_NODE_PARAMS_v1 = CUDA_KERNEL_NODE_PARAMS_st;
2777#[doc = " GPU kernel node parameters"]
2778#[repr(C)]
2779#[derive(Debug, Copy, Clone)]
2780pub struct CUDA_KERNEL_NODE_PARAMS_v2_st {
2781 #[doc = "< Kernel to launch"]
2782 pub func: CUfunction,
2783 #[doc = "< Width of grid in blocks"]
2784 pub gridDimX: ::std::os::raw::c_uint,
2785 #[doc = "< Height of grid in blocks"]
2786 pub gridDimY: ::std::os::raw::c_uint,
2787 #[doc = "< Depth of grid in blocks"]
2788 pub gridDimZ: ::std::os::raw::c_uint,
2789 #[doc = "< X dimension of each thread block"]
2790 pub blockDimX: ::std::os::raw::c_uint,
2791 #[doc = "< Y dimension of each thread block"]
2792 pub blockDimY: ::std::os::raw::c_uint,
2793 #[doc = "< Z dimension of each thread block"]
2794 pub blockDimZ: ::std::os::raw::c_uint,
2795 #[doc = "< Dynamic shared-memory size per thread block in bytes"]
2796 pub sharedMemBytes: ::std::os::raw::c_uint,
2797 #[doc = "< Array of pointers to kernel parameters"]
2798 pub kernelParams: *mut *mut ::std::os::raw::c_void,
2799 #[doc = "< Extra options"]
2800 pub extra: *mut *mut ::std::os::raw::c_void,
2801 #[doc = "< Kernel to launch, will only be referenced if func is NULL"]
2802 pub kern: CUkernel,
2803 #[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."]
2804 pub ctx: CUcontext,
2805}
2806#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2807const _: () = {
2808 ["Size of CUDA_KERNEL_NODE_PARAMS_v2_st"]
2809 [::std::mem::size_of::<CUDA_KERNEL_NODE_PARAMS_v2_st>() - 72usize];
2810 ["Alignment of CUDA_KERNEL_NODE_PARAMS_v2_st"]
2811 [::std::mem::align_of::<CUDA_KERNEL_NODE_PARAMS_v2_st>() - 8usize];
2812 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::func"]
2813 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, func) - 0usize];
2814 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::gridDimX"]
2815 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, gridDimX) - 8usize];
2816 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::gridDimY"]
2817 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, gridDimY) - 12usize];
2818 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::gridDimZ"]
2819 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, gridDimZ) - 16usize];
2820 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::blockDimX"]
2821 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, blockDimX) - 20usize];
2822 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::blockDimY"]
2823 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, blockDimY) - 24usize];
2824 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::blockDimZ"]
2825 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, blockDimZ) - 28usize];
2826 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::sharedMemBytes"]
2827 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, sharedMemBytes) - 32usize];
2828 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::kernelParams"]
2829 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, kernelParams) - 40usize];
2830 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::extra"]
2831 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, extra) - 48usize];
2832 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::kern"]
2833 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, kern) - 56usize];
2834 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v2_st::ctx"]
2835 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v2_st, ctx) - 64usize];
2836};
2837#[doc = " GPU kernel node parameters"]
2838pub type CUDA_KERNEL_NODE_PARAMS_v2 = CUDA_KERNEL_NODE_PARAMS_v2_st;
2839#[doc = " GPU kernel node parameters"]
2840pub type CUDA_KERNEL_NODE_PARAMS = CUDA_KERNEL_NODE_PARAMS_v2;
2841#[doc = " GPU kernel node parameters"]
2842#[repr(C)]
2843#[derive(Debug, Copy, Clone)]
2844pub struct CUDA_KERNEL_NODE_PARAMS_v3_st {
2845 #[doc = "< Kernel to launch"]
2846 pub func: CUfunction,
2847 #[doc = "< Width of grid in blocks"]
2848 pub gridDimX: ::std::os::raw::c_uint,
2849 #[doc = "< Height of grid in blocks"]
2850 pub gridDimY: ::std::os::raw::c_uint,
2851 #[doc = "< Depth of grid in blocks"]
2852 pub gridDimZ: ::std::os::raw::c_uint,
2853 #[doc = "< X dimension of each thread block"]
2854 pub blockDimX: ::std::os::raw::c_uint,
2855 #[doc = "< Y dimension of each thread block"]
2856 pub blockDimY: ::std::os::raw::c_uint,
2857 #[doc = "< Z dimension of each thread block"]
2858 pub blockDimZ: ::std::os::raw::c_uint,
2859 #[doc = "< Dynamic shared-memory size per thread block in bytes"]
2860 pub sharedMemBytes: ::std::os::raw::c_uint,
2861 #[doc = "< Array of pointers to kernel parameters"]
2862 pub kernelParams: *mut *mut ::std::os::raw::c_void,
2863 #[doc = "< Extra options"]
2864 pub extra: *mut *mut ::std::os::raw::c_void,
2865 #[doc = "< Kernel to launch, will only be referenced if func is NULL"]
2866 pub kern: CUkernel,
2867 #[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."]
2868 pub ctx: CUcontext,
2869}
2870#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2871const _: () = {
2872 ["Size of CUDA_KERNEL_NODE_PARAMS_v3_st"]
2873 [::std::mem::size_of::<CUDA_KERNEL_NODE_PARAMS_v3_st>() - 72usize];
2874 ["Alignment of CUDA_KERNEL_NODE_PARAMS_v3_st"]
2875 [::std::mem::align_of::<CUDA_KERNEL_NODE_PARAMS_v3_st>() - 8usize];
2876 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::func"]
2877 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, func) - 0usize];
2878 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::gridDimX"]
2879 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, gridDimX) - 8usize];
2880 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::gridDimY"]
2881 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, gridDimY) - 12usize];
2882 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::gridDimZ"]
2883 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, gridDimZ) - 16usize];
2884 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::blockDimX"]
2885 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, blockDimX) - 20usize];
2886 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::blockDimY"]
2887 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, blockDimY) - 24usize];
2888 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::blockDimZ"]
2889 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, blockDimZ) - 28usize];
2890 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::sharedMemBytes"]
2891 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, sharedMemBytes) - 32usize];
2892 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::kernelParams"]
2893 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, kernelParams) - 40usize];
2894 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::extra"]
2895 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, extra) - 48usize];
2896 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::kern"]
2897 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, kern) - 56usize];
2898 ["Offset of field: CUDA_KERNEL_NODE_PARAMS_v3_st::ctx"]
2899 [::std::mem::offset_of!(CUDA_KERNEL_NODE_PARAMS_v3_st, ctx) - 64usize];
2900};
2901#[doc = " GPU kernel node parameters"]
2902pub type CUDA_KERNEL_NODE_PARAMS_v3 = CUDA_KERNEL_NODE_PARAMS_v3_st;
2903#[doc = " Memset node parameters"]
2904#[repr(C)]
2905#[derive(Debug, Copy, Clone)]
2906pub struct CUDA_MEMSET_NODE_PARAMS_st {
2907 #[doc = "< Destination device pointer"]
2908 pub dst: CUdeviceptr,
2909 #[doc = "< Pitch of destination device pointer. Unused if height is 1"]
2910 pub pitch: usize,
2911 #[doc = "< Value to be set"]
2912 pub value: ::std::os::raw::c_uint,
2913 #[doc = "< Size of each element in bytes. Must be 1, 2, or 4."]
2914 pub elementSize: ::std::os::raw::c_uint,
2915 #[doc = "< Width of the row in elements"]
2916 pub width: usize,
2917 #[doc = "< Number of rows"]
2918 pub height: usize,
2919}
2920#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2921const _: () = {
2922 ["Size of CUDA_MEMSET_NODE_PARAMS_st"]
2923 [::std::mem::size_of::<CUDA_MEMSET_NODE_PARAMS_st>() - 40usize];
2924 ["Alignment of CUDA_MEMSET_NODE_PARAMS_st"]
2925 [::std::mem::align_of::<CUDA_MEMSET_NODE_PARAMS_st>() - 8usize];
2926 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_st::dst"]
2927 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_st, dst) - 0usize];
2928 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_st::pitch"]
2929 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_st, pitch) - 8usize];
2930 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_st::value"]
2931 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_st, value) - 16usize];
2932 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_st::elementSize"]
2933 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_st, elementSize) - 20usize];
2934 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_st::width"]
2935 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_st, width) - 24usize];
2936 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_st::height"]
2937 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_st, height) - 32usize];
2938};
2939#[doc = " Memset node parameters"]
2940pub type CUDA_MEMSET_NODE_PARAMS_v1 = CUDA_MEMSET_NODE_PARAMS_st;
2941#[doc = " Memset node parameters"]
2942pub type CUDA_MEMSET_NODE_PARAMS = CUDA_MEMSET_NODE_PARAMS_v1;
2943#[doc = " Memset node parameters"]
2944#[repr(C)]
2945#[derive(Debug, Copy, Clone)]
2946pub struct CUDA_MEMSET_NODE_PARAMS_v2_st {
2947 #[doc = "< Destination device pointer"]
2948 pub dst: CUdeviceptr,
2949 #[doc = "< Pitch of destination device pointer. Unused if height is 1"]
2950 pub pitch: usize,
2951 #[doc = "< Value to be set"]
2952 pub value: ::std::os::raw::c_uint,
2953 #[doc = "< Size of each element in bytes. Must be 1, 2, or 4."]
2954 pub elementSize: ::std::os::raw::c_uint,
2955 #[doc = "< Width of the row in elements"]
2956 pub width: usize,
2957 #[doc = "< Number of rows"]
2958 pub height: usize,
2959 #[doc = "< Context on which to run the node"]
2960 pub ctx: CUcontext,
2961}
2962#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2963const _: () = {
2964 ["Size of CUDA_MEMSET_NODE_PARAMS_v2_st"]
2965 [::std::mem::size_of::<CUDA_MEMSET_NODE_PARAMS_v2_st>() - 48usize];
2966 ["Alignment of CUDA_MEMSET_NODE_PARAMS_v2_st"]
2967 [::std::mem::align_of::<CUDA_MEMSET_NODE_PARAMS_v2_st>() - 8usize];
2968 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_v2_st::dst"]
2969 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_v2_st, dst) - 0usize];
2970 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_v2_st::pitch"]
2971 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_v2_st, pitch) - 8usize];
2972 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_v2_st::value"]
2973 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_v2_st, value) - 16usize];
2974 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_v2_st::elementSize"]
2975 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_v2_st, elementSize) - 20usize];
2976 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_v2_st::width"]
2977 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_v2_st, width) - 24usize];
2978 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_v2_st::height"]
2979 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_v2_st, height) - 32usize];
2980 ["Offset of field: CUDA_MEMSET_NODE_PARAMS_v2_st::ctx"]
2981 [::std::mem::offset_of!(CUDA_MEMSET_NODE_PARAMS_v2_st, ctx) - 40usize];
2982};
2983#[doc = " Memset node parameters"]
2984pub type CUDA_MEMSET_NODE_PARAMS_v2 = CUDA_MEMSET_NODE_PARAMS_v2_st;
2985#[doc = " Host node parameters"]
2986#[repr(C)]
2987#[derive(Debug, Copy, Clone)]
2988pub struct CUDA_HOST_NODE_PARAMS_st {
2989 #[doc = "< The function to call when the node executes"]
2990 pub fn_: CUhostFn,
2991 #[doc = "< Argument to pass to the function"]
2992 pub userData: *mut ::std::os::raw::c_void,
2993}
2994#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2995const _: () = {
2996 ["Size of CUDA_HOST_NODE_PARAMS_st"]
2997 [::std::mem::size_of::<CUDA_HOST_NODE_PARAMS_st>() - 16usize];
2998 ["Alignment of CUDA_HOST_NODE_PARAMS_st"]
2999 [::std::mem::align_of::<CUDA_HOST_NODE_PARAMS_st>() - 8usize];
3000 ["Offset of field: CUDA_HOST_NODE_PARAMS_st::fn_"]
3001 [::std::mem::offset_of!(CUDA_HOST_NODE_PARAMS_st, fn_) - 0usize];
3002 ["Offset of field: CUDA_HOST_NODE_PARAMS_st::userData"]
3003 [::std::mem::offset_of!(CUDA_HOST_NODE_PARAMS_st, userData) - 8usize];
3004};
3005#[doc = " Host node parameters"]
3006pub type CUDA_HOST_NODE_PARAMS_v1 = CUDA_HOST_NODE_PARAMS_st;
3007#[doc = " Host node parameters"]
3008pub type CUDA_HOST_NODE_PARAMS = CUDA_HOST_NODE_PARAMS_v1;
3009#[doc = " Host node parameters"]
3010#[repr(C)]
3011#[derive(Debug, Copy, Clone)]
3012pub struct CUDA_HOST_NODE_PARAMS_v2_st {
3013 #[doc = "< The function to call when the node executes"]
3014 pub fn_: CUhostFn,
3015 #[doc = "< Argument to pass to the function"]
3016 pub userData: *mut ::std::os::raw::c_void,
3017}
3018#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3019const _: () = {
3020 ["Size of CUDA_HOST_NODE_PARAMS_v2_st"]
3021 [::std::mem::size_of::<CUDA_HOST_NODE_PARAMS_v2_st>() - 16usize];
3022 ["Alignment of CUDA_HOST_NODE_PARAMS_v2_st"]
3023 [::std::mem::align_of::<CUDA_HOST_NODE_PARAMS_v2_st>() - 8usize];
3024 ["Offset of field: CUDA_HOST_NODE_PARAMS_v2_st::fn_"]
3025 [::std::mem::offset_of!(CUDA_HOST_NODE_PARAMS_v2_st, fn_) - 0usize];
3026 ["Offset of field: CUDA_HOST_NODE_PARAMS_v2_st::userData"]
3027 [::std::mem::offset_of!(CUDA_HOST_NODE_PARAMS_v2_st, userData) - 8usize];
3028};
3029#[doc = " Host node parameters"]
3030pub type CUDA_HOST_NODE_PARAMS_v2 = CUDA_HOST_NODE_PARAMS_v2_st;
3031impl CUgraphConditionalNodeType_enum {
3032 #[doc = "< Conditional 'if' Node. Body executed once if condition value is non-zero."]
3033 pub const CU_GRAPH_COND_TYPE_IF: CUgraphConditionalNodeType_enum =
3034 CUgraphConditionalNodeType_enum(0);
3035}
3036impl CUgraphConditionalNodeType_enum {
3037 #[doc = "< Conditional 'while' Node. Body executed repeatedly while condition value is non-zero."]
3038 pub const CU_GRAPH_COND_TYPE_WHILE: CUgraphConditionalNodeType_enum =
3039 CUgraphConditionalNodeType_enum(1);
3040}
3041#[repr(transparent)]
3042#[doc = " Conditional node types"]
3043#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3044pub struct CUgraphConditionalNodeType_enum(pub ::std::os::raw::c_uint);
3045#[doc = " Conditional node types"]
3046pub use self::CUgraphConditionalNodeType_enum as CUgraphConditionalNodeType;
3047#[doc = " Conditional node parameters"]
3048#[repr(C)]
3049#[derive(Debug, Copy, Clone)]
3050pub struct CUDA_CONDITIONAL_NODE_PARAMS {
3051 #[doc = "< Conditional node handle.\nHandles must be created in advance of creating the node\nusing ::cuGraphConditionalHandleCreate."]
3052 pub handle: CUgraphConditionalHandle,
3053 #[doc = "< Type of conditional node."]
3054 pub type_: CUgraphConditionalNodeType,
3055 #[doc = "< Size of graph output array. Must be 1."]
3056 pub size: ::std::os::raw::c_uint,
3057 #[doc = "< CUDA-owned array populated with conditional node child graphs during creation of the node.\nValid for the lifetime of the conditional node.\nThe contents of the graph(s) are subject to the following constraints:\n\n- Allowed node types are kernel nodes, empty nodes, child graphs, memsets,\nmemcopies, and conditionals. This applies recursively to child graphs and conditional bodies.\n- All kernels, including kernels in nested conditionals or child graphs at any level,\nmust belong to the same CUDA context.\n\nThese graphs may be populated using graph node creation APIs or ::cuStreamBeginCaptureToGraph."]
3058 pub phGraph_out: *mut CUgraph,
3059 #[doc = "< Context on which to run the node. Must match context used to create the handle and all body nodes."]
3060 pub ctx: CUcontext,
3061}
3062#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3063const _: () = {
3064 ["Size of CUDA_CONDITIONAL_NODE_PARAMS"]
3065 [::std::mem::size_of::<CUDA_CONDITIONAL_NODE_PARAMS>() - 32usize];
3066 ["Alignment of CUDA_CONDITIONAL_NODE_PARAMS"]
3067 [::std::mem::align_of::<CUDA_CONDITIONAL_NODE_PARAMS>() - 8usize];
3068 ["Offset of field: CUDA_CONDITIONAL_NODE_PARAMS::handle"]
3069 [::std::mem::offset_of!(CUDA_CONDITIONAL_NODE_PARAMS, handle) - 0usize];
3070 ["Offset of field: CUDA_CONDITIONAL_NODE_PARAMS::type_"]
3071 [::std::mem::offset_of!(CUDA_CONDITIONAL_NODE_PARAMS, type_) - 8usize];
3072 ["Offset of field: CUDA_CONDITIONAL_NODE_PARAMS::size"]
3073 [::std::mem::offset_of!(CUDA_CONDITIONAL_NODE_PARAMS, size) - 12usize];
3074 ["Offset of field: CUDA_CONDITIONAL_NODE_PARAMS::phGraph_out"]
3075 [::std::mem::offset_of!(CUDA_CONDITIONAL_NODE_PARAMS, phGraph_out) - 16usize];
3076 ["Offset of field: CUDA_CONDITIONAL_NODE_PARAMS::ctx"]
3077 [::std::mem::offset_of!(CUDA_CONDITIONAL_NODE_PARAMS, ctx) - 24usize];
3078};
3079impl CUgraphNodeType_enum {
3080 #[doc = "< GPU kernel node"]
3081 pub const CU_GRAPH_NODE_TYPE_KERNEL: CUgraphNodeType_enum = CUgraphNodeType_enum(0);
3082}
3083impl CUgraphNodeType_enum {
3084 #[doc = "< Memcpy node"]
3085 pub const CU_GRAPH_NODE_TYPE_MEMCPY: CUgraphNodeType_enum = CUgraphNodeType_enum(1);
3086}
3087impl CUgraphNodeType_enum {
3088 #[doc = "< Memset node"]
3089 pub const CU_GRAPH_NODE_TYPE_MEMSET: CUgraphNodeType_enum = CUgraphNodeType_enum(2);
3090}
3091impl CUgraphNodeType_enum {
3092 #[doc = "< Host (executable) node"]
3093 pub const CU_GRAPH_NODE_TYPE_HOST: CUgraphNodeType_enum = CUgraphNodeType_enum(3);
3094}
3095impl CUgraphNodeType_enum {
3096 #[doc = "< Node which executes an embedded graph"]
3097 pub const CU_GRAPH_NODE_TYPE_GRAPH: CUgraphNodeType_enum = CUgraphNodeType_enum(4);
3098}
3099impl CUgraphNodeType_enum {
3100 #[doc = "< Empty (no-op) node"]
3101 pub const CU_GRAPH_NODE_TYPE_EMPTY: CUgraphNodeType_enum = CUgraphNodeType_enum(5);
3102}
3103impl CUgraphNodeType_enum {
3104 #[doc = "< External event wait node"]
3105 pub const CU_GRAPH_NODE_TYPE_WAIT_EVENT: CUgraphNodeType_enum = CUgraphNodeType_enum(6);
3106}
3107impl CUgraphNodeType_enum {
3108 #[doc = "< External event record node"]
3109 pub const CU_GRAPH_NODE_TYPE_EVENT_RECORD: CUgraphNodeType_enum = CUgraphNodeType_enum(7);
3110}
3111impl CUgraphNodeType_enum {
3112 #[doc = "< External semaphore signal node"]
3113 pub const CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL: CUgraphNodeType_enum = CUgraphNodeType_enum(8);
3114}
3115impl CUgraphNodeType_enum {
3116 #[doc = "< External semaphore wait node"]
3117 pub const CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT: CUgraphNodeType_enum = CUgraphNodeType_enum(9);
3118}
3119impl CUgraphNodeType_enum {
3120 #[doc = "< Memory Allocation Node"]
3121 pub const CU_GRAPH_NODE_TYPE_MEM_ALLOC: CUgraphNodeType_enum = CUgraphNodeType_enum(10);
3122}
3123impl CUgraphNodeType_enum {
3124 #[doc = "< Memory Free Node"]
3125 pub const CU_GRAPH_NODE_TYPE_MEM_FREE: CUgraphNodeType_enum = CUgraphNodeType_enum(11);
3126}
3127impl CUgraphNodeType_enum {
3128 #[doc = "< Batch MemOp Node"]
3129 pub const CU_GRAPH_NODE_TYPE_BATCH_MEM_OP: CUgraphNodeType_enum = CUgraphNodeType_enum(12);
3130}
3131impl CUgraphNodeType_enum {
3132 #[doc = "< Conditional Node\n\nMay be used to implement a conditional execution path or loop\ninside of a graph. The graph(s) contained within the body of the conditional node\ncan be selectively executed or iterated upon based on the value of a conditional\nvariable.\n\nHandles must be created in advance of creating the node\nusing ::cuGraphConditionalHandleCreate.\n\nThe following restrictions apply to graphs which contain conditional nodes:\nThe graph cannot be used in a child node.\nOnly one instantiation of the graph may exist at any point in time.\nThe graph cannot be cloned.\n\nTo set the control value, supply a default value when creating the handle and/or\ncall ::cudaGraphSetConditional from device code."]
3133 pub const CU_GRAPH_NODE_TYPE_CONDITIONAL: CUgraphNodeType_enum = CUgraphNodeType_enum(13);
3134}
3135#[repr(transparent)]
3136#[doc = " Graph node types"]
3137#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3138pub struct CUgraphNodeType_enum(pub ::std::os::raw::c_uint);
3139#[doc = " Graph node types"]
3140pub use self::CUgraphNodeType_enum as CUgraphNodeType;
3141impl CUgraphDependencyType_enum {
3142 #[doc = "< This is an ordinary dependency."]
3143 pub const CU_GRAPH_DEPENDENCY_TYPE_DEFAULT: CUgraphDependencyType_enum =
3144 CUgraphDependencyType_enum(0);
3145}
3146impl CUgraphDependencyType_enum {
3147 #[doc = "< This dependency type allows the downstream node to\nuse \\c cudaGridDependencySynchronize(). It may only be used\nbetween kernel nodes, and must be used with either the\n::CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC or\n::CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER outgoing port."]
3148 pub const CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC: CUgraphDependencyType_enum =
3149 CUgraphDependencyType_enum(1);
3150}
3151#[repr(transparent)]
3152#[doc = " Type annotations that can be applied to graph edges as part of ::CUgraphEdgeData."]
3153#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3154pub struct CUgraphDependencyType_enum(pub ::std::os::raw::c_uint);
3155#[doc = " Type annotations that can be applied to graph edges as part of ::CUgraphEdgeData."]
3156pub use self::CUgraphDependencyType_enum as CUgraphDependencyType;
3157#[doc = " Optional annotation for edges in a CUDA graph. Note, all edges implicitly have annotations and\n default to a zero-initialized value if not specified. A zero-initialized struct indicates a\n standard full serialization of two nodes with memory visibility."]
3158#[repr(C)]
3159#[derive(Debug, Copy, Clone)]
3160pub struct CUgraphEdgeData_st {
3161 #[doc = "< This indicates when the dependency is triggered from the upstream\nnode on the edge. The meaning is specfic to the node type. A value\nof 0 in all cases means full completion of the upstream node, with\nmemory visibility to the downstream node or portion thereof\n(indicated by \\c to_port).\n<br>\nOnly kernel nodes define non-zero ports. A kernel node\ncan use the following output port types:\n::CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, ::CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC,\nor ::CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER."]
3162 pub from_port: ::std::os::raw::c_uchar,
3163 #[doc = "< This indicates what portion of the downstream node is dependent on\nthe upstream node or portion thereof (indicated by \\c from_port). The\nmeaning is specific to the node type. A value of 0 in all cases means\nthe entirety of the downstream node is dependent on the upstream work.\n<br>\nCurrently no node types define non-zero ports. Accordingly, this field\nmust be set to zero."]
3164 pub to_port: ::std::os::raw::c_uchar,
3165 #[doc = "< This should be populated with a value from ::CUgraphDependencyType. (It\nis typed as char due to compiler-specific layout of bitfields.) See\n::CUgraphDependencyType."]
3166 pub type_: ::std::os::raw::c_uchar,
3167 #[doc = "< These bytes are unused and must be zeroed. This ensures\ncompatibility if additional fields are added in the future."]
3168 pub reserved: [::std::os::raw::c_uchar; 5usize],
3169}
3170#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3171const _: () = {
3172 ["Size of CUgraphEdgeData_st"][::std::mem::size_of::<CUgraphEdgeData_st>() - 8usize];
3173 ["Alignment of CUgraphEdgeData_st"][::std::mem::align_of::<CUgraphEdgeData_st>() - 1usize];
3174 ["Offset of field: CUgraphEdgeData_st::from_port"]
3175 [::std::mem::offset_of!(CUgraphEdgeData_st, from_port) - 0usize];
3176 ["Offset of field: CUgraphEdgeData_st::to_port"]
3177 [::std::mem::offset_of!(CUgraphEdgeData_st, to_port) - 1usize];
3178 ["Offset of field: CUgraphEdgeData_st::type_"]
3179 [::std::mem::offset_of!(CUgraphEdgeData_st, type_) - 2usize];
3180 ["Offset of field: CUgraphEdgeData_st::reserved"]
3181 [::std::mem::offset_of!(CUgraphEdgeData_st, reserved) - 3usize];
3182};
3183#[doc = " Optional annotation for edges in a CUDA graph. Note, all edges implicitly have annotations and\n default to a zero-initialized value if not specified. A zero-initialized struct indicates a\n standard full serialization of two nodes with memory visibility."]
3184pub type CUgraphEdgeData = CUgraphEdgeData_st;
3185impl CUgraphInstantiateResult_enum {
3186 #[doc = "< Instantiation succeeded"]
3187 pub const CUDA_GRAPH_INSTANTIATE_SUCCESS: CUgraphInstantiateResult_enum =
3188 CUgraphInstantiateResult_enum(0);
3189}
3190impl CUgraphInstantiateResult_enum {
3191 #[doc = "< Instantiation failed for an unexpected reason which is described in the return value of the function"]
3192 pub const CUDA_GRAPH_INSTANTIATE_ERROR: CUgraphInstantiateResult_enum =
3193 CUgraphInstantiateResult_enum(1);
3194}
3195impl CUgraphInstantiateResult_enum {
3196 #[doc = "< Instantiation failed due to invalid structure, such as cycles"]
3197 pub const CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE: CUgraphInstantiateResult_enum =
3198 CUgraphInstantiateResult_enum(2);
3199}
3200impl CUgraphInstantiateResult_enum {
3201 #[doc = "< Instantiation for device launch failed because the graph contained an unsupported operation"]
3202 pub const CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED: CUgraphInstantiateResult_enum =
3203 CUgraphInstantiateResult_enum(3);
3204}
3205impl CUgraphInstantiateResult_enum {
3206 #[doc = "< Instantiation for device launch failed due to the nodes belonging to different contexts"]
3207 pub const CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED: CUgraphInstantiateResult_enum =
3208 CUgraphInstantiateResult_enum(4);
3209}
3210#[repr(transparent)]
3211#[doc = " Graph instantiation results"]
3212#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3213pub struct CUgraphInstantiateResult_enum(pub ::std::os::raw::c_uint);
3214#[doc = " Graph instantiation results"]
3215pub use self::CUgraphInstantiateResult_enum as CUgraphInstantiateResult;
3216#[doc = " Graph instantiation parameters"]
3217#[repr(C)]
3218#[derive(Debug, Copy, Clone)]
3219pub struct CUDA_GRAPH_INSTANTIATE_PARAMS_st {
3220 #[doc = "< Instantiation flags"]
3221 pub flags: cuuint64_t,
3222 #[doc = "< Upload stream"]
3223 pub hUploadStream: CUstream,
3224 #[doc = "< The node which caused instantiation to fail, if any"]
3225 pub hErrNode_out: CUgraphNode,
3226 #[doc = "< Whether instantiation was successful. If it failed, the reason why"]
3227 pub result_out: CUgraphInstantiateResult,
3228}
3229#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3230const _: () = {
3231 ["Size of CUDA_GRAPH_INSTANTIATE_PARAMS_st"]
3232 [::std::mem::size_of::<CUDA_GRAPH_INSTANTIATE_PARAMS_st>() - 32usize];
3233 ["Alignment of CUDA_GRAPH_INSTANTIATE_PARAMS_st"]
3234 [::std::mem::align_of::<CUDA_GRAPH_INSTANTIATE_PARAMS_st>() - 8usize];
3235 ["Offset of field: CUDA_GRAPH_INSTANTIATE_PARAMS_st::flags"]
3236 [::std::mem::offset_of!(CUDA_GRAPH_INSTANTIATE_PARAMS_st, flags) - 0usize];
3237 ["Offset of field: CUDA_GRAPH_INSTANTIATE_PARAMS_st::hUploadStream"]
3238 [::std::mem::offset_of!(CUDA_GRAPH_INSTANTIATE_PARAMS_st, hUploadStream) - 8usize];
3239 ["Offset of field: CUDA_GRAPH_INSTANTIATE_PARAMS_st::hErrNode_out"]
3240 [::std::mem::offset_of!(CUDA_GRAPH_INSTANTIATE_PARAMS_st, hErrNode_out) - 16usize];
3241 ["Offset of field: CUDA_GRAPH_INSTANTIATE_PARAMS_st::result_out"]
3242 [::std::mem::offset_of!(CUDA_GRAPH_INSTANTIATE_PARAMS_st, result_out) - 24usize];
3243};
3244#[doc = " Graph instantiation parameters"]
3245pub type CUDA_GRAPH_INSTANTIATE_PARAMS = CUDA_GRAPH_INSTANTIATE_PARAMS_st;
3246impl CUsynchronizationPolicy_enum {
3247 pub const CU_SYNC_POLICY_AUTO: CUsynchronizationPolicy_enum = CUsynchronizationPolicy_enum(1);
3248}
3249impl CUsynchronizationPolicy_enum {
3250 pub const CU_SYNC_POLICY_SPIN: CUsynchronizationPolicy_enum = CUsynchronizationPolicy_enum(2);
3251}
3252impl CUsynchronizationPolicy_enum {
3253 pub const CU_SYNC_POLICY_YIELD: CUsynchronizationPolicy_enum = CUsynchronizationPolicy_enum(3);
3254}
3255impl CUsynchronizationPolicy_enum {
3256 pub const CU_SYNC_POLICY_BLOCKING_SYNC: CUsynchronizationPolicy_enum =
3257 CUsynchronizationPolicy_enum(4);
3258}
3259#[repr(transparent)]
3260#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3261pub struct CUsynchronizationPolicy_enum(pub ::std::os::raw::c_uint);
3262pub use self::CUsynchronizationPolicy_enum as CUsynchronizationPolicy;
3263impl CUclusterSchedulingPolicy_enum {
3264 #[doc = "< the default policy"]
3265 pub const CU_CLUSTER_SCHEDULING_POLICY_DEFAULT: CUclusterSchedulingPolicy_enum =
3266 CUclusterSchedulingPolicy_enum(0);
3267}
3268impl CUclusterSchedulingPolicy_enum {
3269 #[doc = "< spread the blocks within a cluster to the SMs"]
3270 pub const CU_CLUSTER_SCHEDULING_POLICY_SPREAD: CUclusterSchedulingPolicy_enum =
3271 CUclusterSchedulingPolicy_enum(1);
3272}
3273impl CUclusterSchedulingPolicy_enum {
3274 #[doc = "< allow the hardware to load-balance the blocks in a cluster to the SMs"]
3275 pub const CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING: CUclusterSchedulingPolicy_enum =
3276 CUclusterSchedulingPolicy_enum(2);
3277}
3278#[repr(transparent)]
3279#[doc = " Cluster scheduling policies. These may be passed to ::cuFuncSetAttribute or ::cuKernelSetAttribute"]
3280#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3281pub struct CUclusterSchedulingPolicy_enum(pub ::std::os::raw::c_uint);
3282#[doc = " Cluster scheduling policies. These may be passed to ::cuFuncSetAttribute or ::cuKernelSetAttribute"]
3283pub use self::CUclusterSchedulingPolicy_enum as CUclusterSchedulingPolicy;
3284impl CUlaunchMemSyncDomain_enum {
3285 #[doc = "< Launch kernels in the default domain"]
3286 pub const CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT: CUlaunchMemSyncDomain_enum =
3287 CUlaunchMemSyncDomain_enum(0);
3288}
3289impl CUlaunchMemSyncDomain_enum {
3290 #[doc = "< Launch kernels in the remote domain"]
3291 pub const CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE: CUlaunchMemSyncDomain_enum =
3292 CUlaunchMemSyncDomain_enum(1);
3293}
3294#[repr(transparent)]
3295#[doc = " Memory Synchronization Domain\n\n A kernel can be launched in a specified memory synchronization domain that affects all memory operations issued by\n that kernel. A memory barrier issued in one domain will only order memory operations in that domain, thus eliminating\n latency increase from memory barriers ordering unrelated traffic.\n\n By default, kernels are launched in domain 0. Kernel launched with ::CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a\n different domain ID. User may also alter the domain ID with ::CUlaunchMemSyncDomainMap for a specific stream /\n graph node / kernel launch. See ::CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN, ::cuStreamSetAttribute, ::cuLaunchKernelEx,\n ::cuGraphKernelNodeSetAttribute.\n\n Memory operations done in kernels launched in different domains are considered system-scope distanced. In other\n words, a GPU scoped memory synchronization is not sufficient for memory order to be observed by kernels in another\n memory synchronization domain even if they are on the same GPU."]
3296#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3297pub struct CUlaunchMemSyncDomain_enum(pub ::std::os::raw::c_uint);
3298#[doc = " Memory Synchronization Domain\n\n A kernel can be launched in a specified memory synchronization domain that affects all memory operations issued by\n that kernel. A memory barrier issued in one domain will only order memory operations in that domain, thus eliminating\n latency increase from memory barriers ordering unrelated traffic.\n\n By default, kernels are launched in domain 0. Kernel launched with ::CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a\n different domain ID. User may also alter the domain ID with ::CUlaunchMemSyncDomainMap for a specific stream /\n graph node / kernel launch. See ::CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN, ::cuStreamSetAttribute, ::cuLaunchKernelEx,\n ::cuGraphKernelNodeSetAttribute.\n\n Memory operations done in kernels launched in different domains are considered system-scope distanced. In other\n words, a GPU scoped memory synchronization is not sufficient for memory order to be observed by kernels in another\n memory synchronization domain even if they are on the same GPU."]
3299pub use self::CUlaunchMemSyncDomain_enum as CUlaunchMemSyncDomain;
3300#[doc = " Memory Synchronization Domain map\n\n See ::cudaLaunchMemSyncDomain.\n\n By default, kernels are launched in domain 0. Kernel launched with ::CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a\n different domain ID. User may also alter the domain ID with ::CUlaunchMemSyncDomainMap for a specific stream /\n graph node / kernel launch. See ::CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP.\n\n Domain ID range is available through ::CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT."]
3301#[repr(C)]
3302#[derive(Debug, Copy, Clone)]
3303pub struct CUlaunchMemSyncDomainMap_st {
3304 #[doc = "< The default domain ID to use for designated kernels"]
3305 pub default_: ::std::os::raw::c_uchar,
3306 #[doc = "< The remote domain ID to use for designated kernels"]
3307 pub remote: ::std::os::raw::c_uchar,
3308}
3309#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3310const _: () = {
3311 ["Size of CUlaunchMemSyncDomainMap_st"]
3312 [::std::mem::size_of::<CUlaunchMemSyncDomainMap_st>() - 2usize];
3313 ["Alignment of CUlaunchMemSyncDomainMap_st"]
3314 [::std::mem::align_of::<CUlaunchMemSyncDomainMap_st>() - 1usize];
3315 ["Offset of field: CUlaunchMemSyncDomainMap_st::default_"]
3316 [::std::mem::offset_of!(CUlaunchMemSyncDomainMap_st, default_) - 0usize];
3317 ["Offset of field: CUlaunchMemSyncDomainMap_st::remote"]
3318 [::std::mem::offset_of!(CUlaunchMemSyncDomainMap_st, remote) - 1usize];
3319};
3320#[doc = " Memory Synchronization Domain map\n\n See ::cudaLaunchMemSyncDomain.\n\n By default, kernels are launched in domain 0. Kernel launched with ::CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a\n different domain ID. User may also alter the domain ID with ::CUlaunchMemSyncDomainMap for a specific stream /\n graph node / kernel launch. See ::CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP.\n\n Domain ID range is available through ::CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT."]
3321pub type CUlaunchMemSyncDomainMap = CUlaunchMemSyncDomainMap_st;
3322impl CUlaunchAttributeID_enum {
3323 #[doc = "< Ignored entry, for convenient composition"]
3324 pub const CU_LAUNCH_ATTRIBUTE_IGNORE: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(0);
3325}
3326impl CUlaunchAttributeID_enum {
3327 #[doc = "< Valid for streams, graph nodes, launches. See\n::CUlaunchAttributeValue::accessPolicyWindow."]
3328 pub const CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW: CUlaunchAttributeID_enum =
3329 CUlaunchAttributeID_enum(1);
3330}
3331impl CUlaunchAttributeID_enum {
3332 #[doc = "< Valid for graph nodes, launches. See\n::CUlaunchAttributeValue::cooperative."]
3333 pub const CU_LAUNCH_ATTRIBUTE_COOPERATIVE: CUlaunchAttributeID_enum =
3334 CUlaunchAttributeID_enum(2);
3335}
3336impl CUlaunchAttributeID_enum {
3337 #[doc = "< Valid for streams. See\n::CUlaunchAttributeValue::syncPolicy."]
3338 pub const CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY: CUlaunchAttributeID_enum =
3339 CUlaunchAttributeID_enum(3);
3340}
3341impl CUlaunchAttributeID_enum {
3342 #[doc = "< Valid for graph nodes, launches. See ::CUlaunchAttributeValue::clusterDim."]
3343 pub const CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION: CUlaunchAttributeID_enum =
3344 CUlaunchAttributeID_enum(4);
3345}
3346impl CUlaunchAttributeID_enum {
3347 #[doc = "< Valid for graph nodes, launches. See ::CUlaunchAttributeValue::clusterSchedulingPolicyPreference."]
3348 pub const CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE: CUlaunchAttributeID_enum =
3349 CUlaunchAttributeID_enum(5);
3350}
3351impl CUlaunchAttributeID_enum {
3352 #[doc = "< Valid for launches. Setting\n::CUlaunchAttributeValue::programmaticStreamSerializationAllowed\nto non-0 signals that the kernel will use programmatic\nmeans to resolve its stream dependency, so that the\nCUDA runtime should opportunistically allow the grid's\nexecution to overlap with the previous kernel in the\nstream, if that kernel requests the overlap. The\ndependent launches can choose to wait on the\ndependency using the programmatic sync\n(cudaGridDependencySynchronize() or equivalent PTX\ninstructions)."]
3353 pub const CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION: CUlaunchAttributeID_enum =
3354 CUlaunchAttributeID_enum(6);
3355}
3356impl CUlaunchAttributeID_enum {
3357 #[doc = "< Valid for launches. Set\n::CUlaunchAttributeValue::programmaticEvent to\nrecord the event. 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. Note\nalso this type of dependency allows, but does not\nguarantee, concurrent execution of tasks.\n<br>\nThe event supplied must not be an interprocess or\ninterop event. The event must disable timing (i.e.\nmust be created with the ::CU_EVENT_DISABLE_TIMING\nflag set)."]
3358 pub const CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT: CUlaunchAttributeID_enum =
3359 CUlaunchAttributeID_enum(7);
3360}
3361impl CUlaunchAttributeID_enum {
3362 #[doc = "< Valid for streams, graph nodes, launches. See\n::CUlaunchAttributeValue::priority."]
3363 pub const CU_LAUNCH_ATTRIBUTE_PRIORITY: CUlaunchAttributeID_enum = CUlaunchAttributeID_enum(8);
3364}
3365impl CUlaunchAttributeID_enum {
3366 #[doc = "< Valid for streams, graph nodes, launches. See\n::CUlaunchAttributeValue::memSyncDomainMap."]
3367 pub const CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP: CUlaunchAttributeID_enum =
3368 CUlaunchAttributeID_enum(9);
3369}
3370impl CUlaunchAttributeID_enum {
3371 #[doc = "< Valid for streams, graph nodes, launches. See\n::CUlaunchAttributeValue::memSyncDomain."]
3372 pub const CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN: CUlaunchAttributeID_enum =
3373 CUlaunchAttributeID_enum(10);
3374}
3375impl CUlaunchAttributeID_enum {
3376 #[doc = "< Valid for launches. Set\n::CUlaunchAttributeValue::launchCompletionEvent to record the\nevent.\n<br>\nNominally, the event is triggered once all blocks of the kernel\nhave begun execution. Currently this is a best effort. If a kernel\nB has a launch completion dependency on a kernel A, B may wait\nuntil A is complete. Alternatively, blocks of B may begin before\nall blocks of A have begun, for example if B can claim execution\nresources unavailable to A (e.g. they run on different GPUs) or\nif B is a higher priority than A.\nExercise caution if such an ordering inversion could lead\nto deadlock.\n<br>\nA launch completion event is nominally similar to a programmatic\nevent with \\c triggerAtBlockStart set except that it is not\nvisible to \\c cudaGridDependencySynchronize() and can be used with\ncompute capability less than 9.0.\n<br>\nThe event supplied must not be an interprocess or interop\nevent. The event must disable timing (i.e. must be created\nwith the ::CU_EVENT_DISABLE_TIMING flag set)."]
3377 pub const CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT: CUlaunchAttributeID_enum =
3378 CUlaunchAttributeID_enum(12);
3379}
3380impl CUlaunchAttributeID_enum {
3381 #[doc = "< Valid for graph nodes, launches. This attribute is graphs-only,\nand passing it to a launch in a non-capturing stream will result\nin an error.\n<br>\n::CUlaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable can\nonly be set to 0 or 1. Setting the field to 1 indicates that the\ncorresponding kernel node should be device-updatable. On success, a handle\nwill be returned via\n::CUlaunchAttributeValue::deviceUpdatableKernelNode::devNode which can be\npassed to the various device-side update functions to update the node's\nkernel parameters from within another kernel. For more information on the\ntypes of device updates that can be made, as well as the relevant limitations\nthereof, see ::cudaGraphKernelNodeUpdatesApply.\n<br>\nNodes which are device-updatable have additional restrictions compared to\nregular kernel nodes. Firstly, device-updatable nodes cannot be removed\nfrom their graph via ::cuGraphDestroyNode. Additionally, once opted-in\nto this functionality, a node cannot opt out, and any attempt to set the\ndeviceUpdatable attribute to 0 will result in an error. Device-updatable\nkernel nodes also cannot have their attributes copied to/from another kernel\nnode via ::cuGraphKernelNodeCopyAttributes. Graphs containing one or more\ndevice-updatable nodes also do not allow multiple instantiation, and neither\nthe graph nor its instantiated version can be passed to ::cuGraphExecUpdate.\n<br>\nIf a graph contains device-updatable nodes and updates those nodes from the device\nfrom within the graph, the graph must be uploaded with ::cuGraphUpload before it\nis launched. For such a graph, if host-side executable graph updates are made to the\ndevice-updatable nodes, the graph must be uploaded before it is launched again."]
3382 pub const CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE: CUlaunchAttributeID_enum =
3383 CUlaunchAttributeID_enum(13);
3384}
3385impl CUlaunchAttributeID_enum {
3386 #[doc = "< Valid for launches. On devices where the L1 cache and shared memory use the\nsame hardware resources, setting ::CUlaunchAttributeValue::sharedMemCarveout to a\npercentage between 0-100 signals the CUDA driver to set the shared memory carveout\npreference, in percent of the total shared memory for that kernel launch.\nThis attribute takes precedence over ::CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT.\nThis is only a hint, and the CUDA driver can choose a different configuration if\nrequired for the launch."]
3387 pub const CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: CUlaunchAttributeID_enum =
3388 CUlaunchAttributeID_enum(14);
3389}
3390#[repr(transparent)]
3391#[doc = " Launch attributes enum; used as id field of ::CUlaunchAttribute"]
3392#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3393pub struct CUlaunchAttributeID_enum(pub ::std::os::raw::c_uint);
3394#[doc = " Launch attributes enum; used as id field of ::CUlaunchAttribute"]
3395pub use self::CUlaunchAttributeID_enum as CUlaunchAttributeID;
3396#[doc = " Launch attributes union; used as value field of ::CUlaunchAttribute"]
3397#[repr(C)]
3398#[derive(Copy, Clone)]
3399pub union CUlaunchAttributeValue_union {
3400 pub pad: [::std::os::raw::c_char; 64usize],
3401 #[doc = "< Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW."]
3402 pub accessPolicyWindow: CUaccessPolicyWindow,
3403 #[doc = "< Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero indicates a cooperative\nkernel (see ::cuLaunchCooperativeKernel)."]
3404 pub cooperative: ::std::os::raw::c_int,
3405 #[doc = "< Value of launch attribute\n::CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. ::CUsynchronizationPolicy for\nwork queued up in this stream"]
3406 pub syncPolicy: CUsynchronizationPolicy,
3407 pub clusterDim: CUlaunchAttributeValue_union__bindgen_ty_1,
3408 #[doc = "< Value of launch attribute\n::CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster\nscheduling policy preference for the kernel."]
3409 pub clusterSchedulingPolicyPreference: CUclusterSchedulingPolicy,
3410 #[doc = "< Value of launch attribute\n::CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION."]
3411 pub programmaticStreamSerializationAllowed: ::std::os::raw::c_int,
3412 pub programmaticEvent: CUlaunchAttributeValue_union__bindgen_ty_2,
3413 pub launchCompletionEvent: CUlaunchAttributeValue_union__bindgen_ty_3,
3414 #[doc = "< Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution priority of the kernel."]
3415 pub priority: ::std::os::raw::c_int,
3416 #[doc = "< Value of launch attribute\n::CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. See\n::CUlaunchMemSyncDomainMap."]
3417 pub memSyncDomainMap: CUlaunchMemSyncDomainMap,
3418 #[doc = "< Value of launch attribute\n::CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. See::CUlaunchMemSyncDomain"]
3419 pub memSyncDomain: CUlaunchMemSyncDomain,
3420 pub deviceUpdatableKernelNode: CUlaunchAttributeValue_union__bindgen_ty_4,
3421 #[doc = "< Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT."]
3422 pub sharedMemCarveout: ::std::os::raw::c_uint,
3423}
3424#[doc = " Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION that\n represents the desired cluster dimensions for the kernel. Opaque type\n with the following fields:\n - \\p x - The X dimension of the cluster, in blocks. Must be a divisor\n of the grid X dimension.\n - \\p y - The Y dimension of the cluster, in blocks. Must be a divisor\n of the grid Y dimension.\n - \\p z - The Z dimension of the cluster, in blocks. Must be a divisor\n of the grid Z dimension."]
3425#[repr(C)]
3426#[derive(Debug, Copy, Clone)]
3427pub struct CUlaunchAttributeValue_union__bindgen_ty_1 {
3428 pub x: ::std::os::raw::c_uint,
3429 pub y: ::std::os::raw::c_uint,
3430 pub z: ::std::os::raw::c_uint,
3431}
3432#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3433const _: () = {
3434 ["Size of CUlaunchAttributeValue_union__bindgen_ty_1"]
3435 [::std::mem::size_of::<CUlaunchAttributeValue_union__bindgen_ty_1>() - 12usize];
3436 ["Alignment of CUlaunchAttributeValue_union__bindgen_ty_1"]
3437 [::std::mem::align_of::<CUlaunchAttributeValue_union__bindgen_ty_1>() - 4usize];
3438 ["Offset of field: CUlaunchAttributeValue_union__bindgen_ty_1::x"]
3439 [::std::mem::offset_of!(CUlaunchAttributeValue_union__bindgen_ty_1, x) - 0usize];
3440 ["Offset of field: CUlaunchAttributeValue_union__bindgen_ty_1::y"]
3441 [::std::mem::offset_of!(CUlaunchAttributeValue_union__bindgen_ty_1, y) - 4usize];
3442 ["Offset of field: CUlaunchAttributeValue_union__bindgen_ty_1::z"]
3443 [::std::mem::offset_of!(CUlaunchAttributeValue_union__bindgen_ty_1, z) - 8usize];
3444};
3445#[doc = " Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT\n with the following fields:\n - \\p CUevent event - Event to fire when all blocks trigger it.\n - \\p Event record flags, see ::cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL.\n - \\p triggerAtBlockStart - If this is set to non-0, each block launch will automatically trigger the event."]
3446#[repr(C)]
3447#[derive(Debug, Copy, Clone)]
3448pub struct CUlaunchAttributeValue_union__bindgen_ty_2 {
3449 pub event: CUevent,
3450 pub flags: ::std::os::raw::c_int,
3451 pub triggerAtBlockStart: ::std::os::raw::c_int,
3452}
3453#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3454const _: () = {
3455 ["Size of CUlaunchAttributeValue_union__bindgen_ty_2"]
3456 [::std::mem::size_of::<CUlaunchAttributeValue_union__bindgen_ty_2>() - 16usize];
3457 ["Alignment of CUlaunchAttributeValue_union__bindgen_ty_2"]
3458 [::std::mem::align_of::<CUlaunchAttributeValue_union__bindgen_ty_2>() - 8usize];
3459 ["Offset of field: CUlaunchAttributeValue_union__bindgen_ty_2::event"]
3460 [::std::mem::offset_of!(CUlaunchAttributeValue_union__bindgen_ty_2, event) - 0usize];
3461 ["Offset of field: CUlaunchAttributeValue_union__bindgen_ty_2::flags"]
3462 [::std::mem::offset_of!(CUlaunchAttributeValue_union__bindgen_ty_2, flags) - 8usize];
3463 ["Offset of field: CUlaunchAttributeValue_union__bindgen_ty_2::triggerAtBlockStart"][::std::mem::offset_of!(
3464 CUlaunchAttributeValue_union__bindgen_ty_2,
3465 triggerAtBlockStart
3466 )
3467 - 12usize];
3468};
3469#[doc = " Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT\n with the following fields:\n - \\p CUevent event - Event to fire when the last block launches\n - \\p int flags; - Event record flags, see ::cuEventRecordWithFlags. Does not accept ::CU_EVENT_RECORD_EXTERNAL."]
3470#[repr(C)]
3471#[derive(Debug, Copy, Clone)]
3472pub struct CUlaunchAttributeValue_union__bindgen_ty_3 {
3473 pub event: CUevent,
3474 pub flags: ::std::os::raw::c_int,
3475}
3476#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3477const _: () = {
3478 ["Size of CUlaunchAttributeValue_union__bindgen_ty_3"]
3479 [::std::mem::size_of::<CUlaunchAttributeValue_union__bindgen_ty_3>() - 16usize];
3480 ["Alignment of CUlaunchAttributeValue_union__bindgen_ty_3"]
3481 [::std::mem::align_of::<CUlaunchAttributeValue_union__bindgen_ty_3>() - 8usize];
3482 ["Offset of field: CUlaunchAttributeValue_union__bindgen_ty_3::event"]
3483 [::std::mem::offset_of!(CUlaunchAttributeValue_union__bindgen_ty_3, event) - 0usize];
3484 ["Offset of field: CUlaunchAttributeValue_union__bindgen_ty_3::flags"]
3485 [::std::mem::offset_of!(CUlaunchAttributeValue_union__bindgen_ty_3, flags) - 8usize];
3486};
3487#[doc = " Value of launch attribute ::CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE.\n with the following fields:\n - \\p int deviceUpdatable - Whether or not the resulting kernel node should be device-updatable.\n - \\p CUgraphDeviceNode devNode - Returns a handle to pass to the various device-side update functions."]
3488#[repr(C)]
3489#[derive(Debug, Copy, Clone)]
3490pub struct CUlaunchAttributeValue_union__bindgen_ty_4 {
3491 pub deviceUpdatable: ::std::os::raw::c_int,
3492 pub devNode: CUgraphDeviceNode,
3493}
3494#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3495const _: () = {
3496 ["Size of CUlaunchAttributeValue_union__bindgen_ty_4"]
3497 [::std::mem::size_of::<CUlaunchAttributeValue_union__bindgen_ty_4>() - 16usize];
3498 ["Alignment of CUlaunchAttributeValue_union__bindgen_ty_4"]
3499 [::std::mem::align_of::<CUlaunchAttributeValue_union__bindgen_ty_4>() - 8usize];
3500 ["Offset of field: CUlaunchAttributeValue_union__bindgen_ty_4::deviceUpdatable"][::std::mem::offset_of!(
3501 CUlaunchAttributeValue_union__bindgen_ty_4,
3502 deviceUpdatable
3503 ) - 0usize];
3504 ["Offset of field: CUlaunchAttributeValue_union__bindgen_ty_4::devNode"]
3505 [::std::mem::offset_of!(CUlaunchAttributeValue_union__bindgen_ty_4, devNode) - 8usize];
3506};
3507#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3508const _: () = {
3509 ["Size of CUlaunchAttributeValue_union"]
3510 [::std::mem::size_of::<CUlaunchAttributeValue_union>() - 64usize];
3511 ["Alignment of CUlaunchAttributeValue_union"]
3512 [::std::mem::align_of::<CUlaunchAttributeValue_union>() - 8usize];
3513 ["Offset of field: CUlaunchAttributeValue_union::pad"]
3514 [::std::mem::offset_of!(CUlaunchAttributeValue_union, pad) - 0usize];
3515 ["Offset of field: CUlaunchAttributeValue_union::accessPolicyWindow"]
3516 [::std::mem::offset_of!(CUlaunchAttributeValue_union, accessPolicyWindow) - 0usize];
3517 ["Offset of field: CUlaunchAttributeValue_union::cooperative"]
3518 [::std::mem::offset_of!(CUlaunchAttributeValue_union, cooperative) - 0usize];
3519 ["Offset of field: CUlaunchAttributeValue_union::syncPolicy"]
3520 [::std::mem::offset_of!(CUlaunchAttributeValue_union, syncPolicy) - 0usize];
3521 ["Offset of field: CUlaunchAttributeValue_union::clusterDim"]
3522 [::std::mem::offset_of!(CUlaunchAttributeValue_union, clusterDim) - 0usize];
3523 ["Offset of field: CUlaunchAttributeValue_union::clusterSchedulingPolicyPreference"][::std::mem::offset_of!(
3524 CUlaunchAttributeValue_union,
3525 clusterSchedulingPolicyPreference
3526 )
3527 - 0usize];
3528 ["Offset of field: CUlaunchAttributeValue_union::programmaticStreamSerializationAllowed"][::std::mem::offset_of!(
3529 CUlaunchAttributeValue_union,
3530 programmaticStreamSerializationAllowed
3531 )
3532 - 0usize];
3533 ["Offset of field: CUlaunchAttributeValue_union::programmaticEvent"]
3534 [::std::mem::offset_of!(CUlaunchAttributeValue_union, programmaticEvent) - 0usize];
3535 ["Offset of field: CUlaunchAttributeValue_union::launchCompletionEvent"]
3536 [::std::mem::offset_of!(CUlaunchAttributeValue_union, launchCompletionEvent) - 0usize];
3537 ["Offset of field: CUlaunchAttributeValue_union::priority"]
3538 [::std::mem::offset_of!(CUlaunchAttributeValue_union, priority) - 0usize];
3539 ["Offset of field: CUlaunchAttributeValue_union::memSyncDomainMap"]
3540 [::std::mem::offset_of!(CUlaunchAttributeValue_union, memSyncDomainMap) - 0usize];
3541 ["Offset of field: CUlaunchAttributeValue_union::memSyncDomain"]
3542 [::std::mem::offset_of!(CUlaunchAttributeValue_union, memSyncDomain) - 0usize];
3543 ["Offset of field: CUlaunchAttributeValue_union::deviceUpdatableKernelNode"]
3544 [::std::mem::offset_of!(CUlaunchAttributeValue_union, deviceUpdatableKernelNode) - 0usize];
3545 ["Offset of field: CUlaunchAttributeValue_union::sharedMemCarveout"]
3546 [::std::mem::offset_of!(CUlaunchAttributeValue_union, sharedMemCarveout) - 0usize];
3547};
3548#[doc = " Launch attributes union; used as value field of ::CUlaunchAttribute"]
3549pub type CUlaunchAttributeValue = CUlaunchAttributeValue_union;
3550#[doc = " Launch attribute"]
3551#[repr(C)]
3552#[derive(Copy, Clone)]
3553pub struct CUlaunchAttribute_st {
3554 #[doc = "< Attribute to set"]
3555 pub id: CUlaunchAttributeID,
3556 pub pad: [::std::os::raw::c_char; 4usize],
3557 #[doc = "< Value of the attribute"]
3558 pub value: CUlaunchAttributeValue,
3559}
3560#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3561const _: () = {
3562 ["Size of CUlaunchAttribute_st"][::std::mem::size_of::<CUlaunchAttribute_st>() - 72usize];
3563 ["Alignment of CUlaunchAttribute_st"][::std::mem::align_of::<CUlaunchAttribute_st>() - 8usize];
3564 ["Offset of field: CUlaunchAttribute_st::id"]
3565 [::std::mem::offset_of!(CUlaunchAttribute_st, id) - 0usize];
3566 ["Offset of field: CUlaunchAttribute_st::pad"]
3567 [::std::mem::offset_of!(CUlaunchAttribute_st, pad) - 4usize];
3568 ["Offset of field: CUlaunchAttribute_st::value"]
3569 [::std::mem::offset_of!(CUlaunchAttribute_st, value) - 8usize];
3570};
3571#[doc = " Launch attribute"]
3572pub type CUlaunchAttribute = CUlaunchAttribute_st;
3573#[doc = " CUDA extensible launch configuration"]
3574#[repr(C)]
3575#[derive(Debug, Copy, Clone)]
3576pub struct CUlaunchConfig_st {
3577 #[doc = "< Width of grid in blocks"]
3578 pub gridDimX: ::std::os::raw::c_uint,
3579 #[doc = "< Height of grid in blocks"]
3580 pub gridDimY: ::std::os::raw::c_uint,
3581 #[doc = "< Depth of grid in blocks"]
3582 pub gridDimZ: ::std::os::raw::c_uint,
3583 #[doc = "< X dimension of each thread block"]
3584 pub blockDimX: ::std::os::raw::c_uint,
3585 #[doc = "< Y dimension of each thread block"]
3586 pub blockDimY: ::std::os::raw::c_uint,
3587 #[doc = "< Z dimension of each thread block"]
3588 pub blockDimZ: ::std::os::raw::c_uint,
3589 #[doc = "< Dynamic shared-memory size per thread block in bytes"]
3590 pub sharedMemBytes: ::std::os::raw::c_uint,
3591 #[doc = "< Stream identifier"]
3592 pub hStream: CUstream,
3593 #[doc = "< List of attributes; nullable if ::CUlaunchConfig::numAttrs == 0"]
3594 pub attrs: *mut CUlaunchAttribute,
3595 #[doc = "< Number of attributes populated in ::CUlaunchConfig::attrs"]
3596 pub numAttrs: ::std::os::raw::c_uint,
3597}
3598#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3599const _: () = {
3600 ["Size of CUlaunchConfig_st"][::std::mem::size_of::<CUlaunchConfig_st>() - 56usize];
3601 ["Alignment of CUlaunchConfig_st"][::std::mem::align_of::<CUlaunchConfig_st>() - 8usize];
3602 ["Offset of field: CUlaunchConfig_st::gridDimX"]
3603 [::std::mem::offset_of!(CUlaunchConfig_st, gridDimX) - 0usize];
3604 ["Offset of field: CUlaunchConfig_st::gridDimY"]
3605 [::std::mem::offset_of!(CUlaunchConfig_st, gridDimY) - 4usize];
3606 ["Offset of field: CUlaunchConfig_st::gridDimZ"]
3607 [::std::mem::offset_of!(CUlaunchConfig_st, gridDimZ) - 8usize];
3608 ["Offset of field: CUlaunchConfig_st::blockDimX"]
3609 [::std::mem::offset_of!(CUlaunchConfig_st, blockDimX) - 12usize];
3610 ["Offset of field: CUlaunchConfig_st::blockDimY"]
3611 [::std::mem::offset_of!(CUlaunchConfig_st, blockDimY) - 16usize];
3612 ["Offset of field: CUlaunchConfig_st::blockDimZ"]
3613 [::std::mem::offset_of!(CUlaunchConfig_st, blockDimZ) - 20usize];
3614 ["Offset of field: CUlaunchConfig_st::sharedMemBytes"]
3615 [::std::mem::offset_of!(CUlaunchConfig_st, sharedMemBytes) - 24usize];
3616 ["Offset of field: CUlaunchConfig_st::hStream"]
3617 [::std::mem::offset_of!(CUlaunchConfig_st, hStream) - 32usize];
3618 ["Offset of field: CUlaunchConfig_st::attrs"]
3619 [::std::mem::offset_of!(CUlaunchConfig_st, attrs) - 40usize];
3620 ["Offset of field: CUlaunchConfig_st::numAttrs"]
3621 [::std::mem::offset_of!(CUlaunchConfig_st, numAttrs) - 48usize];
3622};
3623#[doc = " CUDA extensible launch configuration"]
3624pub type CUlaunchConfig = CUlaunchConfig_st;
3625#[doc = " Launch attributes enum; used as id field of ::CUlaunchAttribute"]
3626pub use self::CUlaunchAttributeID as CUkernelNodeAttrID;
3627#[doc = " Launch attributes union; used as value field of ::CUlaunchAttribute"]
3628pub type CUkernelNodeAttrValue_v1 = CUlaunchAttributeValue;
3629#[doc = " Launch attributes union; used as value field of ::CUlaunchAttribute"]
3630pub type CUkernelNodeAttrValue = CUkernelNodeAttrValue_v1;
3631impl CUstreamCaptureStatus_enum {
3632 #[doc = "< Stream is not capturing"]
3633 pub const CU_STREAM_CAPTURE_STATUS_NONE: CUstreamCaptureStatus_enum =
3634 CUstreamCaptureStatus_enum(0);
3635}
3636impl CUstreamCaptureStatus_enum {
3637 #[doc = "< Stream is actively capturing"]
3638 pub const CU_STREAM_CAPTURE_STATUS_ACTIVE: CUstreamCaptureStatus_enum =
3639 CUstreamCaptureStatus_enum(1);
3640}
3641impl CUstreamCaptureStatus_enum {
3642 #[doc = "< Stream is part of a capture sequence that\nhas been invalidated, but not terminated"]
3643 pub const CU_STREAM_CAPTURE_STATUS_INVALIDATED: CUstreamCaptureStatus_enum =
3644 CUstreamCaptureStatus_enum(2);
3645}
3646#[repr(transparent)]
3647#[doc = " Possible stream capture statuses returned by ::cuStreamIsCapturing"]
3648#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3649pub struct CUstreamCaptureStatus_enum(pub ::std::os::raw::c_uint);
3650#[doc = " Possible stream capture statuses returned by ::cuStreamIsCapturing"]
3651pub use self::CUstreamCaptureStatus_enum as CUstreamCaptureStatus;
3652impl CUstreamCaptureMode_enum {
3653 pub const CU_STREAM_CAPTURE_MODE_GLOBAL: CUstreamCaptureMode_enum = CUstreamCaptureMode_enum(0);
3654}
3655impl CUstreamCaptureMode_enum {
3656 pub const CU_STREAM_CAPTURE_MODE_THREAD_LOCAL: CUstreamCaptureMode_enum =
3657 CUstreamCaptureMode_enum(1);
3658}
3659impl CUstreamCaptureMode_enum {
3660 pub const CU_STREAM_CAPTURE_MODE_RELAXED: CUstreamCaptureMode_enum =
3661 CUstreamCaptureMode_enum(2);
3662}
3663#[repr(transparent)]
3664#[doc = " Possible modes for stream capture thread interactions. For more details see\n ::cuStreamBeginCapture and ::cuThreadExchangeStreamCaptureMode"]
3665#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3666pub struct CUstreamCaptureMode_enum(pub ::std::os::raw::c_uint);
3667#[doc = " Launch attributes enum; used as id field of ::CUlaunchAttribute"]
3668pub use self::CUlaunchAttributeID as CUstreamAttrID;
3669#[doc = " Possible modes for stream capture thread interactions. For more details see\n ::cuStreamBeginCapture and ::cuThreadExchangeStreamCaptureMode"]
3670pub use self::CUstreamCaptureMode_enum as CUstreamCaptureMode;
3671#[doc = " Launch attributes union; used as value field of ::CUlaunchAttribute"]
3672pub type CUstreamAttrValue_v1 = CUlaunchAttributeValue;
3673#[doc = " Launch attributes union; used as value field of ::CUlaunchAttribute"]
3674pub type CUstreamAttrValue = CUstreamAttrValue_v1;
3675impl CUdriverProcAddress_flags_enum {
3676 #[doc = "< Default search mode for driver symbols."]
3677 pub const CU_GET_PROC_ADDRESS_DEFAULT: CUdriverProcAddress_flags_enum =
3678 CUdriverProcAddress_flags_enum(0);
3679}
3680impl CUdriverProcAddress_flags_enum {
3681 #[doc = "< Search for legacy versions of driver symbols."]
3682 pub const CU_GET_PROC_ADDRESS_LEGACY_STREAM: CUdriverProcAddress_flags_enum =
3683 CUdriverProcAddress_flags_enum(1);
3684}
3685impl CUdriverProcAddress_flags_enum {
3686 #[doc = "< Search for per-thread versions of driver symbols."]
3687 pub const CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM: CUdriverProcAddress_flags_enum =
3688 CUdriverProcAddress_flags_enum(2);
3689}
3690#[repr(transparent)]
3691#[doc = " Flags to specify search options. For more details see ::cuGetProcAddress"]
3692#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3693pub struct CUdriverProcAddress_flags_enum(pub ::std::os::raw::c_uint);
3694#[doc = " Flags to specify search options. For more details see ::cuGetProcAddress"]
3695pub use self::CUdriverProcAddress_flags_enum as CUdriverProcAddress_flags;
3696impl CUdriverProcAddressQueryResult_enum {
3697 #[doc = "< Symbol was succesfully found"]
3698 pub const CU_GET_PROC_ADDRESS_SUCCESS: CUdriverProcAddressQueryResult_enum =
3699 CUdriverProcAddressQueryResult_enum(0);
3700}
3701impl CUdriverProcAddressQueryResult_enum {
3702 #[doc = "< Symbol was not found in search"]
3703 pub const CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND: CUdriverProcAddressQueryResult_enum =
3704 CUdriverProcAddressQueryResult_enum(1);
3705}
3706impl CUdriverProcAddressQueryResult_enum {
3707 #[doc = "< Symbol was found but version supplied was not sufficient"]
3708 pub const CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT: CUdriverProcAddressQueryResult_enum =
3709 CUdriverProcAddressQueryResult_enum(2);
3710}
3711#[repr(transparent)]
3712#[doc = " Flags to indicate search status. For more details see ::cuGetProcAddress"]
3713#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3714pub struct CUdriverProcAddressQueryResult_enum(pub ::std::os::raw::c_uint);
3715#[doc = " Flags to indicate search status. For more details see ::cuGetProcAddress"]
3716pub use self::CUdriverProcAddressQueryResult_enum as CUdriverProcAddressQueryResult;
3717impl CUexecAffinityType_enum {
3718 #[doc = "< Create a context with limited SMs."]
3719 pub const CU_EXEC_AFFINITY_TYPE_SM_COUNT: CUexecAffinityType_enum = CUexecAffinityType_enum(0);
3720}
3721impl CUexecAffinityType_enum {
3722 pub const CU_EXEC_AFFINITY_TYPE_MAX: CUexecAffinityType_enum = CUexecAffinityType_enum(1);
3723}
3724#[repr(transparent)]
3725#[doc = " Execution Affinity Types"]
3726#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3727pub struct CUexecAffinityType_enum(pub ::std::os::raw::c_uint);
3728#[doc = " Execution Affinity Types"]
3729pub use self::CUexecAffinityType_enum as CUexecAffinityType;
3730#[doc = " Value for ::CU_EXEC_AFFINITY_TYPE_SM_COUNT"]
3731#[repr(C)]
3732#[derive(Debug, Copy, Clone)]
3733pub struct CUexecAffinitySmCount_st {
3734 #[doc = "< The number of SMs the context is limited to use."]
3735 pub val: ::std::os::raw::c_uint,
3736}
3737#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3738const _: () = {
3739 ["Size of CUexecAffinitySmCount_st"]
3740 [::std::mem::size_of::<CUexecAffinitySmCount_st>() - 4usize];
3741 ["Alignment of CUexecAffinitySmCount_st"]
3742 [::std::mem::align_of::<CUexecAffinitySmCount_st>() - 4usize];
3743 ["Offset of field: CUexecAffinitySmCount_st::val"]
3744 [::std::mem::offset_of!(CUexecAffinitySmCount_st, val) - 0usize];
3745};
3746#[doc = " Value for ::CU_EXEC_AFFINITY_TYPE_SM_COUNT"]
3747pub type CUexecAffinitySmCount_v1 = CUexecAffinitySmCount_st;
3748#[doc = " Value for ::CU_EXEC_AFFINITY_TYPE_SM_COUNT"]
3749pub type CUexecAffinitySmCount = CUexecAffinitySmCount_v1;
3750#[doc = " Execution Affinity Parameters"]
3751#[repr(C)]
3752#[derive(Copy, Clone)]
3753pub struct CUexecAffinityParam_st {
3754 pub type_: CUexecAffinityType,
3755 pub param: CUexecAffinityParam_st__bindgen_ty_1,
3756}
3757#[repr(C)]
3758#[derive(Copy, Clone)]
3759pub union CUexecAffinityParam_st__bindgen_ty_1 {
3760 pub smCount: CUexecAffinitySmCount,
3761}
3762#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3763const _: () = {
3764 ["Size of CUexecAffinityParam_st__bindgen_ty_1"]
3765 [::std::mem::size_of::<CUexecAffinityParam_st__bindgen_ty_1>() - 4usize];
3766 ["Alignment of CUexecAffinityParam_st__bindgen_ty_1"]
3767 [::std::mem::align_of::<CUexecAffinityParam_st__bindgen_ty_1>() - 4usize];
3768 ["Offset of field: CUexecAffinityParam_st__bindgen_ty_1::smCount"]
3769 [::std::mem::offset_of!(CUexecAffinityParam_st__bindgen_ty_1, smCount) - 0usize];
3770};
3771#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3772const _: () = {
3773 ["Size of CUexecAffinityParam_st"][::std::mem::size_of::<CUexecAffinityParam_st>() - 8usize];
3774 ["Alignment of CUexecAffinityParam_st"]
3775 [::std::mem::align_of::<CUexecAffinityParam_st>() - 4usize];
3776 ["Offset of field: CUexecAffinityParam_st::type_"]
3777 [::std::mem::offset_of!(CUexecAffinityParam_st, type_) - 0usize];
3778 ["Offset of field: CUexecAffinityParam_st::param"]
3779 [::std::mem::offset_of!(CUexecAffinityParam_st, param) - 4usize];
3780};
3781#[doc = " Execution Affinity Parameters"]
3782pub type CUexecAffinityParam_v1 = CUexecAffinityParam_st;
3783#[doc = " Execution Affinity Parameters"]
3784pub type CUexecAffinityParam = CUexecAffinityParam_v1;
3785impl CUcigDataType_enum {
3786 pub const CIG_DATA_TYPE_D3D12_COMMAND_QUEUE: CUcigDataType_enum = CUcigDataType_enum(1);
3787}
3788#[repr(transparent)]
3789#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3790pub struct CUcigDataType_enum(pub ::std::os::raw::c_uint);
3791pub use self::CUcigDataType_enum as CUcigDataType;
3792#[doc = " CIG Context Create Params"]
3793#[repr(C)]
3794#[derive(Debug, Copy, Clone)]
3795pub struct CUctxCigParam_st {
3796 pub sharedDataType: CUcigDataType,
3797 pub sharedData: *mut ::std::os::raw::c_void,
3798}
3799#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3800const _: () = {
3801 ["Size of CUctxCigParam_st"][::std::mem::size_of::<CUctxCigParam_st>() - 16usize];
3802 ["Alignment of CUctxCigParam_st"][::std::mem::align_of::<CUctxCigParam_st>() - 8usize];
3803 ["Offset of field: CUctxCigParam_st::sharedDataType"]
3804 [::std::mem::offset_of!(CUctxCigParam_st, sharedDataType) - 0usize];
3805 ["Offset of field: CUctxCigParam_st::sharedData"]
3806 [::std::mem::offset_of!(CUctxCigParam_st, sharedData) - 8usize];
3807};
3808#[doc = " CIG Context Create Params"]
3809pub type CUctxCigParam = CUctxCigParam_st;
3810#[doc = " Params for creating CUDA context\n Exactly one of execAffinityParams and cigParams\n must be non-NULL."]
3811#[repr(C)]
3812#[derive(Debug, Copy, Clone)]
3813pub struct CUctxCreateParams_st {
3814 pub execAffinityParams: *mut CUexecAffinityParam,
3815 pub numExecAffinityParams: ::std::os::raw::c_int,
3816 pub cigParams: *mut CUctxCigParam,
3817}
3818#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3819const _: () = {
3820 ["Size of CUctxCreateParams_st"][::std::mem::size_of::<CUctxCreateParams_st>() - 24usize];
3821 ["Alignment of CUctxCreateParams_st"][::std::mem::align_of::<CUctxCreateParams_st>() - 8usize];
3822 ["Offset of field: CUctxCreateParams_st::execAffinityParams"]
3823 [::std::mem::offset_of!(CUctxCreateParams_st, execAffinityParams) - 0usize];
3824 ["Offset of field: CUctxCreateParams_st::numExecAffinityParams"]
3825 [::std::mem::offset_of!(CUctxCreateParams_st, numExecAffinityParams) - 8usize];
3826 ["Offset of field: CUctxCreateParams_st::cigParams"]
3827 [::std::mem::offset_of!(CUctxCreateParams_st, cigParams) - 16usize];
3828};
3829#[doc = " Params for creating CUDA context\n Exactly one of execAffinityParams and cigParams\n must be non-NULL."]
3830pub type CUctxCreateParams = CUctxCreateParams_st;
3831impl CUlibraryOption_enum {
3832 pub const CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE: CUlibraryOption_enum =
3833 CUlibraryOption_enum(0);
3834}
3835impl CUlibraryOption_enum {
3836 #[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."]
3837 pub const CU_LIBRARY_BINARY_IS_PRESERVED: CUlibraryOption_enum = CUlibraryOption_enum(1);
3838}
3839impl CUlibraryOption_enum {
3840 #[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."]
3841 pub const CU_LIBRARY_NUM_OPTIONS: CUlibraryOption_enum = CUlibraryOption_enum(2);
3842}
3843#[repr(transparent)]
3844#[doc = " Library options to be specified with ::cuLibraryLoadData() or ::cuLibraryLoadFromFile()"]
3845#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
3846pub struct CUlibraryOption_enum(pub ::std::os::raw::c_uint);
3847#[doc = " Library options to be specified with ::cuLibraryLoadData() or ::cuLibraryLoadFromFile()"]
3848pub use self::CUlibraryOption_enum as CUlibraryOption;
3849#[repr(C)]
3850#[derive(Debug, Copy, Clone)]
3851pub struct CUlibraryHostUniversalFunctionAndDataTable_st {
3852 pub functionTable: *mut ::std::os::raw::c_void,
3853 pub functionWindowSize: usize,
3854 pub dataTable: *mut ::std::os::raw::c_void,
3855 pub dataWindowSize: usize,
3856}
3857#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3858const _: () = {
3859 ["Size of CUlibraryHostUniversalFunctionAndDataTable_st"]
3860 [::std::mem::size_of::<CUlibraryHostUniversalFunctionAndDataTable_st>() - 32usize];
3861 ["Alignment of CUlibraryHostUniversalFunctionAndDataTable_st"]
3862 [::std::mem::align_of::<CUlibraryHostUniversalFunctionAndDataTable_st>() - 8usize];
3863 ["Offset of field: CUlibraryHostUniversalFunctionAndDataTable_st::functionTable"][::std::mem::offset_of!(
3864 CUlibraryHostUniversalFunctionAndDataTable_st,
3865 functionTable
3866 ) - 0usize];
3867 ["Offset of field: CUlibraryHostUniversalFunctionAndDataTable_st::functionWindowSize"][::std::mem::offset_of!(
3868 CUlibraryHostUniversalFunctionAndDataTable_st,
3869 functionWindowSize
3870 )
3871 - 8usize];
3872 ["Offset of field: CUlibraryHostUniversalFunctionAndDataTable_st::dataTable"][::std::mem::offset_of!(
3873 CUlibraryHostUniversalFunctionAndDataTable_st,
3874 dataTable
3875 ) - 16usize];
3876 ["Offset of field: CUlibraryHostUniversalFunctionAndDataTable_st::dataWindowSize"][::std::mem::offset_of!(
3877 CUlibraryHostUniversalFunctionAndDataTable_st,
3878 dataWindowSize
3879 ) - 24usize];
3880};
3881pub type CUlibraryHostUniversalFunctionAndDataTable = CUlibraryHostUniversalFunctionAndDataTable_st;
3882impl cudaError_enum {
3883 #[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())."]
3884 pub const CUDA_SUCCESS: cudaError_enum = cudaError_enum(0);
3885}
3886impl cudaError_enum {
3887 #[doc = " This indicates that one or more of the parameters passed to the API call\n is not within an acceptable range of values."]
3888 pub const CUDA_ERROR_INVALID_VALUE: cudaError_enum = cudaError_enum(1);
3889}
3890impl cudaError_enum {
3891 #[doc = " The API call failed because it was unable to allocate enough memory or\n other resources to perform the requested operation."]
3892 pub const CUDA_ERROR_OUT_OF_MEMORY: cudaError_enum = cudaError_enum(2);
3893}
3894impl cudaError_enum {
3895 #[doc = " This indicates that the CUDA driver has not been initialized with\n ::cuInit() or that initialization has failed."]
3896 pub const CUDA_ERROR_NOT_INITIALIZED: cudaError_enum = cudaError_enum(3);
3897}
3898impl cudaError_enum {
3899 #[doc = " This indicates that the CUDA driver is in the process of shutting down."]
3900 pub const CUDA_ERROR_DEINITIALIZED: cudaError_enum = cudaError_enum(4);
3901}
3902impl cudaError_enum {
3903 #[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."]
3904 pub const CUDA_ERROR_PROFILER_DISABLED: cudaError_enum = cudaError_enum(5);
3905}
3906impl cudaError_enum {
3907 #[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."]
3908 pub const CUDA_ERROR_PROFILER_NOT_INITIALIZED: cudaError_enum = cudaError_enum(6);
3909}
3910impl cudaError_enum {
3911 #[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."]
3912 pub const CUDA_ERROR_PROFILER_ALREADY_STARTED: cudaError_enum = cudaError_enum(7);
3913}
3914impl cudaError_enum {
3915 #[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."]
3916 pub const CUDA_ERROR_PROFILER_ALREADY_STOPPED: cudaError_enum = cudaError_enum(8);
3917}
3918impl cudaError_enum {
3919 #[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."]
3920 pub const CUDA_ERROR_STUB_LIBRARY: cudaError_enum = cudaError_enum(34);
3921}
3922impl cudaError_enum {
3923 #[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."]
3924 pub const CUDA_ERROR_DEVICE_UNAVAILABLE: cudaError_enum = cudaError_enum(46);
3925}
3926impl cudaError_enum {
3927 #[doc = " This indicates that no CUDA-capable devices were detected by the installed\n CUDA driver."]
3928 pub const CUDA_ERROR_NO_DEVICE: cudaError_enum = cudaError_enum(100);
3929}
3930impl cudaError_enum {
3931 #[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."]
3932 pub const CUDA_ERROR_INVALID_DEVICE: cudaError_enum = cudaError_enum(101);
3933}
3934impl cudaError_enum {
3935 #[doc = " This error indicates that the Grid license is not applied."]
3936 pub const CUDA_ERROR_DEVICE_NOT_LICENSED: cudaError_enum = cudaError_enum(102);
3937}
3938impl cudaError_enum {
3939 #[doc = " This indicates that the device kernel image is invalid. This can also\n indicate an invalid CUDA module."]
3940 pub const CUDA_ERROR_INVALID_IMAGE: cudaError_enum = cudaError_enum(200);
3941}
3942impl cudaError_enum {
3943 #[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.\n This can also be returned if the green context passed to an API call\n was not converted to a ::CUcontext using ::cuCtxFromGreenCtx API."]
3944 pub const CUDA_ERROR_INVALID_CONTEXT: cudaError_enum = cudaError_enum(201);
3945}
3946impl cudaError_enum {
3947 #[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()."]
3948 pub const CUDA_ERROR_CONTEXT_ALREADY_CURRENT: cudaError_enum = cudaError_enum(202);
3949}
3950impl cudaError_enum {
3951 #[doc = " This indicates that a map or register operation has failed."]
3952 pub const CUDA_ERROR_MAP_FAILED: cudaError_enum = cudaError_enum(205);
3953}
3954impl cudaError_enum {
3955 #[doc = " This indicates that an unmap or unregister operation has failed."]
3956 pub const CUDA_ERROR_UNMAP_FAILED: cudaError_enum = cudaError_enum(206);
3957}
3958impl cudaError_enum {
3959 #[doc = " This indicates that the specified array is currently mapped and thus\n cannot be destroyed."]
3960 pub const CUDA_ERROR_ARRAY_IS_MAPPED: cudaError_enum = cudaError_enum(207);
3961}
3962impl cudaError_enum {
3963 #[doc = " This indicates that the resource is already mapped."]
3964 pub const CUDA_ERROR_ALREADY_MAPPED: cudaError_enum = cudaError_enum(208);
3965}
3966impl cudaError_enum {
3967 #[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."]
3968 pub const CUDA_ERROR_NO_BINARY_FOR_GPU: cudaError_enum = cudaError_enum(209);
3969}
3970impl cudaError_enum {
3971 #[doc = " This indicates that a resource has already been acquired."]
3972 pub const CUDA_ERROR_ALREADY_ACQUIRED: cudaError_enum = cudaError_enum(210);
3973}
3974impl cudaError_enum {
3975 #[doc = " This indicates that a resource is not mapped."]
3976 pub const CUDA_ERROR_NOT_MAPPED: cudaError_enum = cudaError_enum(211);
3977}
3978impl cudaError_enum {
3979 #[doc = " This indicates that a mapped resource is not available for access as an\n array."]
3980 pub const CUDA_ERROR_NOT_MAPPED_AS_ARRAY: cudaError_enum = cudaError_enum(212);
3981}
3982impl cudaError_enum {
3983 #[doc = " This indicates that a mapped resource is not available for access as a\n pointer."]
3984 pub const CUDA_ERROR_NOT_MAPPED_AS_POINTER: cudaError_enum = cudaError_enum(213);
3985}
3986impl cudaError_enum {
3987 #[doc = " This indicates that an uncorrectable ECC error was detected during\n execution."]
3988 pub const CUDA_ERROR_ECC_UNCORRECTABLE: cudaError_enum = cudaError_enum(214);
3989}
3990impl cudaError_enum {
3991 #[doc = " This indicates that the ::CUlimit passed to the API call is not\n supported by the active device."]
3992 pub const CUDA_ERROR_UNSUPPORTED_LIMIT: cudaError_enum = cudaError_enum(215);
3993}
3994impl cudaError_enum {
3995 #[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."]
3996 pub const CUDA_ERROR_CONTEXT_ALREADY_IN_USE: cudaError_enum = cudaError_enum(216);
3997}
3998impl cudaError_enum {
3999 #[doc = " This indicates that peer access is not supported across the given\n devices."]
4000 pub const CUDA_ERROR_PEER_ACCESS_UNSUPPORTED: cudaError_enum = cudaError_enum(217);
4001}
4002impl cudaError_enum {
4003 #[doc = " This indicates that a PTX JIT compilation failed."]
4004 pub const CUDA_ERROR_INVALID_PTX: cudaError_enum = cudaError_enum(218);
4005}
4006impl cudaError_enum {
4007 #[doc = " This indicates an error with OpenGL or DirectX context."]
4008 pub const CUDA_ERROR_INVALID_GRAPHICS_CONTEXT: cudaError_enum = cudaError_enum(219);
4009}
4010impl cudaError_enum {
4011 #[doc = " This indicates that an uncorrectable NVLink error was detected during the\n execution."]
4012 pub const CUDA_ERROR_NVLINK_UNCORRECTABLE: cudaError_enum = cudaError_enum(220);
4013}
4014impl cudaError_enum {
4015 #[doc = " This indicates that the PTX JIT compiler library was not found."]
4016 pub const CUDA_ERROR_JIT_COMPILER_NOT_FOUND: cudaError_enum = cudaError_enum(221);
4017}
4018impl cudaError_enum {
4019 #[doc = " This indicates that the provided PTX was compiled with an unsupported toolchain."]
4020 pub const CUDA_ERROR_UNSUPPORTED_PTX_VERSION: cudaError_enum = cudaError_enum(222);
4021}
4022impl cudaError_enum {
4023 #[doc = " This indicates that the PTX JIT compilation was disabled."]
4024 pub const CUDA_ERROR_JIT_COMPILATION_DISABLED: cudaError_enum = cudaError_enum(223);
4025}
4026impl cudaError_enum {
4027 #[doc = " This indicates that the ::CUexecAffinityType passed to the API call is not\n supported by the active device."]
4028 pub const CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY: cudaError_enum = cudaError_enum(224);
4029}
4030impl cudaError_enum {
4031 #[doc = " This indicates that the code to be compiled by the PTX JIT contains\n unsupported call to cudaDeviceSynchronize."]
4032 pub const CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC: cudaError_enum = cudaError_enum(225);
4033}
4034impl cudaError_enum {
4035 #[doc = " This indicates that the device kernel source is invalid. This includes\n compilation/linker errors encountered in device code or user error."]
4036 pub const CUDA_ERROR_INVALID_SOURCE: cudaError_enum = cudaError_enum(300);
4037}
4038impl cudaError_enum {
4039 #[doc = " This indicates that the file specified was not found."]
4040 pub const CUDA_ERROR_FILE_NOT_FOUND: cudaError_enum = cudaError_enum(301);
4041}
4042impl cudaError_enum {
4043 #[doc = " This indicates that a link to a shared object failed to resolve."]
4044 pub const CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND: cudaError_enum = cudaError_enum(302);
4045}
4046impl cudaError_enum {
4047 #[doc = " This indicates that initialization of a shared object failed."]
4048 pub const CUDA_ERROR_SHARED_OBJECT_INIT_FAILED: cudaError_enum = cudaError_enum(303);
4049}
4050impl cudaError_enum {
4051 #[doc = " This indicates that an OS call failed."]
4052 pub const CUDA_ERROR_OPERATING_SYSTEM: cudaError_enum = cudaError_enum(304);
4053}
4054impl cudaError_enum {
4055 #[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."]
4056 pub const CUDA_ERROR_INVALID_HANDLE: cudaError_enum = cudaError_enum(400);
4057}
4058impl cudaError_enum {
4059 #[doc = " This indicates that a resource required by the API call is not in a\n valid state to perform the requested operation."]
4060 pub const CUDA_ERROR_ILLEGAL_STATE: cudaError_enum = cudaError_enum(401);
4061}
4062impl cudaError_enum {
4063 #[doc = " This indicates an attempt was made to introspect an object in a way that\n would discard semantically important information. This is either due to\n the object using funtionality newer than the API version used to\n introspect it or omission of optional return arguments."]
4064 pub const CUDA_ERROR_LOSSY_QUERY: cudaError_enum = cudaError_enum(402);
4065}
4066impl cudaError_enum {
4067 #[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."]
4068 pub const CUDA_ERROR_NOT_FOUND: cudaError_enum = cudaError_enum(500);
4069}
4070impl cudaError_enum {
4071 #[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()."]
4072 pub const CUDA_ERROR_NOT_READY: cudaError_enum = cudaError_enum(600);
4073}
4074impl cudaError_enum {
4075 #[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."]
4076 pub const CUDA_ERROR_ILLEGAL_ADDRESS: cudaError_enum = cudaError_enum(700);
4077}
4078impl cudaError_enum {
4079 #[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."]
4080 pub const CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES: cudaError_enum = cudaError_enum(701);
4081}
4082impl cudaError_enum {
4083 #[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."]
4084 pub const CUDA_ERROR_LAUNCH_TIMEOUT: cudaError_enum = cudaError_enum(702);
4085}
4086impl cudaError_enum {
4087 #[doc = " This error indicates a kernel launch that uses an incompatible texturing\n mode."]
4088 pub const CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING: cudaError_enum = cudaError_enum(703);
4089}
4090impl cudaError_enum {
4091 #[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."]
4092 pub const CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED: cudaError_enum = cudaError_enum(704);
4093}
4094impl cudaError_enum {
4095 #[doc = " This error indicates that ::cuCtxDisablePeerAccess() is\n trying to disable peer access which has not been enabled yet\n via ::cuCtxEnablePeerAccess()."]
4096 pub const CUDA_ERROR_PEER_ACCESS_NOT_ENABLED: cudaError_enum = cudaError_enum(705);
4097}
4098impl cudaError_enum {
4099 #[doc = " This error indicates that the primary context for the specified device\n has already been initialized."]
4100 pub const CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE: cudaError_enum = cudaError_enum(708);
4101}
4102impl cudaError_enum {
4103 #[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."]
4104 pub const CUDA_ERROR_CONTEXT_IS_DESTROYED: cudaError_enum = cudaError_enum(709);
4105}
4106impl cudaError_enum {
4107 #[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."]
4108 pub const CUDA_ERROR_ASSERT: cudaError_enum = cudaError_enum(710);
4109}
4110impl cudaError_enum {
4111 #[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()."]
4112 pub const CUDA_ERROR_TOO_MANY_PEERS: cudaError_enum = cudaError_enum(711);
4113}
4114impl cudaError_enum {
4115 #[doc = " This error indicates that the memory range passed to ::cuMemHostRegister()\n has already been registered."]
4116 pub const CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED: cudaError_enum = cudaError_enum(712);
4117}
4118impl cudaError_enum {
4119 #[doc = " This error indicates that the pointer passed to ::cuMemHostUnregister()\n does not correspond to any currently registered memory region."]
4120 pub const CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED: cudaError_enum = cudaError_enum(713);
4121}
4122impl cudaError_enum {
4123 #[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."]
4124 pub const CUDA_ERROR_HARDWARE_STACK_ERROR: cudaError_enum = cudaError_enum(714);
4125}
4126impl cudaError_enum {
4127 #[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."]
4128 pub const CUDA_ERROR_ILLEGAL_INSTRUCTION: cudaError_enum = cudaError_enum(715);
4129}
4130impl cudaError_enum {
4131 #[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."]
4132 pub const CUDA_ERROR_MISALIGNED_ADDRESS: cudaError_enum = cudaError_enum(716);
4133}
4134impl cudaError_enum {
4135 #[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."]
4136 pub const CUDA_ERROR_INVALID_ADDRESS_SPACE: cudaError_enum = cudaError_enum(717);
4137}
4138impl cudaError_enum {
4139 #[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."]
4140 pub const CUDA_ERROR_INVALID_PC: cudaError_enum = cudaError_enum(718);
4141}
4142impl cudaError_enum {
4143 #[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."]
4144 pub const CUDA_ERROR_LAUNCH_FAILED: cudaError_enum = cudaError_enum(719);
4145}
4146impl cudaError_enum {
4147 #[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."]
4148 pub const CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE: cudaError_enum = cudaError_enum(720);
4149}
4150impl cudaError_enum {
4151 #[doc = " This error indicates that the attempted operation is not permitted."]
4152 pub const CUDA_ERROR_NOT_PERMITTED: cudaError_enum = cudaError_enum(800);
4153}
4154impl cudaError_enum {
4155 #[doc = " This error indicates that the attempted operation is not supported\n on the current system or device."]
4156 pub const CUDA_ERROR_NOT_SUPPORTED: cudaError_enum = cudaError_enum(801);
4157}
4158impl cudaError_enum {
4159 #[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."]
4160 pub const CUDA_ERROR_SYSTEM_NOT_READY: cudaError_enum = cudaError_enum(802);
4161}
4162impl cudaError_enum {
4163 #[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."]
4164 pub const CUDA_ERROR_SYSTEM_DRIVER_MISMATCH: cudaError_enum = cudaError_enum(803);
4165}
4166impl cudaError_enum {
4167 #[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."]
4168 pub const CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE: cudaError_enum = cudaError_enum(804);
4169}
4170impl cudaError_enum {
4171 #[doc = " This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server."]
4172 pub const CUDA_ERROR_MPS_CONNECTION_FAILED: cudaError_enum = cudaError_enum(805);
4173}
4174impl cudaError_enum {
4175 #[doc = " This error indicates that the remote procedural call between the MPS server and the MPS client failed."]
4176 pub const CUDA_ERROR_MPS_RPC_FAILURE: cudaError_enum = cudaError_enum(806);
4177}
4178impl cudaError_enum {
4179 #[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."]
4180 pub const CUDA_ERROR_MPS_SERVER_NOT_READY: cudaError_enum = cudaError_enum(807);
4181}
4182impl cudaError_enum {
4183 #[doc = " This error indicates that the hardware resources required to create MPS client have been exhausted."]
4184 pub const CUDA_ERROR_MPS_MAX_CLIENTS_REACHED: cudaError_enum = cudaError_enum(808);
4185}
4186impl cudaError_enum {
4187 #[doc = " This error indicates the the hardware resources required to support device connections have been exhausted."]
4188 pub const CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED: cudaError_enum = cudaError_enum(809);
4189}
4190impl cudaError_enum {
4191 #[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."]
4192 pub const CUDA_ERROR_MPS_CLIENT_TERMINATED: cudaError_enum = cudaError_enum(810);
4193}
4194impl cudaError_enum {
4195 #[doc = " This error indicates that the module is using CUDA Dynamic Parallelism, but the current configuration, like MPS, does not support it."]
4196 pub const CUDA_ERROR_CDP_NOT_SUPPORTED: cudaError_enum = cudaError_enum(811);
4197}
4198impl cudaError_enum {
4199 #[doc = " This error indicates that a module contains an unsupported interaction between different versions of CUDA Dynamic Parallelism."]
4200 pub const CUDA_ERROR_CDP_VERSION_MISMATCH: cudaError_enum = cudaError_enum(812);
4201}
4202impl cudaError_enum {
4203 #[doc = " This error indicates that the operation is not permitted when\n the stream is capturing."]
4204 pub const CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED: cudaError_enum = cudaError_enum(900);
4205}
4206impl cudaError_enum {
4207 #[doc = " This error indicates that the current capture sequence on the stream\n has been invalidated due to a previous error."]
4208 pub const CUDA_ERROR_STREAM_CAPTURE_INVALIDATED: cudaError_enum = cudaError_enum(901);
4209}
4210impl cudaError_enum {
4211 #[doc = " This error indicates that the operation would have resulted in a merge\n of two independent capture sequences."]
4212 pub const CUDA_ERROR_STREAM_CAPTURE_MERGE: cudaError_enum = cudaError_enum(902);
4213}
4214impl cudaError_enum {
4215 #[doc = " This error indicates that the capture was not initiated in this stream."]
4216 pub const CUDA_ERROR_STREAM_CAPTURE_UNMATCHED: cudaError_enum = cudaError_enum(903);
4217}
4218impl cudaError_enum {
4219 #[doc = " This error indicates that the capture sequence contains a fork that was\n not joined to the primary stream."]
4220 pub const CUDA_ERROR_STREAM_CAPTURE_UNJOINED: cudaError_enum = cudaError_enum(904);
4221}
4222impl cudaError_enum {
4223 #[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."]
4224 pub const CUDA_ERROR_STREAM_CAPTURE_ISOLATION: cudaError_enum = cudaError_enum(905);
4225}
4226impl cudaError_enum {
4227 #[doc = " This error indicates a disallowed implicit dependency on a current capture\n sequence from cudaStreamLegacy."]
4228 pub const CUDA_ERROR_STREAM_CAPTURE_IMPLICIT: cudaError_enum = cudaError_enum(906);
4229}
4230impl cudaError_enum {
4231 #[doc = " This error indicates that the operation is not permitted on an event which\n was last recorded in a capturing stream."]
4232 pub const CUDA_ERROR_CAPTURED_EVENT: cudaError_enum = cudaError_enum(907);
4233}
4234impl cudaError_enum {
4235 #[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."]
4236 pub const CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD: cudaError_enum = cudaError_enum(908);
4237}
4238impl cudaError_enum {
4239 #[doc = " This error indicates that the timeout specified for the wait operation has lapsed."]
4240 pub const CUDA_ERROR_TIMEOUT: cudaError_enum = cudaError_enum(909);
4241}
4242impl cudaError_enum {
4243 #[doc = " This error indicates that the graph update was not performed because it included\n changes which violated constraints specific to instantiated graph update."]
4244 pub const CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE: cudaError_enum = cudaError_enum(910);
4245}
4246impl cudaError_enum {
4247 #[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."]
4248 pub const CUDA_ERROR_EXTERNAL_DEVICE: cudaError_enum = cudaError_enum(911);
4249}
4250impl cudaError_enum {
4251 #[doc = " Indicates a kernel launch error due to cluster misconfiguration."]
4252 pub const CUDA_ERROR_INVALID_CLUSTER_SIZE: cudaError_enum = cudaError_enum(912);
4253}
4254impl cudaError_enum {
4255 #[doc = " Indiciates a function handle is not loaded when calling an API that requires\n a loaded function."]
4256 pub const CUDA_ERROR_FUNCTION_NOT_LOADED: cudaError_enum = cudaError_enum(913);
4257}
4258impl cudaError_enum {
4259 #[doc = " This error indicates one or more resources passed in are not valid resource\n types for the operation."]
4260 pub const CUDA_ERROR_INVALID_RESOURCE_TYPE: cudaError_enum = cudaError_enum(914);
4261}
4262impl cudaError_enum {
4263 #[doc = " This error indicates one or more resources are insufficient or non-applicable for\n the operation."]
4264 pub const CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION: cudaError_enum = cudaError_enum(915);
4265}
4266impl cudaError_enum {
4267 #[doc = " This indicates that an unknown internal error has occurred."]
4268 pub const CUDA_ERROR_UNKNOWN: cudaError_enum = cudaError_enum(999);
4269}
4270#[repr(transparent)]
4271#[doc = " Error codes"]
4272#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4273pub struct cudaError_enum(pub ::std::os::raw::c_uint);
4274#[doc = " Error codes"]
4275pub use self::cudaError_enum as CUresult;
4276impl CUdevice_P2PAttribute_enum {
4277 #[doc = "< A relative value indicating the performance of the link between two devices"]
4278 pub const CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK: CUdevice_P2PAttribute_enum =
4279 CUdevice_P2PAttribute_enum(1);
4280}
4281impl CUdevice_P2PAttribute_enum {
4282 #[doc = "< P2P Access is enable"]
4283 pub const CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED: CUdevice_P2PAttribute_enum =
4284 CUdevice_P2PAttribute_enum(2);
4285}
4286impl CUdevice_P2PAttribute_enum {
4287 #[doc = "< Atomic operation over the link supported"]
4288 pub const CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED: CUdevice_P2PAttribute_enum =
4289 CUdevice_P2PAttribute_enum(3);
4290}
4291impl CUdevice_P2PAttribute_enum {
4292 #[doc = "< \\deprecated use CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED instead"]
4293 pub const CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED: CUdevice_P2PAttribute_enum =
4294 CUdevice_P2PAttribute_enum(4);
4295}
4296impl CUdevice_P2PAttribute_enum {
4297 #[doc = "< Accessing CUDA arrays over the link supported"]
4298 pub const CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED: CUdevice_P2PAttribute_enum =
4299 CUdevice_P2PAttribute_enum(4);
4300}
4301#[repr(transparent)]
4302#[doc = " P2P Attributes"]
4303#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
4304pub struct CUdevice_P2PAttribute_enum(pub ::std::os::raw::c_uint);
4305#[doc = " P2P Attributes"]
4306pub use self::CUdevice_P2PAttribute_enum as CUdevice_P2PAttribute;
4307#[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."]
4308pub type CUstreamCallback = ::std::option::Option<
4309 unsafe extern "C" fn(
4310 hStream: CUstream,
4311 status: CUresult,
4312 userData: *mut ::std::os::raw::c_void,
4313 ),
4314>;
4315#[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."]
4316pub type CUoccupancyB2DSize =
4317 ::std::option::Option<unsafe extern "C" fn(blockSize: ::std::os::raw::c_int) -> usize>;
4318#[doc = " 2D memory copy parameters"]
4319#[repr(C)]
4320#[derive(Debug, Copy, Clone)]
4321pub struct CUDA_MEMCPY2D_st {
4322 #[doc = "< Source X in bytes"]
4323 pub srcXInBytes: usize,
4324 #[doc = "< Source Y"]
4325 pub srcY: usize,
4326 #[doc = "< Source memory type (host, device, array)"]
4327 pub srcMemoryType: CUmemorytype,
4328 #[doc = "< Source host pointer"]
4329 pub srcHost: *const ::std::os::raw::c_void,
4330 #[doc = "< Source device pointer"]
4331 pub srcDevice: CUdeviceptr,
4332 #[doc = "< Source array reference"]
4333 pub srcArray: CUarray,
4334 #[doc = "< Source pitch (ignored when src is array)"]
4335 pub srcPitch: usize,
4336 #[doc = "< Destination X in bytes"]
4337 pub dstXInBytes: usize,
4338 #[doc = "< Destination Y"]
4339 pub dstY: usize,
4340 #[doc = "< Destination memory type (host, device, array)"]
4341 pub dstMemoryType: CUmemorytype,
4342 #[doc = "< Destination host pointer"]
4343 pub dstHost: *mut ::std::os::raw::c_void,
4344 #[doc = "< Destination device pointer"]
4345 pub dstDevice: CUdeviceptr,
4346 #[doc = "< Destination array reference"]
4347 pub dstArray: CUarray,
4348 #[doc = "< Destination pitch (ignored when dst is array)"]
4349 pub dstPitch: usize,
4350 #[doc = "< Width of 2D memory copy in bytes"]
4351 pub WidthInBytes: usize,
4352 #[doc = "< Height of 2D memory copy"]
4353 pub Height: usize,
4354}
4355#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4356const _: () = {
4357 ["Size of CUDA_MEMCPY2D_st"][::std::mem::size_of::<CUDA_MEMCPY2D_st>() - 128usize];
4358 ["Alignment of CUDA_MEMCPY2D_st"][::std::mem::align_of::<CUDA_MEMCPY2D_st>() - 8usize];
4359 ["Offset of field: CUDA_MEMCPY2D_st::srcXInBytes"]
4360 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, srcXInBytes) - 0usize];
4361 ["Offset of field: CUDA_MEMCPY2D_st::srcY"]
4362 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, srcY) - 8usize];
4363 ["Offset of field: CUDA_MEMCPY2D_st::srcMemoryType"]
4364 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, srcMemoryType) - 16usize];
4365 ["Offset of field: CUDA_MEMCPY2D_st::srcHost"]
4366 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, srcHost) - 24usize];
4367 ["Offset of field: CUDA_MEMCPY2D_st::srcDevice"]
4368 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, srcDevice) - 32usize];
4369 ["Offset of field: CUDA_MEMCPY2D_st::srcArray"]
4370 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, srcArray) - 40usize];
4371 ["Offset of field: CUDA_MEMCPY2D_st::srcPitch"]
4372 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, srcPitch) - 48usize];
4373 ["Offset of field: CUDA_MEMCPY2D_st::dstXInBytes"]
4374 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, dstXInBytes) - 56usize];
4375 ["Offset of field: CUDA_MEMCPY2D_st::dstY"]
4376 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, dstY) - 64usize];
4377 ["Offset of field: CUDA_MEMCPY2D_st::dstMemoryType"]
4378 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, dstMemoryType) - 72usize];
4379 ["Offset of field: CUDA_MEMCPY2D_st::dstHost"]
4380 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, dstHost) - 80usize];
4381 ["Offset of field: CUDA_MEMCPY2D_st::dstDevice"]
4382 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, dstDevice) - 88usize];
4383 ["Offset of field: CUDA_MEMCPY2D_st::dstArray"]
4384 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, dstArray) - 96usize];
4385 ["Offset of field: CUDA_MEMCPY2D_st::dstPitch"]
4386 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, dstPitch) - 104usize];
4387 ["Offset of field: CUDA_MEMCPY2D_st::WidthInBytes"]
4388 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, WidthInBytes) - 112usize];
4389 ["Offset of field: CUDA_MEMCPY2D_st::Height"]
4390 [::std::mem::offset_of!(CUDA_MEMCPY2D_st, Height) - 120usize];
4391};
4392#[doc = " 2D memory copy parameters"]
4393pub type CUDA_MEMCPY2D_v2 = CUDA_MEMCPY2D_st;
4394#[doc = " 2D memory copy parameters"]
4395pub type CUDA_MEMCPY2D = CUDA_MEMCPY2D_v2;
4396#[doc = " 3D memory copy parameters"]
4397#[repr(C)]
4398#[derive(Debug, Copy, Clone)]
4399pub struct CUDA_MEMCPY3D_st {
4400 #[doc = "< Source X in bytes"]
4401 pub srcXInBytes: usize,
4402 #[doc = "< Source Y"]
4403 pub srcY: usize,
4404 #[doc = "< Source Z"]
4405 pub srcZ: usize,
4406 #[doc = "< Source LOD"]
4407 pub srcLOD: usize,
4408 #[doc = "< Source memory type (host, device, array)"]
4409 pub srcMemoryType: CUmemorytype,
4410 #[doc = "< Source host pointer"]
4411 pub srcHost: *const ::std::os::raw::c_void,
4412 #[doc = "< Source device pointer"]
4413 pub srcDevice: CUdeviceptr,
4414 #[doc = "< Source array reference"]
4415 pub srcArray: CUarray,
4416 #[doc = "< Must be NULL"]
4417 pub reserved0: *mut ::std::os::raw::c_void,
4418 #[doc = "< Source pitch (ignored when src is array)"]
4419 pub srcPitch: usize,
4420 #[doc = "< Source height (ignored when src is array; may be 0 if Depth==1)"]
4421 pub srcHeight: usize,
4422 #[doc = "< Destination X in bytes"]
4423 pub dstXInBytes: usize,
4424 #[doc = "< Destination Y"]
4425 pub dstY: usize,
4426 #[doc = "< Destination Z"]
4427 pub dstZ: usize,
4428 #[doc = "< Destination LOD"]
4429 pub dstLOD: usize,
4430 #[doc = "< Destination memory type (host, device, array)"]
4431 pub dstMemoryType: CUmemorytype,
4432 #[doc = "< Destination host pointer"]
4433 pub dstHost: *mut ::std::os::raw::c_void,
4434 #[doc = "< Destination device pointer"]
4435 pub dstDevice: CUdeviceptr,
4436 #[doc = "< Destination array reference"]
4437 pub dstArray: CUarray,
4438 #[doc = "< Must be NULL"]
4439 pub reserved1: *mut ::std::os::raw::c_void,
4440 #[doc = "< Destination pitch (ignored when dst is array)"]
4441 pub dstPitch: usize,
4442 #[doc = "< Destination height (ignored when dst is array; may be 0 if Depth==1)"]
4443 pub dstHeight: usize,
4444 #[doc = "< Width of 3D memory copy in bytes"]
4445 pub WidthInBytes: usize,
4446 #[doc = "< Height of 3D memory copy"]
4447 pub Height: usize,
4448 #[doc = "< Depth of 3D memory copy"]
4449 pub Depth: usize,
4450}
4451#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4452const _: () = {
4453 ["Size of CUDA_MEMCPY3D_st"][::std::mem::size_of::<CUDA_MEMCPY3D_st>() - 200usize];
4454 ["Alignment of CUDA_MEMCPY3D_st"][::std::mem::align_of::<CUDA_MEMCPY3D_st>() - 8usize];
4455 ["Offset of field: CUDA_MEMCPY3D_st::srcXInBytes"]
4456 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, srcXInBytes) - 0usize];
4457 ["Offset of field: CUDA_MEMCPY3D_st::srcY"]
4458 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, srcY) - 8usize];
4459 ["Offset of field: CUDA_MEMCPY3D_st::srcZ"]
4460 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, srcZ) - 16usize];
4461 ["Offset of field: CUDA_MEMCPY3D_st::srcLOD"]
4462 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, srcLOD) - 24usize];
4463 ["Offset of field: CUDA_MEMCPY3D_st::srcMemoryType"]
4464 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, srcMemoryType) - 32usize];
4465 ["Offset of field: CUDA_MEMCPY3D_st::srcHost"]
4466 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, srcHost) - 40usize];
4467 ["Offset of field: CUDA_MEMCPY3D_st::srcDevice"]
4468 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, srcDevice) - 48usize];
4469 ["Offset of field: CUDA_MEMCPY3D_st::srcArray"]
4470 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, srcArray) - 56usize];
4471 ["Offset of field: CUDA_MEMCPY3D_st::reserved0"]
4472 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, reserved0) - 64usize];
4473 ["Offset of field: CUDA_MEMCPY3D_st::srcPitch"]
4474 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, srcPitch) - 72usize];
4475 ["Offset of field: CUDA_MEMCPY3D_st::srcHeight"]
4476 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, srcHeight) - 80usize];
4477 ["Offset of field: CUDA_MEMCPY3D_st::dstXInBytes"]
4478 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, dstXInBytes) - 88usize];
4479 ["Offset of field: CUDA_MEMCPY3D_st::dstY"]
4480 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, dstY) - 96usize];
4481 ["Offset of field: CUDA_MEMCPY3D_st::dstZ"]
4482 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, dstZ) - 104usize];
4483 ["Offset of field: CUDA_MEMCPY3D_st::dstLOD"]
4484 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, dstLOD) - 112usize];
4485 ["Offset of field: CUDA_MEMCPY3D_st::dstMemoryType"]
4486 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, dstMemoryType) - 120usize];
4487 ["Offset of field: CUDA_MEMCPY3D_st::dstHost"]
4488 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, dstHost) - 128usize];
4489 ["Offset of field: CUDA_MEMCPY3D_st::dstDevice"]
4490 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, dstDevice) - 136usize];
4491 ["Offset of field: CUDA_MEMCPY3D_st::dstArray"]
4492 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, dstArray) - 144usize];
4493 ["Offset of field: CUDA_MEMCPY3D_st::reserved1"]
4494 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, reserved1) - 152usize];
4495 ["Offset of field: CUDA_MEMCPY3D_st::dstPitch"]
4496 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, dstPitch) - 160usize];
4497 ["Offset of field: CUDA_MEMCPY3D_st::dstHeight"]
4498 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, dstHeight) - 168usize];
4499 ["Offset of field: CUDA_MEMCPY3D_st::WidthInBytes"]
4500 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, WidthInBytes) - 176usize];
4501 ["Offset of field: CUDA_MEMCPY3D_st::Height"]
4502 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, Height) - 184usize];
4503 ["Offset of field: CUDA_MEMCPY3D_st::Depth"]
4504 [::std::mem::offset_of!(CUDA_MEMCPY3D_st, Depth) - 192usize];
4505};
4506#[doc = " 3D memory copy parameters"]
4507pub type CUDA_MEMCPY3D_v2 = CUDA_MEMCPY3D_st;
4508#[doc = " 3D memory copy parameters"]
4509pub type CUDA_MEMCPY3D = CUDA_MEMCPY3D_v2;
4510#[doc = " 3D memory cross-context copy parameters"]
4511#[repr(C)]
4512#[derive(Debug, Copy, Clone)]
4513pub struct CUDA_MEMCPY3D_PEER_st {
4514 #[doc = "< Source X in bytes"]
4515 pub srcXInBytes: usize,
4516 #[doc = "< Source Y"]
4517 pub srcY: usize,
4518 #[doc = "< Source Z"]
4519 pub srcZ: usize,
4520 #[doc = "< Source LOD"]
4521 pub srcLOD: usize,
4522 #[doc = "< Source memory type (host, device, array)"]
4523 pub srcMemoryType: CUmemorytype,
4524 #[doc = "< Source host pointer"]
4525 pub srcHost: *const ::std::os::raw::c_void,
4526 #[doc = "< Source device pointer"]
4527 pub srcDevice: CUdeviceptr,
4528 #[doc = "< Source array reference"]
4529 pub srcArray: CUarray,
4530 #[doc = "< Source context (ignored with srcMemoryType is ::CU_MEMORYTYPE_ARRAY)"]
4531 pub srcContext: CUcontext,
4532 #[doc = "< Source pitch (ignored when src is array)"]
4533 pub srcPitch: usize,
4534 #[doc = "< Source height (ignored when src is array; may be 0 if Depth==1)"]
4535 pub srcHeight: usize,
4536 #[doc = "< Destination X in bytes"]
4537 pub dstXInBytes: usize,
4538 #[doc = "< Destination Y"]
4539 pub dstY: usize,
4540 #[doc = "< Destination Z"]
4541 pub dstZ: usize,
4542 #[doc = "< Destination LOD"]
4543 pub dstLOD: usize,
4544 #[doc = "< Destination memory type (host, device, array)"]
4545 pub dstMemoryType: CUmemorytype,
4546 #[doc = "< Destination host pointer"]
4547 pub dstHost: *mut ::std::os::raw::c_void,
4548 #[doc = "< Destination device pointer"]
4549 pub dstDevice: CUdeviceptr,
4550 #[doc = "< Destination array reference"]
4551 pub dstArray: CUarray,
4552 #[doc = "< Destination context (ignored with dstMemoryType is ::CU_MEMORYTYPE_ARRAY)"]
4553 pub dstContext: CUcontext,
4554 #[doc = "< Destination pitch (ignored when dst is array)"]
4555 pub dstPitch: usize,
4556 #[doc = "< Destination height (ignored when dst is array; may be 0 if Depth==1)"]
4557 pub dstHeight: usize,
4558 #[doc = "< Width of 3D memory copy in bytes"]
4559 pub WidthInBytes: usize,
4560 #[doc = "< Height of 3D memory copy"]
4561 pub Height: usize,
4562 #[doc = "< Depth of 3D memory copy"]
4563 pub Depth: usize,
4564}
4565#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4566const _: () = {
4567 ["Size of CUDA_MEMCPY3D_PEER_st"][::std::mem::size_of::<CUDA_MEMCPY3D_PEER_st>() - 200usize];
4568 ["Alignment of CUDA_MEMCPY3D_PEER_st"]
4569 [::std::mem::align_of::<CUDA_MEMCPY3D_PEER_st>() - 8usize];
4570 ["Offset of field: CUDA_MEMCPY3D_PEER_st::srcXInBytes"]
4571 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, srcXInBytes) - 0usize];
4572 ["Offset of field: CUDA_MEMCPY3D_PEER_st::srcY"]
4573 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, srcY) - 8usize];
4574 ["Offset of field: CUDA_MEMCPY3D_PEER_st::srcZ"]
4575 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, srcZ) - 16usize];
4576 ["Offset of field: CUDA_MEMCPY3D_PEER_st::srcLOD"]
4577 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, srcLOD) - 24usize];
4578 ["Offset of field: CUDA_MEMCPY3D_PEER_st::srcMemoryType"]
4579 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, srcMemoryType) - 32usize];
4580 ["Offset of field: CUDA_MEMCPY3D_PEER_st::srcHost"]
4581 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, srcHost) - 40usize];
4582 ["Offset of field: CUDA_MEMCPY3D_PEER_st::srcDevice"]
4583 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, srcDevice) - 48usize];
4584 ["Offset of field: CUDA_MEMCPY3D_PEER_st::srcArray"]
4585 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, srcArray) - 56usize];
4586 ["Offset of field: CUDA_MEMCPY3D_PEER_st::srcContext"]
4587 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, srcContext) - 64usize];
4588 ["Offset of field: CUDA_MEMCPY3D_PEER_st::srcPitch"]
4589 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, srcPitch) - 72usize];
4590 ["Offset of field: CUDA_MEMCPY3D_PEER_st::srcHeight"]
4591 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, srcHeight) - 80usize];
4592 ["Offset of field: CUDA_MEMCPY3D_PEER_st::dstXInBytes"]
4593 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, dstXInBytes) - 88usize];
4594 ["Offset of field: CUDA_MEMCPY3D_PEER_st::dstY"]
4595 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, dstY) - 96usize];
4596 ["Offset of field: CUDA_MEMCPY3D_PEER_st::dstZ"]
4597 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, dstZ) - 104usize];
4598 ["Offset of field: CUDA_MEMCPY3D_PEER_st::dstLOD"]
4599 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, dstLOD) - 112usize];
4600 ["Offset of field: CUDA_MEMCPY3D_PEER_st::dstMemoryType"]
4601 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, dstMemoryType) - 120usize];
4602 ["Offset of field: CUDA_MEMCPY3D_PEER_st::dstHost"]
4603 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, dstHost) - 128usize];
4604 ["Offset of field: CUDA_MEMCPY3D_PEER_st::dstDevice"]
4605 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, dstDevice) - 136usize];
4606 ["Offset of field: CUDA_MEMCPY3D_PEER_st::dstArray"]
4607 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, dstArray) - 144usize];
4608 ["Offset of field: CUDA_MEMCPY3D_PEER_st::dstContext"]
4609 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, dstContext) - 152usize];
4610 ["Offset of field: CUDA_MEMCPY3D_PEER_st::dstPitch"]
4611 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, dstPitch) - 160usize];
4612 ["Offset of field: CUDA_MEMCPY3D_PEER_st::dstHeight"]
4613 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, dstHeight) - 168usize];
4614 ["Offset of field: CUDA_MEMCPY3D_PEER_st::WidthInBytes"]
4615 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, WidthInBytes) - 176usize];
4616 ["Offset of field: CUDA_MEMCPY3D_PEER_st::Height"]
4617 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, Height) - 184usize];
4618 ["Offset of field: CUDA_MEMCPY3D_PEER_st::Depth"]
4619 [::std::mem::offset_of!(CUDA_MEMCPY3D_PEER_st, Depth) - 192usize];
4620};
4621#[doc = " 3D memory cross-context copy parameters"]
4622pub type CUDA_MEMCPY3D_PEER_v1 = CUDA_MEMCPY3D_PEER_st;
4623#[doc = " 3D memory cross-context copy parameters"]
4624pub type CUDA_MEMCPY3D_PEER = CUDA_MEMCPY3D_PEER_v1;
4625#[doc = " Memcpy node parameters"]
4626#[repr(C)]
4627#[derive(Debug, Copy, Clone)]
4628pub struct CUDA_MEMCPY_NODE_PARAMS_st {
4629 #[doc = "< Must be zero"]
4630 pub flags: ::std::os::raw::c_int,
4631 #[doc = "< Must be zero"]
4632 pub reserved: ::std::os::raw::c_int,
4633 #[doc = "< Context on which to run the node"]
4634 pub copyCtx: CUcontext,
4635 #[doc = "< Parameters for the memory copy"]
4636 pub copyParams: CUDA_MEMCPY3D,
4637}
4638#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4639const _: () = {
4640 ["Size of CUDA_MEMCPY_NODE_PARAMS_st"]
4641 [::std::mem::size_of::<CUDA_MEMCPY_NODE_PARAMS_st>() - 216usize];
4642 ["Alignment of CUDA_MEMCPY_NODE_PARAMS_st"]
4643 [::std::mem::align_of::<CUDA_MEMCPY_NODE_PARAMS_st>() - 8usize];
4644 ["Offset of field: CUDA_MEMCPY_NODE_PARAMS_st::flags"]
4645 [::std::mem::offset_of!(CUDA_MEMCPY_NODE_PARAMS_st, flags) - 0usize];
4646 ["Offset of field: CUDA_MEMCPY_NODE_PARAMS_st::reserved"]
4647 [::std::mem::offset_of!(CUDA_MEMCPY_NODE_PARAMS_st, reserved) - 4usize];
4648 ["Offset of field: CUDA_MEMCPY_NODE_PARAMS_st::copyCtx"]
4649 [::std::mem::offset_of!(CUDA_MEMCPY_NODE_PARAMS_st, copyCtx) - 8usize];
4650 ["Offset of field: CUDA_MEMCPY_NODE_PARAMS_st::copyParams"]
4651 [::std::mem::offset_of!(CUDA_MEMCPY_NODE_PARAMS_st, copyParams) - 16usize];
4652};
4653#[doc = " Memcpy node parameters"]
4654pub type CUDA_MEMCPY_NODE_PARAMS = CUDA_MEMCPY_NODE_PARAMS_st;
4655#[doc = " Array descriptor"]
4656#[repr(C)]
4657#[derive(Debug, Copy, Clone)]
4658pub struct CUDA_ARRAY_DESCRIPTOR_st {
4659 #[doc = "< Width of array"]
4660 pub Width: usize,
4661 #[doc = "< Height of array"]
4662 pub Height: usize,
4663 #[doc = "< Array format"]
4664 pub Format: CUarray_format,
4665 #[doc = "< Channels per array element"]
4666 pub NumChannels: ::std::os::raw::c_uint,
4667}
4668#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4669const _: () = {
4670 ["Size of CUDA_ARRAY_DESCRIPTOR_st"]
4671 [::std::mem::size_of::<CUDA_ARRAY_DESCRIPTOR_st>() - 24usize];
4672 ["Alignment of CUDA_ARRAY_DESCRIPTOR_st"]
4673 [::std::mem::align_of::<CUDA_ARRAY_DESCRIPTOR_st>() - 8usize];
4674 ["Offset of field: CUDA_ARRAY_DESCRIPTOR_st::Width"]
4675 [::std::mem::offset_of!(CUDA_ARRAY_DESCRIPTOR_st, Width) - 0usize];
4676 ["Offset of field: CUDA_ARRAY_DESCRIPTOR_st::Height"]
4677 [::std::mem::offset_of!(CUDA_ARRAY_DESCRIPTOR_st, Height) - 8usize];
4678 ["Offset of field: CUDA_ARRAY_DESCRIPTOR_st::Format"]
4679 [::std::mem::offset_of!(CUDA_ARRAY_DESCRIPTOR_st, Format) - 16usize];
4680 ["Offset of field: CUDA_ARRAY_DESCRIPTOR_st::NumChannels"]
4681 [::std::mem::offset_of!(CUDA_ARRAY_DESCRIPTOR_st, NumChannels) - 20usize];
4682};
4683#[doc = " Array descriptor"]
4684pub type CUDA_ARRAY_DESCRIPTOR_v2 = CUDA_ARRAY_DESCRIPTOR_st;
4685#[doc = " Array descriptor"]
4686pub type CUDA_ARRAY_DESCRIPTOR = CUDA_ARRAY_DESCRIPTOR_v2;
4687#[doc = " 3D array descriptor"]
4688#[repr(C)]
4689#[derive(Debug, Copy, Clone)]
4690pub struct CUDA_ARRAY3D_DESCRIPTOR_st {
4691 #[doc = "< Width of 3D array"]
4692 pub Width: usize,
4693 #[doc = "< Height of 3D array"]
4694 pub Height: usize,
4695 #[doc = "< Depth of 3D array"]
4696 pub Depth: usize,
4697 #[doc = "< Array format"]
4698 pub Format: CUarray_format,
4699 #[doc = "< Channels per array element"]
4700 pub NumChannels: ::std::os::raw::c_uint,
4701 #[doc = "< Flags"]
4702 pub Flags: ::std::os::raw::c_uint,
4703}
4704#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4705const _: () = {
4706 ["Size of CUDA_ARRAY3D_DESCRIPTOR_st"]
4707 [::std::mem::size_of::<CUDA_ARRAY3D_DESCRIPTOR_st>() - 40usize];
4708 ["Alignment of CUDA_ARRAY3D_DESCRIPTOR_st"]
4709 [::std::mem::align_of::<CUDA_ARRAY3D_DESCRIPTOR_st>() - 8usize];
4710 ["Offset of field: CUDA_ARRAY3D_DESCRIPTOR_st::Width"]
4711 [::std::mem::offset_of!(CUDA_ARRAY3D_DESCRIPTOR_st, Width) - 0usize];
4712 ["Offset of field: CUDA_ARRAY3D_DESCRIPTOR_st::Height"]
4713 [::std::mem::offset_of!(CUDA_ARRAY3D_DESCRIPTOR_st, Height) - 8usize];
4714 ["Offset of field: CUDA_ARRAY3D_DESCRIPTOR_st::Depth"]
4715 [::std::mem::offset_of!(CUDA_ARRAY3D_DESCRIPTOR_st, Depth) - 16usize];
4716 ["Offset of field: CUDA_ARRAY3D_DESCRIPTOR_st::Format"]
4717 [::std::mem::offset_of!(CUDA_ARRAY3D_DESCRIPTOR_st, Format) - 24usize];
4718 ["Offset of field: CUDA_ARRAY3D_DESCRIPTOR_st::NumChannels"]
4719 [::std::mem::offset_of!(CUDA_ARRAY3D_DESCRIPTOR_st, NumChannels) - 28usize];
4720 ["Offset of field: CUDA_ARRAY3D_DESCRIPTOR_st::Flags"]
4721 [::std::mem::offset_of!(CUDA_ARRAY3D_DESCRIPTOR_st, Flags) - 32usize];
4722};
4723#[doc = " 3D array descriptor"]
4724pub type CUDA_ARRAY3D_DESCRIPTOR_v2 = CUDA_ARRAY3D_DESCRIPTOR_st;
4725#[doc = " 3D array descriptor"]
4726pub type CUDA_ARRAY3D_DESCRIPTOR = CUDA_ARRAY3D_DESCRIPTOR_v2;
4727#[doc = " CUDA array sparse properties"]
4728#[repr(C)]
4729#[derive(Debug, Copy, Clone)]
4730pub struct CUDA_ARRAY_SPARSE_PROPERTIES_st {
4731 pub tileExtent: CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1,
4732 #[doc = " First mip level at which the mip tail begins."]
4733 pub miptailFirstLevel: ::std::os::raw::c_uint,
4734 #[doc = " Total size of the mip tail."]
4735 pub miptailSize: ::std::os::raw::c_ulonglong,
4736 #[doc = " Flags will either be zero or ::CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL"]
4737 pub flags: ::std::os::raw::c_uint,
4738 pub reserved: [::std::os::raw::c_uint; 4usize],
4739}
4740#[repr(C)]
4741#[derive(Debug, Copy, Clone)]
4742pub struct CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1 {
4743 #[doc = "< Width of sparse tile in elements"]
4744 pub width: ::std::os::raw::c_uint,
4745 #[doc = "< Height of sparse tile in elements"]
4746 pub height: ::std::os::raw::c_uint,
4747 #[doc = "< Depth of sparse tile in elements"]
4748 pub depth: ::std::os::raw::c_uint,
4749}
4750#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4751const _: () = {
4752 ["Size of CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1"]
4753 [::std::mem::size_of::<CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1>() - 12usize];
4754 ["Alignment of CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1"]
4755 [::std::mem::align_of::<CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1>() - 4usize];
4756 ["Offset of field: CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1::width"]
4757 [::std::mem::offset_of!(CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1, width) - 0usize];
4758 ["Offset of field: CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1::height"]
4759 [::std::mem::offset_of!(CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1, height) - 4usize];
4760 ["Offset of field: CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1::depth"]
4761 [::std::mem::offset_of!(CUDA_ARRAY_SPARSE_PROPERTIES_st__bindgen_ty_1, depth) - 8usize];
4762};
4763#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4764const _: () = {
4765 ["Size of CUDA_ARRAY_SPARSE_PROPERTIES_st"]
4766 [::std::mem::size_of::<CUDA_ARRAY_SPARSE_PROPERTIES_st>() - 48usize];
4767 ["Alignment of CUDA_ARRAY_SPARSE_PROPERTIES_st"]
4768 [::std::mem::align_of::<CUDA_ARRAY_SPARSE_PROPERTIES_st>() - 8usize];
4769 ["Offset of field: CUDA_ARRAY_SPARSE_PROPERTIES_st::tileExtent"]
4770 [::std::mem::offset_of!(CUDA_ARRAY_SPARSE_PROPERTIES_st, tileExtent) - 0usize];
4771 ["Offset of field: CUDA_ARRAY_SPARSE_PROPERTIES_st::miptailFirstLevel"]
4772 [::std::mem::offset_of!(CUDA_ARRAY_SPARSE_PROPERTIES_st, miptailFirstLevel) - 12usize];
4773 ["Offset of field: CUDA_ARRAY_SPARSE_PROPERTIES_st::miptailSize"]
4774 [::std::mem::offset_of!(CUDA_ARRAY_SPARSE_PROPERTIES_st, miptailSize) - 16usize];
4775 ["Offset of field: CUDA_ARRAY_SPARSE_PROPERTIES_st::flags"]
4776 [::std::mem::offset_of!(CUDA_ARRAY_SPARSE_PROPERTIES_st, flags) - 24usize];
4777 ["Offset of field: CUDA_ARRAY_SPARSE_PROPERTIES_st::reserved"]
4778 [::std::mem::offset_of!(CUDA_ARRAY_SPARSE_PROPERTIES_st, reserved) - 28usize];
4779};
4780#[doc = " CUDA array sparse properties"]
4781pub type CUDA_ARRAY_SPARSE_PROPERTIES_v1 = CUDA_ARRAY_SPARSE_PROPERTIES_st;
4782#[doc = " CUDA array sparse properties"]
4783pub type CUDA_ARRAY_SPARSE_PROPERTIES = CUDA_ARRAY_SPARSE_PROPERTIES_v1;
4784#[doc = " CUDA array memory requirements"]
4785#[repr(C)]
4786#[derive(Debug, Copy, Clone)]
4787pub struct CUDA_ARRAY_MEMORY_REQUIREMENTS_st {
4788 #[doc = "< Total required memory size"]
4789 pub size: usize,
4790 #[doc = "< alignment requirement"]
4791 pub alignment: usize,
4792 pub reserved: [::std::os::raw::c_uint; 4usize],
4793}
4794#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4795const _: () = {
4796 ["Size of CUDA_ARRAY_MEMORY_REQUIREMENTS_st"]
4797 [::std::mem::size_of::<CUDA_ARRAY_MEMORY_REQUIREMENTS_st>() - 32usize];
4798 ["Alignment of CUDA_ARRAY_MEMORY_REQUIREMENTS_st"]
4799 [::std::mem::align_of::<CUDA_ARRAY_MEMORY_REQUIREMENTS_st>() - 8usize];
4800 ["Offset of field: CUDA_ARRAY_MEMORY_REQUIREMENTS_st::size"]
4801 [::std::mem::offset_of!(CUDA_ARRAY_MEMORY_REQUIREMENTS_st, size) - 0usize];
4802 ["Offset of field: CUDA_ARRAY_MEMORY_REQUIREMENTS_st::alignment"]
4803 [::std::mem::offset_of!(CUDA_ARRAY_MEMORY_REQUIREMENTS_st, alignment) - 8usize];
4804 ["Offset of field: CUDA_ARRAY_MEMORY_REQUIREMENTS_st::reserved"]
4805 [::std::mem::offset_of!(CUDA_ARRAY_MEMORY_REQUIREMENTS_st, reserved) - 16usize];
4806};
4807#[doc = " CUDA array memory requirements"]
4808pub type CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 = CUDA_ARRAY_MEMORY_REQUIREMENTS_st;
4809#[doc = " CUDA array memory requirements"]
4810pub type CUDA_ARRAY_MEMORY_REQUIREMENTS = CUDA_ARRAY_MEMORY_REQUIREMENTS_v1;
4811#[doc = " CUDA Resource descriptor"]
4812#[repr(C)]
4813#[derive(Copy, Clone)]
4814pub struct CUDA_RESOURCE_DESC_st {
4815 #[doc = "< Resource type"]
4816 pub resType: CUresourcetype,
4817 pub res: CUDA_RESOURCE_DESC_st__bindgen_ty_1,
4818 #[doc = "< Flags (must be zero)"]
4819 pub flags: ::std::os::raw::c_uint,
4820}
4821#[repr(C)]
4822#[derive(Copy, Clone)]
4823pub union CUDA_RESOURCE_DESC_st__bindgen_ty_1 {
4824 pub array: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1,
4825 pub mipmap: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2,
4826 pub linear: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3,
4827 pub pitch2D: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
4828 pub reserved: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5,
4829}
4830#[repr(C)]
4831#[derive(Debug, Copy, Clone)]
4832pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
4833 #[doc = "< CUDA array"]
4834 pub hArray: CUarray,
4835}
4836#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4837const _: () = {
4838 ["Size of CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1"]
4839 [::std::mem::size_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1>() - 8usize];
4840 ["Alignment of CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1"]
4841 [::std::mem::align_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1>() - 8usize];
4842 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1::hArray"][::std::mem::offset_of!(
4843 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1,
4844 hArray
4845 ) - 0usize];
4846};
4847#[repr(C)]
4848#[derive(Debug, Copy, Clone)]
4849pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 {
4850 #[doc = "< CUDA mipmapped array"]
4851 pub hMipmappedArray: CUmipmappedArray,
4852}
4853#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4854const _: () = {
4855 ["Size of CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2"]
4856 [::std::mem::size_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2>() - 8usize];
4857 ["Alignment of CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2"]
4858 [::std::mem::align_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2>() - 8usize];
4859 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2::hMipmappedArray"][::std::mem::offset_of!(
4860 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2,
4861 hMipmappedArray
4862 )
4863 - 0usize];
4864};
4865#[repr(C)]
4866#[derive(Debug, Copy, Clone)]
4867pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 {
4868 #[doc = "< Device pointer"]
4869 pub devPtr: CUdeviceptr,
4870 #[doc = "< Array format"]
4871 pub format: CUarray_format,
4872 #[doc = "< Channels per array element"]
4873 pub numChannels: ::std::os::raw::c_uint,
4874 #[doc = "< Size in bytes"]
4875 pub sizeInBytes: usize,
4876}
4877#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4878const _: () = {
4879 ["Size of CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3"]
4880 [::std::mem::size_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3>() - 24usize];
4881 ["Alignment of CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3"]
4882 [::std::mem::align_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3>() - 8usize];
4883 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3::devPtr"][::std::mem::offset_of!(
4884 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3,
4885 devPtr
4886 ) - 0usize];
4887 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3::format"][::std::mem::offset_of!(
4888 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3,
4889 format
4890 ) - 8usize];
4891 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3::numChannels"][::std::mem::offset_of!(
4892 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3,
4893 numChannels
4894 )
4895 - 12usize];
4896 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3::sizeInBytes"][::std::mem::offset_of!(
4897 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3,
4898 sizeInBytes
4899 )
4900 - 16usize];
4901};
4902#[repr(C)]
4903#[derive(Debug, Copy, Clone)]
4904pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 {
4905 #[doc = "< Device pointer"]
4906 pub devPtr: CUdeviceptr,
4907 #[doc = "< Array format"]
4908 pub format: CUarray_format,
4909 #[doc = "< Channels per array element"]
4910 pub numChannels: ::std::os::raw::c_uint,
4911 #[doc = "< Width of the array in elements"]
4912 pub width: usize,
4913 #[doc = "< Height of the array in elements"]
4914 pub height: usize,
4915 #[doc = "< Pitch between two rows in bytes"]
4916 pub pitchInBytes: usize,
4917}
4918#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4919const _: () = {
4920 ["Size of CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4"]
4921 [::std::mem::size_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4>() - 40usize];
4922 ["Alignment of CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4"]
4923 [::std::mem::align_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4>() - 8usize];
4924 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4::devPtr"][::std::mem::offset_of!(
4925 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
4926 devPtr
4927 ) - 0usize];
4928 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4::format"][::std::mem::offset_of!(
4929 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
4930 format
4931 ) - 8usize];
4932 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4::numChannels"][::std::mem::offset_of!(
4933 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
4934 numChannels
4935 )
4936 - 12usize];
4937 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4::width"][::std::mem::offset_of!(
4938 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
4939 width
4940 ) - 16usize];
4941 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4::height"][::std::mem::offset_of!(
4942 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
4943 height
4944 ) - 24usize];
4945 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4::pitchInBytes"][::std::mem::offset_of!(
4946 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
4947 pitchInBytes
4948 )
4949 - 32usize];
4950};
4951#[repr(C)]
4952#[derive(Debug, Copy, Clone)]
4953pub struct CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5 {
4954 pub reserved: [::std::os::raw::c_int; 32usize],
4955}
4956#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4957const _: () = {
4958 ["Size of CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5"]
4959 [::std::mem::size_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5>() - 128usize];
4960 ["Alignment of CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5"]
4961 [::std::mem::align_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5>() - 4usize];
4962 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5::reserved"][::std::mem::offset_of!(
4963 CUDA_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5,
4964 reserved
4965 ) - 0usize];
4966};
4967#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4968const _: () = {
4969 ["Size of CUDA_RESOURCE_DESC_st__bindgen_ty_1"]
4970 [::std::mem::size_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1>() - 128usize];
4971 ["Alignment of CUDA_RESOURCE_DESC_st__bindgen_ty_1"]
4972 [::std::mem::align_of::<CUDA_RESOURCE_DESC_st__bindgen_ty_1>() - 8usize];
4973 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1::array"]
4974 [::std::mem::offset_of!(CUDA_RESOURCE_DESC_st__bindgen_ty_1, array) - 0usize];
4975 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1::mipmap"]
4976 [::std::mem::offset_of!(CUDA_RESOURCE_DESC_st__bindgen_ty_1, mipmap) - 0usize];
4977 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1::linear"]
4978 [::std::mem::offset_of!(CUDA_RESOURCE_DESC_st__bindgen_ty_1, linear) - 0usize];
4979 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1::pitch2D"]
4980 [::std::mem::offset_of!(CUDA_RESOURCE_DESC_st__bindgen_ty_1, pitch2D) - 0usize];
4981 ["Offset of field: CUDA_RESOURCE_DESC_st__bindgen_ty_1::reserved"]
4982 [::std::mem::offset_of!(CUDA_RESOURCE_DESC_st__bindgen_ty_1, reserved) - 0usize];
4983};
4984#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4985const _: () = {
4986 ["Size of CUDA_RESOURCE_DESC_st"][::std::mem::size_of::<CUDA_RESOURCE_DESC_st>() - 144usize];
4987 ["Alignment of CUDA_RESOURCE_DESC_st"]
4988 [::std::mem::align_of::<CUDA_RESOURCE_DESC_st>() - 8usize];
4989 ["Offset of field: CUDA_RESOURCE_DESC_st::resType"]
4990 [::std::mem::offset_of!(CUDA_RESOURCE_DESC_st, resType) - 0usize];
4991 ["Offset of field: CUDA_RESOURCE_DESC_st::res"]
4992 [::std::mem::offset_of!(CUDA_RESOURCE_DESC_st, res) - 8usize];
4993 ["Offset of field: CUDA_RESOURCE_DESC_st::flags"]
4994 [::std::mem::offset_of!(CUDA_RESOURCE_DESC_st, flags) - 136usize];
4995};
4996#[doc = " CUDA Resource descriptor"]
4997pub type CUDA_RESOURCE_DESC_v1 = CUDA_RESOURCE_DESC_st;
4998#[doc = " CUDA Resource descriptor"]
4999pub type CUDA_RESOURCE_DESC = CUDA_RESOURCE_DESC_v1;
5000#[doc = " Texture descriptor"]
5001#[repr(C)]
5002#[derive(Debug, Copy, Clone)]
5003pub struct CUDA_TEXTURE_DESC_st {
5004 #[doc = "< Address modes"]
5005 pub addressMode: [CUaddress_mode; 3usize],
5006 #[doc = "< Filter mode"]
5007 pub filterMode: CUfilter_mode,
5008 #[doc = "< Flags"]
5009 pub flags: ::std::os::raw::c_uint,
5010 #[doc = "< Maximum anisotropy ratio"]
5011 pub maxAnisotropy: ::std::os::raw::c_uint,
5012 #[doc = "< Mipmap filter mode"]
5013 pub mipmapFilterMode: CUfilter_mode,
5014 #[doc = "< Mipmap level bias"]
5015 pub mipmapLevelBias: f32,
5016 #[doc = "< Mipmap minimum level clamp"]
5017 pub minMipmapLevelClamp: f32,
5018 #[doc = "< Mipmap maximum level clamp"]
5019 pub maxMipmapLevelClamp: f32,
5020 #[doc = "< Border Color"]
5021 pub borderColor: [f32; 4usize],
5022 pub reserved: [::std::os::raw::c_int; 12usize],
5023}
5024#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5025const _: () = {
5026 ["Size of CUDA_TEXTURE_DESC_st"][::std::mem::size_of::<CUDA_TEXTURE_DESC_st>() - 104usize];
5027 ["Alignment of CUDA_TEXTURE_DESC_st"][::std::mem::align_of::<CUDA_TEXTURE_DESC_st>() - 4usize];
5028 ["Offset of field: CUDA_TEXTURE_DESC_st::addressMode"]
5029 [::std::mem::offset_of!(CUDA_TEXTURE_DESC_st, addressMode) - 0usize];
5030 ["Offset of field: CUDA_TEXTURE_DESC_st::filterMode"]
5031 [::std::mem::offset_of!(CUDA_TEXTURE_DESC_st, filterMode) - 12usize];
5032 ["Offset of field: CUDA_TEXTURE_DESC_st::flags"]
5033 [::std::mem::offset_of!(CUDA_TEXTURE_DESC_st, flags) - 16usize];
5034 ["Offset of field: CUDA_TEXTURE_DESC_st::maxAnisotropy"]
5035 [::std::mem::offset_of!(CUDA_TEXTURE_DESC_st, maxAnisotropy) - 20usize];
5036 ["Offset of field: CUDA_TEXTURE_DESC_st::mipmapFilterMode"]
5037 [::std::mem::offset_of!(CUDA_TEXTURE_DESC_st, mipmapFilterMode) - 24usize];
5038 ["Offset of field: CUDA_TEXTURE_DESC_st::mipmapLevelBias"]
5039 [::std::mem::offset_of!(CUDA_TEXTURE_DESC_st, mipmapLevelBias) - 28usize];
5040 ["Offset of field: CUDA_TEXTURE_DESC_st::minMipmapLevelClamp"]
5041 [::std::mem::offset_of!(CUDA_TEXTURE_DESC_st, minMipmapLevelClamp) - 32usize];
5042 ["Offset of field: CUDA_TEXTURE_DESC_st::maxMipmapLevelClamp"]
5043 [::std::mem::offset_of!(CUDA_TEXTURE_DESC_st, maxMipmapLevelClamp) - 36usize];
5044 ["Offset of field: CUDA_TEXTURE_DESC_st::borderColor"]
5045 [::std::mem::offset_of!(CUDA_TEXTURE_DESC_st, borderColor) - 40usize];
5046 ["Offset of field: CUDA_TEXTURE_DESC_st::reserved"]
5047 [::std::mem::offset_of!(CUDA_TEXTURE_DESC_st, reserved) - 56usize];
5048};
5049#[doc = " Texture descriptor"]
5050pub type CUDA_TEXTURE_DESC_v1 = CUDA_TEXTURE_DESC_st;
5051#[doc = " Texture descriptor"]
5052pub type CUDA_TEXTURE_DESC = CUDA_TEXTURE_DESC_v1;
5053impl CUresourceViewFormat_enum {
5054 #[doc = "< No resource view format (use underlying resource format)"]
5055 pub const CU_RES_VIEW_FORMAT_NONE: CUresourceViewFormat_enum = CUresourceViewFormat_enum(0);
5056}
5057impl CUresourceViewFormat_enum {
5058 #[doc = "< 1 channel unsigned 8-bit integers"]
5059 pub const CU_RES_VIEW_FORMAT_UINT_1X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(1);
5060}
5061impl CUresourceViewFormat_enum {
5062 #[doc = "< 2 channel unsigned 8-bit integers"]
5063 pub const CU_RES_VIEW_FORMAT_UINT_2X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(2);
5064}
5065impl CUresourceViewFormat_enum {
5066 #[doc = "< 4 channel unsigned 8-bit integers"]
5067 pub const CU_RES_VIEW_FORMAT_UINT_4X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(3);
5068}
5069impl CUresourceViewFormat_enum {
5070 #[doc = "< 1 channel signed 8-bit integers"]
5071 pub const CU_RES_VIEW_FORMAT_SINT_1X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(4);
5072}
5073impl CUresourceViewFormat_enum {
5074 #[doc = "< 2 channel signed 8-bit integers"]
5075 pub const CU_RES_VIEW_FORMAT_SINT_2X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(5);
5076}
5077impl CUresourceViewFormat_enum {
5078 #[doc = "< 4 channel signed 8-bit integers"]
5079 pub const CU_RES_VIEW_FORMAT_SINT_4X8: CUresourceViewFormat_enum = CUresourceViewFormat_enum(6);
5080}
5081impl CUresourceViewFormat_enum {
5082 #[doc = "< 1 channel unsigned 16-bit integers"]
5083 pub const CU_RES_VIEW_FORMAT_UINT_1X16: CUresourceViewFormat_enum =
5084 CUresourceViewFormat_enum(7);
5085}
5086impl CUresourceViewFormat_enum {
5087 #[doc = "< 2 channel unsigned 16-bit integers"]
5088 pub const CU_RES_VIEW_FORMAT_UINT_2X16: CUresourceViewFormat_enum =
5089 CUresourceViewFormat_enum(8);
5090}
5091impl CUresourceViewFormat_enum {
5092 #[doc = "< 4 channel unsigned 16-bit integers"]
5093 pub const CU_RES_VIEW_FORMAT_UINT_4X16: CUresourceViewFormat_enum =
5094 CUresourceViewFormat_enum(9);
5095}
5096impl CUresourceViewFormat_enum {
5097 #[doc = "< 1 channel signed 16-bit integers"]
5098 pub const CU_RES_VIEW_FORMAT_SINT_1X16: CUresourceViewFormat_enum =
5099 CUresourceViewFormat_enum(10);
5100}
5101impl CUresourceViewFormat_enum {
5102 #[doc = "< 2 channel signed 16-bit integers"]
5103 pub const CU_RES_VIEW_FORMAT_SINT_2X16: CUresourceViewFormat_enum =
5104 CUresourceViewFormat_enum(11);
5105}
5106impl CUresourceViewFormat_enum {
5107 #[doc = "< 4 channel signed 16-bit integers"]
5108 pub const CU_RES_VIEW_FORMAT_SINT_4X16: CUresourceViewFormat_enum =
5109 CUresourceViewFormat_enum(12);
5110}
5111impl CUresourceViewFormat_enum {
5112 #[doc = "< 1 channel unsigned 32-bit integers"]
5113 pub const CU_RES_VIEW_FORMAT_UINT_1X32: CUresourceViewFormat_enum =
5114 CUresourceViewFormat_enum(13);
5115}
5116impl CUresourceViewFormat_enum {
5117 #[doc = "< 2 channel unsigned 32-bit integers"]
5118 pub const CU_RES_VIEW_FORMAT_UINT_2X32: CUresourceViewFormat_enum =
5119 CUresourceViewFormat_enum(14);
5120}
5121impl CUresourceViewFormat_enum {
5122 #[doc = "< 4 channel unsigned 32-bit integers"]
5123 pub const CU_RES_VIEW_FORMAT_UINT_4X32: CUresourceViewFormat_enum =
5124 CUresourceViewFormat_enum(15);
5125}
5126impl CUresourceViewFormat_enum {
5127 #[doc = "< 1 channel signed 32-bit integers"]
5128 pub const CU_RES_VIEW_FORMAT_SINT_1X32: CUresourceViewFormat_enum =
5129 CUresourceViewFormat_enum(16);
5130}
5131impl CUresourceViewFormat_enum {
5132 #[doc = "< 2 channel signed 32-bit integers"]
5133 pub const CU_RES_VIEW_FORMAT_SINT_2X32: CUresourceViewFormat_enum =
5134 CUresourceViewFormat_enum(17);
5135}
5136impl CUresourceViewFormat_enum {
5137 #[doc = "< 4 channel signed 32-bit integers"]
5138 pub const CU_RES_VIEW_FORMAT_SINT_4X32: CUresourceViewFormat_enum =
5139 CUresourceViewFormat_enum(18);
5140}
5141impl CUresourceViewFormat_enum {
5142 #[doc = "< 1 channel 16-bit floating point"]
5143 pub const CU_RES_VIEW_FORMAT_FLOAT_1X16: CUresourceViewFormat_enum =
5144 CUresourceViewFormat_enum(19);
5145}
5146impl CUresourceViewFormat_enum {
5147 #[doc = "< 2 channel 16-bit floating point"]
5148 pub const CU_RES_VIEW_FORMAT_FLOAT_2X16: CUresourceViewFormat_enum =
5149 CUresourceViewFormat_enum(20);
5150}
5151impl CUresourceViewFormat_enum {
5152 #[doc = "< 4 channel 16-bit floating point"]
5153 pub const CU_RES_VIEW_FORMAT_FLOAT_4X16: CUresourceViewFormat_enum =
5154 CUresourceViewFormat_enum(21);
5155}
5156impl CUresourceViewFormat_enum {
5157 #[doc = "< 1 channel 32-bit floating point"]
5158 pub const CU_RES_VIEW_FORMAT_FLOAT_1X32: CUresourceViewFormat_enum =
5159 CUresourceViewFormat_enum(22);
5160}
5161impl CUresourceViewFormat_enum {
5162 #[doc = "< 2 channel 32-bit floating point"]
5163 pub const CU_RES_VIEW_FORMAT_FLOAT_2X32: CUresourceViewFormat_enum =
5164 CUresourceViewFormat_enum(23);
5165}
5166impl CUresourceViewFormat_enum {
5167 #[doc = "< 4 channel 32-bit floating point"]
5168 pub const CU_RES_VIEW_FORMAT_FLOAT_4X32: CUresourceViewFormat_enum =
5169 CUresourceViewFormat_enum(24);
5170}
5171impl CUresourceViewFormat_enum {
5172 #[doc = "< Block compressed 1"]
5173 pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC1: CUresourceViewFormat_enum =
5174 CUresourceViewFormat_enum(25);
5175}
5176impl CUresourceViewFormat_enum {
5177 #[doc = "< Block compressed 2"]
5178 pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC2: CUresourceViewFormat_enum =
5179 CUresourceViewFormat_enum(26);
5180}
5181impl CUresourceViewFormat_enum {
5182 #[doc = "< Block compressed 3"]
5183 pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC3: CUresourceViewFormat_enum =
5184 CUresourceViewFormat_enum(27);
5185}
5186impl CUresourceViewFormat_enum {
5187 #[doc = "< Block compressed 4 unsigned"]
5188 pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC4: CUresourceViewFormat_enum =
5189 CUresourceViewFormat_enum(28);
5190}
5191impl CUresourceViewFormat_enum {
5192 #[doc = "< Block compressed 4 signed"]
5193 pub const CU_RES_VIEW_FORMAT_SIGNED_BC4: CUresourceViewFormat_enum =
5194 CUresourceViewFormat_enum(29);
5195}
5196impl CUresourceViewFormat_enum {
5197 #[doc = "< Block compressed 5 unsigned"]
5198 pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC5: CUresourceViewFormat_enum =
5199 CUresourceViewFormat_enum(30);
5200}
5201impl CUresourceViewFormat_enum {
5202 #[doc = "< Block compressed 5 signed"]
5203 pub const CU_RES_VIEW_FORMAT_SIGNED_BC5: CUresourceViewFormat_enum =
5204 CUresourceViewFormat_enum(31);
5205}
5206impl CUresourceViewFormat_enum {
5207 #[doc = "< Block compressed 6 unsigned half-float"]
5208 pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC6H: CUresourceViewFormat_enum =
5209 CUresourceViewFormat_enum(32);
5210}
5211impl CUresourceViewFormat_enum {
5212 #[doc = "< Block compressed 6 signed half-float"]
5213 pub const CU_RES_VIEW_FORMAT_SIGNED_BC6H: CUresourceViewFormat_enum =
5214 CUresourceViewFormat_enum(33);
5215}
5216impl CUresourceViewFormat_enum {
5217 #[doc = "< Block compressed 7"]
5218 pub const CU_RES_VIEW_FORMAT_UNSIGNED_BC7: CUresourceViewFormat_enum =
5219 CUresourceViewFormat_enum(34);
5220}
5221#[repr(transparent)]
5222#[doc = " Resource view format"]
5223#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5224pub struct CUresourceViewFormat_enum(pub ::std::os::raw::c_uint);
5225#[doc = " Resource view format"]
5226pub use self::CUresourceViewFormat_enum as CUresourceViewFormat;
5227#[doc = " Resource view descriptor"]
5228#[repr(C)]
5229#[derive(Debug, Copy, Clone)]
5230pub struct CUDA_RESOURCE_VIEW_DESC_st {
5231 #[doc = "< Resource view format"]
5232 pub format: CUresourceViewFormat,
5233 #[doc = "< Width of the resource view"]
5234 pub width: usize,
5235 #[doc = "< Height of the resource view"]
5236 pub height: usize,
5237 #[doc = "< Depth of the resource view"]
5238 pub depth: usize,
5239 #[doc = "< First defined mipmap level"]
5240 pub firstMipmapLevel: ::std::os::raw::c_uint,
5241 #[doc = "< Last defined mipmap level"]
5242 pub lastMipmapLevel: ::std::os::raw::c_uint,
5243 #[doc = "< First layer index"]
5244 pub firstLayer: ::std::os::raw::c_uint,
5245 #[doc = "< Last layer index"]
5246 pub lastLayer: ::std::os::raw::c_uint,
5247 pub reserved: [::std::os::raw::c_uint; 16usize],
5248}
5249#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5250const _: () = {
5251 ["Size of CUDA_RESOURCE_VIEW_DESC_st"]
5252 [::std::mem::size_of::<CUDA_RESOURCE_VIEW_DESC_st>() - 112usize];
5253 ["Alignment of CUDA_RESOURCE_VIEW_DESC_st"]
5254 [::std::mem::align_of::<CUDA_RESOURCE_VIEW_DESC_st>() - 8usize];
5255 ["Offset of field: CUDA_RESOURCE_VIEW_DESC_st::format"]
5256 [::std::mem::offset_of!(CUDA_RESOURCE_VIEW_DESC_st, format) - 0usize];
5257 ["Offset of field: CUDA_RESOURCE_VIEW_DESC_st::width"]
5258 [::std::mem::offset_of!(CUDA_RESOURCE_VIEW_DESC_st, width) - 8usize];
5259 ["Offset of field: CUDA_RESOURCE_VIEW_DESC_st::height"]
5260 [::std::mem::offset_of!(CUDA_RESOURCE_VIEW_DESC_st, height) - 16usize];
5261 ["Offset of field: CUDA_RESOURCE_VIEW_DESC_st::depth"]
5262 [::std::mem::offset_of!(CUDA_RESOURCE_VIEW_DESC_st, depth) - 24usize];
5263 ["Offset of field: CUDA_RESOURCE_VIEW_DESC_st::firstMipmapLevel"]
5264 [::std::mem::offset_of!(CUDA_RESOURCE_VIEW_DESC_st, firstMipmapLevel) - 32usize];
5265 ["Offset of field: CUDA_RESOURCE_VIEW_DESC_st::lastMipmapLevel"]
5266 [::std::mem::offset_of!(CUDA_RESOURCE_VIEW_DESC_st, lastMipmapLevel) - 36usize];
5267 ["Offset of field: CUDA_RESOURCE_VIEW_DESC_st::firstLayer"]
5268 [::std::mem::offset_of!(CUDA_RESOURCE_VIEW_DESC_st, firstLayer) - 40usize];
5269 ["Offset of field: CUDA_RESOURCE_VIEW_DESC_st::lastLayer"]
5270 [::std::mem::offset_of!(CUDA_RESOURCE_VIEW_DESC_st, lastLayer) - 44usize];
5271 ["Offset of field: CUDA_RESOURCE_VIEW_DESC_st::reserved"]
5272 [::std::mem::offset_of!(CUDA_RESOURCE_VIEW_DESC_st, reserved) - 48usize];
5273};
5274#[doc = " Resource view descriptor"]
5275pub type CUDA_RESOURCE_VIEW_DESC_v1 = CUDA_RESOURCE_VIEW_DESC_st;
5276#[doc = " Resource view descriptor"]
5277pub type CUDA_RESOURCE_VIEW_DESC = CUDA_RESOURCE_VIEW_DESC_v1;
5278#[doc = " Tensor map descriptor. Requires compiler support for aligning to 64 bytes."]
5279#[repr(C)]
5280#[repr(align(64))]
5281#[derive(Debug, Copy, Clone)]
5282pub struct CUtensorMap_st {
5283 pub opaque: [cuuint64_t; 16usize],
5284}
5285#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5286const _: () = {
5287 ["Size of CUtensorMap_st"][::std::mem::size_of::<CUtensorMap_st>() - 128usize];
5288 ["Alignment of CUtensorMap_st"][::std::mem::align_of::<CUtensorMap_st>() - 64usize];
5289 ["Offset of field: CUtensorMap_st::opaque"]
5290 [::std::mem::offset_of!(CUtensorMap_st, opaque) - 0usize];
5291};
5292#[doc = " Tensor map descriptor. Requires compiler support for aligning to 64 bytes."]
5293pub type CUtensorMap = CUtensorMap_st;
5294impl CUtensorMapDataType_enum {
5295 pub const CU_TENSOR_MAP_DATA_TYPE_UINT8: CUtensorMapDataType_enum = CUtensorMapDataType_enum(0);
5296}
5297impl CUtensorMapDataType_enum {
5298 pub const CU_TENSOR_MAP_DATA_TYPE_UINT16: CUtensorMapDataType_enum =
5299 CUtensorMapDataType_enum(1);
5300}
5301impl CUtensorMapDataType_enum {
5302 pub const CU_TENSOR_MAP_DATA_TYPE_UINT32: CUtensorMapDataType_enum =
5303 CUtensorMapDataType_enum(2);
5304}
5305impl CUtensorMapDataType_enum {
5306 pub const CU_TENSOR_MAP_DATA_TYPE_INT32: CUtensorMapDataType_enum = CUtensorMapDataType_enum(3);
5307}
5308impl CUtensorMapDataType_enum {
5309 pub const CU_TENSOR_MAP_DATA_TYPE_UINT64: CUtensorMapDataType_enum =
5310 CUtensorMapDataType_enum(4);
5311}
5312impl CUtensorMapDataType_enum {
5313 pub const CU_TENSOR_MAP_DATA_TYPE_INT64: CUtensorMapDataType_enum = CUtensorMapDataType_enum(5);
5314}
5315impl CUtensorMapDataType_enum {
5316 pub const CU_TENSOR_MAP_DATA_TYPE_FLOAT16: CUtensorMapDataType_enum =
5317 CUtensorMapDataType_enum(6);
5318}
5319impl CUtensorMapDataType_enum {
5320 pub const CU_TENSOR_MAP_DATA_TYPE_FLOAT32: CUtensorMapDataType_enum =
5321 CUtensorMapDataType_enum(7);
5322}
5323impl CUtensorMapDataType_enum {
5324 pub const CU_TENSOR_MAP_DATA_TYPE_FLOAT64: CUtensorMapDataType_enum =
5325 CUtensorMapDataType_enum(8);
5326}
5327impl CUtensorMapDataType_enum {
5328 pub const CU_TENSOR_MAP_DATA_TYPE_BFLOAT16: CUtensorMapDataType_enum =
5329 CUtensorMapDataType_enum(9);
5330}
5331impl CUtensorMapDataType_enum {
5332 pub const CU_TENSOR_MAP_DATA_TYPE_FLOAT32_FTZ: CUtensorMapDataType_enum =
5333 CUtensorMapDataType_enum(10);
5334}
5335impl CUtensorMapDataType_enum {
5336 pub const CU_TENSOR_MAP_DATA_TYPE_TFLOAT32: CUtensorMapDataType_enum =
5337 CUtensorMapDataType_enum(11);
5338}
5339impl CUtensorMapDataType_enum {
5340 pub const CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ: CUtensorMapDataType_enum =
5341 CUtensorMapDataType_enum(12);
5342}
5343#[repr(transparent)]
5344#[doc = " Tensor map data type"]
5345#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5346pub struct CUtensorMapDataType_enum(pub ::std::os::raw::c_uint);
5347#[doc = " Tensor map data type"]
5348pub use self::CUtensorMapDataType_enum as CUtensorMapDataType;
5349impl CUtensorMapInterleave_enum {
5350 pub const CU_TENSOR_MAP_INTERLEAVE_NONE: CUtensorMapInterleave_enum =
5351 CUtensorMapInterleave_enum(0);
5352}
5353impl CUtensorMapInterleave_enum {
5354 pub const CU_TENSOR_MAP_INTERLEAVE_16B: CUtensorMapInterleave_enum =
5355 CUtensorMapInterleave_enum(1);
5356}
5357impl CUtensorMapInterleave_enum {
5358 pub const CU_TENSOR_MAP_INTERLEAVE_32B: CUtensorMapInterleave_enum =
5359 CUtensorMapInterleave_enum(2);
5360}
5361#[repr(transparent)]
5362#[doc = " Tensor map interleave layout type"]
5363#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5364pub struct CUtensorMapInterleave_enum(pub ::std::os::raw::c_uint);
5365#[doc = " Tensor map interleave layout type"]
5366pub use self::CUtensorMapInterleave_enum as CUtensorMapInterleave;
5367impl CUtensorMapSwizzle_enum {
5368 pub const CU_TENSOR_MAP_SWIZZLE_NONE: CUtensorMapSwizzle_enum = CUtensorMapSwizzle_enum(0);
5369}
5370impl CUtensorMapSwizzle_enum {
5371 pub const CU_TENSOR_MAP_SWIZZLE_32B: CUtensorMapSwizzle_enum = CUtensorMapSwizzle_enum(1);
5372}
5373impl CUtensorMapSwizzle_enum {
5374 pub const CU_TENSOR_MAP_SWIZZLE_64B: CUtensorMapSwizzle_enum = CUtensorMapSwizzle_enum(2);
5375}
5376impl CUtensorMapSwizzle_enum {
5377 pub const CU_TENSOR_MAP_SWIZZLE_128B: CUtensorMapSwizzle_enum = CUtensorMapSwizzle_enum(3);
5378}
5379#[repr(transparent)]
5380#[doc = " Tensor map swizzling mode of shared memory banks"]
5381#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5382pub struct CUtensorMapSwizzle_enum(pub ::std::os::raw::c_uint);
5383#[doc = " Tensor map swizzling mode of shared memory banks"]
5384pub use self::CUtensorMapSwizzle_enum as CUtensorMapSwizzle;
5385impl CUtensorMapL2promotion_enum {
5386 pub const CU_TENSOR_MAP_L2_PROMOTION_NONE: CUtensorMapL2promotion_enum =
5387 CUtensorMapL2promotion_enum(0);
5388}
5389impl CUtensorMapL2promotion_enum {
5390 pub const CU_TENSOR_MAP_L2_PROMOTION_L2_64B: CUtensorMapL2promotion_enum =
5391 CUtensorMapL2promotion_enum(1);
5392}
5393impl CUtensorMapL2promotion_enum {
5394 pub const CU_TENSOR_MAP_L2_PROMOTION_L2_128B: CUtensorMapL2promotion_enum =
5395 CUtensorMapL2promotion_enum(2);
5396}
5397impl CUtensorMapL2promotion_enum {
5398 pub const CU_TENSOR_MAP_L2_PROMOTION_L2_256B: CUtensorMapL2promotion_enum =
5399 CUtensorMapL2promotion_enum(3);
5400}
5401#[repr(transparent)]
5402#[doc = " Tensor map L2 promotion type"]
5403#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5404pub struct CUtensorMapL2promotion_enum(pub ::std::os::raw::c_uint);
5405#[doc = " Tensor map L2 promotion type"]
5406pub use self::CUtensorMapL2promotion_enum as CUtensorMapL2promotion;
5407impl CUtensorMapFloatOOBfill_enum {
5408 pub const CU_TENSOR_MAP_FLOAT_OOB_FILL_NONE: CUtensorMapFloatOOBfill_enum =
5409 CUtensorMapFloatOOBfill_enum(0);
5410}
5411impl CUtensorMapFloatOOBfill_enum {
5412 pub const CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA: CUtensorMapFloatOOBfill_enum =
5413 CUtensorMapFloatOOBfill_enum(1);
5414}
5415#[repr(transparent)]
5416#[doc = " Tensor map out-of-bounds fill type"]
5417#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5418pub struct CUtensorMapFloatOOBfill_enum(pub ::std::os::raw::c_uint);
5419#[doc = " Tensor map out-of-bounds fill type"]
5420pub use self::CUtensorMapFloatOOBfill_enum as CUtensorMapFloatOOBfill;
5421#[doc = " GPU Direct v3 tokens"]
5422#[repr(C)]
5423#[derive(Debug, Copy, Clone)]
5424pub struct CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st {
5425 pub p2pToken: ::std::os::raw::c_ulonglong,
5426 pub vaSpaceToken: ::std::os::raw::c_uint,
5427}
5428#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5429const _: () = {
5430 ["Size of CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st"]
5431 [::std::mem::size_of::<CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st>() - 16usize];
5432 ["Alignment of CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st"]
5433 [::std::mem::align_of::<CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st>() - 8usize];
5434 ["Offset of field: CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st::p2pToken"]
5435 [::std::mem::offset_of!(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st, p2pToken) - 0usize];
5436 ["Offset of field: CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st::vaSpaceToken"]
5437 [::std::mem::offset_of!(CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st, vaSpaceToken) - 8usize];
5438};
5439#[doc = " GPU Direct v3 tokens"]
5440pub type CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1 = CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st;
5441#[doc = " GPU Direct v3 tokens"]
5442pub type CUDA_POINTER_ATTRIBUTE_P2P_TOKENS = CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1;
5443impl CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum {
5444 #[doc = "< No access, meaning the device cannot access this memory at all, thus must be staged through accessible memory in order to complete certain operations"]
5445 pub const CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE: CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum =
5446 CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(0);
5447}
5448impl CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum {
5449 #[doc = "< Read-only access, meaning writes to this memory are considered invalid accesses and thus return error in that case."]
5450 pub const CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ: CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum =
5451 CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(1);
5452}
5453impl CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum {
5454 #[doc = "< Read-write access, the device has full read-write access to the memory"]
5455 pub const CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE: CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum =
5456 CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(3);
5457}
5458#[repr(transparent)]
5459#[doc = " Access flags that specify the level of access the current context's device has\n on the memory referenced."]
5460#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5461pub struct CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum(pub ::std::os::raw::c_uint);
5462#[doc = " Access flags that specify the level of access the current context's device has\n on the memory referenced."]
5463pub use self::CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS_enum as CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS;
5464#[doc = " Kernel launch parameters"]
5465#[repr(C)]
5466#[derive(Debug, Copy, Clone)]
5467pub struct CUDA_LAUNCH_PARAMS_st {
5468 #[doc = "< Kernel to launch"]
5469 pub function: CUfunction,
5470 #[doc = "< Width of grid in blocks"]
5471 pub gridDimX: ::std::os::raw::c_uint,
5472 #[doc = "< Height of grid in blocks"]
5473 pub gridDimY: ::std::os::raw::c_uint,
5474 #[doc = "< Depth of grid in blocks"]
5475 pub gridDimZ: ::std::os::raw::c_uint,
5476 #[doc = "< X dimension of each thread block"]
5477 pub blockDimX: ::std::os::raw::c_uint,
5478 #[doc = "< Y dimension of each thread block"]
5479 pub blockDimY: ::std::os::raw::c_uint,
5480 #[doc = "< Z dimension of each thread block"]
5481 pub blockDimZ: ::std::os::raw::c_uint,
5482 #[doc = "< Dynamic shared-memory size per thread block in bytes"]
5483 pub sharedMemBytes: ::std::os::raw::c_uint,
5484 #[doc = "< Stream identifier"]
5485 pub hStream: CUstream,
5486 #[doc = "< Array of pointers to kernel parameters"]
5487 pub kernelParams: *mut *mut ::std::os::raw::c_void,
5488}
5489#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5490const _: () = {
5491 ["Size of CUDA_LAUNCH_PARAMS_st"][::std::mem::size_of::<CUDA_LAUNCH_PARAMS_st>() - 56usize];
5492 ["Alignment of CUDA_LAUNCH_PARAMS_st"]
5493 [::std::mem::align_of::<CUDA_LAUNCH_PARAMS_st>() - 8usize];
5494 ["Offset of field: CUDA_LAUNCH_PARAMS_st::function"]
5495 [::std::mem::offset_of!(CUDA_LAUNCH_PARAMS_st, function) - 0usize];
5496 ["Offset of field: CUDA_LAUNCH_PARAMS_st::gridDimX"]
5497 [::std::mem::offset_of!(CUDA_LAUNCH_PARAMS_st, gridDimX) - 8usize];
5498 ["Offset of field: CUDA_LAUNCH_PARAMS_st::gridDimY"]
5499 [::std::mem::offset_of!(CUDA_LAUNCH_PARAMS_st, gridDimY) - 12usize];
5500 ["Offset of field: CUDA_LAUNCH_PARAMS_st::gridDimZ"]
5501 [::std::mem::offset_of!(CUDA_LAUNCH_PARAMS_st, gridDimZ) - 16usize];
5502 ["Offset of field: CUDA_LAUNCH_PARAMS_st::blockDimX"]
5503 [::std::mem::offset_of!(CUDA_LAUNCH_PARAMS_st, blockDimX) - 20usize];
5504 ["Offset of field: CUDA_LAUNCH_PARAMS_st::blockDimY"]
5505 [::std::mem::offset_of!(CUDA_LAUNCH_PARAMS_st, blockDimY) - 24usize];
5506 ["Offset of field: CUDA_LAUNCH_PARAMS_st::blockDimZ"]
5507 [::std::mem::offset_of!(CUDA_LAUNCH_PARAMS_st, blockDimZ) - 28usize];
5508 ["Offset of field: CUDA_LAUNCH_PARAMS_st::sharedMemBytes"]
5509 [::std::mem::offset_of!(CUDA_LAUNCH_PARAMS_st, sharedMemBytes) - 32usize];
5510 ["Offset of field: CUDA_LAUNCH_PARAMS_st::hStream"]
5511 [::std::mem::offset_of!(CUDA_LAUNCH_PARAMS_st, hStream) - 40usize];
5512 ["Offset of field: CUDA_LAUNCH_PARAMS_st::kernelParams"]
5513 [::std::mem::offset_of!(CUDA_LAUNCH_PARAMS_st, kernelParams) - 48usize];
5514};
5515#[doc = " Kernel launch parameters"]
5516pub type CUDA_LAUNCH_PARAMS_v1 = CUDA_LAUNCH_PARAMS_st;
5517#[doc = " Kernel launch parameters"]
5518pub type CUDA_LAUNCH_PARAMS = CUDA_LAUNCH_PARAMS_v1;
5519impl CUexternalMemoryHandleType_enum {
5520 #[doc = " Handle is an opaque file descriptor"]
5521 pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD: CUexternalMemoryHandleType_enum =
5522 CUexternalMemoryHandleType_enum(1);
5523}
5524impl CUexternalMemoryHandleType_enum {
5525 #[doc = " Handle is an opaque shared NT handle"]
5526 pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32: CUexternalMemoryHandleType_enum =
5527 CUexternalMemoryHandleType_enum(2);
5528}
5529impl CUexternalMemoryHandleType_enum {
5530 #[doc = " Handle is an opaque, globally shared handle"]
5531 pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT: CUexternalMemoryHandleType_enum =
5532 CUexternalMemoryHandleType_enum(3);
5533}
5534impl CUexternalMemoryHandleType_enum {
5535 #[doc = " Handle is a D3D12 heap object"]
5536 pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP: CUexternalMemoryHandleType_enum =
5537 CUexternalMemoryHandleType_enum(4);
5538}
5539impl CUexternalMemoryHandleType_enum {
5540 #[doc = " Handle is a D3D12 committed resource"]
5541 pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE: CUexternalMemoryHandleType_enum =
5542 CUexternalMemoryHandleType_enum(5);
5543}
5544impl CUexternalMemoryHandleType_enum {
5545 #[doc = " Handle is a shared NT handle to a D3D11 resource"]
5546 pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE: CUexternalMemoryHandleType_enum =
5547 CUexternalMemoryHandleType_enum(6);
5548}
5549impl CUexternalMemoryHandleType_enum {
5550 #[doc = " Handle is a globally shared handle to a D3D11 resource"]
5551 pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT: CUexternalMemoryHandleType_enum =
5552 CUexternalMemoryHandleType_enum(7);
5553}
5554impl CUexternalMemoryHandleType_enum {
5555 #[doc = " Handle is an NvSciBuf object"]
5556 pub const CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF: CUexternalMemoryHandleType_enum =
5557 CUexternalMemoryHandleType_enum(8);
5558}
5559#[repr(transparent)]
5560#[doc = " External memory handle types"]
5561#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5562pub struct CUexternalMemoryHandleType_enum(pub ::std::os::raw::c_uint);
5563#[doc = " External memory handle types"]
5564pub use self::CUexternalMemoryHandleType_enum as CUexternalMemoryHandleType;
5565#[doc = " External memory handle descriptor"]
5566#[repr(C)]
5567#[derive(Copy, Clone)]
5568pub struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st {
5569 #[doc = " Type of the handle"]
5570 pub type_: CUexternalMemoryHandleType,
5571 pub handle: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1,
5572 #[doc = " Size of the memory allocation"]
5573 pub size: ::std::os::raw::c_ulonglong,
5574 #[doc = " Flags must either be zero or ::CUDA_EXTERNAL_MEMORY_DEDICATED"]
5575 pub flags: ::std::os::raw::c_uint,
5576 pub reserved: [::std::os::raw::c_uint; 16usize],
5577}
5578#[repr(C)]
5579#[derive(Copy, Clone)]
5580pub union CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1 {
5581 #[doc = " File descriptor referencing the memory object. Valid\n when type is\n ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD"]
5582 pub fd: ::std::os::raw::c_int,
5583 pub win32: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1,
5584 #[doc = " A handle representing an NvSciBuf Object. Valid when type\n is ::CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF"]
5585 pub nvSciBufObject: *const ::std::os::raw::c_void,
5586}
5587#[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."]
5588#[repr(C)]
5589#[derive(Debug, Copy, Clone)]
5590pub struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
5591 #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"]
5592 pub handle: *mut ::std::os::raw::c_void,
5593 #[doc = " Name of a valid memory object.\n Must be NULL if 'handle' is non-NULL."]
5594 pub name: *const ::std::os::raw::c_void,
5595}
5596#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5597const _: () = {
5598 ["Size of CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::<
5599 CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1,
5600 >() - 16usize];
5601 ["Alignment of CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1"]
5602 [::std::mem::align_of::<CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1>()
5603 - 8usize];
5604 ["Offset of field: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1::handle"][::std::mem::offset_of!(
5605 CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1,
5606 handle
5607 )
5608 - 0usize];
5609 ["Offset of field: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1::name"][::std::mem::offset_of!(
5610 CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1,
5611 name
5612 )
5613 - 8usize];
5614};
5615#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5616const _: () = {
5617 ["Size of CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1"]
5618 [::std::mem::size_of::<CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1>() - 16usize];
5619 ["Alignment of CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1"]
5620 [::std::mem::align_of::<CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1>() - 8usize];
5621 ["Offset of field: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1::fd"]
5622 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1, fd) - 0usize];
5623 ["Offset of field: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1::win32"]
5624 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1, win32) - 0usize];
5625 ["Offset of field: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1::nvSciBufObject"][::std::mem::offset_of!(
5626 CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st__bindgen_ty_1,
5627 nvSciBufObject
5628 )
5629 - 0usize];
5630};
5631#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5632const _: () = {
5633 ["Size of CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st"]
5634 [::std::mem::size_of::<CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st>() - 104usize];
5635 ["Alignment of CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st"]
5636 [::std::mem::align_of::<CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st>() - 8usize];
5637 ["Offset of field: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st::type_"]
5638 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, type_) - 0usize];
5639 ["Offset of field: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st::handle"]
5640 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, handle) - 8usize];
5641 ["Offset of field: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st::size"]
5642 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, size) - 24usize];
5643 ["Offset of field: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st::flags"]
5644 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, flags) - 32usize];
5645 ["Offset of field: CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st::reserved"]
5646 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st, reserved) - 36usize];
5647};
5648#[doc = " External memory handle descriptor"]
5649pub type CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1 = CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st;
5650#[doc = " External memory handle descriptor"]
5651pub type CUDA_EXTERNAL_MEMORY_HANDLE_DESC = CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1;
5652#[doc = " External memory buffer descriptor"]
5653#[repr(C)]
5654#[derive(Debug, Copy, Clone)]
5655pub struct CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st {
5656 #[doc = " Offset into the memory object where the buffer's base is"]
5657 pub offset: ::std::os::raw::c_ulonglong,
5658 #[doc = " Size of the buffer"]
5659 pub size: ::std::os::raw::c_ulonglong,
5660 #[doc = " Flags reserved for future use. Must be zero."]
5661 pub flags: ::std::os::raw::c_uint,
5662 pub reserved: [::std::os::raw::c_uint; 16usize],
5663}
5664#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5665const _: () = {
5666 ["Size of CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st"]
5667 [::std::mem::size_of::<CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st>() - 88usize];
5668 ["Alignment of CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st"]
5669 [::std::mem::align_of::<CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st>() - 8usize];
5670 ["Offset of field: CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st::offset"]
5671 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st, offset) - 0usize];
5672 ["Offset of field: CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st::size"]
5673 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st, size) - 8usize];
5674 ["Offset of field: CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st::flags"]
5675 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st, flags) - 16usize];
5676 ["Offset of field: CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st::reserved"]
5677 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st, reserved) - 20usize];
5678};
5679#[doc = " External memory buffer descriptor"]
5680pub type CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1 = CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st;
5681#[doc = " External memory buffer descriptor"]
5682pub type CUDA_EXTERNAL_MEMORY_BUFFER_DESC = CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1;
5683#[doc = " External memory mipmap descriptor"]
5684#[repr(C)]
5685#[derive(Debug, Copy, Clone)]
5686pub struct CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st {
5687 #[doc = " Offset into the memory object where the base level of the\n mipmap chain is."]
5688 pub offset: ::std::os::raw::c_ulonglong,
5689 #[doc = " Format, dimension and type of base level of the mipmap chain"]
5690 pub arrayDesc: CUDA_ARRAY3D_DESCRIPTOR,
5691 #[doc = " Total number of levels in the mipmap chain"]
5692 pub numLevels: ::std::os::raw::c_uint,
5693 pub reserved: [::std::os::raw::c_uint; 16usize],
5694}
5695#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5696const _: () = {
5697 ["Size of CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st"]
5698 [::std::mem::size_of::<CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st>() - 120usize];
5699 ["Alignment of CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st"]
5700 [::std::mem::align_of::<CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st>() - 8usize];
5701 ["Offset of field: CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st::offset"]
5702 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, offset) - 0usize];
5703 ["Offset of field: CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st::arrayDesc"]
5704 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, arrayDesc) - 8usize];
5705 ["Offset of field: CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st::numLevels"]
5706 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, numLevels) - 48usize];
5707 ["Offset of field: CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st::reserved"]
5708 [::std::mem::offset_of!(CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st, reserved) - 52usize];
5709};
5710#[doc = " External memory mipmap descriptor"]
5711pub type CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 =
5712 CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st;
5713#[doc = " External memory mipmap descriptor"]
5714pub type CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC = CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1;
5715impl CUexternalSemaphoreHandleType_enum {
5716 #[doc = " Handle is an opaque file descriptor"]
5717 pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD: CUexternalSemaphoreHandleType_enum =
5718 CUexternalSemaphoreHandleType_enum(1);
5719}
5720impl CUexternalSemaphoreHandleType_enum {
5721 #[doc = " Handle is an opaque shared NT handle"]
5722 pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32: CUexternalSemaphoreHandleType_enum =
5723 CUexternalSemaphoreHandleType_enum(2);
5724}
5725impl CUexternalSemaphoreHandleType_enum {
5726 #[doc = " Handle is an opaque, globally shared handle"]
5727 pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT:
5728 CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(3);
5729}
5730impl CUexternalSemaphoreHandleType_enum {
5731 #[doc = " Handle is a shared NT handle referencing a D3D12 fence object"]
5732 pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE: CUexternalSemaphoreHandleType_enum =
5733 CUexternalSemaphoreHandleType_enum(4);
5734}
5735impl CUexternalSemaphoreHandleType_enum {
5736 #[doc = " Handle is a shared NT handle referencing a D3D11 fence object"]
5737 pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE: CUexternalSemaphoreHandleType_enum =
5738 CUexternalSemaphoreHandleType_enum(5);
5739}
5740impl CUexternalSemaphoreHandleType_enum {
5741 #[doc = " Opaque handle to NvSciSync Object"]
5742 pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC: CUexternalSemaphoreHandleType_enum =
5743 CUexternalSemaphoreHandleType_enum(6);
5744}
5745impl CUexternalSemaphoreHandleType_enum {
5746 #[doc = " Handle is a shared NT handle referencing a D3D11 keyed mutex object"]
5747 pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX:
5748 CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(7);
5749}
5750impl CUexternalSemaphoreHandleType_enum {
5751 #[doc = " Handle is a globally shared handle referencing a D3D11 keyed mutex object"]
5752 pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT:
5753 CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(8);
5754}
5755impl CUexternalSemaphoreHandleType_enum {
5756 #[doc = " Handle is an opaque file descriptor referencing a timeline semaphore"]
5757 pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD:
5758 CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(9);
5759}
5760impl CUexternalSemaphoreHandleType_enum {
5761 #[doc = " Handle is an opaque shared NT handle referencing a timeline semaphore"]
5762 pub const CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32:
5763 CUexternalSemaphoreHandleType_enum = CUexternalSemaphoreHandleType_enum(10);
5764}
5765#[repr(transparent)]
5766#[doc = " External semaphore handle types"]
5767#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
5768pub struct CUexternalSemaphoreHandleType_enum(pub ::std::os::raw::c_uint);
5769#[doc = " External semaphore handle types"]
5770pub use self::CUexternalSemaphoreHandleType_enum as CUexternalSemaphoreHandleType;
5771#[doc = " External semaphore handle descriptor"]
5772#[repr(C)]
5773#[derive(Copy, Clone)]
5774pub struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st {
5775 #[doc = " Type of the handle"]
5776 pub type_: CUexternalSemaphoreHandleType,
5777 pub handle: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1,
5778 #[doc = " Flags reserved for the future. Must be zero."]
5779 pub flags: ::std::os::raw::c_uint,
5780 pub reserved: [::std::os::raw::c_uint; 16usize],
5781}
5782#[repr(C)]
5783#[derive(Copy, Clone)]
5784pub union CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1 {
5785 #[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"]
5786 pub fd: ::std::os::raw::c_int,
5787 pub win32: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1,
5788 #[doc = " Valid NvSciSyncObj. Must be non NULL"]
5789 pub nvSciSyncObj: *const ::std::os::raw::c_void,
5790}
5791#[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."]
5792#[repr(C)]
5793#[derive(Debug, Copy, Clone)]
5794pub struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
5795 #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"]
5796 pub handle: *mut ::std::os::raw::c_void,
5797 #[doc = " Name of a valid synchronization primitive.\n Must be NULL if 'handle' is non-NULL."]
5798 pub name: *const ::std::os::raw::c_void,
5799}
5800#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5801const _: () = {
5802 ["Size of CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1"]
5803 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1>(
5804 ) - 16usize];
5805 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1"]
5806 [::std::mem::align_of::<CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1>(
5807 ) - 8usize];
5808 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1::handle"]
5809 [::std::mem::offset_of!(
5810 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1,
5811 handle
5812 ) - 0usize];
5813 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1::name"][::std::mem::offset_of!(
5814 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1__bindgen_ty_1,
5815 name
5816 )
5817 - 8usize];
5818};
5819#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5820const _: () = {
5821 ["Size of CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1"]
5822 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1>() - 16usize];
5823 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1"]
5824 [::std::mem::align_of::<CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1>() - 8usize];
5825 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1::fd"]
5826 [::std::mem::offset_of!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1, fd) - 0usize];
5827 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1::win32"][::std::mem::offset_of!(
5828 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1,
5829 win32
5830 ) - 0usize];
5831 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1::nvSciSyncObj"][::std::mem::offset_of!(
5832 CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st__bindgen_ty_1,
5833 nvSciSyncObj
5834 )
5835 - 0usize];
5836};
5837#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5838const _: () = {
5839 ["Size of CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st"]
5840 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st>() - 96usize];
5841 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st"]
5842 [::std::mem::align_of::<CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st>() - 8usize];
5843 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st::type_"]
5844 [::std::mem::offset_of!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, type_) - 0usize];
5845 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st::handle"]
5846 [::std::mem::offset_of!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, handle) - 8usize];
5847 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st::flags"]
5848 [::std::mem::offset_of!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, flags) - 24usize];
5849 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st::reserved"]
5850 [::std::mem::offset_of!(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st, reserved) - 28usize];
5851};
5852#[doc = " External semaphore handle descriptor"]
5853pub type CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 = CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st;
5854#[doc = " External semaphore handle descriptor"]
5855pub type CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC = CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1;
5856#[doc = " External semaphore signal parameters"]
5857#[repr(C)]
5858#[derive(Copy, Clone)]
5859pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st {
5860 pub params: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1,
5861 #[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."]
5862 pub flags: ::std::os::raw::c_uint,
5863 pub reserved: [::std::os::raw::c_uint; 16usize],
5864}
5865#[repr(C)]
5866#[derive(Copy, Clone)]
5867pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1 {
5868 pub fence: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1,
5869 pub nvSciSync: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2,
5870 pub keyedMutex: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3,
5871 pub reserved: [::std::os::raw::c_uint; 12usize],
5872}
5873#[doc = " Parameters for fence objects"]
5874#[repr(C)]
5875#[derive(Debug, Copy, Clone)]
5876pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1 {
5877 #[doc = " Value of fence to be signaled"]
5878 pub value: ::std::os::raw::c_ulonglong,
5879}
5880#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5881const _: () = {
5882 ["Size of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1"]
5883 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1>(
5884 ) - 8usize];
5885 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1"]
5886 [::std::mem::align_of::<
5887 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1,
5888 >() - 8usize];
5889 [
5890 "Offset of field: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1::value",
5891 ][::std::mem::offset_of!(
5892 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_1,
5893 value
5894 ) - 0usize];
5895};
5896#[repr(C)]
5897#[derive(Copy, Clone)]
5898pub union CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2 {
5899 #[doc = " Pointer to NvSciSyncFence. Valid if ::CUexternalSemaphoreHandleType\n is of type ::CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC."]
5900 pub fence: *mut ::std::os::raw::c_void,
5901 pub reserved: ::std::os::raw::c_ulonglong,
5902}
5903#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5904const _: () = {
5905 ["Size of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2"]
5906 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2>(
5907 ) - 8usize];
5908 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2"]
5909 [::std::mem::align_of::<
5910 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2,
5911 >() - 8usize];
5912 [
5913 "Offset of field: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2::fence",
5914 ][::std::mem::offset_of!(
5915 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2,
5916 fence
5917 ) - 0usize];
5918 [
5919 "Offset of field: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2::reserved",
5920 ][::std::mem::offset_of!(
5921 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_2,
5922 reserved
5923 ) - 0usize];
5924};
5925#[doc = " Parameters for keyed mutex objects"]
5926#[repr(C)]
5927#[derive(Debug, Copy, Clone)]
5928pub struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3 {
5929 #[doc = " Value of key to release the mutex with"]
5930 pub key: ::std::os::raw::c_ulonglong,
5931}
5932#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5933const _: () = {
5934 ["Size of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3"]
5935 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3>(
5936 ) - 8usize];
5937 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3"]
5938 [::std::mem::align_of::<
5939 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3,
5940 >() - 8usize];
5941 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3::key"]
5942 [::std::mem::offset_of!(
5943 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1__bindgen_ty_3,
5944 key
5945 ) - 0usize];
5946};
5947#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5948const _: () = {
5949 ["Size of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1"]
5950 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1>() - 72usize];
5951 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1"]
5952 [::std::mem::align_of::<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1>() - 8usize];
5953 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1::fence"][::std::mem::offset_of!(
5954 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1,
5955 fence
5956 ) - 0usize];
5957 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1::nvSciSync"][::std::mem::offset_of!(
5958 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1,
5959 nvSciSync
5960 )
5961 - 8usize];
5962 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1::keyedMutex"][::std::mem::offset_of!(
5963 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1,
5964 keyedMutex
5965 )
5966 - 16usize];
5967 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1::reserved"][::std::mem::offset_of!(
5968 CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st__bindgen_ty_1,
5969 reserved
5970 )
5971 - 24usize];
5972};
5973#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5974const _: () = {
5975 ["Size of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st"]
5976 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st>() - 144usize];
5977 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st"]
5978 [::std::mem::align_of::<CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st>() - 8usize];
5979 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st::params"]
5980 [::std::mem::offset_of!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, params) - 0usize];
5981 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st::flags"]
5982 [::std::mem::offset_of!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, flags) - 72usize];
5983 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st::reserved"]
5984 [::std::mem::offset_of!(CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st, reserved) - 76usize];
5985};
5986#[doc = " External semaphore signal parameters"]
5987pub type CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 = CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st;
5988#[doc = " External semaphore signal parameters"]
5989pub type CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS = CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1;
5990#[doc = " External semaphore wait parameters"]
5991#[repr(C)]
5992#[derive(Copy, Clone)]
5993pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st {
5994 pub params: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1,
5995 #[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."]
5996 pub flags: ::std::os::raw::c_uint,
5997 pub reserved: [::std::os::raw::c_uint; 16usize],
5998}
5999#[repr(C)]
6000#[derive(Copy, Clone)]
6001pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1 {
6002 pub fence: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1,
6003 pub nvSciSync: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2,
6004 pub keyedMutex: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3,
6005 pub reserved: [::std::os::raw::c_uint; 10usize],
6006}
6007#[doc = " Parameters for fence objects"]
6008#[repr(C)]
6009#[derive(Debug, Copy, Clone)]
6010pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1 {
6011 #[doc = " Value of fence to be waited on"]
6012 pub value: ::std::os::raw::c_ulonglong,
6013}
6014#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6015const _: () = {
6016 ["Size of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1"]
6017 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1>(
6018 ) - 8usize];
6019 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1"]
6020 [::std::mem::align_of::<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1>(
6021 ) - 8usize];
6022 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1::value"]
6023 [::std::mem::offset_of!(
6024 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_1,
6025 value
6026 ) - 0usize];
6027};
6028#[doc = " Pointer to NvSciSyncFence. Valid if CUexternalSemaphoreHandleType\n is of type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC."]
6029#[repr(C)]
6030#[derive(Copy, Clone)]
6031pub union CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2 {
6032 pub fence: *mut ::std::os::raw::c_void,
6033 pub reserved: ::std::os::raw::c_ulonglong,
6034}
6035#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6036const _: () = {
6037 ["Size of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2"]
6038 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2>(
6039 ) - 8usize];
6040 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2"]
6041 [::std::mem::align_of::<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2>(
6042 ) - 8usize];
6043 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2::fence"]
6044 [::std::mem::offset_of!(
6045 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2,
6046 fence
6047 ) - 0usize];
6048 [
6049 "Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2::reserved",
6050 ][::std::mem::offset_of!(
6051 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_2,
6052 reserved
6053 ) - 0usize];
6054};
6055#[doc = " Parameters for keyed mutex objects"]
6056#[repr(C)]
6057#[derive(Debug, Copy, Clone)]
6058pub struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3 {
6059 #[doc = " Value of key to acquire the mutex with"]
6060 pub key: ::std::os::raw::c_ulonglong,
6061 #[doc = " Timeout in milliseconds to wait to acquire the mutex"]
6062 pub timeoutMs: ::std::os::raw::c_uint,
6063}
6064#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6065const _: () = {
6066 ["Size of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3"]
6067 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3>(
6068 ) - 16usize];
6069 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3"]
6070 [::std::mem::align_of::<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3>(
6071 ) - 8usize];
6072 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3::key"][::std::mem::offset_of!(
6073 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3,
6074 key
6075 )
6076 - 0usize];
6077 [
6078 "Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3::timeoutMs",
6079 ][::std::mem::offset_of!(
6080 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1__bindgen_ty_3,
6081 timeoutMs
6082 ) - 8usize];
6083};
6084#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6085const _: () = {
6086 ["Size of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1"]
6087 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1>() - 72usize];
6088 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1"]
6089 [::std::mem::align_of::<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1>() - 8usize];
6090 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1::fence"][::std::mem::offset_of!(
6091 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1,
6092 fence
6093 ) - 0usize];
6094 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1::nvSciSync"][::std::mem::offset_of!(
6095 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1,
6096 nvSciSync
6097 )
6098 - 8usize];
6099 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1::keyedMutex"][::std::mem::offset_of!(
6100 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1,
6101 keyedMutex
6102 )
6103 - 16usize];
6104 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1::reserved"][::std::mem::offset_of!(
6105 CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st__bindgen_ty_1,
6106 reserved
6107 )
6108 - 32usize];
6109};
6110#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6111const _: () = {
6112 ["Size of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st"]
6113 [::std::mem::size_of::<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st>() - 144usize];
6114 ["Alignment of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st"]
6115 [::std::mem::align_of::<CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st>() - 8usize];
6116 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st::params"]
6117 [::std::mem::offset_of!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, params) - 0usize];
6118 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st::flags"]
6119 [::std::mem::offset_of!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, flags) - 72usize];
6120 ["Offset of field: CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st::reserved"]
6121 [::std::mem::offset_of!(CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st, reserved) - 76usize];
6122};
6123#[doc = " External semaphore wait parameters"]
6124pub type CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 = CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st;
6125#[doc = " External semaphore wait parameters"]
6126pub type CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS = CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1;
6127#[doc = " Semaphore signal node parameters"]
6128#[repr(C)]
6129#[derive(Debug, Copy, Clone)]
6130pub struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st {
6131 #[doc = "< Array of external semaphore handles."]
6132 pub extSemArray: *mut CUexternalSemaphore,
6133 #[doc = "< Array of external semaphore signal parameters."]
6134 pub paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,
6135 #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
6136 pub numExtSems: ::std::os::raw::c_uint,
6137}
6138#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6139const _: () = {
6140 ["Size of CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st"]
6141 [::std::mem::size_of::<CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st>() - 24usize];
6142 ["Alignment of CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st"]
6143 [::std::mem::align_of::<CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st>() - 8usize];
6144 ["Offset of field: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st::extSemArray"]
6145 [::std::mem::offset_of!(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st, extSemArray) - 0usize];
6146 ["Offset of field: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st::paramsArray"]
6147 [::std::mem::offset_of!(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st, paramsArray) - 8usize];
6148 ["Offset of field: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st::numExtSems"]
6149 [::std::mem::offset_of!(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st, numExtSems) - 16usize];
6150};
6151#[doc = " Semaphore signal node parameters"]
6152pub type CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1 = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st;
6153#[doc = " Semaphore signal node parameters"]
6154pub type CUDA_EXT_SEM_SIGNAL_NODE_PARAMS = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1;
6155#[doc = " Semaphore signal node parameters"]
6156#[repr(C)]
6157#[derive(Debug, Copy, Clone)]
6158pub struct CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st {
6159 #[doc = "< Array of external semaphore handles."]
6160 pub extSemArray: *mut CUexternalSemaphore,
6161 #[doc = "< Array of external semaphore signal parameters."]
6162 pub paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,
6163 #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
6164 pub numExtSems: ::std::os::raw::c_uint,
6165}
6166#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6167const _: () = {
6168 ["Size of CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st"]
6169 [::std::mem::size_of::<CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st>() - 24usize];
6170 ["Alignment of CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st"]
6171 [::std::mem::align_of::<CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st>() - 8usize];
6172 ["Offset of field: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st::extSemArray"]
6173 [::std::mem::offset_of!(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st, extSemArray) - 0usize];
6174 ["Offset of field: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st::paramsArray"]
6175 [::std::mem::offset_of!(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st, paramsArray) - 8usize];
6176 ["Offset of field: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st::numExtSems"]
6177 [::std::mem::offset_of!(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st, numExtSems) - 16usize];
6178};
6179#[doc = " Semaphore signal node parameters"]
6180pub type CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 = CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st;
6181#[doc = " Semaphore wait node parameters"]
6182#[repr(C)]
6183#[derive(Debug, Copy, Clone)]
6184pub struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_st {
6185 #[doc = "< Array of external semaphore handles."]
6186 pub extSemArray: *mut CUexternalSemaphore,
6187 #[doc = "< Array of external semaphore wait parameters."]
6188 pub paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,
6189 #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
6190 pub numExtSems: ::std::os::raw::c_uint,
6191}
6192#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6193const _: () = {
6194 ["Size of CUDA_EXT_SEM_WAIT_NODE_PARAMS_st"]
6195 [::std::mem::size_of::<CUDA_EXT_SEM_WAIT_NODE_PARAMS_st>() - 24usize];
6196 ["Alignment of CUDA_EXT_SEM_WAIT_NODE_PARAMS_st"]
6197 [::std::mem::align_of::<CUDA_EXT_SEM_WAIT_NODE_PARAMS_st>() - 8usize];
6198 ["Offset of field: CUDA_EXT_SEM_WAIT_NODE_PARAMS_st::extSemArray"]
6199 [::std::mem::offset_of!(CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, extSemArray) - 0usize];
6200 ["Offset of field: CUDA_EXT_SEM_WAIT_NODE_PARAMS_st::paramsArray"]
6201 [::std::mem::offset_of!(CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, paramsArray) - 8usize];
6202 ["Offset of field: CUDA_EXT_SEM_WAIT_NODE_PARAMS_st::numExtSems"]
6203 [::std::mem::offset_of!(CUDA_EXT_SEM_WAIT_NODE_PARAMS_st, numExtSems) - 16usize];
6204};
6205#[doc = " Semaphore wait node parameters"]
6206pub type CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 = CUDA_EXT_SEM_WAIT_NODE_PARAMS_st;
6207#[doc = " Semaphore wait node parameters"]
6208pub type CUDA_EXT_SEM_WAIT_NODE_PARAMS = CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1;
6209#[doc = " Semaphore wait node parameters"]
6210#[repr(C)]
6211#[derive(Debug, Copy, Clone)]
6212pub struct CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st {
6213 #[doc = "< Array of external semaphore handles."]
6214 pub extSemArray: *mut CUexternalSemaphore,
6215 #[doc = "< Array of external semaphore wait parameters."]
6216 pub paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,
6217 #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
6218 pub numExtSems: ::std::os::raw::c_uint,
6219}
6220#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6221const _: () = {
6222 ["Size of CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st"]
6223 [::std::mem::size_of::<CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st>() - 24usize];
6224 ["Alignment of CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st"]
6225 [::std::mem::align_of::<CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st>() - 8usize];
6226 ["Offset of field: CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st::extSemArray"]
6227 [::std::mem::offset_of!(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st, extSemArray) - 0usize];
6228 ["Offset of field: CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st::paramsArray"]
6229 [::std::mem::offset_of!(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st, paramsArray) - 8usize];
6230 ["Offset of field: CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st::numExtSems"]
6231 [::std::mem::offset_of!(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st, numExtSems) - 16usize];
6232};
6233#[doc = " Semaphore wait node parameters"]
6234pub type CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 = CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st;
6235pub type CUmemGenericAllocationHandle_v1 = ::std::os::raw::c_ulonglong;
6236pub type CUmemGenericAllocationHandle = CUmemGenericAllocationHandle_v1;
6237impl CUmemAllocationHandleType_enum {
6238 #[doc = "< Does not allow any export mechanism. >"]
6239 pub const CU_MEM_HANDLE_TYPE_NONE: CUmemAllocationHandleType_enum =
6240 CUmemAllocationHandleType_enum(0);
6241}
6242impl CUmemAllocationHandleType_enum {
6243 #[doc = "< Allows a file descriptor to be used for exporting. Permitted only on POSIX systems. (int)"]
6244 pub const CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR: CUmemAllocationHandleType_enum =
6245 CUmemAllocationHandleType_enum(1);
6246}
6247impl CUmemAllocationHandleType_enum {
6248 #[doc = "< Allows a Win32 NT handle to be used for exporting. (HANDLE)"]
6249 pub const CU_MEM_HANDLE_TYPE_WIN32: CUmemAllocationHandleType_enum =
6250 CUmemAllocationHandleType_enum(2);
6251}
6252impl CUmemAllocationHandleType_enum {
6253 #[doc = "< Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)"]
6254 pub const CU_MEM_HANDLE_TYPE_WIN32_KMT: CUmemAllocationHandleType_enum =
6255 CUmemAllocationHandleType_enum(4);
6256}
6257impl CUmemAllocationHandleType_enum {
6258 #[doc = "< Allows a fabric handle to be used for exporting. (CUmemFabricHandle)"]
6259 pub const CU_MEM_HANDLE_TYPE_FABRIC: CUmemAllocationHandleType_enum =
6260 CUmemAllocationHandleType_enum(8);
6261}
6262impl CUmemAllocationHandleType_enum {
6263 pub const CU_MEM_HANDLE_TYPE_MAX: CUmemAllocationHandleType_enum =
6264 CUmemAllocationHandleType_enum(2147483647);
6265}
6266#[repr(transparent)]
6267#[doc = " Flags for specifying particular handle types"]
6268#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6269pub struct CUmemAllocationHandleType_enum(pub ::std::os::raw::c_uint);
6270#[doc = " Flags for specifying particular handle types"]
6271pub use self::CUmemAllocationHandleType_enum as CUmemAllocationHandleType;
6272impl CUmemAccess_flags_enum {
6273 #[doc = "< Default, make the address range not accessible"]
6274 pub const CU_MEM_ACCESS_FLAGS_PROT_NONE: CUmemAccess_flags_enum = CUmemAccess_flags_enum(0);
6275}
6276impl CUmemAccess_flags_enum {
6277 #[doc = "< Make the address range read accessible"]
6278 pub const CU_MEM_ACCESS_FLAGS_PROT_READ: CUmemAccess_flags_enum = CUmemAccess_flags_enum(1);
6279}
6280impl CUmemAccess_flags_enum {
6281 #[doc = "< Make the address range read-write accessible"]
6282 pub const CU_MEM_ACCESS_FLAGS_PROT_READWRITE: CUmemAccess_flags_enum =
6283 CUmemAccess_flags_enum(3);
6284}
6285impl CUmemAccess_flags_enum {
6286 pub const CU_MEM_ACCESS_FLAGS_PROT_MAX: CUmemAccess_flags_enum =
6287 CUmemAccess_flags_enum(2147483647);
6288}
6289#[repr(transparent)]
6290#[doc = " Specifies the memory protection flags for mapping."]
6291#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6292pub struct CUmemAccess_flags_enum(pub ::std::os::raw::c_uint);
6293#[doc = " Specifies the memory protection flags for mapping."]
6294pub use self::CUmemAccess_flags_enum as CUmemAccess_flags;
6295impl CUmemLocationType_enum {
6296 pub const CU_MEM_LOCATION_TYPE_INVALID: CUmemLocationType_enum = CUmemLocationType_enum(0);
6297}
6298impl CUmemLocationType_enum {
6299 #[doc = "< Location is a device location, thus id is a device ordinal"]
6300 pub const CU_MEM_LOCATION_TYPE_DEVICE: CUmemLocationType_enum = CUmemLocationType_enum(1);
6301}
6302impl CUmemLocationType_enum {
6303 #[doc = "< Location is host, id is ignored"]
6304 pub const CU_MEM_LOCATION_TYPE_HOST: CUmemLocationType_enum = CUmemLocationType_enum(2);
6305}
6306impl CUmemLocationType_enum {
6307 #[doc = "< Location is a host NUMA node, thus id is a host NUMA node id"]
6308 pub const CU_MEM_LOCATION_TYPE_HOST_NUMA: CUmemLocationType_enum = CUmemLocationType_enum(3);
6309}
6310impl CUmemLocationType_enum {
6311 #[doc = "< Location is a host NUMA node of the current thread, id is ignored"]
6312 pub const CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT: CUmemLocationType_enum =
6313 CUmemLocationType_enum(4);
6314}
6315impl CUmemLocationType_enum {
6316 pub const CU_MEM_LOCATION_TYPE_MAX: CUmemLocationType_enum = CUmemLocationType_enum(2147483647);
6317}
6318#[repr(transparent)]
6319#[doc = " Specifies the type of location"]
6320#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6321pub struct CUmemLocationType_enum(pub ::std::os::raw::c_uint);
6322#[doc = " Specifies the type of location"]
6323pub use self::CUmemLocationType_enum as CUmemLocationType;
6324impl CUmemAllocationType_enum {
6325 pub const CU_MEM_ALLOCATION_TYPE_INVALID: CUmemAllocationType_enum =
6326 CUmemAllocationType_enum(0);
6327}
6328impl CUmemAllocationType_enum {
6329 #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
6330 pub const CU_MEM_ALLOCATION_TYPE_PINNED: CUmemAllocationType_enum = CUmemAllocationType_enum(1);
6331}
6332impl CUmemAllocationType_enum {
6333 #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
6334 pub const CU_MEM_ALLOCATION_TYPE_MAX: CUmemAllocationType_enum =
6335 CUmemAllocationType_enum(2147483647);
6336}
6337#[repr(transparent)]
6338#[doc = " Defines the allocation types available"]
6339#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6340pub struct CUmemAllocationType_enum(pub ::std::os::raw::c_uint);
6341#[doc = " Defines the allocation types available"]
6342pub use self::CUmemAllocationType_enum as CUmemAllocationType;
6343impl CUmemAllocationGranularity_flags_enum {
6344 #[doc = "< Minimum required granularity for allocation"]
6345 pub const CU_MEM_ALLOC_GRANULARITY_MINIMUM: CUmemAllocationGranularity_flags_enum =
6346 CUmemAllocationGranularity_flags_enum(0);
6347}
6348impl CUmemAllocationGranularity_flags_enum {
6349 #[doc = "< Recommended granularity for allocation for best performance"]
6350 pub const CU_MEM_ALLOC_GRANULARITY_RECOMMENDED: CUmemAllocationGranularity_flags_enum =
6351 CUmemAllocationGranularity_flags_enum(1);
6352}
6353#[repr(transparent)]
6354#[doc = " Flag for requesting different optimal and required granularities for an allocation."]
6355#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6356pub struct CUmemAllocationGranularity_flags_enum(pub ::std::os::raw::c_uint);
6357#[doc = " Flag for requesting different optimal and required granularities for an allocation."]
6358pub use self::CUmemAllocationGranularity_flags_enum as CUmemAllocationGranularity_flags;
6359impl CUmemRangeHandleType_enum {
6360 pub const CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD: CUmemRangeHandleType_enum =
6361 CUmemRangeHandleType_enum(1);
6362}
6363impl CUmemRangeHandleType_enum {
6364 pub const CU_MEM_RANGE_HANDLE_TYPE_MAX: CUmemRangeHandleType_enum =
6365 CUmemRangeHandleType_enum(2147483647);
6366}
6367#[repr(transparent)]
6368#[doc = " Specifies the handle type for address range"]
6369#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6370pub struct CUmemRangeHandleType_enum(pub ::std::os::raw::c_uint);
6371#[doc = " Specifies the handle type for address range"]
6372pub use self::CUmemRangeHandleType_enum as CUmemRangeHandleType;
6373impl CUarraySparseSubresourceType_enum {
6374 pub const CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL: CUarraySparseSubresourceType_enum =
6375 CUarraySparseSubresourceType_enum(0);
6376}
6377impl CUarraySparseSubresourceType_enum {
6378 pub const CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL: CUarraySparseSubresourceType_enum =
6379 CUarraySparseSubresourceType_enum(1);
6380}
6381#[repr(transparent)]
6382#[doc = " Sparse subresource types"]
6383#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6384pub struct CUarraySparseSubresourceType_enum(pub ::std::os::raw::c_uint);
6385#[doc = " Sparse subresource types"]
6386pub use self::CUarraySparseSubresourceType_enum as CUarraySparseSubresourceType;
6387impl CUmemOperationType_enum {
6388 pub const CU_MEM_OPERATION_TYPE_MAP: CUmemOperationType_enum = CUmemOperationType_enum(1);
6389}
6390impl CUmemOperationType_enum {
6391 pub const CU_MEM_OPERATION_TYPE_UNMAP: CUmemOperationType_enum = CUmemOperationType_enum(2);
6392}
6393#[repr(transparent)]
6394#[doc = " Memory operation types"]
6395#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6396pub struct CUmemOperationType_enum(pub ::std::os::raw::c_uint);
6397#[doc = " Memory operation types"]
6398pub use self::CUmemOperationType_enum as CUmemOperationType;
6399impl CUmemHandleType_enum {
6400 pub const CU_MEM_HANDLE_TYPE_GENERIC: CUmemHandleType_enum = CUmemHandleType_enum(0);
6401}
6402#[repr(transparent)]
6403#[doc = " Memory handle types"]
6404#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6405pub struct CUmemHandleType_enum(pub ::std::os::raw::c_uint);
6406#[doc = " Memory handle types"]
6407pub use self::CUmemHandleType_enum as CUmemHandleType;
6408#[doc = " Specifies the CUDA array or CUDA mipmapped array memory mapping information"]
6409#[repr(C)]
6410#[derive(Copy, Clone)]
6411pub struct CUarrayMapInfo_st {
6412 #[doc = "< Resource type"]
6413 pub resourceType: CUresourcetype,
6414 pub resource: CUarrayMapInfo_st__bindgen_ty_1,
6415 #[doc = "< Sparse subresource type"]
6416 pub subresourceType: CUarraySparseSubresourceType,
6417 pub subresource: CUarrayMapInfo_st__bindgen_ty_2,
6418 #[doc = "< Memory operation type"]
6419 pub memOperationType: CUmemOperationType,
6420 #[doc = "< Memory handle type"]
6421 pub memHandleType: CUmemHandleType,
6422 pub memHandle: CUarrayMapInfo_st__bindgen_ty_3,
6423 #[doc = "< Offset within the memory"]
6424 pub offset: ::std::os::raw::c_ulonglong,
6425 #[doc = "< Device ordinal bit mask"]
6426 pub deviceBitMask: ::std::os::raw::c_uint,
6427 #[doc = "< flags for future use, must be zero now."]
6428 pub flags: ::std::os::raw::c_uint,
6429 #[doc = "< Reserved for future use, must be zero now."]
6430 pub reserved: [::std::os::raw::c_uint; 2usize],
6431}
6432#[repr(C)]
6433#[derive(Copy, Clone)]
6434pub union CUarrayMapInfo_st__bindgen_ty_1 {
6435 pub mipmap: CUmipmappedArray,
6436 pub array: CUarray,
6437}
6438#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6439const _: () = {
6440 ["Size of CUarrayMapInfo_st__bindgen_ty_1"]
6441 [::std::mem::size_of::<CUarrayMapInfo_st__bindgen_ty_1>() - 8usize];
6442 ["Alignment of CUarrayMapInfo_st__bindgen_ty_1"]
6443 [::std::mem::align_of::<CUarrayMapInfo_st__bindgen_ty_1>() - 8usize];
6444 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_1::mipmap"]
6445 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_1, mipmap) - 0usize];
6446 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_1::array"]
6447 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_1, array) - 0usize];
6448};
6449#[repr(C)]
6450#[derive(Copy, Clone)]
6451pub union CUarrayMapInfo_st__bindgen_ty_2 {
6452 pub sparseLevel: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1,
6453 pub miptail: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2,
6454}
6455#[repr(C)]
6456#[derive(Debug, Copy, Clone)]
6457pub struct CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1 {
6458 #[doc = "< For CUDA mipmapped arrays must a valid mipmap level. For CUDA arrays must be zero"]
6459 pub level: ::std::os::raw::c_uint,
6460 #[doc = "< For CUDA layered arrays must be a valid layer index. Otherwise, must be zero"]
6461 pub layer: ::std::os::raw::c_uint,
6462 #[doc = "< Starting X offset in elements"]
6463 pub offsetX: ::std::os::raw::c_uint,
6464 #[doc = "< Starting Y offset in elements"]
6465 pub offsetY: ::std::os::raw::c_uint,
6466 #[doc = "< Starting Z offset in elements"]
6467 pub offsetZ: ::std::os::raw::c_uint,
6468 #[doc = "< Width in elements"]
6469 pub extentWidth: ::std::os::raw::c_uint,
6470 #[doc = "< Height in elements"]
6471 pub extentHeight: ::std::os::raw::c_uint,
6472 #[doc = "< Depth in elements"]
6473 pub extentDepth: ::std::os::raw::c_uint,
6474}
6475#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6476const _: () = {
6477 ["Size of CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1"]
6478 [::std::mem::size_of::<CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1>() - 32usize];
6479 ["Alignment of CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1"]
6480 [::std::mem::align_of::<CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1>() - 4usize];
6481 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1::level"]
6482 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1, level) - 0usize];
6483 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1::layer"]
6484 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1, layer) - 4usize];
6485 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1::offsetX"]
6486 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1, offsetX) - 8usize];
6487 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1::offsetY"]
6488 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1, offsetY) - 12usize];
6489 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1::offsetZ"]
6490 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1, offsetZ) - 16usize];
6491 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1::extentWidth"][::std::mem::offset_of!(
6492 CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1,
6493 extentWidth
6494 ) - 20usize];
6495 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1::extentHeight"][::std::mem::offset_of!(
6496 CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1,
6497 extentHeight
6498 ) - 24usize];
6499 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1::extentDepth"][::std::mem::offset_of!(
6500 CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_1,
6501 extentDepth
6502 ) - 28usize];
6503};
6504#[repr(C)]
6505#[derive(Debug, Copy, Clone)]
6506pub struct CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2 {
6507 #[doc = "< For CUDA layered arrays must be a valid layer index. Otherwise, must be zero"]
6508 pub layer: ::std::os::raw::c_uint,
6509 #[doc = "< Offset within mip tail"]
6510 pub offset: ::std::os::raw::c_ulonglong,
6511 #[doc = "< Extent in bytes"]
6512 pub size: ::std::os::raw::c_ulonglong,
6513}
6514#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6515const _: () = {
6516 ["Size of CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2"]
6517 [::std::mem::size_of::<CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2>() - 24usize];
6518 ["Alignment of CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2"]
6519 [::std::mem::align_of::<CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2>() - 8usize];
6520 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2::layer"]
6521 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2, layer) - 0usize];
6522 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2::offset"]
6523 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2, offset) - 8usize];
6524 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2::size"]
6525 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_2__bindgen_ty_2, size) - 16usize];
6526};
6527#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6528const _: () = {
6529 ["Size of CUarrayMapInfo_st__bindgen_ty_2"]
6530 [::std::mem::size_of::<CUarrayMapInfo_st__bindgen_ty_2>() - 32usize];
6531 ["Alignment of CUarrayMapInfo_st__bindgen_ty_2"]
6532 [::std::mem::align_of::<CUarrayMapInfo_st__bindgen_ty_2>() - 8usize];
6533 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2::sparseLevel"]
6534 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_2, sparseLevel) - 0usize];
6535 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_2::miptail"]
6536 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_2, miptail) - 0usize];
6537};
6538#[repr(C)]
6539#[derive(Copy, Clone)]
6540pub union CUarrayMapInfo_st__bindgen_ty_3 {
6541 pub memHandle: CUmemGenericAllocationHandle,
6542}
6543#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6544const _: () = {
6545 ["Size of CUarrayMapInfo_st__bindgen_ty_3"]
6546 [::std::mem::size_of::<CUarrayMapInfo_st__bindgen_ty_3>() - 8usize];
6547 ["Alignment of CUarrayMapInfo_st__bindgen_ty_3"]
6548 [::std::mem::align_of::<CUarrayMapInfo_st__bindgen_ty_3>() - 8usize];
6549 ["Offset of field: CUarrayMapInfo_st__bindgen_ty_3::memHandle"]
6550 [::std::mem::offset_of!(CUarrayMapInfo_st__bindgen_ty_3, memHandle) - 0usize];
6551};
6552#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6553const _: () = {
6554 ["Size of CUarrayMapInfo_st"][::std::mem::size_of::<CUarrayMapInfo_st>() - 96usize];
6555 ["Alignment of CUarrayMapInfo_st"][::std::mem::align_of::<CUarrayMapInfo_st>() - 8usize];
6556 ["Offset of field: CUarrayMapInfo_st::resourceType"]
6557 [::std::mem::offset_of!(CUarrayMapInfo_st, resourceType) - 0usize];
6558 ["Offset of field: CUarrayMapInfo_st::resource"]
6559 [::std::mem::offset_of!(CUarrayMapInfo_st, resource) - 8usize];
6560 ["Offset of field: CUarrayMapInfo_st::subresourceType"]
6561 [::std::mem::offset_of!(CUarrayMapInfo_st, subresourceType) - 16usize];
6562 ["Offset of field: CUarrayMapInfo_st::subresource"]
6563 [::std::mem::offset_of!(CUarrayMapInfo_st, subresource) - 24usize];
6564 ["Offset of field: CUarrayMapInfo_st::memOperationType"]
6565 [::std::mem::offset_of!(CUarrayMapInfo_st, memOperationType) - 56usize];
6566 ["Offset of field: CUarrayMapInfo_st::memHandleType"]
6567 [::std::mem::offset_of!(CUarrayMapInfo_st, memHandleType) - 60usize];
6568 ["Offset of field: CUarrayMapInfo_st::memHandle"]
6569 [::std::mem::offset_of!(CUarrayMapInfo_st, memHandle) - 64usize];
6570 ["Offset of field: CUarrayMapInfo_st::offset"]
6571 [::std::mem::offset_of!(CUarrayMapInfo_st, offset) - 72usize];
6572 ["Offset of field: CUarrayMapInfo_st::deviceBitMask"]
6573 [::std::mem::offset_of!(CUarrayMapInfo_st, deviceBitMask) - 80usize];
6574 ["Offset of field: CUarrayMapInfo_st::flags"]
6575 [::std::mem::offset_of!(CUarrayMapInfo_st, flags) - 84usize];
6576 ["Offset of field: CUarrayMapInfo_st::reserved"]
6577 [::std::mem::offset_of!(CUarrayMapInfo_st, reserved) - 88usize];
6578};
6579#[doc = " Specifies the CUDA array or CUDA mipmapped array memory mapping information"]
6580pub type CUarrayMapInfo_v1 = CUarrayMapInfo_st;
6581#[doc = " Specifies the CUDA array or CUDA mipmapped array memory mapping information"]
6582pub type CUarrayMapInfo = CUarrayMapInfo_v1;
6583#[doc = " Specifies a memory location."]
6584#[repr(C)]
6585#[derive(Debug, Copy, Clone)]
6586pub struct CUmemLocation_st {
6587 #[doc = "< Specifies the location type, which modifies the meaning of id."]
6588 pub type_: CUmemLocationType,
6589 #[doc = "< identifier for a given this location's ::CUmemLocationType."]
6590 pub id: ::std::os::raw::c_int,
6591}
6592#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6593const _: () = {
6594 ["Size of CUmemLocation_st"][::std::mem::size_of::<CUmemLocation_st>() - 8usize];
6595 ["Alignment of CUmemLocation_st"][::std::mem::align_of::<CUmemLocation_st>() - 4usize];
6596 ["Offset of field: CUmemLocation_st::type_"]
6597 [::std::mem::offset_of!(CUmemLocation_st, type_) - 0usize];
6598 ["Offset of field: CUmemLocation_st::id"]
6599 [::std::mem::offset_of!(CUmemLocation_st, id) - 4usize];
6600};
6601#[doc = " Specifies a memory location."]
6602pub type CUmemLocation_v1 = CUmemLocation_st;
6603#[doc = " Specifies a memory location."]
6604pub type CUmemLocation = CUmemLocation_v1;
6605impl CUmemAllocationCompType_enum {
6606 #[doc = "< Allocating non-compressible memory"]
6607 pub const CU_MEM_ALLOCATION_COMP_NONE: CUmemAllocationCompType_enum =
6608 CUmemAllocationCompType_enum(0);
6609}
6610impl CUmemAllocationCompType_enum {
6611 #[doc = "< Allocating compressible memory"]
6612 pub const CU_MEM_ALLOCATION_COMP_GENERIC: CUmemAllocationCompType_enum =
6613 CUmemAllocationCompType_enum(1);
6614}
6615#[repr(transparent)]
6616#[doc = " Specifies compression attribute for an allocation."]
6617#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6618pub struct CUmemAllocationCompType_enum(pub ::std::os::raw::c_uint);
6619#[doc = " Specifies compression attribute for an allocation."]
6620pub use self::CUmemAllocationCompType_enum as CUmemAllocationCompType;
6621#[doc = " Specifies the allocation properties for a allocation."]
6622#[repr(C)]
6623#[derive(Debug, Copy, Clone)]
6624pub struct CUmemAllocationProp_st {
6625 #[doc = " Allocation type"]
6626 pub type_: CUmemAllocationType,
6627 #[doc = " requested ::CUmemAllocationHandleType"]
6628 pub requestedHandleTypes: CUmemAllocationHandleType,
6629 #[doc = " Location of allocation"]
6630 pub location: CUmemLocation,
6631 #[doc = " Windows-specific POBJECT_ATTRIBUTES required when\n ::CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes structure\n includes security attributes that define\n the scope of which exported allocations may be transferred to other\n processes. In all other cases, this field is required to be zero."]
6632 pub win32HandleMetaData: *mut ::std::os::raw::c_void,
6633 pub allocFlags: CUmemAllocationProp_st__bindgen_ty_1,
6634}
6635#[repr(C)]
6636#[derive(Debug, Copy, Clone)]
6637pub struct CUmemAllocationProp_st__bindgen_ty_1 {
6638 #[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."]
6639 pub compressionType: ::std::os::raw::c_uchar,
6640 pub gpuDirectRDMACapable: ::std::os::raw::c_uchar,
6641 #[doc = " Bitmask indicating intended usage for this allocation"]
6642 pub usage: ::std::os::raw::c_ushort,
6643 pub reserved: [::std::os::raw::c_uchar; 4usize],
6644}
6645#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6646const _: () = {
6647 ["Size of CUmemAllocationProp_st__bindgen_ty_1"]
6648 [::std::mem::size_of::<CUmemAllocationProp_st__bindgen_ty_1>() - 8usize];
6649 ["Alignment of CUmemAllocationProp_st__bindgen_ty_1"]
6650 [::std::mem::align_of::<CUmemAllocationProp_st__bindgen_ty_1>() - 2usize];
6651 ["Offset of field: CUmemAllocationProp_st__bindgen_ty_1::compressionType"]
6652 [::std::mem::offset_of!(CUmemAllocationProp_st__bindgen_ty_1, compressionType) - 0usize];
6653 ["Offset of field: CUmemAllocationProp_st__bindgen_ty_1::gpuDirectRDMACapable"][::std::mem::offset_of!(
6654 CUmemAllocationProp_st__bindgen_ty_1,
6655 gpuDirectRDMACapable
6656 ) - 1usize];
6657 ["Offset of field: CUmemAllocationProp_st__bindgen_ty_1::usage"]
6658 [::std::mem::offset_of!(CUmemAllocationProp_st__bindgen_ty_1, usage) - 2usize];
6659 ["Offset of field: CUmemAllocationProp_st__bindgen_ty_1::reserved"]
6660 [::std::mem::offset_of!(CUmemAllocationProp_st__bindgen_ty_1, reserved) - 4usize];
6661};
6662#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6663const _: () = {
6664 ["Size of CUmemAllocationProp_st"][::std::mem::size_of::<CUmemAllocationProp_st>() - 32usize];
6665 ["Alignment of CUmemAllocationProp_st"]
6666 [::std::mem::align_of::<CUmemAllocationProp_st>() - 8usize];
6667 ["Offset of field: CUmemAllocationProp_st::type_"]
6668 [::std::mem::offset_of!(CUmemAllocationProp_st, type_) - 0usize];
6669 ["Offset of field: CUmemAllocationProp_st::requestedHandleTypes"]
6670 [::std::mem::offset_of!(CUmemAllocationProp_st, requestedHandleTypes) - 4usize];
6671 ["Offset of field: CUmemAllocationProp_st::location"]
6672 [::std::mem::offset_of!(CUmemAllocationProp_st, location) - 8usize];
6673 ["Offset of field: CUmemAllocationProp_st::win32HandleMetaData"]
6674 [::std::mem::offset_of!(CUmemAllocationProp_st, win32HandleMetaData) - 16usize];
6675 ["Offset of field: CUmemAllocationProp_st::allocFlags"]
6676 [::std::mem::offset_of!(CUmemAllocationProp_st, allocFlags) - 24usize];
6677};
6678#[doc = " Specifies the allocation properties for a allocation."]
6679pub type CUmemAllocationProp_v1 = CUmemAllocationProp_st;
6680#[doc = " Specifies the allocation properties for a allocation."]
6681pub type CUmemAllocationProp = CUmemAllocationProp_v1;
6682impl CUmulticastGranularity_flags_enum {
6683 #[doc = "< Minimum required granularity"]
6684 pub const CU_MULTICAST_GRANULARITY_MINIMUM: CUmulticastGranularity_flags_enum =
6685 CUmulticastGranularity_flags_enum(0);
6686}
6687impl CUmulticastGranularity_flags_enum {
6688 #[doc = "< Recommended granularity for best performance"]
6689 pub const CU_MULTICAST_GRANULARITY_RECOMMENDED: CUmulticastGranularity_flags_enum =
6690 CUmulticastGranularity_flags_enum(1);
6691}
6692#[repr(transparent)]
6693#[doc = " Flags for querying different granularities for a multicast object"]
6694#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6695pub struct CUmulticastGranularity_flags_enum(pub ::std::os::raw::c_uint);
6696#[doc = " Flags for querying different granularities for a multicast object"]
6697pub use self::CUmulticastGranularity_flags_enum as CUmulticastGranularity_flags;
6698#[doc = " Specifies the properties for a multicast object."]
6699#[repr(C)]
6700#[derive(Debug, Copy, Clone)]
6701pub struct CUmulticastObjectProp_st {
6702 #[doc = " The number of devices in the multicast team that will bind memory to this\n object"]
6703 pub numDevices: ::std::os::raw::c_uint,
6704 #[doc = " The maximum amount of memory that can be bound to this multicast object\n per device"]
6705 pub size: usize,
6706 #[doc = " Bitmask of exportable handle types (see ::CUmemAllocationHandleType) for\n this object"]
6707 pub handleTypes: ::std::os::raw::c_ulonglong,
6708 #[doc = " Flags for future use, must be zero now"]
6709 pub flags: ::std::os::raw::c_ulonglong,
6710}
6711#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6712const _: () = {
6713 ["Size of CUmulticastObjectProp_st"]
6714 [::std::mem::size_of::<CUmulticastObjectProp_st>() - 32usize];
6715 ["Alignment of CUmulticastObjectProp_st"]
6716 [::std::mem::align_of::<CUmulticastObjectProp_st>() - 8usize];
6717 ["Offset of field: CUmulticastObjectProp_st::numDevices"]
6718 [::std::mem::offset_of!(CUmulticastObjectProp_st, numDevices) - 0usize];
6719 ["Offset of field: CUmulticastObjectProp_st::size"]
6720 [::std::mem::offset_of!(CUmulticastObjectProp_st, size) - 8usize];
6721 ["Offset of field: CUmulticastObjectProp_st::handleTypes"]
6722 [::std::mem::offset_of!(CUmulticastObjectProp_st, handleTypes) - 16usize];
6723 ["Offset of field: CUmulticastObjectProp_st::flags"]
6724 [::std::mem::offset_of!(CUmulticastObjectProp_st, flags) - 24usize];
6725};
6726#[doc = " Specifies the properties for a multicast object."]
6727pub type CUmulticastObjectProp_v1 = CUmulticastObjectProp_st;
6728#[doc = " Specifies the properties for a multicast object."]
6729pub type CUmulticastObjectProp = CUmulticastObjectProp_v1;
6730#[doc = " Memory access descriptor"]
6731#[repr(C)]
6732#[derive(Debug, Copy, Clone)]
6733pub struct CUmemAccessDesc_st {
6734 #[doc = "< Location on which the request is to change it's accessibility"]
6735 pub location: CUmemLocation,
6736 #[doc = "< ::CUmemProt accessibility flags to set on the request"]
6737 pub flags: CUmemAccess_flags,
6738}
6739#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6740const _: () = {
6741 ["Size of CUmemAccessDesc_st"][::std::mem::size_of::<CUmemAccessDesc_st>() - 12usize];
6742 ["Alignment of CUmemAccessDesc_st"][::std::mem::align_of::<CUmemAccessDesc_st>() - 4usize];
6743 ["Offset of field: CUmemAccessDesc_st::location"]
6744 [::std::mem::offset_of!(CUmemAccessDesc_st, location) - 0usize];
6745 ["Offset of field: CUmemAccessDesc_st::flags"]
6746 [::std::mem::offset_of!(CUmemAccessDesc_st, flags) - 8usize];
6747};
6748#[doc = " Memory access descriptor"]
6749pub type CUmemAccessDesc_v1 = CUmemAccessDesc_st;
6750#[doc = " Memory access descriptor"]
6751pub type CUmemAccessDesc = CUmemAccessDesc_v1;
6752impl CUgraphExecUpdateResult_enum {
6753 #[doc = "< The update succeeded"]
6754 pub const CU_GRAPH_EXEC_UPDATE_SUCCESS: CUgraphExecUpdateResult_enum =
6755 CUgraphExecUpdateResult_enum(0);
6756}
6757impl CUgraphExecUpdateResult_enum {
6758 #[doc = "< The update failed for an unexpected reason which is described in the return value of the function"]
6759 pub const CU_GRAPH_EXEC_UPDATE_ERROR: CUgraphExecUpdateResult_enum =
6760 CUgraphExecUpdateResult_enum(1);
6761}
6762impl CUgraphExecUpdateResult_enum {
6763 #[doc = "< The update failed because the topology changed"]
6764 pub const CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED: CUgraphExecUpdateResult_enum =
6765 CUgraphExecUpdateResult_enum(2);
6766}
6767impl CUgraphExecUpdateResult_enum {
6768 #[doc = "< The update failed because a node type changed"]
6769 pub const CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED: CUgraphExecUpdateResult_enum =
6770 CUgraphExecUpdateResult_enum(3);
6771}
6772impl CUgraphExecUpdateResult_enum {
6773 #[doc = "< The update failed because the function of a kernel node changed (CUDA driver < 11.2)"]
6774 pub const CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED: CUgraphExecUpdateResult_enum =
6775 CUgraphExecUpdateResult_enum(4);
6776}
6777impl CUgraphExecUpdateResult_enum {
6778 #[doc = "< The update failed because the parameters changed in a way that is not supported"]
6779 pub const CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED: CUgraphExecUpdateResult_enum =
6780 CUgraphExecUpdateResult_enum(5);
6781}
6782impl CUgraphExecUpdateResult_enum {
6783 #[doc = "< The update failed because something about the node is not supported"]
6784 pub const CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED: CUgraphExecUpdateResult_enum =
6785 CUgraphExecUpdateResult_enum(6);
6786}
6787impl CUgraphExecUpdateResult_enum {
6788 #[doc = "< The update failed because the function of a kernel node changed in an unsupported way"]
6789 pub const CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE: CUgraphExecUpdateResult_enum =
6790 CUgraphExecUpdateResult_enum(7);
6791}
6792impl CUgraphExecUpdateResult_enum {
6793 #[doc = "< The update failed because the node attributes changed in a way that is not supported"]
6794 pub const CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED: CUgraphExecUpdateResult_enum =
6795 CUgraphExecUpdateResult_enum(8);
6796}
6797#[repr(transparent)]
6798#[doc = " CUDA Graph Update error types"]
6799#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6800pub struct CUgraphExecUpdateResult_enum(pub ::std::os::raw::c_uint);
6801#[doc = " CUDA Graph Update error types"]
6802pub use self::CUgraphExecUpdateResult_enum as CUgraphExecUpdateResult;
6803#[doc = " Result information returned by cuGraphExecUpdate"]
6804#[repr(C)]
6805#[derive(Debug, Copy, Clone)]
6806pub struct CUgraphExecUpdateResultInfo_st {
6807 #[doc = " Gives more specific detail when a cuda graph update fails."]
6808 pub result: CUgraphExecUpdateResult,
6809 #[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."]
6810 pub errorNode: CUgraphNode,
6811 #[doc = " The from node of error edge when the topologies do not match. Otherwise NULL."]
6812 pub errorFromNode: CUgraphNode,
6813}
6814#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6815const _: () = {
6816 ["Size of CUgraphExecUpdateResultInfo_st"]
6817 [::std::mem::size_of::<CUgraphExecUpdateResultInfo_st>() - 24usize];
6818 ["Alignment of CUgraphExecUpdateResultInfo_st"]
6819 [::std::mem::align_of::<CUgraphExecUpdateResultInfo_st>() - 8usize];
6820 ["Offset of field: CUgraphExecUpdateResultInfo_st::result"]
6821 [::std::mem::offset_of!(CUgraphExecUpdateResultInfo_st, result) - 0usize];
6822 ["Offset of field: CUgraphExecUpdateResultInfo_st::errorNode"]
6823 [::std::mem::offset_of!(CUgraphExecUpdateResultInfo_st, errorNode) - 8usize];
6824 ["Offset of field: CUgraphExecUpdateResultInfo_st::errorFromNode"]
6825 [::std::mem::offset_of!(CUgraphExecUpdateResultInfo_st, errorFromNode) - 16usize];
6826};
6827#[doc = " Result information returned by cuGraphExecUpdate"]
6828pub type CUgraphExecUpdateResultInfo_v1 = CUgraphExecUpdateResultInfo_st;
6829#[doc = " Result information returned by cuGraphExecUpdate"]
6830pub type CUgraphExecUpdateResultInfo = CUgraphExecUpdateResultInfo_v1;
6831impl CUmemPool_attribute_enum {
6832 #[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)"]
6833 pub const CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES: CUmemPool_attribute_enum =
6834 CUmemPool_attribute_enum(1);
6835}
6836impl CUmemPool_attribute_enum {
6837 #[doc = " (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)"]
6838 pub const CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC: CUmemPool_attribute_enum =
6839 CUmemPool_attribute_enum(2);
6840}
6841impl CUmemPool_attribute_enum {
6842 #[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)."]
6843 pub const CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES: CUmemPool_attribute_enum =
6844 CUmemPool_attribute_enum(3);
6845}
6846impl CUmemPool_attribute_enum {
6847 #[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)"]
6848 pub const CU_MEMPOOL_ATTR_RELEASE_THRESHOLD: CUmemPool_attribute_enum =
6849 CUmemPool_attribute_enum(4);
6850}
6851impl CUmemPool_attribute_enum {
6852 #[doc = " (value type = cuuint64_t)\n Amount of backing memory currently allocated for the mempool."]
6853 pub const CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT: CUmemPool_attribute_enum =
6854 CUmemPool_attribute_enum(5);
6855}
6856impl CUmemPool_attribute_enum {
6857 #[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."]
6858 pub const CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH: CUmemPool_attribute_enum =
6859 CUmemPool_attribute_enum(6);
6860}
6861impl CUmemPool_attribute_enum {
6862 #[doc = " (value type = cuuint64_t)\n Amount of memory from the pool that is currently in use by the application."]
6863 pub const CU_MEMPOOL_ATTR_USED_MEM_CURRENT: CUmemPool_attribute_enum =
6864 CUmemPool_attribute_enum(7);
6865}
6866impl CUmemPool_attribute_enum {
6867 #[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."]
6868 pub const CU_MEMPOOL_ATTR_USED_MEM_HIGH: CUmemPool_attribute_enum = CUmemPool_attribute_enum(8);
6869}
6870#[repr(transparent)]
6871#[doc = " CUDA memory pool attributes"]
6872#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
6873pub struct CUmemPool_attribute_enum(pub ::std::os::raw::c_uint);
6874#[doc = " CUDA memory pool attributes"]
6875pub use self::CUmemPool_attribute_enum as CUmemPool_attribute;
6876#[doc = " Specifies the properties of allocations made from the pool."]
6877#[repr(C)]
6878#[derive(Debug, Copy, Clone)]
6879pub struct CUmemPoolProps_st {
6880 #[doc = "< Allocation type. Currently must be specified as CU_MEM_ALLOCATION_TYPE_PINNED"]
6881 pub allocType: CUmemAllocationType,
6882 #[doc = "< Handle types that will be supported by allocations from the pool."]
6883 pub handleTypes: CUmemAllocationHandleType,
6884 #[doc = "< Location where allocations should reside."]
6885 pub location: CUmemLocation,
6886 #[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 transferred to other\n processes. In all other cases, this field is required to be zero."]
6887 pub win32SecurityAttributes: *mut ::std::os::raw::c_void,
6888 #[doc = "< Maximum pool size. When set to 0, defaults to a system dependent value."]
6889 pub maxSize: usize,
6890 #[doc = "< Bitmask indicating intended usage for the pool."]
6891 pub usage: ::std::os::raw::c_ushort,
6892 #[doc = "< reserved for future use, must be 0"]
6893 pub reserved: [::std::os::raw::c_uchar; 54usize],
6894}
6895#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6896const _: () = {
6897 ["Size of CUmemPoolProps_st"][::std::mem::size_of::<CUmemPoolProps_st>() - 88usize];
6898 ["Alignment of CUmemPoolProps_st"][::std::mem::align_of::<CUmemPoolProps_st>() - 8usize];
6899 ["Offset of field: CUmemPoolProps_st::allocType"]
6900 [::std::mem::offset_of!(CUmemPoolProps_st, allocType) - 0usize];
6901 ["Offset of field: CUmemPoolProps_st::handleTypes"]
6902 [::std::mem::offset_of!(CUmemPoolProps_st, handleTypes) - 4usize];
6903 ["Offset of field: CUmemPoolProps_st::location"]
6904 [::std::mem::offset_of!(CUmemPoolProps_st, location) - 8usize];
6905 ["Offset of field: CUmemPoolProps_st::win32SecurityAttributes"]
6906 [::std::mem::offset_of!(CUmemPoolProps_st, win32SecurityAttributes) - 16usize];
6907 ["Offset of field: CUmemPoolProps_st::maxSize"]
6908 [::std::mem::offset_of!(CUmemPoolProps_st, maxSize) - 24usize];
6909 ["Offset of field: CUmemPoolProps_st::usage"]
6910 [::std::mem::offset_of!(CUmemPoolProps_st, usage) - 32usize];
6911 ["Offset of field: CUmemPoolProps_st::reserved"]
6912 [::std::mem::offset_of!(CUmemPoolProps_st, reserved) - 34usize];
6913};
6914#[doc = " Specifies the properties of allocations made from the pool."]
6915pub type CUmemPoolProps_v1 = CUmemPoolProps_st;
6916#[doc = " Specifies the properties of allocations made from the pool."]
6917pub type CUmemPoolProps = CUmemPoolProps_v1;
6918#[doc = " Opaque data for exporting a pool allocation"]
6919#[repr(C)]
6920#[derive(Debug, Copy, Clone)]
6921pub struct CUmemPoolPtrExportData_st {
6922 pub reserved: [::std::os::raw::c_uchar; 64usize],
6923}
6924#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6925const _: () = {
6926 ["Size of CUmemPoolPtrExportData_st"]
6927 [::std::mem::size_of::<CUmemPoolPtrExportData_st>() - 64usize];
6928 ["Alignment of CUmemPoolPtrExportData_st"]
6929 [::std::mem::align_of::<CUmemPoolPtrExportData_st>() - 1usize];
6930 ["Offset of field: CUmemPoolPtrExportData_st::reserved"]
6931 [::std::mem::offset_of!(CUmemPoolPtrExportData_st, reserved) - 0usize];
6932};
6933#[doc = " Opaque data for exporting a pool allocation"]
6934pub type CUmemPoolPtrExportData_v1 = CUmemPoolPtrExportData_st;
6935#[doc = " Opaque data for exporting a pool allocation"]
6936pub type CUmemPoolPtrExportData = CUmemPoolPtrExportData_v1;
6937#[doc = " Memory allocation node parameters"]
6938#[repr(C)]
6939#[derive(Debug, Copy, Clone)]
6940pub struct CUDA_MEM_ALLOC_NODE_PARAMS_v1_st {
6941 #[doc = " in: location where the allocation should reside (specified in ::location).\n ::handleTypes must be ::CU_MEM_HANDLE_TYPE_NONE. IPC is not supported."]
6942 pub poolProps: CUmemPoolProps,
6943 #[doc = "< in: array of memory access descriptors. Used to describe peer GPU access"]
6944 pub accessDescs: *const CUmemAccessDesc,
6945 #[doc = "< in: number of memory access descriptors. Must not exceed the number of GPUs."]
6946 pub accessDescCount: usize,
6947 #[doc = "< in: size in bytes of the requested allocation"]
6948 pub bytesize: usize,
6949 #[doc = "< out: address of the allocation returned by CUDA"]
6950 pub dptr: CUdeviceptr,
6951}
6952#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6953const _: () = {
6954 ["Size of CUDA_MEM_ALLOC_NODE_PARAMS_v1_st"]
6955 [::std::mem::size_of::<CUDA_MEM_ALLOC_NODE_PARAMS_v1_st>() - 120usize];
6956 ["Alignment of CUDA_MEM_ALLOC_NODE_PARAMS_v1_st"]
6957 [::std::mem::align_of::<CUDA_MEM_ALLOC_NODE_PARAMS_v1_st>() - 8usize];
6958 ["Offset of field: CUDA_MEM_ALLOC_NODE_PARAMS_v1_st::poolProps"]
6959 [::std::mem::offset_of!(CUDA_MEM_ALLOC_NODE_PARAMS_v1_st, poolProps) - 0usize];
6960 ["Offset of field: CUDA_MEM_ALLOC_NODE_PARAMS_v1_st::accessDescs"]
6961 [::std::mem::offset_of!(CUDA_MEM_ALLOC_NODE_PARAMS_v1_st, accessDescs) - 88usize];
6962 ["Offset of field: CUDA_MEM_ALLOC_NODE_PARAMS_v1_st::accessDescCount"]
6963 [::std::mem::offset_of!(CUDA_MEM_ALLOC_NODE_PARAMS_v1_st, accessDescCount) - 96usize];
6964 ["Offset of field: CUDA_MEM_ALLOC_NODE_PARAMS_v1_st::bytesize"]
6965 [::std::mem::offset_of!(CUDA_MEM_ALLOC_NODE_PARAMS_v1_st, bytesize) - 104usize];
6966 ["Offset of field: CUDA_MEM_ALLOC_NODE_PARAMS_v1_st::dptr"]
6967 [::std::mem::offset_of!(CUDA_MEM_ALLOC_NODE_PARAMS_v1_st, dptr) - 112usize];
6968};
6969#[doc = " Memory allocation node parameters"]
6970pub type CUDA_MEM_ALLOC_NODE_PARAMS_v1 = CUDA_MEM_ALLOC_NODE_PARAMS_v1_st;
6971#[doc = " Memory allocation node parameters"]
6972pub type CUDA_MEM_ALLOC_NODE_PARAMS = CUDA_MEM_ALLOC_NODE_PARAMS_v1;
6973#[doc = " Memory allocation node parameters"]
6974#[repr(C)]
6975#[derive(Debug, Copy, Clone)]
6976pub struct CUDA_MEM_ALLOC_NODE_PARAMS_v2_st {
6977 #[doc = " in: location where the allocation should reside (specified in ::location).\n ::handleTypes must be ::CU_MEM_HANDLE_TYPE_NONE. IPC is not supported."]
6978 pub poolProps: CUmemPoolProps,
6979 #[doc = "< in: array of memory access descriptors. Used to describe peer GPU access"]
6980 pub accessDescs: *const CUmemAccessDesc,
6981 #[doc = "< in: number of memory access descriptors. Must not exceed the number of GPUs."]
6982 pub accessDescCount: usize,
6983 #[doc = "< in: size in bytes of the requested allocation"]
6984 pub bytesize: usize,
6985 #[doc = "< out: address of the allocation returned by CUDA"]
6986 pub dptr: CUdeviceptr,
6987}
6988#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6989const _: () = {
6990 ["Size of CUDA_MEM_ALLOC_NODE_PARAMS_v2_st"]
6991 [::std::mem::size_of::<CUDA_MEM_ALLOC_NODE_PARAMS_v2_st>() - 120usize];
6992 ["Alignment of CUDA_MEM_ALLOC_NODE_PARAMS_v2_st"]
6993 [::std::mem::align_of::<CUDA_MEM_ALLOC_NODE_PARAMS_v2_st>() - 8usize];
6994 ["Offset of field: CUDA_MEM_ALLOC_NODE_PARAMS_v2_st::poolProps"]
6995 [::std::mem::offset_of!(CUDA_MEM_ALLOC_NODE_PARAMS_v2_st, poolProps) - 0usize];
6996 ["Offset of field: CUDA_MEM_ALLOC_NODE_PARAMS_v2_st::accessDescs"]
6997 [::std::mem::offset_of!(CUDA_MEM_ALLOC_NODE_PARAMS_v2_st, accessDescs) - 88usize];
6998 ["Offset of field: CUDA_MEM_ALLOC_NODE_PARAMS_v2_st::accessDescCount"]
6999 [::std::mem::offset_of!(CUDA_MEM_ALLOC_NODE_PARAMS_v2_st, accessDescCount) - 96usize];
7000 ["Offset of field: CUDA_MEM_ALLOC_NODE_PARAMS_v2_st::bytesize"]
7001 [::std::mem::offset_of!(CUDA_MEM_ALLOC_NODE_PARAMS_v2_st, bytesize) - 104usize];
7002 ["Offset of field: CUDA_MEM_ALLOC_NODE_PARAMS_v2_st::dptr"]
7003 [::std::mem::offset_of!(CUDA_MEM_ALLOC_NODE_PARAMS_v2_st, dptr) - 112usize];
7004};
7005#[doc = " Memory allocation node parameters"]
7006pub type CUDA_MEM_ALLOC_NODE_PARAMS_v2 = CUDA_MEM_ALLOC_NODE_PARAMS_v2_st;
7007#[doc = " Memory free node parameters"]
7008#[repr(C)]
7009#[derive(Debug, Copy, Clone)]
7010pub struct CUDA_MEM_FREE_NODE_PARAMS_st {
7011 #[doc = "< in: the pointer to free"]
7012 pub dptr: CUdeviceptr,
7013}
7014#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7015const _: () = {
7016 ["Size of CUDA_MEM_FREE_NODE_PARAMS_st"]
7017 [::std::mem::size_of::<CUDA_MEM_FREE_NODE_PARAMS_st>() - 8usize];
7018 ["Alignment of CUDA_MEM_FREE_NODE_PARAMS_st"]
7019 [::std::mem::align_of::<CUDA_MEM_FREE_NODE_PARAMS_st>() - 8usize];
7020 ["Offset of field: CUDA_MEM_FREE_NODE_PARAMS_st::dptr"]
7021 [::std::mem::offset_of!(CUDA_MEM_FREE_NODE_PARAMS_st, dptr) - 0usize];
7022};
7023#[doc = " Memory free node parameters"]
7024pub type CUDA_MEM_FREE_NODE_PARAMS = CUDA_MEM_FREE_NODE_PARAMS_st;
7025impl CUgraphMem_attribute_enum {
7026 #[doc = " (value type = cuuint64_t)\n Amount of memory, in bytes, currently associated with graphs"]
7027 pub const CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT: CUgraphMem_attribute_enum =
7028 CUgraphMem_attribute_enum(0);
7029}
7030impl CUgraphMem_attribute_enum {
7031 #[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."]
7032 pub const CU_GRAPH_MEM_ATTR_USED_MEM_HIGH: CUgraphMem_attribute_enum =
7033 CUgraphMem_attribute_enum(1);
7034}
7035impl CUgraphMem_attribute_enum {
7036 #[doc = " (value type = cuuint64_t)\n Amount of memory, in bytes, currently allocated for use by\n the CUDA graphs asynchronous allocator."]
7037 pub const CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT: CUgraphMem_attribute_enum =
7038 CUgraphMem_attribute_enum(2);
7039}
7040impl CUgraphMem_attribute_enum {
7041 #[doc = " (value type = cuuint64_t)\n High watermark of memory, in bytes, currently allocated for use by\n the CUDA graphs asynchronous allocator."]
7042 pub const CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH: CUgraphMem_attribute_enum =
7043 CUgraphMem_attribute_enum(3);
7044}
7045#[repr(transparent)]
7046#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7047pub struct CUgraphMem_attribute_enum(pub ::std::os::raw::c_uint);
7048pub use self::CUgraphMem_attribute_enum as CUgraphMem_attribute;
7049#[doc = " Child graph node parameters"]
7050#[repr(C)]
7051#[derive(Debug, Copy, Clone)]
7052pub struct CUDA_CHILD_GRAPH_NODE_PARAMS_st {
7053 #[doc = "< The child graph to clone into the node for node creation, or\na handle to the graph owned by the node for node query"]
7054 pub graph: CUgraph,
7055}
7056#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7057const _: () = {
7058 ["Size of CUDA_CHILD_GRAPH_NODE_PARAMS_st"]
7059 [::std::mem::size_of::<CUDA_CHILD_GRAPH_NODE_PARAMS_st>() - 8usize];
7060 ["Alignment of CUDA_CHILD_GRAPH_NODE_PARAMS_st"]
7061 [::std::mem::align_of::<CUDA_CHILD_GRAPH_NODE_PARAMS_st>() - 8usize];
7062 ["Offset of field: CUDA_CHILD_GRAPH_NODE_PARAMS_st::graph"]
7063 [::std::mem::offset_of!(CUDA_CHILD_GRAPH_NODE_PARAMS_st, graph) - 0usize];
7064};
7065#[doc = " Child graph node parameters"]
7066pub type CUDA_CHILD_GRAPH_NODE_PARAMS = CUDA_CHILD_GRAPH_NODE_PARAMS_st;
7067#[doc = " Event record node parameters"]
7068#[repr(C)]
7069#[derive(Debug, Copy, Clone)]
7070pub struct CUDA_EVENT_RECORD_NODE_PARAMS_st {
7071 #[doc = "< The event to record when the node executes"]
7072 pub event: CUevent,
7073}
7074#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7075const _: () = {
7076 ["Size of CUDA_EVENT_RECORD_NODE_PARAMS_st"]
7077 [::std::mem::size_of::<CUDA_EVENT_RECORD_NODE_PARAMS_st>() - 8usize];
7078 ["Alignment of CUDA_EVENT_RECORD_NODE_PARAMS_st"]
7079 [::std::mem::align_of::<CUDA_EVENT_RECORD_NODE_PARAMS_st>() - 8usize];
7080 ["Offset of field: CUDA_EVENT_RECORD_NODE_PARAMS_st::event"]
7081 [::std::mem::offset_of!(CUDA_EVENT_RECORD_NODE_PARAMS_st, event) - 0usize];
7082};
7083#[doc = " Event record node parameters"]
7084pub type CUDA_EVENT_RECORD_NODE_PARAMS = CUDA_EVENT_RECORD_NODE_PARAMS_st;
7085#[doc = " Event wait node parameters"]
7086#[repr(C)]
7087#[derive(Debug, Copy, Clone)]
7088pub struct CUDA_EVENT_WAIT_NODE_PARAMS_st {
7089 #[doc = "< The event to wait on from the node"]
7090 pub event: CUevent,
7091}
7092#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7093const _: () = {
7094 ["Size of CUDA_EVENT_WAIT_NODE_PARAMS_st"]
7095 [::std::mem::size_of::<CUDA_EVENT_WAIT_NODE_PARAMS_st>() - 8usize];
7096 ["Alignment of CUDA_EVENT_WAIT_NODE_PARAMS_st"]
7097 [::std::mem::align_of::<CUDA_EVENT_WAIT_NODE_PARAMS_st>() - 8usize];
7098 ["Offset of field: CUDA_EVENT_WAIT_NODE_PARAMS_st::event"]
7099 [::std::mem::offset_of!(CUDA_EVENT_WAIT_NODE_PARAMS_st, event) - 0usize];
7100};
7101#[doc = " Event wait node parameters"]
7102pub type CUDA_EVENT_WAIT_NODE_PARAMS = CUDA_EVENT_WAIT_NODE_PARAMS_st;
7103#[doc = " Graph node parameters. See ::cuGraphAddNode."]
7104#[repr(C)]
7105#[derive(Copy, Clone)]
7106pub struct CUgraphNodeParams_st {
7107 #[doc = "< Type of the node"]
7108 pub type_: CUgraphNodeType,
7109 #[doc = "< Reserved. Must be zero."]
7110 pub reserved0: [::std::os::raw::c_int; 3usize],
7111 pub __bindgen_anon_1: CUgraphNodeParams_st__bindgen_ty_1,
7112 #[doc = "< Reserved bytes. Must be zero."]
7113 pub reserved2: ::std::os::raw::c_longlong,
7114}
7115#[repr(C)]
7116#[derive(Copy, Clone)]
7117pub union CUgraphNodeParams_st__bindgen_ty_1 {
7118 #[doc = "< Padding. Unused bytes must be zero."]
7119 pub reserved1: [::std::os::raw::c_longlong; 29usize],
7120 #[doc = "< Kernel node parameters."]
7121 pub kernel: CUDA_KERNEL_NODE_PARAMS_v3,
7122 #[doc = "< Memcpy node parameters."]
7123 pub memcpy: CUDA_MEMCPY_NODE_PARAMS,
7124 #[doc = "< Memset node parameters."]
7125 pub memset: CUDA_MEMSET_NODE_PARAMS_v2,
7126 #[doc = "< Host node parameters."]
7127 pub host: CUDA_HOST_NODE_PARAMS_v2,
7128 #[doc = "< Child graph node parameters."]
7129 pub graph: CUDA_CHILD_GRAPH_NODE_PARAMS,
7130 #[doc = "< Event wait node parameters."]
7131 pub eventWait: CUDA_EVENT_WAIT_NODE_PARAMS,
7132 #[doc = "< Event record node parameters."]
7133 pub eventRecord: CUDA_EVENT_RECORD_NODE_PARAMS,
7134 #[doc = "< External semaphore signal node parameters."]
7135 pub extSemSignal: CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2,
7136 #[doc = "< External semaphore wait node parameters."]
7137 pub extSemWait: CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2,
7138 #[doc = "< Memory allocation node parameters."]
7139 pub alloc: CUDA_MEM_ALLOC_NODE_PARAMS_v2,
7140 #[doc = "< Memory free node parameters."]
7141 pub free: CUDA_MEM_FREE_NODE_PARAMS,
7142 #[doc = "< MemOp node parameters."]
7143 pub memOp: CUDA_BATCH_MEM_OP_NODE_PARAMS_v2,
7144 #[doc = "< Conditional node parameters."]
7145 pub conditional: CUDA_CONDITIONAL_NODE_PARAMS,
7146}
7147#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7148const _: () = {
7149 ["Size of CUgraphNodeParams_st__bindgen_ty_1"]
7150 [::std::mem::size_of::<CUgraphNodeParams_st__bindgen_ty_1>() - 232usize];
7151 ["Alignment of CUgraphNodeParams_st__bindgen_ty_1"]
7152 [::std::mem::align_of::<CUgraphNodeParams_st__bindgen_ty_1>() - 8usize];
7153 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::reserved1"]
7154 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, reserved1) - 0usize];
7155 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::kernel"]
7156 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, kernel) - 0usize];
7157 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::memcpy"]
7158 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, memcpy) - 0usize];
7159 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::memset"]
7160 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, memset) - 0usize];
7161 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::host"]
7162 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, host) - 0usize];
7163 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::graph"]
7164 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, graph) - 0usize];
7165 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::eventWait"]
7166 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, eventWait) - 0usize];
7167 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::eventRecord"]
7168 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, eventRecord) - 0usize];
7169 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::extSemSignal"]
7170 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, extSemSignal) - 0usize];
7171 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::extSemWait"]
7172 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, extSemWait) - 0usize];
7173 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::alloc"]
7174 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, alloc) - 0usize];
7175 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::free"]
7176 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, free) - 0usize];
7177 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::memOp"]
7178 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, memOp) - 0usize];
7179 ["Offset of field: CUgraphNodeParams_st__bindgen_ty_1::conditional"]
7180 [::std::mem::offset_of!(CUgraphNodeParams_st__bindgen_ty_1, conditional) - 0usize];
7181};
7182#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7183const _: () = {
7184 ["Size of CUgraphNodeParams_st"][::std::mem::size_of::<CUgraphNodeParams_st>() - 256usize];
7185 ["Alignment of CUgraphNodeParams_st"][::std::mem::align_of::<CUgraphNodeParams_st>() - 8usize];
7186 ["Offset of field: CUgraphNodeParams_st::type_"]
7187 [::std::mem::offset_of!(CUgraphNodeParams_st, type_) - 0usize];
7188 ["Offset of field: CUgraphNodeParams_st::reserved0"]
7189 [::std::mem::offset_of!(CUgraphNodeParams_st, reserved0) - 4usize];
7190 ["Offset of field: CUgraphNodeParams_st::reserved2"]
7191 [::std::mem::offset_of!(CUgraphNodeParams_st, reserved2) - 248usize];
7192};
7193#[doc = " Graph node parameters. See ::cuGraphAddNode."]
7194pub type CUgraphNodeParams = CUgraphNodeParams_st;
7195impl CUflushGPUDirectRDMAWritesOptions_enum {
7196 #[doc = "< ::cuFlushGPUDirectRDMAWrites() and its CUDA Runtime API counterpart are supported on the device."]
7197 pub const CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST: CUflushGPUDirectRDMAWritesOptions_enum =
7198 CUflushGPUDirectRDMAWritesOptions_enum(1);
7199}
7200impl CUflushGPUDirectRDMAWritesOptions_enum {
7201 #[doc = "< The ::CU_STREAM_WAIT_VALUE_FLUSH flag and the ::CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES MemOp are supported on the device."]
7202 pub const CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS:
7203 CUflushGPUDirectRDMAWritesOptions_enum = CUflushGPUDirectRDMAWritesOptions_enum(2);
7204}
7205#[repr(transparent)]
7206#[doc = " Bitmasks for ::CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS"]
7207#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7208pub struct CUflushGPUDirectRDMAWritesOptions_enum(pub ::std::os::raw::c_uint);
7209#[doc = " Bitmasks for ::CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS"]
7210pub use self::CUflushGPUDirectRDMAWritesOptions_enum as CUflushGPUDirectRDMAWritesOptions;
7211impl CUGPUDirectRDMAWritesOrdering_enum {
7212 #[doc = "< The device does not natively support ordering of remote writes. ::cuFlushGPUDirectRDMAWrites() can be leveraged if supported."]
7213 pub const CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE: CUGPUDirectRDMAWritesOrdering_enum =
7214 CUGPUDirectRDMAWritesOrdering_enum(0);
7215}
7216impl CUGPUDirectRDMAWritesOrdering_enum {
7217 #[doc = "< Natively, the device can consistently consume remote writes, although other CUDA devices may not."]
7218 pub const CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER: CUGPUDirectRDMAWritesOrdering_enum =
7219 CUGPUDirectRDMAWritesOrdering_enum(100);
7220}
7221impl CUGPUDirectRDMAWritesOrdering_enum {
7222 #[doc = "< Any CUDA device in the system can consistently consume remote writes to this device."]
7223 pub const CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES: CUGPUDirectRDMAWritesOrdering_enum =
7224 CUGPUDirectRDMAWritesOrdering_enum(200);
7225}
7226#[repr(transparent)]
7227#[doc = " Platform native ordering for GPUDirect RDMA writes"]
7228#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7229pub struct CUGPUDirectRDMAWritesOrdering_enum(pub ::std::os::raw::c_uint);
7230#[doc = " Platform native ordering for GPUDirect RDMA writes"]
7231pub use self::CUGPUDirectRDMAWritesOrdering_enum as CUGPUDirectRDMAWritesOrdering;
7232impl CUflushGPUDirectRDMAWritesScope_enum {
7233 #[doc = "< Blocks until remote writes are visible to the CUDA device context owning the data."]
7234 pub const CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER: CUflushGPUDirectRDMAWritesScope_enum =
7235 CUflushGPUDirectRDMAWritesScope_enum(100);
7236}
7237impl CUflushGPUDirectRDMAWritesScope_enum {
7238 #[doc = "< Blocks until remote writes are visible to all CUDA device contexts."]
7239 pub const CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES: CUflushGPUDirectRDMAWritesScope_enum =
7240 CUflushGPUDirectRDMAWritesScope_enum(200);
7241}
7242#[repr(transparent)]
7243#[doc = " The scopes for ::cuFlushGPUDirectRDMAWrites"]
7244#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7245pub struct CUflushGPUDirectRDMAWritesScope_enum(pub ::std::os::raw::c_uint);
7246#[doc = " The scopes for ::cuFlushGPUDirectRDMAWrites"]
7247pub use self::CUflushGPUDirectRDMAWritesScope_enum as CUflushGPUDirectRDMAWritesScope;
7248impl CUflushGPUDirectRDMAWritesTarget_enum {
7249 #[doc = "< Sets the target for ::cuFlushGPUDirectRDMAWrites() to the currently active CUDA device context."]
7250 pub const CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX:
7251 CUflushGPUDirectRDMAWritesTarget_enum = CUflushGPUDirectRDMAWritesTarget_enum(0);
7252}
7253#[repr(transparent)]
7254#[doc = " The targets for ::cuFlushGPUDirectRDMAWrites"]
7255#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7256pub struct CUflushGPUDirectRDMAWritesTarget_enum(pub ::std::os::raw::c_uint);
7257#[doc = " The targets for ::cuFlushGPUDirectRDMAWrites"]
7258pub use self::CUflushGPUDirectRDMAWritesTarget_enum as CUflushGPUDirectRDMAWritesTarget;
7259impl CUgraphDebugDot_flags_enum {
7260 #[doc = "< Output all debug data as if every debug flag is enabled"]
7261 pub const CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE: CUgraphDebugDot_flags_enum =
7262 CUgraphDebugDot_flags_enum(1);
7263}
7264impl CUgraphDebugDot_flags_enum {
7265 #[doc = "< Use CUDA Runtime structures for output"]
7266 pub const CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES: CUgraphDebugDot_flags_enum =
7267 CUgraphDebugDot_flags_enum(2);
7268}
7269impl CUgraphDebugDot_flags_enum {
7270 #[doc = "< Adds CUDA_KERNEL_NODE_PARAMS values to output"]
7271 pub const CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS: CUgraphDebugDot_flags_enum =
7272 CUgraphDebugDot_flags_enum(4);
7273}
7274impl CUgraphDebugDot_flags_enum {
7275 #[doc = "< Adds CUDA_MEMCPY3D values to output"]
7276 pub const CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS: CUgraphDebugDot_flags_enum =
7277 CUgraphDebugDot_flags_enum(8);
7278}
7279impl CUgraphDebugDot_flags_enum {
7280 #[doc = "< Adds CUDA_MEMSET_NODE_PARAMS values to output"]
7281 pub const CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS: CUgraphDebugDot_flags_enum =
7282 CUgraphDebugDot_flags_enum(16);
7283}
7284impl CUgraphDebugDot_flags_enum {
7285 #[doc = "< Adds CUDA_HOST_NODE_PARAMS values to output"]
7286 pub const CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS: CUgraphDebugDot_flags_enum =
7287 CUgraphDebugDot_flags_enum(32);
7288}
7289impl CUgraphDebugDot_flags_enum {
7290 #[doc = "< Adds CUevent handle from record and wait nodes to output"]
7291 pub const CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS: CUgraphDebugDot_flags_enum =
7292 CUgraphDebugDot_flags_enum(64);
7293}
7294impl CUgraphDebugDot_flags_enum {
7295 #[doc = "< Adds CUDA_EXT_SEM_SIGNAL_NODE_PARAMS values to output"]
7296 pub const CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS: CUgraphDebugDot_flags_enum =
7297 CUgraphDebugDot_flags_enum(128);
7298}
7299impl CUgraphDebugDot_flags_enum {
7300 #[doc = "< Adds CUDA_EXT_SEM_WAIT_NODE_PARAMS values to output"]
7301 pub const CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS: CUgraphDebugDot_flags_enum =
7302 CUgraphDebugDot_flags_enum(256);
7303}
7304impl CUgraphDebugDot_flags_enum {
7305 #[doc = "< Adds CUkernelNodeAttrValue values to output"]
7306 pub const CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES: CUgraphDebugDot_flags_enum =
7307 CUgraphDebugDot_flags_enum(512);
7308}
7309impl CUgraphDebugDot_flags_enum {
7310 #[doc = "< Adds node handles and every kernel function handle to output"]
7311 pub const CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES: CUgraphDebugDot_flags_enum =
7312 CUgraphDebugDot_flags_enum(1024);
7313}
7314impl CUgraphDebugDot_flags_enum {
7315 #[doc = "< Adds memory alloc node parameters to output"]
7316 pub const CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS: CUgraphDebugDot_flags_enum =
7317 CUgraphDebugDot_flags_enum(2048);
7318}
7319impl CUgraphDebugDot_flags_enum {
7320 #[doc = "< Adds memory free node parameters to output"]
7321 pub const CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS: CUgraphDebugDot_flags_enum =
7322 CUgraphDebugDot_flags_enum(4096);
7323}
7324impl CUgraphDebugDot_flags_enum {
7325 #[doc = "< Adds batch mem op node parameters to output"]
7326 pub const CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS: CUgraphDebugDot_flags_enum =
7327 CUgraphDebugDot_flags_enum(8192);
7328}
7329impl CUgraphDebugDot_flags_enum {
7330 #[doc = "< Adds edge numbering information"]
7331 pub const CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO: CUgraphDebugDot_flags_enum =
7332 CUgraphDebugDot_flags_enum(16384);
7333}
7334impl CUgraphDebugDot_flags_enum {
7335 #[doc = "< Adds conditional node parameters to output"]
7336 pub const CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS: CUgraphDebugDot_flags_enum =
7337 CUgraphDebugDot_flags_enum(32768);
7338}
7339#[repr(transparent)]
7340#[doc = " The additional write options for ::cuGraphDebugDotPrint"]
7341#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7342pub struct CUgraphDebugDot_flags_enum(pub ::std::os::raw::c_uint);
7343#[doc = " The additional write options for ::cuGraphDebugDotPrint"]
7344pub use self::CUgraphDebugDot_flags_enum as CUgraphDebugDot_flags;
7345impl CUuserObject_flags_enum {
7346 #[doc = "< Indicates the destructor execution is not synchronized by any CUDA handle."]
7347 pub const CU_USER_OBJECT_NO_DESTRUCTOR_SYNC: CUuserObject_flags_enum =
7348 CUuserObject_flags_enum(1);
7349}
7350#[repr(transparent)]
7351#[doc = " Flags for user objects for graphs"]
7352#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7353pub struct CUuserObject_flags_enum(pub ::std::os::raw::c_uint);
7354#[doc = " Flags for user objects for graphs"]
7355pub use self::CUuserObject_flags_enum as CUuserObject_flags;
7356impl CUuserObjectRetain_flags_enum {
7357 #[doc = "< Transfer references from the caller rather than creating new references."]
7358 pub const CU_GRAPH_USER_OBJECT_MOVE: CUuserObjectRetain_flags_enum =
7359 CUuserObjectRetain_flags_enum(1);
7360}
7361#[repr(transparent)]
7362#[doc = " Flags for retaining user object references for graphs"]
7363#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7364pub struct CUuserObjectRetain_flags_enum(pub ::std::os::raw::c_uint);
7365#[doc = " Flags for retaining user object references for graphs"]
7366pub use self::CUuserObjectRetain_flags_enum as CUuserObjectRetain_flags;
7367impl CUgraphInstantiate_flags_enum {
7368 #[doc = "< Automatically free memory allocated in a graph before relaunching."]
7369 pub const CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH: CUgraphInstantiate_flags_enum =
7370 CUgraphInstantiate_flags_enum(1);
7371}
7372impl CUgraphInstantiate_flags_enum {
7373 #[doc = "< Automatically upload the graph after instantiation. Only supported by\n::cuGraphInstantiateWithParams. The upload will be performed using the\nstream provided in \\p instantiateParams."]
7374 pub const CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD: CUgraphInstantiate_flags_enum =
7375 CUgraphInstantiate_flags_enum(2);
7376}
7377impl CUgraphInstantiate_flags_enum {
7378 #[doc = "< Instantiate the graph to be launchable from the device. This flag can only\nbe used on platforms which support unified addressing. This flag cannot be\nused in conjunction with CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH."]
7379 pub const CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH: CUgraphInstantiate_flags_enum =
7380 CUgraphInstantiate_flags_enum(4);
7381}
7382impl CUgraphInstantiate_flags_enum {
7383 #[doc = "< Run the graph using the per-node priority attributes rather than the\npriority of the stream it is launched into."]
7384 pub const CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY: CUgraphInstantiate_flags_enum =
7385 CUgraphInstantiate_flags_enum(8);
7386}
7387#[repr(transparent)]
7388#[doc = " Flags for instantiating a graph"]
7389#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7390pub struct CUgraphInstantiate_flags_enum(pub ::std::os::raw::c_uint);
7391#[doc = " Flags for instantiating a graph"]
7392pub use self::CUgraphInstantiate_flags_enum as CUgraphInstantiate_flags;
7393impl CUdeviceNumaConfig_enum {
7394 #[doc = "< The GPU is not a NUMA node"]
7395 pub const CU_DEVICE_NUMA_CONFIG_NONE: CUdeviceNumaConfig_enum = CUdeviceNumaConfig_enum(0);
7396}
7397impl CUdeviceNumaConfig_enum {
7398 #[doc = "< The GPU is a NUMA node, CU_DEVICE_ATTRIBUTE_NUMA_ID contains its NUMA ID"]
7399 pub const CU_DEVICE_NUMA_CONFIG_NUMA_NODE: CUdeviceNumaConfig_enum = CUdeviceNumaConfig_enum(1);
7400}
7401#[repr(transparent)]
7402#[doc = " CUDA device NUMA configuration"]
7403#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7404pub struct CUdeviceNumaConfig_enum(pub ::std::os::raw::c_uint);
7405#[doc = " CUDA device NUMA configuration"]
7406pub use self::CUdeviceNumaConfig_enum as CUdeviceNumaConfig;
7407extern "C" {
7408 #[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"]
7409 pub fn cuGetErrorString(error: CUresult, pStr: *mut *const ::std::os::raw::c_char) -> CUresult;
7410}
7411extern "C" {
7412 #[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"]
7413 pub fn cuGetErrorName(error: CUresult, pStr: *mut *const ::std::os::raw::c_char) -> CUresult;
7414}
7415extern "C" {
7416 #[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"]
7417 pub fn cuInit(Flags: ::std::os::raw::c_uint) -> CUresult;
7418}
7419extern "C" {
7420 #[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 × major + 10 × 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"]
7421 pub fn cuDriverGetVersion(driverVersion: *mut ::std::os::raw::c_int) -> CUresult;
7422}
7423extern "C" {
7424 #[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"]
7425 pub fn cuDeviceGet(device: *mut CUdevice, ordinal: ::std::os::raw::c_int) -> CUresult;
7426}
7427extern "C" {
7428 #[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"]
7429 pub fn cuDeviceGetCount(count: *mut ::std::os::raw::c_int) -> CUresult;
7430}
7431extern "C" {
7432 #[doc = " \\brief Returns an identifier 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"]
7433 pub fn cuDeviceGetName(
7434 name: *mut ::std::os::raw::c_char,
7435 len: ::std::os::raw::c_int,
7436 dev: CUdevice,
7437 ) -> CUresult;
7438}
7439extern "C" {
7440 #[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 identifying 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"]
7441 pub fn cuDeviceGetUuid(uuid: *mut CUuuid, dev: CUdevice) -> CUresult;
7442}
7443extern "C" {
7444 #[doc = " \\brief Return an UUID for the device (11.4+)\n\n Returns 16-octets identifying the device \\p dev in the structure\n pointed by the \\p uuid. If the device is in MIG mode, returns its\n MIG UUID which uniquely identifies the subscribed MIG compute instance.\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 ::cuDeviceGetAttribute,\n ::cuDeviceGetCount,\n ::cuDeviceGetName,\n ::cuDeviceGetLuid,\n ::cuDeviceGet,\n ::cuDeviceTotalMem,\n ::cudaGetDeviceProperties"]
7445 pub fn cuDeviceGetUuid_v2(uuid: *mut CUuuid, dev: CUdevice) -> CUresult;
7446}
7447extern "C" {
7448 #[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"]
7449 pub fn cuDeviceGetLuid(
7450 luid: *mut ::std::os::raw::c_char,
7451 deviceNodeMask: *mut ::std::os::raw::c_uint,
7452 dev: CUdevice,
7453 ) -> CUresult;
7454}
7455extern "C" {
7456 #[doc = " \\brief Returns the total amount of memory on the device\n\n Returns in \\p *bytes the total amount of memory available on the device\n \\p dev in bytes.\n\n \\param bytes - Returned memory available on device in bytes\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 ::cuDeviceGetExecAffinitySupport,\n ::cudaMemGetInfo"]
7457 pub fn cuDeviceTotalMem_v2(bytes: *mut usize, dev: CUdevice) -> CUresult;
7458}
7459extern "C" {
7460 #[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"]
7461 pub fn cuDeviceGetTexture1DLinearMaxWidth(
7462 maxWidthInElements: *mut usize,
7463 format: CUarray_format,
7464 numChannels: ::std::os::raw::c_uint,
7465 dev: CUdevice,
7466 ) -> CUresult;
7467}
7468extern "C" {
7469 #[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 supports 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 supported 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 - ::CU_DEVICE_ATTRIBUTE_NUMA_CONFIG: NUMA configuration of a device: value is of type ::CUdeviceNumaConfig enum\n - ::CU_DEVICE_ATTRIBUTE_NUMA_ID: NUMA node ID of the GPU memory\n - ::CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED: Device supports switch multicast and reduction operations.\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"]
7470 pub fn cuDeviceGetAttribute(
7471 pi: *mut ::std::os::raw::c_int,
7472 attrib: CUdevice_attribute,
7473 dev: CUdevice,
7474 ) -> CUresult;
7475}
7476extern "C" {
7477 #[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 Note that this API updates the input \\p nvSciSyncAttrList with values equivalent\n to the following public attribute key-values:\n NvSciSyncAttrKey_RequiredPerm is set to\n - NvSciSyncAccessPerm_SignalOnly if ::CUDA_NVSCISYNC_ATTR_SIGNAL is set in \\p flags.\n - NvSciSyncAccessPerm_WaitOnly if ::CUDA_NVSCISYNC_ATTR_WAIT is set in \\p flags.\n - NvSciSyncAccessPerm_WaitSignal if both ::CUDA_NVSCISYNC_ATTR_WAIT and\n ::CUDA_NVSCISYNC_ATTR_SIGNAL are set in \\p flags.\n NvSciSyncAttrKey_PrimitiveInfo is set to\n - NvSciSyncAttrValPrimitiveType_SysmemSemaphore on any valid \\p device.\n - NvSciSyncAttrValPrimitiveType_Syncpoint if \\p device is a Tegra device.\n - NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b if \\p device is GA10X+.\n NvSciSyncAttrKey_GpuId is set to the same UUID that is returned for this\n \\p device from ::cuDeviceGetUuid.\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"]
7478 pub fn cuDeviceGetNvSciSyncAttributes(
7479 nvSciSyncAttrList: *mut ::std::os::raw::c_void,
7480 dev: CUdevice,
7481 flags: ::std::os::raw::c_int,
7482 ) -> CUresult;
7483}
7484extern "C" {
7485 #[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"]
7486 pub fn cuDeviceSetMemPool(dev: CUdevice, pool: CUmemoryPool) -> CUresult;
7487}
7488extern "C" {
7489 #[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"]
7490 pub fn cuDeviceGetMemPool(pool: *mut CUmemoryPool, dev: CUdevice) -> CUresult;
7491}
7492extern "C" {
7493 #[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"]
7494 pub fn cuDeviceGetDefaultMemPool(pool_out: *mut CUmemoryPool, dev: CUdevice) -> CUresult;
7495}
7496extern "C" {
7497 #[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"]
7498 pub fn cuDeviceGetExecAffinitySupport(
7499 pi: *mut ::std::os::raw::c_int,
7500 type_: CUexecAffinityType,
7501 dev: CUdevice,
7502 ) -> CUresult;
7503}
7504extern "C" {
7505 #[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"]
7506 pub fn cuFlushGPUDirectRDMAWrites(
7507 target: CUflushGPUDirectRDMAWritesTarget,
7508 scope: CUflushGPUDirectRDMAWritesScope,
7509 ) -> CUresult;
7510}
7511extern "C" {
7512 #[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"]
7513 pub fn cuDeviceGetProperties(prop: *mut CUdevprop, dev: CUdevice) -> CUresult;
7514}
7515extern "C" {
7516 #[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 superseded\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"]
7517 pub fn cuDeviceComputeCapability(
7518 major: *mut ::std::os::raw::c_int,
7519 minor: *mut ::std::os::raw::c_int,
7520 dev: CUdevice,
7521 ) -> CUresult;
7522}
7523extern "C" {
7524 #[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"]
7525 pub fn cuDevicePrimaryCtxRetain(pctx: *mut CUcontext, dev: CUdevice) -> CUresult;
7526}
7527extern "C" {
7528 #[doc = " \\brief Release the primary context on the GPU\n\n Releases the primary context interop on the device.\n A retained context should always be released once the user is done using\n it. The context is automatically reset once the last reference to it is\n released. This behavior is different when the primary context was retained\n by the CUDA runtime from CUDA 4.0 and earlier. In this case, the primary\n context remains always active.\n\n Releasing a primary context that has not been previously retained will\n fail with ::CUDA_ERROR_INVALID_CONTEXT.\n\n Please note that unlike ::cuCtxDestroy() this method does not pop the context\n from stack in any circumstances.\n\n \\param dev - Device which primary context is released\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_INVALID_CONTEXT\n \\notefnerr\n\n \\sa ::cuDevicePrimaryCtxRetain,\n ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize"]
7529 pub fn cuDevicePrimaryCtxRelease_v2(dev: CUdevice) -> CUresult;
7530}
7531extern "C" {
7532 #[doc = " \\brief Set flags for the primary context\n\n Sets the flags for the primary context on the device overwriting perviously\n set ones.\n\n The three LSBs of the \\p flags parameter can be used to control how the OS\n thread, which owns the CUDA context at the time of an API call, interacts\n with the OS scheduler when waiting for results from the GPU. Only one of\n the scheduling flags can be set when creating a context.\n\n - ::CU_CTX_SCHED_SPIN: Instruct CUDA to actively spin when waiting for\n results from the GPU. This can decrease latency when waiting for the GPU,\n but may lower the performance of CPU threads if they are performing work in\n parallel with the CUDA thread.\n\n - ::CU_CTX_SCHED_YIELD: Instruct CUDA to yield its thread when waiting for\n results from the GPU. This can increase latency when waiting for the GPU,\n but can increase the performance of CPU threads performing work in parallel\n with the GPU.\n\n - ::CU_CTX_SCHED_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a\n synchronization primitive when waiting for the GPU to finish work.\n\n - ::CU_CTX_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a\n synchronization primitive when waiting for the GPU to finish work. <br>\n <b>Deprecated:</b> This flag was deprecated as of CUDA 4.0 and was\n replaced with ::CU_CTX_SCHED_BLOCKING_SYNC.\n\n - ::CU_CTX_SCHED_AUTO: The default value if the \\p flags parameter is zero,\n uses a heuristic based on the number of active CUDA contexts in the\n process \\e C and the number of logical processors in the system \\e P. If\n \\e C > \\e P, then CUDA will yield to other OS threads when waiting for\n the GPU (::CU_CTX_SCHED_YIELD), otherwise CUDA will not yield while\n waiting for results and actively spin on the processor (::CU_CTX_SCHED_SPIN).\n Additionally, on Tegra devices, ::CU_CTX_SCHED_AUTO uses a heuristic based on\n the power profile of the platform and may choose ::CU_CTX_SCHED_BLOCKING_SYNC\n for low-powered devices.\n\n - ::CU_CTX_LMEM_RESIZE_TO_MAX: Instruct CUDA to not reduce local memory\n after resizing local memory for a kernel. This can prevent thrashing by\n local memory allocations when launching many kernels with high local\n memory usage at the cost of potentially increased memory usage. <br>\n <b>Deprecated:</b> This flag is deprecated and the behavior enabled\n by this flag is now the default and cannot be disabled.\n\n - ::CU_CTX_COREDUMP_ENABLE: If GPU coredumps have not been enabled globally\n with ::cuCoredumpSetAttributeGlobal or environment variables, this flag can\n be set during context creation to instruct CUDA to create a coredump if\n this context raises an exception during execution. These environment variables\n are described in the CUDA-GDB user guide under the \"GPU core dump support\"\n section.\n The initial settings will be taken from the global settings at the time of\n context creation. The other settings that control coredump output can be\n modified by calling ::cuCoredumpSetAttribute from the created context after\n it becomes current.\n\n - ::CU_CTX_USER_COREDUMP_ENABLE: If user-triggered GPU coredumps have not\n been enabled globally with ::cuCoredumpSetAttributeGlobal or environment\n variables, this flag can be set during context creation to instruct CUDA to\n create a coredump if data is written to a certain pipe that is present in the\n OS space. These environment variables are described in the CUDA-GDB user\n guide under the \"GPU core dump support\" section.\n It is important to note that the pipe name *must* be set with\n ::cuCoredumpSetAttributeGlobal before creating the context if this flag is\n used. Setting this flag implies that ::CU_CTX_COREDUMP_ENABLE is set.\n The initial settings will be taken from the global settings at the time of\n context creation. The other settings that control coredump output can be\n modified by calling ::cuCoredumpSetAttribute from the created context after\n it becomes current.\n\n - ::CU_CTX_SYNC_MEMOPS: Ensures that synchronous memory operations initiated\n on this context will always synchronize. See further documentation in the\n section titled \"API Synchronization behavior\" to learn more about cases when\n synchronous memory operations can exhibit asynchronous behavior.\n\n \\param dev - Device for which the primary context flags are set\n \\param flags - New flags for the device\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 ::cuDevicePrimaryCtxRetain,\n ::cuDevicePrimaryCtxGetState,\n ::cuCtxCreate,\n ::cuCtxGetFlags,\n ::cuCtxSetFlags,\n ::cudaSetDeviceFlags"]
7533 pub fn cuDevicePrimaryCtxSetFlags_v2(dev: CUdevice, flags: ::std::os::raw::c_uint) -> CUresult;
7534}
7535extern "C" {
7536 #[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 ::cuCtxSetFlags,\n ::cudaGetDeviceFlags"]
7537 pub fn cuDevicePrimaryCtxGetState(
7538 dev: CUdevice,
7539 flags: *mut ::std::os::raw::c_uint,
7540 active: *mut ::std::os::raw::c_int,
7541 ) -> CUresult;
7542}
7543extern "C" {
7544 #[doc = " \\brief Destroy all allocations and reset all state on the primary context\n\n Explicitly destroys and cleans up all resources associated with the current\n device in the current process.\n\n Note that it is responsibility of the calling function to ensure that no\n other module in the process is using the device any more. For that reason\n it is recommended to use ::cuDevicePrimaryCtxRelease() in most cases.\n However it is safe for other modules to call ::cuDevicePrimaryCtxRelease()\n even after resetting the device.\n Resetting the primary context does not release it, an application that has\n retained the primary context should explicitly release its usage.\n\n \\param dev - Device for which primary context is destroyed\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_DEVICE,\n ::CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE\n \\notefnerr\n\n \\sa ::cuDevicePrimaryCtxRetain,\n ::cuDevicePrimaryCtxRelease,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize,\n ::cudaDeviceReset"]
7545 pub fn cuDevicePrimaryCtxReset_v2(dev: CUdevice) -> CUresult;
7546}
7547extern "C" {
7548 #[doc = " \\brief Create a CUDA context\n\n \\note In most cases it is recommended to use ::cuDevicePrimaryCtxRetain.\n\n Creates a new CUDA context and associates it with the calling thread. The\n \\p flags parameter is described below. The context is created with a usage\n count of 1 and the caller of ::cuCtxCreate() must call ::cuCtxDestroy()\n when done using the context. If a context is already current to the thread,\n it is supplanted by the newly created context and may be restored by a subsequent\n call to ::cuCtxPopCurrent().\n\n The three LSBs of the \\p flags parameter can be used to control how the OS\n thread, which owns the CUDA context at the time of an API call, interacts\n with the OS scheduler when waiting for results from the GPU. Only one of\n the scheduling flags can be set when creating a context.\n\n - ::CU_CTX_SCHED_SPIN: Instruct CUDA to actively spin when waiting for\n results from the GPU. This can decrease latency when waiting for the GPU,\n but may lower the performance of CPU threads if they are performing work in\n parallel with the CUDA thread.\n\n - ::CU_CTX_SCHED_YIELD: Instruct CUDA to yield its thread when waiting for\n results from the GPU. This can increase latency when waiting for the GPU,\n but can increase the performance of CPU threads performing work in parallel\n with the GPU.\n\n - ::CU_CTX_SCHED_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a\n synchronization primitive when waiting for the GPU to finish work.\n\n - ::CU_CTX_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a\n synchronization primitive when waiting for the GPU to finish work. <br>\n <b>Deprecated:</b> This flag was deprecated as of CUDA 4.0 and was\n replaced with ::CU_CTX_SCHED_BLOCKING_SYNC.\n\n - ::CU_CTX_SCHED_AUTO: The default value if the \\p flags parameter is zero,\n uses a heuristic based on the number of active CUDA contexts in the\n process \\e C and the number of logical processors in the system \\e P. If\n \\e C > \\e P, then CUDA will yield to other OS threads when waiting for\n the GPU (::CU_CTX_SCHED_YIELD), otherwise CUDA will not yield while\n waiting for results and actively spin on the processor (::CU_CTX_SCHED_SPIN).\n Additionally, on Tegra devices, ::CU_CTX_SCHED_AUTO uses a heuristic based on\n the power profile of the platform and may choose ::CU_CTX_SCHED_BLOCKING_SYNC\n for low-powered devices.\n\n - ::CU_CTX_MAP_HOST: Instruct CUDA to support mapped pinned allocations.\n This flag must be set in order to allocate pinned host memory that is\n accessible to the GPU.\n\n - ::CU_CTX_LMEM_RESIZE_TO_MAX: Instruct CUDA to not reduce local memory\n after resizing local memory for a kernel. This can prevent thrashing by\n local memory allocations when launching many kernels with high local\n memory usage at the cost of potentially increased memory usage. <br>\n <b>Deprecated:</b> This flag is deprecated and the behavior enabled\n by this flag is now the default and cannot be disabled.\n Instead, the per-thread stack size can be controlled with ::cuCtxSetLimit().\n\n - ::CU_CTX_COREDUMP_ENABLE: If GPU coredumps have not been enabled globally\n with ::cuCoredumpSetAttributeGlobal or environment variables, this flag can\n be set during context creation to instruct CUDA to create a coredump if\n this context raises an exception during execution. These environment variables\n are described in the CUDA-GDB user guide under the \"GPU core dump support\"\n section.\n The initial attributes will be taken from the global attributes at the time of\n context creation. The other attributes that control coredump output can be\n modified by calling ::cuCoredumpSetAttribute from the created context after\n it becomes current.\n\n - ::CU_CTX_USER_COREDUMP_ENABLE: If user-triggered GPU coredumps have not\n been enabled globally with ::cuCoredumpSetAttributeGlobal or environment\n variables, this flag can be set during context creation to instruct CUDA to\n create a coredump if data is written to a certain pipe that is present in the\n OS space. These environment variables are described in the CUDA-GDB user\n guide under the \"GPU core dump support\" section.\n It is important to note that the pipe name *must* be set with\n ::cuCoredumpSetAttributeGlobal before creating the context if this flag is\n used. Setting this flag implies that ::CU_CTX_COREDUMP_ENABLE is set.\n The initial attributes will be taken from the global attributes at the time of\n context creation. The other attributes that control coredump output can be\n modified by calling ::cuCoredumpSetAttribute from the created context after\n it becomes current.\n Setting this flag on any context creation is equivalent to setting the\n ::CU_COREDUMP_ENABLE_USER_TRIGGER attribute to \\p true globally.\n\n - ::CU_CTX_SYNC_MEMOPS: Ensures that synchronous memory operations initiated\n on this context will always synchronize. See further documentation in the\n section titled \"API Synchronization behavior\" to learn more about cases when\n synchronous memory operations can exhibit asynchronous behavior.\n\n Context creation will fail with ::CUDA_ERROR_UNKNOWN if the compute mode of\n the device is ::CU_COMPUTEMODE_PROHIBITED. The function ::cuDeviceGetAttribute()\n can be used with ::CU_DEVICE_ATTRIBUTE_COMPUTE_MODE to determine the\n compute mode of the device. The <i>nvidia-smi</i> tool can be used to set\n the compute mode for * devices.\n Documentation for <i>nvidia-smi</i> can be obtained by passing a\n -h option to it.\n\n \\param pctx - Returned context handle of the new context\n \\param flags - Context creation flags\n \\param dev - Device to create context on\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 ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCoredumpSetAttributeGlobal,\n ::cuCoredumpSetAttribute,\n ::cuCtxSynchronize"]
7549 pub fn cuCtxCreate_v2(
7550 pctx: *mut CUcontext,
7551 flags: ::std::os::raw::c_uint,
7552 dev: CUdevice,
7553 ) -> CUresult;
7554}
7555extern "C" {
7556 #[doc = " \\brief Create a CUDA context with execution affinity\n\n Creates a new CUDA context with execution affinity and associates it with\n the calling thread. The \\p paramsArray and \\p flags parameter are described below.\n The context is created with a usage count of 1 and the caller of ::cuCtxCreate() must\n call ::cuCtxDestroy() when done using the context. If a context is already\n current to the thread, it is supplanted by the newly created context and may\n be restored by a subsequent call to ::cuCtxPopCurrent().\n\n The type and the amount of execution resource the context can use is limited by \\p paramsArray\n and \\p numParams. The \\p paramsArray is an array of \\p CUexecAffinityParam and the \\p numParams\n describes the size of the array. If two \\p CUexecAffinityParam in the array have the same type,\n the latter execution affinity parameter overrides the former execution affinity parameter.\n The supported execution affinity types are:\n - ::CU_EXEC_AFFINITY_TYPE_SM_COUNT limits the portion of SMs that the context can use. The portion\n of SMs is specified as the number of SMs via \\p CUexecAffinitySmCount. This limit will be internally\n rounded up to the next hardware-supported amount. Hence, it is imperative to query the actual execution\n affinity of the context via \\p cuCtxGetExecAffinity after context creation. Currently, this attribute\n is only supported under Volta+ MPS.\n\n The three LSBs of the \\p flags parameter can be used to control how the OS\n thread, which owns the CUDA context at the time of an API call, interacts\n with the OS scheduler when waiting for results from the GPU. Only one of\n the scheduling flags can be set when creating a context.\n\n - ::CU_CTX_SCHED_SPIN: Instruct CUDA to actively spin when waiting for\n results from the GPU. This can decrease latency when waiting for the GPU,\n but may lower the performance of CPU threads if they are performing work in\n parallel with the CUDA thread.\n\n - ::CU_CTX_SCHED_YIELD: Instruct CUDA to yield its thread when waiting for\n results from the GPU. This can increase latency when waiting for the GPU,\n but can increase the performance of CPU threads performing work in parallel\n with the GPU.\n\n - ::CU_CTX_SCHED_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a\n synchronization primitive when waiting for the GPU to finish work.\n\n - ::CU_CTX_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a\n synchronization primitive when waiting for the GPU to finish work. <br>\n <b>Deprecated:</b> This flag was deprecated as of CUDA 4.0 and was\n replaced with ::CU_CTX_SCHED_BLOCKING_SYNC.\n\n - ::CU_CTX_SCHED_AUTO: The default value if the \\p flags parameter is zero,\n uses a heuristic based on the number of active CUDA contexts in the\n process \\e C and the number of logical processors in the system \\e P. If\n \\e C > \\e P, then CUDA will yield to other OS threads when waiting for\n the GPU (::CU_CTX_SCHED_YIELD), otherwise CUDA will not yield while\n waiting for results and actively spin on the processor (::CU_CTX_SCHED_SPIN).\n Additionally, on Tegra devices, ::CU_CTX_SCHED_AUTO uses a heuristic based on\n the power profile of the platform and may choose ::CU_CTX_SCHED_BLOCKING_SYNC\n for low-powered devices.\n\n - ::CU_CTX_MAP_HOST: Instruct CUDA to support mapped pinned allocations.\n This flag must be set in order to allocate pinned host memory that is\n accessible to the GPU.\n\n - ::CU_CTX_LMEM_RESIZE_TO_MAX: Instruct CUDA to not reduce local memory\n after resizing local memory for a kernel. This can prevent thrashing by\n local memory allocations when launching many kernels with high local\n memory usage at the cost of potentially increased memory usage. <br>\n <b>Deprecated:</b> This flag is deprecated and the behavior enabled\n by this flag is now the default and cannot be disabled.\n Instead, the per-thread stack size can be controlled with ::cuCtxSetLimit().\n\n - ::CU_CTX_COREDUMP_ENABLE: If GPU coredumps have not been enabled globally\n with ::cuCoredumpSetAttributeGlobal or environment variables, this flag can\n be set during context creation to instruct CUDA to create a coredump if\n this context raises an exception during execution. These environment variables\n are described in the CUDA-GDB user guide under the \"GPU core dump support\"\n section.\n The initial attributes will be taken from the global attributes at the time of\n context creation. The other attributes that control coredump output can be\n modified by calling ::cuCoredumpSetAttribute from the created context after\n it becomes current.\n\n - ::CU_CTX_USER_COREDUMP_ENABLE: If user-triggered GPU coredumps have not\n been enabled globally with ::cuCoredumpSetAttributeGlobal or environment\n variables, this flag can be set during context creation to instruct CUDA to\n create a coredump if data is written to a certain pipe that is present in the\n OS space. These environment variables are described in the CUDA-GDB user\n guide under the \"GPU core dump support\" section.\n It is important to note that the pipe name *must* be set with\n ::cuCoredumpSetAttributeGlobal before creating the context if this flag is\n used. Setting this flag implies that ::CU_CTX_COREDUMP_ENABLE is set.\n The initial attributes will be taken from the global attributes at the time of\n context creation. The other attributes that control coredump output can be\n modified by calling ::cuCoredumpSetAttribute from the created context after\n it becomes current.\n Setting this flag on any context creation is equivalent to setting the\n ::CU_COREDUMP_ENABLE_USER_TRIGGER attribute to \\p true globally.\n\n Context creation will fail with ::CUDA_ERROR_UNKNOWN if the compute mode of\n the device is ::CU_COMPUTEMODE_PROHIBITED. The function ::cuDeviceGetAttribute()\n can be used with ::CU_DEVICE_ATTRIBUTE_COMPUTE_MODE to determine the\n compute mode of the device. The <i>nvidia-smi</i> tool can be used to set\n the compute mode for * devices.\n Documentation for <i>nvidia-smi</i> can be obtained by passing a\n -h option to it.\n\n \\param pctx - Returned context handle of the new context\n \\param paramsArray - Execution affinity parameters\n \\param numParams - Number of execution affinity parameters\n \\param flags - Context creation flags\n \\param dev - Device to create context on\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_UNSUPPORTED_EXEC_AFFINITY,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize,\n ::cuCoredumpSetAttributeGlobal,\n ::cuCoredumpSetAttribute,\n ::CUexecAffinityParam"]
7557 pub fn cuCtxCreate_v3(
7558 pctx: *mut CUcontext,
7559 paramsArray: *mut CUexecAffinityParam,
7560 numParams: ::std::os::raw::c_int,
7561 flags: ::std::os::raw::c_uint,
7562 dev: CUdevice,
7563 ) -> CUresult;
7564}
7565extern "C" {
7566 #[doc = " \\brief Create a CUDA context\n\n Creates a new CUDA context and associates it with the calling thread. The\n \\p flags parameter is described below. The context is created with a usage\n count of 1 and the caller of ::cuCtxCreate() must call ::cuCtxDestroy()\n when done using the context. If a context is already current to the thread,\n it is supplanted by the newly created context and may be restored by a subsequent\n call to ::cuCtxPopCurrent().\n\n CUDA context can be created with execution affinity. The type and the amount of\nexecution resource the context can use is limited by \\p paramsArray and \\p numExecAffinityParams\nin \\p execAffinity. The \\p paramsArray is an array of \\p CUexecAffinityParam and the \\p numExecAffinityParams\n describes the size of the paramsArray. If two \\p CUexecAffinityParam in the array have the same type,\n the latter execution affinity parameter overrides the former execution affinity parameter.\n The supported execution affinity types are:\n - ::CU_EXEC_AFFINITY_TYPE_SM_COUNT limits the portion of SMs that the context can use. The portion\n of SMs is specified as the number of SMs via \\p CUexecAffinitySmCount. This limit will be internally\n rounded up to the next hardware-supported amount. Hence, it is imperative to query the actual execution\n affinity of the context via \\p cuCtxGetExecAffinity after context creation. Currently, this attribute\n is only supported under Volta+ MPS.\n\n CUDA context can be created in CIG(CUDA in Graphics) mode by setting /p cigParams. Hardware support\n and software support for graphics clients can be determined using ::cuDeviceGetAttribute() with\n ::CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED. Data from graphics client is shared with CUDA via\n the /p sharedData in /pcigParams. For D3D12, /p sharedData is a ID3D12CommandQueue handle.\n\n Either /p execAffinityParams or /p cigParams can be set to a non-null value. Setting both to a\n non-null value will result in an undefined behavior.\n\n The three LSBs of the \\p flags parameter can be used to control how the OS\n thread, which owns the CUDA context at the time of an API call, interacts\n with the OS scheduler when waiting for results from the GPU. Only one of\n the scheduling flags can be set when creating a context.\n\n - ::CU_CTX_SCHED_SPIN: Instruct CUDA to actively spin when waiting for\n results from the GPU. This can decrease latency when waiting for the GPU,\n but may lower the performance of CPU threads if they are performing work in\n parallel with the CUDA thread.\n\n - ::CU_CTX_SCHED_YIELD: Instruct CUDA to yield its thread when waiting for\n results from the GPU. This can increase latency when waiting for the GPU,\n but can increase the performance of CPU threads performing work in parallel\n with the GPU.\n\n - ::CU_CTX_SCHED_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a\n synchronization primitive when waiting for the GPU to finish work.\n\n - ::CU_CTX_BLOCKING_SYNC: Instruct CUDA to block the CPU thread on a\n synchronization primitive when waiting for the GPU to finish work. <br>\n <b>Deprecated:</b> This flag was deprecated as of CUDA 4.0 and was\n replaced with ::CU_CTX_SCHED_BLOCKING_SYNC.\n\n - ::CU_CTX_SCHED_AUTO: The default value if the \\p flags parameter is zero,\n uses a heuristic based on the number of active CUDA contexts in the\n process \\e C and the number of logical processors in the system \\e P. If\n \\e C > \\e P, then CUDA will yield to other OS threads when waiting for\n the GPU (::CU_CTX_SCHED_YIELD), otherwise CUDA will not yield while\n waiting for results and actively spin on the processor (::CU_CTX_SCHED_SPIN).\n Additionally, on Tegra devices, ::CU_CTX_SCHED_AUTO uses a heuristic based on\n the power profile of the platform and may choose ::CU_CTX_SCHED_BLOCKING_SYNC\n for low-powered devices.\n\n - ::CU_CTX_MAP_HOST: Instruct CUDA to support mapped pinned allocations.\n This flag must be set in order to allocate pinned host memory that is\n accessible to the GPU.\n\n - ::CU_CTX_LMEM_RESIZE_TO_MAX: Instruct CUDA to not reduce local memory\n after resizing local memory for a kernel. This can prevent thrashing by\n local memory allocations when launching many kernels with high local\n memory usage at the cost of potentially increased memory usage. <br>\n <b>Deprecated:</b> This flag is deprecated and the behavior enabled\n by this flag is now the default and cannot be disabled.\n Instead, the per-thread stack size can be controlled with ::cuCtxSetLimit().\n\n - ::CU_CTX_COREDUMP_ENABLE: If GPU coredumps have not been enabled globally\n with ::cuCoredumpSetAttributeGlobal or environment variables, this flag can\n be set during context creation to instruct CUDA to create a coredump if\n this context raises an exception during execution. These environment variables\n are described in the CUDA-GDB user guide under the \"GPU core dump support\"\n section.\n The initial attributes will be taken from the global attributes at the time of\n context creation. The other attributes that control coredump output can be\n modified by calling ::cuCoredumpSetAttribute from the created context after\n it becomes current. This flag is not supported when CUDA context is created in\n CIG(CUDA in Graphics) mode.\n\n - ::CU_CTX_USER_COREDUMP_ENABLE: If user-triggered GPU coredumps have not\n been enabled globally with ::cuCoredumpSetAttributeGlobal or environment\n variables, this flag can be set during context creation to instruct CUDA to\n create a coredump if data is written to a certain pipe that is present in the\n OS space. These environment variables are described in the CUDA-GDB user\n guide under the \"GPU core dump support\" section.\n It is important to note that the pipe name *must* be set with\n ::cuCoredumpSetAttributeGlobal before creating the context if this flag is\n used. Setting this flag implies that ::CU_CTX_COREDUMP_ENABLE is set.\n The initial attributes will be taken from the global attributes at the time of\n context creation. The other attributes that control coredump output can be\n modified by calling ::cuCoredumpSetAttribute from the created context after\n it becomes current.\n Setting this flag on any context creation is equivalent to setting the\n ::CU_COREDUMP_ENABLE_USER_TRIGGER attribute to \\p true globally.\n This flag is not supported when CUDA context is created in\n CIG(CUDA in Graphics) mode.\n\n - ::CU_CTX_SYNC_MEMOPS: Ensures that synchronous memory operations initiated\n on this context will always synchronize. See further documentation in the\n section titled \"API Synchronization behavior\" to learn more about cases when\n synchronous memory operations can exhibit asynchronous behavior.\n\n Context creation will fail with ::CUDA_ERROR_UNKNOWN if the compute mode of\n the device is ::CU_COMPUTEMODE_PROHIBITED. The function ::cuDeviceGetAttribute()\n can be used with ::CU_DEVICE_ATTRIBUTE_COMPUTE_MODE to determine the\n compute mode of the device. The <i>nvidia-smi</i> tool can be used to set\n the compute mode for * devices.\n Documentation for <i>nvidia-smi</i> can be obtained by passing a\n -h option to it.\n\n Context creation will fail with :: CUDA_ERROR_INVALID_VALUE if invalid parameter was\n passed by client to create the CUDA context.\n\n Context creation in CIG mode will fail with ::CUDA_ERROR_NOT_SUPPORTED if CIG is not supported\n by the device or the driver.\n\n \\param pctx - Returned context handle of the new context\n \\param ctxCreateParams - Context creation parameters\n \\param flags - Context creation flags\n \\param dev - Device to create context on\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_NOT_SUPPORTED,\n ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa ::cuCtxDestroy,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCoredumpSetAttributeGlobal,\n ::cuCoredumpSetAttribute,\n ::cuCtxSynchronize"]
7567 pub fn cuCtxCreate_v4(
7568 pctx: *mut CUcontext,
7569 ctxCreateParams: *mut CUctxCreateParams,
7570 flags: ::std::os::raw::c_uint,
7571 dev: CUdevice,
7572 ) -> CUresult;
7573}
7574extern "C" {
7575 #[doc = " \\brief Destroy a CUDA context\n\n Destroys the CUDA context specified by \\p ctx. The context \\p ctx will be\n destroyed regardless of how many threads it is current to.\n It is the responsibility of the calling function to ensure that no API\n call issues using \\p ctx while ::cuCtxDestroy() is executing.\n\n Destroys and cleans up all resources associated with the context.\n It is the caller's responsibility to ensure that the context or its resources\n are not accessed or passed in subsequent API calls and doing so will result in undefined behavior.\n These resources include CUDA types ::CUmodule, ::CUfunction, ::CUstream, ::CUevent,\n ::CUarray, ::CUmipmappedArray, ::CUtexObject, ::CUsurfObject, ::CUtexref, ::CUsurfref,\n ::CUgraphicsResource, ::CUlinkState, ::CUexternalMemory and ::CUexternalSemaphore.\n These resources also include memory allocations by ::cuMemAlloc(), ::cuMemAllocHost(),\n ::cuMemAllocManaged() and ::cuMemAllocPitch().\n\n If \\p ctx is current to the calling thread then \\p ctx will also be\n popped from the current thread's context stack (as though ::cuCtxPopCurrent()\n were called). If \\p ctx is current to other threads, then \\p ctx will\n remain current to those threads, and attempting to access \\p ctx from\n those threads will result in the error ::CUDA_ERROR_CONTEXT_IS_DESTROYED.\n\n \\note ::cuCtxDestroy() will not destroy memory allocations by ::cuMemCreate(), ::cuMemAllocAsync() and\n ::cuMemAllocFromPoolAsync(). These memory allocations are not associated with any CUDA context and need to\n be destroyed explicitly.\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 ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n\n \\sa ::cuCtxCreate,\n ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetDevice,\n ::cuCtxGetFlags,\n ::cuCtxGetLimit,\n ::cuCtxPopCurrent,\n ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize"]
7576 pub fn cuCtxDestroy_v2(ctx: CUcontext) -> CUresult;
7577}
7578extern "C" {
7579 #[doc = " \\brief Pushes a context on the current CPU thread\n\n Pushes the given context \\p ctx onto the CPU thread's stack of current\n contexts. The specified context becomes the CPU thread's current context, so\n all CUDA functions that operate on the current context are affected.\n\n The previous current context may be made current again by calling\n ::cuCtxDestroy() or ::cuCtxPopCurrent().\n\n \\param ctx - Context to push\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 ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize"]
7580 pub fn cuCtxPushCurrent_v2(ctx: CUcontext) -> CUresult;
7581}
7582extern "C" {
7583 #[doc = " \\brief Pops the current CUDA context from the current CPU thread.\n\n Pops the current CUDA context from the CPU thread and passes back the\n old context handle in \\p *pctx. That context may then be made current\n to a different CPU thread by calling ::cuCtxPushCurrent().\n\n If a context was current to the CPU thread before ::cuCtxCreate() or\n ::cuCtxPushCurrent() was called, this function makes that context current to\n the CPU thread again.\n\n \\param pctx - Returned popped context handle\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 ::cuCtxPushCurrent,\n ::cuCtxSetCacheConfig,\n ::cuCtxSetLimit,\n ::cuCtxSynchronize"]
7584 pub fn cuCtxPopCurrent_v2(pctx: *mut CUcontext) -> CUresult;
7585}
7586extern "C" {
7587 #[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"]
7588 pub fn cuCtxSetCurrent(ctx: CUcontext) -> CUresult;
7589}
7590extern "C" {
7591 #[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"]
7592 pub fn cuCtxGetCurrent(pctx: *mut CUcontext) -> CUresult;
7593}
7594extern "C" {
7595 #[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"]
7596 pub fn cuCtxGetDevice(device: *mut CUdevice) -> CUresult;
7597}
7598extern "C" {
7599 #[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 ::cuCtxSetFlags,\n ::cudaGetDeviceFlags"]
7600 pub fn cuCtxGetFlags(flags: *mut ::std::os::raw::c_uint) -> CUresult;
7601}
7602extern "C" {
7603 #[doc = " \\brief Sets the flags for the current context\n\n Sets the flags for the current context overwriting previously set ones. See\n ::cuDevicePrimaryCtxSetFlags for flag values.\n\n \\param flags - Flags to set on 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 ::cuCtxGetApiVersion,\n ::cuCtxGetCacheConfig,\n ::cuCtxGetCurrent,\n ::cuCtxGetDevice,\n ::cuCtxGetLimit,\n ::cuCtxGetSharedMemConfig,\n ::cuCtxGetStreamPriorityRange,\n ::cuCtxGetFlags,\n ::cudaGetDeviceFlags,\n ::cuDevicePrimaryCtxSetFlags,"]
7604 pub fn cuCtxSetFlags(flags: ::std::os::raw::c_uint) -> CUresult;
7605}
7606extern "C" {
7607 #[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"]
7608 pub fn cuCtxGetId(ctx: CUcontext, ctxId: *mut ::std::os::raw::c_ulonglong) -> CUresult;
7609}
7610extern "C" {
7611 #[doc = " \\brief Block for the current context's tasks to complete\n\n Blocks until the current context has completed all preceding requested tasks.\n If the current context is the primary context, green contexts that have been\n created will also be synchronized.\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"]
7612 pub fn cuCtxSynchronize() -> CUresult;
7613}
7614extern "C" {
7615 #[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 performance 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 available 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"]
7616 pub fn cuCtxSetLimit(limit: CUlimit, value: usize) -> CUresult;
7617}
7618extern "C" {
7619 #[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"]
7620 pub fn cuCtxGetLimit(pvalue: *mut usize, limit: CUlimit) -> CUresult;
7621}
7622extern "C" {
7623 #[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"]
7624 pub fn cuCtxGetCacheConfig(pconfig: *mut CUfunc_cache) -> CUresult;
7625}
7626extern "C" {
7627 #[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"]
7628 pub fn cuCtxSetCacheConfig(config: CUfunc_cache) -> CUresult;
7629}
7630extern "C" {
7631 #[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"]
7632 pub fn cuCtxGetApiVersion(ctx: CUcontext, version: *mut ::std::os::raw::c_uint) -> CUresult;
7633}
7634extern "C" {
7635 #[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"]
7636 pub fn cuCtxGetStreamPriorityRange(
7637 leastPriority: *mut ::std::os::raw::c_int,
7638 greatestPriority: *mut ::std::os::raw::c_int,
7639 ) -> CUresult;
7640}
7641extern "C" {
7642 #[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"]
7643 pub fn cuCtxResetPersistingL2Cache() -> CUresult;
7644}
7645extern "C" {
7646 #[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"]
7647 pub fn cuCtxGetExecAffinity(
7648 pExecAffinity: *mut CUexecAffinityParam,
7649 type_: CUexecAffinityType,
7650 ) -> CUresult;
7651}
7652extern "C" {
7653 #[doc = " \\brief Records an event.\n\n Captures in \\p hEvent all the activities of the context \\p hCtx\n at the time of this call. \\p hEvent and \\p hCtx must be from the same\n CUDA context, otherwise ::CUDA_ERROR_INVALID_HANDLE will be returned.\n Calls such as ::cuEventQuery() or ::cuCtxWaitEvent() will then examine\n or wait for completion of the work that was captured.\n Uses of \\p hCtx after this call do not modify \\p hEvent.\n If the context passed to \\p hCtx is the primary context, \\p hEvent will\n capture all the activities of the primary context and its green contexts.\n If the context passed to \\p hCtx is a context converted from green context\n via ::cuCtxFromGreenCtx(), \\p hEvent will capture only the activities of the green context.\n\n \\note The API will return ::CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED if the\n specified context \\p hCtx has a stream in the capture mode. In such a case,\n the call will invalidate all the conflicting captures.\n\n \\param hCtx - Context to record event for\n \\param hEvent - Event to record\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_STREAM_CAPTURE_UNSUPPORTED\n\n \\sa\n ::cuCtxWaitEvent,\n ::cuGreenCtxRecordEvent,\n ::cuGreenCtxWaitEvent,\n ::cuEventRecord"]
7654 pub fn cuCtxRecordEvent(hCtx: CUcontext, hEvent: CUevent) -> CUresult;
7655}
7656extern "C" {
7657 #[doc = " \\brief Make a context wait on an event\n\n Makes all future work submitted to context \\p hCtx wait for all work\n captured in \\p hEvent. The synchronization will be performed on the device\n and will not block the calling CPU thread. See ::cuCtxRecordEvent()\n for details on what is captured by an event.\n If the context passed to \\p hCtx is the primary context, the primary context\n and its green contexts will wait for \\p hEvent.\n If the context passed to \\p hCtx is a context converted from green context\n via ::cuCtxFromGreenCtx(), the green context will wait for \\p hEvent.\n\n \\note \\p hEvent may be from a different context or device than \\p hCtx.\n\n \\note The API will return ::CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED and\n invalidate the capture if the specified event \\p hEvent is part of an ongoing\n capture sequence or if the specified context \\p hCtx has a stream in the capture mode.\n\n \\param hCtx - Context to wait\n \\param hEvent - Event to wait on\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_STREAM_CAPTURE_UNSUPPORTED\n\n \\sa\n ::cuCtxRecordEvent,\n ::cuGreenCtxRecordEvent,\n ::cuGreenCtxWaitEvent,\n ::cuStreamWaitEvent"]
7658 pub fn cuCtxWaitEvent(hCtx: CUcontext, hEvent: CUevent) -> CUresult;
7659}
7660extern "C" {
7661 #[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"]
7662 pub fn cuCtxAttach(pctx: *mut CUcontext, flags: ::std::os::raw::c_uint) -> CUresult;
7663}
7664extern "C" {
7665 #[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"]
7666 pub fn cuCtxDetach(ctx: CUcontext) -> CUresult;
7667}
7668extern "C" {
7669 #[doc = " \\brief Returns the current shared memory configuration for the current context.\n\n \\deprecated\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"]
7670 pub fn cuCtxGetSharedMemConfig(pConfig: *mut CUsharedconfig) -> CUresult;
7671}
7672extern "C" {
7673 #[doc = " \\brief Sets the shared memory configuration for the current context.\n\n \\deprecated\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"]
7674 pub fn cuCtxSetSharedMemConfig(config: CUsharedconfig) -> CUresult;
7675}
7676extern "C" {
7677 #[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"]
7678 pub fn cuModuleLoad(module: *mut CUmodule, fname: *const ::std::os::raw::c_char) -> CUresult;
7679}
7680extern "C" {
7681 #[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 \\p image may be a \\e cubin or \\e fatbin\n as output by \\b nvcc, or a NULL-terminated \\e PTX, either as output by \\b nvcc\n or hand-written.\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"]
7682 pub fn cuModuleLoadData(
7683 module: *mut CUmodule,
7684 image: *const ::std::os::raw::c_void,
7685 ) -> CUresult;
7686}
7687extern "C" {
7688 #[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 \\p image may be a \\e cubin or \\e fatbin\n as output by \\b nvcc, or a NULL-terminated \\e PTX, either as output by \\b nvcc\n or hand-written.\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"]
7689 pub fn cuModuleLoadDataEx(
7690 module: *mut CUmodule,
7691 image: *const ::std::os::raw::c_void,
7692 numOptions: ::std::os::raw::c_uint,
7693 options: *mut CUjit_option,
7694 optionValues: *mut *mut ::std::os::raw::c_void,
7695 ) -> CUresult;
7696}
7697extern "C" {
7698 #[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"]
7699 pub fn cuModuleLoadFatBinary(
7700 module: *mut CUmodule,
7701 fatCubin: *const ::std::os::raw::c_void,
7702 ) -> CUresult;
7703}
7704extern "C" {
7705 #[doc = " \\brief Unloads a module\n\n Unloads a module \\p hmod from the current context. Attempting to unload\n a module which was obtained from the Library Management API such as\n ::cuLibraryGetModule will return ::CUDA_ERROR_NOT_PERMITTED.\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 ::CUDA_ERROR_NOT_PERMITTED\n \\notefnerr\n \\note_destroy_ub\n\n \\sa ::cuModuleGetFunction,\n ::cuModuleGetGlobal,\n ::cuModuleGetTexRef,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx,\n ::cuModuleLoadFatBinary"]
7706 pub fn cuModuleUnload(hmod: CUmodule) -> CUresult;
7707}
7708impl CUmoduleLoadingMode_enum {
7709 #[doc = "< Lazy Kernel Loading is not enabled"]
7710 pub const CU_MODULE_EAGER_LOADING: CUmoduleLoadingMode_enum = CUmoduleLoadingMode_enum(1);
7711}
7712impl CUmoduleLoadingMode_enum {
7713 #[doc = "< Lazy Kernel Loading is enabled"]
7714 pub const CU_MODULE_LAZY_LOADING: CUmoduleLoadingMode_enum = CUmoduleLoadingMode_enum(2);
7715}
7716#[repr(transparent)]
7717#[doc = " CUDA Lazy Loading status"]
7718#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
7719pub struct CUmoduleLoadingMode_enum(pub ::std::os::raw::c_uint);
7720#[doc = " CUDA Lazy Loading status"]
7721pub use self::CUmoduleLoadingMode_enum as CUmoduleLoadingMode;
7722extern "C" {
7723 #[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,"]
7724 pub fn cuModuleGetLoadingMode(mode: *mut CUmoduleLoadingMode) -> CUresult;
7725}
7726extern "C" {
7727 #[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"]
7728 pub fn cuModuleGetFunction(
7729 hfunc: *mut CUfunction,
7730 hmod: CUmodule,
7731 name: *const ::std::os::raw::c_char,
7732 ) -> CUresult;
7733}
7734extern "C" {
7735 #[doc = " \\brief Returns the number of functions within a module\n\n Returns in \\p count the number of functions in \\p mod.\n\n \\param count - Number of functions found within the module\n \\param mod - Module to query\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE"]
7736 pub fn cuModuleGetFunctionCount(count: *mut ::std::os::raw::c_uint, mod_: CUmodule)
7737 -> CUresult;
7738}
7739extern "C" {
7740 #[doc = " \\brief Returns the function handles within a module.\n\n Returns in \\p functions a maximum number of \\p numFunctions function handles within \\p mod. When\n function loading mode is set to LAZY the function retrieved may be partially loaded. The loading\n state of a function can be queried using ::cuFunctionIsLoaded. CUDA APIs may load the function\n automatically when called with partially loaded function handle which may incur additional\n latency. Alternatively, ::cuFunctionLoad can be used to explicitly load a function. The returned\n function handles become invalid when the module is unloaded.\n\n \\param functions - Buffer where the function handles are returned to\n \\param numFunctions - Maximum number of function handles may be returned to the buffer\n \\param mod - Module to query from\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuModuleGetFunction,\n ::cuModuleGetFunctionCount,\n ::cuFuncIsLoaded,\n ::cuFuncLoad"]
7741 pub fn cuModuleEnumerateFunctions(
7742 functions: *mut CUfunction,
7743 numFunctions: ::std::os::raw::c_uint,
7744 mod_: CUmodule,
7745 ) -> CUresult;
7746}
7747extern "C" {
7748 #[doc = " \\brief Returns a global pointer from a module\n\n Returns in \\p *dptr and \\p *bytes the base pointer and size of the\n global of name \\p name located in module \\p hmod. If no variable of that name\n exists, ::cuModuleGetGlobal() 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\n \\param bytes - Returned global size in bytes\n \\param hmod - Module 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_CONTEXT,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_FOUND\n \\notefnerr\n\n \\sa ::cuModuleGetFunction,\n ::cuModuleGetTexRef,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx,\n ::cuModuleLoadFatBinary,\n ::cuModuleUnload,\n ::cudaGetSymbolAddress,\n ::cudaGetSymbolSize"]
7749 pub fn cuModuleGetGlobal_v2(
7750 dptr: *mut CUdeviceptr,
7751 bytes: *mut usize,
7752 hmod: CUmodule,
7753 name: *const ::std::os::raw::c_char,
7754 ) -> CUresult;
7755}
7756extern "C" {
7757 #[doc = " \\brief Creates a pending JIT linker invocation.\n\n If the call is successful, the caller owns the returned CUlinkState, which\n should eventually be destroyed with ::cuLinkDestroy. The\n device code machine size (32 or 64 bit) will match the calling application.\n\n Both linker and compiler options may be specified. Compiler options will\n be applied to inputs to this linker action which must be compiled from PTX.\n The options ::CU_JIT_WALL_TIME,\n ::CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, and ::CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES\n will accumulate data until the CUlinkState is destroyed.\n\n The data passed in via ::cuLinkAddData and ::cuLinkAddFile will be treated\n as relocatable (-rdc=true to nvcc) when linking the final cubin during\n ::cuLinkComplete and will have similar consequences as offline relocatable\n device code linking.\n\n \\p optionValues must remain valid for the life of the CUlinkState if output\n options are used. No other references to inputs are maintained after this\n call returns.\n\n \\note For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted\n\n \\param numOptions Size of options arrays\n \\param options Array of linker and compiler options\n \\param optionValues Array of option values, each cast to void *\n \\param stateOut On success, this will contain a CUlinkState to specify\n and complete this action\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_JIT_COMPILER_NOT_FOUND\n \\notefnerr\n\n \\sa ::cuLinkAddData,\n ::cuLinkAddFile,\n ::cuLinkComplete,\n ::cuLinkDestroy"]
7758 pub fn cuLinkCreate_v2(
7759 numOptions: ::std::os::raw::c_uint,
7760 options: *mut CUjit_option,
7761 optionValues: *mut *mut ::std::os::raw::c_void,
7762 stateOut: *mut CUlinkState,
7763 ) -> CUresult;
7764}
7765extern "C" {
7766 #[doc = " \\brief Add an input to a pending linker invocation\n\n Ownership of \\p data is retained by the caller. No reference is retained to any\n inputs after this call returns.\n\n This method accepts only compiler options, which are used if the data must\n be compiled from PTX, and does not accept any of\n ::CU_JIT_WALL_TIME, ::CU_JIT_INFO_LOG_BUFFER, ::CU_JIT_ERROR_LOG_BUFFER,\n ::CU_JIT_TARGET_FROM_CUCONTEXT, or ::CU_JIT_TARGET.\n\n \\note For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted\n\n \\param state A pending linker action.\n \\param type The type of the input data.\n \\param data The input data. PTX must be NULL-terminated.\n \\param size The length of the input data.\n \\param name An optional name for this input in log messages.\n \\param numOptions Size of options.\n \\param options Options to be applied only for this input (overrides options from ::cuLinkCreate).\n \\param optionValues Array of option values, each cast to void *.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_IMAGE,\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\n \\sa ::cuLinkCreate,\n ::cuLinkAddFile,\n ::cuLinkComplete,\n ::cuLinkDestroy"]
7767 pub fn cuLinkAddData_v2(
7768 state: CUlinkState,
7769 type_: CUjitInputType,
7770 data: *mut ::std::os::raw::c_void,
7771 size: usize,
7772 name: *const ::std::os::raw::c_char,
7773 numOptions: ::std::os::raw::c_uint,
7774 options: *mut CUjit_option,
7775 optionValues: *mut *mut ::std::os::raw::c_void,
7776 ) -> CUresult;
7777}
7778extern "C" {
7779 #[doc = " \\brief Add a file input to a pending linker invocation\n\n No reference is retained to any inputs after this call returns.\n\n This method accepts only compiler options, which are used if the input\n must be compiled from PTX, and does not accept any of\n ::CU_JIT_WALL_TIME, ::CU_JIT_INFO_LOG_BUFFER, ::CU_JIT_ERROR_LOG_BUFFER,\n ::CU_JIT_TARGET_FROM_CUCONTEXT, or ::CU_JIT_TARGET.\n\n This method is equivalent to invoking ::cuLinkAddData on the contents\n of the file.\n\n \\note For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted\n\n \\param state A pending linker action\n \\param type The type of the input data\n \\param path Path to the input file\n \\param numOptions Size of options\n \\param options Options to be applied only for this input (overrides options from ::cuLinkCreate)\n \\param optionValues Array of option values, each cast to void *\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_FILE_NOT_FOUND\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_IMAGE,\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\n \\sa ::cuLinkCreate,\n ::cuLinkAddData,\n ::cuLinkComplete,\n ::cuLinkDestroy"]
7780 pub fn cuLinkAddFile_v2(
7781 state: CUlinkState,
7782 type_: CUjitInputType,
7783 path: *const ::std::os::raw::c_char,
7784 numOptions: ::std::os::raw::c_uint,
7785 options: *mut CUjit_option,
7786 optionValues: *mut *mut ::std::os::raw::c_void,
7787 ) -> CUresult;
7788}
7789extern "C" {
7790 #[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"]
7791 pub fn cuLinkComplete(
7792 state: CUlinkState,
7793 cubinOut: *mut *mut ::std::os::raw::c_void,
7794 sizeOut: *mut usize,
7795 ) -> CUresult;
7796}
7797extern "C" {
7798 #[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"]
7799 pub fn cuLinkDestroy(state: CUlinkState) -> CUresult;
7800}
7801extern "C" {
7802 #[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"]
7803 pub fn cuModuleGetTexRef(
7804 pTexRef: *mut CUtexref,
7805 hmod: CUmodule,
7806 name: *const ::std::os::raw::c_char,
7807 ) -> CUresult;
7808}
7809extern "C" {
7810 #[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"]
7811 pub fn cuModuleGetSurfRef(
7812 pSurfRef: *mut CUsurfref,
7813 hmod: CUmodule,
7814 name: *const ::std::os::raw::c_char,
7815 ) -> CUresult;
7816}
7817extern "C" {
7818 #[doc = " \\brief Load a library with specified code and options\n\n Takes a pointer \\p code and loads the corresponding library \\p library based on\n the application defined library loading mode:\n - If module loading is set to EAGER, via the environment variables described in \"Module loading\",\n \\p library is loaded eagerly into all contexts at the time of the call and future contexts\n at the time of creation until the library is unloaded with ::cuLibraryUnload().\n - If the environment variables are set to LAZY, \\p library\n is not immediately loaded onto all existent contexts and will only be\n loaded when a function is needed for that context, such as a kernel launch.\n\n These environment variables are described in the CUDA programming guide under the\n \"CUDA environment variables\" section.\n\n The \\p code may be a \\e cubin or \\e fatbin as output by \\b nvcc,\n or a NULL-terminated \\e PTX, either as output by \\b nvcc or hand-written.\n A fatbin should also contain relocatable code when doing separate compilation.\n\n Options are passed as an array via \\p jitOptions and any corresponding parameters are passed in\n \\p jitOptionsValues. The number of total JIT options is supplied via \\p numJitOptions.\n Any outputs will be returned via \\p jitOptionsValues.\n\n Library load options are passed as an array via \\p libraryOptions and any corresponding parameters are passed in\n \\p libraryOptionValues. The number of total library load options is supplied via \\p numLibraryOptions.\n\n \\note If the library contains managed variables and no device in the system\n supports managed variables this call is expected to return ::CUDA_ERROR_NOT_SUPPORTED\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 ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuLibraryLoadFromFile,\n ::cuLibraryUnload,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx"]
7819 pub fn cuLibraryLoadData(
7820 library: *mut CUlibrary,
7821 code: *const ::std::os::raw::c_void,
7822 jitOptions: *mut CUjit_option,
7823 jitOptionsValues: *mut *mut ::std::os::raw::c_void,
7824 numJitOptions: ::std::os::raw::c_uint,
7825 libraryOptions: *mut CUlibraryOption,
7826 libraryOptionValues: *mut *mut ::std::os::raw::c_void,
7827 numLibraryOptions: ::std::os::raw::c_uint,
7828 ) -> CUresult;
7829}
7830extern "C" {
7831 #[doc = " \\brief Load a library with specified file and options\n\n Takes a pointer \\p code and loads the corresponding library \\p library based on\n the application defined library loading mode:\n - If module loading is set to EAGER, via the environment variables described in \"Module loading\",\n \\p library is loaded eagerly into all contexts at the time of the call and future contexts\n at the time of creation until the library is unloaded with ::cuLibraryUnload().\n - If the environment variables are set to LAZY, \\p library\n is not immediately loaded onto all existent contexts and will only be\n loaded when a function is needed for that context, such as a kernel launch.\n\n These environment variables are described in the CUDA programming guide under the\n \"CUDA environment variables\" section.\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 A fatbin should also contain relocatable code when doing separate compilation.\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 Library load options are passed as an array via \\p libraryOptions and any corresponding parameters are passed in\n \\p libraryOptionValues. The number of total library load options is supplied via \\p numLibraryOptions.\n\n \\note If the library contains managed variables and no device in the system\n supports managed variables this call is expected to return ::CUDA_ERROR_NOT_SUPPORTED\n\n \\param library - Returned library\n \\param fileName - File to load from\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 ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuLibraryLoadData,\n ::cuLibraryUnload,\n ::cuModuleLoad,\n ::cuModuleLoadData,\n ::cuModuleLoadDataEx"]
7832 pub fn cuLibraryLoadFromFile(
7833 library: *mut CUlibrary,
7834 fileName: *const ::std::os::raw::c_char,
7835 jitOptions: *mut CUjit_option,
7836 jitOptionsValues: *mut *mut ::std::os::raw::c_void,
7837 numJitOptions: ::std::os::raw::c_uint,
7838 libraryOptions: *mut CUlibraryOption,
7839 libraryOptionValues: *mut *mut ::std::os::raw::c_void,
7840 numLibraryOptions: ::std::os::raw::c_uint,
7841 ) -> CUresult;
7842}
7843extern "C" {
7844 #[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"]
7845 pub fn cuLibraryUnload(library: CUlibrary) -> CUresult;
7846}
7847extern "C" {
7848 #[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"]
7849 pub fn cuLibraryGetKernel(
7850 pKernel: *mut CUkernel,
7851 library: CUlibrary,
7852 name: *const ::std::os::raw::c_char,
7853 ) -> CUresult;
7854}
7855extern "C" {
7856 #[doc = " \\brief Returns the number of kernels within a library\n\n Returns in \\p count the number of kernels in \\p lib.\n\n \\param count - Number of kernels found within the library\n \\param lib - Library to query\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE"]
7857 pub fn cuLibraryGetKernelCount(count: *mut ::std::os::raw::c_uint, lib: CUlibrary) -> CUresult;
7858}
7859extern "C" {
7860 #[doc = " \\brief Retrieve the kernel handles within a library.\n\n Returns in \\p kernels a maximum number of \\p numKernels kernel handles within \\p lib.\n The returned kernel handle becomes invalid when the library is unloaded.\n\n \\param kernels - Buffer where the kernel handles are returned to\n \\param numKernels - Maximum number of kernel handles may be returned to the buffer\n \\param lib - Library to query from\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuLibraryGetKernelCount"]
7861 pub fn cuLibraryEnumerateKernels(
7862 kernels: *mut CUkernel,
7863 numKernels: ::std::os::raw::c_uint,
7864 lib: CUlibrary,
7865 ) -> CUresult;
7866}
7867extern "C" {
7868 #[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"]
7869 pub fn cuLibraryGetModule(pMod: *mut CUmodule, library: CUlibrary) -> CUresult;
7870}
7871extern "C" {
7872 #[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"]
7873 pub fn cuKernelGetFunction(pFunc: *mut CUfunction, kernel: CUkernel) -> CUresult;
7874}
7875extern "C" {
7876 #[doc = " \\brief Returns a library handle\n\n Returns in \\p pLib the handle of the library for the requested kernel \\p kernel\n\n \\param pLib - Returned library handle\n \\param kernel - Kernel to retrieve library handle\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 ::cuLibraryGetKernel"]
7877 pub fn cuKernelGetLibrary(pLib: *mut CUlibrary, kernel: CUkernel) -> CUresult;
7878}
7879extern "C" {
7880 #[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"]
7881 pub fn cuLibraryGetGlobal(
7882 dptr: *mut CUdeviceptr,
7883 bytes: *mut usize,
7884 library: CUlibrary,
7885 name: *const ::std::os::raw::c_char,
7886 ) -> CUresult;
7887}
7888extern "C" {
7889 #[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 \\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"]
7890 pub fn cuLibraryGetManaged(
7891 dptr: *mut CUdeviceptr,
7892 bytes: *mut usize,
7893 library: CUlibrary,
7894 name: *const ::std::os::raw::c_char,
7895 ) -> CUresult;
7896}
7897extern "C" {
7898 #[doc = " \\brief Returns a pointer to a unified function\n\n Returns in \\p *fptr the function pointer to a unified function denoted by \\p symbol.\n If no unified function with name \\p symbol exists, the call returns ::CUDA_ERROR_NOT_FOUND.\n If there is no device with attribute ::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 unified 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"]
7899 pub fn cuLibraryGetUnifiedFunction(
7900 fptr: *mut *mut ::std::os::raw::c_void,
7901 library: CUlibrary,
7902 symbol: *const ::std::os::raw::c_char,
7903 ) -> CUresult;
7904}
7905extern "C" {
7906 #[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"]
7907 pub fn cuKernelGetAttribute(
7908 pi: *mut ::std::os::raw::c_int,
7909 attrib: CUfunction_attribute,
7910 kernel: CUkernel,
7911 dev: CUdevice,
7912 ) -> CUresult;
7913}
7914extern "C" {
7915 #[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_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.\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"]
7916 pub fn cuKernelSetAttribute(
7917 attrib: CUfunction_attribute,
7918 val: ::std::os::raw::c_int,
7919 kernel: CUkernel,
7920 dev: CUdevice,
7921 ) -> CUresult;
7922}
7923extern "C" {
7924 #[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"]
7925 pub fn cuKernelSetCacheConfig(
7926 kernel: CUkernel,
7927 config: CUfunc_cache,
7928 dev: CUdevice,
7929 ) -> CUresult;
7930}
7931extern "C" {
7932 #[doc = " \\brief Returns the function name for a ::CUkernel handle\n\n Returns in \\p **name the function name associated with the kernel handle \\p hfunc .\n The function name is returned as a null-terminated string. The returned name is only\n valid when the kernel handle is valid. If the library is unloaded or reloaded, one\n must call the API again to get the updated name. This API may return a mangled name if\n the function is not declared as having C linkage. If either \\p **name or \\p hfunc\n is NULL, ::CUDA_ERROR_INVALID_VALUE is returned.\n\n \\param name - The returned name of the function\n \\param hfunc - The function handle to retrieve the name for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n \\notefnerr\n"]
7933 pub fn cuKernelGetName(name: *mut *const ::std::os::raw::c_char, hfunc: CUkernel) -> CUresult;
7934}
7935extern "C" {
7936 #[doc = " \\brief Returns the offset and size of a kernel parameter in the device-side parameter layout\n\n Queries the kernel parameter at \\p paramIndex into \\p kernel's list of parameters, and returns\n in \\p paramOffset and \\p paramSize the offset and size, respectively, where the parameter\n will reside in the device-side parameter layout. This information can be used to update kernel\n node parameters from the device via ::cudaGraphKernelNodeSetParam() and\n ::cudaGraphKernelNodeUpdatesApply(). \\p paramIndex must be less than the number of parameters\n that \\p kernel takes. \\p paramSize can be set to NULL if only the parameter offset is desired.\n\n \\param kernel - The kernel to query\n \\param paramIndex - The parameter index to query\n \\param paramOffset - Returns the offset into the device-side parameter layout at which the parameter resides\n \\param paramSize - Optionally returns the size of the parameter in the device-side parameter layout\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\notefnerr\n\n \\sa ::cuFuncGetParamInfo"]
7937 pub fn cuKernelGetParamInfo(
7938 kernel: CUkernel,
7939 paramIndex: usize,
7940 paramOffset: *mut usize,
7941 paramSize: *mut usize,
7942 ) -> CUresult;
7943}
7944extern "C" {
7945 #[doc = " \\brief Gets free and total memory\n\n Returns in \\p *total the total amount of memory available to the the current context.\n Returns in \\p *free the amount of memory on the device that is free according to the OS.\n CUDA is not guaranteed to be able to allocate all of the memory that the OS reports as free.\n In a multi-tenet situation, free estimate returned is prone to race condition where\n a new allocation/free done by a different process or a different thread in the same\n process between the time when free memory was estimated and reported, will result in\n deviation in free value reported and actual free memory.\n\n The integrated GPU on Tegra shares memory with CPU and other component\n of the SoC. The free and total values returned by the API excludes\n the SWAP memory space maintained by the OS on some platforms.\n The OS may move some of the memory pages into swap area as the GPU or\n CPU allocate or access memory. See Tegra app note on how to calculate\n total and free memory on Tegra.\n\n \\param free - Returned free memory in bytes\n \\param total - Returned total memory 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 ::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, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaMemGetInfo"]
7946 pub fn cuMemGetInfo_v2(free: *mut usize, total: *mut usize) -> CUresult;
7947}
7948extern "C" {
7949 #[doc = " \\brief Allocates device memory\n\n Allocates \\p bytesize bytes of linear memory on the device and returns in\n \\p *dptr a pointer to the allocated memory. The allocated memory is suitably\n aligned for any kind of variable. The memory is not cleared. If \\p bytesize\n is 0, ::cuMemAlloc() returns ::CUDA_ERROR_INVALID_VALUE.\n\n \\param dptr - Returned device pointer\n \\param bytesize - Requested allocation size 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_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 ::cudaMalloc"]
7950 pub fn cuMemAlloc_v2(dptr: *mut CUdeviceptr, bytesize: usize) -> CUresult;
7951}
7952extern "C" {
7953 #[doc = " \\brief Allocates pitched device memory\n\n Allocates at least \\p WidthInBytes * \\p Height bytes of linear memory on\n the device and returns in \\p *dptr a pointer to the allocated memory. The\n function may pad the allocation to ensure that corresponding pointers in\n any given row will continue to meet the alignment requirements for\n coalescing as the address is updated from row to row. \\p ElementSizeBytes\n specifies the size of the largest reads and writes that will be performed\n on the memory range. \\p ElementSizeBytes may be 4, 8 or 16 (since coalesced\n memory transactions are not possible on other data sizes). If\n \\p ElementSizeBytes is smaller than the actual read/write size of a kernel,\n the kernel will run correctly, but possibly at reduced speed. The pitch\n returned in \\p *pPitch by ::cuMemAllocPitch() is the width in bytes of the\n allocation. The intended usage of pitch is as a separate parameter of the\n allocation, used to compute addresses within the 2D array. Given the row\n and column of an array element of type \\b T, the address is computed as:\n \\code\nT* pElement = (T*)((char*)BaseAddress + Row * Pitch) + Column;\n \\endcode\n\n The pitch returned by ::cuMemAllocPitch() is guaranteed to work with\n ::cuMemcpy2D() under all circumstances. For allocations of 2D arrays, it is\n recommended that programmers consider performing pitch allocations using\n ::cuMemAllocPitch(). Due to alignment restrictions in the hardware, this is\n especially true if the application will be performing 2D memory copies\n between different regions of device memory (whether linear memory or CUDA\n arrays).\n\n The byte alignment of the pitch returned by ::cuMemAllocPitch() is guaranteed\n to match or exceed the alignment requirement for texture binding with\n ::cuTexRefSetAddress2D().\n\n \\param dptr - Returned device pointer\n \\param pPitch - Returned pitch of allocation in bytes\n \\param WidthInBytes - Requested allocation width in bytes\n \\param Height - Requested allocation height in rows\n \\param ElementSizeBytes - Size of largest reads/writes for range\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 ::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 ::cudaMallocPitch"]
7954 pub fn cuMemAllocPitch_v2(
7955 dptr: *mut CUdeviceptr,
7956 pPitch: *mut usize,
7957 WidthInBytes: usize,
7958 Height: usize,
7959 ElementSizeBytes: ::std::os::raw::c_uint,
7960 ) -> CUresult;
7961}
7962extern "C" {
7963 #[doc = " \\brief Frees device memory\n\n Frees the memory space pointed to by \\p dptr, which must have been returned\n by a previous call to one of the following memory allocation APIs - ::cuMemAlloc(),\n ::cuMemAllocPitch(), ::cuMemAllocManaged(), ::cuMemAllocAsync(), ::cuMemAllocFromPoolAsync()\n\n Note - This API will not perform any implict synchronization when the pointer was allocated with\n ::cuMemAllocAsync or ::cuMemAllocFromPoolAsync. Callers must ensure that all accesses to these\n pointer have completed before invoking ::cuMemFree. For best performance and memory reuse, users\n should use ::cuMemFreeAsync to free memory allocated via the stream ordered memory allocator.\n For all other pointers, this API may perform implicit synchronization.\n\n \\param dptr - 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, ::cuMemAllocManaged, ::cuMemAllocAsync, ::cuMemAllocFromPoolAsync,\n ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned, ::cuMemcpy3D, ::cuMemcpy3DAsync,\n ::cuMemcpyAtoA, ::cuMemcpyAtoD, ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::cuMemcpyDtoA,\n ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync, ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA,\n ::cuMemcpyHtoAAsync, ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc, ::cuMemFreeAsync,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaFree"]
7964 pub fn cuMemFree_v2(dptr: CUdeviceptr) -> CUresult;
7965}
7966extern "C" {
7967 #[doc = " \\brief Get information on memory allocations\n\n Returns the base address in \\p *pbase and size in \\p *psize of the\n allocation by ::cuMemAlloc() or ::cuMemAllocPitch() that contains the input\n pointer \\p dptr. Both parameters \\p pbase and \\p psize are optional. If one\n of them is NULL, it is ignored.\n\n \\param pbase - Returned base address\n \\param psize - Returned size of device memory allocation\n \\param dptr - Device pointer to query\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_NOT_FOUND,\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, ::cuMemFreeHost,\n ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32"]
7968 pub fn cuMemGetAddressRange_v2(
7969 pbase: *mut CUdeviceptr,
7970 psize: *mut usize,
7971 dptr: CUdeviceptr,
7972 ) -> CUresult;
7973}
7974extern "C" {
7975 #[doc = " \\brief Allocates page-locked host memory\n\n Allocates \\p bytesize bytes of host memory that is page-locked and\n accessible to the device. The driver tracks the virtual memory ranges\n allocated with this function and automatically accelerates calls to\n functions such as ::cuMemcpy(). Since the memory can be accessed directly by\n the device, it can be read or written with much higher bandwidth than\n pageable memory obtained with functions such as ::malloc().\n\n On systems where ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES\n is true, ::cuMemAllocHost may not page-lock the allocated memory.\n\n Page-locking excessive amounts of memory with ::cuMemAllocHost() may degrade system\n performance, since it reduces the amount of memory available to the system\n for paging. As a result, this function is best used sparingly to allocate\n staging areas for data exchange between host and device.\n\n Note all host memory allocated using ::cuMemAllocHost() 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 The device pointer that may be used to access this host memory from those\n contexts is always equal to the returned host pointer \\p *pp.\n See \\ref CUDA_UNIFIED for additional details.\n\n \\param pp - Returned pointer to host memory\n \\param bytesize - Requested allocation size 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_OUT_OF_MEMORY\n \\notefnerr\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc,\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 ::cudaMallocHost"]
7976 pub fn cuMemAllocHost_v2(pp: *mut *mut ::std::os::raw::c_void, bytesize: usize) -> CUresult;
7977}
7978extern "C" {
7979 #[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"]
7980 pub fn cuMemFreeHost(p: *mut ::std::os::raw::c_void) -> CUresult;
7981}
7982extern "C" {
7983 #[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().\n\n On systems where ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES\n is true, ::cuMemHostAlloc may not page-lock the allocated memory.\n\n Page-locking excessive amounts of memory may degrade system performance,\n since it reduces the amount of memory available to the system for paging.\n As a result, this function is best used sparingly to allocate staging areas\n for data exchange between 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 pointer to host 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"]
7984 pub fn cuMemHostAlloc(
7985 pp: *mut *mut ::std::os::raw::c_void,
7986 bytesize: usize,
7987 Flags: ::std::os::raw::c_uint,
7988 ) -> CUresult;
7989}
7990extern "C" {
7991 #[doc = " \\brief Passes back device pointer of mapped pinned memory\n\n Passes back the device pointer \\p pdptr corresponding to the mapped, pinned\n host buffer \\p p allocated by ::cuMemHostAlloc.\n\n ::cuMemHostGetDevicePointer() will fail if the ::CU_MEMHOSTALLOC_DEVICEMAP\n flag was not specified at the time the memory was allocated, or if the\n function is called on a GPU that does not support mapped pinned memory.\n\n For devices that have a non-zero value for the device attribute\n ::CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, the memory\n can also be accessed from the device using the host pointer \\p p.\n The device pointer returned by ::cuMemHostGetDevicePointer() may or may not\n match the original host pointer \\p p and depends on the devices visible to the\n application. If all devices visible to the application have a non-zero value for the\n device attribute, the device pointer returned by ::cuMemHostGetDevicePointer()\n will match the original pointer \\p p. If any device visible to the application\n has a zero value for the device attribute, the device pointer returned by\n ::cuMemHostGetDevicePointer() will not match the original host pointer \\p p,\n but it will be suitable for use on all devices provided Unified Virtual Addressing\n is enabled. In such systems, it is valid to access the memory using either pointer\n on devices that have a non-zero value for the device attribute. Note however that\n such devices should access the memory using only one of the two pointers and not both.\n\n \\p Flags provides for future releases. For now, it must be set to 0.\n\n \\param pdptr - Returned device pointer\n \\param p - Host pointer\n \\param Flags - Options (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 ::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 ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaHostGetDevicePointer"]
7992 pub fn cuMemHostGetDevicePointer_v2(
7993 pdptr: *mut CUdeviceptr,
7994 p: *mut ::std::os::raw::c_void,
7995 Flags: ::std::os::raw::c_uint,
7996 ) -> CUresult;
7997}
7998extern "C" {
7999 #[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"]
8000 pub fn cuMemHostGetFlags(
8001 pFlags: *mut ::std::os::raw::c_uint,
8002 p: *mut ::std::os::raw::c_void,
8003 ) -> CUresult;
8004}
8005extern "C" {
8006 #[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 specified 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 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"]
8007 pub fn cuMemAllocManaged(
8008 dptr: *mut CUdeviceptr,
8009 bytesize: usize,
8010 flags: ::std::os::raw::c_uint,
8011 ) -> CUresult;
8012}
8013extern "C" {
8014 #[doc = " \\brief Registers a callback function to receive async notifications\n\n Registers \\p callbackFunc to receive async notifications.\n\n The \\p userData parameter is passed to the callback function at async notification time.\n Likewise, \\p callback is also passed to the callback function to distinguish between\n multiple registered callbacks.\n\n The callback function being registered should be designed to return quickly (~10ms).\n Any long running tasks should be queued for execution on an application thread.\n\n Callbacks may not call cuDeviceRegisterAsyncNotification or cuDeviceUnregisterAsyncNotification.\n Doing so will result in ::CUDA_ERROR_NOT_PERMITTED. Async notification callbacks execute\n in an undefined order and may be serialized.\n\n Returns in \\p *callback a handle representing the registered callback instance.\n\n \\param device - The device on which to register the callback\n \\param callbackFunc - The function to register as a callback\n \\param userData - A generic pointer to user data. This is passed into the callback function.\n \\param callback - A handle representing the registered callback instance\n\n \\return\n ::CUDA_SUCCESS\n ::CUDA_ERROR_NOT_SUPPORTED\n ::CUDA_ERROR_INVALID_DEVICE\n ::CUDA_ERROR_INVALID_VALUE\n ::CUDA_ERROR_NOT_PERMITTED\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa\n ::cuDeviceUnregisterAsyncNotification"]
8015 pub fn cuDeviceRegisterAsyncNotification(
8016 device: CUdevice,
8017 callbackFunc: CUasyncCallback,
8018 userData: *mut ::std::os::raw::c_void,
8019 callback: *mut CUasyncCallbackHandle,
8020 ) -> CUresult;
8021}
8022extern "C" {
8023 #[doc = " \\brief Unregisters an async notification callback\n\n Unregisters \\p callback so that the corresponding callback function will stop receiving\n async notifications.\n\n \\param device - The device from which to remove \\p callback.\n \\param callback - The callback instance to unregister from receiving async notifications.\n\n \\return\n ::CUDA_SUCCESS\n ::CUDA_ERROR_NOT_SUPPORTED\n ::CUDA_ERROR_INVALID_DEVICE\n ::CUDA_ERROR_INVALID_VALUE\n ::CUDA_ERROR_NOT_PERMITTED\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa\n ::cuDeviceRegisterAsyncNotification"]
8024 pub fn cuDeviceUnregisterAsyncNotification(
8025 device: CUdevice,
8026 callback: CUasyncCallbackHandle,
8027 ) -> CUresult;
8028}
8029extern "C" {
8030 #[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"]
8031 pub fn cuDeviceGetByPCIBusId(
8032 dev: *mut CUdevice,
8033 pciBusId: *const ::std::os::raw::c_char,
8034 ) -> CUresult;
8035}
8036extern "C" {
8037 #[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"]
8038 pub fn cuDeviceGetPCIBusId(
8039 pciBusId: *mut ::std::os::raw::c_char,
8040 len: ::std::os::raw::c_int,
8041 dev: CUdevice,
8042 ) -> CUresult;
8043}
8044extern "C" {
8045 #[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 supported for compatibility purposes\n but not recommended as it comes with performance cost.\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"]
8046 pub fn cuIpcGetEventHandle(pHandle: *mut CUipcEventHandle, event: CUevent) -> CUresult;
8047}
8048extern "C" {
8049 #[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 supported for compatibility purposes\n but not recommended as it comes with performance cost.\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"]
8050 pub fn cuIpcOpenEventHandle(phEvent: *mut CUevent, handle: CUipcEventHandle) -> CUresult;
8051}
8052extern "C" {
8053 #[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 supported for compatibility purposes\n but not recommended as it comes with performance cost.\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"]
8054 pub fn cuIpcGetMemHandle(pHandle: *mut CUipcMemHandle, dptr: CUdeviceptr) -> CUresult;
8055}
8056extern "C" {
8057 #[doc = " \\brief Opens an interprocess memory handle exported from another process\n and returns a device pointer usable in the local process.\n\n Maps memory exported from another process with ::cuIpcGetMemHandle into\n the current device address space. For contexts on different devices\n ::cuIpcOpenMemHandle can attempt to enable peer access between the\n devices as if the user called ::cuCtxEnablePeerAccess. This behavior is\n controlled by the ::CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS flag.\n ::cuDeviceCanAccessPeer can determine if a mapping is possible.\n\n Contexts that may open ::CUipcMemHandles are restricted in the following way.\n ::CUipcMemHandles from each ::CUdevice in a given process may only be opened\n by one ::CUcontext per ::CUdevice per other process.\n\n If the memory handle has already been opened by the current context, the\n reference count on the handle is incremented by 1 and the existing device pointer\n is returned.\n\n Memory returned from ::cuIpcOpenMemHandle must be freed with\n ::cuIpcCloseMemHandle.\n\n Calling ::cuMemFree on an exported memory region before calling\n ::cuIpcCloseMemHandle in the importing context will result in undefined\n 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 supported for compatibility purposes\n but not recommended as it comes with performance cost.\n Users can test their device for IPC functionality by calling\n ::cuapiDeviceGetAttribute with ::CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED\n\n \\param pdptr - Returned device pointer\n \\param handle - ::CUipcMemHandle to open\n \\param Flags - Flags for this operation. Must be specified as ::CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS\n\n \\returns\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_MAP_FAILED,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_TOO_MANY_PEERS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\note No guarantees are made about the address returned in \\p *pdptr.\n In particular, multiple processes may not receive the same address for the same \\p handle.\n\n \\sa\n ::cuMemAlloc,\n ::cuMemFree,\n ::cuIpcGetEventHandle,\n ::cuIpcOpenEventHandle,\n ::cuIpcGetMemHandle,\n ::cuIpcCloseMemHandle,\n ::cuCtxEnablePeerAccess,\n ::cuDeviceCanAccessPeer,\n ::cudaIpcOpenMemHandle"]
8058 pub fn cuIpcOpenMemHandle_v2(
8059 pdptr: *mut CUdeviceptr,
8060 handle: CUipcMemHandle,
8061 Flags: ::std::os::raw::c_uint,
8062 ) -> CUresult;
8063}
8064extern "C" {
8065 #[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 supported for compatibility purposes\n but not recommended as it comes with performance cost.\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"]
8066 pub fn cuIpcCloseMemHandle(dptr: CUdeviceptr) -> CUresult;
8067}
8068extern "C" {
8069 #[doc = " \\brief Registers an existing host memory range for use by CUDA\n\n Page-locks the memory range specified by \\p p and \\p bytesize and maps it\n for the device(s) as specified by \\p Flags. This memory range also is added\n to the same tracking mechanism as ::cuMemHostAlloc to automatically accelerate\n calls to functions such as ::cuMemcpyHtoD(). Since the memory can be accessed\n directly by the device, it can be read or written with much higher bandwidth\n than pageable memory that has not been registered. Page-locking excessive\n amounts of 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 register staging areas for data exchange between\n host and device.\n\n On systems where ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES\n is true, ::cuMemHostRegister will not page-lock the memory range specified\n by \\p ptr but only populate unpopulated pages.\n\n The \\p Flags parameter enables different options to be specified that\n affect the allocation, as follows.\n\n - ::CU_MEMHOSTREGISTER_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_MEMHOSTREGISTER_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_MEMHOSTREGISTER_IOMEMORY: The pointer is treated as pointing to some\n I/O memory space, e.g. the PCI Express resource of a 3rd party device.\n\n - ::CU_MEMHOSTREGISTER_READ_ONLY: The pointer is treated as pointing to memory\n that is considered read-only by the device. On platforms without\n ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, this flag is\n required in order to register memory mapped to the CPU as read-only. Support\n for the use of this flag can be queried from the device attribute\n ::CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED. Using this flag with\n a current context associated with a device that does not have this attribute\n set will cause ::cuMemHostRegister to error with CUDA_ERROR_NOT_SUPPORTED.\n\n All of these flags are orthogonal to one another: a developer may page-lock\n memory that is portable or mapped with no restrictions.\n\n The ::CU_MEMHOSTREGISTER_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_MEMHOSTREGISTER_PORTABLE flag.\n\n For devices that have a non-zero value for the device attribute\n ::CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, the memory\n can also be accessed from the device using the host pointer \\p p.\n The device pointer returned by ::cuMemHostGetDevicePointer() may or may not\n match the original host pointer \\p ptr and depends on the devices visible to the\n application. If all devices visible to the application have a non-zero value for the\n device attribute, the device pointer returned by ::cuMemHostGetDevicePointer()\n will match the original pointer \\p ptr. If any device visible to the application\n has a zero value for the device attribute, the device pointer returned by\n ::cuMemHostGetDevicePointer() will not match the original host pointer \\p ptr,\n but it will be suitable for use on all devices provided Unified Virtual Addressing\n is enabled. In such systems, it is valid to access the memory using either pointer\n on devices that have a non-zero value for the device attribute. Note however that\n such devices should access the memory using only of the two pointers and not both.\n\n The memory page-locked by this function must be unregistered with\n ::cuMemHostUnregister().\n\n \\param p - Host pointer to memory to page-lock\n \\param bytesize - Size in bytes of the address range to page-lock\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 ::CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa\n ::cuMemHostUnregister,\n ::cuMemHostGetFlags,\n ::cuMemHostGetDevicePointer,\n ::cudaHostRegister"]
8070 pub fn cuMemHostRegister_v2(
8071 p: *mut ::std::os::raw::c_void,
8072 bytesize: usize,
8073 Flags: ::std::os::raw::c_uint,
8074 ) -> CUresult;
8075}
8076extern "C" {
8077 #[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"]
8078 pub fn cuMemHostUnregister(p: *mut ::std::os::raw::c_void) -> CUresult;
8079}
8080extern "C" {
8081 #[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"]
8082 pub fn cuMemcpy(dst: CUdeviceptr, src: CUdeviceptr, ByteCount: usize) -> CUresult;
8083}
8084extern "C" {
8085 #[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"]
8086 pub fn cuMemcpyPeer(
8087 dstDevice: CUdeviceptr,
8088 dstContext: CUcontext,
8089 srcDevice: CUdeviceptr,
8090 srcContext: CUcontext,
8091 ByteCount: usize,
8092 ) -> CUresult;
8093}
8094extern "C" {
8095 #[doc = " \\brief Copies memory from Host to Device\n\n Copies from host memory to device memory. \\p dstDevice and \\p srcHost are\n the base addresses of the destination and source, respectively. \\p ByteCount\n specifies the number of bytes to copy.\n\n \\param dstDevice - Destination device pointer\n \\param srcHost - Source host 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, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaMemcpy,\n ::cudaMemcpyToSymbol"]
8096 pub fn cuMemcpyHtoD_v2(
8097 dstDevice: CUdeviceptr,
8098 srcHost: *const ::std::os::raw::c_void,
8099 ByteCount: usize,
8100 ) -> CUresult;
8101}
8102extern "C" {
8103 #[doc = " \\brief Copies memory from Device to Host\n\n Copies from device to host memory. \\p dstHost and \\p srcDevice specify the\n base pointers of the destination and source, respectively. \\p ByteCount\n specifies the number of bytes to copy.\n\n \\param dstHost - Destination host pointer\n \\param srcDevice - Source device 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, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaMemcpy,\n ::cudaMemcpyFromSymbol"]
8104 pub fn cuMemcpyDtoH_v2(
8105 dstHost: *mut ::std::os::raw::c_void,
8106 srcDevice: CUdeviceptr,
8107 ByteCount: usize,
8108 ) -> CUresult;
8109}
8110extern "C" {
8111 #[doc = " \\brief Copies memory from Device to Device\n\n Copies from device memory to device memory. \\p dstDevice and \\p srcDevice\n are the base pointers of the destination and source, respectively.\n \\p ByteCount specifies the number of bytes to copy.\n\n \\param dstDevice - Destination device pointer\n \\param srcDevice - Source device 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\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"]
8112 pub fn cuMemcpyDtoD_v2(
8113 dstDevice: CUdeviceptr,
8114 srcDevice: CUdeviceptr,
8115 ByteCount: usize,
8116 ) -> CUresult;
8117}
8118extern "C" {
8119 #[doc = " \\brief Copies memory from Device to Array\n\n Copies from device memory to a 1D CUDA array. \\p dstArray and \\p dstOffset\n specify the CUDA array handle and starting index of the destination data.\n \\p srcDevice specifies the base pointer of the source. \\p ByteCount\n specifies the number of bytes to copy.\n\n \\param dstArray - Destination array\n \\param dstOffset - Offset in bytes of destination array\n \\param srcDevice - Source device 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\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA, ::cuMemcpyAtoD,\n ::cuMemcpyAtoH, ::cuMemcpyAtoHAsync, ::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 ::cudaMemcpyToArray"]
8120 pub fn cuMemcpyDtoA_v2(
8121 dstArray: CUarray,
8122 dstOffset: usize,
8123 srcDevice: CUdeviceptr,
8124 ByteCount: usize,
8125 ) -> CUresult;
8126}
8127extern "C" {
8128 #[doc = " \\brief Copies memory from Array to Device\n\n Copies from one 1D CUDA array to device memory. \\p dstDevice specifies the\n base pointer of the destination and must be naturally aligned with the CUDA\n array elements. \\p srcArray and \\p srcOffset specify the CUDA array handle\n and the offset in bytes into the array where the copy is to begin.\n \\p ByteCount specifies the number of bytes to copy and must be evenly\n divisible by the array element size.\n\n \\param dstDevice - Destination device pointer\n \\param srcArray - Source array\n \\param srcOffset - Offset in bytes of source array\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 ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::cuMemcpyAtoA,\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 ::cudaMemcpyFromArray"]
8129 pub fn cuMemcpyAtoD_v2(
8130 dstDevice: CUdeviceptr,
8131 srcArray: CUarray,
8132 srcOffset: usize,
8133 ByteCount: usize,
8134 ) -> CUresult;
8135}
8136extern "C" {
8137 #[doc = " \\brief Copies memory from Host to Array\n\n Copies from host memory to a 1D CUDA array. \\p dstArray and \\p dstOffset\n specify the CUDA array handle and starting offset in bytes of the destination\n data. \\p pSrc specifies the base address of the source. \\p ByteCount specifies\n the number of bytes to copy.\n\n \\param dstArray - Destination array\n \\param dstOffset - Offset in bytes of destination array\n \\param srcHost - Source host 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, ::cuMemcpyDtoD, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::cuMemcpyHtoDAsync, ::cuMemFree, ::cuMemFreeHost,\n ::cuMemGetAddressRange, ::cuMemGetInfo, ::cuMemHostAlloc,\n ::cuMemHostGetDevicePointer, ::cuMemsetD2D8, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaMemcpyToArray"]
8138 pub fn cuMemcpyHtoA_v2(
8139 dstArray: CUarray,
8140 dstOffset: usize,
8141 srcHost: *const ::std::os::raw::c_void,
8142 ByteCount: usize,
8143 ) -> CUresult;
8144}
8145extern "C" {
8146 #[doc = " \\brief Copies memory from Array to Host\n\n Copies from one 1D CUDA array to host memory. \\p dstHost specifies the base\n pointer of the destination. \\p srcArray and \\p srcOffset specify the CUDA\n array handle and starting offset in bytes of the source data.\n \\p ByteCount specifies the number of bytes to copy.\n\n \\param dstHost - Destination device pointer\n \\param srcArray - Source array\n \\param srcOffset - Offset in bytes of source array\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 ::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 ::cudaMemcpyFromArray"]
8147 pub fn cuMemcpyAtoH_v2(
8148 dstHost: *mut ::std::os::raw::c_void,
8149 srcArray: CUarray,
8150 srcOffset: usize,
8151 ByteCount: usize,
8152 ) -> CUresult;
8153}
8154extern "C" {
8155 #[doc = " \\brief Copies memory from Array to Array\n\n Copies from one 1D CUDA array to another. \\p dstArray and \\p srcArray\n specify the handles of the destination and source CUDA arrays for the copy,\n respectively. \\p dstOffset and \\p srcOffset specify the destination and\n source offsets in bytes into the CUDA arrays. \\p ByteCount is the number of\n bytes to be copied. The size of the elements in the CUDA arrays need not be\n the same format, but the elements must be the same size; and count must be\n evenly divisible by that size.\n\n \\param dstArray - Destination array\n \\param dstOffset - Offset in bytes of destination array\n \\param srcArray - Source array\n \\param srcOffset - Offset in bytes of source array\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 ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::cuMemcpy3DAsync, ::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 ::cudaMemcpyArrayToArray"]
8156 pub fn cuMemcpyAtoA_v2(
8157 dstArray: CUarray,
8158 dstOffset: usize,
8159 srcArray: CUarray,
8160 srcOffset: usize,
8161 ByteCount: usize,
8162 ) -> CUresult;
8163}
8164extern "C" {
8165 #[doc = " \\brief Copies memory for 2D arrays\n\n Perform a 2D memory copy according to the parameters specified in \\p pCopy.\n The ::CUDA_MEMCPY2D structure is defined as:\n\n \\code\ntypedef struct CUDA_MEMCPY2D_st {\nunsigned int srcXInBytes, srcY;\nCUmemorytype srcMemoryType;\nconst void *srcHost;\nCUdeviceptr srcDevice;\nCUarray srcArray;\nunsigned int srcPitch;\n\nunsigned int dstXInBytes, dstY;\nCUmemorytype dstMemoryType;\nvoid *dstHost;\nCUdeviceptr dstDevice;\nCUarray dstArray;\nunsigned int dstPitch;\n\nunsigned int WidthInBytes;\nunsigned int Height;\n} CUDA_MEMCPY2D;\n \\endcode\n where:\n - ::srcMemoryType and ::dstMemoryType specify the type of memory of the\n source and destination, respectively; ::CUmemorytype_enum is defined as:\n\n \\code\ntypedef enum CUmemorytype_enum {\nCU_MEMORYTYPE_HOST = 0x01,\nCU_MEMORYTYPE_DEVICE = 0x02,\nCU_MEMORYTYPE_ARRAY = 0x03,\nCU_MEMORYTYPE_UNIFIED = 0x04\n} CUmemorytype;\n \\endcode\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::srcDevice and ::srcPitch\n specify the (unified virtual address space) base address of the source data\n and the bytes per row to apply. ::srcArray is ignored.\n This value may be used only if unified addressing is supported in the calling\n context.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_HOST, ::srcHost and ::srcPitch\n specify the (host) base address of the source data and the bytes per row to\n apply. ::srcArray is ignored.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_DEVICE, ::srcDevice and ::srcPitch\n specify the (device) base address of the source data and the bytes per row\n to apply. ::srcArray is ignored.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_ARRAY, ::srcArray specifies the\n handle of the source data. ::srcHost, ::srcDevice and ::srcPitch are\n ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_HOST, ::dstHost and ::dstPitch\n specify the (host) base address of the destination data and the bytes per\n row to apply. ::dstArray is ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::dstDevice and ::dstPitch\n specify the (unified virtual address space) base address of the source data\n and the bytes per row to apply. ::dstArray is ignored.\n This value may be used only if unified addressing is supported in the calling\n context.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_DEVICE, ::dstDevice and ::dstPitch\n specify the (device) base address of the destination data and the bytes per\n row to apply. ::dstArray is ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_ARRAY, ::dstArray specifies the\n handle of the destination data. ::dstHost, ::dstDevice and ::dstPitch are\n ignored.\n\n - ::srcXInBytes and ::srcY specify the base address of the source data for\n the copy.\n\n \\par\n For host pointers, the starting address is\n \\code\nvoid* Start = (void*)((char*)srcHost+srcY*srcPitch + srcXInBytes);\n \\endcode\n\n \\par\n For device pointers, the starting address is\n \\code\nCUdeviceptr Start = srcDevice+srcY*srcPitch+srcXInBytes;\n \\endcode\n\n \\par\n For CUDA arrays, ::srcXInBytes must be evenly divisible by the array\n element size.\n\n - ::dstXInBytes and ::dstY specify the base address of the destination data\n for the copy.\n\n \\par\n For host pointers, the base address is\n \\code\nvoid* dstStart = (void*)((char*)dstHost+dstY*dstPitch + dstXInBytes);\n \\endcode\n\n \\par\n For device pointers, the starting address is\n \\code\nCUdeviceptr dstStart = dstDevice+dstY*dstPitch+dstXInBytes;\n \\endcode\n\n \\par\n For CUDA arrays, ::dstXInBytes must be evenly divisible by the array\n element size.\n\n - ::WidthInBytes and ::Height specify the width (in bytes) and height of\n the 2D copy being performed.\n - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes +\n ::srcXInBytes, and ::dstPitch must be greater than or equal to\n ::WidthInBytes + dstXInBytes.\n\n \\par\n ::cuMemcpy2D() returns an error if any pitch is greater than the maximum\n allowed (::CU_DEVICE_ATTRIBUTE_MAX_PITCH). ::cuMemAllocPitch() passes back\n pitches that always work with ::cuMemcpy2D(). On intra-device memory copies\n (device to device, CUDA array to device, CUDA array to CUDA array),\n ::cuMemcpy2D() may fail for pitches not computed by ::cuMemAllocPitch().\n ::cuMemcpy2DUnaligned() does not have this restriction, but may run\n significantly slower in the cases where ::cuMemcpy2D() would have returned\n an error code.\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 ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::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 ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray,\n ::cudaMemcpy2DFromArray"]
8166 pub fn cuMemcpy2D_v2(pCopy: *const CUDA_MEMCPY2D) -> CUresult;
8167}
8168extern "C" {
8169 #[doc = " \\brief Copies memory for 2D arrays\n\n Perform a 2D memory copy according to the parameters specified in \\p pCopy.\n The ::CUDA_MEMCPY2D structure is defined as:\n\n \\code\ntypedef struct CUDA_MEMCPY2D_st {\nunsigned int srcXInBytes, srcY;\nCUmemorytype srcMemoryType;\nconst void *srcHost;\nCUdeviceptr srcDevice;\nCUarray srcArray;\nunsigned int srcPitch;\nunsigned int dstXInBytes, dstY;\nCUmemorytype dstMemoryType;\nvoid *dstHost;\nCUdeviceptr dstDevice;\nCUarray dstArray;\nunsigned int dstPitch;\nunsigned int WidthInBytes;\nunsigned int Height;\n} CUDA_MEMCPY2D;\n \\endcode\n where:\n - ::srcMemoryType and ::dstMemoryType specify the type of memory of the\n source and destination, respectively; ::CUmemorytype_enum is defined as:\n\n \\code\ntypedef enum CUmemorytype_enum {\nCU_MEMORYTYPE_HOST = 0x01,\nCU_MEMORYTYPE_DEVICE = 0x02,\nCU_MEMORYTYPE_ARRAY = 0x03,\nCU_MEMORYTYPE_UNIFIED = 0x04\n} CUmemorytype;\n \\endcode\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::srcDevice and ::srcPitch\n specify the (unified virtual address space) base address of the source data\n and the bytes per row to apply. ::srcArray is ignored.\n This value may be used only if unified addressing is supported in the calling\n context.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_HOST, ::srcHost and ::srcPitch\n specify the (host) base address of the source data and the bytes per row to\n apply. ::srcArray is ignored.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_DEVICE, ::srcDevice and ::srcPitch\n specify the (device) base address of the source data and the bytes per row\n to apply. ::srcArray is ignored.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_ARRAY, ::srcArray specifies the\n handle of the source data. ::srcHost, ::srcDevice and ::srcPitch are\n ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::dstDevice and ::dstPitch\n specify the (unified virtual address space) base address of the source data\n and the bytes per row to apply. ::dstArray is ignored.\n This value may be used only if unified addressing is supported in the calling\n context.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_HOST, ::dstHost and ::dstPitch\n specify the (host) base address of the destination data and the bytes per\n row to apply. ::dstArray is ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_DEVICE, ::dstDevice and ::dstPitch\n specify the (device) base address of the destination data and the bytes per\n row to apply. ::dstArray is ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_ARRAY, ::dstArray specifies the\n handle of the destination data. ::dstHost, ::dstDevice and ::dstPitch are\n ignored.\n\n - ::srcXInBytes and ::srcY specify the base address of the source data for\n the copy.\n\n \\par\n For host pointers, the starting address is\n \\code\nvoid* Start = (void*)((char*)srcHost+srcY*srcPitch + srcXInBytes);\n \\endcode\n\n \\par\n For device pointers, the starting address is\n \\code\nCUdeviceptr Start = srcDevice+srcY*srcPitch+srcXInBytes;\n \\endcode\n\n \\par\n For CUDA arrays, ::srcXInBytes must be evenly divisible by the array\n element size.\n\n - ::dstXInBytes and ::dstY specify the base address of the destination data\n for the copy.\n\n \\par\n For host pointers, the base address is\n \\code\nvoid* dstStart = (void*)((char*)dstHost+dstY*dstPitch + dstXInBytes);\n \\endcode\n\n \\par\n For device pointers, the starting address is\n \\code\nCUdeviceptr dstStart = dstDevice+dstY*dstPitch+dstXInBytes;\n \\endcode\n\n \\par\n For CUDA arrays, ::dstXInBytes must be evenly divisible by the array\n element size.\n\n - ::WidthInBytes and ::Height specify the width (in bytes) and height of\n the 2D copy being performed.\n - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes +\n ::srcXInBytes, and ::dstPitch must be greater than or equal to\n ::WidthInBytes + dstXInBytes.\n\n \\par\n ::cuMemcpy2D() returns an error if any pitch is greater than the maximum\n allowed (::CU_DEVICE_ATTRIBUTE_MAX_PITCH). ::cuMemAllocPitch() passes back\n pitches that always work with ::cuMemcpy2D(). On intra-device memory copies\n (device to device, CUDA array to device, CUDA array to CUDA array),\n ::cuMemcpy2D() may fail for pitches not computed by ::cuMemAllocPitch().\n ::cuMemcpy2DUnaligned() does not have this restriction, but may run\n significantly slower in the cases where ::cuMemcpy2D() would have returned\n an error code.\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 ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync,\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 ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray,\n ::cudaMemcpy2DFromArray"]
8170 pub fn cuMemcpy2DUnaligned_v2(pCopy: *const CUDA_MEMCPY2D) -> CUresult;
8171}
8172extern "C" {
8173 #[doc = " \\brief Copies memory for 3D arrays\n\n Perform a 3D memory copy according to the parameters specified in\n \\p pCopy. The ::CUDA_MEMCPY3D structure is defined as:\n\n \\code\ntypedef struct CUDA_MEMCPY3D_st {\n\nunsigned int srcXInBytes, srcY, srcZ;\nunsigned int srcLOD;\nCUmemorytype srcMemoryType;\nconst void *srcHost;\nCUdeviceptr srcDevice;\nCUarray srcArray;\nunsigned int srcPitch; // ignored when src is array\nunsigned int srcHeight; // ignored when src is array; may be 0 if Depth==1\n\nunsigned int dstXInBytes, dstY, dstZ;\nunsigned int dstLOD;\nCUmemorytype dstMemoryType;\nvoid *dstHost;\nCUdeviceptr dstDevice;\nCUarray dstArray;\nunsigned int dstPitch; // ignored when dst is array\nunsigned int dstHeight; // ignored when dst is array; may be 0 if Depth==1\n\nunsigned int WidthInBytes;\nunsigned int Height;\nunsigned int Depth;\n} CUDA_MEMCPY3D;\n \\endcode\n where:\n - ::srcMemoryType and ::dstMemoryType specify the type of memory of the\n source and destination, respectively; ::CUmemorytype_enum is defined as:\n\n \\code\ntypedef enum CUmemorytype_enum {\nCU_MEMORYTYPE_HOST = 0x01,\nCU_MEMORYTYPE_DEVICE = 0x02,\nCU_MEMORYTYPE_ARRAY = 0x03,\nCU_MEMORYTYPE_UNIFIED = 0x04\n} CUmemorytype;\n \\endcode\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::srcDevice and ::srcPitch\n specify the (unified virtual address space) base address of the source data\n and the bytes per row to apply. ::srcArray is ignored.\n This value may be used only if unified addressing is supported in the calling\n context.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_HOST, ::srcHost, ::srcPitch and\n ::srcHeight specify the (host) base address of the source data, the bytes\n per row, and the height of each 2D slice of the 3D array. ::srcArray is\n ignored.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_DEVICE, ::srcDevice, ::srcPitch and\n ::srcHeight specify the (device) base address of the source data, the bytes\n per row, and the height of each 2D slice of the 3D array. ::srcArray is\n ignored.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_ARRAY, ::srcArray specifies the\n handle of the source data. ::srcHost, ::srcDevice, ::srcPitch and\n ::srcHeight are ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::dstDevice and ::dstPitch\n specify the (unified virtual address space) base address of the source data\n and the bytes per row to apply. ::dstArray is ignored.\n This value may be used only if unified addressing is supported in the calling\n context.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_HOST, ::dstHost and ::dstPitch\n specify the (host) base address of the destination data, the bytes per row,\n and the height of each 2D slice of the 3D array. ::dstArray is ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_DEVICE, ::dstDevice and ::dstPitch\n specify the (device) base address of the destination data, the bytes per\n row, and the height of each 2D slice of the 3D array. ::dstArray is ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_ARRAY, ::dstArray specifies the\n handle of the destination data. ::dstHost, ::dstDevice, ::dstPitch and\n ::dstHeight are ignored.\n\n - ::srcXInBytes, ::srcY and ::srcZ specify the base address of the source\n data for the copy.\n\n \\par\n For host pointers, the starting address is\n \\code\nvoid* Start = (void*)((char*)srcHost+(srcZ*srcHeight+srcY)*srcPitch + srcXInBytes);\n \\endcode\n\n \\par\n For device pointers, the starting address is\n \\code\nCUdeviceptr Start = srcDevice+(srcZ*srcHeight+srcY)*srcPitch+srcXInBytes;\n \\endcode\n\n \\par\n For CUDA arrays, ::srcXInBytes must be evenly divisible by the array\n element size.\n\n - dstXInBytes, ::dstY and ::dstZ specify the base address of the\n destination data for the copy.\n\n \\par\n For host pointers, the base address is\n \\code\nvoid* dstStart = (void*)((char*)dstHost+(dstZ*dstHeight+dstY)*dstPitch + dstXInBytes);\n \\endcode\n\n \\par\n For device pointers, the starting address is\n \\code\nCUdeviceptr dstStart = dstDevice+(dstZ*dstHeight+dstY)*dstPitch+dstXInBytes;\n \\endcode\n\n \\par\n For CUDA arrays, ::dstXInBytes must be evenly divisible by the array\n element size.\n\n - ::WidthInBytes, ::Height and ::Depth specify the width (in bytes), height\n and depth of the 3D copy being performed.\n - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes +\n ::srcXInBytes, and ::dstPitch must be greater than or equal to\n ::WidthInBytes + dstXInBytes.\n - If specified, ::srcHeight must be greater than or equal to ::Height +\n ::srcY, and ::dstHeight must be greater than or equal to ::Height + ::dstY.\n\n \\par\n ::cuMemcpy3D() returns an error if any pitch is greater than the maximum\n allowed (::CU_DEVICE_ATTRIBUTE_MAX_PITCH).\n\n The ::srcLOD and ::dstLOD members of the ::CUDA_MEMCPY3D structure must be\n set to 0.\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 ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::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 ::cudaMemcpy3D"]
8174 pub fn cuMemcpy3D_v2(pCopy: *const CUDA_MEMCPY3D) -> CUresult;
8175}
8176extern "C" {
8177 #[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"]
8178 pub fn cuMemcpy3DPeer(pCopy: *const CUDA_MEMCPY3D_PEER) -> CUresult;
8179}
8180extern "C" {
8181 #[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"]
8182 pub fn cuMemcpyAsync(
8183 dst: CUdeviceptr,
8184 src: CUdeviceptr,
8185 ByteCount: usize,
8186 hStream: CUstream,
8187 ) -> CUresult;
8188}
8189extern "C" {
8190 #[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"]
8191 pub fn cuMemcpyPeerAsync(
8192 dstDevice: CUdeviceptr,
8193 dstContext: CUcontext,
8194 srcDevice: CUdeviceptr,
8195 srcContext: CUcontext,
8196 ByteCount: usize,
8197 hStream: CUstream,
8198 ) -> CUresult;
8199}
8200extern "C" {
8201 #[doc = " \\brief Copies memory from Host to Device\n\n Copies from host memory to device memory. \\p dstDevice and \\p srcHost are\n the base addresses of the destination and source, respectively. \\p ByteCount\n specifies the number of bytes to copy.\n\n \\param dstDevice - Destination device pointer\n \\param srcHost - Source host 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, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA, ::cuMemcpyHtoAAsync,\n ::cuMemcpyHtoD, ::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"]
8202 pub fn cuMemcpyHtoDAsync_v2(
8203 dstDevice: CUdeviceptr,
8204 srcHost: *const ::std::os::raw::c_void,
8205 ByteCount: usize,
8206 hStream: CUstream,
8207 ) -> CUresult;
8208}
8209extern "C" {
8210 #[doc = " \\brief Copies memory from Device to Host\n\n Copies from device to host memory. \\p dstHost and \\p srcDevice specify the\n base pointers of the destination and source, respectively. \\p ByteCount\n specifies the number of bytes to copy.\n\n \\param dstHost - Destination host pointer\n \\param srcDevice - Source device 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, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::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 ::cudaMemcpyFromSymbolAsync"]
8211 pub fn cuMemcpyDtoHAsync_v2(
8212 dstHost: *mut ::std::os::raw::c_void,
8213 srcDevice: CUdeviceptr,
8214 ByteCount: usize,
8215 hStream: CUstream,
8216 ) -> CUresult;
8217}
8218extern "C" {
8219 #[doc = " \\brief Copies memory from Device to Device\n\n Copies from device memory to device memory. \\p dstDevice and \\p srcDevice\n are the base pointers of the destination and source, respectively.\n \\p ByteCount specifies the number of bytes to copy.\n\n \\param dstDevice - Destination device pointer\n \\param srcDevice - Source device 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\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"]
8220 pub fn cuMemcpyDtoDAsync_v2(
8221 dstDevice: CUdeviceptr,
8222 srcDevice: CUdeviceptr,
8223 ByteCount: usize,
8224 hStream: CUstream,
8225 ) -> CUresult;
8226}
8227extern "C" {
8228 #[doc = " \\brief Copies memory from Host to Array\n\n Copies from host memory to a 1D CUDA array. \\p dstArray and \\p dstOffset\n specify the CUDA array handle and starting offset in bytes of the\n destination data. \\p srcHost specifies the base address of the source.\n \\p ByteCount specifies the number of bytes to copy.\n\n \\param dstArray - Destination array\n \\param dstOffset - Offset in bytes of destination array\n \\param srcHost - Source host 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, ::cuMemcpyDtoDAsync,\n ::cuMemcpyDtoH, ::cuMemcpyDtoHAsync, ::cuMemcpyHtoA,\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 ::cudaMemcpyToArrayAsync"]
8229 pub fn cuMemcpyHtoAAsync_v2(
8230 dstArray: CUarray,
8231 dstOffset: usize,
8232 srcHost: *const ::std::os::raw::c_void,
8233 ByteCount: usize,
8234 hStream: CUstream,
8235 ) -> CUresult;
8236}
8237extern "C" {
8238 #[doc = " \\brief Copies memory from Array to Host\n\n Copies from one 1D CUDA array to host memory. \\p dstHost specifies the base\n pointer of the destination. \\p srcArray and \\p srcOffset specify the CUDA\n array handle and starting offset in bytes of the source data.\n \\p ByteCount specifies the number of bytes to copy.\n\n \\param dstHost - Destination pointer\n \\param srcArray - Source array\n \\param srcOffset - Offset in bytes of source array\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, ::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,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemcpyFromArrayAsync"]
8239 pub fn cuMemcpyAtoHAsync_v2(
8240 dstHost: *mut ::std::os::raw::c_void,
8241 srcArray: CUarray,
8242 srcOffset: usize,
8243 ByteCount: usize,
8244 hStream: CUstream,
8245 ) -> CUresult;
8246}
8247extern "C" {
8248 #[doc = " \\brief Copies memory for 2D arrays\n\n Perform a 2D memory copy according to the parameters specified in \\p pCopy.\n The ::CUDA_MEMCPY2D structure is defined as:\n\n \\code\ntypedef struct CUDA_MEMCPY2D_st {\nunsigned int srcXInBytes, srcY;\nCUmemorytype srcMemoryType;\nconst void *srcHost;\nCUdeviceptr srcDevice;\nCUarray srcArray;\nunsigned int srcPitch;\nunsigned int dstXInBytes, dstY;\nCUmemorytype dstMemoryType;\nvoid *dstHost;\nCUdeviceptr dstDevice;\nCUarray dstArray;\nunsigned int dstPitch;\nunsigned int WidthInBytes;\nunsigned int Height;\n} CUDA_MEMCPY2D;\n \\endcode\n where:\n - ::srcMemoryType and ::dstMemoryType specify the type of memory of the\n source and destination, respectively; ::CUmemorytype_enum is defined as:\n\n \\code\ntypedef enum CUmemorytype_enum {\nCU_MEMORYTYPE_HOST = 0x01,\nCU_MEMORYTYPE_DEVICE = 0x02,\nCU_MEMORYTYPE_ARRAY = 0x03,\nCU_MEMORYTYPE_UNIFIED = 0x04\n} CUmemorytype;\n \\endcode\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_HOST, ::srcHost and ::srcPitch\n specify the (host) base address of the source data and the bytes per row to\n apply. ::srcArray is ignored.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::srcDevice and ::srcPitch\n specify the (unified virtual address space) base address of the source data\n and the bytes per row to apply. ::srcArray is ignored.\n This value may be used only if unified addressing is supported in the calling\n context.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_DEVICE, ::srcDevice and ::srcPitch\n specify the (device) base address of the source data and the bytes per row\n to apply. ::srcArray is ignored.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_ARRAY, ::srcArray specifies the\n handle of the source data. ::srcHost, ::srcDevice and ::srcPitch are\n ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::dstDevice and ::dstPitch\n specify the (unified virtual address space) base address of the source data\n and the bytes per row to apply. ::dstArray is ignored.\n This value may be used only if unified addressing is supported in the calling\n context.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_HOST, ::dstHost and ::dstPitch\n specify the (host) base address of the destination data and the bytes per\n row to apply. ::dstArray is ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_DEVICE, ::dstDevice and ::dstPitch\n specify the (device) base address of the destination data and the bytes per\n row to apply. ::dstArray is ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_ARRAY, ::dstArray specifies the\n handle of the destination data. ::dstHost, ::dstDevice and ::dstPitch are\n ignored.\n\n - ::srcXInBytes and ::srcY specify the base address of the source data for\n the copy.\n\n \\par\n For host pointers, the starting address is\n \\code\nvoid* Start = (void*)((char*)srcHost+srcY*srcPitch + srcXInBytes);\n \\endcode\n\n \\par\n For device pointers, the starting address is\n \\code\nCUdeviceptr Start = srcDevice+srcY*srcPitch+srcXInBytes;\n \\endcode\n\n \\par\n For CUDA arrays, ::srcXInBytes must be evenly divisible by the array\n element size.\n\n - ::dstXInBytes and ::dstY specify the base address of the destination data\n for the copy.\n\n \\par\n For host pointers, the base address is\n \\code\nvoid* dstStart = (void*)((char*)dstHost+dstY*dstPitch + dstXInBytes);\n \\endcode\n\n \\par\n For device pointers, the starting address is\n \\code\nCUdeviceptr dstStart = dstDevice+dstY*dstPitch+dstXInBytes;\n \\endcode\n\n \\par\n For CUDA arrays, ::dstXInBytes must be evenly divisible by the array\n element size.\n\n - ::WidthInBytes and ::Height specify the width (in bytes) and height of\n the 2D copy being performed.\n - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes +\n ::srcXInBytes, and ::dstPitch must be greater than or equal to\n ::WidthInBytes + dstXInBytes.\n - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes +\n ::srcXInBytes, and ::dstPitch must be greater than or equal to\n ::WidthInBytes + dstXInBytes.\n - If specified, ::srcHeight must be greater than or equal to ::Height +\n ::srcY, and ::dstHeight must be greater than or equal to ::Height + ::dstY.\n\n \\par\n ::cuMemcpy2DAsync() returns an error if any pitch is greater than the maximum\n allowed (::CU_DEVICE_ATTRIBUTE_MAX_PITCH). ::cuMemAllocPitch() passes back\n pitches that always work with ::cuMemcpy2D(). On intra-device memory copies\n (device to device, CUDA array to device, CUDA array to CUDA array),\n ::cuMemcpy2DAsync() may fail for pitches not computed by ::cuMemAllocPitch().\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 ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n \\note_async\n \\note_null_stream\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::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,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync"]
8249 pub fn cuMemcpy2DAsync_v2(pCopy: *const CUDA_MEMCPY2D, hStream: CUstream) -> CUresult;
8250}
8251extern "C" {
8252 #[doc = " \\brief Copies memory for 3D arrays\n\n Perform a 3D memory copy according to the parameters specified in\n \\p pCopy. The ::CUDA_MEMCPY3D structure is defined as:\n\n \\code\ntypedef struct CUDA_MEMCPY3D_st {\n\nunsigned int srcXInBytes, srcY, srcZ;\nunsigned int srcLOD;\nCUmemorytype srcMemoryType;\nconst void *srcHost;\nCUdeviceptr srcDevice;\nCUarray srcArray;\nunsigned int srcPitch; // ignored when src is array\nunsigned int srcHeight; // ignored when src is array; may be 0 if Depth==1\n\nunsigned int dstXInBytes, dstY, dstZ;\nunsigned int dstLOD;\nCUmemorytype dstMemoryType;\nvoid *dstHost;\nCUdeviceptr dstDevice;\nCUarray dstArray;\nunsigned int dstPitch; // ignored when dst is array\nunsigned int dstHeight; // ignored when dst is array; may be 0 if Depth==1\n\nunsigned int WidthInBytes;\nunsigned int Height;\nunsigned int Depth;\n} CUDA_MEMCPY3D;\n \\endcode\n where:\n - ::srcMemoryType and ::dstMemoryType specify the type of memory of the\n source and destination, respectively; ::CUmemorytype_enum is defined as:\n\n \\code\ntypedef enum CUmemorytype_enum {\nCU_MEMORYTYPE_HOST = 0x01,\nCU_MEMORYTYPE_DEVICE = 0x02,\nCU_MEMORYTYPE_ARRAY = 0x03,\nCU_MEMORYTYPE_UNIFIED = 0x04\n} CUmemorytype;\n \\endcode\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::srcDevice and ::srcPitch\n specify the (unified virtual address space) base address of the source data\n and the bytes per row to apply. ::srcArray is ignored.\n This value may be used only if unified addressing is supported in the calling\n context.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_HOST, ::srcHost, ::srcPitch and\n ::srcHeight specify the (host) base address of the source data, the bytes\n per row, and the height of each 2D slice of the 3D array. ::srcArray is\n ignored.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_DEVICE, ::srcDevice, ::srcPitch and\n ::srcHeight specify the (device) base address of the source data, the bytes\n per row, and the height of each 2D slice of the 3D array. ::srcArray is\n ignored.\n\n \\par\n If ::srcMemoryType is ::CU_MEMORYTYPE_ARRAY, ::srcArray specifies the\n handle of the source data. ::srcHost, ::srcDevice, ::srcPitch and\n ::srcHeight are ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_UNIFIED, ::dstDevice and ::dstPitch\n specify the (unified virtual address space) base address of the source data\n and the bytes per row to apply. ::dstArray is ignored.\n This value may be used only if unified addressing is supported in the calling\n context.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_HOST, ::dstHost and ::dstPitch\n specify the (host) base address of the destination data, the bytes per row,\n and the height of each 2D slice of the 3D array. ::dstArray is ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_DEVICE, ::dstDevice and ::dstPitch\n specify the (device) base address of the destination data, the bytes per\n row, and the height of each 2D slice of the 3D array. ::dstArray is ignored.\n\n \\par\n If ::dstMemoryType is ::CU_MEMORYTYPE_ARRAY, ::dstArray specifies the\n handle of the destination data. ::dstHost, ::dstDevice, ::dstPitch and\n ::dstHeight are ignored.\n\n - ::srcXInBytes, ::srcY and ::srcZ specify the base address of the source\n data for the copy.\n\n \\par\n For host pointers, the starting address is\n \\code\nvoid* Start = (void*)((char*)srcHost+(srcZ*srcHeight+srcY)*srcPitch + srcXInBytes);\n \\endcode\n\n \\par\n For device pointers, the starting address is\n \\code\nCUdeviceptr Start = srcDevice+(srcZ*srcHeight+srcY)*srcPitch+srcXInBytes;\n \\endcode\n\n \\par\n For CUDA arrays, ::srcXInBytes must be evenly divisible by the array\n element size.\n\n - dstXInBytes, ::dstY and ::dstZ specify the base address of the\n destination data for the copy.\n\n \\par\n For host pointers, the base address is\n \\code\nvoid* dstStart = (void*)((char*)dstHost+(dstZ*dstHeight+dstY)*dstPitch + dstXInBytes);\n \\endcode\n\n \\par\n For device pointers, the starting address is\n \\code\nCUdeviceptr dstStart = dstDevice+(dstZ*dstHeight+dstY)*dstPitch+dstXInBytes;\n \\endcode\n\n \\par\n For CUDA arrays, ::dstXInBytes must be evenly divisible by the array\n element size.\n\n - ::WidthInBytes, ::Height and ::Depth specify the width (in bytes), height\n and depth of the 3D copy being performed.\n - If specified, ::srcPitch must be greater than or equal to ::WidthInBytes +\n ::srcXInBytes, and ::dstPitch must be greater than or equal to\n ::WidthInBytes + dstXInBytes.\n - If specified, ::srcHeight must be greater than or equal to ::Height +\n ::srcY, and ::dstHeight must be greater than or equal to ::Height + ::dstY.\n\n \\par\n ::cuMemcpy3DAsync() returns an error if any pitch is greater than the maximum\n allowed (::CU_DEVICE_ATTRIBUTE_MAX_PITCH).\n\n The ::srcLOD and ::dstLOD members of the ::CUDA_MEMCPY3D structure must be\n set to 0.\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 ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n \\note_async\n \\note_null_stream\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::cuArrayGetDescriptor, ::cuMemAlloc, ::cuMemAllocHost,\n ::cuMemAllocPitch, ::cuMemcpy2D, ::cuMemcpy2DAsync, ::cuMemcpy2DUnaligned,\n ::cuMemcpy3D, ::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,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemcpy3DAsync"]
8253 pub fn cuMemcpy3DAsync_v2(pCopy: *const CUDA_MEMCPY3D, hStream: CUstream) -> CUresult;
8254}
8255extern "C" {
8256 #[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"]
8257 pub fn cuMemcpy3DPeerAsync(pCopy: *const CUDA_MEMCPY3D_PEER, hStream: CUstream) -> CUresult;
8258}
8259extern "C" {
8260 #[doc = " \\brief Initializes 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\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\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 ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemset"]
8261 pub fn cuMemsetD8_v2(dstDevice: CUdeviceptr, uc: ::std::os::raw::c_uchar, N: usize)
8262 -> CUresult;
8263}
8264extern "C" {
8265 #[doc = " \\brief Initializes 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\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\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, ::cuMemsetD16Async,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemset"]
8266 pub fn cuMemsetD16_v2(
8267 dstDevice: CUdeviceptr,
8268 us: ::std::os::raw::c_ushort,
8269 N: usize,
8270 ) -> CUresult;
8271}
8272extern "C" {
8273 #[doc = " \\brief Initializes 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\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\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,\n ::cuMemsetD32Async,\n ::cudaMemset"]
8274 pub fn cuMemsetD32_v2(dstDevice: CUdeviceptr, ui: ::std::os::raw::c_uint, N: usize)
8275 -> CUresult;
8276}
8277extern "C" {
8278 #[doc = " \\brief Initializes 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\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\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, ::cuMemsetD2D8Async,\n ::cuMemsetD2D16, ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async,\n ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemset2D"]
8279 pub fn cuMemsetD2D8_v2(
8280 dstDevice: CUdeviceptr,
8281 dstPitch: usize,
8282 uc: ::std::os::raw::c_uchar,
8283 Width: usize,
8284 Height: usize,
8285 ) -> CUresult;
8286}
8287extern "C" {
8288 #[doc = " \\brief Initializes 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\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\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 ::cuMemsetD2D16Async, ::cuMemsetD2D32, ::cuMemsetD2D32Async,\n ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemset2D"]
8289 pub fn cuMemsetD2D16_v2(
8290 dstDevice: CUdeviceptr,
8291 dstPitch: usize,
8292 us: ::std::os::raw::c_ushort,
8293 Width: usize,
8294 Height: usize,
8295 ) -> CUresult;
8296}
8297extern "C" {
8298 #[doc = " \\brief Initializes 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\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\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, ::cuMemsetD2D32Async,\n ::cuMemsetD8, ::cuMemsetD8Async, ::cuMemsetD16, ::cuMemsetD16Async,\n ::cuMemsetD32, ::cuMemsetD32Async,\n ::cudaMemset2D"]
8299 pub fn cuMemsetD2D32_v2(
8300 dstDevice: CUdeviceptr,
8301 dstPitch: usize,
8302 ui: ::std::os::raw::c_uint,
8303 Width: usize,
8304 Height: usize,
8305 ) -> CUresult;
8306}
8307extern "C" {
8308 #[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"]
8309 pub fn cuMemsetD8Async(
8310 dstDevice: CUdeviceptr,
8311 uc: ::std::os::raw::c_uchar,
8312 N: usize,
8313 hStream: CUstream,
8314 ) -> CUresult;
8315}
8316extern "C" {
8317 #[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"]
8318 pub fn cuMemsetD16Async(
8319 dstDevice: CUdeviceptr,
8320 us: ::std::os::raw::c_ushort,
8321 N: usize,
8322 hStream: CUstream,
8323 ) -> CUresult;
8324}
8325extern "C" {
8326 #[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"]
8327 pub fn cuMemsetD32Async(
8328 dstDevice: CUdeviceptr,
8329 ui: ::std::os::raw::c_uint,
8330 N: usize,
8331 hStream: CUstream,
8332 ) -> CUresult;
8333}
8334extern "C" {
8335 #[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"]
8336 pub fn cuMemsetD2D8Async(
8337 dstDevice: CUdeviceptr,
8338 dstPitch: usize,
8339 uc: ::std::os::raw::c_uchar,
8340 Width: usize,
8341 Height: usize,
8342 hStream: CUstream,
8343 ) -> CUresult;
8344}
8345extern "C" {
8346 #[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"]
8347 pub fn cuMemsetD2D16Async(
8348 dstDevice: CUdeviceptr,
8349 dstPitch: usize,
8350 us: ::std::os::raw::c_ushort,
8351 Width: usize,
8352 Height: usize,
8353 hStream: CUstream,
8354 ) -> CUresult;
8355}
8356extern "C" {
8357 #[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"]
8358 pub fn cuMemsetD2D32Async(
8359 dstDevice: CUdeviceptr,
8360 dstPitch: usize,
8361 ui: ::std::os::raw::c_uint,
8362 Width: usize,
8363 Height: usize,
8364 hStream: CUstream,
8365 ) -> CUresult;
8366}
8367extern "C" {
8368 #[doc = " \\brief Creates a 1D or 2D CUDA array\n\n Creates a CUDA array according to the ::CUDA_ARRAY_DESCRIPTOR structure\n \\p pAllocateArray and returns a handle to the new CUDA array in \\p *pHandle.\n The ::CUDA_ARRAY_DESCRIPTOR is defined as:\n\n \\code\ntypedef struct {\nunsigned int Width;\nunsigned int Height;\nCUarray_format Format;\nunsigned int NumChannels;\n} CUDA_ARRAY_DESCRIPTOR;\n \\endcode\n where:\n\n - \\p Width, and \\p Height are the width, and height of the CUDA array (in\n elements); the CUDA array is one-dimensional if height is 0, two-dimensional\n otherwise;\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 - \\p NumChannels specifies the number of packed components per CUDA array\n element; it may be 1, 2, or 4;\n\n Here are examples of CUDA array descriptions:\n\n Description for a CUDA array of 2048 floats:\n \\code\nCUDA_ARRAY_DESCRIPTOR desc;\ndesc.Format = CU_AD_FORMAT_FLOAT;\ndesc.NumChannels = 1;\ndesc.Width = 2048;\ndesc.Height = 1;\n \\endcode\n\n Description for a 64 x 64 CUDA array of floats:\n \\code\nCUDA_ARRAY_DESCRIPTOR desc;\ndesc.Format = CU_AD_FORMAT_FLOAT;\ndesc.NumChannels = 1;\ndesc.Width = 64;\ndesc.Height = 64;\n \\endcode\n\n Description for a \\p width x \\p height CUDA array of 64-bit, 4x16-bit\n float16's:\n \\code\nCUDA_ARRAY_DESCRIPTOR desc;\ndesc.Format = CU_AD_FORMAT_HALF;\ndesc.NumChannels = 4;\ndesc.Width = width;\ndesc.Height = height;\n \\endcode\n\n Description for a \\p width x \\p height CUDA array of 16-bit elements, each\n of which is two 8-bit unsigned chars:\n \\code\nCUDA_ARRAY_DESCRIPTOR arrayDesc;\ndesc.Format = CU_AD_FORMAT_UNSIGNED_INT8;\ndesc.NumChannels = 2;\ndesc.Width = width;\ndesc.Height = height;\n \\endcode\n\n \\param pHandle - Returned array\n \\param pAllocateArray - Array 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 ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor,\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, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaMallocArray"]
8369 pub fn cuArrayCreate_v2(
8370 pHandle: *mut CUarray,
8371 pAllocateArray: *const CUDA_ARRAY_DESCRIPTOR,
8372 ) -> CUresult;
8373}
8374extern "C" {
8375 #[doc = " \\brief Get a 1D or 2D CUDA array descriptor\n\n Returns in \\p *pArrayDescriptor a descriptor containing information on the\n format and dimensions of the CUDA array \\p hArray. It is useful for\n subroutines that have been passed a CUDA array, but need to know the CUDA\n array parameters for validation or other purposes.\n\n \\param pArrayDescriptor - Returned array descriptor\n \\param hArray - Array to get descriptor 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_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa ::cuArray3DCreate, ::cuArray3DGetDescriptor, ::cuArrayCreate,\n ::cuArrayDestroy, ::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 ::cudaArrayGetInfo"]
8376 pub fn cuArrayGetDescriptor_v2(
8377 pArrayDescriptor: *mut CUDA_ARRAY_DESCRIPTOR,
8378 hArray: CUarray,
8379 ) -> CUresult;
8380}
8381extern "C" {
8382 #[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"]
8383 pub fn cuArrayGetSparseProperties(
8384 sparseProperties: *mut CUDA_ARRAY_SPARSE_PROPERTIES,
8385 array: CUarray,
8386 ) -> CUresult;
8387}
8388extern "C" {
8389 #[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"]
8390 pub fn cuMipmappedArrayGetSparseProperties(
8391 sparseProperties: *mut CUDA_ARRAY_SPARSE_PROPERTIES,
8392 mipmap: CUmipmappedArray,
8393 ) -> CUresult;
8394}
8395extern "C" {
8396 #[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"]
8397 pub fn cuArrayGetMemoryRequirements(
8398 memoryRequirements: *mut CUDA_ARRAY_MEMORY_REQUIREMENTS,
8399 array: CUarray,
8400 device: CUdevice,
8401 ) -> CUresult;
8402}
8403extern "C" {
8404 #[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"]
8405 pub fn cuMipmappedArrayGetMemoryRequirements(
8406 memoryRequirements: *mut CUDA_ARRAY_MEMORY_REQUIREMENTS,
8407 mipmap: CUmipmappedArray,
8408 device: CUdevice,
8409 ) -> CUresult;
8410}
8411extern "C" {
8412 #[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"]
8413 pub fn cuArrayGetPlane(
8414 pPlaneArray: *mut CUarray,
8415 hArray: CUarray,
8416 planeIdx: ::std::os::raw::c_uint,
8417 ) -> CUresult;
8418}
8419extern "C" {
8420 #[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"]
8421 pub fn cuArrayDestroy(hArray: CUarray) -> CUresult;
8422}
8423extern "C" {
8424 #[doc = " \\brief Creates a 3D CUDA array\n\n Creates a CUDA array according to the ::CUDA_ARRAY3D_DESCRIPTOR structure\n \\p pAllocateArray and returns a handle to the new CUDA array in \\p *pHandle.\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 array is allocated if \\p Height and \\p Depth extents are both zero.\n - A 2D array is allocated if only \\p Depth extent is zero.\n - A 3D array is allocated if all three extents are non-zero.\n - A 1D layered CUDA 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 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 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 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 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 the CUDA array.\n If this flag is not set, ::cuSurfRefSetArray will fail when attempting to bind the CUDA array\n to a surface reference.\n - ::CUDA_ARRAY3D_CUBEMAP to enable creation of 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 array will be used for texture gather.\n Texture gather can only be performed on 2D CUDA 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_WIDTH refers to the device attribute\n ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH.\n\n Note that 2D CUDA arrays have different size requirements if the ::CUDA_ARRAY3D_TEXTURE_GATHER flag\n is set. \\p Width and \\p Height must not be greater than ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH\n and ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT respectively, in that case.\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_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_WIDTH), (1,TEXTURE2D_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 Here are examples of CUDA array descriptions:\n\n Description for a CUDA array of 2048 floats:\n \\code\nCUDA_ARRAY3D_DESCRIPTOR desc;\ndesc.Format = CU_AD_FORMAT_FLOAT;\ndesc.NumChannels = 1;\ndesc.Width = 2048;\ndesc.Height = 0;\ndesc.Depth = 0;\n \\endcode\n\n Description for a 64 x 64 CUDA array of floats:\n \\code\nCUDA_ARRAY3D_DESCRIPTOR desc;\ndesc.Format = CU_AD_FORMAT_FLOAT;\ndesc.NumChannels = 1;\ndesc.Width = 64;\ndesc.Height = 64;\ndesc.Depth = 0;\n \\endcode\n\n Description for a \\p width x \\p height x \\p depth CUDA array of 64-bit,\n 4x16-bit float16's:\n \\code\nCUDA_ARRAY3D_DESCRIPTOR desc;\ndesc.Format = CU_AD_FORMAT_HALF;\ndesc.NumChannels = 4;\ndesc.Width = width;\ndesc.Height = height;\ndesc.Depth = depth;\n \\endcode\n\n \\param pHandle - Returned array\n \\param pAllocateArray - 3D array 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 ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_UNKNOWN\n \\notefnerr\n\n \\sa ::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, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaMalloc3DArray"]
8425 pub fn cuArray3DCreate_v2(
8426 pHandle: *mut CUarray,
8427 pAllocateArray: *const CUDA_ARRAY3D_DESCRIPTOR,
8428 ) -> CUresult;
8429}
8430extern "C" {
8431 #[doc = " \\brief Get a 3D CUDA array descriptor\n\n Returns in \\p *pArrayDescriptor a descriptor containing information on the\n format and dimensions of the CUDA array \\p hArray. It is useful for\n subroutines that have been passed a CUDA array, but need to know the CUDA\n array parameters for validation or other purposes.\n\n This function may be called on 1D and 2D arrays, in which case the \\p Height\n and/or \\p Depth members of the descriptor struct will be set to 0.\n\n \\param pArrayDescriptor - Returned 3D array descriptor\n \\param hArray - 3D array to get descriptor 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_VALUE,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_CONTEXT_IS_DESTROYED\n \\notefnerr\n\n \\sa ::cuArray3DCreate, ::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, ::cuMemsetD2D16,\n ::cuMemsetD2D32, ::cuMemsetD8, ::cuMemsetD16, ::cuMemsetD32,\n ::cudaArrayGetInfo"]
8432 pub fn cuArray3DGetDescriptor_v2(
8433 pArrayDescriptor: *mut CUDA_ARRAY3D_DESCRIPTOR,
8434 hArray: CUarray,
8435 ) -> CUresult;
8436}
8437extern "C" {
8438 #[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"]
8439 pub fn cuMipmappedArrayCreate(
8440 pHandle: *mut CUmipmappedArray,
8441 pMipmappedArrayDesc: *const CUDA_ARRAY3D_DESCRIPTOR,
8442 numMipmapLevels: ::std::os::raw::c_uint,
8443 ) -> CUresult;
8444}
8445extern "C" {
8446 #[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"]
8447 pub fn cuMipmappedArrayGetLevel(
8448 pLevelArray: *mut CUarray,
8449 hMipmappedArray: CUmipmappedArray,
8450 level: ::std::os::raw::c_uint,
8451 ) -> CUresult;
8452}
8453extern "C" {
8454 #[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"]
8455 pub fn cuMipmappedArrayDestroy(hMipmappedArray: CUmipmappedArray) -> CUresult;
8456}
8457extern "C" {
8458 #[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 The address range must have been obtained by a prior call to either ::cuMemAllocHost or\n ::cuMemHostAlloc on Tegra.\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"]
8459 pub fn cuMemGetHandleForAddressRange(
8460 handle: *mut ::std::os::raw::c_void,
8461 dptr: CUdeviceptr,
8462 size: usize,
8463 handleType: CUmemRangeHandleType,
8464 flags: ::std::os::raw::c_ulonglong,
8465 ) -> CUresult;
8466}
8467extern "C" {
8468 #[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"]
8469 pub fn cuMemAddressReserve(
8470 ptr: *mut CUdeviceptr,
8471 size: usize,
8472 alignment: usize,
8473 addr: CUdeviceptr,
8474 flags: ::std::os::raw::c_ulonglong,
8475 ) -> CUresult;
8476}
8477extern "C" {
8478 #[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"]
8479 pub fn cuMemAddressFree(ptr: CUdeviceptr, size: usize) -> CUresult;
8480}
8481extern "C" {
8482 #[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 structure. 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 recipient 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 To create a CPU allocation targeting a specific host NUMA node, applications must\n set ::CUmemAllocationProp::CUmemLocation::type to ::CU_MEM_LOCATION_TYPE_HOST_NUMA and\n ::CUmemAllocationProp::CUmemLocation::id must specify the NUMA ID of the CPU.\n On systems where NUMA is not available ::CUmemAllocationProp::CUmemLocation::id must be set to 0.\n Specifying ::CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT or ::CU_MEM_LOCATION_TYPE_HOST as the\n ::CUmemLocation::type will result in ::CUDA_ERROR_INVALID_VALUE.\n\n Applications can set ::CUmemAllocationProp::requestedHandleTypes to\n ::CU_MEM_HANDLE_TYPE_FABRIC in order to create allocations suitable for sharing\n within an IMEX domain. An IMEX domain is either an OS instance or a group of securely\n connected OS instances using the NVIDIA IMEX daemon. An IMEX channel is a global resource\n within the IMEX domain that represents a logical entity that aims to provide fine grained\n accessibility control for the participating processes. When exporter and importer CUDA processes\n have been granted access to the same IMEX channel, they can securely share memory.\n If the allocating process does not have access setup for an IMEX channel, attempting to create\n a ::CUmemGenericAllocationHandle with ::CU_MEM_HANDLE_TYPE_FABRIC will result in ::CUDA_ERROR_NOT_PERMITTED.\n The nvidia-modprobe CLI provides more information regarding setting up of IMEX channels.\n\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"]
8483 pub fn cuMemCreate(
8484 handle: *mut CUmemGenericAllocationHandle,
8485 size: usize,
8486 prop: *const CUmemAllocationProp,
8487 flags: ::std::os::raw::c_ulonglong,
8488 ) -> CUresult;
8489}
8490extern "C" {
8491 #[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 recipient 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"]
8492 pub fn cuMemRelease(handle: CUmemGenericAllocationHandle) -> CUresult;
8493}
8494extern "C" {
8495 #[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 If \\p handle represents a multicast object, \\p ptr, \\p size and \\p offset must\n be aligned to the value returned by ::cuMulticastGetGranularity with the flag\n ::CU_MULTICAST_MINIMUM_GRANULARITY. For best performance however, it is\n recommended that \\p ptr, \\p size and \\p offset be aligned to the value\n returned by ::cuMulticastGetGranularity with the flag\n ::CU_MULTICAST_RECOMMENDED_GRANULARITY.\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"]
8496 pub fn cuMemMap(
8497 ptr: CUdeviceptr,
8498 size: usize,
8499 offset: usize,
8500 handle: CUmemGenericAllocationHandle,
8501 flags: ::std::os::raw::c_ulonglong,
8502 ) -> CUresult;
8503}
8504extern "C" {
8505 #[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"]
8506 pub fn cuMemMapArrayAsync(
8507 mapInfoList: *mut CUarrayMapInfo,
8508 count: ::std::os::raw::c_uint,
8509 hStream: CUstream,
8510 ) -> CUresult;
8511}
8512extern "C" {
8513 #[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"]
8514 pub fn cuMemUnmap(ptr: CUdeviceptr, size: usize) -> CUresult;
8515}
8516extern "C" {
8517 #[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 Users cannot specify ::CU_MEM_LOCATION_TYPE_HOST_NUMA accessibility for allocations created on with other location types.\n Note: When ::CUmemAccessDesc::CUmemLocation::type is ::CU_MEM_LOCATION_TYPE_HOST_NUMA, ::CUmemAccessDesc::CUmemLocation::id\n is ignored.\n When setting the access flags for a virtual address range mapping a multicast\n object, \\p ptr and \\p size must be aligned to the value returned by\n ::cuMulticastGetGranularity with the flag ::CU_MULTICAST_MINIMUM_GRANULARITY.\n For best performance however, it is recommended that \\p ptr and \\p size be\n aligned to the value returned by ::cuMulticastGetGranularity with the flag\n ::CU_MULTICAST_RECOMMENDED_GRANULARITY.\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"]
8518 pub fn cuMemSetAccess(
8519 ptr: CUdeviceptr,
8520 size: usize,
8521 desc: *const CUmemAccessDesc,
8522 count: usize,
8523 ) -> CUresult;
8524}
8525extern "C" {
8526 #[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"]
8527 pub fn cuMemGetAccess(
8528 flags: *mut ::std::os::raw::c_ulonglong,
8529 location: *const CUmemLocation,
8530 ptr: CUdeviceptr,
8531 ) -> CUresult;
8532}
8533extern "C" {
8534 #[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"]
8535 pub fn cuMemExportToShareableHandle(
8536 shareableHandle: *mut ::std::os::raw::c_void,
8537 handle: CUmemGenericAllocationHandle,
8538 handleType: CUmemAllocationHandleType,
8539 flags: ::std::os::raw::c_ulonglong,
8540 ) -> CUresult;
8541}
8542extern "C" {
8543 #[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 If \\p shHandleType is ::CU_MEM_HANDLE_TYPE_FABRIC and the importer process has not been\n granted access to the same IMEX channel as the exporter process, this API will error\n as ::CUDA_ERROR_NOT_PERMITTED.\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"]
8544 pub fn cuMemImportFromShareableHandle(
8545 handle: *mut CUmemGenericAllocationHandle,
8546 osHandle: *mut ::std::os::raw::c_void,
8547 shHandleType: CUmemAllocationHandleType,
8548 ) -> CUresult;
8549}
8550extern "C" {
8551 #[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"]
8552 pub fn cuMemGetAllocationGranularity(
8553 granularity: *mut usize,
8554 prop: *const CUmemAllocationProp,
8555 option: CUmemAllocationGranularity_flags,
8556 ) -> CUresult;
8557}
8558extern "C" {
8559 #[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"]
8560 pub fn cuMemGetAllocationPropertiesFromHandle(
8561 prop: *mut CUmemAllocationProp,
8562 handle: CUmemGenericAllocationHandle,
8563 ) -> CUresult;
8564}
8565extern "C" {
8566 #[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"]
8567 pub fn cuMemRetainAllocationHandle(
8568 handle: *mut CUmemGenericAllocationHandle,
8569 addr: *mut ::std::os::raw::c_void,
8570 ) -> CUresult;
8571}
8572extern "C" {
8573 #[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"]
8574 pub fn cuMemFreeAsync(dptr: CUdeviceptr, hStream: CUstream) -> CUresult;
8575}
8576extern "C" {
8577 #[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"]
8578 pub fn cuMemAllocAsync(dptr: *mut CUdeviceptr, bytesize: usize, hStream: CUstream) -> CUresult;
8579}
8580extern "C" {
8581 #[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"]
8582 pub fn cuMemPoolTrimTo(pool: CUmemoryPool, minBytesToKeep: usize) -> CUresult;
8583}
8584extern "C" {
8585 #[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"]
8586 pub fn cuMemPoolSetAttribute(
8587 pool: CUmemoryPool,
8588 attr: CUmemPool_attribute,
8589 value: *mut ::std::os::raw::c_void,
8590 ) -> CUresult;
8591}
8592extern "C" {
8593 #[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"]
8594 pub fn cuMemPoolGetAttribute(
8595 pool: CUmemoryPool,
8596 attr: CUmemPool_attribute,
8597 value: *mut ::std::os::raw::c_void,
8598 ) -> CUresult;
8599}
8600extern "C" {
8601 #[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"]
8602 pub fn cuMemPoolSetAccess(
8603 pool: CUmemoryPool,
8604 map: *const CUmemAccessDesc,
8605 count: usize,
8606 ) -> CUresult;
8607}
8608extern "C" {
8609 #[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"]
8610 pub fn cuMemPoolGetAccess(
8611 flags: *mut CUmemAccess_flags,
8612 memPool: CUmemoryPool,
8613 location: *mut CUmemLocation,
8614 ) -> CUresult;
8615}
8616extern "C" {
8617 #[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 To create a memory pool targeting a specific host NUMA node, applications must\n set ::CUmemPoolProps::CUmemLocation::type to ::CU_MEM_LOCATION_TYPE_HOST_NUMA and\n ::CUmemPoolProps::CUmemLocation::id must specify the NUMA ID of the host memory node.\n Specifying ::CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT or ::CU_MEM_LOCATION_TYPE_HOST as the\n ::CUmemPoolProps::CUmemLocation::type will result in ::CUDA_ERROR_INVALID_VALUE.\n By default, the pool's memory will be accessible from the device it is allocated on.\n In the case of pools created with ::CU_MEM_LOCATION_TYPE_HOST_NUMA, their default accessibility\n will be from the host CPU.\n Applications can control the maximum size of the pool by specifying a non-zero value for ::CUmemPoolProps::maxSize.\n If set to 0, the maximum size of the pool will default to a system dependent value.\n\n Applications can set ::CUmemPoolProps::handleTypes to ::CU_MEM_HANDLE_TYPE_FABRIC\n in order to create ::CUmemoryPool suitable for sharing within an IMEX domain.\n An IMEX domain is either an OS instance or a group of securely connected OS instances\n using the NVIDIA IMEX daemon. An IMEX channel is a global resource within the IMEX domain\n that represents a logical entity that aims to provide fine grained accessibility control\n for the participating processes. When exporter and importer CUDA processes have been\n granted access to the same IMEX channel, they can securely share memory.\n If the allocating process does not have access setup for an IMEX channel, attempting to export\n a ::CUmemoryPool with ::CU_MEM_HANDLE_TYPE_FABRIC will result in ::CUDA_ERROR_NOT_PERMITTED.\n The nvidia-modprobe CLI provides more information regarding setting up of IMEX channels.\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_PERMITTED\n ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa ::cuDeviceSetMemPool, ::cuDeviceGetMemPool, ::cuDeviceGetDefaultMemPool,\n ::cuMemAllocFromPoolAsync, ::cuMemPoolExportToShareableHandle"]
8618 pub fn cuMemPoolCreate(pool: *mut CUmemoryPool, poolProps: *const CUmemPoolProps) -> CUresult;
8619}
8620extern "C" {
8621 #[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"]
8622 pub fn cuMemPoolDestroy(pool: CUmemoryPool) -> CUresult;
8623}
8624extern "C" {
8625 #[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"]
8626 pub fn cuMemAllocFromPoolAsync(
8627 dptr: *mut CUdeviceptr,
8628 bytesize: usize,
8629 pool: CUmemoryPool,
8630 hStream: CUstream,
8631 ) -> CUresult;
8632}
8633extern "C" {
8634 #[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"]
8635 pub fn cuMemPoolExportToShareableHandle(
8636 handle_out: *mut ::std::os::raw::c_void,
8637 pool: CUmemoryPool,
8638 handleType: CUmemAllocationHandleType,
8639 flags: ::std::os::raw::c_ulonglong,
8640 ) -> CUresult;
8641}
8642extern "C" {
8643 #[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 If \\p handleType is ::CU_MEM_HANDLE_TYPE_FABRIC and the importer process has not been\n granted access to the same IMEX channel as the exporter process, this API will error\n as ::CUDA_ERROR_NOT_PERMITTED.\n\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"]
8644 pub fn cuMemPoolImportFromShareableHandle(
8645 pool_out: *mut CUmemoryPool,
8646 handle: *mut ::std::os::raw::c_void,
8647 handleType: CUmemAllocationHandleType,
8648 flags: ::std::os::raw::c_ulonglong,
8649 ) -> CUresult;
8650}
8651extern "C" {
8652 #[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"]
8653 pub fn cuMemPoolExportPointer(
8654 shareData_out: *mut CUmemPoolPtrExportData,
8655 ptr: CUdeviceptr,
8656 ) -> CUresult;
8657}
8658extern "C" {
8659 #[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"]
8660 pub fn cuMemPoolImportPointer(
8661 ptr_out: *mut CUdeviceptr,
8662 pool: CUmemoryPool,
8663 shareData: *mut CUmemPoolPtrExportData,
8664 ) -> CUresult;
8665}
8666extern "C" {
8667 #[doc = " \\brief Create a generic allocation handle representing a multicast object described by the given properties.\n\n This creates a multicast object as described by \\p prop. The number of\n participating devices is specified by ::CUmulticastObjectProp::numDevices.\n Devices can be added to the multicast object via ::cuMulticastAddDevice.\n All participating devices must be added to the multicast object before memory\n can be bound to it. Memory is bound to the multicast object via either\n ::cuMulticastBindMem or ::cuMulticastBindAddr, and can be unbound via\n ::cuMulticastUnbind. The total amount of memory that can be bound per device\n is specified by :CUmulticastObjectProp::size. This size must be a multiple of\n the value returned by ::cuMulticastGetGranularity with the flag\n ::CU_MULTICAST_GRANULARITY_MINIMUM. For best performance however, the size\n should be aligned to the value returned by ::cuMulticastGetGranularity with\n the flag ::CU_MULTICAST_GRANULARITY_RECOMMENDED.\n\n After all participating devices have been added, multicast objects can also\n be mapped to a device's virtual address space using the virtual memory\n management APIs (see ::cuMemMap and ::cuMemSetAccess). Multicast objects can\n also be shared with other processes by requesting a shareable handle via\n ::cuMemExportToShareableHandle. Note that the desired types of shareable\n handles must be specified in the bitmask ::CUmulticastObjectProp::handleTypes.\n Multicast objects can be released using the virtual memory management API\n ::cuMemRelease.\n\n \\param[out] mcHandle Value of handle returned.\n \\param[in] prop Properties of the multicast object to create.\n\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\n \\sa ::cuMulticastAddDevice, ::cuMulticastBindMem, ::cuMulticastBindAddr, ::cuMulticastUnbind\n \\sa ::cuMemCreate, ::cuMemRelease, ::cuMemExportToShareableHandle, ::cuMemImportFromShareableHandle"]
8668 pub fn cuMulticastCreate(
8669 mcHandle: *mut CUmemGenericAllocationHandle,
8670 prop: *const CUmulticastObjectProp,
8671 ) -> CUresult;
8672}
8673extern "C" {
8674 #[doc = " \\brief Associate a device to a multicast object.\n\n Associates a device to a multicast object. The added device will be a part of\n the multicast team of size specified by CUmulticastObjectProp::numDevices\n during ::cuMulticastCreate.\n The association of the device to the multicast object is permanent during\n the life time of the multicast object.\n All devices must be added to the multicast team before any memory can be\n bound to any device in the team. Any calls to ::cuMulticastBindMem or\n ::cuMulticastBindAddr will block until all devices have been added.\n Similarly all devices must be added to the multicast team before a virtual\n address range can be mapped to the multicast object. A call to ::cuMemMap\n will block until all devices have been added.\n\n \\param[in] mcHandle Handle representing a multicast object.\n \\param[in] dev Device that will be associated to the multicast\n object.\n\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\n \\sa ::cuMulticastCreate, ::cuMulticastBindMem, ::cuMulticastBindAddr"]
8675 pub fn cuMulticastAddDevice(mcHandle: CUmemGenericAllocationHandle, dev: CUdevice) -> CUresult;
8676}
8677extern "C" {
8678 #[doc = " \\brief Bind a memory allocation represented by a handle to a multicast object.\n\n Binds a memory allocation specified by \\p memHandle and created via\n ::cuMemCreate to a multicast object represented by \\p mcHandle and created\n via ::cuMulticastCreate. The intended \\p size of the bind, the offset in the\n multicast range \\p mcOffset as well as the offset in the memory \\p memOffset\n must be a multiple of the value returned by ::cuMulticastGetGranularity with\n the flag ::CU_MULTICAST_GRANULARITY_MINIMUM. For best performance however,\n \\p size, \\p mcOffset and \\p memOffset should be aligned to the granularity of\n the memory allocation(see ::cuMemGetAllocationGranularity) or to the value\n returned by ::cuMulticastGetGranularity with the flag\n ::CU_MULTICAST_GRANULARITY_RECOMMENDED.\n\n The \\p size + \\p memOffset cannot be larger than the size of the allocated\n memory. Similarly the \\p size + \\p mcOffset cannot be larger than the size\n of the multicast object.\n The memory allocation must have beeen created on one of the devices\n that was added to the multicast team via ::cuMulticastAddDevice.\n Externally shareable as well as imported multicast objects can be bound only\n to externally shareable memory.\n Note that this call will return CUDA_ERROR_OUT_OF_MEMORY if there are\n insufficient resources required to perform the bind. This call may also\n return CUDA_ERROR_SYSTEM_NOT_READY if the necessary system software is not\n initialized or running.\n\n \\param[in] mcHandle Handle representing a multicast object.\n \\param[in] mcOffset Offset into the multicast object for attachment.\n \\param[in] memHandle Handle representing a memory allocation.\n \\param[in] memOffset Offset into the memory for attachment.\n \\param[in] size Size of the memory that will be bound to the\n multicast object.\n \\param[in] flags Flags for future use, must be zero for now.\n\n \\return\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 ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_SYSTEM_NOT_READY\n\n \\sa ::cuMulticastCreate, ::cuMulticastAddDevice, ::cuMemCreate"]
8679 pub fn cuMulticastBindMem(
8680 mcHandle: CUmemGenericAllocationHandle,
8681 mcOffset: usize,
8682 memHandle: CUmemGenericAllocationHandle,
8683 memOffset: usize,
8684 size: usize,
8685 flags: ::std::os::raw::c_ulonglong,
8686 ) -> CUresult;
8687}
8688extern "C" {
8689 #[doc = " \\brief Bind a memory allocation represented by a virtual address to a multicast object.\n\n Binds a memory allocation specified by its mapped address \\p memptr to a\n multicast object represented by \\p mcHandle.\n The memory must have been allocated via ::cuMemCreate or ::cudaMallocAsync.\n The intended \\p size of the bind, the offset in the multicast range\n \\p mcOffset and \\p memptr must be a multiple of the value returned by\n ::cuMulticastGetGranularity with the flag ::CU_MULTICAST_GRANULARITY_MINIMUM.\n For best performance however, \\p size, \\p mcOffset and \\p memptr should be\n aligned to the value returned by ::cuMulticastGetGranularity with the flag\n ::CU_MULTICAST_GRANULARITY_RECOMMENDED.\n\n The \\p size cannot be larger than the size of the allocated memory.\n Similarly the \\p size + \\p mcOffset cannot be larger than the total size\n of the multicast object.\n The memory allocation must have beeen created on one of the devices\n that was added to the multicast team via ::cuMulticastAddDevice.\n Externally shareable as well as imported multicast objects can be bound only\n to externally shareable memory.\n Note that this call will return CUDA_ERROR_OUT_OF_MEMORY if there are\n insufficient resources required to perform the bind. This call may also\n return CUDA_ERROR_SYSTEM_NOT_READY if the necessary system software is not\n initialized or running.\n\n \\param[in] mcHandle Handle representing a multicast object.\n \\param[in] mcOffset Offset into multicast va range for attachment.\n \\param[in] memptr Virtual address of the memory allocation.\n \\param[in] size Size of memory that will be bound to the\n multicast object.\n \\param[in] flags Flags for future use, must be zero now.\n\n \\return\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 ::CUDA_ERROR_OUT_OF_MEMORY,\n ::CUDA_ERROR_SYSTEM_NOT_READY\n\n \\sa ::cuMulticastCreate, ::cuMulticastAddDevice, ::cuMemCreate"]
8690 pub fn cuMulticastBindAddr(
8691 mcHandle: CUmemGenericAllocationHandle,
8692 mcOffset: usize,
8693 memptr: CUdeviceptr,
8694 size: usize,
8695 flags: ::std::os::raw::c_ulonglong,
8696 ) -> CUresult;
8697}
8698extern "C" {
8699 #[doc = " \\brief Unbind any memory allocations bound to a multicast object at a given offset and upto a given size.\n\n Unbinds any memory allocations hosted on \\p dev and bound to a multicast\n object at \\p mcOffset and upto a given \\p size.\n The intended \\p size of the unbind and the offset in the multicast range\n ( \\p mcOffset ) must be a multiple of the value returned by\n ::cuMulticastGetGranularity flag ::CU_MULTICAST_GRANULARITY_MINIMUM.\n The \\p size + \\p mcOffset cannot be larger than the total size of the\n multicast object.\n\n \\note\n Warning:\n The \\p mcOffset and the \\p size must match the corresponding values specified\n during the bind call. Any other values may result in undefined behavior.\n\n \\param[in] mcHandle Handle representing a multicast object.\n \\param[in] dev Device that hosts the memory allocation.\n \\param[in] mcOffset Offset into the multicast object.\n \\param[in] size Desired size to unbind.\n\n \\return\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 ::cuMulticastBindMem, ::cuMulticastBindAddr"]
8700 pub fn cuMulticastUnbind(
8701 mcHandle: CUmemGenericAllocationHandle,
8702 dev: CUdevice,
8703 mcOffset: usize,
8704 size: usize,
8705 ) -> CUresult;
8706}
8707extern "C" {
8708 #[doc = " \\brief Calculates either the minimal or recommended granularity for multicast object\n\n Calculates either the minimal or recommended granularity for a given set of\n multicast object properties and returns it in granularity. This granularity\n can be used as a multiple for size, bind offsets and address mappings of the\n multicast object.\n\n \\param[out] granularity Returned granularity.\n \\param[in] prop Properties of the multicast object.\n \\param[in] option Determines which granularity to return.\n\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 ::cuMulticastCreate, ::cuMulticastBindMem, ::cuMulticastBindAddr, ::cuMulticastUnbind"]
8709 pub fn cuMulticastGetGranularity(
8710 granularity: *mut usize,
8711 prop: *const CUmulticastObjectProp,
8712 option: CUmulticastGranularity_flags,
8713 ) -> CUresult;
8714}
8715extern "C" {
8716 #[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\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"]
8717 pub fn cuPointerGetAttribute(
8718 data: *mut ::std::os::raw::c_void,
8719 attribute: CUpointer_attribute,
8720 ptr: CUdeviceptr,
8721 ) -> CUresult;
8722}
8723extern "C" {
8724 #[doc = " \\brief Prefetches memory to the specified destination device\n\n Note there is a later version of this API, ::cuMemPrefetchAsync_v2. It will\n supplant this version in 13.0, which is retained for minor version compatibility.\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 or it may also refer to system-allocated memory on systems with non-zero\n CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS.\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, ::cuMemPrefetchAsync\n ::cudaMemPrefetchAsync_v2"]
8725 pub fn cuMemPrefetchAsync(
8726 devPtr: CUdeviceptr,
8727 count: usize,
8728 dstDevice: CUdevice,
8729 hStream: CUstream,
8730 ) -> CUresult;
8731}
8732extern "C" {
8733 #[doc = " \\brief Prefetches memory to the specified destination location\n\n Prefetches memory to the specified destination location. \\p devPtr is the\n base device pointer of the memory to be prefetched and \\p location specifies the\n destination location. \\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 Specifying ::CU_MEM_LOCATION_TYPE_DEVICE for ::CUmemLocation::type will prefetch memory to GPU\n specified by device ordinal ::CUmemLocation::id which must have non-zero value for the device attribute\n ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. Additionally, \\p hStream must be associated with a device\n that has a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS.\n Specifying ::CU_MEM_LOCATION_TYPE_HOST as ::CUmemLocation::type will prefetch data to host memory.\n Applications can request prefetching memory to a specific host NUMA node by specifying\n ::CU_MEM_LOCATION_TYPE_HOST_NUMA for ::CUmemLocation::type and a valid host NUMA node id in ::CUmemLocation::id\n Users can also request prefetching memory to the host NUMA node closest to the current thread's CPU by specifying\n ::CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT for ::CUmemLocation::type. Note when ::CUmemLocation::type is etiher\n ::CU_MEM_LOCATION_TYPE_HOST OR ::CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT, ::CUmemLocation::id will be ignored.\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 the destination location. 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 destination location.\n If however the destination location is a host NUMA node, then any pages of that subset\n that are already in another host NUMA node will be transferred to the destination.\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 location even if \\p location 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 flags - flags for future use, must be zero now.\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, ::cuMemPrefetchAsync\n ::cudaMemPrefetchAsync_v2"]
8734 pub fn cuMemPrefetchAsync_v2(
8735 devPtr: CUdeviceptr,
8736 count: usize,
8737 location: CUmemLocation,
8738 flags: ::std::os::raw::c_uint,
8739 hStream: CUstream,
8740 ) -> CUresult;
8741}
8742extern "C" {
8743 #[doc = " \\brief Advise about the usage of a given memory range\n\n Note there is a later version of this API, ::cuMemAdvise_v2. It will\n supplant this version in 13.0, which is retained for minor version compatibility.\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.\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, ::cuMemAdvise_v2\n ::cudaMemAdvise"]
8744 pub fn cuMemAdvise(
8745 devPtr: CUdeviceptr,
8746 count: usize,
8747 advice: CUmem_advise,
8748 device: CUdevice,
8749 ) -> CUresult;
8750}
8751extern "C" {
8752 #[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 or ::cuMemPrefetchAsync_v2 is called on this region, it will create a read-only copy of the data on the destination processor.\n If the target location for ::cuMemPrefetchAsync_v2 is a host NUMA node and a read-only copy already exists on\n another host NUMA node, that copy will be migrated to the targeted host NUMA node.\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. If the writing processor is the CPU and the preferred location of\n the page is a host NUMA node, then the page will also be migrated to that host NUMA node. The \\p location 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 Note: The \\p location argument is ignored for this advice.\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 location. When ::CUmemLocation::type is ::CU_MEM_LOCATION_TYPE_HOST,\n ::CUmemLocation::id is ignored and the preferred location is set to be host memory. To set the preferred location\n to a specific host NUMA node, applications must set ::CUmemLocation::type to ::CU_MEM_LOCATION_TYPE_HOST_NUMA and\n ::CUmemLocation::id must specify the NUMA ID of the host NUMA node. If ::CUmemLocation::type is set to ::CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT,\n ::CUmemLocation::id will be ignored and the the host NUMA node closest to the calling thread's CPU will be used as the preferred location.\n If ::CUmemLocation::type is a ::CU_MEM_LOCATION_TYPE_DEVICE, then ::CUmemLocation::id must be a valid device ordinal\n and the device must have a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS.\n Setting the preferred location 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 location will not result in a read-only copy being created on that procesor 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, and ::CUmemLocation::type is CU_MEM_LOCATION_TYPE_DEVICE\n then ::CUmemLocation::id must be a valid device that has a non-zero alue for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS.\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. The \\p location argument is ignored for this advice.\n\n - ::CU_MEM_ADVISE_SET_ACCESSED_BY: This advice implies that the data will be accessed by processor \\p location.\n The ::CUmemLocation::type must be either ::CU_MEM_LOCATION_TYPE_DEVICE with ::CUmemLocation::id representing a valid device\n ordinal or ::CU_MEM_LOCATION_TYPE_HOST and ::CUmemLocation::id will be ignored. All other location types are invalid.\n If ::CUmemLocation::id is a GPU, then 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 location, 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, and ::CUmemLocation::type is ::CU_MEM_LOCATION_TYPE_DEVICE\n then device in ::CUmemLocation::id must have a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS.\n Additionally, if ::CUmemLocation::id has 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 location 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, and ::CUmemLocation::type is ::CU_MEM_LOCATION_TYPE_DEVICE\n then device in ::CUmemLocation::id must have a non-zero value for the device attribute ::CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS.\n Additionally, if ::CUmemLocation::id has 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 location - location 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, ::cuMemAdvise\n ::cudaMemAdvise"]
8753 pub fn cuMemAdvise_v2(
8754 devPtr: CUdeviceptr,
8755 count: usize,
8756 advice: CUmem_advise,
8757 location: CUmemLocation,
8758 ) -> CUresult;
8759}
8760extern "C" {
8761 #[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 application 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 - ::CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE: If this attribute is specified, \\p data will be\n interpreted as a ::CUmemLocationType, and \\p dataSize must be sizeof(CUmemLocationType). The ::CUmemLocationType returned will be\n ::CU_MEM_LOCATION_TYPE_DEVICE if all pages in the memory range have the same GPU as their preferred location, or ::CUmemLocationType\n will be ::CU_MEM_LOCATION_TYPE_HOST if all pages in the memory range have the CPU as their preferred location, or it will be ::CU_MEM_LOCATION_TYPE_HOST_NUMA\n if all the pages in the memory range have the same host NUMA node ID as their preferred location or it will be ::CU_MEM_LOCATION_TYPE_INVALID\n if either all the pages don't have the same preferred location or some of the pages don't have a preferred location at all.\n Note that the actual location type of the pages in the memory range at the time of the query may be different from the preferred location type.\n - ::CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID: If this attribute is specified, \\p data will be\n interpreted as a 32-bit integer, and \\p dataSize must be 4. If the ::CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE query for the same address range\n returns ::CU_MEM_LOCATION_TYPE_DEVICE, it will be a valid device ordinal or if it returns ::CU_MEM_LOCATION_TYPE_HOST_NUMA, it will be a valid host NUMA node ID\n or if it returns any other location type, the id should be ignored.\n - ::CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE: If this attribute is specified, \\p data will be\n interpreted as a ::CUmemLocationType, and \\p dataSize must be sizeof(CUmemLocationType). The result returned will be the last location\n to which all pages in the memory range were prefetched explicitly via ::cuMemPrefetchAsync. The ::CUmemLocationType returned\n will be ::CU_MEM_LOCATION_TYPE_DEVICE if the last prefetch location was a GPU or ::CU_MEM_LOCATION_TYPE_HOST if it was the CPU or ::CU_MEM_LOCATION_TYPE_HOST_NUMA if\n the last prefetch location was a specific host NUMA node. If any page in the memory range was never explicitly prefetched or if all pages were not\n prefetched to the same location, ::CUmemLocationType will be ::CU_MEM_LOCATION_TYPE_INVALID.\n Note that this simply returns the last location type that the application 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 - ::CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID: If this attribute is specified, \\p data will be\n interpreted as a 32-bit integer, and \\p dataSize must be 4. If the ::CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE query for the same address range\n returns ::CU_MEM_LOCATION_TYPE_DEVICE, it will be a valid device ordinal or if it returns ::CU_MEM_LOCATION_TYPE_HOST_NUMA, it will be a valid host NUMA node ID\n or if it returns any other location type, the id should be ignored.\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"]
8762 pub fn cuMemRangeGetAttribute(
8763 data: *mut ::std::os::raw::c_void,
8764 dataSize: usize,
8765 attribute: CUmem_range_attribute,
8766 devPtr: CUdeviceptr,
8767 count: usize,
8768 ) -> CUresult;
8769}
8770extern "C" {
8771 #[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 - ::CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE\n - ::CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID\n - ::CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE\n - ::CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID\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"]
8772 pub fn cuMemRangeGetAttributes(
8773 data: *mut *mut ::std::os::raw::c_void,
8774 dataSizes: *mut usize,
8775 attributes: *mut CUmem_range_attribute,
8776 numAttributes: usize,
8777 devPtr: CUdeviceptr,
8778 count: usize,
8779 ) -> CUresult;
8780}
8781extern "C" {
8782 #[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"]
8783 pub fn cuPointerSetAttribute(
8784 value: *const ::std::os::raw::c_void,
8785 attribute: CUpointer_attribute,
8786 ptr: CUdeviceptr,
8787 ) -> CUresult;
8788}
8789extern "C" {
8790 #[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"]
8791 pub fn cuPointerGetAttributes(
8792 numAttributes: ::std::os::raw::c_uint,
8793 attributes: *mut CUpointer_attribute,
8794 data: *mut *mut ::std::os::raw::c_void,
8795 ptr: CUdeviceptr,
8796 ) -> CUresult;
8797}
8798extern "C" {
8799 #[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 ::cuGreenCtxStreamCreate,\n ::cuStreamGetPriority,\n ::cuStreamGetFlags,\n ::cuStreamWaitEvent,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cudaStreamCreate,\n ::cudaStreamCreateWithFlags"]
8800 pub fn cuStreamCreate(phStream: *mut CUstream, Flags: ::std::os::raw::c_uint) -> CUresult;
8801}
8802extern "C" {
8803 #[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 affects the scheduling priority of work in the stream. Priorities provide a\n hint to preferentially run work with higher priority when possible, but do\n not preempt already-running work or provide any other functional guarantee on\n execution order.\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 ::cuGreenCtxStreamCreate,\n ::cuStreamGetPriority,\n ::cuCtxGetStreamPriorityRange,\n ::cuStreamGetFlags,\n ::cuStreamWaitEvent,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cudaStreamCreateWithPriority"]
8804 pub fn cuStreamCreateWithPriority(
8805 phStream: *mut CUstream,
8806 flags: ::std::os::raw::c_uint,
8807 priority: ::std::os::raw::c_int,
8808 ) -> CUresult;
8809}
8810extern "C" {
8811 #[doc = " \\brief Query the priority of a given stream\n\n Query the priority of a stream created using ::cuStreamCreate, ::cuStreamCreateWithPriority or ::cuGreenCtxStreamCreate\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 ::cuGreenCtxStreamCreate,\n ::cuCtxGetStreamPriorityRange,\n ::cuStreamGetFlags,\n ::cudaStreamGetPriority"]
8812 pub fn cuStreamGetPriority(hStream: CUstream, priority: *mut ::std::os::raw::c_int)
8813 -> CUresult;
8814}
8815extern "C" {
8816 #[doc = " \\brief Query the flags of a given stream\n\n Query the flags of a stream created using ::cuStreamCreate, ::cuStreamCreateWithPriority or ::cuGreenCtxStreamCreate\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 ::cuGreenCtxStreamCreate,\n ::cuStreamGetPriority,\n ::cudaStreamGetFlags"]
8817 pub fn cuStreamGetFlags(hStream: CUstream, flags: *mut ::std::os::raw::c_uint) -> CUresult;
8818}
8819extern "C" {
8820 #[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.\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"]
8821 pub fn cuStreamGetId(hStream: CUstream, streamId: *mut ::std::os::raw::c_ulonglong)
8822 -> CUresult;
8823}
8824extern "C" {
8825 #[doc = " \\brief Query the context associated with a stream\n\n Returns the CUDA context that the stream is associated with.\n\n Note there is a later version of this API, ::cuStreamGetCtx_v2. It will\n supplant this version in CUDA 13.0. It is recommended to use ::cuStreamGetCtx_v2\n till then as this version will return ::CUDA_ERROR_NOT_SUPPORTED for streams created via the API ::cuGreenCtxStreamCreate.\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 ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa ::cuStreamDestroy,\n ::cuStreamCreateWithPriority,\n ::cuStreamGetPriority,\n ::cuStreamGetFlags,\n ::cuStreamWaitEvent,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cudaStreamCreate,\n ::cuStreamGetCtx_v2,\n ::cudaStreamCreateWithFlags"]
8826 pub fn cuStreamGetCtx(hStream: CUstream, pctx: *mut CUcontext) -> CUresult;
8827}
8828extern "C" {
8829 #[doc = " \\brief Query the contexts associated with a stream\n\n Returns the contexts that the stream is associated with.\n\n If the stream is associated with a green context, the API returns the green context in \\p pGreenCtx\n and the primary context of the associated device in \\p pCtx.\n\n If the stream is associated with a regular context, the API returns the regular context in \\p pCtx\n and NULL in \\p pGreenCtx.\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 ::cuStreamCreateWithPriority and ::cuGreenCtxStreamCreate, 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.\n If any of the special handles are specified, the API will operate on the context current to the\n calling thread. If a green context (that was converted via ::cuCtxFromGreenCtx() before setting it current)\n is current to the calling thread, the API will return the green context in \\p pGreenCtx\n and the primary context of the associated device in \\p pCtx. If a regular context is current,\n the API returns the regular context in \\p pCtx and NULL in \\p pGreenCtx.\n Note that specifying ::CU_STREAM_PER_THREAD or ::cudaStreamPerThread will return ::CUDA_ERROR_INVALID_HANDLE\n if a green context is current to the calling thread.\n If no context is current to the calling thread, ::CUDA_ERROR_INVALID_CONTEXT is returned.</li>\n </ul>\n\n \\param hStream - Handle to the stream to be queried\n \\param pCtx - Returned regular context associated with the stream\n \\param pGreenCtx - Returned green context if the stream is associated with a green context or NULL if not\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 ::cuStreamCreate\n ::cuStreamCreateWithPriority,\n ::cuGreenCtxStreamCreate,\n ::cuStreamGetPriority,\n ::cuStreamGetFlags,\n ::cuStreamWaitEvent,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cudaStreamCreate,\n ::cudaStreamCreateWithFlags,"]
8830 pub fn cuStreamGetCtx_v2(
8831 hStream: CUstream,
8832 pCtx: *mut CUcontext,
8833 pGreenCtx: *mut CUgreenCtx,
8834 ) -> CUresult;
8835}
8836extern "C" {
8837 #[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"]
8838 pub fn cuStreamWaitEvent(
8839 hStream: CUstream,
8840 hEvent: CUevent,
8841 Flags: ::std::os::raw::c_uint,
8842 ) -> CUresult;
8843}
8844extern "C" {
8845 #[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"]
8846 pub fn cuStreamAddCallback(
8847 hStream: CUstream,
8848 callback: CUstreamCallback,
8849 userData: *mut ::std::os::raw::c_void,
8850 flags: ::std::os::raw::c_uint,
8851 ) -> CUresult;
8852}
8853extern "C" {
8854 #[doc = " \\brief Begins graph capture on a stream\n\n Begin graph capture on \\p hStream. When a stream is in capture mode, all operations\n pushed into the stream will not be executed, but will instead be captured into\n a graph, which will be returned via ::cuStreamEndCapture. Capture may not be initiated\n if \\p stream is CU_STREAM_LEGACY. Capture must be ended on the same stream in which\n it was initiated, and it may only be initiated if the stream is not already in capture\n mode. The capture mode may be queried via ::cuStreamIsCapturing. A unique id\n representing the capture sequence may be queried via ::cuStreamGetCaptureInfo.\n\n If \\p mode is not ::CU_STREAM_CAPTURE_MODE_RELAXED, ::cuStreamEndCapture must be\n called on this stream from the same thread.\n\n \\param hStream - Stream in which to initiate capture\n \\param mode - Controls the interaction of this capture sequence with other API\n calls that are potentially unsafe. For more details see\n ::cuThreadExchangeStreamCaptureMode.\n\n \\note Kernels captured using this API must not use texture and surface references.\n Reading or writing through any texture or surface reference is undefined\n behavior. This restriction does not apply to texture and surface objects.\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 ::cuStreamCreate,\n ::cuStreamIsCapturing,\n ::cuStreamEndCapture,\n ::cuThreadExchangeStreamCaptureMode"]
8855 pub fn cuStreamBeginCapture_v2(hStream: CUstream, mode: CUstreamCaptureMode) -> CUresult;
8856}
8857extern "C" {
8858 #[doc = " \\brief Begins graph capture on a stream to an existing graph\n\n Begin graph capture on \\p hStream, placing new nodes into an existing graph. When a stream is\n in capture mode, all operations pushed into the stream will not be executed, but will instead\n be captured into \\p hGraph. The graph will not be instantiable until the user calls\n ::cuStreamEndCapture.\n\n Capture may not be initiated if \\p stream is CU_STREAM_LEGACY. Capture must be ended on the\n same stream in which it was initiated, and it may only be initiated if the stream is not\n already in capture mode. The capture mode may be queried via ::cuStreamIsCapturing. A unique id\n representing the capture sequence may be queried via ::cuStreamGetCaptureInfo.\n\n If \\p mode is not ::CU_STREAM_CAPTURE_MODE_RELAXED, ::cuStreamEndCapture must be\n called on this stream from the same thread.\n\n \\param hStream - Stream in which to initiate capture.\n \\param hGraph - Graph to capture into.\n \\param dependencies - Dependencies of the first node captured in the stream. Can be NULL if numDependencies is 0.\n \\param dependencyData - Optional array of data associated with each dependency.\n \\param numDependencies - Number of dependencies.\n \\param mode - Controls the interaction of this capture sequence with other API\n calls that are potentially unsafe. For more details see\n ::cuThreadExchangeStreamCaptureMode.\n\n \\note Kernels captured using this API must not use texture and surface references.\n Reading or writing through any texture or surface reference is undefined\n behavior. This restriction does not apply to texture and surface objects.\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,\n ::cuStreamCreate,\n ::cuStreamIsCapturing,\n ::cuStreamEndCapture,\n ::cuThreadExchangeStreamCaptureMode,\n ::cuGraphAddNode,"]
8859 pub fn cuStreamBeginCaptureToGraph(
8860 hStream: CUstream,
8861 hGraph: CUgraph,
8862 dependencies: *const CUgraphNode,
8863 dependencyData: *const CUgraphEdgeData,
8864 numDependencies: usize,
8865 mode: CUstreamCaptureMode,
8866 ) -> CUresult;
8867}
8868extern "C" {
8869 #[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"]
8870 pub fn cuThreadExchangeStreamCaptureMode(mode: *mut CUstreamCaptureMode) -> CUresult;
8871}
8872extern "C" {
8873 #[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,\n ::cuGraphDestroy"]
8874 pub fn cuStreamEndCapture(hStream: CUstream, phGraph: *mut CUgraph) -> CUresult;
8875}
8876extern "C" {
8877 #[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"]
8878 pub fn cuStreamIsCapturing(
8879 hStream: CUstream,
8880 captureStatus: *mut CUstreamCaptureStatus,
8881 ) -> CUresult;
8882}
8883extern "C" {
8884 #[doc = " \\brief Query a stream's capture state\n\n Query stream state related to stream capture.\n\n If called on ::CU_STREAM_LEGACY (the \"null stream\") while a stream not created\n with ::CU_STREAM_NON_BLOCKING is capturing, returns ::CUDA_ERROR_STREAM_CAPTURE_IMPLICIT.\n\n Valid data (other than capture status) is returned only if both of the following are true:\n - the call returns CUDA_SUCCESS\n - the returned capture status is ::CU_STREAM_CAPTURE_STATUS_ACTIVE\n\n \\param hStream - The stream to query\n \\param captureStatus_out - Location to return the capture status of the stream; required\n \\param id_out - Optional location to return an id for the capture sequence, which is\n unique over the lifetime of the process\n \\param graph_out - Optional location to return the graph being captured into. All\n operations other than destroy and node removal are permitted on the graph\n while the capture sequence is in progress. This API does not transfer\n ownership of the graph, which is transferred or destroyed at\n ::cuStreamEndCapture. Note that the graph handle may be invalidated before\n end of capture for certain errors. Nodes that are or become\n unreachable from the original stream at ::cuStreamEndCapture due to direct\n actions on the graph do not trigger ::CUDA_ERROR_STREAM_CAPTURE_UNJOINED.\n \\param dependencies_out - Optional location to store a pointer to an array of nodes.\n The next node to be captured in the stream will depend on this set of nodes,\n absent operations such as event wait which modify this set. The array pointer\n is valid until the next API call which operates on the stream or until the\n capture is terminated. The node handles may be copied out and are valid until\n they or the graph is destroyed. The driver-owned array may also be passed\n directly to APIs that operate on the graph (not the stream) without copying.\n \\param numDependencies_out - Optional location to store the size of the array\n returned in dependencies_out.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_STREAM_CAPTURE_IMPLICIT\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuStreamGetCaptureInfo_v3\n ::cuStreamBeginCapture,\n ::cuStreamIsCapturing,\n ::cuStreamUpdateCaptureDependencies"]
8885 pub fn cuStreamGetCaptureInfo_v2(
8886 hStream: CUstream,
8887 captureStatus_out: *mut CUstreamCaptureStatus,
8888 id_out: *mut cuuint64_t,
8889 graph_out: *mut CUgraph,
8890 dependencies_out: *mut *const CUgraphNode,
8891 numDependencies_out: *mut usize,
8892 ) -> CUresult;
8893}
8894extern "C" {
8895 #[doc = " \\brief Query a stream's capture state (12.3+)\n\n Query stream state related to stream capture.\n\n If called on ::CU_STREAM_LEGACY (the \"null stream\") while a stream not created\n with ::CU_STREAM_NON_BLOCKING is capturing, returns ::CUDA_ERROR_STREAM_CAPTURE_IMPLICIT.\n\n Valid data (other than capture status) is returned only if both of the following are true:\n - the call returns CUDA_SUCCESS\n - the returned capture status is ::CU_STREAM_CAPTURE_STATUS_ACTIVE\n\n If \\p edgeData_out is non-NULL then \\p dependencies_out must be as well. If\n \\p dependencies_out is non-NULL and \\p edgeData_out is NULL, but there is non-zero edge\n data for one or more of the current stream dependencies, the call will return\n ::CUDA_ERROR_LOSSY_QUERY.\n\n \\param hStream - The stream to query\n \\param captureStatus_out - Location to return the capture status of the stream; required\n \\param id_out - Optional location to return an id for the capture sequence, which is\n unique over the lifetime of the process\n \\param graph_out - Optional location to return the graph being captured into. All\n operations other than destroy and node removal are permitted on the graph\n while the capture sequence is in progress. This API does not transfer\n ownership of the graph, which is transferred or destroyed at\n ::cuStreamEndCapture. Note that the graph handle may be invalidated before\n end of capture for certain errors. Nodes that are or become\n unreachable from the original stream at ::cuStreamEndCapture due to direct\n actions on the graph do not trigger ::CUDA_ERROR_STREAM_CAPTURE_UNJOINED.\n \\param dependencies_out - Optional location to store a pointer to an array of nodes.\n The next node to be captured in the stream will depend on this set of nodes,\n absent operations such as event wait which modify this set. The array pointer\n is valid until the next API call which operates on the stream or until the\n capture is terminated. The node handles may be copied out and are valid until\n they or the graph is destroyed. The driver-owned array may also be passed\n directly to APIs that operate on the graph (not the stream) without copying.\n \\param edgeData_out - Optional location to store a pointer to an array of graph edge\n data. This array parallels \\c dependencies_out; the next node to be added\n has an edge to \\c dependencies_out[i] with annotation \\c edgeData_out[i] for\n each \\c i. The array pointer is valid until the next API call which operates\n on the stream or until the capture is terminated.\n \\param numDependencies_out - Optional location to store the size of the array\n returned in dependencies_out.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_STREAM_CAPTURE_IMPLICIT,\n ::CUDA_ERROR_LOSSY_QUERY\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuStreamGetCaptureInfo\n ::cuStreamBeginCapture,\n ::cuStreamIsCapturing,\n ::cuStreamUpdateCaptureDependencies"]
8896 pub fn cuStreamGetCaptureInfo_v3(
8897 hStream: CUstream,
8898 captureStatus_out: *mut CUstreamCaptureStatus,
8899 id_out: *mut cuuint64_t,
8900 graph_out: *mut CUgraph,
8901 dependencies_out: *mut *const CUgraphNode,
8902 edgeData_out: *mut *const CUgraphEdgeData,
8903 numDependencies_out: *mut usize,
8904 ) -> CUresult;
8905}
8906extern "C" {
8907 #[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 \\param hStream - The stream to update\n \\param dependencies - The set of dependencies to add\n \\param numDependencies - The size of the dependencies array\n \\param flags - See above\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_ILLEGAL_STATE\n\n \\sa\n ::cuStreamBeginCapture,\n ::cuStreamGetCaptureInfo,"]
8908 pub fn cuStreamUpdateCaptureDependencies(
8909 hStream: CUstream,
8910 dependencies: *mut CUgraphNode,
8911 numDependencies: usize,
8912 flags: ::std::os::raw::c_uint,
8913 ) -> CUresult;
8914}
8915extern "C" {
8916 #[doc = " \\brief Update the set of dependencies in a capturing stream (12.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 along with the\n edge data for those dependencies.\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 \\param hStream - The stream to update\n \\param dependencies - The set of dependencies to add\n \\param dependencyData - Optional array of data associated with each dependency.\n \\param numDependencies - The size of the dependencies array\n \\param flags - See above\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_ILLEGAL_STATE\n\n \\sa\n ::cuStreamBeginCapture,\n ::cuStreamGetCaptureInfo,"]
8917 pub fn cuStreamUpdateCaptureDependencies_v2(
8918 hStream: CUstream,
8919 dependencies: *mut CUgraphNode,
8920 dependencyData: *const CUgraphEdgeData,
8921 numDependencies: usize,
8922 flags: ::std::os::raw::c_uint,
8923 ) -> CUresult;
8924}
8925extern "C" {
8926 #[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"]
8927 pub fn cuStreamAttachMemAsync(
8928 hStream: CUstream,
8929 dptr: CUdeviceptr,
8930 length: usize,
8931 flags: ::std::os::raw::c_uint,
8932 ) -> CUresult;
8933}
8934extern "C" {
8935 #[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"]
8936 pub fn cuStreamQuery(hStream: CUstream) -> CUresult;
8937}
8938extern "C" {
8939 #[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"]
8940 pub fn cuStreamSynchronize(hStream: CUstream) -> CUresult;
8941}
8942extern "C" {
8943 #[doc = " \\brief Destroys a stream\n\n Destroys the stream specified by \\p hStream.\n\n In case the device is still doing work in the stream \\p hStream\n when ::cuStreamDestroy() is called, the function will return immediately\n and the resources associated with \\p hStream will be released automatically\n once the device has completed all work in \\p hStream.\n\n \\param hStream - Stream 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 ::CUDA_ERROR_INVALID_HANDLE\n \\notefnerr\n\n \\sa ::cuStreamCreate,\n ::cuStreamWaitEvent,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cudaStreamDestroy"]
8944 pub fn cuStreamDestroy_v2(hStream: CUstream) -> CUresult;
8945}
8946extern "C" {
8947 #[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"]
8948 pub fn cuStreamCopyAttributes(dst: CUstream, src: CUstream) -> CUresult;
8949}
8950extern "C" {
8951 #[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"]
8952 pub fn cuStreamGetAttribute(
8953 hStream: CUstream,
8954 attr: CUstreamAttrID,
8955 value_out: *mut CUstreamAttrValue,
8956 ) -> CUresult;
8957}
8958extern "C" {
8959 #[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"]
8960 pub fn cuStreamSetAttribute(
8961 hStream: CUstream,
8962 attr: CUstreamAttrID,
8963 value: *const CUstreamAttrValue,
8964 ) -> CUresult;
8965}
8966extern "C" {
8967 #[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"]
8968 pub fn cuEventCreate(phEvent: *mut CUevent, Flags: ::std::os::raw::c_uint) -> CUresult;
8969}
8970extern "C" {
8971 #[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 otherwise\n ::CUDA_ERROR_INVALID_HANDLE is returned.\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"]
8972 pub fn cuEventRecord(hEvent: CUevent, hStream: CUstream) -> CUresult;
8973}
8974extern "C" {
8975 #[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 otherwise\n ::CUDA_ERROR_INVALID_HANDLE is returned.\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"]
8976 pub fn cuEventRecordWithFlags(
8977 hEvent: CUevent,
8978 hStream: CUstream,
8979 flags: ::std::os::raw::c_uint,
8980 ) -> CUresult;
8981}
8982extern "C" {
8983 #[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"]
8984 pub fn cuEventQuery(hEvent: CUevent) -> CUresult;
8985}
8986extern "C" {
8987 #[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"]
8988 pub fn cuEventSynchronize(hEvent: CUevent) -> CUresult;
8989}
8990extern "C" {
8991 #[doc = " \\brief Destroys an event\n\n Destroys the event specified by \\p hEvent.\n\n An event may be destroyed before it is complete (i.e., while\n ::cuEventQuery() would return ::CUDA_ERROR_NOT_READY). In this case, the\n call does not block on completion of the event, and any associated\n resources will automatically be released asynchronously at completion.\n\n \\param hEvent - Event 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 \\notefnerr\n\n \\sa ::cuEventCreate,\n ::cuEventRecord,\n ::cuEventQuery,\n ::cuEventSynchronize,\n ::cuEventElapsedTime,\n ::cudaEventDestroy"]
8992 pub fn cuEventDestroy_v2(hEvent: CUevent) -> CUresult;
8993}
8994extern "C" {
8995 #[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"]
8996 pub fn cuEventElapsedTime(pMilliseconds: *mut f32, hStart: CUevent, hEnd: CUevent) -> CUresult;
8997}
8998extern "C" {
8999 #[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"]
9000 pub fn cuImportExternalMemory(
9001 extMem_out: *mut CUexternalMemory,
9002 memHandleDesc: *const CUDA_EXTERNAL_MEMORY_HANDLE_DESC,
9003 ) -> CUresult;
9004}
9005extern "C" {
9006 #[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"]
9007 pub fn cuExternalMemoryGetMappedBuffer(
9008 devPtr: *mut CUdeviceptr,
9009 extMem: CUexternalMemory,
9010 bufferDesc: *const CUDA_EXTERNAL_MEMORY_BUFFER_DESC,
9011 ) -> CUresult;
9012}
9013extern "C" {
9014 #[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"]
9015 pub fn cuExternalMemoryGetMappedMipmappedArray(
9016 mipmap: *mut CUmipmappedArray,
9017 extMem: CUexternalMemory,
9018 mipmapDesc: *const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC,
9019 ) -> CUresult;
9020}
9021extern "C" {
9022 #[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"]
9023 pub fn cuDestroyExternalMemory(extMem: CUexternalMemory) -> CUresult;
9024}
9025extern "C" {
9026 #[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"]
9027 pub fn cuImportExternalSemaphore(
9028 extSem_out: *mut CUexternalSemaphore,
9029 semHandleDesc: *const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC,
9030 ) -> CUresult;
9031}
9032extern "C" {
9033 #[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"]
9034 pub fn cuSignalExternalSemaphoresAsync(
9035 extSemArray: *const CUexternalSemaphore,
9036 paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS,
9037 numExtSems: ::std::os::raw::c_uint,
9038 stream: CUstream,
9039 ) -> CUresult;
9040}
9041extern "C" {
9042 #[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"]
9043 pub fn cuWaitExternalSemaphoresAsync(
9044 extSemArray: *const CUexternalSemaphore,
9045 paramsArray: *const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS,
9046 numExtSems: ::std::os::raw::c_uint,
9047 stream: CUstream,
9048 ) -> CUresult;
9049}
9050extern "C" {
9051 #[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"]
9052 pub fn cuDestroyExternalSemaphore(extSem: CUexternalSemaphore) -> CUresult;
9053}
9054extern "C" {
9055 #[doc = " \\brief Wait on a memory location\n\n Enqueues a synchronization of the stream on the given memory location. Work\n ordered after the operation will block until the given condition on the\n memory is satisfied. By default, the condition is to wait for\n (int32_t)(*addr - value) >= 0, a cyclic greater-or-equal.\n Other condition types can be specified via \\p flags.\n\n If the memory was registered via ::cuMemHostRegister(), the device pointer\n should be obtained with ::cuMemHostGetDevicePointer(). This function cannot\n be used with managed memory (::cuMemAllocManaged).\n\n Support for CU_STREAM_WAIT_VALUE_NOR can be queried with ::cuDeviceGetAttribute() and\n ::CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2.\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.\n\n \\param stream The stream to synchronize on the memory location.\n \\param addr The memory location to wait on.\n \\param value The value to compare with the memory location.\n \\param flags See ::CUstreamWaitValue_flags.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa ::cuStreamWaitValue64,\n ::cuStreamWriteValue32,\n ::cuStreamWriteValue64,\n ::cuStreamBatchMemOp,\n ::cuMemHostRegister,\n ::cuStreamWaitEvent"]
9056 pub fn cuStreamWaitValue32_v2(
9057 stream: CUstream,
9058 addr: CUdeviceptr,
9059 value: cuuint32_t,
9060 flags: ::std::os::raw::c_uint,
9061 ) -> CUresult;
9062}
9063extern "C" {
9064 #[doc = " \\brief Wait on a memory location\n\n Enqueues a synchronization of the stream on the given memory location. Work\n ordered after the operation will block until the given condition on the\n memory is satisfied. By default, the condition is to wait for\n (int64_t)(*addr - value) >= 0, a cyclic greater-or-equal.\n Other condition types can be specified via \\p flags.\n\n If the memory was registered via ::cuMemHostRegister(), the device pointer\n should be obtained with ::cuMemHostGetDevicePointer().\n\n Support for this can be queried with ::cuDeviceGetAttribute() and\n ::CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS.\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.\n\n \\param stream The stream to synchronize on the memory location.\n \\param addr The memory location to wait on.\n \\param value The value to compare with the memory location.\n \\param flags See ::CUstreamWaitValue_flags.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa ::cuStreamWaitValue32,\n ::cuStreamWriteValue32,\n ::cuStreamWriteValue64,\n ::cuStreamBatchMemOp,\n ::cuMemHostRegister,\n ::cuStreamWaitEvent"]
9065 pub fn cuStreamWaitValue64_v2(
9066 stream: CUstream,
9067 addr: CUdeviceptr,
9068 value: cuuint64_t,
9069 flags: ::std::os::raw::c_uint,
9070 ) -> CUresult;
9071}
9072extern "C" {
9073 #[doc = " \\brief Write a value to memory\n\n Write a value to memory.\n\n If the memory was registered via ::cuMemHostRegister(), the device pointer\n should be obtained with ::cuMemHostGetDevicePointer(). This function cannot\n be used with managed memory (::cuMemAllocManaged).\n\n \\param stream The stream to do the write in.\n \\param addr The device address to write to.\n \\param value The value to write.\n \\param flags See ::CUstreamWriteValue_flags.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa ::cuStreamWriteValue64,\n ::cuStreamWaitValue32,\n ::cuStreamWaitValue64,\n ::cuStreamBatchMemOp,\n ::cuMemHostRegister,\n ::cuEventRecord"]
9074 pub fn cuStreamWriteValue32_v2(
9075 stream: CUstream,
9076 addr: CUdeviceptr,
9077 value: cuuint32_t,
9078 flags: ::std::os::raw::c_uint,
9079 ) -> CUresult;
9080}
9081extern "C" {
9082 #[doc = " \\brief Write a value to memory\n\n Write a value to memory.\n\n If the memory was registered via ::cuMemHostRegister(), the device pointer\n should be obtained with ::cuMemHostGetDevicePointer().\n\n Support for this can be queried with ::cuDeviceGetAttribute() and\n ::CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS.\n\n \\param stream The stream to do the write in.\n \\param addr The device address to write to.\n \\param value The value to write.\n \\param flags See ::CUstreamWriteValue_flags.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa ::cuStreamWriteValue32,\n ::cuStreamWaitValue32,\n ::cuStreamWaitValue64,\n ::cuStreamBatchMemOp,\n ::cuMemHostRegister,\n ::cuEventRecord"]
9083 pub fn cuStreamWriteValue64_v2(
9084 stream: CUstream,
9085 addr: CUdeviceptr,
9086 value: cuuint64_t,
9087 flags: ::std::os::raw::c_uint,
9088 ) -> CUresult;
9089}
9090extern "C" {
9091 #[doc = " \\brief Batch operations to synchronize the stream via memory operations\n\n This is a batch version of ::cuStreamWaitValue32() and ::cuStreamWriteValue32().\n Batching operations may avoid some performance overhead in both the API call\n and the device execution versus adding them to the stream in separate API\n calls. The operations are enqueued in the order they appear in the array.\n\n See ::CUstreamBatchMemOpType for the full set of supported operations, and\n ::cuStreamWaitValue32(), ::cuStreamWaitValue64(), ::cuStreamWriteValue32(),\n and ::cuStreamWriteValue64() for details of specific operations.\n\n See related APIs for details on querying support for specific operations.\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 stream The stream to enqueue the operations in.\n \\param count The number of operations in the array. Must be less than 256.\n \\param paramArray The types and parameters of the individual operations.\n \\param flags Reserved for future expansion; must be 0.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\notefnerr\n\n \\sa ::cuStreamWaitValue32,\n ::cuStreamWaitValue64,\n ::cuStreamWriteValue32,\n ::cuStreamWriteValue64,\n ::cuMemHostRegister"]
9092 pub fn cuStreamBatchMemOp_v2(
9093 stream: CUstream,
9094 count: ::std::os::raw::c_uint,
9095 paramArray: *mut CUstreamBatchMemOpParams,
9096 flags: ::std::os::raw::c_uint,
9097 ) -> CUresult;
9098}
9099extern "C" {
9100 #[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 With a few execeptions, function attributes may also be queried on unloaded\n function handles returned from ::cuModuleEnumerateFunctions.\n ::CUDA_ERROR_FUNCTION_NOT_LOADED is returned if the attribute requires a fully\n loaded function but the function is not loaded. The loading state of a function\n may be queried using ::cuFuncIsloaded. ::cuFuncLoad may be called to explicitly\n load a function before querying the following attributes that require the function\n to be loaded:\n - ::CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK\n - ::CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES\n - ::CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES\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 ::CUDA_ERROR_FUNCTION_NOT_LOADED\n \\notefnerr\n\n \\sa ::cuCtxGetCacheConfig,\n ::cuCtxSetCacheConfig,\n ::cuFuncSetCacheConfig,\n ::cuLaunchKernel,\n ::cudaFuncGetAttributes,\n ::cudaFuncSetAttribute,\n ::cuFuncIsLoaded,\n ::cuFuncLoad,\n ::cuKernelGetAttribute"]
9101 pub fn cuFuncGetAttribute(
9102 pi: *mut ::std::os::raw::c_int,
9103 attrib: CUfunction_attribute,
9104 hfunc: CUfunction,
9105 ) -> CUresult;
9106}
9107extern "C" {
9108 #[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_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.\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"]
9109 pub fn cuFuncSetAttribute(
9110 hfunc: CUfunction,
9111 attrib: CUfunction_attribute,
9112 value: ::std::os::raw::c_int,
9113 ) -> CUresult;
9114}
9115extern "C" {
9116 #[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"]
9117 pub fn cuFuncSetCacheConfig(hfunc: CUfunction, config: CUfunc_cache) -> CUresult;
9118}
9119extern "C" {
9120 #[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"]
9121 pub fn cuFuncGetModule(hmod: *mut CUmodule, hfunc: CUfunction) -> CUresult;
9122}
9123extern "C" {
9124 #[doc = " \\brief Returns the function name for a ::CUfunction handle\n\n Returns in \\p **name the function name associated with the function handle \\p hfunc .\n The function name is returned as a null-terminated string. The returned name is only\n valid when the function handle is valid. If the module is unloaded or reloaded, one\n must call the API again to get the updated name. This API may return a mangled name if\n the function is not declared as having C linkage. If either \\p **name or \\p hfunc\n is NULL, ::CUDA_ERROR_INVALID_VALUE is returned.\n\n \\param name - The returned name of the function\n \\param hfunc - The function handle to retrieve the name for\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\notefnerr\n"]
9125 pub fn cuFuncGetName(name: *mut *const ::std::os::raw::c_char, hfunc: CUfunction) -> CUresult;
9126}
9127extern "C" {
9128 #[doc = " \\brief Returns the offset and size of a kernel parameter in the device-side parameter layout\n\n Queries the kernel parameter at \\p paramIndex into \\p func's list of parameters, and returns\n in \\p paramOffset and \\p paramSize the offset and size, respectively, where the parameter\n will reside in the device-side parameter layout. This information can be used to update kernel\n node parameters from the device via ::cudaGraphKernelNodeSetParam() and\n ::cudaGraphKernelNodeUpdatesApply(). \\p paramIndex must be less than the number of parameters\n that \\p func takes. \\p paramSize can be set to NULL if only the parameter offset is desired.\n\n \\param func - The function to query\n \\param paramIndex - The parameter index to query\n \\param paramOffset - Returns the offset into the device-side parameter layout at which the parameter resides\n \\param paramSize - Optionally returns the size of the parameter in the device-side parameter layout\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\notefnerr\n\n \\sa ::cuKernelGetParamInfo"]
9129 pub fn cuFuncGetParamInfo(
9130 func: CUfunction,
9131 paramIndex: usize,
9132 paramOffset: *mut usize,
9133 paramSize: *mut usize,
9134 ) -> CUresult;
9135}
9136impl CUfunctionLoadingState_enum {
9137 pub const CU_FUNCTION_LOADING_STATE_UNLOADED: CUfunctionLoadingState_enum =
9138 CUfunctionLoadingState_enum(0);
9139}
9140impl CUfunctionLoadingState_enum {
9141 pub const CU_FUNCTION_LOADING_STATE_LOADED: CUfunctionLoadingState_enum =
9142 CUfunctionLoadingState_enum(1);
9143}
9144impl CUfunctionLoadingState_enum {
9145 pub const CU_FUNCTION_LOADING_STATE_MAX: CUfunctionLoadingState_enum =
9146 CUfunctionLoadingState_enum(2);
9147}
9148#[repr(transparent)]
9149#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
9150pub struct CUfunctionLoadingState_enum(pub ::std::os::raw::c_uint);
9151pub use self::CUfunctionLoadingState_enum as CUfunctionLoadingState;
9152extern "C" {
9153 #[doc = " \\brief Returns if the function is loaded\n\n Returns in \\p state the loading state of \\p function.\n\n \\param state - returned loading state\n \\param function - the function to check\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuFuncLoad,\n ::cuModuleEnumerateFunctions"]
9154 pub fn cuFuncIsLoaded(state: *mut CUfunctionLoadingState, function: CUfunction) -> CUresult;
9155}
9156extern "C" {
9157 #[doc = " \\brief Loads a function\n\n Finalizes function loading for \\p function. Calling this API with a\n fully loaded function has no effect.\n\n \\param function - the function to load\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_HANDLE,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa ::cuModuleEnumerateFunctions,\n ::cuFuncIsLoaded"]
9158 pub fn cuFuncLoad(function: CUfunction) -> CUresult;
9159}
9160extern "C" {
9161 #[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"]
9162 pub fn cuLaunchKernel(
9163 f: CUfunction,
9164 gridDimX: ::std::os::raw::c_uint,
9165 gridDimY: ::std::os::raw::c_uint,
9166 gridDimZ: ::std::os::raw::c_uint,
9167 blockDimX: ::std::os::raw::c_uint,
9168 blockDimY: ::std::os::raw::c_uint,
9169 blockDimZ: ::std::os::raw::c_uint,
9170 sharedMemBytes: ::std::os::raw::c_uint,
9171 hStream: CUstream,
9172 kernelParams: *mut *mut ::std::os::raw::c_void,
9173 extra: *mut *mut ::std::os::raw::c_void,
9174 ) -> CUresult;
9175}
9176extern "C" {
9177 #[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\n \\code\n typedef struct CUlaunchConfig_st {\n unsigned int gridDimX;\n unsigned int gridDimY;\n unsigned int gridDimZ;\n unsigned int blockDimX;\n unsigned int blockDimY;\n unsigned int blockDimZ;\n unsigned int sharedMemBytes;\n CUstream hStream;\n CUlaunchAttribute *attrs;\n unsigned int numAttrs;\n } CUlaunchConfig;\n \\endcode\n\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 number 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\n typedef struct CUlaunchAttribute_st {\n CUlaunchAttributeID id;\n CUlaunchAttributeValue 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\n CUlaunchAttribute coopAttr = {.id = CU_LAUNCH_ATTRIBUTE_COOPERATIVE,\n .value = 1};\n CUlaunchConfig config = {... // set block and grid dimensions\n .attrs = &coopAttr,\n .numAttrs = 1};\n\n cuLaunchKernelEx(&config, kernel, NULL, NULL);\n \\endcode\n\n The ::CUlaunchAttributeID enum is defined as:\n \\code\n typedef enum CUlaunchAttributeID_enum {\n CU_LAUNCH_ATTRIBUTE_IGNORE = 0,\n CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1,\n CU_LAUNCH_ATTRIBUTE_COOPERATIVE = 2,\n CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3,\n CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = 4,\n CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5,\n CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = 6,\n CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = 7,\n CU_LAUNCH_ATTRIBUTE_PRIORITY = 8,\n CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9,\n CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = 10,\n CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = 12,\n CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13,\n } CUlaunchAttributeID;\n \\endcode\n\n and the corresponding ::CUlaunchAttributeValue union as :\n \\code\n typedef union CUlaunchAttributeValue_union {\n CUaccessPolicyWindow accessPolicyWindow;\n int cooperative;\n CUsynchronizationPolicy syncPolicy;\n struct {\n unsigned int x;\n unsigned int y;\n unsigned int z;\n } clusterDim;\n CUclusterSchedulingPolicy clusterSchedulingPolicyPreference;\n int programmaticStreamSerializationAllowed;\n struct {\n CUevent event;\n int flags;\n int triggerAtBlockStart;\n } programmaticEvent;\n int priority;\n CUlaunchMemSyncDomainMap memSyncDomainMap;\n CUlaunchMemSyncDomain memSyncDomain;\n struct {\n CUevent event;\n int flags;\n } launchCompletionEvent;\n struct {\n int deviceUpdatable;\n CUgraphDeviceNode devNode;\n } deviceUpdatableKernelNode;\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 ::CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT records an event along with\n the kernel launch. Nominally, the event is triggered once all blocks of the\n kernel have begun execution. Currently this is a best effort. If a kernel B\n has a launch completion dependency on a kernel A, B may wait until A is\n complete. Alternatively, blocks of B may begin before all blocks of A have\n begun, for example:\n\n - If B can claim execution resources unavaiable to A, for example if they\n run on different GPUs.\n - If B is a higher priority than A.\n\n Exercise caution if such an ordering inversion could lead to deadlock. The\n event supplied must not be an interprocess or interop event. The event must\n disable timing (i.e. must be created with the ::CU_EVENT_DISABLE_TIMING flag\n set).\n\n Setting ::CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE to 1\n on a captured launch causes the resulting kernel node to be device-updatable.\n This attribute is specific to graphs, and passing it to a launch in a\n non-capturing stream results in an error. Passing a value other than 0 or 1 is\n not allowed.\n\n On success, a handle will be returned via\n ::CUlaunchAttributeValue::deviceUpdatableKernelNode::devNode which can be passed\n to the various device-side update functions to update the node's kernel parameters\n from within another kernel. For more information on the types of device updates\n that can be made, as well as the relevant limitations thereof, see\n ::cudaGraphKernelNodeUpdatesApply.\n\n Kernel nodes which are device-updatable have additional restrictions compared to regular\n kernel nodes. Firstly, device-updatable nodes cannot be removed from their graph via\n ::cuGraphDestroyNode. Additionally, once opted-in to this functionality, a node cannot\n opt out, and any attempt to set the attribute to 0 will result in an error. Graphs\n containing one or more device-updatable node also do not allow multiple instantiation.\n\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 ::cuFuncSetAttribute 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"]
9178 pub fn cuLaunchKernelEx(
9179 config: *const CUlaunchConfig,
9180 f: CUfunction,
9181 kernelParams: *mut *mut ::std::os::raw::c_void,
9182 extra: *mut *mut ::std::os::raw::c_void,
9183 ) -> CUresult;
9184}
9185extern "C" {
9186 #[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 \\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"]
9187 pub fn cuLaunchCooperativeKernel(
9188 f: CUfunction,
9189 gridDimX: ::std::os::raw::c_uint,
9190 gridDimY: ::std::os::raw::c_uint,
9191 gridDimZ: ::std::os::raw::c_uint,
9192 blockDimX: ::std::os::raw::c_uint,
9193 blockDimY: ::std::os::raw::c_uint,
9194 blockDimZ: ::std::os::raw::c_uint,
9195 sharedMemBytes: ::std::os::raw::c_uint,
9196 hStream: CUstream,
9197 kernelParams: *mut *mut ::std::os::raw::c_void,
9198 ) -> CUresult;
9199}
9200extern "C" {
9201 #[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 responsibility 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"]
9202 pub fn cuLaunchCooperativeKernelMultiDevice(
9203 launchParamsList: *mut CUDA_LAUNCH_PARAMS,
9204 numDevices: ::std::os::raw::c_uint,
9205 flags: ::std::os::raw::c_uint,
9206 ) -> CUresult;
9207}
9208extern "C" {
9209 #[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"]
9210 pub fn cuLaunchHostFunc(
9211 hStream: CUstream,
9212 fn_: CUhostFn,
9213 userData: *mut ::std::os::raw::c_void,
9214 ) -> CUresult;
9215}
9216extern "C" {
9217 #[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"]
9218 pub fn cuFuncSetBlockShape(
9219 hfunc: CUfunction,
9220 x: ::std::os::raw::c_int,
9221 y: ::std::os::raw::c_int,
9222 z: ::std::os::raw::c_int,
9223 ) -> CUresult;
9224}
9225extern "C" {
9226 #[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"]
9227 pub fn cuFuncSetSharedSize(hfunc: CUfunction, bytes: ::std::os::raw::c_uint) -> CUresult;
9228}
9229extern "C" {
9230 #[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"]
9231 pub fn cuParamSetSize(hfunc: CUfunction, numbytes: ::std::os::raw::c_uint) -> CUresult;
9232}
9233extern "C" {
9234 #[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"]
9235 pub fn cuParamSeti(
9236 hfunc: CUfunction,
9237 offset: ::std::os::raw::c_int,
9238 value: ::std::os::raw::c_uint,
9239 ) -> CUresult;
9240}
9241extern "C" {
9242 #[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"]
9243 pub fn cuParamSetf(hfunc: CUfunction, offset: ::std::os::raw::c_int, value: f32) -> CUresult;
9244}
9245extern "C" {
9246 #[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"]
9247 pub fn cuParamSetv(
9248 hfunc: CUfunction,
9249 offset: ::std::os::raw::c_int,
9250 ptr: *mut ::std::os::raw::c_void,
9251 numbytes: ::std::os::raw::c_uint,
9252 ) -> CUresult;
9253}
9254extern "C" {
9255 #[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"]
9256 pub fn cuLaunch(f: CUfunction) -> CUresult;
9257}
9258extern "C" {
9259 #[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"]
9260 pub fn cuLaunchGrid(
9261 f: CUfunction,
9262 grid_width: ::std::os::raw::c_int,
9263 grid_height: ::std::os::raw::c_int,
9264 ) -> CUresult;
9265}
9266extern "C" {
9267 #[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"]
9268 pub fn cuLaunchGridAsync(
9269 f: CUfunction,
9270 grid_width: ::std::os::raw::c_int,
9271 grid_height: ::std::os::raw::c_int,
9272 hStream: CUstream,
9273 ) -> CUresult;
9274}
9275extern "C" {
9276 #[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"]
9277 pub fn cuParamSetTexRef(
9278 hfunc: CUfunction,
9279 texunit: ::std::os::raw::c_int,
9280 hTexRef: CUtexref,
9281 ) -> CUresult;
9282}
9283extern "C" {
9284 #[doc = " \\brief Sets the shared memory configuration for a device function.\n\n \\deprecated\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"]
9285 pub fn cuFuncSetSharedMemConfig(hfunc: CUfunction, config: CUsharedconfig) -> CUresult;
9286}
9287extern "C" {
9288 #[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"]
9289 pub fn cuGraphCreate(phGraph: *mut CUgraph, flags: ::std::os::raw::c_uint) -> CUresult;
9290}
9291extern "C" {
9292 #[doc = " \\brief Creates a kernel execution node and adds it to a graph\n\n Creates a new kernel 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 The CUDA_KERNEL_NODE_PARAMS structure is defined as:\n\n \\code\n typedef struct CUDA_KERNEL_NODE_PARAMS_st {\n CUfunction func;\n unsigned int gridDimX;\n unsigned int gridDimY;\n unsigned int gridDimZ;\n unsigned int blockDimX;\n unsigned int blockDimY;\n unsigned int blockDimZ;\n unsigned int sharedMemBytes;\n void **kernelParams;\n void **extra;\n CUkernel kern;\n CUcontext ctx;\n } CUDA_KERNEL_NODE_PARAMS;\n \\endcode\n\n When the graph is launched, the node will invoke kernel \\p func on a (\\p gridDimX x\n \\p gridDimY x \\p gridDimZ) grid of blocks. Each block contains\n (\\p blockDimX x \\p blockDimY x \\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 func can be specified in one of two ways:\n\n 1) Kernel parameters can be specified via \\p kernelParams. If the kernel has N\n parameters, then \\p kernelParams needs to be an array of N pointers. Each pointer,\n from \\p kernelParams[0] to \\p kernelParams[N-1], points to the region of memory from which the actual\n parameter will be copied. The number of kernel parameters and their offsets and sizes do not need\n to be specified as that information is retrieved directly from the kernel's image.\n\n 2) Kernel parameters for non-cooperative kernels can also be packaged by the application into a single\n buffer that is passed in via \\p extra. This places the burden on the application of knowing each\n kernel parameter's size and alignment/padding within the buffer. The \\p extra parameter exists\n to allow this function to take additional less commonly used arguments. \\p extra specifies\n a list of names of extra settings and their corresponding values. Each extra setting name is\n immediately followed by the corresponding value. The list must be terminated with either NULL or\n 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\n containing all the kernel parameters for launching kernel\n \\p func;\n - ::CU_LAUNCH_PARAM_BUFFER_SIZE, which specifies that the next\n value in \\p extra will be a pointer to a size_t\n containing the size of the buffer specified with\n ::CU_LAUNCH_PARAM_BUFFER_POINTER;\n\n The error ::CUDA_ERROR_INVALID_VALUE will be returned if kernel parameters are specified with both\n \\p kernelParams and \\p extra (i.e. both \\p kernelParams and \\p extra are non-NULL).\n ::CUDA_ERROR_INVALID_VALUE will be returned if \\p extra is used for a cooperative kernel.\n\n The \\p kernelParams or \\p extra array, as well as the argument values it points to,\n are copied during this call.\n\n \\note Kernels launched using graphs must not use texture and surface references. Reading or\n writing through any texture or surface reference is undefined behavior.\n This restriction does not apply to texture and surface objects.\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 GPU execution 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 ::cuGraphAddNode,\n ::cuLaunchKernel,\n ::cuLaunchCooperativeKernel,\n ::cuGraphKernelNodeGetParams,\n ::cuGraphKernelNodeSetParams,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddHostNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9293 pub fn cuGraphAddKernelNode_v2(
9294 phGraphNode: *mut CUgraphNode,
9295 hGraph: CUgraph,
9296 dependencies: *const CUgraphNode,
9297 numDependencies: usize,
9298 nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
9299 ) -> CUresult;
9300}
9301extern "C" {
9302 #[doc = " \\brief Returns a kernel node's parameters\n\n Returns the parameters of kernel node \\p hNode in \\p nodeParams.\n The \\p kernelParams or \\p extra array returned in \\p nodeParams,\n as well as the argument values it points to, are 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 ::cuGraphKernelNodeSetParams to update the\n parameters of this node.\n\n The params will contain either \\p kernelParams or \\p extra,\n according to which of these was most recently set on the node.\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 ::cuLaunchKernel,\n ::cuGraphAddKernelNode,\n ::cuGraphKernelNodeSetParams"]
9303 pub fn cuGraphKernelNodeGetParams_v2(
9304 hNode: CUgraphNode,
9305 nodeParams: *mut CUDA_KERNEL_NODE_PARAMS,
9306 ) -> CUresult;
9307}
9308extern "C" {
9309 #[doc = " \\brief Sets a kernel node's parameters\n\n Sets the parameters of kernel 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 ::cuGraphNodeSetParams,\n ::cuLaunchKernel,\n ::cuGraphAddKernelNode,\n ::cuGraphKernelNodeGetParams"]
9310 pub fn cuGraphKernelNodeSetParams_v2(
9311 hNode: CUgraphNode,
9312 nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
9313 ) -> CUresult;
9314}
9315extern "C" {
9316 #[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 ::cuGraphAddNode,\n ::cuMemcpy3D,\n ::cuGraphMemcpyNodeGetParams,\n ::cuGraphMemcpyNodeSetParams,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddHostNode,\n ::cuGraphAddMemsetNode"]
9317 pub fn cuGraphAddMemcpyNode(
9318 phGraphNode: *mut CUgraphNode,
9319 hGraph: CUgraph,
9320 dependencies: *const CUgraphNode,
9321 numDependencies: usize,
9322 copyParams: *const CUDA_MEMCPY3D,
9323 ctx: CUcontext,
9324 ) -> CUresult;
9325}
9326extern "C" {
9327 #[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"]
9328 pub fn cuGraphMemcpyNodeGetParams(
9329 hNode: CUgraphNode,
9330 nodeParams: *mut CUDA_MEMCPY3D,
9331 ) -> CUresult;
9332}
9333extern "C" {
9334 #[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 ::cuGraphNodeSetParams,\n ::cuMemcpy3D,\n ::cuGraphAddMemcpyNode,\n ::cuGraphMemcpyNodeGetParams"]
9335 pub fn cuGraphMemcpyNodeSetParams(
9336 hNode: CUgraphNode,
9337 nodeParams: *const CUDA_MEMCPY3D,
9338 ) -> CUresult;
9339}
9340extern "C" {
9341 #[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 ::cuGraphAddNode,\n ::cuMemsetD2D32,\n ::cuGraphMemsetNodeGetParams,\n ::cuGraphMemsetNodeSetParams,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddHostNode,\n ::cuGraphAddMemcpyNode"]
9342 pub fn cuGraphAddMemsetNode(
9343 phGraphNode: *mut CUgraphNode,
9344 hGraph: CUgraph,
9345 dependencies: *const CUgraphNode,
9346 numDependencies: usize,
9347 memsetParams: *const CUDA_MEMSET_NODE_PARAMS,
9348 ctx: CUcontext,
9349 ) -> CUresult;
9350}
9351extern "C" {
9352 #[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"]
9353 pub fn cuGraphMemsetNodeGetParams(
9354 hNode: CUgraphNode,
9355 nodeParams: *mut CUDA_MEMSET_NODE_PARAMS,
9356 ) -> CUresult;
9357}
9358extern "C" {
9359 #[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 ::cuGraphNodeSetParams,\n ::cuMemsetD2D32,\n ::cuGraphAddMemsetNode,\n ::cuGraphMemsetNodeGetParams"]
9360 pub fn cuGraphMemsetNodeSetParams(
9361 hNode: CUgraphNode,
9362 nodeParams: *const CUDA_MEMSET_NODE_PARAMS,
9363 ) -> CUresult;
9364}
9365extern "C" {
9366 #[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 ::cuGraphAddNode,\n ::cuLaunchHostFunc,\n ::cuGraphHostNodeGetParams,\n ::cuGraphHostNodeSetParams,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9367 pub fn cuGraphAddHostNode(
9368 phGraphNode: *mut CUgraphNode,
9369 hGraph: CUgraph,
9370 dependencies: *const CUgraphNode,
9371 numDependencies: usize,
9372 nodeParams: *const CUDA_HOST_NODE_PARAMS,
9373 ) -> CUresult;
9374}
9375extern "C" {
9376 #[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"]
9377 pub fn cuGraphHostNodeGetParams(
9378 hNode: CUgraphNode,
9379 nodeParams: *mut CUDA_HOST_NODE_PARAMS,
9380 ) -> CUresult;
9381}
9382extern "C" {
9383 #[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 ::cuGraphNodeSetParams,\n ::cuLaunchHostFunc,\n ::cuGraphAddHostNode,\n ::cuGraphHostNodeGetParams"]
9384 pub fn cuGraphHostNodeSetParams(
9385 hNode: CUgraphNode,
9386 nodeParams: *const CUDA_HOST_NODE_PARAMS,
9387 ) -> CUresult;
9388}
9389extern "C" {
9390 #[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 ::cuGraphAddNode,\n ::cuGraphChildGraphNodeGetGraph,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddHostNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode,\n ::cuGraphClone"]
9391 pub fn cuGraphAddChildGraphNode(
9392 phGraphNode: *mut CUgraphNode,
9393 hGraph: CUgraph,
9394 dependencies: *const CUgraphNode,
9395 numDependencies: usize,
9396 childGraph: CUgraph,
9397 ) -> CUresult;
9398}
9399extern "C" {
9400 #[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"]
9401 pub fn cuGraphChildGraphNodeGetGraph(hNode: CUgraphNode, phGraph: *mut CUgraph) -> CUresult;
9402}
9403extern "C" {
9404 #[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 ::cuGraphAddNode,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddHostNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9405 pub fn cuGraphAddEmptyNode(
9406 phGraphNode: *mut CUgraphNode,
9407 hGraph: CUgraph,
9408 dependencies: *const CUgraphNode,
9409 numDependencies: usize,
9410 ) -> CUresult;
9411}
9412extern "C" {
9413 #[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 ::cuGraphAddNode,\n ::cuGraphAddEventWaitNode,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9414 pub fn cuGraphAddEventRecordNode(
9415 phGraphNode: *mut CUgraphNode,
9416 hGraph: CUgraph,
9417 dependencies: *const CUgraphNode,
9418 numDependencies: usize,
9419 event: CUevent,
9420 ) -> CUresult;
9421}
9422extern "C" {
9423 #[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"]
9424 pub fn cuGraphEventRecordNodeGetEvent(hNode: CUgraphNode, event_out: *mut CUevent) -> CUresult;
9425}
9426extern "C" {
9427 #[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 ::cuGraphNodeSetParams,\n ::cuGraphAddEventRecordNode,\n ::cuGraphEventRecordNodeGetEvent,\n ::cuGraphEventWaitNodeSetEvent,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent"]
9428 pub fn cuGraphEventRecordNodeSetEvent(hNode: CUgraphNode, event: CUevent) -> CUresult;
9429}
9430extern "C" {
9431 #[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 ::cuGraphAddNode,\n ::cuGraphAddEventRecordNode,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent,\n ::cuGraphCreate,\n ::cuGraphDestroyNode,\n ::cuGraphAddChildGraphNode,\n ::cuGraphAddEmptyNode,\n ::cuGraphAddKernelNode,\n ::cuGraphAddMemcpyNode,\n ::cuGraphAddMemsetNode"]
9432 pub fn cuGraphAddEventWaitNode(
9433 phGraphNode: *mut CUgraphNode,
9434 hGraph: CUgraph,
9435 dependencies: *const CUgraphNode,
9436 numDependencies: usize,
9437 event: CUevent,
9438 ) -> CUresult;
9439}
9440extern "C" {
9441 #[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"]
9442 pub fn cuGraphEventWaitNodeGetEvent(hNode: CUgraphNode, event_out: *mut CUevent) -> CUresult;
9443}
9444extern "C" {
9445 #[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 ::cuGraphNodeSetParams,\n ::cuGraphAddEventWaitNode,\n ::cuGraphEventWaitNodeGetEvent,\n ::cuGraphEventRecordNodeSetEvent,\n ::cuEventRecordWithFlags,\n ::cuStreamWaitEvent"]
9446 pub fn cuGraphEventWaitNodeSetEvent(hNode: CUgraphNode, event: CUevent) -> CUresult;
9447}
9448extern "C" {
9449 #[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 ::cuGraphAddNode,\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"]
9450 pub fn cuGraphAddExternalSemaphoresSignalNode(
9451 phGraphNode: *mut CUgraphNode,
9452 hGraph: CUgraph,
9453 dependencies: *const CUgraphNode,
9454 numDependencies: usize,
9455 nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
9456 ) -> CUresult;
9457}
9458extern "C" {
9459 #[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"]
9460 pub fn cuGraphExternalSemaphoresSignalNodeGetParams(
9461 hNode: CUgraphNode,
9462 params_out: *mut CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
9463 ) -> CUresult;
9464}
9465extern "C" {
9466 #[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 ::cuGraphNodeSetParams,\n ::cuGraphAddExternalSemaphoresSignalNode,\n ::cuGraphExternalSemaphoresSignalNodeSetParams,\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync"]
9467 pub fn cuGraphExternalSemaphoresSignalNodeSetParams(
9468 hNode: CUgraphNode,
9469 nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
9470 ) -> CUresult;
9471}
9472extern "C" {
9473 #[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 ::cuGraphAddNode,\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"]
9474 pub fn cuGraphAddExternalSemaphoresWaitNode(
9475 phGraphNode: *mut CUgraphNode,
9476 hGraph: CUgraph,
9477 dependencies: *const CUgraphNode,
9478 numDependencies: usize,
9479 nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
9480 ) -> CUresult;
9481}
9482extern "C" {
9483 #[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"]
9484 pub fn cuGraphExternalSemaphoresWaitNodeGetParams(
9485 hNode: CUgraphNode,
9486 params_out: *mut CUDA_EXT_SEM_WAIT_NODE_PARAMS,
9487 ) -> CUresult;
9488}
9489extern "C" {
9490 #[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 ::cuGraphNodeSetParams,\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuGraphExternalSemaphoresWaitNodeSetParams,\n ::cuGraphAddExternalSemaphoresWaitNode,\n ::cuSignalExternalSemaphoresAsync,\n ::cuWaitExternalSemaphoresAsync"]
9491 pub fn cuGraphExternalSemaphoresWaitNodeSetParams(
9492 hNode: CUgraphNode,
9493 nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
9494 ) -> CUresult;
9495}
9496extern "C" {
9497 #[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 ::cuGraphAddNode,\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"]
9498 pub fn cuGraphAddBatchMemOpNode(
9499 phGraphNode: *mut CUgraphNode,
9500 hGraph: CUgraph,
9501 dependencies: *const CUgraphNode,
9502 numDependencies: usize,
9503 nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
9504 ) -> CUresult;
9505}
9506extern "C" {
9507 #[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"]
9508 pub fn cuGraphBatchMemOpNodeGetParams(
9509 hNode: CUgraphNode,
9510 nodeParams_out: *mut CUDA_BATCH_MEM_OP_NODE_PARAMS,
9511 ) -> CUresult;
9512}
9513extern "C" {
9514 #[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 ::cuGraphNodeSetParams,\n ::cuStreamBatchMemOp,\n ::cuGraphAddBatchMemOpNode,\n ::cuGraphBatchMemOpNodeGetParams"]
9515 pub fn cuGraphBatchMemOpNodeSetParams(
9516 hNode: CUgraphNode,
9517 nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
9518 ) -> CUresult;
9519}
9520extern "C" {
9521 #[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 ::cuGraphExecNodeSetParams,\n ::cuStreamBatchMemOp,\n ::cuGraphAddBatchMemOpNode,\n ::cuGraphBatchMemOpNodeGetParams,\n ::cuGraphBatchMemOpNodeSetParams,\n ::cuGraphInstantiate"]
9522 pub fn cuGraphExecBatchMemOpNodeSetParams(
9523 hGraphExec: CUgraphExec,
9524 hNode: CUgraphNode,
9525 nodeParams: *const CUDA_BATCH_MEM_OP_NODE_PARAMS,
9526 ) -> CUresult;
9527}
9528extern "C" {
9529 #[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 ::cuGraphAddNode,\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"]
9530 pub fn cuGraphAddMemAllocNode(
9531 phGraphNode: *mut CUgraphNode,
9532 hGraph: CUgraph,
9533 dependencies: *const CUgraphNode,
9534 numDependencies: usize,
9535 nodeParams: *mut CUDA_MEM_ALLOC_NODE_PARAMS,
9536 ) -> CUresult;
9537}
9538extern "C" {
9539 #[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"]
9540 pub fn cuGraphMemAllocNodeGetParams(
9541 hNode: CUgraphNode,
9542 params_out: *mut CUDA_MEM_ALLOC_NODE_PARAMS,
9543 ) -> CUresult;
9544}
9545extern "C" {
9546 #[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 ::cuGraphAddNode,\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"]
9547 pub fn cuGraphAddMemFreeNode(
9548 phGraphNode: *mut CUgraphNode,
9549 hGraph: CUgraph,
9550 dependencies: *const CUgraphNode,
9551 numDependencies: usize,
9552 dptr: CUdeviceptr,
9553 ) -> CUresult;
9554}
9555extern "C" {
9556 #[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"]
9557 pub fn cuGraphMemFreeNodeGetParams(hNode: CUgraphNode, dptr_out: *mut CUdeviceptr) -> CUresult;
9558}
9559extern "C" {
9560 #[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"]
9561 pub fn cuDeviceGraphMemTrim(device: CUdevice) -> CUresult;
9562}
9563extern "C" {
9564 #[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"]
9565 pub fn cuDeviceGetGraphMemAttribute(
9566 device: CUdevice,
9567 attr: CUgraphMem_attribute,
9568 value: *mut ::std::os::raw::c_void,
9569 ) -> CUresult;
9570}
9571extern "C" {
9572 #[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"]
9573 pub fn cuDeviceSetGraphMemAttribute(
9574 device: CUdevice,
9575 attr: CUgraphMem_attribute,
9576 value: *mut ::std::os::raw::c_void,
9577 ) -> CUresult;
9578}
9579extern "C" {
9580 #[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"]
9581 pub fn cuGraphClone(phGraphClone: *mut CUgraph, originalGraph: CUgraph) -> CUresult;
9582}
9583extern "C" {
9584 #[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"]
9585 pub fn cuGraphNodeFindInClone(
9586 phNode: *mut CUgraphNode,
9587 hOriginalNode: CUgraphNode,
9588 hClonedGraph: CUgraph,
9589 ) -> CUresult;
9590}
9591extern "C" {
9592 #[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"]
9593 pub fn cuGraphNodeGetType(hNode: CUgraphNode, type_: *mut CUgraphNodeType) -> CUresult;
9594}
9595extern "C" {
9596 #[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"]
9597 pub fn cuGraphGetNodes(
9598 hGraph: CUgraph,
9599 nodes: *mut CUgraphNode,
9600 numNodes: *mut usize,
9601 ) -> CUresult;
9602}
9603extern "C" {
9604 #[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"]
9605 pub fn cuGraphGetRootNodes(
9606 hGraph: CUgraph,
9607 rootNodes: *mut CUgraphNode,
9608 numRootNodes: *mut usize,
9609 ) -> CUresult;
9610}
9611extern "C" {
9612 #[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"]
9613 pub fn cuGraphGetEdges(
9614 hGraph: CUgraph,
9615 from: *mut CUgraphNode,
9616 to: *mut CUgraphNode,
9617 numEdges: *mut usize,
9618 ) -> CUresult;
9619}
9620extern "C" {
9621 #[doc = " \\brief Returns a graph's dependency edges (12.3+)\n\n Returns a list of \\p hGraph's dependency edges. Edges are returned via corresponding\n indices in \\p from, \\p to and \\p edgeData; that is, the node in \\p to[i] has a\n dependency on the node in \\p from[i] with data \\p edgeData[i]. \\p from and \\p to may\n both be NULL, in which case this function only returns the number of edges in\n \\p numEdges. Otherwise, \\p numEdges entries will be filled in. If \\p numEdges is higher\n than the actual number of edges, the remaining entries in \\p from and \\p to will be\n set to NULL, and the number of edges actually returned will be written to \\p numEdges.\n \\p edgeData may alone be NULL, in which case the edges must all have default (zeroed)\n edge data. Attempting a lossy query via NULL \\p edgeData will result in\n ::CUDA_ERROR_LOSSY_QUERY. If \\p edgeData is non-NULL then \\p from and \\p to must be\n as well.\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 edgeData - Optional location to return edge data\n \\param numEdges - See description\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_LOSSY_QUERY,\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"]
9622 pub fn cuGraphGetEdges_v2(
9623 hGraph: CUgraph,
9624 from: *mut CUgraphNode,
9625 to: *mut CUgraphNode,
9626 edgeData: *mut CUgraphEdgeData,
9627 numEdges: *mut usize,
9628 ) -> CUresult;
9629}
9630extern "C" {
9631 #[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"]
9632 pub fn cuGraphNodeGetDependencies(
9633 hNode: CUgraphNode,
9634 dependencies: *mut CUgraphNode,
9635 numDependencies: *mut usize,
9636 ) -> CUresult;
9637}
9638extern "C" {
9639 #[doc = " \\brief Returns a node's dependencies (12.3+)\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 Note that if an edge has non-zero (non-default) edge data and \\p edgeData is NULL,\n this API will return ::CUDA_ERROR_LOSSY_QUERY. If \\p edgeData is non-NULL, then\n \\p dependencies must be as well.\n\n \\param hNode - Node to query\n \\param dependencies - Pointer to return the dependencies\n \\param edgeData - Optional array to return edge data for each dependency\n \\param numDependencies - See description\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_LOSSY_QUERY,\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"]
9640 pub fn cuGraphNodeGetDependencies_v2(
9641 hNode: CUgraphNode,
9642 dependencies: *mut CUgraphNode,
9643 edgeData: *mut CUgraphEdgeData,
9644 numDependencies: *mut usize,
9645 ) -> CUresult;
9646}
9647extern "C" {
9648 #[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"]
9649 pub fn cuGraphNodeGetDependentNodes(
9650 hNode: CUgraphNode,
9651 dependentNodes: *mut CUgraphNode,
9652 numDependentNodes: *mut usize,
9653 ) -> CUresult;
9654}
9655extern "C" {
9656 #[doc = " \\brief Returns a node's dependent nodes (12.3+)\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 Note that if an edge has non-zero (non-default) edge data and \\p edgeData is NULL,\n this API will return ::CUDA_ERROR_LOSSY_QUERY. If \\p edgeData is non-NULL, then\n \\p dependentNodes must be as well.\n\n \\param hNode - Node to query\n \\param dependentNodes - Pointer to return the dependent nodes\n \\param edgeData - Optional pointer to return edge data for dependent nodes\n \\param numDependentNodes - See description\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_LOSSY_QUERY,\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"]
9657 pub fn cuGraphNodeGetDependentNodes_v2(
9658 hNode: CUgraphNode,
9659 dependentNodes: *mut CUgraphNode,
9660 edgeData: *mut CUgraphEdgeData,
9661 numDependentNodes: *mut usize,
9662 ) -> CUresult;
9663}
9664extern "C" {
9665 #[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"]
9666 pub fn cuGraphAddDependencies(
9667 hGraph: CUgraph,
9668 from: *const CUgraphNode,
9669 to: *const CUgraphNode,
9670 numDependencies: usize,
9671 ) -> CUresult;
9672}
9673extern "C" {
9674 #[doc = " \\brief Adds dependency edges to a graph (12.3+)\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 edgeData - Optional array of edge data. If NULL, default (zeroed) edge data is assumed.\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"]
9675 pub fn cuGraphAddDependencies_v2(
9676 hGraph: CUgraph,
9677 from: *const CUgraphNode,
9678 to: *const CUgraphNode,
9679 edgeData: *const CUgraphEdgeData,
9680 numDependencies: usize,
9681 ) -> CUresult;
9682}
9683extern "C" {
9684 #[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"]
9685 pub fn cuGraphRemoveDependencies(
9686 hGraph: CUgraph,
9687 from: *const CUgraphNode,
9688 to: *const CUgraphNode,
9689 numDependencies: usize,
9690 ) -> CUresult;
9691}
9692extern "C" {
9693 #[doc = " \\brief Removes dependency edges from a graph (12.3+)\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 an edge that does not exist in the graph, with data matching\n \\p edgeData, results in an error. \\p edgeData is nullable, which is equivalent\n to passing default (zeroed) data for each edge.\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 edgeData - Optional array of edge data. If NULL, edge data is assumed to\n be default (zeroed).\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"]
9694 pub fn cuGraphRemoveDependencies_v2(
9695 hGraph: CUgraph,
9696 from: *const CUgraphNode,
9697 to: *const CUgraphNode,
9698 edgeData: *const CUgraphEdgeData,
9699 numDependencies: usize,
9700 ) -> CUresult;
9701}
9702extern "C" {
9703 #[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"]
9704 pub fn cuGraphDestroyNode(hNode: CUgraphNode) -> CUresult;
9705}
9706extern "C" {
9707 #[doc = " \\brief Creates an executable graph from a graph\n\n Instantiates \\p hGraph as an executable graph. The graph is validated for any\n structural constraints or intra-node constraints which were not previously\n validated. If instantiation is successful, a handle to the instantiated graph\n is returned in \\p phGraphExec.\n\n The \\p flags parameter 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_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\n a second executable graph before destroying the first with ::cuGraphExecDestroy\n will result in an error.\n The same also applies if \\p hGraph contains any device-updatable kernel nodes.\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 - The graph cannot be empty and must contain at least one kernel, memcpy, or memset node.\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 \\param phGraphExec - Returns instantiated graph\n \\param hGraph - Graph to instantiate\n \\param flags - Flags to control instantiation. See ::CUgraphInstantiate_flags.\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 ::cuGraphCreate,\n ::cuGraphUpload,\n ::cuGraphLaunch,\n ::cuGraphExecDestroy"]
9708 pub fn cuGraphInstantiateWithFlags(
9709 phGraphExec: *mut CUgraphExec,
9710 hGraph: CUgraph,
9711 flags: ::std::os::raw::c_ulonglong,
9712 ) -> CUresult;
9713}
9714extern "C" {
9715 #[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 The same also applies if \\p hGraph contains any device-updatable kernel nodes.\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 - The graph cannot be empty and must contain at least one kernel, memcpy, or memset node.\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"]
9716 pub fn cuGraphInstantiateWithParams(
9717 phGraphExec: *mut CUgraphExec,
9718 hGraph: CUgraph,
9719 instantiateParams: *mut CUDA_GRAPH_INSTANTIATE_PARAMS,
9720 ) -> CUresult;
9721}
9722extern "C" {
9723 #[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"]
9724 pub fn cuGraphExecGetFlags(hGraphExec: CUgraphExec, flags: *mut cuuint64_t) -> CUresult;
9725}
9726extern "C" {
9727 #[doc = " \\brief Sets the parameters for a kernel node in the given graphExec\n\n Sets the parameters of a kernel 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. All \\p nodeParams\n fields may change, but the following restrictions apply to \\p func updates:\n\n - The owning context of the function cannot change.\n - A node whose function originally did not use CUDA dynamic parallelism cannot be updated\n to a function which uses CDP\n - A node whose function originally did not make device-side update calls cannot be updated\n to a function which makes device-side update calls.\n - If \\p hGraphExec was not instantiated for device launch, a node whose function originally\n did not use device-side cudaGraphLaunch() cannot be updated to a function which uses\n device-side cudaGraphLaunch() unless the node resides on the same context as nodes which\n contained such calls at instantiate-time. If no such calls were present at instantiation,\n these updates cannot be performed at all.\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 If \\p hNode is a device-updatable kernel node, the next upload/launch of \\p hGraphExec\n will overwrite any previous device-side updates. Additionally, applying host updates to a\n device-updatable kernel node while it is being updated from the device will result in\n undefined behavior.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param hNode - kernel 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 ::cuGraphExecNodeSetParams,\n ::cuGraphAddKernelNode,\n ::cuGraphKernelNodeSetParams,\n ::cuGraphExecMemcpyNodeSetParams,\n ::cuGraphExecMemsetNodeSetParams,\n ::cuGraphExecHostNodeSetParams,\n ::cuGraphExecChildGraphNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9728 pub fn cuGraphExecKernelNodeSetParams_v2(
9729 hGraphExec: CUgraphExec,
9730 hNode: CUgraphNode,
9731 nodeParams: *const CUDA_KERNEL_NODE_PARAMS,
9732 ) -> CUresult;
9733}
9734extern "C" {
9735 #[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 ::cuGraphExecNodeSetParams,\n ::cuGraphAddMemcpyNode,\n ::cuGraphMemcpyNodeSetParams,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemsetNodeSetParams,\n ::cuGraphExecHostNodeSetParams,\n ::cuGraphExecChildGraphNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9736 pub fn cuGraphExecMemcpyNodeSetParams(
9737 hGraphExec: CUgraphExec,
9738 hNode: CUgraphNode,
9739 copyParams: *const CUDA_MEMCPY3D,
9740 ctx: CUcontext,
9741 ) -> CUresult;
9742}
9743extern "C" {
9744 #[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 Zero sized operations are not supported.\n\n The new destination pointer in memsetParams must be to the same kind of allocation\n as the original destination pointer and have the same context association and device mapping\n as the original destination pointer.\n\n Both the value and pointer address may be updated.\n Changing other aspects of the memset (width, height, element size or pitch) may cause the update to be rejected.\n Specifically, for 2d memsets, all dimension changes are rejected.\n For 1d memsets, changes in height are explicitly rejected and other changes are oportunistically allowed\n if the resulting work maps onto the work resources already allocated for the node.\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 - 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 ::cuGraphExecNodeSetParams,\n ::cuGraphAddMemsetNode,\n ::cuGraphMemsetNodeSetParams,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemcpyNodeSetParams,\n ::cuGraphExecHostNodeSetParams,\n ::cuGraphExecChildGraphNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9745 pub fn cuGraphExecMemsetNodeSetParams(
9746 hGraphExec: CUgraphExec,
9747 hNode: CUgraphNode,
9748 memsetParams: *const CUDA_MEMSET_NODE_PARAMS,
9749 ctx: CUcontext,
9750 ) -> CUresult;
9751}
9752extern "C" {
9753 #[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 ::cuGraphExecNodeSetParams,\n ::cuGraphAddHostNode,\n ::cuGraphHostNodeSetParams,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemcpyNodeSetParams,\n ::cuGraphExecMemsetNodeSetParams,\n ::cuGraphExecChildGraphNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9754 pub fn cuGraphExecHostNodeSetParams(
9755 hGraphExec: CUgraphExec,
9756 hNode: CUgraphNode,
9757 nodeParams: *const CUDA_HOST_NODE_PARAMS,
9758 ) -> CUresult;
9759}
9760extern "C" {
9761 #[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 ::cuGraphExecNodeSetParams,\n ::cuGraphAddChildGraphNode,\n ::cuGraphChildGraphNodeGetGraph,\n ::cuGraphExecKernelNodeSetParams,\n ::cuGraphExecMemcpyNodeSetParams,\n ::cuGraphExecMemsetNodeSetParams,\n ::cuGraphExecHostNodeSetParams,\n ::cuGraphExecEventRecordNodeSetEvent,\n ::cuGraphExecEventWaitNodeSetEvent,\n ::cuGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cuGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9762 pub fn cuGraphExecChildGraphNodeSetParams(
9763 hGraphExec: CUgraphExec,
9764 hNode: CUgraphNode,
9765 childGraph: CUgraph,
9766 ) -> CUresult;
9767}
9768extern "C" {
9769 #[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 ::cuGraphExecNodeSetParams,\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"]
9770 pub fn cuGraphExecEventRecordNodeSetEvent(
9771 hGraphExec: CUgraphExec,
9772 hNode: CUgraphNode,
9773 event: CUevent,
9774 ) -> CUresult;
9775}
9776extern "C" {
9777 #[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 ::cuGraphExecNodeSetParams,\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"]
9778 pub fn cuGraphExecEventWaitNodeSetEvent(
9779 hGraphExec: CUgraphExec,
9780 hNode: CUgraphNode,
9781 event: CUevent,
9782 ) -> CUresult;
9783}
9784extern "C" {
9785 #[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 ::cuGraphExecNodeSetParams,\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"]
9786 pub fn cuGraphExecExternalSemaphoresSignalNodeSetParams(
9787 hGraphExec: CUgraphExec,
9788 hNode: CUgraphNode,
9789 nodeParams: *const CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,
9790 ) -> CUresult;
9791}
9792extern "C" {
9793 #[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 ::cuGraphExecNodeSetParams,\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"]
9794 pub fn cuGraphExecExternalSemaphoresWaitNodeSetParams(
9795 hGraphExec: CUgraphExec,
9796 hNode: CUgraphNode,
9797 nodeParams: *const CUDA_EXT_SEM_WAIT_NODE_PARAMS,
9798 ) -> CUresult;
9799}
9800extern "C" {
9801 #[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 If \\p hNode is a device-updatable kernel node, the next upload/launch of \\p hGraphExec\n will overwrite any previous device-side updates. Additionally, applying host updates to a\n device-updatable kernel node while it is being updated from the device will result in\n undefined behavior.\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"]
9802 pub fn cuGraphNodeSetEnabled(
9803 hGraphExec: CUgraphExec,
9804 hNode: CUgraphNode,
9805 isEnabled: ::std::os::raw::c_uint,
9806 ) -> CUresult;
9807}
9808extern "C" {
9809 #[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 \\note This function will not reflect device-side updates for device-updatable kernel nodes.\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"]
9810 pub fn cuGraphNodeGetEnabled(
9811 hGraphExec: CUgraphExec,
9812 hNode: CUgraphNode,
9813 isEnabled: *mut ::std::os::raw::c_uint,
9814 ) -> CUresult;
9815}
9816extern "C" {
9817 #[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"]
9818 pub fn cuGraphUpload(hGraphExec: CUgraphExec, hStream: CUstream) -> CUresult;
9819}
9820extern "C" {
9821 #[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"]
9822 pub fn cuGraphLaunch(hGraphExec: CUgraphExec, hStream: CUstream) -> CUresult;
9823}
9824extern "C" {
9825 #[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"]
9826 pub fn cuGraphExecDestroy(hGraphExec: CUgraphExec) -> CUresult;
9827}
9828extern "C" {
9829 #[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"]
9830 pub fn cuGraphDestroy(hGraph: CUgraph) -> CUresult;
9831}
9832extern "C" {
9833 #[doc = " \\brief Check whether an executable graph can be updated with a graph and perform the update if possible\n\n Updates the node parameters in the instantiated graph specified by \\p hGraphExec with the\n node parameters in a topologically identical graph specified by \\p hGraph.\n\n Limitations:\n\n - Kernel nodes:\n - The owning context of the function cannot change.\n - A node whose function originally did not use CUDA dynamic parallelism cannot be updated\n to a function which uses CDP.\n - A node whose function originally did not make device-side update calls cannot be updated\n to a function which makes device-side update calls.\n - A cooperative node cannot be updated to a non-cooperative node, and vice-versa.\n - If the graph was instantiated with CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY, the\n priority attribute cannot change. Equality is checked on the originally requested\n priority values, before they are clamped to the device's supported range.\n - If \\p hGraphExec was not instantiated for device launch, a node whose function originally\n did not use device-side cudaGraphLaunch() cannot be updated to a function which uses\n device-side cudaGraphLaunch() unless the node resides on the same context as nodes which\n contained such calls at instantiate-time. If no such calls were present at instantiation,\n these updates cannot be performed at all.\n - Neither \\p hGraph nor \\p hGraphExec may contain device-updatable kernel nodes.\n - Memset and memcpy nodes:\n - The CUDA device(s) to which the operand(s) was allocated/mapped cannot change.\n - The source/destination memory must be allocated from the same contexts as the original\n source/destination memory.\n - For 2d memsets, only address and assinged value may be updated.\n - For 1d memsets, updating dimensions is also allowed, but may fail if the resulting operation doesn't\n map onto the work resources already allocated for the node.\n - Additional memcpy node restrictions:\n - Changing either the source or destination memory type(i.e. CU_MEMORYTYPE_DEVICE,\n CU_MEMORYTYPE_ARRAY, etc.) is not supported.\n - External semaphore wait nodes and record nodes:\n - Changing the number of semaphores is not supported.\n - Conditional nodes:\n - Changing node parameters is not supported.\n - Changeing parameters of nodes within the conditional body graph is subject to the rules above.\n - Conditional handle flags and default values are updated as part of the graph update.\n\n Note: The API may add further restrictions in future releases. The return code should always be checked.\n\n cuGraphExecUpdate sets the result member of \\p resultInfo to CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED\n under the following conditions:\n - The count of nodes directly in \\p hGraphExec and \\p hGraph differ, in which case resultInfo->errorNode\n is set to NULL.\n - \\p hGraph has more exit nodes than \\p hGraph, in which case resultInfo->errorNode is set to one of\n the exit nodes in hGraph.\n - A node in \\p hGraph has a different number of dependencies than the node from \\p hGraphExec it is paired with,\n in which case resultInfo->errorNode is set to the node from \\p hGraph.\n - A node in \\p hGraph has a dependency that does not match with the corresponding dependency of the paired node\n from \\p hGraphExec. resultInfo->errorNode will be set to the node from \\p hGraph. resultInfo->errorFromNode\n will be set to the mismatched dependency. The dependencies are paired based on edge order and a dependency\n does not match when the nodes are already paired based on other edges examined in the graph.\n\n cuGraphExecUpdate sets the result member of \\p resultInfo to:\n - CU_GRAPH_EXEC_UPDATE_ERROR if passed an invalid value.\n - CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED if the graph topology changed\n - CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED if the type of a node changed, in which case\n \\p hErrorNode_out is set to the node from \\p hGraph.\n - CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE if the function changed in an unsupported\n way(see note above), in which case \\p hErrorNode_out is set to the node from \\p hGraph\n - CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED if any parameters to a node changed in a way\n that is not supported, in which case \\p hErrorNode_out is set to the node from \\p hGraph.\n - CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED if any attributes of a node changed in a way\n that is not supported, in which case \\p hErrorNode_out is set to the node from \\p hGraph.\n - CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED if something about a node is unsupported, like\n the node's type or configuration, in which case \\p hErrorNode_out is set to the node from \\p hGraph\n\n If the update fails for a reason not listed above, the result member of \\p resultInfo will be set\n to CU_GRAPH_EXEC_UPDATE_ERROR. If the update succeeds, the result member will be set to CU_GRAPH_EXEC_UPDATE_SUCCESS.\n\n cuGraphExecUpdate returns CUDA_SUCCESS when the updated was performed successfully. It returns\n CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE if the graph update was not performed because it included\n changes which violated constraints specific to instantiated graph update.\n\n \\param hGraphExec The instantiated graph to be updated\n \\param hGraph The graph containing the updated parameters\n \\param resultInfo the error info structure\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE,\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphInstantiate"]
9834 pub fn cuGraphExecUpdate_v2(
9835 hGraphExec: CUgraphExec,
9836 hGraph: CUgraph,
9837 resultInfo: *mut CUgraphExecUpdateResultInfo,
9838 ) -> CUresult;
9839}
9840extern "C" {
9841 #[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"]
9842 pub fn cuGraphKernelNodeCopyAttributes(dst: CUgraphNode, src: CUgraphNode) -> CUresult;
9843}
9844extern "C" {
9845 #[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"]
9846 pub fn cuGraphKernelNodeGetAttribute(
9847 hNode: CUgraphNode,
9848 attr: CUkernelNodeAttrID,
9849 value_out: *mut CUkernelNodeAttrValue,
9850 ) -> CUresult;
9851}
9852extern "C" {
9853 #[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"]
9854 pub fn cuGraphKernelNodeSetAttribute(
9855 hNode: CUgraphNode,
9856 attr: CUkernelNodeAttrID,
9857 value: *const CUkernelNodeAttrValue,
9858 ) -> CUresult;
9859}
9860extern "C" {
9861 #[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"]
9862 pub fn cuGraphDebugDotPrint(
9863 hGraph: CUgraph,
9864 path: *const ::std::os::raw::c_char,
9865 flags: ::std::os::raw::c_uint,
9866 ) -> CUresult;
9867}
9868extern "C" {
9869 #[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"]
9870 pub fn cuUserObjectCreate(
9871 object_out: *mut CUuserObject,
9872 ptr: *mut ::std::os::raw::c_void,
9873 destroy: CUhostFn,
9874 initialRefcount: ::std::os::raw::c_uint,
9875 flags: ::std::os::raw::c_uint,
9876 ) -> CUresult;
9877}
9878extern "C" {
9879 #[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"]
9880 pub fn cuUserObjectRetain(object: CUuserObject, count: ::std::os::raw::c_uint) -> CUresult;
9881}
9882extern "C" {
9883 #[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"]
9884 pub fn cuUserObjectRelease(object: CUuserObject, count: ::std::os::raw::c_uint) -> CUresult;
9885}
9886extern "C" {
9887 #[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"]
9888 pub fn cuGraphRetainUserObject(
9889 graph: CUgraph,
9890 object: CUuserObject,
9891 count: ::std::os::raw::c_uint,
9892 flags: ::std::os::raw::c_uint,
9893 ) -> CUresult;
9894}
9895extern "C" {
9896 #[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"]
9897 pub fn cuGraphReleaseUserObject(
9898 graph: CUgraph,
9899 object: CUuserObject,
9900 count: ::std::os::raw::c_uint,
9901 ) -> CUresult;
9902}
9903extern "C" {
9904 #[doc = " \\brief Adds a node of arbitrary type to a graph\n\n Creates a new node in \\p hGraph described by \\p nodeParams with \\p numDependencies\n dependencies specified via \\p dependencies. \\p numDependencies may be 0.\n \\p dependencies may be null if \\p numDependencies is 0. \\p dependencies may not have\n any duplicate entries.\n\n \\p nodeParams is a tagged union. The node type should be specified in the \\p type field,\n and type-specific parameters in the corresponding union member. All unused bytes - that\n is, \\p reserved0 and all bytes past the utilized union member - must be set to zero.\n It is recommended to use brace initialization or memset to ensure all bytes are\n initialized.\n\n Note that for some node types, \\p nodeParams may contain \"out parameters\" which are\n modified during the call, such as \\p nodeParams->alloc.dptr.\n\n A handle 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 - Specification of the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphCreate,\n ::cuGraphNodeSetParams,\n ::cuGraphExecNodeSetParams"]
9905 pub fn cuGraphAddNode(
9906 phGraphNode: *mut CUgraphNode,
9907 hGraph: CUgraph,
9908 dependencies: *const CUgraphNode,
9909 numDependencies: usize,
9910 nodeParams: *mut CUgraphNodeParams,
9911 ) -> CUresult;
9912}
9913extern "C" {
9914 #[doc = " \\brief Adds a node of arbitrary type to a graph (12.3+)\n\n Creates a new node in \\p hGraph described by \\p nodeParams with \\p numDependencies\n dependencies specified via \\p dependencies. \\p numDependencies may be 0.\n \\p dependencies may be null if \\p numDependencies is 0. \\p dependencies may not have\n any duplicate entries.\n\n \\p nodeParams is a tagged union. The node type should be specified in the \\p type field,\n and type-specific parameters in the corresponding union member. All unused bytes - that\n is, \\p reserved0 and all bytes past the utilized union member - must be set to zero.\n It is recommended to use brace initialization or memset to ensure all bytes are\n initialized.\n\n Note that for some node types, \\p nodeParams may contain \"out parameters\" which are\n modified during the call, such as \\p nodeParams->alloc.dptr.\n\n A handle 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 dependencyData - Optional edge data for the dependencies. If NULL, the data is\n assumed to be default (zeroed) for all dependencies.\n \\param numDependencies - Number of dependencies\n \\param nodeParams - Specification of the node\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphCreate,\n ::cuGraphNodeSetParams,\n ::cuGraphExecNodeSetParams"]
9915 pub fn cuGraphAddNode_v2(
9916 phGraphNode: *mut CUgraphNode,
9917 hGraph: CUgraph,
9918 dependencies: *const CUgraphNode,
9919 dependencyData: *const CUgraphEdgeData,
9920 numDependencies: usize,
9921 nodeParams: *mut CUgraphNodeParams,
9922 ) -> CUresult;
9923}
9924extern "C" {
9925 #[doc = " \\brief Update's a graph node's parameters\n\n Sets the parameters of graph node \\p hNode to \\p nodeParams. The node type specified by\n \\p nodeParams->type must match the type of \\p hNode. \\p nodeParams must be fully\n initialized and all unused bytes (reserved, padding) zeroed.\n\n Modifying parameters is not supported for node types CU_GRAPH_NODE_TYPE_MEM_ALLOC and\n CU_GRAPH_NODE_TYPE_MEM_FREE.\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_NOT_SUPPORTED\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddNode,\n ::cuGraphExecNodeSetParams"]
9926 pub fn cuGraphNodeSetParams(hNode: CUgraphNode, nodeParams: *mut CUgraphNodeParams)
9927 -> CUresult;
9928}
9929extern "C" {
9930 #[doc = " \\brief Update's a graph node's parameters in an instantiated graph\n\n Sets the parameters of a node in an executable graph \\p hGraphExec. The node is identified\n by the corresponding node \\p hNode in the non-executable graph from which the executable\n graph was instantiated. \\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 Allowed changes to parameters on executable graphs are as follows:\n <table>\n <tr><th>Node type<th>Allowed changes\n <tr><td>kernel<td>See ::cuGraphExecKernelNodeSetParams\n <tr><td>memcpy<td>Addresses for 1-dimensional copies if allocated in same context; see ::cuGraphExecMemcpyNodeSetParams\n <tr><td>memset<td>Addresses for 1-dimensional memsets if allocated in same context; see ::cuGraphExecMemsetNodeSetParams\n <tr><td>host<td>Unrestricted\n <tr><td>child graph<td>Topology must match and restrictions apply recursively; see ::cuGraphExecUpdate\n <tr><td>event wait<td>Unrestricted\n <tr><td>event record<td>Unrestricted\n <tr><td>external semaphore signal<td>Number of semaphore operations cannot change\n <tr><td>external semaphore wait<td>Number of semaphore operations cannot change\n <tr><td>memory allocation<td>API unsupported\n <tr><td>memory free<td>API unsupported\n <tr><td>batch memops<td>Addresses, values, and operation type for wait operations; see ::cuGraphExecBatchMemOpNodeSetParams\n </table>\n\n \\param hGraphExec - The executable graph in which to update the specified node\n \\param hNode - Corresponding 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 ::CUDA_ERROR_NOT_SUPPORTED\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddNode,\n ::cuGraphNodeSetParams\n ::cuGraphExecUpdate,\n ::cuGraphInstantiate"]
9931 pub fn cuGraphExecNodeSetParams(
9932 hGraphExec: CUgraphExec,
9933 hNode: CUgraphNode,
9934 nodeParams: *mut CUgraphNodeParams,
9935 ) -> CUresult;
9936}
9937extern "C" {
9938 #[doc = " \\brief Create a conditional handle\n\n Creates a conditional handle associated with \\p hGraph.\n\n The conditional handle must be associated with a conditional node in this graph or one of its children.\n\n Handles not associated with a conditional node may cause graph instantiation to fail.\n\n Handles can only be set from the context with which they are associated.\n\n \\param pHandle_out - Pointer used to return the handle to the caller.\n \\param hGraph - Graph which will contain the conditional node using this handle.\n \\param ctx - Context for the handle and associated conditional node.\n \\param defaultLaunchValue - Optional initial value for the conditional variable.\n \\param flags - Currently must be CU_GRAPH_COND_ASSIGN_DEFAULT or 0.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddNode"]
9939 pub fn cuGraphConditionalHandleCreate(
9940 pHandle_out: *mut CUgraphConditionalHandle,
9941 hGraph: CUgraph,
9942 ctx: CUcontext,
9943 defaultLaunchValue: ::std::os::raw::c_uint,
9944 flags: ::std::os::raw::c_uint,
9945 ) -> CUresult;
9946}
9947extern "C" {
9948 #[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 Note that the API can also be used with 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 use for calculations\n will be the current context.\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"]
9949 pub fn cuOccupancyMaxActiveBlocksPerMultiprocessor(
9950 numBlocks: *mut ::std::os::raw::c_int,
9951 func: CUfunction,
9952 blockSize: ::std::os::raw::c_int,
9953 dynamicSMemSize: usize,
9954 ) -> CUresult;
9955}
9956extern "C" {
9957 #[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 Note that the API can also be with 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 use for calculations\n will be the current context.\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"]
9958 pub fn cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
9959 numBlocks: *mut ::std::os::raw::c_int,
9960 func: CUfunction,
9961 blockSize: ::std::os::raw::c_int,
9962 dynamicSMemSize: usize,
9963 flags: ::std::os::raw::c_uint,
9964 ) -> CUresult;
9965}
9966extern "C" {
9967 #[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 Note that the API can also be used with 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 use for calculations\n will be the current context.\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"]
9968 pub fn cuOccupancyMaxPotentialBlockSize(
9969 minGridSize: *mut ::std::os::raw::c_int,
9970 blockSize: *mut ::std::os::raw::c_int,
9971 func: CUfunction,
9972 blockSizeToDynamicSMemSize: CUoccupancyB2DSize,
9973 dynamicSMemSize: usize,
9974 blockSizeLimit: ::std::os::raw::c_int,
9975 ) -> CUresult;
9976}
9977extern "C" {
9978 #[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 Note that the API can also be used with 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 use for calculations\n will be the current context.\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"]
9979 pub fn cuOccupancyMaxPotentialBlockSizeWithFlags(
9980 minGridSize: *mut ::std::os::raw::c_int,
9981 blockSize: *mut ::std::os::raw::c_int,
9982 func: CUfunction,
9983 blockSizeToDynamicSMemSize: CUoccupancyB2DSize,
9984 dynamicSMemSize: usize,
9985 blockSizeLimit: ::std::os::raw::c_int,
9986 flags: ::std::os::raw::c_uint,
9987 ) -> CUresult;
9988}
9989extern "C" {
9990 #[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 Note that the API can also be used with 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 use for calculations\n will be the current context.\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"]
9991 pub fn cuOccupancyAvailableDynamicSMemPerBlock(
9992 dynamicSmemSize: *mut usize,
9993 func: CUfunction,
9994 numBlocks: ::std::os::raw::c_int,
9995 blockSize: ::std::os::raw::c_int,
9996 ) -> CUresult;
9997}
9998extern "C" {
9999 #[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 Note that the API can also be used with 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 use for calculations\n will either be taken from the specified stream \\p config->hStream\n or the current context in case of NULL stream.\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"]
10000 pub fn cuOccupancyMaxPotentialClusterSize(
10001 clusterSize: *mut ::std::os::raw::c_int,
10002 func: CUfunction,
10003 config: *const CUlaunchConfig,
10004 ) -> CUresult;
10005}
10006extern "C" {
10007 #[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 Note that the API can also be used with 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 use for calculations\n will either be taken from the specified stream \\p config->hStream\n or the current context in case of NULL stream.\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"]
10008 pub fn cuOccupancyMaxActiveClusters(
10009 numClusters: *mut ::std::os::raw::c_int,
10010 func: CUfunction,
10011 config: *const CUlaunchConfig,
10012 ) -> CUresult;
10013}
10014extern "C" {
10015 #[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"]
10016 pub fn cuTexRefSetArray(
10017 hTexRef: CUtexref,
10018 hArray: CUarray,
10019 Flags: ::std::os::raw::c_uint,
10020 ) -> CUresult;
10021}
10022extern "C" {
10023 #[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"]
10024 pub fn cuTexRefSetMipmappedArray(
10025 hTexRef: CUtexref,
10026 hMipmappedArray: CUmipmappedArray,
10027 Flags: ::std::os::raw::c_uint,
10028 ) -> CUresult;
10029}
10030extern "C" {
10031 #[doc = " \\brief Binds an address as a texture reference\n\n \\deprecated\n\n Binds a linear address range 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. Any memory previously bound to \\p hTexRef\n is unbound.\n\n Since the hardware enforces an alignment requirement on texture base\n addresses, ::cuTexRefSetAddress() passes back a byte offset in\n \\p *ByteOffset that must be applied to texture fetches in order to read from\n the desired memory. This offset must be divided by the texel size and\n passed to kernels that read from the texture so they can be applied to the\n ::tex1Dfetch() function.\n\n If the device memory pointer was returned from ::cuMemAlloc(), the offset\n is guaranteed to be 0 and NULL may be passed as the \\p ByteOffset parameter.\n\n The total number of elements (or texels) in the linear address range\n cannot exceed ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH.\n The number of elements is computed as (\\p bytes / bytesPerElement),\n where bytesPerElement is determined from the data format and number of\n components set using ::cuTexRefSetFormat().\n\n \\param ByteOffset - Returned byte offset\n \\param hTexRef - Texture reference to bind\n \\param dptr - Device pointer to bind\n \\param bytes - Size of memory to bind 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\n \\sa\n ::cuTexRefSetAddress2D, ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10032 pub fn cuTexRefSetAddress_v2(
10033 ByteOffset: *mut usize,
10034 hTexRef: CUtexref,
10035 dptr: CUdeviceptr,
10036 bytes: usize,
10037 ) -> CUresult;
10038}
10039extern "C" {
10040 #[doc = " \\brief Binds an address as a 2D texture reference\n\n \\deprecated\n\n Binds a linear address range 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. Any memory previously bound to \\p hTexRef\n is unbound.\n\n Using a ::tex2D() function inside a kernel requires a call to either\n ::cuTexRefSetArray() to bind the corresponding texture reference to an\n array, or ::cuTexRefSetAddress2D() to bind the texture reference to linear\n memory.\n\n Function calls to ::cuTexRefSetFormat() cannot follow calls to\n ::cuTexRefSetAddress2D() for the same texture reference.\n\n It is required that \\p dptr be aligned to the appropriate hardware-specific\n texture alignment. You can query this value using the device attribute\n ::CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT. If an unaligned \\p dptr is\n supplied, ::CUDA_ERROR_INVALID_VALUE is returned.\n\n \\p Pitch has to be aligned to the hardware-specific texture pitch alignment.\n This value can be queried using the device attribute\n ::CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT. If an unaligned \\p Pitch is\n supplied, ::CUDA_ERROR_INVALID_VALUE is returned.\n\n Width and Height, which are specified in elements (or texels), cannot exceed\n ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH and\n ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT respectively.\n \\p Pitch, which is specified in bytes, cannot exceed\n ::CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH.\n\n \\param hTexRef - Texture reference to bind\n \\param desc - Descriptor of CUDA array\n \\param dptr - Device pointer to bind\n \\param Pitch - Line pitch 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\n \\sa\n ::cuTexRefSetAddress,\n ::cuTexRefSetAddressMode, ::cuTexRefSetArray,\n ::cuTexRefSetFilterMode, ::cuTexRefSetFlags, ::cuTexRefSetFormat,\n ::cuTexRefGetAddress, ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10041 pub fn cuTexRefSetAddress2D_v3(
10042 hTexRef: CUtexref,
10043 desc: *const CUDA_ARRAY_DESCRIPTOR,
10044 dptr: CUdeviceptr,
10045 Pitch: usize,
10046 ) -> CUresult;
10047}
10048extern "C" {
10049 #[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"]
10050 pub fn cuTexRefSetFormat(
10051 hTexRef: CUtexref,
10052 fmt: CUarray_format,
10053 NumPackedComponents: ::std::os::raw::c_int,
10054 ) -> CUresult;
10055}
10056extern "C" {
10057 #[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"]
10058 pub fn cuTexRefSetAddressMode(
10059 hTexRef: CUtexref,
10060 dim: ::std::os::raw::c_int,
10061 am: CUaddress_mode,
10062 ) -> CUresult;
10063}
10064extern "C" {
10065 #[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"]
10066 pub fn cuTexRefSetFilterMode(hTexRef: CUtexref, fm: CUfilter_mode) -> CUresult;
10067}
10068extern "C" {
10069 #[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"]
10070 pub fn cuTexRefSetMipmapFilterMode(hTexRef: CUtexref, fm: CUfilter_mode) -> CUresult;
10071}
10072extern "C" {
10073 #[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"]
10074 pub fn cuTexRefSetMipmapLevelBias(hTexRef: CUtexref, bias: f32) -> CUresult;
10075}
10076extern "C" {
10077 #[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"]
10078 pub fn cuTexRefSetMipmapLevelClamp(
10079 hTexRef: CUtexref,
10080 minMipmapLevelClamp: f32,
10081 maxMipmapLevelClamp: f32,
10082 ) -> CUresult;
10083}
10084extern "C" {
10085 #[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"]
10086 pub fn cuTexRefSetMaxAnisotropy(
10087 hTexRef: CUtexref,
10088 maxAniso: ::std::os::raw::c_uint,
10089 ) -> CUresult;
10090}
10091extern "C" {
10092 #[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"]
10093 pub fn cuTexRefSetBorderColor(hTexRef: CUtexref, pBorderColor: *mut f32) -> CUresult;
10094}
10095extern "C" {
10096 #[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"]
10097 pub fn cuTexRefSetFlags(hTexRef: CUtexref, Flags: ::std::os::raw::c_uint) -> CUresult;
10098}
10099extern "C" {
10100 #[doc = " \\brief Gets the address associated with a texture reference\n\n \\deprecated\n\n Returns in \\p *pdptr the base address bound to the texture reference\n \\p hTexRef, or returns ::CUDA_ERROR_INVALID_VALUE if the texture reference\n is not bound to any device memory range.\n\n \\param pdptr - Returned device address\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 ::cuTexRefGetAddressMode, ::cuTexRefGetArray,\n ::cuTexRefGetFilterMode, ::cuTexRefGetFlags, ::cuTexRefGetFormat"]
10101 pub fn cuTexRefGetAddress_v2(pdptr: *mut CUdeviceptr, hTexRef: CUtexref) -> CUresult;
10102}
10103extern "C" {
10104 #[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"]
10105 pub fn cuTexRefGetArray(phArray: *mut CUarray, hTexRef: CUtexref) -> CUresult;
10106}
10107extern "C" {
10108 #[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"]
10109 pub fn cuTexRefGetMipmappedArray(
10110 phMipmappedArray: *mut CUmipmappedArray,
10111 hTexRef: CUtexref,
10112 ) -> CUresult;
10113}
10114extern "C" {
10115 #[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"]
10116 pub fn cuTexRefGetAddressMode(
10117 pam: *mut CUaddress_mode,
10118 hTexRef: CUtexref,
10119 dim: ::std::os::raw::c_int,
10120 ) -> CUresult;
10121}
10122extern "C" {
10123 #[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"]
10124 pub fn cuTexRefGetFilterMode(pfm: *mut CUfilter_mode, hTexRef: CUtexref) -> CUresult;
10125}
10126extern "C" {
10127 #[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"]
10128 pub fn cuTexRefGetFormat(
10129 pFormat: *mut CUarray_format,
10130 pNumChannels: *mut ::std::os::raw::c_int,
10131 hTexRef: CUtexref,
10132 ) -> CUresult;
10133}
10134extern "C" {
10135 #[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"]
10136 pub fn cuTexRefGetMipmapFilterMode(pfm: *mut CUfilter_mode, hTexRef: CUtexref) -> CUresult;
10137}
10138extern "C" {
10139 #[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"]
10140 pub fn cuTexRefGetMipmapLevelBias(pbias: *mut f32, hTexRef: CUtexref) -> CUresult;
10141}
10142extern "C" {
10143 #[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"]
10144 pub fn cuTexRefGetMipmapLevelClamp(
10145 pminMipmapLevelClamp: *mut f32,
10146 pmaxMipmapLevelClamp: *mut f32,
10147 hTexRef: CUtexref,
10148 ) -> CUresult;
10149}
10150extern "C" {
10151 #[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"]
10152 pub fn cuTexRefGetMaxAnisotropy(
10153 pmaxAniso: *mut ::std::os::raw::c_int,
10154 hTexRef: CUtexref,
10155 ) -> CUresult;
10156}
10157extern "C" {
10158 #[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"]
10159 pub fn cuTexRefGetBorderColor(pBorderColor: *mut f32, hTexRef: CUtexref) -> CUresult;
10160}
10161extern "C" {
10162 #[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"]
10163 pub fn cuTexRefGetFlags(pFlags: *mut ::std::os::raw::c_uint, hTexRef: CUtexref) -> CUresult;
10164}
10165extern "C" {
10166 #[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"]
10167 pub fn cuTexRefCreate(pTexRef: *mut CUtexref) -> CUresult;
10168}
10169extern "C" {
10170 #[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"]
10171 pub fn cuTexRefDestroy(hTexRef: CUtexref) -> CUresult;
10172}
10173extern "C" {
10174 #[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"]
10175 pub fn cuSurfRefSetArray(
10176 hSurfRef: CUsurfref,
10177 hArray: CUarray,
10178 Flags: ::std::os::raw::c_uint,
10179 ) -> CUresult;
10180}
10181extern "C" {
10182 #[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"]
10183 pub fn cuSurfRefGetArray(phArray: *mut CUarray, hSurfRef: CUsurfref) -> CUresult;
10184}
10185extern "C" {
10186 #[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 not in a block\n compressed format.\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"]
10187 pub fn cuTexObjectCreate(
10188 pTexObject: *mut CUtexObject,
10189 pResDesc: *const CUDA_RESOURCE_DESC,
10190 pTexDesc: *const CUDA_TEXTURE_DESC,
10191 pResViewDesc: *const CUDA_RESOURCE_VIEW_DESC,
10192 ) -> CUresult;
10193}
10194extern "C" {
10195 #[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"]
10196 pub fn cuTexObjectDestroy(texObject: CUtexObject) -> CUresult;
10197}
10198extern "C" {
10199 #[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,"]
10200 pub fn cuTexObjectGetResourceDesc(
10201 pResDesc: *mut CUDA_RESOURCE_DESC,
10202 texObject: CUtexObject,
10203 ) -> CUresult;
10204}
10205extern "C" {
10206 #[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"]
10207 pub fn cuTexObjectGetTextureDesc(
10208 pTexDesc: *mut CUDA_TEXTURE_DESC,
10209 texObject: CUtexObject,
10210 ) -> CUresult;
10211}
10212extern "C" {
10213 #[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"]
10214 pub fn cuTexObjectGetResourceViewDesc(
10215 pResViewDesc: *mut CUDA_RESOURCE_VIEW_DESC,
10216 texObject: CUtexObject,
10217 ) -> CUresult;
10218}
10219extern "C" {
10220 #[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"]
10221 pub fn cuSurfObjectCreate(
10222 pSurfObject: *mut CUsurfObject,
10223 pResDesc: *const CUDA_RESOURCE_DESC,
10224 ) -> CUresult;
10225}
10226extern "C" {
10227 #[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"]
10228 pub fn cuSurfObjectDestroy(surfObject: CUsurfObject) -> CUresult;
10229}
10230extern "C" {
10231 #[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"]
10232 pub fn cuSurfObjectGetResourceDesc(
10233 pResDesc: *mut CUDA_RESOURCE_DESC,
10234 surfObject: CUsurfObject,
10235 ) -> CUresult;
10236}
10237extern "C" {
10238 #[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] * (globalDim[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 non-zero\n and less than or equal to 256.\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 elements 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 are organized in a specific order in global memory; however, this may not match the order in which the application accesses data\n in 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 shared memory with shuffling across shared memory banks.\n When \\p interleave is ::CU_TENSOR_MAP_INTERLEAVE_32B, \\p swizzle must be ::CU_TENSOR_MAP_SWIZZLE_32B.\n Other interleave modes can have any swizzling pattern.\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-point 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"]
10239 pub fn cuTensorMapEncodeTiled(
10240 tensorMap: *mut CUtensorMap,
10241 tensorDataType: CUtensorMapDataType,
10242 tensorRank: cuuint32_t,
10243 globalAddress: *mut ::std::os::raw::c_void,
10244 globalDim: *const cuuint64_t,
10245 globalStrides: *const cuuint64_t,
10246 boxDim: *const cuuint32_t,
10247 elementStrides: *const cuuint32_t,
10248 interleave: CUtensorMapInterleave,
10249 swizzle: CUtensorMapSwizzle,
10250 l2Promotion: CUtensorMapL2promotion,
10251 oobFill: CUtensorMapFloatOOBfill,
10252 ) -> CUresult;
10253}
10254extern "C" {
10255 #[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, which specifies the number of tensor dimensions, must be 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] * (globalDim[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 depend 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 depend 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 elements of the \\p elementStrides array are one, \\p boxDim specifies the number of elements to load. However, if \\p elementStrides[i]\n is not equal to one for some \\p i, then TMA loads ceil( \\p boxDim[i] / \\p elementStrides[i]) number of elements along i-th dimension.\n To load N elements along 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 are organized in a specific order in global memory; however, this may not match the order in which the application accesses data\n in 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 shared memory with shuffling across shared memory banks.\n When \\p interleave is ::CU_TENSOR_MAP_INTERLEAVE_32B, \\p swizzle must be ::CU_TENSOR_MAP_SWIZZLE_32B.\n Other interleave modes can have any swizzling pattern.\n\n - \\p l2Promotion specifies L2 fetch size which indicates the byte granularity at which L2 requests are 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-point data type.\n\n \\param tensorMap - Tensor map object to create\n \\param tensorDataType - Tensor data type\n \\param tensorRank - Dimensionality of tensor; must be at least 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 dimensions of lower box corner\n \\param pixelBoxUpperCorner - Array containing DHW dimensions 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 will 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"]
10256 pub fn cuTensorMapEncodeIm2col(
10257 tensorMap: *mut CUtensorMap,
10258 tensorDataType: CUtensorMapDataType,
10259 tensorRank: cuuint32_t,
10260 globalAddress: *mut ::std::os::raw::c_void,
10261 globalDim: *const cuuint64_t,
10262 globalStrides: *const cuuint64_t,
10263 pixelBoxLowerCorner: *const ::std::os::raw::c_int,
10264 pixelBoxUpperCorner: *const ::std::os::raw::c_int,
10265 channelsPerPixel: cuuint32_t,
10266 pixelsPerColumn: cuuint32_t,
10267 elementStrides: *const cuuint32_t,
10268 interleave: CUtensorMapInterleave,
10269 swizzle: CUtensorMapSwizzle,
10270 l2Promotion: CUtensorMapL2promotion,
10271 oobFill: CUtensorMapFloatOOBfill,
10272 ) -> CUresult;
10273}
10274extern "C" {
10275 #[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"]
10276 pub fn cuTensorMapReplaceAddress(
10277 tensorMap: *mut CUtensorMap,
10278 globalAddress: *mut ::std::os::raw::c_void,
10279 ) -> CUresult;
10280}
10281extern "C" {
10282 #[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"]
10283 pub fn cuDeviceCanAccessPeer(
10284 canAccessPeer: *mut ::std::os::raw::c_int,
10285 dev: CUdevice,
10286 peerDev: CUdevice,
10287 ) -> CUresult;
10288}
10289extern "C" {
10290 #[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"]
10291 pub fn cuCtxEnablePeerAccess(peerContext: CUcontext, Flags: ::std::os::raw::c_uint)
10292 -> CUresult;
10293}
10294extern "C" {
10295 #[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"]
10296 pub fn cuCtxDisablePeerAccess(peerContext: CUcontext) -> CUresult;
10297}
10298extern "C" {
10299 #[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"]
10300 pub fn cuDeviceGetP2PAttribute(
10301 value: *mut ::std::os::raw::c_int,
10302 attrib: CUdevice_P2PAttribute,
10303 srcDevice: CUdevice,
10304 dstDevice: CUdevice,
10305 ) -> CUresult;
10306}
10307extern "C" {
10308 #[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"]
10309 pub fn cuGraphicsUnregisterResource(resource: CUgraphicsResource) -> CUresult;
10310}
10311extern "C" {
10312 #[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"]
10313 pub fn cuGraphicsSubResourceGetMappedArray(
10314 pArray: *mut CUarray,
10315 resource: CUgraphicsResource,
10316 arrayIndex: ::std::os::raw::c_uint,
10317 mipLevel: ::std::os::raw::c_uint,
10318 ) -> CUresult;
10319}
10320extern "C" {
10321 #[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"]
10322 pub fn cuGraphicsResourceGetMappedMipmappedArray(
10323 pMipmappedArray: *mut CUmipmappedArray,
10324 resource: CUgraphicsResource,
10325 ) -> CUresult;
10326}
10327extern "C" {
10328 #[doc = " \\brief Get a device pointer through which to access a mapped graphics resource.\n\n Returns in \\p *pDevPtr a pointer through which the mapped graphics resource\n \\p resource may be accessed.\n Returns in \\p pSize the size of the memory in bytes which may be accessed from that pointer.\n The value set in \\p pPointer may change every time that \\p resource is mapped.\n\n If \\p resource is not a buffer then it cannot be accessed via a pointer and\n ::CUDA_ERROR_NOT_MAPPED_AS_POINTER is returned.\n If \\p resource is not mapped then ::CUDA_ERROR_NOT_MAPPED is returned.\n *\n \\param pDevPtr - Returned pointer through which \\p resource may be accessed\n \\param pSize - Returned size of the buffer accessible starting at \\p *pPointer\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_POINTER\n \\notefnerr\n\n \\sa\n ::cuGraphicsMapResources,\n ::cuGraphicsSubResourceGetMappedArray,\n ::cudaGraphicsResourceGetMappedPointer"]
10329 pub fn cuGraphicsResourceGetMappedPointer_v2(
10330 pDevPtr: *mut CUdeviceptr,
10331 pSize: *mut usize,
10332 resource: CUgraphicsResource,
10333 ) -> CUresult;
10334}
10335extern "C" {
10336 #[doc = " \\brief Set usage flags for mapping a graphics resource\n\n Set \\p flags for mapping the graphics resource \\p resource.\n\n Changes to \\p flags will take effect the next time \\p resource is mapped.\n The \\p flags argument may be any of the following:\n\n - ::CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints about how this\n resource will be used. It is therefore assumed that this resource will be\n read from and written to by CUDA kernels. This is the default value.\n - ::CU_GRAPHICS_MAP_RESOURCE_FLAGS_READONLY: Specifies that CUDA kernels which\n access this resource will not write to this resource.\n - ::CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITEDISCARD: Specifies that CUDA kernels\n which access this resource will not read from this resource and will\n write over the entire contents of the resource, so none of the data\n previously stored in the resource will be preserved.\n\n If \\p resource is presently mapped for access by CUDA then\n ::CUDA_ERROR_ALREADY_MAPPED is returned.\n If \\p flags is not one of the above values then ::CUDA_ERROR_INVALID_VALUE is returned.\n\n \\param resource - Registered resource to set flags for\n \\param flags - Parameters for resource mapping\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_ALREADY_MAPPED\n \\notefnerr\n\n \\sa\n ::cuGraphicsMapResources,\n ::cudaGraphicsResourceSetMapFlags"]
10337 pub fn cuGraphicsResourceSetMapFlags_v2(
10338 resource: CUgraphicsResource,
10339 flags: ::std::os::raw::c_uint,
10340 ) -> CUresult;
10341}
10342extern "C" {
10343 #[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"]
10344 pub fn cuGraphicsMapResources(
10345 count: ::std::os::raw::c_uint,
10346 resources: *mut CUgraphicsResource,
10347 hStream: CUstream,
10348 ) -> CUresult;
10349}
10350extern "C" {
10351 #[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"]
10352 pub fn cuGraphicsUnmapResources(
10353 count: ::std::os::raw::c_uint,
10354 resources: *mut CUgraphicsResource,
10355 hStream: CUstream,
10356 ) -> CUresult;
10357}
10358extern "C" {
10359 #[doc = " \\brief Returns the requested driver API function pointer\n\n Returns in \\p **pfn the address of the CUDA driver function for the requested\n CUDA version and flags.\n\n The CUDA version is specified as (1000 * major + 10 * minor), so CUDA 11.2\n should be specified as 11020. For a requested driver symbol, if the specified\n CUDA version is greater than or equal to the CUDA version in which the driver symbol\n was introduced, this API will return the function pointer to the corresponding\n versioned function.\n\n The pointer returned by the API should be cast to a function pointer matching the\n requested driver function's definition in the API header file. The function pointer\n typedef can be picked up from the corresponding typedefs header file. For example,\n cudaTypedefs.h consists of function pointer typedefs for driver APIs defined in cuda.h.\n\n The API will return ::CUDA_SUCCESS and set the returned \\p pfn to NULL if the\n requested driver function is not supported on the platform, no ABI\n compatible driver function exists for the specified \\p cudaVersion or if the\n driver symbol is invalid.\n\n It will also set the optional \\p symbolStatus to one of the values in\n ::CUdriverProcAddressQueryResult with the following meanings:\n - ::CU_GET_PROC_ADDRESS_SUCCESS - The requested symbol was succesfully found based\n on input arguments and \\p pfn is valid\n - ::CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND - The requested symbol was not found\n - ::CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT - The requested symbol was found but is\n not supported by cudaVersion specified\n\n The requested flags can be:\n - ::CU_GET_PROC_ADDRESS_DEFAULT: This is the default mode. This is equivalent to\n ::CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM if the code is compiled with\n --default-stream per-thread compilation flag or the macro CUDA_API_PER_THREAD_DEFAULT_STREAM\n is defined; ::CU_GET_PROC_ADDRESS_LEGACY_STREAM otherwise.\n - ::CU_GET_PROC_ADDRESS_LEGACY_STREAM: This will enable the search for all driver symbols\n that match the requested driver symbol name except the corresponding per-thread versions.\n - ::CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM: This will enable the search for all\n driver symbols that match the requested driver symbol name including the per-thread\n versions. If a per-thread version is not found, the API will return the legacy version\n of the driver function.\n\n \\param symbol - The base name of the driver API function to look for. As an example,\n for the driver API ::cuMemAlloc_v2, \\p symbol would be cuMemAlloc and\n \\p cudaVersion would be the ABI compatible CUDA version for the _v2 variant.\n \\param pfn - Location to return the function pointer to the requested driver function\n \\param cudaVersion - The CUDA version to look for the requested driver symbol\n \\param flags - Flags to specify search options.\n \\param symbolStatus - Optional location to store the status of the search for\n \\p symbol based on \\p cudaVersion. See ::CUdriverProcAddressQueryResult\n for possible values.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\note_version_mixing\n\n \\sa\n ::cudaGetDriverEntryPoint"]
10360 pub fn cuGetProcAddress_v2(
10361 symbol: *const ::std::os::raw::c_char,
10362 pfn: *mut *mut ::std::os::raw::c_void,
10363 cudaVersion: ::std::os::raw::c_int,
10364 flags: cuuint64_t,
10365 symbolStatus: *mut CUdriverProcAddressQueryResult,
10366 ) -> CUresult;
10367}
10368impl CUcoredumpSettings_enum {
10369 pub const CU_COREDUMP_ENABLE_ON_EXCEPTION: CUcoredumpSettings_enum = CUcoredumpSettings_enum(1);
10370}
10371impl CUcoredumpSettings_enum {
10372 pub const CU_COREDUMP_TRIGGER_HOST: CUcoredumpSettings_enum = CUcoredumpSettings_enum(2);
10373}
10374impl CUcoredumpSettings_enum {
10375 pub const CU_COREDUMP_LIGHTWEIGHT: CUcoredumpSettings_enum = CUcoredumpSettings_enum(3);
10376}
10377impl CUcoredumpSettings_enum {
10378 pub const CU_COREDUMP_ENABLE_USER_TRIGGER: CUcoredumpSettings_enum = CUcoredumpSettings_enum(4);
10379}
10380impl CUcoredumpSettings_enum {
10381 pub const CU_COREDUMP_FILE: CUcoredumpSettings_enum = CUcoredumpSettings_enum(5);
10382}
10383impl CUcoredumpSettings_enum {
10384 pub const CU_COREDUMP_PIPE: CUcoredumpSettings_enum = CUcoredumpSettings_enum(6);
10385}
10386impl CUcoredumpSettings_enum {
10387 pub const CU_COREDUMP_GENERATION_FLAGS: CUcoredumpSettings_enum = CUcoredumpSettings_enum(7);
10388}
10389impl CUcoredumpSettings_enum {
10390 pub const CU_COREDUMP_MAX: CUcoredumpSettings_enum = CUcoredumpSettings_enum(8);
10391}
10392#[repr(transparent)]
10393#[doc = " Flags for choosing a coredump attribute to get/set"]
10394#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10395pub struct CUcoredumpSettings_enum(pub ::std::os::raw::c_uint);
10396#[doc = " Flags for choosing a coredump attribute to get/set"]
10397pub use self::CUcoredumpSettings_enum as CUcoredumpSettings;
10398impl CUCoredumpGenerationFlags {
10399 pub const CU_COREDUMP_DEFAULT_FLAGS: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(0);
10400}
10401impl CUCoredumpGenerationFlags {
10402 pub const CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES: CUCoredumpGenerationFlags =
10403 CUCoredumpGenerationFlags(1);
10404}
10405impl CUCoredumpGenerationFlags {
10406 pub const CU_COREDUMP_SKIP_GLOBAL_MEMORY: CUCoredumpGenerationFlags =
10407 CUCoredumpGenerationFlags(2);
10408}
10409impl CUCoredumpGenerationFlags {
10410 pub const CU_COREDUMP_SKIP_SHARED_MEMORY: CUCoredumpGenerationFlags =
10411 CUCoredumpGenerationFlags(4);
10412}
10413impl CUCoredumpGenerationFlags {
10414 pub const CU_COREDUMP_SKIP_LOCAL_MEMORY: CUCoredumpGenerationFlags =
10415 CUCoredumpGenerationFlags(8);
10416}
10417impl CUCoredumpGenerationFlags {
10418 pub const CU_COREDUMP_SKIP_ABORT: CUCoredumpGenerationFlags = CUCoredumpGenerationFlags(16);
10419}
10420impl CUCoredumpGenerationFlags {
10421 pub const CU_COREDUMP_SKIP_CONSTBANK_MEMORY: CUCoredumpGenerationFlags =
10422 CUCoredumpGenerationFlags(32);
10423}
10424impl CUCoredumpGenerationFlags {
10425 pub const CU_COREDUMP_LIGHTWEIGHT_FLAGS: CUCoredumpGenerationFlags =
10426 CUCoredumpGenerationFlags(47);
10427}
10428#[repr(transparent)]
10429#[doc = " Flags for controlling coredump contents"]
10430#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10431pub struct CUCoredumpGenerationFlags(pub ::std::os::raw::c_uint);
10432extern "C" {
10433 #[doc = " \\brief Allows caller to fetch a coredump attribute value for the current context\n\n Returns in \\p *value the requested value specified by \\p attrib. It is up to the caller\n to ensure that the data type and size of \\p *value matches the request.\n\n If the caller calls this function with \\p *value equal to NULL, the size of the memory\n region (in bytes) expected for \\p attrib will be placed in \\p size.\n\n The supported attributes are:\n - ::CU_COREDUMP_ENABLE_ON_EXCEPTION: Bool where ::true means that GPU exceptions from\n this context will create a coredump at the location specified by ::CU_COREDUMP_FILE.\n The default value is ::false unless set to ::true globally or locally, or the\n CU_CTX_USER_COREDUMP_ENABLE flag was set during context creation.\n - ::CU_COREDUMP_TRIGGER_HOST: Bool where ::true means that the host CPU will\n also create a coredump. The default value is ::true unless set to ::false globally or\n or locally. This value is deprecated as of CUDA 12.5 - raise the ::CU_COREDUMP_SKIP_ABORT\n flag to disable host device abort() if needed.\n - ::CU_COREDUMP_LIGHTWEIGHT: Bool where ::true means that any resulting coredumps\n will not have a dump of GPU memory or non-reloc ELF images. The default value is\n ::false unless set to ::true globally or locally. This attribute is deprecated as\n of CUDA 12.5, please use ::CU_COREDUMP_GENERATION_FLAGS instead.\n - ::CU_COREDUMP_ENABLE_USER_TRIGGER: Bool where ::true means that a coredump can be\n created by writing to the system pipe specified by ::CU_COREDUMP_PIPE. The default\n value is ::false unless set to ::true globally or locally.\n - ::CU_COREDUMP_FILE: String of up to 1023 characters that defines the location where\n any coredumps generated by this context will be written. The default value is\n ::core.cuda.HOSTNAME.PID where ::HOSTNAME is the host name of the machine running\n the CUDA applications and ::PID is the process ID of the CUDA application.\n - ::CU_COREDUMP_PIPE: String of up to 1023 characters that defines the name of the pipe\n that will be monitored if user-triggered coredumps are enabled. The default value is\n ::corepipe.cuda.HOSTNAME.PID where ::HOSTNAME is the host name of the machine running\n the CUDA application and ::PID is the process ID of the CUDA application.\n - ::CU_COREDUMP_GENERATION_FLAGS: An integer with values to allow granular control the data\n contained in a coredump specified as a bitwise OR combination of the following values:\n + ::CU_COREDUMP_DEFAULT_FLAGS - if set by itself, coredump generation returns to its\n default settings of including all memory regions that it is able to access\n + ::CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES - Coredump will not include the data from\n CUDA source modules that are not relocated at runtime.\n + ::CU_COREDUMP_SKIP_GLOBAL_MEMORY - Coredump will not include device-side global data\n that does not belong to any context.\n + ::CU_COREDUMP_SKIP_SHARED_MEMORY - Coredump will not include grid-scale shared memory\n for the warp that the dumped kernel belonged to.\n + ::CU_COREDUMP_SKIP_LOCAL_MEMORY - Coredump will not include local memory from the kernel.\n + ::CU_COREDUMP_LIGHTWEIGHT_FLAGS - Enables all of the above options. Equiavlent to setting\n the ::CU_COREDUMP_LIGHTWEIGHT attribute to ::true.\n + ::CU_COREDUMP_SKIP_ABORT - If set, GPU exceptions will not raise an abort() in the host CPU\n process. Same functional goal as ::CU_COREDUMP_TRIGGER_HOST but better reflects the default\n behavior.\n\n \\param attrib - The enum defining which value to fetch.\n \\param value - void* containing the requested data.\n \\param size - The size of the memory region \\p value points to.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_CONTEXT_IS_DESTROYED\n\n \\sa\n ::cuCoredumpGetAttributeGlobal,\n ::cuCoredumpSetAttribute,\n ::cuCoredumpSetAttributeGlobal"]
10434 pub fn cuCoredumpGetAttribute(
10435 attrib: CUcoredumpSettings,
10436 value: *mut ::std::os::raw::c_void,
10437 size: *mut usize,
10438 ) -> CUresult;
10439}
10440extern "C" {
10441 #[doc = " \\brief Allows caller to fetch a coredump attribute value for the entire application\n\n Returns in \\p *value the requested value specified by \\p attrib. It is up to the caller\n to ensure that the data type and size of \\p *value matches the request.\n\n If the caller calls this function with \\p *value equal to NULL, the size of the memory\n region (in bytes) expected for \\p attrib will be placed in \\p size.\n\n The supported attributes are:\n - ::CU_COREDUMP_ENABLE_ON_EXCEPTION: Bool where ::true means that GPU exceptions from\n this context will create a coredump at the location specified by ::CU_COREDUMP_FILE.\n The default value is ::false.\n - ::CU_COREDUMP_TRIGGER_HOST: Bool where ::true means that the host CPU will\n also create a coredump. The default value is ::true unless set to ::false globally or\n or locally. This value is deprecated as of CUDA 12.5 - raise the ::CU_COREDUMP_SKIP_ABORT\n flag to disable host device abort() if needed.\n - ::CU_COREDUMP_LIGHTWEIGHT: Bool where ::true means that any resulting coredumps\n will not have a dump of GPU memory or non-reloc ELF images. The default value is\n ::false. This attribute is deprecated as of CUDA 12.5, please use ::CU_COREDUMP_GENERATION_FLAGS\n instead.\n - ::CU_COREDUMP_ENABLE_USER_TRIGGER: Bool where ::true means that a coredump can be\n created by writing to the system pipe specified by ::CU_COREDUMP_PIPE. The default\n value is ::false.\n - ::CU_COREDUMP_FILE: String of up to 1023 characters that defines the location where\n any coredumps generated by this context will be written. The default value is\n ::core.cuda.HOSTNAME.PID where ::HOSTNAME is the host name of the machine running\n the CUDA applications and ::PID is the process ID of the CUDA application.\n - ::CU_COREDUMP_PIPE: String of up to 1023 characters that defines the name of the pipe\n that will be monitored if user-triggered coredumps are enabled. The default value is\n ::corepipe.cuda.HOSTNAME.PID where ::HOSTNAME is the host name of the machine running\n the CUDA application and ::PID is the process ID of the CUDA application.\n - ::CU_COREDUMP_GENERATION_FLAGS: An integer with values to allow granular control the data\n contained in a coredump specified as a bitwise OR combination of the following values:\n + ::CU_COREDUMP_DEFAULT_FLAGS - if set by itself, coredump generation returns to its\n default settings of including all memory regions that it is able to access\n + ::CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES - Coredump will not include the data from\n CUDA source modules that are not relocated at runtime.\n + ::CU_COREDUMP_SKIP_GLOBAL_MEMORY - Coredump will not include device-side global data\n that does not belong to any context.\n + ::CU_COREDUMP_SKIP_SHARED_MEMORY - Coredump will not include grid-scale shared memory\n for the warp that the dumped kernel belonged to.\n + ::CU_COREDUMP_SKIP_LOCAL_MEMORY - Coredump will not include local memory from the kernel.\n + ::CU_COREDUMP_LIGHTWEIGHT_FLAGS - Enables all of the above options. Equiavlent to setting\n the ::CU_COREDUMP_LIGHTWEIGHT attribute to ::true.\n + ::CU_COREDUMP_SKIP_ABORT - If set, GPU exceptions will not raise an abort() in the host CPU\n process. Same functional goal as ::CU_COREDUMP_TRIGGER_HOST but better reflects the default\n behavior.\n\n \\param attrib - The enum defining which value to fetch.\n \\param value - void* containing the requested data.\n \\param size - The size of the memory region \\p value points to.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuCoredumpGetAttribute,\n ::cuCoredumpSetAttribute,\n ::cuCoredumpSetAttributeGlobal"]
10442 pub fn cuCoredumpGetAttributeGlobal(
10443 attrib: CUcoredumpSettings,
10444 value: *mut ::std::os::raw::c_void,
10445 size: *mut usize,
10446 ) -> CUresult;
10447}
10448extern "C" {
10449 #[doc = " \\brief Allows caller to set a coredump attribute value for the current context\n\n This function should be considered an alternate interface to the CUDA-GDB environment\n variables defined in this document: https://docs.nvidia.com/cuda/cuda-gdb/index.html#gpu-coredump\n\n An important design decision to note is that any coredump environment variable values\n set before CUDA initializes will take permanent precedence over any values set with this\n function. This decision was made to ensure no change in behavior for any users that\n may be currently using these variables to get coredumps.\n\n \\p *value shall contain the requested value specified by \\p set. It is up to the caller\n to ensure that the data type and size of \\p *value matches the request.\n\n If the caller calls this function with \\p *value equal to NULL, the size of the memory\n region (in bytes) expected for \\p set will be placed in \\p size.\n\n /note This function will return ::CUDA_ERROR_NOT_SUPPORTED if the caller attempts to set\n ::CU_COREDUMP_ENABLE_ON_EXCEPTION on a GPU of with Compute Capability < 6.0. ::cuCoredumpSetAttributeGlobal\n works on those platforms as an alternative.\n\n /note ::CU_COREDUMP_ENABLE_USER_TRIGGER and ::CU_COREDUMP_PIPE cannot be set on a per-context basis.\n\n The supported attributes are:\n - ::CU_COREDUMP_ENABLE_ON_EXCEPTION: Bool where ::true means that GPU exceptions from\n this context will create a coredump at the location specified by ::CU_COREDUMP_FILE.\n The default value is ::false.\n - ::CU_COREDUMP_TRIGGER_HOST: Bool where ::true means that the host CPU will\n also create a coredump. The default value is ::true unless set to ::false globally or\n or locally. This value is deprecated as of CUDA 12.5 - raise the ::CU_COREDUMP_SKIP_ABORT\n flag to disable host device abort() if needed.\n - ::CU_COREDUMP_LIGHTWEIGHT: Bool where ::true means that any resulting coredumps\n will not have a dump of GPU memory or non-reloc ELF images. The default value is\n ::false. This attribute is deprecated as of CUDA 12.5, please use ::CU_COREDUMP_GENERATION_FLAGS\n instead.\n - ::CU_COREDUMP_FILE: String of up to 1023 characters that defines the location where\n any coredumps generated by this context will be written. The default value is\n ::core.cuda.HOSTNAME.PID where ::HOSTNAME is the host name of the machine running\n the CUDA applications and ::PID is the process ID of the CUDA application.\n - ::CU_COREDUMP_GENERATION_FLAGS: An integer with values to allow granular control the data\n contained in a coredump specified as a bitwise OR combination of the following values:\n + ::CU_COREDUMP_DEFAULT_FLAGS - if set by itself, coredump generation returns to its\n default settings of including all memory regions that it is able to access\n + ::CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES - Coredump will not include the data from\n CUDA source modules that are not relocated at runtime.\n + ::CU_COREDUMP_SKIP_GLOBAL_MEMORY - Coredump will not include device-side global data\n that does not belong to any context.\n + ::CU_COREDUMP_SKIP_SHARED_MEMORY - Coredump will not include grid-scale shared memory\n for the warp that the dumped kernel belonged to.\n + ::CU_COREDUMP_SKIP_LOCAL_MEMORY - Coredump will not include local memory from the kernel.\n + ::CU_COREDUMP_LIGHTWEIGHT_FLAGS - Enables all of the above options. Equiavlent to setting\n the ::CU_COREDUMP_LIGHTWEIGHT attribute to ::true.\n + ::CU_COREDUMP_SKIP_ABORT - If set, GPU exceptions will not raise an abort() in the host CPU\n process. Same functional goal as ::CU_COREDUMP_TRIGGER_HOST but better reflects the default\n behavior.\n\n \\param attrib - The enum defining which value to set.\n \\param value - void* containing the requested data.\n \\param size - The size of the memory region \\p value points to.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_PERMITTED,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_CONTEXT_IS_DESTROYED,\n ::CUDA_ERROR_NOT_SUPPORTED\n\n \\sa\n ::cuCoredumpGetAttributeGlobal,\n ::cuCoredumpGetAttribute,\n ::cuCoredumpSetAttributeGlobal"]
10450 pub fn cuCoredumpSetAttribute(
10451 attrib: CUcoredumpSettings,
10452 value: *mut ::std::os::raw::c_void,
10453 size: *mut usize,
10454 ) -> CUresult;
10455}
10456extern "C" {
10457 #[doc = " \\brief Allows caller to set a coredump attribute value globally\n\n This function should be considered an alternate interface to the CUDA-GDB environment\n variables defined in this document: https://docs.nvidia.com/cuda/cuda-gdb/index.html#gpu-coredump\n\n An important design decision to note is that any coredump environment variable values\n set before CUDA initializes will take permanent precedence over any values set with this\n function. This decision was made to ensure no change in behavior for any users that\n may be currently using these variables to get coredumps.\n\n \\p *value shall contain the requested value specified by \\p set. It is up to the caller\n to ensure that the data type and size of \\p *value matches the request.\n\n If the caller calls this function with \\p *value equal to NULL, the size of the memory\n region (in bytes) expected for \\p set will be placed in \\p size.\n\n The supported attributes are:\n - ::CU_COREDUMP_ENABLE_ON_EXCEPTION: Bool where ::true means that GPU exceptions from\n this context will create a coredump at the location specified by ::CU_COREDUMP_FILE.\n The default value is ::false.\n - ::CU_COREDUMP_TRIGGER_HOST: Bool where ::true means that the host CPU will\n also create a coredump. The default value is ::true unless set to ::false globally or\n or locally. This value is deprecated as of CUDA 12.5 - raise the ::CU_COREDUMP_SKIP_ABORT\n flag to disable host device abort() if needed.\n - ::CU_COREDUMP_LIGHTWEIGHT: Bool where ::true means that any resulting coredumps\n will not have a dump of GPU memory or non-reloc ELF images. The default value is\n ::false. This attribute is deprecated as of CUDA 12.5, please use ::CU_COREDUMP_GENERATION_FLAGS\n instead.\n - ::CU_COREDUMP_ENABLE_USER_TRIGGER: Bool where ::true means that a coredump can be\n created by writing to the system pipe specified by ::CU_COREDUMP_PIPE. The default\n value is ::false.\n - ::CU_COREDUMP_FILE: String of up to 1023 characters that defines the location where\n any coredumps generated by this context will be written. The default value is\n ::core.cuda.HOSTNAME.PID where ::HOSTNAME is the host name of the machine running\n the CUDA applications and ::PID is the process ID of the CUDA application.\n - ::CU_COREDUMP_PIPE: String of up to 1023 characters that defines the name of the pipe\n that will be monitored if user-triggered coredumps are enabled. This value may not be\n changed after ::CU_COREDUMP_ENABLE_USER_TRIGGER is set to ::true. The default\n value is ::corepipe.cuda.HOSTNAME.PID where ::HOSTNAME is the host name of the machine\n running the CUDA application and ::PID is the process ID of the CUDA application.\n - ::CU_COREDUMP_GENERATION_FLAGS: An integer with values to allow granular control the data\n contained in a coredump specified as a bitwise OR combination of the following values:\n + ::CU_COREDUMP_DEFAULT_FLAGS - if set by itself, coredump generation returns to its\n default settings of including all memory regions that it is able to access\n + ::CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES - Coredump will not include the data from\n CUDA source modules that are not relocated at runtime.\n + ::CU_COREDUMP_SKIP_GLOBAL_MEMORY - Coredump will not include device-side global data\n that does not belong to any context.\n + ::CU_COREDUMP_SKIP_SHARED_MEMORY - Coredump will not include grid-scale shared memory\n for the warp that the dumped kernel belonged to.\n + ::CU_COREDUMP_SKIP_LOCAL_MEMORY - Coredump will not include local memory from the kernel.\n + ::CU_COREDUMP_LIGHTWEIGHT_FLAGS - Enables all of the above options. Equiavlent to setting\n the ::CU_COREDUMP_LIGHTWEIGHT attribute to ::true.\n + ::CU_COREDUMP_SKIP_ABORT - If set, GPU exceptions will not raise an abort() in the host CPU\n process. Same functional goal as ::CU_COREDUMP_TRIGGER_HOST but better reflects the default\n behavior.\n\n \\param attrib - The enum defining which value to set.\n \\param value - void* containing the requested data.\n \\param size - The size of the memory region \\p value points to.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_PERMITTED\n\n \\sa\n ::cuCoredumpGetAttribute,\n ::cuCoredumpGetAttributeGlobal,\n ::cuCoredumpSetAttribute"]
10458 pub fn cuCoredumpSetAttributeGlobal(
10459 attrib: CUcoredumpSettings,
10460 value: *mut ::std::os::raw::c_void,
10461 size: *mut usize,
10462 ) -> CUresult;
10463}
10464extern "C" {
10465 #[doc = " @}"]
10466 pub fn cuGetExportTable(
10467 ppExportTable: *mut *const ::std::os::raw::c_void,
10468 pExportTableId: *const CUuuid,
10469 ) -> CUresult;
10470}
10471#[repr(C)]
10472#[derive(Debug, Copy, Clone)]
10473pub struct CUdevResourceDesc_st {
10474 _unused: [u8; 0],
10475}
10476#[doc = " \\typedef struct CUdevResourceDesc_st* CUdevResourceDesc;\n An opaque descriptor handle. The descriptor encapsulates multiple created and configured resources.\n Created via ::cuDevResourceGenerateDesc"]
10477pub type CUdevResourceDesc = *mut CUdevResourceDesc_st;
10478impl CUgreenCtxCreate_flags {
10479 #[doc = "< Required. Creates a default stream to use inside the green context"]
10480 pub const CU_GREEN_CTX_DEFAULT_STREAM: CUgreenCtxCreate_flags = CUgreenCtxCreate_flags(1);
10481}
10482#[repr(transparent)]
10483#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10484pub struct CUgreenCtxCreate_flags(pub ::std::os::raw::c_uint);
10485impl CUdevSmResourceSplit_flags {
10486 pub const CU_DEV_SM_RESOURCE_SPLIT_IGNORE_SM_COSCHEDULING: CUdevSmResourceSplit_flags =
10487 CUdevSmResourceSplit_flags(1);
10488}
10489impl CUdevSmResourceSplit_flags {
10490 pub const CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE: CUdevSmResourceSplit_flags =
10491 CUdevSmResourceSplit_flags(2);
10492}
10493#[repr(transparent)]
10494#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10495pub struct CUdevSmResourceSplit_flags(pub ::std::os::raw::c_uint);
10496impl CUdevResourceType {
10497 pub const CU_DEV_RESOURCE_TYPE_INVALID: CUdevResourceType = CUdevResourceType(0);
10498}
10499impl CUdevResourceType {
10500 #[doc = "< Streaming multiprocessors related information"]
10501 pub const CU_DEV_RESOURCE_TYPE_SM: CUdevResourceType = CUdevResourceType(1);
10502}
10503#[repr(transparent)]
10504#[doc = " \\typedef enum CUdevResourceType\n Type of resource"]
10505#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10506pub struct CUdevResourceType(pub ::std::os::raw::c_uint);
10507#[doc = " \\struct CUdevSmResource\n Data for SM-related resources"]
10508#[repr(C)]
10509#[derive(Debug, Copy, Clone)]
10510pub struct CUdevSmResource_st {
10511 #[doc = "< The amount of streaming multiprocessors available in this resource. This is an output parameter only, do not write to this field."]
10512 pub smCount: ::std::os::raw::c_uint,
10513}
10514#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10515const _: () = {
10516 ["Size of CUdevSmResource_st"][::std::mem::size_of::<CUdevSmResource_st>() - 4usize];
10517 ["Alignment of CUdevSmResource_st"][::std::mem::align_of::<CUdevSmResource_st>() - 4usize];
10518 ["Offset of field: CUdevSmResource_st::smCount"]
10519 [::std::mem::offset_of!(CUdevSmResource_st, smCount) - 0usize];
10520};
10521#[doc = " \\struct CUdevSmResource\n Data for SM-related resources"]
10522pub type CUdevSmResource = CUdevSmResource_st;
10523#[doc = " \\struct CUdevResource\n A tagged union describing different resources identified by the type field. This structure should not be directly modified outside of the API that created it.\n \\code\n struct {\n CUdevResourceType type;\n union {\n CUdevSmResource sm;\n };\n };\n \\endcode\n - If \\p type is \\p CU_DEV_RESOURCE_TYPE_INVALID, this resoure is not valid and cannot be further accessed.\n - If \\p type is \\p CU_DEV_RESOURCE_TYPE_SM, the ::CUdevSmResource structure \\p sm is filled in. For example,\n \\p sm.smCount will reflect the amount of streaming multiprocessors available in this resource."]
10524#[repr(C)]
10525#[derive(Copy, Clone)]
10526pub struct CUdevResource_st {
10527 #[doc = "< Type of resource, dictates which union field was last set"]
10528 pub type_: CUdevResourceType,
10529 pub _internal_padding: [::std::os::raw::c_uchar; 92usize],
10530 pub __bindgen_anon_1: CUdevResource_st__bindgen_ty_1,
10531}
10532#[repr(C)]
10533#[derive(Copy, Clone)]
10534pub union CUdevResource_st__bindgen_ty_1 {
10535 #[doc = "< Resource corresponding to CU_DEV_RESOURCE_TYPE_SM \\p. type."]
10536 pub sm: CUdevSmResource,
10537 pub _oversize: [::std::os::raw::c_uchar; 48usize],
10538}
10539#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10540const _: () = {
10541 ["Size of CUdevResource_st__bindgen_ty_1"]
10542 [::std::mem::size_of::<CUdevResource_st__bindgen_ty_1>() - 48usize];
10543 ["Alignment of CUdevResource_st__bindgen_ty_1"]
10544 [::std::mem::align_of::<CUdevResource_st__bindgen_ty_1>() - 4usize];
10545 ["Offset of field: CUdevResource_st__bindgen_ty_1::sm"]
10546 [::std::mem::offset_of!(CUdevResource_st__bindgen_ty_1, sm) - 0usize];
10547 ["Offset of field: CUdevResource_st__bindgen_ty_1::_oversize"]
10548 [::std::mem::offset_of!(CUdevResource_st__bindgen_ty_1, _oversize) - 0usize];
10549};
10550#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10551const _: () = {
10552 ["Size of CUdevResource_st"][::std::mem::size_of::<CUdevResource_st>() - 144usize];
10553 ["Alignment of CUdevResource_st"][::std::mem::align_of::<CUdevResource_st>() - 4usize];
10554 ["Offset of field: CUdevResource_st::type_"]
10555 [::std::mem::offset_of!(CUdevResource_st, type_) - 0usize];
10556 ["Offset of field: CUdevResource_st::_internal_padding"]
10557 [::std::mem::offset_of!(CUdevResource_st, _internal_padding) - 4usize];
10558};
10559#[doc = " \\struct CUdevResource\n A tagged union describing different resources identified by the type field. This structure should not be directly modified outside of the API that created it.\n \\code\n struct {\n CUdevResourceType type;\n union {\n CUdevSmResource sm;\n };\n };\n \\endcode\n - If \\p type is \\p CU_DEV_RESOURCE_TYPE_INVALID, this resoure is not valid and cannot be further accessed.\n - If \\p type is \\p CU_DEV_RESOURCE_TYPE_SM, the ::CUdevSmResource structure \\p sm is filled in. For example,\n \\p sm.smCount will reflect the amount of streaming multiprocessors available in this resource."]
10560pub type CUdevResource_v1 = CUdevResource_st;
10561#[doc = " \\struct CUdevResource\n A tagged union describing different resources identified by the type field. This structure should not be directly modified outside of the API that created it.\n \\code\n struct {\n CUdevResourceType type;\n union {\n CUdevSmResource sm;\n };\n };\n \\endcode\n - If \\p type is \\p CU_DEV_RESOURCE_TYPE_INVALID, this resoure is not valid and cannot be further accessed.\n - If \\p type is \\p CU_DEV_RESOURCE_TYPE_SM, the ::CUdevSmResource structure \\p sm is filled in. For example,\n \\p sm.smCount will reflect the amount of streaming multiprocessors available in this resource."]
10562pub type CUdevResource = CUdevResource_v1;
10563extern "C" {
10564 #[doc = " \\brief Creates a green context with a specified set of resources.\n\n This API creates a green context with the resources specified in the descriptor \\p desc and\n returns it in the handle represented by \\p phCtx. This API will retain the primary context on device \\p dev,\n which will is released when the green context is destroyed. It is advised to have the primary context active\n before calling this API to avoid the heavy cost of triggering primary context initialization and\n deinitialization multiple times.\n\n The API does not set the green context current. In order to set it current, you need to explicitly set it current\n by first converting the green context to a CUcontext using ::cuCtxFromGreenCtx and subsequently calling\n ::cuCtxSetCurrent / ::cuCtxPushCurrent. It should be noted that a green context can be current to only one\n thread at a time. There is no internal synchronization to make API calls accessing the same green context\n from multiple threads work.\n\n Note: The API is not supported on 32-bit platforms.\n\n \\param phCtx - Pointer for the output handle to the green context\n \\param desc - Descriptor generated via ::cuDevResourceGenerateDesc which contains the set of resources to be used\n \\param dev - Device on which to create the green context.\n \\param flags - One of the supported green context creation flags. \\p CU_GREEN_CTX_DEFAULT_STREAM is required.\n\n The supported flags are:\n - \\p CU_GREEN_CTX_DEFAULT_STREAM : Creates a default stream to use inside the green context. Required.\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 ::CUDA_ERROR_NOT_SUPPORTED,\n ::CUDA_ERROR_OUT_OF_MEMORY\n\n \\sa\n ::cuGreenCtxDestroy,\n ::cuCtxFromGreenCtx,\n ::cuCtxSetCurrent,\n ::cuCtxPushCurrent,\n ::cuDevResourceGenerateDesc,\n ::cuDevicePrimaryCtxRetain,\n ::cuCtxCreate,\n ::cuCtxCreate_v3"]
10565 pub fn cuGreenCtxCreate(
10566 phCtx: *mut CUgreenCtx,
10567 desc: CUdevResourceDesc,
10568 dev: CUdevice,
10569 flags: ::std::os::raw::c_uint,
10570 ) -> CUresult;
10571}
10572extern "C" {
10573 #[doc = " \\brief Destroys a green context\n\n Destroys the green context, releasing the primary context of the device that this green context was created for.\n Any resources provisioned for this green context (that were initially available via the resource descriptor)\n are released as well.\n \\param hCtx - Green context to be destroyed\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_CONTEXT,\n ::CUDA_ERROR_CONTEXT_IS_DESTROYED\n\n \\sa\n ::cuGreenCtxCreate,\n ::cuCtxDestroy"]
10574 pub fn cuGreenCtxDestroy(hCtx: CUgreenCtx) -> CUresult;
10575}
10576extern "C" {
10577 #[doc = " \\brief Converts a green context into the primary context\n\n The API converts a green context into the primary context returned in \\p pContext. It is important\n to note that the converted context \\p pContext is a normal primary context but with\n the resources of the specified green context \\p hCtx. Once converted, it can then\n be used to set the context current with ::cuCtxSetCurrent or with any of the CUDA APIs\n that accept a CUcontext parameter.\n\n Users are expected to call this API before calling any CUDA APIs that accept a\n CUcontext. Failing to do so will result in the APIs returning ::CUDA_ERROR_INVALID_CONTEXT.\n\n \\param pContext Returned primary context with green context resources\n \\param hCtx Green context to convert\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 ::cuGreenCtxCreate"]
10578 pub fn cuCtxFromGreenCtx(pContext: *mut CUcontext, hCtx: CUgreenCtx) -> CUresult;
10579}
10580extern "C" {
10581 #[doc = " \\brief Get device resources\n\n Get the \\p type resources available to the \\p device.\n This may often be the starting point for further partitioning or configuring of resources.\n\n Note: The API is not supported on 32-bit platforms.\n\n \\param device - Device to get resource for\n \\param resource - Output pointer to a CUdevResource structure\n \\param type - Type of resource to retrieve\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_RESOURCE_TYPE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_DEVICE\n\n \\sa\n ::cuDevResourceGenerateDesc"]
10582 pub fn cuDeviceGetDevResource(
10583 device: CUdevice,
10584 resource: *mut CUdevResource,
10585 type_: CUdevResourceType,
10586 ) -> CUresult;
10587}
10588extern "C" {
10589 #[doc = " \\brief Get context resources\n\n Get the \\p type resources available to the context represented by \\p hCtx\n \\param hCtx - Context to get resource for\n\n Note: The API is not supported on 32-bit platforms.\n\n \\param resource - Output pointer to a CUdevResource structure\n \\param type - Type of resource to retrieve\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_RESOURCE_TYPE,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_CONTEXT\n\n \\sa\n ::cuDevResourceGenerateDesc"]
10590 pub fn cuCtxGetDevResource(
10591 hCtx: CUcontext,
10592 resource: *mut CUdevResource,
10593 type_: CUdevResourceType,
10594 ) -> CUresult;
10595}
10596extern "C" {
10597 #[doc = " \\brief Get green context resources\n\n Get the \\p type resources available to the green context represented by \\p hCtx\n \\param hCtx - Green context to get resource for\n \\param resource - Output pointer to a CUdevResource structure\n \\param type - Type of resource 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_RESOURCE_TYPE,\n ::CUDA_ERROR_INVALID_VALUE\n\n \\sa\n ::cuDevResourceGenerateDesc"]
10598 pub fn cuGreenCtxGetDevResource(
10599 hCtx: CUgreenCtx,
10600 resource: *mut CUdevResource,
10601 type_: CUdevResourceType,
10602 ) -> CUresult;
10603}
10604extern "C" {
10605 #[doc = " \\brief Splits \\p CU_DEV_RESOURCE_TYPE_SM resources.\n\n Splits \\p CU_DEV_RESOURCE_TYPE_SM resources into \\p nbGroups, adhering to the minimum SM count specified in \\p minCount\n and the usage flags in \\p useFlags. If \\p result is NULL, the API simulates a split and provides the amount of groups that\n would be created in \\p nbGroups. Otherwise, \\p nbGroups must point to the amount of elements in \\p result and on return,\n the API will overwrite \\p nbGroups with the amount actually created. The groups are written to the array in \\p result.\n \\p nbGroups can be less than the total amount if a smaller number of groups is needed.\n\n This API is used to spatially partition the input resource. The input resource needs to come from one of\n ::cuDeviceGetDevResource, ::cuCtxGetDevResource, or ::cuGreenCtxGetDevResource.\n A limitation of the API is that the output results cannot be split again without\n first creating a descriptor and a green context with that descriptor.\n\n When creating the groups, the API will take into account the performance and functional characteristics of the\n input resource, and guarantee a split that will create a disjoint set of symmetrical partitions. This may lead to fewer groups created\n than purely dividing the total SM count by the \\p minCount due to cluster requirements or\n alignment and granularity requirements for the minCount.\n\n The \\p remainder set does not have the same functional or performance guarantees as the groups in \\p result.\n Its use should be carefully planned and future partitions of the \\p remainder set are discouraged.\n\n The following flags are supported:\n - \\p CU_DEV_SM_RESOURCE_SPLIT_IGNORE_SM_COSCHEDULING : Lower the minimum SM count and alignment, and treat each SM independent of its hierarchy.\n This allows more fine grained partitions but at the cost of advanced features (such as large clusters on compute capability 9.0+).\n - \\p CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE : Compute Capability 9.0+ only. Attempt to create groups that may allow\n for maximally sized thread clusters. This can be queried post green context creation using ::cuOccupancyMaxPotentialClusterSize.\n\n A successful API call must either have:\n - A valid array of \\p result pointers of size passed in \\p nbGroups, with \\p input of type \\p CU_DEV_RESOURCE_TYPE_SM.\n Value of \\p minCount must be between 0 and the SM count specified in \\p input. \\p remaining may be NULL.\n - NULL passed in for \\p result, with a valid integer pointer in \\p nbGroups and \\p input of type \\p CU_DEV_RESOURCE_TYPE_SM.\n Value of \\p minCount must be between 0 and the SM count specified in \\p input. \\p remaining may be NULL.\n This queries the number of groups that would be created by the API.\n\n Note: The API is not supported on 32-bit platforms.\n\n \\param result - Output array of \\p CUdevResource resources. Can be NULL to query the number of groups.\n \\param nbGroups - This is a pointer, specifying the number of groups that would be or should be created as described below.\n \\param input - Input SM resource to be split. Must be a valid \\p CU_DEV_RESOURCE_TYPE_SM resource.\n \\param remaining - If the input resource cannot be cleanly split among \\p nbGroups, the remaining is placed in here.\n Can be ommitted (NULL) if the user does not need the remaining set.\n \\param useFlags - Flags specifying how these partitions are used or which constraints to abide by when splitting the input. Zero is valid for default behavior.\n \\param minCount - Minimum number of SMs required\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 ::CUDA_ERROR_INVALID_RESOURCE_TYPE,\n ::CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION\n\n \\sa\n ::cuGreenCtxGetDevResource,\n ::cuCtxGetDevResource,\n ::cuDeviceGetDevResource"]
10606 pub fn cuDevSmResourceSplitByCount(
10607 result: *mut CUdevResource,
10608 nbGroups: *mut ::std::os::raw::c_uint,
10609 input: *const CUdevResource,
10610 remaining: *mut CUdevResource,
10611 useFlags: ::std::os::raw::c_uint,
10612 minCount: ::std::os::raw::c_uint,
10613 ) -> CUresult;
10614}
10615extern "C" {
10616 #[doc = " \\brief Generate a resource descriptor\n\n Generates a single resource descriptor with the set of resources specified in \\p resources.\n The generated resource descriptor is necessary for the creation of green contexts via the ::cuGreenCtxCreate API.\n Resources of the same type can be passed in, provided they meet the requirements as noted below.\n\n A successful API call must have:\n - A valid output pointer for the \\p phDesc descriptor as well as a valid array of \\p resources pointers,\n with the array size passed in \\p nbResources.\n If multiple resources are provided in \\p resources, the device they came from must be the same,\n otherwise CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned.\n If multiple resources are provided in \\p resources and they are of type ::CU_DEV_RESOURCE_TYPE_SM,\n they must be outputs (whether \\p result or \\p remaining) from the same split API instance,\n otherwise CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned.\n\n Note: The API is not supported on 32-bit platforms.\n\n \\param phDesc - Output descriptor\n \\param resources - Array of resources to be included in the descriptor\n \\param nbResources - Number of resources passed in \\p resources\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_DEINITIALIZED,\n ::CUDA_ERROR_NOT_INITIALIZED,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_INVALID_RESOURCE_TYPE,\n ::CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION\n\n \\sa\n ::cuDevSmResourceSplitByCount"]
10617 pub fn cuDevResourceGenerateDesc(
10618 phDesc: *mut CUdevResourceDesc,
10619 resources: *mut CUdevResource,
10620 nbResources: ::std::os::raw::c_uint,
10621 ) -> CUresult;
10622}
10623extern "C" {
10624 #[doc = " \\brief Records an event.\n\n Captures in \\p hEvent all the activities of the green context of \\p hCtx\n at the time of this call. \\p hEvent and \\p hCtx must be from the same\n primary context otherwise ::CUDA_ERROR_INVALID_HANDLE is returned.\n Calls such as ::cuEventQuery() or ::cuGreenCtxWaitEvent() will\n then examine or wait for completion of the work that was captured. Uses of\n \\p hCtx after this call do not modify \\p hEvent.\n\n \\note The API will return ::CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED if the\n specified green context \\p hCtx has a stream in the capture mode. In such\n a case, the call will invalidate all the conflicting captures.\n\n \\param hCtx - Green context to record event for\n \\param hEvent - Event to record\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_STREAM_CAPTURE_UNSUPPORTED\n\n \\sa\n ::cuGreenCtxWaitEvent,\n ::cuEventRecord,\n ::cuCtxRecordEvent,\n ::cuCtxWaitEvent"]
10625 pub fn cuGreenCtxRecordEvent(hCtx: CUgreenCtx, hEvent: CUevent) -> CUresult;
10626}
10627extern "C" {
10628 #[doc = " \\brief Make a green context wait on an event\n\n Makes all future work submitted to green context \\p hCtx wait for all work\n captured in \\p hEvent. The synchronization will be performed on the device\n and will not block the calling CPU thread. See ::cuGreenCtxRecordEvent()\n or ::cuEventRecord(), for details on what is captured by an event.\n\n \\note \\p hEvent may be from a different context or device than \\p hCtx.\n\n \\note The API will return ::CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED and\n invalidate the capture if the specified event \\p hEvent is part of an\n ongoing capture sequence or if the specified green context \\p hCtx has\n a stream in the capture mode.\n\n \\param hCtx - Green context to wait\n \\param hEvent - Event to wait on\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_STREAM_CAPTURE_UNSUPPORTED\n\n \\sa\n ::cuGreenCtxRecordEvent,\n ::cuStreamWaitEvent\n ::cuCtxRecordEvent,\n ::cuCtxWaitEvent"]
10629 pub fn cuGreenCtxWaitEvent(hCtx: CUgreenCtx, hEvent: CUevent) -> CUresult;
10630}
10631extern "C" {
10632 #[doc = " \\brief Query the green context associated with a stream\n\n Returns the CUDA green context that the stream is associated with, or NULL if the stream\n is not associated with any green context.\n\n The stream handle \\p hStream can refer to any of the following:\n <ul>\n <li>\n a stream created via any of the CUDA driver APIs such as ::cuStreamCreate, ::cuStreamCreateWithPriority\n and ::cuGreenCtxStreamCreate, or their runtime API equivalents such as\n ::cudaStreamCreate, ::cudaStreamCreateWithFlags and ::cudaStreamCreateWithPriority.\n If during stream creation the context that was active in the calling thread was obtained\n with cuCtxFromGreenCtx, that green context is returned in \\p phCtx.\n Otherwise, \\p *phCtx is set to NULL instead.\n </li>\n <li>\n special stream such as the NULL stream or ::CU_STREAM_LEGACY.\n In that case if context that is active in the calling thread was obtained\n with cuCtxFromGreenCtx, that green context is returned.\n Otherwise, \\p *phCtx is set to NULL instead.\n </li>\n </ul>\n Passing an invalid handle will result in undefined behavior.\n\n \\param hStream - Handle to the stream to be queried\n \\param phCtx - Returned green 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 ::cuStreamCreate,\n ::cuStreamCreateWithPriority,\n ::cuStreamGetCtx_v2,\n ::cuGreenCtxStreamCreate,\n ::cuStreamGetPriority,\n ::cuStreamGetFlags,\n ::cuStreamWaitEvent,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cudaStreamCreate,\n ::cudaStreamCreateWithFlags"]
10633 pub fn cuStreamGetGreenCtx(hStream: CUstream, phCtx: *mut CUgreenCtx) -> CUresult;
10634}
10635extern "C" {
10636 #[doc = " \\brief Create a stream for use in the green context\n\n Creates a stream for use in the specified green context \\p greenCtx and returns a handle in \\p phStream.\n The stream can be destroyed by calling ::cuStreamDestroy(). Note that the API ignores the context that\n is current to the calling thread and creates a stream in the specified green context \\p greenCtx.\n\n The supported values for \\p flags are:\n - ::CU_STREAM_NON_BLOCKING: This must be specified. It indicates that work running in the created\n stream may run concurrently with work in the default stream, and that\n the created stream should perform no implicit synchronization with the default stream.\n\n Specifying \\p priority affects the scheduling priority of work in the stream. Priorities provide a\n hint to preferentially run work with higher priority when possible, but do not preempt\n already-running work or provide any other functional guarantee on execution order.\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 greenCtx - Green context for which to create the stream for\n \\param flags - Flags for stream creation. \\p CU_STREAM_NON_BLOCKING must be specified.\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 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 ::cuGreenCtxCreate\n ::cuStreamCreate,\n ::cuStreamGetPriority,\n ::cuCtxGetStreamPriorityRange,\n ::cuStreamGetFlags,\n ::cuStreamWaitEvent,\n ::cuStreamQuery,\n ::cuStreamSynchronize,\n ::cuStreamAddCallback,\n ::cudaStreamCreateWithPriority"]
10637 pub fn cuGreenCtxStreamCreate(
10638 phStream: *mut CUstream,
10639 greenCtx: CUgreenCtx,
10640 flags: ::std::os::raw::c_uint,
10641 priority: ::std::os::raw::c_int,
10642 ) -> CUresult;
10643}
10644impl cudaRoundMode {
10645 pub const cudaRoundNearest: cudaRoundMode = cudaRoundMode(0);
10646}
10647impl cudaRoundMode {
10648 pub const cudaRoundZero: cudaRoundMode = cudaRoundMode(1);
10649}
10650impl cudaRoundMode {
10651 pub const cudaRoundPosInf: cudaRoundMode = cudaRoundMode(2);
10652}
10653impl cudaRoundMode {
10654 pub const cudaRoundMinInf: cudaRoundMode = cudaRoundMode(3);
10655}
10656#[repr(transparent)]
10657#[doc = " *\n *\n *"]
10658#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
10659pub struct cudaRoundMode(pub ::std::os::raw::c_uint);
10660#[doc = " *\n *\n *"]
10661#[repr(C)]
10662#[derive(Debug, Copy, Clone)]
10663pub struct dim3 {
10664 pub x: ::std::os::raw::c_uint,
10665 pub y: ::std::os::raw::c_uint,
10666 pub z: ::std::os::raw::c_uint,
10667}
10668#[allow(clippy::unnecessary_operation, clippy::identity_op)]
10669const _: () = {
10670 ["Size of dim3"][::std::mem::size_of::<dim3>() - 12usize];
10671 ["Alignment of dim3"][::std::mem::align_of::<dim3>() - 4usize];
10672 ["Offset of field: dim3::x"][::std::mem::offset_of!(dim3, x) - 0usize];
10673 ["Offset of field: dim3::y"][::std::mem::offset_of!(dim3, y) - 4usize];
10674 ["Offset of field: dim3::z"][::std::mem::offset_of!(dim3, z) - 8usize];
10675};
10676impl cudaError {
10677 #[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 ::cudaEventQuery() and ::cudaStreamQuery())."]
10678 pub const cudaSuccess: cudaError = cudaError(0);
10679}
10680impl cudaError {
10681 #[doc = " This indicates that one or more of the parameters passed to the API call\n is not within an acceptable range of values."]
10682 pub const cudaErrorInvalidValue: cudaError = cudaError(1);
10683}
10684impl cudaError {
10685 #[doc = " The API call failed because it was unable to allocate enough memory or\n other resources to perform the requested operation."]
10686 pub const cudaErrorMemoryAllocation: cudaError = cudaError(2);
10687}
10688impl cudaError {
10689 #[doc = " The API call failed because the CUDA driver and runtime could not be\n initialized."]
10690 pub const cudaErrorInitializationError: cudaError = cudaError(3);
10691}
10692impl cudaError {
10693 #[doc = " This indicates that a CUDA Runtime API call cannot be executed because\n it is being called during process shut down, at a point in time after\n CUDA driver has been unloaded."]
10694 pub const cudaErrorCudartUnloading: cudaError = cudaError(4);
10695}
10696impl cudaError {
10697 #[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."]
10698 pub const cudaErrorProfilerDisabled: cudaError = cudaError(5);
10699}
10700impl cudaError {
10701 #[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 ::cudaProfilerStart or\n ::cudaProfilerStop without initialization."]
10702 pub const cudaErrorProfilerNotInitialized: cudaError = cudaError(6);
10703}
10704impl cudaError {
10705 #[doc = " \\deprecated\n This error return is deprecated as of CUDA 5.0. It is no longer an error\n to call cudaProfilerStart() when profiling is already enabled."]
10706 pub const cudaErrorProfilerAlreadyStarted: cudaError = cudaError(7);
10707}
10708impl cudaError {
10709 #[doc = " \\deprecated\n This error return is deprecated as of CUDA 5.0. It is no longer an error\n to call cudaProfilerStop() when profiling is already disabled."]
10710 pub const cudaErrorProfilerAlreadyStopped: cudaError = cudaError(8);
10711}
10712impl cudaError {
10713 #[doc = " This indicates that a kernel launch is requesting resources that can\n never be satisfied by the current device. Requesting more shared memory\n per block than the device supports will trigger this error, as will\n requesting too many threads or blocks. See ::cudaDeviceProp for more\n device limitations."]
10714 pub const cudaErrorInvalidConfiguration: cudaError = cudaError(9);
10715}
10716impl cudaError {
10717 #[doc = " This indicates that one or more of the pitch-related parameters passed\n to the API call is not within the acceptable range for pitch."]
10718 pub const cudaErrorInvalidPitchValue: cudaError = cudaError(12);
10719}
10720impl cudaError {
10721 #[doc = " This indicates that the symbol name/identifier passed to the API call\n is not a valid name or identifier."]
10722 pub const cudaErrorInvalidSymbol: cudaError = cudaError(13);
10723}
10724impl cudaError {
10725 #[doc = " This indicates that at least one host pointer passed to the API call is\n not a valid host pointer.\n \\deprecated\n This error return is deprecated as of CUDA 10.1."]
10726 pub const cudaErrorInvalidHostPointer: cudaError = cudaError(16);
10727}
10728impl cudaError {
10729 #[doc = " This indicates that at least one device pointer passed to the API call is\n not a valid device pointer.\n \\deprecated\n This error return is deprecated as of CUDA 10.1."]
10730 pub const cudaErrorInvalidDevicePointer: cudaError = cudaError(17);
10731}
10732impl cudaError {
10733 #[doc = " This indicates that the texture passed to the API call is not a valid\n texture."]
10734 pub const cudaErrorInvalidTexture: cudaError = cudaError(18);
10735}
10736impl cudaError {
10737 #[doc = " This indicates that the texture binding is not valid. This occurs if you\n call ::cudaGetTextureAlignmentOffset() with an unbound texture."]
10738 pub const cudaErrorInvalidTextureBinding: cudaError = cudaError(19);
10739}
10740impl cudaError {
10741 #[doc = " This indicates that the channel descriptor passed to the API call is not\n valid. This occurs if the format is not one of the formats specified by\n ::cudaChannelFormatKind, or if one of the dimensions is invalid."]
10742 pub const cudaErrorInvalidChannelDescriptor: cudaError = cudaError(20);
10743}
10744impl cudaError {
10745 #[doc = " This indicates that the direction of the memcpy passed to the API call is\n not one of the types specified by ::cudaMemcpyKind."]
10746 pub const cudaErrorInvalidMemcpyDirection: cudaError = cudaError(21);
10747}
10748impl cudaError {
10749 #[doc = " This indicated that the user has taken the address of a constant variable,\n which was forbidden up until the CUDA 3.1 release.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Variables in constant\n memory may now have their address taken by the runtime via\n ::cudaGetSymbolAddress()."]
10750 pub const cudaErrorAddressOfConstant: cudaError = cudaError(22);
10751}
10752impl cudaError {
10753 #[doc = " This indicated that a texture fetch was not able to be performed.\n This was previously used for device emulation of texture operations.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
10754 pub const cudaErrorTextureFetchFailed: cudaError = cudaError(23);
10755}
10756impl cudaError {
10757 #[doc = " This indicated that a texture was not bound for access.\n This was previously used for device emulation of texture operations.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
10758 pub const cudaErrorTextureNotBound: cudaError = cudaError(24);
10759}
10760impl cudaError {
10761 #[doc = " This indicated that a synchronization operation had failed.\n This was previously used for some device emulation functions.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
10762 pub const cudaErrorSynchronizationError: cudaError = cudaError(25);
10763}
10764impl cudaError {
10765 #[doc = " This indicates that a non-float texture was being accessed with linear\n filtering. This is not supported by CUDA."]
10766 pub const cudaErrorInvalidFilterSetting: cudaError = cudaError(26);
10767}
10768impl cudaError {
10769 #[doc = " This indicates that an attempt was made to read a non-float texture as a\n normalized float. This is not supported by CUDA."]
10770 pub const cudaErrorInvalidNormSetting: cudaError = cudaError(27);
10771}
10772impl cudaError {
10773 #[doc = " Mixing of device and device emulation code was not allowed.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
10774 pub const cudaErrorMixedDeviceExecution: cudaError = cudaError(28);
10775}
10776impl cudaError {
10777 #[doc = " This indicates that the API call is not yet implemented. Production\n releases of CUDA will never return this error.\n \\deprecated\n This error return is deprecated as of CUDA 4.1."]
10778 pub const cudaErrorNotYetImplemented: cudaError = cudaError(31);
10779}
10780impl cudaError {
10781 #[doc = " This indicated that an emulated device pointer exceeded the 32-bit address\n range.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
10782 pub const cudaErrorMemoryValueTooLarge: cudaError = cudaError(32);
10783}
10784impl cudaError {
10785 #[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."]
10786 pub const cudaErrorStubLibrary: cudaError = cudaError(34);
10787}
10788impl cudaError {
10789 #[doc = " This indicates that the installed NVIDIA CUDA driver is older than the\n CUDA runtime library. This is not a supported configuration. Users should\n install an updated NVIDIA display driver to allow the application to run."]
10790 pub const cudaErrorInsufficientDriver: cudaError = cudaError(35);
10791}
10792impl cudaError {
10793 #[doc = " This indicates that the API call requires a newer CUDA driver than the one\n currently installed. Users should install an updated NVIDIA CUDA driver\n to allow the API call to succeed."]
10794 pub const cudaErrorCallRequiresNewerDriver: cudaError = cudaError(36);
10795}
10796impl cudaError {
10797 #[doc = " This indicates that the surface passed to the API call is not a valid\n surface."]
10798 pub const cudaErrorInvalidSurface: cudaError = cudaError(37);
10799}
10800impl cudaError {
10801 #[doc = " This indicates that multiple global or constant variables (across separate\n CUDA source files in the application) share the same string name."]
10802 pub const cudaErrorDuplicateVariableName: cudaError = cudaError(43);
10803}
10804impl cudaError {
10805 #[doc = " This indicates that multiple textures (across separate CUDA source\n files in the application) share the same string name."]
10806 pub const cudaErrorDuplicateTextureName: cudaError = cudaError(44);
10807}
10808impl cudaError {
10809 #[doc = " This indicates that multiple surfaces (across separate CUDA source\n files in the application) share the same string name."]
10810 pub const cudaErrorDuplicateSurfaceName: cudaError = cudaError(45);
10811}
10812impl cudaError {
10813 #[doc = " This indicates that all CUDA devices are busy or unavailable at the current\n time. Devices are often busy/unavailable due to use of\n ::cudaComputeModeProhibited, ::cudaComputeModeExclusiveProcess, or when long\n running CUDA kernels have filled up the GPU and are blocking new work\n from starting. They can also be unavailable due to memory constraints\n on a device that already has active CUDA work being performed."]
10814 pub const cudaErrorDevicesUnavailable: cudaError = cudaError(46);
10815}
10816impl cudaError {
10817 #[doc = " This indicates that the current context is not compatible with this\n the CUDA Runtime. This can only occur if you are using CUDA\n Runtime/Driver interoperability and have created an existing Driver\n context using the driver API. The Driver context may be incompatible\n either because the Driver context was created using an older version\n of the API, because the Runtime API call expects a primary driver\n context and the Driver context is not primary, or because the Driver\n context has been destroyed. Please see \\ref CUDART_DRIVER \"Interactions\n with the CUDA Driver API\" for more information."]
10818 pub const cudaErrorIncompatibleDriverContext: cudaError = cudaError(49);
10819}
10820impl cudaError {
10821 #[doc = " The device function being invoked (usually via ::cudaLaunchKernel()) was not\n previously configured via the ::cudaConfigureCall() function."]
10822 pub const cudaErrorMissingConfiguration: cudaError = cudaError(52);
10823}
10824impl cudaError {
10825 #[doc = " This indicated that a previous kernel launch failed. This was previously\n used for device emulation of kernel launches.\n \\deprecated\n This error return is deprecated as of CUDA 3.1. Device emulation mode was\n removed with the CUDA 3.1 release."]
10826 pub const cudaErrorPriorLaunchFailure: cudaError = cudaError(53);
10827}
10828impl cudaError {
10829 #[doc = " This error indicates that a device runtime grid launch did not occur\n because the depth of the child grid would exceed the maximum supported\n number of nested grid launches."]
10830 pub const cudaErrorLaunchMaxDepthExceeded: cudaError = cudaError(65);
10831}
10832impl cudaError {
10833 #[doc = " This error indicates that a grid launch did not occur because the kernel\n uses file-scoped textures which are unsupported by the device runtime.\n Kernels launched via the device runtime only support textures created with\n the Texture Object API's."]
10834 pub const cudaErrorLaunchFileScopedTex: cudaError = cudaError(66);
10835}
10836impl cudaError {
10837 #[doc = " This error indicates that a grid launch did not occur because the kernel\n uses file-scoped surfaces which are unsupported by the device runtime.\n Kernels launched via the device runtime only support surfaces created with\n the Surface Object API's."]
10838 pub const cudaErrorLaunchFileScopedSurf: cudaError = cudaError(67);
10839}
10840impl cudaError {
10841 #[doc = " This error indicates that a call to ::cudaDeviceSynchronize made from\n the device runtime failed because the call was made at grid depth greater\n than than either the default (2 levels of grids) or user specified device\n limit ::cudaLimitDevRuntimeSyncDepth. To be able to synchronize on\n launched grids at a greater depth successfully, the maximum nested\n depth at which ::cudaDeviceSynchronize will be called must be specified\n with the ::cudaLimitDevRuntimeSyncDepth limit to the ::cudaDeviceSetLimit\n api before the host-side launch of a kernel using the device runtime.\n Keep in mind that additional levels of sync depth require the runtime\n to reserve large amounts of device memory that cannot be used for\n user allocations. Note that ::cudaDeviceSynchronize made from device\n runtime is only supported on devices of compute capability < 9.0."]
10842 pub const cudaErrorSyncDepthExceeded: cudaError = cudaError(68);
10843}
10844impl cudaError {
10845 #[doc = " This error indicates that a device runtime grid launch failed because\n the launch would exceed the limit ::cudaLimitDevRuntimePendingLaunchCount.\n For this launch to proceed successfully, ::cudaDeviceSetLimit must be\n called to set the ::cudaLimitDevRuntimePendingLaunchCount to be higher\n than the upper bound of outstanding launches that can be issued to the\n device runtime. Keep in mind that raising the limit of pending device\n runtime launches will require the runtime to reserve device memory that\n cannot be used for user allocations."]
10846 pub const cudaErrorLaunchPendingCountExceeded: cudaError = cudaError(69);
10847}
10848impl cudaError {
10849 #[doc = " The requested device function does not exist or is not compiled for the\n proper device architecture."]
10850 pub const cudaErrorInvalidDeviceFunction: cudaError = cudaError(98);
10851}
10852impl cudaError {
10853 #[doc = " This indicates that no CUDA-capable devices were detected by the installed\n CUDA driver."]
10854 pub const cudaErrorNoDevice: cudaError = cudaError(100);
10855}
10856impl cudaError {
10857 #[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."]
10858 pub const cudaErrorInvalidDevice: cudaError = cudaError(101);
10859}
10860impl cudaError {
10861 #[doc = " This indicates that the device doesn't have a valid Grid License."]
10862 pub const cudaErrorDeviceNotLicensed: cudaError = cudaError(102);
10863}
10864impl cudaError {
10865 #[doc = " By default, the CUDA runtime may perform a minimal set of self-tests,\n as well as CUDA driver tests, to establish the validity of both.\n Introduced in CUDA 11.2, this error return indicates that at least one\n of these tests has failed and the validity of either the runtime\n or the driver could not be established."]
10866 pub const cudaErrorSoftwareValidityNotEstablished: cudaError = cudaError(103);
10867}
10868impl cudaError {
10869 #[doc = " This indicates an internal startup failure in the CUDA runtime."]
10870 pub const cudaErrorStartupFailure: cudaError = cudaError(127);
10871}
10872impl cudaError {
10873 #[doc = " This indicates that the device kernel image is invalid."]
10874 pub const cudaErrorInvalidKernelImage: cudaError = cudaError(200);
10875}
10876impl cudaError {
10877 #[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."]
10878 pub const cudaErrorDeviceUninitialized: cudaError = cudaError(201);
10879}
10880impl cudaError {
10881 #[doc = " This indicates that the buffer object could not be mapped."]
10882 pub const cudaErrorMapBufferObjectFailed: cudaError = cudaError(205);
10883}
10884impl cudaError {
10885 #[doc = " This indicates that the buffer object could not be unmapped."]
10886 pub const cudaErrorUnmapBufferObjectFailed: cudaError = cudaError(206);
10887}
10888impl cudaError {
10889 #[doc = " This indicates that the specified array is currently mapped and thus\n cannot be destroyed."]
10890 pub const cudaErrorArrayIsMapped: cudaError = cudaError(207);
10891}
10892impl cudaError {
10893 #[doc = " This indicates that the resource is already mapped."]
10894 pub const cudaErrorAlreadyMapped: cudaError = cudaError(208);
10895}
10896impl cudaError {
10897 #[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."]
10898 pub const cudaErrorNoKernelImageForDevice: cudaError = cudaError(209);
10899}
10900impl cudaError {
10901 #[doc = " This indicates that a resource has already been acquired."]
10902 pub const cudaErrorAlreadyAcquired: cudaError = cudaError(210);
10903}
10904impl cudaError {
10905 #[doc = " This indicates that a resource is not mapped."]
10906 pub const cudaErrorNotMapped: cudaError = cudaError(211);
10907}
10908impl cudaError {
10909 #[doc = " This indicates that a mapped resource is not available for access as an\n array."]
10910 pub const cudaErrorNotMappedAsArray: cudaError = cudaError(212);
10911}
10912impl cudaError {
10913 #[doc = " This indicates that a mapped resource is not available for access as a\n pointer."]
10914 pub const cudaErrorNotMappedAsPointer: cudaError = cudaError(213);
10915}
10916impl cudaError {
10917 #[doc = " This indicates that an uncorrectable ECC error was detected during\n execution."]
10918 pub const cudaErrorECCUncorrectable: cudaError = cudaError(214);
10919}
10920impl cudaError {
10921 #[doc = " This indicates that the ::cudaLimit passed to the API call is not\n supported by the active device."]
10922 pub const cudaErrorUnsupportedLimit: cudaError = cudaError(215);
10923}
10924impl cudaError {
10925 #[doc = " This indicates that a call tried to access an exclusive-thread device that\n is already in use by a different thread."]
10926 pub const cudaErrorDeviceAlreadyInUse: cudaError = cudaError(216);
10927}
10928impl cudaError {
10929 #[doc = " This error indicates that P2P access is not supported across the given\n devices."]
10930 pub const cudaErrorPeerAccessUnsupported: cudaError = cudaError(217);
10931}
10932impl cudaError {
10933 #[doc = " A PTX compilation failed. The runtime may fall back to compiling PTX if\n an application does not contain a suitable binary for the current device."]
10934 pub const cudaErrorInvalidPtx: cudaError = cudaError(218);
10935}
10936impl cudaError {
10937 #[doc = " This indicates an error with the OpenGL or DirectX context."]
10938 pub const cudaErrorInvalidGraphicsContext: cudaError = cudaError(219);
10939}
10940impl cudaError {
10941 #[doc = " This indicates that an uncorrectable NVLink error was detected during the\n execution."]
10942 pub const cudaErrorNvlinkUncorrectable: cudaError = cudaError(220);
10943}
10944impl cudaError {
10945 #[doc = " This indicates that the PTX JIT compiler library was not found. The JIT Compiler\n library is used for PTX compilation. The runtime may fall back to compiling PTX\n if an application does not contain a suitable binary for the current device."]
10946 pub const cudaErrorJitCompilerNotFound: cudaError = cudaError(221);
10947}
10948impl cudaError {
10949 #[doc = " This indicates that the provided PTX was compiled with an unsupported toolchain.\n The most common reason for this, is the PTX was generated by a compiler newer\n than what is supported by the CUDA driver and PTX JIT compiler."]
10950 pub const cudaErrorUnsupportedPtxVersion: cudaError = cudaError(222);
10951}
10952impl cudaError {
10953 #[doc = " This indicates that the JIT compilation was disabled. The JIT compilation compiles\n PTX. The runtime may fall back to compiling PTX if an application does not contain\n a suitable binary for the current device."]
10954 pub const cudaErrorJitCompilationDisabled: cudaError = cudaError(223);
10955}
10956impl cudaError {
10957 #[doc = " This indicates that the provided execution affinity is not supported by the device."]
10958 pub const cudaErrorUnsupportedExecAffinity: cudaError = cudaError(224);
10959}
10960impl cudaError {
10961 #[doc = " This indicates that the code to be compiled by the PTX JIT contains\n unsupported call to cudaDeviceSynchronize."]
10962 pub const cudaErrorUnsupportedDevSideSync: cudaError = cudaError(225);
10963}
10964impl cudaError {
10965 #[doc = " This indicates that the device kernel source is invalid."]
10966 pub const cudaErrorInvalidSource: cudaError = cudaError(300);
10967}
10968impl cudaError {
10969 #[doc = " This indicates that the file specified was not found."]
10970 pub const cudaErrorFileNotFound: cudaError = cudaError(301);
10971}
10972impl cudaError {
10973 #[doc = " This indicates that a link to a shared object failed to resolve."]
10974 pub const cudaErrorSharedObjectSymbolNotFound: cudaError = cudaError(302);
10975}
10976impl cudaError {
10977 #[doc = " This indicates that initialization of a shared object failed."]
10978 pub const cudaErrorSharedObjectInitFailed: cudaError = cudaError(303);
10979}
10980impl cudaError {
10981 #[doc = " This error indicates that an OS call failed."]
10982 pub const cudaErrorOperatingSystem: cudaError = cudaError(304);
10983}
10984impl cudaError {
10985 #[doc = " This indicates that a resource handle passed to the API call was not\n valid. Resource handles are opaque types like ::cudaStream_t and\n ::cudaEvent_t."]
10986 pub const cudaErrorInvalidResourceHandle: cudaError = cudaError(400);
10987}
10988impl cudaError {
10989 #[doc = " This indicates that a resource required by the API call is not in a\n valid state to perform the requested operation."]
10990 pub const cudaErrorIllegalState: cudaError = cudaError(401);
10991}
10992impl cudaError {
10993 #[doc = " This indicates an attempt was made to introspect an object in a way that\n would discard semantically important information. This is either due to\n the object using funtionality newer than the API version used to\n introspect it or omission of optional return arguments."]
10994 pub const cudaErrorLossyQuery: cudaError = cudaError(402);
10995}
10996impl cudaError {
10997 #[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."]
10998 pub const cudaErrorSymbolNotFound: cudaError = cudaError(500);
10999}
11000impl cudaError {
11001 #[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 ::cudaSuccess (which indicates completion). Calls that\n may return this value include ::cudaEventQuery() and ::cudaStreamQuery()."]
11002 pub const cudaErrorNotReady: cudaError = cudaError(600);
11003}
11004impl cudaError {
11005 #[doc = " The device encountered a 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."]
11006 pub const cudaErrorIllegalAddress: cudaError = cudaError(700);
11007}
11008impl cudaError {
11009 #[doc = " This indicates that a launch did not occur because it did not have\n appropriate resources. Although this error is similar to\n ::cudaErrorInvalidConfiguration, this error usually indicates that the\n user has attempted to pass too many arguments to the device kernel, or the\n kernel launch specifies too many threads for the kernel's register count."]
11010 pub const cudaErrorLaunchOutOfResources: cudaError = cudaError(701);
11011}
11012impl cudaError {
11013 #[doc = " This indicates that the device kernel took too long to execute. This can\n only occur if timeouts are enabled - see the device property\n \\ref ::cudaDeviceProp::kernelExecTimeoutEnabled \"kernelExecTimeoutEnabled\"\n 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."]
11014 pub const cudaErrorLaunchTimeout: cudaError = cudaError(702);
11015}
11016impl cudaError {
11017 #[doc = " This error indicates a kernel launch that uses an incompatible texturing\n mode."]
11018 pub const cudaErrorLaunchIncompatibleTexturing: cudaError = cudaError(703);
11019}
11020impl cudaError {
11021 #[doc = " This error indicates that a call to ::cudaDeviceEnablePeerAccess() is\n trying to re-enable peer addressing on from a context which has already\n had peer addressing enabled."]
11022 pub const cudaErrorPeerAccessAlreadyEnabled: cudaError = cudaError(704);
11023}
11024impl cudaError {
11025 #[doc = " This error indicates that ::cudaDeviceDisablePeerAccess() is trying to\n disable peer addressing which has not been enabled yet via\n ::cudaDeviceEnablePeerAccess()."]
11026 pub const cudaErrorPeerAccessNotEnabled: cudaError = cudaError(705);
11027}
11028impl cudaError {
11029 #[doc = " This indicates that the user has called ::cudaSetValidDevices(),\n ::cudaSetDeviceFlags(), ::cudaD3D9SetDirect3DDevice(),\n ::cudaD3D10SetDirect3DDevice, ::cudaD3D11SetDirect3DDevice(), or\n ::cudaVDPAUSetVDPAUDevice() after initializing the CUDA runtime by\n calling non-device management operations (allocating memory and\n launching kernels are examples of non-device management operations).\n This error can also be returned if using runtime/driver\n interoperability and there is an existing ::CUcontext active on the\n host thread."]
11030 pub const cudaErrorSetOnActiveProcess: cudaError = cudaError(708);
11031}
11032impl cudaError {
11033 #[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."]
11034 pub const cudaErrorContextIsDestroyed: cudaError = cudaError(709);
11035}
11036impl cudaError {
11037 #[doc = " An assert triggered in device code during kernel execution. The device\n cannot be used again. All existing allocations are invalid. To continue\n using CUDA, the process must be terminated and relaunched."]
11038 pub const cudaErrorAssert: cudaError = cudaError(710);
11039}
11040impl cudaError {
11041 #[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 ::cudaEnablePeerAccess()."]
11042 pub const cudaErrorTooManyPeers: cudaError = cudaError(711);
11043}
11044impl cudaError {
11045 #[doc = " This error indicates that the memory range passed to ::cudaHostRegister()\n has already been registered."]
11046 pub const cudaErrorHostMemoryAlreadyRegistered: cudaError = cudaError(712);
11047}
11048impl cudaError {
11049 #[doc = " This error indicates that the pointer passed to ::cudaHostUnregister()\n does not correspond to any currently registered memory region."]
11050 pub const cudaErrorHostMemoryNotRegistered: cudaError = cudaError(713);
11051}
11052impl cudaError {
11053 #[doc = " Device encountered an error in the call stack during kernel execution,\n possibly 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."]
11054 pub const cudaErrorHardwareStackError: cudaError = cudaError(714);
11055}
11056impl cudaError {
11057 #[doc = " The device encountered an illegal instruction during kernel execution\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."]
11058 pub const cudaErrorIllegalInstruction: cudaError = cudaError(715);
11059}
11060impl cudaError {
11061 #[doc = " 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."]
11062 pub const cudaErrorMisalignedAddress: cudaError = cudaError(716);
11063}
11064impl cudaError {
11065 #[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."]
11066 pub const cudaErrorInvalidAddressSpace: cudaError = cudaError(717);
11067}
11068impl cudaError {
11069 #[doc = " The device encountered an invalid program counter.\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."]
11070 pub const cudaErrorInvalidPc: cudaError = cudaError(718);
11071}
11072impl cudaError {
11073 #[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."]
11074 pub const cudaErrorLaunchFailure: cudaError = cudaError(719);
11075}
11076impl cudaError {
11077 #[doc = " This error indicates that the number of blocks launched per grid for a kernel that was\n launched via either ::cudaLaunchCooperativeKernel or ::cudaLaunchCooperativeKernelMultiDevice\n exceeds the maximum number of blocks as allowed by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor\n or ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags times the number of multiprocessors\n as specified by the device attribute ::cudaDevAttrMultiProcessorCount."]
11078 pub const cudaErrorCooperativeLaunchTooLarge: cudaError = cudaError(720);
11079}
11080impl cudaError {
11081 #[doc = " This error indicates the attempted operation is not permitted."]
11082 pub const cudaErrorNotPermitted: cudaError = cudaError(800);
11083}
11084impl cudaError {
11085 #[doc = " This error indicates the attempted operation is not supported\n on the current system or device."]
11086 pub const cudaErrorNotSupported: cudaError = cudaError(801);
11087}
11088impl cudaError {
11089 #[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."]
11090 pub const cudaErrorSystemNotReady: cudaError = cudaError(802);
11091}
11092impl cudaError {
11093 #[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."]
11094 pub const cudaErrorSystemDriverMismatch: cudaError = cudaError(803);
11095}
11096impl cudaError {
11097 #[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."]
11098 pub const cudaErrorCompatNotSupportedOnDevice: cudaError = cudaError(804);
11099}
11100impl cudaError {
11101 #[doc = " This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server."]
11102 pub const cudaErrorMpsConnectionFailed: cudaError = cudaError(805);
11103}
11104impl cudaError {
11105 #[doc = " This error indicates that the remote procedural call between the MPS server and the MPS client failed."]
11106 pub const cudaErrorMpsRpcFailure: cudaError = cudaError(806);
11107}
11108impl cudaError {
11109 #[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."]
11110 pub const cudaErrorMpsServerNotReady: cudaError = cudaError(807);
11111}
11112impl cudaError {
11113 #[doc = " This error indicates that the hardware resources required to create MPS client have been exhausted."]
11114 pub const cudaErrorMpsMaxClientsReached: cudaError = cudaError(808);
11115}
11116impl cudaError {
11117 #[doc = " This error indicates the the hardware resources required to device connections have been exhausted."]
11118 pub const cudaErrorMpsMaxConnectionsReached: cudaError = cudaError(809);
11119}
11120impl cudaError {
11121 #[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."]
11122 pub const cudaErrorMpsClientTerminated: cudaError = cudaError(810);
11123}
11124impl cudaError {
11125 #[doc = " This error indicates, that the program is using CUDA Dynamic Parallelism, but the current configuration, like MPS, does not support it."]
11126 pub const cudaErrorCdpNotSupported: cudaError = cudaError(811);
11127}
11128impl cudaError {
11129 #[doc = " This error indicates, that the program contains an unsupported interaction between different versions of CUDA Dynamic Parallelism."]
11130 pub const cudaErrorCdpVersionMismatch: cudaError = cudaError(812);
11131}
11132impl cudaError {
11133 #[doc = " The operation is not permitted when the stream is capturing."]
11134 pub const cudaErrorStreamCaptureUnsupported: cudaError = cudaError(900);
11135}
11136impl cudaError {
11137 #[doc = " The current capture sequence on the stream has been invalidated due to\n a previous error."]
11138 pub const cudaErrorStreamCaptureInvalidated: cudaError = cudaError(901);
11139}
11140impl cudaError {
11141 #[doc = " The operation would have resulted in a merge of two independent capture\n sequences."]
11142 pub const cudaErrorStreamCaptureMerge: cudaError = cudaError(902);
11143}
11144impl cudaError {
11145 #[doc = " The capture was not initiated in this stream."]
11146 pub const cudaErrorStreamCaptureUnmatched: cudaError = cudaError(903);
11147}
11148impl cudaError {
11149 #[doc = " The capture sequence contains a fork that was not joined to the primary\n stream."]
11150 pub const cudaErrorStreamCaptureUnjoined: cudaError = cudaError(904);
11151}
11152impl cudaError {
11153 #[doc = " A dependency would have been created which crosses the capture sequence\n boundary. Only implicit in-stream ordering dependencies are allowed to\n cross the boundary."]
11154 pub const cudaErrorStreamCaptureIsolation: cudaError = cudaError(905);
11155}
11156impl cudaError {
11157 #[doc = " The operation would have resulted in a disallowed implicit dependency on\n a current capture sequence from cudaStreamLegacy."]
11158 pub const cudaErrorStreamCaptureImplicit: cudaError = cudaError(906);
11159}
11160impl cudaError {
11161 #[doc = " The operation is not permitted on an event which was last recorded in a\n capturing stream."]
11162 pub const cudaErrorCapturedEvent: cudaError = cudaError(907);
11163}
11164impl cudaError {
11165 #[doc = " A stream capture sequence not initiated with the ::cudaStreamCaptureModeRelaxed\n argument to ::cudaStreamBeginCapture was passed to ::cudaStreamEndCapture in a\n different thread."]
11166 pub const cudaErrorStreamCaptureWrongThread: cudaError = cudaError(908);
11167}
11168impl cudaError {
11169 #[doc = " This indicates that the wait operation has timed out."]
11170 pub const cudaErrorTimeout: cudaError = cudaError(909);
11171}
11172impl cudaError {
11173 #[doc = " This error indicates that the graph update was not performed because it included\n changes which violated constraints specific to instantiated graph update."]
11174 pub const cudaErrorGraphExecUpdateFailure: cudaError = cudaError(910);
11175}
11176impl cudaError {
11177 #[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."]
11178 pub const cudaErrorExternalDevice: cudaError = cudaError(911);
11179}
11180impl cudaError {
11181 #[doc = " This indicates that a kernel launch error has occurred due to cluster\n misconfiguration."]
11182 pub const cudaErrorInvalidClusterSize: cudaError = cudaError(912);
11183}
11184impl cudaError {
11185 #[doc = " Indiciates a function handle is not loaded when calling an API that requires\n a loaded function."]
11186 pub const cudaErrorFunctionNotLoaded: cudaError = cudaError(913);
11187}
11188impl cudaError {
11189 #[doc = " This error indicates one or more resources passed in are not valid resource\n types for the operation."]
11190 pub const cudaErrorInvalidResourceType: cudaError = cudaError(914);
11191}
11192impl cudaError {
11193 #[doc = " This error indicates one or more resources are insufficient or non-applicable for\n the operation."]
11194 pub const cudaErrorInvalidResourceConfiguration: cudaError = cudaError(915);
11195}
11196impl cudaError {
11197 #[doc = " This indicates that an unknown internal error has occurred."]
11198 pub const cudaErrorUnknown: cudaError = cudaError(999);
11199}
11200impl cudaError {
11201 #[doc = " Any unhandled CUDA driver error is added to this value and returned via\n the runtime. Production releases of CUDA should not return such errors.\n \\deprecated\n This error return is deprecated as of CUDA 4.1."]
11202 pub const cudaErrorApiFailureBase: cudaError = cudaError(10000);
11203}
11204#[repr(transparent)]
11205#[doc = " CUDA error types"]
11206#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11207pub struct cudaError(pub ::std::os::raw::c_uint);
11208impl cudaChannelFormatKind {
11209 #[doc = "< Signed channel format"]
11210 pub const cudaChannelFormatKindSigned: cudaChannelFormatKind = cudaChannelFormatKind(0);
11211}
11212impl cudaChannelFormatKind {
11213 #[doc = "< Unsigned channel format"]
11214 pub const cudaChannelFormatKindUnsigned: cudaChannelFormatKind = cudaChannelFormatKind(1);
11215}
11216impl cudaChannelFormatKind {
11217 #[doc = "< Float channel format"]
11218 pub const cudaChannelFormatKindFloat: cudaChannelFormatKind = cudaChannelFormatKind(2);
11219}
11220impl cudaChannelFormatKind {
11221 #[doc = "< No channel format"]
11222 pub const cudaChannelFormatKindNone: cudaChannelFormatKind = cudaChannelFormatKind(3);
11223}
11224impl cudaChannelFormatKind {
11225 #[doc = "< Unsigned 8-bit integers, planar 4:2:0 YUV format"]
11226 pub const cudaChannelFormatKindNV12: cudaChannelFormatKind = cudaChannelFormatKind(4);
11227}
11228impl cudaChannelFormatKind {
11229 #[doc = "< 1 channel unsigned 8-bit normalized integer"]
11230 pub const cudaChannelFormatKindUnsignedNormalized8X1: cudaChannelFormatKind =
11231 cudaChannelFormatKind(5);
11232}
11233impl cudaChannelFormatKind {
11234 #[doc = "< 2 channel unsigned 8-bit normalized integer"]
11235 pub const cudaChannelFormatKindUnsignedNormalized8X2: cudaChannelFormatKind =
11236 cudaChannelFormatKind(6);
11237}
11238impl cudaChannelFormatKind {
11239 #[doc = "< 4 channel unsigned 8-bit normalized integer"]
11240 pub const cudaChannelFormatKindUnsignedNormalized8X4: cudaChannelFormatKind =
11241 cudaChannelFormatKind(7);
11242}
11243impl cudaChannelFormatKind {
11244 #[doc = "< 1 channel unsigned 16-bit normalized integer"]
11245 pub const cudaChannelFormatKindUnsignedNormalized16X1: cudaChannelFormatKind =
11246 cudaChannelFormatKind(8);
11247}
11248impl cudaChannelFormatKind {
11249 #[doc = "< 2 channel unsigned 16-bit normalized integer"]
11250 pub const cudaChannelFormatKindUnsignedNormalized16X2: cudaChannelFormatKind =
11251 cudaChannelFormatKind(9);
11252}
11253impl cudaChannelFormatKind {
11254 #[doc = "< 4 channel unsigned 16-bit normalized integer"]
11255 pub const cudaChannelFormatKindUnsignedNormalized16X4: cudaChannelFormatKind =
11256 cudaChannelFormatKind(10);
11257}
11258impl cudaChannelFormatKind {
11259 #[doc = "< 1 channel signed 8-bit normalized integer"]
11260 pub const cudaChannelFormatKindSignedNormalized8X1: cudaChannelFormatKind =
11261 cudaChannelFormatKind(11);
11262}
11263impl cudaChannelFormatKind {
11264 #[doc = "< 2 channel signed 8-bit normalized integer"]
11265 pub const cudaChannelFormatKindSignedNormalized8X2: cudaChannelFormatKind =
11266 cudaChannelFormatKind(12);
11267}
11268impl cudaChannelFormatKind {
11269 #[doc = "< 4 channel signed 8-bit normalized integer"]
11270 pub const cudaChannelFormatKindSignedNormalized8X4: cudaChannelFormatKind =
11271 cudaChannelFormatKind(13);
11272}
11273impl cudaChannelFormatKind {
11274 #[doc = "< 1 channel signed 16-bit normalized integer"]
11275 pub const cudaChannelFormatKindSignedNormalized16X1: cudaChannelFormatKind =
11276 cudaChannelFormatKind(14);
11277}
11278impl cudaChannelFormatKind {
11279 #[doc = "< 2 channel signed 16-bit normalized integer"]
11280 pub const cudaChannelFormatKindSignedNormalized16X2: cudaChannelFormatKind =
11281 cudaChannelFormatKind(15);
11282}
11283impl cudaChannelFormatKind {
11284 #[doc = "< 4 channel signed 16-bit normalized integer"]
11285 pub const cudaChannelFormatKindSignedNormalized16X4: cudaChannelFormatKind =
11286 cudaChannelFormatKind(16);
11287}
11288impl cudaChannelFormatKind {
11289 #[doc = "< 4 channel unsigned normalized block-compressed (BC1 compression) format"]
11290 pub const cudaChannelFormatKindUnsignedBlockCompressed1: cudaChannelFormatKind =
11291 cudaChannelFormatKind(17);
11292}
11293impl cudaChannelFormatKind {
11294 #[doc = "< 4 channel unsigned normalized block-compressed (BC1 compression) format with sRGB encoding"]
11295 pub const cudaChannelFormatKindUnsignedBlockCompressed1SRGB: cudaChannelFormatKind =
11296 cudaChannelFormatKind(18);
11297}
11298impl cudaChannelFormatKind {
11299 #[doc = "< 4 channel unsigned normalized block-compressed (BC2 compression) format"]
11300 pub const cudaChannelFormatKindUnsignedBlockCompressed2: cudaChannelFormatKind =
11301 cudaChannelFormatKind(19);
11302}
11303impl cudaChannelFormatKind {
11304 #[doc = "< 4 channel unsigned normalized block-compressed (BC2 compression) format with sRGB encoding"]
11305 pub const cudaChannelFormatKindUnsignedBlockCompressed2SRGB: cudaChannelFormatKind =
11306 cudaChannelFormatKind(20);
11307}
11308impl cudaChannelFormatKind {
11309 #[doc = "< 4 channel unsigned normalized block-compressed (BC3 compression) format"]
11310 pub const cudaChannelFormatKindUnsignedBlockCompressed3: cudaChannelFormatKind =
11311 cudaChannelFormatKind(21);
11312}
11313impl cudaChannelFormatKind {
11314 #[doc = "< 4 channel unsigned normalized block-compressed (BC3 compression) format with sRGB encoding"]
11315 pub const cudaChannelFormatKindUnsignedBlockCompressed3SRGB: cudaChannelFormatKind =
11316 cudaChannelFormatKind(22);
11317}
11318impl cudaChannelFormatKind {
11319 #[doc = "< 1 channel unsigned normalized block-compressed (BC4 compression) format"]
11320 pub const cudaChannelFormatKindUnsignedBlockCompressed4: cudaChannelFormatKind =
11321 cudaChannelFormatKind(23);
11322}
11323impl cudaChannelFormatKind {
11324 #[doc = "< 1 channel signed normalized block-compressed (BC4 compression) format"]
11325 pub const cudaChannelFormatKindSignedBlockCompressed4: cudaChannelFormatKind =
11326 cudaChannelFormatKind(24);
11327}
11328impl cudaChannelFormatKind {
11329 #[doc = "< 2 channel unsigned normalized block-compressed (BC5 compression) format"]
11330 pub const cudaChannelFormatKindUnsignedBlockCompressed5: cudaChannelFormatKind =
11331 cudaChannelFormatKind(25);
11332}
11333impl cudaChannelFormatKind {
11334 #[doc = "< 2 channel signed normalized block-compressed (BC5 compression) format"]
11335 pub const cudaChannelFormatKindSignedBlockCompressed5: cudaChannelFormatKind =
11336 cudaChannelFormatKind(26);
11337}
11338impl cudaChannelFormatKind {
11339 #[doc = "< 3 channel unsigned half-float block-compressed (BC6H compression) format"]
11340 pub const cudaChannelFormatKindUnsignedBlockCompressed6H: cudaChannelFormatKind =
11341 cudaChannelFormatKind(27);
11342}
11343impl cudaChannelFormatKind {
11344 #[doc = "< 3 channel signed half-float block-compressed (BC6H compression) format"]
11345 pub const cudaChannelFormatKindSignedBlockCompressed6H: cudaChannelFormatKind =
11346 cudaChannelFormatKind(28);
11347}
11348impl cudaChannelFormatKind {
11349 #[doc = "< 4 channel unsigned normalized block-compressed (BC7 compression) format"]
11350 pub const cudaChannelFormatKindUnsignedBlockCompressed7: cudaChannelFormatKind =
11351 cudaChannelFormatKind(29);
11352}
11353impl cudaChannelFormatKind {
11354 #[doc = "< 4 channel unsigned normalized block-compressed (BC7 compression) format with sRGB encoding"]
11355 pub const cudaChannelFormatKindUnsignedBlockCompressed7SRGB: cudaChannelFormatKind =
11356 cudaChannelFormatKind(30);
11357}
11358#[repr(transparent)]
11359#[doc = " Channel format kind"]
11360#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11361pub struct cudaChannelFormatKind(pub ::std::os::raw::c_uint);
11362#[doc = " CUDA Channel format descriptor"]
11363#[repr(C)]
11364#[derive(Debug, Copy, Clone)]
11365pub struct cudaChannelFormatDesc {
11366 #[doc = "< x"]
11367 pub x: ::std::os::raw::c_int,
11368 #[doc = "< y"]
11369 pub y: ::std::os::raw::c_int,
11370 #[doc = "< z"]
11371 pub z: ::std::os::raw::c_int,
11372 #[doc = "< w"]
11373 pub w: ::std::os::raw::c_int,
11374 #[doc = "< Channel format kind"]
11375 pub f: cudaChannelFormatKind,
11376}
11377#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11378const _: () = {
11379 ["Size of cudaChannelFormatDesc"][::std::mem::size_of::<cudaChannelFormatDesc>() - 20usize];
11380 ["Alignment of cudaChannelFormatDesc"]
11381 [::std::mem::align_of::<cudaChannelFormatDesc>() - 4usize];
11382 ["Offset of field: cudaChannelFormatDesc::x"]
11383 [::std::mem::offset_of!(cudaChannelFormatDesc, x) - 0usize];
11384 ["Offset of field: cudaChannelFormatDesc::y"]
11385 [::std::mem::offset_of!(cudaChannelFormatDesc, y) - 4usize];
11386 ["Offset of field: cudaChannelFormatDesc::z"]
11387 [::std::mem::offset_of!(cudaChannelFormatDesc, z) - 8usize];
11388 ["Offset of field: cudaChannelFormatDesc::w"]
11389 [::std::mem::offset_of!(cudaChannelFormatDesc, w) - 12usize];
11390 ["Offset of field: cudaChannelFormatDesc::f"]
11391 [::std::mem::offset_of!(cudaChannelFormatDesc, f) - 16usize];
11392};
11393#[repr(C)]
11394#[derive(Debug, Copy, Clone)]
11395pub struct cudaArray {
11396 _unused: [u8; 0],
11397}
11398#[doc = " CUDA array"]
11399pub type cudaArray_t = *mut cudaArray;
11400#[doc = " CUDA array (as source copy argument)"]
11401pub type cudaArray_const_t = *const cudaArray;
11402#[repr(C)]
11403#[derive(Debug, Copy, Clone)]
11404pub struct cudaMipmappedArray {
11405 _unused: [u8; 0],
11406}
11407#[doc = " CUDA mipmapped array"]
11408pub type cudaMipmappedArray_t = *mut cudaMipmappedArray;
11409#[doc = " CUDA mipmapped array (as source argument)"]
11410pub type cudaMipmappedArray_const_t = *const cudaMipmappedArray;
11411#[doc = " Sparse CUDA array and CUDA mipmapped array properties"]
11412#[repr(C)]
11413#[derive(Debug, Copy, Clone)]
11414pub struct cudaArraySparseProperties {
11415 pub tileExtent: cudaArraySparseProperties__bindgen_ty_1,
11416 #[doc = "< First mip level at which the mip tail begins"]
11417 pub miptailFirstLevel: ::std::os::raw::c_uint,
11418 #[doc = "< Total size of the mip tail."]
11419 pub miptailSize: ::std::os::raw::c_ulonglong,
11420 #[doc = "< Flags will either be zero or ::cudaArraySparsePropertiesSingleMipTail"]
11421 pub flags: ::std::os::raw::c_uint,
11422 pub reserved: [::std::os::raw::c_uint; 4usize],
11423}
11424#[repr(C)]
11425#[derive(Debug, Copy, Clone)]
11426pub struct cudaArraySparseProperties__bindgen_ty_1 {
11427 #[doc = "< Tile width in elements"]
11428 pub width: ::std::os::raw::c_uint,
11429 #[doc = "< Tile height in elements"]
11430 pub height: ::std::os::raw::c_uint,
11431 #[doc = "< Tile depth in elements"]
11432 pub depth: ::std::os::raw::c_uint,
11433}
11434#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11435const _: () = {
11436 ["Size of cudaArraySparseProperties__bindgen_ty_1"]
11437 [::std::mem::size_of::<cudaArraySparseProperties__bindgen_ty_1>() - 12usize];
11438 ["Alignment of cudaArraySparseProperties__bindgen_ty_1"]
11439 [::std::mem::align_of::<cudaArraySparseProperties__bindgen_ty_1>() - 4usize];
11440 ["Offset of field: cudaArraySparseProperties__bindgen_ty_1::width"]
11441 [::std::mem::offset_of!(cudaArraySparseProperties__bindgen_ty_1, width) - 0usize];
11442 ["Offset of field: cudaArraySparseProperties__bindgen_ty_1::height"]
11443 [::std::mem::offset_of!(cudaArraySparseProperties__bindgen_ty_1, height) - 4usize];
11444 ["Offset of field: cudaArraySparseProperties__bindgen_ty_1::depth"]
11445 [::std::mem::offset_of!(cudaArraySparseProperties__bindgen_ty_1, depth) - 8usize];
11446};
11447#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11448const _: () = {
11449 ["Size of cudaArraySparseProperties"]
11450 [::std::mem::size_of::<cudaArraySparseProperties>() - 48usize];
11451 ["Alignment of cudaArraySparseProperties"]
11452 [::std::mem::align_of::<cudaArraySparseProperties>() - 8usize];
11453 ["Offset of field: cudaArraySparseProperties::tileExtent"]
11454 [::std::mem::offset_of!(cudaArraySparseProperties, tileExtent) - 0usize];
11455 ["Offset of field: cudaArraySparseProperties::miptailFirstLevel"]
11456 [::std::mem::offset_of!(cudaArraySparseProperties, miptailFirstLevel) - 12usize];
11457 ["Offset of field: cudaArraySparseProperties::miptailSize"]
11458 [::std::mem::offset_of!(cudaArraySparseProperties, miptailSize) - 16usize];
11459 ["Offset of field: cudaArraySparseProperties::flags"]
11460 [::std::mem::offset_of!(cudaArraySparseProperties, flags) - 24usize];
11461 ["Offset of field: cudaArraySparseProperties::reserved"]
11462 [::std::mem::offset_of!(cudaArraySparseProperties, reserved) - 28usize];
11463};
11464#[doc = " CUDA array and CUDA mipmapped array memory requirements"]
11465#[repr(C)]
11466#[derive(Debug, Copy, Clone)]
11467pub struct cudaArrayMemoryRequirements {
11468 #[doc = "< Total size of the array."]
11469 pub size: usize,
11470 #[doc = "< Alignment necessary for mapping the array."]
11471 pub alignment: usize,
11472 pub reserved: [::std::os::raw::c_uint; 4usize],
11473}
11474#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11475const _: () = {
11476 ["Size of cudaArrayMemoryRequirements"]
11477 [::std::mem::size_of::<cudaArrayMemoryRequirements>() - 32usize];
11478 ["Alignment of cudaArrayMemoryRequirements"]
11479 [::std::mem::align_of::<cudaArrayMemoryRequirements>() - 8usize];
11480 ["Offset of field: cudaArrayMemoryRequirements::size"]
11481 [::std::mem::offset_of!(cudaArrayMemoryRequirements, size) - 0usize];
11482 ["Offset of field: cudaArrayMemoryRequirements::alignment"]
11483 [::std::mem::offset_of!(cudaArrayMemoryRequirements, alignment) - 8usize];
11484 ["Offset of field: cudaArrayMemoryRequirements::reserved"]
11485 [::std::mem::offset_of!(cudaArrayMemoryRequirements, reserved) - 16usize];
11486};
11487impl cudaMemoryType {
11488 #[doc = "< Unregistered memory"]
11489 pub const cudaMemoryTypeUnregistered: cudaMemoryType = cudaMemoryType(0);
11490}
11491impl cudaMemoryType {
11492 #[doc = "< Host memory"]
11493 pub const cudaMemoryTypeHost: cudaMemoryType = cudaMemoryType(1);
11494}
11495impl cudaMemoryType {
11496 #[doc = "< Device memory"]
11497 pub const cudaMemoryTypeDevice: cudaMemoryType = cudaMemoryType(2);
11498}
11499impl cudaMemoryType {
11500 #[doc = "< Managed memory"]
11501 pub const cudaMemoryTypeManaged: cudaMemoryType = cudaMemoryType(3);
11502}
11503#[repr(transparent)]
11504#[doc = " CUDA memory types"]
11505#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11506pub struct cudaMemoryType(pub ::std::os::raw::c_uint);
11507impl cudaMemcpyKind {
11508 #[doc = "< Host -> Host"]
11509 pub const cudaMemcpyHostToHost: cudaMemcpyKind = cudaMemcpyKind(0);
11510}
11511impl cudaMemcpyKind {
11512 #[doc = "< Host -> Device"]
11513 pub const cudaMemcpyHostToDevice: cudaMemcpyKind = cudaMemcpyKind(1);
11514}
11515impl cudaMemcpyKind {
11516 #[doc = "< Device -> Host"]
11517 pub const cudaMemcpyDeviceToHost: cudaMemcpyKind = cudaMemcpyKind(2);
11518}
11519impl cudaMemcpyKind {
11520 #[doc = "< Device -> Device"]
11521 pub const cudaMemcpyDeviceToDevice: cudaMemcpyKind = cudaMemcpyKind(3);
11522}
11523impl cudaMemcpyKind {
11524 #[doc = "< Direction of the transfer is inferred from the pointer values. Requires unified virtual addressing"]
11525 pub const cudaMemcpyDefault: cudaMemcpyKind = cudaMemcpyKind(4);
11526}
11527#[repr(transparent)]
11528#[doc = " CUDA memory copy types"]
11529#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11530pub struct cudaMemcpyKind(pub ::std::os::raw::c_uint);
11531#[doc = " CUDA Pitched memory pointer\n\n \\sa ::make_cudaPitchedPtr"]
11532#[repr(C)]
11533#[derive(Debug, Copy, Clone)]
11534pub struct cudaPitchedPtr {
11535 #[doc = "< Pointer to allocated memory"]
11536 pub ptr: *mut ::std::os::raw::c_void,
11537 #[doc = "< Pitch of allocated memory in bytes"]
11538 pub pitch: usize,
11539 #[doc = "< Logical width of allocation in elements"]
11540 pub xsize: usize,
11541 #[doc = "< Logical height of allocation in elements"]
11542 pub ysize: usize,
11543}
11544#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11545const _: () = {
11546 ["Size of cudaPitchedPtr"][::std::mem::size_of::<cudaPitchedPtr>() - 32usize];
11547 ["Alignment of cudaPitchedPtr"][::std::mem::align_of::<cudaPitchedPtr>() - 8usize];
11548 ["Offset of field: cudaPitchedPtr::ptr"][::std::mem::offset_of!(cudaPitchedPtr, ptr) - 0usize];
11549 ["Offset of field: cudaPitchedPtr::pitch"]
11550 [::std::mem::offset_of!(cudaPitchedPtr, pitch) - 8usize];
11551 ["Offset of field: cudaPitchedPtr::xsize"]
11552 [::std::mem::offset_of!(cudaPitchedPtr, xsize) - 16usize];
11553 ["Offset of field: cudaPitchedPtr::ysize"]
11554 [::std::mem::offset_of!(cudaPitchedPtr, ysize) - 24usize];
11555};
11556#[doc = " CUDA extent\n\n \\sa ::make_cudaExtent"]
11557#[repr(C)]
11558#[derive(Debug, Copy, Clone)]
11559pub struct cudaExtent {
11560 #[doc = "< Width in elements when referring to array memory, in bytes when referring to linear memory"]
11561 pub width: usize,
11562 #[doc = "< Height in elements"]
11563 pub height: usize,
11564 #[doc = "< Depth in elements"]
11565 pub depth: usize,
11566}
11567#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11568const _: () = {
11569 ["Size of cudaExtent"][::std::mem::size_of::<cudaExtent>() - 24usize];
11570 ["Alignment of cudaExtent"][::std::mem::align_of::<cudaExtent>() - 8usize];
11571 ["Offset of field: cudaExtent::width"][::std::mem::offset_of!(cudaExtent, width) - 0usize];
11572 ["Offset of field: cudaExtent::height"][::std::mem::offset_of!(cudaExtent, height) - 8usize];
11573 ["Offset of field: cudaExtent::depth"][::std::mem::offset_of!(cudaExtent, depth) - 16usize];
11574};
11575#[doc = " CUDA 3D position\n\n \\sa ::make_cudaPos"]
11576#[repr(C)]
11577#[derive(Debug, Copy, Clone)]
11578pub struct cudaPos {
11579 #[doc = "< x"]
11580 pub x: usize,
11581 #[doc = "< y"]
11582 pub y: usize,
11583 #[doc = "< z"]
11584 pub z: usize,
11585}
11586#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11587const _: () = {
11588 ["Size of cudaPos"][::std::mem::size_of::<cudaPos>() - 24usize];
11589 ["Alignment of cudaPos"][::std::mem::align_of::<cudaPos>() - 8usize];
11590 ["Offset of field: cudaPos::x"][::std::mem::offset_of!(cudaPos, x) - 0usize];
11591 ["Offset of field: cudaPos::y"][::std::mem::offset_of!(cudaPos, y) - 8usize];
11592 ["Offset of field: cudaPos::z"][::std::mem::offset_of!(cudaPos, z) - 16usize];
11593};
11594#[doc = " CUDA 3D memory copying parameters"]
11595#[repr(C)]
11596#[derive(Debug, Copy, Clone)]
11597pub struct cudaMemcpy3DParms {
11598 #[doc = "< Source memory address"]
11599 pub srcArray: cudaArray_t,
11600 #[doc = "< Source position offset"]
11601 pub srcPos: cudaPos,
11602 #[doc = "< Pitched source memory address"]
11603 pub srcPtr: cudaPitchedPtr,
11604 #[doc = "< Destination memory address"]
11605 pub dstArray: cudaArray_t,
11606 #[doc = "< Destination position offset"]
11607 pub dstPos: cudaPos,
11608 #[doc = "< Pitched destination memory address"]
11609 pub dstPtr: cudaPitchedPtr,
11610 #[doc = "< Requested memory copy size"]
11611 pub extent: cudaExtent,
11612 #[doc = "< Type of transfer"]
11613 pub kind: cudaMemcpyKind,
11614}
11615#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11616const _: () = {
11617 ["Size of cudaMemcpy3DParms"][::std::mem::size_of::<cudaMemcpy3DParms>() - 160usize];
11618 ["Alignment of cudaMemcpy3DParms"][::std::mem::align_of::<cudaMemcpy3DParms>() - 8usize];
11619 ["Offset of field: cudaMemcpy3DParms::srcArray"]
11620 [::std::mem::offset_of!(cudaMemcpy3DParms, srcArray) - 0usize];
11621 ["Offset of field: cudaMemcpy3DParms::srcPos"]
11622 [::std::mem::offset_of!(cudaMemcpy3DParms, srcPos) - 8usize];
11623 ["Offset of field: cudaMemcpy3DParms::srcPtr"]
11624 [::std::mem::offset_of!(cudaMemcpy3DParms, srcPtr) - 32usize];
11625 ["Offset of field: cudaMemcpy3DParms::dstArray"]
11626 [::std::mem::offset_of!(cudaMemcpy3DParms, dstArray) - 64usize];
11627 ["Offset of field: cudaMemcpy3DParms::dstPos"]
11628 [::std::mem::offset_of!(cudaMemcpy3DParms, dstPos) - 72usize];
11629 ["Offset of field: cudaMemcpy3DParms::dstPtr"]
11630 [::std::mem::offset_of!(cudaMemcpy3DParms, dstPtr) - 96usize];
11631 ["Offset of field: cudaMemcpy3DParms::extent"]
11632 [::std::mem::offset_of!(cudaMemcpy3DParms, extent) - 128usize];
11633 ["Offset of field: cudaMemcpy3DParms::kind"]
11634 [::std::mem::offset_of!(cudaMemcpy3DParms, kind) - 152usize];
11635};
11636#[doc = " Memcpy node parameters"]
11637#[repr(C)]
11638#[derive(Debug, Copy, Clone)]
11639pub struct cudaMemcpyNodeParams {
11640 #[doc = "< Must be zero"]
11641 pub flags: ::std::os::raw::c_int,
11642 #[doc = "< Must be zero"]
11643 pub reserved: [::std::os::raw::c_int; 3usize],
11644 #[doc = "< Parameters for the memory copy"]
11645 pub copyParams: cudaMemcpy3DParms,
11646}
11647#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11648const _: () = {
11649 ["Size of cudaMemcpyNodeParams"][::std::mem::size_of::<cudaMemcpyNodeParams>() - 176usize];
11650 ["Alignment of cudaMemcpyNodeParams"][::std::mem::align_of::<cudaMemcpyNodeParams>() - 8usize];
11651 ["Offset of field: cudaMemcpyNodeParams::flags"]
11652 [::std::mem::offset_of!(cudaMemcpyNodeParams, flags) - 0usize];
11653 ["Offset of field: cudaMemcpyNodeParams::reserved"]
11654 [::std::mem::offset_of!(cudaMemcpyNodeParams, reserved) - 4usize];
11655 ["Offset of field: cudaMemcpyNodeParams::copyParams"]
11656 [::std::mem::offset_of!(cudaMemcpyNodeParams, copyParams) - 16usize];
11657};
11658#[doc = " CUDA 3D cross-device memory copying parameters"]
11659#[repr(C)]
11660#[derive(Debug, Copy, Clone)]
11661pub struct cudaMemcpy3DPeerParms {
11662 #[doc = "< Source memory address"]
11663 pub srcArray: cudaArray_t,
11664 #[doc = "< Source position offset"]
11665 pub srcPos: cudaPos,
11666 #[doc = "< Pitched source memory address"]
11667 pub srcPtr: cudaPitchedPtr,
11668 #[doc = "< Source device"]
11669 pub srcDevice: ::std::os::raw::c_int,
11670 #[doc = "< Destination memory address"]
11671 pub dstArray: cudaArray_t,
11672 #[doc = "< Destination position offset"]
11673 pub dstPos: cudaPos,
11674 #[doc = "< Pitched destination memory address"]
11675 pub dstPtr: cudaPitchedPtr,
11676 #[doc = "< Destination device"]
11677 pub dstDevice: ::std::os::raw::c_int,
11678 #[doc = "< Requested memory copy size"]
11679 pub extent: cudaExtent,
11680}
11681#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11682const _: () = {
11683 ["Size of cudaMemcpy3DPeerParms"][::std::mem::size_of::<cudaMemcpy3DPeerParms>() - 168usize];
11684 ["Alignment of cudaMemcpy3DPeerParms"]
11685 [::std::mem::align_of::<cudaMemcpy3DPeerParms>() - 8usize];
11686 ["Offset of field: cudaMemcpy3DPeerParms::srcArray"]
11687 [::std::mem::offset_of!(cudaMemcpy3DPeerParms, srcArray) - 0usize];
11688 ["Offset of field: cudaMemcpy3DPeerParms::srcPos"]
11689 [::std::mem::offset_of!(cudaMemcpy3DPeerParms, srcPos) - 8usize];
11690 ["Offset of field: cudaMemcpy3DPeerParms::srcPtr"]
11691 [::std::mem::offset_of!(cudaMemcpy3DPeerParms, srcPtr) - 32usize];
11692 ["Offset of field: cudaMemcpy3DPeerParms::srcDevice"]
11693 [::std::mem::offset_of!(cudaMemcpy3DPeerParms, srcDevice) - 64usize];
11694 ["Offset of field: cudaMemcpy3DPeerParms::dstArray"]
11695 [::std::mem::offset_of!(cudaMemcpy3DPeerParms, dstArray) - 72usize];
11696 ["Offset of field: cudaMemcpy3DPeerParms::dstPos"]
11697 [::std::mem::offset_of!(cudaMemcpy3DPeerParms, dstPos) - 80usize];
11698 ["Offset of field: cudaMemcpy3DPeerParms::dstPtr"]
11699 [::std::mem::offset_of!(cudaMemcpy3DPeerParms, dstPtr) - 104usize];
11700 ["Offset of field: cudaMemcpy3DPeerParms::dstDevice"]
11701 [::std::mem::offset_of!(cudaMemcpy3DPeerParms, dstDevice) - 136usize];
11702 ["Offset of field: cudaMemcpy3DPeerParms::extent"]
11703 [::std::mem::offset_of!(cudaMemcpy3DPeerParms, extent) - 144usize];
11704};
11705#[doc = " CUDA Memset node parameters"]
11706#[repr(C)]
11707#[derive(Debug, Copy, Clone)]
11708pub struct cudaMemsetParams {
11709 #[doc = "< Destination device pointer"]
11710 pub dst: *mut ::std::os::raw::c_void,
11711 #[doc = "< Pitch of destination device pointer. Unused if height is 1"]
11712 pub pitch: usize,
11713 #[doc = "< Value to be set"]
11714 pub value: ::std::os::raw::c_uint,
11715 #[doc = "< Size of each element in bytes. Must be 1, 2, or 4."]
11716 pub elementSize: ::std::os::raw::c_uint,
11717 #[doc = "< Width of the row in elements"]
11718 pub width: usize,
11719 #[doc = "< Number of rows"]
11720 pub height: usize,
11721}
11722#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11723const _: () = {
11724 ["Size of cudaMemsetParams"][::std::mem::size_of::<cudaMemsetParams>() - 40usize];
11725 ["Alignment of cudaMemsetParams"][::std::mem::align_of::<cudaMemsetParams>() - 8usize];
11726 ["Offset of field: cudaMemsetParams::dst"]
11727 [::std::mem::offset_of!(cudaMemsetParams, dst) - 0usize];
11728 ["Offset of field: cudaMemsetParams::pitch"]
11729 [::std::mem::offset_of!(cudaMemsetParams, pitch) - 8usize];
11730 ["Offset of field: cudaMemsetParams::value"]
11731 [::std::mem::offset_of!(cudaMemsetParams, value) - 16usize];
11732 ["Offset of field: cudaMemsetParams::elementSize"]
11733 [::std::mem::offset_of!(cudaMemsetParams, elementSize) - 20usize];
11734 ["Offset of field: cudaMemsetParams::width"]
11735 [::std::mem::offset_of!(cudaMemsetParams, width) - 24usize];
11736 ["Offset of field: cudaMemsetParams::height"]
11737 [::std::mem::offset_of!(cudaMemsetParams, height) - 32usize];
11738};
11739#[doc = " CUDA Memset node parameters"]
11740#[repr(C)]
11741#[derive(Debug, Copy, Clone)]
11742pub struct cudaMemsetParamsV2 {
11743 #[doc = "< Destination device pointer"]
11744 pub dst: *mut ::std::os::raw::c_void,
11745 #[doc = "< Pitch of destination device pointer. Unused if height is 1"]
11746 pub pitch: usize,
11747 #[doc = "< Value to be set"]
11748 pub value: ::std::os::raw::c_uint,
11749 #[doc = "< Size of each element in bytes. Must be 1, 2, or 4."]
11750 pub elementSize: ::std::os::raw::c_uint,
11751 #[doc = "< Width of the row in elements"]
11752 pub width: usize,
11753 #[doc = "< Number of rows"]
11754 pub height: usize,
11755}
11756#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11757const _: () = {
11758 ["Size of cudaMemsetParamsV2"][::std::mem::size_of::<cudaMemsetParamsV2>() - 40usize];
11759 ["Alignment of cudaMemsetParamsV2"][::std::mem::align_of::<cudaMemsetParamsV2>() - 8usize];
11760 ["Offset of field: cudaMemsetParamsV2::dst"]
11761 [::std::mem::offset_of!(cudaMemsetParamsV2, dst) - 0usize];
11762 ["Offset of field: cudaMemsetParamsV2::pitch"]
11763 [::std::mem::offset_of!(cudaMemsetParamsV2, pitch) - 8usize];
11764 ["Offset of field: cudaMemsetParamsV2::value"]
11765 [::std::mem::offset_of!(cudaMemsetParamsV2, value) - 16usize];
11766 ["Offset of field: cudaMemsetParamsV2::elementSize"]
11767 [::std::mem::offset_of!(cudaMemsetParamsV2, elementSize) - 20usize];
11768 ["Offset of field: cudaMemsetParamsV2::width"]
11769 [::std::mem::offset_of!(cudaMemsetParamsV2, width) - 24usize];
11770 ["Offset of field: cudaMemsetParamsV2::height"]
11771 [::std::mem::offset_of!(cudaMemsetParamsV2, height) - 32usize];
11772};
11773impl cudaAccessProperty {
11774 #[doc = "< Normal cache persistence."]
11775 pub const cudaAccessPropertyNormal: cudaAccessProperty = cudaAccessProperty(0);
11776}
11777impl cudaAccessProperty {
11778 #[doc = "< Streaming access is less likely to persit from cache."]
11779 pub const cudaAccessPropertyStreaming: cudaAccessProperty = cudaAccessProperty(1);
11780}
11781impl cudaAccessProperty {
11782 #[doc = "< Persisting access is more likely to persist in cache."]
11783 pub const cudaAccessPropertyPersisting: cudaAccessProperty = cudaAccessProperty(2);
11784}
11785#[repr(transparent)]
11786#[doc = " Specifies performance hint with ::cudaAccessPolicyWindow for hitProp and missProp members."]
11787#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11788pub struct cudaAccessProperty(pub ::std::os::raw::c_uint);
11789#[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 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."]
11790#[repr(C)]
11791#[derive(Debug, Copy, Clone)]
11792pub struct cudaAccessPolicyWindow {
11793 #[doc = "< Starting address of the access policy window. CUDA driver may align it."]
11794 pub base_ptr: *mut ::std::os::raw::c_void,
11795 #[doc = "< Size in bytes of the window policy. CUDA driver may restrict the maximum size and alignment."]
11796 pub num_bytes: usize,
11797 #[doc = "< hitRatio specifies percentage of lines assigned hitProp, rest are assigned missProp."]
11798 pub hitRatio: f32,
11799 #[doc = "< ::CUaccessProperty set for hit."]
11800 pub hitProp: cudaAccessProperty,
11801 #[doc = "< ::CUaccessProperty set for miss. Must be either NORMAL or STREAMING."]
11802 pub missProp: cudaAccessProperty,
11803}
11804#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11805const _: () = {
11806 ["Size of cudaAccessPolicyWindow"][::std::mem::size_of::<cudaAccessPolicyWindow>() - 32usize];
11807 ["Alignment of cudaAccessPolicyWindow"]
11808 [::std::mem::align_of::<cudaAccessPolicyWindow>() - 8usize];
11809 ["Offset of field: cudaAccessPolicyWindow::base_ptr"]
11810 [::std::mem::offset_of!(cudaAccessPolicyWindow, base_ptr) - 0usize];
11811 ["Offset of field: cudaAccessPolicyWindow::num_bytes"]
11812 [::std::mem::offset_of!(cudaAccessPolicyWindow, num_bytes) - 8usize];
11813 ["Offset of field: cudaAccessPolicyWindow::hitRatio"]
11814 [::std::mem::offset_of!(cudaAccessPolicyWindow, hitRatio) - 16usize];
11815 ["Offset of field: cudaAccessPolicyWindow::hitProp"]
11816 [::std::mem::offset_of!(cudaAccessPolicyWindow, hitProp) - 20usize];
11817 ["Offset of field: cudaAccessPolicyWindow::missProp"]
11818 [::std::mem::offset_of!(cudaAccessPolicyWindow, missProp) - 24usize];
11819};
11820#[doc = " CUDA host function\n \\param userData Argument value passed to the function"]
11821pub type cudaHostFn_t =
11822 ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void)>;
11823#[doc = " CUDA host node parameters"]
11824#[repr(C)]
11825#[derive(Debug, Copy, Clone)]
11826pub struct cudaHostNodeParams {
11827 #[doc = "< The function to call when the node executes"]
11828 pub fn_: cudaHostFn_t,
11829 #[doc = "< Argument to pass to the function"]
11830 pub userData: *mut ::std::os::raw::c_void,
11831}
11832#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11833const _: () = {
11834 ["Size of cudaHostNodeParams"][::std::mem::size_of::<cudaHostNodeParams>() - 16usize];
11835 ["Alignment of cudaHostNodeParams"][::std::mem::align_of::<cudaHostNodeParams>() - 8usize];
11836 ["Offset of field: cudaHostNodeParams::fn_"]
11837 [::std::mem::offset_of!(cudaHostNodeParams, fn_) - 0usize];
11838 ["Offset of field: cudaHostNodeParams::userData"]
11839 [::std::mem::offset_of!(cudaHostNodeParams, userData) - 8usize];
11840};
11841#[doc = " CUDA host node parameters"]
11842#[repr(C)]
11843#[derive(Debug, Copy, Clone)]
11844pub struct cudaHostNodeParamsV2 {
11845 #[doc = "< The function to call when the node executes"]
11846 pub fn_: cudaHostFn_t,
11847 #[doc = "< Argument to pass to the function"]
11848 pub userData: *mut ::std::os::raw::c_void,
11849}
11850#[allow(clippy::unnecessary_operation, clippy::identity_op)]
11851const _: () = {
11852 ["Size of cudaHostNodeParamsV2"][::std::mem::size_of::<cudaHostNodeParamsV2>() - 16usize];
11853 ["Alignment of cudaHostNodeParamsV2"][::std::mem::align_of::<cudaHostNodeParamsV2>() - 8usize];
11854 ["Offset of field: cudaHostNodeParamsV2::fn_"]
11855 [::std::mem::offset_of!(cudaHostNodeParamsV2, fn_) - 0usize];
11856 ["Offset of field: cudaHostNodeParamsV2::userData"]
11857 [::std::mem::offset_of!(cudaHostNodeParamsV2, userData) - 8usize];
11858};
11859impl cudaStreamCaptureStatus {
11860 #[doc = "< Stream is not capturing"]
11861 pub const cudaStreamCaptureStatusNone: cudaStreamCaptureStatus = cudaStreamCaptureStatus(0);
11862}
11863impl cudaStreamCaptureStatus {
11864 #[doc = "< Stream is actively capturing"]
11865 pub const cudaStreamCaptureStatusActive: cudaStreamCaptureStatus = cudaStreamCaptureStatus(1);
11866}
11867impl cudaStreamCaptureStatus {
11868 #[doc = "< Stream is part of a capture sequence that\nhas been invalidated, but not terminated"]
11869 pub const cudaStreamCaptureStatusInvalidated: cudaStreamCaptureStatus =
11870 cudaStreamCaptureStatus(2);
11871}
11872#[repr(transparent)]
11873#[doc = " Possible stream capture statuses returned by ::cudaStreamIsCapturing"]
11874#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11875pub struct cudaStreamCaptureStatus(pub ::std::os::raw::c_uint);
11876impl cudaStreamCaptureMode {
11877 pub const cudaStreamCaptureModeGlobal: cudaStreamCaptureMode = cudaStreamCaptureMode(0);
11878}
11879impl cudaStreamCaptureMode {
11880 pub const cudaStreamCaptureModeThreadLocal: cudaStreamCaptureMode = cudaStreamCaptureMode(1);
11881}
11882impl cudaStreamCaptureMode {
11883 pub const cudaStreamCaptureModeRelaxed: cudaStreamCaptureMode = cudaStreamCaptureMode(2);
11884}
11885#[repr(transparent)]
11886#[doc = " Possible modes for stream capture thread interactions. For more details see\n ::cudaStreamBeginCapture and ::cudaThreadExchangeStreamCaptureMode"]
11887#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11888pub struct cudaStreamCaptureMode(pub ::std::os::raw::c_uint);
11889impl cudaSynchronizationPolicy {
11890 pub const cudaSyncPolicyAuto: cudaSynchronizationPolicy = cudaSynchronizationPolicy(1);
11891}
11892impl cudaSynchronizationPolicy {
11893 pub const cudaSyncPolicySpin: cudaSynchronizationPolicy = cudaSynchronizationPolicy(2);
11894}
11895impl cudaSynchronizationPolicy {
11896 pub const cudaSyncPolicyYield: cudaSynchronizationPolicy = cudaSynchronizationPolicy(3);
11897}
11898impl cudaSynchronizationPolicy {
11899 pub const cudaSyncPolicyBlockingSync: cudaSynchronizationPolicy = cudaSynchronizationPolicy(4);
11900}
11901#[repr(transparent)]
11902#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11903pub struct cudaSynchronizationPolicy(pub ::std::os::raw::c_uint);
11904impl cudaClusterSchedulingPolicy {
11905 #[doc = "< the default policy"]
11906 pub const cudaClusterSchedulingPolicyDefault: cudaClusterSchedulingPolicy =
11907 cudaClusterSchedulingPolicy(0);
11908}
11909impl cudaClusterSchedulingPolicy {
11910 #[doc = "< spread the blocks within a cluster to the SMs"]
11911 pub const cudaClusterSchedulingPolicySpread: cudaClusterSchedulingPolicy =
11912 cudaClusterSchedulingPolicy(1);
11913}
11914impl cudaClusterSchedulingPolicy {
11915 #[doc = "< allow the hardware to load-balance the blocks in a cluster to the SMs"]
11916 pub const cudaClusterSchedulingPolicyLoadBalancing: cudaClusterSchedulingPolicy =
11917 cudaClusterSchedulingPolicy(2);
11918}
11919#[repr(transparent)]
11920#[doc = " Cluster scheduling policies. These may be passed to ::cudaFuncSetAttribute"]
11921#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11922pub struct cudaClusterSchedulingPolicy(pub ::std::os::raw::c_uint);
11923impl cudaStreamUpdateCaptureDependenciesFlags {
11924 #[doc = "< Add new nodes to the dependency set"]
11925 pub const cudaStreamAddCaptureDependencies: cudaStreamUpdateCaptureDependenciesFlags =
11926 cudaStreamUpdateCaptureDependenciesFlags(0);
11927}
11928impl cudaStreamUpdateCaptureDependenciesFlags {
11929 #[doc = "< Replace the dependency set with the new nodes"]
11930 pub const cudaStreamSetCaptureDependencies: cudaStreamUpdateCaptureDependenciesFlags =
11931 cudaStreamUpdateCaptureDependenciesFlags(1);
11932}
11933#[repr(transparent)]
11934#[doc = " Flags for ::cudaStreamUpdateCaptureDependencies"]
11935#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11936pub struct cudaStreamUpdateCaptureDependenciesFlags(pub ::std::os::raw::c_uint);
11937impl cudaUserObjectFlags {
11938 #[doc = "< Indicates the destructor execution is not synchronized by any CUDA handle."]
11939 pub const cudaUserObjectNoDestructorSync: cudaUserObjectFlags = cudaUserObjectFlags(1);
11940}
11941#[repr(transparent)]
11942#[doc = " Flags for user objects for graphs"]
11943#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11944pub struct cudaUserObjectFlags(pub ::std::os::raw::c_uint);
11945impl cudaUserObjectRetainFlags {
11946 #[doc = "< Transfer references from the caller rather than creating new references."]
11947 pub const cudaGraphUserObjectMove: cudaUserObjectRetainFlags = cudaUserObjectRetainFlags(1);
11948}
11949#[repr(transparent)]
11950#[doc = " Flags for retaining user object references for graphs"]
11951#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11952pub struct cudaUserObjectRetainFlags(pub ::std::os::raw::c_uint);
11953#[doc = " CUDA graphics interop resource"]
11954#[repr(C)]
11955#[derive(Debug, Copy, Clone)]
11956pub struct cudaGraphicsResource {
11957 _unused: [u8; 0],
11958}
11959impl cudaGraphicsRegisterFlags {
11960 #[doc = "< Default"]
11961 pub const cudaGraphicsRegisterFlagsNone: cudaGraphicsRegisterFlags =
11962 cudaGraphicsRegisterFlags(0);
11963}
11964impl cudaGraphicsRegisterFlags {
11965 #[doc = "< CUDA will not write to this resource"]
11966 pub const cudaGraphicsRegisterFlagsReadOnly: cudaGraphicsRegisterFlags =
11967 cudaGraphicsRegisterFlags(1);
11968}
11969impl cudaGraphicsRegisterFlags {
11970 #[doc = "< CUDA will only write to and will not read from this resource"]
11971 pub const cudaGraphicsRegisterFlagsWriteDiscard: cudaGraphicsRegisterFlags =
11972 cudaGraphicsRegisterFlags(2);
11973}
11974impl cudaGraphicsRegisterFlags {
11975 #[doc = "< CUDA will bind this resource to a surface reference"]
11976 pub const cudaGraphicsRegisterFlagsSurfaceLoadStore: cudaGraphicsRegisterFlags =
11977 cudaGraphicsRegisterFlags(4);
11978}
11979impl cudaGraphicsRegisterFlags {
11980 #[doc = "< CUDA will perform texture gather operations on this resource"]
11981 pub const cudaGraphicsRegisterFlagsTextureGather: cudaGraphicsRegisterFlags =
11982 cudaGraphicsRegisterFlags(8);
11983}
11984#[repr(transparent)]
11985#[doc = " CUDA graphics interop register flags"]
11986#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
11987pub struct cudaGraphicsRegisterFlags(pub ::std::os::raw::c_uint);
11988impl cudaGraphicsMapFlags {
11989 #[doc = "< Default; Assume resource can be read/written"]
11990 pub const cudaGraphicsMapFlagsNone: cudaGraphicsMapFlags = cudaGraphicsMapFlags(0);
11991}
11992impl cudaGraphicsMapFlags {
11993 #[doc = "< CUDA will not write to this resource"]
11994 pub const cudaGraphicsMapFlagsReadOnly: cudaGraphicsMapFlags = cudaGraphicsMapFlags(1);
11995}
11996impl cudaGraphicsMapFlags {
11997 #[doc = "< CUDA will only write to and will not read from this resource"]
11998 pub const cudaGraphicsMapFlagsWriteDiscard: cudaGraphicsMapFlags = cudaGraphicsMapFlags(2);
11999}
12000#[repr(transparent)]
12001#[doc = " CUDA graphics interop map flags"]
12002#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12003pub struct cudaGraphicsMapFlags(pub ::std::os::raw::c_uint);
12004impl cudaGraphicsCubeFace {
12005 #[doc = "< Positive X face of cubemap"]
12006 pub const cudaGraphicsCubeFacePositiveX: cudaGraphicsCubeFace = cudaGraphicsCubeFace(0);
12007}
12008impl cudaGraphicsCubeFace {
12009 #[doc = "< Negative X face of cubemap"]
12010 pub const cudaGraphicsCubeFaceNegativeX: cudaGraphicsCubeFace = cudaGraphicsCubeFace(1);
12011}
12012impl cudaGraphicsCubeFace {
12013 #[doc = "< Positive Y face of cubemap"]
12014 pub const cudaGraphicsCubeFacePositiveY: cudaGraphicsCubeFace = cudaGraphicsCubeFace(2);
12015}
12016impl cudaGraphicsCubeFace {
12017 #[doc = "< Negative Y face of cubemap"]
12018 pub const cudaGraphicsCubeFaceNegativeY: cudaGraphicsCubeFace = cudaGraphicsCubeFace(3);
12019}
12020impl cudaGraphicsCubeFace {
12021 #[doc = "< Positive Z face of cubemap"]
12022 pub const cudaGraphicsCubeFacePositiveZ: cudaGraphicsCubeFace = cudaGraphicsCubeFace(4);
12023}
12024impl cudaGraphicsCubeFace {
12025 #[doc = "< Negative Z face of cubemap"]
12026 pub const cudaGraphicsCubeFaceNegativeZ: cudaGraphicsCubeFace = cudaGraphicsCubeFace(5);
12027}
12028#[repr(transparent)]
12029#[doc = " CUDA graphics interop array indices for cube maps"]
12030#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12031pub struct cudaGraphicsCubeFace(pub ::std::os::raw::c_uint);
12032impl cudaResourceType {
12033 #[doc = "< Array resource"]
12034 pub const cudaResourceTypeArray: cudaResourceType = cudaResourceType(0);
12035}
12036impl cudaResourceType {
12037 #[doc = "< Mipmapped array resource"]
12038 pub const cudaResourceTypeMipmappedArray: cudaResourceType = cudaResourceType(1);
12039}
12040impl cudaResourceType {
12041 #[doc = "< Linear resource"]
12042 pub const cudaResourceTypeLinear: cudaResourceType = cudaResourceType(2);
12043}
12044impl cudaResourceType {
12045 #[doc = "< Pitch 2D resource"]
12046 pub const cudaResourceTypePitch2D: cudaResourceType = cudaResourceType(3);
12047}
12048#[repr(transparent)]
12049#[doc = " CUDA resource types"]
12050#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12051pub struct cudaResourceType(pub ::std::os::raw::c_uint);
12052impl cudaResourceViewFormat {
12053 #[doc = "< No resource view format (use underlying resource format)"]
12054 pub const cudaResViewFormatNone: cudaResourceViewFormat = cudaResourceViewFormat(0);
12055}
12056impl cudaResourceViewFormat {
12057 #[doc = "< 1 channel unsigned 8-bit integers"]
12058 pub const cudaResViewFormatUnsignedChar1: cudaResourceViewFormat = cudaResourceViewFormat(1);
12059}
12060impl cudaResourceViewFormat {
12061 #[doc = "< 2 channel unsigned 8-bit integers"]
12062 pub const cudaResViewFormatUnsignedChar2: cudaResourceViewFormat = cudaResourceViewFormat(2);
12063}
12064impl cudaResourceViewFormat {
12065 #[doc = "< 4 channel unsigned 8-bit integers"]
12066 pub const cudaResViewFormatUnsignedChar4: cudaResourceViewFormat = cudaResourceViewFormat(3);
12067}
12068impl cudaResourceViewFormat {
12069 #[doc = "< 1 channel signed 8-bit integers"]
12070 pub const cudaResViewFormatSignedChar1: cudaResourceViewFormat = cudaResourceViewFormat(4);
12071}
12072impl cudaResourceViewFormat {
12073 #[doc = "< 2 channel signed 8-bit integers"]
12074 pub const cudaResViewFormatSignedChar2: cudaResourceViewFormat = cudaResourceViewFormat(5);
12075}
12076impl cudaResourceViewFormat {
12077 #[doc = "< 4 channel signed 8-bit integers"]
12078 pub const cudaResViewFormatSignedChar4: cudaResourceViewFormat = cudaResourceViewFormat(6);
12079}
12080impl cudaResourceViewFormat {
12081 #[doc = "< 1 channel unsigned 16-bit integers"]
12082 pub const cudaResViewFormatUnsignedShort1: cudaResourceViewFormat = cudaResourceViewFormat(7);
12083}
12084impl cudaResourceViewFormat {
12085 #[doc = "< 2 channel unsigned 16-bit integers"]
12086 pub const cudaResViewFormatUnsignedShort2: cudaResourceViewFormat = cudaResourceViewFormat(8);
12087}
12088impl cudaResourceViewFormat {
12089 #[doc = "< 4 channel unsigned 16-bit integers"]
12090 pub const cudaResViewFormatUnsignedShort4: cudaResourceViewFormat = cudaResourceViewFormat(9);
12091}
12092impl cudaResourceViewFormat {
12093 #[doc = "< 1 channel signed 16-bit integers"]
12094 pub const cudaResViewFormatSignedShort1: cudaResourceViewFormat = cudaResourceViewFormat(10);
12095}
12096impl cudaResourceViewFormat {
12097 #[doc = "< 2 channel signed 16-bit integers"]
12098 pub const cudaResViewFormatSignedShort2: cudaResourceViewFormat = cudaResourceViewFormat(11);
12099}
12100impl cudaResourceViewFormat {
12101 #[doc = "< 4 channel signed 16-bit integers"]
12102 pub const cudaResViewFormatSignedShort4: cudaResourceViewFormat = cudaResourceViewFormat(12);
12103}
12104impl cudaResourceViewFormat {
12105 #[doc = "< 1 channel unsigned 32-bit integers"]
12106 pub const cudaResViewFormatUnsignedInt1: cudaResourceViewFormat = cudaResourceViewFormat(13);
12107}
12108impl cudaResourceViewFormat {
12109 #[doc = "< 2 channel unsigned 32-bit integers"]
12110 pub const cudaResViewFormatUnsignedInt2: cudaResourceViewFormat = cudaResourceViewFormat(14);
12111}
12112impl cudaResourceViewFormat {
12113 #[doc = "< 4 channel unsigned 32-bit integers"]
12114 pub const cudaResViewFormatUnsignedInt4: cudaResourceViewFormat = cudaResourceViewFormat(15);
12115}
12116impl cudaResourceViewFormat {
12117 #[doc = "< 1 channel signed 32-bit integers"]
12118 pub const cudaResViewFormatSignedInt1: cudaResourceViewFormat = cudaResourceViewFormat(16);
12119}
12120impl cudaResourceViewFormat {
12121 #[doc = "< 2 channel signed 32-bit integers"]
12122 pub const cudaResViewFormatSignedInt2: cudaResourceViewFormat = cudaResourceViewFormat(17);
12123}
12124impl cudaResourceViewFormat {
12125 #[doc = "< 4 channel signed 32-bit integers"]
12126 pub const cudaResViewFormatSignedInt4: cudaResourceViewFormat = cudaResourceViewFormat(18);
12127}
12128impl cudaResourceViewFormat {
12129 #[doc = "< 1 channel 16-bit floating point"]
12130 pub const cudaResViewFormatHalf1: cudaResourceViewFormat = cudaResourceViewFormat(19);
12131}
12132impl cudaResourceViewFormat {
12133 #[doc = "< 2 channel 16-bit floating point"]
12134 pub const cudaResViewFormatHalf2: cudaResourceViewFormat = cudaResourceViewFormat(20);
12135}
12136impl cudaResourceViewFormat {
12137 #[doc = "< 4 channel 16-bit floating point"]
12138 pub const cudaResViewFormatHalf4: cudaResourceViewFormat = cudaResourceViewFormat(21);
12139}
12140impl cudaResourceViewFormat {
12141 #[doc = "< 1 channel 32-bit floating point"]
12142 pub const cudaResViewFormatFloat1: cudaResourceViewFormat = cudaResourceViewFormat(22);
12143}
12144impl cudaResourceViewFormat {
12145 #[doc = "< 2 channel 32-bit floating point"]
12146 pub const cudaResViewFormatFloat2: cudaResourceViewFormat = cudaResourceViewFormat(23);
12147}
12148impl cudaResourceViewFormat {
12149 #[doc = "< 4 channel 32-bit floating point"]
12150 pub const cudaResViewFormatFloat4: cudaResourceViewFormat = cudaResourceViewFormat(24);
12151}
12152impl cudaResourceViewFormat {
12153 #[doc = "< Block compressed 1"]
12154 pub const cudaResViewFormatUnsignedBlockCompressed1: cudaResourceViewFormat =
12155 cudaResourceViewFormat(25);
12156}
12157impl cudaResourceViewFormat {
12158 #[doc = "< Block compressed 2"]
12159 pub const cudaResViewFormatUnsignedBlockCompressed2: cudaResourceViewFormat =
12160 cudaResourceViewFormat(26);
12161}
12162impl cudaResourceViewFormat {
12163 #[doc = "< Block compressed 3"]
12164 pub const cudaResViewFormatUnsignedBlockCompressed3: cudaResourceViewFormat =
12165 cudaResourceViewFormat(27);
12166}
12167impl cudaResourceViewFormat {
12168 #[doc = "< Block compressed 4 unsigned"]
12169 pub const cudaResViewFormatUnsignedBlockCompressed4: cudaResourceViewFormat =
12170 cudaResourceViewFormat(28);
12171}
12172impl cudaResourceViewFormat {
12173 #[doc = "< Block compressed 4 signed"]
12174 pub const cudaResViewFormatSignedBlockCompressed4: cudaResourceViewFormat =
12175 cudaResourceViewFormat(29);
12176}
12177impl cudaResourceViewFormat {
12178 #[doc = "< Block compressed 5 unsigned"]
12179 pub const cudaResViewFormatUnsignedBlockCompressed5: cudaResourceViewFormat =
12180 cudaResourceViewFormat(30);
12181}
12182impl cudaResourceViewFormat {
12183 #[doc = "< Block compressed 5 signed"]
12184 pub const cudaResViewFormatSignedBlockCompressed5: cudaResourceViewFormat =
12185 cudaResourceViewFormat(31);
12186}
12187impl cudaResourceViewFormat {
12188 #[doc = "< Block compressed 6 unsigned half-float"]
12189 pub const cudaResViewFormatUnsignedBlockCompressed6H: cudaResourceViewFormat =
12190 cudaResourceViewFormat(32);
12191}
12192impl cudaResourceViewFormat {
12193 #[doc = "< Block compressed 6 signed half-float"]
12194 pub const cudaResViewFormatSignedBlockCompressed6H: cudaResourceViewFormat =
12195 cudaResourceViewFormat(33);
12196}
12197impl cudaResourceViewFormat {
12198 #[doc = "< Block compressed 7"]
12199 pub const cudaResViewFormatUnsignedBlockCompressed7: cudaResourceViewFormat =
12200 cudaResourceViewFormat(34);
12201}
12202#[repr(transparent)]
12203#[doc = " CUDA texture resource view formats"]
12204#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12205pub struct cudaResourceViewFormat(pub ::std::os::raw::c_uint);
12206#[doc = " CUDA resource descriptor"]
12207#[repr(C)]
12208#[derive(Copy, Clone)]
12209pub struct cudaResourceDesc {
12210 #[doc = "< Resource type"]
12211 pub resType: cudaResourceType,
12212 pub res: cudaResourceDesc__bindgen_ty_1,
12213}
12214#[repr(C)]
12215#[derive(Copy, Clone)]
12216pub union cudaResourceDesc__bindgen_ty_1 {
12217 pub array: cudaResourceDesc__bindgen_ty_1__bindgen_ty_1,
12218 pub mipmap: cudaResourceDesc__bindgen_ty_1__bindgen_ty_2,
12219 pub linear: cudaResourceDesc__bindgen_ty_1__bindgen_ty_3,
12220 pub pitch2D: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4,
12221}
12222#[repr(C)]
12223#[derive(Debug, Copy, Clone)]
12224pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_1 {
12225 #[doc = "< CUDA array"]
12226 pub array: cudaArray_t,
12227}
12228#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12229const _: () = {
12230 ["Size of cudaResourceDesc__bindgen_ty_1__bindgen_ty_1"]
12231 [::std::mem::size_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_1>() - 8usize];
12232 ["Alignment of cudaResourceDesc__bindgen_ty_1__bindgen_ty_1"]
12233 [::std::mem::align_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_1>() - 8usize];
12234 ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_1::array"]
12235 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1, array) - 0usize];
12236};
12237#[repr(C)]
12238#[derive(Debug, Copy, Clone)]
12239pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_2 {
12240 #[doc = "< CUDA mipmapped array"]
12241 pub mipmap: cudaMipmappedArray_t,
12242}
12243#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12244const _: () = {
12245 ["Size of cudaResourceDesc__bindgen_ty_1__bindgen_ty_2"]
12246 [::std::mem::size_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_2>() - 8usize];
12247 ["Alignment of cudaResourceDesc__bindgen_ty_1__bindgen_ty_2"]
12248 [::std::mem::align_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_2>() - 8usize];
12249 ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_2::mipmap"]
12250 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2, mipmap) - 0usize];
12251};
12252#[repr(C)]
12253#[derive(Debug, Copy, Clone)]
12254pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_3 {
12255 #[doc = "< Device pointer"]
12256 pub devPtr: *mut ::std::os::raw::c_void,
12257 #[doc = "< Channel descriptor"]
12258 pub desc: cudaChannelFormatDesc,
12259 #[doc = "< Size in bytes"]
12260 pub sizeInBytes: usize,
12261}
12262#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12263const _: () = {
12264 ["Size of cudaResourceDesc__bindgen_ty_1__bindgen_ty_3"]
12265 [::std::mem::size_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_3>() - 40usize];
12266 ["Alignment of cudaResourceDesc__bindgen_ty_1__bindgen_ty_3"]
12267 [::std::mem::align_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_3>() - 8usize];
12268 ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_3::devPtr"]
12269 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3, devPtr) - 0usize];
12270 ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_3::desc"]
12271 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3, desc) - 8usize];
12272 ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_3::sizeInBytes"][::std::mem::offset_of!(
12273 cudaResourceDesc__bindgen_ty_1__bindgen_ty_3,
12274 sizeInBytes
12275 ) - 32usize];
12276};
12277#[repr(C)]
12278#[derive(Debug, Copy, Clone)]
12279pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_4 {
12280 #[doc = "< Device pointer"]
12281 pub devPtr: *mut ::std::os::raw::c_void,
12282 #[doc = "< Channel descriptor"]
12283 pub desc: cudaChannelFormatDesc,
12284 #[doc = "< Width of the array in elements"]
12285 pub width: usize,
12286 #[doc = "< Height of the array in elements"]
12287 pub height: usize,
12288 #[doc = "< Pitch between two rows in bytes"]
12289 pub pitchInBytes: usize,
12290}
12291#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12292const _: () = {
12293 ["Size of cudaResourceDesc__bindgen_ty_1__bindgen_ty_4"]
12294 [::std::mem::size_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_4>() - 56usize];
12295 ["Alignment of cudaResourceDesc__bindgen_ty_1__bindgen_ty_4"]
12296 [::std::mem::align_of::<cudaResourceDesc__bindgen_ty_1__bindgen_ty_4>() - 8usize];
12297 ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4::devPtr"]
12298 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4, devPtr) - 0usize];
12299 ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4::desc"]
12300 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4, desc) - 8usize];
12301 ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4::width"]
12302 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4, width) - 32usize];
12303 ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4::height"]
12304 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4, height) - 40usize];
12305 ["Offset of field: cudaResourceDesc__bindgen_ty_1__bindgen_ty_4::pitchInBytes"][::std::mem::offset_of!(
12306 cudaResourceDesc__bindgen_ty_1__bindgen_ty_4,
12307 pitchInBytes
12308 ) - 48usize];
12309};
12310#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12311const _: () = {
12312 ["Size of cudaResourceDesc__bindgen_ty_1"]
12313 [::std::mem::size_of::<cudaResourceDesc__bindgen_ty_1>() - 56usize];
12314 ["Alignment of cudaResourceDesc__bindgen_ty_1"]
12315 [::std::mem::align_of::<cudaResourceDesc__bindgen_ty_1>() - 8usize];
12316 ["Offset of field: cudaResourceDesc__bindgen_ty_1::array"]
12317 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1, array) - 0usize];
12318 ["Offset of field: cudaResourceDesc__bindgen_ty_1::mipmap"]
12319 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1, mipmap) - 0usize];
12320 ["Offset of field: cudaResourceDesc__bindgen_ty_1::linear"]
12321 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1, linear) - 0usize];
12322 ["Offset of field: cudaResourceDesc__bindgen_ty_1::pitch2D"]
12323 [::std::mem::offset_of!(cudaResourceDesc__bindgen_ty_1, pitch2D) - 0usize];
12324};
12325#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12326const _: () = {
12327 ["Size of cudaResourceDesc"][::std::mem::size_of::<cudaResourceDesc>() - 64usize];
12328 ["Alignment of cudaResourceDesc"][::std::mem::align_of::<cudaResourceDesc>() - 8usize];
12329 ["Offset of field: cudaResourceDesc::resType"]
12330 [::std::mem::offset_of!(cudaResourceDesc, resType) - 0usize];
12331 ["Offset of field: cudaResourceDesc::res"]
12332 [::std::mem::offset_of!(cudaResourceDesc, res) - 8usize];
12333};
12334#[doc = " CUDA resource view descriptor"]
12335#[repr(C)]
12336#[derive(Debug, Copy, Clone)]
12337pub struct cudaResourceViewDesc {
12338 #[doc = "< Resource view format"]
12339 pub format: cudaResourceViewFormat,
12340 #[doc = "< Width of the resource view"]
12341 pub width: usize,
12342 #[doc = "< Height of the resource view"]
12343 pub height: usize,
12344 #[doc = "< Depth of the resource view"]
12345 pub depth: usize,
12346 #[doc = "< First defined mipmap level"]
12347 pub firstMipmapLevel: ::std::os::raw::c_uint,
12348 #[doc = "< Last defined mipmap level"]
12349 pub lastMipmapLevel: ::std::os::raw::c_uint,
12350 #[doc = "< First layer index"]
12351 pub firstLayer: ::std::os::raw::c_uint,
12352 #[doc = "< Last layer index"]
12353 pub lastLayer: ::std::os::raw::c_uint,
12354}
12355#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12356const _: () = {
12357 ["Size of cudaResourceViewDesc"][::std::mem::size_of::<cudaResourceViewDesc>() - 48usize];
12358 ["Alignment of cudaResourceViewDesc"][::std::mem::align_of::<cudaResourceViewDesc>() - 8usize];
12359 ["Offset of field: cudaResourceViewDesc::format"]
12360 [::std::mem::offset_of!(cudaResourceViewDesc, format) - 0usize];
12361 ["Offset of field: cudaResourceViewDesc::width"]
12362 [::std::mem::offset_of!(cudaResourceViewDesc, width) - 8usize];
12363 ["Offset of field: cudaResourceViewDesc::height"]
12364 [::std::mem::offset_of!(cudaResourceViewDesc, height) - 16usize];
12365 ["Offset of field: cudaResourceViewDesc::depth"]
12366 [::std::mem::offset_of!(cudaResourceViewDesc, depth) - 24usize];
12367 ["Offset of field: cudaResourceViewDesc::firstMipmapLevel"]
12368 [::std::mem::offset_of!(cudaResourceViewDesc, firstMipmapLevel) - 32usize];
12369 ["Offset of field: cudaResourceViewDesc::lastMipmapLevel"]
12370 [::std::mem::offset_of!(cudaResourceViewDesc, lastMipmapLevel) - 36usize];
12371 ["Offset of field: cudaResourceViewDesc::firstLayer"]
12372 [::std::mem::offset_of!(cudaResourceViewDesc, firstLayer) - 40usize];
12373 ["Offset of field: cudaResourceViewDesc::lastLayer"]
12374 [::std::mem::offset_of!(cudaResourceViewDesc, lastLayer) - 44usize];
12375};
12376#[doc = " CUDA pointer attributes"]
12377#[repr(C)]
12378#[derive(Debug, Copy, Clone)]
12379pub struct cudaPointerAttributes {
12380 #[doc = " The type of memory - ::cudaMemoryTypeUnregistered, ::cudaMemoryTypeHost,\n ::cudaMemoryTypeDevice or ::cudaMemoryTypeManaged."]
12381 pub type_: cudaMemoryType,
12382 #[doc = " The device against which the memory was allocated or registered.\n If the memory type is ::cudaMemoryTypeDevice then this identifies\n the device on which the memory referred physically resides. If\n the memory type is ::cudaMemoryTypeHost or::cudaMemoryTypeManaged then\n this identifies the device which was current when the memory was allocated\n or registered (and if that device is deinitialized then this allocation\n will vanish with that device's state)."]
12383 pub device: ::std::os::raw::c_int,
12384 #[doc = " The address which may be dereferenced on the current device to access\n the memory or NULL if no such address exists."]
12385 pub devicePointer: *mut ::std::os::raw::c_void,
12386 #[doc = " The address which may be dereferenced on the host to access the\n memory or NULL if no such address exists.\n\n \\note CUDA doesn't check if unregistered memory is allocated so this field\n may contain invalid pointer if an invalid pointer has been passed to CUDA."]
12387 pub hostPointer: *mut ::std::os::raw::c_void,
12388}
12389#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12390const _: () = {
12391 ["Size of cudaPointerAttributes"][::std::mem::size_of::<cudaPointerAttributes>() - 24usize];
12392 ["Alignment of cudaPointerAttributes"]
12393 [::std::mem::align_of::<cudaPointerAttributes>() - 8usize];
12394 ["Offset of field: cudaPointerAttributes::type_"]
12395 [::std::mem::offset_of!(cudaPointerAttributes, type_) - 0usize];
12396 ["Offset of field: cudaPointerAttributes::device"]
12397 [::std::mem::offset_of!(cudaPointerAttributes, device) - 4usize];
12398 ["Offset of field: cudaPointerAttributes::devicePointer"]
12399 [::std::mem::offset_of!(cudaPointerAttributes, devicePointer) - 8usize];
12400 ["Offset of field: cudaPointerAttributes::hostPointer"]
12401 [::std::mem::offset_of!(cudaPointerAttributes, hostPointer) - 16usize];
12402};
12403#[doc = " CUDA function attributes"]
12404#[repr(C)]
12405#[derive(Debug, Copy, Clone)]
12406pub struct cudaFuncAttributes {
12407 #[doc = " The size in bytes of statically-allocated shared memory per block\n required by this function. This does not include dynamically-allocated\n shared memory requested by the user at runtime."]
12408 pub sharedSizeBytes: usize,
12409 #[doc = " The size in bytes of user-allocated constant memory required by this\n function."]
12410 pub constSizeBytes: usize,
12411 #[doc = " The size in bytes of local memory used by each thread of this function."]
12412 pub localSizeBytes: usize,
12413 #[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."]
12414 pub maxThreadsPerBlock: ::std::os::raw::c_int,
12415 #[doc = " The number of registers used by each thread of this function."]
12416 pub numRegs: ::std::os::raw::c_int,
12417 #[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."]
12418 pub ptxVersion: ::std::os::raw::c_int,
12419 #[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."]
12420 pub binaryVersion: ::std::os::raw::c_int,
12421 #[doc = " The attribute to indicate whether the function has been compiled with\n user specified option \"-Xptxas --dlcm=ca\" set."]
12422 pub cacheModeCA: ::std::os::raw::c_int,
12423 #[doc = " The maximum size in bytes of dynamic shared memory per block for\n this function. Any launch must have a dynamic shared memory size\n smaller than this value."]
12424 pub maxDynamicSharedSizeBytes: ::std::os::raw::c_int,
12425 #[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 maximum shared memory.\n Refer to ::cudaDevAttrMaxSharedMemoryPerMultiprocessor.\n This is only a hint, and the driver can choose a different ratio if required to execute the function.\n See ::cudaFuncSetAttribute"]
12426 pub preferredShmemCarveout: ::std::os::raw::c_int,
12427 #[doc = " If this attribute is set, the kernel must launch with a valid cluster dimension\n specified."]
12428 pub clusterDimMustBeSet: ::std::os::raw::c_int,
12429 #[doc = " The required cluster width/height/depth in blocks. The values must either\n all be 0 or all be positive. The validity of the cluster dimensions is\n otherwise 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 cudaErrorNotPermitted.\n See ::cudaFuncSetAttribute"]
12430 pub requiredClusterWidth: ::std::os::raw::c_int,
12431 pub requiredClusterHeight: ::std::os::raw::c_int,
12432 pub requiredClusterDepth: ::std::os::raw::c_int,
12433 #[doc = " The block scheduling policy of a function.\n See ::cudaFuncSetAttribute"]
12434 pub clusterSchedulingPolicyPreference: ::std::os::raw::c_int,
12435 #[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 ::cudaFuncSetAttribute"]
12436 pub nonPortableClusterSizeAllowed: ::std::os::raw::c_int,
12437 #[doc = " Reserved for future use."]
12438 pub reserved: [::std::os::raw::c_int; 16usize],
12439}
12440#[allow(clippy::unnecessary_operation, clippy::identity_op)]
12441const _: () = {
12442 ["Size of cudaFuncAttributes"][::std::mem::size_of::<cudaFuncAttributes>() - 144usize];
12443 ["Alignment of cudaFuncAttributes"][::std::mem::align_of::<cudaFuncAttributes>() - 8usize];
12444 ["Offset of field: cudaFuncAttributes::sharedSizeBytes"]
12445 [::std::mem::offset_of!(cudaFuncAttributes, sharedSizeBytes) - 0usize];
12446 ["Offset of field: cudaFuncAttributes::constSizeBytes"]
12447 [::std::mem::offset_of!(cudaFuncAttributes, constSizeBytes) - 8usize];
12448 ["Offset of field: cudaFuncAttributes::localSizeBytes"]
12449 [::std::mem::offset_of!(cudaFuncAttributes, localSizeBytes) - 16usize];
12450 ["Offset of field: cudaFuncAttributes::maxThreadsPerBlock"]
12451 [::std::mem::offset_of!(cudaFuncAttributes, maxThreadsPerBlock) - 24usize];
12452 ["Offset of field: cudaFuncAttributes::numRegs"]
12453 [::std::mem::offset_of!(cudaFuncAttributes, numRegs) - 28usize];
12454 ["Offset of field: cudaFuncAttributes::ptxVersion"]
12455 [::std::mem::offset_of!(cudaFuncAttributes, ptxVersion) - 32usize];
12456 ["Offset of field: cudaFuncAttributes::binaryVersion"]
12457 [::std::mem::offset_of!(cudaFuncAttributes, binaryVersion) - 36usize];
12458 ["Offset of field: cudaFuncAttributes::cacheModeCA"]
12459 [::std::mem::offset_of!(cudaFuncAttributes, cacheModeCA) - 40usize];
12460 ["Offset of field: cudaFuncAttributes::maxDynamicSharedSizeBytes"]
12461 [::std::mem::offset_of!(cudaFuncAttributes, maxDynamicSharedSizeBytes) - 44usize];
12462 ["Offset of field: cudaFuncAttributes::preferredShmemCarveout"]
12463 [::std::mem::offset_of!(cudaFuncAttributes, preferredShmemCarveout) - 48usize];
12464 ["Offset of field: cudaFuncAttributes::clusterDimMustBeSet"]
12465 [::std::mem::offset_of!(cudaFuncAttributes, clusterDimMustBeSet) - 52usize];
12466 ["Offset of field: cudaFuncAttributes::requiredClusterWidth"]
12467 [::std::mem::offset_of!(cudaFuncAttributes, requiredClusterWidth) - 56usize];
12468 ["Offset of field: cudaFuncAttributes::requiredClusterHeight"]
12469 [::std::mem::offset_of!(cudaFuncAttributes, requiredClusterHeight) - 60usize];
12470 ["Offset of field: cudaFuncAttributes::requiredClusterDepth"]
12471 [::std::mem::offset_of!(cudaFuncAttributes, requiredClusterDepth) - 64usize];
12472 ["Offset of field: cudaFuncAttributes::clusterSchedulingPolicyPreference"]
12473 [::std::mem::offset_of!(cudaFuncAttributes, clusterSchedulingPolicyPreference) - 68usize];
12474 ["Offset of field: cudaFuncAttributes::nonPortableClusterSizeAllowed"]
12475 [::std::mem::offset_of!(cudaFuncAttributes, nonPortableClusterSizeAllowed) - 72usize];
12476 ["Offset of field: cudaFuncAttributes::reserved"]
12477 [::std::mem::offset_of!(cudaFuncAttributes, reserved) - 76usize];
12478};
12479impl cudaFuncAttribute {
12480 #[doc = "< Maximum dynamic shared memory size"]
12481 pub const cudaFuncAttributeMaxDynamicSharedMemorySize: cudaFuncAttribute = cudaFuncAttribute(8);
12482}
12483impl cudaFuncAttribute {
12484 #[doc = "< Preferred shared memory-L1 cache split"]
12485 pub const cudaFuncAttributePreferredSharedMemoryCarveout: cudaFuncAttribute =
12486 cudaFuncAttribute(9);
12487}
12488impl cudaFuncAttribute {
12489 #[doc = "< Indicator to enforce valid cluster dimension specification on kernel launch"]
12490 pub const cudaFuncAttributeClusterDimMustBeSet: cudaFuncAttribute = cudaFuncAttribute(10);
12491}
12492impl cudaFuncAttribute {
12493 #[doc = "< Required cluster width"]
12494 pub const cudaFuncAttributeRequiredClusterWidth: cudaFuncAttribute = cudaFuncAttribute(11);
12495}
12496impl cudaFuncAttribute {
12497 #[doc = "< Required cluster height"]
12498 pub const cudaFuncAttributeRequiredClusterHeight: cudaFuncAttribute = cudaFuncAttribute(12);
12499}
12500impl cudaFuncAttribute {
12501 #[doc = "< Required cluster depth"]
12502 pub const cudaFuncAttributeRequiredClusterDepth: cudaFuncAttribute = cudaFuncAttribute(13);
12503}
12504impl cudaFuncAttribute {
12505 #[doc = "< Whether non-portable cluster scheduling policy is supported"]
12506 pub const cudaFuncAttributeNonPortableClusterSizeAllowed: cudaFuncAttribute =
12507 cudaFuncAttribute(14);
12508}
12509impl cudaFuncAttribute {
12510 #[doc = "< Required cluster scheduling policy preference"]
12511 pub const cudaFuncAttributeClusterSchedulingPolicyPreference: cudaFuncAttribute =
12512 cudaFuncAttribute(15);
12513}
12514impl cudaFuncAttribute {
12515 pub const cudaFuncAttributeMax: cudaFuncAttribute = cudaFuncAttribute(16);
12516}
12517#[repr(transparent)]
12518#[doc = " CUDA function attributes that can be set using ::cudaFuncSetAttribute"]
12519#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12520pub struct cudaFuncAttribute(pub ::std::os::raw::c_uint);
12521impl cudaFuncCache {
12522 #[doc = "< Default function cache configuration, no preference"]
12523 pub const cudaFuncCachePreferNone: cudaFuncCache = cudaFuncCache(0);
12524}
12525impl cudaFuncCache {
12526 #[doc = "< Prefer larger shared memory and smaller L1 cache"]
12527 pub const cudaFuncCachePreferShared: cudaFuncCache = cudaFuncCache(1);
12528}
12529impl cudaFuncCache {
12530 #[doc = "< Prefer larger L1 cache and smaller shared memory"]
12531 pub const cudaFuncCachePreferL1: cudaFuncCache = cudaFuncCache(2);
12532}
12533impl cudaFuncCache {
12534 #[doc = "< Prefer equal size L1 cache and shared memory"]
12535 pub const cudaFuncCachePreferEqual: cudaFuncCache = cudaFuncCache(3);
12536}
12537#[repr(transparent)]
12538#[doc = " CUDA function cache configurations"]
12539#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12540pub struct cudaFuncCache(pub ::std::os::raw::c_uint);
12541impl cudaSharedMemConfig {
12542 pub const cudaSharedMemBankSizeDefault: cudaSharedMemConfig = cudaSharedMemConfig(0);
12543}
12544impl cudaSharedMemConfig {
12545 pub const cudaSharedMemBankSizeFourByte: cudaSharedMemConfig = cudaSharedMemConfig(1);
12546}
12547impl cudaSharedMemConfig {
12548 pub const cudaSharedMemBankSizeEightByte: cudaSharedMemConfig = cudaSharedMemConfig(2);
12549}
12550#[repr(transparent)]
12551#[doc = " CUDA shared memory configuration\n \\deprecated"]
12552#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12553pub struct cudaSharedMemConfig(pub ::std::os::raw::c_uint);
12554impl cudaSharedCarveout {
12555 #[doc = "< No preference for shared memory or L1 (default)"]
12556 pub const cudaSharedmemCarveoutDefault: cudaSharedCarveout = cudaSharedCarveout(-1);
12557}
12558impl cudaSharedCarveout {
12559 #[doc = "< Prefer maximum available shared memory, minimum L1 cache"]
12560 pub const cudaSharedmemCarveoutMaxShared: cudaSharedCarveout = cudaSharedCarveout(100);
12561}
12562impl cudaSharedCarveout {
12563 #[doc = "< Prefer maximum available L1 cache, minimum shared memory"]
12564 pub const cudaSharedmemCarveoutMaxL1: cudaSharedCarveout = cudaSharedCarveout(0);
12565}
12566#[repr(transparent)]
12567#[doc = " Shared memory carveout configurations. These may be passed to cudaFuncSetAttribute"]
12568#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12569pub struct cudaSharedCarveout(pub ::std::os::raw::c_int);
12570impl cudaComputeMode {
12571 #[doc = "< Default compute mode (Multiple threads can use ::cudaSetDevice() with this device)"]
12572 pub const cudaComputeModeDefault: cudaComputeMode = cudaComputeMode(0);
12573}
12574impl cudaComputeMode {
12575 #[doc = "< Compute-exclusive-thread mode (Only one thread in one process will be able to use ::cudaSetDevice() with this device)"]
12576 pub const cudaComputeModeExclusive: cudaComputeMode = cudaComputeMode(1);
12577}
12578impl cudaComputeMode {
12579 #[doc = "< Compute-prohibited mode (No threads can use ::cudaSetDevice() with this device)"]
12580 pub const cudaComputeModeProhibited: cudaComputeMode = cudaComputeMode(2);
12581}
12582impl cudaComputeMode {
12583 #[doc = "< Compute-exclusive-process mode (Many threads in one process will be able to use ::cudaSetDevice() with this device)"]
12584 pub const cudaComputeModeExclusiveProcess: cudaComputeMode = cudaComputeMode(3);
12585}
12586#[repr(transparent)]
12587#[doc = " CUDA device compute modes"]
12588#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12589pub struct cudaComputeMode(pub ::std::os::raw::c_uint);
12590impl cudaLimit {
12591 #[doc = "< GPU thread stack size"]
12592 pub const cudaLimitStackSize: cudaLimit = cudaLimit(0);
12593}
12594impl cudaLimit {
12595 #[doc = "< GPU printf FIFO size"]
12596 pub const cudaLimitPrintfFifoSize: cudaLimit = cudaLimit(1);
12597}
12598impl cudaLimit {
12599 #[doc = "< GPU malloc heap size"]
12600 pub const cudaLimitMallocHeapSize: cudaLimit = cudaLimit(2);
12601}
12602impl cudaLimit {
12603 #[doc = "< GPU device runtime synchronize depth"]
12604 pub const cudaLimitDevRuntimeSyncDepth: cudaLimit = cudaLimit(3);
12605}
12606impl cudaLimit {
12607 #[doc = "< GPU device runtime pending launch count"]
12608 pub const cudaLimitDevRuntimePendingLaunchCount: cudaLimit = cudaLimit(4);
12609}
12610impl cudaLimit {
12611 #[doc = "< A value between 0 and 128 that indicates the maximum fetch granularity of L2 (in Bytes). This is a hint"]
12612 pub const cudaLimitMaxL2FetchGranularity: cudaLimit = cudaLimit(5);
12613}
12614impl cudaLimit {
12615 #[doc = "< A size in bytes for L2 persisting lines cache size"]
12616 pub const cudaLimitPersistingL2CacheSize: cudaLimit = cudaLimit(6);
12617}
12618#[repr(transparent)]
12619#[doc = " CUDA Limits"]
12620#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12621pub struct cudaLimit(pub ::std::os::raw::c_uint);
12622impl cudaMemoryAdvise {
12623 #[doc = "< Data will mostly be read and only occassionally be written to"]
12624 pub const cudaMemAdviseSetReadMostly: cudaMemoryAdvise = cudaMemoryAdvise(1);
12625}
12626impl cudaMemoryAdvise {
12627 #[doc = "< Undo the effect of ::cudaMemAdviseSetReadMostly"]
12628 pub const cudaMemAdviseUnsetReadMostly: cudaMemoryAdvise = cudaMemoryAdvise(2);
12629}
12630impl cudaMemoryAdvise {
12631 #[doc = "< Set the preferred location for the data as the specified device"]
12632 pub const cudaMemAdviseSetPreferredLocation: cudaMemoryAdvise = cudaMemoryAdvise(3);
12633}
12634impl cudaMemoryAdvise {
12635 #[doc = "< Clear the preferred location for the data"]
12636 pub const cudaMemAdviseUnsetPreferredLocation: cudaMemoryAdvise = cudaMemoryAdvise(4);
12637}
12638impl cudaMemoryAdvise {
12639 #[doc = "< Data will be accessed by the specified device, so prevent page faults as much as possible"]
12640 pub const cudaMemAdviseSetAccessedBy: cudaMemoryAdvise = cudaMemoryAdvise(5);
12641}
12642impl cudaMemoryAdvise {
12643 #[doc = "< Let the Unified Memory subsystem decide on the page faulting policy for the specified device"]
12644 pub const cudaMemAdviseUnsetAccessedBy: cudaMemoryAdvise = cudaMemoryAdvise(6);
12645}
12646#[repr(transparent)]
12647#[doc = " CUDA Memory Advise values"]
12648#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12649pub struct cudaMemoryAdvise(pub ::std::os::raw::c_uint);
12650impl cudaMemRangeAttribute {
12651 #[doc = "< Whether the range will mostly be read and only occassionally be written to"]
12652 pub const cudaMemRangeAttributeReadMostly: cudaMemRangeAttribute = cudaMemRangeAttribute(1);
12653}
12654impl cudaMemRangeAttribute {
12655 #[doc = "< The preferred location of the range"]
12656 pub const cudaMemRangeAttributePreferredLocation: cudaMemRangeAttribute =
12657 cudaMemRangeAttribute(2);
12658}
12659impl cudaMemRangeAttribute {
12660 #[doc = "< Memory range has ::cudaMemAdviseSetAccessedBy set for specified device"]
12661 pub const cudaMemRangeAttributeAccessedBy: cudaMemRangeAttribute = cudaMemRangeAttribute(3);
12662}
12663impl cudaMemRangeAttribute {
12664 #[doc = "< The last location to which the range was prefetched"]
12665 pub const cudaMemRangeAttributeLastPrefetchLocation: cudaMemRangeAttribute =
12666 cudaMemRangeAttribute(4);
12667}
12668impl cudaMemRangeAttribute {
12669 #[doc = "< The preferred location type of the range"]
12670 pub const cudaMemRangeAttributePreferredLocationType: cudaMemRangeAttribute =
12671 cudaMemRangeAttribute(5);
12672}
12673impl cudaMemRangeAttribute {
12674 #[doc = "< The preferred location id of the range"]
12675 pub const cudaMemRangeAttributePreferredLocationId: cudaMemRangeAttribute =
12676 cudaMemRangeAttribute(6);
12677}
12678impl cudaMemRangeAttribute {
12679 #[doc = "< The last location type to which the range was prefetched"]
12680 pub const cudaMemRangeAttributeLastPrefetchLocationType: cudaMemRangeAttribute =
12681 cudaMemRangeAttribute(7);
12682}
12683impl cudaMemRangeAttribute {
12684 #[doc = "< The last location id to which the range was prefetched"]
12685 pub const cudaMemRangeAttributeLastPrefetchLocationId: cudaMemRangeAttribute =
12686 cudaMemRangeAttribute(8);
12687}
12688#[repr(transparent)]
12689#[doc = " CUDA range attributes"]
12690#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12691pub struct cudaMemRangeAttribute(pub ::std::os::raw::c_uint);
12692impl cudaFlushGPUDirectRDMAWritesOptions {
12693 #[doc = "< ::cudaDeviceFlushGPUDirectRDMAWrites() and its CUDA Driver API counterpart are supported on the device."]
12694 pub const cudaFlushGPUDirectRDMAWritesOptionHost: cudaFlushGPUDirectRDMAWritesOptions =
12695 cudaFlushGPUDirectRDMAWritesOptions(1);
12696}
12697impl cudaFlushGPUDirectRDMAWritesOptions {
12698 #[doc = "< The ::CU_STREAM_WAIT_VALUE_FLUSH flag and the ::CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES MemOp are supported on the CUDA device."]
12699 pub const cudaFlushGPUDirectRDMAWritesOptionMemOps: cudaFlushGPUDirectRDMAWritesOptions =
12700 cudaFlushGPUDirectRDMAWritesOptions(2);
12701}
12702#[repr(transparent)]
12703#[doc = " CUDA GPUDirect RDMA flush writes APIs supported on the device"]
12704#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12705pub struct cudaFlushGPUDirectRDMAWritesOptions(pub ::std::os::raw::c_uint);
12706impl cudaGPUDirectRDMAWritesOrdering {
12707 #[doc = "< The device does not natively support ordering of GPUDirect RDMA writes. ::cudaFlushGPUDirectRDMAWrites() can be leveraged if supported."]
12708 pub const cudaGPUDirectRDMAWritesOrderingNone: cudaGPUDirectRDMAWritesOrdering =
12709 cudaGPUDirectRDMAWritesOrdering(0);
12710}
12711impl cudaGPUDirectRDMAWritesOrdering {
12712 #[doc = "< Natively, the device can consistently consume GPUDirect RDMA writes, although other CUDA devices may not."]
12713 pub const cudaGPUDirectRDMAWritesOrderingOwner: cudaGPUDirectRDMAWritesOrdering =
12714 cudaGPUDirectRDMAWritesOrdering(100);
12715}
12716impl cudaGPUDirectRDMAWritesOrdering {
12717 #[doc = "< Any CUDA device in the system can consistently consume GPUDirect RDMA writes to this device."]
12718 pub const cudaGPUDirectRDMAWritesOrderingAllDevices: cudaGPUDirectRDMAWritesOrdering =
12719 cudaGPUDirectRDMAWritesOrdering(200);
12720}
12721#[repr(transparent)]
12722#[doc = " CUDA GPUDirect RDMA flush writes ordering features of the device"]
12723#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12724pub struct cudaGPUDirectRDMAWritesOrdering(pub ::std::os::raw::c_uint);
12725impl cudaFlushGPUDirectRDMAWritesScope {
12726 #[doc = "< Blocks until remote writes are visible to the CUDA device context owning the data."]
12727 pub const cudaFlushGPUDirectRDMAWritesToOwner: cudaFlushGPUDirectRDMAWritesScope =
12728 cudaFlushGPUDirectRDMAWritesScope(100);
12729}
12730impl cudaFlushGPUDirectRDMAWritesScope {
12731 #[doc = "< Blocks until remote writes are visible to all CUDA device contexts."]
12732 pub const cudaFlushGPUDirectRDMAWritesToAllDevices: cudaFlushGPUDirectRDMAWritesScope =
12733 cudaFlushGPUDirectRDMAWritesScope(200);
12734}
12735#[repr(transparent)]
12736#[doc = " CUDA GPUDirect RDMA flush writes scopes"]
12737#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12738pub struct cudaFlushGPUDirectRDMAWritesScope(pub ::std::os::raw::c_uint);
12739impl cudaFlushGPUDirectRDMAWritesTarget {
12740 #[doc = "< Sets the target for ::cudaDeviceFlushGPUDirectRDMAWrites() to the currently active CUDA device context."]
12741 pub const cudaFlushGPUDirectRDMAWritesTargetCurrentDevice: cudaFlushGPUDirectRDMAWritesTarget =
12742 cudaFlushGPUDirectRDMAWritesTarget(0);
12743}
12744#[repr(transparent)]
12745#[doc = " CUDA GPUDirect RDMA flush writes targets"]
12746#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
12747pub struct cudaFlushGPUDirectRDMAWritesTarget(pub ::std::os::raw::c_uint);
12748impl cudaDeviceAttr {
12749 #[doc = "< Maximum number of threads per block"]
12750 pub const cudaDevAttrMaxThreadsPerBlock: cudaDeviceAttr = cudaDeviceAttr(1);
12751}
12752impl cudaDeviceAttr {
12753 #[doc = "< Maximum block dimension X"]
12754 pub const cudaDevAttrMaxBlockDimX: cudaDeviceAttr = cudaDeviceAttr(2);
12755}
12756impl cudaDeviceAttr {
12757 #[doc = "< Maximum block dimension Y"]
12758 pub const cudaDevAttrMaxBlockDimY: cudaDeviceAttr = cudaDeviceAttr(3);
12759}
12760impl cudaDeviceAttr {
12761 #[doc = "< Maximum block dimension Z"]
12762 pub const cudaDevAttrMaxBlockDimZ: cudaDeviceAttr = cudaDeviceAttr(4);
12763}
12764impl cudaDeviceAttr {
12765 #[doc = "< Maximum grid dimension X"]
12766 pub const cudaDevAttrMaxGridDimX: cudaDeviceAttr = cudaDeviceAttr(5);
12767}
12768impl cudaDeviceAttr {
12769 #[doc = "< Maximum grid dimension Y"]
12770 pub const cudaDevAttrMaxGridDimY: cudaDeviceAttr = cudaDeviceAttr(6);
12771}
12772impl cudaDeviceAttr {
12773 #[doc = "< Maximum grid dimension Z"]
12774 pub const cudaDevAttrMaxGridDimZ: cudaDeviceAttr = cudaDeviceAttr(7);
12775}
12776impl cudaDeviceAttr {
12777 #[doc = "< Maximum shared memory available per block in bytes"]
12778 pub const cudaDevAttrMaxSharedMemoryPerBlock: cudaDeviceAttr = cudaDeviceAttr(8);
12779}
12780impl cudaDeviceAttr {
12781 #[doc = "< Memory available on device for __constant__ variables in a CUDA C kernel in bytes"]
12782 pub const cudaDevAttrTotalConstantMemory: cudaDeviceAttr = cudaDeviceAttr(9);
12783}
12784impl cudaDeviceAttr {
12785 #[doc = "< Warp size in threads"]
12786 pub const cudaDevAttrWarpSize: cudaDeviceAttr = cudaDeviceAttr(10);
12787}
12788impl cudaDeviceAttr {
12789 #[doc = "< Maximum pitch in bytes allowed by memory copies"]
12790 pub const cudaDevAttrMaxPitch: cudaDeviceAttr = cudaDeviceAttr(11);
12791}
12792impl cudaDeviceAttr {
12793 #[doc = "< Maximum number of 32-bit registers available per block"]
12794 pub const cudaDevAttrMaxRegistersPerBlock: cudaDeviceAttr = cudaDeviceAttr(12);
12795}
12796impl cudaDeviceAttr {
12797 #[doc = "< Peak clock frequency in kilohertz"]
12798 pub const cudaDevAttrClockRate: cudaDeviceAttr = cudaDeviceAttr(13);
12799}
12800impl cudaDeviceAttr {
12801 #[doc = "< Alignment requirement for textures"]
12802 pub const cudaDevAttrTextureAlignment: cudaDeviceAttr = cudaDeviceAttr(14);
12803}
12804impl cudaDeviceAttr {
12805 #[doc = "< Device can possibly copy memory and execute a kernel concurrently"]
12806 pub const cudaDevAttrGpuOverlap: cudaDeviceAttr = cudaDeviceAttr(15);
12807}
12808impl cudaDeviceAttr {
12809 #[doc = "< Number of multiprocessors on device"]
12810 pub const cudaDevAttrMultiProcessorCount: cudaDeviceAttr = cudaDeviceAttr(16);
12811}
12812impl cudaDeviceAttr {
12813 #[doc = "< Specifies whether there is a run time limit on kernels"]
12814 pub const cudaDevAttrKernelExecTimeout: cudaDeviceAttr = cudaDeviceAttr(17);
12815}
12816impl cudaDeviceAttr {
12817 #[doc = "< Device is integrated with host memory"]
12818 pub const cudaDevAttrIntegrated: cudaDeviceAttr = cudaDeviceAttr(18);
12819}
12820impl cudaDeviceAttr {
12821 #[doc = "< Device can map host memory into CUDA address space"]
12822 pub const cudaDevAttrCanMapHostMemory: cudaDeviceAttr = cudaDeviceAttr(19);
12823}
12824impl cudaDeviceAttr {
12825 #[doc = "< Compute mode (See ::cudaComputeMode for details)"]
12826 pub const cudaDevAttrComputeMode: cudaDeviceAttr = cudaDeviceAttr(20);
12827}
12828impl cudaDeviceAttr {
12829 #[doc = "< Maximum 1D texture width"]
12830 pub const cudaDevAttrMaxTexture1DWidth: cudaDeviceAttr = cudaDeviceAttr(21);
12831}
12832impl cudaDeviceAttr {
12833 #[doc = "< Maximum 2D texture width"]
12834 pub const cudaDevAttrMaxTexture2DWidth: cudaDeviceAttr = cudaDeviceAttr(22);
12835}
12836impl cudaDeviceAttr {
12837 #[doc = "< Maximum 2D texture height"]
12838 pub const cudaDevAttrMaxTexture2DHeight: cudaDeviceAttr = cudaDeviceAttr(23);
12839}
12840impl cudaDeviceAttr {
12841 #[doc = "< Maximum 3D texture width"]
12842 pub const cudaDevAttrMaxTexture3DWidth: cudaDeviceAttr = cudaDeviceAttr(24);
12843}
12844impl cudaDeviceAttr {
12845 #[doc = "< Maximum 3D texture height"]
12846 pub const cudaDevAttrMaxTexture3DHeight: cudaDeviceAttr = cudaDeviceAttr(25);
12847}
12848impl cudaDeviceAttr {
12849 #[doc = "< Maximum 3D texture depth"]
12850 pub const cudaDevAttrMaxTexture3DDepth: cudaDeviceAttr = cudaDeviceAttr(26);
12851}
12852impl cudaDeviceAttr {
12853 #[doc = "< Maximum 2D layered texture width"]
12854 pub const cudaDevAttrMaxTexture2DLayeredWidth: cudaDeviceAttr = cudaDeviceAttr(27);
12855}
12856impl cudaDeviceAttr {
12857 #[doc = "< Maximum 2D layered texture height"]
12858 pub const cudaDevAttrMaxTexture2DLayeredHeight: cudaDeviceAttr = cudaDeviceAttr(28);
12859}
12860impl cudaDeviceAttr {
12861 #[doc = "< Maximum layers in a 2D layered texture"]
12862 pub const cudaDevAttrMaxTexture2DLayeredLayers: cudaDeviceAttr = cudaDeviceAttr(29);
12863}
12864impl cudaDeviceAttr {
12865 #[doc = "< Alignment requirement for surfaces"]
12866 pub const cudaDevAttrSurfaceAlignment: cudaDeviceAttr = cudaDeviceAttr(30);
12867}
12868impl cudaDeviceAttr {
12869 #[doc = "< Device can possibly execute multiple kernels concurrently"]
12870 pub const cudaDevAttrConcurrentKernels: cudaDeviceAttr = cudaDeviceAttr(31);
12871}
12872impl cudaDeviceAttr {
12873 #[doc = "< Device has ECC support enabled"]
12874 pub const cudaDevAttrEccEnabled: cudaDeviceAttr = cudaDeviceAttr(32);
12875}
12876impl cudaDeviceAttr {
12877 #[doc = "< PCI bus ID of the device"]
12878 pub const cudaDevAttrPciBusId: cudaDeviceAttr = cudaDeviceAttr(33);
12879}
12880impl cudaDeviceAttr {
12881 #[doc = "< PCI device ID of the device"]
12882 pub const cudaDevAttrPciDeviceId: cudaDeviceAttr = cudaDeviceAttr(34);
12883}
12884impl cudaDeviceAttr {
12885 #[doc = "< Device is using TCC driver model"]
12886 pub const cudaDevAttrTccDriver: cudaDeviceAttr = cudaDeviceAttr(35);
12887}
12888impl cudaDeviceAttr {
12889 #[doc = "< Peak memory clock frequency in kilohertz"]
12890 pub const cudaDevAttrMemoryClockRate: cudaDeviceAttr = cudaDeviceAttr(36);
12891}
12892impl cudaDeviceAttr {
12893 #[doc = "< Global memory bus width in bits"]
12894 pub const cudaDevAttrGlobalMemoryBusWidth: cudaDeviceAttr = cudaDeviceAttr(37);
12895}
12896impl cudaDeviceAttr {
12897 #[doc = "< Size of L2 cache in bytes"]
12898 pub const cudaDevAttrL2CacheSize: cudaDeviceAttr = cudaDeviceAttr(38);
12899}
12900impl cudaDeviceAttr {
12901 #[doc = "< Maximum resident threads per multiprocessor"]
12902 pub const cudaDevAttrMaxThreadsPerMultiProcessor: cudaDeviceAttr = cudaDeviceAttr(39);
12903}
12904impl cudaDeviceAttr {
12905 #[doc = "< Number of asynchronous engines"]
12906 pub const cudaDevAttrAsyncEngineCount: cudaDeviceAttr = cudaDeviceAttr(40);
12907}
12908impl cudaDeviceAttr {
12909 #[doc = "< Device shares a unified address space with the host"]
12910 pub const cudaDevAttrUnifiedAddressing: cudaDeviceAttr = cudaDeviceAttr(41);
12911}
12912impl cudaDeviceAttr {
12913 #[doc = "< Maximum 1D layered texture width"]
12914 pub const cudaDevAttrMaxTexture1DLayeredWidth: cudaDeviceAttr = cudaDeviceAttr(42);
12915}
12916impl cudaDeviceAttr {
12917 #[doc = "< Maximum layers in a 1D layered texture"]
12918 pub const cudaDevAttrMaxTexture1DLayeredLayers: cudaDeviceAttr = cudaDeviceAttr(43);
12919}
12920impl cudaDeviceAttr {
12921 #[doc = "< Maximum 2D texture width if cudaArrayTextureGather is set"]
12922 pub const cudaDevAttrMaxTexture2DGatherWidth: cudaDeviceAttr = cudaDeviceAttr(45);
12923}
12924impl cudaDeviceAttr {
12925 #[doc = "< Maximum 2D texture height if cudaArrayTextureGather is set"]
12926 pub const cudaDevAttrMaxTexture2DGatherHeight: cudaDeviceAttr = cudaDeviceAttr(46);
12927}
12928impl cudaDeviceAttr {
12929 #[doc = "< Alternate maximum 3D texture width"]
12930 pub const cudaDevAttrMaxTexture3DWidthAlt: cudaDeviceAttr = cudaDeviceAttr(47);
12931}
12932impl cudaDeviceAttr {
12933 #[doc = "< Alternate maximum 3D texture height"]
12934 pub const cudaDevAttrMaxTexture3DHeightAlt: cudaDeviceAttr = cudaDeviceAttr(48);
12935}
12936impl cudaDeviceAttr {
12937 #[doc = "< Alternate maximum 3D texture depth"]
12938 pub const cudaDevAttrMaxTexture3DDepthAlt: cudaDeviceAttr = cudaDeviceAttr(49);
12939}
12940impl cudaDeviceAttr {
12941 #[doc = "< PCI domain ID of the device"]
12942 pub const cudaDevAttrPciDomainId: cudaDeviceAttr = cudaDeviceAttr(50);
12943}
12944impl cudaDeviceAttr {
12945 #[doc = "< Pitch alignment requirement for textures"]
12946 pub const cudaDevAttrTexturePitchAlignment: cudaDeviceAttr = cudaDeviceAttr(51);
12947}
12948impl cudaDeviceAttr {
12949 #[doc = "< Maximum cubemap texture width/height"]
12950 pub const cudaDevAttrMaxTextureCubemapWidth: cudaDeviceAttr = cudaDeviceAttr(52);
12951}
12952impl cudaDeviceAttr {
12953 #[doc = "< Maximum cubemap layered texture width/height"]
12954 pub const cudaDevAttrMaxTextureCubemapLayeredWidth: cudaDeviceAttr = cudaDeviceAttr(53);
12955}
12956impl cudaDeviceAttr {
12957 #[doc = "< Maximum layers in a cubemap layered texture"]
12958 pub const cudaDevAttrMaxTextureCubemapLayeredLayers: cudaDeviceAttr = cudaDeviceAttr(54);
12959}
12960impl cudaDeviceAttr {
12961 #[doc = "< Maximum 1D surface width"]
12962 pub const cudaDevAttrMaxSurface1DWidth: cudaDeviceAttr = cudaDeviceAttr(55);
12963}
12964impl cudaDeviceAttr {
12965 #[doc = "< Maximum 2D surface width"]
12966 pub const cudaDevAttrMaxSurface2DWidth: cudaDeviceAttr = cudaDeviceAttr(56);
12967}
12968impl cudaDeviceAttr {
12969 #[doc = "< Maximum 2D surface height"]
12970 pub const cudaDevAttrMaxSurface2DHeight: cudaDeviceAttr = cudaDeviceAttr(57);
12971}
12972impl cudaDeviceAttr {
12973 #[doc = "< Maximum 3D surface width"]
12974 pub const cudaDevAttrMaxSurface3DWidth: cudaDeviceAttr = cudaDeviceAttr(58);
12975}
12976impl cudaDeviceAttr {
12977 #[doc = "< Maximum 3D surface height"]
12978 pub const cudaDevAttrMaxSurface3DHeight: cudaDeviceAttr = cudaDeviceAttr(59);
12979}
12980impl cudaDeviceAttr {
12981 #[doc = "< Maximum 3D surface depth"]
12982 pub const cudaDevAttrMaxSurface3DDepth: cudaDeviceAttr = cudaDeviceAttr(60);
12983}
12984impl cudaDeviceAttr {
12985 #[doc = "< Maximum 1D layered surface width"]
12986 pub const cudaDevAttrMaxSurface1DLayeredWidth: cudaDeviceAttr = cudaDeviceAttr(61);
12987}
12988impl cudaDeviceAttr {
12989 #[doc = "< Maximum layers in a 1D layered surface"]
12990 pub const cudaDevAttrMaxSurface1DLayeredLayers: cudaDeviceAttr = cudaDeviceAttr(62);
12991}
12992impl cudaDeviceAttr {
12993 #[doc = "< Maximum 2D layered surface width"]
12994 pub const cudaDevAttrMaxSurface2DLayeredWidth: cudaDeviceAttr = cudaDeviceAttr(63);
12995}
12996impl cudaDeviceAttr {
12997 #[doc = "< Maximum 2D layered surface height"]
12998 pub const cudaDevAttrMaxSurface2DLayeredHeight: cudaDeviceAttr = cudaDeviceAttr(64);
12999}
13000impl cudaDeviceAttr {
13001 #[doc = "< Maximum layers in a 2D layered surface"]
13002 pub const cudaDevAttrMaxSurface2DLayeredLayers: cudaDeviceAttr = cudaDeviceAttr(65);
13003}
13004impl cudaDeviceAttr {
13005 #[doc = "< Maximum cubemap surface width"]
13006 pub const cudaDevAttrMaxSurfaceCubemapWidth: cudaDeviceAttr = cudaDeviceAttr(66);
13007}
13008impl cudaDeviceAttr {
13009 #[doc = "< Maximum cubemap layered surface width"]
13010 pub const cudaDevAttrMaxSurfaceCubemapLayeredWidth: cudaDeviceAttr = cudaDeviceAttr(67);
13011}
13012impl cudaDeviceAttr {
13013 #[doc = "< Maximum layers in a cubemap layered surface"]
13014 pub const cudaDevAttrMaxSurfaceCubemapLayeredLayers: cudaDeviceAttr = cudaDeviceAttr(68);
13015}
13016impl cudaDeviceAttr {
13017 #[doc = "< Maximum 1D linear texture width"]
13018 pub const cudaDevAttrMaxTexture1DLinearWidth: cudaDeviceAttr = cudaDeviceAttr(69);
13019}
13020impl cudaDeviceAttr {
13021 #[doc = "< Maximum 2D linear texture width"]
13022 pub const cudaDevAttrMaxTexture2DLinearWidth: cudaDeviceAttr = cudaDeviceAttr(70);
13023}
13024impl cudaDeviceAttr {
13025 #[doc = "< Maximum 2D linear texture height"]
13026 pub const cudaDevAttrMaxTexture2DLinearHeight: cudaDeviceAttr = cudaDeviceAttr(71);
13027}
13028impl cudaDeviceAttr {
13029 #[doc = "< Maximum 2D linear texture pitch in bytes"]
13030 pub const cudaDevAttrMaxTexture2DLinearPitch: cudaDeviceAttr = cudaDeviceAttr(72);
13031}
13032impl cudaDeviceAttr {
13033 #[doc = "< Maximum mipmapped 2D texture width"]
13034 pub const cudaDevAttrMaxTexture2DMipmappedWidth: cudaDeviceAttr = cudaDeviceAttr(73);
13035}
13036impl cudaDeviceAttr {
13037 #[doc = "< Maximum mipmapped 2D texture height"]
13038 pub const cudaDevAttrMaxTexture2DMipmappedHeight: cudaDeviceAttr = cudaDeviceAttr(74);
13039}
13040impl cudaDeviceAttr {
13041 #[doc = "< Major compute capability version number"]
13042 pub const cudaDevAttrComputeCapabilityMajor: cudaDeviceAttr = cudaDeviceAttr(75);
13043}
13044impl cudaDeviceAttr {
13045 #[doc = "< Minor compute capability version number"]
13046 pub const cudaDevAttrComputeCapabilityMinor: cudaDeviceAttr = cudaDeviceAttr(76);
13047}
13048impl cudaDeviceAttr {
13049 #[doc = "< Maximum mipmapped 1D texture width"]
13050 pub const cudaDevAttrMaxTexture1DMipmappedWidth: cudaDeviceAttr = cudaDeviceAttr(77);
13051}
13052impl cudaDeviceAttr {
13053 #[doc = "< Device supports stream priorities"]
13054 pub const cudaDevAttrStreamPrioritiesSupported: cudaDeviceAttr = cudaDeviceAttr(78);
13055}
13056impl cudaDeviceAttr {
13057 #[doc = "< Device supports caching globals in L1"]
13058 pub const cudaDevAttrGlobalL1CacheSupported: cudaDeviceAttr = cudaDeviceAttr(79);
13059}
13060impl cudaDeviceAttr {
13061 #[doc = "< Device supports caching locals in L1"]
13062 pub const cudaDevAttrLocalL1CacheSupported: cudaDeviceAttr = cudaDeviceAttr(80);
13063}
13064impl cudaDeviceAttr {
13065 #[doc = "< Maximum shared memory available per multiprocessor in bytes"]
13066 pub const cudaDevAttrMaxSharedMemoryPerMultiprocessor: cudaDeviceAttr = cudaDeviceAttr(81);
13067}
13068impl cudaDeviceAttr {
13069 #[doc = "< Maximum number of 32-bit registers available per multiprocessor"]
13070 pub const cudaDevAttrMaxRegistersPerMultiprocessor: cudaDeviceAttr = cudaDeviceAttr(82);
13071}
13072impl cudaDeviceAttr {
13073 #[doc = "< Device can allocate managed memory on this system"]
13074 pub const cudaDevAttrManagedMemory: cudaDeviceAttr = cudaDeviceAttr(83);
13075}
13076impl cudaDeviceAttr {
13077 #[doc = "< Device is on a multi-GPU board"]
13078 pub const cudaDevAttrIsMultiGpuBoard: cudaDeviceAttr = cudaDeviceAttr(84);
13079}
13080impl cudaDeviceAttr {
13081 #[doc = "< Unique identifier for a group of devices on the same multi-GPU board"]
13082 pub const cudaDevAttrMultiGpuBoardGroupID: cudaDeviceAttr = cudaDeviceAttr(85);
13083}
13084impl cudaDeviceAttr {
13085 #[doc = "< Link between the device and the host supports native atomic operations"]
13086 pub const cudaDevAttrHostNativeAtomicSupported: cudaDeviceAttr = cudaDeviceAttr(86);
13087}
13088impl cudaDeviceAttr {
13089 #[doc = "< Ratio of single precision performance (in floating-point operations per second) to double precision performance"]
13090 pub const cudaDevAttrSingleToDoublePrecisionPerfRatio: cudaDeviceAttr = cudaDeviceAttr(87);
13091}
13092impl cudaDeviceAttr {
13093 #[doc = "< Device supports coherently accessing pageable memory without calling cudaHostRegister on it"]
13094 pub const cudaDevAttrPageableMemoryAccess: cudaDeviceAttr = cudaDeviceAttr(88);
13095}
13096impl cudaDeviceAttr {
13097 #[doc = "< Device can coherently access managed memory concurrently with the CPU"]
13098 pub const cudaDevAttrConcurrentManagedAccess: cudaDeviceAttr = cudaDeviceAttr(89);
13099}
13100impl cudaDeviceAttr {
13101 #[doc = "< Device supports Compute Preemption"]
13102 pub const cudaDevAttrComputePreemptionSupported: cudaDeviceAttr = cudaDeviceAttr(90);
13103}
13104impl cudaDeviceAttr {
13105 #[doc = "< Device can access host registered memory at the same virtual address as the CPU"]
13106 pub const cudaDevAttrCanUseHostPointerForRegisteredMem: cudaDeviceAttr = cudaDeviceAttr(91);
13107}
13108impl cudaDeviceAttr {
13109 pub const cudaDevAttrReserved92: cudaDeviceAttr = cudaDeviceAttr(92);
13110}
13111impl cudaDeviceAttr {
13112 pub const cudaDevAttrReserved93: cudaDeviceAttr = cudaDeviceAttr(93);
13113}
13114impl cudaDeviceAttr {
13115 pub const cudaDevAttrReserved94: cudaDeviceAttr = cudaDeviceAttr(94);
13116}
13117impl cudaDeviceAttr {
13118 #[doc = "< Device supports launching cooperative kernels via ::cudaLaunchCooperativeKernel"]
13119 pub const cudaDevAttrCooperativeLaunch: cudaDeviceAttr = cudaDeviceAttr(95);
13120}
13121impl cudaDeviceAttr {
13122 #[doc = "< Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated."]
13123 pub const cudaDevAttrCooperativeMultiDeviceLaunch: cudaDeviceAttr = cudaDeviceAttr(96);
13124}
13125impl cudaDeviceAttr {
13126 #[doc = "< The maximum optin shared memory per block. This value may vary by chip. See ::cudaFuncSetAttribute"]
13127 pub const cudaDevAttrMaxSharedMemoryPerBlockOptin: cudaDeviceAttr = cudaDeviceAttr(97);
13128}
13129impl cudaDeviceAttr {
13130 #[doc = "< Device supports flushing of outstanding remote writes."]
13131 pub const cudaDevAttrCanFlushRemoteWrites: cudaDeviceAttr = cudaDeviceAttr(98);
13132}
13133impl cudaDeviceAttr {
13134 #[doc = "< Device supports host memory registration via ::cudaHostRegister."]
13135 pub const cudaDevAttrHostRegisterSupported: cudaDeviceAttr = cudaDeviceAttr(99);
13136}
13137impl cudaDeviceAttr {
13138 #[doc = "< Device accesses pageable memory via the host's page tables."]
13139 pub const cudaDevAttrPageableMemoryAccessUsesHostPageTables: cudaDeviceAttr =
13140 cudaDeviceAttr(100);
13141}
13142impl cudaDeviceAttr {
13143 #[doc = "< Host can directly access managed memory on the device without migration."]
13144 pub const cudaDevAttrDirectManagedMemAccessFromHost: cudaDeviceAttr = cudaDeviceAttr(101);
13145}
13146impl cudaDeviceAttr {
13147 #[doc = "< Maximum number of blocks per multiprocessor"]
13148 pub const cudaDevAttrMaxBlocksPerMultiprocessor: cudaDeviceAttr = cudaDeviceAttr(106);
13149}
13150impl cudaDeviceAttr {
13151 #[doc = "< Maximum L2 persisting lines capacity setting in bytes."]
13152 pub const cudaDevAttrMaxPersistingL2CacheSize: cudaDeviceAttr = cudaDeviceAttr(108);
13153}
13154impl cudaDeviceAttr {
13155 #[doc = "< Maximum value of cudaAccessPolicyWindow::num_bytes."]
13156 pub const cudaDevAttrMaxAccessPolicyWindowSize: cudaDeviceAttr = cudaDeviceAttr(109);
13157}
13158impl cudaDeviceAttr {
13159 #[doc = "< Shared memory reserved by CUDA driver per block in bytes"]
13160 pub const cudaDevAttrReservedSharedMemoryPerBlock: cudaDeviceAttr = cudaDeviceAttr(111);
13161}
13162impl cudaDeviceAttr {
13163 #[doc = "< Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays"]
13164 pub const cudaDevAttrSparseCudaArraySupported: cudaDeviceAttr = cudaDeviceAttr(112);
13165}
13166impl cudaDeviceAttr {
13167 #[doc = "< Device supports using the ::cudaHostRegister flag cudaHostRegisterReadOnly to register memory that must be mapped as read-only to the GPU"]
13168 pub const cudaDevAttrHostRegisterReadOnlySupported: cudaDeviceAttr = cudaDeviceAttr(113);
13169}
13170impl cudaDeviceAttr {
13171 #[doc = "< External timeline semaphore interop is supported on the device"]
13172 pub const cudaDevAttrTimelineSemaphoreInteropSupported: cudaDeviceAttr = cudaDeviceAttr(114);
13173}
13174impl cudaDeviceAttr {
13175 #[doc = "< Deprecated, External timeline semaphore interop is supported on the device"]
13176 pub const cudaDevAttrMaxTimelineSemaphoreInteropSupported: cudaDeviceAttr = cudaDeviceAttr(114);
13177}
13178impl cudaDeviceAttr {
13179 #[doc = "< Device supports using the ::cudaMallocAsync and ::cudaMemPool family of APIs"]
13180 pub const cudaDevAttrMemoryPoolsSupported: cudaDeviceAttr = cudaDeviceAttr(115);
13181}
13182impl cudaDeviceAttr {
13183 #[doc = "< Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see https://docs.nvidia.com/cuda/gpudirect-rdma for more information)"]
13184 pub const cudaDevAttrGPUDirectRDMASupported: cudaDeviceAttr = cudaDeviceAttr(116);
13185}
13186impl cudaDeviceAttr {
13187 #[doc = "< The returned attribute shall be interpreted as a bitmask, where the individual bits are listed in the ::cudaFlushGPUDirectRDMAWritesOptions enum"]
13188 pub const cudaDevAttrGPUDirectRDMAFlushWritesOptions: cudaDeviceAttr = cudaDeviceAttr(117);
13189}
13190impl cudaDeviceAttr {
13191 #[doc = "< GPUDirect RDMA writes to the device do not need to be flushed for consumers within the scope indicated by the returned attribute. See ::cudaGPUDirectRDMAWritesOrdering for the numerical values returned here."]
13192 pub const cudaDevAttrGPUDirectRDMAWritesOrdering: cudaDeviceAttr = cudaDeviceAttr(118);
13193}
13194impl cudaDeviceAttr {
13195 #[doc = "< Handle types supported with mempool based IPC"]
13196 pub const cudaDevAttrMemoryPoolSupportedHandleTypes: cudaDeviceAttr = cudaDeviceAttr(119);
13197}
13198impl cudaDeviceAttr {
13199 #[doc = "< Indicates device supports cluster launch"]
13200 pub const cudaDevAttrClusterLaunch: cudaDeviceAttr = cudaDeviceAttr(120);
13201}
13202impl cudaDeviceAttr {
13203 #[doc = "< Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays"]
13204 pub const cudaDevAttrDeferredMappingCudaArraySupported: cudaDeviceAttr = cudaDeviceAttr(121);
13205}
13206impl cudaDeviceAttr {
13207 pub const cudaDevAttrReserved122: cudaDeviceAttr = cudaDeviceAttr(122);
13208}
13209impl cudaDeviceAttr {
13210 pub const cudaDevAttrReserved123: cudaDeviceAttr = cudaDeviceAttr(123);
13211}
13212impl cudaDeviceAttr {
13213 pub const cudaDevAttrReserved124: cudaDeviceAttr = cudaDeviceAttr(124);
13214}
13215impl cudaDeviceAttr {
13216 #[doc = "< Device supports IPC Events."]
13217 pub const cudaDevAttrIpcEventSupport: cudaDeviceAttr = cudaDeviceAttr(125);
13218}
13219impl cudaDeviceAttr {
13220 #[doc = "< Number of memory synchronization domains the device supports."]
13221 pub const cudaDevAttrMemSyncDomainCount: cudaDeviceAttr = cudaDeviceAttr(126);
13222}
13223impl cudaDeviceAttr {
13224 pub const cudaDevAttrReserved127: cudaDeviceAttr = cudaDeviceAttr(127);
13225}
13226impl cudaDeviceAttr {
13227 pub const cudaDevAttrReserved128: cudaDeviceAttr = cudaDeviceAttr(128);
13228}
13229impl cudaDeviceAttr {
13230 pub const cudaDevAttrReserved129: cudaDeviceAttr = cudaDeviceAttr(129);
13231}
13232impl cudaDeviceAttr {
13233 #[doc = "< NUMA configuration of a device: value is of type ::cudaDeviceNumaConfig enum"]
13234 pub const cudaDevAttrNumaConfig: cudaDeviceAttr = cudaDeviceAttr(130);
13235}
13236impl cudaDeviceAttr {
13237 #[doc = "< NUMA node ID of the GPU memory"]
13238 pub const cudaDevAttrNumaId: cudaDeviceAttr = cudaDeviceAttr(131);
13239}
13240impl cudaDeviceAttr {
13241 pub const cudaDevAttrReserved132: cudaDeviceAttr = cudaDeviceAttr(132);
13242}
13243impl cudaDeviceAttr {
13244 #[doc = "< Contexts created on this device will be shared via MPS"]
13245 pub const cudaDevAttrMpsEnabled: cudaDeviceAttr = cudaDeviceAttr(133);
13246}
13247impl cudaDeviceAttr {
13248 #[doc = "< NUMA ID of the host node closest to the device. Returns -1 when system does not support NUMA."]
13249 pub const cudaDevAttrHostNumaId: cudaDeviceAttr = cudaDeviceAttr(134);
13250}
13251impl cudaDeviceAttr {
13252 #[doc = "< Device supports CIG with D3D12."]
13253 pub const cudaDevAttrD3D12CigSupported: cudaDeviceAttr = cudaDeviceAttr(135);
13254}
13255impl cudaDeviceAttr {
13256 pub const cudaDevAttrMax: cudaDeviceAttr = cudaDeviceAttr(136);
13257}
13258#[repr(transparent)]
13259#[doc = " CUDA device attributes"]
13260#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
13261pub struct cudaDeviceAttr(pub ::std::os::raw::c_uint);
13262impl cudaMemPoolAttr {
13263 #[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)"]
13264 pub const cudaMemPoolReuseFollowEventDependencies: cudaMemPoolAttr = cudaMemPoolAttr(1);
13265}
13266impl cudaMemPoolAttr {
13267 #[doc = " (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)"]
13268 pub const cudaMemPoolReuseAllowOpportunistic: cudaMemPoolAttr = cudaMemPoolAttr(2);
13269}
13270impl cudaMemPoolAttr {
13271 #[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)."]
13272 pub const cudaMemPoolReuseAllowInternalDependencies: cudaMemPoolAttr = cudaMemPoolAttr(3);
13273}
13274impl cudaMemPoolAttr {
13275 #[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)"]
13276 pub const cudaMemPoolAttrReleaseThreshold: cudaMemPoolAttr = cudaMemPoolAttr(4);
13277}
13278impl cudaMemPoolAttr {
13279 #[doc = " (value type = cuuint64_t)\n Amount of backing memory currently allocated for the mempool."]
13280 pub const cudaMemPoolAttrReservedMemCurrent: cudaMemPoolAttr = cudaMemPoolAttr(5);
13281}
13282impl cudaMemPoolAttr {
13283 #[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."]
13284 pub const cudaMemPoolAttrReservedMemHigh: cudaMemPoolAttr = cudaMemPoolAttr(6);
13285}
13286impl cudaMemPoolAttr {
13287 #[doc = " (value type = cuuint64_t)\n Amount of memory from the pool that is currently in use by the application."]
13288 pub const cudaMemPoolAttrUsedMemCurrent: cudaMemPoolAttr = cudaMemPoolAttr(7);
13289}
13290impl cudaMemPoolAttr {
13291 #[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."]
13292 pub const cudaMemPoolAttrUsedMemHigh: cudaMemPoolAttr = cudaMemPoolAttr(8);
13293}
13294#[repr(transparent)]
13295#[doc = " CUDA memory pool attributes"]
13296#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
13297pub struct cudaMemPoolAttr(pub ::std::os::raw::c_uint);
13298impl cudaMemLocationType {
13299 pub const cudaMemLocationTypeInvalid: cudaMemLocationType = cudaMemLocationType(0);
13300}
13301impl cudaMemLocationType {
13302 #[doc = "< Location is a device location, thus id is a device ordinal"]
13303 pub const cudaMemLocationTypeDevice: cudaMemLocationType = cudaMemLocationType(1);
13304}
13305impl cudaMemLocationType {
13306 #[doc = "< Location is host, id is ignored"]
13307 pub const cudaMemLocationTypeHost: cudaMemLocationType = cudaMemLocationType(2);
13308}
13309impl cudaMemLocationType {
13310 #[doc = "< Location is a host NUMA node, thus id is a host NUMA node id"]
13311 pub const cudaMemLocationTypeHostNuma: cudaMemLocationType = cudaMemLocationType(3);
13312}
13313impl cudaMemLocationType {
13314 #[doc = "< Location is the host NUMA node closest to the current thread's CPU, id is ignored"]
13315 pub const cudaMemLocationTypeHostNumaCurrent: cudaMemLocationType = cudaMemLocationType(4);
13316}
13317#[repr(transparent)]
13318#[doc = " Specifies the type of location"]
13319#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
13320pub struct cudaMemLocationType(pub ::std::os::raw::c_uint);
13321#[doc = " Specifies a memory location.\n\n To specify a gpu, set type = ::cudaMemLocationTypeDevice and set id = the gpu's device ordinal.\n To specify a cpu NUMA node, set type = ::cudaMemLocationTypeHostNuma and set id = host NUMA node id."]
13322#[repr(C)]
13323#[derive(Debug, Copy, Clone)]
13324pub struct cudaMemLocation {
13325 #[doc = "< Specifies the location type, which modifies the meaning of id."]
13326 pub type_: cudaMemLocationType,
13327 #[doc = "< identifier for a given this location's ::CUmemLocationType."]
13328 pub id: ::std::os::raw::c_int,
13329}
13330#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13331const _: () = {
13332 ["Size of cudaMemLocation"][::std::mem::size_of::<cudaMemLocation>() - 8usize];
13333 ["Alignment of cudaMemLocation"][::std::mem::align_of::<cudaMemLocation>() - 4usize];
13334 ["Offset of field: cudaMemLocation::type_"]
13335 [::std::mem::offset_of!(cudaMemLocation, type_) - 0usize];
13336 ["Offset of field: cudaMemLocation::id"][::std::mem::offset_of!(cudaMemLocation, id) - 4usize];
13337};
13338impl cudaMemAccessFlags {
13339 #[doc = "< Default, make the address range not accessible"]
13340 pub const cudaMemAccessFlagsProtNone: cudaMemAccessFlags = cudaMemAccessFlags(0);
13341}
13342impl cudaMemAccessFlags {
13343 #[doc = "< Make the address range read accessible"]
13344 pub const cudaMemAccessFlagsProtRead: cudaMemAccessFlags = cudaMemAccessFlags(1);
13345}
13346impl cudaMemAccessFlags {
13347 #[doc = "< Make the address range read-write accessible"]
13348 pub const cudaMemAccessFlagsProtReadWrite: cudaMemAccessFlags = cudaMemAccessFlags(3);
13349}
13350#[repr(transparent)]
13351#[doc = " Specifies the memory protection flags for mapping."]
13352#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
13353pub struct cudaMemAccessFlags(pub ::std::os::raw::c_uint);
13354#[doc = " Memory access descriptor"]
13355#[repr(C)]
13356#[derive(Debug, Copy, Clone)]
13357pub struct cudaMemAccessDesc {
13358 #[doc = "< Location on which the request is to change it's accessibility"]
13359 pub location: cudaMemLocation,
13360 #[doc = "< ::CUmemProt accessibility flags to set on the request"]
13361 pub flags: cudaMemAccessFlags,
13362}
13363#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13364const _: () = {
13365 ["Size of cudaMemAccessDesc"][::std::mem::size_of::<cudaMemAccessDesc>() - 12usize];
13366 ["Alignment of cudaMemAccessDesc"][::std::mem::align_of::<cudaMemAccessDesc>() - 4usize];
13367 ["Offset of field: cudaMemAccessDesc::location"]
13368 [::std::mem::offset_of!(cudaMemAccessDesc, location) - 0usize];
13369 ["Offset of field: cudaMemAccessDesc::flags"]
13370 [::std::mem::offset_of!(cudaMemAccessDesc, flags) - 8usize];
13371};
13372impl cudaMemAllocationType {
13373 pub const cudaMemAllocationTypeInvalid: cudaMemAllocationType = cudaMemAllocationType(0);
13374}
13375impl cudaMemAllocationType {
13376 #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
13377 pub const cudaMemAllocationTypePinned: cudaMemAllocationType = cudaMemAllocationType(1);
13378}
13379impl cudaMemAllocationType {
13380 #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
13381 pub const cudaMemAllocationTypeMax: cudaMemAllocationType = cudaMemAllocationType(2147483647);
13382}
13383#[repr(transparent)]
13384#[doc = " Defines the allocation types available"]
13385#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
13386pub struct cudaMemAllocationType(pub ::std::os::raw::c_uint);
13387impl cudaMemAllocationHandleType {
13388 #[doc = "< Does not allow any export mechanism. >"]
13389 pub const cudaMemHandleTypeNone: cudaMemAllocationHandleType = cudaMemAllocationHandleType(0);
13390}
13391impl cudaMemAllocationHandleType {
13392 #[doc = "< Allows a file descriptor to be used for exporting. Permitted only on POSIX systems. (int)"]
13393 pub const cudaMemHandleTypePosixFileDescriptor: cudaMemAllocationHandleType =
13394 cudaMemAllocationHandleType(1);
13395}
13396impl cudaMemAllocationHandleType {
13397 #[doc = "< Allows a Win32 NT handle to be used for exporting. (HANDLE)"]
13398 pub const cudaMemHandleTypeWin32: cudaMemAllocationHandleType = cudaMemAllocationHandleType(2);
13399}
13400impl cudaMemAllocationHandleType {
13401 #[doc = "< Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)"]
13402 pub const cudaMemHandleTypeWin32Kmt: cudaMemAllocationHandleType =
13403 cudaMemAllocationHandleType(4);
13404}
13405impl cudaMemAllocationHandleType {
13406 #[doc = "< Allows a fabric handle to be used for exporting. (cudaMemFabricHandle_t)"]
13407 pub const cudaMemHandleTypeFabric: cudaMemAllocationHandleType = cudaMemAllocationHandleType(8);
13408}
13409#[repr(transparent)]
13410#[doc = " Flags for specifying particular handle types"]
13411#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
13412pub struct cudaMemAllocationHandleType(pub ::std::os::raw::c_uint);
13413#[doc = " Specifies the properties of allocations made from the pool."]
13414#[repr(C)]
13415#[derive(Debug, Copy, Clone)]
13416pub struct cudaMemPoolProps {
13417 #[doc = "< Allocation type. Currently must be specified as cudaMemAllocationTypePinned"]
13418 pub allocType: cudaMemAllocationType,
13419 #[doc = "< Handle types that will be supported by allocations from the pool."]
13420 pub handleTypes: cudaMemAllocationHandleType,
13421 #[doc = "< Location allocations should reside."]
13422 pub location: cudaMemLocation,
13423 #[doc = " Windows-specific LPSECURITYATTRIBUTES required when\n ::cudaMemHandleTypeWin32 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."]
13424 pub win32SecurityAttributes: *mut ::std::os::raw::c_void,
13425 #[doc = "< Maximum pool size. When set to 0, defaults to a system dependent value."]
13426 pub maxSize: usize,
13427 #[doc = "< Bitmask indicating intended usage for the pool."]
13428 pub usage: ::std::os::raw::c_ushort,
13429 #[doc = "< reserved for future use, must be 0"]
13430 pub reserved: [::std::os::raw::c_uchar; 54usize],
13431}
13432#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13433const _: () = {
13434 ["Size of cudaMemPoolProps"][::std::mem::size_of::<cudaMemPoolProps>() - 88usize];
13435 ["Alignment of cudaMemPoolProps"][::std::mem::align_of::<cudaMemPoolProps>() - 8usize];
13436 ["Offset of field: cudaMemPoolProps::allocType"]
13437 [::std::mem::offset_of!(cudaMemPoolProps, allocType) - 0usize];
13438 ["Offset of field: cudaMemPoolProps::handleTypes"]
13439 [::std::mem::offset_of!(cudaMemPoolProps, handleTypes) - 4usize];
13440 ["Offset of field: cudaMemPoolProps::location"]
13441 [::std::mem::offset_of!(cudaMemPoolProps, location) - 8usize];
13442 ["Offset of field: cudaMemPoolProps::win32SecurityAttributes"]
13443 [::std::mem::offset_of!(cudaMemPoolProps, win32SecurityAttributes) - 16usize];
13444 ["Offset of field: cudaMemPoolProps::maxSize"]
13445 [::std::mem::offset_of!(cudaMemPoolProps, maxSize) - 24usize];
13446 ["Offset of field: cudaMemPoolProps::usage"]
13447 [::std::mem::offset_of!(cudaMemPoolProps, usage) - 32usize];
13448 ["Offset of field: cudaMemPoolProps::reserved"]
13449 [::std::mem::offset_of!(cudaMemPoolProps, reserved) - 34usize];
13450};
13451#[doc = " Opaque data for exporting a pool allocation"]
13452#[repr(C)]
13453#[derive(Debug, Copy, Clone)]
13454pub struct cudaMemPoolPtrExportData {
13455 pub reserved: [::std::os::raw::c_uchar; 64usize],
13456}
13457#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13458const _: () = {
13459 ["Size of cudaMemPoolPtrExportData"]
13460 [::std::mem::size_of::<cudaMemPoolPtrExportData>() - 64usize];
13461 ["Alignment of cudaMemPoolPtrExportData"]
13462 [::std::mem::align_of::<cudaMemPoolPtrExportData>() - 1usize];
13463 ["Offset of field: cudaMemPoolPtrExportData::reserved"]
13464 [::std::mem::offset_of!(cudaMemPoolPtrExportData, reserved) - 0usize];
13465};
13466#[doc = " Memory allocation node parameters"]
13467#[repr(C)]
13468#[derive(Debug, Copy, Clone)]
13469pub struct cudaMemAllocNodeParams {
13470 #[doc = "< in: array of memory access descriptors. Used to describe peer GPU access"]
13471 pub poolProps: cudaMemPoolProps,
13472 #[doc = "< in: number of memory access descriptors. Must not exceed the number of GPUs."]
13473 pub accessDescs: *const cudaMemAccessDesc,
13474 #[doc = "< in: Number of `accessDescs`s"]
13475 pub accessDescCount: usize,
13476 #[doc = "< in: size in bytes of the requested allocation"]
13477 pub bytesize: usize,
13478 #[doc = "< out: address of the allocation returned by CUDA"]
13479 pub dptr: *mut ::std::os::raw::c_void,
13480}
13481#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13482const _: () = {
13483 ["Size of cudaMemAllocNodeParams"][::std::mem::size_of::<cudaMemAllocNodeParams>() - 120usize];
13484 ["Alignment of cudaMemAllocNodeParams"]
13485 [::std::mem::align_of::<cudaMemAllocNodeParams>() - 8usize];
13486 ["Offset of field: cudaMemAllocNodeParams::poolProps"]
13487 [::std::mem::offset_of!(cudaMemAllocNodeParams, poolProps) - 0usize];
13488 ["Offset of field: cudaMemAllocNodeParams::accessDescs"]
13489 [::std::mem::offset_of!(cudaMemAllocNodeParams, accessDescs) - 88usize];
13490 ["Offset of field: cudaMemAllocNodeParams::accessDescCount"]
13491 [::std::mem::offset_of!(cudaMemAllocNodeParams, accessDescCount) - 96usize];
13492 ["Offset of field: cudaMemAllocNodeParams::bytesize"]
13493 [::std::mem::offset_of!(cudaMemAllocNodeParams, bytesize) - 104usize];
13494 ["Offset of field: cudaMemAllocNodeParams::dptr"]
13495 [::std::mem::offset_of!(cudaMemAllocNodeParams, dptr) - 112usize];
13496};
13497#[doc = " Memory allocation node parameters"]
13498#[repr(C)]
13499#[derive(Debug, Copy, Clone)]
13500pub struct cudaMemAllocNodeParamsV2 {
13501 #[doc = "< in: array of memory access descriptors. Used to describe peer GPU access"]
13502 pub poolProps: cudaMemPoolProps,
13503 #[doc = "< in: number of memory access descriptors. Must not exceed the number of GPUs."]
13504 pub accessDescs: *const cudaMemAccessDesc,
13505 #[doc = "< in: Number of `accessDescs`s"]
13506 pub accessDescCount: usize,
13507 #[doc = "< in: size in bytes of the requested allocation"]
13508 pub bytesize: usize,
13509 #[doc = "< out: address of the allocation returned by CUDA"]
13510 pub dptr: *mut ::std::os::raw::c_void,
13511}
13512#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13513const _: () = {
13514 ["Size of cudaMemAllocNodeParamsV2"]
13515 [::std::mem::size_of::<cudaMemAllocNodeParamsV2>() - 120usize];
13516 ["Alignment of cudaMemAllocNodeParamsV2"]
13517 [::std::mem::align_of::<cudaMemAllocNodeParamsV2>() - 8usize];
13518 ["Offset of field: cudaMemAllocNodeParamsV2::poolProps"]
13519 [::std::mem::offset_of!(cudaMemAllocNodeParamsV2, poolProps) - 0usize];
13520 ["Offset of field: cudaMemAllocNodeParamsV2::accessDescs"]
13521 [::std::mem::offset_of!(cudaMemAllocNodeParamsV2, accessDescs) - 88usize];
13522 ["Offset of field: cudaMemAllocNodeParamsV2::accessDescCount"]
13523 [::std::mem::offset_of!(cudaMemAllocNodeParamsV2, accessDescCount) - 96usize];
13524 ["Offset of field: cudaMemAllocNodeParamsV2::bytesize"]
13525 [::std::mem::offset_of!(cudaMemAllocNodeParamsV2, bytesize) - 104usize];
13526 ["Offset of field: cudaMemAllocNodeParamsV2::dptr"]
13527 [::std::mem::offset_of!(cudaMemAllocNodeParamsV2, dptr) - 112usize];
13528};
13529#[doc = " Memory free node parameters"]
13530#[repr(C)]
13531#[derive(Debug, Copy, Clone)]
13532pub struct cudaMemFreeNodeParams {
13533 #[doc = "< in: the pointer to free"]
13534 pub dptr: *mut ::std::os::raw::c_void,
13535}
13536#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13537const _: () = {
13538 ["Size of cudaMemFreeNodeParams"][::std::mem::size_of::<cudaMemFreeNodeParams>() - 8usize];
13539 ["Alignment of cudaMemFreeNodeParams"]
13540 [::std::mem::align_of::<cudaMemFreeNodeParams>() - 8usize];
13541 ["Offset of field: cudaMemFreeNodeParams::dptr"]
13542 [::std::mem::offset_of!(cudaMemFreeNodeParams, dptr) - 0usize];
13543};
13544impl cudaGraphMemAttributeType {
13545 #[doc = " (value type = cuuint64_t)\n Amount of memory, in bytes, currently associated with graphs."]
13546 pub const cudaGraphMemAttrUsedMemCurrent: cudaGraphMemAttributeType =
13547 cudaGraphMemAttributeType(0);
13548}
13549impl cudaGraphMemAttributeType {
13550 #[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."]
13551 pub const cudaGraphMemAttrUsedMemHigh: cudaGraphMemAttributeType = cudaGraphMemAttributeType(1);
13552}
13553impl cudaGraphMemAttributeType {
13554 #[doc = " (value type = cuuint64_t)\n Amount of memory, in bytes, currently allocated for use by\n the CUDA graphs asynchronous allocator."]
13555 pub const cudaGraphMemAttrReservedMemCurrent: cudaGraphMemAttributeType =
13556 cudaGraphMemAttributeType(2);
13557}
13558impl cudaGraphMemAttributeType {
13559 #[doc = " (value type = cuuint64_t)\n High watermark of memory, in bytes, currently allocated for use by\n the CUDA graphs asynchronous allocator."]
13560 pub const cudaGraphMemAttrReservedMemHigh: cudaGraphMemAttributeType =
13561 cudaGraphMemAttributeType(3);
13562}
13563#[repr(transparent)]
13564#[doc = " Graph memory attributes"]
13565#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
13566pub struct cudaGraphMemAttributeType(pub ::std::os::raw::c_uint);
13567impl cudaDeviceP2PAttr {
13568 #[doc = "< A relative value indicating the performance of the link between two devices"]
13569 pub const cudaDevP2PAttrPerformanceRank: cudaDeviceP2PAttr = cudaDeviceP2PAttr(1);
13570}
13571impl cudaDeviceP2PAttr {
13572 #[doc = "< Peer access is enabled"]
13573 pub const cudaDevP2PAttrAccessSupported: cudaDeviceP2PAttr = cudaDeviceP2PAttr(2);
13574}
13575impl cudaDeviceP2PAttr {
13576 #[doc = "< Native atomic operation over the link supported"]
13577 pub const cudaDevP2PAttrNativeAtomicSupported: cudaDeviceP2PAttr = cudaDeviceP2PAttr(3);
13578}
13579impl cudaDeviceP2PAttr {
13580 #[doc = "< Accessing CUDA arrays over the link supported"]
13581 pub const cudaDevP2PAttrCudaArrayAccessSupported: cudaDeviceP2PAttr = cudaDeviceP2PAttr(4);
13582}
13583#[repr(transparent)]
13584#[doc = " CUDA device P2P attributes"]
13585#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
13586pub struct cudaDeviceP2PAttr(pub ::std::os::raw::c_uint);
13587pub type cudaUUID_t = CUuuid_st;
13588#[doc = " CUDA device properties"]
13589#[repr(C)]
13590#[derive(Debug, Copy, Clone)]
13591pub struct cudaDeviceProp {
13592 #[doc = "< ASCII string identifying device"]
13593 pub name: [::std::os::raw::c_char; 256usize],
13594 #[doc = "< 16-byte unique identifier"]
13595 pub uuid: cudaUUID_t,
13596 #[doc = "< 8-byte locally unique identifier. Value is undefined on TCC and non-Windows platforms"]
13597 pub luid: [::std::os::raw::c_char; 8usize],
13598 #[doc = "< LUID device node mask. Value is undefined on TCC and non-Windows platforms"]
13599 pub luidDeviceNodeMask: ::std::os::raw::c_uint,
13600 #[doc = "< Global memory available on device in bytes"]
13601 pub totalGlobalMem: usize,
13602 #[doc = "< Shared memory available per block in bytes"]
13603 pub sharedMemPerBlock: usize,
13604 #[doc = "< 32-bit registers available per block"]
13605 pub regsPerBlock: ::std::os::raw::c_int,
13606 #[doc = "< Warp size in threads"]
13607 pub warpSize: ::std::os::raw::c_int,
13608 #[doc = "< Maximum pitch in bytes allowed by memory copies"]
13609 pub memPitch: usize,
13610 #[doc = "< Maximum number of threads per block"]
13611 pub maxThreadsPerBlock: ::std::os::raw::c_int,
13612 #[doc = "< Maximum size of each dimension of a block"]
13613 pub maxThreadsDim: [::std::os::raw::c_int; 3usize],
13614 #[doc = "< Maximum size of each dimension of a grid"]
13615 pub maxGridSize: [::std::os::raw::c_int; 3usize],
13616 #[doc = "< Deprecated, Clock frequency in kilohertz"]
13617 pub clockRate: ::std::os::raw::c_int,
13618 #[doc = "< Constant memory available on device in bytes"]
13619 pub totalConstMem: usize,
13620 #[doc = "< Major compute capability"]
13621 pub major: ::std::os::raw::c_int,
13622 #[doc = "< Minor compute capability"]
13623 pub minor: ::std::os::raw::c_int,
13624 #[doc = "< Alignment requirement for textures"]
13625 pub textureAlignment: usize,
13626 #[doc = "< Pitch alignment requirement for texture references bound to pitched memory"]
13627 pub texturePitchAlignment: usize,
13628 #[doc = "< Device can concurrently copy memory and execute a kernel. Deprecated. Use instead asyncEngineCount."]
13629 pub deviceOverlap: ::std::os::raw::c_int,
13630 #[doc = "< Number of multiprocessors on device"]
13631 pub multiProcessorCount: ::std::os::raw::c_int,
13632 #[doc = "< Deprecated, Specified whether there is a run time limit on kernels"]
13633 pub kernelExecTimeoutEnabled: ::std::os::raw::c_int,
13634 #[doc = "< Device is integrated as opposed to discrete"]
13635 pub integrated: ::std::os::raw::c_int,
13636 #[doc = "< Device can map host memory with cudaHostAlloc/cudaHostGetDevicePointer"]
13637 pub canMapHostMemory: ::std::os::raw::c_int,
13638 #[doc = "< Deprecated, Compute mode (See ::cudaComputeMode)"]
13639 pub computeMode: ::std::os::raw::c_int,
13640 #[doc = "< Maximum 1D texture size"]
13641 pub maxTexture1D: ::std::os::raw::c_int,
13642 #[doc = "< Maximum 1D mipmapped texture size"]
13643 pub maxTexture1DMipmap: ::std::os::raw::c_int,
13644 #[doc = "< Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() or cuDeviceGetTexture1DLinearMaxWidth() instead."]
13645 pub maxTexture1DLinear: ::std::os::raw::c_int,
13646 #[doc = "< Maximum 2D texture dimensions"]
13647 pub maxTexture2D: [::std::os::raw::c_int; 2usize],
13648 #[doc = "< Maximum 2D mipmapped texture dimensions"]
13649 pub maxTexture2DMipmap: [::std::os::raw::c_int; 2usize],
13650 #[doc = "< Maximum dimensions (width, height, pitch) for 2D textures bound to pitched memory"]
13651 pub maxTexture2DLinear: [::std::os::raw::c_int; 3usize],
13652 #[doc = "< Maximum 2D texture dimensions if texture gather operations have to be performed"]
13653 pub maxTexture2DGather: [::std::os::raw::c_int; 2usize],
13654 #[doc = "< Maximum 3D texture dimensions"]
13655 pub maxTexture3D: [::std::os::raw::c_int; 3usize],
13656 #[doc = "< Maximum alternate 3D texture dimensions"]
13657 pub maxTexture3DAlt: [::std::os::raw::c_int; 3usize],
13658 #[doc = "< Maximum Cubemap texture dimensions"]
13659 pub maxTextureCubemap: ::std::os::raw::c_int,
13660 #[doc = "< Maximum 1D layered texture dimensions"]
13661 pub maxTexture1DLayered: [::std::os::raw::c_int; 2usize],
13662 #[doc = "< Maximum 2D layered texture dimensions"]
13663 pub maxTexture2DLayered: [::std::os::raw::c_int; 3usize],
13664 #[doc = "< Maximum Cubemap layered texture dimensions"]
13665 pub maxTextureCubemapLayered: [::std::os::raw::c_int; 2usize],
13666 #[doc = "< Maximum 1D surface size"]
13667 pub maxSurface1D: ::std::os::raw::c_int,
13668 #[doc = "< Maximum 2D surface dimensions"]
13669 pub maxSurface2D: [::std::os::raw::c_int; 2usize],
13670 #[doc = "< Maximum 3D surface dimensions"]
13671 pub maxSurface3D: [::std::os::raw::c_int; 3usize],
13672 #[doc = "< Maximum 1D layered surface dimensions"]
13673 pub maxSurface1DLayered: [::std::os::raw::c_int; 2usize],
13674 #[doc = "< Maximum 2D layered surface dimensions"]
13675 pub maxSurface2DLayered: [::std::os::raw::c_int; 3usize],
13676 #[doc = "< Maximum Cubemap surface dimensions"]
13677 pub maxSurfaceCubemap: ::std::os::raw::c_int,
13678 #[doc = "< Maximum Cubemap layered surface dimensions"]
13679 pub maxSurfaceCubemapLayered: [::std::os::raw::c_int; 2usize],
13680 #[doc = "< Alignment requirements for surfaces"]
13681 pub surfaceAlignment: usize,
13682 #[doc = "< Device can possibly execute multiple kernels concurrently"]
13683 pub concurrentKernels: ::std::os::raw::c_int,
13684 #[doc = "< Device has ECC support enabled"]
13685 pub ECCEnabled: ::std::os::raw::c_int,
13686 #[doc = "< PCI bus ID of the device"]
13687 pub pciBusID: ::std::os::raw::c_int,
13688 #[doc = "< PCI device ID of the device"]
13689 pub pciDeviceID: ::std::os::raw::c_int,
13690 #[doc = "< PCI domain ID of the device"]
13691 pub pciDomainID: ::std::os::raw::c_int,
13692 #[doc = "< 1 if device is a Tesla device using TCC driver, 0 otherwise"]
13693 pub tccDriver: ::std::os::raw::c_int,
13694 #[doc = "< Number of asynchronous engines"]
13695 pub asyncEngineCount: ::std::os::raw::c_int,
13696 #[doc = "< Device shares a unified address space with the host"]
13697 pub unifiedAddressing: ::std::os::raw::c_int,
13698 #[doc = "< Deprecated, Peak memory clock frequency in kilohertz"]
13699 pub memoryClockRate: ::std::os::raw::c_int,
13700 #[doc = "< Global memory bus width in bits"]
13701 pub memoryBusWidth: ::std::os::raw::c_int,
13702 #[doc = "< Size of L2 cache in bytes"]
13703 pub l2CacheSize: ::std::os::raw::c_int,
13704 #[doc = "< Device's maximum l2 persisting lines capacity setting in bytes"]
13705 pub persistingL2CacheMaxSize: ::std::os::raw::c_int,
13706 #[doc = "< Maximum resident threads per multiprocessor"]
13707 pub maxThreadsPerMultiProcessor: ::std::os::raw::c_int,
13708 #[doc = "< Device supports stream priorities"]
13709 pub streamPrioritiesSupported: ::std::os::raw::c_int,
13710 #[doc = "< Device supports caching globals in L1"]
13711 pub globalL1CacheSupported: ::std::os::raw::c_int,
13712 #[doc = "< Device supports caching locals in L1"]
13713 pub localL1CacheSupported: ::std::os::raw::c_int,
13714 #[doc = "< Shared memory available per multiprocessor in bytes"]
13715 pub sharedMemPerMultiprocessor: usize,
13716 #[doc = "< 32-bit registers available per multiprocessor"]
13717 pub regsPerMultiprocessor: ::std::os::raw::c_int,
13718 #[doc = "< Device supports allocating managed memory on this system"]
13719 pub managedMemory: ::std::os::raw::c_int,
13720 #[doc = "< Device is on a multi-GPU board"]
13721 pub isMultiGpuBoard: ::std::os::raw::c_int,
13722 #[doc = "< Unique identifier for a group of devices on the same multi-GPU board"]
13723 pub multiGpuBoardGroupID: ::std::os::raw::c_int,
13724 #[doc = "< Link between the device and the host supports native atomic operations"]
13725 pub hostNativeAtomicSupported: ::std::os::raw::c_int,
13726 #[doc = "< Deprecated, Ratio of single precision performance (in floating-point operations per second) to double precision performance"]
13727 pub singleToDoublePrecisionPerfRatio: ::std::os::raw::c_int,
13728 #[doc = "< Device supports coherently accessing pageable memory without calling cudaHostRegister on it"]
13729 pub pageableMemoryAccess: ::std::os::raw::c_int,
13730 #[doc = "< Device can coherently access managed memory concurrently with the CPU"]
13731 pub concurrentManagedAccess: ::std::os::raw::c_int,
13732 #[doc = "< Device supports Compute Preemption"]
13733 pub computePreemptionSupported: ::std::os::raw::c_int,
13734 #[doc = "< Device can access host registered memory at the same virtual address as the CPU"]
13735 pub canUseHostPointerForRegisteredMem: ::std::os::raw::c_int,
13736 #[doc = "< Device supports launching cooperative kernels via ::cudaLaunchCooperativeKernel"]
13737 pub cooperativeLaunch: ::std::os::raw::c_int,
13738 #[doc = "< Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated."]
13739 pub cooperativeMultiDeviceLaunch: ::std::os::raw::c_int,
13740 #[doc = "< Per device maximum shared memory per block usable by special opt in"]
13741 pub sharedMemPerBlockOptin: usize,
13742 #[doc = "< Device accesses pageable memory via the host's page tables"]
13743 pub pageableMemoryAccessUsesHostPageTables: ::std::os::raw::c_int,
13744 #[doc = "< Host can directly access managed memory on the device without migration."]
13745 pub directManagedMemAccessFromHost: ::std::os::raw::c_int,
13746 #[doc = "< Maximum number of resident blocks per multiprocessor"]
13747 pub maxBlocksPerMultiProcessor: ::std::os::raw::c_int,
13748 #[doc = "< The maximum value of ::cudaAccessPolicyWindow::num_bytes."]
13749 pub accessPolicyMaxWindowSize: ::std::os::raw::c_int,
13750 #[doc = "< Shared memory reserved by CUDA driver per block in bytes"]
13751 pub reservedSharedMemPerBlock: usize,
13752 #[doc = "< Device supports host memory registration via ::cudaHostRegister."]
13753 pub hostRegisterSupported: ::std::os::raw::c_int,
13754 #[doc = "< 1 if the device supports sparse CUDA arrays and sparse CUDA mipmapped arrays, 0 otherwise"]
13755 pub sparseCudaArraySupported: ::std::os::raw::c_int,
13756 #[doc = "< Device supports using the ::cudaHostRegister flag cudaHostRegisterReadOnly to register memory that must be mapped as read-only to the GPU"]
13757 pub hostRegisterReadOnlySupported: ::std::os::raw::c_int,
13758 #[doc = "< External timeline semaphore interop is supported on the device"]
13759 pub timelineSemaphoreInteropSupported: ::std::os::raw::c_int,
13760 #[doc = "< 1 if the device supports using the cudaMallocAsync and cudaMemPool family of APIs, 0 otherwise"]
13761 pub memoryPoolsSupported: ::std::os::raw::c_int,
13762 #[doc = "< 1 if the device supports GPUDirect RDMA APIs, 0 otherwise"]
13763 pub gpuDirectRDMASupported: ::std::os::raw::c_int,
13764 #[doc = "< Bitmask to be interpreted according to the ::cudaFlushGPUDirectRDMAWritesOptions enum"]
13765 pub gpuDirectRDMAFlushWritesOptions: ::std::os::raw::c_uint,
13766 #[doc = "< See the ::cudaGPUDirectRDMAWritesOrdering enum for numerical values"]
13767 pub gpuDirectRDMAWritesOrdering: ::std::os::raw::c_int,
13768 #[doc = "< Bitmask of handle types supported with mempool-based IPC"]
13769 pub memoryPoolSupportedHandleTypes: ::std::os::raw::c_uint,
13770 #[doc = "< 1 if the device supports deferred mapping CUDA arrays and CUDA mipmapped arrays"]
13771 pub deferredMappingCudaArraySupported: ::std::os::raw::c_int,
13772 #[doc = "< Device supports IPC Events."]
13773 pub ipcEventSupported: ::std::os::raw::c_int,
13774 #[doc = "< Indicates device supports cluster launch"]
13775 pub clusterLaunch: ::std::os::raw::c_int,
13776 #[doc = "< Indicates device supports unified pointers"]
13777 pub unifiedFunctionPointers: ::std::os::raw::c_int,
13778 pub reserved2: [::std::os::raw::c_int; 2usize],
13779 #[doc = "< Reserved for future use"]
13780 pub reserved1: [::std::os::raw::c_int; 1usize],
13781 #[doc = "< Reserved for future use"]
13782 pub reserved: [::std::os::raw::c_int; 60usize],
13783}
13784#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13785const _: () = {
13786 ["Size of cudaDeviceProp"][::std::mem::size_of::<cudaDeviceProp>() - 1032usize];
13787 ["Alignment of cudaDeviceProp"][::std::mem::align_of::<cudaDeviceProp>() - 8usize];
13788 ["Offset of field: cudaDeviceProp::name"]
13789 [::std::mem::offset_of!(cudaDeviceProp, name) - 0usize];
13790 ["Offset of field: cudaDeviceProp::uuid"]
13791 [::std::mem::offset_of!(cudaDeviceProp, uuid) - 256usize];
13792 ["Offset of field: cudaDeviceProp::luid"]
13793 [::std::mem::offset_of!(cudaDeviceProp, luid) - 272usize];
13794 ["Offset of field: cudaDeviceProp::luidDeviceNodeMask"]
13795 [::std::mem::offset_of!(cudaDeviceProp, luidDeviceNodeMask) - 280usize];
13796 ["Offset of field: cudaDeviceProp::totalGlobalMem"]
13797 [::std::mem::offset_of!(cudaDeviceProp, totalGlobalMem) - 288usize];
13798 ["Offset of field: cudaDeviceProp::sharedMemPerBlock"]
13799 [::std::mem::offset_of!(cudaDeviceProp, sharedMemPerBlock) - 296usize];
13800 ["Offset of field: cudaDeviceProp::regsPerBlock"]
13801 [::std::mem::offset_of!(cudaDeviceProp, regsPerBlock) - 304usize];
13802 ["Offset of field: cudaDeviceProp::warpSize"]
13803 [::std::mem::offset_of!(cudaDeviceProp, warpSize) - 308usize];
13804 ["Offset of field: cudaDeviceProp::memPitch"]
13805 [::std::mem::offset_of!(cudaDeviceProp, memPitch) - 312usize];
13806 ["Offset of field: cudaDeviceProp::maxThreadsPerBlock"]
13807 [::std::mem::offset_of!(cudaDeviceProp, maxThreadsPerBlock) - 320usize];
13808 ["Offset of field: cudaDeviceProp::maxThreadsDim"]
13809 [::std::mem::offset_of!(cudaDeviceProp, maxThreadsDim) - 324usize];
13810 ["Offset of field: cudaDeviceProp::maxGridSize"]
13811 [::std::mem::offset_of!(cudaDeviceProp, maxGridSize) - 336usize];
13812 ["Offset of field: cudaDeviceProp::clockRate"]
13813 [::std::mem::offset_of!(cudaDeviceProp, clockRate) - 348usize];
13814 ["Offset of field: cudaDeviceProp::totalConstMem"]
13815 [::std::mem::offset_of!(cudaDeviceProp, totalConstMem) - 352usize];
13816 ["Offset of field: cudaDeviceProp::major"]
13817 [::std::mem::offset_of!(cudaDeviceProp, major) - 360usize];
13818 ["Offset of field: cudaDeviceProp::minor"]
13819 [::std::mem::offset_of!(cudaDeviceProp, minor) - 364usize];
13820 ["Offset of field: cudaDeviceProp::textureAlignment"]
13821 [::std::mem::offset_of!(cudaDeviceProp, textureAlignment) - 368usize];
13822 ["Offset of field: cudaDeviceProp::texturePitchAlignment"]
13823 [::std::mem::offset_of!(cudaDeviceProp, texturePitchAlignment) - 376usize];
13824 ["Offset of field: cudaDeviceProp::deviceOverlap"]
13825 [::std::mem::offset_of!(cudaDeviceProp, deviceOverlap) - 384usize];
13826 ["Offset of field: cudaDeviceProp::multiProcessorCount"]
13827 [::std::mem::offset_of!(cudaDeviceProp, multiProcessorCount) - 388usize];
13828 ["Offset of field: cudaDeviceProp::kernelExecTimeoutEnabled"]
13829 [::std::mem::offset_of!(cudaDeviceProp, kernelExecTimeoutEnabled) - 392usize];
13830 ["Offset of field: cudaDeviceProp::integrated"]
13831 [::std::mem::offset_of!(cudaDeviceProp, integrated) - 396usize];
13832 ["Offset of field: cudaDeviceProp::canMapHostMemory"]
13833 [::std::mem::offset_of!(cudaDeviceProp, canMapHostMemory) - 400usize];
13834 ["Offset of field: cudaDeviceProp::computeMode"]
13835 [::std::mem::offset_of!(cudaDeviceProp, computeMode) - 404usize];
13836 ["Offset of field: cudaDeviceProp::maxTexture1D"]
13837 [::std::mem::offset_of!(cudaDeviceProp, maxTexture1D) - 408usize];
13838 ["Offset of field: cudaDeviceProp::maxTexture1DMipmap"]
13839 [::std::mem::offset_of!(cudaDeviceProp, maxTexture1DMipmap) - 412usize];
13840 ["Offset of field: cudaDeviceProp::maxTexture1DLinear"]
13841 [::std::mem::offset_of!(cudaDeviceProp, maxTexture1DLinear) - 416usize];
13842 ["Offset of field: cudaDeviceProp::maxTexture2D"]
13843 [::std::mem::offset_of!(cudaDeviceProp, maxTexture2D) - 420usize];
13844 ["Offset of field: cudaDeviceProp::maxTexture2DMipmap"]
13845 [::std::mem::offset_of!(cudaDeviceProp, maxTexture2DMipmap) - 428usize];
13846 ["Offset of field: cudaDeviceProp::maxTexture2DLinear"]
13847 [::std::mem::offset_of!(cudaDeviceProp, maxTexture2DLinear) - 436usize];
13848 ["Offset of field: cudaDeviceProp::maxTexture2DGather"]
13849 [::std::mem::offset_of!(cudaDeviceProp, maxTexture2DGather) - 448usize];
13850 ["Offset of field: cudaDeviceProp::maxTexture3D"]
13851 [::std::mem::offset_of!(cudaDeviceProp, maxTexture3D) - 456usize];
13852 ["Offset of field: cudaDeviceProp::maxTexture3DAlt"]
13853 [::std::mem::offset_of!(cudaDeviceProp, maxTexture3DAlt) - 468usize];
13854 ["Offset of field: cudaDeviceProp::maxTextureCubemap"]
13855 [::std::mem::offset_of!(cudaDeviceProp, maxTextureCubemap) - 480usize];
13856 ["Offset of field: cudaDeviceProp::maxTexture1DLayered"]
13857 [::std::mem::offset_of!(cudaDeviceProp, maxTexture1DLayered) - 484usize];
13858 ["Offset of field: cudaDeviceProp::maxTexture2DLayered"]
13859 [::std::mem::offset_of!(cudaDeviceProp, maxTexture2DLayered) - 492usize];
13860 ["Offset of field: cudaDeviceProp::maxTextureCubemapLayered"]
13861 [::std::mem::offset_of!(cudaDeviceProp, maxTextureCubemapLayered) - 504usize];
13862 ["Offset of field: cudaDeviceProp::maxSurface1D"]
13863 [::std::mem::offset_of!(cudaDeviceProp, maxSurface1D) - 512usize];
13864 ["Offset of field: cudaDeviceProp::maxSurface2D"]
13865 [::std::mem::offset_of!(cudaDeviceProp, maxSurface2D) - 516usize];
13866 ["Offset of field: cudaDeviceProp::maxSurface3D"]
13867 [::std::mem::offset_of!(cudaDeviceProp, maxSurface3D) - 524usize];
13868 ["Offset of field: cudaDeviceProp::maxSurface1DLayered"]
13869 [::std::mem::offset_of!(cudaDeviceProp, maxSurface1DLayered) - 536usize];
13870 ["Offset of field: cudaDeviceProp::maxSurface2DLayered"]
13871 [::std::mem::offset_of!(cudaDeviceProp, maxSurface2DLayered) - 544usize];
13872 ["Offset of field: cudaDeviceProp::maxSurfaceCubemap"]
13873 [::std::mem::offset_of!(cudaDeviceProp, maxSurfaceCubemap) - 556usize];
13874 ["Offset of field: cudaDeviceProp::maxSurfaceCubemapLayered"]
13875 [::std::mem::offset_of!(cudaDeviceProp, maxSurfaceCubemapLayered) - 560usize];
13876 ["Offset of field: cudaDeviceProp::surfaceAlignment"]
13877 [::std::mem::offset_of!(cudaDeviceProp, surfaceAlignment) - 568usize];
13878 ["Offset of field: cudaDeviceProp::concurrentKernels"]
13879 [::std::mem::offset_of!(cudaDeviceProp, concurrentKernels) - 576usize];
13880 ["Offset of field: cudaDeviceProp::ECCEnabled"]
13881 [::std::mem::offset_of!(cudaDeviceProp, ECCEnabled) - 580usize];
13882 ["Offset of field: cudaDeviceProp::pciBusID"]
13883 [::std::mem::offset_of!(cudaDeviceProp, pciBusID) - 584usize];
13884 ["Offset of field: cudaDeviceProp::pciDeviceID"]
13885 [::std::mem::offset_of!(cudaDeviceProp, pciDeviceID) - 588usize];
13886 ["Offset of field: cudaDeviceProp::pciDomainID"]
13887 [::std::mem::offset_of!(cudaDeviceProp, pciDomainID) - 592usize];
13888 ["Offset of field: cudaDeviceProp::tccDriver"]
13889 [::std::mem::offset_of!(cudaDeviceProp, tccDriver) - 596usize];
13890 ["Offset of field: cudaDeviceProp::asyncEngineCount"]
13891 [::std::mem::offset_of!(cudaDeviceProp, asyncEngineCount) - 600usize];
13892 ["Offset of field: cudaDeviceProp::unifiedAddressing"]
13893 [::std::mem::offset_of!(cudaDeviceProp, unifiedAddressing) - 604usize];
13894 ["Offset of field: cudaDeviceProp::memoryClockRate"]
13895 [::std::mem::offset_of!(cudaDeviceProp, memoryClockRate) - 608usize];
13896 ["Offset of field: cudaDeviceProp::memoryBusWidth"]
13897 [::std::mem::offset_of!(cudaDeviceProp, memoryBusWidth) - 612usize];
13898 ["Offset of field: cudaDeviceProp::l2CacheSize"]
13899 [::std::mem::offset_of!(cudaDeviceProp, l2CacheSize) - 616usize];
13900 ["Offset of field: cudaDeviceProp::persistingL2CacheMaxSize"]
13901 [::std::mem::offset_of!(cudaDeviceProp, persistingL2CacheMaxSize) - 620usize];
13902 ["Offset of field: cudaDeviceProp::maxThreadsPerMultiProcessor"]
13903 [::std::mem::offset_of!(cudaDeviceProp, maxThreadsPerMultiProcessor) - 624usize];
13904 ["Offset of field: cudaDeviceProp::streamPrioritiesSupported"]
13905 [::std::mem::offset_of!(cudaDeviceProp, streamPrioritiesSupported) - 628usize];
13906 ["Offset of field: cudaDeviceProp::globalL1CacheSupported"]
13907 [::std::mem::offset_of!(cudaDeviceProp, globalL1CacheSupported) - 632usize];
13908 ["Offset of field: cudaDeviceProp::localL1CacheSupported"]
13909 [::std::mem::offset_of!(cudaDeviceProp, localL1CacheSupported) - 636usize];
13910 ["Offset of field: cudaDeviceProp::sharedMemPerMultiprocessor"]
13911 [::std::mem::offset_of!(cudaDeviceProp, sharedMemPerMultiprocessor) - 640usize];
13912 ["Offset of field: cudaDeviceProp::regsPerMultiprocessor"]
13913 [::std::mem::offset_of!(cudaDeviceProp, regsPerMultiprocessor) - 648usize];
13914 ["Offset of field: cudaDeviceProp::managedMemory"]
13915 [::std::mem::offset_of!(cudaDeviceProp, managedMemory) - 652usize];
13916 ["Offset of field: cudaDeviceProp::isMultiGpuBoard"]
13917 [::std::mem::offset_of!(cudaDeviceProp, isMultiGpuBoard) - 656usize];
13918 ["Offset of field: cudaDeviceProp::multiGpuBoardGroupID"]
13919 [::std::mem::offset_of!(cudaDeviceProp, multiGpuBoardGroupID) - 660usize];
13920 ["Offset of field: cudaDeviceProp::hostNativeAtomicSupported"]
13921 [::std::mem::offset_of!(cudaDeviceProp, hostNativeAtomicSupported) - 664usize];
13922 ["Offset of field: cudaDeviceProp::singleToDoublePrecisionPerfRatio"]
13923 [::std::mem::offset_of!(cudaDeviceProp, singleToDoublePrecisionPerfRatio) - 668usize];
13924 ["Offset of field: cudaDeviceProp::pageableMemoryAccess"]
13925 [::std::mem::offset_of!(cudaDeviceProp, pageableMemoryAccess) - 672usize];
13926 ["Offset of field: cudaDeviceProp::concurrentManagedAccess"]
13927 [::std::mem::offset_of!(cudaDeviceProp, concurrentManagedAccess) - 676usize];
13928 ["Offset of field: cudaDeviceProp::computePreemptionSupported"]
13929 [::std::mem::offset_of!(cudaDeviceProp, computePreemptionSupported) - 680usize];
13930 ["Offset of field: cudaDeviceProp::canUseHostPointerForRegisteredMem"]
13931 [::std::mem::offset_of!(cudaDeviceProp, canUseHostPointerForRegisteredMem) - 684usize];
13932 ["Offset of field: cudaDeviceProp::cooperativeLaunch"]
13933 [::std::mem::offset_of!(cudaDeviceProp, cooperativeLaunch) - 688usize];
13934 ["Offset of field: cudaDeviceProp::cooperativeMultiDeviceLaunch"]
13935 [::std::mem::offset_of!(cudaDeviceProp, cooperativeMultiDeviceLaunch) - 692usize];
13936 ["Offset of field: cudaDeviceProp::sharedMemPerBlockOptin"]
13937 [::std::mem::offset_of!(cudaDeviceProp, sharedMemPerBlockOptin) - 696usize];
13938 ["Offset of field: cudaDeviceProp::pageableMemoryAccessUsesHostPageTables"]
13939 [::std::mem::offset_of!(cudaDeviceProp, pageableMemoryAccessUsesHostPageTables) - 704usize];
13940 ["Offset of field: cudaDeviceProp::directManagedMemAccessFromHost"]
13941 [::std::mem::offset_of!(cudaDeviceProp, directManagedMemAccessFromHost) - 708usize];
13942 ["Offset of field: cudaDeviceProp::maxBlocksPerMultiProcessor"]
13943 [::std::mem::offset_of!(cudaDeviceProp, maxBlocksPerMultiProcessor) - 712usize];
13944 ["Offset of field: cudaDeviceProp::accessPolicyMaxWindowSize"]
13945 [::std::mem::offset_of!(cudaDeviceProp, accessPolicyMaxWindowSize) - 716usize];
13946 ["Offset of field: cudaDeviceProp::reservedSharedMemPerBlock"]
13947 [::std::mem::offset_of!(cudaDeviceProp, reservedSharedMemPerBlock) - 720usize];
13948 ["Offset of field: cudaDeviceProp::hostRegisterSupported"]
13949 [::std::mem::offset_of!(cudaDeviceProp, hostRegisterSupported) - 728usize];
13950 ["Offset of field: cudaDeviceProp::sparseCudaArraySupported"]
13951 [::std::mem::offset_of!(cudaDeviceProp, sparseCudaArraySupported) - 732usize];
13952 ["Offset of field: cudaDeviceProp::hostRegisterReadOnlySupported"]
13953 [::std::mem::offset_of!(cudaDeviceProp, hostRegisterReadOnlySupported) - 736usize];
13954 ["Offset of field: cudaDeviceProp::timelineSemaphoreInteropSupported"]
13955 [::std::mem::offset_of!(cudaDeviceProp, timelineSemaphoreInteropSupported) - 740usize];
13956 ["Offset of field: cudaDeviceProp::memoryPoolsSupported"]
13957 [::std::mem::offset_of!(cudaDeviceProp, memoryPoolsSupported) - 744usize];
13958 ["Offset of field: cudaDeviceProp::gpuDirectRDMASupported"]
13959 [::std::mem::offset_of!(cudaDeviceProp, gpuDirectRDMASupported) - 748usize];
13960 ["Offset of field: cudaDeviceProp::gpuDirectRDMAFlushWritesOptions"]
13961 [::std::mem::offset_of!(cudaDeviceProp, gpuDirectRDMAFlushWritesOptions) - 752usize];
13962 ["Offset of field: cudaDeviceProp::gpuDirectRDMAWritesOrdering"]
13963 [::std::mem::offset_of!(cudaDeviceProp, gpuDirectRDMAWritesOrdering) - 756usize];
13964 ["Offset of field: cudaDeviceProp::memoryPoolSupportedHandleTypes"]
13965 [::std::mem::offset_of!(cudaDeviceProp, memoryPoolSupportedHandleTypes) - 760usize];
13966 ["Offset of field: cudaDeviceProp::deferredMappingCudaArraySupported"]
13967 [::std::mem::offset_of!(cudaDeviceProp, deferredMappingCudaArraySupported) - 764usize];
13968 ["Offset of field: cudaDeviceProp::ipcEventSupported"]
13969 [::std::mem::offset_of!(cudaDeviceProp, ipcEventSupported) - 768usize];
13970 ["Offset of field: cudaDeviceProp::clusterLaunch"]
13971 [::std::mem::offset_of!(cudaDeviceProp, clusterLaunch) - 772usize];
13972 ["Offset of field: cudaDeviceProp::unifiedFunctionPointers"]
13973 [::std::mem::offset_of!(cudaDeviceProp, unifiedFunctionPointers) - 776usize];
13974 ["Offset of field: cudaDeviceProp::reserved2"]
13975 [::std::mem::offset_of!(cudaDeviceProp, reserved2) - 780usize];
13976 ["Offset of field: cudaDeviceProp::reserved1"]
13977 [::std::mem::offset_of!(cudaDeviceProp, reserved1) - 788usize];
13978 ["Offset of field: cudaDeviceProp::reserved"]
13979 [::std::mem::offset_of!(cudaDeviceProp, reserved) - 792usize];
13980};
13981#[doc = " CUDA IPC event handle"]
13982#[repr(C)]
13983#[derive(Debug, Copy, Clone)]
13984pub struct cudaIpcEventHandle_st {
13985 pub reserved: [::std::os::raw::c_char; 64usize],
13986}
13987#[allow(clippy::unnecessary_operation, clippy::identity_op)]
13988const _: () = {
13989 ["Size of cudaIpcEventHandle_st"][::std::mem::size_of::<cudaIpcEventHandle_st>() - 64usize];
13990 ["Alignment of cudaIpcEventHandle_st"]
13991 [::std::mem::align_of::<cudaIpcEventHandle_st>() - 1usize];
13992 ["Offset of field: cudaIpcEventHandle_st::reserved"]
13993 [::std::mem::offset_of!(cudaIpcEventHandle_st, reserved) - 0usize];
13994};
13995#[doc = " CUDA IPC event handle"]
13996pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st;
13997#[doc = " CUDA IPC memory handle"]
13998#[repr(C)]
13999#[derive(Debug, Copy, Clone)]
14000pub struct cudaIpcMemHandle_st {
14001 pub reserved: [::std::os::raw::c_char; 64usize],
14002}
14003#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14004const _: () = {
14005 ["Size of cudaIpcMemHandle_st"][::std::mem::size_of::<cudaIpcMemHandle_st>() - 64usize];
14006 ["Alignment of cudaIpcMemHandle_st"][::std::mem::align_of::<cudaIpcMemHandle_st>() - 1usize];
14007 ["Offset of field: cudaIpcMemHandle_st::reserved"]
14008 [::std::mem::offset_of!(cudaIpcMemHandle_st, reserved) - 0usize];
14009};
14010#[doc = " CUDA IPC memory handle"]
14011pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st;
14012#[repr(C)]
14013#[derive(Debug, Copy, Clone)]
14014pub struct cudaMemFabricHandle_st {
14015 pub reserved: [::std::os::raw::c_char; 64usize],
14016}
14017#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14018const _: () = {
14019 ["Size of cudaMemFabricHandle_st"][::std::mem::size_of::<cudaMemFabricHandle_st>() - 64usize];
14020 ["Alignment of cudaMemFabricHandle_st"]
14021 [::std::mem::align_of::<cudaMemFabricHandle_st>() - 1usize];
14022 ["Offset of field: cudaMemFabricHandle_st::reserved"]
14023 [::std::mem::offset_of!(cudaMemFabricHandle_st, reserved) - 0usize];
14024};
14025pub type cudaMemFabricHandle_t = cudaMemFabricHandle_st;
14026impl cudaExternalMemoryHandleType {
14027 #[doc = " Handle is an opaque file descriptor"]
14028 pub const cudaExternalMemoryHandleTypeOpaqueFd: cudaExternalMemoryHandleType =
14029 cudaExternalMemoryHandleType(1);
14030}
14031impl cudaExternalMemoryHandleType {
14032 #[doc = " Handle is an opaque shared NT handle"]
14033 pub const cudaExternalMemoryHandleTypeOpaqueWin32: cudaExternalMemoryHandleType =
14034 cudaExternalMemoryHandleType(2);
14035}
14036impl cudaExternalMemoryHandleType {
14037 #[doc = " Handle is an opaque, globally shared handle"]
14038 pub const cudaExternalMemoryHandleTypeOpaqueWin32Kmt: cudaExternalMemoryHandleType =
14039 cudaExternalMemoryHandleType(3);
14040}
14041impl cudaExternalMemoryHandleType {
14042 #[doc = " Handle is a D3D12 heap object"]
14043 pub const cudaExternalMemoryHandleTypeD3D12Heap: cudaExternalMemoryHandleType =
14044 cudaExternalMemoryHandleType(4);
14045}
14046impl cudaExternalMemoryHandleType {
14047 #[doc = " Handle is a D3D12 committed resource"]
14048 pub const cudaExternalMemoryHandleTypeD3D12Resource: cudaExternalMemoryHandleType =
14049 cudaExternalMemoryHandleType(5);
14050}
14051impl cudaExternalMemoryHandleType {
14052 #[doc = " Handle is a shared NT handle to a D3D11 resource"]
14053 pub const cudaExternalMemoryHandleTypeD3D11Resource: cudaExternalMemoryHandleType =
14054 cudaExternalMemoryHandleType(6);
14055}
14056impl cudaExternalMemoryHandleType {
14057 #[doc = " Handle is a globally shared handle to a D3D11 resource"]
14058 pub const cudaExternalMemoryHandleTypeD3D11ResourceKmt: cudaExternalMemoryHandleType =
14059 cudaExternalMemoryHandleType(7);
14060}
14061impl cudaExternalMemoryHandleType {
14062 #[doc = " Handle is an NvSciBuf object"]
14063 pub const cudaExternalMemoryHandleTypeNvSciBuf: cudaExternalMemoryHandleType =
14064 cudaExternalMemoryHandleType(8);
14065}
14066#[repr(transparent)]
14067#[doc = " External memory handle types"]
14068#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
14069pub struct cudaExternalMemoryHandleType(pub ::std::os::raw::c_uint);
14070#[doc = " External memory handle descriptor"]
14071#[repr(C)]
14072#[derive(Copy, Clone)]
14073pub struct cudaExternalMemoryHandleDesc {
14074 #[doc = " Type of the handle"]
14075 pub type_: cudaExternalMemoryHandleType,
14076 pub handle: cudaExternalMemoryHandleDesc__bindgen_ty_1,
14077 #[doc = " Size of the memory allocation"]
14078 pub size: ::std::os::raw::c_ulonglong,
14079 #[doc = " Flags must either be zero or ::cudaExternalMemoryDedicated"]
14080 pub flags: ::std::os::raw::c_uint,
14081}
14082#[repr(C)]
14083#[derive(Copy, Clone)]
14084pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 {
14085 #[doc = " File descriptor referencing the memory object. Valid\n when type is\n ::cudaExternalMemoryHandleTypeOpaqueFd"]
14086 pub fd: ::std::os::raw::c_int,
14087 pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1,
14088 #[doc = " A handle representing NvSciBuf Object. Valid when type\n is ::cudaExternalMemoryHandleTypeNvSciBuf"]
14089 pub nvSciBufObject: *const ::std::os::raw::c_void,
14090}
14091#[doc = " Win32 handle referencing the semaphore object. Valid when\n type is one of the following:\n - ::cudaExternalMemoryHandleTypeOpaqueWin32\n - ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt\n - ::cudaExternalMemoryHandleTypeD3D12Heap\n - ::cudaExternalMemoryHandleTypeD3D12Resource\n - ::cudaExternalMemoryHandleTypeD3D11Resource\n - ::cudaExternalMemoryHandleTypeD3D11ResourceKmt\n Exactly one of 'handle' and 'name' must be non-NULL. If\n type is one of the following:\n ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt\n ::cudaExternalMemoryHandleTypeD3D11ResourceKmt\n then 'name' must be NULL."]
14092#[repr(C)]
14093#[derive(Debug, Copy, Clone)]
14094pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 {
14095 #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"]
14096 pub handle: *mut ::std::os::raw::c_void,
14097 #[doc = " Name of a valid memory object.\n Must be NULL if 'handle' is non-NULL."]
14098 pub name: *const ::std::os::raw::c_void,
14099}
14100#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14101const _: () = {
14102 ["Size of cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::<
14103 cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1,
14104 >() - 16usize];
14105 ["Alignment of cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1"][::std::mem::align_of::<
14106 cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1,
14107 >() - 8usize];
14108 ["Offset of field: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1::handle"][::std::mem::offset_of!(
14109 cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1,
14110 handle
14111 )
14112 - 0usize];
14113 ["Offset of field: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1::name"][::std::mem::offset_of!(
14114 cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1,
14115 name
14116 ) - 8usize];
14117};
14118#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14119const _: () = {
14120 ["Size of cudaExternalMemoryHandleDesc__bindgen_ty_1"]
14121 [::std::mem::size_of::<cudaExternalMemoryHandleDesc__bindgen_ty_1>() - 16usize];
14122 ["Alignment of cudaExternalMemoryHandleDesc__bindgen_ty_1"]
14123 [::std::mem::align_of::<cudaExternalMemoryHandleDesc__bindgen_ty_1>() - 8usize];
14124 ["Offset of field: cudaExternalMemoryHandleDesc__bindgen_ty_1::fd"]
14125 [::std::mem::offset_of!(cudaExternalMemoryHandleDesc__bindgen_ty_1, fd) - 0usize];
14126 ["Offset of field: cudaExternalMemoryHandleDesc__bindgen_ty_1::win32"]
14127 [::std::mem::offset_of!(cudaExternalMemoryHandleDesc__bindgen_ty_1, win32) - 0usize];
14128 ["Offset of field: cudaExternalMemoryHandleDesc__bindgen_ty_1::nvSciBufObject"][::std::mem::offset_of!(
14129 cudaExternalMemoryHandleDesc__bindgen_ty_1,
14130 nvSciBufObject
14131 ) - 0usize];
14132};
14133#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14134const _: () = {
14135 ["Size of cudaExternalMemoryHandleDesc"]
14136 [::std::mem::size_of::<cudaExternalMemoryHandleDesc>() - 40usize];
14137 ["Alignment of cudaExternalMemoryHandleDesc"]
14138 [::std::mem::align_of::<cudaExternalMemoryHandleDesc>() - 8usize];
14139 ["Offset of field: cudaExternalMemoryHandleDesc::type_"]
14140 [::std::mem::offset_of!(cudaExternalMemoryHandleDesc, type_) - 0usize];
14141 ["Offset of field: cudaExternalMemoryHandleDesc::handle"]
14142 [::std::mem::offset_of!(cudaExternalMemoryHandleDesc, handle) - 8usize];
14143 ["Offset of field: cudaExternalMemoryHandleDesc::size"]
14144 [::std::mem::offset_of!(cudaExternalMemoryHandleDesc, size) - 24usize];
14145 ["Offset of field: cudaExternalMemoryHandleDesc::flags"]
14146 [::std::mem::offset_of!(cudaExternalMemoryHandleDesc, flags) - 32usize];
14147};
14148#[doc = " External memory buffer descriptor"]
14149#[repr(C)]
14150#[derive(Debug, Copy, Clone)]
14151pub struct cudaExternalMemoryBufferDesc {
14152 #[doc = " Offset into the memory object where the buffer's base is"]
14153 pub offset: ::std::os::raw::c_ulonglong,
14154 #[doc = " Size of the buffer"]
14155 pub size: ::std::os::raw::c_ulonglong,
14156 #[doc = " Flags reserved for future use. Must be zero."]
14157 pub flags: ::std::os::raw::c_uint,
14158}
14159#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14160const _: () = {
14161 ["Size of cudaExternalMemoryBufferDesc"]
14162 [::std::mem::size_of::<cudaExternalMemoryBufferDesc>() - 24usize];
14163 ["Alignment of cudaExternalMemoryBufferDesc"]
14164 [::std::mem::align_of::<cudaExternalMemoryBufferDesc>() - 8usize];
14165 ["Offset of field: cudaExternalMemoryBufferDesc::offset"]
14166 [::std::mem::offset_of!(cudaExternalMemoryBufferDesc, offset) - 0usize];
14167 ["Offset of field: cudaExternalMemoryBufferDesc::size"]
14168 [::std::mem::offset_of!(cudaExternalMemoryBufferDesc, size) - 8usize];
14169 ["Offset of field: cudaExternalMemoryBufferDesc::flags"]
14170 [::std::mem::offset_of!(cudaExternalMemoryBufferDesc, flags) - 16usize];
14171};
14172#[doc = " External memory mipmap descriptor"]
14173#[repr(C)]
14174#[derive(Debug, Copy, Clone)]
14175pub struct cudaExternalMemoryMipmappedArrayDesc {
14176 #[doc = " Offset into the memory object where the base level of the\n mipmap chain is."]
14177 pub offset: ::std::os::raw::c_ulonglong,
14178 #[doc = " Format of base level of the mipmap chain"]
14179 pub formatDesc: cudaChannelFormatDesc,
14180 #[doc = " Dimensions of base level of the mipmap chain"]
14181 pub extent: cudaExtent,
14182 #[doc = " Flags associated with CUDA mipmapped arrays.\n See ::cudaMallocMipmappedArray"]
14183 pub flags: ::std::os::raw::c_uint,
14184 #[doc = " Total number of levels in the mipmap chain"]
14185 pub numLevels: ::std::os::raw::c_uint,
14186}
14187#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14188const _: () = {
14189 ["Size of cudaExternalMemoryMipmappedArrayDesc"]
14190 [::std::mem::size_of::<cudaExternalMemoryMipmappedArrayDesc>() - 64usize];
14191 ["Alignment of cudaExternalMemoryMipmappedArrayDesc"]
14192 [::std::mem::align_of::<cudaExternalMemoryMipmappedArrayDesc>() - 8usize];
14193 ["Offset of field: cudaExternalMemoryMipmappedArrayDesc::offset"]
14194 [::std::mem::offset_of!(cudaExternalMemoryMipmappedArrayDesc, offset) - 0usize];
14195 ["Offset of field: cudaExternalMemoryMipmappedArrayDesc::formatDesc"]
14196 [::std::mem::offset_of!(cudaExternalMemoryMipmappedArrayDesc, formatDesc) - 8usize];
14197 ["Offset of field: cudaExternalMemoryMipmappedArrayDesc::extent"]
14198 [::std::mem::offset_of!(cudaExternalMemoryMipmappedArrayDesc, extent) - 32usize];
14199 ["Offset of field: cudaExternalMemoryMipmappedArrayDesc::flags"]
14200 [::std::mem::offset_of!(cudaExternalMemoryMipmappedArrayDesc, flags) - 56usize];
14201 ["Offset of field: cudaExternalMemoryMipmappedArrayDesc::numLevels"]
14202 [::std::mem::offset_of!(cudaExternalMemoryMipmappedArrayDesc, numLevels) - 60usize];
14203};
14204impl cudaExternalSemaphoreHandleType {
14205 #[doc = " Handle is an opaque file descriptor"]
14206 pub const cudaExternalSemaphoreHandleTypeOpaqueFd: cudaExternalSemaphoreHandleType =
14207 cudaExternalSemaphoreHandleType(1);
14208}
14209impl cudaExternalSemaphoreHandleType {
14210 #[doc = " Handle is an opaque shared NT handle"]
14211 pub const cudaExternalSemaphoreHandleTypeOpaqueWin32: cudaExternalSemaphoreHandleType =
14212 cudaExternalSemaphoreHandleType(2);
14213}
14214impl cudaExternalSemaphoreHandleType {
14215 #[doc = " Handle is an opaque, globally shared handle"]
14216 pub const cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt: cudaExternalSemaphoreHandleType =
14217 cudaExternalSemaphoreHandleType(3);
14218}
14219impl cudaExternalSemaphoreHandleType {
14220 #[doc = " Handle is a shared NT handle referencing a D3D12 fence object"]
14221 pub const cudaExternalSemaphoreHandleTypeD3D12Fence: cudaExternalSemaphoreHandleType =
14222 cudaExternalSemaphoreHandleType(4);
14223}
14224impl cudaExternalSemaphoreHandleType {
14225 #[doc = " Handle is a shared NT handle referencing a D3D11 fence object"]
14226 pub const cudaExternalSemaphoreHandleTypeD3D11Fence: cudaExternalSemaphoreHandleType =
14227 cudaExternalSemaphoreHandleType(5);
14228}
14229impl cudaExternalSemaphoreHandleType {
14230 #[doc = " Opaque handle to NvSciSync Object"]
14231 pub const cudaExternalSemaphoreHandleTypeNvSciSync: cudaExternalSemaphoreHandleType =
14232 cudaExternalSemaphoreHandleType(6);
14233}
14234impl cudaExternalSemaphoreHandleType {
14235 #[doc = " Handle is a shared NT handle referencing a D3D11 keyed mutex object"]
14236 pub const cudaExternalSemaphoreHandleTypeKeyedMutex: cudaExternalSemaphoreHandleType =
14237 cudaExternalSemaphoreHandleType(7);
14238}
14239impl cudaExternalSemaphoreHandleType {
14240 #[doc = " Handle is a shared KMT handle referencing a D3D11 keyed mutex object"]
14241 pub const cudaExternalSemaphoreHandleTypeKeyedMutexKmt: cudaExternalSemaphoreHandleType =
14242 cudaExternalSemaphoreHandleType(8);
14243}
14244impl cudaExternalSemaphoreHandleType {
14245 #[doc = " Handle is an opaque handle file descriptor referencing a timeline semaphore"]
14246 pub const cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd: cudaExternalSemaphoreHandleType =
14247 cudaExternalSemaphoreHandleType(9);
14248}
14249impl cudaExternalSemaphoreHandleType {
14250 #[doc = " Handle is an opaque handle file descriptor referencing a timeline semaphore"]
14251 pub const cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32:
14252 cudaExternalSemaphoreHandleType = cudaExternalSemaphoreHandleType(10);
14253}
14254#[repr(transparent)]
14255#[doc = " External semaphore handle types"]
14256#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
14257pub struct cudaExternalSemaphoreHandleType(pub ::std::os::raw::c_uint);
14258#[doc = " External semaphore handle descriptor"]
14259#[repr(C)]
14260#[derive(Copy, Clone)]
14261pub struct cudaExternalSemaphoreHandleDesc {
14262 #[doc = " Type of the handle"]
14263 pub type_: cudaExternalSemaphoreHandleType,
14264 pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1,
14265 #[doc = " Flags reserved for the future. Must be zero."]
14266 pub flags: ::std::os::raw::c_uint,
14267}
14268#[repr(C)]
14269#[derive(Copy, Clone)]
14270pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 {
14271 #[doc = " File descriptor referencing the semaphore object. Valid when\n type is one of the following:\n - ::cudaExternalSemaphoreHandleTypeOpaqueFd\n - ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd"]
14272 pub fd: ::std::os::raw::c_int,
14273 pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1,
14274 #[doc = " Valid NvSciSyncObj. Must be non NULL"]
14275 pub nvSciSyncObj: *const ::std::os::raw::c_void,
14276}
14277#[doc = " Win32 handle referencing the semaphore object. Valid when\n type is one of the following:\n - ::cudaExternalSemaphoreHandleTypeOpaqueWin32\n - ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt\n - ::cudaExternalSemaphoreHandleTypeD3D12Fence\n - ::cudaExternalSemaphoreHandleTypeD3D11Fence\n - ::cudaExternalSemaphoreHandleTypeKeyedMutex\n - ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32\n Exactly one of 'handle' and 'name' must be non-NULL. If\n type is one of the following:\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt\n ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt\n then 'name' must be NULL."]
14278#[repr(C)]
14279#[derive(Debug, Copy, Clone)]
14280pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 {
14281 #[doc = " Valid NT handle. Must be NULL if 'name' is non-NULL"]
14282 pub handle: *mut ::std::os::raw::c_void,
14283 #[doc = " Name of a valid synchronization primitive.\n Must be NULL if 'handle' is non-NULL."]
14284 pub name: *const ::std::os::raw::c_void,
14285}
14286#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14287const _: () = {
14288 ["Size of cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::<
14289 cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1,
14290 >() - 16usize];
14291 ["Alignment of cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1"]
14292 [::std::mem::align_of::<cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1>()
14293 - 8usize];
14294 ["Offset of field: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1::handle"][::std::mem::offset_of!(
14295 cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1,
14296 handle
14297 )
14298 - 0usize];
14299 ["Offset of field: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1::name"][::std::mem::offset_of!(
14300 cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1,
14301 name
14302 )
14303 - 8usize];
14304};
14305#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14306const _: () = {
14307 ["Size of cudaExternalSemaphoreHandleDesc__bindgen_ty_1"]
14308 [::std::mem::size_of::<cudaExternalSemaphoreHandleDesc__bindgen_ty_1>() - 16usize];
14309 ["Alignment of cudaExternalSemaphoreHandleDesc__bindgen_ty_1"]
14310 [::std::mem::align_of::<cudaExternalSemaphoreHandleDesc__bindgen_ty_1>() - 8usize];
14311 ["Offset of field: cudaExternalSemaphoreHandleDesc__bindgen_ty_1::fd"]
14312 [::std::mem::offset_of!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1, fd) - 0usize];
14313 ["Offset of field: cudaExternalSemaphoreHandleDesc__bindgen_ty_1::win32"]
14314 [::std::mem::offset_of!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1, win32) - 0usize];
14315 ["Offset of field: cudaExternalSemaphoreHandleDesc__bindgen_ty_1::nvSciSyncObj"][::std::mem::offset_of!(
14316 cudaExternalSemaphoreHandleDesc__bindgen_ty_1,
14317 nvSciSyncObj
14318 ) - 0usize];
14319};
14320#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14321const _: () = {
14322 ["Size of cudaExternalSemaphoreHandleDesc"]
14323 [::std::mem::size_of::<cudaExternalSemaphoreHandleDesc>() - 32usize];
14324 ["Alignment of cudaExternalSemaphoreHandleDesc"]
14325 [::std::mem::align_of::<cudaExternalSemaphoreHandleDesc>() - 8usize];
14326 ["Offset of field: cudaExternalSemaphoreHandleDesc::type_"]
14327 [::std::mem::offset_of!(cudaExternalSemaphoreHandleDesc, type_) - 0usize];
14328 ["Offset of field: cudaExternalSemaphoreHandleDesc::handle"]
14329 [::std::mem::offset_of!(cudaExternalSemaphoreHandleDesc, handle) - 8usize];
14330 ["Offset of field: cudaExternalSemaphoreHandleDesc::flags"]
14331 [::std::mem::offset_of!(cudaExternalSemaphoreHandleDesc, flags) - 24usize];
14332};
14333#[doc = " External semaphore signal parameters(deprecated)"]
14334#[repr(C)]
14335#[derive(Copy, Clone)]
14336pub struct cudaExternalSemaphoreSignalParams_v1 {
14337 pub params: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1,
14338 #[doc = " Only when ::cudaExternalSemaphoreSignalParams is used to\n signal a ::cudaExternalSemaphore_t of type\n ::cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is\n ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates\n that while signaling the ::cudaExternalSemaphore_t, no memory\n synchronization operations should be performed for any external memory\n object imported as ::cudaExternalMemoryHandleTypeNvSciBuf.\n For all other types of ::cudaExternalSemaphore_t, flags must be zero."]
14339 pub flags: ::std::os::raw::c_uint,
14340}
14341#[repr(C)]
14342#[derive(Copy, Clone)]
14343pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1 {
14344 pub fence: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1,
14345 pub nvSciSync: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2,
14346 pub keyedMutex: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3,
14347}
14348#[doc = " Parameters for fence objects"]
14349#[repr(C)]
14350#[derive(Debug, Copy, Clone)]
14351pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1 {
14352 #[doc = " Value of fence to be signaled"]
14353 pub value: ::std::os::raw::c_ulonglong,
14354}
14355#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14356const _: () = {
14357 ["Size of cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::<
14358 cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1,
14359 >() - 8usize];
14360 ["Alignment of cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1"]
14361 [::std::mem::align_of::<cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1>(
14362 ) - 8usize];
14363 ["Offset of field: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1::value"][::std::mem::offset_of!(
14364 cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1,
14365 value
14366 )
14367 - 0usize];
14368};
14369#[repr(C)]
14370#[derive(Copy, Clone)]
14371pub union cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2 {
14372 #[doc = " Pointer to NvSciSyncFence. Valid if ::cudaExternalSemaphoreHandleType\n is of type ::cudaExternalSemaphoreHandleTypeNvSciSync."]
14373 pub fence: *mut ::std::os::raw::c_void,
14374 pub reserved: ::std::os::raw::c_ulonglong,
14375}
14376#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14377const _: () = {
14378 ["Size of cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2"][::std::mem::size_of::<
14379 cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2,
14380 >() - 8usize];
14381 ["Alignment of cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2"]
14382 [::std::mem::align_of::<cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2>(
14383 ) - 8usize];
14384 ["Offset of field: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2::fence"][::std::mem::offset_of!(
14385 cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2,
14386 fence
14387 )
14388 - 0usize];
14389 ["Offset of field: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2::reserved"]
14390 [::std::mem::offset_of!(
14391 cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2,
14392 reserved
14393 ) - 0usize];
14394};
14395#[doc = " Parameters for keyed mutex objects"]
14396#[repr(C)]
14397#[derive(Debug, Copy, Clone)]
14398pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3 {
14399 pub key: ::std::os::raw::c_ulonglong,
14400}
14401#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14402const _: () = {
14403 ["Size of cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3"][::std::mem::size_of::<
14404 cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3,
14405 >() - 8usize];
14406 ["Alignment of cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3"]
14407 [::std::mem::align_of::<cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3>(
14408 ) - 8usize];
14409 ["Offset of field: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3::key"][::std::mem::offset_of!(
14410 cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3,
14411 key
14412 )
14413 - 0usize];
14414};
14415#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14416const _: () = {
14417 ["Size of cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1"]
14418 [::std::mem::size_of::<cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1>() - 24usize];
14419 ["Alignment of cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1"]
14420 [::std::mem::align_of::<cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1>() - 8usize];
14421 ["Offset of field: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1::fence"][::std::mem::offset_of!(
14422 cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1,
14423 fence
14424 ) - 0usize];
14425 ["Offset of field: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1::nvSciSync"][::std::mem::offset_of!(
14426 cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1,
14427 nvSciSync
14428 ) - 8usize];
14429 ["Offset of field: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1::keyedMutex"][::std::mem::offset_of!(
14430 cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1,
14431 keyedMutex
14432 )
14433 - 16usize];
14434};
14435#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14436const _: () = {
14437 ["Size of cudaExternalSemaphoreSignalParams_v1"]
14438 [::std::mem::size_of::<cudaExternalSemaphoreSignalParams_v1>() - 32usize];
14439 ["Alignment of cudaExternalSemaphoreSignalParams_v1"]
14440 [::std::mem::align_of::<cudaExternalSemaphoreSignalParams_v1>() - 8usize];
14441 ["Offset of field: cudaExternalSemaphoreSignalParams_v1::params"]
14442 [::std::mem::offset_of!(cudaExternalSemaphoreSignalParams_v1, params) - 0usize];
14443 ["Offset of field: cudaExternalSemaphoreSignalParams_v1::flags"]
14444 [::std::mem::offset_of!(cudaExternalSemaphoreSignalParams_v1, flags) - 24usize];
14445};
14446#[doc = " External semaphore wait parameters(deprecated)"]
14447#[repr(C)]
14448#[derive(Copy, Clone)]
14449pub struct cudaExternalSemaphoreWaitParams_v1 {
14450 pub params: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1,
14451 #[doc = " Only when ::cudaExternalSemaphoreSignalParams is used to\n signal a ::cudaExternalSemaphore_t of type\n ::cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is\n ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates\n that while waiting for the ::cudaExternalSemaphore_t, no memory\n synchronization operations should be performed for any external memory\n object imported as ::cudaExternalMemoryHandleTypeNvSciBuf.\n For all other types of ::cudaExternalSemaphore_t, flags must be zero."]
14452 pub flags: ::std::os::raw::c_uint,
14453}
14454#[repr(C)]
14455#[derive(Copy, Clone)]
14456pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1 {
14457 pub fence: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1,
14458 pub nvSciSync: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2,
14459 pub keyedMutex: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3,
14460}
14461#[doc = " Parameters for fence objects"]
14462#[repr(C)]
14463#[derive(Debug, Copy, Clone)]
14464pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1 {
14465 #[doc = " Value of fence to be waited on"]
14466 pub value: ::std::os::raw::c_ulonglong,
14467}
14468#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14469const _: () = {
14470 ["Size of cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::<
14471 cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1,
14472 >() - 8usize];
14473 ["Alignment of cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1"]
14474 [::std::mem::align_of::<cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1>()
14475 - 8usize];
14476 ["Offset of field: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1::value"][::std::mem::offset_of!(
14477 cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1,
14478 value
14479 )
14480 - 0usize];
14481};
14482#[repr(C)]
14483#[derive(Copy, Clone)]
14484pub union cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2 {
14485 #[doc = " Pointer to NvSciSyncFence. Valid if ::cudaExternalSemaphoreHandleType\n is of type ::cudaExternalSemaphoreHandleTypeNvSciSync."]
14486 pub fence: *mut ::std::os::raw::c_void,
14487 pub reserved: ::std::os::raw::c_ulonglong,
14488}
14489#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14490const _: () = {
14491 ["Size of cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2"][::std::mem::size_of::<
14492 cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2,
14493 >() - 8usize];
14494 ["Alignment of cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2"]
14495 [::std::mem::align_of::<cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2>()
14496 - 8usize];
14497 ["Offset of field: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2::fence"][::std::mem::offset_of!(
14498 cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2,
14499 fence
14500 )
14501 - 0usize];
14502 ["Offset of field: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2::reserved"][::std::mem::offset_of!(
14503 cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2,
14504 reserved
14505 )
14506 - 0usize];
14507};
14508#[doc = " Parameters for keyed mutex objects"]
14509#[repr(C)]
14510#[derive(Debug, Copy, Clone)]
14511pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3 {
14512 #[doc = " Value of key to acquire the mutex with"]
14513 pub key: ::std::os::raw::c_ulonglong,
14514 #[doc = " Timeout in milliseconds to wait to acquire the mutex"]
14515 pub timeoutMs: ::std::os::raw::c_uint,
14516}
14517#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14518const _: () = {
14519 ["Size of cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3"][::std::mem::size_of::<
14520 cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3,
14521 >() - 16usize];
14522 ["Alignment of cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3"]
14523 [::std::mem::align_of::<cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3>()
14524 - 8usize];
14525 ["Offset of field: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3::key"][::std::mem::offset_of!(
14526 cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3,
14527 key
14528 )
14529 - 0usize];
14530 ["Offset of field: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3::timeoutMs"]
14531 [::std::mem::offset_of!(
14532 cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3,
14533 timeoutMs
14534 ) - 8usize];
14535};
14536#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14537const _: () = {
14538 ["Size of cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1"]
14539 [::std::mem::size_of::<cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1>() - 32usize];
14540 ["Alignment of cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1"]
14541 [::std::mem::align_of::<cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1>() - 8usize];
14542 ["Offset of field: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1::fence"]
14543 [::std::mem::offset_of!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, fence) - 0usize];
14544 ["Offset of field: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1::nvSciSync"][::std::mem::offset_of!(
14545 cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1,
14546 nvSciSync
14547 ) - 8usize];
14548 ["Offset of field: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1::keyedMutex"][::std::mem::offset_of!(
14549 cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1,
14550 keyedMutex
14551 ) - 16usize];
14552};
14553#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14554const _: () = {
14555 ["Size of cudaExternalSemaphoreWaitParams_v1"]
14556 [::std::mem::size_of::<cudaExternalSemaphoreWaitParams_v1>() - 40usize];
14557 ["Alignment of cudaExternalSemaphoreWaitParams_v1"]
14558 [::std::mem::align_of::<cudaExternalSemaphoreWaitParams_v1>() - 8usize];
14559 ["Offset of field: cudaExternalSemaphoreWaitParams_v1::params"]
14560 [::std::mem::offset_of!(cudaExternalSemaphoreWaitParams_v1, params) - 0usize];
14561 ["Offset of field: cudaExternalSemaphoreWaitParams_v1::flags"]
14562 [::std::mem::offset_of!(cudaExternalSemaphoreWaitParams_v1, flags) - 32usize];
14563};
14564#[doc = " External semaphore signal parameters, compatible with driver type"]
14565#[repr(C)]
14566#[derive(Copy, Clone)]
14567pub struct cudaExternalSemaphoreSignalParams {
14568 pub params: cudaExternalSemaphoreSignalParams__bindgen_ty_1,
14569 #[doc = " Only when ::cudaExternalSemaphoreSignalParams is used to\n signal a ::cudaExternalSemaphore_t of type\n ::cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is\n ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates\n that while signaling the ::cudaExternalSemaphore_t, no memory\n synchronization operations should be performed for any external memory\n object imported as ::cudaExternalMemoryHandleTypeNvSciBuf.\n For all other types of ::cudaExternalSemaphore_t, flags must be zero."]
14570 pub flags: ::std::os::raw::c_uint,
14571 pub reserved: [::std::os::raw::c_uint; 16usize],
14572}
14573#[repr(C)]
14574#[derive(Copy, Clone)]
14575pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1 {
14576 pub fence: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1,
14577 pub nvSciSync: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2,
14578 pub keyedMutex: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3,
14579 pub reserved: [::std::os::raw::c_uint; 12usize],
14580}
14581#[doc = " Parameters for fence objects"]
14582#[repr(C)]
14583#[derive(Debug, Copy, Clone)]
14584pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1 {
14585 #[doc = " Value of fence to be signaled"]
14586 pub value: ::std::os::raw::c_ulonglong,
14587}
14588#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14589const _: () = {
14590 ["Size of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::<
14591 cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1,
14592 >() - 8usize];
14593 ["Alignment of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1"]
14594 [::std::mem::align_of::<cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1>()
14595 - 8usize];
14596 ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1::value"][::std::mem::offset_of!(
14597 cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1,
14598 value
14599 )
14600 - 0usize];
14601};
14602#[repr(C)]
14603#[derive(Copy, Clone)]
14604pub union cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2 {
14605 #[doc = " Pointer to NvSciSyncFence. Valid if ::cudaExternalSemaphoreHandleType\n is of type ::cudaExternalSemaphoreHandleTypeNvSciSync."]
14606 pub fence: *mut ::std::os::raw::c_void,
14607 pub reserved: ::std::os::raw::c_ulonglong,
14608}
14609#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14610const _: () = {
14611 ["Size of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2"][::std::mem::size_of::<
14612 cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2,
14613 >() - 8usize];
14614 ["Alignment of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2"]
14615 [::std::mem::align_of::<cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2>()
14616 - 8usize];
14617 ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2::fence"][::std::mem::offset_of!(
14618 cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2,
14619 fence
14620 )
14621 - 0usize];
14622 ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2::reserved"][::std::mem::offset_of!(
14623 cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2,
14624 reserved
14625 )
14626 - 0usize];
14627};
14628#[doc = " Parameters for keyed mutex objects"]
14629#[repr(C)]
14630#[derive(Debug, Copy, Clone)]
14631pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3 {
14632 pub key: ::std::os::raw::c_ulonglong,
14633}
14634#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14635const _: () = {
14636 ["Size of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3"][::std::mem::size_of::<
14637 cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3,
14638 >() - 8usize];
14639 ["Alignment of cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3"]
14640 [::std::mem::align_of::<cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3>()
14641 - 8usize];
14642 ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3::key"][::std::mem::offset_of!(
14643 cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3,
14644 key
14645 )
14646 - 0usize];
14647};
14648#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14649const _: () = {
14650 ["Size of cudaExternalSemaphoreSignalParams__bindgen_ty_1"]
14651 [::std::mem::size_of::<cudaExternalSemaphoreSignalParams__bindgen_ty_1>() - 72usize];
14652 ["Alignment of cudaExternalSemaphoreSignalParams__bindgen_ty_1"]
14653 [::std::mem::align_of::<cudaExternalSemaphoreSignalParams__bindgen_ty_1>() - 8usize];
14654 ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1::fence"]
14655 [::std::mem::offset_of!(cudaExternalSemaphoreSignalParams__bindgen_ty_1, fence) - 0usize];
14656 ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1::nvSciSync"][::std::mem::offset_of!(
14657 cudaExternalSemaphoreSignalParams__bindgen_ty_1,
14658 nvSciSync
14659 ) - 8usize];
14660 ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1::keyedMutex"][::std::mem::offset_of!(
14661 cudaExternalSemaphoreSignalParams__bindgen_ty_1,
14662 keyedMutex
14663 ) - 16usize];
14664 ["Offset of field: cudaExternalSemaphoreSignalParams__bindgen_ty_1::reserved"][::std::mem::offset_of!(
14665 cudaExternalSemaphoreSignalParams__bindgen_ty_1,
14666 reserved
14667 ) - 24usize];
14668};
14669#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14670const _: () = {
14671 ["Size of cudaExternalSemaphoreSignalParams"]
14672 [::std::mem::size_of::<cudaExternalSemaphoreSignalParams>() - 144usize];
14673 ["Alignment of cudaExternalSemaphoreSignalParams"]
14674 [::std::mem::align_of::<cudaExternalSemaphoreSignalParams>() - 8usize];
14675 ["Offset of field: cudaExternalSemaphoreSignalParams::params"]
14676 [::std::mem::offset_of!(cudaExternalSemaphoreSignalParams, params) - 0usize];
14677 ["Offset of field: cudaExternalSemaphoreSignalParams::flags"]
14678 [::std::mem::offset_of!(cudaExternalSemaphoreSignalParams, flags) - 72usize];
14679 ["Offset of field: cudaExternalSemaphoreSignalParams::reserved"]
14680 [::std::mem::offset_of!(cudaExternalSemaphoreSignalParams, reserved) - 76usize];
14681};
14682#[doc = " External semaphore wait parameters, compatible with driver type"]
14683#[repr(C)]
14684#[derive(Copy, Clone)]
14685pub struct cudaExternalSemaphoreWaitParams {
14686 pub params: cudaExternalSemaphoreWaitParams__bindgen_ty_1,
14687 #[doc = " Only when ::cudaExternalSemaphoreSignalParams is used to\n signal a ::cudaExternalSemaphore_t of type\n ::cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is\n ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates\n that while waiting for the ::cudaExternalSemaphore_t, no memory\n synchronization operations should be performed for any external memory\n object imported as ::cudaExternalMemoryHandleTypeNvSciBuf.\n For all other types of ::cudaExternalSemaphore_t, flags must be zero."]
14688 pub flags: ::std::os::raw::c_uint,
14689 pub reserved: [::std::os::raw::c_uint; 16usize],
14690}
14691#[repr(C)]
14692#[derive(Copy, Clone)]
14693pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1 {
14694 pub fence: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1,
14695 pub nvSciSync: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2,
14696 pub keyedMutex: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3,
14697 pub reserved: [::std::os::raw::c_uint; 10usize],
14698}
14699#[doc = " Parameters for fence objects"]
14700#[repr(C)]
14701#[derive(Debug, Copy, Clone)]
14702pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1 {
14703 #[doc = " Value of fence to be waited on"]
14704 pub value: ::std::os::raw::c_ulonglong,
14705}
14706#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14707const _: () = {
14708 ["Size of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::<
14709 cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1,
14710 >() - 8usize];
14711 ["Alignment of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1"]
14712 [::std::mem::align_of::<cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1>()
14713 - 8usize];
14714 ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1::value"][::std::mem::offset_of!(
14715 cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1,
14716 value
14717 )
14718 - 0usize];
14719};
14720#[repr(C)]
14721#[derive(Copy, Clone)]
14722pub union cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2 {
14723 #[doc = " Pointer to NvSciSyncFence. Valid if ::cudaExternalSemaphoreHandleType\n is of type ::cudaExternalSemaphoreHandleTypeNvSciSync."]
14724 pub fence: *mut ::std::os::raw::c_void,
14725 pub reserved: ::std::os::raw::c_ulonglong,
14726}
14727#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14728const _: () = {
14729 ["Size of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2"][::std::mem::size_of::<
14730 cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2,
14731 >() - 8usize];
14732 ["Alignment of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2"]
14733 [::std::mem::align_of::<cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2>()
14734 - 8usize];
14735 ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2::fence"][::std::mem::offset_of!(
14736 cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2,
14737 fence
14738 )
14739 - 0usize];
14740 ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2::reserved"][::std::mem::offset_of!(
14741 cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2,
14742 reserved
14743 )
14744 - 0usize];
14745};
14746#[doc = " Parameters for keyed mutex objects"]
14747#[repr(C)]
14748#[derive(Debug, Copy, Clone)]
14749pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3 {
14750 #[doc = " Value of key to acquire the mutex with"]
14751 pub key: ::std::os::raw::c_ulonglong,
14752 #[doc = " Timeout in milliseconds to wait to acquire the mutex"]
14753 pub timeoutMs: ::std::os::raw::c_uint,
14754}
14755#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14756const _: () = {
14757 ["Size of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3"][::std::mem::size_of::<
14758 cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3,
14759 >() - 16usize];
14760 ["Alignment of cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3"]
14761 [::std::mem::align_of::<cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3>()
14762 - 8usize];
14763 ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3::key"][::std::mem::offset_of!(
14764 cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3,
14765 key
14766 )
14767 - 0usize];
14768 ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3::timeoutMs"][::std::mem::offset_of!(
14769 cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3,
14770 timeoutMs
14771 )
14772 - 8usize];
14773};
14774#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14775const _: () = {
14776 ["Size of cudaExternalSemaphoreWaitParams__bindgen_ty_1"]
14777 [::std::mem::size_of::<cudaExternalSemaphoreWaitParams__bindgen_ty_1>() - 72usize];
14778 ["Alignment of cudaExternalSemaphoreWaitParams__bindgen_ty_1"]
14779 [::std::mem::align_of::<cudaExternalSemaphoreWaitParams__bindgen_ty_1>() - 8usize];
14780 ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1::fence"]
14781 [::std::mem::offset_of!(cudaExternalSemaphoreWaitParams__bindgen_ty_1, fence) - 0usize];
14782 ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1::nvSciSync"]
14783 [::std::mem::offset_of!(cudaExternalSemaphoreWaitParams__bindgen_ty_1, nvSciSync) - 8usize];
14784 ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1::keyedMutex"][::std::mem::offset_of!(
14785 cudaExternalSemaphoreWaitParams__bindgen_ty_1,
14786 keyedMutex
14787 ) - 16usize];
14788 ["Offset of field: cudaExternalSemaphoreWaitParams__bindgen_ty_1::reserved"]
14789 [::std::mem::offset_of!(cudaExternalSemaphoreWaitParams__bindgen_ty_1, reserved) - 32usize];
14790};
14791#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14792const _: () = {
14793 ["Size of cudaExternalSemaphoreWaitParams"]
14794 [::std::mem::size_of::<cudaExternalSemaphoreWaitParams>() - 144usize];
14795 ["Alignment of cudaExternalSemaphoreWaitParams"]
14796 [::std::mem::align_of::<cudaExternalSemaphoreWaitParams>() - 8usize];
14797 ["Offset of field: cudaExternalSemaphoreWaitParams::params"]
14798 [::std::mem::offset_of!(cudaExternalSemaphoreWaitParams, params) - 0usize];
14799 ["Offset of field: cudaExternalSemaphoreWaitParams::flags"]
14800 [::std::mem::offset_of!(cudaExternalSemaphoreWaitParams, flags) - 72usize];
14801 ["Offset of field: cudaExternalSemaphoreWaitParams::reserved"]
14802 [::std::mem::offset_of!(cudaExternalSemaphoreWaitParams, reserved) - 76usize];
14803};
14804#[doc = " CUDA Error types"]
14805pub use self::cudaError as cudaError_t;
14806#[doc = " CUDA stream"]
14807pub type cudaStream_t = *mut CUstream_st;
14808#[doc = " CUDA event types"]
14809pub type cudaEvent_t = *mut CUevent_st;
14810#[doc = " CUDA graphics resource types"]
14811pub type cudaGraphicsResource_t = *mut cudaGraphicsResource;
14812#[repr(C)]
14813#[derive(Debug, Copy, Clone)]
14814pub struct CUexternalMemory_st {
14815 _unused: [u8; 0],
14816}
14817#[doc = " CUDA external memory"]
14818pub type cudaExternalMemory_t = *mut CUexternalMemory_st;
14819#[repr(C)]
14820#[derive(Debug, Copy, Clone)]
14821pub struct CUexternalSemaphore_st {
14822 _unused: [u8; 0],
14823}
14824#[doc = " CUDA external semaphore"]
14825pub type cudaExternalSemaphore_t = *mut CUexternalSemaphore_st;
14826#[doc = " CUDA graph"]
14827pub type cudaGraph_t = *mut CUgraph_st;
14828#[doc = " CUDA graph node."]
14829pub type cudaGraphNode_t = *mut CUgraphNode_st;
14830#[doc = " CUDA user object for graphs"]
14831pub type cudaUserObject_t = *mut CUuserObject_st;
14832#[doc = " CUDA handle for conditional graph nodes"]
14833pub type cudaGraphConditionalHandle = ::std::os::raw::c_ulonglong;
14834#[doc = " CUDA function"]
14835pub type cudaFunction_t = *mut CUfunc_st;
14836#[doc = " CUDA kernel"]
14837pub type cudaKernel_t = *mut CUkern_st;
14838#[doc = " CUDA memory pool"]
14839pub type cudaMemPool_t = *mut CUmemPoolHandle_st;
14840impl cudaCGScope {
14841 #[doc = "< Invalid cooperative group scope"]
14842 pub const cudaCGScopeInvalid: cudaCGScope = cudaCGScope(0);
14843}
14844impl cudaCGScope {
14845 #[doc = "< Scope represented by a grid_group"]
14846 pub const cudaCGScopeGrid: cudaCGScope = cudaCGScope(1);
14847}
14848impl cudaCGScope {
14849 #[doc = "< Scope represented by a multi_grid_group"]
14850 pub const cudaCGScopeMultiGrid: cudaCGScope = cudaCGScope(2);
14851}
14852#[repr(transparent)]
14853#[doc = " CUDA cooperative group scope"]
14854#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
14855pub struct cudaCGScope(pub ::std::os::raw::c_uint);
14856#[doc = " CUDA launch parameters"]
14857#[repr(C)]
14858#[derive(Debug, Copy, Clone)]
14859pub struct cudaLaunchParams {
14860 #[doc = "< Device function symbol"]
14861 pub func: *mut ::std::os::raw::c_void,
14862 #[doc = "< Grid dimentions"]
14863 pub gridDim: dim3,
14864 #[doc = "< Block dimentions"]
14865 pub blockDim: dim3,
14866 #[doc = "< Arguments"]
14867 pub args: *mut *mut ::std::os::raw::c_void,
14868 #[doc = "< Shared memory"]
14869 pub sharedMem: usize,
14870 #[doc = "< Stream identifier"]
14871 pub stream: cudaStream_t,
14872}
14873#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14874const _: () = {
14875 ["Size of cudaLaunchParams"][::std::mem::size_of::<cudaLaunchParams>() - 56usize];
14876 ["Alignment of cudaLaunchParams"][::std::mem::align_of::<cudaLaunchParams>() - 8usize];
14877 ["Offset of field: cudaLaunchParams::func"]
14878 [::std::mem::offset_of!(cudaLaunchParams, func) - 0usize];
14879 ["Offset of field: cudaLaunchParams::gridDim"]
14880 [::std::mem::offset_of!(cudaLaunchParams, gridDim) - 8usize];
14881 ["Offset of field: cudaLaunchParams::blockDim"]
14882 [::std::mem::offset_of!(cudaLaunchParams, blockDim) - 20usize];
14883 ["Offset of field: cudaLaunchParams::args"]
14884 [::std::mem::offset_of!(cudaLaunchParams, args) - 32usize];
14885 ["Offset of field: cudaLaunchParams::sharedMem"]
14886 [::std::mem::offset_of!(cudaLaunchParams, sharedMem) - 40usize];
14887 ["Offset of field: cudaLaunchParams::stream"]
14888 [::std::mem::offset_of!(cudaLaunchParams, stream) - 48usize];
14889};
14890#[doc = " CUDA GPU kernel node parameters"]
14891#[repr(C)]
14892#[derive(Debug, Copy, Clone)]
14893pub struct cudaKernelNodeParams {
14894 #[doc = "< Kernel to launch"]
14895 pub func: *mut ::std::os::raw::c_void,
14896 #[doc = "< Grid dimensions"]
14897 pub gridDim: dim3,
14898 #[doc = "< Block dimensions"]
14899 pub blockDim: dim3,
14900 #[doc = "< Dynamic shared-memory size per thread block in bytes"]
14901 pub sharedMemBytes: ::std::os::raw::c_uint,
14902 #[doc = "< Array of pointers to individual kernel arguments"]
14903 pub kernelParams: *mut *mut ::std::os::raw::c_void,
14904 #[doc = "< Pointer to kernel arguments in the \"extra\" format"]
14905 pub extra: *mut *mut ::std::os::raw::c_void,
14906}
14907#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14908const _: () = {
14909 ["Size of cudaKernelNodeParams"][::std::mem::size_of::<cudaKernelNodeParams>() - 56usize];
14910 ["Alignment of cudaKernelNodeParams"][::std::mem::align_of::<cudaKernelNodeParams>() - 8usize];
14911 ["Offset of field: cudaKernelNodeParams::func"]
14912 [::std::mem::offset_of!(cudaKernelNodeParams, func) - 0usize];
14913 ["Offset of field: cudaKernelNodeParams::gridDim"]
14914 [::std::mem::offset_of!(cudaKernelNodeParams, gridDim) - 8usize];
14915 ["Offset of field: cudaKernelNodeParams::blockDim"]
14916 [::std::mem::offset_of!(cudaKernelNodeParams, blockDim) - 20usize];
14917 ["Offset of field: cudaKernelNodeParams::sharedMemBytes"]
14918 [::std::mem::offset_of!(cudaKernelNodeParams, sharedMemBytes) - 32usize];
14919 ["Offset of field: cudaKernelNodeParams::kernelParams"]
14920 [::std::mem::offset_of!(cudaKernelNodeParams, kernelParams) - 40usize];
14921 ["Offset of field: cudaKernelNodeParams::extra"]
14922 [::std::mem::offset_of!(cudaKernelNodeParams, extra) - 48usize];
14923};
14924#[doc = " CUDA GPU kernel node parameters"]
14925#[repr(C)]
14926#[derive(Debug, Copy, Clone)]
14927pub struct cudaKernelNodeParamsV2 {
14928 #[doc = "< Kernel to launch"]
14929 pub func: *mut ::std::os::raw::c_void,
14930 #[doc = "< Grid dimensions"]
14931 pub gridDim: dim3,
14932 #[doc = "< Block dimensions"]
14933 pub blockDim: dim3,
14934 #[doc = "< Dynamic shared-memory size per thread block in bytes"]
14935 pub sharedMemBytes: ::std::os::raw::c_uint,
14936 #[doc = "< Array of pointers to individual kernel arguments"]
14937 pub kernelParams: *mut *mut ::std::os::raw::c_void,
14938 #[doc = "< Pointer to kernel arguments in the \"extra\" format"]
14939 pub extra: *mut *mut ::std::os::raw::c_void,
14940}
14941#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14942const _: () = {
14943 ["Size of cudaKernelNodeParamsV2"][::std::mem::size_of::<cudaKernelNodeParamsV2>() - 56usize];
14944 ["Alignment of cudaKernelNodeParamsV2"]
14945 [::std::mem::align_of::<cudaKernelNodeParamsV2>() - 8usize];
14946 ["Offset of field: cudaKernelNodeParamsV2::func"]
14947 [::std::mem::offset_of!(cudaKernelNodeParamsV2, func) - 0usize];
14948 ["Offset of field: cudaKernelNodeParamsV2::gridDim"]
14949 [::std::mem::offset_of!(cudaKernelNodeParamsV2, gridDim) - 8usize];
14950 ["Offset of field: cudaKernelNodeParamsV2::blockDim"]
14951 [::std::mem::offset_of!(cudaKernelNodeParamsV2, blockDim) - 20usize];
14952 ["Offset of field: cudaKernelNodeParamsV2::sharedMemBytes"]
14953 [::std::mem::offset_of!(cudaKernelNodeParamsV2, sharedMemBytes) - 32usize];
14954 ["Offset of field: cudaKernelNodeParamsV2::kernelParams"]
14955 [::std::mem::offset_of!(cudaKernelNodeParamsV2, kernelParams) - 40usize];
14956 ["Offset of field: cudaKernelNodeParamsV2::extra"]
14957 [::std::mem::offset_of!(cudaKernelNodeParamsV2, extra) - 48usize];
14958};
14959#[doc = " External semaphore signal node parameters"]
14960#[repr(C)]
14961#[derive(Debug, Copy, Clone)]
14962pub struct cudaExternalSemaphoreSignalNodeParams {
14963 #[doc = "< Array of external semaphore handles."]
14964 pub extSemArray: *mut cudaExternalSemaphore_t,
14965 #[doc = "< Array of external semaphore signal parameters."]
14966 pub paramsArray: *const cudaExternalSemaphoreSignalParams,
14967 #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
14968 pub numExtSems: ::std::os::raw::c_uint,
14969}
14970#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14971const _: () = {
14972 ["Size of cudaExternalSemaphoreSignalNodeParams"]
14973 [::std::mem::size_of::<cudaExternalSemaphoreSignalNodeParams>() - 24usize];
14974 ["Alignment of cudaExternalSemaphoreSignalNodeParams"]
14975 [::std::mem::align_of::<cudaExternalSemaphoreSignalNodeParams>() - 8usize];
14976 ["Offset of field: cudaExternalSemaphoreSignalNodeParams::extSemArray"]
14977 [::std::mem::offset_of!(cudaExternalSemaphoreSignalNodeParams, extSemArray) - 0usize];
14978 ["Offset of field: cudaExternalSemaphoreSignalNodeParams::paramsArray"]
14979 [::std::mem::offset_of!(cudaExternalSemaphoreSignalNodeParams, paramsArray) - 8usize];
14980 ["Offset of field: cudaExternalSemaphoreSignalNodeParams::numExtSems"]
14981 [::std::mem::offset_of!(cudaExternalSemaphoreSignalNodeParams, numExtSems) - 16usize];
14982};
14983#[doc = " External semaphore signal node parameters"]
14984#[repr(C)]
14985#[derive(Debug, Copy, Clone)]
14986pub struct cudaExternalSemaphoreSignalNodeParamsV2 {
14987 #[doc = "< Array of external semaphore handles."]
14988 pub extSemArray: *mut cudaExternalSemaphore_t,
14989 #[doc = "< Array of external semaphore signal parameters."]
14990 pub paramsArray: *const cudaExternalSemaphoreSignalParams,
14991 #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
14992 pub numExtSems: ::std::os::raw::c_uint,
14993}
14994#[allow(clippy::unnecessary_operation, clippy::identity_op)]
14995const _: () = {
14996 ["Size of cudaExternalSemaphoreSignalNodeParamsV2"]
14997 [::std::mem::size_of::<cudaExternalSemaphoreSignalNodeParamsV2>() - 24usize];
14998 ["Alignment of cudaExternalSemaphoreSignalNodeParamsV2"]
14999 [::std::mem::align_of::<cudaExternalSemaphoreSignalNodeParamsV2>() - 8usize];
15000 ["Offset of field: cudaExternalSemaphoreSignalNodeParamsV2::extSemArray"]
15001 [::std::mem::offset_of!(cudaExternalSemaphoreSignalNodeParamsV2, extSemArray) - 0usize];
15002 ["Offset of field: cudaExternalSemaphoreSignalNodeParamsV2::paramsArray"]
15003 [::std::mem::offset_of!(cudaExternalSemaphoreSignalNodeParamsV2, paramsArray) - 8usize];
15004 ["Offset of field: cudaExternalSemaphoreSignalNodeParamsV2::numExtSems"]
15005 [::std::mem::offset_of!(cudaExternalSemaphoreSignalNodeParamsV2, numExtSems) - 16usize];
15006};
15007#[doc = " External semaphore wait node parameters"]
15008#[repr(C)]
15009#[derive(Debug, Copy, Clone)]
15010pub struct cudaExternalSemaphoreWaitNodeParams {
15011 #[doc = "< Array of external semaphore handles."]
15012 pub extSemArray: *mut cudaExternalSemaphore_t,
15013 #[doc = "< Array of external semaphore wait parameters."]
15014 pub paramsArray: *const cudaExternalSemaphoreWaitParams,
15015 #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
15016 pub numExtSems: ::std::os::raw::c_uint,
15017}
15018#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15019const _: () = {
15020 ["Size of cudaExternalSemaphoreWaitNodeParams"]
15021 [::std::mem::size_of::<cudaExternalSemaphoreWaitNodeParams>() - 24usize];
15022 ["Alignment of cudaExternalSemaphoreWaitNodeParams"]
15023 [::std::mem::align_of::<cudaExternalSemaphoreWaitNodeParams>() - 8usize];
15024 ["Offset of field: cudaExternalSemaphoreWaitNodeParams::extSemArray"]
15025 [::std::mem::offset_of!(cudaExternalSemaphoreWaitNodeParams, extSemArray) - 0usize];
15026 ["Offset of field: cudaExternalSemaphoreWaitNodeParams::paramsArray"]
15027 [::std::mem::offset_of!(cudaExternalSemaphoreWaitNodeParams, paramsArray) - 8usize];
15028 ["Offset of field: cudaExternalSemaphoreWaitNodeParams::numExtSems"]
15029 [::std::mem::offset_of!(cudaExternalSemaphoreWaitNodeParams, numExtSems) - 16usize];
15030};
15031#[doc = " External semaphore wait node parameters"]
15032#[repr(C)]
15033#[derive(Debug, Copy, Clone)]
15034pub struct cudaExternalSemaphoreWaitNodeParamsV2 {
15035 #[doc = "< Array of external semaphore handles."]
15036 pub extSemArray: *mut cudaExternalSemaphore_t,
15037 #[doc = "< Array of external semaphore wait parameters."]
15038 pub paramsArray: *const cudaExternalSemaphoreWaitParams,
15039 #[doc = "< Number of handles and parameters supplied in extSemArray and paramsArray."]
15040 pub numExtSems: ::std::os::raw::c_uint,
15041}
15042#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15043const _: () = {
15044 ["Size of cudaExternalSemaphoreWaitNodeParamsV2"]
15045 [::std::mem::size_of::<cudaExternalSemaphoreWaitNodeParamsV2>() - 24usize];
15046 ["Alignment of cudaExternalSemaphoreWaitNodeParamsV2"]
15047 [::std::mem::align_of::<cudaExternalSemaphoreWaitNodeParamsV2>() - 8usize];
15048 ["Offset of field: cudaExternalSemaphoreWaitNodeParamsV2::extSemArray"]
15049 [::std::mem::offset_of!(cudaExternalSemaphoreWaitNodeParamsV2, extSemArray) - 0usize];
15050 ["Offset of field: cudaExternalSemaphoreWaitNodeParamsV2::paramsArray"]
15051 [::std::mem::offset_of!(cudaExternalSemaphoreWaitNodeParamsV2, paramsArray) - 8usize];
15052 ["Offset of field: cudaExternalSemaphoreWaitNodeParamsV2::numExtSems"]
15053 [::std::mem::offset_of!(cudaExternalSemaphoreWaitNodeParamsV2, numExtSems) - 16usize];
15054};
15055impl cudaGraphConditionalHandleFlags {
15056 #[doc = "< Apply default handle value when graph is launched."]
15057 pub const cudaGraphCondAssignDefault: cudaGraphConditionalHandleFlags =
15058 cudaGraphConditionalHandleFlags(1);
15059}
15060#[repr(transparent)]
15061#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15062pub struct cudaGraphConditionalHandleFlags(pub ::std::os::raw::c_uint);
15063impl cudaGraphConditionalNodeType {
15064 #[doc = "< Conditional 'if' Node. Body executed once if condition value is non-zero."]
15065 pub const cudaGraphCondTypeIf: cudaGraphConditionalNodeType = cudaGraphConditionalNodeType(0);
15066}
15067impl cudaGraphConditionalNodeType {
15068 #[doc = "< Conditional 'while' Node. Body executed repeatedly while condition value is non-zero."]
15069 pub const cudaGraphCondTypeWhile: cudaGraphConditionalNodeType =
15070 cudaGraphConditionalNodeType(1);
15071}
15072#[repr(transparent)]
15073#[doc = " CUDA conditional node types"]
15074#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15075pub struct cudaGraphConditionalNodeType(pub ::std::os::raw::c_uint);
15076#[doc = " CUDA conditional node parameters"]
15077#[repr(C)]
15078#[derive(Debug, Copy, Clone)]
15079pub struct cudaConditionalNodeParams {
15080 #[doc = "< Conditional node handle.\nHandles must be created in advance of creating the node\nusing ::cudaGraphConditionalHandleCreate."]
15081 pub handle: cudaGraphConditionalHandle,
15082 #[doc = "< Type of conditional node."]
15083 pub type_: cudaGraphConditionalNodeType,
15084 #[doc = "< Size of graph output array. Must be 1."]
15085 pub size: ::std::os::raw::c_uint,
15086 #[doc = "< CUDA-owned array populated with conditional node child graphs during creation of the node.\nValid for the lifetime of the conditional node.\nThe contents of the graph(s) are subject to the following constraints:\n\n- Allowed node types are kernel nodes, empty nodes, child graphs, memsets,\nmemcopies, and conditionals. This applies recursively to child graphs and conditional bodies.\n- All kernels, including kernels in nested conditionals or child graphs at any level,\nmust belong to the same CUDA context.\n\nThese graphs may be populated using graph node creation APIs or ::cudaStreamBeginCaptureToGraph."]
15087 pub phGraph_out: *mut cudaGraph_t,
15088}
15089#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15090const _: () = {
15091 ["Size of cudaConditionalNodeParams"]
15092 [::std::mem::size_of::<cudaConditionalNodeParams>() - 24usize];
15093 ["Alignment of cudaConditionalNodeParams"]
15094 [::std::mem::align_of::<cudaConditionalNodeParams>() - 8usize];
15095 ["Offset of field: cudaConditionalNodeParams::handle"]
15096 [::std::mem::offset_of!(cudaConditionalNodeParams, handle) - 0usize];
15097 ["Offset of field: cudaConditionalNodeParams::type_"]
15098 [::std::mem::offset_of!(cudaConditionalNodeParams, type_) - 8usize];
15099 ["Offset of field: cudaConditionalNodeParams::size"]
15100 [::std::mem::offset_of!(cudaConditionalNodeParams, size) - 12usize];
15101 ["Offset of field: cudaConditionalNodeParams::phGraph_out"]
15102 [::std::mem::offset_of!(cudaConditionalNodeParams, phGraph_out) - 16usize];
15103};
15104impl cudaGraphNodeType {
15105 #[doc = "< GPU kernel node"]
15106 pub const cudaGraphNodeTypeKernel: cudaGraphNodeType = cudaGraphNodeType(0);
15107}
15108impl cudaGraphNodeType {
15109 #[doc = "< Memcpy node"]
15110 pub const cudaGraphNodeTypeMemcpy: cudaGraphNodeType = cudaGraphNodeType(1);
15111}
15112impl cudaGraphNodeType {
15113 #[doc = "< Memset node"]
15114 pub const cudaGraphNodeTypeMemset: cudaGraphNodeType = cudaGraphNodeType(2);
15115}
15116impl cudaGraphNodeType {
15117 #[doc = "< Host (executable) node"]
15118 pub const cudaGraphNodeTypeHost: cudaGraphNodeType = cudaGraphNodeType(3);
15119}
15120impl cudaGraphNodeType {
15121 #[doc = "< Node which executes an embedded graph"]
15122 pub const cudaGraphNodeTypeGraph: cudaGraphNodeType = cudaGraphNodeType(4);
15123}
15124impl cudaGraphNodeType {
15125 #[doc = "< Empty (no-op) node"]
15126 pub const cudaGraphNodeTypeEmpty: cudaGraphNodeType = cudaGraphNodeType(5);
15127}
15128impl cudaGraphNodeType {
15129 #[doc = "< External event wait node"]
15130 pub const cudaGraphNodeTypeWaitEvent: cudaGraphNodeType = cudaGraphNodeType(6);
15131}
15132impl cudaGraphNodeType {
15133 #[doc = "< External event record node"]
15134 pub const cudaGraphNodeTypeEventRecord: cudaGraphNodeType = cudaGraphNodeType(7);
15135}
15136impl cudaGraphNodeType {
15137 #[doc = "< External semaphore signal node"]
15138 pub const cudaGraphNodeTypeExtSemaphoreSignal: cudaGraphNodeType = cudaGraphNodeType(8);
15139}
15140impl cudaGraphNodeType {
15141 #[doc = "< External semaphore wait node"]
15142 pub const cudaGraphNodeTypeExtSemaphoreWait: cudaGraphNodeType = cudaGraphNodeType(9);
15143}
15144impl cudaGraphNodeType {
15145 #[doc = "< Memory allocation node"]
15146 pub const cudaGraphNodeTypeMemAlloc: cudaGraphNodeType = cudaGraphNodeType(10);
15147}
15148impl cudaGraphNodeType {
15149 #[doc = "< Memory free node"]
15150 pub const cudaGraphNodeTypeMemFree: cudaGraphNodeType = cudaGraphNodeType(11);
15151}
15152impl cudaGraphNodeType {
15153 #[doc = "< Conditional node\n\nMay be used to implement a conditional execution path or loop\ninside of a graph. The graph(s) contained within the body of the conditional node\ncan be selectively executed or iterated upon based on the value of a conditional\nvariable.\n\nHandles must be created in advance of creating the node\nusing ::cudaGraphConditionalHandleCreate.\n\nThe following restrictions apply to graphs which contain conditional nodes:\nThe graph cannot be used in a child node.\nOnly one instantiation of the graph may exist at any point in time.\nThe graph cannot be cloned.\n\nTo set the control value, supply a default value when creating the handle and/or\ncall ::cudaGraphSetConditional from device code."]
15154 pub const cudaGraphNodeTypeConditional: cudaGraphNodeType = cudaGraphNodeType(13);
15155}
15156impl cudaGraphNodeType {
15157 pub const cudaGraphNodeTypeCount: cudaGraphNodeType = cudaGraphNodeType(14);
15158}
15159#[repr(transparent)]
15160#[doc = " CUDA Graph node types"]
15161#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15162pub struct cudaGraphNodeType(pub ::std::os::raw::c_uint);
15163#[doc = " Child graph node parameters"]
15164#[repr(C)]
15165#[derive(Debug, Copy, Clone)]
15166pub struct cudaChildGraphNodeParams {
15167 #[doc = "< The child graph to clone into the node for node creation, or\na handle to the graph owned by the node for node query"]
15168 pub graph: cudaGraph_t,
15169}
15170#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15171const _: () = {
15172 ["Size of cudaChildGraphNodeParams"]
15173 [::std::mem::size_of::<cudaChildGraphNodeParams>() - 8usize];
15174 ["Alignment of cudaChildGraphNodeParams"]
15175 [::std::mem::align_of::<cudaChildGraphNodeParams>() - 8usize];
15176 ["Offset of field: cudaChildGraphNodeParams::graph"]
15177 [::std::mem::offset_of!(cudaChildGraphNodeParams, graph) - 0usize];
15178};
15179#[doc = " Event record node parameters"]
15180#[repr(C)]
15181#[derive(Debug, Copy, Clone)]
15182pub struct cudaEventRecordNodeParams {
15183 #[doc = "< The event to record when the node executes"]
15184 pub event: cudaEvent_t,
15185}
15186#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15187const _: () = {
15188 ["Size of cudaEventRecordNodeParams"]
15189 [::std::mem::size_of::<cudaEventRecordNodeParams>() - 8usize];
15190 ["Alignment of cudaEventRecordNodeParams"]
15191 [::std::mem::align_of::<cudaEventRecordNodeParams>() - 8usize];
15192 ["Offset of field: cudaEventRecordNodeParams::event"]
15193 [::std::mem::offset_of!(cudaEventRecordNodeParams, event) - 0usize];
15194};
15195#[doc = " Event wait node parameters"]
15196#[repr(C)]
15197#[derive(Debug, Copy, Clone)]
15198pub struct cudaEventWaitNodeParams {
15199 #[doc = "< The event to wait on from the node"]
15200 pub event: cudaEvent_t,
15201}
15202#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15203const _: () = {
15204 ["Size of cudaEventWaitNodeParams"][::std::mem::size_of::<cudaEventWaitNodeParams>() - 8usize];
15205 ["Alignment of cudaEventWaitNodeParams"]
15206 [::std::mem::align_of::<cudaEventWaitNodeParams>() - 8usize];
15207 ["Offset of field: cudaEventWaitNodeParams::event"]
15208 [::std::mem::offset_of!(cudaEventWaitNodeParams, event) - 0usize];
15209};
15210#[doc = " Graph node parameters. See ::cudaGraphAddNode."]
15211#[repr(C)]
15212#[derive(Copy, Clone)]
15213pub struct cudaGraphNodeParams {
15214 #[doc = "< Type of the node"]
15215 pub type_: cudaGraphNodeType,
15216 #[doc = "< Reserved. Must be zero."]
15217 pub reserved0: [::std::os::raw::c_int; 3usize],
15218 pub __bindgen_anon_1: cudaGraphNodeParams__bindgen_ty_1,
15219 #[doc = "< Reserved bytes. Must be zero."]
15220 pub reserved2: ::std::os::raw::c_longlong,
15221}
15222#[repr(C)]
15223#[derive(Copy, Clone)]
15224pub union cudaGraphNodeParams__bindgen_ty_1 {
15225 #[doc = "< Padding. Unused bytes must be zero."]
15226 pub reserved1: [::std::os::raw::c_longlong; 29usize],
15227 #[doc = "< Kernel node parameters."]
15228 pub kernel: cudaKernelNodeParamsV2,
15229 #[doc = "< Memcpy node parameters."]
15230 pub memcpy: cudaMemcpyNodeParams,
15231 #[doc = "< Memset node parameters."]
15232 pub memset: cudaMemsetParamsV2,
15233 #[doc = "< Host node parameters."]
15234 pub host: cudaHostNodeParamsV2,
15235 #[doc = "< Child graph node parameters."]
15236 pub graph: cudaChildGraphNodeParams,
15237 #[doc = "< Event wait node parameters."]
15238 pub eventWait: cudaEventWaitNodeParams,
15239 #[doc = "< Event record node parameters."]
15240 pub eventRecord: cudaEventRecordNodeParams,
15241 #[doc = "< External semaphore signal node parameters."]
15242 pub extSemSignal: cudaExternalSemaphoreSignalNodeParamsV2,
15243 #[doc = "< External semaphore wait node parameters."]
15244 pub extSemWait: cudaExternalSemaphoreWaitNodeParamsV2,
15245 #[doc = "< Memory allocation node parameters."]
15246 pub alloc: cudaMemAllocNodeParamsV2,
15247 #[doc = "< Memory free node parameters."]
15248 pub free: cudaMemFreeNodeParams,
15249 #[doc = "< Conditional node parameters."]
15250 pub conditional: cudaConditionalNodeParams,
15251}
15252#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15253const _: () = {
15254 ["Size of cudaGraphNodeParams__bindgen_ty_1"]
15255 [::std::mem::size_of::<cudaGraphNodeParams__bindgen_ty_1>() - 232usize];
15256 ["Alignment of cudaGraphNodeParams__bindgen_ty_1"]
15257 [::std::mem::align_of::<cudaGraphNodeParams__bindgen_ty_1>() - 8usize];
15258 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::reserved1"]
15259 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, reserved1) - 0usize];
15260 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::kernel"]
15261 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, kernel) - 0usize];
15262 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::memcpy"]
15263 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, memcpy) - 0usize];
15264 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::memset"]
15265 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, memset) - 0usize];
15266 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::host"]
15267 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, host) - 0usize];
15268 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::graph"]
15269 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, graph) - 0usize];
15270 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::eventWait"]
15271 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, eventWait) - 0usize];
15272 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::eventRecord"]
15273 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, eventRecord) - 0usize];
15274 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::extSemSignal"]
15275 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, extSemSignal) - 0usize];
15276 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::extSemWait"]
15277 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, extSemWait) - 0usize];
15278 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::alloc"]
15279 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, alloc) - 0usize];
15280 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::free"]
15281 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, free) - 0usize];
15282 ["Offset of field: cudaGraphNodeParams__bindgen_ty_1::conditional"]
15283 [::std::mem::offset_of!(cudaGraphNodeParams__bindgen_ty_1, conditional) - 0usize];
15284};
15285#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15286const _: () = {
15287 ["Size of cudaGraphNodeParams"][::std::mem::size_of::<cudaGraphNodeParams>() - 256usize];
15288 ["Alignment of cudaGraphNodeParams"][::std::mem::align_of::<cudaGraphNodeParams>() - 8usize];
15289 ["Offset of field: cudaGraphNodeParams::type_"]
15290 [::std::mem::offset_of!(cudaGraphNodeParams, type_) - 0usize];
15291 ["Offset of field: cudaGraphNodeParams::reserved0"]
15292 [::std::mem::offset_of!(cudaGraphNodeParams, reserved0) - 4usize];
15293 ["Offset of field: cudaGraphNodeParams::reserved2"]
15294 [::std::mem::offset_of!(cudaGraphNodeParams, reserved2) - 248usize];
15295};
15296impl cudaGraphDependencyType_enum {
15297 #[doc = "< This is an ordinary dependency."]
15298 pub const cudaGraphDependencyTypeDefault: cudaGraphDependencyType_enum =
15299 cudaGraphDependencyType_enum(0);
15300}
15301impl cudaGraphDependencyType_enum {
15302 #[doc = "< This dependency type allows the downstream node to\nuse \\c cudaGridDependencySynchronize(). It may only be used\nbetween kernel nodes, and must be used with either the\n::cudaGraphKernelNodePortProgrammatic or\n::cudaGraphKernelNodePortLaunchCompletion outgoing port."]
15303 pub const cudaGraphDependencyTypeProgrammatic: cudaGraphDependencyType_enum =
15304 cudaGraphDependencyType_enum(1);
15305}
15306#[repr(transparent)]
15307#[doc = " Type annotations that can be applied to graph edges as part of ::cudaGraphEdgeData."]
15308#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15309pub struct cudaGraphDependencyType_enum(pub ::std::os::raw::c_uint);
15310#[doc = " Type annotations that can be applied to graph edges as part of ::cudaGraphEdgeData."]
15311pub use self::cudaGraphDependencyType_enum as cudaGraphDependencyType;
15312#[doc = " Optional annotation for edges in a CUDA graph. Note, all edges implicitly have annotations and\n default to a zero-initialized value if not specified. A zero-initialized struct indicates a\n standard full serialization of two nodes with memory visibility."]
15313#[repr(C)]
15314#[derive(Debug, Copy, Clone)]
15315pub struct cudaGraphEdgeData_st {
15316 #[doc = "< This indicates when the dependency is triggered from the upstream\nnode on the edge. The meaning is specfic to the node type. A value\nof 0 in all cases means full completion of the upstream node, with\nmemory visibility to the downstream node or portion thereof\n(indicated by \\c to_port).\n<br>\nOnly kernel nodes define non-zero ports. A kernel node\ncan use the following output port types:\n::cudaGraphKernelNodePortDefault, ::cudaGraphKernelNodePortProgrammatic,\nor ::cudaGraphKernelNodePortLaunchCompletion."]
15317 pub from_port: ::std::os::raw::c_uchar,
15318 #[doc = "< This indicates what portion of the downstream node is dependent on\nthe upstream node or portion thereof (indicated by \\c from_port). The\nmeaning is specific to the node type. A value of 0 in all cases means\nthe entirety of the downstream node is dependent on the upstream work.\n<br>\nCurrently no node types define non-zero ports. Accordingly, this field\nmust be set to zero."]
15319 pub to_port: ::std::os::raw::c_uchar,
15320 #[doc = "< This should be populated with a value from ::cudaGraphDependencyType. (It\nis typed as char due to compiler-specific layout of bitfields.) See\n::cudaGraphDependencyType."]
15321 pub type_: ::std::os::raw::c_uchar,
15322 #[doc = "< These bytes are unused and must be zeroed. This ensures\ncompatibility if additional fields are added in the future."]
15323 pub reserved: [::std::os::raw::c_uchar; 5usize],
15324}
15325#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15326const _: () = {
15327 ["Size of cudaGraphEdgeData_st"][::std::mem::size_of::<cudaGraphEdgeData_st>() - 8usize];
15328 ["Alignment of cudaGraphEdgeData_st"][::std::mem::align_of::<cudaGraphEdgeData_st>() - 1usize];
15329 ["Offset of field: cudaGraphEdgeData_st::from_port"]
15330 [::std::mem::offset_of!(cudaGraphEdgeData_st, from_port) - 0usize];
15331 ["Offset of field: cudaGraphEdgeData_st::to_port"]
15332 [::std::mem::offset_of!(cudaGraphEdgeData_st, to_port) - 1usize];
15333 ["Offset of field: cudaGraphEdgeData_st::type_"]
15334 [::std::mem::offset_of!(cudaGraphEdgeData_st, type_) - 2usize];
15335 ["Offset of field: cudaGraphEdgeData_st::reserved"]
15336 [::std::mem::offset_of!(cudaGraphEdgeData_st, reserved) - 3usize];
15337};
15338#[doc = " Optional annotation for edges in a CUDA graph. Note, all edges implicitly have annotations and\n default to a zero-initialized value if not specified. A zero-initialized struct indicates a\n standard full serialization of two nodes with memory visibility."]
15339pub type cudaGraphEdgeData = cudaGraphEdgeData_st;
15340#[doc = " CUDA executable (launchable) graph"]
15341pub type cudaGraphExec_t = *mut CUgraphExec_st;
15342impl cudaGraphExecUpdateResult {
15343 #[doc = "< The update succeeded"]
15344 pub const cudaGraphExecUpdateSuccess: cudaGraphExecUpdateResult = cudaGraphExecUpdateResult(0);
15345}
15346impl cudaGraphExecUpdateResult {
15347 #[doc = "< The update failed for an unexpected reason which is described in the return value of the function"]
15348 pub const cudaGraphExecUpdateError: cudaGraphExecUpdateResult = cudaGraphExecUpdateResult(1);
15349}
15350impl cudaGraphExecUpdateResult {
15351 #[doc = "< The update failed because the topology changed"]
15352 pub const cudaGraphExecUpdateErrorTopologyChanged: cudaGraphExecUpdateResult =
15353 cudaGraphExecUpdateResult(2);
15354}
15355impl cudaGraphExecUpdateResult {
15356 #[doc = "< The update failed because a node type changed"]
15357 pub const cudaGraphExecUpdateErrorNodeTypeChanged: cudaGraphExecUpdateResult =
15358 cudaGraphExecUpdateResult(3);
15359}
15360impl cudaGraphExecUpdateResult {
15361 #[doc = "< The update failed because the function of a kernel node changed (CUDA driver < 11.2)"]
15362 pub const cudaGraphExecUpdateErrorFunctionChanged: cudaGraphExecUpdateResult =
15363 cudaGraphExecUpdateResult(4);
15364}
15365impl cudaGraphExecUpdateResult {
15366 #[doc = "< The update failed because the parameters changed in a way that is not supported"]
15367 pub const cudaGraphExecUpdateErrorParametersChanged: cudaGraphExecUpdateResult =
15368 cudaGraphExecUpdateResult(5);
15369}
15370impl cudaGraphExecUpdateResult {
15371 #[doc = "< The update failed because something about the node is not supported"]
15372 pub const cudaGraphExecUpdateErrorNotSupported: cudaGraphExecUpdateResult =
15373 cudaGraphExecUpdateResult(6);
15374}
15375impl cudaGraphExecUpdateResult {
15376 #[doc = "< The update failed because the function of a kernel node changed in an unsupported way"]
15377 pub const cudaGraphExecUpdateErrorUnsupportedFunctionChange: cudaGraphExecUpdateResult =
15378 cudaGraphExecUpdateResult(7);
15379}
15380impl cudaGraphExecUpdateResult {
15381 #[doc = "< The update failed because the node attributes changed in a way that is not supported"]
15382 pub const cudaGraphExecUpdateErrorAttributesChanged: cudaGraphExecUpdateResult =
15383 cudaGraphExecUpdateResult(8);
15384}
15385#[repr(transparent)]
15386#[doc = " CUDA Graph Update error types"]
15387#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15388pub struct cudaGraphExecUpdateResult(pub ::std::os::raw::c_uint);
15389impl cudaGraphInstantiateResult {
15390 #[doc = "< Instantiation succeeded"]
15391 pub const cudaGraphInstantiateSuccess: cudaGraphInstantiateResult =
15392 cudaGraphInstantiateResult(0);
15393}
15394impl cudaGraphInstantiateResult {
15395 #[doc = "< Instantiation failed for an unexpected reason which is described in the return value of the function"]
15396 pub const cudaGraphInstantiateError: cudaGraphInstantiateResult = cudaGraphInstantiateResult(1);
15397}
15398impl cudaGraphInstantiateResult {
15399 #[doc = "< Instantiation failed due to invalid structure, such as cycles"]
15400 pub const cudaGraphInstantiateInvalidStructure: cudaGraphInstantiateResult =
15401 cudaGraphInstantiateResult(2);
15402}
15403impl cudaGraphInstantiateResult {
15404 #[doc = "< Instantiation for device launch failed because the graph contained an unsupported operation"]
15405 pub const cudaGraphInstantiateNodeOperationNotSupported: cudaGraphInstantiateResult =
15406 cudaGraphInstantiateResult(3);
15407}
15408impl cudaGraphInstantiateResult {
15409 #[doc = "< Instantiation for device launch failed due to the nodes belonging to different contexts"]
15410 pub const cudaGraphInstantiateMultipleDevicesNotSupported: cudaGraphInstantiateResult =
15411 cudaGraphInstantiateResult(4);
15412}
15413#[repr(transparent)]
15414#[doc = " Graph instantiation results"]
15415#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15416pub struct cudaGraphInstantiateResult(pub ::std::os::raw::c_uint);
15417#[doc = " Graph instantiation parameters"]
15418#[repr(C)]
15419#[derive(Debug, Copy, Clone)]
15420pub struct cudaGraphInstantiateParams_st {
15421 #[doc = "< Instantiation flags"]
15422 pub flags: ::std::os::raw::c_ulonglong,
15423 #[doc = "< Upload stream"]
15424 pub uploadStream: cudaStream_t,
15425 #[doc = "< The node which caused instantiation to fail, if any"]
15426 pub errNode_out: cudaGraphNode_t,
15427 #[doc = "< Whether instantiation was successful. If it failed, the reason why"]
15428 pub result_out: cudaGraphInstantiateResult,
15429}
15430#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15431const _: () = {
15432 ["Size of cudaGraphInstantiateParams_st"]
15433 [::std::mem::size_of::<cudaGraphInstantiateParams_st>() - 32usize];
15434 ["Alignment of cudaGraphInstantiateParams_st"]
15435 [::std::mem::align_of::<cudaGraphInstantiateParams_st>() - 8usize];
15436 ["Offset of field: cudaGraphInstantiateParams_st::flags"]
15437 [::std::mem::offset_of!(cudaGraphInstantiateParams_st, flags) - 0usize];
15438 ["Offset of field: cudaGraphInstantiateParams_st::uploadStream"]
15439 [::std::mem::offset_of!(cudaGraphInstantiateParams_st, uploadStream) - 8usize];
15440 ["Offset of field: cudaGraphInstantiateParams_st::errNode_out"]
15441 [::std::mem::offset_of!(cudaGraphInstantiateParams_st, errNode_out) - 16usize];
15442 ["Offset of field: cudaGraphInstantiateParams_st::result_out"]
15443 [::std::mem::offset_of!(cudaGraphInstantiateParams_st, result_out) - 24usize];
15444};
15445#[doc = " Graph instantiation parameters"]
15446pub type cudaGraphInstantiateParams = cudaGraphInstantiateParams_st;
15447#[doc = " Result information returned by cudaGraphExecUpdate"]
15448#[repr(C)]
15449#[derive(Debug, Copy, Clone)]
15450pub struct cudaGraphExecUpdateResultInfo_st {
15451 #[doc = " Gives more specific detail when a cuda graph update fails."]
15452 pub result: cudaGraphExecUpdateResult,
15453 #[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."]
15454 pub errorNode: cudaGraphNode_t,
15455 #[doc = " The from node of error edge when the topologies do not match. Otherwise NULL."]
15456 pub errorFromNode: cudaGraphNode_t,
15457}
15458#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15459const _: () = {
15460 ["Size of cudaGraphExecUpdateResultInfo_st"]
15461 [::std::mem::size_of::<cudaGraphExecUpdateResultInfo_st>() - 24usize];
15462 ["Alignment of cudaGraphExecUpdateResultInfo_st"]
15463 [::std::mem::align_of::<cudaGraphExecUpdateResultInfo_st>() - 8usize];
15464 ["Offset of field: cudaGraphExecUpdateResultInfo_st::result"]
15465 [::std::mem::offset_of!(cudaGraphExecUpdateResultInfo_st, result) - 0usize];
15466 ["Offset of field: cudaGraphExecUpdateResultInfo_st::errorNode"]
15467 [::std::mem::offset_of!(cudaGraphExecUpdateResultInfo_st, errorNode) - 8usize];
15468 ["Offset of field: cudaGraphExecUpdateResultInfo_st::errorFromNode"]
15469 [::std::mem::offset_of!(cudaGraphExecUpdateResultInfo_st, errorFromNode) - 16usize];
15470};
15471#[doc = " Result information returned by cudaGraphExecUpdate"]
15472pub type cudaGraphExecUpdateResultInfo = cudaGraphExecUpdateResultInfo_st;
15473#[doc = " CUDA device node handle for device-side node update"]
15474pub type cudaGraphDeviceNode_t = *mut CUgraphDeviceUpdatableNode_st;
15475impl cudaGraphKernelNodeField {
15476 #[doc = "< Invalid field"]
15477 pub const cudaGraphKernelNodeFieldInvalid: cudaGraphKernelNodeField =
15478 cudaGraphKernelNodeField(0);
15479}
15480impl cudaGraphKernelNodeField {
15481 #[doc = "< Grid dimension update"]
15482 pub const cudaGraphKernelNodeFieldGridDim: cudaGraphKernelNodeField =
15483 cudaGraphKernelNodeField(1);
15484}
15485impl cudaGraphKernelNodeField {
15486 #[doc = "< Kernel parameter update"]
15487 pub const cudaGraphKernelNodeFieldParam: cudaGraphKernelNodeField = cudaGraphKernelNodeField(2);
15488}
15489impl cudaGraphKernelNodeField {
15490 #[doc = "< Node enable/disable"]
15491 pub const cudaGraphKernelNodeFieldEnabled: cudaGraphKernelNodeField =
15492 cudaGraphKernelNodeField(3);
15493}
15494#[repr(transparent)]
15495#[doc = " Specifies the field to update when performing multiple node updates from the device"]
15496#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15497pub struct cudaGraphKernelNodeField(pub ::std::os::raw::c_uint);
15498#[doc = " Struct to specify a single node update to pass as part of a larger array to ::cudaGraphKernelNodeUpdatesApply"]
15499#[repr(C)]
15500#[derive(Copy, Clone)]
15501pub struct cudaGraphKernelNodeUpdate {
15502 #[doc = "< Node to update"]
15503 pub node: cudaGraphDeviceNode_t,
15504 #[doc = "< Which type of update to apply. Determines how updateData is interpreted"]
15505 pub field: cudaGraphKernelNodeField,
15506 #[doc = "< Update data to apply. Which field is used depends on field's value"]
15507 pub updateData: cudaGraphKernelNodeUpdate__bindgen_ty_1,
15508}
15509#[repr(C)]
15510#[derive(Copy, Clone)]
15511pub union cudaGraphKernelNodeUpdate__bindgen_ty_1 {
15512 #[doc = "< Grid dimensions"]
15513 pub gridDim: dim3,
15514 #[doc = "< Kernel parameter data"]
15515 pub param: cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1,
15516 #[doc = "< Node enable/disable data. Nonzero if the node should be enabled, 0 if it should be disabled"]
15517 pub isEnabled: ::std::os::raw::c_uint,
15518}
15519#[repr(C)]
15520#[derive(Debug, Copy, Clone)]
15521pub struct cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1 {
15522 #[doc = "< Kernel parameter data to write in"]
15523 pub pValue: *const ::std::os::raw::c_void,
15524 #[doc = "< Offset into the parameter buffer at which to apply the update"]
15525 pub offset: usize,
15526 #[doc = "< Number of bytes to update"]
15527 pub size: usize,
15528}
15529#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15530const _: () = {
15531 ["Size of cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1"]
15532 [::std::mem::size_of::<cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1>() - 24usize];
15533 ["Alignment of cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1"]
15534 [::std::mem::align_of::<cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1>() - 8usize];
15535 ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1::pValue"][::std::mem::offset_of!(
15536 cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1,
15537 pValue
15538 ) - 0usize];
15539 ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1::offset"][::std::mem::offset_of!(
15540 cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1,
15541 offset
15542 ) - 8usize];
15543 ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1::size"][::std::mem::offset_of!(
15544 cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1,
15545 size
15546 ) - 16usize];
15547};
15548#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15549const _: () = {
15550 ["Size of cudaGraphKernelNodeUpdate__bindgen_ty_1"]
15551 [::std::mem::size_of::<cudaGraphKernelNodeUpdate__bindgen_ty_1>() - 24usize];
15552 ["Alignment of cudaGraphKernelNodeUpdate__bindgen_ty_1"]
15553 [::std::mem::align_of::<cudaGraphKernelNodeUpdate__bindgen_ty_1>() - 8usize];
15554 ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1::gridDim"]
15555 [::std::mem::offset_of!(cudaGraphKernelNodeUpdate__bindgen_ty_1, gridDim) - 0usize];
15556 ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1::param"]
15557 [::std::mem::offset_of!(cudaGraphKernelNodeUpdate__bindgen_ty_1, param) - 0usize];
15558 ["Offset of field: cudaGraphKernelNodeUpdate__bindgen_ty_1::isEnabled"]
15559 [::std::mem::offset_of!(cudaGraphKernelNodeUpdate__bindgen_ty_1, isEnabled) - 0usize];
15560};
15561#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15562const _: () = {
15563 ["Size of cudaGraphKernelNodeUpdate"]
15564 [::std::mem::size_of::<cudaGraphKernelNodeUpdate>() - 40usize];
15565 ["Alignment of cudaGraphKernelNodeUpdate"]
15566 [::std::mem::align_of::<cudaGraphKernelNodeUpdate>() - 8usize];
15567 ["Offset of field: cudaGraphKernelNodeUpdate::node"]
15568 [::std::mem::offset_of!(cudaGraphKernelNodeUpdate, node) - 0usize];
15569 ["Offset of field: cudaGraphKernelNodeUpdate::field"]
15570 [::std::mem::offset_of!(cudaGraphKernelNodeUpdate, field) - 8usize];
15571 ["Offset of field: cudaGraphKernelNodeUpdate::updateData"]
15572 [::std::mem::offset_of!(cudaGraphKernelNodeUpdate, updateData) - 16usize];
15573};
15574impl cudaGetDriverEntryPointFlags {
15575 #[doc = "< Default search mode for driver symbols."]
15576 pub const cudaEnableDefault: cudaGetDriverEntryPointFlags = cudaGetDriverEntryPointFlags(0);
15577}
15578impl cudaGetDriverEntryPointFlags {
15579 #[doc = "< Search for legacy versions of driver symbols."]
15580 pub const cudaEnableLegacyStream: cudaGetDriverEntryPointFlags =
15581 cudaGetDriverEntryPointFlags(1);
15582}
15583impl cudaGetDriverEntryPointFlags {
15584 #[doc = "< Search for per-thread versions of driver symbols."]
15585 pub const cudaEnablePerThreadDefaultStream: cudaGetDriverEntryPointFlags =
15586 cudaGetDriverEntryPointFlags(2);
15587}
15588#[repr(transparent)]
15589#[doc = " Flags to specify search options to be used with ::cudaGetDriverEntryPoint\n For more details see ::cuGetProcAddress"]
15590#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15591pub struct cudaGetDriverEntryPointFlags(pub ::std::os::raw::c_uint);
15592impl cudaDriverEntryPointQueryResult {
15593 #[doc = "< Search for symbol found a match"]
15594 pub const cudaDriverEntryPointSuccess: cudaDriverEntryPointQueryResult =
15595 cudaDriverEntryPointQueryResult(0);
15596}
15597impl cudaDriverEntryPointQueryResult {
15598 #[doc = "< Search for symbol was not found"]
15599 pub const cudaDriverEntryPointSymbolNotFound: cudaDriverEntryPointQueryResult =
15600 cudaDriverEntryPointQueryResult(1);
15601}
15602impl cudaDriverEntryPointQueryResult {
15603 #[doc = "< Search for symbol was found but version wasn't great enough"]
15604 pub const cudaDriverEntryPointVersionNotSufficent: cudaDriverEntryPointQueryResult =
15605 cudaDriverEntryPointQueryResult(2);
15606}
15607#[repr(transparent)]
15608#[doc = " Enum for status from obtaining driver entry points, used with ::cudaApiGetDriverEntryPoint"]
15609#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15610pub struct cudaDriverEntryPointQueryResult(pub ::std::os::raw::c_uint);
15611impl cudaGraphDebugDotFlags {
15612 #[doc = "< Output all debug data as if every debug flag is enabled"]
15613 pub const cudaGraphDebugDotFlagsVerbose: cudaGraphDebugDotFlags = cudaGraphDebugDotFlags(1);
15614}
15615impl cudaGraphDebugDotFlags {
15616 #[doc = "< Adds cudaKernelNodeParams to output"]
15617 pub const cudaGraphDebugDotFlagsKernelNodeParams: cudaGraphDebugDotFlags =
15618 cudaGraphDebugDotFlags(4);
15619}
15620impl cudaGraphDebugDotFlags {
15621 #[doc = "< Adds cudaMemcpy3DParms to output"]
15622 pub const cudaGraphDebugDotFlagsMemcpyNodeParams: cudaGraphDebugDotFlags =
15623 cudaGraphDebugDotFlags(8);
15624}
15625impl cudaGraphDebugDotFlags {
15626 #[doc = "< Adds cudaMemsetParams to output"]
15627 pub const cudaGraphDebugDotFlagsMemsetNodeParams: cudaGraphDebugDotFlags =
15628 cudaGraphDebugDotFlags(16);
15629}
15630impl cudaGraphDebugDotFlags {
15631 #[doc = "< Adds cudaHostNodeParams to output"]
15632 pub const cudaGraphDebugDotFlagsHostNodeParams: cudaGraphDebugDotFlags =
15633 cudaGraphDebugDotFlags(32);
15634}
15635impl cudaGraphDebugDotFlags {
15636 #[doc = "< Adds cudaEvent_t handle from record and wait nodes to output"]
15637 pub const cudaGraphDebugDotFlagsEventNodeParams: cudaGraphDebugDotFlags =
15638 cudaGraphDebugDotFlags(64);
15639}
15640impl cudaGraphDebugDotFlags {
15641 #[doc = "< Adds cudaExternalSemaphoreSignalNodeParams values to output"]
15642 pub const cudaGraphDebugDotFlagsExtSemasSignalNodeParams: cudaGraphDebugDotFlags =
15643 cudaGraphDebugDotFlags(128);
15644}
15645impl cudaGraphDebugDotFlags {
15646 #[doc = "< Adds cudaExternalSemaphoreWaitNodeParams to output"]
15647 pub const cudaGraphDebugDotFlagsExtSemasWaitNodeParams: cudaGraphDebugDotFlags =
15648 cudaGraphDebugDotFlags(256);
15649}
15650impl cudaGraphDebugDotFlags {
15651 #[doc = "< Adds cudaKernelNodeAttrID values to output"]
15652 pub const cudaGraphDebugDotFlagsKernelNodeAttributes: cudaGraphDebugDotFlags =
15653 cudaGraphDebugDotFlags(512);
15654}
15655impl cudaGraphDebugDotFlags {
15656 #[doc = "< Adds node handles and every kernel function handle to output"]
15657 pub const cudaGraphDebugDotFlagsHandles: cudaGraphDebugDotFlags = cudaGraphDebugDotFlags(1024);
15658}
15659impl cudaGraphDebugDotFlags {
15660 #[doc = "< Adds cudaConditionalNodeParams to output"]
15661 pub const cudaGraphDebugDotFlagsConditionalNodeParams: cudaGraphDebugDotFlags =
15662 cudaGraphDebugDotFlags(32768);
15663}
15664#[repr(transparent)]
15665#[doc = " CUDA Graph debug write options"]
15666#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15667pub struct cudaGraphDebugDotFlags(pub ::std::os::raw::c_uint);
15668impl cudaGraphInstantiateFlags {
15669 #[doc = "< Automatically free memory allocated in a graph before relaunching."]
15670 pub const cudaGraphInstantiateFlagAutoFreeOnLaunch: cudaGraphInstantiateFlags =
15671 cudaGraphInstantiateFlags(1);
15672}
15673impl cudaGraphInstantiateFlags {
15674 #[doc = "< Automatically upload the graph after instantiation. Only supported by\n::cudaGraphInstantiateWithParams. The upload will be performed using the\nstream provided in \\p instantiateParams."]
15675 pub const cudaGraphInstantiateFlagUpload: cudaGraphInstantiateFlags =
15676 cudaGraphInstantiateFlags(2);
15677}
15678impl cudaGraphInstantiateFlags {
15679 #[doc = "< Instantiate the graph to be launchable from the device. This flag can only\nbe used on platforms which support unified addressing. This flag cannot be\nused in conjunction with cudaGraphInstantiateFlagAutoFreeOnLaunch."]
15680 pub const cudaGraphInstantiateFlagDeviceLaunch: cudaGraphInstantiateFlags =
15681 cudaGraphInstantiateFlags(4);
15682}
15683impl cudaGraphInstantiateFlags {
15684 #[doc = "< Run the graph using the per-node priority attributes rather than the\npriority of the stream it is launched into."]
15685 pub const cudaGraphInstantiateFlagUseNodePriority: cudaGraphInstantiateFlags =
15686 cudaGraphInstantiateFlags(8);
15687}
15688#[repr(transparent)]
15689#[doc = " Flags for instantiating a graph"]
15690#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15691pub struct cudaGraphInstantiateFlags(pub ::std::os::raw::c_uint);
15692impl cudaLaunchMemSyncDomain {
15693 #[doc = "< Launch kernels in the default domain"]
15694 pub const cudaLaunchMemSyncDomainDefault: cudaLaunchMemSyncDomain = cudaLaunchMemSyncDomain(0);
15695}
15696impl cudaLaunchMemSyncDomain {
15697 #[doc = "< Launch kernels in the remote domain"]
15698 pub const cudaLaunchMemSyncDomainRemote: cudaLaunchMemSyncDomain = cudaLaunchMemSyncDomain(1);
15699}
15700#[repr(transparent)]
15701#[doc = " Memory Synchronization Domain\n\n A kernel can be launched in a specified memory synchronization domain that affects all memory operations issued by\n that kernel. A memory barrier issued in one domain will only order memory operations in that domain, thus eliminating\n latency increase from memory barriers ordering unrelated traffic.\n\n By default, kernels are launched in domain 0. Kernel launched with ::cudaLaunchMemSyncDomainRemote will have a\n different domain ID. User may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for a specific stream /\n graph node / kernel launch. See ::cudaLaunchAttributeMemSyncDomain, ::cudaStreamSetAttribute, ::cudaLaunchKernelEx,\n ::cudaGraphKernelNodeSetAttribute.\n\n Memory operations done in kernels launched in different domains are considered system-scope distanced. In other\n words, a GPU scoped memory synchronization is not sufficient for memory order to be observed by kernels in another\n memory synchronization domain even if they are on the same GPU."]
15702#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15703pub struct cudaLaunchMemSyncDomain(pub ::std::os::raw::c_uint);
15704#[doc = " Memory Synchronization Domain map\n\n See ::cudaLaunchMemSyncDomain.\n\n By default, kernels are launched in domain 0. Kernel launched with ::cudaLaunchMemSyncDomainRemote will have a\n different domain ID. User may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for a specific stream /\n graph node / kernel launch. See ::cudaLaunchAttributeMemSyncDomainMap.\n\n Domain ID range is available through ::cudaDevAttrMemSyncDomainCount."]
15705#[repr(C)]
15706#[derive(Debug, Copy, Clone)]
15707pub struct cudaLaunchMemSyncDomainMap_st {
15708 #[doc = "< The default domain ID to use for designated kernels"]
15709 pub default_: ::std::os::raw::c_uchar,
15710 #[doc = "< The remote domain ID to use for designated kernels"]
15711 pub remote: ::std::os::raw::c_uchar,
15712}
15713#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15714const _: () = {
15715 ["Size of cudaLaunchMemSyncDomainMap_st"]
15716 [::std::mem::size_of::<cudaLaunchMemSyncDomainMap_st>() - 2usize];
15717 ["Alignment of cudaLaunchMemSyncDomainMap_st"]
15718 [::std::mem::align_of::<cudaLaunchMemSyncDomainMap_st>() - 1usize];
15719 ["Offset of field: cudaLaunchMemSyncDomainMap_st::default_"]
15720 [::std::mem::offset_of!(cudaLaunchMemSyncDomainMap_st, default_) - 0usize];
15721 ["Offset of field: cudaLaunchMemSyncDomainMap_st::remote"]
15722 [::std::mem::offset_of!(cudaLaunchMemSyncDomainMap_st, remote) - 1usize];
15723};
15724#[doc = " Memory Synchronization Domain map\n\n See ::cudaLaunchMemSyncDomain.\n\n By default, kernels are launched in domain 0. Kernel launched with ::cudaLaunchMemSyncDomainRemote will have a\n different domain ID. User may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for a specific stream /\n graph node / kernel launch. See ::cudaLaunchAttributeMemSyncDomainMap.\n\n Domain ID range is available through ::cudaDevAttrMemSyncDomainCount."]
15725pub type cudaLaunchMemSyncDomainMap = cudaLaunchMemSyncDomainMap_st;
15726impl cudaLaunchAttributeID {
15727 #[doc = "< Ignored entry, for convenient composition"]
15728 pub const cudaLaunchAttributeIgnore: cudaLaunchAttributeID = cudaLaunchAttributeID(0);
15729}
15730impl cudaLaunchAttributeID {
15731 #[doc = "< Valid for streams, graph nodes, launches. See\n::cudaLaunchAttributeValue::accessPolicyWindow."]
15732 pub const cudaLaunchAttributeAccessPolicyWindow: cudaLaunchAttributeID =
15733 cudaLaunchAttributeID(1);
15734}
15735impl cudaLaunchAttributeID {
15736 #[doc = "< Valid for graph nodes, launches. See\n::cudaLaunchAttributeValue::cooperative."]
15737 pub const cudaLaunchAttributeCooperative: cudaLaunchAttributeID = cudaLaunchAttributeID(2);
15738}
15739impl cudaLaunchAttributeID {
15740 #[doc = "< Valid for streams. See ::cudaLaunchAttributeValue::syncPolicy."]
15741 pub const cudaLaunchAttributeSynchronizationPolicy: cudaLaunchAttributeID =
15742 cudaLaunchAttributeID(3);
15743}
15744impl cudaLaunchAttributeID {
15745 #[doc = "< Valid for graph nodes, launches. See\n::cudaLaunchAttributeValue::clusterDim."]
15746 pub const cudaLaunchAttributeClusterDimension: cudaLaunchAttributeID = cudaLaunchAttributeID(4);
15747}
15748impl cudaLaunchAttributeID {
15749 #[doc = "< Valid for graph nodes, launches. See\n::cudaLaunchAttributeValue::clusterSchedulingPolicyPreference."]
15750 pub const cudaLaunchAttributeClusterSchedulingPolicyPreference: cudaLaunchAttributeID =
15751 cudaLaunchAttributeID(5);
15752}
15753impl cudaLaunchAttributeID {
15754 #[doc = "< Valid for launches. Setting\n::cudaLaunchAttributeValue::programmaticStreamSerializationAllowed\nto non-0 signals that the kernel will use programmatic\nmeans to resolve its stream dependency, so that the\nCUDA runtime should opportunistically allow the grid's\nexecution to overlap with the previous kernel in the\nstream, if that kernel requests the overlap. The\ndependent launches can choose to wait on the\ndependency using the programmatic sync\n(cudaGridDependencySynchronize() or equivalent PTX\ninstructions)."]
15755 pub const cudaLaunchAttributeProgrammaticStreamSerialization: cudaLaunchAttributeID =
15756 cudaLaunchAttributeID(6);
15757}
15758impl cudaLaunchAttributeID {
15759 #[doc = "< Valid for launches. Set\n::cudaLaunchAttributeValue::programmaticEvent to\nrecord the event. Event recorded through this launch\nattribute is guaranteed to only trigger after all\nblock in the associated kernel trigger the event. A\nblock can trigger the event programmatically in a\nfuture CUDA release. A trigger can also be inserted at\nthe beginning of each block's execution if\ntriggerAtBlockStart is set to non-0. The dependent\nlaunches can choose to wait on the dependency using\nthe programmatic sync (cudaGridDependencySynchronize()\nor equivalent PTX instructions). Note that dependents\n(including the CPU thread calling\ncudaEventSynchronize()) are not guaranteed to observe\nthe release precisely when it is released. For\nexample, cudaEventSynchronize() may only observe the\nevent trigger long after the associated kernel has\ncompleted. This recording type is primarily meant for\nestablishing programmatic dependency between device\ntasks. Note also this type of dependency allows, but\ndoes not guarantee, concurrent execution of tasks.\n<br>\nThe event supplied must not be an interprocess or\ninterop event. The event must disable timing (i.e.\nmust be created with the ::cudaEventDisableTiming flag\nset)."]
15760 pub const cudaLaunchAttributeProgrammaticEvent: cudaLaunchAttributeID =
15761 cudaLaunchAttributeID(7);
15762}
15763impl cudaLaunchAttributeID {
15764 #[doc = "< Valid for streams, graph nodes, launches. See\n::cudaLaunchAttributeValue::priority."]
15765 pub const cudaLaunchAttributePriority: cudaLaunchAttributeID = cudaLaunchAttributeID(8);
15766}
15767impl cudaLaunchAttributeID {
15768 #[doc = "< Valid for streams, graph nodes, launches. See\n::cudaLaunchAttributeValue::memSyncDomainMap."]
15769 pub const cudaLaunchAttributeMemSyncDomainMap: cudaLaunchAttributeID = cudaLaunchAttributeID(9);
15770}
15771impl cudaLaunchAttributeID {
15772 #[doc = "< Valid for streams, graph nodes, launches. See\n::cudaLaunchAttributeValue::memSyncDomain."]
15773 pub const cudaLaunchAttributeMemSyncDomain: cudaLaunchAttributeID = cudaLaunchAttributeID(10);
15774}
15775impl cudaLaunchAttributeID {
15776 #[doc = "< Valid for launches. Set\n::cudaLaunchAttributeValue::launchCompletionEvent to record the\nevent.\n<br>\nNominally, the event is triggered once all blocks of the kernel\nhave begun execution. Currently this is a best effort. If a kernel\nB has a launch completion dependency on a kernel A, B may wait\nuntil A is complete. Alternatively, blocks of B may begin before\nall blocks of A have begun, for example if B can claim execution\nresources unavailable to A (e.g. they run on different GPUs) or\nif B is a higher priority than A.\nExercise caution if such an ordering inversion could lead\nto deadlock.\n<br>\nA launch completion event is nominally similar to a programmatic\nevent with \\c triggerAtBlockStart set except that it is not\nvisible to \\c cudaGridDependencySynchronize() and can be used with\ncompute capability less than 9.0.\n<br>\nThe event supplied must not be an interprocess or interop event.\nThe event must disable timing (i.e. must be created with the\n::cudaEventDisableTiming flag set)."]
15777 pub const cudaLaunchAttributeLaunchCompletionEvent: cudaLaunchAttributeID =
15778 cudaLaunchAttributeID(12);
15779}
15780impl cudaLaunchAttributeID {
15781 #[doc = "< Valid for graph nodes, launches. This attribute is graphs-only,\nand passing it to a launch in a non-capturing stream will result\nin an error.\n<br>\n:cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable can\nonly be set to 0 or 1. Setting the field to 1 indicates that the\ncorresponding kernel node should be device-updatable. On success, a handle\nwill be returned via\n::cudaLaunchAttributeValue::deviceUpdatableKernelNode::devNode which can be\npassed to the various device-side update functions to update the node's\nkernel parameters from within another kernel. For more information on the\ntypes of device updates that can be made, as well as the relevant limitations\nthereof, see ::cudaGraphKernelNodeUpdatesApply.\n<br>\nNodes which are device-updatable have additional restrictions compared to\nregular kernel nodes. Firstly, device-updatable nodes cannot be removed\nfrom their graph via ::cudaGraphDestroyNode. Additionally, once opted-in\nto this functionality, a node cannot opt out, and any attempt to set the\ndeviceUpdatable attribute to 0 will result in an error. Device-updatable\nkernel nodes also cannot have their attributes copied to/from another kernel\nnode via ::cudaGraphKernelNodeCopyAttributes. Graphs containing one or more\ndevice-updatable nodes also do not allow multiple instantiation, and neither\nthe graph nor its instantiated version can be passed to ::cudaGraphExecUpdate.\n<br>\nIf a graph contains device-updatable nodes and updates those nodes from the device\nfrom within the graph, the graph must be uploaded with ::cuGraphUpload before it\nis launched. For such a graph, if host-side executable graph updates are made to the\ndevice-updatable nodes, the graph must be uploaded before it is launched again."]
15782 pub const cudaLaunchAttributeDeviceUpdatableKernelNode: cudaLaunchAttributeID =
15783 cudaLaunchAttributeID(13);
15784}
15785impl cudaLaunchAttributeID {
15786 #[doc = "< Valid for launches. On devices where the L1 cache and shared memory use the\nsame hardware resources, setting ::cudaLaunchAttributeValue::sharedMemCarveout\nto a percentage between 0-100 signals sets the shared memory carveout\npreference in percent of the total shared memory for that kernel launch.\nThis attribute takes precedence over ::cudaFuncAttributePreferredSharedMemoryCarveout.\nThis is only a hint, and the driver can choose a different configuration if\nrequired for the launch."]
15787 pub const cudaLaunchAttributePreferredSharedMemoryCarveout: cudaLaunchAttributeID =
15788 cudaLaunchAttributeID(14);
15789}
15790#[repr(transparent)]
15791#[doc = " Launch attributes enum; used as id field of ::cudaLaunchAttribute"]
15792#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
15793pub struct cudaLaunchAttributeID(pub ::std::os::raw::c_uint);
15794#[doc = " Launch attributes union; used as value field of ::cudaLaunchAttribute"]
15795#[repr(C)]
15796#[derive(Copy, Clone)]
15797pub union cudaLaunchAttributeValue {
15798 pub pad: [::std::os::raw::c_char; 64usize],
15799 #[doc = "< Value of launch attribute ::cudaLaunchAttributeAccessPolicyWindow."]
15800 pub accessPolicyWindow: cudaAccessPolicyWindow,
15801 #[doc = "< Value of launch attribute ::cudaLaunchAttributeCooperative. Nonzero indicates a cooperative\nkernel (see ::cudaLaunchCooperativeKernel)."]
15802 pub cooperative: ::std::os::raw::c_int,
15803 #[doc = "< Value of launch attribute\n::cudaLaunchAttributeSynchronizationPolicy. ::cudaSynchronizationPolicy\nfor work queued up in this stream."]
15804 pub syncPolicy: cudaSynchronizationPolicy,
15805 pub clusterDim: cudaLaunchAttributeValue__bindgen_ty_1,
15806 #[doc = "< Value of launch attribute\n::cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster\nscheduling policy preference for the kernel."]
15807 pub clusterSchedulingPolicyPreference: cudaClusterSchedulingPolicy,
15808 #[doc = "< Value of launch attribute\n::cudaLaunchAttributeProgrammaticStreamSerialization."]
15809 pub programmaticStreamSerializationAllowed: ::std::os::raw::c_int,
15810 pub programmaticEvent: cudaLaunchAttributeValue__bindgen_ty_2,
15811 #[doc = "< Value of launch attribute ::cudaLaunchAttributePriority. Execution priority of the kernel."]
15812 pub priority: ::std::os::raw::c_int,
15813 #[doc = "< Value of launch attribute\n::cudaLaunchAttributeMemSyncDomainMap. See\n::cudaLaunchMemSyncDomainMap."]
15814 pub memSyncDomainMap: cudaLaunchMemSyncDomainMap,
15815 #[doc = "< Value of launch attribute ::cudaLaunchAttributeMemSyncDomain. See\n::cudaLaunchMemSyncDomain."]
15816 pub memSyncDomain: cudaLaunchMemSyncDomain,
15817 pub launchCompletionEvent: cudaLaunchAttributeValue__bindgen_ty_3,
15818 pub deviceUpdatableKernelNode: cudaLaunchAttributeValue__bindgen_ty_4,
15819 #[doc = "< Value of launch attribute ::cudaLaunchAttributePreferredSharedMemoryCarveout."]
15820 pub sharedMemCarveout: ::std::os::raw::c_uint,
15821}
15822#[doc = " Value of launch attribute ::cudaLaunchAttributeClusterDimension that\n represents the desired cluster dimensions for the kernel. Opaque type\n with the following fields:\n - \\p x - The X dimension of the cluster, in blocks. Must be a divisor\n of the grid X dimension.\n - \\p y - The Y dimension of the cluster, in blocks. Must be a divisor\n of the grid Y dimension.\n - \\p z - The Z dimension of the cluster, in blocks. Must be a divisor\n of the grid Z dimension."]
15823#[repr(C)]
15824#[derive(Debug, Copy, Clone)]
15825pub struct cudaLaunchAttributeValue__bindgen_ty_1 {
15826 pub x: ::std::os::raw::c_uint,
15827 pub y: ::std::os::raw::c_uint,
15828 pub z: ::std::os::raw::c_uint,
15829}
15830#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15831const _: () = {
15832 ["Size of cudaLaunchAttributeValue__bindgen_ty_1"]
15833 [::std::mem::size_of::<cudaLaunchAttributeValue__bindgen_ty_1>() - 12usize];
15834 ["Alignment of cudaLaunchAttributeValue__bindgen_ty_1"]
15835 [::std::mem::align_of::<cudaLaunchAttributeValue__bindgen_ty_1>() - 4usize];
15836 ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_1::x"]
15837 [::std::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_1, x) - 0usize];
15838 ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_1::y"]
15839 [::std::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_1, y) - 4usize];
15840 ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_1::z"]
15841 [::std::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_1, z) - 8usize];
15842};
15843#[doc = " Value of launch attribute ::cudaLaunchAttributeProgrammaticEvent\n with the following fields:\n - \\p cudaEvent_t event - Event to fire when all blocks trigger it.\n - \\p int flags; - Event record flags, see ::cudaEventRecordWithFlags. Does not accept\n ::cudaEventRecordExternal.\n - \\p int triggerAtBlockStart - If this is set to non-0, each block launch will automatically trigger the event."]
15844#[repr(C)]
15845#[derive(Debug, Copy, Clone)]
15846pub struct cudaLaunchAttributeValue__bindgen_ty_2 {
15847 pub event: cudaEvent_t,
15848 pub flags: ::std::os::raw::c_int,
15849 pub triggerAtBlockStart: ::std::os::raw::c_int,
15850}
15851#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15852const _: () = {
15853 ["Size of cudaLaunchAttributeValue__bindgen_ty_2"]
15854 [::std::mem::size_of::<cudaLaunchAttributeValue__bindgen_ty_2>() - 16usize];
15855 ["Alignment of cudaLaunchAttributeValue__bindgen_ty_2"]
15856 [::std::mem::align_of::<cudaLaunchAttributeValue__bindgen_ty_2>() - 8usize];
15857 ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_2::event"]
15858 [::std::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_2, event) - 0usize];
15859 ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_2::flags"]
15860 [::std::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_2, flags) - 8usize];
15861 ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_2::triggerAtBlockStart"][::std::mem::offset_of!(
15862 cudaLaunchAttributeValue__bindgen_ty_2,
15863 triggerAtBlockStart
15864 ) - 12usize];
15865};
15866#[doc = " Value of launch attribute ::cudaLaunchAttributeLaunchCompletionEvent\n with the following fields:\n - \\p cudaEvent_t event - Event to fire when the last block launches.\n - \\p int flags - Event record flags, see ::cudaEventRecordWithFlags. Does not accept\n ::cudaEventRecordExternal."]
15867#[repr(C)]
15868#[derive(Debug, Copy, Clone)]
15869pub struct cudaLaunchAttributeValue__bindgen_ty_3 {
15870 pub event: cudaEvent_t,
15871 pub flags: ::std::os::raw::c_int,
15872}
15873#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15874const _: () = {
15875 ["Size of cudaLaunchAttributeValue__bindgen_ty_3"]
15876 [::std::mem::size_of::<cudaLaunchAttributeValue__bindgen_ty_3>() - 16usize];
15877 ["Alignment of cudaLaunchAttributeValue__bindgen_ty_3"]
15878 [::std::mem::align_of::<cudaLaunchAttributeValue__bindgen_ty_3>() - 8usize];
15879 ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_3::event"]
15880 [::std::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_3, event) - 0usize];
15881 ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_3::flags"]
15882 [::std::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_3, flags) - 8usize];
15883};
15884#[doc = " Value of launch attribute ::cudaLaunchAttributeDeviceUpdatableKernelNode\n with the following fields:\n - \\p int deviceUpdatable - Whether or not the resulting kernel node should be device-updatable.\n - \\p cudaGraphDeviceNode_t devNode - Returns a handle to pass to the various device-side update functions."]
15885#[repr(C)]
15886#[derive(Debug, Copy, Clone)]
15887pub struct cudaLaunchAttributeValue__bindgen_ty_4 {
15888 pub deviceUpdatable: ::std::os::raw::c_int,
15889 pub devNode: cudaGraphDeviceNode_t,
15890}
15891#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15892const _: () = {
15893 ["Size of cudaLaunchAttributeValue__bindgen_ty_4"]
15894 [::std::mem::size_of::<cudaLaunchAttributeValue__bindgen_ty_4>() - 16usize];
15895 ["Alignment of cudaLaunchAttributeValue__bindgen_ty_4"]
15896 [::std::mem::align_of::<cudaLaunchAttributeValue__bindgen_ty_4>() - 8usize];
15897 ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_4::deviceUpdatable"]
15898 [::std::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_4, deviceUpdatable) - 0usize];
15899 ["Offset of field: cudaLaunchAttributeValue__bindgen_ty_4::devNode"]
15900 [::std::mem::offset_of!(cudaLaunchAttributeValue__bindgen_ty_4, devNode) - 8usize];
15901};
15902#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15903const _: () = {
15904 ["Size of cudaLaunchAttributeValue"]
15905 [::std::mem::size_of::<cudaLaunchAttributeValue>() - 64usize];
15906 ["Alignment of cudaLaunchAttributeValue"]
15907 [::std::mem::align_of::<cudaLaunchAttributeValue>() - 8usize];
15908 ["Offset of field: cudaLaunchAttributeValue::pad"]
15909 [::std::mem::offset_of!(cudaLaunchAttributeValue, pad) - 0usize];
15910 ["Offset of field: cudaLaunchAttributeValue::accessPolicyWindow"]
15911 [::std::mem::offset_of!(cudaLaunchAttributeValue, accessPolicyWindow) - 0usize];
15912 ["Offset of field: cudaLaunchAttributeValue::cooperative"]
15913 [::std::mem::offset_of!(cudaLaunchAttributeValue, cooperative) - 0usize];
15914 ["Offset of field: cudaLaunchAttributeValue::syncPolicy"]
15915 [::std::mem::offset_of!(cudaLaunchAttributeValue, syncPolicy) - 0usize];
15916 ["Offset of field: cudaLaunchAttributeValue::clusterDim"]
15917 [::std::mem::offset_of!(cudaLaunchAttributeValue, clusterDim) - 0usize];
15918 ["Offset of field: cudaLaunchAttributeValue::clusterSchedulingPolicyPreference"][::std::mem::offset_of!(
15919 cudaLaunchAttributeValue,
15920 clusterSchedulingPolicyPreference
15921 ) - 0usize];
15922 ["Offset of field: cudaLaunchAttributeValue::programmaticStreamSerializationAllowed"][::std::mem::offset_of!(
15923 cudaLaunchAttributeValue,
15924 programmaticStreamSerializationAllowed
15925 )
15926 - 0usize];
15927 ["Offset of field: cudaLaunchAttributeValue::programmaticEvent"]
15928 [::std::mem::offset_of!(cudaLaunchAttributeValue, programmaticEvent) - 0usize];
15929 ["Offset of field: cudaLaunchAttributeValue::priority"]
15930 [::std::mem::offset_of!(cudaLaunchAttributeValue, priority) - 0usize];
15931 ["Offset of field: cudaLaunchAttributeValue::memSyncDomainMap"]
15932 [::std::mem::offset_of!(cudaLaunchAttributeValue, memSyncDomainMap) - 0usize];
15933 ["Offset of field: cudaLaunchAttributeValue::memSyncDomain"]
15934 [::std::mem::offset_of!(cudaLaunchAttributeValue, memSyncDomain) - 0usize];
15935 ["Offset of field: cudaLaunchAttributeValue::launchCompletionEvent"]
15936 [::std::mem::offset_of!(cudaLaunchAttributeValue, launchCompletionEvent) - 0usize];
15937 ["Offset of field: cudaLaunchAttributeValue::deviceUpdatableKernelNode"]
15938 [::std::mem::offset_of!(cudaLaunchAttributeValue, deviceUpdatableKernelNode) - 0usize];
15939 ["Offset of field: cudaLaunchAttributeValue::sharedMemCarveout"]
15940 [::std::mem::offset_of!(cudaLaunchAttributeValue, sharedMemCarveout) - 0usize];
15941};
15942#[doc = " Launch attribute"]
15943#[repr(C)]
15944#[derive(Copy, Clone)]
15945pub struct cudaLaunchAttribute_st {
15946 #[doc = "< Attribute to set"]
15947 pub id: cudaLaunchAttributeID,
15948 pub pad: [::std::os::raw::c_char; 4usize],
15949 #[doc = "< Value of the attribute"]
15950 pub val: cudaLaunchAttributeValue,
15951}
15952#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15953const _: () = {
15954 ["Size of cudaLaunchAttribute_st"][::std::mem::size_of::<cudaLaunchAttribute_st>() - 72usize];
15955 ["Alignment of cudaLaunchAttribute_st"]
15956 [::std::mem::align_of::<cudaLaunchAttribute_st>() - 8usize];
15957 ["Offset of field: cudaLaunchAttribute_st::id"]
15958 [::std::mem::offset_of!(cudaLaunchAttribute_st, id) - 0usize];
15959 ["Offset of field: cudaLaunchAttribute_st::pad"]
15960 [::std::mem::offset_of!(cudaLaunchAttribute_st, pad) - 4usize];
15961 ["Offset of field: cudaLaunchAttribute_st::val"]
15962 [::std::mem::offset_of!(cudaLaunchAttribute_st, val) - 8usize];
15963};
15964#[doc = " Launch attribute"]
15965pub type cudaLaunchAttribute = cudaLaunchAttribute_st;
15966#[doc = " CUDA extensible launch configuration"]
15967#[repr(C)]
15968#[derive(Debug, Copy, Clone)]
15969pub struct cudaLaunchConfig_st {
15970 #[doc = "< Grid dimensions"]
15971 pub gridDim: dim3,
15972 #[doc = "< Block dimensions"]
15973 pub blockDim: dim3,
15974 #[doc = "< Dynamic shared-memory size per thread block in bytes"]
15975 pub dynamicSmemBytes: usize,
15976 #[doc = "< Stream identifier"]
15977 pub stream: cudaStream_t,
15978 #[doc = "< List of attributes; nullable if ::cudaLaunchConfig_t::numAttrs == 0"]
15979 pub attrs: *mut cudaLaunchAttribute,
15980 #[doc = "< Number of attributes populated in ::cudaLaunchConfig_t::attrs"]
15981 pub numAttrs: ::std::os::raw::c_uint,
15982}
15983#[allow(clippy::unnecessary_operation, clippy::identity_op)]
15984const _: () = {
15985 ["Size of cudaLaunchConfig_st"][::std::mem::size_of::<cudaLaunchConfig_st>() - 56usize];
15986 ["Alignment of cudaLaunchConfig_st"][::std::mem::align_of::<cudaLaunchConfig_st>() - 8usize];
15987 ["Offset of field: cudaLaunchConfig_st::gridDim"]
15988 [::std::mem::offset_of!(cudaLaunchConfig_st, gridDim) - 0usize];
15989 ["Offset of field: cudaLaunchConfig_st::blockDim"]
15990 [::std::mem::offset_of!(cudaLaunchConfig_st, blockDim) - 12usize];
15991 ["Offset of field: cudaLaunchConfig_st::dynamicSmemBytes"]
15992 [::std::mem::offset_of!(cudaLaunchConfig_st, dynamicSmemBytes) - 24usize];
15993 ["Offset of field: cudaLaunchConfig_st::stream"]
15994 [::std::mem::offset_of!(cudaLaunchConfig_st, stream) - 32usize];
15995 ["Offset of field: cudaLaunchConfig_st::attrs"]
15996 [::std::mem::offset_of!(cudaLaunchConfig_st, attrs) - 40usize];
15997 ["Offset of field: cudaLaunchConfig_st::numAttrs"]
15998 [::std::mem::offset_of!(cudaLaunchConfig_st, numAttrs) - 48usize];
15999};
16000#[doc = " CUDA extensible launch configuration"]
16001pub type cudaLaunchConfig_t = cudaLaunchConfig_st;
16002impl cudaDeviceNumaConfig {
16003 #[doc = "< The GPU is not a NUMA node"]
16004 pub const cudaDeviceNumaConfigNone: cudaDeviceNumaConfig = cudaDeviceNumaConfig(0);
16005}
16006impl cudaDeviceNumaConfig {
16007 #[doc = "< The GPU is a NUMA node, cudaDevAttrNumaId contains its NUMA ID"]
16008 pub const cudaDeviceNumaConfigNumaNode: cudaDeviceNumaConfig = cudaDeviceNumaConfig(1);
16009}
16010#[repr(transparent)]
16011#[doc = " CUDA device NUMA config"]
16012#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16013pub struct cudaDeviceNumaConfig(pub ::std::os::raw::c_uint);
16014#[repr(C)]
16015#[derive(Debug, Copy, Clone)]
16016pub struct cudaAsyncCallbackEntry {
16017 _unused: [u8; 0],
16018}
16019#[doc = " CUDA async callback handle"]
16020pub type cudaAsyncCallbackHandle_t = *mut cudaAsyncCallbackEntry;
16021impl cudaAsyncNotificationType_enum {
16022 pub const cudaAsyncNotificationTypeOverBudget: cudaAsyncNotificationType_enum =
16023 cudaAsyncNotificationType_enum(1);
16024}
16025#[repr(transparent)]
16026#[doc = " Types of async notification that can occur"]
16027#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16028pub struct cudaAsyncNotificationType_enum(pub ::std::os::raw::c_uint);
16029#[doc = " Types of async notification that can occur"]
16030pub use self::cudaAsyncNotificationType_enum as cudaAsyncNotificationType;
16031#[doc = " Information describing an async notification event"]
16032#[repr(C)]
16033#[derive(Copy, Clone)]
16034pub struct cudaAsyncNotificationInfo {
16035 pub type_: cudaAsyncNotificationType,
16036 pub info: cudaAsyncNotificationInfo__bindgen_ty_1,
16037}
16038#[repr(C)]
16039#[derive(Copy, Clone)]
16040pub union cudaAsyncNotificationInfo__bindgen_ty_1 {
16041 pub overBudget: cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1,
16042}
16043#[repr(C)]
16044#[derive(Debug, Copy, Clone)]
16045pub struct cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1 {
16046 pub bytesOverBudget: ::std::os::raw::c_ulonglong,
16047}
16048#[allow(clippy::unnecessary_operation, clippy::identity_op)]
16049const _: () = {
16050 ["Size of cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1"]
16051 [::std::mem::size_of::<cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1>() - 8usize];
16052 ["Alignment of cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1"]
16053 [::std::mem::align_of::<cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1>() - 8usize];
16054 ["Offset of field: cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1::bytesOverBudget"][::std::mem::offset_of!(
16055 cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1,
16056 bytesOverBudget
16057 )
16058 - 0usize];
16059};
16060#[allow(clippy::unnecessary_operation, clippy::identity_op)]
16061const _: () = {
16062 ["Size of cudaAsyncNotificationInfo__bindgen_ty_1"]
16063 [::std::mem::size_of::<cudaAsyncNotificationInfo__bindgen_ty_1>() - 8usize];
16064 ["Alignment of cudaAsyncNotificationInfo__bindgen_ty_1"]
16065 [::std::mem::align_of::<cudaAsyncNotificationInfo__bindgen_ty_1>() - 8usize];
16066 ["Offset of field: cudaAsyncNotificationInfo__bindgen_ty_1::overBudget"]
16067 [::std::mem::offset_of!(cudaAsyncNotificationInfo__bindgen_ty_1, overBudget) - 0usize];
16068};
16069#[allow(clippy::unnecessary_operation, clippy::identity_op)]
16070const _: () = {
16071 ["Size of cudaAsyncNotificationInfo"]
16072 [::std::mem::size_of::<cudaAsyncNotificationInfo>() - 16usize];
16073 ["Alignment of cudaAsyncNotificationInfo"]
16074 [::std::mem::align_of::<cudaAsyncNotificationInfo>() - 8usize];
16075 ["Offset of field: cudaAsyncNotificationInfo::type_"]
16076 [::std::mem::offset_of!(cudaAsyncNotificationInfo, type_) - 0usize];
16077 ["Offset of field: cudaAsyncNotificationInfo::info"]
16078 [::std::mem::offset_of!(cudaAsyncNotificationInfo, info) - 8usize];
16079};
16080#[doc = " Information describing an async notification event"]
16081pub type cudaAsyncNotificationInfo_t = cudaAsyncNotificationInfo;
16082pub type cudaAsyncCallback = ::std::option::Option<
16083 unsafe extern "C" fn(
16084 arg1: *mut cudaAsyncNotificationInfo_t,
16085 arg2: *mut ::std::os::raw::c_void,
16086 arg3: cudaAsyncCallbackHandle_t,
16087 ),
16088>;
16089impl cudaSurfaceBoundaryMode {
16090 #[doc = "< Zero boundary mode"]
16091 pub const cudaBoundaryModeZero: cudaSurfaceBoundaryMode = cudaSurfaceBoundaryMode(0);
16092}
16093impl cudaSurfaceBoundaryMode {
16094 #[doc = "< Clamp boundary mode"]
16095 pub const cudaBoundaryModeClamp: cudaSurfaceBoundaryMode = cudaSurfaceBoundaryMode(1);
16096}
16097impl cudaSurfaceBoundaryMode {
16098 #[doc = "< Trap boundary mode"]
16099 pub const cudaBoundaryModeTrap: cudaSurfaceBoundaryMode = cudaSurfaceBoundaryMode(2);
16100}
16101#[repr(transparent)]
16102#[doc = " CUDA Surface boundary modes"]
16103#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16104pub struct cudaSurfaceBoundaryMode(pub ::std::os::raw::c_uint);
16105impl cudaSurfaceFormatMode {
16106 #[doc = "< Forced format mode"]
16107 pub const cudaFormatModeForced: cudaSurfaceFormatMode = cudaSurfaceFormatMode(0);
16108}
16109impl cudaSurfaceFormatMode {
16110 #[doc = "< Auto format mode"]
16111 pub const cudaFormatModeAuto: cudaSurfaceFormatMode = cudaSurfaceFormatMode(1);
16112}
16113#[repr(transparent)]
16114#[doc = " CUDA Surface format modes"]
16115#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16116pub struct cudaSurfaceFormatMode(pub ::std::os::raw::c_uint);
16117#[doc = " An opaque value that represents a CUDA Surface object"]
16118pub type cudaSurfaceObject_t = ::std::os::raw::c_ulonglong;
16119impl cudaTextureAddressMode {
16120 #[doc = "< Wrapping address mode"]
16121 pub const cudaAddressModeWrap: cudaTextureAddressMode = cudaTextureAddressMode(0);
16122}
16123impl cudaTextureAddressMode {
16124 #[doc = "< Clamp to edge address mode"]
16125 pub const cudaAddressModeClamp: cudaTextureAddressMode = cudaTextureAddressMode(1);
16126}
16127impl cudaTextureAddressMode {
16128 #[doc = "< Mirror address mode"]
16129 pub const cudaAddressModeMirror: cudaTextureAddressMode = cudaTextureAddressMode(2);
16130}
16131impl cudaTextureAddressMode {
16132 #[doc = "< Border address mode"]
16133 pub const cudaAddressModeBorder: cudaTextureAddressMode = cudaTextureAddressMode(3);
16134}
16135#[repr(transparent)]
16136#[doc = " CUDA texture address modes"]
16137#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16138pub struct cudaTextureAddressMode(pub ::std::os::raw::c_uint);
16139impl cudaTextureFilterMode {
16140 #[doc = "< Point filter mode"]
16141 pub const cudaFilterModePoint: cudaTextureFilterMode = cudaTextureFilterMode(0);
16142}
16143impl cudaTextureFilterMode {
16144 #[doc = "< Linear filter mode"]
16145 pub const cudaFilterModeLinear: cudaTextureFilterMode = cudaTextureFilterMode(1);
16146}
16147#[repr(transparent)]
16148#[doc = " CUDA texture filter modes"]
16149#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16150pub struct cudaTextureFilterMode(pub ::std::os::raw::c_uint);
16151impl cudaTextureReadMode {
16152 #[doc = "< Read texture as specified element type"]
16153 pub const cudaReadModeElementType: cudaTextureReadMode = cudaTextureReadMode(0);
16154}
16155impl cudaTextureReadMode {
16156 #[doc = "< Read texture as normalized float"]
16157 pub const cudaReadModeNormalizedFloat: cudaTextureReadMode = cudaTextureReadMode(1);
16158}
16159#[repr(transparent)]
16160#[doc = " CUDA texture read modes"]
16161#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16162pub struct cudaTextureReadMode(pub ::std::os::raw::c_uint);
16163#[doc = " CUDA texture descriptor"]
16164#[repr(C)]
16165#[derive(Debug, Copy, Clone)]
16166pub struct cudaTextureDesc {
16167 #[doc = " Texture address mode for up to 3 dimensions"]
16168 pub addressMode: [cudaTextureAddressMode; 3usize],
16169 #[doc = " Texture filter mode"]
16170 pub filterMode: cudaTextureFilterMode,
16171 #[doc = " Texture read mode"]
16172 pub readMode: cudaTextureReadMode,
16173 #[doc = " Perform sRGB->linear conversion during texture read"]
16174 pub sRGB: ::std::os::raw::c_int,
16175 #[doc = " Texture Border Color"]
16176 pub borderColor: [f32; 4usize],
16177 #[doc = " Indicates whether texture reads are normalized or not"]
16178 pub normalizedCoords: ::std::os::raw::c_int,
16179 #[doc = " Limit to the anisotropy ratio"]
16180 pub maxAnisotropy: ::std::os::raw::c_uint,
16181 #[doc = " Mipmap filter mode"]
16182 pub mipmapFilterMode: cudaTextureFilterMode,
16183 #[doc = " Offset applied to the supplied mipmap level"]
16184 pub mipmapLevelBias: f32,
16185 #[doc = " Lower end of the mipmap level range to clamp access to"]
16186 pub minMipmapLevelClamp: f32,
16187 #[doc = " Upper end of the mipmap level range to clamp access to"]
16188 pub maxMipmapLevelClamp: f32,
16189 #[doc = " Disable any trilinear filtering optimizations."]
16190 pub disableTrilinearOptimization: ::std::os::raw::c_int,
16191 #[doc = " Enable seamless cube map filtering."]
16192 pub seamlessCubemap: ::std::os::raw::c_int,
16193}
16194#[allow(clippy::unnecessary_operation, clippy::identity_op)]
16195const _: () = {
16196 ["Size of cudaTextureDesc"][::std::mem::size_of::<cudaTextureDesc>() - 72usize];
16197 ["Alignment of cudaTextureDesc"][::std::mem::align_of::<cudaTextureDesc>() - 4usize];
16198 ["Offset of field: cudaTextureDesc::addressMode"]
16199 [::std::mem::offset_of!(cudaTextureDesc, addressMode) - 0usize];
16200 ["Offset of field: cudaTextureDesc::filterMode"]
16201 [::std::mem::offset_of!(cudaTextureDesc, filterMode) - 12usize];
16202 ["Offset of field: cudaTextureDesc::readMode"]
16203 [::std::mem::offset_of!(cudaTextureDesc, readMode) - 16usize];
16204 ["Offset of field: cudaTextureDesc::sRGB"]
16205 [::std::mem::offset_of!(cudaTextureDesc, sRGB) - 20usize];
16206 ["Offset of field: cudaTextureDesc::borderColor"]
16207 [::std::mem::offset_of!(cudaTextureDesc, borderColor) - 24usize];
16208 ["Offset of field: cudaTextureDesc::normalizedCoords"]
16209 [::std::mem::offset_of!(cudaTextureDesc, normalizedCoords) - 40usize];
16210 ["Offset of field: cudaTextureDesc::maxAnisotropy"]
16211 [::std::mem::offset_of!(cudaTextureDesc, maxAnisotropy) - 44usize];
16212 ["Offset of field: cudaTextureDesc::mipmapFilterMode"]
16213 [::std::mem::offset_of!(cudaTextureDesc, mipmapFilterMode) - 48usize];
16214 ["Offset of field: cudaTextureDesc::mipmapLevelBias"]
16215 [::std::mem::offset_of!(cudaTextureDesc, mipmapLevelBias) - 52usize];
16216 ["Offset of field: cudaTextureDesc::minMipmapLevelClamp"]
16217 [::std::mem::offset_of!(cudaTextureDesc, minMipmapLevelClamp) - 56usize];
16218 ["Offset of field: cudaTextureDesc::maxMipmapLevelClamp"]
16219 [::std::mem::offset_of!(cudaTextureDesc, maxMipmapLevelClamp) - 60usize];
16220 ["Offset of field: cudaTextureDesc::disableTrilinearOptimization"]
16221 [::std::mem::offset_of!(cudaTextureDesc, disableTrilinearOptimization) - 64usize];
16222 ["Offset of field: cudaTextureDesc::seamlessCubemap"]
16223 [::std::mem::offset_of!(cudaTextureDesc, seamlessCubemap) - 68usize];
16224};
16225#[doc = " An opaque value that represents a CUDA texture object"]
16226pub type cudaTextureObject_t = ::std::os::raw::c_ulonglong;
16227impl cudaDataType_t {
16228 pub const CUDA_R_16F: cudaDataType_t = cudaDataType_t(2);
16229}
16230impl cudaDataType_t {
16231 pub const CUDA_C_16F: cudaDataType_t = cudaDataType_t(6);
16232}
16233impl cudaDataType_t {
16234 pub const CUDA_R_16BF: cudaDataType_t = cudaDataType_t(14);
16235}
16236impl cudaDataType_t {
16237 pub const CUDA_C_16BF: cudaDataType_t = cudaDataType_t(15);
16238}
16239impl cudaDataType_t {
16240 pub const CUDA_R_32F: cudaDataType_t = cudaDataType_t(0);
16241}
16242impl cudaDataType_t {
16243 pub const CUDA_C_32F: cudaDataType_t = cudaDataType_t(4);
16244}
16245impl cudaDataType_t {
16246 pub const CUDA_R_64F: cudaDataType_t = cudaDataType_t(1);
16247}
16248impl cudaDataType_t {
16249 pub const CUDA_C_64F: cudaDataType_t = cudaDataType_t(5);
16250}
16251impl cudaDataType_t {
16252 pub const CUDA_R_4I: cudaDataType_t = cudaDataType_t(16);
16253}
16254impl cudaDataType_t {
16255 pub const CUDA_C_4I: cudaDataType_t = cudaDataType_t(17);
16256}
16257impl cudaDataType_t {
16258 pub const CUDA_R_4U: cudaDataType_t = cudaDataType_t(18);
16259}
16260impl cudaDataType_t {
16261 pub const CUDA_C_4U: cudaDataType_t = cudaDataType_t(19);
16262}
16263impl cudaDataType_t {
16264 pub const CUDA_R_8I: cudaDataType_t = cudaDataType_t(3);
16265}
16266impl cudaDataType_t {
16267 pub const CUDA_C_8I: cudaDataType_t = cudaDataType_t(7);
16268}
16269impl cudaDataType_t {
16270 pub const CUDA_R_8U: cudaDataType_t = cudaDataType_t(8);
16271}
16272impl cudaDataType_t {
16273 pub const CUDA_C_8U: cudaDataType_t = cudaDataType_t(9);
16274}
16275impl cudaDataType_t {
16276 pub const CUDA_R_16I: cudaDataType_t = cudaDataType_t(20);
16277}
16278impl cudaDataType_t {
16279 pub const CUDA_C_16I: cudaDataType_t = cudaDataType_t(21);
16280}
16281impl cudaDataType_t {
16282 pub const CUDA_R_16U: cudaDataType_t = cudaDataType_t(22);
16283}
16284impl cudaDataType_t {
16285 pub const CUDA_C_16U: cudaDataType_t = cudaDataType_t(23);
16286}
16287impl cudaDataType_t {
16288 pub const CUDA_R_32I: cudaDataType_t = cudaDataType_t(10);
16289}
16290impl cudaDataType_t {
16291 pub const CUDA_C_32I: cudaDataType_t = cudaDataType_t(11);
16292}
16293impl cudaDataType_t {
16294 pub const CUDA_R_32U: cudaDataType_t = cudaDataType_t(12);
16295}
16296impl cudaDataType_t {
16297 pub const CUDA_C_32U: cudaDataType_t = cudaDataType_t(13);
16298}
16299impl cudaDataType_t {
16300 pub const CUDA_R_64I: cudaDataType_t = cudaDataType_t(24);
16301}
16302impl cudaDataType_t {
16303 pub const CUDA_C_64I: cudaDataType_t = cudaDataType_t(25);
16304}
16305impl cudaDataType_t {
16306 pub const CUDA_R_64U: cudaDataType_t = cudaDataType_t(26);
16307}
16308impl cudaDataType_t {
16309 pub const CUDA_C_64U: cudaDataType_t = cudaDataType_t(27);
16310}
16311impl cudaDataType_t {
16312 pub const CUDA_R_8F_E4M3: cudaDataType_t = cudaDataType_t(28);
16313}
16314impl cudaDataType_t {
16315 pub const CUDA_R_8F_E5M2: cudaDataType_t = cudaDataType_t(29);
16316}
16317#[repr(transparent)]
16318#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
16319pub struct cudaDataType_t(pub ::std::os::raw::c_uint);
16320pub use self::cudaDataType_t as cudaDataType;
16321extern "C" {
16322 #[doc = " \\brief Destroy all allocations and reset all state on the current device\n in the current process.\n\n Explicitly destroys and cleans up all resources associated with the current\n device in the current process. It is the caller's responsibility to ensure\n that the resources are not accessed or passed in subsequent API calls and\n doing so will result in undefined behavior. These resources include CUDA types\n ::cudaStream_t, ::cudaEvent_t, ::cudaArray_t, ::cudaMipmappedArray_t, ::cudaPitchedPtr,\n ::cudaTextureObject_t, ::cudaSurfaceObject_t, ::textureReference, ::surfaceReference,\n ::cudaExternalMemory_t, ::cudaExternalSemaphore_t and ::cudaGraphicsResource_t.\n These resources also include memory allocations by ::cudaMalloc, ::cudaMallocHost,\n ::cudaMallocManaged and ::cudaMallocPitch.\n Any subsequent API call to this device will reinitialize the device.\n\n Note that this function will reset the device immediately. It is the caller's\n responsibility to ensure that the device is not being accessed by any\n other host threads from the process when this function is called.\n\n \\note ::cudaDeviceReset() will not destroy memory allocations by ::cudaMallocAsync() and\n ::cudaMallocFromPoolAsync(). These memory allocations need to be destroyed explicitly.\n \\note If a non-primary ::CUcontext is current to the thread, ::cudaDeviceReset()\n will destroy only the internal CUDA RT state for that ::CUcontext.\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSynchronize"]
16323 pub fn cudaDeviceReset() -> cudaError_t;
16324}
16325extern "C" {
16326 #[doc = " \\brief Wait for compute device to finish\n\n Blocks until the device has completed all preceding requested tasks.\n ::cudaDeviceSynchronize() returns an error if one of the preceding tasks\n has failed. If the ::cudaDeviceScheduleBlockingSync flag was set for\n this device, the host thread will block until the device has finished\n its work.\n\n \\return\n ::cudaSuccess\n \\note_device_sync_deprecated\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDeviceReset,\n ::cuCtxSynchronize"]
16327 pub fn cudaDeviceSynchronize() -> cudaError_t;
16328}
16329extern "C" {
16330 #[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 device. 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 ::cudaDeviceGetLimit() to find out\n exactly what the limit has been set to.\n\n Setting each ::cudaLimit has its own specific restrictions, so each is\n discussed here.\n\n - ::cudaLimitStackSize controls the stack size in bytes of each GPU thread.\n\n - ::cudaLimitPrintfFifoSize controls the size in bytes of the shared FIFO\n used by the ::printf() device system call. Setting\n ::cudaLimitPrintfFifoSize must not be performed after launching any kernel\n that uses the ::printf() device system call - in such case\n ::cudaErrorInvalidValue will be returned.\n\n - ::cudaLimitMallocHeapSize controls the size in bytes of the heap used by\n the ::malloc() and ::free() device system calls. Setting\n ::cudaLimitMallocHeapSize must not be performed after launching any kernel\n that uses the ::malloc() or ::free() device system calls - in such case\n ::cudaErrorInvalidValue will be returned.\n\n - ::cudaLimitDevRuntimeSyncDepth controls the maximum nesting depth of a\n 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 runtime to reserve large amounts of\n device memory which can no longer be used for user allocations. If these\n reservations of device memory fail, ::cudaDeviceSetLimit will return\n ::cudaErrorMemoryAllocation, 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 will\n results in error ::cudaErrorUnsupportedLimit being returned.\n\n - ::cudaLimitDevRuntimePendingLaunchCount controls the maximum number of\n outstanding device runtime launches that can be made from the current\n device. 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 runtime to reserve\n larger amounts of device memory upfront which can no longer be used for\n allocations. If these reservations fail, ::cudaDeviceSetLimit will return\n ::cudaErrorMemoryAllocation, 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 ::cudaErrorUnsupportedLimit being\n returned.\n\n - ::cudaLimitMaxL2FetchGranularity controls the L2 cache fetch granularity.\n Values can range from 0B to 128B. This is purely a performance hint and\n it can be ignored or clamped depending on the platform.\n\n - ::cudaLimitPersistingL2CacheSize controls size in bytes available\n for persisting L2 cache. This is purely a performance hint and it\n can be ignored or clamped depending on the platform.\n\n \\param limit - Limit to set\n \\param value - Size of limit\n\n \\return\n ::cudaSuccess,\n ::cudaErrorUnsupportedLimit,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDeviceGetLimit,\n ::cuCtxSetLimit"]
16331 pub fn cudaDeviceSetLimit(limit: cudaLimit, value: usize) -> cudaError_t;
16332}
16333extern "C" {
16334 #[doc = " \\brief Return resource limits\n\n Returns in \\p *pValue the current size of \\p limit. The following ::cudaLimit values are supported.\n - ::cudaLimitStackSize is the stack size in bytes of each GPU thread.\n - ::cudaLimitPrintfFifoSize is the size in bytes of the shared FIFO used by the\n ::printf() device system call.\n - ::cudaLimitMallocHeapSize is the size in bytes of the heap used by the\n ::malloc() and ::free() device system calls.\n - ::cudaLimitDevRuntimeSyncDepth is the maximum grid depth at which a\n thread can isssue the device runtime call ::cudaDeviceSynchronize()\n to wait on child grid launches to complete. This functionality is removed\n for devices of compute capability >= 9.0, and hence will return error\n ::cudaErrorUnsupportedLimit on such devices.\n - ::cudaLimitDevRuntimePendingLaunchCount is the maximum number of outstanding\n device runtime launches.\n - ::cudaLimitMaxL2FetchGranularity is the L2 cache fetch granularity.\n - ::cudaLimitPersistingL2CacheSize is the persisting L2 cache size in bytes.\n\n \\param limit - Limit to query\n \\param pValue - Returned size of the limit\n\n \\return\n ::cudaSuccess,\n ::cudaErrorUnsupportedLimit,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDeviceSetLimit,\n ::cuCtxGetLimit"]
16335 pub fn cudaDeviceGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t;
16336}
16337extern "C" {
16338 pub fn cudaDeviceGetTexture1DLinearMaxWidth(
16339 maxWidthInElements: *mut usize,
16340 fmtDesc: *const cudaChannelFormatDesc,
16341 device: ::std::os::raw::c_int,
16342 ) -> cudaError_t;
16343}
16344extern "C" {
16345 #[doc = " \\brief Returns the preferred cache configuration for the current device.\n\n On devices where the L1 cache and shared memory use the same hardware\n resources, this returns through \\p pCacheConfig the preferred cache\n configuration for the current device. This is only a preference. The\n runtime will use the requested configuration if possible, but it is free to\n choose a different configuration if required to execute functions.\n\n This will return a \\p pCacheConfig of ::cudaFuncCachePreferNone on devices\n where the size of the L1 cache and shared memory are fixed.\n\n The supported cache configurations are:\n - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)\n - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache\n - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory\n - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory\n\n \\param pCacheConfig - Returned cache configuration\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSetCacheConfig,\n \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\",\n \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\",\n ::cuCtxGetCacheConfig"]
16346 pub fn cudaDeviceGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t;
16347}
16348extern "C" {
16349 #[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 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 ::cudaStreamCreateWithPriority 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 ::cudaDeviceGetAttribute).\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 ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreateWithPriority,\n ::cudaStreamGetPriority,\n ::cuCtxGetStreamPriorityRange"]
16350 pub fn cudaDeviceGetStreamPriorityRange(
16351 leastPriority: *mut ::std::os::raw::c_int,
16352 greatestPriority: *mut ::std::os::raw::c_int,
16353 ) -> cudaError_t;
16354}
16355extern "C" {
16356 #[doc = " \\brief Sets the preferred cache configuration for the current device.\n\n On devices where the L1 cache and shared memory use the same hardware\n resources, this sets through \\p cacheConfig the preferred cache\n configuration for the current device. This is only a preference. The\n runtime will use the requested configuration if possible, but it is free to\n choose a different configuration if required to execute the function. Any\n function preference set via\n \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\"\n or\n \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\"\n will be preferred over this device-wide setting. Setting the device-wide\n cache configuration to ::cudaFuncCachePreferNone will cause subsequent\n kernel launches to prefer to not change the cache configuration unless\n 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 - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)\n - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache\n - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory\n - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory\n\n \\param cacheConfig - Requested cache configuration\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceGetCacheConfig,\n \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\",\n \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\",\n ::cuCtxSetCacheConfig"]
16357 pub fn cudaDeviceSetCacheConfig(cacheConfig: cudaFuncCache) -> cudaError_t;
16358}
16359extern "C" {
16360 #[doc = " \\brief Returns a handle to a compute device\n\n Returns in \\p *device a device ordinal given a PCI bus ID string.\n\n \\param device - Returned device ordinal\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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDeviceGetPCIBusId,\n ::cuDeviceGetByPCIBusId"]
16361 pub fn cudaDeviceGetByPCIBusId(
16362 device: *mut ::std::os::raw::c_int,
16363 pciBusId: *const ::std::os::raw::c_char,
16364 ) -> cudaError_t;
16365}
16366extern "C" {
16367 #[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 device - Device to get identifier string for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDeviceGetByPCIBusId,\n ::cuDeviceGetPCIBusId"]
16368 pub fn cudaDeviceGetPCIBusId(
16369 pciBusId: *mut ::std::os::raw::c_char,
16370 len: ::std::os::raw::c_int,
16371 device: ::std::os::raw::c_int,
16372 ) -> cudaError_t;
16373}
16374extern "C" {
16375 #[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 ::cudaEventInterprocess and ::cudaEventDisableTiming\n flags set. This opaque handle may be copied into other processes and\n opened with ::cudaIpcOpenEventHandle to allow efficient hardware\n synchronization between GPU work in different processes.\n\n After the event has been been opened in the importing process,\n ::cudaEventRecord, ::cudaEventSynchronize, ::cudaStreamWaitEvent and\n ::cudaEventQuery may be used in either process. Performing operations\n on the imported event after the exported event has been freed\n with ::cudaEventDestroy 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 supported for compatibility purposes\n but not recommended as it comes with performance cost.\n Users can test their device for IPC functionality by calling\n ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport\n\n \\param handle - Pointer to a user allocated cudaIpcEventHandle\n in which to return the opaque event handle\n \\param event - Event allocated with ::cudaEventInterprocess and\n ::cudaEventDisableTiming flags.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorMapBufferObjectFailed,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaEventCreate,\n ::cudaEventDestroy,\n ::cudaEventSynchronize,\n ::cudaEventQuery,\n ::cudaStreamWaitEvent,\n ::cudaIpcOpenEventHandle,\n ::cudaIpcGetMemHandle,\n ::cudaIpcOpenMemHandle,\n ::cudaIpcCloseMemHandle,\n ::cuIpcGetEventHandle"]
16376 pub fn cudaIpcGetEventHandle(
16377 handle: *mut cudaIpcEventHandle_t,
16378 event: cudaEvent_t,
16379 ) -> cudaError_t;
16380}
16381extern "C" {
16382 #[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 ::cudaIpcGetEventHandle. This function returns a ::cudaEvent_t that behaves like\n a locally created event with the ::cudaEventDisableTiming flag specified.\n This event must be freed with ::cudaEventDestroy.\n\n Performing operations on the imported event after the exported event has\n been freed with ::cudaEventDestroy 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 supported for compatibility purposes\n but not recommended as it comes with performance cost.\n Users can test their device for IPC functionality by calling\n ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport\n\n \\param event - Returns the imported event\n \\param handle - Interprocess handle to open\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorMapBufferObjectFailed,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue,\n ::cudaErrorDeviceUninitialized\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaEventCreate,\n ::cudaEventDestroy,\n ::cudaEventSynchronize,\n ::cudaEventQuery,\n ::cudaStreamWaitEvent,\n ::cudaIpcGetEventHandle,\n ::cudaIpcGetMemHandle,\n ::cudaIpcOpenMemHandle,\n ::cudaIpcCloseMemHandle,\n ::cuIpcOpenEventHandle"]
16383 pub fn cudaIpcOpenEventHandle(
16384 event: *mut cudaEvent_t,
16385 handle: cudaIpcEventHandle_t,
16386 ) -> cudaError_t;
16387}
16388extern "C" {
16389 #[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 ::cudaMalloc 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 ::cudaFree and a subsequent call\n to ::cudaMalloc returns memory with the same device address,\n ::cudaIpcGetMemHandle 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 supported for compatibility purposes\n but not recommended as it comes with performance cost.\n Users can test their device for IPC functionality by calling\n ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport\n\n \\param handle - Pointer to user allocated ::cudaIpcMemHandle to return\n the handle in.\n \\param devPtr - Base pointer to previously allocated device memory\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorMapBufferObjectFailed,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaMalloc,\n ::cudaFree,\n ::cudaIpcGetEventHandle,\n ::cudaIpcOpenEventHandle,\n ::cudaIpcOpenMemHandle,\n ::cudaIpcCloseMemHandle,\n ::cuIpcGetMemHandle"]
16390 pub fn cudaIpcGetMemHandle(
16391 handle: *mut cudaIpcMemHandle_t,
16392 devPtr: *mut ::std::os::raw::c_void,
16393 ) -> cudaError_t;
16394}
16395extern "C" {
16396 #[doc = " \\brief Opens an interprocess memory handle exported from another process\n and returns a device pointer usable in the local process.\n\n Maps memory exported from another process with ::cudaIpcGetMemHandle into\n the current device address space. For contexts on different devices\n ::cudaIpcOpenMemHandle can attempt to enable peer access between the\n devices as if the user called ::cudaDeviceEnablePeerAccess. This behavior is\n controlled by the ::cudaIpcMemLazyEnablePeerAccess flag.\n ::cudaDeviceCanAccessPeer can determine if a mapping is possible.\n\n ::cudaIpcOpenMemHandle can open handles to devices that may not be visible\n in the process calling the API.\n\n Contexts that may open ::cudaIpcMemHandles are restricted in the following way.\n ::cudaIpcMemHandles from each device in a given process may only be opened\n by one context per device per other process.\n\n If the memory handle has already been opened by the current context, the\n reference count on the handle is incremented by 1 and the existing device pointer\n is returned.\n\n Memory returned from ::cudaIpcOpenMemHandle must be freed with\n ::cudaIpcCloseMemHandle.\n\n Calling ::cudaFree on an exported memory region before calling\n ::cudaIpcCloseMemHandle in the importing context will result in undefined\n 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 supported for compatibility purposes\n but not recommended as it comes with performance cost.\n Users can test their device for IPC functionality by calling\n ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport\n\n \\param devPtr - Returned device pointer\n \\param handle - ::cudaIpcMemHandle to open\n \\param flags - Flags for this operation. Must be specified as ::cudaIpcMemLazyEnablePeerAccess\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorMapBufferObjectFailed,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorDeviceUninitialized,\n ::cudaErrorTooManyPeers,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\note No guarantees are made about the address returned in \\p *devPtr.\n In particular, multiple processes may not receive the same address for the same \\p handle.\n\n \\sa\n ::cudaMalloc,\n ::cudaFree,\n ::cudaIpcGetEventHandle,\n ::cudaIpcOpenEventHandle,\n ::cudaIpcGetMemHandle,\n ::cudaIpcCloseMemHandle,\n ::cudaDeviceEnablePeerAccess,\n ::cudaDeviceCanAccessPeer,\n ::cuIpcOpenMemHandle"]
16397 pub fn cudaIpcOpenMemHandle(
16398 devPtr: *mut *mut ::std::os::raw::c_void,
16399 handle: cudaIpcMemHandle_t,
16400 flags: ::std::os::raw::c_uint,
16401 ) -> cudaError_t;
16402}
16403extern "C" {
16404 #[doc = " \\brief Attempts to close memory mapped with cudaIpcOpenMemHandle\n\n Decrements the reference count of the memory returnd by ::cudaIpcOpenMemHandle 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 supported for compatibility purposes\n but not recommended as it comes with performance cost.\n Users can test their device for IPC functionality by calling\n ::cudaDeviceGetAttribute with ::cudaDevAttrIpcEventSupport\n\n \\param devPtr - Device pointer returned by ::cudaIpcOpenMemHandle\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorMapBufferObjectFailed,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaMalloc,\n ::cudaFree,\n ::cudaIpcGetEventHandle,\n ::cudaIpcOpenEventHandle,\n ::cudaIpcGetMemHandle,\n ::cudaIpcOpenMemHandle,\n ::cuIpcCloseMemHandle"]
16405 pub fn cudaIpcCloseMemHandle(devPtr: *mut ::std::os::raw::c_void) -> cudaError_t;
16406}
16407extern "C" {
16408 pub fn cudaDeviceFlushGPUDirectRDMAWrites(
16409 target: cudaFlushGPUDirectRDMAWritesTarget,
16410 scope: cudaFlushGPUDirectRDMAWritesScope,
16411 ) -> cudaError_t;
16412}
16413extern "C" {
16414 #[doc = " \\brief Registers a callback function to receive async notifications\n\n Registers \\p callbackFunc to receive async notifications.\n\n The \\p userData parameter is passed to the callback function at async notification time.\n Likewise, \\p callback is also passed to the callback function to distinguish between\n multiple registered callbacks.\n\n The callback function being registered should be designed to return quickly (~10ms).\n Any long running tasks should be queued for execution on an application thread.\n\n Callbacks may not call cudaDeviceRegisterAsyncNotification or cudaDeviceUnregisterAsyncNotification.\n Doing so will result in ::cudaErrorNotPermitted. Async notification callbacks execute\n in an undefined order and may be serialized.\n\n Returns in \\p *callback a handle representing the registered callback instance.\n\n \\param device - The device on which to register the callback\n \\param callbackFunc - The function to register as a callback\n \\param userData - A generic pointer to user data. This is passed into the callback function.\n \\param callback - A handle representing the registered callback instance\n\n \\return\n ::cudaSuccess\n ::cudaErrorNotSupported\n ::cudaErrorInvalidDevice\n ::cudaErrorInvalidValue\n ::cudaErrorNotPermitted\n ::cudaErrorUnknown\n \\notefnerr\n\n \\sa\n ::cudaDeviceUnregisterAsyncNotification"]
16415 pub fn cudaDeviceRegisterAsyncNotification(
16416 device: ::std::os::raw::c_int,
16417 callbackFunc: cudaAsyncCallback,
16418 userData: *mut ::std::os::raw::c_void,
16419 callback: *mut cudaAsyncCallbackHandle_t,
16420 ) -> cudaError_t;
16421}
16422extern "C" {
16423 #[doc = " \\brief Unregisters an async notification callback\n\n Unregisters \\p callback so that the corresponding callback function will stop receiving\n async notifications.\n\n \\param device - The device from which to remove \\p callback.\n \\param callback - The callback instance to unregister from receiving async notifications.\n\n \\return\n ::cudaSuccess\n ::cudaErrorNotSupported\n ::cudaErrorInvalidDevice\n ::cudaErrorInvalidValue\n ::cudaErrorNotPermitted\n ::cudaErrorUnknown\n \\notefnerr\n\n \\sa\n ::cudaDeviceRegisterAsyncNotification"]
16424 pub fn cudaDeviceUnregisterAsyncNotification(
16425 device: ::std::os::raw::c_int,
16426 callback: cudaAsyncCallbackHandle_t,
16427 ) -> cudaError_t;
16428}
16429extern "C" {
16430 #[doc = " \\brief Returns the shared memory configuration for the current device.\n\n \\deprecated\n\n This function will return in \\p pConfig the current size of shared memory banks\n on the current device. On devices with configurable shared memory banks,\n ::cudaDeviceSetSharedMemConfig can be used to change this setting, so that all\n subsequent kernel launches will by default use the new bank size. When\n ::cudaDeviceGetSharedMemConfig 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 - ::cudaSharedMemBankSizeFourByte - shared memory bank width is four bytes.\n - ::cudaSharedMemBankSizeEightByte - shared memory bank width is eight bytes.\n\n \\param pConfig - Returned cache configuration\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSetCacheConfig,\n ::cudaDeviceGetCacheConfig,\n ::cudaDeviceSetSharedMemConfig,\n ::cudaFuncSetCacheConfig,\n ::cuCtxGetSharedMemConfig"]
16431 pub fn cudaDeviceGetSharedMemConfig(pConfig: *mut cudaSharedMemConfig) -> cudaError_t;
16432}
16433extern "C" {
16434 #[doc = " \\brief Sets the shared memory configuration for the current device.\n\n \\deprecated\n\n On devices with configurable shared memory banks, this function will set\n the shared memory bank size which is used for all subsequent kernel launches.\n Any per-function setting of shared memory set via ::cudaFuncSetSharedMemConfig\n will override the device wide setting.\n\n Changing the shared memory configuration between launches may introduce\n a device side synchronization point.\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 - ::cudaSharedMemBankSizeDefault: set bank width the device default (currently,\n four bytes)\n - ::cudaSharedMemBankSizeFourByte: set shared memory bank width to be four bytes\n natively.\n - ::cudaSharedMemBankSizeEightByte: set shared memory bank width to be eight\n bytes natively.\n\n \\param config - Requested cache configuration\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSetCacheConfig,\n ::cudaDeviceGetCacheConfig,\n ::cudaDeviceGetSharedMemConfig,\n ::cudaFuncSetCacheConfig,\n ::cuCtxSetSharedMemConfig"]
16435 pub fn cudaDeviceSetSharedMemConfig(config: cudaSharedMemConfig) -> cudaError_t;
16436}
16437extern "C" {
16438 #[doc = " \\brief Exit and clean up from CUDA launches\n\n \\deprecated\n\n Note that this function is deprecated because its name does not\n reflect its behavior. Its functionality is identical to the\n non-deprecated function ::cudaDeviceReset(), which should be used\n instead.\n\n Explicitly destroys all cleans up all resources associated with the current\n device in the current process. Any subsequent API call to this device will\n reinitialize the device.\n\n Note that this function will reset the device immediately. It is the caller's\n responsibility to ensure that the device is not being accessed by any\n other host threads from the process when this function is called.\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceReset"]
16439 pub fn cudaThreadExit() -> cudaError_t;
16440}
16441extern "C" {
16442 #[doc = " \\brief Wait for compute device to finish\n\n \\deprecated\n\n Note that this function is deprecated because its name does not\n reflect its behavior. Its functionality is similar to the\n non-deprecated function ::cudaDeviceSynchronize(), which should be used\n instead.\n\n Blocks until the device has completed all preceding requested tasks.\n ::cudaThreadSynchronize() returns an error if one of the preceding tasks\n has failed. If the ::cudaDeviceScheduleBlockingSync flag was set for\n this device, the host thread will block until the device has finished\n its work.\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSynchronize"]
16443 pub fn cudaThreadSynchronize() -> cudaError_t;
16444}
16445extern "C" {
16446 #[doc = " \\brief Set resource limits\n\n \\deprecated\n\n Note that this function is deprecated because its name does not\n reflect its behavior. Its functionality is identical to the\n non-deprecated function ::cudaDeviceSetLimit(), which should be used\n instead.\n\n Setting \\p limit to \\p value is a request by the application to update\n the current limit maintained by the device. 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 ::cudaThreadGetLimit() to find out\n exactly what the limit has been set to.\n\n Setting each ::cudaLimit has its own specific restrictions, so each is\n discussed here.\n\n - ::cudaLimitStackSize controls the stack size of each GPU thread.\n\n - ::cudaLimitPrintfFifoSize controls the size of the shared FIFO\n used by the ::printf() device system call.\n Setting ::cudaLimitPrintfFifoSize must be performed before\n launching any kernel that uses the ::printf() device\n system call, otherwise ::cudaErrorInvalidValue will be returned.\n\n - ::cudaLimitMallocHeapSize controls the size of the heap used\n by the ::malloc() and ::free() device system calls. Setting\n ::cudaLimitMallocHeapSize must be performed before launching\n any kernel that uses the ::malloc() or ::free() device system calls,\n otherwise ::cudaErrorInvalidValue will be returned.\n\n \\param limit - Limit to set\n \\param value - Size in bytes of limit\n\n \\return\n ::cudaSuccess,\n ::cudaErrorUnsupportedLimit,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSetLimit"]
16447 pub fn cudaThreadSetLimit(limit: cudaLimit, value: usize) -> cudaError_t;
16448}
16449extern "C" {
16450 #[doc = " \\brief Returns resource limits\n\n \\deprecated\n\n Note that this function is deprecated because its name does not\n reflect its behavior. Its functionality is identical to the\n non-deprecated function ::cudaDeviceGetLimit(), which should be used\n instead.\n\n Returns in \\p *pValue the current size of \\p limit. The supported\n ::cudaLimit values are:\n - ::cudaLimitStackSize: stack size of each GPU thread;\n - ::cudaLimitPrintfFifoSize: size of the shared FIFO used by the\n ::printf() device system call.\n - ::cudaLimitMallocHeapSize: size of the heap used by the\n ::malloc() and ::free() device system calls;\n\n \\param limit - Limit to query\n \\param pValue - Returned size in bytes of limit\n\n \\return\n ::cudaSuccess,\n ::cudaErrorUnsupportedLimit,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceGetLimit"]
16451 pub fn cudaThreadGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t;
16452}
16453extern "C" {
16454 #[doc = " \\brief Returns the preferred cache configuration for the current device.\n\n \\deprecated\n\n Note that this function is deprecated because its name does not\n reflect its behavior. Its functionality is identical to the\n non-deprecated function ::cudaDeviceGetCacheConfig(), which should be\n used instead.\n\n On devices where the L1 cache and shared memory use the same hardware\n resources, this returns through \\p pCacheConfig the preferred cache\n configuration for the current device. This is only a preference. The\n runtime will use the requested configuration if possible, but it is free to\n choose a different configuration if required to execute functions.\n\n This will return a \\p pCacheConfig of ::cudaFuncCachePreferNone on devices\n where the size of the L1 cache and shared memory are fixed.\n\n The supported cache configurations are:\n - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)\n - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache\n - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory\n\n \\param pCacheConfig - Returned cache configuration\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceGetCacheConfig"]
16455 pub fn cudaThreadGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t;
16456}
16457extern "C" {
16458 #[doc = " \\brief Sets the preferred cache configuration for the current device.\n\n \\deprecated\n\n Note that this function is deprecated because its name does not\n reflect its behavior. Its functionality is identical to the\n non-deprecated function ::cudaDeviceSetCacheConfig(), which should be\n used instead.\n\n On devices where the L1 cache and shared memory use the same hardware\n resources, this sets through \\p cacheConfig the preferred cache\n configuration for the current device. This is only a preference. The\n runtime will use the requested configuration if possible, but it is free to\n choose a different configuration if required to execute the function. Any\n function preference set via\n \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\"\n or\n \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\"\n will be preferred over this device-wide setting. Setting the device-wide\n cache configuration to ::cudaFuncCachePreferNone will cause subsequent\n kernel launches to prefer to not change the cache configuration unless\n 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 - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)\n - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache\n - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory\n\n \\param cacheConfig - Requested cache configuration\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSetCacheConfig"]
16459 pub fn cudaThreadSetCacheConfig(cacheConfig: cudaFuncCache) -> cudaError_t;
16460}
16461extern "C" {
16462 #[doc = " \\brief Returns the last error from a runtime call\n\n Returns the last error that has been produced by any of the runtime calls\n in the same instance of the CUDA Runtime library in the host thread and\n resets it to ::cudaSuccess.\n\n Note: Multiple instances of the CUDA Runtime library can be present in an\n application when using a library that statically links the CUDA Runtime.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorMissingConfiguration,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorInitializationError,\n ::cudaErrorLaunchFailure,\n ::cudaErrorLaunchTimeout,\n ::cudaErrorLaunchOutOfResources,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidConfiguration,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorUnmapBufferObjectFailed,\n ::cudaErrorInvalidDevicePointer,\n ::cudaErrorInvalidTexture,\n ::cudaErrorInvalidTextureBinding,\n ::cudaErrorInvalidChannelDescriptor,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorInvalidFilterSetting,\n ::cudaErrorInvalidNormSetting,\n ::cudaErrorUnknown,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorInsufficientDriver,\n ::cudaErrorNoDevice,\n ::cudaErrorSetOnActiveProcess,\n ::cudaErrorStartupFailure,\n ::cudaErrorInvalidPtx,\n ::cudaErrorUnsupportedPtxVersion,\n ::cudaErrorNoKernelImageForDevice,\n ::cudaErrorJitCompilerNotFound,\n ::cudaErrorJitCompilationDisabled\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaPeekAtLastError, ::cudaGetErrorName, ::cudaGetErrorString, ::cudaError"]
16463 pub fn cudaGetLastError() -> cudaError_t;
16464}
16465extern "C" {
16466 #[doc = " \\brief Returns the last error from a runtime call\n\n Returns the last error that has been produced by any of the runtime calls\n in the same instance of the CUDA Runtime library in the host thread. This\n call does not reset the error to ::cudaSuccess like ::cudaGetLastError().\n\n Note: Multiple instances of the CUDA Runtime library can be present in an\n application when using a library that statically links the CUDA Runtime.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorMissingConfiguration,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorInitializationError,\n ::cudaErrorLaunchFailure,\n ::cudaErrorLaunchTimeout,\n ::cudaErrorLaunchOutOfResources,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidConfiguration,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorUnmapBufferObjectFailed,\n ::cudaErrorInvalidDevicePointer,\n ::cudaErrorInvalidTexture,\n ::cudaErrorInvalidTextureBinding,\n ::cudaErrorInvalidChannelDescriptor,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorInvalidFilterSetting,\n ::cudaErrorInvalidNormSetting,\n ::cudaErrorUnknown,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorInsufficientDriver,\n ::cudaErrorNoDevice,\n ::cudaErrorSetOnActiveProcess,\n ::cudaErrorStartupFailure,\n ::cudaErrorInvalidPtx,\n ::cudaErrorUnsupportedPtxVersion,\n ::cudaErrorNoKernelImageForDevice,\n ::cudaErrorJitCompilerNotFound,\n ::cudaErrorJitCompilationDisabled\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetLastError, ::cudaGetErrorName, ::cudaGetErrorString, ::cudaError"]
16467 pub fn cudaPeekAtLastError() -> cudaError_t;
16468}
16469extern "C" {
16470 #[doc = " \\brief Returns the string representation of an error code enum name\n\n Returns a string containing the name of an error code in the enum. If the error\n code is not recognized, \"unrecognized error code\" is returned.\n\n \\param error - Error code to convert to string\n\n \\return\n \\p char* pointer to a NULL-terminated string\n\n \\sa ::cudaGetErrorString, ::cudaGetLastError, ::cudaPeekAtLastError, ::cudaError,\n ::cuGetErrorName"]
16471 pub fn cudaGetErrorName(error: cudaError_t) -> *const ::std::os::raw::c_char;
16472}
16473extern "C" {
16474 #[doc = " \\brief Returns the description string for an error code\n\n Returns the description string for an error code. If the error\n code is not recognized, \"unrecognized error code\" is returned.\n\n \\param error - Error code to convert to string\n\n \\return\n \\p char* pointer to a NULL-terminated string\n\n \\sa ::cudaGetErrorName, ::cudaGetLastError, ::cudaPeekAtLastError, ::cudaError,\n ::cuGetErrorString"]
16475 pub fn cudaGetErrorString(error: cudaError_t) -> *const ::std::os::raw::c_char;
16476}
16477extern "C" {
16478 #[doc = " \\brief Returns the number of compute-capable devices\n\n Returns in \\p *count the number of devices with compute capability greater\n or equal to 2.0 that are available for execution.\n\n \\param count - Returns the number of devices with compute capability\n greater or equal to 2.0\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDevice, ::cudaSetDevice, ::cudaGetDeviceProperties,\n ::cudaChooseDevice,\n ::cudaInitDevice,\n ::cuDeviceGetCount"]
16479 pub fn cudaGetDeviceCount(count: *mut ::std::os::raw::c_int) -> cudaError_t;
16480}
16481extern "C" {
16482 #[doc = " \\brief Returns information about the compute-device\n\n Returns in \\p *prop the properties of device \\p dev. The ::cudaDeviceProp\n structure is defined as:\n \\code\nstruct cudaDeviceProp {\nchar name[256];\ncudaUUID_t uuid;\nsize_t totalGlobalMem;\nsize_t sharedMemPerBlock;\nint regsPerBlock;\nint warpSize;\nsize_t memPitch;\nint maxThreadsPerBlock;\nint maxThreadsDim[3];\nint maxGridSize[3];\nint clockRate;\nsize_t totalConstMem;\nint major;\nint minor;\nsize_t textureAlignment;\nsize_t texturePitchAlignment;\nint deviceOverlap;\nint multiProcessorCount;\nint kernelExecTimeoutEnabled;\nint integrated;\nint canMapHostMemory;\nint computeMode;\nint maxTexture1D;\nint maxTexture1DMipmap;\nint maxTexture1DLinear;\nint maxTexture2D[2];\nint maxTexture2DMipmap[2];\nint maxTexture2DLinear[3];\nint maxTexture2DGather[2];\nint maxTexture3D[3];\nint maxTexture3DAlt[3];\nint maxTextureCubemap;\nint maxTexture1DLayered[2];\nint maxTexture2DLayered[3];\nint maxTextureCubemapLayered[2];\nint maxSurface1D;\nint maxSurface2D[2];\nint maxSurface3D[3];\nint maxSurface1DLayered[2];\nint maxSurface2DLayered[3];\nint maxSurfaceCubemap;\nint maxSurfaceCubemapLayered[2];\nsize_t surfaceAlignment;\nint concurrentKernels;\nint ECCEnabled;\nint pciBusID;\nint pciDeviceID;\nint pciDomainID;\nint tccDriver;\nint asyncEngineCount;\nint unifiedAddressing;\nint memoryClockRate;\nint memoryBusWidth;\nint l2CacheSize;\nint persistingL2CacheMaxSize;\nint maxThreadsPerMultiProcessor;\nint streamPrioritiesSupported;\nint globalL1CacheSupported;\nint localL1CacheSupported;\nsize_t sharedMemPerMultiprocessor;\nint regsPerMultiprocessor;\nint managedMemory;\nint isMultiGpuBoard;\nint multiGpuBoardGroupID;\nint singleToDoublePrecisionPerfRatio;\nint pageableMemoryAccess;\nint concurrentManagedAccess;\nint computePreemptionSupported;\nint canUseHostPointerForRegisteredMem;\nint cooperativeLaunch;\nint cooperativeMultiDeviceLaunch;\nint pageableMemoryAccessUsesHostPageTables;\nint directManagedMemAccessFromHost;\nint accessPolicyMaxWindowSize;\n}\n\\endcode\n where:\n - \\ref ::cudaDeviceProp::name \"name[256]\" is an ASCII string identifying\n the device.\n - \\ref ::cudaDeviceProp::uuid \"uuid\" is a 16-byte unique identifier.\n - \\ref ::cudaDeviceProp::totalGlobalMem \"totalGlobalMem\" is the total\n amount of global memory available on the device in bytes.\n - \\ref ::cudaDeviceProp::sharedMemPerBlock \"sharedMemPerBlock\" is the\n maximum amount of shared memory available to a thread block in bytes.\n - \\ref ::cudaDeviceProp::regsPerBlock \"regsPerBlock\" is the maximum number\n of 32-bit registers available to a thread block.\n - \\ref ::cudaDeviceProp::warpSize \"warpSize\" is the warp size in threads.\n - \\ref ::cudaDeviceProp::memPitch \"memPitch\" is the maximum pitch in\n bytes allowed by the memory copy functions that involve memory regions\n allocated through ::cudaMallocPitch().\n - \\ref ::cudaDeviceProp::maxThreadsPerBlock \"maxThreadsPerBlock\" is the\n maximum number of threads per block.\n - \\ref ::cudaDeviceProp::maxThreadsDim \"maxThreadsDim[3]\" contains the\n maximum size of each dimension of a block.\n - \\ref ::cudaDeviceProp::maxGridSize \"maxGridSize[3]\" contains the\n maximum size of each dimension of a grid.\n - \\ref ::cudaDeviceProp::clockRate \"clockRate\" is the clock frequency in\n kilohertz.\n - \\ref ::cudaDeviceProp::totalConstMem \"totalConstMem\" is the total amount\n of constant memory available on the device in bytes.\n - \\ref ::cudaDeviceProp::major \"major\",\n \\ref ::cudaDeviceProp::minor \"minor\" are the major and minor revision\n numbers defining the device's compute capability.\n - \\ref ::cudaDeviceProp::textureAlignment \"textureAlignment\" is the\n alignment requirement; texture base addresses that are aligned to\n \\ref ::cudaDeviceProp::textureAlignment \"textureAlignment\" bytes do not\n need an offset applied to texture fetches.\n - \\ref ::cudaDeviceProp::texturePitchAlignment \"texturePitchAlignment\" is the\n pitch alignment requirement for 2D texture references that are bound to\n pitched memory.\n - \\ref ::cudaDeviceProp::deviceOverlap \"deviceOverlap\" is 1 if the device\n can concurrently copy memory between host and device while executing a\n kernel, or 0 if not. Deprecated, use instead asyncEngineCount.\n - \\ref ::cudaDeviceProp::multiProcessorCount \"multiProcessorCount\" is the\n number of multiprocessors on the device.\n - \\ref ::cudaDeviceProp::kernelExecTimeoutEnabled \"kernelExecTimeoutEnabled\"\n is 1 if there is a run time limit for kernels executed on the device, or\n 0 if not.\n - \\ref ::cudaDeviceProp::integrated \"integrated\" is 1 if the device is an\n integrated (motherboard) GPU and 0 if it is a discrete (card) component.\n - \\ref ::cudaDeviceProp::canMapHostMemory \"canMapHostMemory\" is 1 if the\n device can map host memory into the CUDA address space for use with\n ::cudaHostAlloc()/::cudaHostGetDevicePointer(), or 0 if not.\n - \\ref ::cudaDeviceProp::computeMode \"computeMode\" is the compute mode\n that the device is currently in. Available modes are as follows:\n - cudaComputeModeDefault: Default mode - Device is not restricted and\n multiple threads can use ::cudaSetDevice() with this device.\n - cudaComputeModeProhibited: Compute-prohibited mode - No threads can use\n ::cudaSetDevice() with this device.\n - cudaComputeModeExclusiveProcess: Compute-exclusive-process mode - Many\n threads in one process will be able to use ::cudaSetDevice() with this device.\n <br> When an occupied exclusive mode device is chosen with ::cudaSetDevice,\n all subsequent non-device management runtime functions will return\n ::cudaErrorDevicesUnavailable.\n - \\ref ::cudaDeviceProp::maxTexture1D \"maxTexture1D\" is the maximum 1D\n texture size.\n - \\ref ::cudaDeviceProp::maxTexture1DMipmap \"maxTexture1DMipmap\" is the maximum\n 1D mipmapped texture texture size.\n - \\ref ::cudaDeviceProp::maxTexture1DLinear \"maxTexture1DLinear\" is the maximum\n 1D texture size for textures bound to linear memory.\n - \\ref ::cudaDeviceProp::maxTexture2D \"maxTexture2D[2]\" contains the maximum\n 2D texture dimensions.\n - \\ref ::cudaDeviceProp::maxTexture2DMipmap \"maxTexture2DMipmap[2]\" contains the\n maximum 2D mipmapped texture dimensions.\n - \\ref ::cudaDeviceProp::maxTexture2DLinear \"maxTexture2DLinear[3]\" contains the\n maximum 2D texture dimensions for 2D textures bound to pitch linear memory.\n - \\ref ::cudaDeviceProp::maxTexture2DGather \"maxTexture2DGather[2]\" contains the\n maximum 2D texture dimensions if texture gather operations have to be performed.\n - \\ref ::cudaDeviceProp::maxTexture3D \"maxTexture3D[3]\" contains the maximum\n 3D texture dimensions.\n - \\ref ::cudaDeviceProp::maxTexture3DAlt \"maxTexture3DAlt[3]\"\n contains the maximum alternate 3D texture dimensions.\n - \\ref ::cudaDeviceProp::maxTextureCubemap \"maxTextureCubemap\" is the\n maximum cubemap texture width or height.\n - \\ref ::cudaDeviceProp::maxTexture1DLayered \"maxTexture1DLayered[2]\" contains\n the maximum 1D layered texture dimensions.\n - \\ref ::cudaDeviceProp::maxTexture2DLayered \"maxTexture2DLayered[3]\" contains\n the maximum 2D layered texture dimensions.\n - \\ref ::cudaDeviceProp::maxTextureCubemapLayered \"maxTextureCubemapLayered[2]\"\n contains the maximum cubemap layered texture dimensions.\n - \\ref ::cudaDeviceProp::maxSurface1D \"maxSurface1D\" is the maximum 1D\n surface size.\n - \\ref ::cudaDeviceProp::maxSurface2D \"maxSurface2D[2]\" contains the maximum\n 2D surface dimensions.\n - \\ref ::cudaDeviceProp::maxSurface3D \"maxSurface3D[3]\" contains the maximum\n 3D surface dimensions.\n - \\ref ::cudaDeviceProp::maxSurface1DLayered \"maxSurface1DLayered[2]\" contains\n the maximum 1D layered surface dimensions.\n - \\ref ::cudaDeviceProp::maxSurface2DLayered \"maxSurface2DLayered[3]\" contains\n the maximum 2D layered surface dimensions.\n - \\ref ::cudaDeviceProp::maxSurfaceCubemap \"maxSurfaceCubemap\" is the maximum\n cubemap surface width or height.\n - \\ref ::cudaDeviceProp::maxSurfaceCubemapLayered \"maxSurfaceCubemapLayered[2]\"\n contains the maximum cubemap layered surface dimensions.\n - \\ref ::cudaDeviceProp::surfaceAlignment \"surfaceAlignment\" specifies the\n alignment requirements for surfaces.\n - \\ref ::cudaDeviceProp::concurrentKernels \"concurrentKernels\" is 1 if the\n device supports executing multiple kernels within the same context\n simultaneously, or 0 if not. It is not guaranteed that multiple kernels\n will be resident on the device concurrently so this feature should not be\n relied upon for correctness.\n - \\ref ::cudaDeviceProp::ECCEnabled \"ECCEnabled\" is 1 if the device has ECC\n support turned on, or 0 if not.\n - \\ref ::cudaDeviceProp::pciBusID \"pciBusID\" is the PCI bus identifier of\n the device.\n - \\ref ::cudaDeviceProp::pciDeviceID \"pciDeviceID\" is the PCI device\n (sometimes called slot) identifier of the device.\n - \\ref ::cudaDeviceProp::pciDomainID \"pciDomainID\" is the PCI domain identifier\n of the device.\n - \\ref ::cudaDeviceProp::tccDriver \"tccDriver\" is 1 if the device is using a\n TCC driver or 0 if not.\n - \\ref ::cudaDeviceProp::asyncEngineCount \"asyncEngineCount\" is 1 when the\n device can concurrently copy memory between host and device while executing\n a kernel. It is 2 when the device can concurrently copy memory between host\n and device in both directions and execute a kernel at the same time. It is\n 0 if neither of these is supported.\n - \\ref ::cudaDeviceProp::unifiedAddressing \"unifiedAddressing\" is 1 if the device\n shares a unified address space with the host and 0 otherwise.\n - \\ref ::cudaDeviceProp::memoryClockRate \"memoryClockRate\" is the peak memory\n clock frequency in kilohertz.\n - \\ref ::cudaDeviceProp::memoryBusWidth \"memoryBusWidth\" is the memory bus width\n in bits.\n - \\ref ::cudaDeviceProp::l2CacheSize \"l2CacheSize\" is L2 cache size in bytes.\n - \\ref ::cudaDeviceProp::persistingL2CacheMaxSize \"persistingL2CacheMaxSize\" is L2 cache's maximum persisting lines size in bytes.\n - \\ref ::cudaDeviceProp::maxThreadsPerMultiProcessor \"maxThreadsPerMultiProcessor\"\n is the number of maximum resident threads per multiprocessor.\n - \\ref ::cudaDeviceProp::streamPrioritiesSupported \"streamPrioritiesSupported\"\n is 1 if the device supports stream priorities, or 0 if it is not supported.\n - \\ref ::cudaDeviceProp::globalL1CacheSupported \"globalL1CacheSupported\"\n is 1 if the device supports caching of globals in L1 cache, or 0 if it is not supported.\n - \\ref ::cudaDeviceProp::localL1CacheSupported \"localL1CacheSupported\"\n is 1 if the device supports caching of locals in L1 cache, or 0 if it is not supported.\n - \\ref ::cudaDeviceProp::sharedMemPerMultiprocessor \"sharedMemPerMultiprocessor\" is the\n maximum amount of shared memory available to a multiprocessor in bytes; this amount is\n shared by all thread blocks simultaneously resident on a multiprocessor.\n - \\ref ::cudaDeviceProp::regsPerMultiprocessor \"regsPerMultiprocessor\" is the maximum number\n of 32-bit registers available to a multiprocessor; this number is shared\n by all thread blocks simultaneously resident on a multiprocessor.\n - \\ref ::cudaDeviceProp::managedMemory \"managedMemory\"\n is 1 if the device supports allocating managed memory on this system, or 0 if it is not supported.\n - \\ref ::cudaDeviceProp::isMultiGpuBoard \"isMultiGpuBoard\"\n is 1 if the device is on a multi-GPU board (e.g. Gemini cards), and 0 if not;\n - \\ref ::cudaDeviceProp::multiGpuBoardGroupID \"multiGpuBoardGroupID\" is a unique identifier\n for a group of devices associated with the same board.\n Devices on the same multi-GPU board will share the same identifier.\n - \\ref ::cudaDeviceProp::hostNativeAtomicSupported \"hostNativeAtomicSupported\"\n is 1 if the link between the device and the host supports native atomic operations, or 0 if it is not supported.\n - \\ref ::cudaDeviceProp::singleToDoublePrecisionPerfRatio \"singleToDoublePrecisionPerfRatio\"\n is the ratio of single precision performance (in floating-point operations per second)\n to double precision performance.\n - \\ref ::cudaDeviceProp::pageableMemoryAccess \"pageableMemoryAccess\" is 1 if the device supports\n coherently accessing pageable memory without calling cudaHostRegister on it, and 0 otherwise.\n - \\ref ::cudaDeviceProp::concurrentManagedAccess \"concurrentManagedAccess\" is 1 if the device can\n coherently access managed memory concurrently with the CPU, and 0 otherwise.\n - \\ref ::cudaDeviceProp::computePreemptionSupported \"computePreemptionSupported\" is 1 if the device\n supports Compute Preemption, and 0 otherwise.\n - \\ref ::cudaDeviceProp::canUseHostPointerForRegisteredMem \"canUseHostPointerForRegisteredMem\" is 1 if\n the device can access host registered memory at the same virtual address as the CPU, and 0 otherwise.\n - \\ref ::cudaDeviceProp::cooperativeLaunch \"cooperativeLaunch\" is 1 if the device supports launching\n cooperative kernels via ::cudaLaunchCooperativeKernel, and 0 otherwise.\n - \\ref ::cudaDeviceProp::cooperativeMultiDeviceLaunch \"cooperativeMultiDeviceLaunch\" is 1 if the device\n supports launching cooperative kernels via ::cudaLaunchCooperativeKernelMultiDevice, and 0 otherwise.\n - \\ref ::cudaDeviceProp::sharedMemPerBlockOptin \"sharedMemPerBlockOptin\"\n is the per device maximum shared memory per block usable by special opt in\n - \\ref ::cudaDeviceProp::pageableMemoryAccessUsesHostPageTables \"pageableMemoryAccessUsesHostPageTables\" is 1 if the device accesses\n pageable memory via the host's page tables, and 0 otherwise.\n - \\ref ::cudaDeviceProp::directManagedMemAccessFromHost \"directManagedMemAccessFromHost\" is 1 if the host can directly access managed\n memory on the device without migration, and 0 otherwise.\n - \\ref ::cudaDeviceProp::maxBlocksPerMultiProcessor \"maxBlocksPerMultiProcessor\" is the maximum number of thread blocks\n that can reside on a multiprocessor.\n - \\ref ::cudaDeviceProp::accessPolicyMaxWindowSize \"accessPolicyMaxWindowSize\" is\n the maximum value of ::cudaAccessPolicyWindow::num_bytes.\n - \\ref ::cudaDeviceProp::reservedSharedMemPerBlock \"reservedSharedMemPerBlock\"\n is the shared memory reserved by CUDA driver per block in bytes\n - \\ref ::cudaDeviceProp::hostRegisterSupported \"hostRegisterSupported\"\n is 1 if the device supports host memory registration via ::cudaHostRegister, and 0 otherwise.\n - \\ref ::cudaDeviceProp::sparseCudaArraySupported \"sparseCudaArraySupported\"\n is 1 if the device supports sparse CUDA arrays and sparse CUDA mipmapped arrays, 0 otherwise\n - \\ref ::cudaDeviceProp::hostRegisterReadOnlySupported \"hostRegisterReadOnlySupported\"\n is 1 if the device supports using the ::cudaHostRegister flag cudaHostRegisterReadOnly to register memory that must be mapped as\n read-only to the GPU\n - \\ref ::cudaDeviceProp::timelineSemaphoreInteropSupported \"timelineSemaphoreInteropSupported\"\n is 1 if external timeline semaphore interop is supported on the device, 0 otherwise\n - \\ref ::cudaDeviceProp::memoryPoolsSupported \"memoryPoolsSupported\"\n is 1 if the device supports using the cudaMallocAsync and cudaMemPool family of APIs, 0 otherwise\n - \\ref ::cudaDeviceProp::gpuDirectRDMASupported \"gpuDirectRDMASupported\"\n is 1 if the device supports GPUDirect RDMA APIs, 0 otherwise\n - \\ref ::cudaDeviceProp::gpuDirectRDMAFlushWritesOptions \"gpuDirectRDMAFlushWritesOptions\"\n is a bitmask to be interpreted according to the ::cudaFlushGPUDirectRDMAWritesOptions enum\n - \\ref ::cudaDeviceProp::gpuDirectRDMAWritesOrdering \"gpuDirectRDMAWritesOrdering\"\n See the ::cudaGPUDirectRDMAWritesOrdering enum for numerical values\n - \\ref ::cudaDeviceProp::memoryPoolSupportedHandleTypes \"memoryPoolSupportedHandleTypes\"\n is a bitmask of handle types supported with mempool-based IPC\n - \\ref ::cudaDeviceProp::deferredMappingCudaArraySupported \"deferredMappingCudaArraySupported\"\n is 1 if the device supports deferred mapping CUDA arrays and CUDA mipmapped arrays\n - \\ref ::cudaDeviceProp::ipcEventSupported \"ipcEventSupported\"\n is 1 if the device supports IPC Events, and 0 otherwise\n - \\ref ::cudaDeviceProp::unifiedFunctionPointers \"unifiedFunctionPointers\"\n is 1 if the device support unified pointers, and 0 otherwise\n\n \\param prop - Properties for the specified device\n \\param device - Device number to get properties for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice, ::cudaChooseDevice,\n ::cudaDeviceGetAttribute,\n ::cudaInitDevice,\n ::cuDeviceGetAttribute,\n ::cuDeviceGetName"]
16483 pub fn cudaGetDeviceProperties_v2(
16484 prop: *mut cudaDeviceProp,
16485 device: ::std::os::raw::c_int,
16486 ) -> cudaError_t;
16487}
16488extern "C" {
16489 #[doc = " \\brief Returns information about the device\n\n Returns in \\p *value the integer value of the attribute \\p attr on device\n \\p device. The supported attributes are:\n - ::cudaDevAttrMaxThreadsPerBlock: Maximum number of threads per block\n - ::cudaDevAttrMaxBlockDimX: Maximum x-dimension of a block\n - ::cudaDevAttrMaxBlockDimY: Maximum y-dimension of a block\n - ::cudaDevAttrMaxBlockDimZ: Maximum z-dimension of a block\n - ::cudaDevAttrMaxGridDimX: Maximum x-dimension of a grid\n - ::cudaDevAttrMaxGridDimY: Maximum y-dimension of a grid\n - ::cudaDevAttrMaxGridDimZ: Maximum z-dimension of a grid\n - ::cudaDevAttrMaxSharedMemoryPerBlock: Maximum amount of shared memory\n available to a thread block in bytes\n - ::cudaDevAttrTotalConstantMemory: Memory available on device for\n __constant__ variables in a CUDA C kernel in bytes\n - ::cudaDevAttrWarpSize: Warp size in threads\n - ::cudaDevAttrMaxPitch: Maximum pitch in bytes allowed by the memory copy\n functions that involve memory regions allocated through ::cudaMallocPitch()\n - ::cudaDevAttrMaxTexture1DWidth: Maximum 1D texture width\n - ::cudaDevAttrMaxTexture1DLinearWidth: Maximum width for a 1D texture bound\n to linear memory\n - ::cudaDevAttrMaxTexture1DMipmappedWidth: Maximum mipmapped 1D texture width\n - ::cudaDevAttrMaxTexture2DWidth: Maximum 2D texture width\n - ::cudaDevAttrMaxTexture2DHeight: Maximum 2D texture height\n - ::cudaDevAttrMaxTexture2DLinearWidth: Maximum width for a 2D texture\n bound to linear memory\n - ::cudaDevAttrMaxTexture2DLinearHeight: Maximum height for a 2D texture\n bound to linear memory\n - ::cudaDevAttrMaxTexture2DLinearPitch: Maximum pitch in bytes for a 2D\n texture bound to linear memory\n - ::cudaDevAttrMaxTexture2DMipmappedWidth: Maximum mipmapped 2D texture\n width\n - ::cudaDevAttrMaxTexture2DMipmappedHeight: Maximum mipmapped 2D texture\n height\n - ::cudaDevAttrMaxTexture3DWidth: Maximum 3D texture width\n - ::cudaDevAttrMaxTexture3DHeight: Maximum 3D texture height\n - ::cudaDevAttrMaxTexture3DDepth: Maximum 3D texture depth\n - ::cudaDevAttrMaxTexture3DWidthAlt: Alternate maximum 3D texture width,\n 0 if no alternate maximum 3D texture size is supported\n - ::cudaDevAttrMaxTexture3DHeightAlt: Alternate maximum 3D texture height,\n 0 if no alternate maximum 3D texture size is supported\n - ::cudaDevAttrMaxTexture3DDepthAlt: Alternate maximum 3D texture depth,\n 0 if no alternate maximum 3D texture size is supported\n - ::cudaDevAttrMaxTextureCubemapWidth: Maximum cubemap texture width or\n height\n - ::cudaDevAttrMaxTexture1DLayeredWidth: Maximum 1D layered texture width\n - ::cudaDevAttrMaxTexture1DLayeredLayers: Maximum layers in a 1D layered\n texture\n - ::cudaDevAttrMaxTexture2DLayeredWidth: Maximum 2D layered texture width\n - ::cudaDevAttrMaxTexture2DLayeredHeight: Maximum 2D layered texture height\n - ::cudaDevAttrMaxTexture2DLayeredLayers: Maximum layers in a 2D layered\n texture\n - ::cudaDevAttrMaxTextureCubemapLayeredWidth: Maximum cubemap layered\n texture width or height\n - ::cudaDevAttrMaxTextureCubemapLayeredLayers: Maximum layers in a cubemap\n layered texture\n - ::cudaDevAttrMaxSurface1DWidth: Maximum 1D surface width\n - ::cudaDevAttrMaxSurface2DWidth: Maximum 2D surface width\n - ::cudaDevAttrMaxSurface2DHeight: Maximum 2D surface height\n - ::cudaDevAttrMaxSurface3DWidth: Maximum 3D surface width\n - ::cudaDevAttrMaxSurface3DHeight: Maximum 3D surface height\n - ::cudaDevAttrMaxSurface3DDepth: Maximum 3D surface depth\n - ::cudaDevAttrMaxSurface1DLayeredWidth: Maximum 1D layered surface width\n - ::cudaDevAttrMaxSurface1DLayeredLayers: Maximum layers in a 1D layered\n surface\n - ::cudaDevAttrMaxSurface2DLayeredWidth: Maximum 2D layered surface width\n - ::cudaDevAttrMaxSurface2DLayeredHeight: Maximum 2D layered surface height\n - ::cudaDevAttrMaxSurface2DLayeredLayers: Maximum layers in a 2D layered\n surface\n - ::cudaDevAttrMaxSurfaceCubemapWidth: Maximum cubemap surface width\n - ::cudaDevAttrMaxSurfaceCubemapLayeredWidth: Maximum cubemap layered\n surface width\n - ::cudaDevAttrMaxSurfaceCubemapLayeredLayers: Maximum layers in a cubemap\n layered surface\n - ::cudaDevAttrMaxRegistersPerBlock: Maximum number of 32-bit registers\n available to a thread block\n - ::cudaDevAttrClockRate: Peak clock frequency in kilohertz\n - ::cudaDevAttrTextureAlignment: Alignment requirement; texture base\n addresses aligned to ::textureAlign bytes do not need an offset applied\n to texture fetches\n - ::cudaDevAttrTexturePitchAlignment: Pitch alignment requirement for 2D\n texture references bound to pitched memory\n - ::cudaDevAttrGpuOverlap: 1 if the device can concurrently copy memory\n between host and device while executing a kernel, or 0 if not\n - ::cudaDevAttrMultiProcessorCount: Number of multiprocessors on the device\n - ::cudaDevAttrKernelExecTimeout: 1 if there is a run time limit for kernels\n executed on the device, or 0 if not\n - ::cudaDevAttrIntegrated: 1 if the device is integrated with the memory\n subsystem, or 0 if not\n - ::cudaDevAttrCanMapHostMemory: 1 if the device can map host memory into\n the CUDA address space, or 0 if not\n - ::cudaDevAttrComputeMode: Compute mode is the compute mode that the device\n is currently in. Available modes are as follows:\n - ::cudaComputeModeDefault: Default mode - Device is not restricted and\n multiple threads can use ::cudaSetDevice() with this device.\n - ::cudaComputeModeProhibited: Compute-prohibited mode - No threads can use\n ::cudaSetDevice() with this device.\n - ::cudaComputeModeExclusiveProcess: Compute-exclusive-process mode - Many\n threads in one process will be able to use ::cudaSetDevice() with this\n device.\n - ::cudaDevAttrConcurrentKernels: 1 if the device supports executing\n multiple kernels within the same context simultaneously, or 0 if\n not. It is not guaranteed that multiple kernels will be resident on the\n device concurrently so this feature should not be relied upon for\n correctness.\n - ::cudaDevAttrEccEnabled: 1 if error correction is enabled on the device,\n 0 if error correction is disabled or not supported by the device\n - ::cudaDevAttrPciBusId: PCI bus identifier of the device\n - ::cudaDevAttrPciDeviceId: PCI device (also known as slot) identifier of\n the device\n - ::cudaDevAttrTccDriver: 1 if the device is using a TCC driver. TCC is only\n available on Tesla hardware running Windows Vista or later.\n - ::cudaDevAttrMemoryClockRate: Peak memory clock frequency in kilohertz\n - ::cudaDevAttrGlobalMemoryBusWidth: Global memory bus width in bits\n - ::cudaDevAttrL2CacheSize: Size of L2 cache in bytes. 0 if the device\n doesn't have L2 cache.\n - ::cudaDevAttrMaxThreadsPerMultiProcessor: Maximum resident threads per\n multiprocessor\n - ::cudaDevAttrUnifiedAddressing: 1 if the device shares a unified address\n space with the host, or 0 if not\n - ::cudaDevAttrComputeCapabilityMajor: Major compute capability version\n number\n - ::cudaDevAttrComputeCapabilityMinor: Minor compute capability version\n number\n - ::cudaDevAttrStreamPrioritiesSupported: 1 if the device supports stream\n priorities, or 0 if not\n - ::cudaDevAttrGlobalL1CacheSupported: 1 if device supports caching globals\n in L1 cache, 0 if not\n - ::cudaDevAttrLocalL1CacheSupported: 1 if device supports caching locals\n in L1 cache, 0 if not\n - ::cudaDevAttrMaxSharedMemoryPerMultiprocessor: Maximum amount of shared memory\n available to a multiprocessor in bytes; this amount is shared by all\n thread blocks simultaneously resident on a multiprocessor\n - ::cudaDevAttrMaxRegistersPerMultiprocessor: Maximum number of 32-bit registers\n available to a multiprocessor; this number is shared by all thread blocks\n simultaneously resident on a multiprocessor\n - ::cudaDevAttrManagedMemory: 1 if device supports allocating\n managed memory, 0 if not\n - ::cudaDevAttrIsMultiGpuBoard: 1 if device is on a multi-GPU board, 0 if not\n - ::cudaDevAttrMultiGpuBoardGroupID: Unique identifier for a group of devices on the\n same multi-GPU board\n - ::cudaDevAttrHostNativeAtomicSupported: 1 if the link between the device and the\n host supports native atomic operations\n - ::cudaDevAttrSingleToDoublePrecisionPerfRatio: Ratio of single precision performance\n (in floating-point operations per second) to double precision performance\n - ::cudaDevAttrPageableMemoryAccess: 1 if the device supports coherently accessing\n pageable memory without calling cudaHostRegister on it, and 0 otherwise\n - ::cudaDevAttrConcurrentManagedAccess: 1 if the device can coherently access managed\n memory concurrently with the CPU, and 0 otherwise\n - ::cudaDevAttrComputePreemptionSupported: 1 if the device supports\n Compute Preemption, 0 if not\n - ::cudaDevAttrCanUseHostPointerForRegisteredMem: 1 if the device can access host\n registered memory at the same virtual address as the CPU, and 0 otherwise\n - ::cudaDevAttrCooperativeLaunch: 1 if the device supports launching cooperative kernels\n via ::cudaLaunchCooperativeKernel, and 0 otherwise\n - ::cudaDevAttrCooperativeMultiDeviceLaunch: 1 if the device supports launching cooperative\n kernels via ::cudaLaunchCooperativeKernelMultiDevice, and 0 otherwise\n - ::cudaDevAttrCanFlushRemoteWrites: 1 if the device supports flushing of outstanding\n remote writes, and 0 otherwise\n - ::cudaDevAttrHostRegisterSupported: 1 if the device supports host memory registration\n via ::cudaHostRegister, and 0 otherwise\n - ::cudaDevAttrPageableMemoryAccessUsesHostPageTables: 1 if the device accesses pageable memory via the\n host's page tables, and 0 otherwise\n - ::cudaDevAttrDirectManagedMemAccessFromHost: 1 if the host can directly access managed memory on the device\n without migration, and 0 otherwise\n - ::cudaDevAttrMaxSharedMemoryPerBlockOptin: Maximum per block shared memory size on the device. This value can\n be opted into when using ::cudaFuncSetAttribute\n - ::cudaDevAttrMaxBlocksPerMultiprocessor: Maximum number of thread blocks that can reside on a multiprocessor\n - ::cudaDevAttrMaxPersistingL2CacheSize: Maximum L2 persisting lines capacity setting in bytes\n - ::cudaDevAttrMaxAccessPolicyWindowSize: Maximum value of cudaAccessPolicyWindow::num_bytes\n - ::cudaDevAttrReservedSharedMemoryPerBlock: Shared memory reserved by CUDA driver per block in bytes\n - ::cudaDevAttrSparseCudaArraySupported: 1 if the device supports sparse CUDA arrays and sparse CUDA mipmapped arrays.\n - ::cudaDevAttrHostRegisterReadOnlySupported: Device supports using the ::cudaHostRegister flag cudaHostRegisterReadOnly\n to register memory that must be mapped as read-only to the GPU\n - ::cudaDevAttrMemoryPoolsSupported: 1 if the device supports using the cudaMallocAsync and cudaMemPool family of APIs, and 0 otherwise\n - ::cudaDevAttrGPUDirectRDMASupported: 1 if the device supports GPUDirect RDMA APIs, and 0 otherwise\n - ::cudaDevAttrGPUDirectRDMAFlushWritesOptions: bitmask to be interpreted according to the ::cudaFlushGPUDirectRDMAWritesOptions enum\n - ::cudaDevAttrGPUDirectRDMAWritesOrdering: see the ::cudaGPUDirectRDMAWritesOrdering enum for numerical values\n - ::cudaDevAttrMemoryPoolSupportedHandleTypes: Bitmask of handle types supported with mempool based IPC\n - ::cudaDevAttrDeferredMappingCudaArraySupported : 1 if the device supports deferred mapping CUDA arrays and CUDA mipmapped arrays.\n - ::cudaDevAttrIpcEventSupport: 1 if the device supports IPC Events.\n - ::cudaDevAttrNumaConfig: NUMA configuration of a device: value is of type ::cudaDeviceNumaConfig enum\n - ::cudaDevAttrNumaId: NUMA node ID of the GPU memory\n\n \\param value - Returned device attribute value\n \\param attr - Device attribute to query\n \\param device - Device number to query\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice, ::cudaChooseDevice,\n ::cudaGetDeviceProperties,\n ::cudaInitDevice,\n ::cuDeviceGetAttribute"]
16490 pub fn cudaDeviceGetAttribute(
16491 value: *mut ::std::os::raw::c_int,
16492 attr: cudaDeviceAttr,
16493 device: ::std::os::raw::c_int,
16494 ) -> cudaError_t;
16495}
16496extern "C" {
16497 #[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 ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue\n ::cudaErrorNotSupported\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cuDeviceGetDefaultMemPool, ::cudaMallocAsync, ::cudaMemPoolTrimTo, ::cudaMemPoolGetAttribute, ::cudaDeviceSetMemPool, ::cudaMemPoolSetAttribute, ::cudaMemPoolSetAccess"]
16498 pub fn cudaDeviceGetDefaultMemPool(
16499 memPool: *mut cudaMemPool_t,
16500 device: ::std::os::raw::c_int,
16501 ) -> cudaError_t;
16502}
16503extern "C" {
16504 #[doc = " \\brief Sets the current memory pool of a device\n\n The memory pool must be local to the specified device.\n Unless a mempool is specified in the ::cudaMallocAsync call,\n ::cudaMallocAsync 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 ::cudaMallocFromPoolAsync to specify asynchronous allocations from a device different\n than the one the stream runs on.\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n ::cudaErrorInvalidDevice\n ::cudaErrorNotSupported\n \\notefnerr\n \\note_callback\n\n \\sa ::cuDeviceSetMemPool, ::cudaDeviceGetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaMemPoolCreate, ::cudaMemPoolDestroy, ::cudaMallocFromPoolAsync"]
16505 pub fn cudaDeviceSetMemPool(
16506 device: ::std::os::raw::c_int,
16507 memPool: cudaMemPool_t,
16508 ) -> cudaError_t;
16509}
16510extern "C" {
16511 #[doc = " \\brief Gets the current mempool for a device\n\n Returns the last pool provided to ::cudaDeviceSetMemPool for this device\n or the device's default memory pool if ::cudaDeviceSetMemPool 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 or ::cudaDeviceSetMemPool.\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n ::cudaErrorNotSupported\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cuDeviceGetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceSetMemPool"]
16512 pub fn cudaDeviceGetMemPool(
16513 memPool: *mut cudaMemPool_t,
16514 device: ::std::os::raw::c_int,
16515 ) -> cudaError_t;
16516}
16517extern "C" {
16518 #[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 that matches this device's capabilities.\n\n If NvSciSyncAttrKey_RequiredPerm field in \\p nvSciSyncAttrList is\n already set this API will return ::cudaErrorInvalidValue.\n\n The applications should set \\p nvSciSyncAttrList to a valid\n NvSciSyncAttrList failing which this API will return\n ::cudaErrorInvalidHandle.\n\n The \\p flags controls how applications intends to use\n the NvSciSync created from the \\p nvSciSyncAttrList. The valid flags are:\n - ::cudaNvSciSyncAttrSignal, specifies that the applications intends to\n signal an NvSciSync on this CUDA device.\n - ::cudaNvSciSyncAttrWait, 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 ::cudaErrorInvalidValue. 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 Note that this API updates the input \\p nvSciSyncAttrList with values equivalent\n to the following public attribute key-values:\n NvSciSyncAttrKey_RequiredPerm is set to\n - NvSciSyncAccessPerm_SignalOnly if ::cudaNvSciSyncAttrSignal is set in \\p flags.\n - NvSciSyncAccessPerm_WaitOnly if ::cudaNvSciSyncAttrWait is set in \\p flags.\n - NvSciSyncAccessPerm_WaitSignal if both ::cudaNvSciSyncAttrWait and\n ::cudaNvSciSyncAttrSignal are set in \\p flags.\n NvSciSyncAttrKey_PrimitiveInfo is set to\n - NvSciSyncAttrValPrimitiveType_SysmemSemaphore on any valid \\p device.\n - NvSciSyncAttrValPrimitiveType_Syncpoint if \\p device is a Tegra device.\n - NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b if \\p device is GA10X+.\n NvSciSyncAttrKey_GpuId is set to the same UUID that is returned in\n \\p cudaDeviceProp.uuid from ::cudaDeviceGetProperties for this \\p device.\n\n \\param nvSciSyncAttrList - Return NvSciSync attributes supported.\n \\param device - Valid Cuda Device to get NvSciSync attributes for.\n \\param flags - flags describing NvSciSync usage.\n\n \\return\n\n ::cudaSuccess,\n ::cudaErrorDeviceUninitialized,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidHandle,\n ::cudaErrorInvalidDevice,\n ::cudaErrorNotSupported,\n ::cudaErrorMemoryAllocation\n\n \\sa\n ::cudaImportExternalSemaphore,\n ::cudaDestroyExternalSemaphore,\n ::cudaSignalExternalSemaphoresAsync,\n ::cudaWaitExternalSemaphoresAsync"]
16519 pub fn cudaDeviceGetNvSciSyncAttributes(
16520 nvSciSyncAttrList: *mut ::std::os::raw::c_void,
16521 device: ::std::os::raw::c_int,
16522 flags: ::std::os::raw::c_int,
16523 ) -> cudaError_t;
16524}
16525extern "C" {
16526 #[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 - ::cudaDevP2PAttrPerformanceRank: A relative value indicating the\n performance of the link between two devices. Lower value means better\n performance (0 being the value used for most performant link).\n - ::cudaDevP2PAttrAccessSupported: 1 if peer access is enabled.\n - ::cudaDevP2PAttrNativeAtomicSupported: 1 if native atomic operations over\n the link are supported.\n - ::cudaDevP2PAttrCudaArrayAccessSupported: 1 if accessing CUDA arrays over\n the link is supported.\n\n Returns ::cudaErrorInvalidDevice if \\p srcDevice or \\p dstDevice are not valid\n or if they represent the same device.\n\n Returns ::cudaErrorInvalidValue 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 ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceEnablePeerAccess,\n ::cudaDeviceDisablePeerAccess,\n ::cudaDeviceCanAccessPeer,\n ::cuDeviceGetP2PAttribute"]
16527 pub fn cudaDeviceGetP2PAttribute(
16528 value: *mut ::std::os::raw::c_int,
16529 attr: cudaDeviceP2PAttr,
16530 srcDevice: ::std::os::raw::c_int,
16531 dstDevice: ::std::os::raw::c_int,
16532 ) -> cudaError_t;
16533}
16534extern "C" {
16535 #[doc = " \\brief Select compute-device which best matches criteria\n\n Returns in \\p *device the device which has properties that best match\n \\p *prop.\n\n \\param device - Device with best match\n \\param prop - Desired device properties\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice,\n ::cudaGetDeviceProperties,\n ::cudaInitDevice"]
16536 pub fn cudaChooseDevice(
16537 device: *mut ::std::os::raw::c_int,
16538 prop: *const cudaDeviceProp,
16539 ) -> cudaError_t;
16540}
16541extern "C" {
16542 #[doc = " \\brief Initialize device to be used for GPU executions\n\n This function will initialize the CUDA Runtime structures and primary context on \\p device when called,\n but the context will not be made current to \\p device.\n\n When ::cudaInitDeviceFlagsAreValid is set in \\p flags, deviceFlags are applied to the requested device.\n The values of deviceFlags match those of the flags parameters in ::cudaSetDeviceFlags.\n The effect may be verified by ::cudaGetDeviceFlags.\n\n This function will return an error if the device is in ::cudaComputeModeExclusiveProcess\n and is occupied by another process or if the device is in ::cudaComputeModeProhibited.\n\n \\param device - Device on which the runtime will initialize itself.\n \\param deviceFlags - Parameters for device operation.\n \\param flags - Flags for controlling the device initialization.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties,\n ::cudaChooseDevice, ::cudaSetDevice\n ::cuCtxSetCurrent"]
16543 pub fn cudaInitDevice(
16544 device: ::std::os::raw::c_int,
16545 deviceFlags: ::std::os::raw::c_uint,
16546 flags: ::std::os::raw::c_uint,
16547 ) -> cudaError_t;
16548}
16549extern "C" {
16550 #[doc = " \\brief Set device to be used for GPU executions\n\n Sets \\p device as the current device for the calling host thread.\n Valid device id's are 0 to (::cudaGetDeviceCount() - 1).\n\n Any device memory subsequently allocated from this host thread\n using ::cudaMalloc(), ::cudaMallocPitch() or ::cudaMallocArray()\n will be physically resident on \\p device. Any host memory allocated\n from this host thread using ::cudaMallocHost() or ::cudaHostAlloc()\n or ::cudaHostRegister() will have its lifetime associated with\n \\p device. Any streams or events created from this host thread will\n be associated with \\p device. Any kernels launched from this host\n thread using the <<<>>> operator or ::cudaLaunchKernel() will be executed\n on \\p device.\n\n This call may be made from any host thread, to any device, and at\n any time. This function will do no synchronization with the previous\n or new device,\n and should only take significant time when it initializes the runtime's context state.\n This call will bind the primary context of the specified device to the calling thread and all the\n subsequent memory allocations, stream and event creations, and kernel launches\n will be associated with the primary context.\n This function will also immediately initialize the runtime state on the primary context,\n and the context will be current on \\p device immediately. This function will return an\n error if the device is in ::cudaComputeModeExclusiveProcess and is occupied by another\n process or if the device is in ::cudaComputeModeProhibited.\n\n It is not required to call ::cudaInitDevice before using this function.\n \\param device - Device on which the active host thread should execute the\n device code.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorDeviceUnavailable,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties,\n ::cudaChooseDevice,\n ::cudaInitDevice,\n ::cuCtxSetCurrent"]
16551 pub fn cudaSetDevice(device: ::std::os::raw::c_int) -> cudaError_t;
16552}
16553extern "C" {
16554 #[doc = " \\brief Returns which device is currently being used\n\n Returns in \\p *device the current device for the calling host thread.\n\n \\param device - Returns the device on which the active host thread\n executes the device code.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorDeviceUnavailable,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaSetDevice, ::cudaGetDeviceProperties,\n ::cudaChooseDevice,\n ::cuCtxGetCurrent"]
16555 pub fn cudaGetDevice(device: *mut ::std::os::raw::c_int) -> cudaError_t;
16556}
16557extern "C" {
16558 #[doc = " \\brief Set a list of devices that can be used for CUDA\n\n Sets a list of devices for CUDA execution in priority order using\n \\p device_arr. The parameter \\p len specifies the number of elements in the\n list. CUDA will try devices from the list sequentially until it finds one\n that works. If this function is not called, or if it is called with a \\p len\n of 0, then CUDA will go back to its default behavior of trying devices\n sequentially from a default list containing all of the available CUDA\n devices in the system. If a specified device ID in the list does not exist,\n this function will return ::cudaErrorInvalidDevice. If \\p len is not 0 and\n \\p device_arr is NULL or if \\p len exceeds the number of devices in\n the system, then ::cudaErrorInvalidValue is returned.\n\n \\param device_arr - List of devices to try\n \\param len - Number of devices in specified list\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaSetDevice, ::cudaGetDeviceProperties,\n ::cudaSetDeviceFlags,\n ::cudaChooseDevice"]
16559 pub fn cudaSetValidDevices(
16560 device_arr: *mut ::std::os::raw::c_int,
16561 len: ::std::os::raw::c_int,
16562 ) -> cudaError_t;
16563}
16564extern "C" {
16565 #[doc = " \\brief Sets flags to be used for device executions\n\n Records \\p flags as the flags for the current device. If the current device\n has been set and that device has already been initialized, the previous flags\n are overwritten. If the current device has not been initialized, it is\n initialized with the provided flags. If no device has been made current to\n the calling thread, a default device is selected and initialized with the\n provided flags.\n\n The three LSBs of the \\p flags parameter can be used to control how the CPU\n thread interacts with the OS scheduler when waiting for results from the\n device.\n\n - ::cudaDeviceScheduleAuto: The default value if the \\p flags parameter is\n zero, uses a heuristic based on the number of active CUDA contexts in the\n process \\p C and the number of logical processors in the system \\p P. If\n \\p C \\> \\p P, then CUDA will yield to other OS threads when waiting for the\n device, otherwise CUDA will not yield while waiting for results and\n actively spin on the processor. Additionally, on Tegra devices,\n ::cudaDeviceScheduleAuto uses a heuristic based on the power profile of\n the platform and may choose ::cudaDeviceScheduleBlockingSync for low-powered\n devices.\n - ::cudaDeviceScheduleSpin: Instruct CUDA to actively spin when waiting for\n results from the device. This can decrease latency when waiting for the\n device, but may lower the performance of CPU threads if they are performing\n work in parallel with the CUDA thread.\n - ::cudaDeviceScheduleYield: Instruct CUDA to yield its thread when waiting\n for results from the device. This can increase latency when waiting for the\n device, but can increase the performance of CPU threads performing work in\n parallel with the device.\n - ::cudaDeviceScheduleBlockingSync: Instruct CUDA to block the CPU thread\n on a synchronization primitive when waiting for the device to finish work.\n - ::cudaDeviceBlockingSync: Instruct CUDA to block the CPU thread on a\n synchronization primitive when waiting for the device to finish work. <br>\n \\ref deprecated \"Deprecated:\" This flag was deprecated as of CUDA 4.0 and\n replaced with ::cudaDeviceScheduleBlockingSync.\n - ::cudaDeviceMapHost: This flag enables allocating pinned\n host memory that is accessible to the device. It is implicit for the\n runtime but may be absent if a context is created using the driver API.\n If this flag is not set, ::cudaHostGetDevicePointer() will always return\n a failure code.\n - ::cudaDeviceLmemResizeToMax: Instruct CUDA to not reduce local memory\n after resizing local memory for a kernel. This can prevent thrashing by\n local memory allocations when launching many kernels with high local\n memory usage at the cost of potentially increased memory usage. <br>\n \\ref deprecated \"Deprecated:\" This flag is deprecated and the behavior enabled\n by this flag is now the default and cannot be disabled.\n - ::cudaDeviceSyncMemops: Ensures that synchronous memory operations initiated\n on this context will always synchronize. See further documentation in the\n section titled \"API Synchronization behavior\" to learn more about cases when\n synchronous memory operations can exhibit asynchronous behavior.\n\n \\param flags - Parameters for device operation\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceFlags, ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaGetDeviceProperties,\n ::cudaSetDevice, ::cudaSetValidDevices,\n ::cudaInitDevice,\n ::cudaChooseDevice,\n ::cuDevicePrimaryCtxSetFlags"]
16566 pub fn cudaSetDeviceFlags(flags: ::std::os::raw::c_uint) -> cudaError_t;
16567}
16568extern "C" {
16569 #[doc = " \\brief Gets the flags for the current device\n\n\n Returns in \\p flags the flags for the current device. If there is a current\n device for the calling thread, the flags for the device are returned. If\n there is no current device, the flags for the first device are returned,\n which may be the default flags. Compare to the behavior of\n ::cudaSetDeviceFlags.\n\n Typically, the flags returned should match the behavior that will be seen\n if the calling thread uses a device after this call, without any change to\n the flags or current device inbetween by this or another thread. Note that\n if the device is not initialized, it is possible for another thread to\n change the flags for the current device before it is initialized.\n Additionally, when using exclusive mode, if this thread has not requested a\n specific device, it may use a device other than the first device, contrary\n to the assumption made by this function.\n\n If a context has been created via the driver API and is current to the\n calling thread, the flags for that context are always returned.\n\n Flags returned by this function may specifically include ::cudaDeviceMapHost\n even though it is not accepted by ::cudaSetDeviceFlags because it is\n implicit in runtime API flags. The reason for this is that the current\n context may have been created via the driver API in which case the flag is\n not implicit and may be unset.\n\n \\param flags - Pointer to store the device flags\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDevice, ::cudaGetDeviceProperties,\n ::cudaSetDevice, ::cudaSetDeviceFlags,\n ::cudaInitDevice,\n ::cuCtxGetFlags,\n ::cuDevicePrimaryCtxGetState"]
16570 pub fn cudaGetDeviceFlags(flags: *mut ::std::os::raw::c_uint) -> cudaError_t;
16571}
16572extern "C" {
16573 #[doc = " \\brief Create an asynchronous stream\n\n Creates a new asynchronous stream on the context that is current to the calling host thread.\n If no context is current to the calling host thread, then the primary context for a device\n is selected, made current to the calling thread, and initialized before creating a stream on it.\n\n \\param pStream - Pointer to new stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreateWithPriority,\n ::cudaStreamCreateWithFlags,\n ::cudaStreamGetPriority,\n ::cudaStreamGetFlags,\n ::cudaStreamQuery,\n ::cudaStreamSynchronize,\n ::cudaStreamWaitEvent,\n ::cudaStreamAddCallback,\n ::cudaSetDevice,\n ::cudaStreamDestroy,\n ::cuStreamCreate"]
16574 pub fn cudaStreamCreate(pStream: *mut cudaStream_t) -> cudaError_t;
16575}
16576extern "C" {
16577 #[doc = " \\brief Create an asynchronous stream\n\n Creates a new asynchronous stream on the context that is current to the calling host thread.\n If no context is current to the calling host thread, then the primary context for a device\n is selected, made current to the calling thread, and initialized before creating a stream on it.\n The \\p flags argument determines the behaviors of the stream. Valid values for \\p flags are\n - ::cudaStreamDefault: Default stream creation flag.\n - ::cudaStreamNonBlocking: 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 pStream - Pointer to new stream identifier\n \\param flags - Parameters for stream creation\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate,\n ::cudaStreamCreateWithPriority,\n ::cudaStreamGetFlags,\n ::cudaStreamQuery,\n ::cudaStreamSynchronize,\n ::cudaStreamWaitEvent,\n ::cudaStreamAddCallback,\n ::cudaSetDevice,\n ::cudaStreamDestroy,\n ::cuStreamCreate"]
16578 pub fn cudaStreamCreateWithFlags(
16579 pStream: *mut cudaStream_t,
16580 flags: ::std::os::raw::c_uint,
16581 ) -> cudaError_t;
16582}
16583extern "C" {
16584 #[doc = " \\brief Create an asynchronous stream with the specified priority\n\n Creates a stream with the specified priority and returns a handle in \\p pStream.\n The stream is created on the context that is current to the calling host thread.\n If no context is current to the calling host thread, then the primary context for a device\n is selected, made current to the calling thread, and initialized before creating a stream on it.\n This affects the scheduling priority of work in the stream. Priorities provide a\n hint to preferentially run work with higher priority when possible, but do\n not preempt already-running work or provide any other functional guarantee on\n execution order.\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 ::cudaDeviceGetStreamPriorityRange. If the specified priority is\n outside the numerical range returned by ::cudaDeviceGetStreamPriorityRange,\n it will automatically be clamped to the lowest or the highest number in the range.\n\n \\param pStream - Pointer to new stream identifier\n \\param flags - Flags for stream creation. See ::cudaStreamCreateWithFlags for a list of valid flags that can be passed\n \\param priority - Priority of the stream. Lower numbers represent higher priorities.\n See ::cudaDeviceGetStreamPriorityRange for more information about\n the meaningful stream priorities that can be passed.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\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 ::cudaStreamCreate,\n ::cudaStreamCreateWithFlags,\n ::cudaDeviceGetStreamPriorityRange,\n ::cudaStreamGetPriority,\n ::cudaStreamQuery,\n ::cudaStreamWaitEvent,\n ::cudaStreamAddCallback,\n ::cudaStreamSynchronize,\n ::cudaSetDevice,\n ::cudaStreamDestroy,\n ::cuStreamCreateWithPriority"]
16585 pub fn cudaStreamCreateWithPriority(
16586 pStream: *mut cudaStream_t,
16587 flags: ::std::os::raw::c_uint,
16588 priority: ::std::os::raw::c_int,
16589 ) -> cudaError_t;
16590}
16591extern "C" {
16592 #[doc = " \\brief Query the priority of a stream\n\n Query the priority of a stream. The priority is returned in in \\p priority.\n Note that if the stream was created with a priority outside the meaningful\n numerical range returned by ::cudaDeviceGetStreamPriorityRange,\n this function returns the clamped priority.\n See ::cudaStreamCreateWithPriority 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\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreateWithPriority,\n ::cudaDeviceGetStreamPriorityRange,\n ::cudaStreamGetFlags,\n ::cuStreamGetPriority"]
16593 pub fn cudaStreamGetPriority(
16594 hStream: cudaStream_t,
16595 priority: *mut ::std::os::raw::c_int,
16596 ) -> cudaError_t;
16597}
16598extern "C" {
16599 #[doc = " \\brief Query the flags of a stream\n\n Query the flags of a stream. The flags are returned in \\p flags.\n See ::cudaStreamCreateWithFlags for a list of valid 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\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreateWithPriority,\n ::cudaStreamCreateWithFlags,\n ::cudaStreamGetPriority,\n ::cuStreamGetFlags"]
16600 pub fn cudaStreamGetFlags(
16601 hStream: cudaStream_t,
16602 flags: *mut ::std::os::raw::c_uint,
16603 ) -> cudaError_t;
16604}
16605extern "C" {
16606 #[doc = " \\brief Query the Id of a stream\n\n Query the Id of a stream. The Id is returned in \\p streamId.\n The Id is unique for the life of the program.\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 runtime APIs such as ::cudaStreamCreate,\n ::cudaStreamCreateWithFlags and ::cudaStreamCreateWithPriority, or their driver\n API equivalents such as ::cuStreamCreate or ::cuStreamCreateWithPriority.\n Passing an invalid handle will result in undefined behavior.</li>\n <li>any of the special streams such as the NULL stream, ::cudaStreamLegacy\n and ::cudaStreamPerThread respectively. The driver API equivalents of these\n are also accepted which are NULL, ::CU_STREAM_LEGACY and ::CU_STREAM_PER_THREAD.</li>\n </ul>\n\n \\param hStream - Handle to the stream to be queried\n \\param streamId - Pointer to an unsigned long long in which the stream Id is returned\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreateWithPriority,\n ::cudaStreamCreateWithFlags,\n ::cudaStreamGetPriority,\n ::cudaStreamGetFlags,\n ::cuStreamGetId"]
16607 pub fn cudaStreamGetId(
16608 hStream: cudaStream_t,
16609 streamId: *mut ::std::os::raw::c_ulonglong,
16610 ) -> cudaError_t;
16611}
16612extern "C" {
16613 #[doc = " \\brief Resets all persisting lines in cache to normal status.\n\n Resets all persisting lines in cache to normal status.\n Takes effect on function return.\n\n \\return\n ::cudaSuccess,\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
16614 pub fn cudaCtxResetPersistingL2Cache() -> cudaError_t;
16615}
16616extern "C" {
16617 #[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 attributes see ::cudaStreamAttrID\n\n \\return\n ::cudaSuccess,\n ::cudaErrorNotSupported\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
16618 pub fn cudaStreamCopyAttributes(dst: cudaStream_t, src: cudaStream_t) -> cudaError_t;
16619}
16620extern "C" {
16621 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
16622 pub fn cudaStreamGetAttribute(
16623 hStream: cudaStream_t,
16624 attr: cudaLaunchAttributeID,
16625 value_out: *mut cudaLaunchAttributeValue,
16626 ) -> cudaError_t;
16627}
16628extern "C" {
16629 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
16630 pub fn cudaStreamSetAttribute(
16631 hStream: cudaStream_t,
16632 attr: cudaLaunchAttributeID,
16633 value: *const cudaLaunchAttributeValue,
16634 ) -> cudaError_t;
16635}
16636extern "C" {
16637 #[doc = " \\brief Destroys and cleans up an asynchronous stream\n\n Destroys and cleans up the asynchronous stream specified by \\p stream.\n\n In case the device is still doing work in the stream \\p stream\n when ::cudaStreamDestroy() is called, the function will return immediately\n and the resources associated with \\p stream will be released automatically\n once the device has completed all work in \\p stream.\n\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa ::cudaStreamCreate,\n ::cudaStreamCreateWithFlags,\n ::cudaStreamQuery,\n ::cudaStreamWaitEvent,\n ::cudaStreamSynchronize,\n ::cudaStreamAddCallback,\n ::cuStreamDestroy"]
16638 pub fn cudaStreamDestroy(stream: cudaStream_t) -> cudaError_t;
16639}
16640extern "C" {
16641 #[doc = " \\brief Make a compute stream wait on an event\n\n Makes all future work submitted to \\p stream wait for all work captured in\n \\p event. See ::cudaEventRecord() for details on what is captured by an event.\n The synchronization will be performed efficiently on the device when applicable.\n \\p event may be from a different device than \\p stream.\n\n flags include:\n - ::cudaEventWaitDefault: Default event creation flag.\n - ::cudaEventWaitExternal: Event is captured in the graph as an external\n event node when performing stream capture.\n\n \\param stream - Stream to wait\n \\param event - Event to wait on\n \\param flags - Parameters for the operation(See above)\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamSynchronize, ::cudaStreamAddCallback, ::cudaStreamDestroy,\n ::cuStreamWaitEvent"]
16642 pub fn cudaStreamWaitEvent(
16643 stream: cudaStream_t,
16644 event: cudaEvent_t,
16645 flags: ::std::os::raw::c_uint,
16646 ) -> cudaError_t;
16647}
16648#[doc = " Type of stream callback functions.\n \\param stream The stream as passed to ::cudaStreamAddCallback, may be NULL.\n \\param status ::cudaSuccess or any persistent error on the stream.\n \\param userData User parameter provided at registration."]
16649pub type cudaStreamCallback_t = ::std::option::Option<
16650 unsafe extern "C" fn(
16651 stream: cudaStream_t,
16652 status: cudaError_t,
16653 userData: *mut ::std::os::raw::c_void,
16654 ),
16655>;
16656extern "C" {
16657 #[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 ::cudaLaunchHostFunc. Additionally, this function is not\n supported with ::cudaStreamBeginCapture and ::cudaStreamEndCapture, unlike\n ::cudaLaunchHostFunc.\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 cudaStreamAddCallback call, a 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 ::cudaSuccess or an error code. In the event\n of a device error, all subsequently executed callbacks will receive an\n appropriate ::cudaError_t.\n\n Callbacks must not make any CUDA API calls. Attempting to use CUDA APIs\n may result in ::cudaErrorNotPermitted. 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 callbacks have executed. Thus, for\n example, a callback might use global attached memory even if work has\n been added to another stream, if it has been properly ordered with an\n 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 stream - 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 ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamSynchronize, ::cudaStreamWaitEvent, ::cudaStreamDestroy, ::cudaMallocManaged, ::cudaStreamAttachMemAsync,\n ::cudaLaunchHostFunc, ::cuStreamAddCallback"]
16658 pub fn cudaStreamAddCallback(
16659 stream: cudaStream_t,
16660 callback: cudaStreamCallback_t,
16661 userData: *mut ::std::os::raw::c_void,
16662 flags: ::std::os::raw::c_uint,
16663 ) -> cudaError_t;
16664}
16665extern "C" {
16666 #[doc = " \\brief Waits for stream tasks to complete\n\n Blocks until \\p stream has completed all operations. If the\n ::cudaDeviceScheduleBlockingSync flag was set for this device,\n the host thread will block until the stream is finished with\n all of its tasks.\n\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamQuery, ::cudaStreamWaitEvent, ::cudaStreamAddCallback, ::cudaStreamDestroy,\n ::cuStreamSynchronize"]
16667 pub fn cudaStreamSynchronize(stream: cudaStream_t) -> cudaError_t;
16668}
16669extern "C" {
16670 #[doc = " \\brief Queries an asynchronous stream for completion status\n\n Returns ::cudaSuccess if all operations in \\p stream have\n completed, or ::cudaErrorNotReady if not.\n\n For the purposes of Unified Memory, a return value of ::cudaSuccess\n is equivalent to having called ::cudaStreamSynchronize().\n\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorNotReady,\n ::cudaErrorInvalidResourceHandle\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate, ::cudaStreamCreateWithFlags, ::cudaStreamWaitEvent, ::cudaStreamSynchronize, ::cudaStreamAddCallback, ::cudaStreamDestroy,\n ::cuStreamQuery"]
16671 pub fn cudaStreamQuery(stream: cudaStream_t) -> cudaError_t;
16672}
16673extern "C" {
16674 pub fn cudaStreamAttachMemAsync(
16675 stream: cudaStream_t,
16676 devPtr: *mut ::std::os::raw::c_void,
16677 length: usize,
16678 flags: ::std::os::raw::c_uint,
16679 ) -> cudaError_t;
16680}
16681extern "C" {
16682 #[doc = " \\brief Begins graph capture on a stream\n\n Begin graph capture on \\p stream. When a stream is in capture mode, all operations\n pushed into the stream will not be executed, but will instead be captured into\n a graph, which will be returned via ::cudaStreamEndCapture. Capture may not be initiated\n if \\p stream is ::cudaStreamLegacy. Capture must be ended on the same stream in which\n it was initiated, and it may only be initiated if the stream is not already in capture\n mode. The capture mode may be queried via ::cudaStreamIsCapturing. A unique id\n representing the capture sequence may be queried via ::cudaStreamGetCaptureInfo.\n\n If \\p mode is not ::cudaStreamCaptureModeRelaxed, ::cudaStreamEndCapture must be\n called on this stream from the same thread.\n\n \\note Kernels captured using this API must not use texture and surface references.\n Reading or writing through any texture or surface reference is undefined\n behavior. This restriction does not apply to texture and surface objects.\n\n \\param stream - Stream in which to initiate capture\n \\param mode - Controls the interaction of this capture sequence with other API\n calls that are potentially unsafe. For more details see\n ::cudaThreadExchangeStreamCaptureMode.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n\n \\sa\n ::cudaStreamCreate,\n ::cudaStreamIsCapturing,\n ::cudaStreamEndCapture,\n ::cudaThreadExchangeStreamCaptureMode"]
16683 pub fn cudaStreamBeginCapture(stream: cudaStream_t, mode: cudaStreamCaptureMode)
16684 -> cudaError_t;
16685}
16686extern "C" {
16687 #[doc = " \\brief Begins graph capture on a stream to an existing graph\n\n Begin graph capture on \\p stream. When a stream is in capture mode, all operations\n pushed into the stream will not be executed, but will instead be captured into\n \\p graph, which will be returned via ::cudaStreamEndCapture.\n\n Capture may not be initiated if \\p stream is ::cudaStreamLegacy. Capture must be ended on the\n same stream in which it was initiated, and it may only be initiated if the stream is not\n already in capture mode. The capture mode may be queried via ::cudaStreamIsCapturing. A unique id\n representing the capture sequence may be queried via ::cudaStreamGetCaptureInfo.\n\n If \\p mode is not ::cudaStreamCaptureModeRelaxed, ::cudaStreamEndCapture must be\n called on this stream from the same thread.\n\n \\note Kernels captured using this API must not use texture and surface references.\n Reading or writing through any texture or surface reference is undefined\n behavior. This restriction does not apply to texture and surface objects.\n\n \\param stream - Stream in which to initiate capture.\n \\param graph - Graph to capture into.\n \\param dependencies - Dependencies of the first node captured in the stream. Can be NULL if numDependencies is 0.\n \\param dependencyData - Optional array of data associated with each dependency.\n \\param numDependencies - Number of dependencies.\n \\param mode - Controls the interaction of this capture sequence with other API\n calls that are potentially unsafe. For more details see\n ::cudaThreadExchangeStreamCaptureMode.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n\n \\sa\n ::cudaStreamCreate,\n ::cudaStreamIsCapturing,\n ::cudaStreamEndCapture,\n ::cudaThreadExchangeStreamCaptureMode"]
16688 pub fn cudaStreamBeginCaptureToGraph(
16689 stream: cudaStream_t,
16690 graph: cudaGraph_t,
16691 dependencies: *const cudaGraphNode_t,
16692 dependencyData: *const cudaGraphEdgeData,
16693 numDependencies: usize,
16694 mode: cudaStreamCaptureMode,
16695 ) -> cudaError_t;
16696}
16697extern "C" {
16698 #[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\ncudaStreamCaptureMode mode = desiredMode;\ncudaThreadExchangeStreamCaptureMode(&mode);\n...\ncudaThreadExchangeStreamCaptureMode(&mode); // restore previous mode\n \\endcode\n\n During stream capture (see ::cudaStreamBeginCapture), 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 ::cudaStreamBeginCapture\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 ::cudaStreamBeginCapture-::cudaStreamEndCapture sequence. This\n behavior can be controlled via this API and flags to ::cudaStreamBeginCapture.\n\n A thread's mode is one of the following:\n - \\p cudaStreamCaptureModeGlobal: This is the default mode. If the local thread has\n an ongoing capture sequence that was not initiated with\n \\p cudaStreamCaptureModeRelaxed at \\p cuStreamBeginCapture, or if any other thread\n has a concurrent capture sequence initiated with \\p cudaStreamCaptureModeGlobal,\n this thread is prohibited from potentially unsafe API calls.\n - \\p cudaStreamCaptureModeThreadLocal: If the local thread has an ongoing capture\n sequence not initiated with \\p cudaStreamCaptureModeRelaxed, it is prohibited\n from potentially unsafe API calls. Concurrent capture sequences in other threads\n are ignored.\n - \\p cudaStreamCaptureModeRelaxed: 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 ::cudaEventQuery\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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n\n \\sa\n ::cudaStreamBeginCapture"]
16699 pub fn cudaThreadExchangeStreamCaptureMode(mode: *mut cudaStreamCaptureMode) -> cudaError_t;
16700}
16701extern "C" {
16702 #[doc = " \\brief Ends capture on a stream, returning the captured graph\n\n End capture on \\p stream, returning the captured graph via \\p pGraph.\n Capture must have been initiated on \\p stream via a call to ::cudaStreamBeginCapture.\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 ::cudaStreamBeginCapture was not\n ::cudaStreamCaptureModeRelaxed, this call must be from the same thread as\n ::cudaStreamBeginCapture.\n\n \\param stream - Stream to query\n \\param pGraph - The captured graph\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorStreamCaptureWrongThread\n \\notefnerr\n\n \\sa\n ::cudaStreamCreate,\n ::cudaStreamBeginCapture,\n ::cudaStreamIsCapturing,\n ::cudaGraphDestroy"]
16703 pub fn cudaStreamEndCapture(stream: cudaStream_t, pGraph: *mut cudaGraph_t) -> cudaError_t;
16704}
16705extern "C" {
16706 #[doc = " \\brief Returns a stream's capture status\n\n Return the capture status of \\p stream via \\p pCaptureStatus. After a successful\n call, \\p *pCaptureStatus will contain one of the following:\n - ::cudaStreamCaptureStatusNone: The stream is not capturing.\n - ::cudaStreamCaptureStatusActive: The stream is capturing.\n - ::cudaStreamCaptureStatusInvalidated: The stream was capturing but an error\n has invalidated the capture sequence. The capture sequence must be terminated\n with ::cudaStreamEndCapture on the stream where it was initiated in order to\n continue using \\p stream.\n\n Note that, if this is called on ::cudaStreamLegacy (the \"null stream\") while\n a blocking stream on the same device is capturing, it will return\n ::cudaErrorStreamCaptureImplicit and \\p *pCaptureStatus 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 stream - Stream to query\n \\param pCaptureStatus - Returns the stream's capture status\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorStreamCaptureImplicit\n \\notefnerr\n\n \\sa\n ::cudaStreamCreate,\n ::cudaStreamBeginCapture,\n ::cudaStreamEndCapture"]
16707 pub fn cudaStreamIsCapturing(
16708 stream: cudaStream_t,
16709 pCaptureStatus: *mut cudaStreamCaptureStatus,
16710 ) -> cudaError_t;
16711}
16712extern "C" {
16713 #[doc = " \\brief Query a stream's capture state\n\n Query stream state related to stream capture.\n\n If called on ::cudaStreamLegacy (the \"null stream\") while a stream not created\n with ::cudaStreamNonBlocking is capturing, returns ::cudaErrorStreamCaptureImplicit.\n\n Valid data (other than capture status) is returned only if both of the following are true:\n - the call returns cudaSuccess\n - the returned capture status is ::cudaStreamCaptureStatusActive\n\n \\param stream - The stream to query\n \\param captureStatus_out - Location to return the capture status of the stream; required\n \\param id_out - Optional location to return an id for the capture sequence, which is\n unique over the lifetime of the process\n \\param graph_out - Optional location to return the graph being captured into. All\n operations other than destroy and node removal are permitted on the graph\n while the capture sequence is in progress. This API does not transfer\n ownership of the graph, which is transferred or destroyed at\n ::cudaStreamEndCapture. Note that the graph handle may be invalidated before\n end of capture for certain errors. Nodes that are or become\n unreachable from the original stream at ::cudaStreamEndCapture due to direct\n actions on the graph do not trigger ::cudaErrorStreamCaptureUnjoined.\n \\param dependencies_out - Optional location to store a pointer to an array of nodes.\n The next node to be captured in the stream will depend on this set of nodes,\n absent operations such as event wait which modify this set. The array pointer\n is valid until the next API call which operates on the stream or until the\n capture is terminated. The node handles may be copied out and are valid until\n they or the graph is destroyed. The driver-owned array may also be passed\n directly to APIs that operate on the graph (not the stream) without copying.\n \\param numDependencies_out - Optional location to store the size of the array\n returned in dependencies_out.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorStreamCaptureImplicit\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cudaStreamGetCaptureInfo_v3,\n ::cudaStreamBeginCapture,\n ::cudaStreamIsCapturing,\n ::cudaStreamUpdateCaptureDependencies"]
16714 pub fn cudaStreamGetCaptureInfo_v2(
16715 stream: cudaStream_t,
16716 captureStatus_out: *mut cudaStreamCaptureStatus,
16717 id_out: *mut ::std::os::raw::c_ulonglong,
16718 graph_out: *mut cudaGraph_t,
16719 dependencies_out: *mut *const cudaGraphNode_t,
16720 numDependencies_out: *mut usize,
16721 ) -> cudaError_t;
16722}
16723extern "C" {
16724 #[doc = " \\brief Query a stream's capture state (12.3+)\n\n Query stream state related to stream capture.\n\n If called on ::cudaStreamLegacy (the \"null stream\") while a stream not created\n with ::cudaStreamNonBlocking is capturing, returns ::cudaErrorStreamCaptureImplicit.\n\n Valid data (other than capture status) is returned only if both of the following are true:\n - the call returns cudaSuccess\n - the returned capture status is ::cudaStreamCaptureStatusActive\n\n If \\p edgeData_out is non-NULL then \\p dependencies_out must be as well. If\n \\p dependencies_out is non-NULL and \\p edgeData_out is NULL, but there is non-zero edge\n data for one or more of the current stream dependencies, the call will return\n ::cudaErrorLossyQuery.\n\n \\param stream - The stream to query\n \\param captureStatus_out - Location to return the capture status of the stream; required\n \\param id_out - Optional location to return an id for the capture sequence, which is\n unique over the lifetime of the process\n \\param graph_out - Optional location to return the graph being captured into. All\n operations other than destroy and node removal are permitted on the graph\n while the capture sequence is in progress. This API does not transfer\n ownership of the graph, which is transferred or destroyed at\n ::cudaStreamEndCapture. Note that the graph handle may be invalidated before\n end of capture for certain errors. Nodes that are or become\n unreachable from the original stream at ::cudaStreamEndCapture due to direct\n actions on the graph do not trigger ::cudaErrorStreamCaptureUnjoined.\n \\param dependencies_out - Optional location to store a pointer to an array of nodes.\n The next node to be captured in the stream will depend on this set of nodes,\n absent operations such as event wait which modify this set. The array pointer\n is valid until the next API call which operates on the stream or until the\n capture is terminated. The node handles may be copied out and are valid until\n they or the graph is destroyed. The driver-owned array may also be passed\n directly to APIs that operate on the graph (not the stream) without copying.\n \\param edgeData_out - Optional location to store a pointer to an array of graph edge\n data. This array parallels \\c dependencies_out; the next node to be added\n has an edge to \\c dependencies_out[i] with annotation \\c edgeData_out[i] for\n each \\c i. The array pointer is valid until the next API call which operates\n on the stream or until the capture is terminated.\n \\param numDependencies_out - Optional location to store the size of the array\n returned in dependencies_out.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorStreamCaptureImplicit,\n ::cudaErrorLossyQuery\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cudaStreamBeginCapture,\n ::cudaStreamIsCapturing,\n ::cudaStreamUpdateCaptureDependencies"]
16725 pub fn cudaStreamGetCaptureInfo_v3(
16726 stream: cudaStream_t,
16727 captureStatus_out: *mut cudaStreamCaptureStatus,
16728 id_out: *mut ::std::os::raw::c_ulonglong,
16729 graph_out: *mut cudaGraph_t,
16730 dependencies_out: *mut *const cudaGraphNode_t,
16731 edgeData_out: *mut *const cudaGraphEdgeData,
16732 numDependencies_out: *mut usize,
16733 ) -> cudaError_t;
16734}
16735extern "C" {
16736 #[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 ::cudaStreamAddCaptureDependencies and\n ::cudaStreamSetCaptureDependencies. 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 ::cudaStreamAddCaptureDependencies.\n\n Nodes that are removed from the dependency set via this API do not result in\n ::cudaErrorStreamCaptureUnjoined if they are unreachable from the stream at\n ::cudaStreamEndCapture.\n\n Returns ::cudaErrorIllegalState if the stream is not capturing.\n\n This API is new in CUDA 11.3. Developers requiring compatibility across minor\n versions of the CUDA driver to 11.0 should not use this API or provide a fallback.\n\n \\param stream - The stream to update\n \\param dependencies - The set of dependencies to add\n \\param numDependencies - The size of the dependencies array\n \\param flags - See above\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorIllegalState\n \\notefnerr\n\n \\sa\n ::cudaStreamBeginCapture,\n ::cudaStreamGetCaptureInfo,"]
16737 pub fn cudaStreamUpdateCaptureDependencies(
16738 stream: cudaStream_t,
16739 dependencies: *mut cudaGraphNode_t,
16740 numDependencies: usize,
16741 flags: ::std::os::raw::c_uint,
16742 ) -> cudaError_t;
16743}
16744extern "C" {
16745 #[doc = " \\brief Update the set of dependencies in a capturing stream (12.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 ::cudaStreamAddCaptureDependencies and\n ::cudaStreamSetCaptureDependencies. 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 ::cudaStreamAddCaptureDependencies.\n\n Nodes that are removed from the dependency set via this API do not result in\n ::cudaErrorStreamCaptureUnjoined if they are unreachable from the stream at\n ::cudaStreamEndCapture.\n\n Returns ::cudaErrorIllegalState if the stream is not capturing.\n\n \\param stream - The stream to update\n \\param dependencies - The set of dependencies to add\n \\param dependencyData - Optional array of data associated with each dependency.\n \\param numDependencies - The size of the dependencies array\n \\param flags - See above\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorIllegalState\n \\notefnerr\n\n \\sa\n ::cudaStreamBeginCapture,\n ::cudaStreamGetCaptureInfo,"]
16746 pub fn cudaStreamUpdateCaptureDependencies_v2(
16747 stream: cudaStream_t,
16748 dependencies: *mut cudaGraphNode_t,
16749 dependencyData: *const cudaGraphEdgeData,
16750 numDependencies: usize,
16751 flags: ::std::os::raw::c_uint,
16752 ) -> cudaError_t;
16753}
16754extern "C" {
16755 #[doc = " \\brief Creates an event object\n\n Creates an event object for the current device using ::cudaEventDefault.\n\n \\param event - Newly created event\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorLaunchFailure,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*, unsigned int) \"cudaEventCreate (C++ API)\",\n ::cudaEventCreateWithFlags, ::cudaEventRecord, ::cudaEventQuery,\n ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,\n ::cudaStreamWaitEvent,\n ::cuEventCreate"]
16756 pub fn cudaEventCreate(event: *mut cudaEvent_t) -> cudaError_t;
16757}
16758extern "C" {
16759 #[doc = " \\brief Creates an event object with the specified flags\n\n Creates an event object for the current device with the specified flags. Valid\n flags include:\n - ::cudaEventDefault: Default event creation flag.\n - ::cudaEventBlockingSync: Specifies that event should use blocking\n synchronization. A host thread that uses ::cudaEventSynchronize() to wait\n on an event created with this flag will block until the event actually\n completes.\n - ::cudaEventDisableTiming: Specifies that the created event does not need\n to record timing data. Events created with this flag specified and\n the ::cudaEventBlockingSync flag not specified will provide the best\n performance when used with ::cudaStreamWaitEvent() and ::cudaEventQuery().\n - ::cudaEventInterprocess: Specifies that the created event may be used as an\n interprocess event by ::cudaIpcGetEventHandle(). ::cudaEventInterprocess must\n be specified along with ::cudaEventDisableTiming.\n\n \\param event - Newly created event\n \\param flags - Flags for new event\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorLaunchFailure,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,\n ::cudaStreamWaitEvent,\n ::cuEventCreate"]
16760 pub fn cudaEventCreateWithFlags(
16761 event: *mut cudaEvent_t,
16762 flags: ::std::os::raw::c_uint,
16763 ) -> cudaError_t;
16764}
16765extern "C" {
16766 #[doc = " \\brief Records an event\n\n Captures in \\p event the contents of \\p stream at the time of this call.\n \\p event and \\p stream must be on the same CUDA context.\n Calls such as ::cudaEventQuery() or ::cudaStreamWaitEvent() will then\n examine or wait for completion of the work that was captured. Uses of\n \\p stream after this call do not modify \\p event. See note on default\n stream behavior for what is captured in the default case.\n\n ::cudaEventRecord() can be called multiple times on the same event and\n will overwrite the previously captured state. Other APIs such as\n ::cudaStreamWaitEvent() use the most recently captured state at the time\n of the API call, and are not affected by later calls to\n ::cudaEventRecord(). Before the first call to ::cudaEventRecord(), an\n event represents an empty set of work, so for example ::cudaEventQuery()\n would return ::cudaSuccess.\n\n \\param event - Event to record\n \\param stream - Stream in which to record event\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorLaunchFailure\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_null_event\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventCreateWithFlags, ::cudaEventQuery,\n ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,\n ::cudaStreamWaitEvent,\n ::cudaEventRecordWithFlags,\n ::cuEventRecord"]
16767 pub fn cudaEventRecord(event: cudaEvent_t, stream: cudaStream_t) -> cudaError_t;
16768}
16769extern "C" {
16770 pub fn cudaEventRecordWithFlags(
16771 event: cudaEvent_t,
16772 stream: cudaStream_t,
16773 flags: ::std::os::raw::c_uint,
16774 ) -> cudaError_t;
16775}
16776extern "C" {
16777 #[doc = " \\brief Queries an event's status\n\n Queries the status of all work currently captured by \\p event. See\n ::cudaEventRecord() for details on what is captured by an event.\n\n Returns ::cudaSuccess if all captured work has been completed, or\n ::cudaErrorNotReady if any captured work is incomplete.\n\n For the purposes of Unified Memory, a return value of ::cudaSuccess\n is equivalent to having called ::cudaEventSynchronize().\n\n \\param event - Event to query\n\n \\return\n ::cudaSuccess,\n ::cudaErrorNotReady,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorLaunchFailure\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_null_event\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventCreateWithFlags, ::cudaEventRecord,\n ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventElapsedTime,\n ::cuEventQuery"]
16778 pub fn cudaEventQuery(event: cudaEvent_t) -> cudaError_t;
16779}
16780extern "C" {
16781 #[doc = " \\brief Waits for an event to complete\n\n Waits until the completion of all work currently captured in \\p event.\n See ::cudaEventRecord() for details on what is captured by an event.\n\n Waiting for an event that was created with the ::cudaEventBlockingSync\n flag will cause the calling CPU thread to block until the event has\n been completed by the device. If the ::cudaEventBlockingSync 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 event - Event to wait for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorLaunchFailure\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_null_event\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventCreateWithFlags, ::cudaEventRecord,\n ::cudaEventQuery, ::cudaEventDestroy, ::cudaEventElapsedTime,\n ::cuEventSynchronize"]
16782 pub fn cudaEventSynchronize(event: cudaEvent_t) -> cudaError_t;
16783}
16784extern "C" {
16785 #[doc = " \\brief Destroys an event object\n\n Destroys the event specified by \\p event.\n\n An event may be destroyed before it is complete (i.e., while\n ::cudaEventQuery() would return ::cudaErrorNotReady). In this case, the\n call does not block on completion of the event, and any associated\n resources will automatically be released asynchronously at completion.\n\n \\param event - Event to destroy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorLaunchFailure\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n \\note_null_event\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventCreateWithFlags, ::cudaEventQuery,\n ::cudaEventSynchronize, ::cudaEventRecord, ::cudaEventElapsedTime,\n ::cuEventDestroy"]
16786 pub fn cudaEventDestroy(event: cudaEvent_t) -> cudaError_t;
16787}
16788extern "C" {
16789 #[doc = " \\brief Computes the elapsed time between 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 ::cudaEventRecord() 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 ::cudaEventRecord() has not been called on either event, then\n ::cudaErrorInvalidResourceHandle is returned. If ::cudaEventRecord() has been\n called on both events but one or both of them has not yet been completed\n (that is, ::cudaEventQuery() would return ::cudaErrorNotReady on at least one\n of the events), ::cudaErrorNotReady is returned. If either event was created\n with the ::cudaEventDisableTiming flag, then this function will return\n ::cudaErrorInvalidResourceHandle.\n\n \\param ms - Time between \\p start and \\p end in ms\n \\param start - Starting event\n \\param end - Ending event\n\n \\return\n ::cudaSuccess,\n ::cudaErrorNotReady,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorLaunchFailure,\n ::cudaErrorUnknown\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_null_event\n\n \\sa \\ref ::cudaEventCreate(cudaEvent_t*) \"cudaEventCreate (C API)\",\n ::cudaEventCreateWithFlags, ::cudaEventQuery,\n ::cudaEventSynchronize, ::cudaEventDestroy, ::cudaEventRecord,\n ::cuEventElapsedTime"]
16790 pub fn cudaEventElapsedTime(ms: *mut f32, start: cudaEvent_t, end: cudaEvent_t) -> cudaError_t;
16791}
16792extern "C" {
16793 #[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 ::cudaExternalMemoryHandleDesc structure\n is defined as follows:\n\n \\code\ntypedef struct cudaExternalMemoryHandleDesc_st {\ncudaExternalMemoryHandleType 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} cudaExternalMemoryHandleDesc;\n \\endcode\n\n where ::cudaExternalMemoryHandleDesc::type specifies the type\n of handle being imported. ::cudaExternalMemoryHandleType is\n defined as:\n\n \\code\ntypedef enum cudaExternalMemoryHandleType_enum {\ncudaExternalMemoryHandleTypeOpaqueFd = 1,\ncudaExternalMemoryHandleTypeOpaqueWin32 = 2,\ncudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3,\ncudaExternalMemoryHandleTypeD3D12Heap = 4,\ncudaExternalMemoryHandleTypeD3D12Resource = 5,\ncudaExternalMemoryHandleTypeD3D11Resource = 6,\ncudaExternalMemoryHandleTypeD3D11ResourceKmt = 7,\ncudaExternalMemoryHandleTypeNvSciBuf = 8\n} cudaExternalMemoryHandleType;\n \\endcode\n\n If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeOpaqueFd, then\n ::cudaExternalMemoryHandleDesc::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 ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeOpaqueWin32, then exactly one\n of ::cudaExternalMemoryHandleDesc::handle::win32::handle and\n ::cudaExternalMemoryHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalMemoryHandleDesc::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 ::cudaExternalMemoryHandleDesc::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 ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeOpaqueWin32Kmt, then\n ::cudaExternalMemoryHandleDesc::handle::win32::handle must\n be non-NULL and\n ::cudaExternalMemoryHandleDesc::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 ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeD3D12Heap, then exactly one\n of ::cudaExternalMemoryHandleDesc::handle::win32::handle and\n ::cudaExternalMemoryHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalMemoryHandleDesc::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 ::cudaExternalMemoryHandleDesc::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 ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeD3D12Resource, then exactly one\n of ::cudaExternalMemoryHandleDesc::handle::win32::handle and\n ::cudaExternalMemoryHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalMemoryHandleDesc::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 ::cudaExternalMemoryHandleDesc::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 ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeD3D11Resource,then exactly one\n of ::cudaExternalMemoryHandleDesc::handle::win32::handle and\n ::cudaExternalMemoryHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalMemoryHandleDesc::handle::win32::handle is\n not NULL, then it must represent a valid shared NT handle that is\n returned by IDXGIResource1::CreateSharedHandle when referring to a\n ID3D11Resource object. If\n ::cudaExternalMemoryHandleDesc::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 ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeD3D11ResourceKmt, then\n ::cudaExternalMemoryHandleDesc::handle::win32::handle must\n be non-NULL and ::cudaExternalMemoryHandleDesc::handle::win32::name\n must be NULL. The handle specified must be a valid shared KMT\n handle that is returned by IDXGIResource::GetSharedHandle when\n referring to a ID3D11Resource object.\n\n If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeNvSciBuf, then\n ::cudaExternalMemoryHandleDesc::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 ::cudaWaitExternalSemaphoresAsync or ::cudaSignalExternalSemaphoresAsync\n as approprriate barriers to maintain coherence between CUDA and the other drivers.\n See ::cudaExternalSemaphoreWaitSkipNvSciBufMemSync and ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync\n for memory synchronization.\n\n The size of the memory object must be specified in\n ::cudaExternalMemoryHandleDesc::size.\n\n Specifying the flag ::cudaExternalMemoryDedicated in\n ::cudaExternalMemoryHandleDesc::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 ::cudaExternalMemoryHandleDesc::type\n is one of the following:\n ::cudaExternalMemoryHandleTypeD3D12Resource\n ::cudaExternalMemoryHandleTypeD3D11Resource\n ::cudaExternalMemoryHandleTypeD3D11ResourceKmt\n\n \\param extMem_out - Returned handle to an external memory object\n \\param memHandleDesc - Memory import handle descriptor\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorOperatingSystem\n \\notefnerr\n \\note_init_rt\n \\note_callback\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\n \\sa ::cudaDestroyExternalMemory,\n ::cudaExternalMemoryGetMappedBuffer,\n ::cudaExternalMemoryGetMappedMipmappedArray"]
16794 pub fn cudaImportExternalMemory(
16795 extMem_out: *mut cudaExternalMemory_t,
16796 memHandleDesc: *const cudaExternalMemoryHandleDesc,
16797 ) -> cudaError_t;
16798}
16799extern "C" {
16800 #[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 ::cudaExternalMemoryBufferDesc structure is\n defined as follows:\n\n \\code\ntypedef struct cudaExternalMemoryBufferDesc_st {\nunsigned long long offset;\nunsigned long long size;\nunsigned int flags;\n} cudaExternalMemoryBufferDesc;\n \\endcode\n\n where ::cudaExternalMemoryBufferDesc::offset is the offset in\n the memory object where the buffer's base address is.\n ::cudaExternalMemoryBufferDesc::size is the size of the buffer.\n ::cudaExternalMemoryBufferDesc::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 ::cudaFree.\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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaImportExternalMemory,\n ::cudaDestroyExternalMemory,\n ::cudaExternalMemoryGetMappedMipmappedArray"]
16801 pub fn cudaExternalMemoryGetMappedBuffer(
16802 devPtr: *mut *mut ::std::os::raw::c_void,
16803 extMem: cudaExternalMemory_t,
16804 bufferDesc: *const cudaExternalMemoryBufferDesc,
16805 ) -> cudaError_t;
16806}
16807extern "C" {
16808 #[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 ::cudaExternalMemoryMipmappedArrayDesc is defined as follows:\n\n \\code\ntypedef struct cudaExternalMemoryMipmappedArrayDesc_st {\nunsigned long long offset;\ncudaChannelFormatDesc formatDesc;\ncudaExtent extent;\nunsigned int flags;\nunsigned int numLevels;\n} cudaExternalMemoryMipmappedArrayDesc;\n \\endcode\n\n where ::cudaExternalMemoryMipmappedArrayDesc::offset is the\n offset in the memory object where the base level of the mipmap\n chain is.\n ::cudaExternalMemoryMipmappedArrayDesc::formatDesc describes the\n format of the data.\n ::cudaExternalMemoryMipmappedArrayDesc::extent specifies the\n dimensions of the base level of the mipmap chain.\n ::cudaExternalMemoryMipmappedArrayDesc::flags are flags associated\n with CUDA mipmapped arrays. For further details, please refer to\n the documentation for ::cudaMalloc3DArray. Note that if the mipmapped\n array is bound as a color target in the graphics API, then the flag\n ::cudaArrayColorAttachment must be specified in\n ::cudaExternalMemoryMipmappedArrayDesc::flags.\n ::cudaExternalMemoryMipmappedArrayDesc::numLevels specifies\n the total number of levels in the mipmap chain.\n\n The returned CUDA mipmapped array must be freed using ::cudaFreeMipmappedArray.\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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaImportExternalMemory,\n ::cudaDestroyExternalMemory,\n ::cudaExternalMemoryGetMappedBuffer\n\n \\note If ::cudaExternalMemoryHandleDesc::type is\n ::cudaExternalMemoryHandleTypeNvSciBuf, then\n ::cudaExternalMemoryMipmappedArrayDesc::numLevels must not be greater than 1."]
16809 pub fn cudaExternalMemoryGetMappedMipmappedArray(
16810 mipmap: *mut cudaMipmappedArray_t,
16811 extMem: cudaExternalMemory_t,
16812 mipmapDesc: *const cudaExternalMemoryMipmappedArrayDesc,
16813 ) -> cudaError_t;
16814}
16815extern "C" {
16816 #[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 ::cudaFree and\n ::cudaFreeMipmappedArray respectively.\n\n \\param extMem - External memory object to be destroyed\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa ::cudaImportExternalMemory,\n ::cudaExternalMemoryGetMappedBuffer,\n ::cudaExternalMemoryGetMappedMipmappedArray"]
16817 pub fn cudaDestroyExternalMemory(extMem: cudaExternalMemory_t) -> cudaError_t;
16818}
16819extern "C" {
16820 #[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 ::cudaExternalSemaphoreHandleDesc is defined\n as follows:\n\n \\code\ntypedef struct cudaExternalSemaphoreHandleDesc_st {\ncudaExternalSemaphoreHandleType type;\nunion {\nint fd;\nstruct {\nvoid *handle;\nconst void *name;\n} win32;\nconst void* NvSciSyncObj;\n} handle;\nunsigned int flags;\n} cudaExternalSemaphoreHandleDesc;\n \\endcode\n\n where ::cudaExternalSemaphoreHandleDesc::type specifies the type of\n handle being imported. ::cudaExternalSemaphoreHandleType is defined\n as:\n\n \\code\ntypedef enum cudaExternalSemaphoreHandleType_enum {\ncudaExternalSemaphoreHandleTypeOpaqueFd = 1,\ncudaExternalSemaphoreHandleTypeOpaqueWin32 = 2,\ncudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3,\ncudaExternalSemaphoreHandleTypeD3D12Fence = 4,\ncudaExternalSemaphoreHandleTypeD3D11Fence = 5,\ncudaExternalSemaphoreHandleTypeNvSciSync = 6,\ncudaExternalSemaphoreHandleTypeKeyedMutex = 7,\ncudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8,\ncudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9,\ncudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10\n} cudaExternalSemaphoreHandleType;\n \\endcode\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeOpaqueFd, then\n ::cudaExternalSemaphoreHandleDesc::handle::fd must be a valid file\n descriptor referencing a synchronization object. Ownership of the\n file descriptor is transferred to the CUDA driver when the handle\n is imported successfully. Performing any operations on the file\n descriptor after it is imported results in undefined behavior.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32, then exactly one of\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and\n ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalSemaphoreHandleDesc::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 ::cudaExternalSemaphoreHandleDesc::handle::win32::name is\n not NULL, then it must name a valid synchronization object.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt, then\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle must be\n non-NULL and ::cudaExternalSemaphoreHandleDesc::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 ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeD3D12Fence, then exactly one of\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and\n ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalSemaphoreHandleDesc::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 ::cudaExternalSemaphoreHandleDesc::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 ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeD3D11Fence, then exactly one of\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and\n ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle\n is not NULL, then it must represent a valid shared NT handle that\n is returned by ID3D11Fence::CreateSharedHandle. If\n ::cudaExternalSemaphoreHandleDesc::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 ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeNvSciSync, then\n ::cudaExternalSemaphoreHandleDesc::handle::nvSciSyncObj\n represents a valid NvSciSyncObj.\n\n ::cudaExternalSemaphoreHandleTypeKeyedMutex, then exactly one of\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and\n ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalSemaphoreHandleDesc::handle::win32::handle\n is not NULL, then it represent a valid shared NT handle that\n is returned by IDXGIResource1::CreateSharedHandle when referring to\n a IDXGIKeyedMutex object.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt, then\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle must be\n non-NULL and ::cudaExternalSemaphoreHandleDesc::handle::win32::name\n must be NULL. The handle specified must represent a valid KMT\n handle that is returned by IDXGIResource::GetSharedHandle when\n referring to a IDXGIKeyedMutex object.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd, then\n ::cudaExternalSemaphoreHandleDesc::handle::fd must be a valid file\n descriptor referencing a synchronization object. Ownership of the\n file descriptor is transferred to the CUDA driver when the handle\n is imported successfully. Performing any operations on the file\n descriptor after it is imported results in undefined behavior.\n\n If ::cudaExternalSemaphoreHandleDesc::type is\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32, then exactly one of\n ::cudaExternalSemaphoreHandleDesc::handle::win32::handle and\n ::cudaExternalSemaphoreHandleDesc::handle::win32::name must not be\n NULL. If ::cudaExternalSemaphoreHandleDesc::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 ::cudaExternalSemaphoreHandleDesc::handle::win32::name is\n 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 ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorOperatingSystem\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDestroyExternalSemaphore,\n ::cudaSignalExternalSemaphoresAsync,\n ::cudaWaitExternalSemaphoresAsync"]
16821 pub fn cudaImportExternalSemaphore(
16822 extSem_out: *mut cudaExternalSemaphore_t,
16823 semHandleDesc: *const cudaExternalSemaphoreHandleDesc,
16824 ) -> cudaError_t;
16825}
16826extern "C" {
16827 #[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 ::cudaExternalSemaphoreHandleTypeOpaqueFd,\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32,\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt\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 ::cudaExternalSemaphoreHandleTypeD3D12Fence,\n ::cudaExternalSemaphoreHandleTypeD3D11Fence,\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd,\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32\n then the semaphore will be set to the value specified in\n ::cudaExternalSemaphoreSignalParams::params::fence::value.\n\n If the semaphore object is of the type ::cudaExternalSemaphoreHandleTypeNvSciSync\n this API sets ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence to a\n value that can be used by subsequent waiters of the same NvSciSync object to\n order operations with those currently submitted in \\p stream. Such an update\n will overwrite previous contents of\n ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence. By default,\n signaling such an external semaphore object causes appropriate memory synchronization\n operations to be performed over all the external memory objects that are imported as\n ::cudaExternalMemoryHandleTypeNvSciBuf. 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 ::cudaExternalSemaphoreSignalSkipNvSciBufMemSync, 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 ::cudaExternalSemaphoreHandleTypeNvSciSync,\n if the NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags in\n ::cudaDeviceGetNvSciSyncAttributes to cudaNvSciSyncAttrSignal, this API will return\n cudaErrorNotSupported.\n\n ::cudaExternalSemaphoreSignalParams::params::nvSciSync::fence associated with\n semaphore object of the type ::cudaExternalSemaphoreHandleTypeNvSciSync can be\n deterministic. For this the NvSciSyncAttrList used to create the semaphore object\n must have value of NvSciSyncAttrKey_RequireDeterministicFences key set to true.\n Deterministic fences allow users to enqueue a wait over the semaphore object even\n before corresponding signal is enqueued. For such a semaphore object, CUDA guarantees\n that each signal operation will increment the fence value by '1'. Users are expected\n to track count of signals enqueued on the semaphore object and insert waits accordingly.\n When such a semaphore object is signaled from multiple streams, due to concurrent\n stream execution, it is possible that the order in which the semaphore gets signaled\n is 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 ::cudaExternalSemaphoreHandleTypeKeyedMutex,\n ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt,\n then the keyed mutex will be released with the key specified in\n ::cudaExternalSemaphoreSignalParams::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 ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaImportExternalSemaphore,\n ::cudaDestroyExternalSemaphore,\n ::cudaWaitExternalSemaphoresAsync"]
16828 pub fn cudaSignalExternalSemaphoresAsync_v2(
16829 extSemArray: *const cudaExternalSemaphore_t,
16830 paramsArray: *const cudaExternalSemaphoreSignalParams,
16831 numExtSems: ::std::os::raw::c_uint,
16832 stream: cudaStream_t,
16833 ) -> cudaError_t;
16834}
16835extern "C" {
16836 #[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 ::cudaExternalSemaphoreHandleTypeOpaqueFd,\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32,\n ::cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt\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 ::cudaExternalSemaphoreHandleTypeD3D12Fence,\n ::cudaExternalSemaphoreHandleTypeD3D11Fence,\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd,\n ::cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32\n then waiting on the semaphore will wait until the value of the\n semaphore is greater than or equal to\n ::cudaExternalSemaphoreWaitParams::params::fence::value.\n\n If the semaphore object is of the type ::cudaExternalSemaphoreHandleTypeNvSciSync\n then, waiting on the semaphore will wait until the\n ::cudaExternalSemaphoreSignalParams::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 ::cudaExternalMemoryHandleTypeNvSciBuf. 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 ::cudaExternalSemaphoreWaitSkipNvSciBufMemSync, 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 ::cudaExternalSemaphoreHandleTypeNvSciSync,\n if the NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags in\n ::cudaDeviceGetNvSciSyncAttributes to cudaNvSciSyncAttrWait, this API will return\n cudaErrorNotSupported.\n\n If the semaphore object is any one of the following types:\n ::cudaExternalSemaphoreHandleTypeKeyedMutex,\n ::cudaExternalSemaphoreHandleTypeKeyedMutexKmt,\n then the keyed mutex will be acquired when it is released with the key specified\n in ::cudaExternalSemaphoreSignalParams::params::keyedmutex::key or\n until the timeout specified by\n ::cudaExternalSemaphoreSignalParams::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 ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle\n ::cudaErrorTimeout\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaImportExternalSemaphore,\n ::cudaDestroyExternalSemaphore,\n ::cudaSignalExternalSemaphoresAsync"]
16837 pub fn cudaWaitExternalSemaphoresAsync_v2(
16838 extSemArray: *const cudaExternalSemaphore_t,
16839 paramsArray: *const cudaExternalSemaphoreWaitParams,
16840 numExtSems: ::std::os::raw::c_uint,
16841 stream: cudaStream_t,
16842 ) -> cudaError_t;
16843}
16844extern "C" {
16845 #[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 ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa ::cudaImportExternalSemaphore,\n ::cudaSignalExternalSemaphoresAsync,\n ::cudaWaitExternalSemaphoresAsync"]
16846 pub fn cudaDestroyExternalSemaphore(extSem: cudaExternalSemaphore_t) -> cudaError_t;
16847}
16848extern "C" {
16849 #[doc = " \\brief Launches a device function\n\n The function invokes kernel \\p func on \\p gridDim (\\p gridDim.x × \\p gridDim.y\n × \\p gridDim.z) grid of blocks. Each block contains \\p blockDim (\\p blockDim.x ×\n \\p blockDim.y × \\p blockDim.z) threads.\n\n If the kernel has N parameters the \\p args should point to array of N pointers.\n Each pointer, from <tt>args[0]</tt> to <tt>args[N - 1]</tt>, point to the region\n of memory from which the actual parameter will be copied.\n\n For templated functions, pass the function symbol as follows:\n func_name<template_arg_0,...,template_arg_N>\n\n \\p sharedMem sets the amount of dynamic shared memory that will be available to\n each thread block.\n\n \\p stream specifies a stream the invocation is associated to.\n\n \\param func - Device function symbol\n \\param gridDim - Grid dimentions\n \\param blockDim - Block dimentions\n \\param args - Arguments\n \\param sharedMem - Shared memory\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidConfiguration,\n ::cudaErrorLaunchFailure,\n ::cudaErrorLaunchTimeout,\n ::cudaErrorLaunchOutOfResources,\n ::cudaErrorSharedObjectInitFailed,\n ::cudaErrorInvalidPtx,\n ::cudaErrorUnsupportedPtxVersion,\n ::cudaErrorNoKernelImageForDevice,\n ::cudaErrorJitCompilerNotFound,\n ::cudaErrorJitCompilationDisabled\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaLaunchKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C++ API)\",\n ::cuLaunchKernel"]
16850 pub fn cudaLaunchKernel(
16851 func: *const ::std::os::raw::c_void,
16852 gridDim: dim3,
16853 blockDim: dim3,
16854 args: *mut *mut ::std::os::raw::c_void,
16855 sharedMem: usize,
16856 stream: cudaStream_t,
16857 ) -> cudaError_t;
16858}
16859extern "C" {
16860 #[doc = " \\brief Launches a CUDA function with launch-time configuration\n\n Note that the functionally equivalent variadic template ::cudaLaunchKernelEx\n is available for C++11 and newer.\n\n Invokes the kernel \\p func on \\p config->gridDim (\\p config->gridDim.x\n × \\p config->gridDim.y × \\p config->gridDim.z) grid of blocks.\n Each block contains \\p config->blockDim (\\p config->blockDim.x ×\n \\p config->blockDim.y × \\p config->blockDim.z) threads.\n\n \\p config->dynamicSmemBytes sets the amount of dynamic shared memory that\n will be available to each thread block.\n\n \\p config->stream specifies a stream the invocation is associated to.\n\n Configuration beyond grid and block dimensions, dynamic shared memory size,\n and stream can be provided with the following two fields of \\p config:\n\n \\p config->attrs is an array of \\p config->numAttrs contiguous\n ::cudaLaunchAttribute elements. The value of this pointer is not considered\n if \\p config->numAttrs is zero. However, in that case, it is recommended to\n set the pointer to NULL.\n \\p config->numAttrs is the number of attributes populating the first\n \\p config->numAttrs positions of the \\p config->attrs array.\n\n If the kernel has N parameters the \\p args should point to array of N\n pointers. Each pointer, from <tt>args[0]</tt> to <tt>args[N - 1]</tt>, point\n to the region of memory from which the actual parameter will be copied.\n\n N.B. This function is so named to avoid unintentionally invoking the\n templated version, \\p cudaLaunchKernelEx, for kernels taking a single\n void** or void* parameter.\n\n \\param config - Launch configuration\n \\param func - Kernel to launch\n \\param args - Array of pointers to kernel parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidConfiguration,\n ::cudaErrorLaunchFailure,\n ::cudaErrorLaunchTimeout,\n ::cudaErrorLaunchOutOfResources,\n ::cudaErrorSharedObjectInitFailed,\n ::cudaErrorInvalidPtx,\n ::cudaErrorUnsupportedPtxVersion,\n ::cudaErrorNoKernelImageForDevice,\n ::cudaErrorJitCompilerNotFound,\n ::cudaErrorJitCompilationDisabled\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaLaunchKernelEx(const cudaLaunchConfig_t *config, void (*kernel)(ExpTypes...), ActTypes &&... args) \"cudaLaunchKernelEx (C++ API)\",\n ::cuLaunchKernelEx"]
16861 pub fn cudaLaunchKernelExC(
16862 config: *const cudaLaunchConfig_t,
16863 func: *const ::std::os::raw::c_void,
16864 args: *mut *mut ::std::os::raw::c_void,
16865 ) -> cudaError_t;
16866}
16867extern "C" {
16868 #[doc = " \\brief Launches a device function where thread blocks can cooperate and synchronize as they execute\n\n The function invokes kernel \\p func on \\p gridDim (\\p gridDim.x × \\p gridDim.y\n × \\p gridDim.z) grid of blocks. Each block contains \\p blockDim (\\p blockDim.x ×\n \\p blockDim.y × \\p blockDim.z) threads.\n\n The device on which this kernel is invoked must have a non-zero value for\n the device attribute ::cudaDevAttrCooperativeLaunch.\n\n The total number of blocks launched cannot exceed the maximum number of blocks per\n multiprocessor as returned by ::cudaOccupancyMaxActiveBlocksPerMultiprocessor (or\n ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times the number of multiprocessors\n as specified by the device attribute ::cudaDevAttrMultiProcessorCount.\n\n The kernel cannot make use of CUDA dynamic parallelism.\n\n If the kernel has N parameters the \\p args should point to array of N pointers.\n Each pointer, from <tt>args[0]</tt> to <tt>args[N - 1]</tt>, point to the region\n of memory from which the actual parameter will be copied.\n\n For templated functions, pass the function symbol as follows:\n func_name<template_arg_0,...,template_arg_N>\n\n \\p sharedMem sets the amount of dynamic shared memory that will be available to\n each thread block.\n\n \\p stream specifies a stream the invocation is associated to.\n\n \\param func - Device function symbol\n \\param gridDim - Grid dimentions\n \\param blockDim - Block dimentions\n \\param args - Arguments\n \\param sharedMem - Shared memory\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidConfiguration,\n ::cudaErrorLaunchFailure,\n ::cudaErrorLaunchTimeout,\n ::cudaErrorLaunchOutOfResources,\n ::cudaErrorCooperativeLaunchTooLarge,\n ::cudaErrorSharedObjectInitFailed\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaLaunchCooperativeKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchCooperativeKernel (C++ API)\",\n ::cudaLaunchCooperativeKernelMultiDevice,\n ::cuLaunchCooperativeKernel"]
16869 pub fn cudaLaunchCooperativeKernel(
16870 func: *const ::std::os::raw::c_void,
16871 gridDim: dim3,
16872 blockDim: dim3,
16873 args: *mut *mut ::std::os::raw::c_void,
16874 sharedMem: usize,
16875 stream: cudaStream_t,
16876 ) -> cudaError_t;
16877}
16878extern "C" {
16879 #[doc = " \\brief Launches device 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 ::cudaDevAttrCooperativeMultiDeviceLaunch.\n\n The same kernel must be launched on all devices. Note that any __device__ or __constant__\n variables are independently instantiated on every device. It is the application's\n responsiblity to ensure these variables are initialized and used appropriately.\n\n The size of the grids as specified in blocks, the size of the blocks themselves and the\n amount of shared memory used by each thread block must also match across all launched kernels.\n\n The streams used to launch these kernels must have been created via either ::cudaStreamCreate\n or ::cudaStreamCreateWithPriority or ::cudaStreamCreateWithPriority. The NULL stream or\n ::cudaStreamLegacy or ::cudaStreamPerThread 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 ::cudaOccupancyMaxActiveBlocksPerMultiprocessor (or\n ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times the number of multiprocessors\n as specified by the device attribute ::cudaDevAttrMultiProcessorCount. 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 kernel cannot make use of CUDA dynamic parallelism.\n\n The ::cudaLaunchParams structure is defined as:\n \\code\nstruct cudaLaunchParams\n{\nvoid *func;\ndim3 gridDim;\ndim3 blockDim;\nvoid **args;\nsize_t sharedMem;\ncudaStream_t stream;\n};\n \\endcode\n where:\n - ::cudaLaunchParams::func specifies the kernel to be launched. This same functions must\n be launched on all devices. For templated functions, pass the function symbol as follows:\n func_name<template_arg_0,...,template_arg_N>\n - ::cudaLaunchParams::gridDim specifies the width, height and depth of the grid in blocks.\n This must match across all kernels launched.\n - ::cudaLaunchParams::blockDim is the width, height and depth of each thread block. This\n must match across all kernels launched.\n - ::cudaLaunchParams::args specifies the arguments to the kernel. If the kernel has\n N parameters then ::cudaLaunchParams::args should point to array of N pointers. Each\n pointer, from <tt>::cudaLaunchParams::args[0]</tt> to <tt>::cudaLaunchParams::args[N - 1]</tt>,\n point to the region of memory from which the actual parameter will be copied.\n - ::cudaLaunchParams::sharedMem is the dynamic shared-memory size per thread block in bytes.\n This must match across all kernels launched.\n - ::cudaLaunchParams::stream is the handle to the stream to perform the launch in. This cannot\n be the NULL stream or ::cudaStreamLegacy or ::cudaStreamPerThread.\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 ::cudaCooperativeLaunchMultiDeviceNoPreSync. 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 ::cudaCooperativeLaunchMultiDeviceNoPostSync. 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 \\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 ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidConfiguration,\n ::cudaErrorLaunchFailure,\n ::cudaErrorLaunchTimeout,\n ::cudaErrorLaunchOutOfResources,\n ::cudaErrorCooperativeLaunchTooLarge,\n ::cudaErrorSharedObjectInitFailed\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaLaunchCooperativeKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchCooperativeKernel (C++ API)\",\n ::cudaLaunchCooperativeKernel,\n ::cuLaunchCooperativeKernelMultiDevice"]
16880 pub fn cudaLaunchCooperativeKernelMultiDevice(
16881 launchParamsList: *mut cudaLaunchParams,
16882 numDevices: ::std::os::raw::c_uint,
16883 flags: ::std::os::raw::c_uint,
16884 ) -> cudaError_t;
16885}
16886extern "C" {
16887 #[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 cacheConfig the preferred cache configuration\n for the function specified via \\p func. This is only a preference. The\n runtime will use the requested configuration if possible, but it is free to\n choose a different configuration if required to execute \\p func.\n\n \\p func is a device function symbol and must be declared as a\n \\c __global__ function. If the specified function does not exist,\n then ::cudaErrorInvalidDeviceFunction is returned. For templated functions,\n pass the function symbol as follows: func_name<template_arg_0,...,template_arg_N>\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 - ::cudaFuncCachePreferNone: no preference for shared memory or L1 (default)\n - ::cudaFuncCachePreferShared: prefer larger shared memory and smaller L1 cache\n - ::cudaFuncCachePreferL1: prefer larger L1 cache and smaller shared memory\n - ::cudaFuncCachePreferEqual: prefer equal size L1 cache and shared memory\n\n \\param func - Device function symbol\n \\param cacheConfig - Requested cache configuration\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction\n \\notefnerr\n \\note_string_api_deprecation2\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\",\n \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) \"cudaFuncGetAttributes (C API)\",\n \\ref ::cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C API)\",\n ::cuFuncSetCacheConfig"]
16888 pub fn cudaFuncSetCacheConfig(
16889 func: *const ::std::os::raw::c_void,
16890 cacheConfig: cudaFuncCache,
16891 ) -> cudaError_t;
16892}
16893extern "C" {
16894 #[doc = " \\brief Find out attributes for a given function\n\n This function obtains the attributes of a function specified via \\p func.\n \\p func is a device function symbol and must be declared as a\n \\c __global__ function. The fetched attributes are placed in \\p attr.\n If the specified function does not exist, then\n ::cudaErrorInvalidDeviceFunction is returned.\n For templated functions, pass the function symbol as follows:\n func_name<template_arg_0,...,template_arg_N>\n\n Note that some function attributes such as\n \\ref ::cudaFuncAttributes::maxThreadsPerBlock \"maxThreadsPerBlock\"\n may vary based on the device that is currently being used.\n\n \\param attr - Return pointer to function's attributes\n \\param func - Device function symbol\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction\n \\notefnerr\n \\note_string_api_deprecation2\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\",\n \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, T*) \"cudaFuncGetAttributes (C++ API)\",\n \\ref ::cudaLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C API)\",\n ::cuFuncGetAttribute"]
16895 pub fn cudaFuncGetAttributes(
16896 attr: *mut cudaFuncAttributes,
16897 func: *const ::std::os::raw::c_void,
16898 ) -> cudaError_t;
16899}
16900extern "C" {
16901 #[doc = " \\brief Set attributes for a given function\n\n This function sets the attributes of a function specified via \\p func.\n The parameter \\p func must be a pointer to a function that executes\n on the device. The parameter specified by \\p func must be declared as a \\p __global__\n function. The enumeration defined by \\p attr is set to the value defined by \\p value.\n If the specified function does not exist, then\n ::cudaErrorInvalidDeviceFunction is returned.\n If the specified attribute cannot be written, or if the value is incorrect,\n then ::cudaErrorInvalidValue is returned.\n\n Valid values for \\p attr are:\n - ::cudaFuncAttributeMaxDynamicSharedMemorySize - The requested maximum size in bytes of dynamically-allocated shared memory. The sum of this value and the function attribute ::sharedSizeBytes\n cannot exceed the device attribute ::cudaDevAttrMaxSharedMemoryPerBlockOptin. The maximal size of requestable dynamic shared memory may differ by GPU architecture.\n - ::cudaFuncAttributePreferredSharedMemoryCarveout - 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. See ::cudaDevAttrMaxSharedMemoryPerMultiprocessor.\n This is only a hint, and the driver can choose a different ratio if required to execute the function.\n - ::cudaFuncAttributeRequiredClusterWidth: 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 cudaErrorNotPermitted.\n - ::cudaFuncAttributeRequiredClusterHeight: 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 cudaErrorNotPermitted.\n - ::cudaFuncAttributeRequiredClusterDepth: 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 cudaErrorNotPermitted.\n - ::cudaFuncAttributeNonPortableClusterSizeAllowed: Indicates whether the\n function can be launched with non-portable cluster size. 1 is allowed, 0 is\n disallowed.\n - ::cudaFuncAttributeClusterSchedulingPolicyPreference: The block\n scheduling policy of a function. The value type is cudaClusterSchedulingPolicy.\n\n \\param func - Function to get attributes of\n \\param attr - Attribute to set\n \\param value - Value to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\ref ::cudaLaunchKernel(const T *func, dim3 gridDim, dim3 blockDim, void **args, size_t sharedMem, cudaStream_t stream) \"cudaLaunchKernel (C++ API)\",\n \\ref ::cudaFuncSetCacheConfig(T*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C++ API)\",\n \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) \"cudaFuncGetAttributes (C API)\","]
16902 pub fn cudaFuncSetAttribute(
16903 func: *const ::std::os::raw::c_void,
16904 attr: cudaFuncAttribute,
16905 value: ::std::os::raw::c_int,
16906 ) -> cudaError_t;
16907}
16908extern "C" {
16909 #[doc = " \\brief Returns the function name for a device entry function pointer.\n\n Returns in \\p **name the function name associated with the symbol \\p func .\n The function name is returned as a null-terminated string. This API may\n return a mangled name if the function is not declared as having C linkage.\n If \\p **name is NULL, ::cudaErrorInvalidValue is returned.\n If \\p func is not a device entry function, ::cudaErrorInvalidDeviceFunction is returned.\n\n \\param name - The returned name of the function\n \\param func - The function pointer to retrieve name for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\ref ::cudaFuncGetName(const char **name, const T *func) \"cudaFuncGetName (C++ API)\""]
16910 pub fn cudaFuncGetName(
16911 name: *mut *const ::std::os::raw::c_char,
16912 func: *const ::std::os::raw::c_void,
16913 ) -> cudaError_t;
16914}
16915extern "C" {
16916 #[doc = " \\brief Returns the offset and size of a kernel parameter in the device-side parameter layout.\n\n Queries the kernel parameter at \\p paramIndex in \\p func's list of parameters and returns\n parameter information via \\p paramOffset and \\p paramSize. \\p paramOffset returns the\n offset of the parameter in the device-side parameter layout. \\p paramSize returns the size\n in bytes of the parameter. This information can be used to update kernel node parameters\n from the device via ::cudaGraphKernelNodeSetParam() and ::cudaGraphKernelNodeUpdatesApply().\n \\p paramIndex must be less than the number of parameters that \\p func takes.\n\n \\param func - The function to query\n \\param paramIndex - The parameter index to query\n \\param paramOffset - The offset into the device-side parameter layout at which the parameter resides\n \\param paramSize - The size of the parameter in the device-side parameter layout\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n \\notefnerr"]
16917 pub fn cudaFuncGetParamInfo(
16918 func: *const ::std::os::raw::c_void,
16919 paramIndex: usize,
16920 paramOffset: *mut usize,
16921 paramSize: *mut usize,
16922 ) -> cudaError_t;
16923}
16924extern "C" {
16925 #[doc = " \\brief Converts a double argument to be executed on a device\n\n \\param d - Double to convert\n\n \\deprecated This function is deprecated as of CUDA 7.5\n\n Converts the double value of \\p d to an internal float representation if\n the device does not support double arithmetic. If the device does natively\n support doubles, then this function does nothing.\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\",\n \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) \"cudaFuncGetAttributes (C API)\",\n ::cudaSetDoubleForHost"]
16926 pub fn cudaSetDoubleForDevice(d: *mut f64) -> cudaError_t;
16927}
16928extern "C" {
16929 #[doc = " \\brief Converts a double argument after execution on a device\n\n \\deprecated This function is deprecated as of CUDA 7.5\n\n Converts the double value of \\p d from a potentially internal float\n representation if the device does not support double arithmetic. If the\n device does natively support doubles, then this function does nothing.\n\n \\param d - Double to convert\n\n \\return\n ::cudaSuccess\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaFuncSetCacheConfig(const void*, enum cudaFuncCache) \"cudaFuncSetCacheConfig (C API)\",\n \\ref ::cudaFuncGetAttributes(struct cudaFuncAttributes*, const void*) \"cudaFuncGetAttributes (C API)\",\n ::cudaSetDoubleForDevice"]
16930 pub fn cudaSetDoubleForHost(d: *mut f64) -> cudaError_t;
16931}
16932extern "C" {
16933 #[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 ::cudaErrorNotPermitted, 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 constrast 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 ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaStreamCreate,\n ::cudaStreamQuery,\n ::cudaStreamSynchronize,\n ::cudaStreamWaitEvent,\n ::cudaStreamDestroy,\n ::cudaMallocManaged,\n ::cudaStreamAttachMemAsync,\n ::cudaStreamAddCallback,\n ::cuLaunchHostFunc"]
16934 pub fn cudaLaunchHostFunc(
16935 stream: cudaStream_t,
16936 fn_: cudaHostFn_t,
16937 userData: *mut ::std::os::raw::c_void,
16938 ) -> cudaError_t;
16939}
16940extern "C" {
16941 #[doc = " \\brief Sets the shared memory configuration for a device function\n\n \\deprecated\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 ::cudaFuncSetSharedMemConfig will override the device wide setting set by\n ::cudaDeviceSetSharedMemConfig.\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 For templated functions, pass the function symbol as follows:\n func_name<template_arg_0,...,template_arg_N>\n\n The supported bank configurations are:\n - ::cudaSharedMemBankSizeDefault: use the device's shared memory configuration\n when launching this function.\n - ::cudaSharedMemBankSizeFourByte: set shared memory bank width to be\n four bytes natively when launching this function.\n - ::cudaSharedMemBankSizeEightByte: set shared memory bank width to be eight\n bytes natively when launching this function.\n\n \\param func - Device function symbol\n \\param config - Requested shared memory configuration\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_string_api_deprecation2\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceSetSharedMemConfig,\n ::cudaDeviceGetSharedMemConfig,\n ::cudaDeviceSetCacheConfig,\n ::cudaDeviceGetCacheConfig,\n ::cudaFuncSetCacheConfig,\n ::cuFuncSetSharedMemConfig"]
16942 pub fn cudaFuncSetSharedMemConfig(
16943 func: *const ::std::os::raw::c_void,
16944 config: cudaSharedMemConfig,
16945 ) -> cudaError_t;
16946}
16947extern "C" {
16948 #[doc = " \\brief Returns occupancy for a device function\n\n Returns in \\p *numBlocks the maximum number of active blocks per\n streaming multiprocessor for the device function.\n\n \\param numBlocks - Returned occupancy\n \\param func - Kernel function 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 ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags,\n \\ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) \"cudaOccupancyMaxPotentialBlockSize (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)\",\n \\ref ::cudaOccupancyAvailableDynamicSMemPerBlock(size_t*, T, int, int) \"cudaOccupancyAvailableDynamicSMemPerBlock (C++ API)\",\n ::cuOccupancyMaxActiveBlocksPerMultiprocessor"]
16949 pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessor(
16950 numBlocks: *mut ::std::os::raw::c_int,
16951 func: *const ::std::os::raw::c_void,
16952 blockSize: ::std::os::raw::c_int,
16953 dynamicSMemSize: usize,
16954 ) -> cudaError_t;
16955}
16956extern "C" {
16957 #[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 block\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags,\n \\ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) \"cudaOccupancyMaxPotentialBlockSize (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)\",\n ::cudaOccupancyAvailableDynamicSMemPerBlock"]
16958 pub fn cudaOccupancyAvailableDynamicSMemPerBlock(
16959 dynamicSmemSize: *mut usize,
16960 func: *const ::std::os::raw::c_void,
16961 numBlocks: ::std::os::raw::c_int,
16962 blockSize: ::std::os::raw::c_int,
16963 ) -> cudaError_t;
16964}
16965extern "C" {
16966 #[doc = " \\brief Returns occupancy for a device function with the specified flags\n\n Returns in \\p *numBlocks the maximum number of active blocks per\n streaming multiprocessor for the device function.\n\n The \\p flags parameter controls how special cases are handled. Valid flags include:\n\n - ::cudaOccupancyDefault: keeps the default behavior as\n ::cudaOccupancyMaxActiveBlocksPerMultiprocessor\n\n - ::cudaOccupancyDisableCachingOverride: This flag suppresses the default behavior\n on platform where global caching affects occupancy. On such platforms, if caching\n is enabled, but per-block SM resource usage would result in zero occupancy, the\n occupancy calculator will calculate the occupancy as if caching is disabled.\n Setting this flag makes the occupancy calculator to return 0 in such cases.\n More information 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 function 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 ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaOccupancyMaxActiveBlocksPerMultiprocessor,\n \\ref ::cudaOccupancyMaxPotentialBlockSize(int*, int*, T, size_t, int) \"cudaOccupancyMaxPotentialBlockSize (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeWithFlags(int*, int*, T, size_t, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeWithFlags (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMem(int*, int*, T, UnaryFunction, int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API)\",\n \\ref ::cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags(int*, int*, T, UnaryFunction, int, unsigned int) \"cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags (C++ API)\",\n \\ref ::cudaOccupancyAvailableDynamicSMemPerBlock(size_t*, T, int, int) \"cudaOccupancyAvailableDynamicSMemPerBlock (C++ API)\",\n ::cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags"]
16967 pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
16968 numBlocks: *mut ::std::os::raw::c_int,
16969 func: *const ::std::os::raw::c_void,
16970 blockSize: ::std::os::raw::c_int,
16971 dynamicSMemSize: usize,
16972 flags: ::std::os::raw::c_uint,
16973 ) -> cudaError_t;
16974}
16975extern "C" {
16976 #[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),\\p *clusterSize will reflect\n 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 ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaFuncGetAttributes\n \\ref ::cudaOccupancyMaxPotentialClusterSize(int*, T, const cudaLaunchConfig_t*) \"cudaOccupancyMaxPotentialClusterSize (C++ API)\",\n ::cuOccupancyMaxPotentialClusterSize"]
16977 pub fn cudaOccupancyMaxPotentialClusterSize(
16978 clusterSize: *mut ::std::os::raw::c_int,
16979 func: *const ::std::os::raw::c_void,
16980 launchConfig: *const cudaLaunchConfig_t,
16981 ) -> cudaError_t;
16982}
16983extern "C" {
16984 #[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), the cluster size from config must either be\n 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 ::cudaSuccess,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidClusterSize,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaFuncGetAttributes\n \\ref ::cudaOccupancyMaxActiveClusters(int*, T, const cudaLaunchConfig_t*) \"cudaOccupancyMaxActiveClusters (C++ API)\",\n ::cuOccupancyMaxActiveClusters"]
16985 pub fn cudaOccupancyMaxActiveClusters(
16986 numClusters: *mut ::std::os::raw::c_int,
16987 func: *const ::std::os::raw::c_void,
16988 launchConfig: *const cudaLaunchConfig_t,
16989 ) -> cudaError_t;
16990}
16991extern "C" {
16992 pub fn cudaMallocManaged(
16993 devPtr: *mut *mut ::std::os::raw::c_void,
16994 size: usize,
16995 flags: ::std::os::raw::c_uint,
16996 ) -> cudaError_t;
16997}
16998extern "C" {
16999 #[doc = " \\brief Allocate memory on the device\n\n Allocates \\p size bytes of linear memory on the device and returns in\n \\p *devPtr a pointer to the allocated memory. The allocated memory is\n suitably aligned for any kind of variable. The memory is not cleared.\n ::cudaMalloc() returns ::cudaErrorMemoryAllocation in case of failure.\n\n The device version of ::cudaFree cannot be used with a \\p *devPtr\n allocated using the host API, and vice versa.\n\n \\param devPtr - Pointer to allocated device memory\n \\param size - Requested allocation size in bytes\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray,\n ::cudaMalloc3D, ::cudaMalloc3DArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::cuMemAlloc"]
17000 pub fn cudaMalloc(devPtr: *mut *mut ::std::os::raw::c_void, size: usize) -> cudaError_t;
17001}
17002extern "C" {
17003 #[doc = " \\brief Allocates page-locked memory on the host\n\n Allocates \\p size 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 ::cudaMemcpy*(). 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().\n\n On systems where ::pageableMemoryAccessUsesHostPageTables\n is true, ::cudaMallocHost may not page-lock the allocated memory.\n\n Page-locking excessive amounts of memory with ::cudaMallocHost() may degrade\n system performance, since it reduces the amount of memory available to the\n system for paging. As a result, this function is best used sparingly to allocate\n staging areas for data exchange between host and device.\n\n \\param ptr - Pointer to allocated host memory\n \\param size - Requested allocation size in bytes\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaMallocArray, ::cudaMalloc3D,\n ::cudaMalloc3DArray, ::cudaHostAlloc, ::cudaFree, ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t, unsigned int) \"cudaMallocHost (C++ API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::cuMemAllocHost"]
17004 pub fn cudaMallocHost(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> cudaError_t;
17005}
17006extern "C" {
17007 #[doc = " \\brief Allocates pitched memory on the device\n\n Allocates at least \\p width (in bytes) * \\p height bytes of linear memory\n on the device and returns in \\p *devPtr a pointer to the allocated memory.\n The function may pad the allocation to ensure that corresponding pointers\n in any given row will continue to meet the alignment requirements for\n coalescing as the address is updated from row to row. The pitch returned in\n \\p *pitch by ::cudaMallocPitch() is the width in bytes of the allocation.\n The intended usage of \\p pitch is as a separate parameter of the allocation,\n used to compute addresses within the 2D array. Given the row and column of\n an array element of type \\p T, the address is computed as:\n \\code\nT* pElement = (T*)((char*)BaseAddress + Row * pitch) + Column;\n\\endcode\n\n For allocations of 2D arrays, it is recommended that programmers consider\n performing pitch allocations using ::cudaMallocPitch(). Due to pitch\n alignment restrictions in the hardware, this is especially true if the\n application will be performing 2D memory copies between different regions\n of device memory (whether linear memory or CUDA arrays).\n\n \\param devPtr - Pointer to allocated pitched device memory\n \\param pitch - Pitch for allocation\n \\param width - Requested pitched allocation width (in bytes)\n \\param height - Requested pitched allocation height\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaFree, ::cudaMallocArray, ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray,\n ::cudaHostAlloc,\n ::cuMemAllocPitch"]
17008 pub fn cudaMallocPitch(
17009 devPtr: *mut *mut ::std::os::raw::c_void,
17010 pitch: *mut usize,
17011 width: usize,
17012 height: usize,
17013 ) -> cudaError_t;
17014}
17015extern "C" {
17016 #[doc = " \\brief Allocate an array on the device\n\n Allocates a CUDA array according to the ::cudaChannelFormatDesc structure\n \\p desc and returns a handle to the new CUDA array in \\p *array.\n\n The ::cudaChannelFormatDesc is defined as:\n \\code\nstruct cudaChannelFormatDesc {\nint x, y, z, w;\nenum cudaChannelFormatKind f;\n};\n\\endcode\n where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,\n ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat.\n\n The \\p flags parameter enables different options to be specified that affect\n the allocation, as follows.\n - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default array allocation\n - ::cudaArraySurfaceLoadStore: Allocates an array that can be read from or written to using a surface reference\n - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the array.\n - ::cudaArraySparse: Allocates a CUDA array without physical backing memory. The subregions within this sparse array\n can later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync.\n The physical backing memory must be allocated via ::cuMemCreate.\n - ::cudaArrayDeferredMapping: Allocates a CUDA array without physical backing memory. The entire array can\n later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync.\n The physical backing memory must be allocated via ::cuMemCreate.\n\n \\p width and \\p height must meet certain size requirements. See ::cudaMalloc3DArray() for more details.\n\n \\param array - Pointer to allocated array in device memory\n \\param desc - Requested channel format\n \\param width - Requested array allocation width\n \\param height - Requested array allocation height\n \\param flags - Requested properties of allocated array\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray,\n ::cudaHostAlloc,\n ::cuArrayCreate"]
17017 pub fn cudaMallocArray(
17018 array: *mut cudaArray_t,
17019 desc: *const cudaChannelFormatDesc,
17020 width: usize,
17021 height: usize,
17022 flags: ::std::os::raw::c_uint,
17023 ) -> cudaError_t;
17024}
17025extern "C" {
17026 #[doc = " \\brief Frees memory on the device\n\n Frees the memory space pointed to by \\p devPtr, which must have been\n returned by a previous call to one of the following memory allocation APIs -\n ::cudaMalloc(), ::cudaMallocPitch(), ::cudaMallocManaged(), ::cudaMallocAsync(),\n ::cudaMallocFromPoolAsync().\n\n Note - This API will not perform any implicit synchronization when the pointer was\n allocated with ::cudaMallocAsync or ::cudaMallocFromPoolAsync. Callers must ensure\n that all accesses to these pointer have completed before invoking ::cudaFree. For\n best performance and memory reuse, users should use ::cudaFreeAsync to free memory\n allocated via the stream ordered memory allocator.\n For all other pointers, this API may perform implicit synchronization.\n\n If ::cudaFree(\\p devPtr) has already been called before,\n an error is returned. If \\p devPtr is 0, no operation is performed.\n ::cudaFree() returns ::cudaErrorValue in case of failure.\n\n The device version of ::cudaFree cannot be used with a \\p *devPtr\n allocated using the host API, and vice versa.\n\n \\param devPtr - Device pointer to memory to free\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaMallocManaged, ::cudaMallocArray, ::cudaFreeArray, ::cudaMallocAsync, ::cudaMallocFromPoolAsync\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaFreeAsync\n ::cudaHostAlloc,\n ::cuMemFree"]
17027 pub fn cudaFree(devPtr: *mut ::std::os::raw::c_void) -> cudaError_t;
17028}
17029extern "C" {
17030 #[doc = " \\brief Frees page-locked memory\n\n Frees the memory space pointed to by \\p hostPtr, which must have been\n returned by a previous call to ::cudaMallocHost() or ::cudaHostAlloc().\n\n \\param ptr - Pointer to memory to free\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray,\n ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaHostAlloc,\n ::cuMemFreeHost"]
17031 pub fn cudaFreeHost(ptr: *mut ::std::os::raw::c_void) -> cudaError_t;
17032}
17033extern "C" {
17034 #[doc = " \\brief Frees an array on the device\n\n Frees the CUDA array \\p array, which must have been returned by a\n previous call to ::cudaMallocArray(). If \\p devPtr is 0,\n no operation is performed.\n\n \\param array - Pointer to array to free\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::cuArrayDestroy"]
17035 pub fn cudaFreeArray(array: cudaArray_t) -> cudaError_t;
17036}
17037extern "C" {
17038 #[doc = " \\brief Frees a mipmapped array on the device\n\n Frees the CUDA mipmapped array \\p mipmappedArray, which must have been\n returned by a previous call to ::cudaMallocMipmappedArray(). If \\p devPtr\n is 0, no operation is performed.\n\n \\param mipmappedArray - Pointer to mipmapped array to free\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc, ::cudaMallocPitch, ::cudaFree, ::cudaMallocArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::cuMipmappedArrayDestroy"]
17039 pub fn cudaFreeMipmappedArray(mipmappedArray: cudaMipmappedArray_t) -> cudaError_t;
17040}
17041extern "C" {
17042 #[doc = " \\brief Allocates page-locked memory on the host\n\n Allocates \\p size 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 ::cudaMemcpy(). Since the memory can be accessed directly by the device, it\n 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 host\n and device.\n\n The \\p flags parameter enables different options to be specified that affect\n the allocation, as follows.\n - ::cudaHostAllocDefault: This flag's value is defined to be 0 and causes\n ::cudaHostAlloc() to emulate ::cudaMallocHost().\n - ::cudaHostAllocPortable: 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 - ::cudaHostAllocMapped: Maps the allocation into the CUDA address space.\n The device pointer to the memory may be obtained by calling\n ::cudaHostGetDevicePointer().\n - ::cudaHostAllocWriteCombined: Allocates the memory as write-combined (WC).\n WC memory can be transferred across the PCI Express bus more quickly on some\n system configurations, but cannot be read efficiently by most CPUs. WC\n memory is a good option for buffers that will be written by the CPU and read\n by the device via mapped pinned memory or host->device 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 In order for the ::cudaHostAllocMapped flag to have any effect, the CUDA context\n must support the ::cudaDeviceMapHost flag, which can be checked via\n ::cudaGetDeviceFlags(). The ::cudaDeviceMapHost flag is implicitly set for\n contexts created via the runtime API.\n\n The ::cudaHostAllocMapped flag may be specified on CUDA contexts for devices\n that do not support mapped pinned memory. The failure is deferred to\n ::cudaHostGetDevicePointer() because the memory may be mapped into other\n CUDA contexts via the ::cudaHostAllocPortable flag.\n\n Memory allocated by this function must be freed with ::cudaFreeHost().\n\n \\param pHost - Device pointer to allocated memory\n \\param size - Requested allocation size in bytes\n \\param flags - Requested properties of allocated memory\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaSetDeviceFlags,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost,\n ::cudaGetDeviceFlags,\n ::cuMemHostAlloc"]
17043 pub fn cudaHostAlloc(
17044 pHost: *mut *mut ::std::os::raw::c_void,
17045 size: usize,
17046 flags: ::std::os::raw::c_uint,
17047 ) -> cudaError_t;
17048}
17049extern "C" {
17050 #[doc = " \\brief Registers an existing host memory range for use by CUDA\n\n Page-locks the memory range specified by \\p ptr and \\p size and maps it\n for the device(s) as specified by \\p flags. This memory range also is added\n to the same tracking mechanism as ::cudaHostAlloc() to automatically accelerate\n calls to functions such as ::cudaMemcpy(). Since the memory can be accessed\n directly by the device, it can be read or written with much higher bandwidth\n than pageable memory that has not been registered. Page-locking excessive\n amounts of 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 register staging areas for data exchange between\n host and device.\n\n On systems where ::pageableMemoryAccessUsesHostPageTables is true, ::cudaHostRegister\n will not page-lock the memory range specified by \\p ptr but only populate\n unpopulated pages.\n\n ::cudaHostRegister is supported only on I/O coherent devices that have a non-zero\n value for the device attribute ::cudaDevAttrHostRegisterSupported.\n\n The \\p flags parameter enables different options to be specified that\n affect the allocation, as follows.\n\n - ::cudaHostRegisterDefault: On a system with unified virtual addressing,\n the memory will be both mapped and portable. On a system with no unified\n virtual addressing, the memory will be neither mapped nor portable.\n\n - ::cudaHostRegisterPortable: 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 - ::cudaHostRegisterMapped: Maps the allocation into the CUDA address\n space. The device pointer to the memory may be obtained by calling\n ::cudaHostGetDevicePointer().\n\n - ::cudaHostRegisterIoMemory: The passed memory pointer is treated as\n pointing to some memory-mapped I/O space, e.g. belonging to a\n third-party PCIe device, and it will marked as non cache-coherent and\n contiguous.\n\n - ::cudaHostRegisterReadOnly: The passed memory pointer is treated as\n pointing to memory that is considered read-only by the device. On\n platforms without ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, this\n flag is required in order to register memory mapped to the CPU as\n read-only. Support for the use of this flag can be queried from the device\n attribute cudaDeviceAttrReadOnlyHostRegisterSupported. Using this flag with\n a current context associated with a device that does not have this attribute\n set will cause ::cudaHostRegister to error with cudaErrorNotSupported.\n\n All of these flags are orthogonal to one another: a developer may page-lock\n memory that is portable or mapped with no restrictions.\n\n The CUDA context must have been created with the ::cudaMapHost flag in\n order for the ::cudaHostRegisterMapped flag to have any effect.\n\n The ::cudaHostRegisterMapped flag may be specified on CUDA contexts for\n devices that do not support mapped pinned memory. The failure is deferred\n to ::cudaHostGetDevicePointer() because the memory may be mapped into\n other CUDA contexts via the ::cudaHostRegisterPortable flag.\n\n For devices that have a non-zero value for the device attribute\n ::cudaDevAttrCanUseHostPointerForRegisteredMem, the memory\n can also be accessed from the device using the host pointer \\p ptr.\n The device pointer returned by ::cudaHostGetDevicePointer() may or may not\n match the original host pointer \\p ptr and depends on the devices visible to the\n application. If all devices visible to the application have a non-zero value for the\n device attribute, the device pointer returned by ::cudaHostGetDevicePointer()\n will match the original pointer \\p ptr. If any device visible to the application\n has a zero value for the device attribute, the device pointer returned by\n ::cudaHostGetDevicePointer() will not match the original host pointer \\p ptr,\n but it will be suitable for use on all devices provided Unified Virtual Addressing\n is enabled. In such systems, it is valid to access the memory using either pointer\n on devices that have a non-zero value for the device attribute. Note however that\n such devices should access the memory using only of the two pointers and not both.\n\n The memory page-locked by this function must be unregistered with ::cudaHostUnregister().\n\n \\param ptr - Host pointer to memory to page-lock\n \\param size - Size in bytes of the address range to page-lock in bytes\n \\param flags - Flags for allocation request\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation,\n ::cudaErrorHostMemoryAlreadyRegistered,\n ::cudaErrorNotSupported\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaHostUnregister, ::cudaHostGetFlags, ::cudaHostGetDevicePointer,\n ::cuMemHostRegister"]
17051 pub fn cudaHostRegister(
17052 ptr: *mut ::std::os::raw::c_void,
17053 size: usize,
17054 flags: ::std::os::raw::c_uint,
17055 ) -> cudaError_t;
17056}
17057extern "C" {
17058 #[doc = " \\brief Unregisters a memory range that was registered with cudaHostRegister\n\n Unmaps the memory range whose base address is specified by \\p ptr, and makes\n it pageable again.\n\n The base address must be the same one specified to ::cudaHostRegister().\n\n \\param ptr - Host pointer to memory to unregister\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorHostMemoryNotRegistered\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaHostUnregister,\n ::cuMemHostUnregister"]
17059 pub fn cudaHostUnregister(ptr: *mut ::std::os::raw::c_void) -> cudaError_t;
17060}
17061extern "C" {
17062 #[doc = " \\brief Passes back device pointer of mapped host memory allocated by\n cudaHostAlloc or registered by cudaHostRegister\n\n Passes back the device pointer corresponding to the mapped, pinned host\n buffer allocated by ::cudaHostAlloc() or registered by ::cudaHostRegister().\n\n ::cudaHostGetDevicePointer() will fail if the ::cudaDeviceMapHost flag was\n not specified before deferred context creation occurred, or if called on a\n device that does not support mapped, pinned memory.\n\n For devices that have a non-zero value for the device attribute\n ::cudaDevAttrCanUseHostPointerForRegisteredMem, the memory\n can also be accessed from the device using the host pointer \\p pHost.\n The device pointer returned by ::cudaHostGetDevicePointer() may or may not\n match the original host pointer \\p pHost and depends on the devices visible to the\n application. If all devices visible to the application have a non-zero value for the\n device attribute, the device pointer returned by ::cudaHostGetDevicePointer()\n will match the original pointer \\p pHost. If any device visible to the application\n has a zero value for the device attribute, the device pointer returned by\n ::cudaHostGetDevicePointer() will not match the original host pointer \\p pHost,\n but it will be suitable for use on all devices provided Unified Virtual Addressing\n is enabled. In such systems, it is valid to access the memory using either pointer\n on devices that have a non-zero value for the device attribute. Note however that\n such devices should access the memory using only of the two pointers and not both.\n\n \\p flags provides for future releases. For now, it must be set to 0.\n\n \\param pDevice - Returned device pointer for mapped memory\n \\param pHost - Requested host pointer mapping\n \\param flags - Flags for extensions (must be 0 for now)\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaSetDeviceFlags, ::cudaHostAlloc,\n ::cuMemHostGetDevicePointer"]
17063 pub fn cudaHostGetDevicePointer(
17064 pDevice: *mut *mut ::std::os::raw::c_void,
17065 pHost: *mut ::std::os::raw::c_void,
17066 flags: ::std::os::raw::c_uint,
17067 ) -> cudaError_t;
17068}
17069extern "C" {
17070 #[doc = " \\brief Passes back flags used to allocate pinned host memory allocated by\n cudaHostAlloc\n\n ::cudaHostGetFlags() will fail if the input pointer does not\n reside in an address range allocated by ::cudaHostAlloc().\n\n \\param pFlags - Returned flags word\n \\param pHost - Host pointer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaHostAlloc,\n ::cuMemHostGetFlags"]
17071 pub fn cudaHostGetFlags(
17072 pFlags: *mut ::std::os::raw::c_uint,
17073 pHost: *mut ::std::os::raw::c_void,
17074 ) -> cudaError_t;
17075}
17076extern "C" {
17077 #[doc = " \\brief Allocates logical 1D, 2D, or 3D memory objects on the device\n\n Allocates at least \\p width * \\p height * \\p depth bytes of linear memory\n on the device and returns a ::cudaPitchedPtr in which \\p ptr is a pointer\n to the allocated memory. The function may pad the allocation to ensure\n hardware alignment requirements are met. The pitch returned in the \\p pitch\n field of \\p pitchedDevPtr is the width in bytes of the allocation.\n\n The returned ::cudaPitchedPtr contains additional fields \\p xsize and\n \\p ysize, the logical width and height of the allocation, which are\n equivalent to the \\p width and \\p height \\p extent parameters provided by\n the programmer during allocation.\n\n For allocations of 2D and 3D objects, it is highly recommended that\n programmers perform allocations using ::cudaMalloc3D() or\n ::cudaMallocPitch(). Due to alignment restrictions in the hardware, this is\n especially true if the application will be performing memory copies\n involving 2D or 3D objects (whether linear memory or CUDA arrays).\n\n \\param pitchedDevPtr - Pointer to allocated pitched device memory\n \\param extent - Requested allocation size (\\p width field in bytes)\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMallocPitch, ::cudaFree, ::cudaMemcpy3D, ::cudaMemset3D,\n ::cudaMalloc3DArray, ::cudaMallocArray, ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc, ::make_cudaPitchedPtr, ::make_cudaExtent,\n ::cuMemAllocPitch"]
17078 pub fn cudaMalloc3D(pitchedDevPtr: *mut cudaPitchedPtr, extent: cudaExtent) -> cudaError_t;
17079}
17080extern "C" {
17081 #[doc = " \\brief Allocate an array on the device\n\n Allocates a CUDA array according to the ::cudaChannelFormatDesc structure\n \\p desc and returns a handle to the new CUDA array in \\p *array.\n\n The ::cudaChannelFormatDesc is defined as:\n \\code\nstruct cudaChannelFormatDesc {\nint x, y, z, w;\nenum cudaChannelFormatKind f;\n};\n\\endcode\n where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,\n ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat.\n\n ::cudaMalloc3DArray() can allocate the following:\n\n - A 1D array is allocated if the height and depth extents are both zero.\n - A 2D array is allocated if only the depth extent is zero.\n - A 3D array is allocated if all three extents are non-zero.\n - A 1D layered CUDA array is allocated if only the height extent is zero and\n the cudaArrayLayered flag is set. Each layer is a 1D array. The number of layers is\n determined by the depth extent.\n - A 2D layered CUDA array is allocated if all three extents are non-zero and\n the cudaArrayLayered flag is set. Each layer is a 2D array. The number of layers is\n determined by the depth extent.\n - A cubemap CUDA array is allocated if all three extents are non-zero and the\n cudaArrayCubemap flag is set. Width must be equal to height, and depth must be six. A cubemap is\n a special type of 2D layered CUDA array, where the six layers represent the six faces of a cube.\n The order of the six layers in memory is the same as that listed in ::cudaGraphicsCubeFace.\n - A cubemap layered CUDA array is allocated if all three extents are non-zero, and both,\n cudaArrayCubemap and cudaArrayLayered flags are set. Width must be equal to height, and depth must be\n a multiple of six. A cubemap layered CUDA array is a special type of 2D layered CUDA array that consists\n of a collection of cubemaps. The first six layers represent the first cubemap, the next six layers form\n the second cubemap, and so on.\n\n\n The \\p flags parameter enables different options to be specified that affect\n the allocation, as follows.\n - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default array allocation\n - ::cudaArrayLayered: Allocates a layered CUDA array, with the depth extent indicating the number of layers\n - ::cudaArrayCubemap: Allocates a cubemap CUDA array. Width must be equal to height, and depth must be six.\n If the cudaArrayLayered flag is also set, depth must be a multiple of six.\n - ::cudaArraySurfaceLoadStore: Allocates a CUDA array that could be read from or written to using a surface\n reference.\n - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the CUDA\n array. Texture gather can only be performed on 2D CUDA arrays.\n - ::cudaArraySparse: Allocates a CUDA array without physical backing memory. The subregions within this sparse array\n can later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. This flag can only be used for\n creating 2D, 3D or 2D layered sparse CUDA arrays. The physical backing memory must be allocated via ::cuMemCreate.\n - ::cudaArrayDeferredMapping: Allocates a CUDA array without physical backing memory. The entire array can\n later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. The physical backing memory must be allocated\n via ::cuMemCreate.\n\n The width, height and depth extents must meet certain size requirements as listed in the following table.\n All values are specified in elements.\n\n Note that 2D CUDA arrays have different size requirements if the ::cudaArrayTextureGather flag is set. In that\n case, the valid range for (width, height, depth) is ((1,maxTexture2DGather[0]), (1,maxTexture2DGather[1]), 0).\n\n \\xmlonly\n <table outputclass=\"xmlonly\">\n <tgroup cols=\"3\" colsep=\"1\" rowsep=\"1\">\n <colspec colname=\"c1\" colwidth=\"1.0*\"/>\n <colspec colname=\"c2\" colwidth=\"3.0*\"/>\n <colspec colname=\"c3\" colwidth=\"3.0*\"/>\n <thead>\n <row>\n <entry>CUDA array type</entry>\n <entry>Valid extents that must always be met {(width range in elements),\n (height range), (depth range)}</entry>\n <entry>Valid extents with cudaArraySurfaceLoadStore set {(width range in\n elements), (height range), (depth range)}</entry>\n </row>\n </thead>\n <tbody>\n <row>\n <entry>1D</entry>\n <entry>{ (1,maxTexture1D), 0, 0 }</entry>\n <entry>{ (1,maxSurface1D), 0, 0 }</entry>\n </row>\n <row>\n <entry>2D</entry>\n <entry>{ (1,maxTexture2D[0]), (1,maxTexture2D[1]), 0 }</entry>\n <entry>{ (1,maxSurface2D[0]), (1,maxSurface2D[1]), 0 }</entry>\n </row>\n <row>\n <entry>3D</entry>\n <entry>{ (1,maxTexture3D[0]), (1,maxTexture3D[1]), (1,maxTexture3D[2]) }\n OR { (1,maxTexture3DAlt[0]), (1,maxTexture3DAlt[1]),\n (1,maxTexture3DAlt[2]) }</entry>\n <entry>{ (1,maxSurface3D[0]), (1,maxSurface3D[1]), (1,maxSurface3D[2]) }</entry>\n </row>\n <row>\n <entry>1D Layered</entry>\n <entry>{ (1,maxTexture1DLayered[0]), 0, (1,maxTexture1DLayered[1]) }</entry>\n <entry>{ (1,maxSurface1DLayered[0]), 0, (1,maxSurface1DLayered[1]) }</entry>\n </row>\n <row>\n <entry>2D Layered</entry>\n <entry>{ (1,maxTexture2DLayered[0]), (1,maxTexture2DLayered[1]),\n (1,maxTexture2DLayered[2]) }</entry>\n <entry>{ (1,maxSurface2DLayered[0]), (1,maxSurface2DLayered[1]),\n (1,maxSurface2DLayered[2]) }</entry>\n </row>\n <row>\n <entry>Cubemap</entry>\n <entry>{ (1,maxTextureCubemap), (1,maxTextureCubemap), 6 }</entry>\n <entry>{ (1,maxSurfaceCubemap), (1,maxSurfaceCubemap), 6 }</entry>\n </row>\n <row>\n <entry>Cubemap Layered</entry>\n <entry>{ (1,maxTextureCubemapLayered[0]), (1,maxTextureCubemapLayered[0]),\n (1,maxTextureCubemapLayered[1]) }</entry>\n <entry>{ (1,maxSurfaceCubemapLayered[0]), (1,maxSurfaceCubemapLayered[0]),\n (1,maxSurfaceCubemapLayered[1]) }</entry>\n </row>\n </tbody>\n </tgroup>\n </table>\n \\endxmlonly\n\n \\param array - Pointer to allocated array in device memory\n \\param desc - Requested channel format\n \\param extent - Requested allocation size (\\p width field in elements)\n \\param flags - Flags for extensions\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree,\n ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::make_cudaExtent,\n ::cuArray3DCreate"]
17082 pub fn cudaMalloc3DArray(
17083 array: *mut cudaArray_t,
17084 desc: *const cudaChannelFormatDesc,
17085 extent: cudaExtent,
17086 flags: ::std::os::raw::c_uint,
17087 ) -> cudaError_t;
17088}
17089extern "C" {
17090 #[doc = " \\brief Allocate a mipmapped array on the device\n\n Allocates a CUDA mipmapped array according to the ::cudaChannelFormatDesc structure\n \\p desc and returns a handle to the new CUDA mipmapped array in \\p *mipmappedArray.\n \\p numLevels 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 ::cudaChannelFormatDesc is defined as:\n \\code\nstruct cudaChannelFormatDesc {\nint x, y, z, w;\nenum cudaChannelFormatKind f;\n};\n\\endcode\n where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,\n ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat.\n\n ::cudaMallocMipmappedArray() can allocate the following:\n\n - A 1D mipmapped array is allocated if the height and depth extents are both zero.\n - A 2D mipmapped array is allocated if only the 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 the height extent is zero and\n the cudaArrayLayered flag is set. Each layer is a 1D mipmapped array. The number of layers is\n determined by the depth extent.\n - A 2D layered CUDA mipmapped array is allocated if all three extents are non-zero and\n the cudaArrayLayered flag is set. Each layer is a 2D mipmapped array. The number of layers is\n determined by the depth extent.\n - A cubemap CUDA mipmapped array is allocated if all three extents are non-zero and the\n cudaArrayCubemap flag is set. Width must be equal to height, and depth must be six.\n The order of the six layers in memory is the same as that listed in ::cudaGraphicsCubeFace.\n - A cubemap layered CUDA mipmapped array is allocated if all three extents are non-zero, and both,\n cudaArrayCubemap and cudaArrayLayered flags are set. Width must be equal to height, and depth must be\n a multiple of six. A cubemap layered CUDA mipmapped array is a special type of 2D layered CUDA mipmapped\n array that consists of a collection of cubemap mipmapped arrays. The first six layers represent the\n first cubemap mipmapped array, the next six layers form the second cubemap mipmapped array, and so on.\n\n\n The \\p flags parameter enables different options to be specified that affect\n the allocation, as follows.\n - ::cudaArrayDefault: This flag's value is defined to be 0 and provides default mipmapped array allocation\n - ::cudaArrayLayered: Allocates a layered CUDA mipmapped array, with the depth extent indicating the number of layers\n - ::cudaArrayCubemap: Allocates a cubemap CUDA mipmapped array. Width must be equal to height, and depth must be six.\n If the cudaArrayLayered flag is also set, depth must be a multiple of six.\n - ::cudaArraySurfaceLoadStore: This flag indicates that individual mipmap levels of the CUDA mipmapped array\n will be read from or written to using a surface reference.\n - ::cudaArrayTextureGather: This flag indicates that texture gather operations will be performed on the CUDA\n array. Texture gather can only be performed on 2D CUDA mipmapped arrays, and the gather operations are\n performed only on the most detailed mipmap level.\n - ::cudaArraySparse: Allocates a CUDA mipmapped array without physical backing memory. The subregions within this sparse array\n can later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. This flag can only be used for creating\n 2D, 3D or 2D layered sparse CUDA mipmapped arrays. The physical backing memory must be allocated via ::cuMemCreate.\n - ::cudaArrayDeferredMapping: Allocates a CUDA mipmapped array without physical backing memory. The entire array can\n later be mapped onto a physical memory allocation by calling ::cuMemMapArrayAsync. The physical backing memory must be allocated\n via ::cuMemCreate.\n\n The width, height and depth extents must meet certain size requirements as listed in the following table.\n All values are specified in elements.\n\n \\xmlonly\n <table outputclass=\"xmlonly\">\n <tgroup cols=\"3\" colsep=\"1\" rowsep=\"1\">\n <colspec colname=\"c1\" colwidth=\"1.0*\"/>\n <colspec colname=\"c2\" colwidth=\"3.0*\"/>\n <colspec colname=\"c3\" colwidth=\"3.0*\"/>\n <thead>\n <row>\n <entry>CUDA array type</entry>\n <entry>Valid extents that must always be met {(width range in elements),\n (height range), (depth range)}</entry>\n <entry>Valid extents with cudaArraySurfaceLoadStore set {(width range in\n elements), (height range), (depth range)}</entry>\n </row>\n </thead>\n <tbody>\n <row>\n <entry>1D</entry>\n <entry>{ (1,maxTexture1DMipmap), 0, 0 }</entry>\n <entry>{ (1,maxSurface1D), 0, 0 }</entry>\n </row>\n <row>\n <entry>2D</entry>\n <entry>{ (1,maxTexture2DMipmap[0]), (1,maxTexture2DMipmap[1]), 0 }</entry>\n <entry>{ (1,maxSurface2D[0]), (1,maxSurface2D[1]), 0 }</entry>\n </row>\n <row>\n <entry>3D</entry>\n <entry>{ (1,maxTexture3D[0]), (1,maxTexture3D[1]), (1,maxTexture3D[2]) }\n OR { (1,maxTexture3DAlt[0]), (1,maxTexture3DAlt[1]),\n (1,maxTexture3DAlt[2]) }</entry>\n <entry>{ (1,maxSurface3D[0]), (1,maxSurface3D[1]), (1,maxSurface3D[2]) }</entry>\n </row>\n <row>\n <entry>1D Layered</entry>\n <entry>{ (1,maxTexture1DLayered[0]), 0, (1,maxTexture1DLayered[1]) }</entry>\n <entry>{ (1,maxSurface1DLayered[0]), 0, (1,maxSurface1DLayered[1]) }</entry>\n </row>\n <row>\n <entry>2D Layered</entry>\n <entry>{ (1,maxTexture2DLayered[0]), (1,maxTexture2DLayered[1]),\n (1,maxTexture2DLayered[2]) }</entry>\n <entry>{ (1,maxSurface2DLayered[0]), (1,maxSurface2DLayered[1]),\n (1,maxSurface2DLayered[2]) }</entry>\n </row>\n <row>\n <entry>Cubemap</entry>\n <entry>{ (1,maxTextureCubemap), (1,maxTextureCubemap), 6 }</entry>\n <entry>{ (1,maxSurfaceCubemap), (1,maxSurfaceCubemap), 6 }</entry>\n </row>\n <row>\n <entry>Cubemap Layered</entry>\n <entry>{ (1,maxTextureCubemapLayered[0]), (1,maxTextureCubemapLayered[0]),\n (1,maxTextureCubemapLayered[1]) }</entry>\n <entry>{ (1,maxSurfaceCubemapLayered[0]), (1,maxSurfaceCubemapLayered[0]),\n (1,maxSurfaceCubemapLayered[1]) }</entry>\n </row>\n </tbody>\n </tgroup>\n </table>\n \\endxmlonly\n\n \\param mipmappedArray - Pointer to allocated mipmapped array in device memory\n \\param desc - Requested channel format\n \\param extent - Requested allocation size (\\p width field in elements)\n \\param numLevels - Number of mipmap levels to allocate\n \\param flags - Flags for extensions\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree,\n ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::make_cudaExtent,\n ::cuMipmappedArrayCreate"]
17091 pub fn cudaMallocMipmappedArray(
17092 mipmappedArray: *mut cudaMipmappedArray_t,
17093 desc: *const cudaChannelFormatDesc,
17094 extent: cudaExtent,
17095 numLevels: ::std::os::raw::c_uint,
17096 flags: ::std::os::raw::c_uint,
17097 ) -> cudaError_t;
17098}
17099extern "C" {
17100 #[doc = " \\brief Gets a mipmap level of a CUDA mipmapped array\n\n Returns in \\p *levelArray a CUDA array that represents a single mipmap level\n of the CUDA mipmapped array \\p mipmappedArray.\n\n If \\p level is greater than the maximum number of levels in this mipmapped array,\n ::cudaErrorInvalidValue is returned.\n\n If \\p mipmappedArray is NULL,\n ::cudaErrorInvalidResourceHandle is returned.\n\n \\param levelArray - Returned mipmap level CUDA array\n \\param mipmappedArray - CUDA mipmapped array\n \\param level - Mipmap level\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc3D, ::cudaMalloc, ::cudaMallocPitch, ::cudaFree,\n ::cudaFreeArray,\n \\ref ::cudaMallocHost(void**, size_t) \"cudaMallocHost (C API)\",\n ::cudaFreeHost, ::cudaHostAlloc,\n ::make_cudaExtent,\n ::cuMipmappedArrayGetLevel"]
17101 pub fn cudaGetMipmappedArrayLevel(
17102 levelArray: *mut cudaArray_t,
17103 mipmappedArray: cudaMipmappedArray_const_t,
17104 level: ::std::os::raw::c_uint,
17105 ) -> cudaError_t;
17106}
17107extern "C" {
17108 #[doc = " \\brief Copies data between 3D objects\n\n\\code\nstruct cudaExtent {\nsize_t width;\nsize_t height;\nsize_t depth;\n};\nstruct cudaExtent make_cudaExtent(size_t w, size_t h, size_t d);\n\nstruct cudaPos {\nsize_t x;\nsize_t y;\nsize_t z;\n};\nstruct cudaPos make_cudaPos(size_t x, size_t y, size_t z);\n\nstruct cudaMemcpy3DParms {\ncudaArray_t srcArray;\nstruct cudaPos srcPos;\nstruct cudaPitchedPtr srcPtr;\ncudaArray_t dstArray;\nstruct cudaPos dstPos;\nstruct cudaPitchedPtr dstPtr;\nstruct cudaExtent extent;\nenum cudaMemcpyKind kind;\n};\n\\endcode\n\n ::cudaMemcpy3D() copies data betwen two 3D objects. The source and\n destination objects may be in either host memory, device memory, or a CUDA\n array. The source, destination, extent, and kind of copy performed is\n specified by the ::cudaMemcpy3DParms struct which should be initialized to\n zero before use:\n\\code\ncudaMemcpy3DParms myParms = {0};\n\\endcode\n\n The struct passed to ::cudaMemcpy3D() must specify one of \\p srcArray or\n \\p srcPtr and one of \\p dstArray or \\p dstPtr. Passing more than one\n non-zero source or destination will cause ::cudaMemcpy3D() to return an\n error.\n\n The \\p srcPos and \\p dstPos fields are optional offsets into the source and\n destination objects and are defined in units of each object's elements. The\n element for a host or device pointer is assumed to be <b>unsigned char</b>.\n\n The \\p extent field defines the dimensions of the transferred area in\n elements. If a CUDA array is participating in the copy, the extent is\n defined in terms of that array's elements. If no CUDA array is\n participating in the copy then the extents are defined in elements of\n <b>unsigned char</b>.\n\n The \\p kind field defines the direction of the copy. It must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n For ::cudaMemcpyHostToHost or ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost\n passed as kind and cudaArray type passed as source or destination, if the kind\n implies cudaArray type to be present on the host, ::cudaMemcpy3D() will\n disregard that implication and silently correct the kind based on the fact that\n cudaArray type can only be present on the device.\n\n If the source and destination are both arrays, ::cudaMemcpy3D() will return\n an error if they do not have the same element size.\n\n The source and destination object may not overlap. If overlapping source\n and destination objects are specified, undefined behavior will result.\n\n The source object must entirely contain the region defined by \\p srcPos\n and \\p extent. The destination object must entirely contain the region\n defined by \\p dstPos and \\p extent.\n\n ::cudaMemcpy3D() returns an error if the pitch of \\p srcPtr or \\p dstPtr\n exceeds the maximum allowed. The pitch of a ::cudaPitchedPtr allocated\n with ::cudaMalloc3D() will always be valid.\n\n \\param p - 3D memory copy parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaMemset3D, ::cudaMemcpy3DAsync,\n ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::make_cudaExtent, ::make_cudaPos,\n ::cuMemcpy3D"]
17109 pub fn cudaMemcpy3D(p: *const cudaMemcpy3DParms) -> cudaError_t;
17110}
17111extern "C" {
17112 #[doc = " \\brief Copies memory between devices\n\n Perform a 3D memory copy according to the parameters specified in\n \\p p. See the definition of the ::cudaMemcpy3DPeerParms structure\n for documentation of its parameters.\n\n Note that this function is synchronous with respect to the host only if\n the source or destination of the transfer is host memory. Note also\n that this copy is serialized with respect to all pending and future\n asynchronous work in to the current device, the copy's source device,\n and the copy's destination device (use ::cudaMemcpy3DPeerAsync to avoid\n this synchronization).\n\n \\param p - Parameters for the memory copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidPitchValue\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync,\n ::cudaMemcpy3DPeerAsync,\n ::cuMemcpy3DPeer"]
17113 pub fn cudaMemcpy3DPeer(p: *const cudaMemcpy3DPeerParms) -> cudaError_t;
17114}
17115extern "C" {
17116 #[doc = " \\brief Copies data between 3D objects\n\n\\code\nstruct cudaExtent {\nsize_t width;\nsize_t height;\nsize_t depth;\n};\nstruct cudaExtent make_cudaExtent(size_t w, size_t h, size_t d);\n\nstruct cudaPos {\nsize_t x;\nsize_t y;\nsize_t z;\n};\nstruct cudaPos make_cudaPos(size_t x, size_t y, size_t z);\n\nstruct cudaMemcpy3DParms {\ncudaArray_t srcArray;\nstruct cudaPos srcPos;\nstruct cudaPitchedPtr srcPtr;\ncudaArray_t dstArray;\nstruct cudaPos dstPos;\nstruct cudaPitchedPtr dstPtr;\nstruct cudaExtent extent;\nenum cudaMemcpyKind kind;\n};\n\\endcode\n\n ::cudaMemcpy3DAsync() copies data betwen two 3D objects. The source and\n destination objects may be in either host memory, device memory, or a CUDA\n array. The source, destination, extent, and kind of copy performed is\n specified by the ::cudaMemcpy3DParms struct which should be initialized to\n zero before use:\n\\code\ncudaMemcpy3DParms myParms = {0};\n\\endcode\n\n The struct passed to ::cudaMemcpy3DAsync() must specify one of \\p srcArray\n or \\p srcPtr and one of \\p dstArray or \\p dstPtr. Passing more than one\n non-zero source or destination will cause ::cudaMemcpy3DAsync() to return an\n error.\n\n The \\p srcPos and \\p dstPos fields are optional offsets into the source and\n destination objects and are defined in units of each object's elements. The\n element for a host or device pointer is assumed to be <b>unsigned char</b>.\n For CUDA arrays, positions must be in the range [0, 2048) for any\n dimension.\n\n The \\p extent field defines the dimensions of the transferred area in\n elements. If a CUDA array is participating in the copy, the extent is\n defined in terms of that array's elements. If no CUDA array is\n participating in the copy then the extents are defined in elements of\n <b>unsigned char</b>.\n\n The \\p kind field defines the direction of the copy. It must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n For ::cudaMemcpyHostToHost or ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost\n passed as kind and cudaArray type passed as source or destination, if the kind\n implies cudaArray type to be present on the host, ::cudaMemcpy3DAsync() will\n disregard that implication and silently correct the kind based on the fact that\n cudaArray type can only be present on the device.\n\n If the source and destination are both arrays, ::cudaMemcpy3DAsync() will\n return an error if they do not have the same element size.\n\n The source and destination object may not overlap. If overlapping source\n and destination objects are specified, undefined behavior will result.\n\n The source object must lie entirely within the region defined by \\p srcPos\n and \\p extent. The destination object must lie entirely within the region\n defined by \\p dstPos and \\p extent.\n\n ::cudaMemcpy3DAsync() returns an error if the pitch of \\p srcPtr or\n \\p dstPtr exceeds the maximum allowed. The pitch of a\n ::cudaPitchedPtr allocated with ::cudaMalloc3D() will always be valid.\n\n ::cudaMemcpy3DAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If\n \\p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream\n is non-zero, the copy may overlap with operations in other streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param p - 3D memory copy parameters\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMalloc3D, ::cudaMalloc3DArray, ::cudaMemset3D, ::cudaMemcpy3D,\n ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, :::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::make_cudaExtent, ::make_cudaPos,\n ::cuMemcpy3DAsync"]
17117 pub fn cudaMemcpy3DAsync(p: *const cudaMemcpy3DParms, stream: cudaStream_t) -> cudaError_t;
17118}
17119extern "C" {
17120 #[doc = " \\brief Copies memory between devices asynchronously.\n\n Perform a 3D memory copy according to the parameters specified in\n \\p p. See the definition of the ::cudaMemcpy3DPeerParms structure\n for documentation of its parameters.\n\n \\param p - Parameters for the memory copy\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidPitchValue\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync,\n ::cudaMemcpy3DPeerAsync,\n ::cuMemcpy3DPeerAsync"]
17121 pub fn cudaMemcpy3DPeerAsync(
17122 p: *const cudaMemcpy3DPeerParms,
17123 stream: cudaStream_t,
17124 ) -> cudaError_t;
17125}
17126extern "C" {
17127 #[doc = " \\brief Gets free and total device memory\n\n Returns in \\p *total the total amount of memory available to the the current context.\n Returns in \\p *free the amount of memory on the device that is free according to the OS.\n CUDA is not guaranteed to be able to allocate all of the memory that the OS reports as free.\n In a multi-tenet situation, free estimate returned is prone to race condition where\n a new allocation/free done by a different process or a different thread in the same\n process between the time when free memory was estimated and reported, will result in\n deviation in free value reported and actual free memory.\n\n The integrated GPU on Tegra shares memory with CPU and other component\n of the SoC. The free and total values returned by the API excludes\n the SWAP memory space maintained by the OS on some platforms.\n The OS may move some of the memory pages into swap area as the GPU or\n CPU allocate or access memory. See Tegra app note on how to calculate\n total and free memory on Tegra.\n\n \\param free - Returned free memory in bytes\n \\param total - Returned total memory in bytes\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorLaunchFailure\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cuMemGetInfo"]
17128 pub fn cudaMemGetInfo(free: *mut usize, total: *mut usize) -> cudaError_t;
17129}
17130extern "C" {
17131 #[doc = " \\brief Gets info about the specified cudaArray\n\n Returns in \\p *desc, \\p *extent and \\p *flags respectively, the type, shape\n and flags of \\p array.\n\n Any of \\p *desc, \\p *extent and \\p *flags may be specified as NULL.\n\n \\param desc - Returned array type\n \\param extent - Returned array shape. 2D arrays will have depth of zero\n \\param flags - Returned array flags\n \\param array - The ::cudaArray to get info for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cuArrayGetDescriptor,\n ::cuArray3DGetDescriptor"]
17132 pub fn cudaArrayGetInfo(
17133 desc: *mut cudaChannelFormatDesc,
17134 extent: *mut cudaExtent,
17135 flags: *mut ::std::os::raw::c_uint,
17136 array: cudaArray_t,
17137 ) -> cudaError_t;
17138}
17139extern "C" {
17140 #[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: ::cudaChannelFormatKindNV12, then ::cudaErrorInvalidValue is returned.\n\n Note that if the \\p hArray has format ::cudaChannelFormatKindNV12, then passing in 0 for \\p planeIdx returns\n a CUDA array of the same size as \\p hArray but with one 8-bit channel and ::cudaChannelFormatKindUnsigned as its format kind.\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 8-bit channels and ::cudaChannelFormatKindUnsigned as its format kind.\n\n \\param pPlaneArray - Returned CUDA array referenced by the \\p planeIdx\n \\param hArray - CUDA array\n \\param planeIdx - Plane index\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n\n \\sa\n ::cuArrayGetPlane"]
17141 pub fn cudaArrayGetPlane(
17142 pPlaneArray: *mut cudaArray_t,
17143 hArray: cudaArray_t,
17144 planeIdx: ::std::os::raw::c_uint,
17145 ) -> cudaError_t;
17146}
17147extern "C" {
17148 #[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 ::cudaArrayDeferredMapping\n ::cudaErrorInvalidValue will be returned.\n\n The returned value in ::cudaArrayMemoryRequirements::size\n represents the total size of the CUDA array.\n The returned value in ::cudaArrayMemoryRequirements::alignment\n represents the alignment necessary for mapping the CUDA array.\n\n \\return\n ::cudaSuccess\n ::cudaErrorInvalidValue\n\n \\param[out] memoryRequirements - Pointer to ::cudaArrayMemoryRequirements\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 ::cudaMipmappedArrayGetMemoryRequirements"]
17149 pub fn cudaArrayGetMemoryRequirements(
17150 memoryRequirements: *mut cudaArrayMemoryRequirements,
17151 array: cudaArray_t,
17152 device: ::std::os::raw::c_int,
17153 ) -> cudaError_t;
17154}
17155extern "C" {
17156 #[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 ::cudaArrayDeferredMapping\n ::cudaErrorInvalidValue will be returned.\n\n The returned value in ::cudaArrayMemoryRequirements::size\n represents the total size of the CUDA mipmapped array.\n The returned value in ::cudaArrayMemoryRequirements::alignment\n represents the alignment necessary for mapping the CUDA mipmapped\n array.\n\n \\return\n ::cudaSuccess\n ::cudaErrorInvalidValue\n\n \\param[out] memoryRequirements - Pointer to ::cudaArrayMemoryRequirements\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 ::cudaArrayGetMemoryRequirements"]
17157 pub fn cudaMipmappedArrayGetMemoryRequirements(
17158 memoryRequirements: *mut cudaArrayMemoryRequirements,
17159 mipmap: cudaMipmappedArray_t,
17160 device: ::std::os::raw::c_int,
17161 ) -> cudaError_t;
17162}
17163extern "C" {
17164 pub fn cudaArrayGetSparseProperties(
17165 sparseProperties: *mut cudaArraySparseProperties,
17166 array: cudaArray_t,
17167 ) -> cudaError_t;
17168}
17169extern "C" {
17170 pub fn cudaMipmappedArrayGetSparseProperties(
17171 sparseProperties: *mut cudaArraySparseProperties,
17172 mipmap: cudaMipmappedArray_t,
17173 ) -> cudaError_t;
17174}
17175extern "C" {
17176 #[doc = " \\brief Copies data between host and device\n\n Copies \\p count bytes from the memory area pointed to by \\p src to the\n memory area pointed to by \\p dst, where \\p kind specifies the direction\n of the copy, and must be one of ::cudaMemcpyHostToHost,\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing. Calling\n ::cudaMemcpy() with dst and src pointers that do not match the direction of\n the copy results in an undefined behavior.\n\n \\param dst - Destination memory address\n \\param src - Source memory address\n \\param count - Size in bytes to copy\n \\param kind - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\note_sync\n \\note_memcpy\n\n \\sa ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyDtoH,\n ::cuMemcpyHtoD,\n ::cuMemcpyDtoD,\n ::cuMemcpy"]
17177 pub fn cudaMemcpy(
17178 dst: *mut ::std::os::raw::c_void,
17179 src: *const ::std::os::raw::c_void,
17180 count: usize,
17181 kind: cudaMemcpyKind,
17182 ) -> cudaError_t;
17183}
17184extern "C" {
17185 #[doc = " \\brief Copies memory between two devices\n\n Copies memory from one device to memory on another device. \\p dst is the\n base device pointer of the destination memory and \\p dstDevice is the\n destination device. \\p src is the base device pointer of the source memory\n and \\p srcDevice is the source device. \\p count specifies the number of bytes\n to copy.\n\n Note that this function is asynchronous with respect to the host, but\n serialized with respect all pending and future asynchronous work in to the\n current device, \\p srcDevice, and \\p dstDevice (use ::cudaMemcpyPeerAsync\n to avoid this synchronization).\n\n \\param dst - Destination device pointer\n \\param dstDevice - Destination device\n \\param src - Source device pointer\n \\param srcDevice - Source device\n \\param count - Size of memory copy in bytes\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyAsync, ::cudaMemcpyPeerAsync,\n ::cudaMemcpy3DPeerAsync,\n ::cuMemcpyPeer"]
17186 pub fn cudaMemcpyPeer(
17187 dst: *mut ::std::os::raw::c_void,
17188 dstDevice: ::std::os::raw::c_int,
17189 src: *const ::std::os::raw::c_void,
17190 srcDevice: ::std::os::raw::c_int,
17191 count: usize,
17192 ) -> cudaError_t;
17193}
17194extern "C" {
17195 #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the memory\n area pointed to by \\p src to the memory area pointed to by \\p dst, where\n \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing. \\p dpitch and\n \\p spitch are the widths in memory in bytes of the 2D arrays pointed to by\n \\p dst and \\p src, including any padding added to the end of each row. The\n memory areas may not overlap. \\p width must not exceed either \\p dpitch or\n \\p spitch. Calling ::cudaMemcpy2D() with \\p dst and \\p src pointers that do\n not match the direction of the copy results in an undefined behavior.\n ::cudaMemcpy2D() returns an error if \\p dpitch or \\p spitch exceeds\n the maximum allowed.\n\n \\param dst - Destination memory address\n \\param dpitch - Pitch of destination memory\n \\param src - Source memory address\n \\param spitch - Pitch of source memory\n \\param width - Width of matrix transfer (columns in bytes)\n \\param height - Height of matrix transfer (rows)\n \\param kind - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2D,\n ::cuMemcpy2DUnaligned"]
17196 pub fn cudaMemcpy2D(
17197 dst: *mut ::std::os::raw::c_void,
17198 dpitch: usize,
17199 src: *const ::std::os::raw::c_void,
17200 spitch: usize,
17201 width: usize,
17202 height: usize,
17203 kind: cudaMemcpyKind,
17204 ) -> cudaError_t;
17205}
17206extern "C" {
17207 #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the memory\n area pointed to by \\p src to the CUDA array \\p dst starting at\n \\p hOffset rows and \\p wOffset bytes from the upper left corner,\n where \\p kind specifies the direction of the copy, and must be one\n of ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n \\p spitch is the width in memory in bytes of the 2D array pointed to by\n \\p src, including any padding added to the end of each row. \\p wOffset +\n \\p width must not exceed the width of the CUDA array \\p dst. \\p width must\n not exceed \\p spitch. ::cudaMemcpy2DToArray() returns an error if \\p spitch\n exceeds the maximum allowed.\n\n \\param dst - Destination memory address\n \\param wOffset - Destination starting X offset (columns in bytes)\n \\param hOffset - Destination starting Y offset (rows)\n \\param src - Source memory address\n \\param spitch - Pitch of source memory\n \\param width - Width of matrix transfer (columns in bytes)\n \\param height - Height of matrix transfer (rows)\n \\param kind - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2D,\n ::cuMemcpy2DUnaligned"]
17208 pub fn cudaMemcpy2DToArray(
17209 dst: cudaArray_t,
17210 wOffset: usize,
17211 hOffset: usize,
17212 src: *const ::std::os::raw::c_void,
17213 spitch: usize,
17214 width: usize,
17215 height: usize,
17216 kind: cudaMemcpyKind,
17217 ) -> cudaError_t;
17218}
17219extern "C" {
17220 #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the CUDA\n array \\p src starting at \\p hOffset rows and \\p wOffset bytes from the\n upper left corner to the memory area pointed to by \\p dst, where\n \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing. \\p dpitch is the\n width in memory in bytes of the 2D array pointed to by \\p dst, including any\n padding added to the end of each row. \\p wOffset + \\p width must not exceed\n the width of the CUDA array \\p src. \\p width must not exceed \\p dpitch.\n ::cudaMemcpy2DFromArray() returns an error if \\p dpitch exceeds the maximum\n allowed.\n\n \\param dst - Destination memory address\n \\param dpitch - Pitch of destination memory\n \\param src - Source memory address\n \\param wOffset - Source starting X offset (columns in bytes)\n \\param hOffset - Source starting Y offset (rows)\n \\param width - Width of matrix transfer (columns in bytes)\n \\param height - Height of matrix transfer (rows)\n \\param kind - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2D,\n ::cuMemcpy2DUnaligned"]
17221 pub fn cudaMemcpy2DFromArray(
17222 dst: *mut ::std::os::raw::c_void,
17223 dpitch: usize,
17224 src: cudaArray_const_t,
17225 wOffset: usize,
17226 hOffset: usize,
17227 width: usize,
17228 height: usize,
17229 kind: cudaMemcpyKind,
17230 ) -> cudaError_t;
17231}
17232extern "C" {
17233 #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the CUDA\n array \\p src starting at \\p hOffsetSrc rows and \\p wOffsetSrc bytes from the\n upper left corner to the CUDA array \\p dst starting at \\p hOffsetDst rows\n and \\p wOffsetDst bytes from the upper left corner, where \\p kind\n specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n \\p wOffsetDst + \\p width must not exceed the width of the CUDA array \\p dst.\n \\p wOffsetSrc + \\p width must not exceed the width of the CUDA array \\p src.\n\n \\param dst - Destination memory address\n \\param wOffsetDst - Destination starting X offset (columns in bytes)\n \\param hOffsetDst - Destination starting Y offset (rows)\n \\param src - Source memory address\n \\param wOffsetSrc - Source starting X offset (columns in bytes)\n \\param hOffsetSrc - Source starting Y offset (rows)\n \\param width - Width of matrix transfer (columns in bytes)\n \\param height - Height of matrix transfer (rows)\n \\param kind - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2D,\n ::cuMemcpy2DUnaligned"]
17234 pub fn cudaMemcpy2DArrayToArray(
17235 dst: cudaArray_t,
17236 wOffsetDst: usize,
17237 hOffsetDst: usize,
17238 src: cudaArray_const_t,
17239 wOffsetSrc: usize,
17240 hOffsetSrc: usize,
17241 width: usize,
17242 height: usize,
17243 kind: cudaMemcpyKind,
17244 ) -> cudaError_t;
17245}
17246extern "C" {
17247 #[doc = " \\brief Copies data to the given symbol on the device\n\n Copies \\p count bytes from the memory area pointed to by \\p src\n to the memory area pointed to by \\p offset bytes from the start of symbol\n \\p symbol. The memory areas may not overlap. \\p symbol is a variable that\n resides in global or constant memory space. \\p kind can be either\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.\n Passing ::cudaMemcpyDefault is recommended, in which case the type of\n transfer is inferred from the pointer values. However, ::cudaMemcpyDefault\n is only allowed on systems that support unified virtual addressing.\n\n \\param symbol - Device symbol address\n \\param src - Source memory address\n \\param count - Size in bytes to copy\n \\param offset - Offset from start of symbol in bytes\n \\param kind - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_sync\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy,\n ::cuMemcpyHtoD,\n ::cuMemcpyDtoD"]
17248 pub fn cudaMemcpyToSymbol(
17249 symbol: *const ::std::os::raw::c_void,
17250 src: *const ::std::os::raw::c_void,
17251 count: usize,
17252 offset: usize,
17253 kind: cudaMemcpyKind,
17254 ) -> cudaError_t;
17255}
17256extern "C" {
17257 #[doc = " \\brief Copies data from the given symbol on the device\n\n Copies \\p count bytes from the memory area pointed to by \\p offset bytes\n from the start of symbol \\p symbol to the memory area pointed to by \\p dst.\n The memory areas may not overlap. \\p symbol is a variable that\n resides in global or constant memory space. \\p kind can be either\n ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.\n Passing ::cudaMemcpyDefault is recommended, in which case the type of\n transfer is inferred from the pointer values. However, ::cudaMemcpyDefault\n is only allowed on systems that support unified virtual addressing.\n\n \\param dst - Destination memory address\n \\param symbol - Device symbol address\n \\param count - Size in bytes to copy\n \\param offset - Offset from start of symbol in bytes\n \\param kind - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_sync\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy,\n ::cuMemcpyDtoH,\n ::cuMemcpyDtoD"]
17258 pub fn cudaMemcpyFromSymbol(
17259 dst: *mut ::std::os::raw::c_void,
17260 symbol: *const ::std::os::raw::c_void,
17261 count: usize,
17262 offset: usize,
17263 kind: cudaMemcpyKind,
17264 ) -> cudaError_t;
17265}
17266extern "C" {
17267 #[doc = " \\brief Copies data between host and device\n\n Copies \\p count bytes from the memory area pointed to by \\p src to the\n memory area pointed to by \\p dst, where \\p kind specifies the\n direction of the copy, and must be one of ::cudaMemcpyHostToHost,\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n The memory areas may not overlap. Calling ::cudaMemcpyAsync() with \\p dst and\n \\p src pointers that do not match the direction of the copy results in an\n undefined behavior.\n\n ::cudaMemcpyAsync() is asynchronous with respect to the host, so the call\n may return before the copy is complete. The copy can optionally be\n associated to a stream by passing a non-zero \\p stream argument. If \\p kind\n is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and the \\p stream is\n non-zero, the copy may overlap with operations in other streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param dst - Destination memory address\n \\param src - Source memory address\n \\param count - Size in bytes to copy\n \\param kind - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyAsync,\n ::cuMemcpyDtoHAsync,\n ::cuMemcpyHtoDAsync,\n ::cuMemcpyDtoDAsync"]
17268 pub fn cudaMemcpyAsync(
17269 dst: *mut ::std::os::raw::c_void,
17270 src: *const ::std::os::raw::c_void,
17271 count: usize,
17272 kind: cudaMemcpyKind,
17273 stream: cudaStream_t,
17274 ) -> cudaError_t;
17275}
17276extern "C" {
17277 #[doc = " \\brief Copies memory between two devices asynchronously.\n\n Copies memory from one device to memory on another device. \\p dst is the\n base device pointer of the destination memory and \\p dstDevice is the\n destination device. \\p src is the base device pointer of the source memory\n and \\p srcDevice is the source device. \\p count specifies the number of bytes\n to copy.\n\n Note that this function is asynchronous with respect to the host and all work\n on other devices.\n\n \\param dst - Destination device pointer\n \\param dstDevice - Destination device\n \\param src - Source device pointer\n \\param srcDevice - Source device\n \\param count - Size of memory copy in bytes\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync,\n ::cudaMemcpy3DPeerAsync,\n ::cuMemcpyPeerAsync"]
17278 pub fn cudaMemcpyPeerAsync(
17279 dst: *mut ::std::os::raw::c_void,
17280 dstDevice: ::std::os::raw::c_int,
17281 src: *const ::std::os::raw::c_void,
17282 srcDevice: ::std::os::raw::c_int,
17283 count: usize,
17284 stream: cudaStream_t,
17285 ) -> cudaError_t;
17286}
17287extern "C" {
17288 #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the memory\n area pointed to by \\p src to the memory area pointed to by \\p dst, where\n \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n \\p dpitch and \\p spitch are the widths in memory in bytes of the 2D arrays\n pointed to by \\p dst and \\p src, including any padding added to the end of\n each row. The memory areas may not overlap. \\p width must not exceed either\n \\p dpitch or \\p spitch.\n\n Calling ::cudaMemcpy2DAsync() with \\p dst and \\p src pointers that do not\n match the direction of the copy results in an undefined behavior.\n ::cudaMemcpy2DAsync() returns an error if \\p dpitch or \\p spitch is greater\n than the maximum allowed.\n\n ::cudaMemcpy2DAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If\n \\p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and\n \\p stream is non-zero, the copy may overlap with operations in other\n streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param dst - Destination memory address\n \\param dpitch - Pitch of destination memory\n \\param src - Source memory address\n \\param spitch - Pitch of source memory\n \\param width - Width of matrix transfer (columns in bytes)\n \\param height - Height of matrix transfer (rows)\n \\param kind - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2DAsync"]
17289 pub fn cudaMemcpy2DAsync(
17290 dst: *mut ::std::os::raw::c_void,
17291 dpitch: usize,
17292 src: *const ::std::os::raw::c_void,
17293 spitch: usize,
17294 width: usize,
17295 height: usize,
17296 kind: cudaMemcpyKind,
17297 stream: cudaStream_t,
17298 ) -> cudaError_t;
17299}
17300extern "C" {
17301 #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the memory\n area pointed to by \\p src to the CUDA array \\p dst starting at \\p hOffset\n rows and \\p wOffset bytes from the upper left corner, where \\p kind specifies\n the direction of the copy, and must be one of ::cudaMemcpyHostToHost,\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n \\p spitch is the width in memory in bytes of the 2D array pointed to by\n \\p src, including any padding added to the end of each row. \\p wOffset +\n \\p width must not exceed the width of the CUDA array \\p dst. \\p width must\n not exceed \\p spitch. ::cudaMemcpy2DToArrayAsync() returns an error if\n \\p spitch exceeds the maximum allowed.\n\n ::cudaMemcpy2DToArrayAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If\n \\p kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and\n \\p stream is non-zero, the copy may overlap with operations in other\n streams.\n\n \\param dst - Destination memory address\n \\param wOffset - Destination starting X offset (columns in bytes)\n \\param hOffset - Destination starting Y offset (rows)\n \\param src - Source memory address\n \\param spitch - Pitch of source memory\n \\param width - Width of matrix transfer (columns in bytes)\n \\param height - Height of matrix transfer (rows)\n \\param kind - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2DAsync"]
17302 pub fn cudaMemcpy2DToArrayAsync(
17303 dst: cudaArray_t,
17304 wOffset: usize,
17305 hOffset: usize,
17306 src: *const ::std::os::raw::c_void,
17307 spitch: usize,
17308 width: usize,
17309 height: usize,
17310 kind: cudaMemcpyKind,
17311 stream: cudaStream_t,
17312 ) -> cudaError_t;
17313}
17314extern "C" {
17315 #[doc = " \\brief Copies data between host and device\n\n Copies a matrix (\\p height rows of \\p width bytes each) from the CUDA\n array \\p src starting at \\p hOffset rows and \\p wOffset bytes from the\n upper left corner to the memory area pointed to by \\p dst,\n where \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n \\p dpitch is the width in memory in bytes of the 2D\n array pointed to by \\p dst, including any padding added to the end of each\n row. \\p wOffset + \\p width must not exceed the width of the CUDA array\n \\p src. \\p width must not exceed \\p dpitch. ::cudaMemcpy2DFromArrayAsync()\n returns an error if \\p dpitch exceeds the maximum allowed.\n\n ::cudaMemcpy2DFromArrayAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally be\n associated to a stream by passing a non-zero \\p stream argument. If \\p kind\n is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream is\n non-zero, the copy may overlap with operations in other streams.\n\n \\param dst - Destination memory address\n \\param dpitch - Pitch of destination memory\n \\param src - Source memory address\n \\param wOffset - Source starting X offset (columns in bytes)\n \\param hOffset - Source starting Y offset (rows)\n \\param width - Width of matrix transfer (columns in bytes)\n \\param height - Height of matrix transfer (rows)\n \\param kind - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidPitchValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n \\note_memcpy\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpy2DAsync"]
17316 pub fn cudaMemcpy2DFromArrayAsync(
17317 dst: *mut ::std::os::raw::c_void,
17318 dpitch: usize,
17319 src: cudaArray_const_t,
17320 wOffset: usize,
17321 hOffset: usize,
17322 width: usize,
17323 height: usize,
17324 kind: cudaMemcpyKind,
17325 stream: cudaStream_t,
17326 ) -> cudaError_t;
17327}
17328extern "C" {
17329 #[doc = " \\brief Copies data to the given symbol on the device\n\n Copies \\p count bytes from the memory area pointed to by \\p src\n to the memory area pointed to by \\p offset bytes from the start of symbol\n \\p symbol. The memory areas may not overlap. \\p symbol is a variable that\n resides in global or constant memory space. \\p kind can be either\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.\n Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer\n is inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n ::cudaMemcpyToSymbolAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If\n \\p kind is ::cudaMemcpyHostToDevice and \\p stream is non-zero, the copy\n may overlap with operations in other streams.\n\n \\param symbol - Device symbol address\n \\param src - Source memory address\n \\param count - Size in bytes to copy\n \\param offset - Offset from start of symbol in bytes\n \\param kind - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyAsync,\n ::cuMemcpyHtoDAsync,\n ::cuMemcpyDtoDAsync"]
17330 pub fn cudaMemcpyToSymbolAsync(
17331 symbol: *const ::std::os::raw::c_void,
17332 src: *const ::std::os::raw::c_void,
17333 count: usize,
17334 offset: usize,
17335 kind: cudaMemcpyKind,
17336 stream: cudaStream_t,
17337 ) -> cudaError_t;
17338}
17339extern "C" {
17340 #[doc = " \\brief Copies data from the given symbol on the device\n\n Copies \\p count bytes from the memory area pointed to by \\p offset bytes\n from the start of symbol \\p symbol to the memory area pointed to by \\p dst.\n The memory areas may not overlap. \\p symbol is a variable that resides in\n global or constant memory space. \\p kind can be either\n ::cudaMemcpyDeviceToHost, ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault.\n Passing ::cudaMemcpyDefault is recommended, in which case the type of transfer\n is inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n ::cudaMemcpyFromSymbolAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally be\n associated to a stream by passing a non-zero \\p stream argument. If \\p kind\n is ::cudaMemcpyDeviceToHost and \\p stream is non-zero, the copy may overlap\n with operations in other streams.\n\n \\param dst - Destination memory address\n \\param symbol - Device symbol address\n \\param count - Size in bytes to copy\n \\param offset - Offset from start of symbol in bytes\n \\param kind - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorInvalidMemcpyDirection,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync,\n ::cuMemcpyAsync,\n ::cuMemcpyDtoHAsync,\n ::cuMemcpyDtoDAsync"]
17341 pub fn cudaMemcpyFromSymbolAsync(
17342 dst: *mut ::std::os::raw::c_void,
17343 symbol: *const ::std::os::raw::c_void,
17344 count: usize,
17345 offset: usize,
17346 kind: cudaMemcpyKind,
17347 stream: cudaStream_t,
17348 ) -> cudaError_t;
17349}
17350extern "C" {
17351 #[doc = " \\brief Initializes or sets device memory to a value\n\n Fills the first \\p count bytes of the memory area pointed to by \\p devPtr\n with the constant byte value \\p value.\n\n Note that this function is asynchronous with respect to the host unless\n \\p devPtr refers to pinned host memory.\n\n \\param devPtr - Pointer to device memory\n \\param value - Value to set for each byte of specified memory\n \\param count - Size in bytes to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cuMemsetD8,\n ::cuMemsetD16,\n ::cuMemsetD32"]
17352 pub fn cudaMemset(
17353 devPtr: *mut ::std::os::raw::c_void,
17354 value: ::std::os::raw::c_int,
17355 count: usize,
17356 ) -> cudaError_t;
17357}
17358extern "C" {
17359 #[doc = " \\brief Initializes or sets device memory to a value\n\n Sets to the specified value \\p value a matrix (\\p height rows of \\p width\n bytes each) pointed to by \\p dstPtr. \\p pitch is the width in bytes of the\n 2D array pointed to by \\p dstPtr, including any padding added to the end\n of each row. This function performs fastest when the pitch is one that has\n been passed back by ::cudaMallocPitch().\n\n Note that this function is asynchronous with respect to the host unless\n \\p devPtr refers to pinned host memory.\n\n \\param devPtr - Pointer to 2D device memory\n \\param pitch - Pitch in bytes of 2D device memory(Unused if \\p height is 1)\n \\param value - Value to set for each byte of specified memory\n \\param width - Width of matrix set (columns in bytes)\n \\param height - Height of matrix set (rows)\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemset, ::cudaMemset3D, ::cudaMemsetAsync,\n ::cudaMemset2DAsync, ::cudaMemset3DAsync,\n ::cuMemsetD2D8,\n ::cuMemsetD2D16,\n ::cuMemsetD2D32"]
17360 pub fn cudaMemset2D(
17361 devPtr: *mut ::std::os::raw::c_void,
17362 pitch: usize,
17363 value: ::std::os::raw::c_int,
17364 width: usize,
17365 height: usize,
17366 ) -> cudaError_t;
17367}
17368extern "C" {
17369 #[doc = " \\brief Initializes or sets device memory to a value\n\n Initializes each element of a 3D array to the specified value \\p value.\n The object to initialize is defined by \\p pitchedDevPtr. The \\p pitch field\n of \\p pitchedDevPtr is the width in memory in bytes of the 3D array pointed\n to by \\p pitchedDevPtr, including any padding added to the end of each row.\n The \\p xsize field specifies the logical width of each row in bytes, while\n the \\p ysize field specifies the height of each 2D slice in rows.\n The \\p pitch field of \\p pitchedDevPtr is ignored when \\p height and \\p depth\n are both equal to 1.\n\n The extents of the initialized region are specified as a \\p width in bytes,\n a \\p height in rows, and a \\p depth in slices.\n\n Extents with \\p width greater than or equal to the \\p xsize of\n \\p pitchedDevPtr may perform significantly faster than extents narrower\n than the \\p xsize. Secondarily, extents with \\p height equal to the\n \\p ysize of \\p pitchedDevPtr will perform faster than when the \\p height is\n shorter than the \\p ysize.\n\n This function performs fastest when the \\p pitchedDevPtr has been allocated\n by ::cudaMalloc3D().\n\n Note that this function is asynchronous with respect to the host unless\n \\p pitchedDevPtr refers to pinned host memory.\n\n \\param pitchedDevPtr - Pointer to pitched device memory\n \\param value - Value to set for each byte of specified memory\n \\param extent - Size parameters for where to set device memory (\\p width field in bytes)\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemset, ::cudaMemset2D,\n ::cudaMemsetAsync, ::cudaMemset2DAsync, ::cudaMemset3DAsync,\n ::cudaMalloc3D, ::make_cudaPitchedPtr,\n ::make_cudaExtent"]
17370 pub fn cudaMemset3D(
17371 pitchedDevPtr: cudaPitchedPtr,
17372 value: ::std::os::raw::c_int,
17373 extent: cudaExtent,
17374 ) -> cudaError_t;
17375}
17376extern "C" {
17377 #[doc = " \\brief Initializes or sets device memory to a value\n\n Fills the first \\p count bytes of the memory area pointed to by \\p devPtr\n with the constant byte value \\p value.\n\n ::cudaMemsetAsync() is asynchronous with respect to the host, so\n the call may return before the memset is complete. The operation can optionally\n be associated to a stream by passing a non-zero \\p stream argument.\n If \\p stream is non-zero, the operation may overlap with operations in other streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param devPtr - Pointer to device memory\n \\param value - Value to set for each byte of specified memory\n \\param count - Size in bytes to set\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D,\n ::cudaMemset2DAsync, ::cudaMemset3DAsync,\n ::cuMemsetD8Async,\n ::cuMemsetD16Async,\n ::cuMemsetD32Async"]
17378 pub fn cudaMemsetAsync(
17379 devPtr: *mut ::std::os::raw::c_void,
17380 value: ::std::os::raw::c_int,
17381 count: usize,
17382 stream: cudaStream_t,
17383 ) -> cudaError_t;
17384}
17385extern "C" {
17386 #[doc = " \\brief Initializes or sets device memory to a value\n\n Sets to the specified value \\p value a matrix (\\p height rows of \\p width\n bytes each) pointed to by \\p dstPtr. \\p pitch is the width in bytes of the\n 2D array pointed to by \\p dstPtr, including any padding added to the end\n of each row. This function performs fastest when the pitch is one that has\n been passed back by ::cudaMallocPitch().\n\n ::cudaMemset2DAsync() is asynchronous with respect to the host, so\n the call may return before the memset is complete. The operation can optionally\n be associated to a stream by passing a non-zero \\p stream argument.\n If \\p stream is non-zero, the operation may overlap with operations in other streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param devPtr - Pointer to 2D device memory\n \\param pitch - Pitch in bytes of 2D device memory(Unused if \\p height is 1)\n \\param value - Value to set for each byte of specified memory\n \\param width - Width of matrix set (columns in bytes)\n \\param height - Height of matrix set (rows)\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D,\n ::cudaMemsetAsync, ::cudaMemset3DAsync,\n ::cuMemsetD2D8Async,\n ::cuMemsetD2D16Async,\n ::cuMemsetD2D32Async"]
17387 pub fn cudaMemset2DAsync(
17388 devPtr: *mut ::std::os::raw::c_void,
17389 pitch: usize,
17390 value: ::std::os::raw::c_int,
17391 width: usize,
17392 height: usize,
17393 stream: cudaStream_t,
17394 ) -> cudaError_t;
17395}
17396extern "C" {
17397 #[doc = " \\brief Initializes or sets device memory to a value\n\n Initializes each element of a 3D array to the specified value \\p value.\n The object to initialize is defined by \\p pitchedDevPtr. The \\p pitch field\n of \\p pitchedDevPtr is the width in memory in bytes of the 3D array pointed\n to by \\p pitchedDevPtr, including any padding added to the end of each row.\n The \\p xsize field specifies the logical width of each row in bytes, while\n the \\p ysize field specifies the height of each 2D slice in rows.\n The \\p pitch field of \\p pitchedDevPtr is ignored when \\p height and \\p depth\n are both equal to 1.\n\n The extents of the initialized region are specified as a \\p width in bytes,\n a \\p height in rows, and a \\p depth in slices.\n\n Extents with \\p width greater than or equal to the \\p xsize of\n \\p pitchedDevPtr may perform significantly faster than extents narrower\n than the \\p xsize. Secondarily, extents with \\p height equal to the\n \\p ysize of \\p pitchedDevPtr will perform faster than when the \\p height is\n shorter than the \\p ysize.\n\n This function performs fastest when the \\p pitchedDevPtr has been allocated\n by ::cudaMalloc3D().\n\n ::cudaMemset3DAsync() is asynchronous with respect to the host, so\n the call may return before the memset is complete. The operation can optionally\n be associated to a stream by passing a non-zero \\p stream argument.\n If \\p stream is non-zero, the operation may overlap with operations in other streams.\n\n The device version of this function only handles device to device copies and\n cannot be given local or shared pointers.\n\n \\param pitchedDevPtr - Pointer to pitched device memory\n \\param value - Value to set for each byte of specified memory\n \\param extent - Size parameters for where to set device memory (\\p width field in bytes)\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\notefnerr\n \\note_memset\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemset, ::cudaMemset2D, ::cudaMemset3D,\n ::cudaMemsetAsync, ::cudaMemset2DAsync,\n ::cudaMalloc3D, ::make_cudaPitchedPtr,\n ::make_cudaExtent"]
17398 pub fn cudaMemset3DAsync(
17399 pitchedDevPtr: cudaPitchedPtr,
17400 value: ::std::os::raw::c_int,
17401 extent: cudaExtent,
17402 stream: cudaStream_t,
17403 ) -> cudaError_t;
17404}
17405extern "C" {
17406 #[doc = " \\brief Finds the address associated with a CUDA symbol\n\n Returns in \\p *devPtr the address of symbol \\p symbol on the device.\n \\p symbol is a variable that resides in global or constant memory space.\n If \\p symbol cannot be found, or if \\p symbol is not declared in the\n global or constant memory space, \\p *devPtr is unchanged and the error\n ::cudaErrorInvalidSymbol is returned.\n\n \\param devPtr - Return device pointer associated with symbol\n \\param symbol - Device symbol address\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaGetSymbolAddress(void**, const T&) \"cudaGetSymbolAddress (C++ API)\",\n \\ref ::cudaGetSymbolSize(size_t*, const void*) \"cudaGetSymbolSize (C API)\",\n ::cuModuleGetGlobal"]
17407 pub fn cudaGetSymbolAddress(
17408 devPtr: *mut *mut ::std::os::raw::c_void,
17409 symbol: *const ::std::os::raw::c_void,
17410 ) -> cudaError_t;
17411}
17412extern "C" {
17413 #[doc = " \\brief Finds the size of the object associated with a CUDA symbol\n\n Returns in \\p *size the size of symbol \\p symbol. \\p symbol is a variable that\n resides in global or constant memory space. If \\p symbol cannot be found, or\n if \\p symbol is not declared in global or constant memory space, \\p *size is\n unchanged and the error ::cudaErrorInvalidSymbol is returned.\n\n \\param size - Size of object associated with symbol\n \\param symbol - Device symbol address\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidSymbol,\n ::cudaErrorNoKernelImageForDevice\n \\notefnerr\n \\note_string_api_deprecation\n \\note_init_rt\n \\note_callback\n\n \\sa\n \\ref ::cudaGetSymbolAddress(void**, const void*) \"cudaGetSymbolAddress (C API)\",\n \\ref ::cudaGetSymbolSize(size_t*, const T&) \"cudaGetSymbolSize (C++ API)\",\n ::cuModuleGetGlobal"]
17414 pub fn cudaGetSymbolSize(
17415 size: *mut usize,
17416 symbol: *const ::std::os::raw::c_void,
17417 ) -> cudaError_t;
17418}
17419extern "C" {
17420 #[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 stream\n is the stream in which the operation is enqueued. The memory range must refer\n to managed memory allocated via ::cudaMallocManaged or declared via __managed__ variables,\n or it may also refer to system-allocated memory on systems with non-zero\n cudaDevAttrPageableMemoryAccess.\n\n Passing in cudaCpuDeviceId for \\p dstDevice will prefetch the data to host memory. If\n \\p dstDevice is a GPU, then the device attribute ::cudaDevAttrConcurrentManagedAccess\n must be non-zero. Additionally, \\p stream must be associated with a device that has a\n non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess.\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 ::cudaMallocManaged allocations to host memory in order to make room. Device memory\n allocated using ::cudaMalloc or ::cudaMallocArray 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 ::cudaMemAdvise as described\n below:\n\n If ::cudaMemAdviseSetReadMostly 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 ::cudaMemAdviseSetPreferredLocation 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 ::cudaMemAdviseSetAccessedBy 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 stream - Stream to enqueue prefetch operation\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync,\n ::cudaMemcpy3DPeerAsync, ::cudaMemAdvise, ::cudaMemAdvise_v2\n ::cuMemPrefetchAsync"]
17421 pub fn cudaMemPrefetchAsync(
17422 devPtr: *const ::std::os::raw::c_void,
17423 count: usize,
17424 dstDevice: ::std::os::raw::c_int,
17425 stream: cudaStream_t,
17426 ) -> cudaError_t;
17427}
17428extern "C" {
17429 #[doc = " \\brief Prefetches memory to the specified destination location\n\n Prefetches memory to the specified destination location. \\p devPtr is the\n base device pointer of the memory to be prefetched and \\p location specifies the\n destination location. \\p count specifies the number of bytes to copy. \\p stream\n is the stream in which the operation is enqueued. The memory range must refer\n to managed memory allocated via ::cudaMallocManaged or declared via __managed__ variables,\n or it may also refer to system-allocated memory on systems with non-zero\n cudaDevAttrPageableMemoryAccess.\n\n Specifying ::cudaMemLocationTypeDevice for ::cudaMemLocation::type will prefetch memory to GPU\n specified by device ordinal ::cudaMemLocation::id which must have non-zero value for the device attribute\n ::concurrentManagedAccess. Additionally, \\p stream must be associated with a device\n that has a non-zero value for the device attribute ::concurrentManagedAccess.\n Specifying ::cudaMemLocationTypeHost as ::cudaMemLocation::type will prefetch data to host memory.\n Applications can request prefetching memory to a specific host NUMA node by specifying\n ::cudaMemLocationTypeHostNuma for ::cudaMemLocation::type and a valid host NUMA node id in ::cudaMemLocation::id\n Users can also request prefetching memory to the host NUMA node closest to the current thread's CPU by specifying\n ::cudaMemLocationTypeHostNumaCurrent for ::cudaMemLocation::type. Note when ::cudaMemLocation::type is etiher\n ::cudaMemLocationTypeHost OR ::cudaMemLocationTypeHostNumaCurrent, ::cudaMemLocation::id will be ignored.\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 ::cudaMallocManaged allocations to host memory in order to make room. Device memory\n allocated using ::cudaMalloc or ::cudaMallocArray 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 the destination location. The exact behavior however\n also depends on the settings applied to this memory range via ::cuMemAdvise as described\n below:\n\n If ::cudaMemAdviseSetReadMostly was set on any subset of this memory range,\n then that subset will create a read-only copy of the pages on destination location.\n If however the destination location is a host NUMA node, then any pages of that subset\n that are already in another host NUMA node will be transferred to the destination.\n\n If ::cudaMemAdviseSetPreferredLocation was called on any subset of this memory\n range, then the pages will be migrated to \\p location even if \\p location is not the\n preferred location of any pages in the memory range.\n\n If ::cudaMemAdviseSetAccessedBy 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 location - location to prefetch to\n \\param flags - flags for future use, must be zero now.\n \\param stream - Stream to enqueue prefetch operation\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync,\n ::cudaMemcpy3DPeerAsync, ::cudaMemAdvise, ::cudaMemAdvise_v2\n ::cuMemPrefetchAsync"]
17430 pub fn cudaMemPrefetchAsync_v2(
17431 devPtr: *const ::std::os::raw::c_void,
17432 count: usize,
17433 location: cudaMemLocation,
17434 flags: ::std::os::raw::c_uint,
17435 stream: cudaStream_t,
17436 ) -> cudaError_t;
17437}
17438extern "C" {
17439 #[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 ::cudaMallocManaged\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 - ::cudaMemAdviseSetReadMostly: 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 ::cudaMemPrefetchAsync\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 ::cudaDevAttrConcurrentManagedAccess.\n Also, if a context is created on a device that does not have the device attribute\n ::cudaDevAttrConcurrentManagedAccess 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 ::cudaDevAttrPageableMemoryAccess 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 ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, then setting this advice\n will not create a read-only copy when that device accesses this memory region.\n\n - ::cudaMemAdviceUnsetReadMostly: Undoes the effect of ::cudaMemAdviceReadMostly 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 - ::cudaMemAdviseSetPreferredLocation: This advice sets the preferred location for the\n data to be the memory belonging to \\p device. Passing in cudaCpuDeviceId 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 ::cudaDevAttrConcurrentManagedAccess. 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 ::cudaMemPrefetchAsync.\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 ::cudaMemAdviseSetReadMostly 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 ::cudaMemAdviseSetReadMostly.\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 ::cudaDevAttrPageableMemoryAccess.\n\n - ::cudaMemAdviseUnsetPreferredLocation: Undoes the effect of ::cudaMemAdviseSetPreferredLocation\n and changes the preferred location to none.\n\n - ::cudaMemAdviseSetAccessedBy: This advice implies that the data will be accessed by \\p device.\n Passing in ::cudaCpuDeviceId for \\p device will set the advice for the CPU. If \\p device is a GPU, then\n the device attribute ::cudaDevAttrConcurrentManagedAccess 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 ::cudaMemAdviceSetAccessedBy flag set for this data will now have its mapping updated to point to the\n page in host memory.\n If ::cudaMemAdviseSetReadMostly 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 ::cudaMemAdviseSetPreferredLocation 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 ::cudaDevAttrPageableMemoryAccess. Additionally, if \\p device has\n a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables,\n then this call has no effect.\n\n - ::cudaMemAdviseUnsetAccessedBy: Undoes the effect of ::cudaMemAdviseSetAccessedBy. 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 ::cudaDevAttrPageableMemoryAccess. Additionally, if \\p device has\n a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables,\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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync,\n ::cudaMemcpy3DPeerAsync, ::cudaMemPrefetchAsync,\n ::cuMemAdvise"]
17440 pub fn cudaMemAdvise(
17441 devPtr: *const ::std::os::raw::c_void,
17442 count: usize,
17443 advice: cudaMemoryAdvise,
17444 device: ::std::os::raw::c_int,
17445 ) -> cudaError_t;
17446}
17447extern "C" {
17448 #[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 ::cudaMallocManaged\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 - ::cudaMemAdviseSetReadMostly: 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 ::cudaMemPrefetchAsync\n or ::cudaMemPrefetchAsync_v2 is called on this region, it will create a read-only copy of the data on the destination processor.\n If the target location for ::cudaMemPrefetchAsync_v2 is a host NUMA node and a read-only copy already exists on\n another host NUMA node, that copy will be migrated to the targeted host NUMA node.\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. If the writing processor is the CPU and the preferred location of\n the page is a host NUMA node, then the page will also be migrated to that host NUMA node. The \\p location 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 ::cudaDevAttrConcurrentManagedAccess.\n Also, if a context is created on a device that does not have the device attribute\n ::cudaDevAttrConcurrentManagedAccess 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 ::cudaDevAttrPageableMemoryAccess 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 ::cudaDevAttrPageableMemoryAccessUsesHostPageTables, then setting this advice\n will not create a read-only copy when that device accesses this memory region.\n\n - ::cudaMemAdviceUnsetReadMostly: Undoes the effect of ::cudaMemAdviseSetReadMostly 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 Note: The \\p location argument is ignored for this advice.\n\n - ::cudaMemAdviseSetPreferredLocation: This advice sets the preferred location for the\n data to be the memory belonging to \\p location. When ::cudaMemLocation::type is ::cudaMemLocationTypeHost,\n ::cudaMemLocation::id is ignored and the preferred location is set to be host memory. To set the preferred location\n to a specific host NUMA node, applications must set ::cudaMemLocation::type to ::cudaMemLocationTypeHostNuma and\n ::cudaMemLocation::id must specify the NUMA ID of the host NUMA node. If ::cudaMemLocation::type is set to ::cudaMemLocationTypeHostNumaCurrent,\n ::cudaMemLocation::id will be ignored and the host NUMA node closest to the calling thread's CPU will be used as the preferred location.\n If ::cudaMemLocation::type is a ::cudaMemLocationTypeDevice, then ::cudaMemLocation::id must be a valid device ordinal\n and the device must have a non-zero value for the device attribute ::cudaDevAttrConcurrentManagedAccess.\n Setting the preferred location 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 ::cudaMemPrefetchAsync.\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 ::cudaMemAdviseSetReadMostly 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 location will not result in a read-only copy being created on that procesor as outlined in description for\n the advice ::cudaMemAdviseSetReadMostly.\n If the memory region refers to valid system-allocated pageable memory, and ::cudaMemLocation::type is ::cudaMemLocationTypeDevice\n then ::cudaMemLocation::id must be a valid device that has a non-zero alue for the device attribute ::cudaDevAttrPageableMemoryAccess.\n\n - ::cudaMemAdviseUnsetPreferredLocation: Undoes the effect of ::cudaMemAdviseSetPreferredLocation\n and changes the preferred location to none. The \\p location argument is ignored for this advice.\n\n - ::cudaMemAdviseSetAccessedBy: This advice implies that the data will be accessed by processor \\p location.\n The ::cudaMemLocation::type must be either ::cudaMemLocationTypeDevice with ::cudaMemLocation::id representing a valid device\n ordinal or ::cudaMemLocationTypeHost and ::cudaMemLocation::id will be ignored. All other location types are invalid.\n If ::cudaMemLocation::id is a GPU, then the device attribute ::cudaDevAttrConcurrentManagedAccess 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 ::cudaMemAdviseSetAccessedBy flag set for this data will now have its mapping updated to point to the\n page in host memory.\n If ::cudaMemAdviseSetReadMostly 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 location, 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, and ::cudaMemLocation::type is ::cudaMemLocationTypeDevice\n then device in ::cudaMemLocation::id must have a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccess.\n Additionally, if ::cudaMemLocation::id has a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables,\n then this call has no effect.\n\n - ::CU_MEM_ADVISE_UNSET_ACCESSED_BY: Undoes the effect of ::cudaMemAdviseSetAccessedBy. Any mappings to\n the data from \\p location 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, and ::cudaMemLocation::type is ::cudaMemLocationTypeDevice\n then device in ::cudaMemLocation::id must have a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccess.\n Additionally, if ::cudaMemLocation::id has a non-zero value for the device attribute ::cudaDevAttrPageableMemoryAccessUsesHostPageTables,\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 location - location to apply the advice for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpyPeer, ::cudaMemcpyAsync,\n ::cudaMemcpy3DPeerAsync, ::cudaMemPrefetchAsync,\n ::cuMemAdvise, ::cuMemAdvise_v2"]
17449 pub fn cudaMemAdvise_v2(
17450 devPtr: *const ::std::os::raw::c_void,
17451 count: usize,
17452 advice: cudaMemoryAdvise,
17453 location: cudaMemLocation,
17454 ) -> cudaError_t;
17455}
17456extern "C" {
17457 #[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 ::cudaMallocManaged or declared via\n __managed__ variables.\n\n The \\p attribute parameter can take the following values:\n - ::cudaMemRangeAttributeReadMostly: 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 - ::cudaMemRangeAttributePreferredLocation: 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 cudaCpuDeviceId\n if all pages in the memory range have the CPU as their preferred location, or it will be cudaInvalidDeviceId\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 - ::cudaMemRangeAttributeAccessedBy: 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 ::cudaMemAdviceSetAccessedBy 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 cudaInvalidDeviceId 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, cudaInvalidDeviceId, cudaInvalidDeviceId }. 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 - ::cudaMemRangeAttributeLastPrefetchLocation: 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 ::cudaMemPrefetchAsync. This will either be\n a GPU id or cudaCpuDeviceId 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, cudaInvalidDeviceId 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 - ::cudaMemRangeAttributePreferredLocationType: If this attribute is specified, \\p data will be\n interpreted as a ::cudaMemLocationType, and \\p dataSize must be sizeof(cudaMemLocationType). The ::cudaMemLocationType returned will be\n ::cudaMemLocationTypeDevice if all pages in the memory range have the same GPU as their preferred location, or ::cudaMemLocationType\n will be ::cudaMemLocationTypeHost if all pages in the memory range have the CPU as their preferred location, or or it will be ::cudaMemLocationTypeHostNuma\n if all the pages in the memory range have the same host NUMA node ID as their preferred location or it will be ::cudaMemLocationTypeInvalid\n if either all the pages don't have the same preferred location or some of the pages don't have a preferred location at all.\n Note that the actual location type of the pages in the memory range at the time of the query may be different from the preferred location type.\n - ::cudaMemRangeAttributePreferredLocationId: If this attribute is specified, \\p data will be\n interpreted as a 32-bit integer, and \\p dataSize must be 4. If the ::cudaMemRangeAttributePreferredLocationType query for the same address range\n returns ::cudaMemLocationTypeDevice, it will be a valid device ordinal or if it returns ::cudaMemLocationTypeHostNuma, it will be a valid host NUMA node ID\n or if it returns any other location type, the id should be ignored.\n - ::cudaMemRangeAttributeLastPrefetchLocationType: If this attribute is specified, \\p data will be\n interpreted as a ::cudaMemLocationType, and \\p dataSize must be sizeof(cudaMemLocationType). The result returned will be the last location type\n to which all pages in the memory range were prefetched explicitly via ::cuMemPrefetchAsync. The ::cudaMemLocationType returned\n will be ::cudaMemLocationTypeDevice if the last prefetch location was the GPU or ::cudaMemLocationTypeHost if it was the CPU or ::cudaMemLocationTypeHostNuma if\n the last prefetch location was a specific host NUMA node. If any page in the memory range was never explicitly prefetched or if all pages were not\n prefetched to the same location, ::CUmemLocationType will be ::cudaMemLocationTypeInvalid.\n Note that this simply returns the last location type that the application 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 - ::cudaMemRangeAttributeLastPrefetchLocationId: If this attribute is specified, \\p data will be\n interpreted as a 32-bit integer, and \\p dataSize must be 4. If the ::cudaMemRangeAttributeLastPrefetchLocationType query for the same address range\n returns ::cudaMemLocationTypeDevice, it will be a valid device ordinal or if it returns ::cudaMemLocationTypeHostNuma, it will be a valid host NUMA node ID\n or if it returns any other location type, the id should be ignored.\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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemRangeGetAttributes, ::cudaMemPrefetchAsync,\n ::cudaMemAdvise,\n ::cuMemRangeGetAttribute"]
17458 pub fn cudaMemRangeGetAttribute(
17459 data: *mut ::std::os::raw::c_void,
17460 dataSize: usize,
17461 attribute: cudaMemRangeAttribute,
17462 devPtr: *const ::std::os::raw::c_void,
17463 count: usize,
17464 ) -> cudaError_t;
17465}
17466extern "C" {
17467 #[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 ::cudaMallocManaged 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 ::cudaMemRangeGetAttribute for\n attribute descriptions and restrictions.\n\n - ::cudaMemRangeAttributeReadMostly\n - ::cudaMemRangeAttributePreferredLocation\n - ::cudaMemRangeAttributeAccessedBy\n - ::cudaMemRangeAttributeLastPrefetchLocation\n - :: cudaMemRangeAttributePreferredLocationType\n - :: cudaMemRangeAttributePreferredLocationId\n - :: cudaMemRangeAttributeLastPrefetchLocationType\n - :: cudaMemRangeAttributeLastPrefetchLocationId\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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemRangeGetAttribute, ::cudaMemAdvise,\n ::cudaMemPrefetchAsync,\n ::cuMemRangeGetAttributes"]
17468 pub fn cudaMemRangeGetAttributes(
17469 data: *mut *mut ::std::os::raw::c_void,
17470 dataSizes: *mut usize,
17471 attributes: *mut cudaMemRangeAttribute,
17472 numAttributes: usize,
17473 devPtr: *const ::std::os::raw::c_void,
17474 count: usize,
17475 ) -> cudaError_t;
17476}
17477extern "C" {
17478 #[doc = " \\brief Copies data between host and device\n\n \\deprecated\n\n Copies \\p count bytes from the memory area pointed to by \\p src to the\n CUDA array \\p dst starting at \\p hOffset rows and \\p wOffset bytes from\n the upper left corner, where \\p kind specifies the direction\n of the copy, and must be one of ::cudaMemcpyHostToHost,\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n \\param dst - Destination memory address\n \\param wOffset - Destination starting X offset (columns in bytes)\n \\param hOffset - Destination starting Y offset (rows)\n \\param src - Source memory address\n \\param count - Size in bytes to copy\n \\param kind - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D,\n ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyHtoA,\n ::cuMemcpyDtoA"]
17479 pub fn cudaMemcpyToArray(
17480 dst: cudaArray_t,
17481 wOffset: usize,
17482 hOffset: usize,
17483 src: *const ::std::os::raw::c_void,
17484 count: usize,
17485 kind: cudaMemcpyKind,
17486 ) -> cudaError_t;
17487}
17488extern "C" {
17489 #[doc = " \\brief Copies data between host and device\n\n \\deprecated\n\n Copies \\p count bytes from the CUDA array \\p src starting at \\p hOffset rows\n and \\p wOffset bytes from the upper left corner to the memory area pointed to\n by \\p dst, where \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n \\param dst - Destination memory address\n \\param src - Source memory address\n \\param wOffset - Source starting X offset (columns in bytes)\n \\param hOffset - Source starting Y offset (rows)\n \\param count - Size in bytes to copy\n \\param kind - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_sync\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,\n ::cudaMemcpy2DToArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyAtoH,\n ::cuMemcpyAtoD"]
17490 pub fn cudaMemcpyFromArray(
17491 dst: *mut ::std::os::raw::c_void,
17492 src: cudaArray_const_t,
17493 wOffset: usize,
17494 hOffset: usize,
17495 count: usize,
17496 kind: cudaMemcpyKind,
17497 ) -> cudaError_t;
17498}
17499extern "C" {
17500 #[doc = " \\brief Copies data between host and device\n\n \\deprecated\n\n Copies \\p count bytes from the CUDA array \\p src starting at \\p hOffsetSrc\n rows and \\p wOffsetSrc bytes from the upper left corner to the CUDA array\n \\p dst starting at \\p hOffsetDst rows and \\p wOffsetDst bytes from the upper\n left corner, where \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n \\param dst - Destination memory address\n \\param wOffsetDst - Destination starting X offset (columns in bytes)\n \\param hOffsetDst - Destination starting Y offset (rows)\n \\param src - Source memory address\n \\param wOffsetSrc - Source starting X offset (columns in bytes)\n \\param hOffsetSrc - Source starting Y offset (rows)\n \\param count - Size in bytes to copy\n \\param kind - Type of transfer\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,\n ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyAtoA"]
17501 pub fn cudaMemcpyArrayToArray(
17502 dst: cudaArray_t,
17503 wOffsetDst: usize,
17504 hOffsetDst: usize,
17505 src: cudaArray_const_t,
17506 wOffsetSrc: usize,
17507 hOffsetSrc: usize,
17508 count: usize,
17509 kind: cudaMemcpyKind,
17510 ) -> cudaError_t;
17511}
17512extern "C" {
17513 #[doc = " \\brief Copies data between host and device\n\n \\deprecated\n\n Copies \\p count bytes from the memory area pointed to by \\p src to the\n CUDA array \\p dst starting at \\p hOffset rows and \\p wOffset bytes from\n the upper left corner, where \\p kind specifies the\n direction of the copy, and must be one of ::cudaMemcpyHostToHost,\n ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n ::cudaMemcpyToArrayAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If \\p\n kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream\n is non-zero, the copy may overlap with operations in other streams.\n\n \\param dst - Destination memory address\n \\param wOffset - Destination starting X offset (columns in bytes)\n \\param hOffset - Destination starting Y offset (rows)\n \\param src - Source memory address\n \\param count - Size in bytes to copy\n \\param kind - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,\n ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpyFromArrayAsync, ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyHtoAAsync,\n ::cuMemcpy2DAsync"]
17514 pub fn cudaMemcpyToArrayAsync(
17515 dst: cudaArray_t,
17516 wOffset: usize,
17517 hOffset: usize,
17518 src: *const ::std::os::raw::c_void,
17519 count: usize,
17520 kind: cudaMemcpyKind,
17521 stream: cudaStream_t,
17522 ) -> cudaError_t;
17523}
17524extern "C" {
17525 #[doc = " \\brief Copies data between host and device\n\n \\deprecated\n\n Copies \\p count bytes from the CUDA array \\p src starting at \\p hOffset rows\n and \\p wOffset bytes from the upper left corner to the memory area pointed to\n by \\p dst, where \\p kind specifies the direction of the copy, and must be one of\n ::cudaMemcpyHostToHost, ::cudaMemcpyHostToDevice, ::cudaMemcpyDeviceToHost,\n ::cudaMemcpyDeviceToDevice, or ::cudaMemcpyDefault. Passing\n ::cudaMemcpyDefault is recommended, in which case the type of transfer is\n inferred from the pointer values. However, ::cudaMemcpyDefault is only\n allowed on systems that support unified virtual addressing.\n\n ::cudaMemcpyFromArrayAsync() is asynchronous with respect to the host, so\n the call may return before the copy is complete. The copy can optionally\n be associated to a stream by passing a non-zero \\p stream argument. If \\p\n kind is ::cudaMemcpyHostToDevice or ::cudaMemcpyDeviceToHost and \\p stream\n is non-zero, the copy may overlap with operations in other streams.\n\n \\param dst - Destination memory address\n \\param src - Source memory address\n \\param wOffset - Source starting X offset (columns in bytes)\n \\param hOffset - Source starting Y offset (rows)\n \\param count - Size in bytes to copy\n \\param kind - Type of transfer\n \\param stream - Stream identifier\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidMemcpyDirection\n \\notefnerr\n \\note_async\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaMemcpy, ::cudaMemcpy2D, ::cudaMemcpyToArray,\n ::cudaMemcpy2DToArray, ::cudaMemcpyFromArray, ::cudaMemcpy2DFromArray,\n ::cudaMemcpyArrayToArray, ::cudaMemcpy2DArrayToArray, ::cudaMemcpyToSymbol,\n ::cudaMemcpyFromSymbol, ::cudaMemcpyAsync, ::cudaMemcpy2DAsync,\n ::cudaMemcpyToArrayAsync, ::cudaMemcpy2DToArrayAsync,\n ::cudaMemcpy2DFromArrayAsync,\n ::cudaMemcpyToSymbolAsync, ::cudaMemcpyFromSymbolAsync,\n ::cuMemcpyAtoHAsync,\n ::cuMemcpy2DAsync"]
17526 pub fn cudaMemcpyFromArrayAsync(
17527 dst: *mut ::std::os::raw::c_void,
17528 src: cudaArray_const_t,
17529 wOffset: usize,
17530 hOffset: usize,
17531 count: usize,
17532 kind: cudaMemcpyKind,
17533 stream: cudaStream_t,
17534 ) -> cudaError_t;
17535}
17536extern "C" {
17537 #[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 associated with 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] devPtr - Returned device pointer\n \\param[in] size - Number of bytes to allocate\n \\param[in] hStream - The stream establishing the stream ordering contract and the memory pool to allocate from\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported,\n ::cudaErrorOutOfMemory,\n \\notefnerr\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cuMemAllocAsync,\n \\ref ::cudaMallocAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) \"cudaMallocAsync (C++ API)\",\n ::cudaMallocFromPoolAsync, ::cudaFreeAsync, ::cudaDeviceSetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolSetAccess, ::cudaMemPoolSetAttribute, ::cudaMemPoolGetAttribute"]
17538 pub fn cudaMallocAsync(
17539 devPtr: *mut *mut ::std::os::raw::c_void,
17540 size: usize,
17541 hStream: cudaStream_t,
17542 ) -> cudaError_t;
17543}
17544extern "C" {
17545 #[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 promise\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported\n \\notefnerr\n \\note_null_stream\n \\note_init_rt\n \\note_callback\n\n \\sa ::cuMemFreeAsync, ::cudaMallocAsync"]
17546 pub fn cudaFreeAsync(devPtr: *mut ::std::os::raw::c_void, hStream: cudaStream_t)
17547 -> cudaError_t;
17548}
17549extern "C" {
17550 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_callback\n\n \\sa ::cuMemPoolTrimTo, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate"]
17551 pub fn cudaMemPoolTrimTo(memPool: cudaMemPool_t, minBytesToKeep: usize) -> cudaError_t;
17552}
17553extern "C" {
17554 #[doc = " \\brief Sets attributes of a memory pool\n\n Supported attributes are:\n - ::cudaMemPoolAttrReleaseThreshold: (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 - ::cudaMemPoolReuseFollowEventDependencies: (value type = int)\n Allow ::cudaMallocAsync 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 - ::cudaMemPoolReuseAllowOpportunistic: (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)\n - ::cudaMemPoolReuseAllowInternalDependencies: (value type = int)\n Allow ::cudaMallocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by ::cudaFreeAsync (default enabled).\n - ::cudaMemPoolAttrReservedMemHigh: (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 - ::cudaMemPoolAttrUsedMemHigh: (value type = cuuint64_t)\n Reset the high watermark that tracks the amount of used memory that was\n allocated for the memory pool. It is illegal to set this attribute to a non-zero value.\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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_callback\n\n \\sa ::cuMemPoolSetAttribute, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate\n"]
17555 pub fn cudaMemPoolSetAttribute(
17556 memPool: cudaMemPool_t,
17557 attr: cudaMemPoolAttr,
17558 value: *mut ::std::os::raw::c_void,
17559 ) -> cudaError_t;
17560}
17561extern "C" {
17562 #[doc = " \\brief Gets attributes of a memory pool\n\n Supported attributes are:\n - ::cudaMemPoolAttrReleaseThreshold: (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 - ::cudaMemPoolReuseFollowEventDependencies: (value type = int)\n Allow ::cudaMallocAsync 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 - ::cudaMemPoolReuseAllowOpportunistic: (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)\n - ::cudaMemPoolReuseAllowInternalDependencies: (value type = int)\n Allow ::cudaMallocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by ::cudaFreeAsync (default enabled).\n - ::cudaMemPoolAttrReservedMemCurrent: (value type = cuuint64_t)\n Amount of backing memory currently allocated for the mempool.\n - ::cudaMemPoolAttrReservedMemHigh: (value type = cuuint64_t)\n High watermark of backing memory allocated for the mempool since\n the last time it was reset.\n - ::cudaMemPoolAttrUsedMemCurrent: (value type = cuuint64_t)\n Amount of memory from the pool that is currently in use by the application.\n - ::cudaMemPoolAttrUsedMemHigh: (value type = cuuint64_t)\n High watermark of the amount of memory from the pool that was in use by the\n application since the last time it was reset.\n\n \\param[in] pool - The memory pool to get attributes of\n \\param[in] attr - The attribute to get\n \\param[in] value - Retrieved value\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_callback\n\n \\sa ::cuMemPoolGetAttribute, ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate\n"]
17563 pub fn cudaMemPoolGetAttribute(
17564 memPool: cudaMemPool_t,
17565 attr: cudaMemPoolAttr,
17566 value: *mut ::std::os::raw::c_void,
17567 ) -> cudaError_t;
17568}
17569extern "C" {
17570 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa ::cuMemPoolSetAccess, ::cudaMemPoolGetAccess, ::cudaMallocAsync, cudaFreeAsync"]
17571 pub fn cudaMemPoolSetAccess(
17572 memPool: cudaMemPool_t,
17573 descList: *const cudaMemAccessDesc,
17574 count: usize,
17575 ) -> cudaError_t;
17576}
17577extern "C" {
17578 #[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 ::cuMemPoolGetAccess, ::cudaMemPoolSetAccess"]
17579 pub fn cudaMemPoolGetAccess(
17580 flags: *mut cudaMemAccessFlags,
17581 memPool: cudaMemPool_t,
17582 location: *mut cudaMemLocation,
17583 ) -> cudaError_t;
17584}
17585extern "C" {
17586 #[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 To create a memory pool targeting a specific host NUMA node, applications must\n set ::cudaMemPoolProps::cudaMemLocation::type to ::cudaMemLocationTypeHostNuma and\n ::cudaMemPoolProps::cudaMemLocation::id must specify the NUMA ID of the host memory node.\n Specifying ::cudaMemLocationTypeHostNumaCurrent or ::cudaMemLocationTypeHost as the\n ::cudaMemPoolProps::cudaMemLocation::type will result in ::cudaErrorInvalidValue.\n By default, the pool's memory will be accessible from the device it is allocated on.\n In the case of pools created with ::cudaMemLocationTypeHostNuma, their default accessibility\n will be from the host CPU.\n Applications can control the maximum size of the pool by specifying a non-zero value for ::cudaMemPoolProps::maxSize.\n If set to 0, the maximum size of the pool will default to a system dependent value.\n\n Applications can set ::cudaMemPoolProps::handleTypes to ::cudaMemHandleTypeFabric\n in order to create ::cudaMemPool_t suitable for sharing within an IMEX domain.\n An IMEX domain is either an OS instance or a group of securely connected OS instances\n using the NVIDIA IMEX daemon. An IMEX channel is a global resource within the IMEX domain\n that represents a logical entity that aims to provide fine grained accessibility control\n for the participating processes. When exporter and importer CUDA processes have been\n granted access to the same IMEX channel, they can securely share memory.\n If the allocating process does not have access setup for an IMEX channel, attempting to export\n a ::CUmemoryPool with ::cudaMemHandleTypeFabric will result in ::cudaErrorNotPermitted.\n The nvidia-modprobe CLI provides more information regarding setting up of IMEX channels.\n\n \\note Specifying cudaMemHandleTypeNone creates a memory pool that will not support IPC.\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported\n\n \\sa ::cuMemPoolCreate, ::cudaDeviceSetMemPool, ::cudaMallocFromPoolAsync, ::cudaMemPoolExportToShareableHandle, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool\n"]
17587 pub fn cudaMemPoolCreate(
17588 memPool: *mut cudaMemPool_t,
17589 poolProps: *const cudaMemPoolProps,
17590 ) -> cudaError_t;
17591}
17592extern "C" {
17593 #[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 ::cudaMemPoolDestroy 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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa cuMemPoolDestroy, ::cudaFreeAsync, ::cudaDeviceSetMemPool, ::cudaDeviceGetDefaultMemPool, ::cudaDeviceGetMemPool, ::cudaMemPoolCreate"]
17594 pub fn cudaMemPoolDestroy(memPool: cudaMemPool_t) -> cudaError_t;
17595}
17596extern "C" {
17597 #[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] ptr - Returned device pointer\n \\param[in] bytesize - Number of bytes to allocate\n \\param[in] memPool - The pool to allocate from\n \\param[in] stream - The stream establishing the stream ordering semantic\n\n \\returns\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorNotSupported,\n ::cudaErrorOutOfMemory\n\n \\sa ::cuMemAllocFromPoolAsync,\n \\ref ::cudaMallocAsync(void** ptr, size_t size, cudaMemPool_t memPool, cudaStream_t stream) \"cudaMallocAsync (C++ API)\",\n ::cudaMallocAsync, ::cudaFreeAsync, ::cudaDeviceGetDefaultMemPool, ::cudaMemPoolCreate, ::cudaMemPoolSetAccess, ::cudaMemPoolSetAttribute"]
17598 pub fn cudaMallocFromPoolAsync(
17599 ptr: *mut *mut ::std::os::raw::c_void,
17600 size: usize,
17601 memPool: cudaMemPool_t,
17602 stream: cudaStream_t,
17603 ) -> cudaError_t;
17604}
17605extern "C" {
17606 #[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 ::cudaMemPoolImportFromShareableHandle.\n Individual pointers can then be shared with the ::cudaMemPoolExportPointer and ::cudaMemPoolImportPointer 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 cudaMemHandleTypeNone.\n\n \\param[out] handle_out - pointer to the location in which to store the requested 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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorOutOfMemory\n\n \\sa ::cuMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolExportPointer, ::cudaMemPoolImportPointer"]
17607 pub fn cudaMemPoolExportToShareableHandle(
17608 shareableHandle: *mut ::std::os::raw::c_void,
17609 memPool: cudaMemPool_t,
17610 handleType: cudaMemAllocationHandleType,
17611 flags: ::std::os::raw::c_uint,
17612 ) -> cudaError_t;
17613}
17614extern "C" {
17615 #[doc = " \\brief imports a memory pool from a shared handle.\n\n Specific allocations can be imported from the imported pool with ::cudaMemPoolImportPointer.\n\n \\note Imported memory pools do not support creating new allocations.\n As such imported memory pools may not be used in ::cudaDeviceSetMemPool\n or ::cudaMallocFromPoolAsync 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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorOutOfMemory\n\n \\sa ::cuMemPoolImportFromShareableHandle, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolExportPointer, ::cudaMemPoolImportPointer"]
17616 pub fn cudaMemPoolImportFromShareableHandle(
17617 memPool: *mut cudaMemPool_t,
17618 shareableHandle: *mut ::std::os::raw::c_void,
17619 handleType: cudaMemAllocationHandleType,
17620 flags: ::std::os::raw::c_uint,
17621 ) -> cudaError_t;
17622}
17623extern "C" {
17624 #[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 ::cudaMemPoolImportPointer 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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorOutOfMemory\n\n \\sa ::cuMemPoolExportPointer, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolImportPointer"]
17625 pub fn cudaMemPoolExportPointer(
17626 exportData: *mut cudaMemPoolPtrExportData,
17627 ptr: *mut ::std::os::raw::c_void,
17628 ) -> cudaError_t;
17629}
17630extern "C" {
17631 #[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 cudaFree\n or cudaFreeAsync. If ::cudaFreeAsync is used, the free must be completed\n on the importing process before the free operation on the exporting process.\n\n \\note The ::cudaFreeAsync api may be used in the exporting process before\n the ::cudaFreeAsync operation completes in its stream as long as the\n ::cudaFreeAsync in the exporting process specifies a stream with\n a stream dependency on the importing process's ::cudaFreeAsync.\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 ::cuMemPoolImportPointer, ::cudaMemPoolExportToShareableHandle, ::cudaMemPoolImportFromShareableHandle, ::cudaMemPoolExportPointer"]
17632 pub fn cudaMemPoolImportPointer(
17633 ptr: *mut *mut ::std::os::raw::c_void,
17634 memPool: cudaMemPool_t,
17635 exportData: *mut cudaMemPoolPtrExportData,
17636 ) -> cudaError_t;
17637}
17638extern "C" {
17639 #[doc = " \\brief Returns attributes about a specified pointer\n\n Returns in \\p *attributes the attributes of the pointer \\p ptr.\n If pointer was not allocated in, mapped by or registered with context\n supporting unified addressing ::cudaErrorInvalidValue is returned.\n\n \\note In CUDA 11.0 forward passing host pointer will return ::cudaMemoryTypeUnregistered\n in ::cudaPointerAttributes::type and call will return ::cudaSuccess.\n\n The ::cudaPointerAttributes structure is defined as:\n \\code\nstruct cudaPointerAttributes {\nenum cudaMemoryType type;\nint device;\nvoid *devicePointer;\nvoid *hostPointer;\n}\n\\endcode\n In this structure, the individual fields mean\n\n - \\ref ::cudaPointerAttributes::type identifies type of memory. It can be\n ::cudaMemoryTypeUnregistered for unregistered host memory,\n ::cudaMemoryTypeHost for registered host memory, ::cudaMemoryTypeDevice for device\n memory or ::cudaMemoryTypeManaged for managed memory.\n\n - \\ref ::cudaPointerAttributes::device \"device\" is the device against which\n \\p ptr was allocated. If \\p ptr has memory type ::cudaMemoryTypeDevice\n then this identifies the device on which the memory referred to by \\p ptr\n physically resides. If \\p ptr has memory type ::cudaMemoryTypeHost then this\n identifies the device which was current when the allocation was made\n (and if that device is deinitialized then this allocation will vanish\n with that device's state).\n\n - \\ref ::cudaPointerAttributes::devicePointer \"devicePointer\" is\n the device pointer alias through which the memory referred to by \\p ptr\n may be accessed on the current device.\n If the memory referred to by \\p ptr cannot be accessed directly by the\n current device then this is NULL.\n\n - \\ref ::cudaPointerAttributes::hostPointer \"hostPointer\" is\n the host pointer alias through which the memory referred to by \\p ptr\n may be accessed on the host.\n If the memory referred to by \\p ptr cannot be accessed directly by the\n host then this is NULL.\n\n \\param attributes - Attributes for the specified pointer\n \\param ptr - Pointer to get attributes for\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaGetDeviceCount, ::cudaGetDevice, ::cudaSetDevice,\n ::cudaChooseDevice,\n ::cudaInitDevice,\n ::cuPointerGetAttributes"]
17640 pub fn cudaPointerGetAttributes(
17641 attributes: *mut cudaPointerAttributes,
17642 ptr: *const ::std::os::raw::c_void,
17643 ) -> cudaError_t;
17644}
17645extern "C" {
17646 #[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 device \\p device is capable of\n directly accessing memory from \\p peerDevice and 0 otherwise. If direct\n access of \\p peerDevice from \\p device is possible, then access may be\n enabled by calling ::cudaDeviceEnablePeerAccess().\n\n \\param canAccessPeer - Returned access capability\n \\param device - Device from which allocations on \\p peerDevice are to\n be directly accessed.\n \\param peerDevice - Device on which the allocations to be directly accessed\n by \\p device reside.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceEnablePeerAccess,\n ::cudaDeviceDisablePeerAccess,\n ::cuDeviceCanAccessPeer"]
17647 pub fn cudaDeviceCanAccessPeer(
17648 canAccessPeer: *mut ::std::os::raw::c_int,
17649 device: ::std::os::raw::c_int,
17650 peerDevice: ::std::os::raw::c_int,
17651 ) -> cudaError_t;
17652}
17653extern "C" {
17654 #[doc = " \\brief Enables direct access to memory allocations on a peer device.\n\n On success, all allocations from \\p peerDevice will immediately be accessible by\n the current device. They will remain accessible until access is explicitly\n disabled using ::cudaDeviceDisablePeerAccess() or either device is reset using\n ::cudaDeviceReset().\n\n Note that access granted by this call is unidirectional and that in order to access\n memory on the current device from \\p peerDevice, a separate symmetric call\n to ::cudaDeviceEnablePeerAccess() 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 ::cudaErrorInvalidDevice if ::cudaDeviceCanAccessPeer() indicates\n that the current device cannot directly access memory from \\p peerDevice.\n\n Returns ::cudaErrorPeerAccessAlreadyEnabled if direct access of\n \\p peerDevice from the current device has already been enabled.\n\n Returns ::cudaErrorInvalidValue if \\p flags is not 0.\n\n \\param peerDevice - Peer device to enable direct access to from the current device\n \\param flags - Reserved for future use and must be set to 0\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidDevice,\n ::cudaErrorPeerAccessAlreadyEnabled,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceCanAccessPeer,\n ::cudaDeviceDisablePeerAccess,\n ::cuCtxEnablePeerAccess"]
17655 pub fn cudaDeviceEnablePeerAccess(
17656 peerDevice: ::std::os::raw::c_int,
17657 flags: ::std::os::raw::c_uint,
17658 ) -> cudaError_t;
17659}
17660extern "C" {
17661 #[doc = " \\brief Disables direct access to memory allocations on a peer device.\n\n Returns ::cudaErrorPeerAccessNotEnabled if direct access to memory on\n \\p peerDevice has not yet been enabled from the current device.\n\n \\param peerDevice - Peer device to disable direct access to\n\n \\return\n ::cudaSuccess,\n ::cudaErrorPeerAccessNotEnabled,\n ::cudaErrorInvalidDevice\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa ::cudaDeviceCanAccessPeer,\n ::cudaDeviceEnablePeerAccess,\n ::cuCtxDisablePeerAccess"]
17662 pub fn cudaDeviceDisablePeerAccess(peerDevice: ::std::os::raw::c_int) -> cudaError_t;
17663}
17664extern "C" {
17665 #[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 ::cudaErrorInvalidResourceHandle is\n returned.\n\n \\param resource - Resource to unregister\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaGraphicsD3D9RegisterResource,\n ::cudaGraphicsD3D10RegisterResource,\n ::cudaGraphicsD3D11RegisterResource,\n ::cudaGraphicsGLRegisterBuffer,\n ::cudaGraphicsGLRegisterImage,\n ::cuGraphicsUnregisterResource"]
17666 pub fn cudaGraphicsUnregisterResource(resource: cudaGraphicsResource_t) -> cudaError_t;
17667}
17668extern "C" {
17669 #[doc = " \\brief Set usage flags for mapping a graphics resource\n\n Set \\p flags for mapping the graphics resource \\p resource.\n\n Changes to \\p flags will take effect the next time \\p resource is mapped.\n The \\p flags argument may be any of the following:\n - ::cudaGraphicsMapFlagsNone: Specifies no hints about how \\p resource will\n be used. It is therefore assumed that CUDA may read from or write to \\p resource.\n - ::cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will not write to \\p resource.\n - ::cudaGraphicsMapFlagsWriteDiscard: Specifies CUDA will not read from \\p resource and will\n write over the entire contents of \\p resource, so none of the data\n previously stored in \\p resource will be preserved.\n\n If \\p resource is presently mapped for access by CUDA then ::cudaErrorUnknown is returned.\n If \\p flags is not one of the above values then ::cudaErrorInvalidValue is returned.\n\n \\param resource - Registered resource to set flags for\n \\param flags - Parameters for resource mapping\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown,\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsMapResources,\n ::cuGraphicsResourceSetMapFlags"]
17670 pub fn cudaGraphicsResourceSetMapFlags(
17671 resource: cudaGraphicsResource_t,
17672 flags: ::std::os::raw::c_uint,
17673 ) -> cudaError_t;
17674}
17675extern "C" {
17676 #[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 ::cudaGraphicsMapResources() will complete before any subsequent CUDA\n work issued in \\p stream begins.\n\n If \\p resources contains any duplicate entries then ::cudaErrorInvalidResourceHandle\n is returned. If any of \\p resources are presently mapped for access by\n CUDA then ::cudaErrorUnknown is returned.\n\n \\param count - Number of resources to map\n \\param resources - Resources to map for CUDA\n \\param stream - Stream for synchronization\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsResourceGetMappedPointer,\n ::cudaGraphicsSubResourceGetMappedArray,\n ::cudaGraphicsUnmapResources,\n ::cuGraphicsMapResources"]
17677 pub fn cudaGraphicsMapResources(
17678 count: ::std::os::raw::c_int,
17679 resources: *mut cudaGraphicsResource_t,
17680 stream: cudaStream_t,
17681 ) -> cudaError_t;
17682}
17683extern "C" {
17684 #[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 ::cudaGraphicsUnmapResources() will complete before any\n subsequently issued graphics work begins.\n\n If \\p resources contains any duplicate entries then ::cudaErrorInvalidResourceHandle\n is returned. If any of \\p resources are not presently mapped for access by\n CUDA then ::cudaErrorUnknown is returned.\n\n \\param count - Number of resources to unmap\n \\param resources - Resources to unmap\n \\param stream - Stream for synchronization\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\note_null_stream\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsMapResources,\n ::cuGraphicsUnmapResources"]
17685 pub fn cudaGraphicsUnmapResources(
17686 count: ::std::os::raw::c_int,
17687 resources: *mut cudaGraphicsResource_t,
17688 stream: cudaStream_t,
17689 ) -> cudaError_t;
17690}
17691extern "C" {
17692 #[doc = " \\brief Get an device pointer through which to access a mapped graphics resource.\n\n Returns in \\p *devPtr a pointer through which the mapped graphics resource\n \\p resource may be accessed.\n Returns in \\p *size the size of the memory in bytes which may be accessed from that pointer.\n The value set in \\p devPtr may change every time that \\p resource is mapped.\n\n If \\p resource is not a buffer then it cannot be accessed via a pointer and\n ::cudaErrorUnknown is returned.\n If \\p resource is not mapped then ::cudaErrorUnknown is returned.\n *\n \\param devPtr - Returned pointer through which \\p resource may be accessed\n \\param size - Returned size of the buffer accessible starting at \\p *devPtr\n \\param resource - Mapped resource to access\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsMapResources,\n ::cudaGraphicsSubResourceGetMappedArray,\n ::cuGraphicsResourceGetMappedPointer"]
17693 pub fn cudaGraphicsResourceGetMappedPointer(
17694 devPtr: *mut *mut ::std::os::raw::c_void,
17695 size: *mut usize,
17696 resource: cudaGraphicsResource_t,
17697 ) -> cudaError_t;
17698}
17699extern "C" {
17700 #[doc = " \\brief Get an array through which to access a subresource of a mapped graphics resource.\n\n Returns in \\p *array 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 array 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 ::cudaErrorUnknown is returned.\n If \\p arrayIndex is not a valid array index for \\p resource then\n ::cudaErrorInvalidValue is returned.\n If \\p mipLevel is not a valid mipmap level for \\p resource then\n ::cudaErrorInvalidValue is returned.\n If \\p resource is not mapped then ::cudaErrorUnknown is returned.\n\n \\param array - 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 ::cudaGraphicsCubeFace for\n cubemap textures for the subresource to access\n \\param mipLevel - Mipmap level for the subresource to access\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsResourceGetMappedPointer,\n ::cuGraphicsSubResourceGetMappedArray"]
17701 pub fn cudaGraphicsSubResourceGetMappedArray(
17702 array: *mut cudaArray_t,
17703 resource: cudaGraphicsResource_t,
17704 arrayIndex: ::std::os::raw::c_uint,
17705 mipLevel: ::std::os::raw::c_uint,
17706 ) -> cudaError_t;
17707}
17708extern "C" {
17709 #[doc = " \\brief Get a mipmapped array through which to access a mapped graphics resource.\n\n Returns in \\p *mipmappedArray a mipmapped array through which the mapped\n graphics resource \\p resource may be accessed. The value set in \\p mipmappedArray 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 ::cudaErrorUnknown is returned.\n If \\p resource is not mapped then ::cudaErrorUnknown is returned.\n\n \\param mipmappedArray - Returned mipmapped array through which \\p resource may be accessed\n \\param resource - Mapped resource to access\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorUnknown\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphicsResourceGetMappedPointer,\n ::cuGraphicsResourceGetMappedMipmappedArray"]
17710 pub fn cudaGraphicsResourceGetMappedMipmappedArray(
17711 mipmappedArray: *mut cudaMipmappedArray_t,
17712 resource: cudaGraphicsResource_t,
17713 ) -> cudaError_t;
17714}
17715extern "C" {
17716 #[doc = " \\brief Get the channel descriptor of an array\n\n Returns in \\p *desc the channel descriptor of the CUDA array \\p array.\n\n \\param desc - Channel format\n \\param array - Memory array on device\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa \\ref ::cudaCreateChannelDesc(int, int, int, int, cudaChannelFormatKind) \"cudaCreateChannelDesc (C API)\",\n ::cudaCreateTextureObject, ::cudaCreateSurfaceObject"]
17717 pub fn cudaGetChannelDesc(
17718 desc: *mut cudaChannelFormatDesc,
17719 array: cudaArray_const_t,
17720 ) -> cudaError_t;
17721}
17722extern "C" {
17723 #[doc = " \\brief Returns a channel descriptor using the specified format\n\n Returns a channel descriptor with format \\p f and number of bits of each\n component \\p x, \\p y, \\p z, and \\p w. The ::cudaChannelFormatDesc is\n defined as:\n \\code\nstruct cudaChannelFormatDesc {\nint x, y, z, w;\nenum cudaChannelFormatKind f;\n};\n \\endcode\n\n where ::cudaChannelFormatKind is one of ::cudaChannelFormatKindSigned,\n ::cudaChannelFormatKindUnsigned, or ::cudaChannelFormatKindFloat.\n\n \\param x - X component\n \\param y - Y component\n \\param z - Z component\n \\param w - W component\n \\param f - Channel format\n\n \\return\n Channel descriptor with format \\p f\n\n \\sa \\ref ::cudaCreateChannelDesc(void) \"cudaCreateChannelDesc (C++ API)\",\n ::cudaGetChannelDesc, ::cudaCreateTextureObject, ::cudaCreateSurfaceObject"]
17724 pub fn cudaCreateChannelDesc(
17725 x: ::std::os::raw::c_int,
17726 y: ::std::os::raw::c_int,
17727 z: ::std::os::raw::c_int,
17728 w: ::std::os::raw::c_int,
17729 f: cudaChannelFormatKind,
17730 ) -> cudaChannelFormatDesc;
17731}
17732extern "C" {
17733 #[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 not in a block\n compressed format.\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 ::cudaResourceDesc structure is defined as:\n \\code\nstruct cudaResourceDesc {\nenum cudaResourceType resType;\n\nunion {\nstruct {\ncudaArray_t array;\n} array;\nstruct {\ncudaMipmappedArray_t mipmap;\n} mipmap;\nstruct {\nvoid *devPtr;\nstruct cudaChannelFormatDesc desc;\nsize_t sizeInBytes;\n} linear;\nstruct {\nvoid *devPtr;\nstruct cudaChannelFormatDesc desc;\nsize_t width;\nsize_t height;\nsize_t pitchInBytes;\n} pitch2D;\n} res;\n};\n \\endcode\n where:\n - ::cudaResourceDesc::resType specifies the type of resource to texture from.\n CUresourceType is defined as:\n \\code\nenum cudaResourceType {\ncudaResourceTypeArray = 0x00,\ncudaResourceTypeMipmappedArray = 0x01,\ncudaResourceTypeLinear = 0x02,\ncudaResourceTypePitch2D = 0x03\n};\n \\endcode\n\n \\par\n If ::cudaResourceDesc::resType is set to ::cudaResourceTypeArray, ::cudaResourceDesc::res::array::array\n must be set to a valid CUDA array handle.\n\n \\par\n If ::cudaResourceDesc::resType is set to ::cudaResourceTypeMipmappedArray, ::cudaResourceDesc::res::mipmap::mipmap\n must be set to a valid CUDA mipmapped array handle and ::cudaTextureDesc::normalizedCoords must be set to true.\n\n \\par\n If ::cudaResourceDesc::resType is set to ::cudaResourceTypeLinear, ::cudaResourceDesc::res::linear::devPtr\n must be set to a valid device pointer, that is aligned to ::cudaDeviceProp::textureAlignment.\n ::cudaResourceDesc::res::linear::desc describes the format and the number of components per array element. ::cudaResourceDesc::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 ::cudaDeviceProp::maxTexture1DLinear. The number of elements is computed as (sizeInBytes / sizeof(desc)).\n\n \\par\n If ::cudaResourceDesc::resType is set to ::cudaResourceTypePitch2D, ::cudaResourceDesc::res::pitch2D::devPtr\n must be set to a valid device pointer, that is aligned to ::cudaDeviceProp::textureAlignment.\n ::cudaResourceDesc::res::pitch2D::desc describes the format and the number of components per array element. ::cudaResourceDesc::res::pitch2D::width\n and ::cudaResourceDesc::res::pitch2D::height specify the width and height of the array in elements, and cannot exceed\n ::cudaDeviceProp::maxTexture2DLinear[0] and ::cudaDeviceProp::maxTexture2DLinear[1] respectively.\n ::cudaResourceDesc::res::pitch2D::pitchInBytes specifies the pitch between two rows in bytes and has to be aligned to\n ::cudaDeviceProp::texturePitchAlignment. Pitch cannot exceed ::cudaDeviceProp::maxTexture2DLinear[2].\n\n\n The ::cudaTextureDesc struct is defined as\n \\code\nstruct cudaTextureDesc {\nenum cudaTextureAddressMode addressMode[3];\nenum cudaTextureFilterMode filterMode;\nenum cudaTextureReadMode readMode;\nint sRGB;\nfloat borderColor[4];\nint normalizedCoords;\nunsigned int maxAnisotropy;\nenum cudaTextureFilterMode mipmapFilterMode;\nfloat mipmapLevelBias;\nfloat minMipmapLevelClamp;\nfloat maxMipmapLevelClamp;\nint disableTrilinearOptimization;\nint seamlessCubemap;\n};\n \\endcode\n where\n - ::cudaTextureDesc::addressMode specifies the addressing mode for each dimension of the texture data. ::cudaTextureAddressMode is defined as:\n \\code\nenum cudaTextureAddressMode {\ncudaAddressModeWrap = 0,\ncudaAddressModeClamp = 1,\ncudaAddressModeMirror = 2,\ncudaAddressModeBorder = 3\n};\n \\endcode\n This is ignored if ::cudaResourceDesc::resType is ::cudaResourceTypeLinear. Also, if ::cudaTextureDesc::normalizedCoords\n is set to zero, ::cudaAddressModeWrap and ::cudaAddressModeMirror won't be supported and will be switched to ::cudaAddressModeClamp.\n\n - ::cudaTextureDesc::filterMode specifies the filtering mode to be used when fetching from the texture. ::cudaTextureFilterMode is defined as:\n \\code\nenum cudaTextureFilterMode {\ncudaFilterModePoint = 0,\ncudaFilterModeLinear = 1\n};\n \\endcode\n This is ignored if ::cudaResourceDesc::resType is ::cudaResourceTypeLinear.\n\n - ::cudaTextureDesc::readMode specifies whether integer data should be converted to floating point or not. ::cudaTextureReadMode is defined as:\n \\code\nenum cudaTextureReadMode {\ncudaReadModeElementType = 0,\ncudaReadModeNormalizedFloat = 1\n};\n \\endcode\n Note that this applies only to 8-bit and 16-bit integer formats. 32-bit integer format would not be promoted, regardless of\n whether or not this ::cudaTextureDesc::readMode is set ::cudaReadModeNormalizedFloat is specified.\n\n - ::cudaTextureDesc::sRGB specifies whether sRGB to linear conversion should be performed during texture fetch.\n\n - ::cudaTextureDesc::borderColor specifies the float values of color. where:\n ::cudaTextureDesc::borderColor[0] contains value of 'R',\n ::cudaTextureDesc::borderColor[1] contains value of 'G',\n ::cudaTextureDesc::borderColor[2] contains value of 'B',\n ::cudaTextureDesc::borderColor[3] contains value of 'A'\n Note that application using integer border color values will need to <reinterpret_cast> these values to float.\n The values are set only when the addressing mode specified by ::cudaTextureDesc::addressMode is cudaAddressModeBorder.\n\n - ::cudaTextureDesc::normalizedCoords specifies whether the texture coordinates will be normalized or not.\n\n - ::cudaTextureDesc::maxAnisotropy specifies the maximum anistropy ratio to be used when doing anisotropic filtering. This value will be\n clamped to the range [1,16].\n\n - ::cudaTextureDesc::mipmapFilterMode specifies the filter mode when the calculated mipmap level lies between two defined mipmap levels.\n\n - ::cudaTextureDesc::mipmapLevelBias specifies the offset to be applied to the calculated mipmap level.\n\n - ::cudaTextureDesc::minMipmapLevelClamp specifies the lower end of the mipmap level range to clamp access to.\n\n - ::cudaTextureDesc::maxMipmapLevelClamp specifies the upper end of the mipmap level range to clamp access to.\n\n - ::cudaTextureDesc::disableTrilinearOptimization specifies whether the trilinear filtering optimizations will be disabled.\n\n - ::cudaTextureDesc::seamlessCubemap specifies whether seamless cube map filtering is enabled. This flag can only be specified if the\n underlying resource is a CUDA array or a CUDA mipmapped array that was created with the flag ::cudaArrayCubemap.\n When seamless cube map filtering is enabled, texture address modes specified by ::cudaTextureDesc::addressMode are ignored.\n Instead, if the ::cudaTextureDesc::filterMode is set to ::cudaFilterModePoint the address mode ::cudaAddressModeClamp will be applied for all dimensions.\n If the ::cudaTextureDesc::filterMode is set to ::cudaFilterModeLinear seamless cube map filtering will be performed when sampling along the cube face borders.\n\n The ::cudaResourceViewDesc struct is defined as\n \\code\nstruct cudaResourceViewDesc {\nenum cudaResourceViewFormat format;\nsize_t width;\nsize_t height;\nsize_t depth;\nunsigned int firstMipmapLevel;\nunsigned int lastMipmapLevel;\nunsigned int firstLayer;\nunsigned int lastLayer;\n};\n \\endcode\n where:\n - ::cudaResourceViewDesc::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 32-bit unsigned integer format\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 32-bit unsigned int with 2 channels. The other BC formats require the underlying resource to have the same 32-bit unsigned int\n format but with 4 channels.\n\n - ::cudaResourceViewDesc::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 - ::cudaResourceViewDesc::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 - ::cudaResourceViewDesc::depth specifies the new depth of the texture data. This value has to be equal to that of the\n original resource.\n\n - ::cudaResourceViewDesc::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.::cudaTextureDesc::minMipmapLevelClamp and ::cudaTextureDesc::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 - ::cudaResourceViewDesc::lastMipmapLevel specifies the least detailed mipmap level. For non-mipmapped resources, this value\n has to be zero.\n\n - ::cudaResourceViewDesc::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 - ::cudaResourceViewDesc::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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDestroyTextureObject,\n ::cuTexObjectCreate"]
17734 pub fn cudaCreateTextureObject(
17735 pTexObject: *mut cudaTextureObject_t,
17736 pResDesc: *const cudaResourceDesc,
17737 pTexDesc: *const cudaTextureDesc,
17738 pResViewDesc: *const cudaResourceViewDesc,
17739 ) -> cudaError_t;
17740}
17741extern "C" {
17742 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaCreateTextureObject,\n ::cuTexObjectDestroy"]
17743 pub fn cudaDestroyTextureObject(texObject: cudaTextureObject_t) -> cudaError_t;
17744}
17745extern "C" {
17746 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaCreateTextureObject,\n ::cuTexObjectGetResourceDesc"]
17747 pub fn cudaGetTextureObjectResourceDesc(
17748 pResDesc: *mut cudaResourceDesc,
17749 texObject: cudaTextureObject_t,
17750 ) -> cudaError_t;
17751}
17752extern "C" {
17753 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaCreateTextureObject,\n ::cuTexObjectGetTextureDesc"]
17754 pub fn cudaGetTextureObjectTextureDesc(
17755 pTexDesc: *mut cudaTextureDesc,
17756 texObject: cudaTextureObject_t,
17757 ) -> cudaError_t;
17758}
17759extern "C" {
17760 #[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 specified, ::cudaErrorInvalidValue is returned.\n\n \\param pResViewDesc - Resource view descriptor\n \\param texObject - Texture object\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaCreateTextureObject,\n ::cuTexObjectGetResourceViewDesc"]
17761 pub fn cudaGetTextureObjectResourceViewDesc(
17762 pResViewDesc: *mut cudaResourceViewDesc,
17763 texObject: cudaTextureObject_t,
17764 ) -> cudaError_t;
17765}
17766extern "C" {
17767 #[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. ::cudaResourceDesc::resType must be\n ::cudaResourceTypeArray and ::cudaResourceDesc::res::array::array\n must be set to a valid CUDA array handle.\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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidChannelDescriptor,\n ::cudaErrorInvalidResourceHandle\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDestroySurfaceObject,\n ::cuSurfObjectCreate"]
17768 pub fn cudaCreateSurfaceObject(
17769 pSurfObject: *mut cudaSurfaceObject_t,
17770 pResDesc: *const cudaResourceDesc,
17771 ) -> cudaError_t;
17772}
17773extern "C" {
17774 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaCreateSurfaceObject,\n ::cuSurfObjectDestroy"]
17775 pub fn cudaDestroySurfaceObject(surfObject: cudaSurfaceObject_t) -> cudaError_t;
17776}
17777extern "C" {
17778 #[doc = " \\brief Returns a surface object's resource descriptor\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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaCreateSurfaceObject,\n ::cuSurfObjectGetResourceDesc"]
17779 pub fn cudaGetSurfaceObjectResourceDesc(
17780 pResDesc: *mut cudaResourceDesc,
17781 surfObject: cudaSurfaceObject_t,
17782 ) -> cudaError_t;
17783}
17784extern "C" {
17785 #[doc = " \\brief Returns the latest version of CUDA supported by the driver\n\n Returns in \\p *driverVersion the latest version of CUDA supported by\n the driver. The version is returned as (1000 × major + 10 × minor).\n For example, CUDA 9.2 would be represented by 9020. If no driver is installed,\n then 0 is returned as the driver version.\n\n This function automatically returns ::cudaErrorInvalidValue\n if \\p driverVersion is NULL.\n\n \\param driverVersion - Returns the CUDA driver version.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaRuntimeGetVersion,\n ::cuDriverGetVersion"]
17786 pub fn cudaDriverGetVersion(driverVersion: *mut ::std::os::raw::c_int) -> cudaError_t;
17787}
17788extern "C" {
17789 #[doc = " \\brief Returns the CUDA Runtime version\n\n Returns in \\p *runtimeVersion the version number of the current CUDA\n Runtime instance. The version is returned as\n (1000 × major + 10 × minor). For example,\n CUDA 9.2 would be represented by 9020.\n\n As of CUDA 12.0, this function no longer initializes CUDA. The purpose\n of this API is solely to return a compile-time constant stating the\n CUDA Toolkit version in the above format.\n\n This function automatically returns ::cudaErrorInvalidValue if\n the \\p runtimeVersion argument is NULL.\n\n \\param runtimeVersion - Returns the CUDA Runtime version.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaDriverGetVersion,\n ::cuDriverGetVersion"]
17790 pub fn cudaRuntimeGetVersion(runtimeVersion: *mut ::std::os::raw::c_int) -> cudaError_t;
17791}
17792extern "C" {
17793 #[doc = " \\brief Creates a graph\n\n Creates an empty graph, which is returned via \\p pGraph.\n\n \\param pGraph - Returns newly created graph\n \\param flags - Graph creation flags, must be 0\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode,\n ::cudaGraphInstantiate,\n ::cudaGraphDestroy,\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphClone"]
17794 pub fn cudaGraphCreate(pGraph: *mut cudaGraph_t, flags: ::std::os::raw::c_uint) -> cudaError_t;
17795}
17796extern "C" {
17797 #[doc = " \\brief Creates a kernel execution node and adds it to a graph\n\n Creates a new kernel execution node and adds it to \\p graph with \\p numDependencies\n dependencies specified via \\p pDependencies and arguments specified in \\p pNodeParams.\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 pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\n\n The cudaKernelNodeParams structure is defined as:\n\n \\code\n struct cudaKernelNodeParams\n {\n void* func;\n dim3 gridDim;\n dim3 blockDim;\n unsigned int sharedMemBytes;\n void **kernelParams;\n void **extra;\n };\n \\endcode\n\n When the graph is launched, the node will invoke kernel \\p func on a (\\p gridDim.x x\n \\p gridDim.y x \\p gridDim.z) grid of blocks. Each block contains\n (\\p blockDim.x x \\p blockDim.y x \\p blockDim.z) threads.\n\n \\p sharedMem sets the amount of dynamic shared memory that will be\n available to each thread block.\n\n Kernel parameters to \\p func can be specified in one of two ways:\n\n 1) Kernel parameters can be specified via \\p kernelParams. If the kernel has N\n parameters, then \\p kernelParams needs to be an array of N pointers. Each pointer,\n from \\p kernelParams[0] to \\p kernelParams[N-1], points to the region of memory from which the actual\n parameter will be copied. The number of kernel parameters and their offsets and sizes do not need\n to be specified as that information is retrieved directly from the kernel's image.\n\n 2) Kernel parameters can also be packaged by the application into a single buffer that is passed in\n via \\p extra. This places the burden on the application of knowing each kernel\n parameter's size and alignment/padding within the buffer. The \\p extra parameter exists\n to allow this function to take additional less commonly used arguments. \\p extra specifies\n a list of names of extra settings and their corresponding values. Each extra setting name is\n immediately followed by the corresponding value. The list must be terminated with either NULL or\n 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\n containing all the kernel parameters for launching kernel\n \\p func;\n - ::CU_LAUNCH_PARAM_BUFFER_SIZE, which specifies that the next\n value in \\p extra will be a pointer to a size_t\n containing the size of the buffer specified with\n ::CU_LAUNCH_PARAM_BUFFER_POINTER;\n\n The error ::cudaErrorInvalidValue will be returned if kernel parameters are specified with both\n \\p kernelParams and \\p extra (i.e. both \\p kernelParams and\n \\p extra are non-NULL).\n\n The \\p kernelParams or \\p extra array, as well as the argument values it points to,\n are copied during this call.\n\n \\note Kernels launched using graphs must not use texture and surface references. Reading or\n writing through any texture or surface reference is undefined behavior.\n This restriction does not apply to texture and surface objects.\n\n \\param pGraphNode - Returns newly created node\n \\param graph - Graph to which to add the node\n \\param pDependencies - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param pNodeParams - Parameters for the GPU execution node\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaLaunchKernel,\n ::cudaGraphKernelNodeGetParams,\n ::cudaGraphKernelNodeSetParams,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode"]
17798 pub fn cudaGraphAddKernelNode(
17799 pGraphNode: *mut cudaGraphNode_t,
17800 graph: cudaGraph_t,
17801 pDependencies: *const cudaGraphNode_t,
17802 numDependencies: usize,
17803 pNodeParams: *const cudaKernelNodeParams,
17804 ) -> cudaError_t;
17805}
17806extern "C" {
17807 #[doc = " \\brief Returns a kernel node's parameters\n\n Returns the parameters of kernel node \\p node in \\p pNodeParams.\n The \\p kernelParams or \\p extra array returned in \\p pNodeParams,\n as well as the argument values it points to, are 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 ::cudaGraphKernelNodeSetParams to update the\n parameters of this node.\n\n The params will contain either \\p kernelParams or \\p extra,\n according to which of these was most recently set on the node.\n\n \\param node - Node to get the parameters for\n \\param pNodeParams - Pointer to return the parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaLaunchKernel,\n ::cudaGraphAddKernelNode,\n ::cudaGraphKernelNodeSetParams"]
17808 pub fn cudaGraphKernelNodeGetParams(
17809 node: cudaGraphNode_t,
17810 pNodeParams: *mut cudaKernelNodeParams,
17811 ) -> cudaError_t;
17812}
17813extern "C" {
17814 #[doc = " \\brief Sets a kernel node's parameters\n\n Sets the parameters of kernel node \\p node to \\p pNodeParams.\n\n \\param node - Node to set the parameters for\n \\param pNodeParams - Parameters to copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle,\n ::cudaErrorMemoryAllocation\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeSetParams,\n ::cudaLaunchKernel,\n ::cudaGraphAddKernelNode,\n ::cudaGraphKernelNodeGetParams"]
17815 pub fn cudaGraphKernelNodeSetParams(
17816 node: cudaGraphNode_t,
17817 pNodeParams: *const cudaKernelNodeParams,
17818 ) -> cudaError_t;
17819}
17820extern "C" {
17821 #[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 ::cudaKernelNodeAttrID\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidContext\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
17822 pub fn cudaGraphKernelNodeCopyAttributes(
17823 hSrc: cudaGraphNode_t,
17824 hDst: cudaGraphNode_t,
17825 ) -> cudaError_t;
17826}
17827extern "C" {
17828 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
17829 pub fn cudaGraphKernelNodeGetAttribute(
17830 hNode: cudaGraphNode_t,
17831 attr: cudaLaunchAttributeID,
17832 value_out: *mut cudaLaunchAttributeValue,
17833 ) -> cudaError_t;
17834}
17835extern "C" {
17836 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidResourceHandle\n \\notefnerr\n\n \\sa\n ::cudaAccessPolicyWindow"]
17837 pub fn cudaGraphKernelNodeSetAttribute(
17838 hNode: cudaGraphNode_t,
17839 attr: cudaLaunchAttributeID,
17840 value: *const cudaLaunchAttributeValue,
17841 ) -> cudaError_t;
17842}
17843extern "C" {
17844 #[doc = " \\brief Creates a memcpy node and adds it to a graph\n\n Creates a new memcpy node and adds it to \\p graph with \\p numDependencies\n dependencies specified via \\p pDependencies.\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 pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\n\n When the graph is launched, the node will perform the memcpy described by \\p pCopyParams.\n See ::cudaMemcpy3D() 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 ::cudaDevAttrConcurrentManagedAccess.\n\n \\param pGraphNode - Returns newly created node\n \\param graph - Graph to which to add the node\n \\param pDependencies - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param pCopyParams - Parameters for the memory copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaMemcpy3D,\n ::cudaGraphAddMemcpyNodeToSymbol,\n ::cudaGraphAddMemcpyNodeFromSymbol,\n ::cudaGraphAddMemcpyNode1D,\n ::cudaGraphMemcpyNodeGetParams,\n ::cudaGraphMemcpyNodeSetParams,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemsetNode"]
17845 pub fn cudaGraphAddMemcpyNode(
17846 pGraphNode: *mut cudaGraphNode_t,
17847 graph: cudaGraph_t,
17848 pDependencies: *const cudaGraphNode_t,
17849 numDependencies: usize,
17850 pCopyParams: *const cudaMemcpy3DParms,
17851 ) -> cudaError_t;
17852}
17853extern "C" {
17854 pub fn cudaGraphAddMemcpyNodeToSymbol(
17855 pGraphNode: *mut cudaGraphNode_t,
17856 graph: cudaGraph_t,
17857 pDependencies: *const cudaGraphNode_t,
17858 numDependencies: usize,
17859 symbol: *const ::std::os::raw::c_void,
17860 src: *const ::std::os::raw::c_void,
17861 count: usize,
17862 offset: usize,
17863 kind: cudaMemcpyKind,
17864 ) -> cudaError_t;
17865}
17866extern "C" {
17867 pub fn cudaGraphAddMemcpyNodeFromSymbol(
17868 pGraphNode: *mut cudaGraphNode_t,
17869 graph: cudaGraph_t,
17870 pDependencies: *const cudaGraphNode_t,
17871 numDependencies: usize,
17872 dst: *mut ::std::os::raw::c_void,
17873 symbol: *const ::std::os::raw::c_void,
17874 count: usize,
17875 offset: usize,
17876 kind: cudaMemcpyKind,
17877 ) -> cudaError_t;
17878}
17879extern "C" {
17880 pub fn cudaGraphAddMemcpyNode1D(
17881 pGraphNode: *mut cudaGraphNode_t,
17882 graph: cudaGraph_t,
17883 pDependencies: *const cudaGraphNode_t,
17884 numDependencies: usize,
17885 dst: *mut ::std::os::raw::c_void,
17886 src: *const ::std::os::raw::c_void,
17887 count: usize,
17888 kind: cudaMemcpyKind,
17889 ) -> cudaError_t;
17890}
17891extern "C" {
17892 #[doc = " \\brief Returns a memcpy node's parameters\n\n Returns the parameters of memcpy node \\p node in \\p pNodeParams.\n\n \\param node - Node to get the parameters for\n \\param pNodeParams - Pointer to return the parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaMemcpy3D,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphMemcpyNodeSetParams"]
17893 pub fn cudaGraphMemcpyNodeGetParams(
17894 node: cudaGraphNode_t,
17895 pNodeParams: *mut cudaMemcpy3DParms,
17896 ) -> cudaError_t;
17897}
17898extern "C" {
17899 #[doc = " \\brief Sets a memcpy node's parameters\n\n Sets the parameters of memcpy node \\p node to \\p pNodeParams.\n\n \\param node - Node to set the parameters for\n \\param pNodeParams - Parameters to copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeSetParams,\n ::cudaMemcpy3D,\n ::cudaGraphMemcpyNodeSetParamsToSymbol,\n ::cudaGraphMemcpyNodeSetParamsFromSymbol,\n ::cudaGraphMemcpyNodeSetParams1D,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphMemcpyNodeGetParams"]
17900 pub fn cudaGraphMemcpyNodeSetParams(
17901 node: cudaGraphNode_t,
17902 pNodeParams: *const cudaMemcpy3DParms,
17903 ) -> cudaError_t;
17904}
17905extern "C" {
17906 pub fn cudaGraphMemcpyNodeSetParamsToSymbol(
17907 node: cudaGraphNode_t,
17908 symbol: *const ::std::os::raw::c_void,
17909 src: *const ::std::os::raw::c_void,
17910 count: usize,
17911 offset: usize,
17912 kind: cudaMemcpyKind,
17913 ) -> cudaError_t;
17914}
17915extern "C" {
17916 pub fn cudaGraphMemcpyNodeSetParamsFromSymbol(
17917 node: cudaGraphNode_t,
17918 dst: *mut ::std::os::raw::c_void,
17919 symbol: *const ::std::os::raw::c_void,
17920 count: usize,
17921 offset: usize,
17922 kind: cudaMemcpyKind,
17923 ) -> cudaError_t;
17924}
17925extern "C" {
17926 pub fn cudaGraphMemcpyNodeSetParams1D(
17927 node: cudaGraphNode_t,
17928 dst: *mut ::std::os::raw::c_void,
17929 src: *const ::std::os::raw::c_void,
17930 count: usize,
17931 kind: cudaMemcpyKind,
17932 ) -> cudaError_t;
17933}
17934extern "C" {
17935 #[doc = " \\brief Creates a memset node and adds it to a graph\n\n Creates a new memset node and adds it to \\p graph with \\p numDependencies\n dependencies specified via \\p pDependencies.\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 pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\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 pMemsetParams.\n\n \\param pGraphNode - Returns newly created node\n \\param graph - Graph to which to add the node\n \\param pDependencies - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param pMemsetParams - Parameters for the memory set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDevice\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaMemset2D,\n ::cudaGraphMemsetNodeGetParams,\n ::cudaGraphMemsetNodeSetParams,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode"]
17936 pub fn cudaGraphAddMemsetNode(
17937 pGraphNode: *mut cudaGraphNode_t,
17938 graph: cudaGraph_t,
17939 pDependencies: *const cudaGraphNode_t,
17940 numDependencies: usize,
17941 pMemsetParams: *const cudaMemsetParams,
17942 ) -> cudaError_t;
17943}
17944extern "C" {
17945 #[doc = " \\brief Returns a memset node's parameters\n\n Returns the parameters of memset node \\p node in \\p pNodeParams.\n\n \\param node - Node to get the parameters for\n \\param pNodeParams - Pointer to return the parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaMemset2D,\n ::cudaGraphAddMemsetNode,\n ::cudaGraphMemsetNodeSetParams"]
17946 pub fn cudaGraphMemsetNodeGetParams(
17947 node: cudaGraphNode_t,
17948 pNodeParams: *mut cudaMemsetParams,
17949 ) -> cudaError_t;
17950}
17951extern "C" {
17952 #[doc = " \\brief Sets a memset node's parameters\n\n Sets the parameters of memset node \\p node to \\p pNodeParams.\n\n \\param node - Node to set the parameters for\n \\param pNodeParams - Parameters to copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeSetParams,\n ::cudaMemset2D,\n ::cudaGraphAddMemsetNode,\n ::cudaGraphMemsetNodeGetParams"]
17953 pub fn cudaGraphMemsetNodeSetParams(
17954 node: cudaGraphNode_t,
17955 pNodeParams: *const cudaMemsetParams,
17956 ) -> cudaError_t;
17957}
17958extern "C" {
17959 #[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 graph with \\p numDependencies\n dependencies specified via \\p pDependencies and arguments specified in \\p pNodeParams.\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 pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\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 pGraphNode - Returns newly created node\n \\param graph - Graph to which to add the node\n \\param pDependencies - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param pNodeParams - Parameters for the host node\n\n \\return\n ::cudaSuccess,\n ::cudaErrorNotSupported,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaLaunchHostFunc,\n ::cudaGraphHostNodeGetParams,\n ::cudaGraphHostNodeSetParams,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode"]
17960 pub fn cudaGraphAddHostNode(
17961 pGraphNode: *mut cudaGraphNode_t,
17962 graph: cudaGraph_t,
17963 pDependencies: *const cudaGraphNode_t,
17964 numDependencies: usize,
17965 pNodeParams: *const cudaHostNodeParams,
17966 ) -> cudaError_t;
17967}
17968extern "C" {
17969 #[doc = " \\brief Returns a host node's parameters\n\n Returns the parameters of host node \\p node in \\p pNodeParams.\n\n \\param node - Node to get the parameters for\n \\param pNodeParams - Pointer to return the parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaLaunchHostFunc,\n ::cudaGraphAddHostNode,\n ::cudaGraphHostNodeSetParams"]
17970 pub fn cudaGraphHostNodeGetParams(
17971 node: cudaGraphNode_t,
17972 pNodeParams: *mut cudaHostNodeParams,
17973 ) -> cudaError_t;
17974}
17975extern "C" {
17976 #[doc = " \\brief Sets a host node's parameters\n\n Sets the parameters of host node \\p node to \\p nodeParams.\n\n \\param node - Node to set the parameters for\n \\param pNodeParams - Parameters to copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeSetParams,\n ::cudaLaunchHostFunc,\n ::cudaGraphAddHostNode,\n ::cudaGraphHostNodeGetParams"]
17977 pub fn cudaGraphHostNodeSetParams(
17978 node: cudaGraphNode_t,
17979 pNodeParams: *const cudaHostNodeParams,
17980 ) -> cudaError_t;
17981}
17982extern "C" {
17983 #[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 graph with\n \\p numDependencies dependencies specified via \\p pDependencies.\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 pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\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 pGraphNode - Returns newly created node\n \\param graph - Graph to which to add the node\n \\param pDependencies - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param childGraph - The graph to clone into this node\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaGraphChildGraphNodeGetGraph,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode,\n ::cudaGraphClone"]
17984 pub fn cudaGraphAddChildGraphNode(
17985 pGraphNode: *mut cudaGraphNode_t,
17986 graph: cudaGraph_t,
17987 pDependencies: *const cudaGraphNode_t,
17988 numDependencies: usize,
17989 childGraph: cudaGraph_t,
17990 ) -> cudaError_t;
17991}
17992extern "C" {
17993 #[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 node - Node to get the embedded graph for\n \\param pGraph - Location to store a handle to the graph\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphNodeFindInClone"]
17994 pub fn cudaGraphChildGraphNodeGetGraph(
17995 node: cudaGraphNode_t,
17996 pGraph: *mut cudaGraph_t,
17997 ) -> cudaError_t;
17998}
17999extern "C" {
18000 #[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 graph with\n \\p numDependencies dependencies specified via \\p pDependencies.\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 pDependencies may not have any duplicate entries.\n A handle to the new node will be returned in \\p pGraphNode.\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 pGraphNode - Returns newly created node\n \\param graph - Graph to which to add the node\n \\param pDependencies - Dependencies of the node\n \\param numDependencies - Number of dependencies\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaGraphCreate,\n ::cudaGraphDestroyNode,\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode"]
18001 pub fn cudaGraphAddEmptyNode(
18002 pGraphNode: *mut cudaGraphNode_t,
18003 graph: cudaGraph_t,
18004 pDependencies: *const cudaGraphNode_t,
18005 numDependencies: usize,
18006 ) -> cudaError_t;
18007}
18008extern "C" {
18009 pub fn cudaGraphAddEventRecordNode(
18010 pGraphNode: *mut cudaGraphNode_t,
18011 graph: cudaGraph_t,
18012 pDependencies: *const cudaGraphNode_t,
18013 numDependencies: usize,
18014 event: cudaEvent_t,
18015 ) -> cudaError_t;
18016}
18017extern "C" {
18018 pub fn cudaGraphEventRecordNodeGetEvent(
18019 node: cudaGraphNode_t,
18020 event_out: *mut cudaEvent_t,
18021 ) -> cudaError_t;
18022}
18023extern "C" {
18024 pub fn cudaGraphEventRecordNodeSetEvent(
18025 node: cudaGraphNode_t,
18026 event: cudaEvent_t,
18027 ) -> cudaError_t;
18028}
18029extern "C" {
18030 pub fn cudaGraphAddEventWaitNode(
18031 pGraphNode: *mut cudaGraphNode_t,
18032 graph: cudaGraph_t,
18033 pDependencies: *const cudaGraphNode_t,
18034 numDependencies: usize,
18035 event: cudaEvent_t,
18036 ) -> cudaError_t;
18037}
18038extern "C" {
18039 pub fn cudaGraphEventWaitNodeGetEvent(
18040 node: cudaGraphNode_t,
18041 event_out: *mut cudaEvent_t,
18042 ) -> cudaError_t;
18043}
18044extern "C" {
18045 pub fn cudaGraphEventWaitNodeSetEvent(node: cudaGraphNode_t, event: cudaEvent_t)
18046 -> cudaError_t;
18047}
18048extern "C" {
18049 pub fn cudaGraphAddExternalSemaphoresSignalNode(
18050 pGraphNode: *mut cudaGraphNode_t,
18051 graph: cudaGraph_t,
18052 pDependencies: *const cudaGraphNode_t,
18053 numDependencies: usize,
18054 nodeParams: *const cudaExternalSemaphoreSignalNodeParams,
18055 ) -> cudaError_t;
18056}
18057extern "C" {
18058 pub fn cudaGraphExternalSemaphoresSignalNodeGetParams(
18059 hNode: cudaGraphNode_t,
18060 params_out: *mut cudaExternalSemaphoreSignalNodeParams,
18061 ) -> cudaError_t;
18062}
18063extern "C" {
18064 pub fn cudaGraphExternalSemaphoresSignalNodeSetParams(
18065 hNode: cudaGraphNode_t,
18066 nodeParams: *const cudaExternalSemaphoreSignalNodeParams,
18067 ) -> cudaError_t;
18068}
18069extern "C" {
18070 pub fn cudaGraphAddExternalSemaphoresWaitNode(
18071 pGraphNode: *mut cudaGraphNode_t,
18072 graph: cudaGraph_t,
18073 pDependencies: *const cudaGraphNode_t,
18074 numDependencies: usize,
18075 nodeParams: *const cudaExternalSemaphoreWaitNodeParams,
18076 ) -> cudaError_t;
18077}
18078extern "C" {
18079 pub fn cudaGraphExternalSemaphoresWaitNodeGetParams(
18080 hNode: cudaGraphNode_t,
18081 params_out: *mut cudaExternalSemaphoreWaitNodeParams,
18082 ) -> cudaError_t;
18083}
18084extern "C" {
18085 pub fn cudaGraphExternalSemaphoresWaitNodeSetParams(
18086 hNode: cudaGraphNode_t,
18087 nodeParams: *const cudaExternalSemaphoreWaitNodeParams,
18088 ) -> cudaError_t;
18089}
18090extern "C" {
18091 pub fn cudaGraphAddMemAllocNode(
18092 pGraphNode: *mut cudaGraphNode_t,
18093 graph: cudaGraph_t,
18094 pDependencies: *const cudaGraphNode_t,
18095 numDependencies: usize,
18096 nodeParams: *mut cudaMemAllocNodeParams,
18097 ) -> cudaError_t;
18098}
18099extern "C" {
18100 pub fn cudaGraphMemAllocNodeGetParams(
18101 node: cudaGraphNode_t,
18102 params_out: *mut cudaMemAllocNodeParams,
18103 ) -> cudaError_t;
18104}
18105extern "C" {
18106 pub fn cudaGraphAddMemFreeNode(
18107 pGraphNode: *mut cudaGraphNode_t,
18108 graph: cudaGraph_t,
18109 pDependencies: *const cudaGraphNode_t,
18110 numDependencies: usize,
18111 dptr: *mut ::std::os::raw::c_void,
18112 ) -> cudaError_t;
18113}
18114extern "C" {
18115 pub fn cudaGraphMemFreeNodeGetParams(
18116 node: cudaGraphNode_t,
18117 dptr_out: *mut ::std::os::raw::c_void,
18118 ) -> cudaError_t;
18119}
18120extern "C" {
18121 pub fn cudaDeviceGraphMemTrim(device: ::std::os::raw::c_int) -> cudaError_t;
18122}
18123extern "C" {
18124 pub fn cudaDeviceGetGraphMemAttribute(
18125 device: ::std::os::raw::c_int,
18126 attr: cudaGraphMemAttributeType,
18127 value: *mut ::std::os::raw::c_void,
18128 ) -> cudaError_t;
18129}
18130extern "C" {
18131 pub fn cudaDeviceSetGraphMemAttribute(
18132 device: ::std::os::raw::c_int,
18133 attr: cudaGraphMemAttributeType,
18134 value: *mut ::std::os::raw::c_void,
18135 ) -> cudaError_t;
18136}
18137extern "C" {
18138 #[doc = " \\brief Clones a graph\n\n This function creates a copy of \\p originalGraph and returns it in \\p pGraphClone.\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 pGraphClone - Returns newly created cloned graph\n \\param originalGraph - Graph to clone\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorMemoryAllocation\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphCreate,\n ::cudaGraphNodeFindInClone"]
18139 pub fn cudaGraphClone(pGraphClone: *mut cudaGraph_t, originalGraph: cudaGraph_t)
18140 -> cudaError_t;
18141}
18142extern "C" {
18143 #[doc = " \\brief Finds a cloned version of a node\n\n This function returns the node in \\p clonedGraph corresponding to \\p originalNode\n in the original graph.\n\n \\p clonedGraph must have been cloned from \\p originalGraph via ::cudaGraphClone.\n \\p originalNode must have been in \\p originalGraph at the time of the call to\n ::cudaGraphClone, and the corresponding cloned node in \\p clonedGraph must not have\n been removed. The cloned node is then returned via \\p pClonedNode.\n\n \\param pNode - Returns handle to the cloned node\n \\param originalNode - Handle to the original node\n \\param clonedGraph - Cloned graph to query\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphClone"]
18144 pub fn cudaGraphNodeFindInClone(
18145 pNode: *mut cudaGraphNode_t,
18146 originalNode: cudaGraphNode_t,
18147 clonedGraph: cudaGraph_t,
18148 ) -> cudaError_t;
18149}
18150extern "C" {
18151 #[doc = " \\brief Returns a node's type\n\n Returns the node type of \\p node in \\p pType.\n\n \\param node - Node to query\n \\param pType - Pointer to return the node type\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphChildGraphNodeGetGraph,\n ::cudaGraphKernelNodeGetParams,\n ::cudaGraphKernelNodeSetParams,\n ::cudaGraphHostNodeGetParams,\n ::cudaGraphHostNodeSetParams,\n ::cudaGraphMemcpyNodeGetParams,\n ::cudaGraphMemcpyNodeSetParams,\n ::cudaGraphMemsetNodeGetParams,\n ::cudaGraphMemsetNodeSetParams"]
18152 pub fn cudaGraphNodeGetType(
18153 node: cudaGraphNode_t,
18154 pType: *mut cudaGraphNodeType,
18155 ) -> cudaError_t;
18156}
18157extern "C" {
18158 #[doc = " \\brief Returns a graph's nodes\n\n Returns a list of \\p graph'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 graph - Graph to query\n \\param nodes - Pointer to return the nodes\n \\param numNodes - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphCreate,\n ::cudaGraphGetRootNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphNodeGetType,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
18159 pub fn cudaGraphGetNodes(
18160 graph: cudaGraph_t,
18161 nodes: *mut cudaGraphNode_t,
18162 numNodes: *mut usize,
18163 ) -> cudaError_t;
18164}
18165extern "C" {
18166 #[doc = " \\brief Returns a graph's root nodes\n\n Returns a list of \\p graph's root nodes. \\p pRootNodes may be NULL, in which case this\n function will return the number of root nodes in \\p pNumRootNodes. Otherwise,\n \\p pNumRootNodes entries will be filled in. If \\p pNumRootNodes is higher than the actual\n number of root nodes, the remaining entries in \\p pRootNodes will be set to NULL, and the\n number of nodes actually obtained will be returned in \\p pNumRootNodes.\n\n \\param graph - Graph to query\n \\param pRootNodes - Pointer to return the root nodes\n \\param pNumRootNodes - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphCreate,\n ::cudaGraphGetNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphNodeGetType,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
18167 pub fn cudaGraphGetRootNodes(
18168 graph: cudaGraph_t,
18169 pRootNodes: *mut cudaGraphNode_t,
18170 pNumRootNodes: *mut usize,
18171 ) -> cudaError_t;
18172}
18173extern "C" {
18174 #[doc = " \\brief Returns a graph's dependency edges\n\n Returns a list of \\p graph'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 graph - 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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphAddDependencies,\n ::cudaGraphRemoveDependencies,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
18175 pub fn cudaGraphGetEdges(
18176 graph: cudaGraph_t,
18177 from: *mut cudaGraphNode_t,
18178 to: *mut cudaGraphNode_t,
18179 numEdges: *mut usize,
18180 ) -> cudaError_t;
18181}
18182extern "C" {
18183 #[doc = " \\brief Returns a graph's dependency edges (12.3+)\n\n Returns a list of \\p graph's dependency edges. Edges are returned via corresponding\n indices in \\p from, \\p to and \\p edgeData; that is, the node in \\p to[i] has a\n dependency on the node in \\p from[i] with data \\p edgeData[i]. \\p from and \\p to may\n both be NULL, in which case this function only returns the number of edges in\n \\p numEdges. Otherwise, \\p numEdges entries will be filled in. If \\p numEdges is higher\n than the actual number of edges, the remaining entries in \\p from and \\p to will be\n set to NULL, and the number of edges actually returned will be written to \\p numEdges.\n \\p edgeData may alone be NULL, in which case the edges must all have default (zeroed)\n edge data. Attempting a losst query via NULL \\p edgeData will result in\n ::cudaErrorLossyQuery. If \\p edgeData is non-NULL then \\p from and \\p to must be as\n well.\n\n \\param graph - Graph to get the edges from\n \\param from - Location to return edge endpoints\n \\param to - Location to return edge endpoints\n \\param edgeData - Optional location to return edge data\n \\param numEdges - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorLossyQuery,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphAddDependencies,\n ::cudaGraphRemoveDependencies,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
18184 pub fn cudaGraphGetEdges_v2(
18185 graph: cudaGraph_t,
18186 from: *mut cudaGraphNode_t,
18187 to: *mut cudaGraphNode_t,
18188 edgeData: *mut cudaGraphEdgeData,
18189 numEdges: *mut usize,
18190 ) -> cudaError_t;
18191}
18192extern "C" {
18193 #[doc = " \\brief Returns a node's dependencies\n\n Returns a list of \\p node's dependencies. \\p pDependencies may be NULL, in which case this\n function will return the number of dependencies in \\p pNumDependencies. Otherwise,\n \\p pNumDependencies entries will be filled in. If \\p pNumDependencies is higher than the actual\n number of dependencies, the remaining entries in \\p pDependencies will be set to NULL, and the\n number of nodes actually obtained will be returned in \\p pNumDependencies.\n\n \\param node - Node to query\n \\param pDependencies - Pointer to return the dependencies\n \\param pNumDependencies - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeGetDependentNodes,\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphAddDependencies,\n ::cudaGraphRemoveDependencies"]
18194 pub fn cudaGraphNodeGetDependencies(
18195 node: cudaGraphNode_t,
18196 pDependencies: *mut cudaGraphNode_t,
18197 pNumDependencies: *mut usize,
18198 ) -> cudaError_t;
18199}
18200extern "C" {
18201 #[doc = " \\brief Returns a node's dependencies (12.3+)\n\n Returns a list of \\p node's dependencies. \\p pDependencies may be NULL, in which case this\n function will return the number of dependencies in \\p pNumDependencies. Otherwise,\n \\p pNumDependencies entries will be filled in. If \\p pNumDependencies is higher than the actual\n number of dependencies, the remaining entries in \\p pDependencies will be set to NULL, and the\n number of nodes actually obtained will be returned in \\p pNumDependencies.\n\n Note that if an edge has non-zero (non-default) edge data and \\p edgeData is NULL,\n this API will return ::cudaErrorLossyQuery. If \\p edgeData is non-NULL, then\n \\p pDependencies must be as well.\n\n \\param node - Node to query\n \\param pDependencies - Pointer to return the dependencies\n \\param edgeData - Optional array to return edge data for each dependency\n \\param pNumDependencies - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorLossyQuery,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeGetDependentNodes,\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphAddDependencies,\n ::cudaGraphRemoveDependencies"]
18202 pub fn cudaGraphNodeGetDependencies_v2(
18203 node: cudaGraphNode_t,
18204 pDependencies: *mut cudaGraphNode_t,
18205 edgeData: *mut cudaGraphEdgeData,
18206 pNumDependencies: *mut usize,
18207 ) -> cudaError_t;
18208}
18209extern "C" {
18210 #[doc = " \\brief Returns a node's dependent nodes\n\n Returns a list of \\p node's dependent nodes. \\p pDependentNodes may be NULL, in which\n case this function will return the number of dependent nodes in \\p pNumDependentNodes.\n Otherwise, \\p pNumDependentNodes entries will be filled in. If \\p pNumDependentNodes is\n higher than the actual number of dependent nodes, the remaining entries in\n \\p pDependentNodes will be set to NULL, and the number of nodes actually obtained will\n be returned in \\p pNumDependentNodes.\n\n \\param node - Node to query\n \\param pDependentNodes - Pointer to return the dependent nodes\n \\param pNumDependentNodes - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphAddDependencies,\n ::cudaGraphRemoveDependencies"]
18211 pub fn cudaGraphNodeGetDependentNodes(
18212 node: cudaGraphNode_t,
18213 pDependentNodes: *mut cudaGraphNode_t,
18214 pNumDependentNodes: *mut usize,
18215 ) -> cudaError_t;
18216}
18217extern "C" {
18218 #[doc = " \\brief Returns a node's dependent nodes (12.3+)\n\n Returns a list of \\p node's dependent nodes. \\p pDependentNodes may be NULL, in which\n case this function will return the number of dependent nodes in \\p pNumDependentNodes.\n Otherwise, \\p pNumDependentNodes entries will be filled in. If \\p pNumDependentNodes is\n higher than the actual number of dependent nodes, the remaining entries in\n \\p pDependentNodes will be set to NULL, and the number of nodes actually obtained will\n be returned in \\p pNumDependentNodes.\n\n Note that if an edge has non-zero (non-default) edge data and \\p edgeData is NULL,\n this API will return ::cudaErrorLossyQuery. If \\p edgeData is non-NULL, then\n \\p pDependentNodes must be as well.\n\n \\param node - Node to query\n \\param pDependentNodes - Pointer to return the dependent nodes\n \\param edgeData - Optional pointer to return edge data for dependent nodes\n \\param pNumDependentNodes - See description\n\n \\return\n ::cudaSuccess,\n ::cudaErrorLossyQuery,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphGetNodes,\n ::cudaGraphGetRootNodes,\n ::cudaGraphGetEdges,\n ::cudaGraphAddDependencies,\n ::cudaGraphRemoveDependencies"]
18219 pub fn cudaGraphNodeGetDependentNodes_v2(
18220 node: cudaGraphNode_t,
18221 pDependentNodes: *mut cudaGraphNode_t,
18222 edgeData: *mut cudaGraphEdgeData,
18223 pNumDependentNodes: *mut usize,
18224 ) -> cudaError_t;
18225}
18226extern "C" {
18227 #[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 pFrom and \\p pTo at corresponding indices define a dependency.\n Each node in \\p pFrom and \\p pTo must belong to \\p graph.\n\n If \\p numDependencies is 0, elements in \\p pFrom and \\p pTo will be ignored.\n Specifying an existing dependency will return an error.\n\n \\param graph - 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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphRemoveDependencies,\n ::cudaGraphGetEdges,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
18228 pub fn cudaGraphAddDependencies(
18229 graph: cudaGraph_t,
18230 from: *const cudaGraphNode_t,
18231 to: *const cudaGraphNode_t,
18232 numDependencies: usize,
18233 ) -> cudaError_t;
18234}
18235extern "C" {
18236 #[doc = " \\brief Adds dependency edges to a graph. (12.3+)\n\n The number of dependencies to be added is defined by \\p numDependencies\n Elements in \\p pFrom and \\p pTo at corresponding indices define a dependency.\n Each node in \\p pFrom and \\p pTo must belong to \\p graph.\n\n If \\p numDependencies is 0, elements in \\p pFrom and \\p pTo will be ignored.\n Specifying an existing dependency will return an error.\n\n \\param graph - 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 edgeData - Optional array of edge data. If NULL, default (zeroed) edge data is assumed.\n \\param numDependencies - Number of dependencies to be added\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphRemoveDependencies,\n ::cudaGraphGetEdges,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
18237 pub fn cudaGraphAddDependencies_v2(
18238 graph: cudaGraph_t,
18239 from: *const cudaGraphNode_t,
18240 to: *const cudaGraphNode_t,
18241 edgeData: *const cudaGraphEdgeData,
18242 numDependencies: usize,
18243 ) -> cudaError_t;
18244}
18245extern "C" {
18246 #[doc = " \\brief Removes dependency edges from a graph.\n\n The number of \\p pDependencies to be removed is defined by \\p numDependencies.\n Elements in \\p pFrom and \\p pTo at corresponding indices define a dependency.\n Each node in \\p pFrom and \\p pTo must belong to \\p graph.\n\n If \\p numDependencies is 0, elements in \\p pFrom and \\p pTo will be ignored.\n Specifying a non-existing dependency will return an error.\n\n \\param graph - 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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddDependencies,\n ::cudaGraphGetEdges,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
18247 pub fn cudaGraphRemoveDependencies(
18248 graph: cudaGraph_t,
18249 from: *const cudaGraphNode_t,
18250 to: *const cudaGraphNode_t,
18251 numDependencies: usize,
18252 ) -> cudaError_t;
18253}
18254extern "C" {
18255 #[doc = " \\brief Removes dependency edges from a graph. (12.3+)\n\n The number of \\p pDependencies to be removed is defined by \\p numDependencies.\n Elements in \\p pFrom and \\p pTo at corresponding indices define a dependency.\n Each node in \\p pFrom and \\p pTo must belong to \\p graph.\n\n If \\p numDependencies is 0, elements in \\p pFrom and \\p pTo will be ignored.\n Specifying an edge that does not exist in the graph, with data matching\n \\p edgeData, results in an error. \\p edgeData is nullable, which is equivalent\n to passing default (zeroed) data for each edge.\n\n \\param graph - 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 edgeData - Optional array of edge data. If NULL, edge data is assumed to\n be default (zeroed).\n \\param numDependencies - Number of dependencies to be removed\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddDependencies,\n ::cudaGraphGetEdges,\n ::cudaGraphNodeGetDependencies,\n ::cudaGraphNodeGetDependentNodes"]
18256 pub fn cudaGraphRemoveDependencies_v2(
18257 graph: cudaGraph_t,
18258 from: *const cudaGraphNode_t,
18259 to: *const cudaGraphNode_t,
18260 edgeData: *const cudaGraphEdgeData,
18261 numDependencies: usize,
18262 ) -> cudaError_t;
18263}
18264extern "C" {
18265 #[doc = " \\brief Remove a node from the graph\n\n Removes \\p node from its graph. This operation also severs any dependencies of other nodes\n on \\p node and vice versa.\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 node - Node to remove\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaGraphAddChildGraphNode,\n ::cudaGraphAddEmptyNode,\n ::cudaGraphAddKernelNode,\n ::cudaGraphAddHostNode,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphAddMemsetNode"]
18266 pub fn cudaGraphDestroyNode(node: cudaGraphNode_t) -> cudaError_t;
18267}
18268extern "C" {
18269 #[doc = " \\brief Creates an executable graph from a graph\n\n Instantiates \\p graph as an executable graph. The graph is validated for any\n structural constraints or intra-node constraints which were not previously\n validated. If instantiation is successful, a handle to the instantiated graph\n is returned in \\p pGraphExec.\n\n The \\p flags parameter controls the behavior of instantiation and subsequent\n graph launches. Valid flags are:\n\n - ::cudaGraphInstantiateFlagAutoFreeOnLaunch, which configures a\n graph containing memory allocation nodes to automatically free any\n unfreed memory allocations before the graph is relaunched.\n\n - ::cudaGraphInstantiateFlagDeviceLaunch, 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 cannot be used in\n conjunction with ::cudaGraphInstantiateFlagAutoFreeOnLaunch.\n\n - ::cudaGraphInstantiateFlagUseNodePriority, 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 graph 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\n instantiate a second executable graph before destroying the first with\n ::cudaGraphExecDestroy will result in an error.\n The same also applies if \\p graph contains any device-updatable kernel nodes.\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 device.\n - The graph can only contain kernel nodes, memcpy nodes, memset nodes, and child graph nodes.\n - The graph cannot be empty and must contain at least one kernel, memcpy, or memset node.\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 device, and the current device must\n match the device of other nodes in the graph.\n\n If \\p graph is not instantiated for launch on the device but contains kernels which\n call device-side cudaGraphLaunch() from multiple devices, this will result in an error.\n\n \\param pGraphExec - Returns instantiated graph\n \\param graph - Graph to instantiate\n \\param flags - Flags to control instantiation. See ::CUgraphInstantiate_flags.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphInstantiateWithFlags,\n ::cudaGraphCreate,\n ::cudaGraphUpload,\n ::cudaGraphLaunch,\n ::cudaGraphExecDestroy"]
18270 pub fn cudaGraphInstantiate(
18271 pGraphExec: *mut cudaGraphExec_t,
18272 graph: cudaGraph_t,
18273 flags: ::std::os::raw::c_ulonglong,
18274 ) -> cudaError_t;
18275}
18276extern "C" {
18277 pub fn cudaGraphInstantiateWithFlags(
18278 pGraphExec: *mut cudaGraphExec_t,
18279 graph: cudaGraph_t,
18280 flags: ::std::os::raw::c_ulonglong,
18281 ) -> cudaError_t;
18282}
18283extern "C" {
18284 #[doc = " \\brief Creates an executable graph from a graph\n\n Instantiates \\p graph 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 pGraphExec.\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 ::cudaGraphInstantiateParams is defined as:\n\n \\code\ntypedef struct {\nunsigned long long flags;\ncudaStream_t uploadStream;\ncudaGraphNode_t errNode_out;\ncudaGraphInstantiateResult result_out;\n} cudaGraphInstantiateParams;\n \\endcode\n\n The \\p flags field controls the behavior of instantiation and subsequent\n graph launches. Valid flags are:\n\n - ::cudaGraphInstantiateFlagAutoFreeOnLaunch, which configures a\n graph containing memory allocation nodes to automatically free any\n unfreed memory allocations before the graph is relaunched.\n\n - ::cudaGraphInstantiateFlagUpload, which will perform an upload of the graph\n into \\p uploadStream once the graph has been instantiated.\n\n - ::cudaGraphInstantiateFlagDeviceLaunch, 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 ::cudaGraphInstantiateFlagAutoFreeOnLaunch.\n\n - ::cudaGraphInstantiateFlagUseNodePriority, 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 graph 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 ::cudaGraphExecDestroy will\n result in an error.\n The same also applies if \\p graph contains any device-updatable kernel nodes.\n\n If \\p graph contains kernels which call device-side cudaGraphLaunch() from multiple\n devices, 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 device.\n - The graph can only contain kernel nodes, memcpy nodes, memset nodes, and child graph nodes.\n - The graph cannot be empty and must contain at least one kernel, memcpy, or memset node.\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 device, and the current device must\n match the device of other nodes in the graph.\n\n In the event of an error, the \\p result_out and \\p errNode_out fields will contain more\n information about the nature of the error. Possible error reporting includes:\n\n - ::cudaGraphInstantiateError, if passed an invalid value or if an unexpected error occurred\n which is described by the return value of the function. \\p errNode_out will be set to NULL.\n - ::cudaGraphInstantiateInvalidStructure, if the graph structure is invalid. \\p errNode_out\n will be set to one of the offending nodes.\n - ::cudaGraphInstantiateNodeOperationNotSupported, 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 errNode_out will\n be set to this node.\n - ::cudaGraphInstantiateMultipleDevicesNotSupported, if the graph is instantiated for device\n launch but a node’s device 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 devices. \\p errNode_out will be set to this node.\n\n If instantiation is successful, \\p result_out will be set to ::cudaGraphInstantiateSuccess,\n and \\p hErrNode_out will be set to NULL.\n\n \\param pGraphExec - Returns instantiated graph\n \\param graph - Graph to instantiate\n \\param instantiateParams - Instantiation parameters\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphCreate,\n ::cudaGraphInstantiate,\n ::cudaGraphInstantiateWithFlags,\n ::cudaGraphExecDestroy"]
18285 pub fn cudaGraphInstantiateWithParams(
18286 pGraphExec: *mut cudaGraphExec_t,
18287 graph: cudaGraph_t,
18288 instantiateParams: *mut cudaGraphInstantiateParams,
18289 ) -> cudaError_t;
18290}
18291extern "C" {
18292 #[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 ::cudaGraphInstantiateFlagUpload will not be returned by this API as it does\n not affect the resulting executable graph.\n\n \\param graphExec - The executable graph to query\n \\param flags - Returns the instantiation flags\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphInstantiate,\n ::cudaGraphInstantiateWithFlags,\n ::cudaGraphInstantiateWithParams"]
18293 pub fn cudaGraphExecGetFlags(
18294 graphExec: cudaGraphExec_t,
18295 flags: *mut ::std::os::raw::c_ulonglong,
18296 ) -> cudaError_t;
18297}
18298extern "C" {
18299 #[doc = " \\brief Sets the parameters for a kernel node in the given graphExec\n\n Sets the parameters of a kernel node in an executable graph \\p hGraphExec.\n The node is identified by the corresponding node \\p node in the\n non-executable graph, from which the executable graph was instantiated.\n\n \\p node must not have been removed from the original graph. All \\p nodeParams\n fields may change, but the following restrictions apply to \\p func updates:\n\n - The owning device of the function cannot change.\n - A node whose function originally did not use CUDA dynamic parallelism cannot be updated\n to a function which uses CDP\n - A node whose function originally did not make device-side update calls cannot be updated\n to a function which makes device-side update calls.\n - If \\p hGraphExec was not instantiated for device launch, a node whose function originally\n did not use device-side cudaGraphLaunch() cannot be updated to a function which uses\n device-side cudaGraphLaunch() unless the node resides on the same device as nodes which\n contained such calls at instantiate-time. If no such calls were present at instantiation,\n these updates cannot be performed at all.\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 node is also not modified by this call.\n\n If \\p node is a device-updatable kernel node, the next upload/launch of \\p hGraphExec\n will overwrite any previous device-side updates. Additionally, applying host updates to a\n device-updatable kernel node while it is being updated from the device will result in\n undefined behavior.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param node - kernel node from the graph from which graphExec was instantiated\n \\param pNodeParams - Updated Parameters to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphExecNodeSetParams,\n ::cudaGraphAddKernelNode,\n ::cudaGraphKernelNodeSetParams,\n ::cudaGraphExecMemcpyNodeSetParams,\n ::cudaGraphExecMemsetNodeSetParams,\n ::cudaGraphExecHostNodeSetParams,\n ::cudaGraphExecChildGraphNodeSetParams,\n ::cudaGraphExecEventRecordNodeSetEvent,\n ::cudaGraphExecEventWaitNodeSetEvent,\n ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cudaGraphExecUpdate,\n ::cudaGraphInstantiate"]
18300 pub fn cudaGraphExecKernelNodeSetParams(
18301 hGraphExec: cudaGraphExec_t,
18302 node: cudaGraphNode_t,
18303 pNodeParams: *const cudaKernelNodeParams,
18304 ) -> cudaError_t;
18305}
18306extern "C" {
18307 #[doc = " \\brief Sets the parameters for a memcpy node in the given graphExec.\n\n Updates the work represented by \\p node in \\p hGraphExec as though \\p node had\n contained \\p pNodeParams at instantiation. \\p node must remain in the graph which was\n used to instantiate \\p hGraphExec. Changed edges to and from \\p node are ignored.\n\n The source and destination memory in \\p pNodeParams 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 pNodeParams 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. \\p node is also\n not modified by this call.\n\n Returns ::cudaErrorInvalidValue 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 node - Memcpy node from the graph which was used to instantiate graphExec\n \\param pNodeParams - Updated Parameters to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphExecNodeSetParams,\n ::cudaGraphAddMemcpyNode,\n ::cudaGraphMemcpyNodeSetParams,\n ::cudaGraphExecMemcpyNodeSetParamsToSymbol,\n ::cudaGraphExecMemcpyNodeSetParamsFromSymbol,\n ::cudaGraphExecMemcpyNodeSetParams1D,\n ::cudaGraphExecKernelNodeSetParams,\n ::cudaGraphExecMemsetNodeSetParams,\n ::cudaGraphExecHostNodeSetParams,\n ::cudaGraphExecChildGraphNodeSetParams,\n ::cudaGraphExecEventRecordNodeSetEvent,\n ::cudaGraphExecEventWaitNodeSetEvent,\n ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cudaGraphExecUpdate,\n ::cudaGraphInstantiate"]
18308 pub fn cudaGraphExecMemcpyNodeSetParams(
18309 hGraphExec: cudaGraphExec_t,
18310 node: cudaGraphNode_t,
18311 pNodeParams: *const cudaMemcpy3DParms,
18312 ) -> cudaError_t;
18313}
18314extern "C" {
18315 pub fn cudaGraphExecMemcpyNodeSetParamsToSymbol(
18316 hGraphExec: cudaGraphExec_t,
18317 node: cudaGraphNode_t,
18318 symbol: *const ::std::os::raw::c_void,
18319 src: *const ::std::os::raw::c_void,
18320 count: usize,
18321 offset: usize,
18322 kind: cudaMemcpyKind,
18323 ) -> cudaError_t;
18324}
18325extern "C" {
18326 pub fn cudaGraphExecMemcpyNodeSetParamsFromSymbol(
18327 hGraphExec: cudaGraphExec_t,
18328 node: cudaGraphNode_t,
18329 dst: *mut ::std::os::raw::c_void,
18330 symbol: *const ::std::os::raw::c_void,
18331 count: usize,
18332 offset: usize,
18333 kind: cudaMemcpyKind,
18334 ) -> cudaError_t;
18335}
18336extern "C" {
18337 pub fn cudaGraphExecMemcpyNodeSetParams1D(
18338 hGraphExec: cudaGraphExec_t,
18339 node: cudaGraphNode_t,
18340 dst: *mut ::std::os::raw::c_void,
18341 src: *const ::std::os::raw::c_void,
18342 count: usize,
18343 kind: cudaMemcpyKind,
18344 ) -> cudaError_t;
18345}
18346extern "C" {
18347 #[doc = " \\brief Sets the parameters for a memset node in the given graphExec.\n\n Updates the work represented by \\p node in \\p hGraphExec as though \\p node had\n contained \\p pNodeParams at instantiation. \\p node must remain in the graph which was\n used to instantiate \\p hGraphExec. Changed edges to and from \\p node are ignored.\n\n Zero sized operations are not supported.\n\n The new destination pointer in \\p pNodeParams must be to the same kind of allocation\n as the original destination pointer and have the same context association and device mapping\n as the original destination pointer.\n\n Both the value and pointer address may be updated.\n Changing other aspects of the memset (width, height, element size or pitch) may cause the update to be rejected.\n Specifically, for 2d memsets, all dimension changes are rejected.\n For 1d memsets, changes in height are explicitly rejected and other changes are oportunistically allowed\n if the resulting work maps onto the work resources already allocated for the node.\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 node is also\n not modified by this call.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param node - Memset node from the graph which was used to instantiate graphExec\n \\param pNodeParams - Updated Parameters to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphExecNodeSetParams,\n ::cudaGraphAddMemsetNode,\n ::cudaGraphMemsetNodeSetParams,\n ::cudaGraphExecKernelNodeSetParams,\n ::cudaGraphExecMemcpyNodeSetParams,\n ::cudaGraphExecHostNodeSetParams,\n ::cudaGraphExecChildGraphNodeSetParams,\n ::cudaGraphExecEventRecordNodeSetEvent,\n ::cudaGraphExecEventWaitNodeSetEvent,\n ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cudaGraphExecUpdate,\n ::cudaGraphInstantiate"]
18348 pub fn cudaGraphExecMemsetNodeSetParams(
18349 hGraphExec: cudaGraphExec_t,
18350 node: cudaGraphNode_t,
18351 pNodeParams: *const cudaMemsetParams,
18352 ) -> cudaError_t;
18353}
18354extern "C" {
18355 #[doc = " \\brief Sets the parameters for a host node in the given graphExec.\n\n Updates the work represented by \\p node in \\p hGraphExec as though \\p node had\n contained \\p pNodeParams at instantiation. \\p node must remain in the graph which was\n used to instantiate \\p hGraphExec. Changed edges to and from \\p node 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 node is also\n not modified by this call.\n\n \\param hGraphExec - The executable graph in which to set the specified node\n \\param node - Host node from the graph which was used to instantiate graphExec\n \\param pNodeParams - Updated Parameters to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphExecNodeSetParams,\n ::cudaGraphAddHostNode,\n ::cudaGraphHostNodeSetParams,\n ::cudaGraphExecKernelNodeSetParams,\n ::cudaGraphExecMemcpyNodeSetParams,\n ::cudaGraphExecMemsetNodeSetParams,\n ::cudaGraphExecChildGraphNodeSetParams,\n ::cudaGraphExecEventRecordNodeSetEvent,\n ::cudaGraphExecEventWaitNodeSetEvent,\n ::cudaGraphExecExternalSemaphoresSignalNodeSetParams,\n ::cudaGraphExecExternalSemaphoresWaitNodeSetParams,\n ::cudaGraphExecUpdate,\n ::cudaGraphInstantiate"]
18356 pub fn cudaGraphExecHostNodeSetParams(
18357 hGraphExec: cudaGraphExec_t,
18358 node: cudaGraphNode_t,
18359 pNodeParams: *const cudaHostNodeParams,
18360 ) -> cudaError_t;
18361}
18362extern "C" {
18363 pub fn cudaGraphExecChildGraphNodeSetParams(
18364 hGraphExec: cudaGraphExec_t,
18365 node: cudaGraphNode_t,
18366 childGraph: cudaGraph_t,
18367 ) -> cudaError_t;
18368}
18369extern "C" {
18370 pub fn cudaGraphExecEventRecordNodeSetEvent(
18371 hGraphExec: cudaGraphExec_t,
18372 hNode: cudaGraphNode_t,
18373 event: cudaEvent_t,
18374 ) -> cudaError_t;
18375}
18376extern "C" {
18377 pub fn cudaGraphExecEventWaitNodeSetEvent(
18378 hGraphExec: cudaGraphExec_t,
18379 hNode: cudaGraphNode_t,
18380 event: cudaEvent_t,
18381 ) -> cudaError_t;
18382}
18383extern "C" {
18384 pub fn cudaGraphExecExternalSemaphoresSignalNodeSetParams(
18385 hGraphExec: cudaGraphExec_t,
18386 hNode: cudaGraphNode_t,
18387 nodeParams: *const cudaExternalSemaphoreSignalNodeParams,
18388 ) -> cudaError_t;
18389}
18390extern "C" {
18391 pub fn cudaGraphExecExternalSemaphoresWaitNodeSetParams(
18392 hGraphExec: cudaGraphExec_t,
18393 hNode: cudaGraphNode_t,
18394 nodeParams: *const cudaExternalSemaphoreWaitNodeParams,
18395 ) -> cudaError_t;
18396}
18397extern "C" {
18398 pub fn cudaGraphNodeSetEnabled(
18399 hGraphExec: cudaGraphExec_t,
18400 hNode: cudaGraphNode_t,
18401 isEnabled: ::std::os::raw::c_uint,
18402 ) -> cudaError_t;
18403}
18404extern "C" {
18405 pub fn cudaGraphNodeGetEnabled(
18406 hGraphExec: cudaGraphExec_t,
18407 hNode: cudaGraphNode_t,
18408 isEnabled: *mut ::std::os::raw::c_uint,
18409 ) -> cudaError_t;
18410}
18411extern "C" {
18412 #[doc = " \\brief Check whether an executable graph can be updated with a graph and perform the update if possible\n\n Updates the node parameters in the instantiated graph specified by \\p hGraphExec with the\n node parameters in a topologically identical graph specified by \\p hGraph.\n\n Limitations:\n\n - Kernel nodes:\n - The owning context of the function cannot change.\n - A node whose function originally did not use CUDA dynamic parallelism cannot be updated\n to a function which uses CDP.\n - A node whose function originally did not make device-side update calls cannot be updated\n to a function which makes device-side update calls.\n - A cooperative node cannot be updated to a non-cooperative node, and vice-versa.\n - If the graph was instantiated with cudaGraphInstantiateFlagUseNodePriority, the\n priority attribute cannot change. Equality is checked on the originally requested\n priority values, before they are clamped to the device's supported range.\n - If \\p hGraphExec was not instantiated for device launch, a node whose function originally\n did not use device-side cudaGraphLaunch() cannot be updated to a function which uses\n device-side cudaGraphLaunch() unless the node resides on the same device as nodes which\n contained such calls at instantiate-time. If no such calls were present at instantiation,\n these updates cannot be performed at all.\n - Neither \\p hGraph nor \\p hGraphExec may contain device-updatable kernel nodes.\n - Memset and memcpy nodes:\n - The CUDA device(s) to which the operand(s) was allocated/mapped cannot change.\n - The source/destination memory must be allocated from the same contexts as the original\n source/destination memory.\n - For 2d memsets, only address and assinged value may be updated.\n - For 1d memsets, updating dimensions is also allowed, but may fail if the resulting operation doesn't\n map onto the work resources already allocated for the node.\n - Additional memcpy node restrictions:\n - Changing either the source or destination memory type(i.e. CU_MEMORYTYPE_DEVICE,\n CU_MEMORYTYPE_ARRAY, etc.) is not supported.\n - Conditional nodes:\n - Changing node parameters is not supported.\n - Changeing parameters of nodes within the conditional body graph is subject to the rules above.\n - Conditional handle flags and default values are updated as part of the graph update.\n\n Note: The API may add further restrictions in future releases. The return code should always be checked.\n\n cudaGraphExecUpdate sets the result member of \\p resultInfo to cudaGraphExecUpdateErrorTopologyChanged\n under the following conditions:\n - The count of nodes directly in \\p hGraphExec and \\p hGraph differ, in which case resultInfo->errorNode\n is set to NULL.\n - \\p hGraph has more exit nodes than \\p hGraph, in which case resultInfo->errorNode is set to one of\n the exit nodes in hGraph.\n - A node in \\p hGraph has a different number of dependencies than the node from \\p hGraphExec it is paired with,\n in which case resultInfo->errorNode is set to the node from \\p hGraph.\n - A node in \\p hGraph has a dependency that does not match with the corresponding dependency of the paired node\n from \\p hGraphExec. resultInfo->errorNode will be set to the node from \\p hGraph. resultInfo->errorFromNode\n will be set to the mismatched dependency. The dependencies are paired based on edge order and a dependency\n does not match when the nodes are already paired based on other edges examined in the graph.\n\n cudaGraphExecUpdate sets \\p the result member of \\p resultInfo to:\n - cudaGraphExecUpdateError if passed an invalid value.\n - cudaGraphExecUpdateErrorTopologyChanged if the graph topology changed\n - cudaGraphExecUpdateErrorNodeTypeChanged if the type of a node changed, in which case\n \\p hErrorNode_out is set to the node from \\p hGraph.\n - cudaGraphExecUpdateErrorFunctionChanged if the function of a kernel node changed (CUDA driver < 11.2)\n - cudaGraphExecUpdateErrorUnsupportedFunctionChange if the func field of a kernel changed in an\n unsupported way(see note above), in which case \\p hErrorNode_out is set to the node from \\p hGraph\n - cudaGraphExecUpdateErrorParametersChanged if any parameters to a node changed in a way\n that is not supported, in which case \\p hErrorNode_out is set to the node from \\p hGraph\n - cudaGraphExecUpdateErrorAttributesChanged if any attributes of a node changed in a way\n that is not supported, in which case \\p hErrorNode_out is set to the node from \\p hGraph\n - cudaGraphExecUpdateErrorNotSupported if something about a node is unsupported, like\n the node's type or configuration, in which case \\p hErrorNode_out is set to the node from \\p hGraph\n\n If the update fails for a reason not listed above, the result member of \\p resultInfo will be set\n to cudaGraphExecUpdateError. If the update succeeds, the result member will be set to cudaGraphExecUpdateSuccess.\n\n cudaGraphExecUpdate returns cudaSuccess when the updated was performed successfully. It returns\n cudaErrorGraphExecUpdateFailure if the graph update was not performed because it included\n changes which violated constraints specific to instantiated graph update.\n\n \\param hGraphExec The instantiated graph to be updated\n \\param hGraph The graph containing the updated parameters\n\\param resultInfo the error info structure\n\n \\return\n ::cudaSuccess,\n ::cudaErrorGraphExecUpdateFailure,\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphInstantiate"]
18413 pub fn cudaGraphExecUpdate(
18414 hGraphExec: cudaGraphExec_t,
18415 hGraph: cudaGraph_t,
18416 resultInfo: *mut cudaGraphExecUpdateResultInfo,
18417 ) -> cudaError_t;
18418}
18419extern "C" {
18420 pub fn cudaGraphUpload(graphExec: cudaGraphExec_t, stream: cudaStream_t) -> cudaError_t;
18421}
18422extern "C" {
18423 #[doc = " \\brief Launches an executable graph in a stream\n\n Executes \\p graphExec in \\p stream. Only one instance of \\p graphExec may be executing\n at a time. Each launch is ordered behind both any previous work in \\p stream\n and any previous launches of \\p graphExec. To execute a graph concurrently, it must be\n instantiated multiple times into multiple executable graphs.\n\n If any allocations created by \\p graphExec remain unfreed (from a previous launch) and\n \\p graphExec was not instantiated with ::cudaGraphInstantiateFlagAutoFreeOnLaunch,\n the launch will fail with ::cudaErrorInvalidValue.\n\n \\param graphExec - Executable graph to launch\n \\param stream - Stream in which to launch the graph\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphInstantiate,\n ::cudaGraphUpload,\n ::cudaGraphExecDestroy"]
18424 pub fn cudaGraphLaunch(graphExec: cudaGraphExec_t, stream: cudaStream_t) -> cudaError_t;
18425}
18426extern "C" {
18427 #[doc = " \\brief Destroys an executable graph\n\n Destroys the executable graph specified by \\p graphExec.\n\n \\param graphExec - Executable graph to destroy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaGraphInstantiate,\n ::cudaGraphUpload,\n ::cudaGraphLaunch"]
18428 pub fn cudaGraphExecDestroy(graphExec: cudaGraphExec_t) -> cudaError_t;
18429}
18430extern "C" {
18431 #[doc = " \\brief Destroys a graph\n\n Destroys the graph specified by \\p graph, as well as all of its nodes.\n\n \\param graph - Graph to destroy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n \\note_destroy_ub\n\n \\sa\n ::cudaGraphCreate"]
18432 pub fn cudaGraphDestroy(graph: cudaGraph_t) -> cudaError_t;
18433}
18434extern "C" {
18435 #[doc = " \\brief Write a DOT file describing graph structure\n\n Using the provided \\p graph, 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 graph - The graph to create a DOT file from\n \\param path - The path to write the DOT file to\n \\param flags - Flags from cudaGraphDebugDotFlags for specifying which additional node information to write\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorOperatingSystem"]
18436 pub fn cudaGraphDebugDotPrint(
18437 graph: cudaGraph_t,
18438 path: *const ::std::os::raw::c_char,
18439 flags: ::std::os::raw::c_uint,
18440 ) -> cudaError_t;
18441}
18442extern "C" {
18443 #[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 ::cudaUserObjectNoDestructorSync,\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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa\n ::cudaUserObjectRetain,\n ::cudaUserObjectRelease,\n ::cudaGraphRetainUserObject,\n ::cudaGraphReleaseUserObject,\n ::cudaGraphCreate"]
18444 pub fn cudaUserObjectCreate(
18445 object_out: *mut cudaUserObject_t,
18446 ptr: *mut ::std::os::raw::c_void,
18447 destroy: cudaHostFn_t,
18448 initialRefcount: ::std::os::raw::c_uint,
18449 flags: ::std::os::raw::c_uint,
18450 ) -> cudaError_t;
18451}
18452extern "C" {
18453 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa\n ::cudaUserObjectCreate,\n ::cudaUserObjectRelease,\n ::cudaGraphRetainUserObject,\n ::cudaGraphReleaseUserObject,\n ::cudaGraphCreate"]
18454 pub fn cudaUserObjectRetain(
18455 object: cudaUserObject_t,
18456 count: ::std::os::raw::c_uint,
18457 ) -> cudaError_t;
18458}
18459extern "C" {
18460 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa\n ::cudaUserObjectCreate,\n ::cudaUserObjectRetain,\n ::cudaGraphRetainUserObject,\n ::cudaGraphReleaseUserObject,\n ::cudaGraphCreate"]
18461 pub fn cudaUserObjectRelease(
18462 object: cudaUserObject_t,
18463 count: ::std::os::raw::c_uint,
18464 ) -> cudaError_t;
18465}
18466extern "C" {
18467 #[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 ::cudaGraphUserObjectMove transfers references\n from the calling thread, rather than create new references. Pass 0\n to create new references.\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa\n ::cudaUserObjectCreate\n ::cudaUserObjectRetain,\n ::cudaUserObjectRelease,\n ::cudaGraphReleaseUserObject,\n ::cudaGraphCreate"]
18468 pub fn cudaGraphRetainUserObject(
18469 graph: cudaGraph_t,
18470 object: cudaUserObject_t,
18471 count: ::std::os::raw::c_uint,
18472 flags: ::std::os::raw::c_uint,
18473 ) -> cudaError_t;
18474}
18475extern "C" {
18476 #[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 ::cudaSuccess,\n ::cudaErrorInvalidValue\n\n \\sa\n ::cudaUserObjectCreate\n ::cudaUserObjectRetain,\n ::cudaUserObjectRelease,\n ::cudaGraphRetainUserObject,\n ::cudaGraphCreate"]
18477 pub fn cudaGraphReleaseUserObject(
18478 graph: cudaGraph_t,
18479 object: cudaUserObject_t,
18480 count: ::std::os::raw::c_uint,
18481 ) -> cudaError_t;
18482}
18483extern "C" {
18484 #[doc = " \\brief Adds a node of arbitrary type to a graph\n\n Creates a new node in \\p graph described by \\p nodeParams with \\p numDependencies\n dependencies specified via \\p pDependencies. \\p numDependencies may be 0.\n \\p pDependencies may be null if \\p numDependencies is 0. \\p pDependencies may not have\n any duplicate entries.\n\n \\p nodeParams is a tagged union. The node type should be specified in the \\p type field,\n and type-specific parameters in the corresponding union member. All unused bytes - that\n is, \\p reserved0 and all bytes past the utilized union member - must be set to zero.\n It is recommended to use brace initialization or memset to ensure all bytes are\n initialized.\n\n Note that for some node types, \\p nodeParams may contain \"out parameters\" which are\n modified during the call, such as \\p nodeParams->alloc.dptr.\n\n A handle to the new node will be returned in \\p phGraphNode.\n\n \\param pGraphNode - Returns newly created node\n \\param graph - Graph to which to add the node\n \\param pDependencies - Dependencies of the node\n \\param numDependencies - Number of dependencies\n \\param nodeParams - Specification of the node\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorNotSupported\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphCreate,\n ::cudaGraphNodeSetParams,\n ::cudaGraphExecNodeSetParams"]
18485 pub fn cudaGraphAddNode(
18486 pGraphNode: *mut cudaGraphNode_t,
18487 graph: cudaGraph_t,
18488 pDependencies: *const cudaGraphNode_t,
18489 numDependencies: usize,
18490 nodeParams: *mut cudaGraphNodeParams,
18491 ) -> cudaError_t;
18492}
18493extern "C" {
18494 #[doc = " \\brief Adds a node of arbitrary type to a graph (12.3+)\n\n Creates a new node in \\p graph described by \\p nodeParams with \\p numDependencies\n dependencies specified via \\p pDependencies. \\p numDependencies may be 0.\n \\p pDependencies may be null if \\p numDependencies is 0. \\p pDependencies may not have\n any duplicate entries.\n\n \\p nodeParams is a tagged union. The node type should be specified in the \\p type field,\n and type-specific parameters in the corresponding union member. All unused bytes - that\n is, \\p reserved0 and all bytes past the utilized union member - must be set to zero.\n It is recommended to use brace initialization or memset to ensure all bytes are\n initialized.\n\n Note that for some node types, \\p nodeParams may contain \"out parameters\" which are\n modified during the call, such as \\p nodeParams->alloc.dptr.\n\n A handle to the new node will be returned in \\p phGraphNode.\n\n \\param pGraphNode - Returns newly created node\n \\param graph - Graph to which to add the node\n \\param pDependencies - Dependencies of the node\n \\param dependencyData - Optional edge data for the dependencies. If NULL, the data is\n assumed to be default (zeroed) for all dependencies.\n \\param numDependencies - Number of dependencies\n \\param nodeParams - Specification of the node\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorNotSupported\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphCreate,\n ::cudaGraphNodeSetParams,\n ::cudaGraphExecNodeSetParams"]
18495 pub fn cudaGraphAddNode_v2(
18496 pGraphNode: *mut cudaGraphNode_t,
18497 graph: cudaGraph_t,
18498 pDependencies: *const cudaGraphNode_t,
18499 dependencyData: *const cudaGraphEdgeData,
18500 numDependencies: usize,
18501 nodeParams: *mut cudaGraphNodeParams,
18502 ) -> cudaError_t;
18503}
18504extern "C" {
18505 #[doc = " \\brief Update's a graph node's parameters\n\n Sets the parameters of graph node \\p node to \\p nodeParams. The node type specified by\n \\p nodeParams->type must match the type of \\p node. \\p nodeParams must be fully\n initialized and all unused bytes (reserved, padding) zeroed.\n\n Modifying parameters is not supported for node types cudaGraphNodeTypeMemAlloc and\n cudaGraphNodeTypeMemFree.\n\n \\param node - Node to set the parameters for\n \\param nodeParams - Parameters to copy\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorNotSupported\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaGraphExecNodeSetParams"]
18506 pub fn cudaGraphNodeSetParams(
18507 node: cudaGraphNode_t,
18508 nodeParams: *mut cudaGraphNodeParams,
18509 ) -> cudaError_t;
18510}
18511extern "C" {
18512 #[doc = " \\brief Update's a graph node's parameters in an instantiated graph\n\n Sets the parameters of a node in an executable graph \\p graphExec. The node is identified\n by the corresponding node \\p node in the non-executable graph from which the executable\n graph was instantiated. \\p node must not have been removed from the original graph.\n\n The modifications only affect future launches of \\p graphExec. Already\n enqueued or running launches of \\p graphExec are not affected by this call.\n \\p node is also not modified by this call.\n\n Allowed changes to parameters on executable graphs are as follows:\n <table>\n <tr><th>Node type<th>Allowed changes\n <tr><td>kernel<td>See ::cudaGraphExecKernelNodeSetParams\n <tr><td>memcpy<td>Addresses for 1-dimensional copies if allocated in same context; see ::cudaGraphExecMemcpyNodeSetParams\n <tr><td>memset<td>Addresses for 1-dimensional memsets if allocated in same context; see ::cudaGraphExecMemsetNodeSetParams\n <tr><td>host<td>Unrestricted\n <tr><td>child graph<td>Topology must match and restrictions apply recursively; see ::cudaGraphExecUpdate\n <tr><td>event wait<td>Unrestricted\n <tr><td>event record<td>Unrestricted\n <tr><td>external semaphore signal<td>Number of semaphore operations cannot change\n <tr><td>external semaphore wait<td>Number of semaphore operations cannot change\n <tr><td>memory allocation<td>API unsupported\n <tr><td>memory free<td>API unsupported\n </table>\n\n \\param graphExec - The executable graph in which to update the specified node\n \\param node - Corresponding node from the graph from which graphExec was instantiated\n \\param nodeParams - Updated Parameters to set\n\n \\return\n ::cudaSuccess,\n ::cudaErrorInvalidValue,\n ::cudaErrorInvalidDeviceFunction,\n ::cudaErrorNotSupported\n \\note_graph_thread_safety\n \\notefnerr\n \\note_init_rt\n \\note_callback\n\n \\sa\n ::cudaGraphAddNode,\n ::cudaGraphNodeSetParams\n ::cudaGraphExecUpdate,\n ::cudaGraphInstantiate"]
18513 pub fn cudaGraphExecNodeSetParams(
18514 graphExec: cudaGraphExec_t,
18515 node: cudaGraphNode_t,
18516 nodeParams: *mut cudaGraphNodeParams,
18517 ) -> cudaError_t;
18518}
18519extern "C" {
18520 #[doc = " \\brief Create a conditional handle\n\n Creates a conditional handle associated with \\p hGraph.\n\n The conditional handle must be associated with a conditional node in this graph or one of its children.\n\n Handles not associated with a conditional node may cause graph instantiation to fail.\n\n \\param pHandle_out - Pointer used to return the handle to the caller.\n \\param hGraph - Graph which will contain the conditional node using this handle.\n \\param defaultLaunchValue - Optional initial value for the conditional variable.\n \\param flags - Currently must be cudaGraphCondAssignDefault or 0.\n\n \\return\n ::CUDA_SUCCESS,\n ::CUDA_ERROR_INVALID_VALUE,\n ::CUDA_ERROR_NOT_SUPPORTED\n \\note_graph_thread_safety\n \\notefnerr\n\n \\sa\n ::cuGraphAddNode,"]
18521 pub fn cudaGraphConditionalHandleCreate(
18522 pHandle_out: *mut cudaGraphConditionalHandle,
18523 graph: cudaGraph_t,
18524 defaultLaunchValue: ::std::os::raw::c_uint,
18525 flags: ::std::os::raw::c_uint,
18526 ) -> cudaError_t;
18527}
18528extern "C" {
18529 pub fn cudaGetDriverEntryPoint(
18530 symbol: *const ::std::os::raw::c_char,
18531 funcPtr: *mut *mut ::std::os::raw::c_void,
18532 flags: ::std::os::raw::c_ulonglong,
18533 driverStatus: *mut cudaDriverEntryPointQueryResult,
18534 ) -> cudaError_t;
18535}
18536extern "C" {
18537 pub fn cudaGetDriverEntryPointByVersion(
18538 symbol: *const ::std::os::raw::c_char,
18539 funcPtr: *mut *mut ::std::os::raw::c_void,
18540 cudaVersion: ::std::os::raw::c_uint,
18541 flags: ::std::os::raw::c_ulonglong,
18542 driverStatus: *mut cudaDriverEntryPointQueryResult,
18543 ) -> cudaError_t;
18544}
18545extern "C" {
18546 #[doc = " \\cond impl_private"]
18547 pub fn cudaGetExportTable(
18548 ppExportTable: *mut *const ::std::os::raw::c_void,
18549 pExportTableId: *const cudaUUID_t,
18550 ) -> cudaError_t;
18551}
18552extern "C" {
18553 #[doc = " \\brief Get pointer to device entry function that matches entry function \\p symbolPtr\n\n Returns in \\p functionPtr the device entry function corresponding to the symbol \\p symbolPtr.\n\n \\param functionPtr - Returns the device entry function\n \\param symbolPtr - Pointer to device entry function to search for\n\n \\return\n ::cudaSuccess\n"]
18554 pub fn cudaGetFuncBySymbol(
18555 functionPtr: *mut cudaFunction_t,
18556 symbolPtr: *const ::std::os::raw::c_void,
18557 ) -> cudaError_t;
18558}
18559extern "C" {
18560 #[doc = " \\brief Get pointer to device kernel that matches entry function \\p entryFuncAddr\n\n Returns in \\p kernelPtr the device kernel corresponding to the entry function \\p entryFuncAddr.\n\n \\param kernelPtr - Returns the device kernel\n \\param entryFuncAddr - Address of device entry function to search kernel for\n\n \\return\n ::cudaSuccess\n\n \\sa\n \\ref ::cudaGetKernel(cudaKernel_t *kernelPtr, const T *entryFuncAddr) \"cudaGetKernel (C++ API)\""]
18561 pub fn cudaGetKernel(
18562 kernelPtr: *mut cudaKernel_t,
18563 entryFuncAddr: *const ::std::os::raw::c_void,
18564 ) -> cudaError_t;
18565}