1#[repr(C)]
4#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
5pub struct __BindgenBitfieldUnit<Storage> {
6 storage: Storage,
7}
8impl<Storage> __BindgenBitfieldUnit<Storage> {
9 #[inline]
10 pub const fn new(storage: Storage) -> Self {
11 Self { storage }
12 }
13}
14impl<Storage> __BindgenBitfieldUnit<Storage>
15where
16 Storage: AsRef<[u8]> + AsMut<[u8]>,
17{
18 #[inline]
19 pub fn get_bit(&self, index: usize) -> bool {
20 debug_assert!(index / 8 < self.storage.as_ref().len());
21 let byte_index = index / 8;
22 let byte = self.storage.as_ref()[byte_index];
23 let bit_index = if cfg!(target_endian = "big") {
24 7 - (index % 8)
25 } else {
26 index % 8
27 };
28 let mask = 1 << bit_index;
29 byte & mask == mask
30 }
31 #[inline]
32 pub fn set_bit(&mut self, index: usize, val: bool) {
33 debug_assert!(index / 8 < self.storage.as_ref().len());
34 let byte_index = index / 8;
35 let byte = &mut self.storage.as_mut()[byte_index];
36 let bit_index = if cfg!(target_endian = "big") {
37 7 - (index % 8)
38 } else {
39 index % 8
40 };
41 let mask = 1 << bit_index;
42 if val {
43 *byte |= mask;
44 } else {
45 *byte &= !mask;
46 }
47 }
48 #[inline]
49 pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
50 debug_assert!(bit_width <= 64);
51 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
52 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
53 let mut val = 0;
54 for i in 0..(bit_width as usize) {
55 if self.get_bit(i + bit_offset) {
56 let index = if cfg!(target_endian = "big") {
57 bit_width as usize - 1 - i
58 } else {
59 i
60 };
61 val |= 1 << index;
62 }
63 }
64 val
65 }
66 #[inline]
67 pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
68 debug_assert!(bit_width <= 64);
69 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
70 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
71 for i in 0..(bit_width as usize) {
72 let mask = 1 << i;
73 let val_bit_is_set = val & mask == mask;
74 let index = if cfg!(target_endian = "big") {
75 bit_width as usize - 1 - i
76 } else {
77 i
78 };
79 self.set_bit(index + bit_offset, val_bit_is_set);
80 }
81 }
82}
83pub const __HIP_ARCH_HAS_GLOBAL_INT32_ATOMICS__: u32 = 0;
84pub const __HIP_ARCH_HAS_GLOBAL_FLOAT_ATOMIC_EXCH__: u32 = 0;
85pub const __HIP_ARCH_HAS_SHARED_INT32_ATOMICS__: u32 = 0;
86pub const __HIP_ARCH_HAS_SHARED_FLOAT_ATOMIC_EXCH__: u32 = 0;
87pub const __HIP_ARCH_HAS_FLOAT_ATOMIC_ADD__: u32 = 0;
88pub const __HIP_ARCH_HAS_GLOBAL_INT64_ATOMICS__: u32 = 0;
89pub const __HIP_ARCH_HAS_SHARED_INT64_ATOMICS__: u32 = 0;
90pub const __HIP_ARCH_HAS_DOUBLES__: u32 = 0;
91pub const __HIP_ARCH_HAS_WARP_VOTE__: u32 = 0;
92pub const __HIP_ARCH_HAS_WARP_BALLOT__: u32 = 0;
93pub const __HIP_ARCH_HAS_WARP_SHUFFLE__: u32 = 0;
94pub const __HIP_ARCH_HAS_WARP_FUNNEL_SHIFT__: u32 = 0;
95pub const __HIP_ARCH_HAS_THREAD_FENCE_SYSTEM__: u32 = 0;
96pub const __HIP_ARCH_HAS_SYNC_THREAD_EXT__: u32 = 0;
97pub const __HIP_ARCH_HAS_SURFACE_FUNCS__: u32 = 0;
98pub const __HIP_ARCH_HAS_3DGRID__: u32 = 0;
99pub const __HIP_ARCH_HAS_DYNAMIC_PARALLEL__: u32 = 0;
100pub const _FEATURES_H: u32 = 1;
101pub const _DEFAULT_SOURCE: u32 = 1;
102pub const __GLIBC_USE_ISOC2X: u32 = 0;
103pub const __USE_ISOC11: u32 = 1;
104pub const __USE_ISOC99: u32 = 1;
105pub const __USE_ISOC95: u32 = 1;
106pub const __USE_POSIX_IMPLICITLY: u32 = 1;
107pub const _POSIX_SOURCE: u32 = 1;
108pub const _POSIX_C_SOURCE: u32 = 200809;
109pub const __USE_POSIX: u32 = 1;
110pub const __USE_POSIX2: u32 = 1;
111pub const __USE_POSIX199309: u32 = 1;
112pub const __USE_POSIX199506: u32 = 1;
113pub const __USE_XOPEN2K: u32 = 1;
114pub const __USE_XOPEN2K8: u32 = 1;
115pub const _ATFILE_SOURCE: u32 = 1;
116pub const __WORDSIZE: u32 = 64;
117pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
118pub const __SYSCALL_WORDSIZE: u32 = 64;
119pub const __TIMESIZE: u32 = 64;
120pub const __USE_MISC: u32 = 1;
121pub const __USE_ATFILE: u32 = 1;
122pub const __USE_FORTIFY_LEVEL: u32 = 0;
123pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
124pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
125pub const __GLIBC_USE_C2X_STRTOL: u32 = 0;
126pub const _STDC_PREDEF_H: u32 = 1;
127pub const __STDC_IEC_559__: u32 = 1;
128pub const __STDC_IEC_60559_BFP__: u32 = 201404;
129pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
130pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
131pub const __STDC_ISO_10646__: u32 = 201706;
132pub const __GNU_LIBRARY__: u32 = 6;
133pub const __GLIBC__: u32 = 2;
134pub const __GLIBC_MINOR__: u32 = 39;
135pub const _SYS_CDEFS_H: u32 = 1;
136pub const __glibc_c99_flexarr_available: u32 = 1;
137pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
138pub const __HAVE_GENERIC_SELECTION: u32 = 1;
139pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
140pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
141pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
142pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
143pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
144pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
145pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
146pub const _STDLIB_H: u32 = 1;
147pub const WNOHANG: u32 = 1;
148pub const WUNTRACED: u32 = 2;
149pub const WSTOPPED: u32 = 2;
150pub const WEXITED: u32 = 4;
151pub const WCONTINUED: u32 = 8;
152pub const WNOWAIT: u32 = 16777216;
153pub const __WNOTHREAD: u32 = 536870912;
154pub const __WALL: u32 = 1073741824;
155pub const __WCLONE: u32 = 2147483648;
156pub const __W_CONTINUED: u32 = 65535;
157pub const __WCOREFLAG: u32 = 128;
158pub const __HAVE_FLOAT128: u32 = 0;
159pub const __HAVE_DISTINCT_FLOAT128: u32 = 0;
160pub const __HAVE_FLOAT64X: u32 = 1;
161pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
162pub const __HAVE_FLOAT16: u32 = 0;
163pub const __HAVE_FLOAT32: u32 = 1;
164pub const __HAVE_FLOAT64: u32 = 1;
165pub const __HAVE_FLOAT32X: u32 = 1;
166pub const __HAVE_FLOAT128X: u32 = 0;
167pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
168pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
169pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
170pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
171pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
172pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
173pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
174pub const __ldiv_t_defined: u32 = 1;
175pub const __lldiv_t_defined: u32 = 1;
176pub const RAND_MAX: u32 = 2147483647;
177pub const EXIT_FAILURE: u32 = 1;
178pub const EXIT_SUCCESS: u32 = 0;
179pub const _SYS_TYPES_H: u32 = 1;
180pub const _BITS_TYPES_H: u32 = 1;
181pub const _BITS_TYPESIZES_H: u32 = 1;
182pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
183pub const __INO_T_MATCHES_INO64_T: u32 = 1;
184pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
185pub const __STATFS_MATCHES_STATFS64: u32 = 1;
186pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
187pub const __FD_SETSIZE: u32 = 1024;
188pub const _BITS_TIME64_H: u32 = 1;
189pub const __clock_t_defined: u32 = 1;
190pub const __clockid_t_defined: u32 = 1;
191pub const __time_t_defined: u32 = 1;
192pub const __timer_t_defined: u32 = 1;
193pub const _BITS_STDINT_INTN_H: u32 = 1;
194pub const __BIT_TYPES_DEFINED__: u32 = 1;
195pub const _ENDIAN_H: u32 = 1;
196pub const _BITS_ENDIAN_H: u32 = 1;
197pub const __LITTLE_ENDIAN: u32 = 1234;
198pub const __BIG_ENDIAN: u32 = 4321;
199pub const __PDP_ENDIAN: u32 = 3412;
200pub const _BITS_ENDIANNESS_H: u32 = 1;
201pub const __BYTE_ORDER: u32 = 1234;
202pub const __FLOAT_WORD_ORDER: u32 = 1234;
203pub const LITTLE_ENDIAN: u32 = 1234;
204pub const BIG_ENDIAN: u32 = 4321;
205pub const PDP_ENDIAN: u32 = 3412;
206pub const BYTE_ORDER: u32 = 1234;
207pub const _BITS_BYTESWAP_H: u32 = 1;
208pub const _BITS_UINTN_IDENTITY_H: u32 = 1;
209pub const _SYS_SELECT_H: u32 = 1;
210pub const __sigset_t_defined: u32 = 1;
211pub const __timeval_defined: u32 = 1;
212pub const _STRUCT_TIMESPEC: u32 = 1;
213pub const FD_SETSIZE: u32 = 1024;
214pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
215pub const _THREAD_SHARED_TYPES_H: u32 = 1;
216pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
217pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40;
218pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56;
219pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56;
220pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32;
221pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4;
222pub const __SIZEOF_PTHREAD_COND_T: u32 = 48;
223pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4;
224pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8;
225pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4;
226pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1;
227pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1;
228pub const __have_pthread_attr_t: u32 = 1;
229pub const _ALLOCA_H: u32 = 1;
230pub const _LIBC_LIMITS_H_: u32 = 1;
231pub const MB_LEN_MAX: u32 = 16;
232pub const _BITS_POSIX1_LIM_H: u32 = 1;
233pub const _POSIX_AIO_LISTIO_MAX: u32 = 2;
234pub const _POSIX_AIO_MAX: u32 = 1;
235pub const _POSIX_ARG_MAX: u32 = 4096;
236pub const _POSIX_CHILD_MAX: u32 = 25;
237pub const _POSIX_DELAYTIMER_MAX: u32 = 32;
238pub const _POSIX_HOST_NAME_MAX: u32 = 255;
239pub const _POSIX_LINK_MAX: u32 = 8;
240pub const _POSIX_LOGIN_NAME_MAX: u32 = 9;
241pub const _POSIX_MAX_CANON: u32 = 255;
242pub const _POSIX_MAX_INPUT: u32 = 255;
243pub const _POSIX_MQ_OPEN_MAX: u32 = 8;
244pub const _POSIX_MQ_PRIO_MAX: u32 = 32;
245pub const _POSIX_NAME_MAX: u32 = 14;
246pub const _POSIX_NGROUPS_MAX: u32 = 8;
247pub const _POSIX_OPEN_MAX: u32 = 20;
248pub const _POSIX_PATH_MAX: u32 = 256;
249pub const _POSIX_PIPE_BUF: u32 = 512;
250pub const _POSIX_RE_DUP_MAX: u32 = 255;
251pub const _POSIX_RTSIG_MAX: u32 = 8;
252pub const _POSIX_SEM_NSEMS_MAX: u32 = 256;
253pub const _POSIX_SEM_VALUE_MAX: u32 = 32767;
254pub const _POSIX_SIGQUEUE_MAX: u32 = 32;
255pub const _POSIX_SSIZE_MAX: u32 = 32767;
256pub const _POSIX_STREAM_MAX: u32 = 8;
257pub const _POSIX_SYMLINK_MAX: u32 = 255;
258pub const _POSIX_SYMLOOP_MAX: u32 = 8;
259pub const _POSIX_TIMER_MAX: u32 = 32;
260pub const _POSIX_TTY_NAME_MAX: u32 = 9;
261pub const _POSIX_TZNAME_MAX: u32 = 6;
262pub const _POSIX_CLOCKRES_MIN: u32 = 20000000;
263pub const NR_OPEN: u32 = 1024;
264pub const NGROUPS_MAX: u32 = 65536;
265pub const ARG_MAX: u32 = 131072;
266pub const LINK_MAX: u32 = 127;
267pub const MAX_CANON: u32 = 255;
268pub const MAX_INPUT: u32 = 255;
269pub const NAME_MAX: u32 = 255;
270pub const PATH_MAX: u32 = 4096;
271pub const PIPE_BUF: u32 = 4096;
272pub const XATTR_NAME_MAX: u32 = 255;
273pub const XATTR_SIZE_MAX: u32 = 65536;
274pub const XATTR_LIST_MAX: u32 = 65536;
275pub const RTSIG_MAX: u32 = 32;
276pub const _POSIX_THREAD_KEYS_MAX: u32 = 128;
277pub const PTHREAD_KEYS_MAX: u32 = 1024;
278pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
279pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
280pub const _POSIX_THREAD_THREADS_MAX: u32 = 64;
281pub const AIO_PRIO_DELTA_MAX: u32 = 20;
282pub const PTHREAD_STACK_MIN: u32 = 16384;
283pub const DELAYTIMER_MAX: u32 = 2147483647;
284pub const TTY_NAME_MAX: u32 = 32;
285pub const LOGIN_NAME_MAX: u32 = 256;
286pub const HOST_NAME_MAX: u32 = 64;
287pub const MQ_PRIO_MAX: u32 = 32768;
288pub const SEM_VALUE_MAX: u32 = 2147483647;
289pub const _BITS_POSIX2_LIM_H: u32 = 1;
290pub const _POSIX2_BC_BASE_MAX: u32 = 99;
291pub const _POSIX2_BC_DIM_MAX: u32 = 2048;
292pub const _POSIX2_BC_SCALE_MAX: u32 = 99;
293pub const _POSIX2_BC_STRING_MAX: u32 = 1000;
294pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2;
295pub const _POSIX2_EXPR_NEST_MAX: u32 = 32;
296pub const _POSIX2_LINE_MAX: u32 = 2048;
297pub const _POSIX2_RE_DUP_MAX: u32 = 255;
298pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14;
299pub const BC_BASE_MAX: u32 = 99;
300pub const BC_DIM_MAX: u32 = 2048;
301pub const BC_SCALE_MAX: u32 = 99;
302pub const BC_STRING_MAX: u32 = 1000;
303pub const COLL_WEIGHTS_MAX: u32 = 255;
304pub const EXPR_NEST_MAX: u32 = 32;
305pub const LINE_MAX: u32 = 2048;
306pub const CHARCLASS_NAME_MAX: u32 = 2048;
307pub const RE_DUP_MAX: u32 = 32767;
308pub const _STDINT_H: u32 = 1;
309pub const _BITS_WCHAR_H: u32 = 1;
310pub const _BITS_STDINT_UINTN_H: u32 = 1;
311pub const _BITS_STDINT_LEAST_H: u32 = 1;
312pub const INT8_MIN: i32 = -128;
313pub const INT16_MIN: i32 = -32768;
314pub const INT32_MIN: i32 = -2147483648;
315pub const INT8_MAX: u32 = 127;
316pub const INT16_MAX: u32 = 32767;
317pub const INT32_MAX: u32 = 2147483647;
318pub const UINT8_MAX: u32 = 255;
319pub const UINT16_MAX: u32 = 65535;
320pub const UINT32_MAX: u32 = 4294967295;
321pub const INT_LEAST8_MIN: i32 = -128;
322pub const INT_LEAST16_MIN: i32 = -32768;
323pub const INT_LEAST32_MIN: i32 = -2147483648;
324pub const INT_LEAST8_MAX: u32 = 127;
325pub const INT_LEAST16_MAX: u32 = 32767;
326pub const INT_LEAST32_MAX: u32 = 2147483647;
327pub const UINT_LEAST8_MAX: u32 = 255;
328pub const UINT_LEAST16_MAX: u32 = 65535;
329pub const UINT_LEAST32_MAX: u32 = 4294967295;
330pub const INT_FAST8_MIN: i32 = -128;
331pub const INT_FAST16_MIN: i64 = -9223372036854775808;
332pub const INT_FAST32_MIN: i64 = -9223372036854775808;
333pub const INT_FAST8_MAX: u32 = 127;
334pub const INT_FAST16_MAX: u64 = 9223372036854775807;
335pub const INT_FAST32_MAX: u64 = 9223372036854775807;
336pub const UINT_FAST8_MAX: u32 = 255;
337pub const UINT_FAST16_MAX: i32 = -1;
338pub const UINT_FAST32_MAX: i32 = -1;
339pub const INTPTR_MIN: i64 = -9223372036854775808;
340pub const INTPTR_MAX: u64 = 9223372036854775807;
341pub const UINTPTR_MAX: i32 = -1;
342pub const PTRDIFF_MIN: i64 = -9223372036854775808;
343pub const PTRDIFF_MAX: u64 = 9223372036854775807;
344pub const SIG_ATOMIC_MIN: i32 = -2147483648;
345pub const SIG_ATOMIC_MAX: u32 = 2147483647;
346pub const SIZE_MAX: i32 = -1;
347pub const WINT_MIN: u32 = 0;
348pub const WINT_MAX: u32 = 4294967295;
349pub const HIP_VERSION_MAJOR: u32 = 7;
350pub const HIP_VERSION_MINOR: u32 = 1;
351pub const HIP_VERSION_PATCH: u32 = 52802;
352pub const HIP_VERSION_GITHASH: &[u8; 11] = b"26aae437f6\0";
353pub const HIP_VERSION_BUILD_ID: u32 = 0;
354pub const HIP_VERSION_BUILD_NAME: &[u8; 1] = b"\0";
355pub const HIP_VERSION: u32 = 70152802;
356pub const __HIP_HAS_GET_PCH: u32 = 1;
357pub const GENERIC_GRID_LAUNCH: u32 = 1;
358pub const HIP_TRSA_OVERRIDE_FORMAT: u32 = 1;
359pub const HIP_TRSF_READ_AS_INTEGER: u32 = 1;
360pub const HIP_TRSF_NORMALIZED_COORDINATES: u32 = 2;
361pub const HIP_TRSF_SRGB: u32 = 16;
362pub const __HIP_USE_NATIVE_VECTOR__: u32 = 1;
363pub const hipTextureType1D: u32 = 1;
364pub const hipTextureType2D: u32 = 2;
365pub const hipTextureType3D: u32 = 3;
366pub const hipTextureTypeCubemap: u32 = 12;
367pub const hipTextureType1DLayered: u32 = 241;
368pub const hipTextureType2DLayered: u32 = 242;
369pub const hipTextureTypeCubemapLayered: u32 = 252;
370pub const HIP_IMAGE_OBJECT_SIZE_DWORD: u32 = 12;
371pub const HIP_SAMPLER_OBJECT_SIZE_DWORD: u32 = 8;
372pub const HIP_SAMPLER_OBJECT_OFFSET_DWORD: u32 = 12;
373pub const HIP_TEXTURE_OBJECT_SIZE_DWORD: u32 = 20;
374pub const HIP_DEPRECATED_MSG : & [u8 ; 189] = b"This API is marked as deprecated and might not be supported in future releases. For more details please refer https://github.com/ROCm/HIP/blob/develop/docs/reference/deprecated_api_list.md\0" ;
375pub const hipIpcMemLazyEnablePeerAccess: u32 = 1;
376pub const HIP_IPC_HANDLE_SIZE: u32 = 64;
377pub const hipStreamDefault: u32 = 0;
378pub const hipStreamNonBlocking: u32 = 1;
379pub const hipEventDefault: u32 = 0;
380pub const hipEventBlockingSync: u32 = 1;
381pub const hipEventDisableTiming: u32 = 2;
382pub const hipEventInterprocess: u32 = 4;
383pub const hipEventRecordDefault: u32 = 0;
384pub const hipEventRecordExternal: u32 = 1;
385pub const hipEventWaitDefault: u32 = 0;
386pub const hipEventWaitExternal: u32 = 1;
387pub const hipEventDisableSystemFence: u32 = 536870912;
388pub const hipEventReleaseToDevice: u32 = 1073741824;
389pub const hipEventReleaseToSystem: u32 = 2147483648;
390pub const hipEnableDefault: u32 = 0;
391pub const hipEnableLegacyStream: u32 = 1;
392pub const hipEnablePerThreadDefaultStream: u32 = 2;
393pub const hipHostAllocDefault: u32 = 0;
394pub const hipHostMallocDefault: u32 = 0;
395pub const hipHostAllocPortable: u32 = 1;
396pub const hipHostMallocPortable: u32 = 1;
397pub const hipHostAllocMapped: u32 = 2;
398pub const hipHostMallocMapped: u32 = 2;
399pub const hipHostAllocWriteCombined: u32 = 4;
400pub const hipHostMallocWriteCombined: u32 = 4;
401pub const hipHostMallocUncached: u32 = 268435456;
402pub const hipHostAllocUncached: u32 = 268435456;
403pub const hipHostMallocNumaUser: u32 = 536870912;
404pub const hipHostMallocCoherent: u32 = 1073741824;
405pub const hipHostMallocNonCoherent: u32 = 2147483648;
406pub const hipMemAttachGlobal: u32 = 1;
407pub const hipMemAttachHost: u32 = 2;
408pub const hipMemAttachSingle: u32 = 4;
409pub const hipDeviceMallocDefault: u32 = 0;
410pub const hipDeviceMallocFinegrained: u32 = 1;
411pub const hipMallocSignalMemory: u32 = 2;
412pub const hipDeviceMallocUncached: u32 = 3;
413pub const hipDeviceMallocContiguous: u32 = 4;
414pub const hipHostRegisterDefault: u32 = 0;
415pub const hipHostRegisterPortable: u32 = 1;
416pub const hipHostRegisterMapped: u32 = 2;
417pub const hipHostRegisterIoMemory: u32 = 4;
418pub const hipHostRegisterReadOnly: u32 = 8;
419pub const hipExtHostRegisterCoarseGrained: u32 = 8;
420pub const hipExtHostRegisterUncached: u32 = 2147483648;
421pub const hipDeviceScheduleAuto: u32 = 0;
422pub const hipDeviceScheduleSpin: u32 = 1;
423pub const hipDeviceScheduleYield: u32 = 2;
424pub const hipDeviceScheduleBlockingSync: u32 = 4;
425pub const hipDeviceScheduleMask: u32 = 7;
426pub const hipDeviceMapHost: u32 = 8;
427pub const hipDeviceLmemResizeToMax: u32 = 16;
428pub const hipArrayDefault: u32 = 0;
429pub const hipArrayLayered: u32 = 1;
430pub const hipArraySurfaceLoadStore: u32 = 2;
431pub const hipArrayCubemap: u32 = 4;
432pub const hipArrayTextureGather: u32 = 8;
433pub const hipOccupancyDefault: u32 = 0;
434pub const hipOccupancyDisableCachingOverride: u32 = 1;
435pub const hipCooperativeLaunchMultiDeviceNoPreSync: u32 = 1;
436pub const hipCooperativeLaunchMultiDeviceNoPostSync: u32 = 2;
437pub const hipExtAnyOrderLaunch: u32 = 1;
438pub const hipStreamWaitValueGte: u32 = 0;
439pub const hipStreamWaitValueEq: u32 = 1;
440pub const hipStreamWaitValueAnd: u32 = 2;
441pub const hipStreamWaitValueNor: u32 = 3;
442pub const hipExternalMemoryDedicated: u32 = 1;
443pub const hipGraphKernelNodePortDefault: u32 = 0;
444pub const hipGraphKernelNodePortLaunchCompletion: u32 = 2;
445pub const hipGraphKernelNodePortProgrammatic: u32 = 1;
446#[doc = "< CUDA Only Maximum registers may be used in a thread,\n< passed to compiler"]
447pub const hipJitOption_hipJitOptionMaxRegisters: hipJitOption = 0;
448#[doc = "< CUDA Only Number of thread per block"]
449pub const hipJitOption_hipJitOptionThreadsPerBlock: hipJitOption = 1;
450#[doc = "< CUDA Only Value for total wall clock time"]
451pub const hipJitOption_hipJitOptionWallTime: hipJitOption = 2;
452#[doc = "< CUDA Only Pointer to the buffer with logged information"]
453pub const hipJitOption_hipJitOptionInfoLogBuffer: hipJitOption = 3;
454#[doc = "< CUDA Only Size of the buffer in bytes for logged info"]
455pub const hipJitOption_hipJitOptionInfoLogBufferSizeBytes: hipJitOption = 4;
456#[doc = "< CUDA Only Pointer to the buffer with logged error(s)"]
457pub const hipJitOption_hipJitOptionErrorLogBuffer: hipJitOption = 5;
458#[doc = "< CUDA Only Size of the buffer in bytes for logged\n< error(s)"]
459pub const hipJitOption_hipJitOptionErrorLogBufferSizeBytes: hipJitOption = 6;
460#[doc = "< Value of optimization level for generated codes, acceptable\n< options -O0, -O1, -O2, -O3"]
461pub const hipJitOption_hipJitOptionOptimizationLevel: hipJitOption = 7;
462#[doc = "< CUDA Only The target context, which is the default"]
463pub const hipJitOption_hipJitOptionTargetFromContext: hipJitOption = 8;
464#[doc = "< CUDA Only JIT target"]
465pub const hipJitOption_hipJitOptionTarget: hipJitOption = 9;
466#[doc = "< CUDA Only Fallback strategy"]
467pub const hipJitOption_hipJitOptionFallbackStrategy: hipJitOption = 10;
468#[doc = "< CUDA Only Generate debug information"]
469pub const hipJitOption_hipJitOptionGenerateDebugInfo: hipJitOption = 11;
470#[doc = "< CUDA Only Generate log verbose"]
471pub const hipJitOption_hipJitOptionLogVerbose: hipJitOption = 12;
472#[doc = "< CUDA Only Generate line number information"]
473pub const hipJitOption_hipJitOptionGenerateLineInfo: hipJitOption = 13;
474#[doc = "< CUDA Only Set cache mode"]
475pub const hipJitOption_hipJitOptionCacheMode: hipJitOption = 14;
476#[doc = "< @deprecated CUDA Only New SM3X option."]
477pub const hipJitOption_hipJitOptionSm3xOpt: hipJitOption = 15;
478#[doc = "< CUDA Only Set fast compile"]
479pub const hipJitOption_hipJitOptionFastCompile: hipJitOption = 16;
480#[doc = "< CUDA Only Array of device symbol names to be relocated to the\n< host"]
481pub const hipJitOption_hipJitOptionGlobalSymbolNames: hipJitOption = 17;
482#[doc = "< CUDA Only Array of host addresses to be relocated to the\n< device"]
483pub const hipJitOption_hipJitOptionGlobalSymbolAddresses: hipJitOption = 18;
484#[doc = "< CUDA Only Number of symbol count."]
485pub const hipJitOption_hipJitOptionGlobalSymbolCount: hipJitOption = 19;
486#[doc = "< @deprecated CUDA Only Enable link-time optimization for device code"]
487pub const hipJitOption_hipJitOptionLto: hipJitOption = 20;
488#[doc = "< @deprecated CUDA Only Set single-precision denormals."]
489pub const hipJitOption_hipJitOptionFtz: hipJitOption = 21;
490#[doc = "< @deprecated CUDA Only Set single-precision floating-point division\n< and reciprocals"]
491pub const hipJitOption_hipJitOptionPrecDiv: hipJitOption = 22;
492#[doc = "< @deprecated CUDA Only Set single-precision floating-point square root"]
493pub const hipJitOption_hipJitOptionPrecSqrt: hipJitOption = 23;
494#[doc = "< @deprecated CUDA Only Enable floating-point multiplies and\n< adds/subtracts operations"]
495pub const hipJitOption_hipJitOptionFma: hipJitOption = 24;
496#[doc = "< CUDA Only Generates Position Independent code"]
497pub const hipJitOption_hipJitOptionPositionIndependentCode: hipJitOption = 25;
498#[doc = "< CUDA Only Hints to JIT compiler the minimum number of CTAs frin\n< kernel's grid to be mapped to SM"]
499pub const hipJitOption_hipJitOptionMinCTAPerSM: hipJitOption = 26;
500#[doc = "< CUDA only Maximum number of threads in a thread block"]
501pub const hipJitOption_hipJitOptionMaxThreadsPerBlock: hipJitOption = 27;
502#[doc = "< Cuda only Override Directive values"]
503pub const hipJitOption_hipJitOptionOverrideDirectiveValues: hipJitOption = 28;
504#[doc = "< Number of options"]
505pub const hipJitOption_hipJitOptionNumOptions: hipJitOption = 29;
506#[doc = "< Hip Only Linker options to be passed on to compiler"]
507pub const hipJitOption_hipJitOptionIRtoISAOptExt: hipJitOption = 10000;
508#[doc = "< Hip Only Count of linker options to be passed on to compiler"]
509pub const hipJitOption_hipJitOptionIRtoISAOptCountExt: hipJitOption = 10001;
510#[doc = " hipJitOption"]
511pub type hipJitOption = ::std::os::raw::c_uint;
512#[doc = "< Cuda only Input cubin"]
513pub const hipJitInputType_hipJitInputCubin: hipJitInputType = 0;
514#[doc = "< Cuda only Input PTX"]
515pub const hipJitInputType_hipJitInputPtx: hipJitInputType = 1;
516#[doc = "< Cuda Only Input FAT Binary"]
517pub const hipJitInputType_hipJitInputFatBinary: hipJitInputType = 2;
518#[doc = "< Cuda Only Host Object with embedded device code"]
519pub const hipJitInputType_hipJitInputObject: hipJitInputType = 3;
520#[doc = "< Cuda Only Archive of Host Objects with embedded\n< device code"]
521pub const hipJitInputType_hipJitInputLibrary: hipJitInputType = 4;
522#[doc = "< @deprecated Cuda only High Level intermediate\n< code for LTO"]
523pub const hipJitInputType_hipJitInputNvvm: hipJitInputType = 5;
524#[doc = "< Count of Legacy Input Types"]
525pub const hipJitInputType_hipJitNumLegacyInputTypes: hipJitInputType = 6;
526#[doc = "< HIP Only LLVM Bitcode or IR assembly"]
527pub const hipJitInputType_hipJitInputLLVMBitcode: hipJitInputType = 100;
528#[doc = "< HIP Only LLVM Clang Bundled Code"]
529pub const hipJitInputType_hipJitInputLLVMBundledBitcode: hipJitInputType = 101;
530#[doc = "< HIP Only LLVM Archive of Bundled Bitcode"]
531pub const hipJitInputType_hipJitInputLLVMArchivesOfBundledBitcode: hipJitInputType = 102;
532#[doc = "< HIP Only SPIRV Code Object"]
533pub const hipJitInputType_hipJitInputSpirv: hipJitInputType = 103;
534#[doc = "< Count of Input Types"]
535pub const hipJitInputType_hipJitNumInputTypes: hipJitInputType = 10;
536#[doc = " hipJitInputType"]
537pub type hipJitInputType = ::std::os::raw::c_uint;
538pub const hipJitCacheMode_hipJitCacheOptionNone: hipJitCacheMode = 0;
539pub const hipJitCacheMode_hipJitCacheOptionCG: hipJitCacheMode = 1;
540pub const hipJitCacheMode_hipJitCacheOptionCA: hipJitCacheMode = 2;
541#[doc = " hipJitCacheMode"]
542pub type hipJitCacheMode = ::std::os::raw::c_uint;
543pub const hipJitFallback_hipJitPreferPTX: hipJitFallback = 0;
544pub const hipJitFallback_hipJitPreferBinary: hipJitFallback = 1;
545#[doc = " hipJitFallback"]
546pub type hipJitFallback = ::std::os::raw::c_uint;
547pub const hipLibraryOption_e_hipLibraryHostUniversalFunctionAndDataTable: hipLibraryOption_e = 0;
548pub const hipLibraryOption_e_hipLibraryBinaryIsPreserved: hipLibraryOption_e = 1;
549pub type hipLibraryOption_e = ::std::os::raw::c_uint;
550pub use self::hipLibraryOption_e as hipLibraryOption;
551pub type wchar_t = ::std::os::raw::c_int;
552pub type _Float32 = f32;
553pub type _Float64 = f64;
554pub type _Float32x = f64;
555pub type _Float64x = u128;
556#[repr(C)]
557#[derive(Debug, Copy, Clone)]
558pub struct div_t {
559 pub quot: ::std::os::raw::c_int,
560 pub rem: ::std::os::raw::c_int,
561}
562#[repr(C)]
563#[derive(Debug, Copy, Clone)]
564pub struct ldiv_t {
565 pub quot: ::std::os::raw::c_long,
566 pub rem: ::std::os::raw::c_long,
567}
568#[repr(C)]
569#[derive(Debug, Copy, Clone)]
570pub struct lldiv_t {
571 pub quot: ::std::os::raw::c_longlong,
572 pub rem: ::std::os::raw::c_longlong,
573}
574extern "C" {
575 pub fn __ctype_get_mb_cur_max() -> usize;
576}
577extern "C" {
578 pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64;
579}
580extern "C" {
581 pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
582}
583extern "C" {
584 pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
585}
586extern "C" {
587 pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong;
588}
589extern "C" {
590 pub fn strtod(
591 __nptr: *const ::std::os::raw::c_char,
592 __endptr: *mut *mut ::std::os::raw::c_char,
593 ) -> f64;
594}
595extern "C" {
596 pub fn strtof(
597 __nptr: *const ::std::os::raw::c_char,
598 __endptr: *mut *mut ::std::os::raw::c_char,
599 ) -> f32;
600}
601extern "C" {
602 pub fn strtold(
603 __nptr: *const ::std::os::raw::c_char,
604 __endptr: *mut *mut ::std::os::raw::c_char,
605 ) -> u128;
606}
607extern "C" {
608 pub fn strtol(
609 __nptr: *const ::std::os::raw::c_char,
610 __endptr: *mut *mut ::std::os::raw::c_char,
611 __base: ::std::os::raw::c_int,
612 ) -> ::std::os::raw::c_long;
613}
614extern "C" {
615 pub fn strtoul(
616 __nptr: *const ::std::os::raw::c_char,
617 __endptr: *mut *mut ::std::os::raw::c_char,
618 __base: ::std::os::raw::c_int,
619 ) -> ::std::os::raw::c_ulong;
620}
621extern "C" {
622 pub fn strtoq(
623 __nptr: *const ::std::os::raw::c_char,
624 __endptr: *mut *mut ::std::os::raw::c_char,
625 __base: ::std::os::raw::c_int,
626 ) -> ::std::os::raw::c_longlong;
627}
628extern "C" {
629 pub fn strtouq(
630 __nptr: *const ::std::os::raw::c_char,
631 __endptr: *mut *mut ::std::os::raw::c_char,
632 __base: ::std::os::raw::c_int,
633 ) -> ::std::os::raw::c_ulonglong;
634}
635extern "C" {
636 pub fn strtoll(
637 __nptr: *const ::std::os::raw::c_char,
638 __endptr: *mut *mut ::std::os::raw::c_char,
639 __base: ::std::os::raw::c_int,
640 ) -> ::std::os::raw::c_longlong;
641}
642extern "C" {
643 pub fn strtoull(
644 __nptr: *const ::std::os::raw::c_char,
645 __endptr: *mut *mut ::std::os::raw::c_char,
646 __base: ::std::os::raw::c_int,
647 ) -> ::std::os::raw::c_ulonglong;
648}
649extern "C" {
650 pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char;
651}
652extern "C" {
653 pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
654}
655pub type __u_char = ::std::os::raw::c_uchar;
656pub type __u_short = ::std::os::raw::c_ushort;
657pub type __u_int = ::std::os::raw::c_uint;
658pub type __u_long = ::std::os::raw::c_ulong;
659pub type __int8_t = ::std::os::raw::c_schar;
660pub type __uint8_t = ::std::os::raw::c_uchar;
661pub type __int16_t = ::std::os::raw::c_short;
662pub type __uint16_t = ::std::os::raw::c_ushort;
663pub type __int32_t = ::std::os::raw::c_int;
664pub type __uint32_t = ::std::os::raw::c_uint;
665pub type __int64_t = ::std::os::raw::c_long;
666pub type __uint64_t = ::std::os::raw::c_ulong;
667pub type __int_least8_t = __int8_t;
668pub type __uint_least8_t = __uint8_t;
669pub type __int_least16_t = __int16_t;
670pub type __uint_least16_t = __uint16_t;
671pub type __int_least32_t = __int32_t;
672pub type __uint_least32_t = __uint32_t;
673pub type __int_least64_t = __int64_t;
674pub type __uint_least64_t = __uint64_t;
675pub type __quad_t = ::std::os::raw::c_long;
676pub type __u_quad_t = ::std::os::raw::c_ulong;
677pub type __intmax_t = ::std::os::raw::c_long;
678pub type __uintmax_t = ::std::os::raw::c_ulong;
679pub type __dev_t = ::std::os::raw::c_ulong;
680pub type __uid_t = ::std::os::raw::c_uint;
681pub type __gid_t = ::std::os::raw::c_uint;
682pub type __ino_t = ::std::os::raw::c_ulong;
683pub type __ino64_t = ::std::os::raw::c_ulong;
684pub type __mode_t = ::std::os::raw::c_uint;
685pub type __nlink_t = ::std::os::raw::c_ulong;
686pub type __off_t = ::std::os::raw::c_long;
687pub type __off64_t = ::std::os::raw::c_long;
688pub type __pid_t = ::std::os::raw::c_int;
689#[repr(C)]
690#[derive(Debug, Copy, Clone)]
691pub struct __fsid_t {
692 pub __val: [::std::os::raw::c_int; 2usize],
693}
694pub type __clock_t = ::std::os::raw::c_long;
695pub type __rlim_t = ::std::os::raw::c_ulong;
696pub type __rlim64_t = ::std::os::raw::c_ulong;
697pub type __id_t = ::std::os::raw::c_uint;
698pub type __time_t = ::std::os::raw::c_long;
699pub type __useconds_t = ::std::os::raw::c_uint;
700pub type __suseconds_t = ::std::os::raw::c_long;
701pub type __suseconds64_t = ::std::os::raw::c_long;
702pub type __daddr_t = ::std::os::raw::c_int;
703pub type __key_t = ::std::os::raw::c_int;
704pub type __clockid_t = ::std::os::raw::c_int;
705pub type __timer_t = *mut ::std::os::raw::c_void;
706pub type __blksize_t = ::std::os::raw::c_long;
707pub type __blkcnt_t = ::std::os::raw::c_long;
708pub type __blkcnt64_t = ::std::os::raw::c_long;
709pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
710pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
711pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
712pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
713pub type __fsword_t = ::std::os::raw::c_long;
714pub type __ssize_t = ::std::os::raw::c_long;
715pub type __syscall_slong_t = ::std::os::raw::c_long;
716pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
717pub type __loff_t = __off64_t;
718pub type __caddr_t = *mut ::std::os::raw::c_char;
719pub type __intptr_t = ::std::os::raw::c_long;
720pub type __socklen_t = ::std::os::raw::c_uint;
721pub type __sig_atomic_t = ::std::os::raw::c_int;
722pub type u_char = __u_char;
723pub type u_short = __u_short;
724pub type u_int = __u_int;
725pub type u_long = __u_long;
726pub type quad_t = __quad_t;
727pub type u_quad_t = __u_quad_t;
728pub type fsid_t = __fsid_t;
729pub type loff_t = __loff_t;
730pub type ino_t = __ino_t;
731pub type dev_t = __dev_t;
732pub type gid_t = __gid_t;
733pub type mode_t = __mode_t;
734pub type nlink_t = __nlink_t;
735pub type uid_t = __uid_t;
736pub type off_t = __off_t;
737pub type pid_t = __pid_t;
738pub type id_t = __id_t;
739pub type daddr_t = __daddr_t;
740pub type caddr_t = __caddr_t;
741pub type key_t = __key_t;
742pub type clock_t = __clock_t;
743pub type clockid_t = __clockid_t;
744pub type time_t = __time_t;
745pub type timer_t = __timer_t;
746pub type ulong = ::std::os::raw::c_ulong;
747pub type ushort = ::std::os::raw::c_ushort;
748pub type uint = ::std::os::raw::c_uint;
749pub type u_int8_t = __uint8_t;
750pub type u_int16_t = __uint16_t;
751pub type u_int32_t = __uint32_t;
752pub type u_int64_t = __uint64_t;
753pub type register_t = ::std::os::raw::c_long;
754#[repr(C)]
755#[derive(Debug, Copy, Clone)]
756pub struct __sigset_t {
757 pub __val: [::std::os::raw::c_ulong; 16usize],
758}
759pub type sigset_t = __sigset_t;
760#[repr(C)]
761#[derive(Debug, Copy, Clone)]
762pub struct timeval {
763 pub tv_sec: __time_t,
764 pub tv_usec: __suseconds_t,
765}
766#[repr(C)]
767#[derive(Debug, Copy, Clone)]
768pub struct timespec {
769 pub tv_sec: __time_t,
770 pub tv_nsec: __syscall_slong_t,
771}
772pub type suseconds_t = __suseconds_t;
773pub type __fd_mask = ::std::os::raw::c_long;
774#[repr(C)]
775#[derive(Debug, Copy, Clone)]
776pub struct fd_set {
777 pub __fds_bits: [__fd_mask; 16usize],
778}
779pub type fd_mask = __fd_mask;
780extern "C" {
781 pub fn select(
782 __nfds: ::std::os::raw::c_int,
783 __readfds: *mut fd_set,
784 __writefds: *mut fd_set,
785 __exceptfds: *mut fd_set,
786 __timeout: *mut timeval,
787 ) -> ::std::os::raw::c_int;
788}
789extern "C" {
790 pub fn pselect(
791 __nfds: ::std::os::raw::c_int,
792 __readfds: *mut fd_set,
793 __writefds: *mut fd_set,
794 __exceptfds: *mut fd_set,
795 __timeout: *const timespec,
796 __sigmask: *const __sigset_t,
797 ) -> ::std::os::raw::c_int;
798}
799pub type blksize_t = __blksize_t;
800pub type blkcnt_t = __blkcnt_t;
801pub type fsblkcnt_t = __fsblkcnt_t;
802pub type fsfilcnt_t = __fsfilcnt_t;
803#[repr(C)]
804#[derive(Copy, Clone)]
805pub union __atomic_wide_counter {
806 pub __value64: ::std::os::raw::c_ulonglong,
807 pub __value32: __atomic_wide_counter__bindgen_ty_1,
808}
809#[repr(C)]
810#[derive(Debug, Copy, Clone)]
811pub struct __atomic_wide_counter__bindgen_ty_1 {
812 pub __low: ::std::os::raw::c_uint,
813 pub __high: ::std::os::raw::c_uint,
814}
815#[repr(C)]
816#[derive(Debug, Copy, Clone)]
817pub struct __pthread_internal_list {
818 pub __prev: *mut __pthread_internal_list,
819 pub __next: *mut __pthread_internal_list,
820}
821pub type __pthread_list_t = __pthread_internal_list;
822#[repr(C)]
823#[derive(Debug, Copy, Clone)]
824pub struct __pthread_internal_slist {
825 pub __next: *mut __pthread_internal_slist,
826}
827pub type __pthread_slist_t = __pthread_internal_slist;
828#[repr(C)]
829#[derive(Debug, Copy, Clone)]
830pub struct __pthread_mutex_s {
831 pub __lock: ::std::os::raw::c_int,
832 pub __count: ::std::os::raw::c_uint,
833 pub __owner: ::std::os::raw::c_int,
834 pub __nusers: ::std::os::raw::c_uint,
835 pub __kind: ::std::os::raw::c_int,
836 pub __spins: ::std::os::raw::c_short,
837 pub __elision: ::std::os::raw::c_short,
838 pub __list: __pthread_list_t,
839}
840#[repr(C)]
841#[derive(Debug, Copy, Clone)]
842pub struct __pthread_rwlock_arch_t {
843 pub __readers: ::std::os::raw::c_uint,
844 pub __writers: ::std::os::raw::c_uint,
845 pub __wrphase_futex: ::std::os::raw::c_uint,
846 pub __writers_futex: ::std::os::raw::c_uint,
847 pub __pad3: ::std::os::raw::c_uint,
848 pub __pad4: ::std::os::raw::c_uint,
849 pub __cur_writer: ::std::os::raw::c_int,
850 pub __shared: ::std::os::raw::c_int,
851 pub __rwelision: ::std::os::raw::c_schar,
852 pub __pad1: [::std::os::raw::c_uchar; 7usize],
853 pub __pad2: ::std::os::raw::c_ulong,
854 pub __flags: ::std::os::raw::c_uint,
855}
856#[repr(C)]
857#[derive(Copy, Clone)]
858pub struct __pthread_cond_s {
859 pub __wseq: __atomic_wide_counter,
860 pub __g1_start: __atomic_wide_counter,
861 pub __g_refs: [::std::os::raw::c_uint; 2usize],
862 pub __g_size: [::std::os::raw::c_uint; 2usize],
863 pub __g1_orig_size: ::std::os::raw::c_uint,
864 pub __wrefs: ::std::os::raw::c_uint,
865 pub __g_signals: [::std::os::raw::c_uint; 2usize],
866}
867pub type __tss_t = ::std::os::raw::c_uint;
868pub type __thrd_t = ::std::os::raw::c_ulong;
869#[repr(C)]
870#[derive(Debug, Copy, Clone)]
871pub struct __once_flag {
872 pub __data: ::std::os::raw::c_int,
873}
874pub type pthread_t = ::std::os::raw::c_ulong;
875#[repr(C)]
876#[derive(Copy, Clone)]
877pub union pthread_mutexattr_t {
878 pub __size: [::std::os::raw::c_char; 4usize],
879 pub __align: ::std::os::raw::c_int,
880}
881#[repr(C)]
882#[derive(Copy, Clone)]
883pub union pthread_condattr_t {
884 pub __size: [::std::os::raw::c_char; 4usize],
885 pub __align: ::std::os::raw::c_int,
886}
887pub type pthread_key_t = ::std::os::raw::c_uint;
888pub type pthread_once_t = ::std::os::raw::c_int;
889#[repr(C)]
890#[derive(Copy, Clone)]
891pub union pthread_attr_t {
892 pub __size: [::std::os::raw::c_char; 56usize],
893 pub __align: ::std::os::raw::c_long,
894}
895#[repr(C)]
896#[derive(Copy, Clone)]
897pub union pthread_mutex_t {
898 pub __data: __pthread_mutex_s,
899 pub __size: [::std::os::raw::c_char; 40usize],
900 pub __align: ::std::os::raw::c_long,
901}
902#[repr(C)]
903#[derive(Copy, Clone)]
904pub union pthread_cond_t {
905 pub __data: __pthread_cond_s,
906 pub __size: [::std::os::raw::c_char; 48usize],
907 pub __align: ::std::os::raw::c_longlong,
908}
909#[repr(C)]
910#[derive(Copy, Clone)]
911pub union pthread_rwlock_t {
912 pub __data: __pthread_rwlock_arch_t,
913 pub __size: [::std::os::raw::c_char; 56usize],
914 pub __align: ::std::os::raw::c_long,
915}
916#[repr(C)]
917#[derive(Copy, Clone)]
918pub union pthread_rwlockattr_t {
919 pub __size: [::std::os::raw::c_char; 8usize],
920 pub __align: ::std::os::raw::c_long,
921}
922pub type pthread_spinlock_t = ::std::os::raw::c_int;
923#[repr(C)]
924#[derive(Copy, Clone)]
925pub union pthread_barrier_t {
926 pub __size: [::std::os::raw::c_char; 32usize],
927 pub __align: ::std::os::raw::c_long,
928}
929#[repr(C)]
930#[derive(Copy, Clone)]
931pub union pthread_barrierattr_t {
932 pub __size: [::std::os::raw::c_char; 4usize],
933 pub __align: ::std::os::raw::c_int,
934}
935extern "C" {
936 pub fn random() -> ::std::os::raw::c_long;
937}
938extern "C" {
939 pub fn srandom(__seed: ::std::os::raw::c_uint);
940}
941extern "C" {
942 pub fn initstate(
943 __seed: ::std::os::raw::c_uint,
944 __statebuf: *mut ::std::os::raw::c_char,
945 __statelen: usize,
946 ) -> *mut ::std::os::raw::c_char;
947}
948extern "C" {
949 pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
950}
951#[repr(C)]
952#[derive(Debug, Copy, Clone)]
953pub struct random_data {
954 pub fptr: *mut i32,
955 pub rptr: *mut i32,
956 pub state: *mut i32,
957 pub rand_type: ::std::os::raw::c_int,
958 pub rand_deg: ::std::os::raw::c_int,
959 pub rand_sep: ::std::os::raw::c_int,
960 pub end_ptr: *mut i32,
961}
962extern "C" {
963 pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int;
964}
965extern "C" {
966 pub fn srandom_r(
967 __seed: ::std::os::raw::c_uint,
968 __buf: *mut random_data,
969 ) -> ::std::os::raw::c_int;
970}
971extern "C" {
972 pub fn initstate_r(
973 __seed: ::std::os::raw::c_uint,
974 __statebuf: *mut ::std::os::raw::c_char,
975 __statelen: usize,
976 __buf: *mut random_data,
977 ) -> ::std::os::raw::c_int;
978}
979extern "C" {
980 pub fn setstate_r(
981 __statebuf: *mut ::std::os::raw::c_char,
982 __buf: *mut random_data,
983 ) -> ::std::os::raw::c_int;
984}
985extern "C" {
986 pub fn rand() -> ::std::os::raw::c_int;
987}
988extern "C" {
989 pub fn srand(__seed: ::std::os::raw::c_uint);
990}
991extern "C" {
992 pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
993}
994extern "C" {
995 pub fn drand48() -> f64;
996}
997extern "C" {
998 pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64;
999}
1000extern "C" {
1001 pub fn lrand48() -> ::std::os::raw::c_long;
1002}
1003extern "C" {
1004 pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
1005}
1006extern "C" {
1007 pub fn mrand48() -> ::std::os::raw::c_long;
1008}
1009extern "C" {
1010 pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
1011}
1012extern "C" {
1013 pub fn srand48(__seedval: ::std::os::raw::c_long);
1014}
1015extern "C" {
1016 pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort;
1017}
1018extern "C" {
1019 pub fn lcong48(__param: *mut ::std::os::raw::c_ushort);
1020}
1021#[repr(C)]
1022#[derive(Debug, Copy, Clone)]
1023pub struct drand48_data {
1024 pub __x: [::std::os::raw::c_ushort; 3usize],
1025 pub __old_x: [::std::os::raw::c_ushort; 3usize],
1026 pub __c: ::std::os::raw::c_ushort,
1027 pub __init: ::std::os::raw::c_ushort,
1028 pub __a: ::std::os::raw::c_ulonglong,
1029}
1030extern "C" {
1031 pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int;
1032}
1033extern "C" {
1034 pub fn erand48_r(
1035 __xsubi: *mut ::std::os::raw::c_ushort,
1036 __buffer: *mut drand48_data,
1037 __result: *mut f64,
1038 ) -> ::std::os::raw::c_int;
1039}
1040extern "C" {
1041 pub fn lrand48_r(
1042 __buffer: *mut drand48_data,
1043 __result: *mut ::std::os::raw::c_long,
1044 ) -> ::std::os::raw::c_int;
1045}
1046extern "C" {
1047 pub fn nrand48_r(
1048 __xsubi: *mut ::std::os::raw::c_ushort,
1049 __buffer: *mut drand48_data,
1050 __result: *mut ::std::os::raw::c_long,
1051 ) -> ::std::os::raw::c_int;
1052}
1053extern "C" {
1054 pub fn mrand48_r(
1055 __buffer: *mut drand48_data,
1056 __result: *mut ::std::os::raw::c_long,
1057 ) -> ::std::os::raw::c_int;
1058}
1059extern "C" {
1060 pub fn jrand48_r(
1061 __xsubi: *mut ::std::os::raw::c_ushort,
1062 __buffer: *mut drand48_data,
1063 __result: *mut ::std::os::raw::c_long,
1064 ) -> ::std::os::raw::c_int;
1065}
1066extern "C" {
1067 pub fn srand48_r(
1068 __seedval: ::std::os::raw::c_long,
1069 __buffer: *mut drand48_data,
1070 ) -> ::std::os::raw::c_int;
1071}
1072extern "C" {
1073 pub fn seed48_r(
1074 __seed16v: *mut ::std::os::raw::c_ushort,
1075 __buffer: *mut drand48_data,
1076 ) -> ::std::os::raw::c_int;
1077}
1078extern "C" {
1079 pub fn lcong48_r(
1080 __param: *mut ::std::os::raw::c_ushort,
1081 __buffer: *mut drand48_data,
1082 ) -> ::std::os::raw::c_int;
1083}
1084extern "C" {
1085 pub fn arc4random() -> __uint32_t;
1086}
1087extern "C" {
1088 pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __size: usize);
1089}
1090extern "C" {
1091 pub fn arc4random_uniform(__upper_bound: __uint32_t) -> __uint32_t;
1092}
1093extern "C" {
1094 pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
1095}
1096extern "C" {
1097 pub fn calloc(
1098 __nmemb: ::std::os::raw::c_ulong,
1099 __size: ::std::os::raw::c_ulong,
1100 ) -> *mut ::std::os::raw::c_void;
1101}
1102extern "C" {
1103 pub fn realloc(
1104 __ptr: *mut ::std::os::raw::c_void,
1105 __size: ::std::os::raw::c_ulong,
1106 ) -> *mut ::std::os::raw::c_void;
1107}
1108extern "C" {
1109 pub fn free(__ptr: *mut ::std::os::raw::c_void);
1110}
1111extern "C" {
1112 pub fn reallocarray(
1113 __ptr: *mut ::std::os::raw::c_void,
1114 __nmemb: usize,
1115 __size: usize,
1116 ) -> *mut ::std::os::raw::c_void;
1117}
1118extern "C" {
1119 pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
1120}
1121extern "C" {
1122 pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void;
1123}
1124extern "C" {
1125 pub fn posix_memalign(
1126 __memptr: *mut *mut ::std::os::raw::c_void,
1127 __alignment: usize,
1128 __size: usize,
1129 ) -> ::std::os::raw::c_int;
1130}
1131extern "C" {
1132 pub fn aligned_alloc(
1133 __alignment: ::std::os::raw::c_ulong,
1134 __size: ::std::os::raw::c_ulong,
1135 ) -> *mut ::std::os::raw::c_void;
1136}
1137extern "C" {
1138 pub fn abort() -> !;
1139}
1140extern "C" {
1141 pub fn atexit(__func: ::std::option::Option<unsafe extern "C" fn()>) -> ::std::os::raw::c_int;
1142}
1143extern "C" {
1144 pub fn at_quick_exit(
1145 __func: ::std::option::Option<unsafe extern "C" fn()>,
1146 ) -> ::std::os::raw::c_int;
1147}
1148extern "C" {
1149 pub fn on_exit(
1150 __func: ::std::option::Option<
1151 unsafe extern "C" fn(
1152 __status: ::std::os::raw::c_int,
1153 __arg: *mut ::std::os::raw::c_void,
1154 ),
1155 >,
1156 __arg: *mut ::std::os::raw::c_void,
1157 ) -> ::std::os::raw::c_int;
1158}
1159extern "C" {
1160 pub fn exit(__status: ::std::os::raw::c_int) -> !;
1161}
1162extern "C" {
1163 pub fn quick_exit(__status: ::std::os::raw::c_int) -> !;
1164}
1165extern "C" {
1166 pub fn _Exit(__status: ::std::os::raw::c_int) -> !;
1167}
1168extern "C" {
1169 pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1170}
1171extern "C" {
1172 pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1173}
1174extern "C" {
1175 pub fn setenv(
1176 __name: *const ::std::os::raw::c_char,
1177 __value: *const ::std::os::raw::c_char,
1178 __replace: ::std::os::raw::c_int,
1179 ) -> ::std::os::raw::c_int;
1180}
1181extern "C" {
1182 pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1183}
1184extern "C" {
1185 pub fn clearenv() -> ::std::os::raw::c_int;
1186}
1187extern "C" {
1188 pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1189}
1190extern "C" {
1191 pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1192}
1193extern "C" {
1194 pub fn mkstemps(
1195 __template: *mut ::std::os::raw::c_char,
1196 __suffixlen: ::std::os::raw::c_int,
1197 ) -> ::std::os::raw::c_int;
1198}
1199extern "C" {
1200 pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1201}
1202extern "C" {
1203 pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1204}
1205extern "C" {
1206 pub fn realpath(
1207 __name: *const ::std::os::raw::c_char,
1208 __resolved: *mut ::std::os::raw::c_char,
1209 ) -> *mut ::std::os::raw::c_char;
1210}
1211pub type __compar_fn_t = ::std::option::Option<
1212 unsafe extern "C" fn(
1213 arg1: *const ::std::os::raw::c_void,
1214 arg2: *const ::std::os::raw::c_void,
1215 ) -> ::std::os::raw::c_int,
1216>;
1217extern "C" {
1218 pub fn bsearch(
1219 __key: *const ::std::os::raw::c_void,
1220 __base: *const ::std::os::raw::c_void,
1221 __nmemb: usize,
1222 __size: usize,
1223 __compar: __compar_fn_t,
1224 ) -> *mut ::std::os::raw::c_void;
1225}
1226extern "C" {
1227 pub fn qsort(
1228 __base: *mut ::std::os::raw::c_void,
1229 __nmemb: usize,
1230 __size: usize,
1231 __compar: __compar_fn_t,
1232 );
1233}
1234extern "C" {
1235 pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
1236}
1237extern "C" {
1238 pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long;
1239}
1240extern "C" {
1241 pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong;
1242}
1243extern "C" {
1244 pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t;
1245}
1246extern "C" {
1247 pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t;
1248}
1249extern "C" {
1250 pub fn lldiv(
1251 __numer: ::std::os::raw::c_longlong,
1252 __denom: ::std::os::raw::c_longlong,
1253 ) -> lldiv_t;
1254}
1255extern "C" {
1256 pub fn ecvt(
1257 __value: f64,
1258 __ndigit: ::std::os::raw::c_int,
1259 __decpt: *mut ::std::os::raw::c_int,
1260 __sign: *mut ::std::os::raw::c_int,
1261 ) -> *mut ::std::os::raw::c_char;
1262}
1263extern "C" {
1264 pub fn fcvt(
1265 __value: f64,
1266 __ndigit: ::std::os::raw::c_int,
1267 __decpt: *mut ::std::os::raw::c_int,
1268 __sign: *mut ::std::os::raw::c_int,
1269 ) -> *mut ::std::os::raw::c_char;
1270}
1271extern "C" {
1272 pub fn gcvt(
1273 __value: f64,
1274 __ndigit: ::std::os::raw::c_int,
1275 __buf: *mut ::std::os::raw::c_char,
1276 ) -> *mut ::std::os::raw::c_char;
1277}
1278extern "C" {
1279 pub fn qecvt(
1280 __value: u128,
1281 __ndigit: ::std::os::raw::c_int,
1282 __decpt: *mut ::std::os::raw::c_int,
1283 __sign: *mut ::std::os::raw::c_int,
1284 ) -> *mut ::std::os::raw::c_char;
1285}
1286extern "C" {
1287 pub fn qfcvt(
1288 __value: u128,
1289 __ndigit: ::std::os::raw::c_int,
1290 __decpt: *mut ::std::os::raw::c_int,
1291 __sign: *mut ::std::os::raw::c_int,
1292 ) -> *mut ::std::os::raw::c_char;
1293}
1294extern "C" {
1295 pub fn qgcvt(
1296 __value: u128,
1297 __ndigit: ::std::os::raw::c_int,
1298 __buf: *mut ::std::os::raw::c_char,
1299 ) -> *mut ::std::os::raw::c_char;
1300}
1301extern "C" {
1302 pub fn ecvt_r(
1303 __value: f64,
1304 __ndigit: ::std::os::raw::c_int,
1305 __decpt: *mut ::std::os::raw::c_int,
1306 __sign: *mut ::std::os::raw::c_int,
1307 __buf: *mut ::std::os::raw::c_char,
1308 __len: usize,
1309 ) -> ::std::os::raw::c_int;
1310}
1311extern "C" {
1312 pub fn fcvt_r(
1313 __value: f64,
1314 __ndigit: ::std::os::raw::c_int,
1315 __decpt: *mut ::std::os::raw::c_int,
1316 __sign: *mut ::std::os::raw::c_int,
1317 __buf: *mut ::std::os::raw::c_char,
1318 __len: usize,
1319 ) -> ::std::os::raw::c_int;
1320}
1321extern "C" {
1322 pub fn qecvt_r(
1323 __value: u128,
1324 __ndigit: ::std::os::raw::c_int,
1325 __decpt: *mut ::std::os::raw::c_int,
1326 __sign: *mut ::std::os::raw::c_int,
1327 __buf: *mut ::std::os::raw::c_char,
1328 __len: usize,
1329 ) -> ::std::os::raw::c_int;
1330}
1331extern "C" {
1332 pub fn qfcvt_r(
1333 __value: u128,
1334 __ndigit: ::std::os::raw::c_int,
1335 __decpt: *mut ::std::os::raw::c_int,
1336 __sign: *mut ::std::os::raw::c_int,
1337 __buf: *mut ::std::os::raw::c_char,
1338 __len: usize,
1339 ) -> ::std::os::raw::c_int;
1340}
1341extern "C" {
1342 pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int;
1343}
1344extern "C" {
1345 pub fn mbtowc(
1346 __pwc: *mut wchar_t,
1347 __s: *const ::std::os::raw::c_char,
1348 __n: usize,
1349 ) -> ::std::os::raw::c_int;
1350}
1351extern "C" {
1352 pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int;
1353}
1354extern "C" {
1355 pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: usize) -> usize;
1356}
1357extern "C" {
1358 pub fn wcstombs(__s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, __n: usize) -> usize;
1359}
1360extern "C" {
1361 pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1362}
1363extern "C" {
1364 pub fn getsubopt(
1365 __optionp: *mut *mut ::std::os::raw::c_char,
1366 __tokens: *const *mut ::std::os::raw::c_char,
1367 __valuep: *mut *mut ::std::os::raw::c_char,
1368 ) -> ::std::os::raw::c_int;
1369}
1370extern "C" {
1371 pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int)
1372 -> ::std::os::raw::c_int;
1373}
1374#[doc = "< Success"]
1375pub const hiprtcResult_HIPRTC_SUCCESS: hiprtcResult = 0;
1376#[doc = "< Out of memory"]
1377pub const hiprtcResult_HIPRTC_ERROR_OUT_OF_MEMORY: hiprtcResult = 1;
1378#[doc = "< Failed to create program"]
1379pub const hiprtcResult_HIPRTC_ERROR_PROGRAM_CREATION_FAILURE: hiprtcResult = 2;
1380#[doc = "< Invalid input"]
1381pub const hiprtcResult_HIPRTC_ERROR_INVALID_INPUT: hiprtcResult = 3;
1382#[doc = "< Invalid program"]
1383pub const hiprtcResult_HIPRTC_ERROR_INVALID_PROGRAM: hiprtcResult = 4;
1384#[doc = "< Invalid option"]
1385pub const hiprtcResult_HIPRTC_ERROR_INVALID_OPTION: hiprtcResult = 5;
1386#[doc = "< Compilation error"]
1387pub const hiprtcResult_HIPRTC_ERROR_COMPILATION: hiprtcResult = 6;
1388#[doc = "< Failed in builtin operation"]
1389pub const hiprtcResult_HIPRTC_ERROR_BUILTIN_OPERATION_FAILURE: hiprtcResult = 7;
1390#[doc = "< No name expression after compilation"]
1391pub const hiprtcResult_HIPRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION: hiprtcResult = 8;
1392#[doc = "< No lowered names before compilation"]
1393pub const hiprtcResult_HIPRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION: hiprtcResult = 9;
1394#[doc = "< Invalid name expression"]
1395pub const hiprtcResult_HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID: hiprtcResult = 10;
1396#[doc = "< Internal error"]
1397pub const hiprtcResult_HIPRTC_ERROR_INTERNAL_ERROR: hiprtcResult = 11;
1398#[doc = "< Error in linking"]
1399pub const hiprtcResult_HIPRTC_ERROR_LINKING: hiprtcResult = 100;
1400#[doc = " @addtogroup GlobalDefs\n @{\n\n/\n/**\n hiprtc error code"]
1401pub type hiprtcResult = ::std::os::raw::c_uint;
1402#[repr(C)]
1403#[derive(Debug, Copy, Clone)]
1404pub struct ihiprtcLinkState {
1405 _unused: [u8; 0],
1406}
1407#[doc = " hiprtc link state\n"]
1408pub type hiprtcLinkState = *mut ihiprtcLinkState;
1409extern "C" {
1410 #[doc = " @ingroup Runtime\n\n @brief Returns text string message to explain the error which occurred\n\n @param [in] result code to convert to string.\n @returns const char pointer to the NULL-terminated error string\n\n @warning In HIP, this function returns the name of the error,\n if the hiprtc result is defined, it will return \"Invalid HIPRTC error code\"\n\n @see hiprtcResult"]
1411 pub fn hiprtcGetErrorString(result: hiprtcResult) -> *const ::std::os::raw::c_char;
1412}
1413extern "C" {
1414 #[doc = " @ingroup Runtime\n @brief Sets the parameters as major and minor version.\n\n @param [out] major HIP Runtime Compilation major version.\n @param [out] minor HIP Runtime Compilation minor version.\n\n @returns #HIPRTC_ERROR_INVALID_INPUT, #HIPRTC_SUCCESS\n"]
1415 pub fn hiprtcVersion(
1416 major: *mut ::std::os::raw::c_int,
1417 minor: *mut ::std::os::raw::c_int,
1418 ) -> hiprtcResult;
1419}
1420#[repr(C)]
1421#[derive(Debug, Copy, Clone)]
1422pub struct _hiprtcProgram {
1423 _unused: [u8; 0],
1424}
1425#[doc = " hiprtc program\n"]
1426pub type hiprtcProgram = *mut _hiprtcProgram;
1427extern "C" {
1428 #[doc = " @ingroup Runtime\n @brief Adds the given name exprssion to the runtime compilation program.\n\n @param [in] prog runtime compilation program instance.\n @param [in] name_expression const char pointer to the name expression.\n @returns #HIPRTC_SUCCESS\n\n If const char pointer is NULL, it will return #HIPRTC_ERROR_INVALID_INPUT.\n\n @see hiprtcResult"]
1429 pub fn hiprtcAddNameExpression(
1430 prog: hiprtcProgram,
1431 name_expression: *const ::std::os::raw::c_char,
1432 ) -> hiprtcResult;
1433}
1434extern "C" {
1435 #[doc = " @ingroup Runtime\n @brief Compiles the given runtime compilation program.\n\n @param [in] prog runtime compilation program instance.\n @param [in] numOptions number of compiler options.\n @param [in] options compiler options as const array of strins.\n @returns #HIPRTC_SUCCESS\n\n If the compiler failed to build the runtime compilation program,\n it will return #HIPRTC_ERROR_COMPILATION.\n\n @see hiprtcResult"]
1436 pub fn hiprtcCompileProgram(
1437 prog: hiprtcProgram,
1438 numOptions: ::std::os::raw::c_int,
1439 options: *const *const ::std::os::raw::c_char,
1440 ) -> hiprtcResult;
1441}
1442extern "C" {
1443 #[doc = " @ingroup Runtime\n @brief Creates an instance of hiprtcProgram with the given input parameters,\n and sets the output hiprtcProgram prog with it.\n\n @param [in, out] prog runtime compilation program instance.\n @param [in] src const char pointer to the program source.\n @param [in] name const char pointer to the program name.\n @param [in] numHeaders number of headers.\n @param [in] headers array of strings pointing to headers.\n @param [in] includeNames array of strings pointing to names included in program source.\n @returns #HIPRTC_SUCCESS\n\n Any invalide input parameter, it will return #HIPRTC_ERROR_INVALID_INPUT\n or #HIPRTC_ERROR_INVALID_PROGRAM.\n\n If failed to create the program, it will return #HIPRTC_ERROR_PROGRAM_CREATION_FAILURE.\n\n @see hiprtcResult"]
1444 pub fn hiprtcCreateProgram(
1445 prog: *mut hiprtcProgram,
1446 src: *const ::std::os::raw::c_char,
1447 name: *const ::std::os::raw::c_char,
1448 numHeaders: ::std::os::raw::c_int,
1449 headers: *const *const ::std::os::raw::c_char,
1450 includeNames: *const *const ::std::os::raw::c_char,
1451 ) -> hiprtcResult;
1452}
1453extern "C" {
1454 #[doc = " @brief Destroys an instance of given hiprtcProgram.\n @ingroup Runtime\n @param [in] prog runtime compilation program instance.\n @returns #HIPRTC_SUCCESS\n\n If prog is NULL, it will return #HIPRTC_ERROR_INVALID_INPUT.\n\n @see hiprtcResult"]
1455 pub fn hiprtcDestroyProgram(prog: *mut hiprtcProgram) -> hiprtcResult;
1456}
1457extern "C" {
1458 #[doc = " @brief Gets the lowered (mangled) name from an instance of hiprtcProgram with the given input\n parameters, and sets the output lowered_name with it.\n @ingroup Runtime\n @param [in] prog runtime compilation program instance.\n @param [in] name_expression const char pointer to the name expression.\n @param [in, out] lowered_name const char array to the lowered (mangled) name.\n @returns #HIPRTC_SUCCESS\n\n If any invalide nullptr input parameters, it will return #HIPRTC_ERROR_INVALID_INPUT\n\n If name_expression is not found, it will return #HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID\n\n If failed to get lowered_name from the program, it will return #HIPRTC_ERROR_COMPILATION.\n\n @see hiprtcResult"]
1459 pub fn hiprtcGetLoweredName(
1460 prog: hiprtcProgram,
1461 name_expression: *const ::std::os::raw::c_char,
1462 lowered_name: *mut *const ::std::os::raw::c_char,
1463 ) -> hiprtcResult;
1464}
1465extern "C" {
1466 #[doc = " @brief Gets the log generated by the runtime compilation program instance.\n @ingroup Runtime\n @param [in] prog runtime compilation program instance.\n @param [out] log memory pointer to the generated log.\n @returns #HIPRTC_SUCCESS\n\n @see hiprtcResult"]
1467 pub fn hiprtcGetProgramLog(
1468 prog: hiprtcProgram,
1469 log: *mut ::std::os::raw::c_char,
1470 ) -> hiprtcResult;
1471}
1472extern "C" {
1473 #[doc = " @brief Gets the size of log generated by the runtime compilation program instance.\n\n @param [in] prog runtime compilation program instance.\n @param [out] logSizeRet size of generated log.\n @returns #HIPRTC_SUCCESS\n\n @see hiprtcResult"]
1474 pub fn hiprtcGetProgramLogSize(prog: hiprtcProgram, logSizeRet: *mut usize) -> hiprtcResult;
1475}
1476extern "C" {
1477 #[doc = " @brief Gets the pointer of compilation binary by the runtime compilation program instance.\n @ingroup Runtime\n @param [in] prog runtime compilation program instance.\n @param [out] code char pointer to binary.\n @returns #HIPRTC_SUCCESS\n\n @see hiprtcResult"]
1478 pub fn hiprtcGetCode(prog: hiprtcProgram, code: *mut ::std::os::raw::c_char) -> hiprtcResult;
1479}
1480extern "C" {
1481 #[doc = " @brief Gets the size of compilation binary by the runtime compilation program instance.\n @ingroup Runtime\n @param [in] prog runtime compilation program instance.\n @param [out] codeSizeRet the size of binary.\n @returns #HIPRTC_SUCCESS\n\n @see hiprtcResult"]
1482 pub fn hiprtcGetCodeSize(prog: hiprtcProgram, codeSizeRet: *mut usize) -> hiprtcResult;
1483}
1484extern "C" {
1485 #[doc = " @brief Gets the pointer of compiled bitcode by the runtime compilation program instance.\n\n @param [in] prog runtime compilation program instance.\n @param [out] bitcode char pointer to bitcode.\n @return HIPRTC_SUCCESS\n\n @see hiprtcResult"]
1486 pub fn hiprtcGetBitcode(
1487 prog: hiprtcProgram,
1488 bitcode: *mut ::std::os::raw::c_char,
1489 ) -> hiprtcResult;
1490}
1491extern "C" {
1492 #[doc = " @brief Gets the size of compiled bitcode by the runtime compilation program instance.\n @ingroup Runtime\n\n @param [in] prog runtime compilation program instance.\n @param [out] bitcode_size the size of bitcode.\n @returns #HIPRTC_SUCCESS\n\n @see hiprtcResult"]
1493 pub fn hiprtcGetBitcodeSize(prog: hiprtcProgram, bitcode_size: *mut usize) -> hiprtcResult;
1494}
1495extern "C" {
1496 #[doc = " @brief Creates the link instance via hiprtc APIs.\n @ingroup Runtime\n @param [in] num_options Number of options\n @param [in] option_ptr Array of options\n @param [in] option_vals_pptr Array of option values cast to void*\n @param [out] hip_link_state_ptr hiprtc link state created upon success\n\n @returns #HIPRTC_SUCCESS, #HIPRTC_ERROR_INVALID_INPUT, #HIPRTC_ERROR_INVALID_OPTION\n\n @see hiprtcResult"]
1497 pub fn hiprtcLinkCreate(
1498 num_options: ::std::os::raw::c_uint,
1499 option_ptr: *mut hipJitOption,
1500 option_vals_pptr: *mut *mut ::std::os::raw::c_void,
1501 hip_link_state_ptr: *mut hiprtcLinkState,
1502 ) -> hiprtcResult;
1503}
1504extern "C" {
1505 #[doc = " @brief Adds a file with bit code to be linked with options\n @ingroup Runtime\n @param [in] hip_link_state hiprtc link state\n @param [in] input_type Type of the input data or bitcode\n @param [in] file_path Path to the input file where bitcode is present\n @param [in] num_options Size of the options\n @param [in] options_ptr Array of options applied to this input\n @param [in] option_values Array of option values cast to void*\n\n @returns #HIPRTC_SUCCESS\n\n If input values are invalid, it will\n @return #HIPRTC_ERROR_INVALID_INPUT\n\n @see hiprtcResult"]
1506 pub fn hiprtcLinkAddFile(
1507 hip_link_state: hiprtcLinkState,
1508 input_type: hipJitInputType,
1509 file_path: *const ::std::os::raw::c_char,
1510 num_options: ::std::os::raw::c_uint,
1511 options_ptr: *mut hipJitOption,
1512 option_values: *mut *mut ::std::os::raw::c_void,
1513 ) -> hiprtcResult;
1514}
1515extern "C" {
1516 #[doc = " @brief Completes the linking of the given program.\n @ingroup Runtime\n @param [in] hip_link_state hiprtc link state\n @param [in] input_type Type of the input data or bitcode\n @param [in] image Input data which is null terminated\n @param [in] image_size Size of the input data\n @param [in] name Optional name for this input\n @param [in] num_options Size of the options\n @param [in] options_ptr Array of options applied to this input\n @param [in] option_values Array of option values cast to void*\n\n @returns #HIPRTC_SUCCESS, #HIPRTC_ERROR_INVALID_INPUT\n\n If adding the file fails, it will\n @return #HIPRTC_ERROR_PROGRAM_CREATION_FAILURE\n\n @see hiprtcResult"]
1517 pub fn hiprtcLinkAddData(
1518 hip_link_state: hiprtcLinkState,
1519 input_type: hipJitInputType,
1520 image: *mut ::std::os::raw::c_void,
1521 image_size: usize,
1522 name: *const ::std::os::raw::c_char,
1523 num_options: ::std::os::raw::c_uint,
1524 options_ptr: *mut hipJitOption,
1525 option_values: *mut *mut ::std::os::raw::c_void,
1526 ) -> hiprtcResult;
1527}
1528extern "C" {
1529 #[doc = " @brief Completes the linking of the given program.\n @ingroup Runtime\n @param [in] hip_link_state hiprtc link state\n @param [out] bin_out Upon success, points to the output binary\n @param [out] size_out Size of the binary is stored (optional)\n\n @returns #HIPRTC_SUCCESS\n\n If adding the data fails, it will\n @return #HIPRTC_ERROR_LINKING\n\n @see hiprtcResult"]
1530 pub fn hiprtcLinkComplete(
1531 hip_link_state: hiprtcLinkState,
1532 bin_out: *mut *mut ::std::os::raw::c_void,
1533 size_out: *mut usize,
1534 ) -> hiprtcResult;
1535}
1536extern "C" {
1537 #[doc = " @brief Deletes the link instance via hiprtc APIs.\n @ingroup Runtime\n @param [in] hip_link_state link state instance\n\n @returns #HIPRTC_SUCCESS\n\n @see hiprtcResult"]
1538 pub fn hiprtcLinkDestroy(hip_link_state: hiprtcLinkState) -> hiprtcResult;
1539}
1540pub type int_least8_t = __int_least8_t;
1541pub type int_least16_t = __int_least16_t;
1542pub type int_least32_t = __int_least32_t;
1543pub type int_least64_t = __int_least64_t;
1544pub type uint_least8_t = __uint_least8_t;
1545pub type uint_least16_t = __uint_least16_t;
1546pub type uint_least32_t = __uint_least32_t;
1547pub type uint_least64_t = __uint_least64_t;
1548pub type int_fast8_t = ::std::os::raw::c_schar;
1549pub type int_fast16_t = ::std::os::raw::c_long;
1550pub type int_fast32_t = ::std::os::raw::c_long;
1551pub type int_fast64_t = ::std::os::raw::c_long;
1552pub type uint_fast8_t = ::std::os::raw::c_uchar;
1553pub type uint_fast16_t = ::std::os::raw::c_ulong;
1554pub type uint_fast32_t = ::std::os::raw::c_ulong;
1555pub type uint_fast64_t = ::std::os::raw::c_ulong;
1556pub type intmax_t = __intmax_t;
1557pub type uintmax_t = __uintmax_t;
1558pub const HIP_SUCCESS: _bindgen_ty_1 = 0;
1559pub const HIP_ERROR_INVALID_VALUE: _bindgen_ty_1 = 1;
1560pub const HIP_ERROR_NOT_INITIALIZED: _bindgen_ty_1 = 2;
1561pub const HIP_ERROR_LAUNCH_OUT_OF_RESOURCES: _bindgen_ty_1 = 3;
1562pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
1563#[doc = " @defgroup GlobalDefs Global enum and defines\n @{\n\n/\n/**\n hipDeviceArch_t\n"]
1564#[repr(C)]
1565#[repr(align(4))]
1566#[derive(Debug, Copy, Clone)]
1567pub struct hipDeviceArch_t {
1568 pub _bitfield_align_1: [u8; 0],
1569 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
1570 pub __bindgen_padding_0: u8,
1571}
1572impl hipDeviceArch_t {
1573 #[inline]
1574 pub fn hasGlobalInt32Atomics(&self) -> ::std::os::raw::c_uint {
1575 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
1576 }
1577 #[inline]
1578 pub fn set_hasGlobalInt32Atomics(&mut self, val: ::std::os::raw::c_uint) {
1579 unsafe {
1580 let val: u32 = ::std::mem::transmute(val);
1581 self._bitfield_1.set(0usize, 1u8, val as u64)
1582 }
1583 }
1584 #[inline]
1585 pub fn hasGlobalFloatAtomicExch(&self) -> ::std::os::raw::c_uint {
1586 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
1587 }
1588 #[inline]
1589 pub fn set_hasGlobalFloatAtomicExch(&mut self, val: ::std::os::raw::c_uint) {
1590 unsafe {
1591 let val: u32 = ::std::mem::transmute(val);
1592 self._bitfield_1.set(1usize, 1u8, val as u64)
1593 }
1594 }
1595 #[inline]
1596 pub fn hasSharedInt32Atomics(&self) -> ::std::os::raw::c_uint {
1597 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
1598 }
1599 #[inline]
1600 pub fn set_hasSharedInt32Atomics(&mut self, val: ::std::os::raw::c_uint) {
1601 unsafe {
1602 let val: u32 = ::std::mem::transmute(val);
1603 self._bitfield_1.set(2usize, 1u8, val as u64)
1604 }
1605 }
1606 #[inline]
1607 pub fn hasSharedFloatAtomicExch(&self) -> ::std::os::raw::c_uint {
1608 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
1609 }
1610 #[inline]
1611 pub fn set_hasSharedFloatAtomicExch(&mut self, val: ::std::os::raw::c_uint) {
1612 unsafe {
1613 let val: u32 = ::std::mem::transmute(val);
1614 self._bitfield_1.set(3usize, 1u8, val as u64)
1615 }
1616 }
1617 #[inline]
1618 pub fn hasFloatAtomicAdd(&self) -> ::std::os::raw::c_uint {
1619 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
1620 }
1621 #[inline]
1622 pub fn set_hasFloatAtomicAdd(&mut self, val: ::std::os::raw::c_uint) {
1623 unsafe {
1624 let val: u32 = ::std::mem::transmute(val);
1625 self._bitfield_1.set(4usize, 1u8, val as u64)
1626 }
1627 }
1628 #[inline]
1629 pub fn hasGlobalInt64Atomics(&self) -> ::std::os::raw::c_uint {
1630 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
1631 }
1632 #[inline]
1633 pub fn set_hasGlobalInt64Atomics(&mut self, val: ::std::os::raw::c_uint) {
1634 unsafe {
1635 let val: u32 = ::std::mem::transmute(val);
1636 self._bitfield_1.set(5usize, 1u8, val as u64)
1637 }
1638 }
1639 #[inline]
1640 pub fn hasSharedInt64Atomics(&self) -> ::std::os::raw::c_uint {
1641 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
1642 }
1643 #[inline]
1644 pub fn set_hasSharedInt64Atomics(&mut self, val: ::std::os::raw::c_uint) {
1645 unsafe {
1646 let val: u32 = ::std::mem::transmute(val);
1647 self._bitfield_1.set(6usize, 1u8, val as u64)
1648 }
1649 }
1650 #[inline]
1651 pub fn hasDoubles(&self) -> ::std::os::raw::c_uint {
1652 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
1653 }
1654 #[inline]
1655 pub fn set_hasDoubles(&mut self, val: ::std::os::raw::c_uint) {
1656 unsafe {
1657 let val: u32 = ::std::mem::transmute(val);
1658 self._bitfield_1.set(7usize, 1u8, val as u64)
1659 }
1660 }
1661 #[inline]
1662 pub fn hasWarpVote(&self) -> ::std::os::raw::c_uint {
1663 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
1664 }
1665 #[inline]
1666 pub fn set_hasWarpVote(&mut self, val: ::std::os::raw::c_uint) {
1667 unsafe {
1668 let val: u32 = ::std::mem::transmute(val);
1669 self._bitfield_1.set(8usize, 1u8, val as u64)
1670 }
1671 }
1672 #[inline]
1673 pub fn hasWarpBallot(&self) -> ::std::os::raw::c_uint {
1674 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
1675 }
1676 #[inline]
1677 pub fn set_hasWarpBallot(&mut self, val: ::std::os::raw::c_uint) {
1678 unsafe {
1679 let val: u32 = ::std::mem::transmute(val);
1680 self._bitfield_1.set(9usize, 1u8, val as u64)
1681 }
1682 }
1683 #[inline]
1684 pub fn hasWarpShuffle(&self) -> ::std::os::raw::c_uint {
1685 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
1686 }
1687 #[inline]
1688 pub fn set_hasWarpShuffle(&mut self, val: ::std::os::raw::c_uint) {
1689 unsafe {
1690 let val: u32 = ::std::mem::transmute(val);
1691 self._bitfield_1.set(10usize, 1u8, val as u64)
1692 }
1693 }
1694 #[inline]
1695 pub fn hasFunnelShift(&self) -> ::std::os::raw::c_uint {
1696 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
1697 }
1698 #[inline]
1699 pub fn set_hasFunnelShift(&mut self, val: ::std::os::raw::c_uint) {
1700 unsafe {
1701 let val: u32 = ::std::mem::transmute(val);
1702 self._bitfield_1.set(11usize, 1u8, val as u64)
1703 }
1704 }
1705 #[inline]
1706 pub fn hasThreadFenceSystem(&self) -> ::std::os::raw::c_uint {
1707 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
1708 }
1709 #[inline]
1710 pub fn set_hasThreadFenceSystem(&mut self, val: ::std::os::raw::c_uint) {
1711 unsafe {
1712 let val: u32 = ::std::mem::transmute(val);
1713 self._bitfield_1.set(12usize, 1u8, val as u64)
1714 }
1715 }
1716 #[inline]
1717 pub fn hasSyncThreadsExt(&self) -> ::std::os::raw::c_uint {
1718 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
1719 }
1720 #[inline]
1721 pub fn set_hasSyncThreadsExt(&mut self, val: ::std::os::raw::c_uint) {
1722 unsafe {
1723 let val: u32 = ::std::mem::transmute(val);
1724 self._bitfield_1.set(13usize, 1u8, val as u64)
1725 }
1726 }
1727 #[inline]
1728 pub fn hasSurfaceFuncs(&self) -> ::std::os::raw::c_uint {
1729 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
1730 }
1731 #[inline]
1732 pub fn set_hasSurfaceFuncs(&mut self, val: ::std::os::raw::c_uint) {
1733 unsafe {
1734 let val: u32 = ::std::mem::transmute(val);
1735 self._bitfield_1.set(14usize, 1u8, val as u64)
1736 }
1737 }
1738 #[inline]
1739 pub fn has3dGrid(&self) -> ::std::os::raw::c_uint {
1740 unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
1741 }
1742 #[inline]
1743 pub fn set_has3dGrid(&mut self, val: ::std::os::raw::c_uint) {
1744 unsafe {
1745 let val: u32 = ::std::mem::transmute(val);
1746 self._bitfield_1.set(15usize, 1u8, val as u64)
1747 }
1748 }
1749 #[inline]
1750 pub fn hasDynamicParallelism(&self) -> ::std::os::raw::c_uint {
1751 unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) }
1752 }
1753 #[inline]
1754 pub fn set_hasDynamicParallelism(&mut self, val: ::std::os::raw::c_uint) {
1755 unsafe {
1756 let val: u32 = ::std::mem::transmute(val);
1757 self._bitfield_1.set(16usize, 1u8, val as u64)
1758 }
1759 }
1760 #[inline]
1761 pub fn new_bitfield_1(
1762 hasGlobalInt32Atomics: ::std::os::raw::c_uint,
1763 hasGlobalFloatAtomicExch: ::std::os::raw::c_uint,
1764 hasSharedInt32Atomics: ::std::os::raw::c_uint,
1765 hasSharedFloatAtomicExch: ::std::os::raw::c_uint,
1766 hasFloatAtomicAdd: ::std::os::raw::c_uint,
1767 hasGlobalInt64Atomics: ::std::os::raw::c_uint,
1768 hasSharedInt64Atomics: ::std::os::raw::c_uint,
1769 hasDoubles: ::std::os::raw::c_uint,
1770 hasWarpVote: ::std::os::raw::c_uint,
1771 hasWarpBallot: ::std::os::raw::c_uint,
1772 hasWarpShuffle: ::std::os::raw::c_uint,
1773 hasFunnelShift: ::std::os::raw::c_uint,
1774 hasThreadFenceSystem: ::std::os::raw::c_uint,
1775 hasSyncThreadsExt: ::std::os::raw::c_uint,
1776 hasSurfaceFuncs: ::std::os::raw::c_uint,
1777 has3dGrid: ::std::os::raw::c_uint,
1778 hasDynamicParallelism: ::std::os::raw::c_uint,
1779 ) -> __BindgenBitfieldUnit<[u8; 3usize]> {
1780 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
1781 __bindgen_bitfield_unit.set(0usize, 1u8, {
1782 let hasGlobalInt32Atomics: u32 =
1783 unsafe { ::std::mem::transmute(hasGlobalInt32Atomics) };
1784 hasGlobalInt32Atomics as u64
1785 });
1786 __bindgen_bitfield_unit.set(1usize, 1u8, {
1787 let hasGlobalFloatAtomicExch: u32 =
1788 unsafe { ::std::mem::transmute(hasGlobalFloatAtomicExch) };
1789 hasGlobalFloatAtomicExch as u64
1790 });
1791 __bindgen_bitfield_unit.set(2usize, 1u8, {
1792 let hasSharedInt32Atomics: u32 =
1793 unsafe { ::std::mem::transmute(hasSharedInt32Atomics) };
1794 hasSharedInt32Atomics as u64
1795 });
1796 __bindgen_bitfield_unit.set(3usize, 1u8, {
1797 let hasSharedFloatAtomicExch: u32 =
1798 unsafe { ::std::mem::transmute(hasSharedFloatAtomicExch) };
1799 hasSharedFloatAtomicExch as u64
1800 });
1801 __bindgen_bitfield_unit.set(4usize, 1u8, {
1802 let hasFloatAtomicAdd: u32 = unsafe { ::std::mem::transmute(hasFloatAtomicAdd) };
1803 hasFloatAtomicAdd as u64
1804 });
1805 __bindgen_bitfield_unit.set(5usize, 1u8, {
1806 let hasGlobalInt64Atomics: u32 =
1807 unsafe { ::std::mem::transmute(hasGlobalInt64Atomics) };
1808 hasGlobalInt64Atomics as u64
1809 });
1810 __bindgen_bitfield_unit.set(6usize, 1u8, {
1811 let hasSharedInt64Atomics: u32 =
1812 unsafe { ::std::mem::transmute(hasSharedInt64Atomics) };
1813 hasSharedInt64Atomics as u64
1814 });
1815 __bindgen_bitfield_unit.set(7usize, 1u8, {
1816 let hasDoubles: u32 = unsafe { ::std::mem::transmute(hasDoubles) };
1817 hasDoubles as u64
1818 });
1819 __bindgen_bitfield_unit.set(8usize, 1u8, {
1820 let hasWarpVote: u32 = unsafe { ::std::mem::transmute(hasWarpVote) };
1821 hasWarpVote as u64
1822 });
1823 __bindgen_bitfield_unit.set(9usize, 1u8, {
1824 let hasWarpBallot: u32 = unsafe { ::std::mem::transmute(hasWarpBallot) };
1825 hasWarpBallot as u64
1826 });
1827 __bindgen_bitfield_unit.set(10usize, 1u8, {
1828 let hasWarpShuffle: u32 = unsafe { ::std::mem::transmute(hasWarpShuffle) };
1829 hasWarpShuffle as u64
1830 });
1831 __bindgen_bitfield_unit.set(11usize, 1u8, {
1832 let hasFunnelShift: u32 = unsafe { ::std::mem::transmute(hasFunnelShift) };
1833 hasFunnelShift as u64
1834 });
1835 __bindgen_bitfield_unit.set(12usize, 1u8, {
1836 let hasThreadFenceSystem: u32 = unsafe { ::std::mem::transmute(hasThreadFenceSystem) };
1837 hasThreadFenceSystem as u64
1838 });
1839 __bindgen_bitfield_unit.set(13usize, 1u8, {
1840 let hasSyncThreadsExt: u32 = unsafe { ::std::mem::transmute(hasSyncThreadsExt) };
1841 hasSyncThreadsExt as u64
1842 });
1843 __bindgen_bitfield_unit.set(14usize, 1u8, {
1844 let hasSurfaceFuncs: u32 = unsafe { ::std::mem::transmute(hasSurfaceFuncs) };
1845 hasSurfaceFuncs as u64
1846 });
1847 __bindgen_bitfield_unit.set(15usize, 1u8, {
1848 let has3dGrid: u32 = unsafe { ::std::mem::transmute(has3dGrid) };
1849 has3dGrid as u64
1850 });
1851 __bindgen_bitfield_unit.set(16usize, 1u8, {
1852 let hasDynamicParallelism: u32 =
1853 unsafe { ::std::mem::transmute(hasDynamicParallelism) };
1854 hasDynamicParallelism as u64
1855 });
1856 __bindgen_bitfield_unit
1857 }
1858}
1859#[repr(C)]
1860#[derive(Debug, Copy, Clone)]
1861pub struct hipUUID_t {
1862 pub bytes: [::std::os::raw::c_char; 16usize],
1863}
1864pub type hipUUID = hipUUID_t;
1865#[doc = " hipDeviceProp\n"]
1866#[repr(C)]
1867#[derive(Debug, Copy, Clone)]
1868pub struct hipDeviceProp_tR0600 {
1869 #[doc = "< Device name."]
1870 pub name: [::std::os::raw::c_char; 256usize],
1871 #[doc = "< UUID of a device"]
1872 pub uuid: hipUUID,
1873 #[doc = "< 8-byte unique identifier. Only valid on windows"]
1874 pub luid: [::std::os::raw::c_char; 8usize],
1875 #[doc = "< LUID node mask"]
1876 pub luidDeviceNodeMask: ::std::os::raw::c_uint,
1877 #[doc = "< Size of global memory region (in bytes)."]
1878 pub totalGlobalMem: usize,
1879 #[doc = "< Size of shared memory per block (in bytes)."]
1880 pub sharedMemPerBlock: usize,
1881 #[doc = "< Registers per block."]
1882 pub regsPerBlock: ::std::os::raw::c_int,
1883 #[doc = "< Warp size."]
1884 pub warpSize: ::std::os::raw::c_int,
1885 #[doc = "< Maximum pitch in bytes allowed by memory copies\n< pitched memory"]
1886 pub memPitch: usize,
1887 #[doc = "< Max work items per work group or workgroup max size."]
1888 pub maxThreadsPerBlock: ::std::os::raw::c_int,
1889 #[doc = "< Max number of threads in each dimension (XYZ) of a block."]
1890 pub maxThreadsDim: [::std::os::raw::c_int; 3usize],
1891 #[doc = "< Max grid dimensions (XYZ)."]
1892 pub maxGridSize: [::std::os::raw::c_int; 3usize],
1893 #[doc = "< Max clock frequency of the multiProcessors in khz."]
1894 pub clockRate: ::std::os::raw::c_int,
1895 #[doc = "< Size of shared constant memory region on the device\n< (in bytes)."]
1896 pub totalConstMem: usize,
1897 #[doc = "< Major compute capability version. This indicates the core instruction set\n< of the GPU architecture. For example, a value of 11 would correspond to\n< Navi III (RDNA3). See the arch feature flags for portable ways to query\n< feature caps."]
1898 pub major: ::std::os::raw::c_int,
1899 #[doc = "< Minor compute capability version. This indicates a particular configuration,\n< feature set, or variation within the group represented by the major compute\n< capability version. For example, different models within the same major version\n< might have varying levels of support for certain features or optimizations.\n< See the arch feature flags for portable ways to query feature caps."]
1900 pub minor: ::std::os::raw::c_int,
1901 #[doc = "< Alignment requirement for textures"]
1902 pub textureAlignment: usize,
1903 #[doc = "< Pitch alignment requirement for texture references bound to"]
1904 pub texturePitchAlignment: usize,
1905 #[doc = "< Deprecated. Use asyncEngineCount instead"]
1906 pub deviceOverlap: ::std::os::raw::c_int,
1907 #[doc = "< Number of multi-processors. When the GPU works in Compute\n< Unit (CU) mode, this value equals the number of CUs;\n< when in Workgroup Processor (WGP) mode, this value equels\n< half of CUs, because a single WGP contains two CUs."]
1908 pub multiProcessorCount: ::std::os::raw::c_int,
1909 #[doc = "< Run time limit for kernels executed on the device"]
1910 pub kernelExecTimeoutEnabled: ::std::os::raw::c_int,
1911 #[doc = "< APU vs dGPU"]
1912 pub integrated: ::std::os::raw::c_int,
1913 #[doc = "< Check whether HIP can map host memory"]
1914 pub canMapHostMemory: ::std::os::raw::c_int,
1915 #[doc = "< Compute mode."]
1916 pub computeMode: ::std::os::raw::c_int,
1917 #[doc = "< Maximum number of elements in 1D images"]
1918 pub maxTexture1D: ::std::os::raw::c_int,
1919 #[doc = "< Maximum 1D mipmap texture size"]
1920 pub maxTexture1DMipmap: ::std::os::raw::c_int,
1921 #[doc = "< Maximum size for 1D textures bound to linear memory"]
1922 pub maxTexture1DLinear: ::std::os::raw::c_int,
1923 #[doc = "< Maximum dimensions (width, height) of 2D images, in image elements"]
1924 pub maxTexture2D: [::std::os::raw::c_int; 2usize],
1925 #[doc = "< Maximum number of elements in 2D array mipmap of images"]
1926 pub maxTexture2DMipmap: [::std::os::raw::c_int; 2usize],
1927 #[doc = "< Maximum 2D tex dimensions if tex are bound to pitched memory"]
1928 pub maxTexture2DLinear: [::std::os::raw::c_int; 3usize],
1929 #[doc = "< Maximum 2D tex dimensions if gather has to be performed"]
1930 pub maxTexture2DGather: [::std::os::raw::c_int; 2usize],
1931 #[doc = "< Maximum dimensions (width, height, depth) of 3D images, in image\n< elements"]
1932 pub maxTexture3D: [::std::os::raw::c_int; 3usize],
1933 #[doc = "< Maximum alternate 3D texture dims"]
1934 pub maxTexture3DAlt: [::std::os::raw::c_int; 3usize],
1935 #[doc = "< Maximum cubemap texture dims"]
1936 pub maxTextureCubemap: ::std::os::raw::c_int,
1937 #[doc = "< Maximum number of elements in 1D array images"]
1938 pub maxTexture1DLayered: [::std::os::raw::c_int; 2usize],
1939 #[doc = "< Maximum number of elements in 2D array images"]
1940 pub maxTexture2DLayered: [::std::os::raw::c_int; 3usize],
1941 #[doc = "< Maximum cubemaps layered texture dims"]
1942 pub maxTextureCubemapLayered: [::std::os::raw::c_int; 2usize],
1943 #[doc = "< Maximum 1D surface size"]
1944 pub maxSurface1D: ::std::os::raw::c_int,
1945 #[doc = "< Maximum 2D surface size"]
1946 pub maxSurface2D: [::std::os::raw::c_int; 2usize],
1947 #[doc = "< Maximum 3D surface size"]
1948 pub maxSurface3D: [::std::os::raw::c_int; 3usize],
1949 #[doc = "< Maximum 1D layered surface size"]
1950 pub maxSurface1DLayered: [::std::os::raw::c_int; 2usize],
1951 #[doc = "< Maximum 2D layared surface size"]
1952 pub maxSurface2DLayered: [::std::os::raw::c_int; 3usize],
1953 #[doc = "< Maximum cubemap surface size"]
1954 pub maxSurfaceCubemap: ::std::os::raw::c_int,
1955 #[doc = "< Maximum cubemap layered surface size"]
1956 pub maxSurfaceCubemapLayered: [::std::os::raw::c_int; 2usize],
1957 #[doc = "< Alignment requirement for surface"]
1958 pub surfaceAlignment: usize,
1959 #[doc = "< Device can possibly execute multiple kernels concurrently."]
1960 pub concurrentKernels: ::std::os::raw::c_int,
1961 #[doc = "< Device has ECC support enabled"]
1962 pub ECCEnabled: ::std::os::raw::c_int,
1963 #[doc = "< PCI Bus ID."]
1964 pub pciBusID: ::std::os::raw::c_int,
1965 #[doc = "< PCI Device ID"]
1966 pub pciDeviceID: ::std::os::raw::c_int,
1967 #[doc = "< PCI Domain ID"]
1968 pub pciDomainID: ::std::os::raw::c_int,
1969 #[doc = "< 1:If device is Tesla device using TCC driver, else 0"]
1970 pub tccDriver: ::std::os::raw::c_int,
1971 #[doc = "< Number of async engines"]
1972 pub asyncEngineCount: ::std::os::raw::c_int,
1973 #[doc = "< Does device and host share unified address space"]
1974 pub unifiedAddressing: ::std::os::raw::c_int,
1975 #[doc = "< Max global memory clock frequency in khz."]
1976 pub memoryClockRate: ::std::os::raw::c_int,
1977 #[doc = "< Global memory bus width in bits."]
1978 pub memoryBusWidth: ::std::os::raw::c_int,
1979 #[doc = "< L2 cache size."]
1980 pub l2CacheSize: ::std::os::raw::c_int,
1981 #[doc = "< Device's max L2 persisting lines in bytes"]
1982 pub persistingL2CacheMaxSize: ::std::os::raw::c_int,
1983 #[doc = "< Maximum resident threads per multi-processor."]
1984 pub maxThreadsPerMultiProcessor: ::std::os::raw::c_int,
1985 #[doc = "< Device supports stream priority"]
1986 pub streamPrioritiesSupported: ::std::os::raw::c_int,
1987 #[doc = "< Indicates globals are cached in L1"]
1988 pub globalL1CacheSupported: ::std::os::raw::c_int,
1989 #[doc = "< Locals are cahced in L1"]
1990 pub localL1CacheSupported: ::std::os::raw::c_int,
1991 #[doc = "< Amount of shared memory available per multiprocessor."]
1992 pub sharedMemPerMultiprocessor: usize,
1993 #[doc = "< registers available per multiprocessor"]
1994 pub regsPerMultiprocessor: ::std::os::raw::c_int,
1995 #[doc = "< Device supports allocating managed memory on this system"]
1996 pub managedMemory: ::std::os::raw::c_int,
1997 #[doc = "< 1 if device is on a multi-GPU board, 0 if not."]
1998 pub isMultiGpuBoard: ::std::os::raw::c_int,
1999 #[doc = "< Unique identifier for a group of devices on same multiboard GPU"]
2000 pub multiGpuBoardGroupID: ::std::os::raw::c_int,
2001 #[doc = "< Link between host and device supports native atomics"]
2002 pub hostNativeAtomicSupported: ::std::os::raw::c_int,
2003 #[doc = "< Deprecated. CUDA only."]
2004 pub singleToDoublePrecisionPerfRatio: ::std::os::raw::c_int,
2005 #[doc = "< Device supports coherently accessing pageable memory\n< without calling hipHostRegister on it"]
2006 pub pageableMemoryAccess: ::std::os::raw::c_int,
2007 #[doc = "< Device can coherently access managed memory concurrently with\n< the CPU"]
2008 pub concurrentManagedAccess: ::std::os::raw::c_int,
2009 #[doc = "< Is compute preemption supported on the device"]
2010 pub computePreemptionSupported: ::std::os::raw::c_int,
2011 #[doc = "< Device can access host registered memory with same\n< address as the host"]
2012 pub canUseHostPointerForRegisteredMem: ::std::os::raw::c_int,
2013 #[doc = "< HIP device supports cooperative launch"]
2014 pub cooperativeLaunch: ::std::os::raw::c_int,
2015 #[doc = "< HIP device supports cooperative launch on multiple\n< devices"]
2016 pub cooperativeMultiDeviceLaunch: ::std::os::raw::c_int,
2017 #[doc = "< Per device m ax shared mem per block usable by special opt in"]
2018 pub sharedMemPerBlockOptin: usize,
2019 #[doc = "< Device accesses pageable memory via the host's\n< page tables"]
2020 pub pageableMemoryAccessUsesHostPageTables: ::std::os::raw::c_int,
2021 #[doc = "< Host can directly access managed memory on the device\n< without migration"]
2022 pub directManagedMemAccessFromHost: ::std::os::raw::c_int,
2023 #[doc = "< Max number of blocks on CU"]
2024 pub maxBlocksPerMultiProcessor: ::std::os::raw::c_int,
2025 #[doc = "< Max value of access policy window"]
2026 pub accessPolicyMaxWindowSize: ::std::os::raw::c_int,
2027 #[doc = "< Shared memory reserved by driver per block"]
2028 pub reservedSharedMemPerBlock: usize,
2029 #[doc = "< Device supports hipHostRegister"]
2030 pub hostRegisterSupported: ::std::os::raw::c_int,
2031 #[doc = "< Indicates if device supports sparse hip arrays"]
2032 pub sparseHipArraySupported: ::std::os::raw::c_int,
2033 #[doc = "< Device supports using the hipHostRegisterReadOnly flag\n< with hipHostRegistger"]
2034 pub hostRegisterReadOnlySupported: ::std::os::raw::c_int,
2035 #[doc = "< Indicates external timeline semaphore support"]
2036 pub timelineSemaphoreInteropSupported: ::std::os::raw::c_int,
2037 #[doc = "< Indicates if device supports hipMallocAsync and hipMemPool APIs"]
2038 pub memoryPoolsSupported: ::std::os::raw::c_int,
2039 #[doc = "< Indicates device support of RDMA APIs"]
2040 pub gpuDirectRDMASupported: ::std::os::raw::c_int,
2041 #[doc = "< Bitmask to be interpreted according to\n< hipFlushGPUDirectRDMAWritesOptions"]
2042 pub gpuDirectRDMAFlushWritesOptions: ::std::os::raw::c_uint,
2043 #[doc = "< value of hipGPUDirectRDMAWritesOrdering"]
2044 pub gpuDirectRDMAWritesOrdering: ::std::os::raw::c_int,
2045 #[doc = "< Bitmask of handle types support with mempool based IPC"]
2046 pub memoryPoolSupportedHandleTypes: ::std::os::raw::c_uint,
2047 #[doc = "< Device supports deferred mapping HIP arrays and HIP\n< mipmapped arrays"]
2048 pub deferredMappingHipArraySupported: ::std::os::raw::c_int,
2049 #[doc = "< Device supports IPC events"]
2050 pub ipcEventSupported: ::std::os::raw::c_int,
2051 #[doc = "< Device supports cluster launch"]
2052 pub clusterLaunch: ::std::os::raw::c_int,
2053 #[doc = "< Indicates device supports unified function pointers"]
2054 pub unifiedFunctionPointers: ::std::os::raw::c_int,
2055 #[doc = "< CUDA Reserved."]
2056 pub reserved: [::std::os::raw::c_int; 63usize],
2057 #[doc = "< Reserved for adding new entries for HIP/CUDA."]
2058 pub hipReserved: [::std::os::raw::c_int; 32usize],
2059 #[doc = "< AMD GCN Arch Name. HIP Only."]
2060 pub gcnArchName: [::std::os::raw::c_char; 256usize],
2061 #[doc = "< Maximum Shared Memory Per CU. HIP Only."]
2062 pub maxSharedMemoryPerMultiProcessor: usize,
2063 #[doc = "< Frequency in khz of the timer used by the device-side \"clock*\"\n< instructions. New for HIP."]
2064 pub clockInstructionRate: ::std::os::raw::c_int,
2065 #[doc = "< Architectural feature flags. New for HIP."]
2066 pub arch: hipDeviceArch_t,
2067 #[doc = "< Addres of HDP_MEM_COHERENCY_FLUSH_CNTL register"]
2068 pub hdpMemFlushCntl: *mut ::std::os::raw::c_uint,
2069 #[doc = "< Addres of HDP_REG_COHERENCY_FLUSH_CNTL register"]
2070 pub hdpRegFlushCntl: *mut ::std::os::raw::c_uint,
2071 #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2072 pub cooperativeMultiDeviceUnmatchedFunc: ::std::os::raw::c_int,
2073 #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2074 pub cooperativeMultiDeviceUnmatchedGridDim: ::std::os::raw::c_int,
2075 #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2076 pub cooperativeMultiDeviceUnmatchedBlockDim: ::std::os::raw::c_int,
2077 #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2078 pub cooperativeMultiDeviceUnmatchedSharedMem: ::std::os::raw::c_int,
2079 #[doc = "< 1: if it is a large PCI bar device, else 0"]
2080 pub isLargeBar: ::std::os::raw::c_int,
2081 #[doc = "< Revision of the GPU in this device"]
2082 pub asicRevision: ::std::os::raw::c_int,
2083}
2084#[doc = "< Unregistered memory"]
2085pub const hipMemoryType_hipMemoryTypeUnregistered: hipMemoryType = 0;
2086#[doc = "< Memory is physically located on host"]
2087pub const hipMemoryType_hipMemoryTypeHost: hipMemoryType = 1;
2088#[doc = "< Memory is physically located on device. (see deviceId for\n< specific device)"]
2089pub const hipMemoryType_hipMemoryTypeDevice: hipMemoryType = 2;
2090#[doc = "< Managed memory, automaticallly managed by the unified\n< memory system\n< place holder for new values."]
2091pub const hipMemoryType_hipMemoryTypeManaged: hipMemoryType = 3;
2092#[doc = "< Array memory, physically located on device. (see deviceId for\n< specific device)"]
2093pub const hipMemoryType_hipMemoryTypeArray: hipMemoryType = 10;
2094#[doc = "< unified address space"]
2095pub const hipMemoryType_hipMemoryTypeUnified: hipMemoryType = 11;
2096#[doc = " hipMemoryType (for pointer attributes)\n\n @note hipMemoryType enum values are combination of cudaMemoryType and cuMemoryType and AMD\n specific enum values.\n"]
2097pub type hipMemoryType = ::std::os::raw::c_uint;
2098#[doc = " Pointer attributes"]
2099#[repr(C)]
2100#[derive(Debug, Copy, Clone)]
2101pub struct hipPointerAttribute_t {
2102 pub type_: hipMemoryType,
2103 pub device: ::std::os::raw::c_int,
2104 pub devicePointer: *mut ::std::os::raw::c_void,
2105 pub hostPointer: *mut ::std::os::raw::c_void,
2106 pub isManaged: ::std::os::raw::c_int,
2107 pub allocationFlags: ::std::os::raw::c_uint,
2108}
2109#[doc = "< Successful completion."]
2110pub const hipError_t_hipSuccess: hipError_t = 0;
2111#[doc = "< One or more of the parameters passed to the API call is NULL\n< or not in an acceptable range."]
2112pub const hipError_t_hipErrorInvalidValue: hipError_t = 1;
2113#[doc = "< out of memory range."]
2114pub const hipError_t_hipErrorOutOfMemory: hipError_t = 2;
2115#[doc = "< Memory allocation error."]
2116pub const hipError_t_hipErrorMemoryAllocation: hipError_t = 2;
2117#[doc = "< Invalid not initialized"]
2118pub const hipError_t_hipErrorNotInitialized: hipError_t = 3;
2119pub const hipError_t_hipErrorInitializationError: hipError_t = 3;
2120#[doc = "< Deinitialized"]
2121pub const hipError_t_hipErrorDeinitialized: hipError_t = 4;
2122pub const hipError_t_hipErrorProfilerDisabled: hipError_t = 5;
2123pub const hipError_t_hipErrorProfilerNotInitialized: hipError_t = 6;
2124pub const hipError_t_hipErrorProfilerAlreadyStarted: hipError_t = 7;
2125pub const hipError_t_hipErrorProfilerAlreadyStopped: hipError_t = 8;
2126#[doc = "< Invalide configuration"]
2127pub const hipError_t_hipErrorInvalidConfiguration: hipError_t = 9;
2128#[doc = "< Invalid pitch value"]
2129pub const hipError_t_hipErrorInvalidPitchValue: hipError_t = 12;
2130#[doc = "< Invalid symbol"]
2131pub const hipError_t_hipErrorInvalidSymbol: hipError_t = 13;
2132#[doc = "< Invalid Device Pointer"]
2133pub const hipError_t_hipErrorInvalidDevicePointer: hipError_t = 17;
2134#[doc = "< Invalid memory copy direction"]
2135pub const hipError_t_hipErrorInvalidMemcpyDirection: hipError_t = 21;
2136pub const hipError_t_hipErrorInsufficientDriver: hipError_t = 35;
2137pub const hipError_t_hipErrorMissingConfiguration: hipError_t = 52;
2138pub const hipError_t_hipErrorPriorLaunchFailure: hipError_t = 53;
2139#[doc = "< Invalid device function"]
2140pub const hipError_t_hipErrorInvalidDeviceFunction: hipError_t = 98;
2141#[doc = "< Call to hipGetDeviceCount returned 0 devices"]
2142pub const hipError_t_hipErrorNoDevice: hipError_t = 100;
2143#[doc = "< DeviceID must be in range from 0 to compute-devices."]
2144pub const hipError_t_hipErrorInvalidDevice: hipError_t = 101;
2145#[doc = "< Invalid image"]
2146pub const hipError_t_hipErrorInvalidImage: hipError_t = 200;
2147#[doc = "< Produced when input context is invalid."]
2148pub const hipError_t_hipErrorInvalidContext: hipError_t = 201;
2149pub const hipError_t_hipErrorContextAlreadyCurrent: hipError_t = 202;
2150pub const hipError_t_hipErrorMapFailed: hipError_t = 205;
2151#[doc = "< Produced when the IPC memory attach failed from ROCr."]
2152pub const hipError_t_hipErrorMapBufferObjectFailed: hipError_t = 205;
2153pub const hipError_t_hipErrorUnmapFailed: hipError_t = 206;
2154pub const hipError_t_hipErrorArrayIsMapped: hipError_t = 207;
2155pub const hipError_t_hipErrorAlreadyMapped: hipError_t = 208;
2156pub const hipError_t_hipErrorNoBinaryForGpu: hipError_t = 209;
2157pub const hipError_t_hipErrorAlreadyAcquired: hipError_t = 210;
2158pub const hipError_t_hipErrorNotMapped: hipError_t = 211;
2159pub const hipError_t_hipErrorNotMappedAsArray: hipError_t = 212;
2160pub const hipError_t_hipErrorNotMappedAsPointer: hipError_t = 213;
2161pub const hipError_t_hipErrorECCNotCorrectable: hipError_t = 214;
2162#[doc = "< Unsupported limit"]
2163pub const hipError_t_hipErrorUnsupportedLimit: hipError_t = 215;
2164#[doc = "< The context is already in use"]
2165pub const hipError_t_hipErrorContextAlreadyInUse: hipError_t = 216;
2166pub const hipError_t_hipErrorPeerAccessUnsupported: hipError_t = 217;
2167#[doc = "< In CUDA DRV, it is CUDA_ERROR_INVALID_PTX"]
2168pub const hipError_t_hipErrorInvalidKernelFile: hipError_t = 218;
2169pub const hipError_t_hipErrorInvalidGraphicsContext: hipError_t = 219;
2170#[doc = "< Invalid source."]
2171pub const hipError_t_hipErrorInvalidSource: hipError_t = 300;
2172#[doc = "< the file is not found."]
2173pub const hipError_t_hipErrorFileNotFound: hipError_t = 301;
2174pub const hipError_t_hipErrorSharedObjectSymbolNotFound: hipError_t = 302;
2175#[doc = "< Failed to initialize shared object."]
2176pub const hipError_t_hipErrorSharedObjectInitFailed: hipError_t = 303;
2177#[doc = "< Not the correct operating system"]
2178pub const hipError_t_hipErrorOperatingSystem: hipError_t = 304;
2179#[doc = "< Invalide handle"]
2180pub const hipError_t_hipErrorInvalidHandle: hipError_t = 400;
2181#[doc = "< Resource handle (hipEvent_t or hipStream_t) invalid."]
2182pub const hipError_t_hipErrorInvalidResourceHandle: hipError_t = 400;
2183#[doc = "< Resource required is not in a valid state to perform operation."]
2184pub const hipError_t_hipErrorIllegalState: hipError_t = 401;
2185#[doc = "< Not found"]
2186pub const hipError_t_hipErrorNotFound: hipError_t = 500;
2187#[doc = "< Indicates that asynchronous operations enqueued earlier are not\n< ready. This is not actually an error, but is used to distinguish\n< from hipSuccess (which indicates completion). APIs that return\n< this error include hipEventQuery and hipStreamQuery."]
2188pub const hipError_t_hipErrorNotReady: hipError_t = 600;
2189pub const hipError_t_hipErrorIllegalAddress: hipError_t = 700;
2190#[doc = "< Out of resources error."]
2191pub const hipError_t_hipErrorLaunchOutOfResources: hipError_t = 701;
2192#[doc = "< Timeout for the launch."]
2193pub const hipError_t_hipErrorLaunchTimeOut: hipError_t = 702;
2194#[doc = "< Peer access was already enabled from the current\n< device."]
2195pub const hipError_t_hipErrorPeerAccessAlreadyEnabled: hipError_t = 704;
2196#[doc = "< Peer access was never enabled from the current device."]
2197pub const hipError_t_hipErrorPeerAccessNotEnabled: hipError_t = 705;
2198#[doc = "< The process is active."]
2199pub const hipError_t_hipErrorSetOnActiveProcess: hipError_t = 708;
2200#[doc = "< The context is already destroyed"]
2201pub const hipError_t_hipErrorContextIsDestroyed: hipError_t = 709;
2202#[doc = "< Produced when the kernel calls assert."]
2203pub const hipError_t_hipErrorAssert: hipError_t = 710;
2204#[doc = "< Produced when trying to lock a page-locked\n< memory."]
2205pub const hipError_t_hipErrorHostMemoryAlreadyRegistered: hipError_t = 712;
2206#[doc = "< Produced when trying to unlock a non-page-locked\n< memory."]
2207pub const hipError_t_hipErrorHostMemoryNotRegistered: hipError_t = 713;
2208#[doc = "< An exception occurred on the device while executing a kernel."]
2209pub const hipError_t_hipErrorLaunchFailure: hipError_t = 719;
2210#[doc = "< This error indicates that the number of blocks\n< launched per grid for a kernel that was launched\n< via cooperative launch APIs exceeds the maximum\n< number of allowed blocks for the current device."]
2211pub const hipError_t_hipErrorCooperativeLaunchTooLarge: hipError_t = 720;
2212#[doc = "< Produced when the hip API is not supported/implemented"]
2213pub const hipError_t_hipErrorNotSupported: hipError_t = 801;
2214#[doc = "< The operation is not permitted when the stream\n< is capturing."]
2215pub const hipError_t_hipErrorStreamCaptureUnsupported: hipError_t = 900;
2216#[doc = "< The current capture sequence on the stream\n< has been invalidated due to a previous error."]
2217pub const hipError_t_hipErrorStreamCaptureInvalidated: hipError_t = 901;
2218#[doc = "< The operation would have resulted in a merge of\n< two independent capture sequences."]
2219pub const hipError_t_hipErrorStreamCaptureMerge: hipError_t = 902;
2220#[doc = "< The capture was not initiated in this stream."]
2221pub const hipError_t_hipErrorStreamCaptureUnmatched: hipError_t = 903;
2222#[doc = "< The capture sequence contains a fork that was not\n< joined to the primary stream."]
2223pub const hipError_t_hipErrorStreamCaptureUnjoined: hipError_t = 904;
2224#[doc = "< A dependency would have been created which crosses\n< the capture sequence boundary. Only implicit\n< in-stream ordering dependencies are allowed\n< to cross the boundary"]
2225pub const hipError_t_hipErrorStreamCaptureIsolation: hipError_t = 905;
2226#[doc = "< The operation would have resulted in a disallowed\n< implicit dependency on a current capture sequence\n< from hipStreamLegacy."]
2227pub const hipError_t_hipErrorStreamCaptureImplicit: hipError_t = 906;
2228#[doc = "< The operation is not permitted on an event which was last\n< recorded in a capturing stream."]
2229pub const hipError_t_hipErrorCapturedEvent: hipError_t = 907;
2230#[doc = "< A stream capture sequence not initiated with\n< the hipStreamCaptureModeRelaxed argument to\n< hipStreamBeginCapture was passed to\n< hipStreamEndCapture in a different thread."]
2231pub const hipError_t_hipErrorStreamCaptureWrongThread: hipError_t = 908;
2232#[doc = "< This error indicates that the graph update\n< not performed because it included changes which\n< violated constraintsspecific to instantiated graph\n< update."]
2233pub const hipError_t_hipErrorGraphExecUpdateFailure: hipError_t = 910;
2234#[doc = "< Invalid channel descriptor."]
2235pub const hipError_t_hipErrorInvalidChannelDescriptor: hipError_t = 911;
2236#[doc = "< Invalid texture."]
2237pub const hipError_t_hipErrorInvalidTexture: hipError_t = 912;
2238#[doc = "< Unknown error."]
2239pub const hipError_t_hipErrorUnknown: hipError_t = 999;
2240#[doc = "< HSA runtime memory call returned error. Typically not seen\n< in production systems."]
2241pub const hipError_t_hipErrorRuntimeMemory: hipError_t = 1052;
2242#[doc = "< HSA runtime call other than memory returned error. Typically\n< not seen in production systems."]
2243pub const hipError_t_hipErrorRuntimeOther: hipError_t = 1053;
2244#[doc = "< Marker that more error codes are needed."]
2245pub const hipError_t_hipErrorTbd: hipError_t = 1054;
2246#[doc = " HIP error type\n"]
2247pub type hipError_t = ::std::os::raw::c_uint;
2248pub const hipDeviceAttribute_t_hipDeviceAttributeCudaCompatibleBegin: hipDeviceAttribute_t = 0;
2249pub const hipDeviceAttribute_t_hipDeviceAttributeEccEnabled: hipDeviceAttribute_t = 0;
2250#[doc = "< Cuda only. The maximum size of the window\n< policy in bytes."]
2251pub const hipDeviceAttribute_t_hipDeviceAttributeAccessPolicyMaxWindowSize: hipDeviceAttribute_t =
2252 1;
2253#[doc = "< Asynchronous engines number."]
2254pub const hipDeviceAttribute_t_hipDeviceAttributeAsyncEngineCount: hipDeviceAttribute_t = 2;
2255#[doc = "< Whether host memory can be mapped into device address\n< space"]
2256pub const hipDeviceAttribute_t_hipDeviceAttributeCanMapHostMemory: hipDeviceAttribute_t = 3;
2257#[doc = "< Device can access host registered\n< memory at the same virtual address as\n< the CPU"]
2258pub const hipDeviceAttribute_t_hipDeviceAttributeCanUseHostPointerForRegisteredMem:
2259 hipDeviceAttribute_t = 4;
2260#[doc = "< Peak clock frequency in kilohertz."]
2261pub const hipDeviceAttribute_t_hipDeviceAttributeClockRate: hipDeviceAttribute_t = 5;
2262#[doc = "< Compute mode that device is currently in."]
2263pub const hipDeviceAttribute_t_hipDeviceAttributeComputeMode: hipDeviceAttribute_t = 6;
2264#[doc = "< Device supports Compute Preemption."]
2265pub const hipDeviceAttribute_t_hipDeviceAttributeComputePreemptionSupported: hipDeviceAttribute_t =
2266 7;
2267#[doc = "< Device can possibly execute multiple kernels\n< concurrently."]
2268pub const hipDeviceAttribute_t_hipDeviceAttributeConcurrentKernels: hipDeviceAttribute_t = 8;
2269#[doc = "< Device can coherently access managed memory\n< concurrently with the CPU"]
2270pub const hipDeviceAttribute_t_hipDeviceAttributeConcurrentManagedAccess: hipDeviceAttribute_t = 9;
2271#[doc = "< Support cooperative launch"]
2272pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeLaunch: hipDeviceAttribute_t = 10;
2273#[doc = "< Support cooperative launch on multiple\n< devices"]
2274pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceLaunch:
2275 hipDeviceAttribute_t = 11;
2276#[doc = "< Device can concurrently copy memory and execute a kernel.\n< Deprecated. Use instead asyncEngineCount."]
2277pub const hipDeviceAttribute_t_hipDeviceAttributeDeviceOverlap: hipDeviceAttribute_t = 12;
2278#[doc = "< Host can directly access managed memory on\n< the device without migration"]
2279pub const hipDeviceAttribute_t_hipDeviceAttributeDirectManagedMemAccessFromHost:
2280 hipDeviceAttribute_t = 13;
2281#[doc = "< Device supports caching globals in L1"]
2282pub const hipDeviceAttribute_t_hipDeviceAttributeGlobalL1CacheSupported: hipDeviceAttribute_t = 14;
2283#[doc = "< Link between the device and the host supports\n< native atomic operations"]
2284pub const hipDeviceAttribute_t_hipDeviceAttributeHostNativeAtomicSupported: hipDeviceAttribute_t =
2285 15;
2286#[doc = "< Device is integrated GPU"]
2287pub const hipDeviceAttribute_t_hipDeviceAttributeIntegrated: hipDeviceAttribute_t = 16;
2288#[doc = "< Multiple GPU devices."]
2289pub const hipDeviceAttribute_t_hipDeviceAttributeIsMultiGpuBoard: hipDeviceAttribute_t = 17;
2290#[doc = "< Run time limit for kernels executed on the device"]
2291pub const hipDeviceAttribute_t_hipDeviceAttributeKernelExecTimeout: hipDeviceAttribute_t = 18;
2292#[doc = "< Size of L2 cache in bytes. 0 if the device doesn't have L2\n< cache."]
2293pub const hipDeviceAttribute_t_hipDeviceAttributeL2CacheSize: hipDeviceAttribute_t = 19;
2294#[doc = "< caching locals in L1 is supported"]
2295pub const hipDeviceAttribute_t_hipDeviceAttributeLocalL1CacheSupported: hipDeviceAttribute_t = 20;
2296#[doc = "< 8-byte locally unique identifier in 8 bytes. Undefined on TCC and\n< non-Windows platforms"]
2297pub const hipDeviceAttribute_t_hipDeviceAttributeLuid: hipDeviceAttribute_t = 21;
2298#[doc = "< Luid device node mask. Undefined on TCC and\n< non-Windows platforms"]
2299pub const hipDeviceAttribute_t_hipDeviceAttributeLuidDeviceNodeMask: hipDeviceAttribute_t = 22;
2300#[doc = "< Major compute capability version number."]
2301pub const hipDeviceAttribute_t_hipDeviceAttributeComputeCapabilityMajor: hipDeviceAttribute_t = 23;
2302#[doc = "< Device supports allocating managed memory on this system"]
2303pub const hipDeviceAttribute_t_hipDeviceAttributeManagedMemory: hipDeviceAttribute_t = 24;
2304#[doc = "< Max block size per multiprocessor"]
2305pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlocksPerMultiProcessor: hipDeviceAttribute_t =
2306 25;
2307#[doc = "< Max block size in width."]
2308pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlockDimX: hipDeviceAttribute_t = 26;
2309#[doc = "< Max block size in height."]
2310pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlockDimY: hipDeviceAttribute_t = 27;
2311#[doc = "< Max block size in depth."]
2312pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlockDimZ: hipDeviceAttribute_t = 28;
2313#[doc = "< Max grid size in width."]
2314pub const hipDeviceAttribute_t_hipDeviceAttributeMaxGridDimX: hipDeviceAttribute_t = 29;
2315#[doc = "< Max grid size in height."]
2316pub const hipDeviceAttribute_t_hipDeviceAttributeMaxGridDimY: hipDeviceAttribute_t = 30;
2317#[doc = "< Max grid size in depth."]
2318pub const hipDeviceAttribute_t_hipDeviceAttributeMaxGridDimZ: hipDeviceAttribute_t = 31;
2319#[doc = "< Maximum size of 1D surface."]
2320pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface1D: hipDeviceAttribute_t = 32;
2321#[doc = "< Cuda only. Maximum dimensions of 1D layered surface."]
2322pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface1DLayered: hipDeviceAttribute_t = 33;
2323#[doc = "< Maximum dimension (width, height) of 2D surface."]
2324pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface2D: hipDeviceAttribute_t = 34;
2325#[doc = "< Cuda only. Maximum dimensions of 2D layered surface."]
2326pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface2DLayered: hipDeviceAttribute_t = 35;
2327#[doc = "< Maximum dimension (width, height, depth) of 3D surface."]
2328pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface3D: hipDeviceAttribute_t = 36;
2329#[doc = "< Cuda only. Maximum dimensions of Cubemap surface."]
2330pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurfaceCubemap: hipDeviceAttribute_t = 37;
2331#[doc = "< Cuda only. Maximum dimension of Cubemap layered\n< surface."]
2332pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurfaceCubemapLayered: hipDeviceAttribute_t =
2333 38;
2334#[doc = "< Maximum size of 1D texture."]
2335pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DWidth: hipDeviceAttribute_t = 39;
2336#[doc = "< Maximum dimensions of 1D layered texture."]
2337pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DLayered: hipDeviceAttribute_t = 40;
2338#[doc = "< Maximum number of elements allocatable in a 1D linear\n< texture. Use cudaDeviceGetTexture1DLinearMaxWidth()\n< instead on Cuda."]
2339pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DLinear: hipDeviceAttribute_t = 41;
2340#[doc = "< Maximum size of 1D mipmapped texture."]
2341pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DMipmap: hipDeviceAttribute_t = 42;
2342#[doc = "< Maximum dimension width of 2D texture."]
2343pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DWidth: hipDeviceAttribute_t = 43;
2344#[doc = "< Maximum dimension hight of 2D texture."]
2345pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DHeight: hipDeviceAttribute_t = 44;
2346#[doc = "< Maximum dimensions of 2D texture if gather operations\n< performed."]
2347pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DGather: hipDeviceAttribute_t = 45;
2348#[doc = "< Maximum dimensions of 2D layered texture."]
2349pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DLayered: hipDeviceAttribute_t = 46;
2350#[doc = "< Maximum dimensions (width, height, pitch) of 2D\n< textures bound to pitched memory."]
2351pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DLinear: hipDeviceAttribute_t = 47;
2352#[doc = "< Maximum dimensions of 2D mipmapped texture."]
2353pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DMipmap: hipDeviceAttribute_t = 48;
2354#[doc = "< Maximum dimension width of 3D texture."]
2355pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DWidth: hipDeviceAttribute_t = 49;
2356#[doc = "< Maximum dimension height of 3D texture."]
2357pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DHeight: hipDeviceAttribute_t = 50;
2358#[doc = "< Maximum dimension depth of 3D texture."]
2359pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DDepth: hipDeviceAttribute_t = 51;
2360#[doc = "< Maximum dimensions of alternate 3D texture."]
2361pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DAlt: hipDeviceAttribute_t = 52;
2362#[doc = "< Maximum dimensions of Cubemap texture"]
2363pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTextureCubemap: hipDeviceAttribute_t = 53;
2364#[doc = "< Maximum dimensions of Cubemap layered texture."]
2365pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTextureCubemapLayered: hipDeviceAttribute_t =
2366 54;
2367#[doc = "< Maximum dimension of a block"]
2368pub const hipDeviceAttribute_t_hipDeviceAttributeMaxThreadsDim: hipDeviceAttribute_t = 55;
2369#[doc = "< Maximum number of threads per block."]
2370pub const hipDeviceAttribute_t_hipDeviceAttributeMaxThreadsPerBlock: hipDeviceAttribute_t = 56;
2371#[doc = "< Maximum resident threads per multiprocessor."]
2372pub const hipDeviceAttribute_t_hipDeviceAttributeMaxThreadsPerMultiProcessor: hipDeviceAttribute_t =
2373 57;
2374#[doc = "< Maximum pitch in bytes allowed by memory copies"]
2375pub const hipDeviceAttribute_t_hipDeviceAttributeMaxPitch: hipDeviceAttribute_t = 58;
2376#[doc = "< Global memory bus width in bits."]
2377pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryBusWidth: hipDeviceAttribute_t = 59;
2378#[doc = "< Peak memory clock frequency in kilohertz."]
2379pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryClockRate: hipDeviceAttribute_t = 60;
2380#[doc = "< Minor compute capability version number."]
2381pub const hipDeviceAttribute_t_hipDeviceAttributeComputeCapabilityMinor: hipDeviceAttribute_t = 61;
2382#[doc = "< Unique ID of device group on the same multi-GPU\n< board"]
2383pub const hipDeviceAttribute_t_hipDeviceAttributeMultiGpuBoardGroupID: hipDeviceAttribute_t = 62;
2384#[doc = "< Number of multi-processors. When the GPU works in Compute\n< Unit (CU) mode, this value equals the number of CUs;\n< when in Workgroup Processor (WGP) mode, this value equels\n< half of CUs, because a single WGP contains two CUs."]
2385pub const hipDeviceAttribute_t_hipDeviceAttributeMultiprocessorCount: hipDeviceAttribute_t = 63;
2386#[doc = "< Previously hipDeviceAttributeName"]
2387pub const hipDeviceAttribute_t_hipDeviceAttributeUnused1: hipDeviceAttribute_t = 64;
2388#[doc = "< Device supports coherently accessing pageable memory\n< without calling hipHostRegister on it"]
2389pub const hipDeviceAttribute_t_hipDeviceAttributePageableMemoryAccess: hipDeviceAttribute_t = 65;
2390#[doc = "< Device accesses pageable memory\n< via the host's page tables"]
2391pub const hipDeviceAttribute_t_hipDeviceAttributePageableMemoryAccessUsesHostPageTables:
2392 hipDeviceAttribute_t = 66;
2393#[doc = "< PCI Bus ID."]
2394pub const hipDeviceAttribute_t_hipDeviceAttributePciBusId: hipDeviceAttribute_t = 67;
2395#[doc = "< PCI Device ID. Returns pcie slot id"]
2396pub const hipDeviceAttribute_t_hipDeviceAttributePciDeviceId: hipDeviceAttribute_t = 68;
2397#[doc = "< PCI Domain Id."]
2398pub const hipDeviceAttribute_t_hipDeviceAttributePciDomainId: hipDeviceAttribute_t = 69;
2399pub const hipDeviceAttribute_t_hipDeviceAttributePciDomainID: hipDeviceAttribute_t = 69;
2400#[doc = "< Maximum l2 persisting lines capacity in bytes"]
2401pub const hipDeviceAttribute_t_hipDeviceAttributePersistingL2CacheMaxSize: hipDeviceAttribute_t =
2402 70;
2403#[doc = "< 32-bit registers available to a thread block. This\n< number is shared by all thread blocks simultaneously\n< resident on a multiprocessor."]
2404pub const hipDeviceAttribute_t_hipDeviceAttributeMaxRegistersPerBlock: hipDeviceAttribute_t = 71;
2405#[doc = "< 32-bit registers available per block."]
2406pub const hipDeviceAttribute_t_hipDeviceAttributeMaxRegistersPerMultiprocessor:
2407 hipDeviceAttribute_t = 72;
2408#[doc = "< Shared memory reserved by CUDA driver per\n< block."]
2409pub const hipDeviceAttribute_t_hipDeviceAttributeReservedSharedMemPerBlock: hipDeviceAttribute_t =
2410 73;
2411#[doc = "< Maximum shared memory available per block in\n< bytes."]
2412pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSharedMemoryPerBlock: hipDeviceAttribute_t = 74;
2413#[doc = "< Maximum shared memory per block usable by special\n< opt in."]
2414pub const hipDeviceAttribute_t_hipDeviceAttributeSharedMemPerBlockOptin: hipDeviceAttribute_t = 75;
2415#[doc = "< Shared memory available per multiprocessor."]
2416pub const hipDeviceAttribute_t_hipDeviceAttributeSharedMemPerMultiprocessor: hipDeviceAttribute_t =
2417 76;
2418#[doc = "< Cuda only. Performance ratio of single\n< precision to double precision."]
2419pub const hipDeviceAttribute_t_hipDeviceAttributeSingleToDoublePrecisionPerfRatio:
2420 hipDeviceAttribute_t = 77;
2421#[doc = "< Whether to support stream priorities."]
2422pub const hipDeviceAttribute_t_hipDeviceAttributeStreamPrioritiesSupported: hipDeviceAttribute_t =
2423 78;
2424#[doc = "< Alignment requirement for surfaces"]
2425pub const hipDeviceAttribute_t_hipDeviceAttributeSurfaceAlignment: hipDeviceAttribute_t = 79;
2426#[doc = "< Cuda only. Whether device is a Tesla device using TCC driver"]
2427pub const hipDeviceAttribute_t_hipDeviceAttributeTccDriver: hipDeviceAttribute_t = 80;
2428#[doc = "< Alignment requirement for textures"]
2429pub const hipDeviceAttribute_t_hipDeviceAttributeTextureAlignment: hipDeviceAttribute_t = 81;
2430#[doc = "< Pitch alignment requirement for 2D texture\n< references bound to pitched memory;"]
2431pub const hipDeviceAttribute_t_hipDeviceAttributeTexturePitchAlignment: hipDeviceAttribute_t = 82;
2432#[doc = "< Constant memory size in bytes."]
2433pub const hipDeviceAttribute_t_hipDeviceAttributeTotalConstantMemory: hipDeviceAttribute_t = 83;
2434#[doc = "< Global memory available on devicice."]
2435pub const hipDeviceAttribute_t_hipDeviceAttributeTotalGlobalMem: hipDeviceAttribute_t = 84;
2436#[doc = "< Cuda only. An unified address space shared with the\n< host."]
2437pub const hipDeviceAttribute_t_hipDeviceAttributeUnifiedAddressing: hipDeviceAttribute_t = 85;
2438#[doc = "< Previously hipDeviceAttributeUuid"]
2439pub const hipDeviceAttribute_t_hipDeviceAttributeUnused2: hipDeviceAttribute_t = 86;
2440#[doc = "< Warp size in threads."]
2441pub const hipDeviceAttribute_t_hipDeviceAttributeWarpSize: hipDeviceAttribute_t = 87;
2442#[doc = "< Device supports HIP Stream Ordered Memory Allocator"]
2443pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryPoolsSupported: hipDeviceAttribute_t = 88;
2444#[doc = "< Device supports HIP virtual memory\n< management"]
2445pub const hipDeviceAttribute_t_hipDeviceAttributeVirtualMemoryManagementSupported:
2446 hipDeviceAttribute_t = 89;
2447#[doc = "< Can device support host memory registration via\n< hipHostRegister"]
2448pub const hipDeviceAttribute_t_hipDeviceAttributeHostRegisterSupported: hipDeviceAttribute_t = 90;
2449#[doc = "< Supported handle mask for HIP Stream\n< Ordered Memory Allocator"]
2450pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryPoolSupportedHandleTypes:
2451 hipDeviceAttribute_t = 91;
2452pub const hipDeviceAttribute_t_hipDeviceAttributeCudaCompatibleEnd: hipDeviceAttribute_t = 9999;
2453pub const hipDeviceAttribute_t_hipDeviceAttributeAmdSpecificBegin: hipDeviceAttribute_t = 10000;
2454pub const hipDeviceAttribute_t_hipDeviceAttributeClockInstructionRate: hipDeviceAttribute_t = 10000;
2455#[doc = "< Previously hipDeviceAttributeArch"]
2456pub const hipDeviceAttribute_t_hipDeviceAttributeUnused3: hipDeviceAttribute_t = 10001;
2457#[doc = "< Maximum Shared Memory PerMultiprocessor."]
2458pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSharedMemoryPerMultiprocessor:
2459 hipDeviceAttribute_t = 10002;
2460#[doc = "< Previously hipDeviceAttributeGcnArch"]
2461pub const hipDeviceAttribute_t_hipDeviceAttributeUnused4: hipDeviceAttribute_t = 10003;
2462#[doc = "< Previously hipDeviceAttributeGcnArchName"]
2463pub const hipDeviceAttribute_t_hipDeviceAttributeUnused5: hipDeviceAttribute_t = 10004;
2464#[doc = "< Address of the HDP_MEM_COHERENCY_FLUSH_CNTL register"]
2465pub const hipDeviceAttribute_t_hipDeviceAttributeHdpMemFlushCntl: hipDeviceAttribute_t = 10005;
2466#[doc = "< Address of the HDP_REG_COHERENCY_FLUSH_CNTL register"]
2467pub const hipDeviceAttribute_t_hipDeviceAttributeHdpRegFlushCntl: hipDeviceAttribute_t = 10006;
2468#[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< functions"]
2469pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc:
2470 hipDeviceAttribute_t = 10007;
2471#[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< grid dimensions"]
2472pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim:
2473 hipDeviceAttribute_t = 10008;
2474#[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< block dimensions"]
2475pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim:
2476 hipDeviceAttribute_t = 10009;
2477#[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< shared memories"]
2478pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem:
2479 hipDeviceAttribute_t = 10010;
2480#[doc = "< Whether it is LargeBar"]
2481pub const hipDeviceAttribute_t_hipDeviceAttributeIsLargeBar: hipDeviceAttribute_t = 10011;
2482#[doc = "< Revision of the GPU in this device"]
2483pub const hipDeviceAttribute_t_hipDeviceAttributeAsicRevision: hipDeviceAttribute_t = 10012;
2484#[doc = "< '1' if Device supports hipStreamWaitValue32() and\n< hipStreamWaitValue64(), '0' otherwise."]
2485pub const hipDeviceAttribute_t_hipDeviceAttributeCanUseStreamWaitValue: hipDeviceAttribute_t =
2486 10013;
2487#[doc = "< '1' if Device supports image, '0' otherwise."]
2488pub const hipDeviceAttribute_t_hipDeviceAttributeImageSupport: hipDeviceAttribute_t = 10014;
2489#[doc = "< All available physical compute\n< units for the device"]
2490pub const hipDeviceAttribute_t_hipDeviceAttributePhysicalMultiProcessorCount: hipDeviceAttribute_t =
2491 10015;
2492#[doc = "< '1' if Device supports fine grain, '0' otherwise"]
2493pub const hipDeviceAttribute_t_hipDeviceAttributeFineGrainSupport: hipDeviceAttribute_t = 10016;
2494#[doc = "< Constant frequency of wall clock in kilohertz."]
2495pub const hipDeviceAttribute_t_hipDeviceAttributeWallClockRate: hipDeviceAttribute_t = 10017;
2496#[doc = "< The number of XCC(s) on the device"]
2497pub const hipDeviceAttribute_t_hipDeviceAttributeNumberOfXccs: hipDeviceAttribute_t = 10018;
2498#[doc = "< Max number of available (directly or\n< indirectly addressable) VGPRs per thread in\n< DWORDs."]
2499pub const hipDeviceAttribute_t_hipDeviceAttributeMaxAvailableVgprsPerThread: hipDeviceAttribute_t =
2500 10019;
2501#[doc = "< GPU Manufacturer device id"]
2502pub const hipDeviceAttribute_t_hipDeviceAttributePciChipId: hipDeviceAttribute_t = 10020;
2503pub const hipDeviceAttribute_t_hipDeviceAttributeAmdSpecificEnd: hipDeviceAttribute_t = 19999;
2504pub const hipDeviceAttribute_t_hipDeviceAttributeVendorSpecificBegin: hipDeviceAttribute_t = 20000;
2505#[doc = " hipDeviceAttribute_t\n hipDeviceAttributeUnused number: 5"]
2506pub type hipDeviceAttribute_t = ::std::os::raw::c_uint;
2507pub const hipDriverProcAddressQueryResult_HIP_GET_PROC_ADDRESS_SUCCESS:
2508 hipDriverProcAddressQueryResult = 0;
2509pub const hipDriverProcAddressQueryResult_HIP_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND:
2510 hipDriverProcAddressQueryResult = 1;
2511pub const hipDriverProcAddressQueryResult_HIP_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT:
2512 hipDriverProcAddressQueryResult = 2;
2513pub type hipDriverProcAddressQueryResult = ::std::os::raw::c_uint;
2514pub const hipComputeMode_hipComputeModeDefault: hipComputeMode = 0;
2515pub const hipComputeMode_hipComputeModeExclusive: hipComputeMode = 1;
2516pub const hipComputeMode_hipComputeModeProhibited: hipComputeMode = 2;
2517pub const hipComputeMode_hipComputeModeExclusiveProcess: hipComputeMode = 3;
2518pub type hipComputeMode = ::std::os::raw::c_uint;
2519pub const hipFlushGPUDirectRDMAWritesOptions_hipFlushGPUDirectRDMAWritesOptionHost:
2520 hipFlushGPUDirectRDMAWritesOptions = 1;
2521pub const hipFlushGPUDirectRDMAWritesOptions_hipFlushGPUDirectRDMAWritesOptionMemOps:
2522 hipFlushGPUDirectRDMAWritesOptions = 2;
2523pub type hipFlushGPUDirectRDMAWritesOptions = ::std::os::raw::c_uint;
2524pub const hipGPUDirectRDMAWritesOrdering_hipGPUDirectRDMAWritesOrderingNone:
2525 hipGPUDirectRDMAWritesOrdering = 0;
2526pub const hipGPUDirectRDMAWritesOrdering_hipGPUDirectRDMAWritesOrderingOwner:
2527 hipGPUDirectRDMAWritesOrdering = 100;
2528pub const hipGPUDirectRDMAWritesOrdering_hipGPUDirectRDMAWritesOrderingAllDevices:
2529 hipGPUDirectRDMAWritesOrdering = 200;
2530pub type hipGPUDirectRDMAWritesOrdering = ::std::os::raw::c_uint;
2531#[doc = " @defgroup DriverTypes Driver Types\n @{\n This section describes the driver data types.\n"]
2532pub type hipDeviceptr_t = *mut ::std::os::raw::c_void;
2533#[doc = "< Signed channel format"]
2534pub const hipChannelFormatKind_hipChannelFormatKindSigned: hipChannelFormatKind = 0;
2535#[doc = "< Unsigned channel format"]
2536pub const hipChannelFormatKind_hipChannelFormatKindUnsigned: hipChannelFormatKind = 1;
2537#[doc = "< Float channel format"]
2538pub const hipChannelFormatKind_hipChannelFormatKindFloat: hipChannelFormatKind = 2;
2539#[doc = "< No channel format"]
2540pub const hipChannelFormatKind_hipChannelFormatKindNone: hipChannelFormatKind = 3;
2541#[doc = " HIP channel format kinds"]
2542pub type hipChannelFormatKind = ::std::os::raw::c_uint;
2543#[doc = " HIP channel format descriptor"]
2544#[repr(C)]
2545#[derive(Debug, Copy, Clone)]
2546pub struct hipChannelFormatDesc {
2547 pub x: ::std::os::raw::c_int,
2548 pub y: ::std::os::raw::c_int,
2549 pub z: ::std::os::raw::c_int,
2550 pub w: ::std::os::raw::c_int,
2551 #[doc = "< Channel format kind"]
2552 pub f: hipChannelFormatKind,
2553}
2554#[repr(C)]
2555#[derive(Debug, Copy, Clone)]
2556pub struct hipArray {
2557 _unused: [u8; 0],
2558}
2559pub type hipArray_t = *mut hipArray;
2560pub type hipArray_const_t = *const hipArray;
2561#[doc = "< Unsigned 8-bit array format"]
2562pub const hipArray_Format_HIP_AD_FORMAT_UNSIGNED_INT8: hipArray_Format = 1;
2563#[doc = "< Unsigned 16-bit array format"]
2564pub const hipArray_Format_HIP_AD_FORMAT_UNSIGNED_INT16: hipArray_Format = 2;
2565#[doc = "< Unsigned 32-bit array format"]
2566pub const hipArray_Format_HIP_AD_FORMAT_UNSIGNED_INT32: hipArray_Format = 3;
2567#[doc = "< Signed 8-bit array format"]
2568pub const hipArray_Format_HIP_AD_FORMAT_SIGNED_INT8: hipArray_Format = 8;
2569#[doc = "< Signed 16-bit array format"]
2570pub const hipArray_Format_HIP_AD_FORMAT_SIGNED_INT16: hipArray_Format = 9;
2571#[doc = "< Signed 32-bit array format"]
2572pub const hipArray_Format_HIP_AD_FORMAT_SIGNED_INT32: hipArray_Format = 10;
2573#[doc = "< Half array format"]
2574pub const hipArray_Format_HIP_AD_FORMAT_HALF: hipArray_Format = 16;
2575#[doc = "< Float array format"]
2576pub const hipArray_Format_HIP_AD_FORMAT_FLOAT: hipArray_Format = 32;
2577#[doc = " HIP array format"]
2578pub type hipArray_Format = ::std::os::raw::c_uint;
2579#[doc = " HIP array descriptor"]
2580#[repr(C)]
2581#[derive(Debug, Copy, Clone)]
2582pub struct HIP_ARRAY_DESCRIPTOR {
2583 #[doc = "< Width of the array"]
2584 pub Width: usize,
2585 #[doc = "< Height of the array"]
2586 pub Height: usize,
2587 #[doc = "< Format of the array"]
2588 pub Format: hipArray_Format,
2589 #[doc = "< Number of channels of the array"]
2590 pub NumChannels: ::std::os::raw::c_uint,
2591}
2592#[doc = " HIP 3D array descriptor"]
2593#[repr(C)]
2594#[derive(Debug, Copy, Clone)]
2595pub struct HIP_ARRAY3D_DESCRIPTOR {
2596 #[doc = "< Width of the array"]
2597 pub Width: usize,
2598 #[doc = "< Height of the array"]
2599 pub Height: usize,
2600 #[doc = "< Depth of the array"]
2601 pub Depth: usize,
2602 #[doc = "< Format of the array"]
2603 pub Format: hipArray_Format,
2604 #[doc = "< Number of channels of the array"]
2605 pub NumChannels: ::std::os::raw::c_uint,
2606 #[doc = "< Flags of the array"]
2607 pub Flags: ::std::os::raw::c_uint,
2608}
2609#[doc = " HIP 2D memory copy parameters"]
2610#[repr(C)]
2611#[derive(Debug, Copy, Clone)]
2612pub struct hip_Memcpy2D {
2613 #[doc = "< Source width in bytes"]
2614 pub srcXInBytes: usize,
2615 #[doc = "< Source height"]
2616 pub srcY: usize,
2617 #[doc = "< Source memory type"]
2618 pub srcMemoryType: hipMemoryType,
2619 #[doc = "< Source pointer"]
2620 pub srcHost: *const ::std::os::raw::c_void,
2621 #[doc = "< Source device"]
2622 pub srcDevice: hipDeviceptr_t,
2623 #[doc = "< Source array"]
2624 pub srcArray: hipArray_t,
2625 #[doc = "< Source pitch"]
2626 pub srcPitch: usize,
2627 #[doc = "< Destination width in bytes"]
2628 pub dstXInBytes: usize,
2629 #[doc = "< Destination height"]
2630 pub dstY: usize,
2631 #[doc = "< Destination memory type"]
2632 pub dstMemoryType: hipMemoryType,
2633 #[doc = "< Destination pointer"]
2634 pub dstHost: *mut ::std::os::raw::c_void,
2635 #[doc = "< Destination device"]
2636 pub dstDevice: hipDeviceptr_t,
2637 #[doc = "< Destination array"]
2638 pub dstArray: hipArray_t,
2639 #[doc = "< Destination pitch"]
2640 pub dstPitch: usize,
2641 #[doc = "< Width in bytes of the 2D memory copy"]
2642 pub WidthInBytes: usize,
2643 #[doc = "< Height of the 2D memory copy"]
2644 pub Height: usize,
2645}
2646#[doc = " HIP mipmapped array"]
2647#[repr(C)]
2648#[derive(Debug, Copy, Clone)]
2649pub struct hipMipmappedArray {
2650 #[doc = "< Data pointer of the mipmapped array"]
2651 pub data: *mut ::std::os::raw::c_void,
2652 #[doc = "< Description of the mipmapped array"]
2653 pub desc: hipChannelFormatDesc,
2654 #[doc = "< Type of the mipmapped array"]
2655 pub type_: ::std::os::raw::c_uint,
2656 #[doc = "< Width of the mipmapped array"]
2657 pub width: ::std::os::raw::c_uint,
2658 #[doc = "< Height of the mipmapped array"]
2659 pub height: ::std::os::raw::c_uint,
2660 #[doc = "< Depth of the mipmapped array"]
2661 pub depth: ::std::os::raw::c_uint,
2662 #[doc = "< Minimum level of the mipmapped array"]
2663 pub min_mipmap_level: ::std::os::raw::c_uint,
2664 #[doc = "< Maximum level of the mipmapped array"]
2665 pub max_mipmap_level: ::std::os::raw::c_uint,
2666 #[doc = "< Flags of the mipmapped array"]
2667 pub flags: ::std::os::raw::c_uint,
2668 #[doc = "< Format of the mipmapped array"]
2669 pub format: hipArray_Format,
2670 #[doc = "< Number of channels of the mipmapped array"]
2671 pub num_channels: ::std::os::raw::c_uint,
2672}
2673#[doc = " HIP mipmapped array pointer"]
2674pub type hipMipmappedArray_t = *mut hipMipmappedArray;
2675pub type hipmipmappedArray = hipMipmappedArray_t;
2676pub type hipMipmappedArray_const_t = *const hipMipmappedArray;
2677#[doc = "< Array resource"]
2678pub const hipResourceType_hipResourceTypeArray: hipResourceType = 0;
2679#[doc = "< Mipmapped array resource"]
2680pub const hipResourceType_hipResourceTypeMipmappedArray: hipResourceType = 1;
2681#[doc = "< Linear resource"]
2682pub const hipResourceType_hipResourceTypeLinear: hipResourceType = 2;
2683#[doc = "< Pitch 2D resource"]
2684pub const hipResourceType_hipResourceTypePitch2D: hipResourceType = 3;
2685#[doc = " HIP resource types"]
2686pub type hipResourceType = ::std::os::raw::c_uint;
2687#[doc = "< Array resource"]
2688pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_ARRAY: HIPresourcetype_enum = 0;
2689#[doc = "< Mipmapped array resource"]
2690pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY: HIPresourcetype_enum = 1;
2691#[doc = "< Linear resource"]
2692pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_LINEAR: HIPresourcetype_enum = 2;
2693#[doc = "< Pitch 2D resource"]
2694pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_PITCH2D: HIPresourcetype_enum = 3;
2695pub type HIPresourcetype_enum = ::std::os::raw::c_uint;
2696pub use self::HIPresourcetype_enum as HIPresourcetype;
2697pub use self::HIPresourcetype_enum as hipResourcetype;
2698#[doc = "< Wrap address mode"]
2699pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_WRAP: HIPaddress_mode_enum = 0;
2700#[doc = "< Clamp address mode"]
2701pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_CLAMP: HIPaddress_mode_enum = 1;
2702#[doc = "< Mirror address mode"]
2703pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_MIRROR: HIPaddress_mode_enum = 2;
2704#[doc = "< Border address mode"]
2705pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_BORDER: HIPaddress_mode_enum = 3;
2706#[doc = " HIP texture address modes"]
2707pub type HIPaddress_mode_enum = ::std::os::raw::c_uint;
2708#[doc = " HIP texture address modes"]
2709pub use self::HIPaddress_mode_enum as HIPaddress_mode;
2710#[doc = "< Filter mode point"]
2711pub const HIPfilter_mode_enum_HIP_TR_FILTER_MODE_POINT: HIPfilter_mode_enum = 0;
2712#[doc = "< Filter mode linear"]
2713pub const HIPfilter_mode_enum_HIP_TR_FILTER_MODE_LINEAR: HIPfilter_mode_enum = 1;
2714#[doc = " HIP filter modes"]
2715pub type HIPfilter_mode_enum = ::std::os::raw::c_uint;
2716#[doc = " HIP filter modes"]
2717pub use self::HIPfilter_mode_enum as HIPfilter_mode;
2718#[doc = " HIP texture descriptor"]
2719#[repr(C)]
2720#[derive(Debug, Copy, Clone)]
2721pub struct HIP_TEXTURE_DESC_st {
2722 #[doc = "< Address modes"]
2723 pub addressMode: [HIPaddress_mode; 3usize],
2724 #[doc = "< Filter mode"]
2725 pub filterMode: HIPfilter_mode,
2726 #[doc = "< Flags"]
2727 pub flags: ::std::os::raw::c_uint,
2728 #[doc = "< Maximum anisotropy ratio"]
2729 pub maxAnisotropy: ::std::os::raw::c_uint,
2730 #[doc = "< Mipmap filter mode"]
2731 pub mipmapFilterMode: HIPfilter_mode,
2732 #[doc = "< Mipmap level bias"]
2733 pub mipmapLevelBias: f32,
2734 #[doc = "< Mipmap minimum level clamp"]
2735 pub minMipmapLevelClamp: f32,
2736 #[doc = "< Mipmap maximum level clamp"]
2737 pub maxMipmapLevelClamp: f32,
2738 #[doc = "< Border Color"]
2739 pub borderColor: [f32; 4usize],
2740 pub reserved: [::std::os::raw::c_int; 12usize],
2741}
2742#[doc = " HIP texture descriptor"]
2743pub type HIP_TEXTURE_DESC = HIP_TEXTURE_DESC_st;
2744#[doc = "< No resource view format (use underlying resource format)"]
2745pub const hipResourceViewFormat_hipResViewFormatNone: hipResourceViewFormat = 0;
2746#[doc = "< 1 channel, unsigned 8-bit integers"]
2747pub const hipResourceViewFormat_hipResViewFormatUnsignedChar1: hipResourceViewFormat = 1;
2748#[doc = "< 2 channels, unsigned 8-bit integers"]
2749pub const hipResourceViewFormat_hipResViewFormatUnsignedChar2: hipResourceViewFormat = 2;
2750#[doc = "< 4 channels, unsigned 8-bit integers"]
2751pub const hipResourceViewFormat_hipResViewFormatUnsignedChar4: hipResourceViewFormat = 3;
2752#[doc = "< 1 channel, signed 8-bit integers"]
2753pub const hipResourceViewFormat_hipResViewFormatSignedChar1: hipResourceViewFormat = 4;
2754#[doc = "< 2 channels, signed 8-bit integers"]
2755pub const hipResourceViewFormat_hipResViewFormatSignedChar2: hipResourceViewFormat = 5;
2756#[doc = "< 4 channels, signed 8-bit integers"]
2757pub const hipResourceViewFormat_hipResViewFormatSignedChar4: hipResourceViewFormat = 6;
2758#[doc = "< 1 channel, unsigned 16-bit integers"]
2759pub const hipResourceViewFormat_hipResViewFormatUnsignedShort1: hipResourceViewFormat = 7;
2760#[doc = "< 2 channels, unsigned 16-bit integers"]
2761pub const hipResourceViewFormat_hipResViewFormatUnsignedShort2: hipResourceViewFormat = 8;
2762#[doc = "< 4 channels, unsigned 16-bit integers"]
2763pub const hipResourceViewFormat_hipResViewFormatUnsignedShort4: hipResourceViewFormat = 9;
2764#[doc = "< 1 channel, signed 16-bit integers"]
2765pub const hipResourceViewFormat_hipResViewFormatSignedShort1: hipResourceViewFormat = 10;
2766#[doc = "< 2 channels, signed 16-bit integers"]
2767pub const hipResourceViewFormat_hipResViewFormatSignedShort2: hipResourceViewFormat = 11;
2768#[doc = "< 4 channels, signed 16-bit integers"]
2769pub const hipResourceViewFormat_hipResViewFormatSignedShort4: hipResourceViewFormat = 12;
2770#[doc = "< 1 channel, unsigned 32-bit integers"]
2771pub const hipResourceViewFormat_hipResViewFormatUnsignedInt1: hipResourceViewFormat = 13;
2772#[doc = "< 2 channels, unsigned 32-bit integers"]
2773pub const hipResourceViewFormat_hipResViewFormatUnsignedInt2: hipResourceViewFormat = 14;
2774#[doc = "< 4 channels, unsigned 32-bit integers"]
2775pub const hipResourceViewFormat_hipResViewFormatUnsignedInt4: hipResourceViewFormat = 15;
2776#[doc = "< 1 channel, signed 32-bit integers"]
2777pub const hipResourceViewFormat_hipResViewFormatSignedInt1: hipResourceViewFormat = 16;
2778#[doc = "< 2 channels, signed 32-bit integers"]
2779pub const hipResourceViewFormat_hipResViewFormatSignedInt2: hipResourceViewFormat = 17;
2780#[doc = "< 4 channels, signed 32-bit integers"]
2781pub const hipResourceViewFormat_hipResViewFormatSignedInt4: hipResourceViewFormat = 18;
2782#[doc = "< 1 channel, 16-bit floating point"]
2783pub const hipResourceViewFormat_hipResViewFormatHalf1: hipResourceViewFormat = 19;
2784#[doc = "< 2 channels, 16-bit floating point"]
2785pub const hipResourceViewFormat_hipResViewFormatHalf2: hipResourceViewFormat = 20;
2786#[doc = "< 4 channels, 16-bit floating point"]
2787pub const hipResourceViewFormat_hipResViewFormatHalf4: hipResourceViewFormat = 21;
2788#[doc = "< 1 channel, 32-bit floating point"]
2789pub const hipResourceViewFormat_hipResViewFormatFloat1: hipResourceViewFormat = 22;
2790#[doc = "< 2 channels, 32-bit floating point"]
2791pub const hipResourceViewFormat_hipResViewFormatFloat2: hipResourceViewFormat = 23;
2792#[doc = "< 4 channels, 32-bit floating point"]
2793pub const hipResourceViewFormat_hipResViewFormatFloat4: hipResourceViewFormat = 24;
2794#[doc = "< Block-compressed 1"]
2795pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed1: hipResourceViewFormat =
2796 25;
2797#[doc = "< Block-compressed 2"]
2798pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed2: hipResourceViewFormat =
2799 26;
2800#[doc = "< Block-compressed 3"]
2801pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed3: hipResourceViewFormat =
2802 27;
2803#[doc = "< Block-compressed 4 unsigned"]
2804pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed4: hipResourceViewFormat =
2805 28;
2806#[doc = "< Block-compressed 4 signed"]
2807pub const hipResourceViewFormat_hipResViewFormatSignedBlockCompressed4: hipResourceViewFormat = 29;
2808#[doc = "< Block-compressed 5 unsigned"]
2809pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed5: hipResourceViewFormat =
2810 30;
2811#[doc = "< Block-compressed 5 signed"]
2812pub const hipResourceViewFormat_hipResViewFormatSignedBlockCompressed5: hipResourceViewFormat = 31;
2813#[doc = "< Block-compressed 6 unsigned half-float"]
2814pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed6H: hipResourceViewFormat =
2815 32;
2816#[doc = "< Block-compressed 6 signed half-float"]
2817pub const hipResourceViewFormat_hipResViewFormatSignedBlockCompressed6H: hipResourceViewFormat = 33;
2818#[doc = "< Block-compressed 7"]
2819pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed7: hipResourceViewFormat =
2820 34;
2821#[doc = " HIP texture resource view formats"]
2822pub type hipResourceViewFormat = ::std::os::raw::c_uint;
2823#[doc = "< No resource view format (use underlying resource format)"]
2824pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_NONE: HIPresourceViewFormat_enum = 0;
2825#[doc = "< 1 channel, unsigned 8-bit integers"]
2826pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X8: HIPresourceViewFormat_enum = 1;
2827#[doc = "< 2 channels, unsigned 8-bit integers"]
2828pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X8: HIPresourceViewFormat_enum = 2;
2829#[doc = "< 4 channels, unsigned 8-bit integers"]
2830pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X8: HIPresourceViewFormat_enum = 3;
2831#[doc = "< 1 channel, signed 8-bit integers"]
2832pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X8: HIPresourceViewFormat_enum = 4;
2833#[doc = "< 2 channels, signed 8-bit integers"]
2834pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X8: HIPresourceViewFormat_enum = 5;
2835#[doc = "< 4 channels, signed 8-bit integers"]
2836pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X8: HIPresourceViewFormat_enum = 6;
2837#[doc = "< 1 channel, unsigned 16-bit integers"]
2838pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X16: HIPresourceViewFormat_enum = 7;
2839#[doc = "< 2 channels, unsigned 16-bit integers"]
2840pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X16: HIPresourceViewFormat_enum = 8;
2841#[doc = "< 4 channels, unsigned 16-bit integers"]
2842pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X16: HIPresourceViewFormat_enum = 9;
2843#[doc = "< 1 channel, signed 16-bit integers"]
2844pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X16: HIPresourceViewFormat_enum = 10;
2845#[doc = "< 2 channels, signed 16-bit integers"]
2846pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X16: HIPresourceViewFormat_enum = 11;
2847#[doc = "< 4 channels, signed 16-bit integers"]
2848pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X16: HIPresourceViewFormat_enum = 12;
2849#[doc = "< 1 channel, unsigned 32-bit integers"]
2850pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X32: HIPresourceViewFormat_enum = 13;
2851#[doc = "< 2 channels, unsigned 32-bit integers"]
2852pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X32: HIPresourceViewFormat_enum = 14;
2853#[doc = "< 4 channels, unsigned 32-bit integers"]
2854pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X32: HIPresourceViewFormat_enum = 15;
2855#[doc = "< 1 channel, signed 32-bit integers"]
2856pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X32: HIPresourceViewFormat_enum = 16;
2857#[doc = "< 2 channels, signed 32-bit integers"]
2858pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X32: HIPresourceViewFormat_enum = 17;
2859#[doc = "< 4 channels, signed 32-bit integers"]
2860pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X32: HIPresourceViewFormat_enum = 18;
2861#[doc = "< 1 channel, 16-bit floating point"]
2862pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_1X16: HIPresourceViewFormat_enum =
2863 19;
2864#[doc = "< 2 channels, 16-bit floating point"]
2865pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_2X16: HIPresourceViewFormat_enum =
2866 20;
2867#[doc = "< 4 channels, 16-bit floating point"]
2868pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_4X16: HIPresourceViewFormat_enum =
2869 21;
2870#[doc = "< 1 channel, 32-bit floating point"]
2871pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_1X32: HIPresourceViewFormat_enum =
2872 22;
2873#[doc = "< 2 channels, 32-bit floating point"]
2874pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_2X32: HIPresourceViewFormat_enum =
2875 23;
2876#[doc = "< 4 channels, 32-bit floating point"]
2877pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_4X32: HIPresourceViewFormat_enum =
2878 24;
2879#[doc = "< Block-compressed 1"]
2880pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC1: HIPresourceViewFormat_enum =
2881 25;
2882#[doc = "< Block-compressed 2"]
2883pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC2: HIPresourceViewFormat_enum =
2884 26;
2885#[doc = "< Block-compressed 3"]
2886pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC3: HIPresourceViewFormat_enum =
2887 27;
2888#[doc = "< Block-compressed 4 unsigned"]
2889pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC4: HIPresourceViewFormat_enum =
2890 28;
2891#[doc = "< Block-compressed 4 signed"]
2892pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC4: HIPresourceViewFormat_enum =
2893 29;
2894#[doc = "< Block-compressed 5 unsigned"]
2895pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC5: HIPresourceViewFormat_enum =
2896 30;
2897#[doc = "< Block-compressed 5 signed"]
2898pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC5: HIPresourceViewFormat_enum =
2899 31;
2900#[doc = "< Block-compressed 6 unsigned half-float"]
2901pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H: HIPresourceViewFormat_enum =
2902 32;
2903#[doc = "< Block-compressed 6 signed half-float"]
2904pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC6H: HIPresourceViewFormat_enum =
2905 33;
2906#[doc = "< Block-compressed 7"]
2907pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC7: HIPresourceViewFormat_enum =
2908 34;
2909#[doc = " HIP texture resource view formats"]
2910pub type HIPresourceViewFormat_enum = ::std::os::raw::c_uint;
2911#[doc = " HIP texture resource view formats"]
2912pub use self::HIPresourceViewFormat_enum as HIPresourceViewFormat;
2913#[doc = " HIP resource descriptor"]
2914#[repr(C)]
2915#[derive(Copy, Clone)]
2916pub struct hipResourceDesc {
2917 #[doc = "< Resource type"]
2918 pub resType: hipResourceType,
2919 pub res: hipResourceDesc__bindgen_ty_1,
2920}
2921#[repr(C)]
2922#[derive(Copy, Clone)]
2923pub union hipResourceDesc__bindgen_ty_1 {
2924 pub array: hipResourceDesc__bindgen_ty_1__bindgen_ty_1,
2925 pub mipmap: hipResourceDesc__bindgen_ty_1__bindgen_ty_2,
2926 pub linear: hipResourceDesc__bindgen_ty_1__bindgen_ty_3,
2927 pub pitch2D: hipResourceDesc__bindgen_ty_1__bindgen_ty_4,
2928}
2929#[repr(C)]
2930#[derive(Debug, Copy, Clone)]
2931pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_1 {
2932 #[doc = "< HIP array"]
2933 pub array: hipArray_t,
2934}
2935#[repr(C)]
2936#[derive(Debug, Copy, Clone)]
2937pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_2 {
2938 #[doc = "< HIP mipmapped array"]
2939 pub mipmap: hipMipmappedArray_t,
2940}
2941#[repr(C)]
2942#[derive(Debug, Copy, Clone)]
2943pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_3 {
2944 #[doc = "< Device pointer"]
2945 pub devPtr: *mut ::std::os::raw::c_void,
2946 #[doc = "< Channel format description"]
2947 pub desc: hipChannelFormatDesc,
2948 #[doc = "< Size in bytes"]
2949 pub sizeInBytes: usize,
2950}
2951#[repr(C)]
2952#[derive(Debug, Copy, Clone)]
2953pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_4 {
2954 #[doc = "< Device pointer"]
2955 pub devPtr: *mut ::std::os::raw::c_void,
2956 #[doc = "< Channel format description"]
2957 pub desc: hipChannelFormatDesc,
2958 #[doc = "< Width of the array in elements"]
2959 pub width: usize,
2960 #[doc = "< Height of the array in elements"]
2961 pub height: usize,
2962 #[doc = "< Pitch between two rows in bytes"]
2963 pub pitchInBytes: usize,
2964}
2965#[doc = " HIP resource view descriptor struct"]
2966#[repr(C)]
2967#[derive(Copy, Clone)]
2968pub struct HIP_RESOURCE_DESC_st {
2969 #[doc = "< Resource type"]
2970 pub resType: HIPresourcetype,
2971 pub res: HIP_RESOURCE_DESC_st__bindgen_ty_1,
2972 #[doc = "< Flags (must be zero)"]
2973 pub flags: ::std::os::raw::c_uint,
2974}
2975#[repr(C)]
2976#[derive(Copy, Clone)]
2977pub union HIP_RESOURCE_DESC_st__bindgen_ty_1 {
2978 pub array: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1,
2979 pub mipmap: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2,
2980 pub linear: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3,
2981 pub pitch2D: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
2982 pub reserved: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5,
2983}
2984#[repr(C)]
2985#[derive(Debug, Copy, Clone)]
2986pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
2987 #[doc = "< HIP array"]
2988 pub hArray: hipArray_t,
2989}
2990#[repr(C)]
2991#[derive(Debug, Copy, Clone)]
2992pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 {
2993 #[doc = "< HIP mipmapped array"]
2994 pub hMipmappedArray: hipMipmappedArray_t,
2995}
2996#[repr(C)]
2997#[derive(Debug, Copy, Clone)]
2998pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 {
2999 #[doc = "< Device pointer"]
3000 pub devPtr: hipDeviceptr_t,
3001 #[doc = "< Array format"]
3002 pub format: hipArray_Format,
3003 #[doc = "< Channels per array element"]
3004 pub numChannels: ::std::os::raw::c_uint,
3005 #[doc = "< Size in bytes"]
3006 pub sizeInBytes: usize,
3007}
3008#[repr(C)]
3009#[derive(Debug, Copy, Clone)]
3010pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 {
3011 #[doc = "< Device pointer"]
3012 pub devPtr: hipDeviceptr_t,
3013 #[doc = "< Array format"]
3014 pub format: hipArray_Format,
3015 #[doc = "< Channels per array element"]
3016 pub numChannels: ::std::os::raw::c_uint,
3017 #[doc = "< Width of the array in elements"]
3018 pub width: usize,
3019 #[doc = "< Height of the array in elements"]
3020 pub height: usize,
3021 #[doc = "< Pitch between two rows in bytes"]
3022 pub pitchInBytes: usize,
3023}
3024#[repr(C)]
3025#[derive(Debug, Copy, Clone)]
3026pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5 {
3027 pub reserved: [::std::os::raw::c_int; 32usize],
3028}
3029#[doc = " HIP resource view descriptor struct"]
3030pub type HIP_RESOURCE_DESC = HIP_RESOURCE_DESC_st;
3031#[doc = " HIP resource view descriptor"]
3032#[repr(C)]
3033#[derive(Debug, Copy, Clone)]
3034pub struct hipResourceViewDesc {
3035 #[doc = "< Resource view format"]
3036 pub format: hipResourceViewFormat,
3037 #[doc = "< Width of the resource view"]
3038 pub width: usize,
3039 #[doc = "< Height of the resource view"]
3040 pub height: usize,
3041 #[doc = "< Depth of the resource view"]
3042 pub depth: usize,
3043 #[doc = "< First defined mipmap level"]
3044 pub firstMipmapLevel: ::std::os::raw::c_uint,
3045 #[doc = "< Last defined mipmap level"]
3046 pub lastMipmapLevel: ::std::os::raw::c_uint,
3047 #[doc = "< First layer index"]
3048 pub firstLayer: ::std::os::raw::c_uint,
3049 #[doc = "< Last layer index"]
3050 pub lastLayer: ::std::os::raw::c_uint,
3051}
3052#[doc = " Resource view descriptor"]
3053#[repr(C)]
3054#[derive(Debug, Copy, Clone)]
3055pub struct HIP_RESOURCE_VIEW_DESC_st {
3056 #[doc = "< Resource view format"]
3057 pub format: HIPresourceViewFormat,
3058 #[doc = "< Width of the resource view"]
3059 pub width: usize,
3060 #[doc = "< Height of the resource view"]
3061 pub height: usize,
3062 #[doc = "< Depth of the resource view"]
3063 pub depth: usize,
3064 #[doc = "< First defined mipmap level"]
3065 pub firstMipmapLevel: ::std::os::raw::c_uint,
3066 #[doc = "< Last defined mipmap level"]
3067 pub lastMipmapLevel: ::std::os::raw::c_uint,
3068 #[doc = "< First layer index"]
3069 pub firstLayer: ::std::os::raw::c_uint,
3070 #[doc = "< Last layer index"]
3071 pub lastLayer: ::std::os::raw::c_uint,
3072 pub reserved: [::std::os::raw::c_uint; 16usize],
3073}
3074#[doc = " Resource view descriptor"]
3075pub type HIP_RESOURCE_VIEW_DESC = HIP_RESOURCE_VIEW_DESC_st;
3076#[doc = "< Host-to-Host Copy"]
3077pub const hipMemcpyKind_hipMemcpyHostToHost: hipMemcpyKind = 0;
3078#[doc = "< Host-to-Device Copy"]
3079pub const hipMemcpyKind_hipMemcpyHostToDevice: hipMemcpyKind = 1;
3080#[doc = "< Device-to-Host Copy"]
3081pub const hipMemcpyKind_hipMemcpyDeviceToHost: hipMemcpyKind = 2;
3082#[doc = "< Device-to-Device Copy"]
3083pub const hipMemcpyKind_hipMemcpyDeviceToDevice: hipMemcpyKind = 3;
3084#[doc = "< Runtime will automatically determine\n< copy-kind based on virtual addresses."]
3085pub const hipMemcpyKind_hipMemcpyDefault: hipMemcpyKind = 4;
3086#[doc = "< Device-to-Device Copy without using compute units"]
3087pub const hipMemcpyKind_hipMemcpyDeviceToDeviceNoCU: hipMemcpyKind = 1024;
3088pub type hipMemcpyKind = ::std::os::raw::c_uint;
3089#[doc = " HIP pithed pointer"]
3090#[repr(C)]
3091#[derive(Debug, Copy, Clone)]
3092pub struct hipPitchedPtr {
3093 #[doc = "< Pointer to the allocated memory"]
3094 pub ptr: *mut ::std::os::raw::c_void,
3095 #[doc = "< Pitch in bytes"]
3096 pub pitch: usize,
3097 #[doc = "< Logical size of the first dimension of allocation in elements"]
3098 pub xsize: usize,
3099 #[doc = "< Logical size of the second dimension of allocation in elements"]
3100 pub ysize: usize,
3101}
3102#[doc = " HIP extent"]
3103#[repr(C)]
3104#[derive(Debug, Copy, Clone)]
3105pub struct hipExtent {
3106 pub width: usize,
3107 pub height: usize,
3108 pub depth: usize,
3109}
3110#[doc = " HIP position"]
3111#[repr(C)]
3112#[derive(Debug, Copy, Clone)]
3113pub struct hipPos {
3114 #[doc = "< X coordinate"]
3115 pub x: usize,
3116 #[doc = "< Y coordinate"]
3117 pub y: usize,
3118 #[doc = "< Z coordinate"]
3119 pub z: usize,
3120}
3121#[doc = " HIP 3D memory copy parameters"]
3122#[repr(C)]
3123#[derive(Debug, Copy, Clone)]
3124pub struct hipMemcpy3DParms {
3125 #[doc = "< Source array"]
3126 pub srcArray: hipArray_t,
3127 #[doc = "< Source position"]
3128 pub srcPos: hipPos,
3129 #[doc = "< Source pointer"]
3130 pub srcPtr: hipPitchedPtr,
3131 #[doc = "< Destination array"]
3132 pub dstArray: hipArray_t,
3133 #[doc = "< Destination position"]
3134 pub dstPos: hipPos,
3135 #[doc = "< Destination pointer"]
3136 pub dstPtr: hipPitchedPtr,
3137 #[doc = "< Extent of 3D memory copy"]
3138 pub extent: hipExtent,
3139 #[doc = "< Kind of 3D memory copy"]
3140 pub kind: hipMemcpyKind,
3141}
3142#[doc = " HIP 3D memory copy"]
3143#[repr(C)]
3144#[derive(Debug, Copy, Clone)]
3145pub struct HIP_MEMCPY3D {
3146 #[doc = "< Source X in bytes"]
3147 pub srcXInBytes: usize,
3148 #[doc = "< Source Y"]
3149 pub srcY: usize,
3150 #[doc = "< Source Z"]
3151 pub srcZ: usize,
3152 #[doc = "< Source LOD"]
3153 pub srcLOD: usize,
3154 #[doc = "< Source memory type"]
3155 pub srcMemoryType: hipMemoryType,
3156 #[doc = "< Source host pointer"]
3157 pub srcHost: *const ::std::os::raw::c_void,
3158 #[doc = "< Source device"]
3159 pub srcDevice: hipDeviceptr_t,
3160 #[doc = "< Source array"]
3161 pub srcArray: hipArray_t,
3162 #[doc = "< Source pitch"]
3163 pub srcPitch: usize,
3164 #[doc = "< Source height"]
3165 pub srcHeight: usize,
3166 #[doc = "< Destination X in bytes"]
3167 pub dstXInBytes: usize,
3168 #[doc = "< Destination Y"]
3169 pub dstY: usize,
3170 #[doc = "< Destination Z"]
3171 pub dstZ: usize,
3172 #[doc = "< Destination LOD"]
3173 pub dstLOD: usize,
3174 #[doc = "< Destination memory type"]
3175 pub dstMemoryType: hipMemoryType,
3176 #[doc = "< Destination host pointer"]
3177 pub dstHost: *mut ::std::os::raw::c_void,
3178 #[doc = "< Destination device"]
3179 pub dstDevice: hipDeviceptr_t,
3180 #[doc = "< Destination array"]
3181 pub dstArray: hipArray_t,
3182 #[doc = "< Destination pitch"]
3183 pub dstPitch: usize,
3184 #[doc = "< Destination height"]
3185 pub dstHeight: usize,
3186 #[doc = "< Width in bytes of 3D memory copy"]
3187 pub WidthInBytes: usize,
3188 #[doc = "< Height in bytes of 3D memory copy"]
3189 pub Height: usize,
3190 #[doc = "< Depth in bytes of 3D memory copy"]
3191 pub Depth: usize,
3192}
3193pub const hipMemLocationType_hipMemLocationTypeInvalid: hipMemLocationType = 0;
3194pub const hipMemLocationType_hipMemLocationTypeNone: hipMemLocationType = 0;
3195#[doc = "< Device location, thus it's HIP device ID"]
3196pub const hipMemLocationType_hipMemLocationTypeDevice: hipMemLocationType = 1;
3197#[doc = "< Host location, id is ignored"]
3198pub const hipMemLocationType_hipMemLocationTypeHost: hipMemLocationType = 2;
3199#[doc = "< Host NUMA node location, id is host NUMA node id"]
3200pub const hipMemLocationType_hipMemLocationTypeHostNuma: hipMemLocationType = 3;
3201pub const hipMemLocationType_hipMemLocationTypeHostNumaCurrent: hipMemLocationType = 4;
3202#[doc = " Specifies the type of location"]
3203pub type hipMemLocationType = ::std::os::raw::c_uint;
3204#[doc = " Specifies a memory location.\n\n To specify a gpu, set type = @p hipMemLocationTypeDevice and set id = the gpu's device ID"]
3205#[repr(C)]
3206#[derive(Debug, Copy, Clone)]
3207pub struct hipMemLocation {
3208 #[doc = "< Specifies the location type, which describes the meaning of id"]
3209 pub type_: hipMemLocationType,
3210 #[doc = "< Identifier for the provided location type @p hipMemLocationType"]
3211 pub id: ::std::os::raw::c_int,
3212}
3213#[doc = "< Default flag"]
3214pub const hipMemcpyFlags_hipMemcpyFlagDefault: hipMemcpyFlags = 0;
3215#[doc = "< Tries to overlap copy with compute work."]
3216pub const hipMemcpyFlags_hipMemcpyFlagPreferOverlapWithCompute: hipMemcpyFlags = 1;
3217#[doc = " Flags to specify for copies within a batch. Used with hipMemcpyBatchAsync"]
3218pub type hipMemcpyFlags = ::std::os::raw::c_uint;
3219#[doc = "< Default Invalid."]
3220pub const hipMemcpySrcAccessOrder_hipMemcpySrcAccessOrderInvalid: hipMemcpySrcAccessOrder = 0;
3221#[doc = "< Access to source pointer must be in stream order."]
3222pub const hipMemcpySrcAccessOrder_hipMemcpySrcAccessOrderStream: hipMemcpySrcAccessOrder = 1;
3223pub const hipMemcpySrcAccessOrder_hipMemcpySrcAccessOrderDuringApiCall: hipMemcpySrcAccessOrder = 2;
3224pub const hipMemcpySrcAccessOrder_hipMemcpySrcAccessOrderAny: hipMemcpySrcAccessOrder = 3;
3225pub const hipMemcpySrcAccessOrder_hipMemcpySrcAccessOrderMax: hipMemcpySrcAccessOrder = 2147483647;
3226#[doc = " Flags to specify order in which source pointer is accessed by Batch memcpy"]
3227pub type hipMemcpySrcAccessOrder = ::std::os::raw::c_uint;
3228#[doc = " Attributes for copies within a batch."]
3229#[repr(C)]
3230#[derive(Debug, Copy, Clone)]
3231pub struct hipMemcpyAttributes {
3232 #[doc = "< Source access ordering to be observed for copies with this attribute."]
3233 pub srcAccessOrder: hipMemcpySrcAccessOrder,
3234 #[doc = "< Location hint for src operand."]
3235 pub srcLocHint: hipMemLocation,
3236 #[doc = "< Location hint for destination operand."]
3237 pub dstLocHint: hipMemLocation,
3238 #[doc = "< Additional Flags for copies. See hipMemcpyFlags."]
3239 pub flags: ::std::os::raw::c_uint,
3240}
3241#[doc = "< Mempcy operand is a valid pointer."]
3242pub const hipMemcpy3DOperandType_hipMemcpyOperandTypePointer: hipMemcpy3DOperandType = 1;
3243#[doc = "< Memcpy operand is a valid hipArray."]
3244pub const hipMemcpy3DOperandType_hipMemcpyOperandTypeArray: hipMemcpy3DOperandType = 2;
3245pub const hipMemcpy3DOperandType_hipMemcpyOperandTypeMax: hipMemcpy3DOperandType = 2147483647;
3246#[doc = " Operand types for individual copies within a batch"]
3247pub type hipMemcpy3DOperandType = ::std::os::raw::c_uint;
3248#[doc = " Struct representing offset into a hipArray_t in elements."]
3249#[repr(C)]
3250#[derive(Debug, Copy, Clone)]
3251pub struct hipOffset3D {
3252 pub x: usize,
3253 pub y: usize,
3254 pub z: usize,
3255}
3256#[doc = " Struct representing an operand for copy with hipMemcpy3DBatchAsync."]
3257#[repr(C)]
3258#[derive(Copy, Clone)]
3259pub struct hipMemcpy3DOperand {
3260 pub type_: hipMemcpy3DOperandType,
3261 pub op: hipMemcpy3DOperand__bindgen_ty_1,
3262}
3263#[repr(C)]
3264#[derive(Copy, Clone)]
3265pub union hipMemcpy3DOperand__bindgen_ty_1 {
3266 pub ptr: hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1,
3267 pub array: hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2,
3268}
3269#[repr(C)]
3270#[derive(Debug, Copy, Clone)]
3271pub struct hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1 {
3272 pub ptr: *mut ::std::os::raw::c_void,
3273 #[doc = "< Length of each row in elements."]
3274 pub rowLength: usize,
3275 #[doc = "< Height of each layer in elements."]
3276 pub layerHeight: usize,
3277 #[doc = "< Location Hint for the operand."]
3278 pub locHint: hipMemLocation,
3279}
3280#[repr(C)]
3281#[derive(Debug, Copy, Clone)]
3282pub struct hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2 {
3283 #[doc = "< Array struct for hipMemcpyOperandTypeArray."]
3284 pub array: hipArray_t,
3285 #[doc = "< Offset into array in elements."]
3286 pub offset: hipOffset3D,
3287}
3288#[doc = " HIP 3D Batch Op"]
3289#[repr(C)]
3290#[derive(Copy, Clone)]
3291pub struct hipMemcpy3DBatchOp {
3292 pub src: hipMemcpy3DOperand,
3293 pub dst: hipMemcpy3DOperand,
3294 pub extent: hipExtent,
3295 pub srcAccessOrder: hipMemcpySrcAccessOrder,
3296 pub flags: ::std::os::raw::c_uint,
3297}
3298#[repr(C)]
3299#[derive(Debug, Copy, Clone)]
3300pub struct hipMemcpy3DPeerParms {
3301 #[doc = "< Source memory address"]
3302 pub srcArray: hipArray_t,
3303 #[doc = "< Source position offset"]
3304 pub srcPos: hipPos,
3305 #[doc = "< Pitched source memory address"]
3306 pub srcPtr: hipPitchedPtr,
3307 #[doc = "< Source device"]
3308 pub srcDevice: ::std::os::raw::c_int,
3309 #[doc = "< Destination memory address"]
3310 pub dstArray: hipArray_t,
3311 #[doc = "< Destination position offset"]
3312 pub dstPos: hipPos,
3313 #[doc = "< Pitched destination memory address"]
3314 pub dstPtr: hipPitchedPtr,
3315 #[doc = "< Destination device"]
3316 pub dstDevice: ::std::os::raw::c_int,
3317 #[doc = "< Requested memory copy size"]
3318 pub extent: hipExtent,
3319}
3320#[doc = "< The maximum number of threads per block. Depends\n< on function and device."]
3321pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: hipFunction_attribute = 0;
3322#[doc = "< The statically allocated shared memory size in bytes\n< per block required by the function."]
3323pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: hipFunction_attribute = 1;
3324#[doc = "< The user-allocated constant memory by the function in\n< bytes."]
3325pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: hipFunction_attribute = 2;
3326#[doc = "< The local memory usage of each thread by this function\n< in bytes."]
3327pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: hipFunction_attribute = 3;
3328#[doc = "< The number of registers used by each thread of this function."]
3329pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_NUM_REGS: hipFunction_attribute = 4;
3330#[doc = "< PTX version"]
3331pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_PTX_VERSION: hipFunction_attribute = 5;
3332#[doc = "< Binary version"]
3333pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_BINARY_VERSION: hipFunction_attribute = 6;
3334#[doc = "< Cache mode"]
3335pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA: hipFunction_attribute = 7;
3336#[doc = "< The maximum dynamic shared memory per\n< block for this function in bytes."]
3337pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES:
3338 hipFunction_attribute = 8;
3339#[doc = "< The shared memory carveout preference\n< in percent of the maximum shared\n< memory."]
3340pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT:
3341 hipFunction_attribute = 9;
3342pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_MAX: hipFunction_attribute = 10;
3343pub type hipFunction_attribute = ::std::os::raw::c_uint;
3344#[doc = "< The context on which a pointer was allocated\n< @warning This attribute is not supported in HIP"]
3345pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_CONTEXT: hipPointer_attribute = 1;
3346#[doc = "< memory type describing the location of a pointer"]
3347pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_MEMORY_TYPE: hipPointer_attribute = 2;
3348#[doc = "< address at which the pointer is allocated on the\n< device"]
3349pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_DEVICE_POINTER: hipPointer_attribute = 3;
3350#[doc = "< address at which the pointer is allocated on the host"]
3351pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_HOST_POINTER: hipPointer_attribute = 4;
3352#[doc = "< A pair of tokens for use with Linux kernel interface\n< @warning This attribute is not supported in HIP"]
3353pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_P2P_TOKENS: hipPointer_attribute = 5;
3354#[doc = "< Synchronize every synchronous memory operation\n< initiated on this region"]
3355pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS: hipPointer_attribute = 6;
3356#[doc = "< Unique ID for an allocated memory region"]
3357pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_BUFFER_ID: hipPointer_attribute = 7;
3358#[doc = "< Indicates if the pointer points to managed memory"]
3359pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_IS_MANAGED: hipPointer_attribute = 8;
3360#[doc = "< device ordinal of a device on which a pointer\n< was allocated or registered"]
3361pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL: hipPointer_attribute = 9;
3362#[doc = "< if this pointer maps to an allocation\n< that is suitable for hipIpcGetMemHandle\n< @warning This attribute is not supported in\n< HIP"]
3363pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE:
3364 hipPointer_attribute = 10;
3365#[doc = "< Starting address for this requested pointer"]
3366pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR: hipPointer_attribute = 11;
3367#[doc = "< Size of the address range for this requested pointer"]
3368pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_RANGE_SIZE: hipPointer_attribute = 12;
3369#[doc = "< tells if this pointer is in a valid address range\n< that is mapped to a backing allocation"]
3370pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_MAPPED: hipPointer_attribute = 13;
3371#[doc = "< Bitmask of allowed hipmemAllocationHandleType\n< for this allocation @warning This attribute is\n< not supported in HIP"]
3372pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES: hipPointer_attribute =
3373 14;
3374#[doc = "< returns if the memory referenced by\n< this pointer can be used with the\n< GPUDirect RDMA API\n< @warning This attribute is not supported\n< in HIP"]
3375pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE:
3376 hipPointer_attribute = 15;
3377#[doc = "< Returns the access flags the device associated with\n< for the corresponding memory referenced by the ptr"]
3378pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS: hipPointer_attribute = 16;
3379#[doc = "< Returns the mempool handle for the allocation if\n< it was allocated from a mempool\n< @warning This attribute is not supported in HIP"]
3380pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE: hipPointer_attribute = 17;
3381pub type hipPointer_attribute = ::std::os::raw::c_uint;
3382#[repr(C)]
3383#[derive(Debug, Copy, Clone)]
3384pub struct uchar1 {
3385 pub x: ::std::os::raw::c_uchar,
3386}
3387#[repr(C)]
3388#[derive(Debug, Copy, Clone)]
3389pub struct uchar2 {
3390 pub x: ::std::os::raw::c_uchar,
3391 pub y: ::std::os::raw::c_uchar,
3392}
3393#[repr(C)]
3394#[derive(Debug, Copy, Clone)]
3395pub struct uchar3 {
3396 pub x: ::std::os::raw::c_uchar,
3397 pub y: ::std::os::raw::c_uchar,
3398 pub z: ::std::os::raw::c_uchar,
3399}
3400#[repr(C)]
3401#[derive(Debug, Copy, Clone)]
3402pub struct uchar4 {
3403 pub x: ::std::os::raw::c_uchar,
3404 pub y: ::std::os::raw::c_uchar,
3405 pub z: ::std::os::raw::c_uchar,
3406 pub w: ::std::os::raw::c_uchar,
3407}
3408#[repr(C)]
3409#[derive(Debug, Copy, Clone)]
3410pub struct char1 {
3411 pub x: ::std::os::raw::c_char,
3412}
3413#[repr(C)]
3414#[derive(Debug, Copy, Clone)]
3415pub struct char2 {
3416 pub x: ::std::os::raw::c_char,
3417 pub y: ::std::os::raw::c_char,
3418}
3419#[repr(C)]
3420#[derive(Debug, Copy, Clone)]
3421pub struct char3 {
3422 pub x: ::std::os::raw::c_char,
3423 pub y: ::std::os::raw::c_char,
3424 pub z: ::std::os::raw::c_char,
3425}
3426#[repr(C)]
3427#[derive(Debug, Copy, Clone)]
3428pub struct char4 {
3429 pub x: ::std::os::raw::c_char,
3430 pub y: ::std::os::raw::c_char,
3431 pub z: ::std::os::raw::c_char,
3432 pub w: ::std::os::raw::c_char,
3433}
3434#[repr(C)]
3435#[derive(Debug, Copy, Clone)]
3436pub struct ushort1 {
3437 pub x: ::std::os::raw::c_ushort,
3438}
3439#[repr(C)]
3440#[derive(Debug, Copy, Clone)]
3441pub struct ushort2 {
3442 pub x: ::std::os::raw::c_ushort,
3443 pub y: ::std::os::raw::c_ushort,
3444}
3445#[repr(C)]
3446#[derive(Debug, Copy, Clone)]
3447pub struct ushort3 {
3448 pub x: ::std::os::raw::c_ushort,
3449 pub y: ::std::os::raw::c_ushort,
3450 pub z: ::std::os::raw::c_ushort,
3451}
3452#[repr(C)]
3453#[derive(Debug, Copy, Clone)]
3454pub struct ushort4 {
3455 pub x: ::std::os::raw::c_ushort,
3456 pub y: ::std::os::raw::c_ushort,
3457 pub z: ::std::os::raw::c_ushort,
3458 pub w: ::std::os::raw::c_ushort,
3459}
3460#[repr(C)]
3461#[derive(Debug, Copy, Clone)]
3462pub struct short1 {
3463 pub x: ::std::os::raw::c_short,
3464}
3465#[repr(C)]
3466#[derive(Debug, Copy, Clone)]
3467pub struct short2 {
3468 pub x: ::std::os::raw::c_short,
3469 pub y: ::std::os::raw::c_short,
3470}
3471#[repr(C)]
3472#[derive(Debug, Copy, Clone)]
3473pub struct short3 {
3474 pub x: ::std::os::raw::c_short,
3475 pub y: ::std::os::raw::c_short,
3476 pub z: ::std::os::raw::c_short,
3477}
3478#[repr(C)]
3479#[derive(Debug, Copy, Clone)]
3480pub struct short4 {
3481 pub x: ::std::os::raw::c_short,
3482 pub y: ::std::os::raw::c_short,
3483 pub z: ::std::os::raw::c_short,
3484 pub w: ::std::os::raw::c_short,
3485}
3486#[repr(C)]
3487#[derive(Debug, Copy, Clone)]
3488pub struct uint1 {
3489 pub x: ::std::os::raw::c_uint,
3490}
3491#[repr(C)]
3492#[derive(Debug, Copy, Clone)]
3493pub struct uint2 {
3494 pub x: ::std::os::raw::c_uint,
3495 pub y: ::std::os::raw::c_uint,
3496}
3497#[repr(C)]
3498#[derive(Debug, Copy, Clone)]
3499pub struct uint3 {
3500 pub x: ::std::os::raw::c_uint,
3501 pub y: ::std::os::raw::c_uint,
3502 pub z: ::std::os::raw::c_uint,
3503}
3504#[repr(C)]
3505#[derive(Debug, Copy, Clone)]
3506pub struct uint4 {
3507 pub x: ::std::os::raw::c_uint,
3508 pub y: ::std::os::raw::c_uint,
3509 pub z: ::std::os::raw::c_uint,
3510 pub w: ::std::os::raw::c_uint,
3511}
3512#[repr(C)]
3513#[derive(Debug, Copy, Clone)]
3514pub struct int1 {
3515 pub x: ::std::os::raw::c_int,
3516}
3517#[repr(C)]
3518#[derive(Debug, Copy, Clone)]
3519pub struct int2 {
3520 pub x: ::std::os::raw::c_int,
3521 pub y: ::std::os::raw::c_int,
3522}
3523#[repr(C)]
3524#[derive(Debug, Copy, Clone)]
3525pub struct int3 {
3526 pub x: ::std::os::raw::c_int,
3527 pub y: ::std::os::raw::c_int,
3528 pub z: ::std::os::raw::c_int,
3529}
3530#[repr(C)]
3531#[derive(Debug, Copy, Clone)]
3532pub struct int4 {
3533 pub x: ::std::os::raw::c_int,
3534 pub y: ::std::os::raw::c_int,
3535 pub z: ::std::os::raw::c_int,
3536 pub w: ::std::os::raw::c_int,
3537}
3538#[repr(C)]
3539#[derive(Debug, Copy, Clone)]
3540pub struct ulong1 {
3541 pub x: ::std::os::raw::c_ulong,
3542}
3543#[repr(C)]
3544#[derive(Debug, Copy, Clone)]
3545pub struct ulong2 {
3546 pub x: ::std::os::raw::c_ulong,
3547 pub y: ::std::os::raw::c_ulong,
3548}
3549#[repr(C)]
3550#[derive(Debug, Copy, Clone)]
3551pub struct ulong3 {
3552 pub x: ::std::os::raw::c_ulong,
3553 pub y: ::std::os::raw::c_ulong,
3554 pub z: ::std::os::raw::c_ulong,
3555}
3556#[repr(C)]
3557#[derive(Debug, Copy, Clone)]
3558pub struct ulong4 {
3559 pub x: ::std::os::raw::c_ulong,
3560 pub y: ::std::os::raw::c_ulong,
3561 pub z: ::std::os::raw::c_ulong,
3562 pub w: ::std::os::raw::c_ulong,
3563}
3564#[repr(C)]
3565#[derive(Debug, Copy, Clone)]
3566pub struct long1 {
3567 pub x: ::std::os::raw::c_long,
3568}
3569#[repr(C)]
3570#[derive(Debug, Copy, Clone)]
3571pub struct long2 {
3572 pub x: ::std::os::raw::c_long,
3573 pub y: ::std::os::raw::c_long,
3574}
3575#[repr(C)]
3576#[derive(Debug, Copy, Clone)]
3577pub struct long3 {
3578 pub x: ::std::os::raw::c_long,
3579 pub y: ::std::os::raw::c_long,
3580 pub z: ::std::os::raw::c_long,
3581}
3582#[repr(C)]
3583#[derive(Debug, Copy, Clone)]
3584pub struct long4 {
3585 pub x: ::std::os::raw::c_long,
3586 pub y: ::std::os::raw::c_long,
3587 pub z: ::std::os::raw::c_long,
3588 pub w: ::std::os::raw::c_long,
3589}
3590#[repr(C)]
3591#[derive(Debug, Copy, Clone)]
3592pub struct ulonglong1 {
3593 pub x: ::std::os::raw::c_ulonglong,
3594}
3595#[repr(C)]
3596#[derive(Debug, Copy, Clone)]
3597pub struct ulonglong2 {
3598 pub x: ::std::os::raw::c_ulonglong,
3599 pub y: ::std::os::raw::c_ulonglong,
3600}
3601#[repr(C)]
3602#[derive(Debug, Copy, Clone)]
3603pub struct ulonglong3 {
3604 pub x: ::std::os::raw::c_ulonglong,
3605 pub y: ::std::os::raw::c_ulonglong,
3606 pub z: ::std::os::raw::c_ulonglong,
3607}
3608#[repr(C)]
3609#[derive(Debug, Copy, Clone)]
3610pub struct ulonglong4 {
3611 pub x: ::std::os::raw::c_ulonglong,
3612 pub y: ::std::os::raw::c_ulonglong,
3613 pub z: ::std::os::raw::c_ulonglong,
3614 pub w: ::std::os::raw::c_ulonglong,
3615}
3616#[repr(C)]
3617#[derive(Debug, Copy, Clone)]
3618pub struct longlong1 {
3619 pub x: ::std::os::raw::c_longlong,
3620}
3621#[repr(C)]
3622#[derive(Debug, Copy, Clone)]
3623pub struct longlong2 {
3624 pub x: ::std::os::raw::c_longlong,
3625 pub y: ::std::os::raw::c_longlong,
3626}
3627#[repr(C)]
3628#[derive(Debug, Copy, Clone)]
3629pub struct longlong3 {
3630 pub x: ::std::os::raw::c_longlong,
3631 pub y: ::std::os::raw::c_longlong,
3632 pub z: ::std::os::raw::c_longlong,
3633}
3634#[repr(C)]
3635#[derive(Debug, Copy, Clone)]
3636pub struct longlong4 {
3637 pub x: ::std::os::raw::c_longlong,
3638 pub y: ::std::os::raw::c_longlong,
3639 pub z: ::std::os::raw::c_longlong,
3640 pub w: ::std::os::raw::c_longlong,
3641}
3642#[repr(C)]
3643#[derive(Debug, Copy, Clone)]
3644pub struct float1 {
3645 pub x: f32,
3646}
3647#[repr(C)]
3648#[derive(Debug, Copy, Clone)]
3649pub struct float2 {
3650 pub x: f32,
3651 pub y: f32,
3652}
3653#[repr(C)]
3654#[derive(Debug, Copy, Clone)]
3655pub struct float3 {
3656 pub x: f32,
3657 pub y: f32,
3658 pub z: f32,
3659}
3660#[repr(C)]
3661#[derive(Debug, Copy, Clone)]
3662pub struct float4 {
3663 pub x: f32,
3664 pub y: f32,
3665 pub z: f32,
3666 pub w: f32,
3667}
3668#[repr(C)]
3669#[derive(Debug, Copy, Clone)]
3670pub struct double1 {
3671 pub x: f64,
3672}
3673#[repr(C)]
3674#[derive(Debug, Copy, Clone)]
3675pub struct double2 {
3676 pub x: f64,
3677 pub y: f64,
3678}
3679#[repr(C)]
3680#[derive(Debug, Copy, Clone)]
3681pub struct double3 {
3682 pub x: f64,
3683 pub y: f64,
3684 pub z: f64,
3685}
3686#[repr(C)]
3687#[derive(Debug, Copy, Clone)]
3688pub struct double4 {
3689 pub x: f64,
3690 pub y: f64,
3691 pub z: f64,
3692 pub w: f64,
3693}
3694extern "C" {
3695 pub fn hipCreateChannelDesc(
3696 x: ::std::os::raw::c_int,
3697 y: ::std::os::raw::c_int,
3698 z: ::std::os::raw::c_int,
3699 w: ::std::os::raw::c_int,
3700 f: hipChannelFormatKind,
3701 ) -> hipChannelFormatDesc;
3702}
3703#[doc = " An opaque value that represents a hip texture object"]
3704#[repr(C)]
3705#[derive(Debug, Copy, Clone)]
3706pub struct __hip_texture {
3707 _unused: [u8; 0],
3708}
3709pub type hipTextureObject_t = *mut __hip_texture;
3710pub const hipTextureAddressMode_hipAddressModeWrap: hipTextureAddressMode = 0;
3711pub const hipTextureAddressMode_hipAddressModeClamp: hipTextureAddressMode = 1;
3712pub const hipTextureAddressMode_hipAddressModeMirror: hipTextureAddressMode = 2;
3713pub const hipTextureAddressMode_hipAddressModeBorder: hipTextureAddressMode = 3;
3714#[doc = " hip texture address modes"]
3715pub type hipTextureAddressMode = ::std::os::raw::c_uint;
3716pub const hipTextureFilterMode_hipFilterModePoint: hipTextureFilterMode = 0;
3717pub const hipTextureFilterMode_hipFilterModeLinear: hipTextureFilterMode = 1;
3718#[doc = " hip texture filter modes"]
3719pub type hipTextureFilterMode = ::std::os::raw::c_uint;
3720pub const hipTextureReadMode_hipReadModeElementType: hipTextureReadMode = 0;
3721pub const hipTextureReadMode_hipReadModeNormalizedFloat: hipTextureReadMode = 1;
3722#[doc = " hip texture read modes"]
3723pub type hipTextureReadMode = ::std::os::raw::c_uint;
3724#[doc = " hip texture reference"]
3725#[repr(C)]
3726#[derive(Debug, Copy, Clone)]
3727pub struct textureReference {
3728 pub normalized: ::std::os::raw::c_int,
3729 pub readMode: hipTextureReadMode,
3730 pub filterMode: hipTextureFilterMode,
3731 pub addressMode: [hipTextureAddressMode; 3usize],
3732 pub channelDesc: hipChannelFormatDesc,
3733 pub sRGB: ::std::os::raw::c_int,
3734 pub maxAnisotropy: ::std::os::raw::c_uint,
3735 pub mipmapFilterMode: hipTextureFilterMode,
3736 pub mipmapLevelBias: f32,
3737 pub minMipmapLevelClamp: f32,
3738 pub maxMipmapLevelClamp: f32,
3739 pub textureObject: hipTextureObject_t,
3740 pub numChannels: ::std::os::raw::c_int,
3741 pub format: hipArray_Format,
3742}
3743#[doc = " hip texture descriptor"]
3744#[repr(C)]
3745#[derive(Debug, Copy, Clone)]
3746pub struct hipTextureDesc {
3747 pub addressMode: [hipTextureAddressMode; 3usize],
3748 pub filterMode: hipTextureFilterMode,
3749 pub readMode: hipTextureReadMode,
3750 pub sRGB: ::std::os::raw::c_int,
3751 pub borderColor: [f32; 4usize],
3752 pub normalizedCoords: ::std::os::raw::c_int,
3753 pub maxAnisotropy: ::std::os::raw::c_uint,
3754 pub mipmapFilterMode: hipTextureFilterMode,
3755 pub mipmapLevelBias: f32,
3756 pub minMipmapLevelClamp: f32,
3757 pub maxMipmapLevelClamp: f32,
3758}
3759#[doc = " An opaque value that represents a hip surface object"]
3760#[repr(C)]
3761#[derive(Debug, Copy, Clone)]
3762pub struct __hip_surface {
3763 _unused: [u8; 0],
3764}
3765pub type hipSurfaceObject_t = *mut __hip_surface;
3766#[doc = " hip surface reference"]
3767#[repr(C)]
3768#[derive(Debug, Copy, Clone)]
3769pub struct surfaceReference {
3770 pub surfaceObject: hipSurfaceObject_t,
3771}
3772pub const hipSurfaceBoundaryMode_hipBoundaryModeZero: hipSurfaceBoundaryMode = 0;
3773pub const hipSurfaceBoundaryMode_hipBoundaryModeTrap: hipSurfaceBoundaryMode = 1;
3774pub const hipSurfaceBoundaryMode_hipBoundaryModeClamp: hipSurfaceBoundaryMode = 2;
3775#[doc = " hip surface boundary modes"]
3776pub type hipSurfaceBoundaryMode = ::std::os::raw::c_uint;
3777#[repr(C)]
3778#[derive(Debug, Copy, Clone)]
3779pub struct ihipCtx_t {
3780 _unused: [u8; 0],
3781}
3782pub type hipCtx_t = *mut ihipCtx_t;
3783pub type hipDevice_t = ::std::os::raw::c_int;
3784pub const hipDeviceP2PAttr_hipDevP2PAttrPerformanceRank: hipDeviceP2PAttr = 0;
3785pub const hipDeviceP2PAttr_hipDevP2PAttrAccessSupported: hipDeviceP2PAttr = 1;
3786pub const hipDeviceP2PAttr_hipDevP2PAttrNativeAtomicSupported: hipDeviceP2PAttr = 2;
3787pub const hipDeviceP2PAttr_hipDevP2PAttrHipArrayAccessSupported: hipDeviceP2PAttr = 3;
3788pub type hipDeviceP2PAttr = ::std::os::raw::c_uint;
3789pub const hipDriverEntryPointQueryResult_hipDriverEntryPointSuccess:
3790 hipDriverEntryPointQueryResult = 0;
3791pub const hipDriverEntryPointQueryResult_hipDriverEntryPointSymbolNotFound:
3792 hipDriverEntryPointQueryResult = 1;
3793pub const hipDriverEntryPointQueryResult_hipDriverEntryPointVersionNotSufficent:
3794 hipDriverEntryPointQueryResult = 2;
3795pub type hipDriverEntryPointQueryResult = ::std::os::raw::c_uint;
3796#[repr(C)]
3797#[derive(Debug, Copy, Clone)]
3798pub struct ihipStream_t {
3799 _unused: [u8; 0],
3800}
3801pub type hipStream_t = *mut ihipStream_t;
3802#[repr(C)]
3803#[derive(Debug, Copy, Clone)]
3804pub struct hipIpcMemHandle_st {
3805 pub reserved: [::std::os::raw::c_char; 64usize],
3806}
3807pub type hipIpcMemHandle_t = hipIpcMemHandle_st;
3808#[repr(C)]
3809#[derive(Debug, Copy, Clone)]
3810pub struct hipIpcEventHandle_st {
3811 pub reserved: [::std::os::raw::c_char; 64usize],
3812}
3813pub type hipIpcEventHandle_t = hipIpcEventHandle_st;
3814#[repr(C)]
3815#[derive(Debug, Copy, Clone)]
3816pub struct ihipModule_t {
3817 _unused: [u8; 0],
3818}
3819pub type hipModule_t = *mut ihipModule_t;
3820#[repr(C)]
3821#[derive(Debug, Copy, Clone)]
3822pub struct ihipModuleSymbol_t {
3823 _unused: [u8; 0],
3824}
3825pub type hipFunction_t = *mut ihipModuleSymbol_t;
3826#[repr(C)]
3827#[derive(Debug, Copy, Clone)]
3828pub struct ihipLinkState_t {
3829 _unused: [u8; 0],
3830}
3831pub type hipLinkState_t = *mut ihipLinkState_t;
3832#[repr(C)]
3833#[derive(Debug, Copy, Clone)]
3834pub struct ihipLibrary_t {
3835 _unused: [u8; 0],
3836}
3837pub type hipLibrary_t = *mut ihipLibrary_t;
3838#[repr(C)]
3839#[derive(Debug, Copy, Clone)]
3840pub struct ihipKernel_t {
3841 _unused: [u8; 0],
3842}
3843pub type hipKernel_t = *mut ihipKernel_t;
3844#[repr(C)]
3845#[derive(Debug, Copy, Clone)]
3846pub struct ihipMemPoolHandle_t {
3847 _unused: [u8; 0],
3848}
3849#[doc = " HIP memory pool"]
3850pub type hipMemPool_t = *mut ihipMemPoolHandle_t;
3851#[repr(C)]
3852#[derive(Debug, Copy, Clone)]
3853pub struct hipFuncAttributes {
3854 pub binaryVersion: ::std::os::raw::c_int,
3855 pub cacheModeCA: ::std::os::raw::c_int,
3856 pub constSizeBytes: usize,
3857 pub localSizeBytes: usize,
3858 pub maxDynamicSharedSizeBytes: ::std::os::raw::c_int,
3859 pub maxThreadsPerBlock: ::std::os::raw::c_int,
3860 pub numRegs: ::std::os::raw::c_int,
3861 pub preferredShmemCarveout: ::std::os::raw::c_int,
3862 pub ptxVersion: ::std::os::raw::c_int,
3863 pub sharedSizeBytes: usize,
3864}
3865#[repr(C)]
3866#[derive(Debug, Copy, Clone)]
3867pub struct ihipEvent_t {
3868 _unused: [u8; 0],
3869}
3870pub type hipEvent_t = *mut ihipEvent_t;
3871#[doc = "< Limit of stack size in bytes on the current device, per\n< thread. The size is in units of 256 dwords, up to the\n< limit of (128K - 16)"]
3872pub const hipLimit_t_hipLimitStackSize: hipLimit_t = 0;
3873#[doc = "< Size limit in bytes of fifo used by printf call on the\n< device. Currently not supported"]
3874pub const hipLimit_t_hipLimitPrintfFifoSize: hipLimit_t = 1;
3875#[doc = "< Limit of heap size in bytes on the current device, should\n< be less than the global memory size on the device"]
3876pub const hipLimit_t_hipLimitMallocHeapSize: hipLimit_t = 2;
3877#[doc = "< Minimum allowed value in bytes for scratch limit on this\n< device. Valid only on Rocm device. This is read only."]
3878pub const hipLimit_t_hipExtLimitScratchMin: hipLimit_t = 4096;
3879#[doc = "< Maximum allowed value in bytes for scratch limit on this\n< device. Valid only on Rocm device. This is read only."]
3880pub const hipLimit_t_hipExtLimitScratchMax: hipLimit_t = 4097;
3881#[doc = "< Current scratch limit threshold in bytes on this\n< device. Must be between hipExtLimitScratchMin and\n< hipExtLimitScratchMaxValid values. Valid only on Rocm\n< device. This can be modified."]
3882pub const hipLimit_t_hipExtLimitScratchCurrent: hipLimit_t = 4098;
3883#[doc = "< Supported limit range"]
3884pub const hipLimit_t_hipLimitRange: hipLimit_t = 4099;
3885#[doc = " hipLimit\n\n @note In HIP device limit-related APIs, any input limit value other than those defined in the\n enum is treated as \"UnsupportedLimit\" by default."]
3886pub type hipLimit_t = ::std::os::raw::c_uint;
3887pub const hipStreamBatchMemOpType_hipStreamMemOpWaitValue32: hipStreamBatchMemOpType = 1;
3888pub const hipStreamBatchMemOpType_hipStreamMemOpWriteValue32: hipStreamBatchMemOpType = 2;
3889pub const hipStreamBatchMemOpType_hipStreamMemOpWaitValue64: hipStreamBatchMemOpType = 4;
3890pub const hipStreamBatchMemOpType_hipStreamMemOpWriteValue64: hipStreamBatchMemOpType = 5;
3891#[doc = "< Currently not supported"]
3892pub const hipStreamBatchMemOpType_hipStreamMemOpBarrier: hipStreamBatchMemOpType = 6;
3893#[doc = "< Currently not supported"]
3894pub const hipStreamBatchMemOpType_hipStreamMemOpFlushRemoteWrites: hipStreamBatchMemOpType = 3;
3895#[doc = " Operations for hipStreamBatchMemOp"]
3896pub type hipStreamBatchMemOpType = ::std::os::raw::c_uint;
3897#[doc = " @brief Union representing batch memory operation parameters for HIP streams.\n\n hipStreamBatchMemOpParams is used to specify the parameters for batch memory\n operations in a HIP stream. This union supports various operations including\n waiting for a specific value, writing a value, and different flags for wait conditions.\n\n @details\n The union includes fields for different types of operations defined in the\n enum hipStreamBatchMemOpType:\n - hipStreamMemOpWaitValue32: Wait for a 32-bit value.\n - hipStreamMemOpWriteValue32: Write a 32-bit value.\n - hipStreamMemOpWaitValue64: Wait for a 64-bit value.\n - hipStreamMemOpWriteValue64: Write a 64-bit value.\n\n Each operation type includes an address, the value to wait for or write, flags, and an\n optional alias that is not relevant on AMD GPUs. Flags can be used to specify different\n wait conditions such as equality, bitwise AND, greater than or equal, and bitwise NOR.\n\n Example usage:\n @code\n hipStreamBatchMemOpParams myArray[2];\n myArray[0].operation = hipStreamMemOpWaitValue32;\n myArray[0].waitValue.address = waitAddr1;\n myArray[0].waitValue.value = 0x1;\n myArray[0].waitValue.flags = CU_STREAM_WAIT_VALUE_EQ;\n\n myArray[1].operation = hipStreamMemOpWriteValue32;\n myArray[1].writeValue.address = writeAddr1;\n myArray[1].writeValue.value = 0x1;\n myArray[1].writeValue.flags = 0x0;\n\n result = hipStreamBatchMemOp(stream, 2, myArray, 0);\n @endcode"]
3898#[repr(C)]
3899#[derive(Copy, Clone)]
3900pub union hipStreamBatchMemOpParams_union {
3901 pub operation: hipStreamBatchMemOpType,
3902 pub waitValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t,
3903 pub writeValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t,
3904 #[doc = "< Currently not supported on AMD"]
3905 pub flushRemoteWrites: hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t,
3906 #[doc = "< Currently not supported on AMD"]
3907 pub memoryBarrier: hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t,
3908 pub pad: [u64; 6usize],
3909}
3910#[repr(C)]
3911#[derive(Copy, Clone)]
3912pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t {
3913 pub operation: hipStreamBatchMemOpType,
3914 pub address: hipDeviceptr_t,
3915 pub __bindgen_anon_1:
3916 hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t__bindgen_ty_1,
3917 pub flags: ::std::os::raw::c_uint,
3918 #[doc = "< Not valid for AMD backend. Initial value is unimportant"]
3919 pub alias: hipDeviceptr_t,
3920}
3921#[repr(C)]
3922#[derive(Copy, Clone)]
3923pub union hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t__bindgen_ty_1 {
3924 pub value: u32,
3925 pub value64: u64,
3926}
3927#[repr(C)]
3928#[derive(Copy, Clone)]
3929pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t {
3930 pub operation: hipStreamBatchMemOpType,
3931 pub address: hipDeviceptr_t,
3932 pub __bindgen_anon_1:
3933 hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t__bindgen_ty_1,
3934 pub flags: ::std::os::raw::c_uint,
3935 #[doc = "< Not valid for AMD backend. Initial value is unimportant"]
3936 pub alias: hipDeviceptr_t,
3937}
3938#[repr(C)]
3939#[derive(Copy, Clone)]
3940pub union hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t__bindgen_ty_1 {
3941 pub value: u32,
3942 pub value64: u64,
3943}
3944#[repr(C)]
3945#[derive(Debug, Copy, Clone)]
3946pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t {
3947 pub operation: hipStreamBatchMemOpType,
3948 pub flags: ::std::os::raw::c_uint,
3949}
3950#[repr(C)]
3951#[derive(Debug, Copy, Clone)]
3952pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t {
3953 pub operation: hipStreamBatchMemOpType,
3954 pub flags: ::std::os::raw::c_uint,
3955}
3956#[doc = " @brief Union representing batch memory operation parameters for HIP streams.\n\n hipStreamBatchMemOpParams is used to specify the parameters for batch memory\n operations in a HIP stream. This union supports various operations including\n waiting for a specific value, writing a value, and different flags for wait conditions.\n\n @details\n The union includes fields for different types of operations defined in the\n enum hipStreamBatchMemOpType:\n - hipStreamMemOpWaitValue32: Wait for a 32-bit value.\n - hipStreamMemOpWriteValue32: Write a 32-bit value.\n - hipStreamMemOpWaitValue64: Wait for a 64-bit value.\n - hipStreamMemOpWriteValue64: Write a 64-bit value.\n\n Each operation type includes an address, the value to wait for or write, flags, and an\n optional alias that is not relevant on AMD GPUs. Flags can be used to specify different\n wait conditions such as equality, bitwise AND, greater than or equal, and bitwise NOR.\n\n Example usage:\n @code\n hipStreamBatchMemOpParams myArray[2];\n myArray[0].operation = hipStreamMemOpWaitValue32;\n myArray[0].waitValue.address = waitAddr1;\n myArray[0].waitValue.value = 0x1;\n myArray[0].waitValue.flags = CU_STREAM_WAIT_VALUE_EQ;\n\n myArray[1].operation = hipStreamMemOpWriteValue32;\n myArray[1].writeValue.address = writeAddr1;\n myArray[1].writeValue.value = 0x1;\n myArray[1].writeValue.flags = 0x0;\n\n result = hipStreamBatchMemOp(stream, 2, myArray, 0);\n @endcode"]
3957pub type hipStreamBatchMemOpParams = hipStreamBatchMemOpParams_union;
3958#[doc = " @brief Structure representing node parameters for batch memory operations in HIP graphs.\n\n hipBatchMemOpNodeParams is used to specify the parameters for batch memory\n operations in HIP graphs. This struct includes the context to use for the operations, the\n number of operations, and an array of hipStreamBatchMemOpParams that describe the operations.\n\n @details\n The structure includes the following fields:\n - ctx: The HIP context to use for the operations.\n - count: The number of operations in the paramArray.\n - paramArray: A pointer to an array of hipStreamBatchMemOpParams.\n - flags: Flags to control the node.\n\n Example usage:\n @code\n hipBatchMemOpNodeParams nodeParams;\n nodeParams.ctx = context;\n nodeParams.count = ARRAY_SIZE;\n nodeParams.paramArray = myArray;\n nodeParams.flags = 0;\n\n Pass nodeParams to a HIP graph APIs hipGraphAddBatchMemOpNode, hipGraphBatchMemOpNodeGetParams,\n hipGraphBatchMemOpNodeSetParams, hipGraphExecBatchMemOpNodeSetParams\n @endcode"]
3959#[repr(C)]
3960#[derive(Debug, Copy, Clone)]
3961pub struct hipBatchMemOpNodeParams {
3962 pub ctx: hipCtx_t,
3963 pub count: ::std::os::raw::c_uint,
3964 pub paramArray: *mut hipStreamBatchMemOpParams,
3965 pub flags: ::std::os::raw::c_uint,
3966}
3967#[doc = "< Data will mostly be read and only occassionally\n< be written to"]
3968pub const hipMemoryAdvise_hipMemAdviseSetReadMostly: hipMemoryAdvise = 1;
3969#[doc = "< Undo the effect of hipMemAdviseSetReadMostly"]
3970pub const hipMemoryAdvise_hipMemAdviseUnsetReadMostly: hipMemoryAdvise = 2;
3971#[doc = "< Set the preferred location for the data as\n< the specified device"]
3972pub const hipMemoryAdvise_hipMemAdviseSetPreferredLocation: hipMemoryAdvise = 3;
3973#[doc = "< Clear the preferred location for the data"]
3974pub const hipMemoryAdvise_hipMemAdviseUnsetPreferredLocation: hipMemoryAdvise = 4;
3975#[doc = "< Data will be accessed by the specified device\n< so prevent page faults as much as possible"]
3976pub const hipMemoryAdvise_hipMemAdviseSetAccessedBy: hipMemoryAdvise = 5;
3977#[doc = "< Let HIP to decide on the page faulting policy\n< for the specified device"]
3978pub const hipMemoryAdvise_hipMemAdviseUnsetAccessedBy: hipMemoryAdvise = 6;
3979#[doc = "< The default memory model is fine-grain. That allows\n< coherent operations between host and device, while\n< executing kernels. The coarse-grain can be used\n< for data that only needs to be coherent at dispatch\n< boundaries for better performance"]
3980pub const hipMemoryAdvise_hipMemAdviseSetCoarseGrain: hipMemoryAdvise = 100;
3981#[doc = "< Restores cache coherency policy back to fine-grain"]
3982pub const hipMemoryAdvise_hipMemAdviseUnsetCoarseGrain: hipMemoryAdvise = 101;
3983#[doc = " HIP Memory Advise values\n\n @note This memory advise enumeration is used on Linux, not Windows."]
3984pub type hipMemoryAdvise = ::std::os::raw::c_uint;
3985#[doc = "< Updates to memory with this attribute can be\n< done coherently from all devices"]
3986pub const hipMemRangeCoherencyMode_hipMemRangeCoherencyModeFineGrain: hipMemRangeCoherencyMode = 0;
3987#[doc = "< Writes to memory with this attribute can be\n< performed by a single device at a time"]
3988pub const hipMemRangeCoherencyMode_hipMemRangeCoherencyModeCoarseGrain: hipMemRangeCoherencyMode =
3989 1;
3990#[doc = "< Memory region queried contains subregions with\n< both hipMemRangeCoherencyModeFineGrain and\n< hipMemRangeCoherencyModeCoarseGrain attributes"]
3991pub const hipMemRangeCoherencyMode_hipMemRangeCoherencyModeIndeterminate: hipMemRangeCoherencyMode =
3992 2;
3993#[doc = " HIP Coherency Mode"]
3994pub type hipMemRangeCoherencyMode = ::std::os::raw::c_uint;
3995#[doc = "< Whether the range will mostly be read and\n< only occassionally be written to"]
3996pub const hipMemRangeAttribute_hipMemRangeAttributeReadMostly: hipMemRangeAttribute = 1;
3997#[doc = "< The preferred location of the range"]
3998pub const hipMemRangeAttribute_hipMemRangeAttributePreferredLocation: hipMemRangeAttribute = 2;
3999#[doc = "< Memory range has hipMemAdviseSetAccessedBy\n< set for the specified device"]
4000pub const hipMemRangeAttribute_hipMemRangeAttributeAccessedBy: hipMemRangeAttribute = 3;
4001#[doc = "< The last location to where the range was\n< prefetched"]
4002pub const hipMemRangeAttribute_hipMemRangeAttributeLastPrefetchLocation: hipMemRangeAttribute = 4;
4003#[doc = "< Returns coherency mode\n< @ref hipMemRangeCoherencyMode for the range"]
4004pub const hipMemRangeAttribute_hipMemRangeAttributeCoherencyMode: hipMemRangeAttribute = 100;
4005#[doc = " HIP range attributes"]
4006pub type hipMemRangeAttribute = ::std::os::raw::c_uint;
4007#[doc = " (value type = int)\n Allow @p hipMemAllocAsync 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 hip events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)"]
4008pub const hipMemPoolAttr_hipMemPoolReuseFollowEventDependencies: hipMemPoolAttr = 1;
4009#[doc = " (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)"]
4010pub const hipMemPoolAttr_hipMemPoolReuseAllowOpportunistic: hipMemPoolAttr = 2;
4011#[doc = " (value type = int)\n Allow @p hipMemAllocAsync 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)."]
4012pub const hipMemPoolAttr_hipMemPoolReuseAllowInternalDependencies: hipMemPoolAttr = 3;
4013#[doc = " (value type = uint64_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)"]
4014pub const hipMemPoolAttr_hipMemPoolAttrReleaseThreshold: hipMemPoolAttr = 4;
4015#[doc = " (value type = uint64_t)\n Amount of backing memory currently allocated for the mempool."]
4016pub const hipMemPoolAttr_hipMemPoolAttrReservedMemCurrent: hipMemPoolAttr = 5;
4017#[doc = " (value type = uint64_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."]
4018pub const hipMemPoolAttr_hipMemPoolAttrReservedMemHigh: hipMemPoolAttr = 6;
4019#[doc = " (value type = uint64_t)\n Amount of memory from the pool that is currently in use by the application."]
4020pub const hipMemPoolAttr_hipMemPoolAttrUsedMemCurrent: hipMemPoolAttr = 7;
4021#[doc = " (value type = uint64_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."]
4022pub const hipMemPoolAttr_hipMemPoolAttrUsedMemHigh: hipMemPoolAttr = 8;
4023#[doc = " HIP memory pool attributes"]
4024pub type hipMemPoolAttr = ::std::os::raw::c_uint;
4025#[doc = "< Default, make the address range not accessible"]
4026pub const hipMemAccessFlags_hipMemAccessFlagsProtNone: hipMemAccessFlags = 0;
4027#[doc = "< Set the address range read accessible"]
4028pub const hipMemAccessFlags_hipMemAccessFlagsProtRead: hipMemAccessFlags = 1;
4029#[doc = "< Set the address range read-write accessible"]
4030pub const hipMemAccessFlags_hipMemAccessFlagsProtReadWrite: hipMemAccessFlags = 3;
4031#[doc = " Specifies the memory protection flags for mapping\n"]
4032pub type hipMemAccessFlags = ::std::os::raw::c_uint;
4033#[doc = " Memory access descriptor structure is used to specify memory access\n permissions for a virtual memory region in Virtual Memory Management API.\n This structure changes read, and write permissions for\n specific memory regions."]
4034#[repr(C)]
4035#[derive(Debug, Copy, Clone)]
4036pub struct hipMemAccessDesc {
4037 #[doc = "< Location on which the accessibility has to change"]
4038 pub location: hipMemLocation,
4039 #[doc = "< Accessibility flags to set"]
4040 pub flags: hipMemAccessFlags,
4041}
4042pub const hipMemAllocationType_hipMemAllocationTypeInvalid: hipMemAllocationType = 0;
4043#[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
4044pub const hipMemAllocationType_hipMemAllocationTypePinned: hipMemAllocationType = 1;
4045#[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
4046pub const hipMemAllocationType_hipMemAllocationTypeUncached: hipMemAllocationType = 1073741824;
4047#[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
4048pub const hipMemAllocationType_hipMemAllocationTypeMax: hipMemAllocationType = 2147483647;
4049#[doc = " Defines the allocation types"]
4050pub type hipMemAllocationType = ::std::os::raw::c_uint;
4051#[doc = "< Does not allow any export mechanism"]
4052pub const hipMemAllocationHandleType_hipMemHandleTypeNone: hipMemAllocationHandleType = 0;
4053pub const hipMemAllocationHandleType_hipMemHandleTypePosixFileDescriptor:
4054 hipMemAllocationHandleType = 1;
4055#[doc = "< Allows a Win32 NT handle for exporting. (HANDLE)"]
4056pub const hipMemAllocationHandleType_hipMemHandleTypeWin32: hipMemAllocationHandleType = 2;
4057#[doc = "< Allows a Win32 KMT handle for exporting. (D3DKMT_HANDLE)"]
4058pub const hipMemAllocationHandleType_hipMemHandleTypeWin32Kmt: hipMemAllocationHandleType = 4;
4059#[doc = " Flags for specifying handle types for memory pool allocations\n"]
4060pub type hipMemAllocationHandleType = ::std::os::raw::c_uint;
4061#[doc = " Specifies the properties of allocations made from the pool."]
4062#[repr(C)]
4063#[derive(Debug, Copy, Clone)]
4064pub struct hipMemPoolProps {
4065 #[doc = "< Allocation type. Currently must be specified as @p hipMemAllocationTypePinned"]
4066 pub allocType: hipMemAllocationType,
4067 #[doc = "< Handle types that will be supported by allocations from the pool"]
4068 pub handleTypes: hipMemAllocationHandleType,
4069 #[doc = "< Location where allocations should reside"]
4070 pub location: hipMemLocation,
4071 #[doc = " Windows-specific LPSECURITYATTRIBUTES required when @p hipMemHandleTypeWin32 is specified"]
4072 pub win32SecurityAttributes: *mut ::std::os::raw::c_void,
4073 #[doc = "< Maximum pool size. When set to 0, defaults to a system dependent value"]
4074 pub maxSize: usize,
4075 #[doc = "< Reserved for future use, must be 0"]
4076 pub reserved: [::std::os::raw::c_uchar; 56usize],
4077}
4078#[doc = " Opaque data structure for exporting a pool allocation"]
4079#[repr(C)]
4080#[derive(Debug, Copy, Clone)]
4081pub struct hipMemPoolPtrExportData {
4082 pub reserved: [::std::os::raw::c_uchar; 64usize],
4083}
4084pub const hipFuncAttribute_hipFuncAttributeMaxDynamicSharedMemorySize: hipFuncAttribute = 8;
4085pub const hipFuncAttribute_hipFuncAttributePreferredSharedMemoryCarveout: hipFuncAttribute = 9;
4086pub const hipFuncAttribute_hipFuncAttributeMax: hipFuncAttribute = 10;
4087#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
4088pub type hipFuncAttribute = ::std::os::raw::c_uint;
4089#[doc = "< no preference for shared memory or L1 (default)"]
4090pub const hipFuncCache_t_hipFuncCachePreferNone: hipFuncCache_t = 0;
4091#[doc = "< prefer larger shared memory and smaller L1 cache"]
4092pub const hipFuncCache_t_hipFuncCachePreferShared: hipFuncCache_t = 1;
4093#[doc = "< prefer larger L1 cache and smaller shared memory"]
4094pub const hipFuncCache_t_hipFuncCachePreferL1: hipFuncCache_t = 2;
4095#[doc = "< prefer equal size L1 cache and shared memory"]
4096pub const hipFuncCache_t_hipFuncCachePreferEqual: hipFuncCache_t = 3;
4097#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
4098pub type hipFuncCache_t = ::std::os::raw::c_uint;
4099#[doc = "< The compiler selects a device-specific value for the banking."]
4100pub const hipSharedMemConfig_hipSharedMemBankSizeDefault: hipSharedMemConfig = 0;
4101#[doc = "< Shared mem is banked at 4-bytes intervals and performs best\n< when adjacent threads access data 4 bytes apart."]
4102pub const hipSharedMemConfig_hipSharedMemBankSizeFourByte: hipSharedMemConfig = 1;
4103#[doc = "< Shared mem is banked at 8-byte intervals and performs best\n< when adjacent threads access data 4 bytes apart."]
4104pub const hipSharedMemConfig_hipSharedMemBankSizeEightByte: hipSharedMemConfig = 2;
4105#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
4106pub type hipSharedMemConfig = ::std::os::raw::c_uint;
4107#[doc = " Struct for data in 3D"]
4108#[repr(C)]
4109#[derive(Debug, Copy, Clone)]
4110pub struct dim3 {
4111 #[doc = "< x"]
4112 pub x: u32,
4113 #[doc = "< y"]
4114 pub y: u32,
4115 #[doc = "< z"]
4116 pub z: u32,
4117}
4118#[doc = " struct hipLaunchParams_t"]
4119#[repr(C)]
4120#[derive(Debug, Copy, Clone)]
4121pub struct hipLaunchParams_t {
4122 #[doc = "< Device function symbol"]
4123 pub func: *mut ::std::os::raw::c_void,
4124 #[doc = "< Grid dimensions"]
4125 pub gridDim: dim3,
4126 #[doc = "< Block dimensions"]
4127 pub blockDim: dim3,
4128 #[doc = "< Arguments"]
4129 pub args: *mut *mut ::std::os::raw::c_void,
4130 #[doc = "< Shared memory"]
4131 pub sharedMem: usize,
4132 #[doc = "< Stream identifier"]
4133 pub stream: hipStream_t,
4134}
4135#[doc = " struct hipLaunchParams_t"]
4136pub type hipLaunchParams = hipLaunchParams_t;
4137#[doc = " struct hipFunctionLaunchParams_t"]
4138#[repr(C)]
4139#[derive(Debug, Copy, Clone)]
4140pub struct hipFunctionLaunchParams_t {
4141 #[doc = "< Kernel to launch"]
4142 pub function: hipFunction_t,
4143 #[doc = "< Width(X) of grid in blocks"]
4144 pub gridDimX: ::std::os::raw::c_uint,
4145 #[doc = "< Height(Y) of grid in blocks"]
4146 pub gridDimY: ::std::os::raw::c_uint,
4147 #[doc = "< Depth(Z) of grid in blocks"]
4148 pub gridDimZ: ::std::os::raw::c_uint,
4149 #[doc = "< X dimension of each thread block"]
4150 pub blockDimX: ::std::os::raw::c_uint,
4151 #[doc = "< Y dimension of each thread block"]
4152 pub blockDimY: ::std::os::raw::c_uint,
4153 #[doc = "< Z dimension of each thread block"]
4154 pub blockDimZ: ::std::os::raw::c_uint,
4155 #[doc = "< Shared memory"]
4156 pub sharedMemBytes: ::std::os::raw::c_uint,
4157 #[doc = "< Stream identifier"]
4158 pub hStream: hipStream_t,
4159 #[doc = "< Kernel parameters"]
4160 pub kernelParams: *mut *mut ::std::os::raw::c_void,
4161}
4162#[doc = " struct hipFunctionLaunchParams_t"]
4163pub type hipFunctionLaunchParams = hipFunctionLaunchParams_t;
4164pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeOpaqueFd:
4165 hipExternalMemoryHandleType_enum = 1;
4166pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeOpaqueWin32:
4167 hipExternalMemoryHandleType_enum = 2;
4168pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeOpaqueWin32Kmt:
4169 hipExternalMemoryHandleType_enum = 3;
4170pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D12Heap:
4171 hipExternalMemoryHandleType_enum = 4;
4172pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D12Resource:
4173 hipExternalMemoryHandleType_enum = 5;
4174pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D11Resource:
4175 hipExternalMemoryHandleType_enum = 6;
4176pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D11ResourceKmt:
4177 hipExternalMemoryHandleType_enum = 7;
4178pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeNvSciBuf:
4179 hipExternalMemoryHandleType_enum = 8;
4180pub type hipExternalMemoryHandleType_enum = ::std::os::raw::c_uint;
4181pub use self::hipExternalMemoryHandleType_enum as hipExternalMemoryHandleType;
4182#[repr(C)]
4183#[derive(Copy, Clone)]
4184pub struct hipExternalMemoryHandleDesc_st {
4185 pub type_: hipExternalMemoryHandleType,
4186 pub handle: hipExternalMemoryHandleDesc_st__bindgen_ty_1,
4187 pub size: ::std::os::raw::c_ulonglong,
4188 pub flags: ::std::os::raw::c_uint,
4189 pub reserved: [::std::os::raw::c_uint; 16usize],
4190}
4191#[repr(C)]
4192#[derive(Copy, Clone)]
4193pub union hipExternalMemoryHandleDesc_st__bindgen_ty_1 {
4194 pub fd: ::std::os::raw::c_int,
4195 pub win32: hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1,
4196 pub nvSciBufObject: *const ::std::os::raw::c_void,
4197}
4198#[repr(C)]
4199#[derive(Debug, Copy, Clone)]
4200pub struct hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1 {
4201 pub handle: *mut ::std::os::raw::c_void,
4202 pub name: *const ::std::os::raw::c_void,
4203}
4204pub type hipExternalMemoryHandleDesc = hipExternalMemoryHandleDesc_st;
4205#[repr(C)]
4206#[derive(Debug, Copy, Clone)]
4207pub struct hipExternalMemoryBufferDesc_st {
4208 pub offset: ::std::os::raw::c_ulonglong,
4209 pub size: ::std::os::raw::c_ulonglong,
4210 pub flags: ::std::os::raw::c_uint,
4211 pub reserved: [::std::os::raw::c_uint; 16usize],
4212}
4213pub type hipExternalMemoryBufferDesc = hipExternalMemoryBufferDesc_st;
4214#[repr(C)]
4215#[derive(Debug, Copy, Clone)]
4216pub struct hipExternalMemoryMipmappedArrayDesc_st {
4217 pub offset: ::std::os::raw::c_ulonglong,
4218 pub formatDesc: hipChannelFormatDesc,
4219 pub extent: hipExtent,
4220 pub flags: ::std::os::raw::c_uint,
4221 pub numLevels: ::std::os::raw::c_uint,
4222}
4223pub type hipExternalMemoryMipmappedArrayDesc = hipExternalMemoryMipmappedArrayDesc_st;
4224pub type hipExternalMemory_t = *mut ::std::os::raw::c_void;
4225pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeOpaqueFd:
4226 hipExternalSemaphoreHandleType_enum = 1;
4227pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeOpaqueWin32:
4228 hipExternalSemaphoreHandleType_enum = 2;
4229pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeOpaqueWin32Kmt:
4230 hipExternalSemaphoreHandleType_enum = 3;
4231pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeD3D12Fence:
4232 hipExternalSemaphoreHandleType_enum = 4;
4233pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeD3D11Fence:
4234 hipExternalSemaphoreHandleType_enum = 5;
4235pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeNvSciSync:
4236 hipExternalSemaphoreHandleType_enum = 6;
4237pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeKeyedMutex:
4238 hipExternalSemaphoreHandleType_enum = 7;
4239pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeKeyedMutexKmt:
4240 hipExternalSemaphoreHandleType_enum = 8;
4241pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeTimelineSemaphoreFd:
4242 hipExternalSemaphoreHandleType_enum = 9;
4243pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeTimelineSemaphoreWin32 : hipExternalSemaphoreHandleType_enum = 10 ;
4244pub type hipExternalSemaphoreHandleType_enum = ::std::os::raw::c_uint;
4245pub use self::hipExternalSemaphoreHandleType_enum as hipExternalSemaphoreHandleType;
4246#[repr(C)]
4247#[derive(Copy, Clone)]
4248pub struct hipExternalSemaphoreHandleDesc_st {
4249 pub type_: hipExternalSemaphoreHandleType,
4250 pub handle: hipExternalSemaphoreHandleDesc_st__bindgen_ty_1,
4251 pub flags: ::std::os::raw::c_uint,
4252 pub reserved: [::std::os::raw::c_uint; 16usize],
4253}
4254#[repr(C)]
4255#[derive(Copy, Clone)]
4256pub union hipExternalSemaphoreHandleDesc_st__bindgen_ty_1 {
4257 pub fd: ::std::os::raw::c_int,
4258 pub win32: hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1,
4259 pub NvSciSyncObj: *const ::std::os::raw::c_void,
4260}
4261#[repr(C)]
4262#[derive(Debug, Copy, Clone)]
4263pub struct hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1 {
4264 pub handle: *mut ::std::os::raw::c_void,
4265 pub name: *const ::std::os::raw::c_void,
4266}
4267pub type hipExternalSemaphoreHandleDesc = hipExternalSemaphoreHandleDesc_st;
4268pub type hipExternalSemaphore_t = *mut ::std::os::raw::c_void;
4269#[repr(C)]
4270#[derive(Copy, Clone)]
4271pub struct hipExternalSemaphoreSignalParams_st {
4272 pub params: hipExternalSemaphoreSignalParams_st__bindgen_ty_1,
4273 pub flags: ::std::os::raw::c_uint,
4274 pub reserved: [::std::os::raw::c_uint; 16usize],
4275}
4276#[repr(C)]
4277#[derive(Copy, Clone)]
4278pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1 {
4279 pub fence: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1,
4280 pub nvSciSync: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2,
4281 pub keyedMutex: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_3,
4282 pub reserved: [::std::os::raw::c_uint; 12usize],
4283}
4284#[repr(C)]
4285#[derive(Debug, Copy, Clone)]
4286pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1 {
4287 pub value: ::std::os::raw::c_ulonglong,
4288}
4289#[repr(C)]
4290#[derive(Copy, Clone)]
4291pub union hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2 {
4292 pub fence: *mut ::std::os::raw::c_void,
4293 pub reserved: ::std::os::raw::c_ulonglong,
4294}
4295#[repr(C)]
4296#[derive(Debug, Copy, Clone)]
4297pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_3 {
4298 pub key: ::std::os::raw::c_ulonglong,
4299}
4300pub type hipExternalSemaphoreSignalParams = hipExternalSemaphoreSignalParams_st;
4301#[doc = " External semaphore wait parameters, compatible with driver type"]
4302#[repr(C)]
4303#[derive(Copy, Clone)]
4304pub struct hipExternalSemaphoreWaitParams_st {
4305 pub params: hipExternalSemaphoreWaitParams_st__bindgen_ty_1,
4306 pub flags: ::std::os::raw::c_uint,
4307 pub reserved: [::std::os::raw::c_uint; 16usize],
4308}
4309#[repr(C)]
4310#[derive(Copy, Clone)]
4311pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1 {
4312 pub fence: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1,
4313 pub nvSciSync: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2,
4314 pub keyedMutex: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_3,
4315 pub reserved: [::std::os::raw::c_uint; 10usize],
4316}
4317#[repr(C)]
4318#[derive(Debug, Copy, Clone)]
4319pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1 {
4320 pub value: ::std::os::raw::c_ulonglong,
4321}
4322#[repr(C)]
4323#[derive(Copy, Clone)]
4324pub union hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2 {
4325 pub fence: *mut ::std::os::raw::c_void,
4326 pub reserved: ::std::os::raw::c_ulonglong,
4327}
4328#[repr(C)]
4329#[derive(Debug, Copy, Clone)]
4330pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_3 {
4331 pub key: ::std::os::raw::c_ulonglong,
4332 pub timeoutMs: ::std::os::raw::c_uint,
4333}
4334#[doc = " External semaphore wait parameters, compatible with driver type"]
4335pub type hipExternalSemaphoreWaitParams = hipExternalSemaphoreWaitParams_st;
4336extern "C" {
4337 #[doc = " Internal use only. This API may change in the future\n Pre-Compiled header for online compilation"]
4338 pub fn __hipGetPCH(pch: *mut *const ::std::os::raw::c_char, size: *mut ::std::os::raw::c_uint);
4339}
4340pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsNone: hipGraphicsRegisterFlags = 0;
4341#[doc = "< HIP will not write to this registered resource"]
4342pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsReadOnly: hipGraphicsRegisterFlags = 1;
4343pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsWriteDiscard: hipGraphicsRegisterFlags =
4344 2;
4345#[doc = "< HIP will bind this resource to a surface"]
4346pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsSurfaceLoadStore:
4347 hipGraphicsRegisterFlags = 4;
4348pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsTextureGather: hipGraphicsRegisterFlags =
4349 8;
4350#[doc = " HIP Access falgs for Interop resources."]
4351pub type hipGraphicsRegisterFlags = ::std::os::raw::c_uint;
4352#[repr(C)]
4353#[derive(Debug, Copy, Clone)]
4354pub struct _hipGraphicsResource {
4355 _unused: [u8; 0],
4356}
4357pub type hipGraphicsResource = _hipGraphicsResource;
4358pub type hipGraphicsResource_t = *mut hipGraphicsResource;
4359#[repr(C)]
4360#[derive(Debug, Copy, Clone)]
4361pub struct ihipGraph {
4362 _unused: [u8; 0],
4363}
4364#[doc = " An opaque value that represents a hip graph"]
4365pub type hipGraph_t = *mut ihipGraph;
4366#[repr(C)]
4367#[derive(Debug, Copy, Clone)]
4368pub struct hipGraphNode {
4369 _unused: [u8; 0],
4370}
4371#[doc = " An opaque value that represents a hip graph node"]
4372pub type hipGraphNode_t = *mut hipGraphNode;
4373#[repr(C)]
4374#[derive(Debug, Copy, Clone)]
4375pub struct hipGraphExec {
4376 _unused: [u8; 0],
4377}
4378#[doc = " An opaque value that represents a hip graph Exec"]
4379pub type hipGraphExec_t = *mut hipGraphExec;
4380#[repr(C)]
4381#[derive(Debug, Copy, Clone)]
4382pub struct hipUserObject {
4383 _unused: [u8; 0],
4384}
4385#[doc = " An opaque value that represents a user obj"]
4386pub type hipUserObject_t = *mut hipUserObject;
4387#[doc = "< GPU kernel node"]
4388pub const hipGraphNodeType_hipGraphNodeTypeKernel: hipGraphNodeType = 0;
4389#[doc = "< Memcpy node"]
4390pub const hipGraphNodeType_hipGraphNodeTypeMemcpy: hipGraphNodeType = 1;
4391#[doc = "< Memset node"]
4392pub const hipGraphNodeType_hipGraphNodeTypeMemset: hipGraphNodeType = 2;
4393#[doc = "< Host (executable) node"]
4394pub const hipGraphNodeType_hipGraphNodeTypeHost: hipGraphNodeType = 3;
4395#[doc = "< Node which executes an embedded graph"]
4396pub const hipGraphNodeType_hipGraphNodeTypeGraph: hipGraphNodeType = 4;
4397#[doc = "< Empty (no-op) node"]
4398pub const hipGraphNodeType_hipGraphNodeTypeEmpty: hipGraphNodeType = 5;
4399#[doc = "< External event wait node"]
4400pub const hipGraphNodeType_hipGraphNodeTypeWaitEvent: hipGraphNodeType = 6;
4401#[doc = "< External event record node"]
4402pub const hipGraphNodeType_hipGraphNodeTypeEventRecord: hipGraphNodeType = 7;
4403#[doc = "< External Semaphore signal node"]
4404pub const hipGraphNodeType_hipGraphNodeTypeExtSemaphoreSignal: hipGraphNodeType = 8;
4405#[doc = "< External Semaphore wait node"]
4406pub const hipGraphNodeType_hipGraphNodeTypeExtSemaphoreWait: hipGraphNodeType = 9;
4407#[doc = "< Memory alloc node"]
4408pub const hipGraphNodeType_hipGraphNodeTypeMemAlloc: hipGraphNodeType = 10;
4409#[doc = "< Memory free node"]
4410pub const hipGraphNodeType_hipGraphNodeTypeMemFree: hipGraphNodeType = 11;
4411#[doc = "< MemcpyFromSymbol node"]
4412pub const hipGraphNodeType_hipGraphNodeTypeMemcpyFromSymbol: hipGraphNodeType = 12;
4413#[doc = "< MemcpyToSymbol node"]
4414pub const hipGraphNodeType_hipGraphNodeTypeMemcpyToSymbol: hipGraphNodeType = 13;
4415#[doc = "< BatchMemOp node"]
4416pub const hipGraphNodeType_hipGraphNodeTypeBatchMemOp: hipGraphNodeType = 14;
4417pub const hipGraphNodeType_hipGraphNodeTypeCount: hipGraphNodeType = 15;
4418#[doc = " hipGraphNodeType"]
4419pub type hipGraphNodeType = ::std::os::raw::c_uint;
4420pub type hipHostFn_t =
4421 ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void)>;
4422#[repr(C)]
4423#[derive(Debug, Copy, Clone)]
4424pub struct hipHostNodeParams {
4425 pub fn_: hipHostFn_t,
4426 pub userData: *mut ::std::os::raw::c_void,
4427}
4428#[repr(C)]
4429#[derive(Debug, Copy, Clone)]
4430pub struct hipKernelNodeParams {
4431 pub blockDim: dim3,
4432 pub extra: *mut *mut ::std::os::raw::c_void,
4433 pub func: *mut ::std::os::raw::c_void,
4434 pub gridDim: dim3,
4435 pub kernelParams: *mut *mut ::std::os::raw::c_void,
4436 pub sharedMemBytes: ::std::os::raw::c_uint,
4437}
4438#[repr(C)]
4439#[derive(Debug, Copy, Clone)]
4440pub struct hipMemsetParams {
4441 pub dst: *mut ::std::os::raw::c_void,
4442 pub elementSize: ::std::os::raw::c_uint,
4443 pub height: usize,
4444 pub pitch: usize,
4445 pub value: ::std::os::raw::c_uint,
4446 pub width: usize,
4447}
4448#[repr(C)]
4449#[derive(Debug, Copy, Clone)]
4450pub struct hipMemAllocNodeParams {
4451 #[doc = "< Pool properties, which contain where\n< the location should reside"]
4452 pub poolProps: hipMemPoolProps,
4453 #[doc = "< The number of memory access descriptors."]
4454 pub accessDescs: *const hipMemAccessDesc,
4455 #[doc = "< The number of access descriptors.\n< Must not be bigger than the number of GPUs"]
4456 pub accessDescCount: usize,
4457 #[doc = "< The size of the requested allocation in bytes"]
4458 pub bytesize: usize,
4459 #[doc = "< Returned device address of the allocation"]
4460 pub dptr: *mut ::std::os::raw::c_void,
4461}
4462#[doc = "< Normal cache persistence."]
4463pub const hipAccessProperty_hipAccessPropertyNormal: hipAccessProperty = 0;
4464#[doc = "< Streaming access is less likely to persist from cache"]
4465pub const hipAccessProperty_hipAccessPropertyStreaming: hipAccessProperty = 1;
4466#[doc = "< Persisting access is more likely to persist in cache"]
4467pub const hipAccessProperty_hipAccessPropertyPersisting: hipAccessProperty = 2;
4468#[doc = " Specifies performance hint with hipAccessPolicyWindow"]
4469pub type hipAccessProperty = ::std::os::raw::c_uint;
4470#[doc = " Specifies access policy for a window, a contiguous extent of memory\n beginning at base_ptr and ending at base_ptr + num_bytes."]
4471#[repr(C)]
4472#[derive(Debug, Copy, Clone)]
4473pub struct hipAccessPolicyWindow {
4474 #[doc = "< Starting address of the access policy window"]
4475 pub base_ptr: *mut ::std::os::raw::c_void,
4476 #[doc = "< hipAccessProperty set for hit"]
4477 pub hitProp: hipAccessProperty,
4478 #[doc = "< hitRatio specifies percentage of lines assigned hitProp"]
4479 pub hitRatio: f32,
4480 #[doc = "< hipAccessProperty set for miss"]
4481 pub missProp: hipAccessProperty,
4482 #[doc = "< Size in bytes of the window policy."]
4483 pub num_bytes: usize,
4484}
4485#[doc = " Memory Synchronization Domain map"]
4486#[repr(C)]
4487#[derive(Debug, Copy, Clone)]
4488pub struct hipLaunchMemSyncDomainMap {
4489 #[doc = "< The default domain ID to use for designated kernels"]
4490 pub default_: ::std::os::raw::c_uchar,
4491 #[doc = "< The remote domain ID to use for designated kernels"]
4492 pub remote: ::std::os::raw::c_uchar,
4493}
4494#[doc = "< Launch kernels in the default domain"]
4495pub const hipLaunchMemSyncDomain_hipLaunchMemSyncDomainDefault: hipLaunchMemSyncDomain = 0;
4496#[doc = "< Launch kernels in the remote domain"]
4497pub const hipLaunchMemSyncDomain_hipLaunchMemSyncDomainRemote: hipLaunchMemSyncDomain = 1;
4498#[doc = " Memory Synchronization Domain"]
4499pub type hipLaunchMemSyncDomain = ::std::os::raw::c_uint;
4500#[doc = "< Default Synchronization Policy. Host thread waits actively"]
4501pub const hipSynchronizationPolicy_hipSyncPolicyAuto: hipSynchronizationPolicy = 1;
4502#[doc = "< Host thread spins in tight loop waiting for completition"]
4503pub const hipSynchronizationPolicy_hipSyncPolicySpin: hipSynchronizationPolicy = 2;
4504#[doc = "< Host spins but yields to other threads, reducing CPU usage"]
4505pub const hipSynchronizationPolicy_hipSyncPolicyYield: hipSynchronizationPolicy = 3;
4506#[doc = "< Host thread blocks (sleeps) until the stream completes"]
4507pub const hipSynchronizationPolicy_hipSyncPolicyBlockingSync: hipSynchronizationPolicy = 4;
4508#[doc = " Stream Synchronization Policy.\n Can be set with hipStreamSetAttribute"]
4509pub type hipSynchronizationPolicy = ::std::os::raw::c_uint;
4510#[doc = "< Valid for Streams, graph nodes, launches"]
4511pub const hipLaunchAttributeID_hipLaunchAttributeAccessPolicyWindow: hipLaunchAttributeID = 1;
4512#[doc = "< Valid for graph nodes, launches"]
4513pub const hipLaunchAttributeID_hipLaunchAttributeCooperative: hipLaunchAttributeID = 2;
4514#[doc = "< Valid for streams"]
4515pub const hipLaunchAttributeID_hipLaunchAttributeSynchronizationPolicy: hipLaunchAttributeID = 3;
4516#[doc = "< Valid for graph node, streams, launches"]
4517pub const hipLaunchAttributeID_hipLaunchAttributePriority: hipLaunchAttributeID = 8;
4518#[doc = "< Valid for streams, graph nodes, launches"]
4519pub const hipLaunchAttributeID_hipLaunchAttributeMemSyncDomainMap: hipLaunchAttributeID = 9;
4520#[doc = "< Valid for streams, graph nodes, launches"]
4521pub const hipLaunchAttributeID_hipLaunchAttributeMemSyncDomain: hipLaunchAttributeID = 10;
4522pub const hipLaunchAttributeID_hipLaunchAttributeMax: hipLaunchAttributeID = 11;
4523#[doc = " Launch Attribute ID"]
4524pub type hipLaunchAttributeID = ::std::os::raw::c_uint;
4525#[doc = " Launch Attribute Value"]
4526#[repr(C)]
4527#[derive(Copy, Clone)]
4528pub union hipLaunchAttributeValue {
4529 #[doc = "< 64 byte padding"]
4530 pub pad: [::std::os::raw::c_char; 64usize],
4531 #[doc = "< Value of launch attribute ::hipLaunchAttributeAccessPolicyWindow."]
4532 pub accessPolicyWindow: hipAccessPolicyWindow,
4533 #[doc = "< Value of launch attribute ::hipLaunchAttributeCooperative. Indicates\n< whether the kernel is cooperative."]
4534 pub cooperative: ::std::os::raw::c_int,
4535 #[doc = "< Value of launch attribute :: hipLaunchAttributePriority. Execution priority of\n< kernel"]
4536 pub priority: ::std::os::raw::c_int,
4537 #[doc = "< Value of launch attribute :: hipLaunchAttributeSynchronizationPolicy. Used\n< to work queued up in stream"]
4538 pub syncPolicy: hipSynchronizationPolicy,
4539 #[doc = "< Value of launch attribute hipLaunchAttributeMemSyncDomainMap"]
4540 pub memSyncDomainMap: hipLaunchMemSyncDomainMap,
4541 #[doc = "< Value of launch attribute hipLaunchAttributeMemSyncDomain"]
4542 pub memSyncDomain: hipLaunchMemSyncDomain,
4543}
4544#[doc = "< The update succeeded"]
4545pub const hipGraphExecUpdateResult_hipGraphExecUpdateSuccess: hipGraphExecUpdateResult = 0;
4546#[doc = "< The update failed for an unexpected reason which is described\n< in the return value of the function"]
4547pub const hipGraphExecUpdateResult_hipGraphExecUpdateError: hipGraphExecUpdateResult = 1;
4548#[doc = "< The update failed because the topology changed"]
4549pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorTopologyChanged:
4550 hipGraphExecUpdateResult = 2;
4551#[doc = "< The update failed because a node type changed"]
4552pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorNodeTypeChanged:
4553 hipGraphExecUpdateResult = 3;
4554pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorFunctionChanged:
4555 hipGraphExecUpdateResult = 4;
4556pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorParametersChanged:
4557 hipGraphExecUpdateResult = 5;
4558pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorNotSupported: hipGraphExecUpdateResult =
4559 6;
4560pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorUnsupportedFunctionChange:
4561 hipGraphExecUpdateResult = 7;
4562#[doc = " Graph execution update result"]
4563pub type hipGraphExecUpdateResult = ::std::os::raw::c_uint;
4564pub const hipStreamCaptureMode_hipStreamCaptureModeGlobal: hipStreamCaptureMode = 0;
4565pub const hipStreamCaptureMode_hipStreamCaptureModeThreadLocal: hipStreamCaptureMode = 1;
4566pub const hipStreamCaptureMode_hipStreamCaptureModeRelaxed: hipStreamCaptureMode = 2;
4567pub type hipStreamCaptureMode = ::std::os::raw::c_uint;
4568#[doc = "< Stream is not capturing"]
4569pub const hipStreamCaptureStatus_hipStreamCaptureStatusNone: hipStreamCaptureStatus = 0;
4570#[doc = "< Stream is actively capturing"]
4571pub const hipStreamCaptureStatus_hipStreamCaptureStatusActive: hipStreamCaptureStatus = 1;
4572#[doc = "< Stream is part of a capture sequence that has been\n< invalidated, but not terminated"]
4573pub const hipStreamCaptureStatus_hipStreamCaptureStatusInvalidated: hipStreamCaptureStatus = 2;
4574pub type hipStreamCaptureStatus = ::std::os::raw::c_uint;
4575#[doc = "< Add new nodes to the dependency set"]
4576pub const hipStreamUpdateCaptureDependenciesFlags_hipStreamAddCaptureDependencies:
4577 hipStreamUpdateCaptureDependenciesFlags = 0;
4578#[doc = "< Replace the dependency set with the new nodes"]
4579pub const hipStreamUpdateCaptureDependenciesFlags_hipStreamSetCaptureDependencies:
4580 hipStreamUpdateCaptureDependenciesFlags = 1;
4581pub type hipStreamUpdateCaptureDependenciesFlags = ::std::os::raw::c_uint;
4582pub const hipGraphMemAttributeType_hipGraphMemAttrUsedMemCurrent: hipGraphMemAttributeType = 0;
4583#[doc = "< High watermark of memory, in bytes, associated with graphs since\n< the last time."]
4584pub const hipGraphMemAttributeType_hipGraphMemAttrUsedMemHigh: hipGraphMemAttributeType = 1;
4585#[doc = "< Amount of memory, in bytes, currently allocated for\n< graphs."]
4586pub const hipGraphMemAttributeType_hipGraphMemAttrReservedMemCurrent: hipGraphMemAttributeType = 2;
4587#[doc = "< High watermark of memory, in bytes, currently allocated for\n< graphs"]
4588pub const hipGraphMemAttributeType_hipGraphMemAttrReservedMemHigh: hipGraphMemAttributeType = 3;
4589pub type hipGraphMemAttributeType = ::std::os::raw::c_uint;
4590#[doc = "< Destructor execution is not synchronized."]
4591pub const hipUserObjectFlags_hipUserObjectNoDestructorSync: hipUserObjectFlags = 1;
4592pub type hipUserObjectFlags = ::std::os::raw::c_uint;
4593#[doc = "< Add new reference or retain."]
4594pub const hipUserObjectRetainFlags_hipGraphUserObjectMove: hipUserObjectRetainFlags = 1;
4595pub type hipUserObjectRetainFlags = ::std::os::raw::c_uint;
4596pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagAutoFreeOnLaunch:
4597 hipGraphInstantiateFlags = 1;
4598#[doc = "< Automatically upload the graph after instantiation."]
4599pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagUpload: hipGraphInstantiateFlags = 2;
4600pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagDeviceLaunch: hipGraphInstantiateFlags =
4601 4;
4602pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagUseNodePriority:
4603 hipGraphInstantiateFlags = 8;
4604pub type hipGraphInstantiateFlags = ::std::os::raw::c_uint;
4605pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsVerbose: hipGraphDebugDotFlags = 1;
4606#[doc = "< Adds hipKernelNodeParams to output"]
4607pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsKernelNodeParams: hipGraphDebugDotFlags = 4;
4608#[doc = "< Adds hipMemcpy3DParms to output"]
4609pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsMemcpyNodeParams: hipGraphDebugDotFlags = 8;
4610#[doc = "< Adds hipMemsetParams to output"]
4611pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsMemsetNodeParams: hipGraphDebugDotFlags = 16;
4612#[doc = "< Adds hipHostNodeParams to output"]
4613pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsHostNodeParams: hipGraphDebugDotFlags = 32;
4614pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsEventNodeParams: hipGraphDebugDotFlags = 64;
4615pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsExtSemasSignalNodeParams:
4616 hipGraphDebugDotFlags = 128;
4617pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsExtSemasWaitNodeParams: hipGraphDebugDotFlags =
4618 256;
4619pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsKernelNodeAttributes: hipGraphDebugDotFlags =
4620 512;
4621pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsHandles: hipGraphDebugDotFlags = 1024;
4622pub type hipGraphDebugDotFlags = ::std::os::raw::c_uint;
4623#[doc = "< Instantiation Success"]
4624pub const hipGraphInstantiateResult_hipGraphInstantiateSuccess: hipGraphInstantiateResult = 0;
4625#[doc = "< Instantiation failed for an\nunexpected reason which is described in the return value of the function"]
4626pub const hipGraphInstantiateResult_hipGraphInstantiateError: hipGraphInstantiateResult = 1;
4627#[doc = "< Instantiation failed due\nto invalid structure, such as cycles"]
4628pub const hipGraphInstantiateResult_hipGraphInstantiateInvalidStructure: hipGraphInstantiateResult =
4629 2;
4630#[doc = "< Instantiation for device launch failed\nbecause the graph contained an unsupported operation"]
4631pub const hipGraphInstantiateResult_hipGraphInstantiateNodeOperationNotSupported:
4632 hipGraphInstantiateResult = 3;
4633#[doc = "< Instantiation for device launch failed\ndue to the nodes belonging to different contexts"]
4634pub const hipGraphInstantiateResult_hipGraphInstantiateMultipleDevicesNotSupported:
4635 hipGraphInstantiateResult = 4;
4636#[doc = " hipGraphInstantiateWithParams results"]
4637pub type hipGraphInstantiateResult = ::std::os::raw::c_uint;
4638#[doc = " Graph Instantiation parameters"]
4639#[repr(C)]
4640#[derive(Debug, Copy, Clone)]
4641pub struct hipGraphInstantiateParams {
4642 #[doc = "< The node which caused instantiation to fail, if any"]
4643 pub errNode_out: hipGraphNode_t,
4644 #[doc = "< Instantiation flags"]
4645 pub flags: ::std::os::raw::c_ulonglong,
4646 #[doc = "< Whether instantiation was successful.\nIf it failed, the reason why"]
4647 pub result_out: hipGraphInstantiateResult,
4648 #[doc = "< Upload stream"]
4649 pub uploadStream: hipStream_t,
4650}
4651#[doc = " Memory allocation properties"]
4652#[repr(C)]
4653#[derive(Copy, Clone)]
4654pub struct hipMemAllocationProp {
4655 #[doc = "< Memory allocation type"]
4656 pub type_: hipMemAllocationType,
4657 pub __bindgen_anon_1: hipMemAllocationProp__bindgen_ty_1,
4658 #[doc = "< Memory location"]
4659 pub location: hipMemLocation,
4660 #[doc = "< Metadata for Win32 handles"]
4661 pub win32HandleMetaData: *mut ::std::os::raw::c_void,
4662 pub allocFlags: hipMemAllocationProp__bindgen_ty_2,
4663}
4664#[repr(C)]
4665#[derive(Copy, Clone)]
4666pub union hipMemAllocationProp__bindgen_ty_1 {
4667 #[doc = "< Requested handle type"]
4668 pub requestedHandleType: hipMemAllocationHandleType,
4669 #[doc = "< Requested handle types"]
4670 pub requestedHandleTypes: hipMemAllocationHandleType,
4671}
4672#[repr(C)]
4673#[derive(Debug, Copy, Clone)]
4674pub struct hipMemAllocationProp__bindgen_ty_2 {
4675 #[doc = "< Compression type"]
4676 pub compressionType: ::std::os::raw::c_uchar,
4677 #[doc = "< RDMA capable"]
4678 pub gpuDirectRDMACapable: ::std::os::raw::c_uchar,
4679 #[doc = "< Usage"]
4680 pub usage: ::std::os::raw::c_ushort,
4681}
4682#[doc = " External semaphore signal node parameters"]
4683#[repr(C)]
4684#[derive(Debug, Copy, Clone)]
4685pub struct hipExternalSemaphoreSignalNodeParams {
4686 pub extSemArray: *mut hipExternalSemaphore_t,
4687 pub paramsArray: *const hipExternalSemaphoreSignalParams,
4688 pub numExtSems: ::std::os::raw::c_uint,
4689}
4690#[doc = " External semaphore wait node parameters"]
4691#[repr(C)]
4692#[derive(Debug, Copy, Clone)]
4693pub struct hipExternalSemaphoreWaitNodeParams {
4694 pub extSemArray: *mut hipExternalSemaphore_t,
4695 pub paramsArray: *const hipExternalSemaphoreWaitParams,
4696 pub numExtSems: ::std::os::raw::c_uint,
4697}
4698#[repr(C)]
4699#[derive(Debug, Copy, Clone)]
4700pub struct ihipMemGenericAllocationHandle {
4701 _unused: [u8; 0],
4702}
4703#[doc = " Generic handle for memory allocation"]
4704pub type hipMemGenericAllocationHandle_t = *mut ihipMemGenericAllocationHandle;
4705#[doc = "< Minimum granularity"]
4706pub const hipMemAllocationGranularity_flags_hipMemAllocationGranularityMinimum:
4707 hipMemAllocationGranularity_flags = 0;
4708#[doc = "< Recommended granularity for performance"]
4709pub const hipMemAllocationGranularity_flags_hipMemAllocationGranularityRecommended:
4710 hipMemAllocationGranularity_flags = 1;
4711#[doc = " Flags for granularity"]
4712pub type hipMemAllocationGranularity_flags = ::std::os::raw::c_uint;
4713#[doc = "< Generic handle type"]
4714pub const hipMemHandleType_hipMemHandleTypeGeneric: hipMemHandleType = 0;
4715#[doc = " Memory handle type"]
4716pub type hipMemHandleType = ::std::os::raw::c_uint;
4717#[doc = "< Map operation"]
4718pub const hipMemOperationType_hipMemOperationTypeMap: hipMemOperationType = 1;
4719#[doc = "< Unmap operation"]
4720pub const hipMemOperationType_hipMemOperationTypeUnmap: hipMemOperationType = 2;
4721#[doc = " Memory operation types"]
4722pub type hipMemOperationType = ::std::os::raw::c_uint;
4723#[doc = "< Sparse level"]
4724pub const hipArraySparseSubresourceType_hipArraySparseSubresourceTypeSparseLevel:
4725 hipArraySparseSubresourceType = 0;
4726#[doc = "< Miptail"]
4727pub const hipArraySparseSubresourceType_hipArraySparseSubresourceTypeMiptail:
4728 hipArraySparseSubresourceType = 1;
4729#[doc = " Subresource types for sparse arrays"]
4730pub type hipArraySparseSubresourceType = ::std::os::raw::c_uint;
4731#[doc = " Map info for arrays"]
4732#[repr(C)]
4733#[derive(Copy, Clone)]
4734pub struct hipArrayMapInfo {
4735 #[doc = "< Resource type"]
4736 pub resourceType: hipResourceType,
4737 pub resource: hipArrayMapInfo__bindgen_ty_1,
4738 #[doc = "< Sparse subresource type"]
4739 pub subresourceType: hipArraySparseSubresourceType,
4740 pub subresource: hipArrayMapInfo__bindgen_ty_2,
4741 #[doc = "< Memory operation type"]
4742 pub memOperationType: hipMemOperationType,
4743 #[doc = "< Memory handle type"]
4744 pub memHandleType: hipMemHandleType,
4745 pub memHandle: hipArrayMapInfo__bindgen_ty_3,
4746 #[doc = "< Offset within the memory"]
4747 pub offset: ::std::os::raw::c_ulonglong,
4748 #[doc = "< Device ordinal bit mask"]
4749 pub deviceBitMask: ::std::os::raw::c_uint,
4750 #[doc = "< flags for future use, must be zero now."]
4751 pub flags: ::std::os::raw::c_uint,
4752 #[doc = "< Reserved for future use, must be zero now."]
4753 pub reserved: [::std::os::raw::c_uint; 2usize],
4754}
4755#[repr(C)]
4756#[derive(Copy, Clone)]
4757pub union hipArrayMapInfo__bindgen_ty_1 {
4758 pub mipmap: hipMipmappedArray,
4759 pub array: hipArray_t,
4760}
4761#[repr(C)]
4762#[derive(Copy, Clone)]
4763pub union hipArrayMapInfo__bindgen_ty_2 {
4764 pub sparseLevel: hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1,
4765 pub miptail: hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2,
4766}
4767#[repr(C)]
4768#[derive(Debug, Copy, Clone)]
4769pub struct hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1 {
4770 #[doc = "< For mipmapped arrays must be a valid mipmap level. For arrays must be zero"]
4771 pub level: ::std::os::raw::c_uint,
4772 #[doc = "< For layered arrays must be a valid layer index. Otherwise, must be zero"]
4773 pub layer: ::std::os::raw::c_uint,
4774 #[doc = "< X offset in elements"]
4775 pub offsetX: ::std::os::raw::c_uint,
4776 #[doc = "< Y offset in elements"]
4777 pub offsetY: ::std::os::raw::c_uint,
4778 #[doc = "< Z offset in elements"]
4779 pub offsetZ: ::std::os::raw::c_uint,
4780 #[doc = "< Width in elements"]
4781 pub extentWidth: ::std::os::raw::c_uint,
4782 #[doc = "< Height in elements"]
4783 pub extentHeight: ::std::os::raw::c_uint,
4784 #[doc = "< Depth in elements"]
4785 pub extentDepth: ::std::os::raw::c_uint,
4786}
4787#[repr(C)]
4788#[derive(Debug, Copy, Clone)]
4789pub struct hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2 {
4790 #[doc = "< For layered arrays must be a valid layer index. Otherwise, must be zero"]
4791 pub layer: ::std::os::raw::c_uint,
4792 #[doc = "< Offset within mip tail"]
4793 pub offset: ::std::os::raw::c_ulonglong,
4794 #[doc = "< Extent in bytes"]
4795 pub size: ::std::os::raw::c_ulonglong,
4796}
4797#[repr(C)]
4798#[derive(Copy, Clone)]
4799pub union hipArrayMapInfo__bindgen_ty_3 {
4800 pub memHandle: hipMemGenericAllocationHandle_t,
4801}
4802#[doc = " Memcpy node params"]
4803#[repr(C)]
4804#[derive(Debug, Copy, Clone)]
4805pub struct hipMemcpyNodeParams {
4806 #[doc = "< Must be zero."]
4807 pub flags: ::std::os::raw::c_int,
4808 #[doc = "< Must be zero."]
4809 pub reserved: [::std::os::raw::c_int; 3usize],
4810 #[doc = "< Params set for the memory copy."]
4811 pub copyParams: hipMemcpy3DParms,
4812}
4813#[doc = " Child graph node params"]
4814#[repr(C)]
4815#[derive(Debug, Copy, Clone)]
4816pub struct hipChildGraphNodeParams {
4817 #[doc = "< Either the child graph to clone into the node, or\n< a handle to the graph possesed by the node used during query"]
4818 pub graph: hipGraph_t,
4819}
4820#[doc = " Event record node params"]
4821#[repr(C)]
4822#[derive(Debug, Copy, Clone)]
4823pub struct hipEventWaitNodeParams {
4824 #[doc = "< Event to wait on"]
4825 pub event: hipEvent_t,
4826}
4827#[doc = " Event record node params"]
4828#[repr(C)]
4829#[derive(Debug, Copy, Clone)]
4830pub struct hipEventRecordNodeParams {
4831 #[doc = "< The event to be recorded when node executes"]
4832 pub event: hipEvent_t,
4833}
4834#[doc = " Memory free node params"]
4835#[repr(C)]
4836#[derive(Debug, Copy, Clone)]
4837pub struct hipMemFreeNodeParams {
4838 #[doc = "< the pointer to be freed"]
4839 pub dptr: *mut ::std::os::raw::c_void,
4840}
4841#[doc = " Params for different graph nodes"]
4842#[repr(C)]
4843#[derive(Copy, Clone)]
4844pub struct hipGraphNodeParams {
4845 pub type_: hipGraphNodeType,
4846 pub reserved0: [::std::os::raw::c_int; 3usize],
4847 pub __bindgen_anon_1: hipGraphNodeParams__bindgen_ty_1,
4848 pub reserved2: ::std::os::raw::c_longlong,
4849}
4850#[repr(C)]
4851#[derive(Copy, Clone)]
4852pub union hipGraphNodeParams__bindgen_ty_1 {
4853 pub reserved1: [::std::os::raw::c_longlong; 29usize],
4854 pub kernel: hipKernelNodeParams,
4855 pub memcpy: hipMemcpyNodeParams,
4856 pub memset: hipMemsetParams,
4857 pub host: hipHostNodeParams,
4858 pub graph: hipChildGraphNodeParams,
4859 pub eventWait: hipEventWaitNodeParams,
4860 pub eventRecord: hipEventRecordNodeParams,
4861 pub extSemSignal: hipExternalSemaphoreSignalNodeParams,
4862 pub extSemWait: hipExternalSemaphoreWaitNodeParams,
4863 pub alloc: hipMemAllocNodeParams,
4864 pub free: hipMemFreeNodeParams,
4865}
4866pub const hipGraphDependencyType_hipGraphDependencyTypeDefault: hipGraphDependencyType = 0;
4867pub const hipGraphDependencyType_hipGraphDependencyTypeProgrammatic: hipGraphDependencyType = 1;
4868pub type hipGraphDependencyType = ::std::os::raw::c_uint;
4869#[repr(C)]
4870#[derive(Debug, Copy, Clone)]
4871pub struct hipGraphEdgeData {
4872 #[doc = "< This indicates when the dependency is triggered from the upstream node on the\n< edge. The meaning is specfic to the node type. A value of 0 in all cases\n< means full completion of the upstream node, with memory visibility to the\n< downstream node or portion thereof (indicated by to_port). Only kernel nodes\n< define non-zero ports. A kernel node can use the following output port types:\n< hipGraphKernelNodePortDefault, hipGraphKernelNodePortProgrammatic, or\n< hipGraphKernelNodePortLaunchCompletion."]
4873 pub from_port: ::std::os::raw::c_uchar,
4874 #[doc = "< These bytes are unused and must be zeroed"]
4875 pub reserved: [::std::os::raw::c_uchar; 5usize],
4876 #[doc = "< Currently no node types define non-zero ports. This field must be set to zero."]
4877 pub to_port: ::std::os::raw::c_uchar,
4878 #[doc = "< This should be populated with a value from hipGraphDependencyType"]
4879 pub type_: ::std::os::raw::c_uchar,
4880}
4881#[doc = " Used to specify custom attributes for launching kernels"]
4882#[repr(C)]
4883#[derive(Copy, Clone)]
4884pub struct hipLaunchAttribute_st {
4885 #[doc = "< Identifier of the launch attribute"]
4886 pub id: hipLaunchAttributeID,
4887 #[doc = "< Padding to align the structure to 8 bytes"]
4888 pub pad: [::std::os::raw::c_char; 4usize],
4889 pub __bindgen_anon_1: hipLaunchAttribute_st__bindgen_ty_1,
4890}
4891#[repr(C)]
4892#[derive(Copy, Clone)]
4893pub union hipLaunchAttribute_st__bindgen_ty_1 {
4894 #[doc = "< Value associated with the launch attribute"]
4895 pub val: hipLaunchAttributeValue,
4896 #[doc = "< Value associated with the launch attribute"]
4897 pub value: hipLaunchAttributeValue,
4898}
4899#[doc = " Used to specify custom attributes for launching kernels"]
4900pub type hipLaunchAttribute = hipLaunchAttribute_st;
4901#[doc = " HIP extensible launch configuration"]
4902#[repr(C)]
4903#[derive(Debug, Copy, Clone)]
4904pub struct hipLaunchConfig_st {
4905 #[doc = "< Grid dimensions"]
4906 pub gridDim: dim3,
4907 #[doc = "< Block dimensions"]
4908 pub blockDim: dim3,
4909 #[doc = "< Dynamic shared-memory size per thread block"]
4910 pub dynamicSmemBytes: usize,
4911 #[doc = "< Stream identifier"]
4912 pub stream: hipStream_t,
4913 #[doc = "< Attributes list"]
4914 pub attrs: *mut hipLaunchAttribute,
4915 #[doc = "< Number of attributes"]
4916 pub numAttrs: ::std::os::raw::c_uint,
4917}
4918#[doc = " HIP extensible launch configuration"]
4919pub type hipLaunchConfig_t = hipLaunchConfig_st;
4920#[doc = " HIP driver extensible launch configuration"]
4921#[repr(C)]
4922#[derive(Debug, Copy, Clone)]
4923pub struct HIP_LAUNCH_CONFIG_st {
4924 #[doc = "< Grid width in blocks"]
4925 pub gridDimX: ::std::os::raw::c_uint,
4926 #[doc = "< Grid height in blocks"]
4927 pub gridDimY: ::std::os::raw::c_uint,
4928 #[doc = "< Grid depth in blocks"]
4929 pub gridDimZ: ::std::os::raw::c_uint,
4930 #[doc = "< Thread block dimension in X"]
4931 pub blockDimX: ::std::os::raw::c_uint,
4932 #[doc = "< Thread block dimension in Y"]
4933 pub blockDimY: ::std::os::raw::c_uint,
4934 #[doc = "< Thread block dimension in Z"]
4935 pub blockDimZ: ::std::os::raw::c_uint,
4936 #[doc = "< Dynamic shared-memory size in bytes per block"]
4937 pub sharedMemBytes: ::std::os::raw::c_uint,
4938 #[doc = "< HIP stream identifier"]
4939 pub hStream: hipStream_t,
4940 #[doc = "< Attribute list"]
4941 pub attrs: *mut hipLaunchAttribute,
4942 #[doc = "< Number of attributes"]
4943 pub numAttrs: ::std::os::raw::c_uint,
4944}
4945#[doc = " HIP driver extensible launch configuration"]
4946pub type HIP_LAUNCH_CONFIG = HIP_LAUNCH_CONFIG_st;
4947pub const hipMemRangeHandleType_hipMemRangeHandleTypeDmaBufFd: hipMemRangeHandleType = 1;
4948pub const hipMemRangeHandleType_hipMemRangeHandleTypeMax: hipMemRangeHandleType = 2147483647;
4949#[doc = " Requested handle type for address range."]
4950pub type hipMemRangeHandleType = ::std::os::raw::c_uint;
4951pub const hipMemRangeFlags_hipMemRangeFlagDmaBufMappingTypePcie: hipMemRangeFlags = 1;
4952pub const hipMemRangeFlags_hipMemRangeFlagsMax: hipMemRangeFlags = 2147483647;
4953#[doc = " Mem Range Flags used in hipMemGetHandleForAddressRange."]
4954pub type hipMemRangeFlags = ::std::os::raw::c_uint;
4955extern "C" {
4956 #[doc = " @}\n/\n/**\n @defgroup API HIP API\n @{\n\n Defines the HIP API. See the individual sections for more information.\n/\n/**\n @defgroup Driver Initialization and Version\n @{\n This section describes the initializtion and version functions of HIP runtime API.\n\n/\n/**\n @brief Explicitly initializes the HIP runtime.\n\n @param [in] flags Initialization flag, should be zero.\n\n Most HIP APIs implicitly initialize the HIP runtime.\n This API provides control over the timing of the initialization.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
4957 pub fn hipInit(flags: ::std::os::raw::c_uint) -> hipError_t;
4958}
4959extern "C" {
4960 #[doc = " @brief Returns the approximate HIP driver version.\n\n @param [out] driverVersion driver version\n\n HIP driver version shows up in the format:\n HIP_VERSION_MAJOR * 10000000 + HIP_VERSION_MINOR * 100000 + HIP_VERSION_PATCH.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning The HIP driver version does not correspond to an exact CUDA driver revision.\n On AMD platform, the API returns the HIP driver version, while on NVIDIA platform, it calls\n the corresponding CUDA runtime API and returns the CUDA driver version.\n There is no mapping/correlation between HIP driver version and CUDA driver version.\n\n @see hipRuntimeGetVersion"]
4961 pub fn hipDriverGetVersion(driverVersion: *mut ::std::os::raw::c_int) -> hipError_t;
4962}
4963extern "C" {
4964 #[doc = " @brief Returns the approximate HIP Runtime version.\n\n @param [out] runtimeVersion HIP runtime version\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning The version definition of HIP runtime is different from CUDA.\n On AMD platform, the function returns HIP runtime version,\n while on NVIDIA platform, it returns CUDA runtime version.\n And there is no mapping/correlation between HIP version and CUDA version.\n\n @see hipDriverGetVersion"]
4965 pub fn hipRuntimeGetVersion(runtimeVersion: *mut ::std::os::raw::c_int) -> hipError_t;
4966}
4967extern "C" {
4968 #[doc = " @brief Returns a handle to a compute device\n @param [out] device Handle of device\n @param [in] ordinal Device ordinal\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
4969 pub fn hipDeviceGet(device: *mut hipDevice_t, ordinal: ::std::os::raw::c_int) -> hipError_t;
4970}
4971extern "C" {
4972 #[doc = " @brief Returns the compute capability of the device\n @param [out] major Major compute capability version number\n @param [out] minor Minor compute capability version number\n @param [in] device Device ordinal\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
4973 pub fn hipDeviceComputeCapability(
4974 major: *mut ::std::os::raw::c_int,
4975 minor: *mut ::std::os::raw::c_int,
4976 device: hipDevice_t,
4977 ) -> hipError_t;
4978}
4979extern "C" {
4980 #[doc = " @brief Returns an identifer string for the device.\n @param [out] name String of the device name\n @param [in] len Maximum length of string to store in device name\n @param [in] device Device ordinal\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
4981 pub fn hipDeviceGetName(
4982 name: *mut ::std::os::raw::c_char,
4983 len: ::std::os::raw::c_int,
4984 device: hipDevice_t,
4985 ) -> hipError_t;
4986}
4987extern "C" {
4988 #[doc = " @brief Returns an UUID for the device.[BETA]\n @param [out] uuid UUID for the device\n @param [in] device device ordinal\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue, #hipErrorNotInitialized,\n #hipErrorDeinitialized"]
4989 pub fn hipDeviceGetUuid(uuid: *mut hipUUID, device: hipDevice_t) -> hipError_t;
4990}
4991extern "C" {
4992 #[doc = " @brief Returns a value for attribute of link between two devices\n @param [out] value Pointer of the value for the attrubute\n @param [in] attr enum of hipDeviceP2PAttr to query\n @param [in] srcDevice The source device of the link\n @param [in] dstDevice The destination device of the link\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
4993 pub fn hipDeviceGetP2PAttribute(
4994 value: *mut ::std::os::raw::c_int,
4995 attr: hipDeviceP2PAttr,
4996 srcDevice: ::std::os::raw::c_int,
4997 dstDevice: ::std::os::raw::c_int,
4998 ) -> hipError_t;
4999}
5000extern "C" {
5001 #[doc = " @brief Returns a PCI Bus Id string for the device, overloaded to take int device ID.\n @param [out] pciBusId The string of PCI Bus Id format for the device\n @param [in] len Maximum length of string\n @param [in] device The device ordinal\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
5002 pub fn hipDeviceGetPCIBusId(
5003 pciBusId: *mut ::std::os::raw::c_char,
5004 len: ::std::os::raw::c_int,
5005 device: ::std::os::raw::c_int,
5006 ) -> hipError_t;
5007}
5008extern "C" {
5009 #[doc = " @brief Returns a handle to a compute device.\n @param [out] device The handle of the device\n @param [in] pciBusId The string of PCI Bus Id for the device\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue"]
5010 pub fn hipDeviceGetByPCIBusId(
5011 device: *mut ::std::os::raw::c_int,
5012 pciBusId: *const ::std::os::raw::c_char,
5013 ) -> hipError_t;
5014}
5015extern "C" {
5016 #[doc = " @brief Returns the total amount of memory on the device.\n @param [out] bytes The size of memory in bytes, on the device\n @param [in] device The ordinal of the device\n\n @returns #hipSuccess, #hipErrorInvalidDevice"]
5017 pub fn hipDeviceTotalMem(bytes: *mut usize, device: hipDevice_t) -> hipError_t;
5018}
5019extern "C" {
5020 #[doc = " @}\n/\n/**\n @defgroup Device Device Management\n @{\n This section describes the device management functions of HIP runtime API.\n/\n/**\n @brief Waits on all active streams on current device\n\n When this command is invoked, the host thread gets blocked until all the commands associated\n with streams associated with the device. HIP does not support multiple blocking modes (yet!).\n\n @returns #hipSuccess\n\n @see hipSetDevice, hipDeviceReset"]
5021 pub fn hipDeviceSynchronize() -> hipError_t;
5022}
5023extern "C" {
5024 #[doc = " @brief The state of current device is discarded and updated to a fresh state.\n\n Calling this function deletes all streams created, memory allocated, kernels running, events\n created. Make sure that no other thread is using the device or streams, memory, kernels, events\n associated with the current device.\n\n @returns #hipSuccess\n\n @see hipDeviceSynchronize"]
5025 pub fn hipDeviceReset() -> hipError_t;
5026}
5027extern "C" {
5028 #[doc = " @brief Set default device to be used for subsequent hip API calls from this thread.\n\n @param[in] deviceId Valid device in range 0...hipGetDeviceCount().\n\n Sets @p device as the default device for the calling host thread. Valid device id's are 0...\n (hipGetDeviceCount()-1).\n\n Many HIP APIs implicitly use the \"default device\" :\n\n - Any device memory subsequently allocated from this host thread (using hipMalloc) will be\n allocated on device.\n - Any streams or events created from this host thread will be associated with device.\n - Any kernels launched from this host thread (using hipLaunchKernel) will be executed on device\n (unless a specific stream is specified, in which case the device associated with that stream will\n be used).\n\n This function may be called from any host thread. Multiple host threads may use the same device.\n This function does no synchronization with the previous or new device, and has very little\n runtime overhead. Applications can use hipSetDevice to quickly switch the default device before\n making a HIP runtime call which uses the default device.\n\n The default device is stored in thread-local-storage for each thread.\n Thread-pool implementations may inherit the default device of the previous thread. A good\n practice is to always call hipSetDevice at the start of HIP coding sequency to establish a known\n standard device.\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorNoDevice\n\n @see #hipGetDevice, #hipGetDeviceCount"]
5029 pub fn hipSetDevice(deviceId: ::std::os::raw::c_int) -> hipError_t;
5030}
5031extern "C" {
5032 #[doc = " @brief Set a list of devices that can be used.\n\n @param[in] device_arr List of devices to try\n @param[in] len Number of devices in specified list\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see #hipGetDevice, #hipGetDeviceCount. #hipSetDevice. #hipGetDeviceProperties.\n #hipSetDeviceFlags. #hipChooseDevice\n"]
5033 pub fn hipSetValidDevices(
5034 device_arr: *mut ::std::os::raw::c_int,
5035 len: ::std::os::raw::c_int,
5036 ) -> hipError_t;
5037}
5038extern "C" {
5039 #[doc = " @brief Return the default device id for the calling host thread.\n\n @param [out] deviceId *device is written with the default device\n\n HIP maintains an default device for each thread using thread-local-storage.\n This device is used implicitly for HIP runtime APIs called by this thread.\n hipGetDevice returns in * @p device the default device for the calling host thread.\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see hipSetDevice, hipGetDevicesizeBytes"]
5040 pub fn hipGetDevice(deviceId: *mut ::std::os::raw::c_int) -> hipError_t;
5041}
5042extern "C" {
5043 #[doc = " @brief Return number of compute-capable devices.\n\n @param [out] count Returns number of compute-capable devices.\n\n @returns #hipSuccess, #hipErrorNoDevice\n\n\n Returns in @p *count the number of devices that have ability to run compute commands. If there\n are no such devices, then @ref hipGetDeviceCount will return #hipErrorNoDevice. If 1 or more\n devices can be found, then hipGetDeviceCount returns #hipSuccess."]
5044 pub fn hipGetDeviceCount(count: *mut ::std::os::raw::c_int) -> hipError_t;
5045}
5046extern "C" {
5047 #[doc = " @brief Query for a specific device attribute.\n\n @param [out] pi pointer to value to return\n @param [in] attr attribute to query\n @param [in] deviceId which device to query for information\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue"]
5048 pub fn hipDeviceGetAttribute(
5049 pi: *mut ::std::os::raw::c_int,
5050 attr: hipDeviceAttribute_t,
5051 deviceId: ::std::os::raw::c_int,
5052 ) -> hipError_t;
5053}
5054extern "C" {
5055 #[doc = " @brief Returns the default memory pool of the specified device\n\n @param [out] mem_pool Default memory pool to return\n @param [in] device Device index for query the default memory pool\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipDeviceGetDefaultMemPool, hipMallocAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues."]
5056 pub fn hipDeviceGetDefaultMemPool(
5057 mem_pool: *mut hipMemPool_t,
5058 device: ::std::os::raw::c_int,
5059 ) -> hipError_t;
5060}
5061extern "C" {
5062 #[doc = " @brief Sets the current memory pool of a device\n\n The memory pool must be local to the specified device.\n @p hipMallocAsync 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 @p hipMallocFromPoolAsync for asynchronous memory allocations from a device\n different than the one the stream runs on.\n\n @param [in] device Device index for the update\n @param [in] mem_pool Memory pool for update as the current on the specified device\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDevice, #hipErrorNotSupported\n\n @see hipDeviceGetDefaultMemPool, hipMallocAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues."]
5063 pub fn hipDeviceSetMemPool(device: ::std::os::raw::c_int, mem_pool: hipMemPool_t)
5064 -> hipError_t;
5065}
5066extern "C" {
5067 #[doc = " @brief Gets the current memory pool for the specified device\n\n Returns the last pool provided to @p hipDeviceSetMemPool for this device\n or the device's default memory pool if @p hipDeviceSetMemPool 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 @p hipDeviceSetMemPool.\n\n @param [out] mem_pool Current memory pool on the specified device\n @param [in] device Device index to query the current memory pool\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipDeviceGetDefaultMemPool, hipMallocAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues."]
5068 pub fn hipDeviceGetMemPool(
5069 mem_pool: *mut hipMemPool_t,
5070 device: ::std::os::raw::c_int,
5071 ) -> hipError_t;
5072}
5073extern "C" {
5074 #[doc = " @brief Returns device properties.\n\n @param [out] prop written with device properties\n @param [in] deviceId which device to query for information\n\n @returns #hipSuccess, #hipErrorInvalidDevice\n @bug HIP-Clang always returns 0 for maxThreadsPerMultiProcessor\n @bug HIP-Clang always returns 0 for regsPerBlock\n @bug HIP-Clang always returns 0 for l2CacheSize\n\n Populates hipGetDeviceProperties with information for the specified device."]
5075 pub fn hipGetDevicePropertiesR0600(
5076 prop: *mut hipDeviceProp_tR0600,
5077 deviceId: ::std::os::raw::c_int,
5078 ) -> hipError_t;
5079}
5080extern "C" {
5081 #[doc = " @brief Gets the maximum width for 1D linear textures on the specified device\n\n This function queries the maximum width, in elements, of 1D linear textures that can be allocated\n on the specified device. The maximum width depends on the texture element size and the hardware\n limitations of the device.\n\n @param [out] max_width Maximum width, in elements, of 1D linear textures that the device can\n support\n @param [in] desc Requested channel format\n @param [in] device Device index to query for maximum 1D texture width\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDevice\n\n @see hipDeviceGetAttribute, hipMalloc, hipTexRefSetAddressMode"]
5082 pub fn hipDeviceGetTexture1DLinearMaxWidth(
5083 max_width: *mut usize,
5084 desc: *const hipChannelFormatDesc,
5085 device: ::std::os::raw::c_int,
5086 ) -> hipError_t;
5087}
5088extern "C" {
5089 #[doc = " @brief Set L1/Shared cache partition.\n\n @param [in] cacheConfig Cache configuration\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorNotSupported\n\n Note: AMD devices do not support reconfigurable cache. This API is not implemented\n on AMD platform. If the function is called, it will return hipErrorNotSupported.\n"]
5090 pub fn hipDeviceSetCacheConfig(cacheConfig: hipFuncCache_t) -> hipError_t;
5091}
5092extern "C" {
5093 #[doc = " @brief Get Cache configuration for a specific Device\n\n @param [out] cacheConfig Pointer of cache configuration\n\n @returns #hipSuccess, #hipErrorNotInitialized\n Note: AMD devices do not support reconfigurable cache. This hint is ignored\n on these architectures.\n"]
5094 pub fn hipDeviceGetCacheConfig(cacheConfig: *mut hipFuncCache_t) -> hipError_t;
5095}
5096extern "C" {
5097 #[doc = " @brief Gets resource limits of current device\n\n The function queries the size of limit value, as required by the input enum value hipLimit_t,\n which can be either #hipLimitStackSize, or #hipLimitMallocHeapSize. Any other input as\n default, the function will return #hipErrorUnsupportedLimit.\n\n @param [out] pValue Returns the size of the limit in bytes\n @param [in] limit The limit to query\n\n @returns #hipSuccess, #hipErrorUnsupportedLimit, #hipErrorInvalidValue\n"]
5098 pub fn hipDeviceGetLimit(pValue: *mut usize, limit: hipLimit_t) -> hipError_t;
5099}
5100extern "C" {
5101 #[doc = " @brief Sets resource limits of current device.\n\n As the input enum limit,\n #hipLimitStackSize sets the limit value of the stack size on the current GPU device, per thread.\n The limit size can get via hipDeviceGetLimit. The size is in units of 256 dwords, up to the limit\n (128K - 16).\n\n #hipLimitMallocHeapSize sets the limit value of the heap used by the malloc()/free()\n calls. For limit size, use the #hipDeviceGetLimit API.\n\n Any other input as default, the funtion will return hipErrorUnsupportedLimit.\n\n @param [in] limit Enum of hipLimit_t to set\n @param [in] value The size of limit value in bytes\n\n @returns #hipSuccess, #hipErrorUnsupportedLimit, #hipErrorInvalidValue\n"]
5102 pub fn hipDeviceSetLimit(limit: hipLimit_t, value: usize) -> hipError_t;
5103}
5104extern "C" {
5105 #[doc = " @brief Returns bank width of shared memory for current device\n\n @param [out] pConfig The pointer of the bank width for shared memory\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized\n\n Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n"]
5106 pub fn hipDeviceGetSharedMemConfig(pConfig: *mut hipSharedMemConfig) -> hipError_t;
5107}
5108extern "C" {
5109 #[doc = " @brief Gets the flags set for current device\n\n @param [out] flags Pointer of the flags\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue"]
5110 pub fn hipGetDeviceFlags(flags: *mut ::std::os::raw::c_uint) -> hipError_t;
5111}
5112extern "C" {
5113 #[doc = " @brief The bank width of shared memory on current device is set\n\n @param [in] config Configuration for the bank width of shared memory\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized\n\n Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n"]
5114 pub fn hipDeviceSetSharedMemConfig(config: hipSharedMemConfig) -> hipError_t;
5115}
5116extern "C" {
5117 #[doc = " @brief The current device behavior is changed according to the flags passed.\n\n @param [in] flags Flag to set on the current device\n\n The schedule flags impact how HIP waits for the completion of a command running on a device.\n\n #hipDeviceScheduleSpin : HIP runtime will actively spin in the thread which submitted\n the work until the command completes. This offers the lowest latency, but will consume a CPU\n core and may increase power.\n\n #hipDeviceScheduleYield : The HIP runtime will yield the CPU to system so that other\n tasks can use it. This may increase latency to detect the completion but will consume less\n power and is friendlier to other tasks in the system.\n\n #hipDeviceScheduleBlockingSync : On ROCm platform, this is a synonym for hipDeviceScheduleYield.\n\n #hipDeviceScheduleAuto : This is the default value if the input 'flags' is zero.\n Uses a heuristic to select between Spin and Yield modes. If the number of HIP contexts is\n greater than the number of logical processors in the system, uses Spin scheduling, otherwise\n uses Yield scheduling.\n\n #hipDeviceMapHost : Allows mapping host memory. On ROCm, this is always allowed and\n the flag is ignored.\n\n #hipDeviceLmemResizeToMax : This flag is silently ignored on ROCm.\n\n @returns #hipSuccess, #hipErrorNoDevice, #hipErrorInvalidDevice, #hipErrorSetOnActiveProcess\n\n"]
5118 pub fn hipSetDeviceFlags(flags: ::std::os::raw::c_uint) -> hipError_t;
5119}
5120extern "C" {
5121 #[doc = " @brief Device which matches hipDeviceProp_t is returned\n\n @param [out] device Pointer of the device\n @param [in] prop Pointer of the properties\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
5122 pub fn hipChooseDeviceR0600(
5123 device: *mut ::std::os::raw::c_int,
5124 prop: *const hipDeviceProp_tR0600,
5125 ) -> hipError_t;
5126}
5127extern "C" {
5128 #[doc = " @brief Returns the link type and hop count between two devices\n\n @param [in] device1 Ordinal for device1\n @param [in] device2 Ordinal for device2\n @param [out] linktype Returns the link type (See hsa_amd_link_info_type_t) between the two\n devices\n @param [out] hopcount Returns the hop count between the two devices\n\n Queries and returns the HSA link type and the hop count between the two specified devices.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
5129 pub fn hipExtGetLinkTypeAndHopCount(
5130 device1: ::std::os::raw::c_int,
5131 device2: ::std::os::raw::c_int,
5132 linktype: *mut u32,
5133 hopcount: *mut u32,
5134 ) -> hipError_t;
5135}
5136extern "C" {
5137 #[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 hipMalloc 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 hipFree and a subsequent call\n to hipMalloc returns memory with the same device address,\n hipIpcGetMemHandle will return a unique handle for the\n new memory.\n\n @param handle - Pointer to user allocated hipIpcMemHandle to return\n the handle in.\n @param devPtr - Base pointer to previously allocated device memory\n\n @returns #hipSuccess, #hipErrorInvalidHandle, #hipErrorOutOfMemory, #hipErrorMapFailed\n\n @note This IPC memory related feature API on Windows may behave differently from Linux.\n"]
5138 pub fn hipIpcGetMemHandle(
5139 handle: *mut hipIpcMemHandle_t,
5140 devPtr: *mut ::std::os::raw::c_void,
5141 ) -> hipError_t;
5142}
5143extern "C" {
5144 #[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 hipIpcGetMemHandle into\n the current device address space. For contexts on different devices\n hipIpcOpenMemHandle can attempt to enable peer access between the\n devices as if the user called hipDeviceEnablePeerAccess. This behavior is\n controlled by the hipIpcMemLazyEnablePeerAccess flag.\n hipDeviceCanAccessPeer can determine if a mapping is possible.\n\n Contexts that may open hipIpcMemHandles are restricted in the following way.\n hipIpcMemHandles from each device in a given process may only be opened\n by one context per device per other process.\n\n Memory returned from hipIpcOpenMemHandle must be freed with\n hipIpcCloseMemHandle.\n\n Calling hipFree on an exported memory region before calling\n hipIpcCloseMemHandle in the importing context will result in undefined\n behavior.\n\n @param devPtr - Returned device pointer\n @param handle - hipIpcMemHandle to open\n @param flags - Flags for this operation. Must be specified as hipIpcMemLazyEnablePeerAccess\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext,\n #hipErrorInvalidDevicePointer\n\n @note During multiple processes, using the same memory handle opened by the current context,\n there is no guarantee that the same device poiter will be returned in @p *devPtr.\n This is diffrent from CUDA.\n @note This IPC memory related feature API on Windows may behave differently from Linux.\n"]
5145 pub fn hipIpcOpenMemHandle(
5146 devPtr: *mut *mut ::std::os::raw::c_void,
5147 handle: hipIpcMemHandle_t,
5148 flags: ::std::os::raw::c_uint,
5149 ) -> hipError_t;
5150}
5151extern "C" {
5152 #[doc = " @brief Close memory mapped with hipIpcOpenMemHandle\n\n Unmaps memory returnd by hipIpcOpenMemHandle. 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 @param devPtr - Device pointer returned by hipIpcOpenMemHandle\n\n @returns #hipSuccess, #hipErrorMapFailed, #hipErrorInvalidHandle\n\n @note This IPC memory related feature API on Windows may behave differently from Linux.\n"]
5153 pub fn hipIpcCloseMemHandle(devPtr: *mut ::std::os::raw::c_void) -> hipError_t;
5154}
5155extern "C" {
5156 #[doc = " @brief Gets an opaque interprocess handle for an event.\n\n This opaque handle may be copied into other processes and opened with hipIpcOpenEventHandle.\n Then hipEventRecord, hipEventSynchronize, hipStreamWaitEvent and hipEventQuery may be used in\n either process. Operations on the imported event after the exported event has been freed with\n hipEventDestroy will result in undefined behavior.\n\n @param[out] handle Pointer to hipIpcEventHandle to return the opaque event handle\n @param[in] event Event allocated with hipEventInterprocess and hipEventDisableTiming flags\n\n @returns #hipSuccess, #hipErrorInvalidConfiguration, #hipErrorInvalidValue\n\n @note This IPC event related feature API is currently applicable on Linux.\n"]
5157 pub fn hipIpcGetEventHandle(handle: *mut hipIpcEventHandle_t, event: hipEvent_t) -> hipError_t;
5158}
5159extern "C" {
5160 #[doc = " @brief Opens an interprocess event handles.\n\n Opens an interprocess event handle exported from another process with hipIpcGetEventHandle. The\n returned hipEvent_t behaves like a locally created event with the hipEventDisableTiming flag\n specified. This event need be freed with hipEventDestroy. Operations on the imported event after\n the exported event has been freed with hipEventDestroy will result in undefined behavior. If the\n function is called within the same process where handle is returned by hipIpcGetEventHandle, it\n will return hipErrorInvalidContext.\n\n @param[out] event Pointer to hipEvent_t to return the event\n @param[in] handle The opaque interprocess handle to open\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext\n\n @note This IPC event related feature API is currently applicable on Linux.\n"]
5161 pub fn hipIpcOpenEventHandle(event: *mut hipEvent_t, handle: hipIpcEventHandle_t)
5162 -> hipError_t;
5163}
5164extern "C" {
5165 #[doc = " @}\n/\n/**\n\n @defgroup Execution Execution Control\n @{\n This section describes the execution control functions of HIP runtime API.\n\n/\n/**\n @brief Set attribute for a specific function\n\n @param [in] func Pointer of the function\n @param [in] attr Attribute to set\n @param [in] value Value to set\n\n @returns #hipSuccess, #hipErrorInvalidDeviceFunction, #hipErrorInvalidValue\n\n Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n"]
5166 pub fn hipFuncSetAttribute(
5167 func: *const ::std::os::raw::c_void,
5168 attr: hipFuncAttribute,
5169 value: ::std::os::raw::c_int,
5170 ) -> hipError_t;
5171}
5172extern "C" {
5173 #[doc = " @brief Set Cache configuration for a specific function\n\n @param [in] func Pointer of the function.\n @param [in] config Configuration to set.\n\n @returns #hipSuccess, #hipErrorNotInitialized\n Note: AMD devices and some Nvidia GPUS do not support reconfigurable cache. This hint is ignored\n on those architectures.\n"]
5174 pub fn hipFuncSetCacheConfig(
5175 func: *const ::std::os::raw::c_void,
5176 config: hipFuncCache_t,
5177 ) -> hipError_t;
5178}
5179extern "C" {
5180 #[doc = " @brief Set shared memory configuation for a specific function\n\n @param [in] func Pointer of the function\n @param [in] config Configuration\n\n @returns #hipSuccess, #hipErrorInvalidDeviceFunction, #hipErrorInvalidValue\n\n Note: AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n"]
5181 pub fn hipFuncSetSharedMemConfig(
5182 func: *const ::std::os::raw::c_void,
5183 config: hipSharedMemConfig,
5184 ) -> hipError_t;
5185}
5186extern "C" {
5187 #[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup Error Error Handling\n @{\n This section describes the error handling functions of HIP runtime API.\n/\n/**\n @brief Return last error returned by any HIP runtime API call and resets the stored error code to\n #hipSuccess\n\n @returns return code from last HIP called from the active host thread\n\n Returns the last error that has been returned by any of the runtime calls in the same host\n thread, and then resets the saved error to #hipSuccess.\n\n @see hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t"]
5188 pub fn hipGetLastError() -> hipError_t;
5189}
5190extern "C" {
5191 #[doc = " @brief Return last error returned by any HIP runtime API call and resets the stored error code to\n #hipSuccess\n\n @returns return code from last HIP called from the active host thread\n\n Returns the last error that has been returned by any of the runtime calls in the same host\n thread, and then resets the saved error to #hipSuccess.\n\n @see hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t"]
5192 pub fn hipExtGetLastError() -> hipError_t;
5193}
5194extern "C" {
5195 #[doc = " @brief Return last error returned by any HIP runtime API call.\n\n @returns #hipSuccess\n\n Returns the last error that has been returned by any of the runtime calls in the same host\n thread. Unlike hipGetLastError, this function does not reset the saved error code.\n\n @see hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t"]
5196 pub fn hipPeekAtLastError() -> hipError_t;
5197}
5198extern "C" {
5199 #[doc = " @brief Return hip error as text string form.\n\n @param hip_error Error code to convert to name.\n @returns const char pointer to the NULL-terminated error name\n\n @see hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t"]
5200 pub fn hipGetErrorName(hip_error: hipError_t) -> *const ::std::os::raw::c_char;
5201}
5202extern "C" {
5203 #[doc = " @brief Return handy text string message to explain the error which occurred\n\n @param hipError Error code to convert to string.\n @returns const char pointer to the NULL-terminated error string\n\n @see hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t"]
5204 pub fn hipGetErrorString(hipError: hipError_t) -> *const ::std::os::raw::c_char;
5205}
5206extern "C" {
5207 #[doc = " @brief Return hip error as text string form.\n\n @param [in] hipError Error code to convert to string.\n @param [out] errorString char pointer to the NULL-terminated error string\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t"]
5208 pub fn hipDrvGetErrorName(
5209 hipError: hipError_t,
5210 errorString: *mut *const ::std::os::raw::c_char,
5211 ) -> hipError_t;
5212}
5213extern "C" {
5214 #[doc = " @brief Return handy text string message to explain the error which occurred\n\n @param [in] hipError Error code to convert to string.\n @param [out] errorString char pointer to the NULL-terminated error string\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t"]
5215 pub fn hipDrvGetErrorString(
5216 hipError: hipError_t,
5217 errorString: *mut *const ::std::os::raw::c_char,
5218 ) -> hipError_t;
5219}
5220extern "C" {
5221 #[doc = " @brief Creates an asynchronous stream.\n\n @param[in, out] stream Valid pointer to hipStream_t. This function writes the memory with the\n newly created stream.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Creates a new asynchronous stream with its associated current device. The @p stream returns an\n opaque handle that can be used to reference the newly created stream in subsequent hipStream*\n commands. The stream is allocated on the heap and will remain allocated even if the handle goes\n out-of-scope. To release the memory used by the stream, the application must call\n hipStreamDestroy.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamSynchronize,\n hipStreamWaitEvent, hipStreamDestroy"]
5222 pub fn hipStreamCreate(stream: *mut hipStream_t) -> hipError_t;
5223}
5224extern "C" {
5225 #[doc = " @brief Creates an asynchronous stream with flag.\n\n @param[in, out] stream Pointer to new stream\n @param[in] flags Parameters to control stream creation\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Creates a new asynchronous stream with its associated current device. @p stream returns an\n opaque handle that can be used to reference the newly created stream in subsequent hipStream*\n commands. The stream is allocated on the heap and will remain allocated even if the handle\n goes out-of-scope. To release the memory used by the stream, application must call\n hipStreamDestroy.\n\n The @p flags parameter controls behavior of the stream. The valid values are #hipStreamDefault\n and #hipStreamNonBlocking.\n\n @see hipStreamCreate, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamWaitEvent,\n hipStreamDestroy.\n"]
5226 pub fn hipStreamCreateWithFlags(
5227 stream: *mut hipStream_t,
5228 flags: ::std::os::raw::c_uint,
5229 ) -> hipError_t;
5230}
5231extern "C" {
5232 #[doc = " @brief Creates an asynchronous stream with the specified priority.\n\n @param[in, out] stream Pointer to new stream\n @param[in] flags Parameters to control stream creation\n @param[in] priority Priority of the stream. Lower numbers represent higher priorities.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Creates a new asynchronous stream with the specified priority, with its associated current\n device.\n @p stream returns an opaque handle that can be used to reference the newly created stream in\n subsequent hipStream* commands. The stream is allocated on the heap and will remain allocated\n even if the handle goes out-of-scope. To release the memory used by the stream, application must\n call hipStreamDestroy.\n\n The @p flags parameter controls behavior of the stream. The valid values are #hipStreamDefault\n and #hipStreamNonBlocking.\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy\n"]
5233 pub fn hipStreamCreateWithPriority(
5234 stream: *mut hipStream_t,
5235 flags: ::std::os::raw::c_uint,
5236 priority: ::std::os::raw::c_int,
5237 ) -> hipError_t;
5238}
5239extern "C" {
5240 #[doc = " @brief Returns numerical values that correspond to the least and greatest stream priority.\n\n @param[in, out] leastPriority Pointer in which a value corresponding to least priority\n is returned.\n @param[in, out] greatestPriority Pointer in which a value corresponding to greatest priority\n is returned.\n @returns #hipSuccess\n\n Returns in *leastPriority and *greatestPriority the numerical values that correspond to the\n least and greatest stream priority respectively. Stream priorities follow a convention where\n lower numbers imply greater priorities. The range of meaningful stream priorities is given by\n [*leastPriority,*greatestPriority]. If the user attempts to create a stream with a priority\n value that is outside the meaningful range as specified by this API, the priority is\n automatically clamped to within the valid range.\n\n @warning This API is under development on AMD GPUs and simply returns #hipSuccess."]
5241 pub fn hipDeviceGetStreamPriorityRange(
5242 leastPriority: *mut ::std::os::raw::c_int,
5243 greatestPriority: *mut ::std::os::raw::c_int,
5244 ) -> hipError_t;
5245}
5246extern "C" {
5247 #[doc = " @brief Destroys the specified stream.\n\n @param[in] stream Stream identifier\n @returns #hipSuccess #hipErrorInvalidHandle\n\n Destroys the specified stream.\n\n If commands are still executing on the specified stream, some may complete execution before the\n queue is deleted.\n\n The queue may be destroyed while some commands are still inflight, or may wait for all commands\n queued to the stream before destroying it.\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamQuery,\n hipStreamWaitEvent, hipStreamSynchronize"]
5248 pub fn hipStreamDestroy(stream: hipStream_t) -> hipError_t;
5249}
5250extern "C" {
5251 #[doc = " @brief Returns #hipSuccess if all of the operations in the specified @p stream have completed, or\n #hipErrorNotReady if not.\n\n @param[in] stream Stream to query\n\n @returns #hipSuccess, #hipErrorNotReady, #hipErrorInvalidHandle\n\n This is thread-safe and returns a snapshot of the current state of the queue. However, if other\n host threads are sending work to the stream, the status may change immediately after the function\n is called. It is typically used for debug.\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamWaitEvent,\n hipStreamSynchronize, hipStreamDestroy"]
5252 pub fn hipStreamQuery(stream: hipStream_t) -> hipError_t;
5253}
5254extern "C" {
5255 #[doc = " @brief Waits for all commands in the stream to complete.\n\n @param[in] stream Stream identifier.\n\n @returns #hipSuccess, #hipErrorInvalidHandle\n\n This command is host-synchronous : the host will block until all operations on the specified\n stream with its associated device are completed. On multiple device systems, the @p stream is\n associated with its device, no need to call hipSetDevice before this API.\n\n This command follows standard null-stream semantics. Specifying the null stream will cause the\n command to wait for other streams on the same device to complete all pending operations.\n\n This command honors the #hipDeviceScheduleBlockingSync flag, which controls whether the wait is\n active or blocking.\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamWaitEvent,\n hipStreamDestroy\n"]
5256 pub fn hipStreamSynchronize(stream: hipStream_t) -> hipError_t;
5257}
5258extern "C" {
5259 #[doc = " @brief Makes the specified compute stream wait for the specified event\n\n @param[in] stream Stream to make wait\n @param[in] event Event to wait on\n @param[in] flags Parameters to control the operation\n\n @returns #hipSuccess, #hipErrorInvalidHandle, #hipErrorInvalidValue,\n #hipErrorStreamCaptureIsolation\n\n This function inserts a wait operation into the specified stream.\n All future work submitted to @p stream will wait until @p event reports completion before\n beginning execution.\n\n Flags include:\n hipEventWaitDefault: Default event creation flag.\n hipEventWaitExternal: Wait is captured in the graph as an external event node when\n performing stream capture\n\n This function only waits for commands in the current stream to complete. Notably, this function\n does not implicitly wait for commands in the default stream to complete, even if the specified\n stream is created with hipStreamNonBlocking = 0.\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority,\n hipStreamSynchronize, hipStreamDestroy"]
5260 pub fn hipStreamWaitEvent(
5261 stream: hipStream_t,
5262 event: hipEvent_t,
5263 flags: ::std::os::raw::c_uint,
5264 ) -> hipError_t;
5265}
5266extern "C" {
5267 #[doc = " @brief Returns flags associated with this stream.\n\n @param[in] stream Stream to be queried\n @param[in,out] flags Pointer to an unsigned integer in which the stream's flags are returned\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle.\n\n @see hipStreamCreateWithFlags"]
5268 pub fn hipStreamGetFlags(stream: hipStream_t, flags: *mut ::std::os::raw::c_uint)
5269 -> hipError_t;
5270}
5271extern "C" {
5272 #[doc = " @brief Queries the Id of a stream.\n\n @param[in] stream Stream to be queried\n @param[in,out] flags Pointer to an unsigned long long in which the stream's id is returned\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle.\n\n @see hipStreamCreateWithFlags, hipStreamGetFlags, hipStreamCreateWithPriority, hipStreamGetPriority"]
5273 pub fn hipStreamGetId(
5274 stream: hipStream_t,
5275 streamId: *mut ::std::os::raw::c_ulonglong,
5276 ) -> hipError_t;
5277}
5278extern "C" {
5279 #[doc = " @brief Queries the priority of a stream.\n\n @param[in] stream Stream to be queried\n @param[in,out] priority Pointer to an unsigned integer in which the stream's priority is\n returned\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle.\n\n @see hipStreamCreateWithPriority"]
5280 pub fn hipStreamGetPriority(
5281 stream: hipStream_t,
5282 priority: *mut ::std::os::raw::c_int,
5283 ) -> hipError_t;
5284}
5285extern "C" {
5286 #[doc = " @brief Gets the device associated with the stream.\n\n @param[in] stream Stream to be queried\n @param[out] device Device associated with the stream\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorContextIsDestroyed, #hipErrorInvalidHandle,\n #hipErrorNotInitialized, #hipErrorDeinitialized, #hipErrorInvalidContext\n\n @see hipStreamCreate, hipStreamDestroy, hipDeviceGetStreamPriorityRange"]
5287 pub fn hipStreamGetDevice(stream: hipStream_t, device: *mut hipDevice_t) -> hipError_t;
5288}
5289extern "C" {
5290 #[doc = " @brief Creates an asynchronous stream with the specified CU mask.\n\n @param[in, out] stream Pointer to new stream\n @param[in] cuMaskSize Size of CU mask bit array passed in.\n @param[in] cuMask Bit-vector representing the CU mask. Each active bit represents using one CU.\n The first 32 bits represent the first 32 CUs, and so on. If its size is greater than physical\n CU number (i.e., multiProcessorCount member of hipDeviceProp_t), the extra elements are ignored.\n It is user's responsibility to make sure the input is meaningful.\n @returns #hipSuccess, #hipErrorInvalidHandle, #hipErrorInvalidValue\n\n Creates a new asynchronous stream with the specified CU mask. @p stream returns an opaque\n handle that can be used to reference the newly created stream in subsequent hipStream* commands.\n The stream is allocated on the heap and will remain allocated even if the handle goes\n out-of-scope. To release the memory used by the stream, application must call hipStreamDestroy.\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"]
5291 pub fn hipExtStreamCreateWithCUMask(
5292 stream: *mut hipStream_t,
5293 cuMaskSize: u32,
5294 cuMask: *const u32,
5295 ) -> hipError_t;
5296}
5297extern "C" {
5298 #[doc = " @brief Gets CU mask associated with an asynchronous stream\n\n @param[in] stream Stream to be queried\n @param[in] cuMaskSize Number of the block of memories (uint32_t *) allocated by user\n @param[out] cuMask Pointer to a pre-allocated block of memories (uint32_t *) in which\n the stream's CU mask is returned. The CU mask is returned in a chunck of 32 bits where\n each active bit represents one active CU.\n @returns #hipSuccess, #hipErrorInvalidHandle, #hipErrorInvalidValue\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"]
5299 pub fn hipExtStreamGetCUMask(
5300 stream: hipStream_t,
5301 cuMaskSize: u32,
5302 cuMask: *mut u32,
5303 ) -> hipError_t;
5304}
5305#[doc = " Stream CallBack struct"]
5306pub type hipStreamCallback_t = ::std::option::Option<
5307 unsafe extern "C" fn(
5308 stream: hipStream_t,
5309 status: hipError_t,
5310 userData: *mut ::std::os::raw::c_void,
5311 ),
5312>;
5313extern "C" {
5314 #[doc = " @brief Adds a callback to be called on the host after all currently enqueued items in the stream\n have completed. For each hipStreamAddCallback call, a callback will be executed exactly once.\n The callback will block later work in the stream until it is finished.\n\n @param[in] stream - Stream to add callback to\n @param[in] callback - The function to call once preceding stream operations are complete\n @param[in] userData - User specified data to be passed to the callback function\n @param[in] flags - Reserved for future use, must be 0\n @returns #hipSuccess, #hipErrorInvalidHandle, #hipErrorNotSupported\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamQuery, hipStreamSynchronize,\n hipStreamWaitEvent, hipStreamDestroy, hipStreamCreateWithPriority\n"]
5315 pub fn hipStreamAddCallback(
5316 stream: hipStream_t,
5317 callback: hipStreamCallback_t,
5318 userData: *mut ::std::os::raw::c_void,
5319 flags: ::std::os::raw::c_uint,
5320 ) -> hipError_t;
5321}
5322extern "C" {
5323 #[doc = "@brief Sets stream attribute. Updated attribute is applied to work submitted to the stream.\n @param[in] stream - Stream to set attributes to\n @param[in] attr - Attribute ID for the attribute to set\n @param[in] value - Attribute value for the attribute to set\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidResourceHandle"]
5324 pub fn hipStreamSetAttribute(
5325 stream: hipStream_t,
5326 attr: hipLaunchAttributeID,
5327 value: *const hipLaunchAttributeValue,
5328 ) -> hipError_t;
5329}
5330extern "C" {
5331 #[doc = "@brief queries stream attribute.\n @param[in] stream - Stream to geet attributes from\n @param[in] attr - Attribute ID for the attribute to query\n @param[out] value - Attribute value output\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidResourceHandle"]
5332 pub fn hipStreamGetAttribute(
5333 stream: hipStream_t,
5334 attr: hipLaunchAttributeID,
5335 value_out: *mut hipLaunchAttributeValue,
5336 ) -> hipError_t;
5337}
5338extern "C" {
5339 #[doc = " @brief Enqueues a wait command to the stream.[BETA]\n\n @param [in] stream - Stream identifier\n @param [in] ptr - Pointer to memory object allocated using #hipMallocSignalMemory flag\n @param [in] value - Value to be used in compare operation\n @param [in] flags - Defines the compare operation, supported values are #hipStreamWaitValueGte\n #hipStreamWaitValueEq, #hipStreamWaitValueAnd and #hipStreamWaitValueNor\n @param [in] mask - Mask to be applied on value at memory before it is compared with value,\n default value is set to enable every bit\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Enqueues a wait command to the stream, all operations enqueued on this stream after this, will\n not execute until the defined wait condition is true.\n\n #hipStreamWaitValueGte: waits until *ptr&mask >= value\n\n #hipStreamWaitValueEq : waits until *ptr&mask == value\n\n #hipStreamWaitValueAnd: waits until ((*ptr&mask) & value) != 0\n\n #hipStreamWaitValueNor: waits until ~((*ptr&mask) | (value&mask)) != 0\n\n @note when using #hipStreamWaitValueNor, mask is applied on both 'value' and '*ptr'.\n\n @note Support for #hipStreamWaitValue32 can be queried using 'hipDeviceGetAttribute()' and\n 'hipDeviceAttributeCanUseStreamWaitValue' flag.\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @see hipExtMallocWithFlags, hipFree, hipStreamWaitValue64, hipStreamWriteValue64,\n hipStreamWriteValue32, hipDeviceGetAttribute"]
5340 pub fn hipStreamWaitValue32(
5341 stream: hipStream_t,
5342 ptr: *mut ::std::os::raw::c_void,
5343 value: u32,
5344 flags: ::std::os::raw::c_uint,
5345 mask: u32,
5346 ) -> hipError_t;
5347}
5348extern "C" {
5349 #[doc = " @brief Enqueues a wait command to the stream.[BETA]\n\n @param [in] stream - Stream identifier\n @param [in] ptr - Pointer to memory object allocated using 'hipMallocSignalMemory' flag\n @param [in] value - Value to be used in compare operation\n @param [in] flags - Defines the compare operation, supported values are #hipStreamWaitValueGte\n #hipStreamWaitValueEq, #hipStreamWaitValueAnd and #hipStreamWaitValueNor.\n @param [in] mask - Mask to be applied on value at memory before it is compared with value\n default value is set to enable every bit\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Enqueues a wait command to the stream, all operations enqueued on this stream after this, will\n not execute until the defined wait condition is true.\n\n #hipStreamWaitValueGte: waits until *ptr&mask >= value\n\n #hipStreamWaitValueEq : waits until *ptr&mask == value\n\n #hipStreamWaitValueAnd: waits until ((*ptr&mask) & value) != 0\n\n #hipStreamWaitValueNor: waits until ~((*ptr&mask) | (value&mask)) != 0\n\n @note when using #hipStreamWaitValueNor, mask is applied on both 'value' and '*ptr'.\n\n @note Support for hipStreamWaitValue64 can be queried using 'hipDeviceGetAttribute()' and\n 'hipDeviceAttributeCanUseStreamWaitValue' flag.\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @see hipExtMallocWithFlags, hipFree, hipStreamWaitValue32, hipStreamWriteValue64,\n hipStreamWriteValue32, hipDeviceGetAttribute"]
5350 pub fn hipStreamWaitValue64(
5351 stream: hipStream_t,
5352 ptr: *mut ::std::os::raw::c_void,
5353 value: u64,
5354 flags: ::std::os::raw::c_uint,
5355 mask: u64,
5356 ) -> hipError_t;
5357}
5358extern "C" {
5359 #[doc = " @brief Enqueues a write command to the stream.[BETA]\n\n @param [in] stream - Stream identifier\n @param [in] ptr - Pointer to a GPU accessible memory object\n @param [in] value - Value to be written\n @param [in] flags - reserved, ignored for now, will be used in future releases\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Enqueues a write command to the stream, write operation is performed after all earlier commands\n on this stream have completed the execution.\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @see hipExtMallocWithFlags, hipFree, hipStreamWriteValue32, hipStreamWaitValue32,\n hipStreamWaitValue64"]
5360 pub fn hipStreamWriteValue32(
5361 stream: hipStream_t,
5362 ptr: *mut ::std::os::raw::c_void,
5363 value: u32,
5364 flags: ::std::os::raw::c_uint,
5365 ) -> hipError_t;
5366}
5367extern "C" {
5368 #[doc = " @brief Enqueues a write command to the stream.[BETA]\n\n @param [in] stream - Stream identifier\n @param [in] ptr - Pointer to a GPU accessible memory object\n @param [in] value - Value to be written\n @param [in] flags - reserved, ignored for now, will be used in future releases\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Enqueues a write command to the stream, write operation is performed after all earlier commands\n on this stream have completed the execution.\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @see hipExtMallocWithFlags, hipFree, hipStreamWriteValue32, hipStreamWaitValue32,\n hipStreamWaitValue64"]
5369 pub fn hipStreamWriteValue64(
5370 stream: hipStream_t,
5371 ptr: *mut ::std::os::raw::c_void,
5372 value: u64,
5373 flags: ::std::os::raw::c_uint,
5374 ) -> hipError_t;
5375}
5376extern "C" {
5377 #[doc = " @brief Enqueues an array of stream memory operations in the stream.[BETA]\n\n @param [in] stream - Stream identifier\n @param [in] count - The number of operations in the array. Must be less than 256\n @param [in] paramArray - The types and parameters of the individual operations.\n @param [in] flags - Reserved for future expansion; must be 0.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Batch operations to synchronize the stream via memory operations.\n\n @warning This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @see hipStreamWriteValue32, hipStreamWaitValue32,\n hipStreamWaitValue64. hipStreamWriteValue64"]
5378 pub fn hipStreamBatchMemOp(
5379 stream: hipStream_t,
5380 count: ::std::os::raw::c_uint,
5381 paramArray: *mut hipStreamBatchMemOpParams,
5382 flags: ::std::os::raw::c_uint,
5383 ) -> hipError_t;
5384}
5385extern "C" {
5386 #[doc = " @brief Creates a batch memory operation node and adds it to a graph.[BETA]\n\n @param [in] phGraphNode - Returns the newly created node\n @param [in] hGraph - Graph to which to add the node\n @param [in] dependencies - Dependencies of the node\n @param [in] numDependencies - Number of dependencies\n @param [in] nodeParams - Parameters for the node\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @see hipStreamWriteValue32, hipStreamWaitValue32,\n hipStreamWaitValue64. hipStreamWriteValue64, hipStreamBatchMemOp"]
5387 pub fn hipGraphAddBatchMemOpNode(
5388 phGraphNode: *mut hipGraphNode_t,
5389 hGraph: hipGraph_t,
5390 dependencies: *const hipGraphNode_t,
5391 numDependencies: usize,
5392 nodeParams: *const hipBatchMemOpNodeParams,
5393 ) -> hipError_t;
5394}
5395extern "C" {
5396 #[doc = " @brief Returns a batch mem op node's parameters.[BETA]\n\n @param [in] hNode - Node to get the parameters for\n @param [in] nodeParams_out - Pointer to return the parameters\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Returns the parameters of batch mem op node hNode in nodeParams_out.\n The paramArray returned in nodeParams_out is owned by the node.\n This memory remains valid until the node is destroyed or its parameters are modified,\n and should not be modified directly.\n\n @warning This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @see hipStreamWriteValue32, hipStreamWaitValue32,\n hipStreamWaitValue64. hipStreamWriteValue64. hipGraphBatchMemOpNodeSetParams"]
5397 pub fn hipGraphBatchMemOpNodeGetParams(
5398 hNode: hipGraphNode_t,
5399 nodeParams_out: *mut hipBatchMemOpNodeParams,
5400 ) -> hipError_t;
5401}
5402extern "C" {
5403 #[doc = " @brief Sets the batch mem op node's parameters.[BETA]\n\n @param [in] hNode - Node to set the parameters for\n @param [in] nodeParams - Parameters to copy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Sets the parameters of batch mem op node hNode to nodeParams.\n\n @warning This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @see hipStreamWriteValue32, hipStreamWaitValue32,\n hipStreamWaitValue64. hipStreamWriteValue64, hipGraphBatchMemOpNodeGetParams"]
5404 pub fn hipGraphBatchMemOpNodeSetParams(
5405 hNode: hipGraphNode_t,
5406 nodeParams: *mut hipBatchMemOpNodeParams,
5407 ) -> hipError_t;
5408}
5409extern "C" {
5410 #[doc = " @brief Sets the parameters for a batch mem op node in the given graphExec.[BETA]\n\n @param [in] hGraphExec - The executable graph in which to set the specified node\n @param [in] hNode - Batch mem op node from the graph from which graphExec was instantiated\n @param [in] nodeParams - Updated Parameters to set\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Sets the parameters of a batch mem op node in an executable graph hGraphExec.\n The node is identified by the corresponding node hNode in the non-executable graph,\n from which the executable graph was instantiated.\n\n @warning This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n\n @see hipStreamWriteValue32, hipStreamWaitValue32,\n hipStreamWaitValue64. hipStreamWriteValue64, hipStreamBatchMemOp"]
5411 pub fn hipGraphExecBatchMemOpNodeSetParams(
5412 hGraphExec: hipGraphExec_t,
5413 hNode: hipGraphNode_t,
5414 nodeParams: *const hipBatchMemOpNodeParams,
5415 ) -> hipError_t;
5416}
5417extern "C" {
5418 #[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup Event Event Management\n @{\n This section describes the event management functions of HIP runtime API.\n/\n/**\n @brief Create an event with the specified flags\n\n @param[in,out] event Returns the newly created event.\n @param[in] flags Flags to control event behavior. Valid values are #hipEventDefault,\n#hipEventBlockingSync, #hipEventDisableTiming, #hipEventInterprocess\n #hipEventDefault : Default flag. The event will use active synchronization and will support\ntiming. Blocking synchronization provides lowest possible latency at the expense of dedicating a\nCPU to poll on the event.\n #hipEventBlockingSync : The event will use blocking synchronization : if hipEventSynchronize is\ncalled on this event, the thread will block until the event completes. This can increase latency\nfor the synchroniation but can result in lower power and more resources for other CPU threads.\n #hipEventDisableTiming : Disable recording of timing information. Events created with this flag\nwould not record profiling data and provide best performance if used for synchronization.\n #hipEventInterprocess : The event can be used as an interprocess event. hipEventDisableTiming\nflag also must be set when hipEventInterprocess flag is set.\n #hipEventDisableSystemFence : Disable acquire and release system scope fence. This may\nimprove performance but device memory may not be visible to the host and other devices\nif this flag is set.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue,\n#hipErrorLaunchFailure, #hipErrorOutOfMemory\n\n @see hipEventCreate, hipEventSynchronize, hipEventDestroy, hipEventElapsedTime"]
5419 pub fn hipEventCreateWithFlags(
5420 event: *mut hipEvent_t,
5421 flags: ::std::os::raw::c_uint,
5422 ) -> hipError_t;
5423}
5424extern "C" {
5425 #[doc = " Create an event\n\n @param[in,out] event Returns the newly created event.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue,\n #hipErrorLaunchFailure, #hipErrorOutOfMemory\n\n @see hipEventCreateWithFlags, hipEventRecord, hipEventQuery, hipEventSynchronize,\n hipEventDestroy, hipEventElapsedTime"]
5426 pub fn hipEventCreate(event: *mut hipEvent_t) -> hipError_t;
5427}
5428extern "C" {
5429 #[doc = " @brief Record an event in the specified stream.\n\n @param[in] event event to record.\n @param[in] stream stream in which to record event.\n @param[in] flags parameter for operations\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized,\n #hipErrorInvalidHandle, #hipErrorLaunchFailure\n\n hipEventQuery() or hipEventSynchronize() must be used to determine when the event\n transitions from \"recording\" (after hipEventRecord() is called) to \"recorded\"\n (when timestamps are set, if requested).\n\n Events which are recorded in a non-NULL stream will transition to\n from recording to \"recorded\" state when they reach the head of\n the specified stream, after all previous\n commands in that stream have completed executing.\n\n Flags include:\n hipEventRecordDefault: Default event creation flag.\n hipEventRecordExternal: Event is captured in the graph as an external event node when\n performing stream capture\n\n If hipEventRecord() has been previously called on this event, then this call will overwrite any\n existing state in event.\n\n If this function is called on an event that is currently being recorded, results are undefined\n - either outstanding recording may save state into the event, and the order is not guaranteed.\n\n @note: If this function is not called before use hipEventQuery() or hipEventSynchronize(),\n #hipSuccess is returned, meaning no pending event in the stream.\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventSynchronize,\n hipEventDestroy, hipEventElapsedTime\n"]
5430 pub fn hipEventRecordWithFlags(
5431 event: hipEvent_t,
5432 stream: hipStream_t,
5433 flags: ::std::os::raw::c_uint,
5434 ) -> hipError_t;
5435}
5436extern "C" {
5437 pub fn hipEventRecord(event: hipEvent_t, stream: hipStream_t) -> hipError_t;
5438}
5439extern "C" {
5440 #[doc = " @brief Destroy the specified event.\n\n @param[in] event Event to destroy.\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue,\n #hipErrorLaunchFailure\n\n Releases memory associated with the event. If the event is recording but has not completed\n recording when hipEventDestroy() is called, the function will return immediately and the\n completion_future resources will be released later, when the hipDevice is synchronized.\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventSynchronize, hipEventRecord,\n hipEventElapsedTime\n\n @returns #hipSuccess"]
5441 pub fn hipEventDestroy(event: hipEvent_t) -> hipError_t;
5442}
5443extern "C" {
5444 #[doc = " @brief Wait for an event to complete.\n\n This function will block until the event is ready, waiting for all previous work in the stream\n specified when event was recorded with hipEventRecord().\n\n If hipEventRecord() has not been called on @p event, this function returns #hipSuccess when no\n event is captured.\n\n\n @param[in] event Event on which to wait.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized,\n #hipErrorInvalidHandle, #hipErrorLaunchFailure\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventDestroy, hipEventRecord,\n hipEventElapsedTime"]
5445 pub fn hipEventSynchronize(event: hipEvent_t) -> hipError_t;
5446}
5447extern "C" {
5448 #[doc = " @brief Return the elapsed time between two events.\n\n @param[out] ms : Return time between start and stop in ms.\n @param[in] start : Start event.\n @param[in] stop : Stop event.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotReady, #hipErrorInvalidHandle,\n #hipErrorNotInitialized, #hipErrorLaunchFailure\n\n Computes the elapsed time between two events. Time is computed in ms, with\n a resolution of approximately 1 us.\n\n Events which are recorded in a NULL stream will block until all commands\n on all other streams complete execution, and then record the timestamp.\n\n Events which are recorded in a non-NULL stream will record their timestamp\n when they reach the head of the specified stream, after all previous\n commands in that stream have completed executing. Thus the time that\n the event recorded may be significantly after the host calls hipEventRecord().\n\n If hipEventRecord() has not been called on either event, then #hipErrorInvalidHandle is\n returned. If hipEventRecord() has been called on both events, but the timestamp has not yet been\n recorded on one or both events (that is, hipEventQuery() would return #hipErrorNotReady on at\n least one of the events), then #hipErrorNotReady is returned.\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventDestroy, hipEventRecord,\n hipEventSynchronize"]
5449 pub fn hipEventElapsedTime(ms: *mut f32, start: hipEvent_t, stop: hipEvent_t) -> hipError_t;
5450}
5451extern "C" {
5452 #[doc = " @brief Query event status\n\n @param[in] event Event to query.\n @returns #hipSuccess, #hipErrorNotReady, #hipErrorInvalidHandle, #hipErrorInvalidValue,\n #hipErrorNotInitialized, #hipErrorLaunchFailure\n\n Query the status of the specified event. This function will return #hipSuccess if all\n commands in the appropriate stream (specified to hipEventRecord()) have completed. If any\n execution has not completed, then #hipErrorNotReady is returned.\n\n @note This API returns #hipSuccess, if hipEventRecord() is not called before this API.\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventRecord, hipEventDestroy,\n hipEventSynchronize, hipEventElapsedTime"]
5453 pub fn hipEventQuery(event: hipEvent_t) -> hipError_t;
5454}
5455extern "C" {
5456 #[doc = " @brief Sets information on the specified pointer.[BETA]\n\n @param [in] value Sets pointer attribute value\n @param [in] attribute Attribute to set\n @param [in] ptr Pointer to set attributes for\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n"]
5457 pub fn hipPointerSetAttribute(
5458 value: *const ::std::os::raw::c_void,
5459 attribute: hipPointer_attribute,
5460 ptr: hipDeviceptr_t,
5461 ) -> hipError_t;
5462}
5463extern "C" {
5464 #[doc = " @brief Returns attributes for the specified pointer\n\n @param [out] attributes attributes for the specified pointer\n @param [in] ptr pointer to get attributes for\n\n The output parameter 'attributes' has a member named 'type' that describes what memory the\n pointer is associated with, such as device memory, host memory, managed memory, and others.\n Otherwise, the API cannot handle the pointer and returns #hipErrorInvalidValue.\n\n @note The unrecognized memory type is unsupported to keep the HIP functionality backward\n compatibility due to #hipMemoryType enum values.\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @note The current behavior of this HIP API corresponds to the CUDA API before version 11.0.\n\n @see hipPointerGetAttribute"]
5465 pub fn hipPointerGetAttributes(
5466 attributes: *mut hipPointerAttribute_t,
5467 ptr: *const ::std::os::raw::c_void,
5468 ) -> hipError_t;
5469}
5470extern "C" {
5471 #[doc = " @brief Returns information about the specified pointer.[BETA]\n\n @param [in, out] data Returned pointer attribute value\n @param [in] attribute Attribute to query for\n @param [in] ptr Pointer to get attributes for\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @see hipPointerGetAttributes"]
5472 pub fn hipPointerGetAttribute(
5473 data: *mut ::std::os::raw::c_void,
5474 attribute: hipPointer_attribute,
5475 ptr: hipDeviceptr_t,
5476 ) -> hipError_t;
5477}
5478extern "C" {
5479 #[doc = " @brief Returns information about the specified pointer.[BETA]\n\n @param [in] numAttributes number of attributes to query for\n @param [in] attributes attributes to query for\n @param [in, out] data a two-dimensional containing pointers to memory locations\n where the result of each attribute query will be written to\n @param [in] ptr pointer to get attributes for\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @see hipPointerGetAttribute"]
5480 pub fn hipDrvPointerGetAttributes(
5481 numAttributes: ::std::os::raw::c_uint,
5482 attributes: *mut hipPointer_attribute,
5483 data: *mut *mut ::std::os::raw::c_void,
5484 ptr: hipDeviceptr_t,
5485 ) -> hipError_t;
5486}
5487extern "C" {
5488 #[doc = "-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup External External Resource Interoperability\n @{\n @ingroup API\n\n This section describes the external resource interoperability functions of HIP runtime API.\n\n/\n/**\n @brief Imports an external semaphore.\n\n @param[out] extSem_out External semaphores to be waited on\n @param[in] semHandleDesc Semaphore import handle descriptor\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see\n\n @note This API is currently not supported on Linux.\n"]
5489 pub fn hipImportExternalSemaphore(
5490 extSem_out: *mut hipExternalSemaphore_t,
5491 semHandleDesc: *const hipExternalSemaphoreHandleDesc,
5492 ) -> hipError_t;
5493}
5494extern "C" {
5495 #[doc = " @brief Signals a set of external semaphore objects.\n\n @param[in] extSemArray External semaphores to be waited on\n @param[in] paramsArray Array of semaphore parameters\n @param[in] numExtSems Number of semaphores to wait on\n @param[in] stream Stream to enqueue the wait operations in\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see\n\n @note This API is currently not supported on Linux.\n"]
5496 pub fn hipSignalExternalSemaphoresAsync(
5497 extSemArray: *const hipExternalSemaphore_t,
5498 paramsArray: *const hipExternalSemaphoreSignalParams,
5499 numExtSems: ::std::os::raw::c_uint,
5500 stream: hipStream_t,
5501 ) -> hipError_t;
5502}
5503extern "C" {
5504 #[doc = " @brief Waits on a set of external semaphore objects\n\n @param[in] extSemArray External semaphores to be waited on\n @param[in] paramsArray Array of semaphore parameters\n @param[in] numExtSems Number of semaphores to wait on\n @param[in] stream Stream to enqueue the wait operations in\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see\n\n @note This API is currently not supported on Linux.\n"]
5505 pub fn hipWaitExternalSemaphoresAsync(
5506 extSemArray: *const hipExternalSemaphore_t,
5507 paramsArray: *const hipExternalSemaphoreWaitParams,
5508 numExtSems: ::std::os::raw::c_uint,
5509 stream: hipStream_t,
5510 ) -> hipError_t;
5511}
5512extern "C" {
5513 #[doc = " @brief Destroys an external semaphore object and releases any references to the underlying\n resource. Any outstanding signals or waits must have completed before the semaphore is destroyed.\n\n @param[in] extSem handle to an external memory object\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see\n\n @note This API is currently not supported on Linux.\n"]
5514 pub fn hipDestroyExternalSemaphore(extSem: hipExternalSemaphore_t) -> hipError_t;
5515}
5516extern "C" {
5517 #[doc = " @brief Imports an external memory object.\n\n @param[out] extMem_out Returned handle to an external memory object\n @param[in] memHandleDesc Memory import handle descriptor\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see\n"]
5518 pub fn hipImportExternalMemory(
5519 extMem_out: *mut hipExternalMemory_t,
5520 memHandleDesc: *const hipExternalMemoryHandleDesc,
5521 ) -> hipError_t;
5522}
5523extern "C" {
5524 #[doc = " @brief Maps a buffer onto an imported memory object.\n\n @param[out] devPtr Returned device pointer to buffer\n @param[in] extMem Handle to external memory object\n @param[in] bufferDesc Buffer descriptor\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"]
5525 pub fn hipExternalMemoryGetMappedBuffer(
5526 devPtr: *mut *mut ::std::os::raw::c_void,
5527 extMem: hipExternalMemory_t,
5528 bufferDesc: *const hipExternalMemoryBufferDesc,
5529 ) -> hipError_t;
5530}
5531extern "C" {
5532 #[doc = " @brief Destroys an external memory object.\n\n @param[in] extMem External memory object to be destroyed\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"]
5533 pub fn hipDestroyExternalMemory(extMem: hipExternalMemory_t) -> hipError_t;
5534}
5535extern "C" {
5536 #[doc = " @brief Maps a mipmapped array onto an external memory object.\n\n @param[out] mipmap mipmapped array to return\n @param[in] extMem external memory object handle\n @param[in] mipmapDesc external mipmapped array descriptor\n\n Returned mipmapped array must be freed using hipFreeMipmappedArray.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidResourceHandle\n\n @see hipImportExternalMemory, hipDestroyExternalMemory, hipExternalMemoryGetMappedBuffer,\n hipFreeMipmappedArray"]
5537 pub fn hipExternalMemoryGetMappedMipmappedArray(
5538 mipmap: *mut hipMipmappedArray_t,
5539 extMem: hipExternalMemory_t,
5540 mipmapDesc: *const hipExternalMemoryMipmappedArrayDesc,
5541 ) -> hipError_t;
5542}
5543extern "C" {
5544 #[doc = " @}\n/\n/**\n @brief Allocate memory on the default accelerator\n\n @param[out] ptr Pointer to the allocated memory\n @param[in] size Requested memory size\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @returns #hipSuccess, #hipErrorOutOfMemory, #hipErrorInvalidValue (bad context, null *ptr)\n\n @see hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D, hipMalloc3DArray,\n hipHostFree, hipHostMalloc"]
5545 pub fn hipMalloc(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
5546}
5547extern "C" {
5548 #[doc = " @brief Allocate memory on the default accelerator\n\n @param[out] ptr Pointer to the allocated memory\n @param[in] sizeBytes Requested memory size\n @param[in] flags Type of memory allocation\n\n If requested memory size is 0, no memory is allocated, *ptr returns nullptr, and #hipSuccess\n is returned.\n\n The memory allocation flag should be either #hipDeviceMallocDefault,\n #hipDeviceMallocFinegrained, #hipDeviceMallocUncached, or #hipMallocSignalMemory.\n If the flag is any other value, the API returns #hipErrorInvalidValue.\n\n @returns #hipSuccess, #hipErrorOutOfMemory, #hipErrorInvalidValue (bad context, null *ptr)\n\n @see hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D, hipMalloc3DArray,\n hipHostFree, hiHostMalloc"]
5549 pub fn hipExtMallocWithFlags(
5550 ptr: *mut *mut ::std::os::raw::c_void,
5551 sizeBytes: usize,
5552 flags: ::std::os::raw::c_uint,
5553 ) -> hipError_t;
5554}
5555extern "C" {
5556 #[doc = " @brief Allocate pinned host memory [Deprecated]\n\n @param[out] ptr Pointer to the allocated host pinned memory\n @param[in] size Requested memory size\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @returns #hipSuccess, #hipErrorOutOfMemory\n\n @warning This API is deprecated, use hipHostMalloc() instead"]
5557 pub fn hipMallocHost(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
5558}
5559extern "C" {
5560 #[doc = " @brief Allocate pinned host memory [Deprecated]\n\n @param[out] ptr Pointer to the allocated host pinned memory\n @param[in] size Requested memory size\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @returns #hipSuccess, #hipErrorOutOfMemory\n\n @warning This API is deprecated, use hipHostMalloc() instead"]
5561 pub fn hipMemAllocHost(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
5562}
5563extern "C" {
5564 #[doc = " @}\n/\n/**\n @brief Allocates device accessible page locked (pinned) host memory\n\n This API allocates pinned host memory which is mapped into the address space of all GPUs\n in the system, the memory can be accessed directly by the GPU device, and can be read or\n written with much higher bandwidth than pageable memory obtained with functions such as\n malloc().\n\n Using the pinned host memory, applications can implement faster data transfers for HostToDevice\n and DeviceToHost. The runtime tracks the hipHostMalloc allocations and can avoid some of the\n setup required for regular unpinned memory.\n\n When the memory accesses are infrequent, zero-copy memory can be a good choice, for coherent\n allocation. GPU can directly access the host memory over the CPU/GPU interconnect, without need\n to copy the data.\n\n Currently the allocation granularity is 4KB for the API.\n\n Developers need to choose proper allocation flag with consideration of synchronization.\n\n @param[out] ptr Pointer to the allocated host pinned memory\n @param[in] size Requested memory size in bytes\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n @param[in] flags Type of host memory allocation. See the description of flags in\n hipSetDeviceFlags.\n\n If no input for flags, it will be the default pinned memory allocation on the host.\n\n @returns #hipSuccess, #hipErrorOutOfMemory\n\n\n @see hipSetDeviceFlags, hiptHostFree"]
5565 pub fn hipHostMalloc(
5566 ptr: *mut *mut ::std::os::raw::c_void,
5567 size: usize,
5568 flags: ::std::os::raw::c_uint,
5569 ) -> hipError_t;
5570}
5571extern "C" {
5572 #[doc = "-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup MemoryM Managed Memory\n\n @ingroup Memory\n @{\n This section describes the managed memory management functions of HIP runtime API.\n\n @note The managed memory management APIs are implemented on Linux, under developement\n on Windows.\n\n/\n/**\n @brief Allocates memory that will be automatically managed by HIP.\n\n This API is used for managed memory, allows data be shared and accessible to both CPU and\n GPU using a single pointer.\n\n The API returns the allocation pointer, managed by HMM, can be used further to execute kernels\n on device and fetch data between the host and device as needed.\n\n If HMM is not supported, the function behaves the same as @p hipMallocHost .\n\n @note It is recommend to do the capability check before call this API.\n\n @param [out] dev_ptr - pointer to allocated device memory\n @param [in] size - requested allocation size in bytes, it should be granularity of 4KB\n @param [in] flags - must be either hipMemAttachGlobal or hipMemAttachHost\n (defaults to hipMemAttachGlobal)\n\n @returns #hipSuccess, #hipErrorMemoryAllocation, #hipErrorNotSupported, #hipErrorInvalidValue\n"]
5573 pub fn hipMallocManaged(
5574 dev_ptr: *mut *mut ::std::os::raw::c_void,
5575 size: usize,
5576 flags: ::std::os::raw::c_uint,
5577 ) -> hipError_t;
5578}
5579extern "C" {
5580 #[doc = " @brief Prefetches memory to the specified destination device using HIP.\n\n @param [in] dev_ptr pointer to be prefetched\n @param [in] count size in bytes for prefetching\n @param [in] device destination device to prefetch to\n @param [in] stream stream to enqueue prefetch operation\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5581 pub fn hipMemPrefetchAsync(
5582 dev_ptr: *const ::std::os::raw::c_void,
5583 count: usize,
5584 device: ::std::os::raw::c_int,
5585 stream: hipStream_t,
5586 ) -> hipError_t;
5587}
5588extern "C" {
5589 #[doc = " @brief Prefetches memory to the specified destination device using HIP.\n\n @param [in] dev_ptr pointer to be prefetched\n @param [in] count size in bytes for prefetching\n @param [in] location destination location to prefetch to\n @param [in] flags flags for future use, must be zero now.\n @param [in] stream stream to enqueue prefetch operation\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5590 pub fn hipMemPrefetchAsync_v2(
5591 dev_ptr: *const ::std::os::raw::c_void,
5592 count: usize,
5593 location: hipMemLocation,
5594 flags: ::std::os::raw::c_uint,
5595 stream: hipStream_t,
5596 ) -> hipError_t;
5597}
5598extern "C" {
5599 #[doc = " @brief Advise about the usage of a given memory range to HIP.\n\n @param [in] dev_ptr pointer to memory to set the advice for\n @param [in] count size in bytes of the memory range, it should be CPU page size alligned.\n @param [in] advice advice to be applied for the specified memory range\n @param [in] device device to apply the advice for\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n This HIP API advises about the usage to be applied on unified memory allocation in the\n range starting from the pointer address devPtr, with the size of count bytes.\n The memory range must refer to managed memory allocated via the API hipMallocManaged, and the\n range will be handled with proper round down and round up respectively in the driver to\n be aligned to CPU page size, the same way as corresponding CUDA API behaves in CUDA version 8.0\n and afterwards.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5600 pub fn hipMemAdvise(
5601 dev_ptr: *const ::std::os::raw::c_void,
5602 count: usize,
5603 advice: hipMemoryAdvise,
5604 device: ::std::os::raw::c_int,
5605 ) -> hipError_t;
5606}
5607extern "C" {
5608 #[doc = " @brief Advise about the usage of a given memory range to HIP.\n\n @param [in] dev_ptr pointer to memory to set the advice for\n @param [in] count size in bytes of the memory range, it should be CPU page size alligned.\n @param [in] advice advice to be applied for the specified memory range\n @param [in] location location to apply the advice for\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n This HIP API advises about the usage to be applied on unified memory allocation in the\n range starting from the pointer address devPtr, with the size of count bytes.\n The memory range must refer to managed memory allocated via the API hipMallocManaged, and the\n range will be handled with proper round down and round up respectively in the driver to\n be aligned to CPU page size, the same way as corresponding CUDA API behaves in CUDA version 8.0\n and afterwards.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5609 pub fn hipMemAdvise_v2(
5610 dev_ptr: *const ::std::os::raw::c_void,
5611 count: usize,
5612 advice: hipMemoryAdvise,
5613 location: hipMemLocation,
5614 ) -> hipError_t;
5615}
5616extern "C" {
5617 #[doc = " @brief Query an attribute of a given memory range in HIP.\n\n @param [in,out] data a pointer to a memory location where the result of each\n attribute query will be written to\n @param [in] data_size the size of data\n @param [in] attribute the attribute to query\n @param [in] dev_ptr start of the range to query\n @param [in] count size of the range to query\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5618 pub fn hipMemRangeGetAttribute(
5619 data: *mut ::std::os::raw::c_void,
5620 data_size: usize,
5621 attribute: hipMemRangeAttribute,
5622 dev_ptr: *const ::std::os::raw::c_void,
5623 count: usize,
5624 ) -> hipError_t;
5625}
5626extern "C" {
5627 #[doc = " @brief Query attributes of a given memory range in HIP.\n\n @param [in,out] data a two-dimensional array containing pointers to memory locations\n where the result of each attribute query will be written to\n @param [in] data_sizes an array, containing the sizes of each result\n @param [in] attributes the attribute to query\n @param [in] num_attributes an array of attributes to query (numAttributes and the number\n of attributes in this array should match)\n @param [in] dev_ptr start of the range to query\n @param [in] count size of the range to query\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5628 pub fn hipMemRangeGetAttributes(
5629 data: *mut *mut ::std::os::raw::c_void,
5630 data_sizes: *mut usize,
5631 attributes: *mut hipMemRangeAttribute,
5632 num_attributes: usize,
5633 dev_ptr: *const ::std::os::raw::c_void,
5634 count: usize,
5635 ) -> hipError_t;
5636}
5637extern "C" {
5638 #[doc = " @brief Attach memory to a stream asynchronously in HIP.\n\n @param [in] stream - stream in which to enqueue the attach operation\n @param [in] dev_ptr - pointer to memory (must be a pointer to managed memory or\n to a valid host-accessible region of system-allocated memory)\n @param [in] length - length of memory (defaults to zero)\n @param [in] flags - must be one of hipMemAttachGlobal, hipMemAttachHost or\n hipMemAttachSingle (defaults to hipMemAttachSingle)\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is under development. Currently it is a no-operation (NOP)\n function on AMD GPUs and returns #hipSuccess."]
5639 pub fn hipStreamAttachMemAsync(
5640 stream: hipStream_t,
5641 dev_ptr: *mut ::std::os::raw::c_void,
5642 length: usize,
5643 flags: ::std::os::raw::c_uint,
5644 ) -> hipError_t;
5645}
5646extern "C" {
5647 #[doc = " @brief Allocates memory with stream ordered semantics\n\n Inserts a memory allocation operation into @p stream.\n A pointer to the allocated memory is returned immediately in *dptr.\n The allocation must not be accessed until 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\n allocation. Stream query, stream synchronize, and HIP events can be used to guarantee that\n the allocation 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.\n In this case, the allocation is owned by the graph instead of the memory pool. The memory\n pool's properties are used to set the node's creation parameters.\n\n @param [out] dev_ptr Returned device pointer of memory allocation\n @param [in] size Number of bytes to allocate\n @param [in] stream The stream establishing the stream ordering contract and\n the memory pool to allocate from\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported, #hipErrorOutOfMemory\n\n @see hipMallocFromPoolAsync, hipFreeAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5648 pub fn hipMallocAsync(
5649 dev_ptr: *mut *mut ::std::os::raw::c_void,
5650 size: usize,
5651 stream: hipStream_t,
5652 ) -> hipError_t;
5653}
5654extern "C" {
5655 #[doc = " @brief Frees memory with stream ordered semantics\n\n Inserts a free operation into @p stream.\n The allocation must not be used 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 [in] dev_ptr Pointer to device memory to free\n @param [in] stream The stream, where the destruciton will occur according to the execution order\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5656 pub fn hipFreeAsync(dev_ptr: *mut ::std::os::raw::c_void, stream: hipStream_t) -> hipError_t;
5657}
5658extern "C" {
5659 #[doc = " @brief Releases freed memory back to the OS\n\n Releases memory back to the OS until the pool contains fewer than @p min_bytes_to_keep\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] mem_pool The memory pool to trim allocations\n @param[in] min_bytes_to_hold If the pool has less than min_bytes_to_hold reserved,\n then the TrimTo operation is a no-op. Otherwise the memory pool will contain\n at least min_bytes_to_hold bytes reserved after the operation.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5660 pub fn hipMemPoolTrimTo(mem_pool: hipMemPool_t, min_bytes_to_hold: usize) -> hipError_t;
5661}
5662extern "C" {
5663 #[doc = " @brief Sets attributes of a memory pool\n\n Supported attributes are:\n - @p hipMemPoolAttrReleaseThreshold: (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 - @p hipMemPoolReuseFollowEventDependencies: (value type = int)\n Allow @p hipMallocAsync 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 HIP events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)\n - @p hipMemPoolReuseAllowOpportunistic: (value type = int)\n Allow reuse of already completed frees when there is no\n dependency between the free and allocation. (default enabled)\n - @p hipMemPoolReuseAllowInternalDependencies: (value type = int)\n Allow @p hipMallocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by @p hipFreeAsync (default enabled).\n\n @param [in] mem_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 #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5664 pub fn hipMemPoolSetAttribute(
5665 mem_pool: hipMemPool_t,
5666 attr: hipMemPoolAttr,
5667 value: *mut ::std::os::raw::c_void,
5668 ) -> hipError_t;
5669}
5670extern "C" {
5671 #[doc = " @brief Gets attributes of a memory pool\n\n Supported attributes are:\n - @p hipMemPoolAttrReleaseThreshold: (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 - @p hipMemPoolReuseFollowEventDependencies: (value type = int)\n Allow @p hipMallocAsync 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 HIP events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)\n - @p hipMemPoolReuseAllowOpportunistic: (value type = int)\n Allow reuse of already completed frees when there is no\n dependency between the free and allocation. (default enabled)\n - @p hipMemPoolReuseAllowInternalDependencies: (value type = int)\n Allow @p hipMallocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by @p hipFreeAsync (default enabled).\n\n @param [in] mem_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 #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess,\n hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5672 pub fn hipMemPoolGetAttribute(
5673 mem_pool: hipMemPool_t,
5674 attr: hipMemPoolAttr,
5675 value: *mut ::std::os::raw::c_void,
5676 ) -> hipError_t;
5677}
5678extern "C" {
5679 #[doc = " @brief Controls visibility of the specified pool between devices\n\n @param [in] mem_pool Memory pool for acccess change\n @param [in] desc_list Array of access descriptors. Each descriptor instructs the access to\n enable for a single gpu\n @param [in] count Number of descriptors in the map array.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5680 pub fn hipMemPoolSetAccess(
5681 mem_pool: hipMemPool_t,
5682 desc_list: *const hipMemAccessDesc,
5683 count: usize,
5684 ) -> hipError_t;
5685}
5686extern "C" {
5687 #[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 Accessibility of the memory pool from the specified location/device\n @param [in] mem_pool Memory pool being queried\n @param [in] location Location/device for memory pool access\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5688 pub fn hipMemPoolGetAccess(
5689 flags: *mut hipMemAccessFlags,
5690 mem_pool: hipMemPool_t,
5691 location: *mut hipMemLocation,
5692 ) -> hipError_t;
5693}
5694extern "C" {
5695 #[doc = " @brief Creates a memory pool\n\n Creates a HIP memory pool and returns the handle in @p mem_pool. The @p pool_props determines\n the properties of the pool such as the backing device and IPC capabilities.\n\n By default, the memory pool will be accessible from the device it is allocated on.\n\n @param [out] mem_pool Contains createed memory pool\n @param [in] pool_props Memory pool properties\n\n @note Specifying hipMemHandleTypeNone creates a memory pool that will not support IPC.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolDestroy, hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute,\n hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5696 pub fn hipMemPoolCreate(
5697 mem_pool: *mut hipMemPool_t,
5698 pool_props: *const hipMemPoolProps,
5699 ) -> hipError_t;
5700}
5701extern "C" {
5702 #[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 @p hipMemPoolDestroy 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 @param [in] mem_pool Memory pool for destruction\n\n @note A device's default memory pool cannot be destroyed.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolCreate hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute,\n hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5703 pub fn hipMemPoolDestroy(mem_pool: hipMemPool_t) -> hipError_t;
5704}
5705extern "C" {
5706 #[doc = " @brief Allocates memory from a specified pool with stream ordered semantics.\n\n Inserts an allocation operation into @p stream.\n A pointer to the allocated memory is returned immediately in @p dev_ptr.\n The allocation must not be accessed until the allocation operation completes.\n The allocation comes from the specified memory pool.\n\n @note The specified memory pool may be from a device different than that of the specified @p\n stream.\n\n Basic stream ordering allows future work submitted into the same stream to use the allocation.\n Stream query, stream synchronize, and HIP 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\n case, the allocation is owned by the graph instead of the memory pool. The memory pool's\n properties are used to set the node's creation parameters.\n\n @param [out] dev_ptr Returned device pointer\n @param [in] size Number of bytes to allocate\n @param [in] mem_pool The pool to allocate from\n @param [in] stream The stream establishing the stream ordering semantic\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported, #hipErrorOutOfMemory\n\n @see hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolCreate\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess,\n hipMemPoolGetAccess,\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5707 pub fn hipMallocFromPoolAsync(
5708 dev_ptr: *mut *mut ::std::os::raw::c_void,
5709 size: usize,
5710 mem_pool: hipMemPool_t,
5711 stream: hipStream_t,
5712 ) -> hipError_t;
5713}
5714extern "C" {
5715 #[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 @p\n hipMemPoolImportFromShareableHandle. Individual pointers can then be shared with the @p\n hipMemPoolExportPointer and @p hipMemPoolImportPointer APIs. The implementation of what the\n shareable handle is and how it can be transferred is defined by the requested handle type.\n\n @note To create an IPC capable mempool, create a mempool with a @p hipMemAllocationHandleType\n other than @p hipMemHandleTypeNone.\n\n @param [out] shared_handle Pointer to the location in which to store the requested handle\n @param [in] mem_pool Pool to export\n @param [in] handle_type The type of handle to create\n @param [in] flags Must be 0\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorOutOfMemory\n\n @see hipMemPoolImportFromShareableHandle\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5716 pub fn hipMemPoolExportToShareableHandle(
5717 shared_handle: *mut ::std::os::raw::c_void,
5718 mem_pool: hipMemPool_t,
5719 handle_type: hipMemAllocationHandleType,
5720 flags: ::std::os::raw::c_uint,
5721 ) -> hipError_t;
5722}
5723extern "C" {
5724 #[doc = " @brief Imports a memory pool from a shared handle.\n\n Specific allocations can be imported from the imported pool with @p hipMemPoolImportPointer.\n\n @note Imported memory pools do not support creating new allocations.\n As such imported memory pools may not be used in @p hipDeviceSetMemPool\n or @p hipMallocFromPoolAsync calls.\n\n @param [out] mem_pool Returned memory pool\n @param [in] shared_handle OS handle of the pool to open\n @param [in] handle_type The type of handle being imported\n @param [in] flags Must be 0\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorOutOfMemory\n\n @see hipMemPoolExportToShareableHandle\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5725 pub fn hipMemPoolImportFromShareableHandle(
5726 mem_pool: *mut hipMemPool_t,
5727 shared_handle: *mut ::std::os::raw::c_void,
5728 handle_type: hipMemAllocationHandleType,
5729 flags: ::std::os::raw::c_uint,
5730 ) -> hipError_t;
5731}
5732extern "C" {
5733 #[doc = " @brief Export data to share a memory pool allocation between processes.\n\n Constructs @p export_data for sharing a specific allocation from an already shared memory pool.\n The recipient process can import the allocation with the @p hipMemPoolImportPointer api.\n The data is not a handle and may be shared through any IPC mechanism.\n\n @param[out] export_data Returned export data\n @param[in] dev_ptr Pointer to memory being exported\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorOutOfMemory\n\n @see hipMemPoolImportPointer\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5734 pub fn hipMemPoolExportPointer(
5735 export_data: *mut hipMemPoolPtrExportData,
5736 dev_ptr: *mut ::std::os::raw::c_void,
5737 ) -> hipError_t;
5738}
5739extern "C" {
5740 #[doc = " @brief Import a memory pool allocation from another process.\n\n Returns in @p dev_ptr 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 @p hipFree\n or @p hipFreeAsync. If @p hipFreeAsync is used, the free must be completed\n on the importing process before the free operation on the exporting process.\n\n @note The @p hipFreeAsync api may be used in the exporting process before\n the @p hipFreeAsync operation completes in its stream as long as the\n @p hipFreeAsync in the exporting process specifies a stream with\n a stream dependency on the importing process's @p hipFreeAsync.\n\n @param [out] dev_ptr Pointer to imported memory\n @param [in] mem_pool Memory pool from which to import a pointer\n @param [in] export_data Data specifying the memory to import\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized, #hipErrorOutOfMemory\n\n @see hipMemPoolExportPointer\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5741 pub fn hipMemPoolImportPointer(
5742 dev_ptr: *mut *mut ::std::os::raw::c_void,
5743 mem_pool: hipMemPool_t,
5744 export_data: *mut hipMemPoolPtrExportData,
5745 ) -> hipError_t;
5746}
5747extern "C" {
5748 #[doc = " @brief Allocate device accessible page locked host memory\n\n @param[out] ptr Pointer to the allocated host pinned memory\n @param[in] size Requested memory size in bytes\n @param[in] flags Type of host memory allocation see below\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n Flags:\n - #hipHostAllocDefault Default pinned memory allocation on the host.\n - #hipHostAllocPortable Memory is considered allocated by all contexts.\n - #hipHostAllocMapped Map the allocation into the address space for the current device.\n - #hipHostAllocWriteCombined Allocates the memory as write-combined.\n - #hipHostAllocUncached Allocate the host memory on extended fine grained access system\n memory pool\n\n @return #hipSuccess, #hipErrorOutOfMemory, #hipErrorInvalidValue"]
5749 pub fn hipHostAlloc(
5750 ptr: *mut *mut ::std::os::raw::c_void,
5751 size: usize,
5752 flags: ::std::os::raw::c_uint,
5753 ) -> hipError_t;
5754}
5755extern "C" {
5756 #[doc = " @brief Get Device pointer from Host Pointer allocated through hipHostMalloc\n\n @param[out] devPtr Device Pointer mapped to passed host pointer\n @param[in] hstPtr Host Pointer allocated through hipHostMalloc\n @param[in] flags Flags to be passed for extension\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorOutOfMemory\n\n @see hipSetDeviceFlags, hipHostMalloc"]
5757 pub fn hipHostGetDevicePointer(
5758 devPtr: *mut *mut ::std::os::raw::c_void,
5759 hstPtr: *mut ::std::os::raw::c_void,
5760 flags: ::std::os::raw::c_uint,
5761 ) -> hipError_t;
5762}
5763extern "C" {
5764 #[doc = " @brief Return flags associated with host pointer\n\n @param[out] flagsPtr Memory location to store flags\n @param[in] hostPtr Host Pointer allocated through hipHostMalloc\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipHostMalloc"]
5765 pub fn hipHostGetFlags(
5766 flagsPtr: *mut ::std::os::raw::c_uint,
5767 hostPtr: *mut ::std::os::raw::c_void,
5768 ) -> hipError_t;
5769}
5770extern "C" {
5771 #[doc = " @brief Register host memory so it can be accessed from the current device.\n\n @param[out] hostPtr Pointer to host memory to be registered.\n @param[in] sizeBytes Size of the host memory\n @param[in] flags See below.\n\n Flags:\n - #hipHostRegisterDefault Memory is Mapped and Portable\n - #hipHostRegisterPortable Memory is considered registered by all contexts. HIP only supports\n one context so this is always assumed true.\n - #hipHostRegisterMapped Map the allocation into the address space for the current device.\n The device pointer can be obtained with #hipHostGetDevicePointer.\n - #hipExtHostRegisterUncached Map the host memory onto extended fine grained access system\n memory pool.\n\n After registering the memory, use #hipHostGetDevicePointer to obtain the mapped device pointer.\n On many systems, the mapped device pointer will have a different value than the mapped host\n pointer. Applications must use the device pointer in device code, and the host pointer in host\n code.\n\n On some systems, registered memory is pinned. On some systems, registered memory may not be\n actually be pinned but uses OS or hardware facilities to all GPU access to the host memory.\n\n Developers are strongly encouraged to register memory blocks which are aligned to the host\n cache-line size. (typically 64-bytes but can be obtains from the CPUID instruction).\n\n If registering non-aligned pointers, the application must take care when register pointers from\n the same cache line on different devices. HIP's coarse-grained synchronization model does not\n guarantee correct results if different devices write to different parts of the same cache block -\n typically one of the writes will \"win\" and overwrite data from the other registered memory\n region.\n\n @returns #hipSuccess, #hipErrorOutOfMemory\n\n @see hipHostUnregister, hipHostGetFlags, hipHostGetDevicePointer"]
5772 pub fn hipHostRegister(
5773 hostPtr: *mut ::std::os::raw::c_void,
5774 sizeBytes: usize,
5775 flags: ::std::os::raw::c_uint,
5776 ) -> hipError_t;
5777}
5778extern "C" {
5779 #[doc = " @brief Un-register host pointer\n\n @param[in] hostPtr Host pointer previously registered with #hipHostRegister\n @returns Error code\n\n @see hipHostRegister"]
5780 pub fn hipHostUnregister(hostPtr: *mut ::std::os::raw::c_void) -> hipError_t;
5781}
5782extern "C" {
5783 #[doc = " Allocates at least width (in bytes) * height bytes of linear memory\n Padding may occur to ensure alighnment requirements are met for the given row\n The change in width size due to padding will be returned in *pitch.\n Currently the alignment is set to 128 bytes\n\n @param[out] ptr Pointer to the allocated device memory\n @param[out] pitch Pitch for allocation (in bytes)\n @param[in] width Requested pitched allocation width (in bytes)\n @param[in] height Requested pitched allocation height\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @returns Error code\n\n @see hipMalloc, hipFree, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc"]
5784 pub fn hipMallocPitch(
5785 ptr: *mut *mut ::std::os::raw::c_void,
5786 pitch: *mut usize,
5787 width: usize,
5788 height: usize,
5789 ) -> hipError_t;
5790}
5791extern "C" {
5792 #[doc = " Allocates at least width (in bytes) * height bytes of linear memory\n Padding may occur to ensure alighnment requirements are met for the given row\n The change in width size due to padding will be returned in *pitch.\n Currently the alignment is set to 128 bytes\n\n @param[out] dptr Pointer to the allocated device memory\n @param[out] pitch Pitch for allocation (in bytes)\n @param[in] widthInBytes Requested pitched allocation width (in bytes)\n @param[in] height Requested pitched allocation height\n @param[in] elementSizeBytes The size of element bytes, should be 4, 8 or 16\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n The intended usage of pitch is as a separate parameter of the allocation, used to compute\n addresses within the 2D array. Given the row and column of an array element of type T, the\n address is computed as: T* pElement = (T*)((char*)BaseAddress + Row * Pitch) + Column;\n\n @returns Error code\n\n @see hipMalloc, hipFree, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc"]
5793 pub fn hipMemAllocPitch(
5794 dptr: *mut hipDeviceptr_t,
5795 pitch: *mut usize,
5796 widthInBytes: usize,
5797 height: usize,
5798 elementSizeBytes: ::std::os::raw::c_uint,
5799 ) -> hipError_t;
5800}
5801extern "C" {
5802 #[doc = " @brief Free memory allocated by the HIP-Clang hip memory allocation API.\n This API performs an implicit hipDeviceSynchronize() call.\n If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.\n\n @param[in] ptr Pointer to memory to be freed\n @returns #hipSuccess\n @returns #hipErrorInvalidDevicePointer (if pointer is invalid, including host pointers allocated\n with hipHostMalloc)\n\n @see hipMalloc, hipMallocPitch, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc"]
5803 pub fn hipFree(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
5804}
5805extern "C" {
5806 #[doc = " @brief Frees page-locked memory\n This API performs an implicit hipDeviceSynchronize() call.\n If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.\n\n @param[in] ptr Pointer to memory to be freed\n @returns #hipSuccess,\n #hipErrorInvalidValue (if pointer is invalid, including device pointers allocated\n with hipMalloc)\n"]
5807 pub fn hipFreeHost(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
5808}
5809extern "C" {
5810 #[doc = " @brief Free memory allocated by the HIP-Clang hip host memory allocation API\n This API performs an implicit hipDeviceSynchronize() call.\n If pointer is NULL, the hip runtime is initialized and hipSuccess is returned.\n\n @ingroup MemoryD\n\n @param[in] ptr Pointer to memory to be freed\n @returns #hipSuccess,\n #hipErrorInvalidValue (if pointer is invalid, including device pointers allocated with\n hipMalloc)\n\n @see hipMalloc, hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc\n"]
5811 pub fn hipHostFree(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
5812}
5813extern "C" {
5814 #[doc = " @brief Copy data from src to dst.\n\n It supports memory from host to device,\n device to host, device to device and host to host\n The src and dst must not overlap.\n\n For hipMemcpy, the copy is always performed by the current device (set by hipSetDevice).\n For multi-gpu or peer-to-peer configurations, it is recommended to set the current device to the\n device where the src data is physically located. For optimal peer-to-peer copies, the copy\n device must be able to access the src and dst pointers (by calling hipDeviceEnablePeerAccess with\n copy agent as the current device and src/dst as the peerDevice argument. if this is not done,\n the hipMemcpy will still work, but will perform the copy using a staging buffer on the host.\n Calling hipMemcpy with dst and src pointers that do not match the hipMemcpyKind results in\n undefined behavior.\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] kind Kind of transfer\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5815 pub fn hipMemcpy(
5816 dst: *mut ::std::os::raw::c_void,
5817 src: *const ::std::os::raw::c_void,
5818 sizeBytes: usize,
5819 kind: hipMemcpyKind,
5820 ) -> hipError_t;
5821}
5822extern "C" {
5823 #[doc = " @brief Memory copy on the stream.\n It allows single or multiple devices to do memory copy on single or multiple streams.\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] kind Kind of transfer\n @param[in] stream Valid stream\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorContextIsDestroyed\n\n @see hipMemcpy, hipStreamCreate, hipStreamSynchronize, hipStreamDestroy, hipSetDevice,\n hipLaunchKernelGGL\n"]
5824 pub fn hipMemcpyWithStream(
5825 dst: *mut ::std::os::raw::c_void,
5826 src: *const ::std::os::raw::c_void,
5827 sizeBytes: usize,
5828 kind: hipMemcpyKind,
5829 stream: hipStream_t,
5830 ) -> hipError_t;
5831}
5832extern "C" {
5833 #[doc = " @brief Copy data from Host to Device\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5834 pub fn hipMemcpyHtoD(
5835 dst: hipDeviceptr_t,
5836 src: *const ::std::os::raw::c_void,
5837 sizeBytes: usize,
5838 ) -> hipError_t;
5839}
5840extern "C" {
5841 #[doc = " @brief Copy data from Device to Host\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5842 pub fn hipMemcpyDtoH(
5843 dst: *mut ::std::os::raw::c_void,
5844 src: hipDeviceptr_t,
5845 sizeBytes: usize,
5846 ) -> hipError_t;
5847}
5848extern "C" {
5849 #[doc = " @brief Copy data from Device to Device\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5850 pub fn hipMemcpyDtoD(dst: hipDeviceptr_t, src: hipDeviceptr_t, sizeBytes: usize) -> hipError_t;
5851}
5852extern "C" {
5853 #[doc = " @brief Copies from one 1D array to device memory.\n\n @param[out] dstDevice Destination device pointer\n @param[in] srcArray Source array\n @param[in] srcOffset Offset in bytes of source array\n @param[in] ByteCount Size of memory copy in bytes\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5854 pub fn hipMemcpyAtoD(
5855 dstDevice: hipDeviceptr_t,
5856 srcArray: hipArray_t,
5857 srcOffset: usize,
5858 ByteCount: usize,
5859 ) -> hipError_t;
5860}
5861extern "C" {
5862 #[doc = " @brief Copies from device memory to a 1D array.\n\n @param[out] dstArray Destination array\n @param[in] dstOffset Offset in bytes of destination array\n @param[in] srcDevice Source device pointer\n @param[in] ByteCount Size of memory copy in bytes\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5863 pub fn hipMemcpyDtoA(
5864 dstArray: hipArray_t,
5865 dstOffset: usize,
5866 srcDevice: hipDeviceptr_t,
5867 ByteCount: usize,
5868 ) -> hipError_t;
5869}
5870extern "C" {
5871 #[doc = " @brief Copies from one 1D array to another.\n\n @param[out] dstArray Destination array\n @param[in] dstOffset Offset in bytes of destination array\n @param[in] srcArray Source array\n @param[in] srcOffset Offset in bytes of source array\n @param[in] ByteCount Size of memory copy in bytes\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5872 pub fn hipMemcpyAtoA(
5873 dstArray: hipArray_t,
5874 dstOffset: usize,
5875 srcArray: hipArray_t,
5876 srcOffset: usize,
5877 ByteCount: usize,
5878 ) -> hipError_t;
5879}
5880extern "C" {
5881 #[doc = " @brief Copy data from Host to Device asynchronously\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] stream Stream identifier\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5882 pub fn hipMemcpyHtoDAsync(
5883 dst: hipDeviceptr_t,
5884 src: *const ::std::os::raw::c_void,
5885 sizeBytes: usize,
5886 stream: hipStream_t,
5887 ) -> hipError_t;
5888}
5889extern "C" {
5890 #[doc = " @brief Copy data from Device to Host asynchronously\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] stream Stream identifier\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5891 pub fn hipMemcpyDtoHAsync(
5892 dst: *mut ::std::os::raw::c_void,
5893 src: hipDeviceptr_t,
5894 sizeBytes: usize,
5895 stream: hipStream_t,
5896 ) -> hipError_t;
5897}
5898extern "C" {
5899 #[doc = " @brief Copy data from Device to Device asynchronously\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] stream Stream identifier\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5900 pub fn hipMemcpyDtoDAsync(
5901 dst: hipDeviceptr_t,
5902 src: hipDeviceptr_t,
5903 sizeBytes: usize,
5904 stream: hipStream_t,
5905 ) -> hipError_t;
5906}
5907extern "C" {
5908 #[doc = " @brief Copies from one 1D array to host memory.\n\n @param[out] dstHost Destination pointer\n @param[in] srcArray Source array\n @param[in] srcOffset Offset in bytes of source array\n @param[in] ByteCount Size of memory copy in bytes\n @param[in] stream Stream identifier\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5909 pub fn hipMemcpyAtoHAsync(
5910 dstHost: *mut ::std::os::raw::c_void,
5911 srcArray: hipArray_t,
5912 srcOffset: usize,
5913 ByteCount: usize,
5914 stream: hipStream_t,
5915 ) -> hipError_t;
5916}
5917extern "C" {
5918 #[doc = " @brief Copies from host memory to a 1D array.\n\n @param[out] dstArray Destination array\n @param[in] dstOffset Offset in bytes of destination array\n @param[in] srcHost Source host pointer\n @param[in] ByteCount Size of memory copy in bytes\n @param[in] stream Stream identifier\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
5919 pub fn hipMemcpyHtoAAsync(
5920 dstArray: hipArray_t,
5921 dstOffset: usize,
5922 srcHost: *const ::std::os::raw::c_void,
5923 ByteCount: usize,
5924 stream: hipStream_t,
5925 ) -> hipError_t;
5926}
5927extern "C" {
5928 #[doc = " @brief Returns a global pointer from a module.\n @ingroup Module\n\n Returns in *dptr and *bytes the pointer and size of the global of name name located in module\n hmod. If no variable of that name exists, it returns hipErrorNotFound. Both parameters dptr and\n bytes are optional. If one of them is NULL, it is ignored and hipSuccess is returned.\n\n @param[out] dptr Returns global device pointer\n @param[out] bytes Returns global size in bytes\n @param[in] hmod Module to retrieve global from\n @param[in] name Name of global to retrieve\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotFound, #hipErrorInvalidContext\n"]
5929 pub fn hipModuleGetGlobal(
5930 dptr: *mut hipDeviceptr_t,
5931 bytes: *mut usize,
5932 hmod: hipModule_t,
5933 name: *const ::std::os::raw::c_char,
5934 ) -> hipError_t;
5935}
5936extern "C" {
5937 #[doc = " @brief Gets device pointer associated with symbol on the device.\n\n @param[out] devPtr pointer to the device associated the symbole\n @param[in] symbol pointer to the symbole of the device\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
5938 pub fn hipGetSymbolAddress(
5939 devPtr: *mut *mut ::std::os::raw::c_void,
5940 symbol: *const ::std::os::raw::c_void,
5941 ) -> hipError_t;
5942}
5943extern "C" {
5944 #[doc = " @brief Gets the size of the given symbol on the device.\n\n @param[in] symbol pointer to the device symbole\n @param[out] size pointer to the size\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
5945 pub fn hipGetSymbolSize(size: *mut usize, symbol: *const ::std::os::raw::c_void) -> hipError_t;
5946}
5947extern "C" {
5948 #[doc = " @brief Gets the pointer of requested HIP driver function.\n\n @param[in] symbol The Symbol name of the driver function to request.\n @param[out] pfn Output pointer to the requested driver function.\n @param[in] hipVersion The HIP version for the requested driver function symbol.\n HIP version is defined as 100*version_major + version_minor. For example, in HIP 6.1, the\n hipversion is 601, for the symbol function \"hipGetDeviceProperties\", the specified hipVersion 601\n is greater or equal to the version 600, the symbol function will be handle properly as backend\n compatible function.\n\n @param[in] flags Currently only default flag is suppported.\n @param[out] symbolStatus Optional enumeration for returned status of searching for symbol driver\n function based on the input hipVersion.\n\n Returns hipSuccess if the returned pfn is addressed to the pointer of found driver function.\n\n @returns #hipSuccess, #hipErrorInvalidValue."]
5949 pub fn hipGetProcAddress(
5950 symbol: *const ::std::os::raw::c_char,
5951 pfn: *mut *mut ::std::os::raw::c_void,
5952 hipVersion: ::std::os::raw::c_int,
5953 flags: u64,
5954 symbolStatus: *mut hipDriverProcAddressQueryResult,
5955 ) -> hipError_t;
5956}
5957extern "C" {
5958 #[doc = " @brief Copies data to the given symbol on the device.\n Symbol HIP APIs allow a kernel to define a device-side data symbol which can be accessed on\n the host side. The symbol can be in __constant or device space.\n Note that the symbol name needs to be encased in the HIP_SYMBOL macro.\n This also applies to hipMemcpyFromSymbol, hipGetSymbolAddress, and hipGetSymbolSize.\n For detailed usage, see the\n <a\n href=\"https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/hip_porting_guide.html#memcpytosymbol\">memcpyToSymbol\n example</a> in the HIP Porting Guide.\n\n\n @param[out] symbol pointer to the device symbole\n @param[in] src pointer to the source address\n @param[in] sizeBytes size in bytes to copy\n @param[in] offset offset in bytes from start of symbole\n @param[in] kind type of memory transfer\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
5959 pub fn hipMemcpyToSymbol(
5960 symbol: *const ::std::os::raw::c_void,
5961 src: *const ::std::os::raw::c_void,
5962 sizeBytes: usize,
5963 offset: usize,
5964 kind: hipMemcpyKind,
5965 ) -> hipError_t;
5966}
5967extern "C" {
5968 #[doc = " @brief Copies data to the given symbol on the device asynchronously.\n\n @param[out] symbol pointer to the device symbole\n @param[in] src pointer to the source address\n @param[in] sizeBytes size in bytes to copy\n @param[in] offset offset in bytes from start of symbole\n @param[in] kind type of memory transfer\n @param[in] stream stream identifier\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
5969 pub fn hipMemcpyToSymbolAsync(
5970 symbol: *const ::std::os::raw::c_void,
5971 src: *const ::std::os::raw::c_void,
5972 sizeBytes: usize,
5973 offset: usize,
5974 kind: hipMemcpyKind,
5975 stream: hipStream_t,
5976 ) -> hipError_t;
5977}
5978extern "C" {
5979 #[doc = " @brief Copies data from the given symbol on the device.\n\n @param[out] dst Returns pointer to destinition memory address\n @param[in] symbol Pointer to the symbole address on the device\n @param[in] sizeBytes Size in bytes to copy\n @param[in] offset Offset in bytes from the start of symbole\n @param[in] kind Type of memory transfer\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
5980 pub fn hipMemcpyFromSymbol(
5981 dst: *mut ::std::os::raw::c_void,
5982 symbol: *const ::std::os::raw::c_void,
5983 sizeBytes: usize,
5984 offset: usize,
5985 kind: hipMemcpyKind,
5986 ) -> hipError_t;
5987}
5988extern "C" {
5989 #[doc = " @brief Copies data from the given symbol on the device asynchronously.\n\n @param[out] dst Returns pointer to destinition memory address\n @param[in] symbol pointer to the symbole address on the device\n @param[in] sizeBytes size in bytes to copy\n @param[in] offset offset in bytes from the start of symbole\n @param[in] kind type of memory transfer\n @param[in] stream stream identifier\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
5990 pub fn hipMemcpyFromSymbolAsync(
5991 dst: *mut ::std::os::raw::c_void,
5992 symbol: *const ::std::os::raw::c_void,
5993 sizeBytes: usize,
5994 offset: usize,
5995 kind: hipMemcpyKind,
5996 stream: hipStream_t,
5997 ) -> hipError_t;
5998}
5999extern "C" {
6000 #[doc = " @brief Copies data from src to dst asynchronously.\n\n The copy is always performed by the device associated with the specified stream.\n\n For multi-gpu or peer-to-peer configurations, it is recommended to use a stream which is\n attached to the device where the src data is physically located.\n For optimal peer-to-peer copies, the copy device must be able to access the src and dst\n pointers (by calling hipDeviceEnablePeerAccess) with copy agent as the current device and\n src/dest as the peerDevice argument. If enabling device peer access is not done, the memory copy\n will still work, but will perform the copy using a staging buffer on the host.\n\n @note If host or dst are not pinned, the memory copy will be performed synchronously. For\n best performance, use hipHostMalloc to allocate host memory that is transferred asynchronously.\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] kind Type of memory transfer\n @param[in] stream Stream identifier\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown\n\n @see hipMemcpy, hipMemcpy2D, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray,\n hipMemcpy2DFromArray, hipMemcpyArrayToArray, hipMemcpy2DArrayToArray, hipMemcpyToSymbol,\n hipMemcpyFromSymbol, hipMemcpy2DAsync, hipMemcpyToArrayAsync, hipMemcpy2DToArrayAsync,\n hipMemcpyFromArrayAsync, hipMemcpy2DFromArrayAsync, hipMemcpyToSymbolAsync,\n hipMemcpyFromSymbolAsync"]
6001 pub fn hipMemcpyAsync(
6002 dst: *mut ::std::os::raw::c_void,
6003 src: *const ::std::os::raw::c_void,
6004 sizeBytes: usize,
6005 kind: hipMemcpyKind,
6006 stream: hipStream_t,
6007 ) -> hipError_t;
6008}
6009extern "C" {
6010 #[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant\n byte value value.\n\n @param[out] dst Data being filled\n @param[in] value Value to be set\n @param[in] sizeBytes Data size in bytes\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
6011 pub fn hipMemset(
6012 dst: *mut ::std::os::raw::c_void,
6013 value: ::std::os::raw::c_int,
6014 sizeBytes: usize,
6015 ) -> hipError_t;
6016}
6017extern "C" {
6018 #[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant\n byte value value.\n\n @param[out] dest Data ptr to be filled\n @param[in] value Value to be set\n @param[in] count Number of values to be set\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
6019 pub fn hipMemsetD8(
6020 dest: hipDeviceptr_t,
6021 value: ::std::os::raw::c_uchar,
6022 count: usize,
6023 ) -> hipError_t;
6024}
6025extern "C" {
6026 #[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant\n byte value value.\n\n hipMemsetD8Async() is asynchronous with respect to the host, so the call may return before the\n memset is complete. The operation can optionally be associated to a stream by passing a non-zero\n stream argument. If stream is non-zero, the operation may overlap with operations in other\n streams.\n\n @param[out] dest Data ptr to be filled\n @param[in] value Constant value to be set\n @param[in] count Number of values to be set\n @param[in] stream Stream identifier\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
6027 pub fn hipMemsetD8Async(
6028 dest: hipDeviceptr_t,
6029 value: ::std::os::raw::c_uchar,
6030 count: usize,
6031 stream: hipStream_t,
6032 ) -> hipError_t;
6033}
6034extern "C" {
6035 #[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant\n short value value.\n\n @param[out] dest Data ptr to be filled\n @param[in] value Constant value to be set\n @param[in] count Number of values to be set\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
6036 pub fn hipMemsetD16(
6037 dest: hipDeviceptr_t,
6038 value: ::std::os::raw::c_ushort,
6039 count: usize,
6040 ) -> hipError_t;
6041}
6042extern "C" {
6043 #[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dest with the constant\n short value value.\n\n hipMemsetD16Async() is asynchronous with respect to the host, so the call may return before the\n memset is complete. The operation can optionally be associated to a stream by passing a non-zero\n stream argument. If stream is non-zero, the operation may overlap with operations in other\n streams.\n\n @param[out] dest Data ptr to be filled\n @param[in] value Constant value to be set\n @param[in] count Number of values to be set\n @param[in] stream Stream identifier\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
6044 pub fn hipMemsetD16Async(
6045 dest: hipDeviceptr_t,
6046 value: ::std::os::raw::c_ushort,
6047 count: usize,
6048 stream: hipStream_t,
6049 ) -> hipError_t;
6050}
6051extern "C" {
6052 #[doc = " @brief Fills the memory area pointed to by dest with the constant integer\n value for specified number of times.\n\n @param[out] dest Data being filled\n @param[in] value Constant value to be set\n @param[in] count Number of values to be set\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"]
6053 pub fn hipMemsetD32(
6054 dest: hipDeviceptr_t,
6055 value: ::std::os::raw::c_int,
6056 count: usize,
6057 ) -> hipError_t;
6058}
6059extern "C" {
6060 #[doc = " @brief Fills the first sizeBytes bytes of the memory area pointed to by dev with the constant\n byte value value.\n\n hipMemsetAsync() is asynchronous with respect to the host, so the call may return before the\n memset is complete. The operation can optionally be associated to a stream by passing a non-zero\n stream argument. If stream is non-zero, the operation may overlap with operations in other\n streams.\n\n @param[out] dst Pointer to device memory\n @param[in] value Value to set for each byte of specified memory\n @param[in] sizeBytes Size in bytes to set\n @param[in] stream Stream identifier\n @return #hipSuccess, #hipErrorInvalidValue"]
6061 pub fn hipMemsetAsync(
6062 dst: *mut ::std::os::raw::c_void,
6063 value: ::std::os::raw::c_int,
6064 sizeBytes: usize,
6065 stream: hipStream_t,
6066 ) -> hipError_t;
6067}
6068extern "C" {
6069 #[doc = " @brief Fills the memory area pointed to by dev with the constant integer\n value for specified number of times.\n\n hipMemsetD32Async() is asynchronous with respect to the host, so the call may return before the\n memset is complete. The operation can optionally be associated to a stream by passing a non-zero\n stream argument. If stream is non-zero, the operation may overlap with operations in other\n streams.\n\n @param[out] dst Pointer to device memory\n @param[in] value Value to set for each byte of specified memory\n @param[in] count Number of values to be set\n @param[in] stream Stream identifier\n @return #hipSuccess, #hipErrorInvalidValue"]
6070 pub fn hipMemsetD32Async(
6071 dst: hipDeviceptr_t,
6072 value: ::std::os::raw::c_int,
6073 count: usize,
6074 stream: hipStream_t,
6075 ) -> hipError_t;
6076}
6077extern "C" {
6078 #[doc = " @brief Fills the memory area pointed to by dst with the constant value.\n\n @param[out] dst Pointer to 2D device memory\n @param[in] pitch Pitch size in bytes of 2D device memory, unused if height equals 1\n @param[in] value Constant value to set for each byte of specified memory\n @param[in] width Width size in bytes in 2D memory\n @param[in] height Height size in bytes in 2D memory\n @returns #hipSuccess, #hipErrorInvalidValue"]
6079 pub fn hipMemset2D(
6080 dst: *mut ::std::os::raw::c_void,
6081 pitch: usize,
6082 value: ::std::os::raw::c_int,
6083 width: usize,
6084 height: usize,
6085 ) -> hipError_t;
6086}
6087extern "C" {
6088 #[doc = " @brief Fills asynchronously the memory area pointed to by dst with the constant value.\n\n @param[in] dst Pointer to 2D device memory\n @param[in] pitch Pitch size in bytes of 2D device memory, unused if height equals 1\n @param[in] value Value to set for each byte of specified memory\n @param[in] width Width size in bytes in 2D memory\n @param[in] height Height size in bytes in 2D memory\n @param[in] stream Stream identifier\n @returns #hipSuccess, #hipErrorInvalidValue"]
6089 pub fn hipMemset2DAsync(
6090 dst: *mut ::std::os::raw::c_void,
6091 pitch: usize,
6092 value: ::std::os::raw::c_int,
6093 width: usize,
6094 height: usize,
6095 stream: hipStream_t,
6096 ) -> hipError_t;
6097}
6098extern "C" {
6099 #[doc = " @brief Fills synchronously the memory area pointed to by pitchedDevPtr with the constant value.\n\n @param[in] pitchedDevPtr Pointer to pitched device memory\n @param[in] value Value to set for each byte of specified memory\n @param[in] extent Size parameters for width field in bytes in device memory\n @returns #hipSuccess, #hipErrorInvalidValue"]
6100 pub fn hipMemset3D(
6101 pitchedDevPtr: hipPitchedPtr,
6102 value: ::std::os::raw::c_int,
6103 extent: hipExtent,
6104 ) -> hipError_t;
6105}
6106extern "C" {
6107 #[doc = " @brief Fills asynchronously the memory area pointed to by pitchedDevPtr with the constant value.\n\n @param[in] pitchedDevPtr Pointer to pitched device memory\n @param[in] value Value to set for each byte of specified memory\n @param[in] extent Size parameters for width field in bytes in device memory\n @param[in] stream Stream identifier\n @returns #hipSuccess, #hipErrorInvalidValue"]
6108 pub fn hipMemset3DAsync(
6109 pitchedDevPtr: hipPitchedPtr,
6110 value: ::std::os::raw::c_int,
6111 extent: hipExtent,
6112 stream: hipStream_t,
6113 ) -> hipError_t;
6114}
6115extern "C" {
6116 #[doc = " @brief Fills 2D memory range of 'width' 8-bit values synchronously to the specified char value.\n Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each\n row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @returns #hipSuccess, #hipErrorInvalidValue"]
6117 pub fn hipMemsetD2D8(
6118 dst: hipDeviceptr_t,
6119 dstPitch: usize,
6120 value: ::std::os::raw::c_uchar,
6121 width: usize,
6122 height: usize,
6123 ) -> hipError_t;
6124}
6125extern "C" {
6126 #[doc = " @brief Fills 2D memory range of 'width' 8-bit values asynchronously to the specified char value.\n Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each\n row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @param[in] stream Stream Identifier\n @returns #hipSuccess, #hipErrorInvalidValue"]
6127 pub fn hipMemsetD2D8Async(
6128 dst: hipDeviceptr_t,
6129 dstPitch: usize,
6130 value: ::std::os::raw::c_uchar,
6131 width: usize,
6132 height: usize,
6133 stream: hipStream_t,
6134 ) -> hipError_t;
6135}
6136extern "C" {
6137 #[doc = " @brief Fills 2D memory range of 'width' 16-bit values synchronously to the specified short\n value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes\n between each row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @returns #hipSuccess, #hipErrorInvalidValue"]
6138 pub fn hipMemsetD2D16(
6139 dst: hipDeviceptr_t,
6140 dstPitch: usize,
6141 value: ::std::os::raw::c_ushort,
6142 width: usize,
6143 height: usize,
6144 ) -> hipError_t;
6145}
6146extern "C" {
6147 #[doc = " @brief Fills 2D memory range of 'width' 16-bit values asynchronously to the specified short\n value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes\n between each row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @param[in] stream Stream Identifier\n @returns #hipSuccess, #hipErrorInvalidValue"]
6148 pub fn hipMemsetD2D16Async(
6149 dst: hipDeviceptr_t,
6150 dstPitch: usize,
6151 value: ::std::os::raw::c_ushort,
6152 width: usize,
6153 height: usize,
6154 stream: hipStream_t,
6155 ) -> hipError_t;
6156}
6157extern "C" {
6158 #[doc = " @brief Fills 2D memory range of 'width' 32-bit values synchronously to the specified int value.\n Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each\n row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @returns #hipSuccess, #hipErrorInvalidValue"]
6159 pub fn hipMemsetD2D32(
6160 dst: hipDeviceptr_t,
6161 dstPitch: usize,
6162 value: ::std::os::raw::c_uint,
6163 width: usize,
6164 height: usize,
6165 ) -> hipError_t;
6166}
6167extern "C" {
6168 #[doc = " @brief Fills 2D memory range of 'width' 32-bit values asynchronously to the specified int\n value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes\n between each row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @param[in] stream Stream Identifier\n @returns #hipSuccess, #hipErrorInvalidValue"]
6169 pub fn hipMemsetD2D32Async(
6170 dst: hipDeviceptr_t,
6171 dstPitch: usize,
6172 value: ::std::os::raw::c_uint,
6173 width: usize,
6174 height: usize,
6175 stream: hipStream_t,
6176 ) -> hipError_t;
6177}
6178extern "C" {
6179 #[doc = " @brief Query memory info.\n\n On ROCM, this function gets the actual free memory left on the current device, so supports\n the cases while running multi-workload (such as multiple processes, multiple threads, and\n multiple GPUs).\n\n @warning On Windows, the free memory only accounts for memory allocated by this process and may\n be optimistic.\n\n @param[out] free Returns free memory on the current device in bytes\n @param[out] total Returns total allocatable memory on the current device in bytes\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n"]
6180 pub fn hipMemGetInfo(free: *mut usize, total: *mut usize) -> hipError_t;
6181}
6182extern "C" {
6183 #[doc = " @brief Get allocated memory size via memory pointer.\n\n This function gets the allocated shared virtual memory size from memory pointer.\n\n @param[in] ptr Pointer to allocated memory\n @param[out] size Returns the allocated memory size in bytes\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
6184 pub fn hipMemPtrGetInfo(ptr: *mut ::std::os::raw::c_void, size: *mut usize) -> hipError_t;
6185}
6186extern "C" {
6187 #[doc = " @brief Allocate an array on the device.\n\n @param[out] array Pointer to allocated array in device memory\n @param[in] desc Requested channel format\n @param[in] width Requested array allocation width\n @param[in] height Requested array allocation height\n @param[in] flags Requested properties of allocated array\n @returns #hipSuccess, #hipErrorOutOfMemory\n\n @see hipMalloc, hipMallocPitch, hipFree, hipFreeArray, hipHostMalloc, hipHostFree"]
6188 pub fn hipMallocArray(
6189 array: *mut hipArray_t,
6190 desc: *const hipChannelFormatDesc,
6191 width: usize,
6192 height: usize,
6193 flags: ::std::os::raw::c_uint,
6194 ) -> hipError_t;
6195}
6196extern "C" {
6197 #[doc = " @brief Create an array memory pointer on the device.\n\n @param[out] pHandle Pointer to the array memory\n @param[in] pAllocateArray Requested array desciptor\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocArray, hipArrayDestroy, hipFreeArray"]
6198 pub fn hipArrayCreate(
6199 pHandle: *mut hipArray_t,
6200 pAllocateArray: *const HIP_ARRAY_DESCRIPTOR,
6201 ) -> hipError_t;
6202}
6203extern "C" {
6204 #[doc = " @brief Destroy an array memory pointer on the device.\n\n @param[in] array Pointer to the array memory\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipArrayCreate, hipArrayDestroy, hipFreeArray"]
6205 pub fn hipArrayDestroy(array: hipArray_t) -> hipError_t;
6206}
6207extern "C" {
6208 #[doc = " @brief Create a 3D array memory pointer on the device.\n\n @param[out] array Pointer to the 3D array memory\n @param[in] pAllocateArray Requested array desciptor\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocArray, hipArrayDestroy, hipFreeArray"]
6209 pub fn hipArray3DCreate(
6210 array: *mut hipArray_t,
6211 pAllocateArray: *const HIP_ARRAY3D_DESCRIPTOR,
6212 ) -> hipError_t;
6213}
6214extern "C" {
6215 #[doc = " @brief Create a 3D memory pointer on the device.\n\n @param[out] pitchedDevPtr Pointer to the 3D memory\n @param[in] extent Requested extent\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocPitch, hipMemGetInfo, hipFree"]
6216 pub fn hipMalloc3D(pitchedDevPtr: *mut hipPitchedPtr, extent: hipExtent) -> hipError_t;
6217}
6218extern "C" {
6219 #[doc = " @brief Frees an array on the device.\n\n @param[in] array Pointer to array to free\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized\n\n @see hipMalloc, hipMallocPitch, hipFree, hipMallocArray, hipHostMalloc, hipHostFree"]
6220 pub fn hipFreeArray(array: hipArray_t) -> hipError_t;
6221}
6222extern "C" {
6223 #[doc = " @brief Allocate an array on the device.\n\n @param[out] array Pointer to allocated array in device memory\n @param[in] desc Requested channel format\n @param[in] extent Requested array allocation width, height and depth\n @param[in] flags Requested properties of allocated array\n @returns #hipSuccess, #hipErrorOutOfMemory\n\n @see hipMalloc, hipMallocPitch, hipFree, hipFreeArray, hipHostMalloc, hipHostFree"]
6224 pub fn hipMalloc3DArray(
6225 array: *mut hipArray_t,
6226 desc: *const hipChannelFormatDesc,
6227 extent: hipExtent,
6228 flags: ::std::os::raw::c_uint,
6229 ) -> hipError_t;
6230}
6231extern "C" {
6232 #[doc = " @brief Gets info about the specified array\n\n @param[out] desc - Returned array type\n @param[out] extent - Returned array shape. 2D arrays will have depth of zero\n @param[out] flags - Returned array flags\n @param[in] array - The HIP array to get info for\n\n @returns #hipSuccess, #hipErrorInvalidValue #hipErrorInvalidHandle\n\n @see hipArrayGetDescriptor, hipArray3DGetDescriptor"]
6233 pub fn hipArrayGetInfo(
6234 desc: *mut hipChannelFormatDesc,
6235 extent: *mut hipExtent,
6236 flags: *mut ::std::os::raw::c_uint,
6237 array: hipArray_t,
6238 ) -> hipError_t;
6239}
6240extern "C" {
6241 #[doc = " @brief Gets a 1D or 2D array descriptor\n\n @param[out] pArrayDescriptor - Returned array descriptor\n @param[in] array - Array to get descriptor of\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue #hipErrorInvalidHandle\n\n @see hipArray3DCreate, hipArray3DGetDescriptor, hipArrayCreate, hipArrayDestroy, hipMemAlloc,\n hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned,\n hipMemcpy3D, hipMemcpy3DAsync, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync,\n hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync,\n hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoD, hipMemcpyHtoDAsync, hipMemFree,\n hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc,\n hipMemHostGetDevicePointer, hipMemsetD8, hipMemsetD16, hipMemsetD32, hipArrayGetInfo"]
6242 pub fn hipArrayGetDescriptor(
6243 pArrayDescriptor: *mut HIP_ARRAY_DESCRIPTOR,
6244 array: hipArray_t,
6245 ) -> hipError_t;
6246}
6247extern "C" {
6248 #[doc = " @brief Gets a 3D array descriptor\n\n @param[out] pArrayDescriptor - Returned 3D array descriptor\n @param[in] array - 3D array to get descriptor of\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidValue #hipErrorInvalidHandle, #hipErrorContextIsDestroyed\n\n @see hipArray3DCreate, hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc,\n hipMemAllocHost, hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned,\n hipMemcpy3D, hipMemcpy3DAsync, hipMemcpyAtoA, hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync,\n hipMemcpyDtoA, hipMemcpyDtoD, hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync,\n hipMemcpyHtoA, hipMemcpyHtoAAsync, hipMemcpyHtoD, hipMemcpyHtoDAsync, hipMemFree,\n hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo, hipMemHostAlloc,\n hipMemHostGetDevicePointer, hipMemsetD8, hipMemsetD16, hipMemsetD32, hipArrayGetInfo"]
6249 pub fn hipArray3DGetDescriptor(
6250 pArrayDescriptor: *mut HIP_ARRAY3D_DESCRIPTOR,
6251 array: hipArray_t,
6252 ) -> hipError_t;
6253}
6254extern "C" {
6255 #[doc = " @brief Copies data between host and device.\n\n hipMemcpy2D supports memory matrix copy from the pointed area src to the pointed area dst.\n The copy direction is defined by kind which must be one of #hipMemcpyHostToDevice,\n #hipMemcpyHostToDevice, #hipMemcpyDeviceToHost #hipMemcpyDeviceToDevice or #hipMemcpyDefault.\n Device to Device copies don't need to wait for host synchronization.\n The copy is executed on the default null tream. The src and dst must not overlap.\n dpitch and spitch are the widths in bytes in memory matrix, width cannot exceed dpitch or\n spitch.\n\n For hipMemcpy2D, the copy is always performed by the current device (set by hipSetDevice).\n For multi-gpu or peer-to-peer configurations, it is recommended to set the current device to the\n device where the src data is physically located. For optimal peer-to-peer copies, the copy device\n must be able to access the src and dst pointers (by calling hipDeviceEnablePeerAccess with copy\n agent as the current device and src/dst as the peerDevice argument. if this is not done, the\n hipMemcpy2D will still work, but will perform the copy using a staging buffer on the host.\n\n @warning Calling hipMemcpy2D with dst and src pointers that do not match the hipMemcpyKind\n results in undefined behavior.\n\n @param[in] dst Destination memory address\n @param[in] dpitch Pitch size in bytes of destination memory\n @param[in] src Source memory address\n @param[in] spitch Pitch size in bytes of source memory\n @param[in] width Width size in bytes of matrix transfer (columns)\n @param[in] height Height size in bytes of matrix transfer (rows)\n @param[in] kind Type of transfer\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6256 pub fn hipMemcpy2D(
6257 dst: *mut ::std::os::raw::c_void,
6258 dpitch: usize,
6259 src: *const ::std::os::raw::c_void,
6260 spitch: usize,
6261 width: usize,
6262 height: usize,
6263 kind: hipMemcpyKind,
6264 ) -> hipError_t;
6265}
6266extern "C" {
6267 #[doc = " @brief Copies memory for 2D arrays.\n @param[in] pCopy Parameters for the memory copy\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2D, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray,\n hipMemcpyToSymbol, hipMemcpyAsync"]
6268 pub fn hipMemcpyParam2D(pCopy: *const hip_Memcpy2D) -> hipError_t;
6269}
6270extern "C" {
6271 #[doc = " @brief Copies memory for 2D arrays.\n @param[in] pCopy Parameters for the memory copy\n @param[in] stream Stream to use\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2D, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray,\n hipMemcpyToSymbol, hipMemcpyAsync"]
6272 pub fn hipMemcpyParam2DAsync(pCopy: *const hip_Memcpy2D, stream: hipStream_t) -> hipError_t;
6273}
6274extern "C" {
6275 #[doc = " @brief Copies data between host and device asynchronously.\n\n hipMemcpy2DAsync supports memory matrix copy from the pointed area src to the pointed area dst.\n The copy direction is defined by kind which must be one of #hipMemcpyHostToDevice,\n #hipMemcpyDeviceToHost, #hipMemcpyDeviceToDevice or #hipMemcpyDefault.\n dpitch and spitch are the widths in bytes for memory matrix corresponds to dst and src.\n width cannot exceed dpitch or spitch.\n\n The copy is always performed by the device associated with the specified stream.\n The API is asynchronous with respect to the host, so the call may return before the copy is\n complete. The copy can optionally be excuted in a specific stream by passing a non-zero stream\n argument, for HostToDevice or DeviceToHost copies, the copy can overlap with operations\n in other streams.\n\n For multi-gpu or peer-to-peer configurations, it is recommended to use a stream which is\n attached to the device where the src data is physically located.\n\n For optimal peer-to-peer copies, the copy device must be able to access the src and dst pointers\n (by calling hipDeviceEnablePeerAccess) with copy agent as the current device and src/dst as the\n peerDevice argument. If enabling device peer access is not done, the API will still work, but\n will perform the copy using a staging buffer on the host.\n\n @note If host or dst are not pinned, the memory copy will be performed synchronously. For\n best performance, use hipHostMalloc to allocate host memory that is transferred asynchronously.\n\n @param[in] dst Pointer to destination memory address\n @param[in] dpitch Pitch size in bytes of destination memory\n @param[in] src Pointer to source memory address\n @param[in] spitch Pitch size in bytes of source memory\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n @param[in] stream Stream to use\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6276 pub fn hipMemcpy2DAsync(
6277 dst: *mut ::std::os::raw::c_void,
6278 dpitch: usize,
6279 src: *const ::std::os::raw::c_void,
6280 spitch: usize,
6281 width: usize,
6282 height: usize,
6283 kind: hipMemcpyKind,
6284 stream: hipStream_t,
6285 ) -> hipError_t;
6286}
6287extern "C" {
6288 #[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] wOffset Destination starting X offset\n @param[in] hOffset Destination starting Y offset\n @param[in] src Source memory address\n @param[in] spitch Pitch of source memory\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6289 pub fn hipMemcpy2DToArray(
6290 dst: hipArray_t,
6291 wOffset: usize,
6292 hOffset: usize,
6293 src: *const ::std::os::raw::c_void,
6294 spitch: usize,
6295 width: usize,
6296 height: usize,
6297 kind: hipMemcpyKind,
6298 ) -> hipError_t;
6299}
6300extern "C" {
6301 #[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] wOffset Destination starting X offset\n @param[in] hOffset Destination starting Y offset\n @param[in] src Source memory address\n @param[in] spitch Pitch of source memory\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n @param[in] stream Accelerator view which the copy is being enqueued\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6302 pub fn hipMemcpy2DToArrayAsync(
6303 dst: hipArray_t,
6304 wOffset: usize,
6305 hOffset: usize,
6306 src: *const ::std::os::raw::c_void,
6307 spitch: usize,
6308 width: usize,
6309 height: usize,
6310 kind: hipMemcpyKind,
6311 stream: hipStream_t,
6312 ) -> hipError_t;
6313}
6314extern "C" {
6315 #[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] wOffsetDst Destination starting X offset\n @param[in] hOffsetDst Destination starting Y offset\n @param[in] src Source memory address\n @param[in] wOffsetSrc Source starting X offset\n @param[in] hOffsetSrc Source starting Y offset (columns in bytes)\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6316 pub fn hipMemcpy2DArrayToArray(
6317 dst: hipArray_t,
6318 wOffsetDst: usize,
6319 hOffsetDst: usize,
6320 src: hipArray_const_t,
6321 wOffsetSrc: usize,
6322 hOffsetSrc: usize,
6323 width: usize,
6324 height: usize,
6325 kind: hipMemcpyKind,
6326 ) -> hipError_t;
6327}
6328extern "C" {
6329 #[doc = " @brief Copies data between host and device [Deprecated]\n\n @ingroup MemoryD\n\n @param[in] dst Destination memory address\n @param[in] wOffset Destination starting X offset\n @param[in] hOffset Destination starting Y offset\n @param[in] src Source memory address\n @param[in] count size in bytes to copy\n @param[in] kind Type of transfer\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync\n @warning This API is deprecated."]
6330 pub fn hipMemcpyToArray(
6331 dst: hipArray_t,
6332 wOffset: usize,
6333 hOffset: usize,
6334 src: *const ::std::os::raw::c_void,
6335 count: usize,
6336 kind: hipMemcpyKind,
6337 ) -> hipError_t;
6338}
6339extern "C" {
6340 #[doc = " @brief Copies data between host and device [Deprecated]\n\n @ingroup MemoryD\n\n @param[in] dst Destination memory address\n @param[in] srcArray Source memory address\n @param[in] wOffset Source starting X offset\n @param[in] hOffset Source starting Y offset\n @param[in] count Size in bytes to copy\n @param[in] kind Type of transfer\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync\n @warning This API is deprecated."]
6341 pub fn hipMemcpyFromArray(
6342 dst: *mut ::std::os::raw::c_void,
6343 srcArray: hipArray_const_t,
6344 wOffset: usize,
6345 hOffset: usize,
6346 count: usize,
6347 kind: hipMemcpyKind,
6348 ) -> hipError_t;
6349}
6350extern "C" {
6351 #[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] dpitch Pitch of destination memory\n @param[in] src Source memory address\n @param[in] wOffset Source starting X offset\n @param[in] hOffset Source starting Y offset\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6352 pub fn hipMemcpy2DFromArray(
6353 dst: *mut ::std::os::raw::c_void,
6354 dpitch: usize,
6355 src: hipArray_const_t,
6356 wOffset: usize,
6357 hOffset: usize,
6358 width: usize,
6359 height: usize,
6360 kind: hipMemcpyKind,
6361 ) -> hipError_t;
6362}
6363extern "C" {
6364 #[doc = " @brief Copies data between host and device asynchronously.\n\n @param[in] dst Destination memory address\n @param[in] dpitch Pitch of destination memory\n @param[in] src Source memory address\n @param[in] wOffset Source starting X offset\n @param[in] hOffset Source starting Y offset\n @param[in] width Width of matrix transfer (columns in bytes)\n @param[in] height Height of matrix transfer (rows)\n @param[in] kind Type of transfer\n @param[in] stream Accelerator view which the copy is being enqueued\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6365 pub fn hipMemcpy2DFromArrayAsync(
6366 dst: *mut ::std::os::raw::c_void,
6367 dpitch: usize,
6368 src: hipArray_const_t,
6369 wOffset: usize,
6370 hOffset: usize,
6371 width: usize,
6372 height: usize,
6373 kind: hipMemcpyKind,
6374 stream: hipStream_t,
6375 ) -> hipError_t;
6376}
6377extern "C" {
6378 #[doc = " @brief Copies data between host and device.\n\n @param[in] dst Destination memory address\n @param[in] srcArray Source array\n @param[in] srcOffset Offset in bytes of source array\n @param[in] count Size of memory copy in bytes\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6379 pub fn hipMemcpyAtoH(
6380 dst: *mut ::std::os::raw::c_void,
6381 srcArray: hipArray_t,
6382 srcOffset: usize,
6383 count: usize,
6384 ) -> hipError_t;
6385}
6386extern "C" {
6387 #[doc = " @brief Copies data between host and device.\n\n @param[in] dstArray Destination memory address\n @param[in] dstOffset Offset in bytes of destination array\n @param[in] srcHost Source host pointer\n @param[in] count Size of memory copy in bytes\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6388 pub fn hipMemcpyHtoA(
6389 dstArray: hipArray_t,
6390 dstOffset: usize,
6391 srcHost: *const ::std::os::raw::c_void,
6392 count: usize,
6393 ) -> hipError_t;
6394}
6395extern "C" {
6396 #[doc = " @brief Copies data between host and device.\n\n @param[in] p 3D memory copy parameters\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6397 pub fn hipMemcpy3D(p: *const hipMemcpy3DParms) -> hipError_t;
6398}
6399extern "C" {
6400 #[doc = " @brief Copies data between host and device asynchronously.\n\n @param[in] p 3D memory copy parameters\n @param[in] stream Stream to use\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6401 pub fn hipMemcpy3DAsync(p: *const hipMemcpy3DParms, stream: hipStream_t) -> hipError_t;
6402}
6403extern "C" {
6404 #[doc = " @brief Copies data between host and device.\n\n @param[in] pCopy 3D memory copy parameters\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6405 pub fn hipDrvMemcpy3D(pCopy: *const HIP_MEMCPY3D) -> hipError_t;
6406}
6407extern "C" {
6408 #[doc = " @brief Copies data between host and device asynchronously.\n\n @param[in] pCopy 3D memory copy parameters\n @param[in] stream Stream to use\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"]
6409 pub fn hipDrvMemcpy3DAsync(pCopy: *const HIP_MEMCPY3D, stream: hipStream_t) -> hipError_t;
6410}
6411extern "C" {
6412 #[doc = " @brief Get information on memory allocations.\n\n @param [out] pbase - BAse pointer address\n @param [out] psize - Size of allocation\n @param [in] dptr- Device Pointer\n\n @returns #hipSuccess, #hipErrorNotFound\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"]
6413 pub fn hipMemGetAddressRange(
6414 pbase: *mut hipDeviceptr_t,
6415 psize: *mut usize,
6416 dptr: hipDeviceptr_t,
6417 ) -> hipError_t;
6418}
6419extern "C" {
6420 #[doc = " @brief Perform Batch of 1D copies\n\n @param [in] dsts - Array of destination pointers\n @param [in] srcs - Array of source pointers.\n @param [in] sizes - Array of sizes for memcpy operations\n @param [in] count - Size of dsts, srcs and sizes arrays\n @param [in] attrs - Array of memcpy attributes (not supported)\n @param [in] attrsIdxs - Array of indices to map attrs to copies (not supported)\n @param [in] numAttrs - Size of attrs and attrsIdxs arrays (not supported)\n @param [in] failIdx - Pointer to a location to return failure index inside the batch\n @param [in] stream - stream used to enqueue operations in.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
6421 pub fn hipMemcpyBatchAsync(
6422 dsts: *mut *mut ::std::os::raw::c_void,
6423 srcs: *mut *mut ::std::os::raw::c_void,
6424 sizes: *mut usize,
6425 count: usize,
6426 attrs: *mut hipMemcpyAttributes,
6427 attrsIdxs: *mut usize,
6428 numAttrs: usize,
6429 failIdx: *mut usize,
6430 stream: hipStream_t,
6431 ) -> hipError_t;
6432}
6433extern "C" {
6434 #[doc = " @brief Perform Batch of 3D copies\n\n @param [in] numOps - Total number of memcpy operations.\n @param [in] opList - Array of size numOps containing the actual memcpy operations.\n @param [in] failIdx - Pointer to a location to return the index of the copy where a failure\n - was encountered.\n @param [in] flags - Flags for future use, must be zero now.\n @param [in] stream - The stream to enqueue the operations in.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
6435 pub fn hipMemcpy3DBatchAsync(
6436 numOps: usize,
6437 opList: *mut hipMemcpy3DBatchOp,
6438 failIdx: *mut usize,
6439 flags: ::std::os::raw::c_ulonglong,
6440 stream: hipStream_t,
6441 ) -> hipError_t;
6442}
6443extern "C" {
6444 #[doc = " @brief Performs 3D memory copies between devices\n This API is asynchronous with respect to host\n\n @param [in] p - Parameters for memory copy\n\n @returns #hipSuccess, #hipErrorInvalidValue, hipErrorInvalidDevice"]
6445 pub fn hipMemcpy3DPeer(p: *mut hipMemcpy3DPeerParms) -> hipError_t;
6446}
6447extern "C" {
6448 #[doc = " @brief Performs 3D memory copies between devices asynchronously\n\n @param [in] p - Parameters for memory copy\n @param [in] stream - Stream to enqueue operation in.\n\n @returns #hipSuccess, #hipErrorInvalidValue, hipErrorInvalidDevice"]
6449 pub fn hipMemcpy3DPeerAsync(p: *mut hipMemcpy3DPeerParms, stream: hipStream_t) -> hipError_t;
6450}
6451extern "C" {
6452 #[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup PeerToPeer PeerToPeer Device Memory Access\n @{\n @ingroup API\n This section describes the PeerToPeer device memory access functions of HIP runtime API.\n/\n/**\n @brief Determines if a device can access a peer device's memory.\n\n @param [out] canAccessPeer - Returns the peer access capability (0 or 1)\n @param [in] deviceId - The device accessing the peer device memory.\n @param [in] peerDeviceId - Peer device where memory is physically located\n\n The value of @p canAccessPeer,\n\n Returns \"1\" if the specified @p deviceId is capable of directly accessing memory physically\n located on @p peerDeviceId,\n\n Returns \"0\" if the specified @p deviceId is not capable of directly accessing memory physically\n located on @p peerDeviceId.\n\n Returns \"0\" if @p deviceId == @p peerDeviceId, both are valid devices,\n however, a device is not a peer of itself.\n\n Returns #hipErrorInvalidDevice if deviceId or peerDeviceId are not valid devices\n\n @returns #hipSuccess, #hipErrorInvalidDevice\n"]
6453 pub fn hipDeviceCanAccessPeer(
6454 canAccessPeer: *mut ::std::os::raw::c_int,
6455 deviceId: ::std::os::raw::c_int,
6456 peerDeviceId: ::std::os::raw::c_int,
6457 ) -> hipError_t;
6458}
6459extern "C" {
6460 #[doc = " @brief Enables direct access to memory allocations on a peer device.\n\n When this API is successful, all memory allocations on peer device will be mapped into the\n address space of the current device. In addition, any future memory allocation on the\n peer device will remain accessible from the current device, until the access is disabled using\n hipDeviceDisablePeerAccess or device is reset using hipDeviceReset.\n\n @param [in] peerDeviceId - Peer device to enable direct access to from the current device\n @param [in] flags - Reserved for future use, must be zero\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue,\n @returns #hipErrorPeerAccessAlreadyEnabled if peer access is already enabled for this device."]
6461 pub fn hipDeviceEnablePeerAccess(
6462 peerDeviceId: ::std::os::raw::c_int,
6463 flags: ::std::os::raw::c_uint,
6464 ) -> hipError_t;
6465}
6466extern "C" {
6467 #[doc = " @brief Disables direct access to memory allocations on a peer device.\n\n If direct access to memory allocations on peer device has not been enabled yet from the current\n device, it returns #hipErrorPeerAccessNotEnabled.\n\n @param [in] peerDeviceId Peer device to disable direct access to\n\n @returns #hipSuccess, #hipErrorPeerAccessNotEnabled"]
6468 pub fn hipDeviceDisablePeerAccess(peerDeviceId: ::std::os::raw::c_int) -> hipError_t;
6469}
6470extern "C" {
6471 #[doc = " @brief Copies memory between two peer accessible devices.\n\n @param [out] dst - Destination device pointer\n @param [in] dstDeviceId - Destination device\n @param [in] src - Source device pointer\n @param [in] srcDeviceId - Source device\n @param [in] sizeBytes - Size of memory copy in bytes\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDevice"]
6472 pub fn hipMemcpyPeer(
6473 dst: *mut ::std::os::raw::c_void,
6474 dstDeviceId: ::std::os::raw::c_int,
6475 src: *const ::std::os::raw::c_void,
6476 srcDeviceId: ::std::os::raw::c_int,
6477 sizeBytes: usize,
6478 ) -> hipError_t;
6479}
6480extern "C" {
6481 #[doc = " @brief Copies memory between two peer accessible devices asynchronously.\n\n @param [out] dst - Destination device pointer\n @param [in] dstDeviceId - Destination device\n @param [in] src - Source device pointer\n @param [in] srcDevice - Source device\n @param [in] sizeBytes - Size of memory copy in bytes\n @param [in] stream - Stream identifier\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDevice"]
6482 pub fn hipMemcpyPeerAsync(
6483 dst: *mut ::std::os::raw::c_void,
6484 dstDeviceId: ::std::os::raw::c_int,
6485 src: *const ::std::os::raw::c_void,
6486 srcDevice: ::std::os::raw::c_int,
6487 sizeBytes: usize,
6488 stream: hipStream_t,
6489 ) -> hipError_t;
6490}
6491extern "C" {
6492 #[doc = " @brief Create a context and set it as current/default context\n\n @param [out] ctx Context to create\n @param [in] flags Context creation flags\n @param [in] device device handle\n\n @returns #hipSuccess\n\n @see hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent,\n hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform.\n"]
6493 pub fn hipCtxCreate(
6494 ctx: *mut hipCtx_t,
6495 flags: ::std::os::raw::c_uint,
6496 device: hipDevice_t,
6497 ) -> hipError_t;
6498}
6499extern "C" {
6500 #[doc = " @brief Destroy a HIP context [Deprecated]\n\n @param [in] ctx Context to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipCtxCreate, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,hipCtxSetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6501 pub fn hipCtxDestroy(ctx: hipCtx_t) -> hipError_t;
6502}
6503extern "C" {
6504 #[doc = " @brief Pop the current/default context and return the popped context [Deprecated]\n\n @param [out] ctx The current context to pop\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxSetCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6505 pub fn hipCtxPopCurrent(ctx: *mut hipCtx_t) -> hipError_t;
6506}
6507extern "C" {
6508 #[doc = " @brief Push the context to be set as current/ default context [Deprecated]\n\n @param [in] ctx The current context to push\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6509 pub fn hipCtxPushCurrent(ctx: hipCtx_t) -> hipError_t;
6510}
6511extern "C" {
6512 #[doc = " @brief Set the passed context as current/default [Deprecated]\n\n @param [in] ctx The context to set as current\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6513 pub fn hipCtxSetCurrent(ctx: hipCtx_t) -> hipError_t;
6514}
6515extern "C" {
6516 #[doc = " @brief Get the handle of the current/ default context [Deprecated]\n\n @param [out] ctx The context to get as current\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6517 pub fn hipCtxGetCurrent(ctx: *mut hipCtx_t) -> hipError_t;
6518}
6519extern "C" {
6520 #[doc = " @brief Get the handle of the device associated with current/default context [Deprecated]\n\n @param [out] device The device from the current context\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6521 pub fn hipCtxGetDevice(device: *mut hipDevice_t) -> hipError_t;
6522}
6523extern "C" {
6524 #[doc = " @brief Returns the approximate HIP api version.\n\n @param [in] ctx Context to check [Deprecated]\n @param [out] apiVersion API version to get\n\n @returns #hipSuccess\n\n @warning The HIP feature set does not correspond to an exact CUDA SDK api revision.\n This function always set *apiVersion to 4 as an approximation though HIP supports\n some features which were introduced in later CUDA SDK revisions.\n HIP apps code should not rely on the api revision number here and should\n use arch feature flags to test device capabilities or conditional compilation.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6525 pub fn hipCtxGetApiVersion(
6526 ctx: hipCtx_t,
6527 apiVersion: *mut ::std::os::raw::c_uint,
6528 ) -> hipError_t;
6529}
6530extern "C" {
6531 #[doc = " @brief Get Cache configuration for a specific function [Deprecated]\n\n @param [out] cacheConfig Cache configuration\n\n @returns #hipSuccess\n\n @warning AMD devices and some Nvidia GPUS do not support reconfigurable cache. This hint is\n ignored on those architectures.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6532 pub fn hipCtxGetCacheConfig(cacheConfig: *mut hipFuncCache_t) -> hipError_t;
6533}
6534extern "C" {
6535 #[doc = " @brief Set L1/Shared cache partition [Deprecated]\n\n @param [in] cacheConfig Cache configuration to set\n\n @return #hipSuccess\n\n @warning AMD devices and some Nvidia GPUS do not support reconfigurable cache. This hint is\n ignored on those architectures.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6536 pub fn hipCtxSetCacheConfig(cacheConfig: hipFuncCache_t) -> hipError_t;
6537}
6538extern "C" {
6539 #[doc = " @brief Set Shared memory bank configuration [Deprecated]\n\n @param [in] config Shared memory configuration to set\n\n @return #hipSuccess\n\n @warning AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6540 pub fn hipCtxSetSharedMemConfig(config: hipSharedMemConfig) -> hipError_t;
6541}
6542extern "C" {
6543 #[doc = " @brief Get Shared memory bank configuration [Deprecated]\n\n @param [out] pConfig Pointer of shared memory configuration\n\n @return #hipSuccess\n\n @warning AMD devices and some Nvidia GPUS do not support shared cache banking, and the hint is\n ignored on those architectures.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6544 pub fn hipCtxGetSharedMemConfig(pConfig: *mut hipSharedMemConfig) -> hipError_t;
6545}
6546extern "C" {
6547 #[doc = " @brief Blocks until the default context has completed all preceding requested tasks [Deprecated]\n\n @return #hipSuccess\n\n @warning This function waits for all streams on the default context to complete execution, and\n then returns.\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6548 pub fn hipCtxSynchronize() -> hipError_t;
6549}
6550extern "C" {
6551 #[doc = " @brief Return flags used for creating default context [Deprecated]\n\n @param [out] flags Pointer of flags\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6552 pub fn hipCtxGetFlags(flags: *mut ::std::os::raw::c_uint) -> hipError_t;
6553}
6554extern "C" {
6555 #[doc = " @brief Enables direct access to memory allocations in a peer context [Deprecated]\n\n Memory which already allocated on peer device will be mapped into the address space of the\n current device. In addition, all future memory allocations on peerDeviceId will be mapped into\n the address space of the current device when the memory is allocated. The peer memory remains\n accessible from the current device until a call to hipDeviceDisablePeerAccess or hipDeviceReset.\n\n\n @param [in] peerCtx Peer context\n @param [in] flags flags, need to set as 0\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue,\n #hipErrorPeerAccessAlreadyEnabled\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n @warning PeerToPeer support is experimental.\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6556 pub fn hipCtxEnablePeerAccess(peerCtx: hipCtx_t, flags: ::std::os::raw::c_uint) -> hipError_t;
6557}
6558extern "C" {
6559 #[doc = " @brief Disable direct access from current context's virtual address space to memory allocations\n physically located on a peer context.Disables direct access to memory allocations in a peer\n context and unregisters any registered allocations [Deprecated]\n\n Returns #hipErrorPeerAccessNotEnabled if direct access to memory on peerDevice has not yet been\n enabled from the current device.\n\n @param [in] peerCtx Peer context to be disabled\n\n @returns #hipSuccess, #hipErrorPeerAccessNotEnabled\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n @warning PeerToPeer support is experimental.\n\n @warning This API is deprecated on the AMD platform, only for equivalent cuCtx driver API on the\n NVIDIA platform."]
6560 pub fn hipCtxDisablePeerAccess(peerCtx: hipCtx_t) -> hipError_t;
6561}
6562extern "C" {
6563 #[doc = " @brief Get the state of the primary context [Deprecated]\n\n @param [in] dev Device to get primary context flags for\n @param [out] flags Pointer to store flags\n @param [out] active Pointer to store context state; 0 = inactive, 1 = active\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent driver API on the\n NVIDIA platform."]
6564 pub fn hipDevicePrimaryCtxGetState(
6565 dev: hipDevice_t,
6566 flags: *mut ::std::os::raw::c_uint,
6567 active: *mut ::std::os::raw::c_int,
6568 ) -> hipError_t;
6569}
6570extern "C" {
6571 #[doc = " @brief Release the primary context on the GPU.\n\n @param [in] dev Device which primary context is released [Deprecated]\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n @warning This function return #hipSuccess though doesn't release the primaryCtx by design on\n HIP/HIP-CLANG path.\n\n @warning This API is deprecated on the AMD platform, only for equivalent driver API on the\n NVIDIA platform."]
6572 pub fn hipDevicePrimaryCtxRelease(dev: hipDevice_t) -> hipError_t;
6573}
6574extern "C" {
6575 #[doc = " @brief Retain the primary context on the GPU [Deprecated]\n\n @param [out] pctx Returned context handle of the new context\n @param [in] dev Device which primary context is released\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent driver API on the\n NVIDIA platform."]
6576 pub fn hipDevicePrimaryCtxRetain(pctx: *mut hipCtx_t, dev: hipDevice_t) -> hipError_t;
6577}
6578extern "C" {
6579 #[doc = " @brief Resets the primary context on the GPU [Deprecated]\n\n @param [in] dev Device which primary context is reset\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent driver API on the\n NVIDIA platform."]
6580 pub fn hipDevicePrimaryCtxReset(dev: hipDevice_t) -> hipError_t;
6581}
6582extern "C" {
6583 #[doc = " @brief Set flags for the primary context [Deprecated]\n\n @param [in] dev Device for which the primary context flags are set\n @param [in] flags New flags for the device\n\n @returns #hipSuccess, #hipErrorContextAlreadyInUse\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent driver API on the\n NVIDIA platform."]
6584 pub fn hipDevicePrimaryCtxSetFlags(
6585 dev: hipDevice_t,
6586 flags: ::std::os::raw::c_uint,
6587 ) -> hipError_t;
6588}
6589extern "C" {
6590 #[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n\n @defgroup Module Module Management\n @{\n @ingroup API\n This section describes the module management functions of HIP runtime API.\n\n/\n/**\n @brief Loads fatbin object\n\n @param [in] fatbin fatbin to be loaded as a module\n @param [out] module Module\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext, #hipErrorFileNotFound,\n #hipErrorOutOfMemory, #hipErrorSharedObjectInitFailed, #hipErrorNotInitialized\n"]
6591 pub fn hipModuleLoadFatBinary(
6592 module: *mut hipModule_t,
6593 fatbin: *const ::std::os::raw::c_void,
6594 ) -> hipError_t;
6595}
6596extern "C" {
6597 #[doc = " @brief Loads code object from file into a module the currrent context.\n\n @param [in] fname Filename of code object to load\n\n @param [out] module Module\n\n @warning File/memory resources allocated in this function are released only in hipModuleUnload.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext, #hipErrorFileNotFound,\n #hipErrorOutOfMemory, #hipErrorSharedObjectInitFailed, #hipErrorNotInitialized\n"]
6598 pub fn hipModuleLoad(
6599 module: *mut hipModule_t,
6600 fname: *const ::std::os::raw::c_char,
6601 ) -> hipError_t;
6602}
6603extern "C" {
6604 #[doc = " @brief Frees the module\n\n @param [in] module Module to free\n\n @returns #hipSuccess, #hipErrorInvalidResourceHandle\n\n The module is freed, and the code objects associated with it are destroyed."]
6605 pub fn hipModuleUnload(module: hipModule_t) -> hipError_t;
6606}
6607extern "C" {
6608 #[doc = " @brief Function with kname will be extracted if present in module\n\n @param [in] module Module to get function from\n @param [in] kname Pointer to the name of function\n @param [out] function Pointer to function handle\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext, #hipErrorNotInitialized,\n #hipErrorNotFound,"]
6609 pub fn hipModuleGetFunction(
6610 function: *mut hipFunction_t,
6611 module: hipModule_t,
6612 kname: *const ::std::os::raw::c_char,
6613 ) -> hipError_t;
6614}
6615extern "C" {
6616 #[doc = " @brief Returns the number of functions within a module.\n\n @param [in] mod Module to get function count from\n @param [out] count function count from module\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext, #hipErrorNotInitialized,\n #hipErrorNotFound,"]
6617 pub fn hipModuleGetFunctionCount(
6618 count: *mut ::std::os::raw::c_uint,
6619 mod_: hipModule_t,
6620 ) -> hipError_t;
6621}
6622extern "C" {
6623 #[doc = " @brief Load hip Library from inmemory object\n\n @param [out] library Output Library\n @param [in] code In memory object\n @param [in] jitOptions JIT options, CUDA only\n @param [in] jitOptionsValues JIT options values, CUDA only\n @param [in] numJitOptions Number of JIT options\n @param [in] libraryOptions Library options\n @param [in] libraryOptionValues Library options values\n @param [in] numLibraryOptions Number of library options\n @return #hipSuccess, #hipErrorInvalidValue,"]
6624 pub fn hipLibraryLoadData(
6625 library: *mut hipLibrary_t,
6626 code: *const ::std::os::raw::c_void,
6627 jitOptions: *mut hipJitOption,
6628 jitOptionsValues: *mut *mut ::std::os::raw::c_void,
6629 numJitOptions: ::std::os::raw::c_uint,
6630 libraryOptions: *mut hipLibraryOption,
6631 libraryOptionValues: *mut *mut ::std::os::raw::c_void,
6632 numLibraryOptions: ::std::os::raw::c_uint,
6633 ) -> hipError_t;
6634}
6635extern "C" {
6636 #[doc = " @brief Load hip Library from file\n\n @param [out] library Output Library\n @param [in] fileName file which contains code object\n @param [in] jitOptions JIT options, CUDA only\n @param [in] jitOptionsValues JIT options values, CUDA only\n @param [in] numJitOptions Number of JIT options\n @param [in] libraryOptions Library options\n @param [in] libraryOptionValues Library options values\n @param [in] numLibraryOptions Number of library options\n @return #hipSuccess, #hipErrorInvalidValue"]
6637 pub fn hipLibraryLoadFromFile(
6638 library: *mut hipLibrary_t,
6639 fileName: *const ::std::os::raw::c_char,
6640 jitOptions: *mut hipJitOption,
6641 jitOptionsValues: *mut *mut ::std::os::raw::c_void,
6642 numJitOptions: ::std::os::raw::c_uint,
6643 libraryOptions: *mut hipLibraryOption,
6644 libraryOptionValues: *mut *mut ::std::os::raw::c_void,
6645 numLibraryOptions: ::std::os::raw::c_uint,
6646 ) -> hipError_t;
6647}
6648extern "C" {
6649 #[doc = " @brief Unload HIP Library\n\n @param [in] library Input created hip library\n @return #hipSuccess, #hipErrorInvalidValue"]
6650 pub fn hipLibraryUnload(library: hipLibrary_t) -> hipError_t;
6651}
6652extern "C" {
6653 #[doc = " @brief Get Kernel object from library\n\n @param [out] pKernel Output kernel object\n @param [in] library Input hip library\n @param [in] name kernel name to be searched for\n @return #hipSuccess, #hipErrorInvalidValue"]
6654 pub fn hipLibraryGetKernel(
6655 pKernel: *mut hipKernel_t,
6656 library: hipLibrary_t,
6657 name: *const ::std::os::raw::c_char,
6658 ) -> hipError_t;
6659}
6660extern "C" {
6661 #[doc = " @brief Get Kernel count in library\n\n @param [out] count Count of kernels in library\n @param [in] library Input created hip library\n @return #hipSuccess, #hipErrorInvalidValue"]
6662 pub fn hipLibraryGetKernelCount(
6663 count: *mut ::std::os::raw::c_uint,
6664 library: hipLibrary_t,
6665 ) -> hipError_t;
6666}
6667extern "C" {
6668 #[doc = " @brief Find out attributes for a given function.\n @ingroup Execution\n @param [out] attr Attributes of funtion\n @param [in] func Pointer to the function handle\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction"]
6669 pub fn hipFuncGetAttributes(
6670 attr: *mut hipFuncAttributes,
6671 func: *const ::std::os::raw::c_void,
6672 ) -> hipError_t;
6673}
6674extern "C" {
6675 #[doc = " @brief Find out a specific attribute for a given function.\n @ingroup Execution\n @param [out] value Pointer to the value\n @param [in] attrib Attributes of the given funtion\n @param [in] hfunc Function to get attributes from\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction"]
6676 pub fn hipFuncGetAttribute(
6677 value: *mut ::std::os::raw::c_int,
6678 attrib: hipFunction_attribute,
6679 hfunc: hipFunction_t,
6680 ) -> hipError_t;
6681}
6682extern "C" {
6683 #[doc = " @brief Gets pointer to device entry function that matches entry function symbolPtr.\n\n @param [out] functionPtr Device entry function\n @param [in] symbolPtr Pointer to device entry function to search for\n\n @returns #hipSuccess, #hipErrorInvalidDeviceFunction\n"]
6684 pub fn hipGetFuncBySymbol(
6685 functionPtr: *mut hipFunction_t,
6686 symbolPtr: *const ::std::os::raw::c_void,
6687 ) -> hipError_t;
6688}
6689extern "C" {
6690 #[doc = " @brief Gets function pointer of a requested HIP API\n\n @param [in] symbol The API base name\n @param [out] funcPtr Pointer to the requested function\n @param [in] flags Flags for the search\n @param [out] driverStatus Optional returned status of the search\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
6691 pub fn hipGetDriverEntryPoint(
6692 symbol: *const ::std::os::raw::c_char,
6693 funcPtr: *mut *mut ::std::os::raw::c_void,
6694 flags: ::std::os::raw::c_ulonglong,
6695 driverStatus: *mut hipDriverEntryPointQueryResult,
6696 ) -> hipError_t;
6697}
6698extern "C" {
6699 #[doc = " @brief returns the handle of the texture reference with the name from the module.\n\n @param [in] hmod Module\n @param [in] name Pointer of name of texture reference\n @param [out] texRef Pointer of texture reference\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorNotFound, #hipErrorInvalidValue"]
6700 pub fn hipModuleGetTexRef(
6701 texRef: *mut *mut textureReference,
6702 hmod: hipModule_t,
6703 name: *const ::std::os::raw::c_char,
6704 ) -> hipError_t;
6705}
6706extern "C" {
6707 #[doc = " @brief builds module from code object data which resides in host memory.\n\n The \"image\" is a pointer to the location of code object data. This data can be either\n a single code object or a fat binary (fatbin), which serves as the entry point for loading and\n launching device-specific kernel executions.\n\n By default, the following command generates a fatbin:\n\n \"amdclang++ -O3 -c --offload-device-only --offload-arch=<GPU_ARCH> <input_file> -o <output_file>\"\n\n For more details, refer to:\n <a\n href= \"https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/kernel_language_cpp_support.html#kernel-compilation\">\n Kernel Compilation</a> in the HIP kernel language C++ support, or\n <a\n href=\"https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/hip_rtc.html\">HIP runtime compilation (HIP RTC)</a>.\n\n @param [in] image The pointer to the location of data\n @param [out] module Retuned module\n\n @returns hipSuccess, hipErrorNotInitialized, hipErrorOutOfMemory, hipErrorNotInitialized"]
6708 pub fn hipModuleLoadData(
6709 module: *mut hipModule_t,
6710 image: *const ::std::os::raw::c_void,
6711 ) -> hipError_t;
6712}
6713extern "C" {
6714 #[doc = " @brief builds module from code object which resides in host memory. Image is pointer to that\n location. Options are not used. hipModuleLoadData is called.\n\n @param [in] image The pointer to the location of data\n @param [out] module Retuned module\n @param [in] numOptions Number of options\n @param [in] options Options for JIT\n @param [in] optionValues Option values for JIT\n\n @returns hipSuccess, hipErrorNotInitialized, hipErrorOutOfMemory, hipErrorNotInitialized"]
6715 pub fn hipModuleLoadDataEx(
6716 module: *mut hipModule_t,
6717 image: *const ::std::os::raw::c_void,
6718 numOptions: ::std::os::raw::c_uint,
6719 options: *mut hipJitOption,
6720 optionValues: *mut *mut ::std::os::raw::c_void,
6721 ) -> hipError_t;
6722}
6723extern "C" {
6724 #[doc = " @brief Adds bitcode data to be linked with options.\n @param [in] state hip link state\n @param [in] type Type of the input data or bitcode\n @param [in] data Input data which is null terminated\n @param [in] size Size of the input data\n @param [in] name Optional name for this input\n @param [in] numOptions Size of the options\n @param [in] options Array of options applied to this input\n @param [in] optionValues Array of option values cast to void*\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle\n\n If adding the file fails, it will\n @return #hipErrorInvalidConfiguration\n\n @see hipError_t"]
6725 pub fn hipLinkAddData(
6726 state: hipLinkState_t,
6727 type_: hipJitInputType,
6728 data: *mut ::std::os::raw::c_void,
6729 size: usize,
6730 name: *const ::std::os::raw::c_char,
6731 numOptions: ::std::os::raw::c_uint,
6732 options: *mut hipJitOption,
6733 optionValues: *mut *mut ::std::os::raw::c_void,
6734 ) -> hipError_t;
6735}
6736extern "C" {
6737 #[doc = " @brief Adds a file with bitcode to be linked with options.\n @param [in] state hip link state\n @param [in] type Type of the input data or bitcode\n @param [in] path Path to the input file where bitcode is present\n @param [in] numOptions Size of the options\n @param [in] options Array of options applied to this input\n @param [in] optionValues Array of option values cast to void*\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n If adding the file fails, it will\n @return #hipErrorInvalidConfiguration\n\n @see hipError_t"]
6738 pub fn hipLinkAddFile(
6739 state: hipLinkState_t,
6740 type_: hipJitInputType,
6741 path: *const ::std::os::raw::c_char,
6742 numOptions: ::std::os::raw::c_uint,
6743 options: *mut hipJitOption,
6744 optionValues: *mut *mut ::std::os::raw::c_void,
6745 ) -> hipError_t;
6746}
6747extern "C" {
6748 #[doc = " @brief Completes the linking of the given program.\n @param [in] state hip link state\n @param [out] hipBinOut Upon success, points to the output binary\n @param [out] sizeOut Size of the binary is stored (optional)\n\n @returns #hipSuccess #hipErrorInvalidValue\n\n If adding the data fails, it will\n @return #hipErrorInvalidConfiguration\n\n @see hipError_t"]
6749 pub fn hipLinkComplete(
6750 state: hipLinkState_t,
6751 hipBinOut: *mut *mut ::std::os::raw::c_void,
6752 sizeOut: *mut usize,
6753 ) -> hipError_t;
6754}
6755extern "C" {
6756 #[doc = " @brief Creates a linker instance with options.\n @param [in] numOptions Number of options\n @param [in] options Array of options\n @param [in] optionValues Array of option values cast to void*\n @param [out] stateOut hip link state created upon success\n\n @returns #hipSuccess #hipErrorInvalidValue #hipErrorInvalidConfiguration\n\n @see hipSuccess"]
6757 pub fn hipLinkCreate(
6758 numOptions: ::std::os::raw::c_uint,
6759 options: *mut hipJitOption,
6760 optionValues: *mut *mut ::std::os::raw::c_void,
6761 stateOut: *mut hipLinkState_t,
6762 ) -> hipError_t;
6763}
6764extern "C" {
6765 #[doc = " @brief Deletes the linker instance.\n @param [in] state link state instance\n\n @returns #hipSuccess #hipErrorInvalidValue\n\n @see hipSuccess"]
6766 pub fn hipLinkDestroy(state: hipLinkState_t) -> hipError_t;
6767}
6768extern "C" {
6769 #[doc = " @brief launches kernel f with launch parameters and shared memory on stream with arguments passed\n to kernelparams or extra\n @ingroup Execution\n @param [in] f Kernel to launch.\n @param [in] gridDimX X grid dimension specified as multiple of blockDimX.\n @param [in] gridDimY Y grid dimension specified as multiple of blockDimY.\n @param [in] gridDimZ Z grid dimension specified as multiple of blockDimZ.\n @param [in] blockDimX X block dimensions specified in work-items\n @param [in] blockDimY Y grid dimension specified in work-items\n @param [in] blockDimZ Z grid dimension specified in work-items\n @param [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream Stream where the kernel should be dispatched. May be 0, in which case th\n default stream is used with associated synchronization rules.\n @param [in] kernelParams Kernel parameters to launch\n @param [in] extra Pointer to kernel arguments. These are passed directly to the kernel and\n must be in the memory layout and alignment expected by the kernel.\n All passed arguments must be naturally aligned according to their type. The memory address of\n each argument should be a multiple of its size in bytes. Please refer to\n hip_porting_driver_api.md for sample usage.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32. So gridDim.x * blockDim.x, gridDim.y * blockDim.y\n and gridDim.z * blockDim.z are always less than 2^32.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue"]
6770 pub fn hipModuleLaunchKernel(
6771 f: hipFunction_t,
6772 gridDimX: ::std::os::raw::c_uint,
6773 gridDimY: ::std::os::raw::c_uint,
6774 gridDimZ: ::std::os::raw::c_uint,
6775 blockDimX: ::std::os::raw::c_uint,
6776 blockDimY: ::std::os::raw::c_uint,
6777 blockDimZ: ::std::os::raw::c_uint,
6778 sharedMemBytes: ::std::os::raw::c_uint,
6779 stream: hipStream_t,
6780 kernelParams: *mut *mut ::std::os::raw::c_void,
6781 extra: *mut *mut ::std::os::raw::c_void,
6782 ) -> hipError_t;
6783}
6784extern "C" {
6785 #[doc = " \\addtogroup ModuleCooperativeG Cooperative groups kernel launch of Module management.\n \\ingroup Module\n @{ */\n/**\n @brief launches kernel f with launch parameters and shared memory on stream with arguments passed\n to kernelParams, where thread blocks can cooperate and synchronize as they execute\n\n @param [in] f Kernel to launch.\n @param [in] gridDimX X grid dimension specified as multiple of blockDimX.\n @param [in] gridDimY Y grid dimension specified as multiple of blockDimY.\n @param [in] gridDimZ Z grid dimension specified as multiple of blockDimZ.\n @param [in] blockDimX X block dimension specified in work-items.\n @param [in] blockDimY Y block dimension specified in work-items.\n @param [in] blockDimZ Z block dimension specified in work-items.\n @param [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream Stream where the kernel should be dispatched. May be 0,\n in which case the default stream is used with associated synchronization rules.\n @param [in] kernelParams A list of kernel arguments.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size \\f$ gridDim \\cdot blockDim \\geq 2^{32} \\f$.\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidHandle, #hipErrorInvalidImage, #hipErrorInvalidValue,\n #hipErrorInvalidConfiguration, #hipErrorLaunchFailure, #hipErrorLaunchOutOfResources,\n #hipErrorLaunchTimeOut, #hipErrorCooperativeLaunchTooLarge, #hipErrorSharedObjectInitFailed"]
6786 pub fn hipModuleLaunchCooperativeKernel(
6787 f: hipFunction_t,
6788 gridDimX: ::std::os::raw::c_uint,
6789 gridDimY: ::std::os::raw::c_uint,
6790 gridDimZ: ::std::os::raw::c_uint,
6791 blockDimX: ::std::os::raw::c_uint,
6792 blockDimY: ::std::os::raw::c_uint,
6793 blockDimZ: ::std::os::raw::c_uint,
6794 sharedMemBytes: ::std::os::raw::c_uint,
6795 stream: hipStream_t,
6796 kernelParams: *mut *mut ::std::os::raw::c_void,
6797 ) -> hipError_t;
6798}
6799extern "C" {
6800 #[doc = " @brief Launches kernels on multiple devices where thread blocks can cooperate and\n synchronize as they execute.\n\n @param [in] launchParamsList List of launch parameters, one per device.\n @param [in] numDevices Size of the launchParamsList array.\n @param [in] flags Flags to control launch behavior.\n\n @returns #hipSuccess, #hipErrorDeinitialized, #hipErrorNotInitialized, #hipErrorInvalidContext,\n #hipErrorInvalidHandle, #hipErrorInvalidImage, #hipErrorInvalidValue,\n #hipErrorInvalidConfiguration, #hipErrorInvalidResourceHandle, #hipErrorLaunchFailure,\n #hipErrorLaunchOutOfResources, #hipErrorLaunchTimeOut, #hipErrorCooperativeLaunchTooLarge,\n #hipErrorSharedObjectInitFailed"]
6801 pub fn hipModuleLaunchCooperativeKernelMultiDevice(
6802 launchParamsList: *mut hipFunctionLaunchParams,
6803 numDevices: ::std::os::raw::c_uint,
6804 flags: ::std::os::raw::c_uint,
6805 ) -> hipError_t;
6806}
6807extern "C" {
6808 #[doc = " @brief Launches kernel f with launch parameters and shared memory on stream with arguments passed\n to kernelparams or extra, where thread blocks can cooperate and synchronize as they execute.\n\n @param [in] f - Kernel to launch.\n @param [in] gridDim - Grid dimensions specified as multiple of blockDim.\n @param [in] blockDimX - Block dimensions specified in work-items\n @param [in] kernelParams - Pointer of arguments passed to the kernel. If the kernel has multiple\n parameters, 'kernelParams' should be array of pointers, each points the corresponding argument.\n @param [in] sharedMemBytes - Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream - Stream where the kernel should be dispatched. May be 0, in which case th\n default stream is used with associated synchronization rules.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size \\f$ gridDim \\cdot blockDim \\geq 2^{32} \\f$.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue,\n #hipErrorCooperativeLaunchTooLarge"]
6809 pub fn hipLaunchCooperativeKernel(
6810 f: *const ::std::os::raw::c_void,
6811 gridDim: dim3,
6812 blockDimX: dim3,
6813 kernelParams: *mut *mut ::std::os::raw::c_void,
6814 sharedMemBytes: ::std::os::raw::c_uint,
6815 stream: hipStream_t,
6816 ) -> hipError_t;
6817}
6818extern "C" {
6819 #[doc = " @brief Launches kernels on multiple devices where thread blocks can cooperate and\n synchronize as they execute.\n\n @param [in] launchParamsList List of launch parameters, one per device.\n @param [in] numDevices Size of the launchParamsList array.\n @param [in] flags Flags to control launch behavior.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue,\n #hipErrorCooperativeLaunchTooLarge"]
6820 pub fn hipLaunchCooperativeKernelMultiDevice(
6821 launchParamsList: *mut hipLaunchParams,
6822 numDevices: ::std::os::raw::c_int,
6823 flags: ::std::os::raw::c_uint,
6824 ) -> hipError_t;
6825}
6826extern "C" {
6827 #[doc = " @brief Launches kernels on multiple devices and guarantees all specified kernels are dispatched\n on respective streams before enqueuing any other work on the specified streams from any other\n threads\n @ingroup Execution\n @param [in] launchParamsList List of launch parameters, one per device.\n @param [in] numDevices Size of the launchParamsList array.\n @param [in] flags Flags to control launch behavior.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue"]
6828 pub fn hipExtLaunchMultiKernelMultiDevice(
6829 launchParamsList: *mut hipLaunchParams,
6830 numDevices: ::std::os::raw::c_int,
6831 flags: ::std::os::raw::c_uint,
6832 ) -> hipError_t;
6833}
6834extern "C" {
6835 #[doc = " @brief Launches a HIP kernel using a generic function pointer and the specified configuration.\n @ingroup Execution\n\n This function is equivalent to hipLaunchKernelEx but accepts the kernel as a generic function\n pointer.\n\n @param [in] config Pointer to the kernel launch configuration structure.\n @param [in] fPtr Pointer to the device kernel function.\n @param [in] args Array of pointers to the kernel arguments.\n\n @returns #hipSuccess if the kernel is launched successfully, otherwise an appropriate error code."]
6836 pub fn hipLaunchKernelExC(
6837 config: *const hipLaunchConfig_t,
6838 fPtr: *const ::std::os::raw::c_void,
6839 args: *mut *mut ::std::os::raw::c_void,
6840 ) -> hipError_t;
6841}
6842extern "C" {
6843 #[doc = " @brief Launches a HIP kernel using the driver API with the specified configuration.\n @ingroup Execution\n\n This function dispatches the device kernel represented by a HIP function object.\n It passes both the kernel parameters and any extra configuration arguments to the kernel launch.\n\n @param [in] config Pointer to the kernel launch configuration structure.\n @param [in] f HIP function object representing the device kernel to be launched.\n @param [in] params Array of pointers to the kernel parameters.\n @param [in] extra Array of pointers for additional launch parameters or extra configuration\n data.\n\n @returns #hipSuccess if the kernel is launched successfully, otherwise an appropriate error code."]
6844 pub fn hipDrvLaunchKernelEx(
6845 config: *const HIP_LAUNCH_CONFIG,
6846 f: hipFunction_t,
6847 params: *mut *mut ::std::os::raw::c_void,
6848 extra: *mut *mut ::std::os::raw::c_void,
6849 ) -> hipError_t;
6850}
6851extern "C" {
6852 #[doc = " @brief Returns a handle for the address range requested.\n\n This function returns a handle to a device pointer created using either hipMalloc set of APIs\n or through hipMemAddressReserve (as long as the ptr is mapped).\n\n @param [out] handle Ptr to the handle where the fd or other types will be returned.\n @param [in] dptr Device ptr for which we get the handle.\n @param [in] size Size of the address range.\n @param [in] handleType Type of the handle requested for the address range.\n @param [in] flags Any flags set regarding the handle requested.\n\n @returns #hipSuccess if the kernel is launched successfully, otherwise an appropriate error code."]
6853 pub fn hipMemGetHandleForAddressRange(
6854 handle: *mut ::std::os::raw::c_void,
6855 dptr: hipDeviceptr_t,
6856 size: usize,
6857 handleType: hipMemRangeHandleType,
6858 flags: ::std::os::raw::c_ulonglong,
6859 ) -> hipError_t;
6860}
6861extern "C" {
6862 #[doc = "-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup Occupancy Occupancy\n @{\n This section describes the occupancy functions of HIP runtime API.\n\n/\n/**\n @brief determine the grid and block sizes to achieves maximum occupancy for a kernel\n\n @param [out] gridSize minimum grid size for maximum potential occupancy\n @param [out] blockSize block size for maximum potential occupancy\n @param [in] f kernel function for which occupancy is calulated\n @param [in] dynSharedMemPerBlk dynamic shared memory usage (in bytes) intended for each block\n @param [in] blockSizeLimit the maximum block size for the kernel, use 0 for no limit\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
6863 pub fn hipModuleOccupancyMaxPotentialBlockSize(
6864 gridSize: *mut ::std::os::raw::c_int,
6865 blockSize: *mut ::std::os::raw::c_int,
6866 f: hipFunction_t,
6867 dynSharedMemPerBlk: usize,
6868 blockSizeLimit: ::std::os::raw::c_int,
6869 ) -> hipError_t;
6870}
6871extern "C" {
6872 #[doc = " @brief determine the grid and block sizes to achieves maximum occupancy for a kernel\n\n @param [out] gridSize minimum grid size for maximum potential occupancy\n @param [out] blockSize block size for maximum potential occupancy\n @param [in] f kernel function for which occupancy is calulated\n @param [in] dynSharedMemPerBlk dynamic shared memory usage (in bytes) intended for each block\n @param [in] blockSizeLimit the maximum block size for the kernel, use 0 for no limit\n @param [in] flags Extra flags for occupancy calculation (only default supported)\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
6873 pub fn hipModuleOccupancyMaxPotentialBlockSizeWithFlags(
6874 gridSize: *mut ::std::os::raw::c_int,
6875 blockSize: *mut ::std::os::raw::c_int,
6876 f: hipFunction_t,
6877 dynSharedMemPerBlk: usize,
6878 blockSizeLimit: ::std::os::raw::c_int,
6879 flags: ::std::os::raw::c_uint,
6880 ) -> hipError_t;
6881}
6882extern "C" {
6883 #[doc = " @brief Returns occupancy for a device function.\n\n @param [out] numBlocks Returned occupancy\n @param [in] f Kernel function (hipFunction) for which occupancy is calulated\n @param [in] blockSize Block size the kernel is intended to be launched with\n @param [in] dynSharedMemPerBlk Dynamic shared memory usage (in bytes) intended for each block\n @returns #hipSuccess, #hipErrorInvalidValue"]
6884 pub fn hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(
6885 numBlocks: *mut ::std::os::raw::c_int,
6886 f: hipFunction_t,
6887 blockSize: ::std::os::raw::c_int,
6888 dynSharedMemPerBlk: usize,
6889 ) -> hipError_t;
6890}
6891extern "C" {
6892 #[doc = " @brief Returns occupancy for a device function.\n\n @param [out] numBlocks Returned occupancy\n @param [in] f Kernel function(hipFunction_t) for which occupancy is calulated\n @param [in] blockSize Block size the kernel is intended to be launched with\n @param [in] dynSharedMemPerBlk Dynamic shared memory usage (in bytes) intended for each block\n @param [in] flags Extra flags for occupancy calculation (only default supported)\n @returns #hipSuccess, #hipErrorInvalidValue"]
6893 pub fn hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
6894 numBlocks: *mut ::std::os::raw::c_int,
6895 f: hipFunction_t,
6896 blockSize: ::std::os::raw::c_int,
6897 dynSharedMemPerBlk: usize,
6898 flags: ::std::os::raw::c_uint,
6899 ) -> hipError_t;
6900}
6901extern "C" {
6902 #[doc = " @brief Returns occupancy for a device function.\n\n @param [out] numBlocks Returned occupancy\n @param [in] f Kernel function for which occupancy is calulated\n @param [in] blockSize Block size the kernel is intended to be launched with\n @param [in] dynSharedMemPerBlk Dynamic shared memory usage (in bytes) intended for each block\n @returns #hipSuccess, #hipErrorInvalidDeviceFunction, #hipErrorInvalidValue"]
6903 pub fn hipOccupancyMaxActiveBlocksPerMultiprocessor(
6904 numBlocks: *mut ::std::os::raw::c_int,
6905 f: *const ::std::os::raw::c_void,
6906 blockSize: ::std::os::raw::c_int,
6907 dynSharedMemPerBlk: usize,
6908 ) -> hipError_t;
6909}
6910extern "C" {
6911 #[doc = " @brief Returns occupancy for a device function.\n\n @param [out] numBlocks Returned occupancy\n @param [in] f Kernel function for which occupancy is calulated\n @param [in] blockSize Block size the kernel is intended to be launched with\n @param [in] dynSharedMemPerBlk Dynamic shared memory usage (in bytes) intended for each block\n @param [in] flags Extra flags for occupancy calculation (currently ignored)\n @returns #hipSuccess, #hipErrorInvalidDeviceFunction, #hipErrorInvalidValue"]
6912 pub fn hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
6913 numBlocks: *mut ::std::os::raw::c_int,
6914 f: *const ::std::os::raw::c_void,
6915 blockSize: ::std::os::raw::c_int,
6916 dynSharedMemPerBlk: usize,
6917 flags: ::std::os::raw::c_uint,
6918 ) -> hipError_t;
6919}
6920extern "C" {
6921 #[doc = " @brief determine the grid and block sizes to achieves maximum occupancy for a kernel\n\n @param [out] gridSize minimum grid size for maximum potential occupancy\n @param [out] blockSize block size for maximum potential occupancy\n @param [in] f kernel function for which occupancy is calulated\n @param [in] dynSharedMemPerBlk dynamic shared memory usage (in bytes) intended for each block\n @param [in] blockSizeLimit the maximum block size for the kernel, use 0 for no limit\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
6922 pub fn hipOccupancyMaxPotentialBlockSize(
6923 gridSize: *mut ::std::os::raw::c_int,
6924 blockSize: *mut ::std::os::raw::c_int,
6925 f: *const ::std::os::raw::c_void,
6926 dynSharedMemPerBlk: usize,
6927 blockSizeLimit: ::std::os::raw::c_int,
6928 ) -> hipError_t;
6929}
6930extern "C" {
6931 #[doc = " @brief Start recording of profiling information [Deprecated]\n When using this API, start the profiler with profiling disabled. (--startdisabled)\n @returns #hipErrorNotSupported\n @warning hipProfilerStart API is deprecated, use roctracer/rocTX instead."]
6932 pub fn hipProfilerStart() -> hipError_t;
6933}
6934extern "C" {
6935 #[doc = " @brief Stop recording of profiling information [Deprecated]\n When using this API, start the profiler with profiling disabled. (--startdisabled)\n @returns #hipErrorNotSupported\n @warning hipProfilerStart API is deprecated, use roctracer/rocTX instead."]
6936 pub fn hipProfilerStop() -> hipError_t;
6937}
6938extern "C" {
6939 #[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup Clang Launch API to support the triple-chevron syntax\n @{\n This section describes the API to support the triple-chevron syntax.\n/\n/**\n @brief Configure a kernel launch.\n\n @param [in] gridDim grid dimension specified as multiple of blockDim.\n @param [in] blockDim block dimensions specified in work-items\n @param [in] sharedMem Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream Stream where the kernel should be dispatched. May be 0, in which case the\n default stream is used with associated synchronization rules.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue\n"]
6940 pub fn hipConfigureCall(
6941 gridDim: dim3,
6942 blockDim: dim3,
6943 sharedMem: usize,
6944 stream: hipStream_t,
6945 ) -> hipError_t;
6946}
6947extern "C" {
6948 #[doc = " @brief Set a kernel argument.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue\n\n @param [in] arg Pointer the argument in host memory.\n @param [in] size Size of the argument.\n @param [in] offset Offset of the argument on the argument stack.\n"]
6949 pub fn hipSetupArgument(
6950 arg: *const ::std::os::raw::c_void,
6951 size: usize,
6952 offset: usize,
6953 ) -> hipError_t;
6954}
6955extern "C" {
6956 #[doc = " @brief Launch a kernel.\n\n @param [in] func Kernel to launch.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue\n"]
6957 pub fn hipLaunchByPtr(func: *const ::std::os::raw::c_void) -> hipError_t;
6958}
6959extern "C" {
6960 #[doc = " @brief Push configuration of a kernel launch.\n\n @param [in] gridDim grid dimension specified as multiple of blockDim.\n @param [in] blockDim block dimensions specified in work-items\n @param [in] sharedMem Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream Stream where the kernel should be dispatched. May be 0, in which case the\n default stream is used with associated synchronization rules.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue\n"]
6961 pub fn __hipPushCallConfiguration(
6962 gridDim: dim3,
6963 blockDim: dim3,
6964 sharedMem: usize,
6965 stream: hipStream_t,
6966 ) -> hipError_t;
6967}
6968extern "C" {
6969 #[doc = " @brief Pop configuration of a kernel launch.\n\n @param [out] gridDim grid dimension specified as multiple of blockDim.\n @param [out] blockDim block dimensions specified in work-items\n @param [out] sharedMem Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [out] stream Stream where the kernel should be dispatched. May be 0, in which case the\n default stream is used with associated synchronization rules.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue\n"]
6970 pub fn __hipPopCallConfiguration(
6971 gridDim: *mut dim3,
6972 blockDim: *mut dim3,
6973 sharedMem: *mut usize,
6974 stream: *mut hipStream_t,
6975 ) -> hipError_t;
6976}
6977extern "C" {
6978 #[doc = " @brief C compliant kernel launch API\n\n @param [in] function_address - Kernel stub function pointer.\n @param [in] numBlocks - Number of blocks.\n @param [in] dimBlocks - Dimension of a block\n @param [in] args - Pointer of arguments passed to the kernel. If the kernel has multiple\n parameters, 'args' should be array of pointers, each points the corresponding argument.\n @param [in] sharedMemBytes - Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream - Stream where the kernel should be dispatched. May be 0, in which case th\n default stream is used with associated synchronization rules.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
6979 pub fn hipLaunchKernel(
6980 function_address: *const ::std::os::raw::c_void,
6981 numBlocks: dim3,
6982 dimBlocks: dim3,
6983 args: *mut *mut ::std::os::raw::c_void,
6984 sharedMemBytes: usize,
6985 stream: hipStream_t,
6986 ) -> hipError_t;
6987}
6988extern "C" {
6989 #[doc = " @brief Enqueues a host function call in a stream.\n\n @param [in] stream - The stream to enqueue work in.\n @param [in] fn - The function to call once enqueued preceeding operations are complete.\n @param [in] userData - User-specified data to be passed to the function.\n\n @returns #hipSuccess, #hipErrorInvalidResourceHandle, #hipErrorInvalidValue,\n #hipErrorNotSupported\n\n The host function to call in this API will be executed after the preceding operations in\n the stream are complete. The function is a blocking operation that blocks operations in the\n stream that follow it, until the function is returned.\n Event synchronization and internal callback functions make sure enqueued operations will\n execute in order, in the stream.\n\n The host function must not make any HIP API calls. The host function is non-reentrant. It must\n not perform sychronization with any operation that may depend on other processing execution\n but is not enqueued to run earlier in the stream.\n\n Host functions that are enqueued respectively in different non-blocking streams can run\n concurrently.\n\n @warning This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
6990 pub fn hipLaunchHostFunc(
6991 stream: hipStream_t,
6992 fn_: hipHostFn_t,
6993 userData: *mut ::std::os::raw::c_void,
6994 ) -> hipError_t;
6995}
6996extern "C" {
6997 #[doc = " Copies memory for 2D arrays.\n\n @param pCopy - Parameters for the memory copy\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
6998 pub fn hipDrvMemcpy2DUnaligned(pCopy: *const hip_Memcpy2D) -> hipError_t;
6999}
7000extern "C" {
7001 #[doc = " @brief Launches kernel from the pointer address, with arguments and shared memory on stream.\n\n @param [in] function_address - Pointer to the Kernel to launch.\n @param [in] numBlocks - Number of blocks.\n @param [in] dimBlocks - Dimension of a block.\n @param [in] args - Pointer of arguments passed to the kernel. If the kernel has multiple\n parameters, 'args' should be array of pointers, each points the corresponding argument.\n @param [in] sharedMemBytes - Amount of dynamic shared memory to allocate for this kernel.\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream - Stream where the kernel should be dispatched.\n May be 0, in which case the default stream is used with associated synchronization rules.\n @param [in] startEvent - If non-null, specified event will be updated to track the start time of\n the kernel launch. The event must be created before calling this API.\n @param [in] stopEvent - If non-null, specified event will be updated to track the stop time of\n the kernel launch. The event must be created before calling this API.\n @param [in] flags - The value of hipExtAnyOrderLaunch, signifies if kernel can be\n launched in any order.\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue.\n"]
7002 pub fn hipExtLaunchKernel(
7003 function_address: *const ::std::os::raw::c_void,
7004 numBlocks: dim3,
7005 dimBlocks: dim3,
7006 args: *mut *mut ::std::os::raw::c_void,
7007 sharedMemBytes: usize,
7008 stream: hipStream_t,
7009 startEvent: hipEvent_t,
7010 stopEvent: hipEvent_t,
7011 flags: ::std::os::raw::c_int,
7012 ) -> hipError_t;
7013}
7014extern "C" {
7015 #[doc = " @brief Creates a texture object.\n\n @param [out] pTexObject pointer to the texture object to create\n @param [in] pResDesc pointer to resource descriptor\n @param [in] pTexDesc pointer to texture descriptor\n @param [in] pResViewDesc pointer to resource view descriptor\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported, #hipErrorOutOfMemory\n\n @note 3D linear filter isn't supported on GFX90A boards, on which the API @p\n hipCreateTextureObject will return hipErrorNotSupported.\n"]
7016 pub fn hipCreateTextureObject(
7017 pTexObject: *mut hipTextureObject_t,
7018 pResDesc: *const hipResourceDesc,
7019 pTexDesc: *const hipTextureDesc,
7020 pResViewDesc: *const hipResourceViewDesc,
7021 ) -> hipError_t;
7022}
7023extern "C" {
7024 #[doc = " @brief Destroys a texture object.\n\n @param [in] textureObject texture object to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7025 pub fn hipDestroyTextureObject(textureObject: hipTextureObject_t) -> hipError_t;
7026}
7027extern "C" {
7028 #[doc = " @brief Gets the channel descriptor in an array.\n\n @param [in] desc pointer to channel format descriptor\n @param [out] array memory array on the device\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7029 pub fn hipGetChannelDesc(
7030 desc: *mut hipChannelFormatDesc,
7031 array: hipArray_const_t,
7032 ) -> hipError_t;
7033}
7034extern "C" {
7035 #[doc = " @brief Gets resource descriptor for the texture object.\n\n @param [out] pResDesc pointer to resource descriptor\n @param [in] textureObject texture object\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7036 pub fn hipGetTextureObjectResourceDesc(
7037 pResDesc: *mut hipResourceDesc,
7038 textureObject: hipTextureObject_t,
7039 ) -> hipError_t;
7040}
7041extern "C" {
7042 #[doc = " @brief Gets resource view descriptor for the texture object.\n\n @param [out] pResViewDesc pointer to resource view descriptor\n @param [in] textureObject texture object\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7043 pub fn hipGetTextureObjectResourceViewDesc(
7044 pResViewDesc: *mut hipResourceViewDesc,
7045 textureObject: hipTextureObject_t,
7046 ) -> hipError_t;
7047}
7048extern "C" {
7049 #[doc = " @brief Gets texture descriptor for the texture object.\n\n @param [out] pTexDesc pointer to texture descriptor\n @param [in] textureObject texture object\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7050 pub fn hipGetTextureObjectTextureDesc(
7051 pTexDesc: *mut hipTextureDesc,
7052 textureObject: hipTextureObject_t,
7053 ) -> hipError_t;
7054}
7055extern "C" {
7056 #[doc = " @brief Creates a texture object.\n\n @param [out] pTexObject pointer to texture object to create\n @param [in] pResDesc pointer to resource descriptor\n @param [in] pTexDesc pointer to texture descriptor\n @param [in] pResViewDesc pointer to resource view descriptor\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7057 pub fn hipTexObjectCreate(
7058 pTexObject: *mut hipTextureObject_t,
7059 pResDesc: *const HIP_RESOURCE_DESC,
7060 pTexDesc: *const HIP_TEXTURE_DESC,
7061 pResViewDesc: *const HIP_RESOURCE_VIEW_DESC,
7062 ) -> hipError_t;
7063}
7064extern "C" {
7065 #[doc = " @brief Destroys a texture object.\n\n @param [in] texObject texture object to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7066 pub fn hipTexObjectDestroy(texObject: hipTextureObject_t) -> hipError_t;
7067}
7068extern "C" {
7069 #[doc = " @brief Gets resource descriptor of a texture object.\n\n @param [out] pResDesc pointer to resource descriptor\n @param [in] texObject texture object\n\n @returns #hipSuccess, #hipErrorNotSupported, #hipErrorInvalidValue\n"]
7070 pub fn hipTexObjectGetResourceDesc(
7071 pResDesc: *mut HIP_RESOURCE_DESC,
7072 texObject: hipTextureObject_t,
7073 ) -> hipError_t;
7074}
7075extern "C" {
7076 #[doc = " @brief Gets resource view descriptor of a texture object.\n\n @param [out] pResViewDesc pointer to resource view descriptor\n @param [in] texObject texture object\n\n @returns #hipSuccess, #hipErrorNotSupported, #hipErrorInvalidValue\n"]
7077 pub fn hipTexObjectGetResourceViewDesc(
7078 pResViewDesc: *mut HIP_RESOURCE_VIEW_DESC,
7079 texObject: hipTextureObject_t,
7080 ) -> hipError_t;
7081}
7082extern "C" {
7083 #[doc = " @brief Gets texture descriptor of a texture object.\n\n @param [out] pTexDesc pointer to texture descriptor\n @param [in] texObject texture object\n\n @returns #hipSuccess, #hipErrorNotSupported, #hipErrorInvalidValue\n"]
7084 pub fn hipTexObjectGetTextureDesc(
7085 pTexDesc: *mut HIP_TEXTURE_DESC,
7086 texObject: hipTextureObject_t,
7087 ) -> hipError_t;
7088}
7089extern "C" {
7090 #[doc = " @brief Allocate a mipmapped array on the device.\n\n @param[out] mipmappedArray - Pointer to allocated mipmapped array in device memory\n @param[in] desc - Requested channel format\n @param[in] extent - Requested allocation size (width field in elements)\n @param[in] numLevels - Number of mipmap levels to allocate\n @param[in] flags - Flags for extensions\n\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryAllocation\n\n @note This API is implemented on Linux and is under development on Microsoft Windows.\n"]
7091 pub fn hipMallocMipmappedArray(
7092 mipmappedArray: *mut hipMipmappedArray_t,
7093 desc: *const hipChannelFormatDesc,
7094 extent: hipExtent,
7095 numLevels: ::std::os::raw::c_uint,
7096 flags: ::std::os::raw::c_uint,
7097 ) -> hipError_t;
7098}
7099extern "C" {
7100 #[doc = " @brief Frees a mipmapped array on the device.\n\n @param[in] mipmappedArray - Pointer to mipmapped array to free\n\n @return #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux and is under development on Microsoft Windows.\n"]
7101 pub fn hipFreeMipmappedArray(mipmappedArray: hipMipmappedArray_t) -> hipError_t;
7102}
7103extern "C" {
7104 #[doc = " @brief Gets a mipmap level of a HIP mipmapped array.\n\n @param[out] levelArray - Returned mipmap level HIP array\n @param[in] mipmappedArray - HIP mipmapped array\n @param[in] level - Mipmap level\n\n @return #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux and is under development on Microsoft Windows.\n"]
7105 pub fn hipGetMipmappedArrayLevel(
7106 levelArray: *mut hipArray_t,
7107 mipmappedArray: hipMipmappedArray_const_t,
7108 level: ::std::os::raw::c_uint,
7109 ) -> hipError_t;
7110}
7111extern "C" {
7112 #[doc = " @brief Create a mipmapped array.\n\n @param [out] pHandle pointer to mipmapped array\n @param [in] pMipmappedArrayDesc mipmapped array descriptor\n @param [in] numMipmapLevels mipmap level\n\n @returns #hipSuccess, #hipErrorNotSupported, #hipErrorInvalidValue\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
7113 pub fn hipMipmappedArrayCreate(
7114 pHandle: *mut hipMipmappedArray_t,
7115 pMipmappedArrayDesc: *mut HIP_ARRAY3D_DESCRIPTOR,
7116 numMipmapLevels: ::std::os::raw::c_uint,
7117 ) -> hipError_t;
7118}
7119extern "C" {
7120 #[doc = " @brief Destroy a mipmapped array.\n\n @param [out] hMipmappedArray pointer to mipmapped array to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux and is under development on Microsoft Windows.\n"]
7121 pub fn hipMipmappedArrayDestroy(hMipmappedArray: hipMipmappedArray_t) -> hipError_t;
7122}
7123extern "C" {
7124 #[doc = " @brief Get a mipmapped array on a mipmapped level.\n\n @param [in] pLevelArray Pointer of array\n @param [out] hMipMappedArray Pointer of mipmapped array on the requested mipmap level\n @param [out] level Mipmap level\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux and is under development on Microsoft Windows.\n"]
7125 pub fn hipMipmappedArrayGetLevel(
7126 pLevelArray: *mut hipArray_t,
7127 hMipMappedArray: hipMipmappedArray_t,
7128 level: ::std::os::raw::c_uint,
7129 ) -> hipError_t;
7130}
7131extern "C" {
7132 #[doc = " @brief Binds a mipmapped array to a texture [Deprecated]\n\n @param [in] tex pointer to the texture reference to bind\n @param [in] mipmappedArray memory mipmapped array on the device\n @param [in] desc opointer to the channel format\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7133 pub fn hipBindTextureToMipmappedArray(
7134 tex: *const textureReference,
7135 mipmappedArray: hipMipmappedArray_const_t,
7136 desc: *const hipChannelFormatDesc,
7137 ) -> hipError_t;
7138}
7139extern "C" {
7140 #[doc = " @brief Gets the texture reference related with the symbol [Deprecated]\n\n @param [out] texref texture reference\n @param [in] symbol pointer to the symbol related with the texture for the reference\n\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning This API is deprecated.\n"]
7141 pub fn hipGetTextureReference(
7142 texref: *mut *const textureReference,
7143 symbol: *const ::std::os::raw::c_void,
7144 ) -> hipError_t;
7145}
7146extern "C" {
7147 #[doc = " @brief Gets the border color used by a texture reference [Deprecated]\n\n @param [out] pBorderColor Returned Type and Value of RGBA color.\n @param [in] texRef Texture reference.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning This API is deprecated.\n"]
7148 pub fn hipTexRefGetBorderColor(
7149 pBorderColor: *mut f32,
7150 texRef: *const textureReference,
7151 ) -> hipError_t;
7152}
7153extern "C" {
7154 #[doc = " @brief Gets the array bound to a texture reference [Deprecated]\n\n\n @param [in] pArray Returned array.\n @param [in] texRef texture reference.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning This API is deprecated.\n"]
7155 pub fn hipTexRefGetArray(
7156 pArray: *mut hipArray_t,
7157 texRef: *const textureReference,
7158 ) -> hipError_t;
7159}
7160extern "C" {
7161 #[doc = " @brief Sets address mode for a texture reference [Deprecated]\n\n @param [in] texRef texture reference.\n @param [in] dim Dimension of the texture.\n @param [in] am Value of the texture address mode.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n @warning This API is deprecated.\n"]
7162 pub fn hipTexRefSetAddressMode(
7163 texRef: *mut textureReference,
7164 dim: ::std::os::raw::c_int,
7165 am: hipTextureAddressMode,
7166 ) -> hipError_t;
7167}
7168extern "C" {
7169 #[doc = " @brief Binds an array as a texture reference [Deprecated]\n\n @param [in] tex Pointer texture reference.\n @param [in] array Array to bind.\n @param [in] flags Flags should be set as HIP_TRSA_OVERRIDE_FORMAT, as a valid value.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is deprecated.\n"]
7170 pub fn hipTexRefSetArray(
7171 tex: *mut textureReference,
7172 array: hipArray_const_t,
7173 flags: ::std::os::raw::c_uint,
7174 ) -> hipError_t;
7175}
7176extern "C" {
7177 #[doc = " @brief Set filter mode for a texture reference [Deprecated]\n\n @param [in] texRef Pointer texture reference.\n @param [in] fm Value of texture filter mode.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is deprecated.\n"]
7178 pub fn hipTexRefSetFilterMode(
7179 texRef: *mut textureReference,
7180 fm: hipTextureFilterMode,
7181 ) -> hipError_t;
7182}
7183extern "C" {
7184 #[doc = " @brief Set flags for a texture reference [Deprecated]\n\n @param [in] texRef Pointer texture reference.\n @param [in] Flags Value of flags.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is deprecated.\n"]
7185 pub fn hipTexRefSetFlags(
7186 texRef: *mut textureReference,
7187 Flags: ::std::os::raw::c_uint,
7188 ) -> hipError_t;
7189}
7190extern "C" {
7191 #[doc = " @brief Set format for a texture reference [Deprecated]\n\n @param [in] texRef Pointer texture reference.\n @param [in] fmt Value of format.\n @param [in] NumPackedComponents Number of components per array.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is deprecated.\n"]
7192 pub fn hipTexRefSetFormat(
7193 texRef: *mut textureReference,
7194 fmt: hipArray_Format,
7195 NumPackedComponents: ::std::os::raw::c_int,
7196 ) -> hipError_t;
7197}
7198extern "C" {
7199 #[doc = " @brief Binds a memory area to a texture [Deprecated]\n\n @param [in] offset Offset in bytes.\n @param [in] tex Texture to bind.\n @param [in] devPtr Pointer of memory on the device.\n @param [in] desc Pointer of channel format descriptor.\n @param [in] size Size of memory in bites.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7200 pub fn hipBindTexture(
7201 offset: *mut usize,
7202 tex: *const textureReference,
7203 devPtr: *const ::std::os::raw::c_void,
7204 desc: *const hipChannelFormatDesc,
7205 size: usize,
7206 ) -> hipError_t;
7207}
7208extern "C" {
7209 #[doc = " @brief Binds a 2D memory area to a texture [Deprecated]\n\n @param [in] offset Offset in bytes.\n @param [in] tex Texture to bind.\n @param [in] devPtr Pointer of 2D memory area on the device.\n @param [in] desc Pointer of channel format descriptor.\n @param [in] width Width in texel units.\n @param [in] height Height in texel units.\n @param [in] pitch Pitch in bytes.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7210 pub fn hipBindTexture2D(
7211 offset: *mut usize,
7212 tex: *const textureReference,
7213 devPtr: *const ::std::os::raw::c_void,
7214 desc: *const hipChannelFormatDesc,
7215 width: usize,
7216 height: usize,
7217 pitch: usize,
7218 ) -> hipError_t;
7219}
7220extern "C" {
7221 #[doc = " @brief Binds a memory area to a texture [Deprecated]\n\n @param [in] tex Pointer of texture reference.\n @param [in] array Array to bind.\n @param [in] desc Pointer of channel format descriptor.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7222 pub fn hipBindTextureToArray(
7223 tex: *const textureReference,
7224 array: hipArray_const_t,
7225 desc: *const hipChannelFormatDesc,
7226 ) -> hipError_t;
7227}
7228extern "C" {
7229 #[doc = " @brief Get the offset of the alignment in a texture [Deprecated]\n\n @param [in] offset Offset in bytes.\n @param [in] texref Pointer of texture reference.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7230 pub fn hipGetTextureAlignmentOffset(
7231 offset: *mut usize,
7232 texref: *const textureReference,
7233 ) -> hipError_t;
7234}
7235extern "C" {
7236 #[doc = " @brief Unbinds a texture [Deprecated]\n\n @param [in] tex Texture to unbind.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7237 pub fn hipUnbindTexture(tex: *const textureReference) -> hipError_t;
7238}
7239extern "C" {
7240 #[doc = " @brief Gets the address for a texture reference [Deprecated]\n\n @param [out] dev_ptr Pointer of device address.\n @param [in] texRef Pointer of texture reference.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7241 pub fn hipTexRefGetAddress(
7242 dev_ptr: *mut hipDeviceptr_t,
7243 texRef: *const textureReference,
7244 ) -> hipError_t;
7245}
7246extern "C" {
7247 #[doc = " @brief Gets the address mode for a texture reference [Deprecated]\n\n @param [out] pam Pointer of address mode.\n @param [in] texRef Pointer of texture reference.\n @param [in] dim Dimension.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7248 pub fn hipTexRefGetAddressMode(
7249 pam: *mut hipTextureAddressMode,
7250 texRef: *const textureReference,
7251 dim: ::std::os::raw::c_int,
7252 ) -> hipError_t;
7253}
7254extern "C" {
7255 #[doc = " @brief Gets filter mode for a texture reference [Deprecated]\n\n @param [out] pfm Pointer of filter mode.\n @param [in] texRef Pointer of texture reference.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7256 pub fn hipTexRefGetFilterMode(
7257 pfm: *mut hipTextureFilterMode,
7258 texRef: *const textureReference,
7259 ) -> hipError_t;
7260}
7261extern "C" {
7262 #[doc = " @brief Gets flags for a texture reference [Deprecated]\n\n @param [out] pFlags Pointer of flags.\n @param [in] texRef Pointer of texture reference.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7263 pub fn hipTexRefGetFlags(
7264 pFlags: *mut ::std::os::raw::c_uint,
7265 texRef: *const textureReference,
7266 ) -> hipError_t;
7267}
7268extern "C" {
7269 #[doc = " @brief Gets texture format for a texture reference [Deprecated]\n\n @param [out] pFormat Pointer of the format.\n @param [out] pNumChannels Pointer of number of channels.\n @param [in] texRef Pointer of texture reference.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7270 pub fn hipTexRefGetFormat(
7271 pFormat: *mut hipArray_Format,
7272 pNumChannels: *mut ::std::os::raw::c_int,
7273 texRef: *const textureReference,
7274 ) -> hipError_t;
7275}
7276extern "C" {
7277 #[doc = " @brief Gets the maximum anisotropy for a texture reference [Deprecated]\n\n @param [out] pmaxAnsio Pointer of the maximum anisotropy.\n @param [in] texRef Pointer of texture reference.\n\n @returns #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7278 pub fn hipTexRefGetMaxAnisotropy(
7279 pmaxAnsio: *mut ::std::os::raw::c_int,
7280 texRef: *const textureReference,
7281 ) -> hipError_t;
7282}
7283extern "C" {
7284 #[doc = " @brief Gets the mipmap filter mode for a texture reference [Deprecated]\n\n @param [out] pfm Pointer of the mipmap filter mode.\n @param [in] texRef Pointer of texture reference.\n\n @returns #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7285 pub fn hipTexRefGetMipmapFilterMode(
7286 pfm: *mut hipTextureFilterMode,
7287 texRef: *const textureReference,
7288 ) -> hipError_t;
7289}
7290extern "C" {
7291 #[doc = " @brief Gets the mipmap level bias for a texture reference [Deprecated]\n\n @param [out] pbias Pointer of the mipmap level bias.\n @param [in] texRef Pointer of texture reference.\n\n @returns #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7292 pub fn hipTexRefGetMipmapLevelBias(
7293 pbias: *mut f32,
7294 texRef: *const textureReference,
7295 ) -> hipError_t;
7296}
7297extern "C" {
7298 #[doc = " @brief Gets the minimum and maximum mipmap level clamps for a texture reference [Deprecated]\n\n @param [out] pminMipmapLevelClamp Pointer of the minimum mipmap level clamp.\n @param [out] pmaxMipmapLevelClamp Pointer of the maximum mipmap level clamp.\n @param [in] texRef Pointer of texture reference.\n\n @returns #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7299 pub fn hipTexRefGetMipmapLevelClamp(
7300 pminMipmapLevelClamp: *mut f32,
7301 pmaxMipmapLevelClamp: *mut f32,
7302 texRef: *const textureReference,
7303 ) -> hipError_t;
7304}
7305extern "C" {
7306 #[doc = " @brief Gets the mipmapped array bound to a texture reference [Deprecated]\n\n @param [out] pArray Pointer of the mipmapped array.\n @param [in] texRef Pointer of texture reference.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7307 pub fn hipTexRefGetMipMappedArray(
7308 pArray: *mut hipMipmappedArray_t,
7309 texRef: *const textureReference,
7310 ) -> hipError_t;
7311}
7312extern "C" {
7313 #[doc = " @brief Sets an bound address for a texture reference [Deprecated]\n\n @param [out] ByteOffset Pointer of the offset in bytes.\n @param [in] texRef Pointer of texture reference.\n @param [in] dptr Pointer of device address to bind.\n @param [in] bytes Size in bytes.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is deprecated.\n"]
7314 pub fn hipTexRefSetAddress(
7315 ByteOffset: *mut usize,
7316 texRef: *mut textureReference,
7317 dptr: hipDeviceptr_t,
7318 bytes: usize,
7319 ) -> hipError_t;
7320}
7321extern "C" {
7322 #[doc = " @brief Set a bind an address as a 2D texture reference [Deprecated]\n\n @param [in] texRef Pointer of texture reference.\n @param [in] desc Pointer of array descriptor.\n @param [in] dptr Pointer of device address to bind.\n @param [in] Pitch Pitch in bytes.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7323 pub fn hipTexRefSetAddress2D(
7324 texRef: *mut textureReference,
7325 desc: *const HIP_ARRAY_DESCRIPTOR,
7326 dptr: hipDeviceptr_t,
7327 Pitch: usize,
7328 ) -> hipError_t;
7329}
7330extern "C" {
7331 #[doc = " @brief Sets the maximum anisotropy for a texture reference [Deprecated]\n\n @param [in] texRef Pointer of texture reference.\n @param [out] maxAniso Value of the maximum anisotropy.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7332 pub fn hipTexRefSetMaxAnisotropy(
7333 texRef: *mut textureReference,
7334 maxAniso: ::std::os::raw::c_uint,
7335 ) -> hipError_t;
7336}
7337extern "C" {
7338 #[doc = " @brief Sets border color for a texture reference [Deprecated]\n\n @param [in] texRef Pointer of texture reference.\n @param [in] pBorderColor Pointer of border color.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7339 pub fn hipTexRefSetBorderColor(
7340 texRef: *mut textureReference,
7341 pBorderColor: *mut f32,
7342 ) -> hipError_t;
7343}
7344extern "C" {
7345 #[doc = " @brief Sets mipmap filter mode for a texture reference [Deprecated]\n\n @param [in] texRef Pointer of texture reference.\n @param [in] fm Value of filter mode.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7346 pub fn hipTexRefSetMipmapFilterMode(
7347 texRef: *mut textureReference,
7348 fm: hipTextureFilterMode,
7349 ) -> hipError_t;
7350}
7351extern "C" {
7352 #[doc = " @brief Sets mipmap level bias for a texture reference [Deprecated]\n\n @param [in] texRef Pointer of texture reference.\n @param [in] bias Value of mipmap bias.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7353 pub fn hipTexRefSetMipmapLevelBias(texRef: *mut textureReference, bias: f32) -> hipError_t;
7354}
7355extern "C" {
7356 #[doc = " @brief Sets mipmap level clamp for a texture reference [Deprecated]\n\n @param [in] texRef Pointer of texture reference.\n @param [in] minMipMapLevelClamp Value of minimum mipmap level clamp.\n @param [in] maxMipMapLevelClamp Value of maximum mipmap level clamp.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning This API is deprecated.\n"]
7357 pub fn hipTexRefSetMipmapLevelClamp(
7358 texRef: *mut textureReference,
7359 minMipMapLevelClamp: f32,
7360 maxMipMapLevelClamp: f32,
7361 ) -> hipError_t;
7362}
7363extern "C" {
7364 #[doc = " @brief Binds mipmapped array to a texture reference [Deprecated]\n\n @param [in] texRef Pointer of texture reference to bind.\n @param [in] mipmappedArray Pointer of mipmapped array to bind.\n @param [in] Flags Flags should be set as HIP_TRSA_OVERRIDE_FORMAT, as a valid value.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API is deprecated.\n"]
7365 pub fn hipTexRefSetMipmappedArray(
7366 texRef: *mut textureReference,
7367 mipmappedArray: *mut hipMipmappedArray,
7368 Flags: ::std::os::raw::c_uint,
7369 ) -> hipError_t;
7370}
7371extern "C" {
7372 #[doc = " @defgroup Callback Callback Activity APIs\n @{\n This section describes the callback/Activity of HIP runtime API.\n/\n/**\n @brief Returns HIP API name by ID.\n\n @param [in] id ID of HIP API\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7373 pub fn hipApiName(id: u32) -> *const ::std::os::raw::c_char;
7374}
7375extern "C" {
7376 #[doc = " @brief Returns kernel name reference by function name.\n\n @param [in] f Name of function\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7377 pub fn hipKernelNameRef(f: hipFunction_t) -> *const ::std::os::raw::c_char;
7378}
7379extern "C" {
7380 #[doc = " @brief Retrives kernel for a given host pointer, unless stated otherwise.\n\n @param [in] hostFunction Pointer of host function.\n @param [in] stream Stream the kernel is executed on.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7381 pub fn hipKernelNameRefByPtr(
7382 hostFunction: *const ::std::os::raw::c_void,
7383 stream: hipStream_t,
7384 ) -> *const ::std::os::raw::c_char;
7385}
7386extern "C" {
7387 #[doc = " @brief Returns device ID on the stream.\n\n @param [in] stream Stream of device executed on.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7388 pub fn hipGetStreamDeviceId(stream: hipStream_t) -> ::std::os::raw::c_int;
7389}
7390extern "C" {
7391 #[doc = " @brief Begins graph capture on a stream.\n\n @param [in] stream - Stream to initiate capture.\n @param [in] mode - Controls the interaction of this capture sequence with other API calls that\n are not safe.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7392 pub fn hipStreamBeginCapture(stream: hipStream_t, mode: hipStreamCaptureMode) -> hipError_t;
7393}
7394extern "C" {
7395 #[doc = " @brief Begins graph capture on a stream to an existing graph.\n\n @param [in] stream - Stream to initiate capture.\n @param [in] graph - Graph to capture into.\n @param [in] dependencies - Dependencies of the first node captured in the stream. Can be NULL if\n numDependencies is 0.\n @param [in] dependencyData - Optional array of data associated with each dependency.\n @param [in] numDependencies - Number of dependencies.\n @param [in] mode - Controls the interaction of this capture sequence with other API calls that\nare not safe.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning param \"const hipGraphEdgeData* dependencyData\" is currently not supported and has to be\npassed as nullptr. This API is marked as beta, meaning, while this is feature complete, it is still\nopen to changes and may have outstanding issues."]
7396 pub fn hipStreamBeginCaptureToGraph(
7397 stream: hipStream_t,
7398 graph: hipGraph_t,
7399 dependencies: *const hipGraphNode_t,
7400 dependencyData: *const hipGraphEdgeData,
7401 numDependencies: usize,
7402 mode: hipStreamCaptureMode,
7403 ) -> hipError_t;
7404}
7405extern "C" {
7406 #[doc = " @brief Ends capture on a stream, returning the captured graph.\n\n @param [in] stream - Stream to end capture.\n @param [out] pGraph - Captured graph.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7407 pub fn hipStreamEndCapture(stream: hipStream_t, pGraph: *mut hipGraph_t) -> hipError_t;
7408}
7409extern "C" {
7410 #[doc = " @brief Get capture status of a stream.\n\n @param [in] stream - Stream of which to get capture status from.\n @param [out] pCaptureStatus - Returns current capture status.\n @param [out] pId - Unique capture ID.\n\n @returns #hipSuccess, #hipErrorStreamCaptureImplicit\n"]
7411 pub fn hipStreamGetCaptureInfo(
7412 stream: hipStream_t,
7413 pCaptureStatus: *mut hipStreamCaptureStatus,
7414 pId: *mut ::std::os::raw::c_ulonglong,
7415 ) -> hipError_t;
7416}
7417extern "C" {
7418 #[doc = " @brief Get stream's capture state\n\n @param [in] stream - Stream of which to get capture status from.\n @param [out] captureStatus_out - Returns current capture status.\n @param [out] id_out - Unique capture ID.\n @param [out] graph_out - Returns the graph being captured into.\n @param [out] dependencies_out - Pointer to an array of nodes representing the graphs\n dependencies.\n @param [out] numDependencies_out - Returns size of the array returned in dependencies_out.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorStreamCaptureImplicit\n"]
7419 pub fn hipStreamGetCaptureInfo_v2(
7420 stream: hipStream_t,
7421 captureStatus_out: *mut hipStreamCaptureStatus,
7422 id_out: *mut ::std::os::raw::c_ulonglong,
7423 graph_out: *mut hipGraph_t,
7424 dependencies_out: *mut *const hipGraphNode_t,
7425 numDependencies_out: *mut usize,
7426 ) -> hipError_t;
7427}
7428extern "C" {
7429 #[doc = " @brief Get stream's capture state\n\n @param [in] stream - Stream of which to get capture status from.\n @param [out] pCaptureStatus - Returns current capture status.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorStreamCaptureImplicit\n"]
7430 pub fn hipStreamIsCapturing(
7431 stream: hipStream_t,
7432 pCaptureStatus: *mut hipStreamCaptureStatus,
7433 ) -> hipError_t;
7434}
7435extern "C" {
7436 #[doc = " @brief Update the set of dependencies in a capturing stream\n\n @param [in] stream Stream that is being captured.\n @param [in] dependencies Pointer to an array of nodes to add/replace.\n @param [in] numDependencies Size of the dependencies array.\n @param [in] flags Flag to update dependency set. Should be one of the values\n in enum #hipStreamUpdateCaptureDependenciesFlags.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorIllegalState\n"]
7437 pub fn hipStreamUpdateCaptureDependencies(
7438 stream: hipStream_t,
7439 dependencies: *mut hipGraphNode_t,
7440 numDependencies: usize,
7441 flags: ::std::os::raw::c_uint,
7442 ) -> hipError_t;
7443}
7444extern "C" {
7445 #[doc = " @brief Swaps the stream capture mode of a thread.\n\n @param [in] mode - Pointer to mode value to swap with the current mode.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7446 pub fn hipThreadExchangeStreamCaptureMode(mode: *mut hipStreamCaptureMode) -> hipError_t;
7447}
7448extern "C" {
7449 #[doc = " @brief Creates a graph\n\n @param [out] pGraph - pointer to graph to create.\n @param [in] flags - flags for graph creation, must be 0.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryAllocation\n"]
7450 pub fn hipGraphCreate(pGraph: *mut hipGraph_t, flags: ::std::os::raw::c_uint) -> hipError_t;
7451}
7452extern "C" {
7453 #[doc = " @brief Destroys a graph\n\n @param [in] graph - instance of graph to destroy.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7454 pub fn hipGraphDestroy(graph: hipGraph_t) -> hipError_t;
7455}
7456extern "C" {
7457 #[doc = " @brief Adds dependency edges to a graph.\n\n @param [in] graph - Instance of the graph to add dependencies to.\n @param [in] from - Pointer to the graph nodes with dependencies to add from.\n @param [in] to - Pointer to the graph nodes to add dependencies to.\n @param [in] numDependencies - Number of dependencies to add.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7458 pub fn hipGraphAddDependencies(
7459 graph: hipGraph_t,
7460 from: *const hipGraphNode_t,
7461 to: *const hipGraphNode_t,
7462 numDependencies: usize,
7463 ) -> hipError_t;
7464}
7465extern "C" {
7466 #[doc = " @brief Removes dependency edges from a graph.\n\n @param [in] graph - Instance of the graph to remove dependencies from.\n @param [in] from - Array of nodes that provide the dependencies.\n @param [in] to - Array of dependent nodes.\n @param [in] numDependencies - Number of dependencies to remove.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7467 pub fn hipGraphRemoveDependencies(
7468 graph: hipGraph_t,
7469 from: *const hipGraphNode_t,
7470 to: *const hipGraphNode_t,
7471 numDependencies: usize,
7472 ) -> hipError_t;
7473}
7474extern "C" {
7475 #[doc = " @brief Returns a graph's dependency edges.\n\n @param [in] graph - Instance of the graph to get the edges from.\n @param [out] from - Pointer to the graph nodes to return edge endpoints.\n @param [out] to - Pointer to the graph nodes to return edge endpoints.\n @param [out] numEdges - Returns number of edges.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n from and to may both be NULL, in which case this function only returns the number of edges in\n numEdges. Otherwise, numEdges entries will be filled in. If numEdges is higher than the actual\n number of edges, the remaining entries in from and to will be set to NULL, and the number of\n edges actually returned will be written to numEdges.\n"]
7476 pub fn hipGraphGetEdges(
7477 graph: hipGraph_t,
7478 from: *mut hipGraphNode_t,
7479 to: *mut hipGraphNode_t,
7480 numEdges: *mut usize,
7481 ) -> hipError_t;
7482}
7483extern "C" {
7484 #[doc = " @brief Returns a graph's nodes.\n\n @param [in] graph - Instance of graph to get the nodes from.\n @param [out] nodes - Pointer to return the graph nodes.\n @param [out] numNodes - Returns the number of graph nodes.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n nodes may be NULL, in which case this function will return the number of nodes in numNodes.\n Otherwise, numNodes entries will be filled in. If numNodes is higher than the actual number of\n nodes, the remaining entries in nodes will be set to NULL, and the number of nodes actually\n obtained will be returned in numNodes.\n"]
7485 pub fn hipGraphGetNodes(
7486 graph: hipGraph_t,
7487 nodes: *mut hipGraphNode_t,
7488 numNodes: *mut usize,
7489 ) -> hipError_t;
7490}
7491extern "C" {
7492 #[doc = " @brief Returns a graph's root nodes.\n\n @param [in] graph - Instance of the graph to get the nodes from.\n @param [out] pRootNodes - Pointer to return the graph's root nodes.\n @param [out] pNumRootNodes - Returns the number of graph's root nodes.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n pRootNodes may be NULL, in which case this function will return the number of root nodes in\n pNumRootNodes. Otherwise, pNumRootNodes entries will be filled in. If pNumRootNodes is higher\n than the actual number of root nodes, the remaining entries in pRootNodes will be set to NULL,\n and the number of nodes actually obtained will be returned in pNumRootNodes.\n"]
7493 pub fn hipGraphGetRootNodes(
7494 graph: hipGraph_t,
7495 pRootNodes: *mut hipGraphNode_t,
7496 pNumRootNodes: *mut usize,
7497 ) -> hipError_t;
7498}
7499extern "C" {
7500 #[doc = " @brief Returns a node's dependencies.\n\n @param [in] node - Graph node to get the dependencies from.\n @param [out] pDependencies - Pointer to return the dependencies.\n @param [out] pNumDependencies - Returns the number of graph node dependencies.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n pDependencies may be NULL, in which case this function will return the number of dependencies in\n pNumDependencies. Otherwise, pNumDependencies entries will be filled in. If pNumDependencies is\n higher than the actual number of dependencies, the remaining entries in pDependencies will be set\n to NULL, and the number of nodes actually obtained will be returned in pNumDependencies.\n"]
7501 pub fn hipGraphNodeGetDependencies(
7502 node: hipGraphNode_t,
7503 pDependencies: *mut hipGraphNode_t,
7504 pNumDependencies: *mut usize,
7505 ) -> hipError_t;
7506}
7507extern "C" {
7508 #[doc = " @brief Returns a node's dependent nodes.\n\n @param [in] node - Graph node to get the dependent nodes from.\n @param [out] pDependentNodes - Pointer to return the graph dependent nodes.\n @param [out] pNumDependentNodes - Returns the number of graph node dependent nodes.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n pDependentNodes may be NULL, in which case this function will return the number of dependent\n nodes in pNumDependentNodes. Otherwise, pNumDependentNodes entries will be filled in. If\n pNumDependentNodes is higher than the actual number of dependent nodes, the remaining entries in\n pDependentNodes will be set to NULL, and the number of nodes actually obtained will be returned\n in pNumDependentNodes.\n"]
7509 pub fn hipGraphNodeGetDependentNodes(
7510 node: hipGraphNode_t,
7511 pDependentNodes: *mut hipGraphNode_t,
7512 pNumDependentNodes: *mut usize,
7513 ) -> hipError_t;
7514}
7515extern "C" {
7516 #[doc = " @brief Returns a node's type.\n\n @param [in] node - Node to get type of.\n @param [out] pType - Returns the node's type.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7517 pub fn hipGraphNodeGetType(node: hipGraphNode_t, pType: *mut hipGraphNodeType) -> hipError_t;
7518}
7519extern "C" {
7520 #[doc = " @brief Remove a node from the graph.\n\n @param [in] node - graph node to remove\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7521 pub fn hipGraphDestroyNode(node: hipGraphNode_t) -> hipError_t;
7522}
7523extern "C" {
7524 #[doc = " @brief Clones a graph.\n\n @param [out] pGraphClone - Returns newly created cloned graph.\n @param [in] originalGraph - original graph to clone from.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryAllocation\n"]
7525 pub fn hipGraphClone(pGraphClone: *mut hipGraph_t, originalGraph: hipGraph_t) -> hipError_t;
7526}
7527extern "C" {
7528 #[doc = " @brief Finds a cloned version of a node.\n\n @param [out] pNode - Returns the cloned node.\n @param [in] originalNode - original node handle.\n @param [in] clonedGraph - Cloned graph to query.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7529 pub fn hipGraphNodeFindInClone(
7530 pNode: *mut hipGraphNode_t,
7531 originalNode: hipGraphNode_t,
7532 clonedGraph: hipGraph_t,
7533 ) -> hipError_t;
7534}
7535extern "C" {
7536 #[doc = " @brief Creates an executable graph from a graph\n\n @param [out] pGraphExec - Pointer to instantiated executable graph.\n @param [in] graph - Instance of graph to instantiate.\n @param [out] pErrorNode - Pointer to error node. In case an error occured during\n graph instantiation, it could modify the corresponding node.\n @param [out] pLogBuffer - Pointer to log buffer.\n @param [out] bufferSize - Size of the log buffer.\n\n @returns #hipSuccess, #hipErrorOutOfMemory\n"]
7537 pub fn hipGraphInstantiate(
7538 pGraphExec: *mut hipGraphExec_t,
7539 graph: hipGraph_t,
7540 pErrorNode: *mut hipGraphNode_t,
7541 pLogBuffer: *mut ::std::os::raw::c_char,
7542 bufferSize: usize,
7543 ) -> hipError_t;
7544}
7545extern "C" {
7546 #[doc = " @brief Creates an executable graph from a graph.\n\n @param [out] pGraphExec - Pointer to instantiated executable graph.\n @param [in] graph - Instance of graph to instantiate.\n @param [in] flags - Flags to control instantiation.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning This API does not support any of flag and is behaving as hipGraphInstantiate."]
7547 pub fn hipGraphInstantiateWithFlags(
7548 pGraphExec: *mut hipGraphExec_t,
7549 graph: hipGraph_t,
7550 flags: ::std::os::raw::c_ulonglong,
7551 ) -> hipError_t;
7552}
7553extern "C" {
7554 #[doc = " @brief Creates an executable graph from a graph.\n\n @param [out] pGraphExec - Pointer to instantiated executable graph.\n @param [in] graph - Instance of graph to instantiate.\n @param [in] instantiateParams - Graph instantiation Params\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7555 pub fn hipGraphInstantiateWithParams(
7556 pGraphExec: *mut hipGraphExec_t,
7557 graph: hipGraph_t,
7558 instantiateParams: *mut hipGraphInstantiateParams,
7559 ) -> hipError_t;
7560}
7561extern "C" {
7562 #[doc = " @brief Launches an executable graph in the specified stream.\n\n @param [in] graphExec - Instance of executable graph to launch.\n @param [in] stream - Instance of stream in which to launch executable graph.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7563 pub fn hipGraphLaunch(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
7564}
7565extern "C" {
7566 #[doc = " @brief Uploads an executable graph to a stream\n\n @param [in] graphExec - Instance of executable graph to be uploaded.\n @param [in] stream - Instance of stream to which the executable graph is uploaded to.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7567 pub fn hipGraphUpload(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
7568}
7569extern "C" {
7570 #[doc = " @brief Creates a kernel execution node and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to kernel graph node that is created.\n @param [in] graph - Instance of graph to add the created node to.\n @param [in] pDependencies - Pointer to the dependencies on the kernel execution node.\n @param [in] numDependencies - Number of dependencies.\n @param [in] nodeParams - Pointer to the node parameters.\n @returns #hipSuccess, #hipErrorInvalidValue.\n"]
7571 pub fn hipGraphAddNode(
7572 pGraphNode: *mut hipGraphNode_t,
7573 graph: hipGraph_t,
7574 pDependencies: *const hipGraphNode_t,
7575 numDependencies: usize,
7576 nodeParams: *mut hipGraphNodeParams,
7577 ) -> hipError_t;
7578}
7579extern "C" {
7580 #[doc = " @brief Return the flags of an executable graph.\n\n @param [in] graphExec - Executable graph to get the flags from.\n @param [out] flags - Flags used to instantiate this executable graph.\n @returns #hipSuccess, #hipErrorInvalidValue.\n"]
7581 pub fn hipGraphExecGetFlags(
7582 graphExec: hipGraphExec_t,
7583 flags: *mut ::std::os::raw::c_ulonglong,
7584 ) -> hipError_t;
7585}
7586extern "C" {
7587 #[doc = " @brief Updates parameters of a graph's node.\n\n @param [in] node - Instance of the node to set parameters for.\n @param [in] nodeParams - Pointer to the parameters to be set.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction,\n #hipErrorNotSupported.\n"]
7588 pub fn hipGraphNodeSetParams(
7589 node: hipGraphNode_t,
7590 nodeParams: *mut hipGraphNodeParams,
7591 ) -> hipError_t;
7592}
7593extern "C" {
7594 #[doc = " @brief Updates parameters of an executable graph's node.\n\n @param [in] graphExec - Instance of the executable graph.\n @param [in] node - Instance of the node to set parameters to.\n @param [in] nodeParams - Pointer to the parameters to be set.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction,\n #hipErrorNotSupported.\n"]
7595 pub fn hipGraphExecNodeSetParams(
7596 graphExec: hipGraphExec_t,
7597 node: hipGraphNode_t,
7598 nodeParams: *mut hipGraphNodeParams,
7599 ) -> hipError_t;
7600}
7601extern "C" {
7602 #[doc = " @brief Destroys an executable graph\n\n @param [in] graphExec - Instance of executable graph to destroy.\n\n @returns #hipSuccess.\n"]
7603 pub fn hipGraphExecDestroy(graphExec: hipGraphExec_t) -> hipError_t;
7604}
7605extern "C" {
7606 #[doc = " @brief Check whether an executable graph can be updated with a graph and perform the update if *\n possible.\n\n @param [in] hGraphExec - instance of executable graph to update.\n @param [in] hGraph - graph that contains the updated parameters.\n @param [in] hErrorNode_out - node which caused the permissibility check to forbid the update.\n @param [in] updateResult_out - Return code whether the graph update was performed.\n @returns #hipSuccess, #hipErrorGraphExecUpdateFailure\n"]
7607 pub fn hipGraphExecUpdate(
7608 hGraphExec: hipGraphExec_t,
7609 hGraph: hipGraph_t,
7610 hErrorNode_out: *mut hipGraphNode_t,
7611 updateResult_out: *mut hipGraphExecUpdateResult,
7612 ) -> hipError_t;
7613}
7614extern "C" {
7615 #[doc = " @brief Creates a kernel execution node and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to graph node that is created\n @param [in] graph - Instance of graph to add the created node to.\n @param [in] pDependencies - Pointer to the dependencies of the kernel execution node.\n @param [in] numDependencies - The number of the dependencies.\n @param [in] pNodeParams - Pointer to the parameters of the kernel execution node.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction\n"]
7616 pub fn hipGraphAddKernelNode(
7617 pGraphNode: *mut hipGraphNode_t,
7618 graph: hipGraph_t,
7619 pDependencies: *const hipGraphNode_t,
7620 numDependencies: usize,
7621 pNodeParams: *const hipKernelNodeParams,
7622 ) -> hipError_t;
7623}
7624extern "C" {
7625 #[doc = " @brief Gets kernel node's parameters.\n\n @param [in] node - instance of the node to get parameters from.\n @param [out] pNodeParams - pointer to the parameters\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7626 pub fn hipGraphKernelNodeGetParams(
7627 node: hipGraphNode_t,
7628 pNodeParams: *mut hipKernelNodeParams,
7629 ) -> hipError_t;
7630}
7631extern "C" {
7632 #[doc = " @brief Sets a kernel node's parameters.\n\n @param [in] node - Instance of the node to set parameters of.\n @param [in] pNodeParams - const pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7633 pub fn hipGraphKernelNodeSetParams(
7634 node: hipGraphNode_t,
7635 pNodeParams: *const hipKernelNodeParams,
7636 ) -> hipError_t;
7637}
7638extern "C" {
7639 #[doc = " @brief Sets the parameters for a kernel node in the given graphExec.\n\n @param [in] hGraphExec - Instance of the executable graph with the node.\n @param [in] node - Instance of the node to set parameters of.\n @param [in] pNodeParams - const pointer to the kernel node parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7640 pub fn hipGraphExecKernelNodeSetParams(
7641 hGraphExec: hipGraphExec_t,
7642 node: hipGraphNode_t,
7643 pNodeParams: *const hipKernelNodeParams,
7644 ) -> hipError_t;
7645}
7646extern "C" {
7647 #[doc = " @brief Creates a memcpy node and adds it to a graph.\n\n @param [out] phGraphNode - Pointer to graph node that is created.\n @param [in] hGraph - Instance of graph to add the created node to.\n @param [in] dependencies - const pointer to the dependencies of the memcpy execution node.\n @param [in] numDependencies - The number of dependencies.\n @param [in] copyParams - const pointer to the parameters for the memory copy.\n @param [in] ctx - context related to current device.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7648 pub fn hipDrvGraphAddMemcpyNode(
7649 phGraphNode: *mut hipGraphNode_t,
7650 hGraph: hipGraph_t,
7651 dependencies: *const hipGraphNode_t,
7652 numDependencies: usize,
7653 copyParams: *const HIP_MEMCPY3D,
7654 ctx: hipCtx_t,
7655 ) -> hipError_t;
7656}
7657extern "C" {
7658 #[doc = " @brief Creates a memcpy node and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to graph node that is created.\n @param [in] graph - Instance of graph to add the created node to.\n @param [in] pDependencies - const pointer to the dependencies of the memcpy execution node.\n @param [in] numDependencies - The number of dependencies.\n @param [in] pCopyParams - const pointer to the parameters for the memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7659 pub fn hipGraphAddMemcpyNode(
7660 pGraphNode: *mut hipGraphNode_t,
7661 graph: hipGraph_t,
7662 pDependencies: *const hipGraphNode_t,
7663 numDependencies: usize,
7664 pCopyParams: *const hipMemcpy3DParms,
7665 ) -> hipError_t;
7666}
7667extern "C" {
7668 #[doc = " @brief Gets a memcpy node's parameters.\n\n @param [in] node - instance of the node to get parameters from.\n @param [out] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7669 pub fn hipGraphMemcpyNodeGetParams(
7670 node: hipGraphNode_t,
7671 pNodeParams: *mut hipMemcpy3DParms,
7672 ) -> hipError_t;
7673}
7674extern "C" {
7675 #[doc = " @brief Sets a memcpy node's parameters.\n\n @param [in] node - instance of the node to set parameters to.\n @param [in] pNodeParams - const pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7676 pub fn hipGraphMemcpyNodeSetParams(
7677 node: hipGraphNode_t,
7678 pNodeParams: *const hipMemcpy3DParms,
7679 ) -> hipError_t;
7680}
7681extern "C" {
7682 #[doc = " @brief Sets a node's attribute.\n\n @param [in] hNode - Instance of the node to set parameters of.\n @param [in] attr - The attribute type to be set.\n @param [in] value - const pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7683 pub fn hipGraphKernelNodeSetAttribute(
7684 hNode: hipGraphNode_t,
7685 attr: hipLaunchAttributeID,
7686 value: *const hipLaunchAttributeValue,
7687 ) -> hipError_t;
7688}
7689extern "C" {
7690 #[doc = " @brief Gets a node's attribute.\n\n @param [in] hNode - Instance of the node to set parameters of.\n @param [in] attr - The attribute type to be set.\n @param [in] value - const pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7691 pub fn hipGraphKernelNodeGetAttribute(
7692 hNode: hipGraphNode_t,
7693 attr: hipLaunchAttributeID,
7694 value: *mut hipLaunchAttributeValue,
7695 ) -> hipError_t;
7696}
7697extern "C" {
7698 #[doc = " @brief Sets the parameters of a memcpy node in the given graphExec.\n\n @param [in] hGraphExec - Instance of the executable graph with the node.\n @param [in] node - Instance of the node to set parameters of.\n @param [in] pNodeParams - const pointer to the kernel node parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7699 pub fn hipGraphExecMemcpyNodeSetParams(
7700 hGraphExec: hipGraphExec_t,
7701 node: hipGraphNode_t,
7702 pNodeParams: *mut hipMemcpy3DParms,
7703 ) -> hipError_t;
7704}
7705extern "C" {
7706 #[doc = " @brief Creates a 1D memcpy node and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to graph node that is created.\n @param [in] graph - Instance of graph to add the created node to.\n @param [in] pDependencies - const pointer to the dependencies of the memcpy execution node.\n @param [in] numDependencies - The number of dependencies.\n @param [in] dst - Pointer to memory address of the destination.\n @param [in] src - Pointer to memory address of the source.\n @param [in] count - Size of the memory to copy.\n @param [in] kind - Type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7707 pub fn hipGraphAddMemcpyNode1D(
7708 pGraphNode: *mut hipGraphNode_t,
7709 graph: hipGraph_t,
7710 pDependencies: *const hipGraphNode_t,
7711 numDependencies: usize,
7712 dst: *mut ::std::os::raw::c_void,
7713 src: *const ::std::os::raw::c_void,
7714 count: usize,
7715 kind: hipMemcpyKind,
7716 ) -> hipError_t;
7717}
7718extern "C" {
7719 #[doc = " @brief Sets a memcpy node's parameters to perform a 1-dimensional copy.\n\n @param [in] node - Instance of the node to set parameters of.\n @param [in] dst - Pointer to memory address of the destination.\n @param [in] src - Pointer to memory address of the source.\n @param [in] count - Size of the memory to copy.\n @param [in] kind - Type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7720 pub fn hipGraphMemcpyNodeSetParams1D(
7721 node: hipGraphNode_t,
7722 dst: *mut ::std::os::raw::c_void,
7723 src: *const ::std::os::raw::c_void,
7724 count: usize,
7725 kind: hipMemcpyKind,
7726 ) -> hipError_t;
7727}
7728extern "C" {
7729 #[doc = " @brief Sets the parameters for a memcpy node in the given graphExec to perform a 1-dimensional\n copy.\n\n @param [in] hGraphExec - Instance of the executable graph with the node.\n @param [in] node - Instance of the node to set parameters of.\n @param [in] dst - Pointer to memory address of the destination.\n @param [in] src - Pointer to memory address of the source.\n @param [in] count - Size of the memory to copy.\n @param [in] kind - Type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7730 pub fn hipGraphExecMemcpyNodeSetParams1D(
7731 hGraphExec: hipGraphExec_t,
7732 node: hipGraphNode_t,
7733 dst: *mut ::std::os::raw::c_void,
7734 src: *const ::std::os::raw::c_void,
7735 count: usize,
7736 kind: hipMemcpyKind,
7737 ) -> hipError_t;
7738}
7739extern "C" {
7740 #[doc = " @brief Creates a memcpy node to copy from a symbol on the device and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to graph node that is created.\n @param [in] graph - Instance of graph to add the created node to.\n @param [in] pDependencies - const pointer to the dependencies of the memcpy execution node.\n @param [in] numDependencies - Number of the dependencies.\n @param [in] dst - Pointer to memory address of the destination.\n @param [in] symbol - Device symbol address.\n @param [in] count - Size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - Type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7741 pub fn hipGraphAddMemcpyNodeFromSymbol(
7742 pGraphNode: *mut hipGraphNode_t,
7743 graph: hipGraph_t,
7744 pDependencies: *const hipGraphNode_t,
7745 numDependencies: usize,
7746 dst: *mut ::std::os::raw::c_void,
7747 symbol: *const ::std::os::raw::c_void,
7748 count: usize,
7749 offset: usize,
7750 kind: hipMemcpyKind,
7751 ) -> hipError_t;
7752}
7753extern "C" {
7754 #[doc = " @brief Sets a memcpy node's parameters to copy from a symbol on the device.\n\n @param [in] node - Instance of the node to set parameters of.\n @param [in] dst - Pointer to memory address of the destination.\n @param [in] symbol - Device symbol address.\n @param [in] count - Size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - Type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7755 pub fn hipGraphMemcpyNodeSetParamsFromSymbol(
7756 node: hipGraphNode_t,
7757 dst: *mut ::std::os::raw::c_void,
7758 symbol: *const ::std::os::raw::c_void,
7759 count: usize,
7760 offset: usize,
7761 kind: hipMemcpyKind,
7762 ) -> hipError_t;
7763}
7764extern "C" {
7765 #[doc = " @brief Sets the parameters for a memcpy node in the given graphExec to copy from a symbol on the\n * device.\n\n @param [in] hGraphExec - Instance of the executable graph with the node.\n @param [in] node - Instance of the node to set parameters of.\n @param [in] dst - Pointer to memory address of the destination.\n @param [in] symbol - Device symbol address.\n @param [in] count - Size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - Type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7766 pub fn hipGraphExecMemcpyNodeSetParamsFromSymbol(
7767 hGraphExec: hipGraphExec_t,
7768 node: hipGraphNode_t,
7769 dst: *mut ::std::os::raw::c_void,
7770 symbol: *const ::std::os::raw::c_void,
7771 count: usize,
7772 offset: usize,
7773 kind: hipMemcpyKind,
7774 ) -> hipError_t;
7775}
7776extern "C" {
7777 #[doc = " @brief Creates a memcpy node to copy to a symbol on the device and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to graph node that is created.\n @param [in] graph - Instance of graph to add the created node to.\n @param [in] pDependencies - const pointer to the dependencies on the memcpy execution node.\n @param [in] numDependencies - Number of dependencies.\n @param [in] symbol - Device symbol address.\n @param [in] src - Pointer to memory address of the src.\n @param [in] count - Size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - Type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7778 pub fn hipGraphAddMemcpyNodeToSymbol(
7779 pGraphNode: *mut hipGraphNode_t,
7780 graph: hipGraph_t,
7781 pDependencies: *const hipGraphNode_t,
7782 numDependencies: usize,
7783 symbol: *const ::std::os::raw::c_void,
7784 src: *const ::std::os::raw::c_void,
7785 count: usize,
7786 offset: usize,
7787 kind: hipMemcpyKind,
7788 ) -> hipError_t;
7789}
7790extern "C" {
7791 #[doc = " @brief Sets a memcpy node's parameters to copy to a symbol on the device.\n\n @param [in] node - Instance of the node to set parameters of.\n @param [in] symbol - Device symbol address.\n @param [in] src - Pointer to memory address of the src.\n @param [in] count - Size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - Type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7792 pub fn hipGraphMemcpyNodeSetParamsToSymbol(
7793 node: hipGraphNode_t,
7794 symbol: *const ::std::os::raw::c_void,
7795 src: *const ::std::os::raw::c_void,
7796 count: usize,
7797 offset: usize,
7798 kind: hipMemcpyKind,
7799 ) -> hipError_t;
7800}
7801extern "C" {
7802 #[doc = " @brief Sets the parameters for a memcpy node in the given graphExec to copy to a symbol on the\n device.\n @param [in] hGraphExec - Instance of the executable graph with the node.\n @param [in] node - Instance of the node to set parameters of.\n @param [in] symbol - Device symbol address.\n @param [in] src - Pointer to memory address of the src.\n @param [in] count - Size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - Type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7803 pub fn hipGraphExecMemcpyNodeSetParamsToSymbol(
7804 hGraphExec: hipGraphExec_t,
7805 node: hipGraphNode_t,
7806 symbol: *const ::std::os::raw::c_void,
7807 src: *const ::std::os::raw::c_void,
7808 count: usize,
7809 offset: usize,
7810 kind: hipMemcpyKind,
7811 ) -> hipError_t;
7812}
7813extern "C" {
7814 #[doc = " @brief Creates a memset node and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to graph node that is created.\n @param [in] graph - Instance of the graph to add the created node to.\n @param [in] pDependencies - const pointer to the dependencies on the memset execution node.\n @param [in] numDependencies - Number of dependencies.\n @param [in] pMemsetParams - const pointer to the parameters for the memory set.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7815 pub fn hipGraphAddMemsetNode(
7816 pGraphNode: *mut hipGraphNode_t,
7817 graph: hipGraph_t,
7818 pDependencies: *const hipGraphNode_t,
7819 numDependencies: usize,
7820 pMemsetParams: *const hipMemsetParams,
7821 ) -> hipError_t;
7822}
7823extern "C" {
7824 #[doc = " @brief Gets a memset node's parameters.\n\n @param [in] node - Instance of the node to get parameters of.\n @param [out] pNodeParams - Pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7825 pub fn hipGraphMemsetNodeGetParams(
7826 node: hipGraphNode_t,
7827 pNodeParams: *mut hipMemsetParams,
7828 ) -> hipError_t;
7829}
7830extern "C" {
7831 #[doc = " @brief Sets a memset node's parameters.\n\n @param [in] node - Instance of the node to set parameters of.\n @param [in] pNodeParams - Pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7832 pub fn hipGraphMemsetNodeSetParams(
7833 node: hipGraphNode_t,
7834 pNodeParams: *const hipMemsetParams,
7835 ) -> hipError_t;
7836}
7837extern "C" {
7838 #[doc = " @brief Sets the parameters for a memset node in the given graphExec.\n\n @param [in] hGraphExec - Instance of the executable graph with the node.\n @param [in] node - Instance of the node to set parameters of.\n @param [in] pNodeParams - Pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7839 pub fn hipGraphExecMemsetNodeSetParams(
7840 hGraphExec: hipGraphExec_t,
7841 node: hipGraphNode_t,
7842 pNodeParams: *const hipMemsetParams,
7843 ) -> hipError_t;
7844}
7845extern "C" {
7846 #[doc = " @brief Creates a host execution node and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to graph node that is created.\n @param [in] graph - Instance of the graph to add the created node to.\n @param [in] pDependencies - const pointer to the dependencies of the memset execution node.\n @param [in] numDependencies - Number of dependencies.\n @param [in] pNodeParams - Pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7847 pub fn hipGraphAddHostNode(
7848 pGraphNode: *mut hipGraphNode_t,
7849 graph: hipGraph_t,
7850 pDependencies: *const hipGraphNode_t,
7851 numDependencies: usize,
7852 pNodeParams: *const hipHostNodeParams,
7853 ) -> hipError_t;
7854}
7855extern "C" {
7856 #[doc = " @brief Returns a host node's parameters.\n\n @param [in] node - Instance of the node to get parameters of.\n @param [out] pNodeParams - Pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7857 pub fn hipGraphHostNodeGetParams(
7858 node: hipGraphNode_t,
7859 pNodeParams: *mut hipHostNodeParams,
7860 ) -> hipError_t;
7861}
7862extern "C" {
7863 #[doc = " @brief Sets a host node's parameters.\n\n @param [in] node - Instance of the node to set parameters of.\n @param [in] pNodeParams - Pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7864 pub fn hipGraphHostNodeSetParams(
7865 node: hipGraphNode_t,
7866 pNodeParams: *const hipHostNodeParams,
7867 ) -> hipError_t;
7868}
7869extern "C" {
7870 #[doc = " @brief Sets the parameters for a host node in the given graphExec.\n\n @param [in] hGraphExec - Instance of the executable graph with the node.\n @param [in] node - Instance of the node to set parameters of.\n @param [in] pNodeParams - Pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7871 pub fn hipGraphExecHostNodeSetParams(
7872 hGraphExec: hipGraphExec_t,
7873 node: hipGraphNode_t,
7874 pNodeParams: *const hipHostNodeParams,
7875 ) -> hipError_t;
7876}
7877extern "C" {
7878 #[doc = " @brief Creates a child graph node and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to graph node that is created.\n @param [in] graph - Instance of the graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies of the memset execution node.\n @param [in] numDependencies - Number of dependencies.\n @param [in] childGraph - Graph to clone into this node\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7879 pub fn hipGraphAddChildGraphNode(
7880 pGraphNode: *mut hipGraphNode_t,
7881 graph: hipGraph_t,
7882 pDependencies: *const hipGraphNode_t,
7883 numDependencies: usize,
7884 childGraph: hipGraph_t,
7885 ) -> hipError_t;
7886}
7887extern "C" {
7888 #[doc = " @brief Gets a handle to the embedded graph of a child graph node.\n\n @param [in] node - Instance of the node to get child graph of.\n @param [out] pGraph - Pointer to get the graph.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7889 pub fn hipGraphChildGraphNodeGetGraph(
7890 node: hipGraphNode_t,
7891 pGraph: *mut hipGraph_t,
7892 ) -> hipError_t;
7893}
7894extern "C" {
7895 #[doc = " @brief Updates node parameters in the child graph node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] node - node from the graph which was used to instantiate graphExec.\n @param [in] childGraph - child graph with updated parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7896 pub fn hipGraphExecChildGraphNodeSetParams(
7897 hGraphExec: hipGraphExec_t,
7898 node: hipGraphNode_t,
7899 childGraph: hipGraph_t,
7900 ) -> hipError_t;
7901}
7902extern "C" {
7903 #[doc = " @brief Creates an empty node and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to graph node that is created.\n @param [in] graph - Instance of the graph the node is added to.\n @param [in] pDependencies - const pointer to the node dependencies.\n @param [in] numDependencies - Number of dependencies.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7904 pub fn hipGraphAddEmptyNode(
7905 pGraphNode: *mut hipGraphNode_t,
7906 graph: hipGraph_t,
7907 pDependencies: *const hipGraphNode_t,
7908 numDependencies: usize,
7909 ) -> hipError_t;
7910}
7911extern "C" {
7912 #[doc = " @brief Creates an event record node and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to graph node that is created.\n @param [in] graph - Instance of the graph the node is added to.\n @param [in] pDependencies - const pointer to the node dependencies.\n @param [in] numDependencies - Number of dependencies.\n @param [in] event - Event of the node.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7913 pub fn hipGraphAddEventRecordNode(
7914 pGraphNode: *mut hipGraphNode_t,
7915 graph: hipGraph_t,
7916 pDependencies: *const hipGraphNode_t,
7917 numDependencies: usize,
7918 event: hipEvent_t,
7919 ) -> hipError_t;
7920}
7921extern "C" {
7922 #[doc = " @brief Returns the event associated with an event record node.\n\n @param [in] node - Instance of the node to get event of.\n @param [out] event_out - Pointer to return the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7923 pub fn hipGraphEventRecordNodeGetEvent(
7924 node: hipGraphNode_t,
7925 event_out: *mut hipEvent_t,
7926 ) -> hipError_t;
7927}
7928extern "C" {
7929 #[doc = " @brief Sets an event record node's event.\n\n @param [in] node - Instance of the node to set event to.\n @param [in] event - Pointer to the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7930 pub fn hipGraphEventRecordNodeSetEvent(node: hipGraphNode_t, event: hipEvent_t) -> hipError_t;
7931}
7932extern "C" {
7933 #[doc = " @brief Sets the event for an event record node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] hNode - node from the graph which was used to instantiate graphExec.\n @param [in] event - pointer to the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7934 pub fn hipGraphExecEventRecordNodeSetEvent(
7935 hGraphExec: hipGraphExec_t,
7936 hNode: hipGraphNode_t,
7937 event: hipEvent_t,
7938 ) -> hipError_t;
7939}
7940extern "C" {
7941 #[doc = " @brief Creates an event wait node and adds it to a graph.\n\n @param [out] pGraphNode - Pointer to graph node that is created.\n @param [in] graph - Instance of the graph the node to be added.\n @param [in] pDependencies - const pointer to the node dependencies.\n @param [in] numDependencies - Number of dependencies.\n @param [in] event - Event for the node.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7942 pub fn hipGraphAddEventWaitNode(
7943 pGraphNode: *mut hipGraphNode_t,
7944 graph: hipGraph_t,
7945 pDependencies: *const hipGraphNode_t,
7946 numDependencies: usize,
7947 event: hipEvent_t,
7948 ) -> hipError_t;
7949}
7950extern "C" {
7951 #[doc = " @brief Returns the event associated with an event wait node.\n\n @param [in] node - Instance of the node to get event of.\n @param [out] event_out - Pointer to return the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7952 pub fn hipGraphEventWaitNodeGetEvent(
7953 node: hipGraphNode_t,
7954 event_out: *mut hipEvent_t,
7955 ) -> hipError_t;
7956}
7957extern "C" {
7958 #[doc = " @brief Sets an event wait node's event.\n\n @param [in] node - Instance of the node to set event of.\n @param [in] event - Pointer to the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7959 pub fn hipGraphEventWaitNodeSetEvent(node: hipGraphNode_t, event: hipEvent_t) -> hipError_t;
7960}
7961extern "C" {
7962 #[doc = " @brief Sets the event for an event record node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] hNode - node from the graph which was used to instantiate graphExec.\n @param [in] event - pointer to the event.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7963 pub fn hipGraphExecEventWaitNodeSetEvent(
7964 hGraphExec: hipGraphExec_t,
7965 hNode: hipGraphNode_t,
7966 event: hipEvent_t,
7967 ) -> hipError_t;
7968}
7969extern "C" {
7970 #[doc = " @brief Creates a memory allocation node and adds it to a graph\n\n @param [out] pGraphNode - Pointer to the graph node to create and add to the graph\n @param [in] graph - Instance of the graph node to be added\n @param [in] pDependencies - Const pointer to the node dependencies\n @param [in] numDependencies - The number of dependencies\n @param [in, out] pNodeParams - Node parameters for memory allocation, returns a pointer to the\n allocated memory.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7971 pub fn hipGraphAddMemAllocNode(
7972 pGraphNode: *mut hipGraphNode_t,
7973 graph: hipGraph_t,
7974 pDependencies: *const hipGraphNode_t,
7975 numDependencies: usize,
7976 pNodeParams: *mut hipMemAllocNodeParams,
7977 ) -> hipError_t;
7978}
7979extern "C" {
7980 #[doc = " @brief Returns parameters for memory allocation node\n\n @param [in] node - Memory allocation node to query\n @param [out] pNodeParams - Parameters for the specified memory allocation node\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7981 pub fn hipGraphMemAllocNodeGetParams(
7982 node: hipGraphNode_t,
7983 pNodeParams: *mut hipMemAllocNodeParams,
7984 ) -> hipError_t;
7985}
7986extern "C" {
7987 #[doc = " @brief Creates a memory free node and adds it to a graph\n\n @param [out] pGraphNode - Pointer to the graph node to create and add to the graph\n @param [in] graph - Instance of the graph node to be added\n @param [in] pDependencies - Const pointer to the node dependencies\n @param [in] numDependencies - The number of dependencies\n @param [in] dev_ptr - Pointer to the memory to be freed\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7988 pub fn hipGraphAddMemFreeNode(
7989 pGraphNode: *mut hipGraphNode_t,
7990 graph: hipGraph_t,
7991 pDependencies: *const hipGraphNode_t,
7992 numDependencies: usize,
7993 dev_ptr: *mut ::std::os::raw::c_void,
7994 ) -> hipError_t;
7995}
7996extern "C" {
7997 #[doc = " @brief Returns parameters for memory free node\n\n @param [in] node - Memory free node to query\n @param [out] dev_ptr - Device pointer of the specified memory free node\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7998 pub fn hipGraphMemFreeNodeGetParams(
7999 node: hipGraphNode_t,
8000 dev_ptr: *mut ::std::os::raw::c_void,
8001 ) -> hipError_t;
8002}
8003extern "C" {
8004 #[doc = " @brief Get the mem attribute for graphs.\n\n @param [in] device - Device to get attributes from\n @param [in] attr - Attribute type to be queried\n @param [out] value - Value of the queried attribute\n @returns #hipSuccess, #hipErrorInvalidDevice\n"]
8005 pub fn hipDeviceGetGraphMemAttribute(
8006 device: ::std::os::raw::c_int,
8007 attr: hipGraphMemAttributeType,
8008 value: *mut ::std::os::raw::c_void,
8009 ) -> hipError_t;
8010}
8011extern "C" {
8012 #[doc = " @brief Set the mem attribute for graphs.\n\n @param [in] device - Device to set attribute of.\n @param [in] attr - Attribute type to be set.\n @param [in] value - Value of the attribute.\n @returns #hipSuccess, #hipErrorInvalidDevice\n"]
8013 pub fn hipDeviceSetGraphMemAttribute(
8014 device: ::std::os::raw::c_int,
8015 attr: hipGraphMemAttributeType,
8016 value: *mut ::std::os::raw::c_void,
8017 ) -> hipError_t;
8018}
8019extern "C" {
8020 #[doc = " @brief Free unused memory reserved for graphs on a specific device and return it back to the OS.\n\n @param [in] device - Device for which memory should be trimmed\n @returns #hipSuccess, #hipErrorInvalidDevice\n"]
8021 pub fn hipDeviceGraphMemTrim(device: ::std::os::raw::c_int) -> hipError_t;
8022}
8023extern "C" {
8024 #[doc = " @brief Create an instance of userObject to manage lifetime of a resource.\n\n @param [out] object_out - pointer to instace of userobj.\n @param [in] ptr - pointer to pass to destroy function.\n @param [in] destroy - destroy callback to remove resource.\n @param [in] initialRefcount - reference to resource.\n @param [in] flags - flags passed to API.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8025 pub fn hipUserObjectCreate(
8026 object_out: *mut hipUserObject_t,
8027 ptr: *mut ::std::os::raw::c_void,
8028 destroy: hipHostFn_t,
8029 initialRefcount: ::std::os::raw::c_uint,
8030 flags: ::std::os::raw::c_uint,
8031 ) -> hipError_t;
8032}
8033extern "C" {
8034 #[doc = " @brief Release number of references to resource.\n\n @param [in] object - pointer to instace of userobj.\n @param [in] count - reference to resource to be retained.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8035 pub fn hipUserObjectRelease(
8036 object: hipUserObject_t,
8037 count: ::std::os::raw::c_uint,
8038 ) -> hipError_t;
8039}
8040extern "C" {
8041 #[doc = " @brief Retain number of references to resource.\n\n @param [in] object - pointer to instace of userobj.\n @param [in] count - reference to resource to be retained.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8042 pub fn hipUserObjectRetain(
8043 object: hipUserObject_t,
8044 count: ::std::os::raw::c_uint,
8045 ) -> hipError_t;
8046}
8047extern "C" {
8048 #[doc = " @brief Retain user object for graphs.\n\n @param [in] graph - pointer to graph to retain the user object for.\n @param [in] object - pointer to instace of userobj.\n @param [in] count - reference to resource to be retained.\n @param [in] flags - flags passed to API.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8049 pub fn hipGraphRetainUserObject(
8050 graph: hipGraph_t,
8051 object: hipUserObject_t,
8052 count: ::std::os::raw::c_uint,
8053 flags: ::std::os::raw::c_uint,
8054 ) -> hipError_t;
8055}
8056extern "C" {
8057 #[doc = " @brief Release user object from graphs.\n\n @param [in] graph - pointer to graph to retain the user object for.\n @param [in] object - pointer to instace of userobj.\n @param [in] count - reference to resource to be retained.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8058 pub fn hipGraphReleaseUserObject(
8059 graph: hipGraph_t,
8060 object: hipUserObject_t,
8061 count: ::std::os::raw::c_uint,
8062 ) -> hipError_t;
8063}
8064extern "C" {
8065 #[doc = " @brief Write a DOT file describing graph structure.\n\n @param [in] graph - graph object for which DOT file has to be generated.\n @param [in] path - path to write the DOT file.\n @param [in] flags - Flags from hipGraphDebugDotFlags to get additional node information.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorOperatingSystem\n"]
8066 pub fn hipGraphDebugDotPrint(
8067 graph: hipGraph_t,
8068 path: *const ::std::os::raw::c_char,
8069 flags: ::std::os::raw::c_uint,
8070 ) -> hipError_t;
8071}
8072extern "C" {
8073 #[doc = " @brief Copies attributes from source node to destination node.\n\n Copies attributes from source node to destination node.\n Both node must have the same context.\n\n @param [out] hDst - Destination node.\n @param [in] hSrc - Source node.\n For list of attributes see ::hipKernelNodeAttrID.\n\n @returns #hipSuccess, #hipErrorInvalidContext\n"]
8074 pub fn hipGraphKernelNodeCopyAttributes(
8075 hSrc: hipGraphNode_t,
8076 hDst: hipGraphNode_t,
8077 ) -> hipError_t;
8078}
8079extern "C" {
8080 #[doc = " @brief Enables or disables the specified node in the given graphExec\n\n Sets 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 hNode in the non-executable graph, from which the\n executable graph was instantiated.\n\n hNode must not have been removed from the original graph.\n\n @note Currently only kernel, memset and memcpy nodes are supported.\n\n @param [in] hGraphExec - The executable graph in which to set the specified node.\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [in] isEnabled - Node is enabled if != 0, otherwise the node is disabled.\n\n @returns #hipSuccess, #hipErrorInvalidValue,\n"]
8081 pub fn hipGraphNodeSetEnabled(
8082 hGraphExec: hipGraphExec_t,
8083 hNode: hipGraphNode_t,
8084 isEnabled: ::std::os::raw::c_uint,
8085 ) -> hipError_t;
8086}
8087extern "C" {
8088 #[doc = " @brief Query whether a node in the given graphExec is enabled\n\n Sets isEnabled to 1 if hNode is enabled, or 0 if it is disabled.\n\n The node is identified by the corresponding node in the non-executable graph, from which the\n executable graph was instantiated.\n\n hNode must not have been removed from the original graph.\n\n @note Currently only kernel, memset and memcpy nodes are supported.\n\n @param [in] hGraphExec - The executable graph in which to set the specified node.\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [out] isEnabled - Location to return the enabled status of the node.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8089 pub fn hipGraphNodeGetEnabled(
8090 hGraphExec: hipGraphExec_t,
8091 hNode: hipGraphNode_t,
8092 isEnabled: *mut ::std::os::raw::c_uint,
8093 ) -> hipError_t;
8094}
8095extern "C" {
8096 #[doc = " @brief Creates a external semaphor wait node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to the graph node to create.\n @param [in] graph - instance of the graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memset execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] nodeParams -pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8097 pub fn hipGraphAddExternalSemaphoresWaitNode(
8098 pGraphNode: *mut hipGraphNode_t,
8099 graph: hipGraph_t,
8100 pDependencies: *const hipGraphNode_t,
8101 numDependencies: usize,
8102 nodeParams: *const hipExternalSemaphoreWaitNodeParams,
8103 ) -> hipError_t;
8104}
8105extern "C" {
8106 #[doc = " @brief Creates a external semaphor signal node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to the graph node to create.\n @param [in] graph - instance of the graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memset execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] nodeParams -pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8107 pub fn hipGraphAddExternalSemaphoresSignalNode(
8108 pGraphNode: *mut hipGraphNode_t,
8109 graph: hipGraph_t,
8110 pDependencies: *const hipGraphNode_t,
8111 numDependencies: usize,
8112 nodeParams: *const hipExternalSemaphoreSignalNodeParams,
8113 ) -> hipError_t;
8114}
8115extern "C" {
8116 #[doc = " @brief Updates node parameters in the external semaphore signal node.\n\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [in] nodeParams - Pointer to the params to be set.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8117 pub fn hipGraphExternalSemaphoresSignalNodeSetParams(
8118 hNode: hipGraphNode_t,
8119 nodeParams: *const hipExternalSemaphoreSignalNodeParams,
8120 ) -> hipError_t;
8121}
8122extern "C" {
8123 #[doc = " @brief Updates node parameters in the external semaphore wait node.\n\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [in] nodeParams - Pointer to the params to be set.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8124 pub fn hipGraphExternalSemaphoresWaitNodeSetParams(
8125 hNode: hipGraphNode_t,
8126 nodeParams: *const hipExternalSemaphoreWaitNodeParams,
8127 ) -> hipError_t;
8128}
8129extern "C" {
8130 #[doc = " @brief Returns external semaphore signal node params.\n\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [out] params_out - Pointer to params.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8131 pub fn hipGraphExternalSemaphoresSignalNodeGetParams(
8132 hNode: hipGraphNode_t,
8133 params_out: *mut hipExternalSemaphoreSignalNodeParams,
8134 ) -> hipError_t;
8135}
8136extern "C" {
8137 #[doc = " @brief Returns external semaphore wait node params.\n\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [out] params_out - Pointer to params.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8138 pub fn hipGraphExternalSemaphoresWaitNodeGetParams(
8139 hNode: hipGraphNode_t,
8140 params_out: *mut hipExternalSemaphoreWaitNodeParams,
8141 ) -> hipError_t;
8142}
8143extern "C" {
8144 #[doc = " @brief Updates node parameters in the external semaphore signal node in the given graphExec.\n\n @param [in] hGraphExec - The executable graph in which to set the specified node.\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [in] nodeParams - Pointer to the params to be set.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8145 pub fn hipGraphExecExternalSemaphoresSignalNodeSetParams(
8146 hGraphExec: hipGraphExec_t,
8147 hNode: hipGraphNode_t,
8148 nodeParams: *const hipExternalSemaphoreSignalNodeParams,
8149 ) -> hipError_t;
8150}
8151extern "C" {
8152 #[doc = " @brief Updates node parameters in the external semaphore wait node in the given graphExec.\n\n @param [in] hGraphExec - The executable graph in which to set the specified node.\n @param [in] hNode - Node from the graph from which graphExec was instantiated.\n @param [in] nodeParams - Pointer to the params to be set.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8153 pub fn hipGraphExecExternalSemaphoresWaitNodeSetParams(
8154 hGraphExec: hipGraphExec_t,
8155 hNode: hipGraphNode_t,
8156 nodeParams: *const hipExternalSemaphoreWaitNodeParams,
8157 ) -> hipError_t;
8158}
8159extern "C" {
8160 #[doc = " @brief Gets a memcpy node's parameters.\n\n @param [in] hNode - instance of the node to get parameters from.\n @param [out] nodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8161 pub fn hipDrvGraphMemcpyNodeGetParams(
8162 hNode: hipGraphNode_t,
8163 nodeParams: *mut HIP_MEMCPY3D,
8164 ) -> hipError_t;
8165}
8166extern "C" {
8167 #[doc = " @brief Sets a memcpy node's parameters.\n\n @param [in] hNode - instance of the node to Set parameters for.\n @param [out] nodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8168 pub fn hipDrvGraphMemcpyNodeSetParams(
8169 hNode: hipGraphNode_t,
8170 nodeParams: *const HIP_MEMCPY3D,
8171 ) -> hipError_t;
8172}
8173extern "C" {
8174 #[doc = " @brief Creates a memset node and adds it to a graph.\n\n @param [out] phGraphNode - pointer to graph node to create.\n @param [in] hGraph - instance of graph to add the created node to.\n @param [in] dependencies - const pointer to the dependencies on the memset execution node.\n @param [in] numDependencies - number of the dependencies.\n @param [in] memsetParams - const pointer to the parameters for the memory set.\n @param [in] ctx - cotext related to current device.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8175 pub fn hipDrvGraphAddMemsetNode(
8176 phGraphNode: *mut hipGraphNode_t,
8177 hGraph: hipGraph_t,
8178 dependencies: *const hipGraphNode_t,
8179 numDependencies: usize,
8180 memsetParams: *const hipMemsetParams,
8181 ctx: hipCtx_t,
8182 ) -> hipError_t;
8183}
8184extern "C" {
8185 #[doc = " @brief Creates a memory free node and adds it to a graph\n\n @param [out] phGraphNode - Pointer to the graph node to create and add to the graph\n @param [in] hGraph - Instance of the graph the node to be added\n @param [in] dependencies - Const pointer to the node dependencies\n @param [in] numDependencies - The number of dependencies\n @param [in] dptr - Pointer to the memory to be freed\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8186 pub fn hipDrvGraphAddMemFreeNode(
8187 phGraphNode: *mut hipGraphNode_t,
8188 hGraph: hipGraph_t,
8189 dependencies: *const hipGraphNode_t,
8190 numDependencies: usize,
8191 dptr: hipDeviceptr_t,
8192 ) -> hipError_t;
8193}
8194extern "C" {
8195 #[doc = " @brief Sets the parameters for a memcpy node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] hNode - instance of the node to set parameters to.\n @param [in] copyParams - const pointer to the memcpy node params.\n @param [in] ctx - cotext related to current device.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8196 pub fn hipDrvGraphExecMemcpyNodeSetParams(
8197 hGraphExec: hipGraphExec_t,
8198 hNode: hipGraphNode_t,
8199 copyParams: *const HIP_MEMCPY3D,
8200 ctx: hipCtx_t,
8201 ) -> hipError_t;
8202}
8203extern "C" {
8204 #[doc = " @brief Sets the parameters for a memset node in the given graphExec.\n\n @param [in] hGraphExec - instance of the executable graph with the node.\n @param [in] hNode - instance of the node to set parameters to.\n @param [in] memsetParams - pointer to the parameters.\n @param [in] ctx - cotext related to current device.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8205 pub fn hipDrvGraphExecMemsetNodeSetParams(
8206 hGraphExec: hipGraphExec_t,
8207 hNode: hipGraphNode_t,
8208 memsetParams: *const hipMemsetParams,
8209 ctx: hipCtx_t,
8210 ) -> hipError_t;
8211}
8212extern "C" {
8213 #[doc = " @brief Frees an address range reservation made via hipMemAddressReserve\n\n @param [in] devPtr - starting address of the range.\n @param [in] size - size of the range.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8214 pub fn hipMemAddressFree(devPtr: *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
8215}
8216extern "C" {
8217 #[doc = " @brief Reserves an address range\n\n @param [out] ptr - starting address of the reserved range.\n @param [in] size - size of the reservation.\n @param [in] alignment - alignment of the address.\n @param [in] addr - requested starting address of the range.\n @param [in] flags - currently unused, must be zero.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8218 pub fn hipMemAddressReserve(
8219 ptr: *mut *mut ::std::os::raw::c_void,
8220 size: usize,
8221 alignment: usize,
8222 addr: *mut ::std::os::raw::c_void,
8223 flags: ::std::os::raw::c_ulonglong,
8224 ) -> hipError_t;
8225}
8226extern "C" {
8227 #[doc = " @brief Creates a memory allocation described by the properties and size\n\n @param [out] handle - value of the returned handle.\n @param [in] size - size of the allocation.\n @param [in] prop - properties of the allocation.\n @param [in] flags - currently unused, must be zero.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8228 pub fn hipMemCreate(
8229 handle: *mut hipMemGenericAllocationHandle_t,
8230 size: usize,
8231 prop: *const hipMemAllocationProp,
8232 flags: ::std::os::raw::c_ulonglong,
8233 ) -> hipError_t;
8234}
8235extern "C" {
8236 #[doc = " @brief Exports an allocation to a requested shareable handle type.\n\n @param [out] shareableHandle - value of the returned handle.\n @param [in] handle - handle to share.\n @param [in] handleType - type of the shareable handle.\n @param [in] flags - currently unused, must be zero.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8237 pub fn hipMemExportToShareableHandle(
8238 shareableHandle: *mut ::std::os::raw::c_void,
8239 handle: hipMemGenericAllocationHandle_t,
8240 handleType: hipMemAllocationHandleType,
8241 flags: ::std::os::raw::c_ulonglong,
8242 ) -> hipError_t;
8243}
8244extern "C" {
8245 #[doc = " @brief Get the access flags set for the given location and ptr.\n\n @param [out] flags - flags for this location.\n @param [in] location - target location.\n @param [in] ptr - address to check the access flags.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8246 pub fn hipMemGetAccess(
8247 flags: *mut ::std::os::raw::c_ulonglong,
8248 location: *const hipMemLocation,
8249 ptr: *mut ::std::os::raw::c_void,
8250 ) -> hipError_t;
8251}
8252extern "C" {
8253 #[doc = " @brief Calculates either the minimal or recommended granularity.\n\n @param [out] granularity - returned granularity.\n @param [in] prop - location properties.\n @param [in] option - determines which granularity to return.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows.\n"]
8254 pub fn hipMemGetAllocationGranularity(
8255 granularity: *mut usize,
8256 prop: *const hipMemAllocationProp,
8257 option: hipMemAllocationGranularity_flags,
8258 ) -> hipError_t;
8259}
8260extern "C" {
8261 #[doc = " @brief Retrieve the property structure of the given handle.\n\n @param [out] prop - properties of the given handle.\n @param [in] handle - handle to perform the query on.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8262 pub fn hipMemGetAllocationPropertiesFromHandle(
8263 prop: *mut hipMemAllocationProp,
8264 handle: hipMemGenericAllocationHandle_t,
8265 ) -> hipError_t;
8266}
8267extern "C" {
8268 #[doc = " @brief Imports an allocation from a requested shareable handle type.\n\n @param [out] handle - returned value.\n @param [in] osHandle - shareable handle representing the memory allocation.\n @param [in] shHandleType - handle type.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8269 pub fn hipMemImportFromShareableHandle(
8270 handle: *mut hipMemGenericAllocationHandle_t,
8271 osHandle: *mut ::std::os::raw::c_void,
8272 shHandleType: hipMemAllocationHandleType,
8273 ) -> hipError_t;
8274}
8275extern "C" {
8276 #[doc = " @brief Maps an allocation handle to a reserved virtual address range.\n\n @param [in] ptr - address where the memory will be mapped.\n @param [in] size - size of the mapping.\n @param [in] offset - offset into the memory, currently must be zero.\n @param [in] handle - memory allocation to be mapped.\n @param [in] flags - currently unused, must be zero.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8277 pub fn hipMemMap(
8278 ptr: *mut ::std::os::raw::c_void,
8279 size: usize,
8280 offset: usize,
8281 handle: hipMemGenericAllocationHandle_t,
8282 flags: ::std::os::raw::c_ulonglong,
8283 ) -> hipError_t;
8284}
8285extern "C" {
8286 #[doc = " @brief Maps or unmaps subregions of sparse HIP arrays and sparse HIP mipmapped arrays.\n\n @param [in] mapInfoList - list of hipArrayMapInfo.\n @param [in] count - number of hipArrayMapInfo in mapInfoList.\n @param [in] stream - stream identifier for the stream to use for map or unmap operations.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is under development. Currently it is not supported on AMD\n GPUs and returns #hipErrorNotSupported."]
8287 pub fn hipMemMapArrayAsync(
8288 mapInfoList: *mut hipArrayMapInfo,
8289 count: ::std::os::raw::c_uint,
8290 stream: hipStream_t,
8291 ) -> hipError_t;
8292}
8293extern "C" {
8294 #[doc = " @brief Release a memory handle representing a memory allocation which was previously allocated\n through hipMemCreate.\n\n @param [in] handle - handle of the memory allocation.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8295 pub fn hipMemRelease(handle: hipMemGenericAllocationHandle_t) -> hipError_t;
8296}
8297extern "C" {
8298 #[doc = " @brief Returns the allocation handle of the backing memory allocation given the address.\n\n @param [out] handle - handle representing addr.\n @param [in] addr - address to look up.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8299 pub fn hipMemRetainAllocationHandle(
8300 handle: *mut hipMemGenericAllocationHandle_t,
8301 addr: *mut ::std::os::raw::c_void,
8302 ) -> hipError_t;
8303}
8304extern "C" {
8305 #[doc = " @brief Set the access flags for each location specified in desc for the given virtual address\n range.\n\n @param [in] ptr - starting address of the virtual address range.\n @param [in] size - size of the range.\n @param [in] desc - array of hipMemAccessDesc.\n @param [in] count - number of hipMemAccessDesc in desc.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8306 pub fn hipMemSetAccess(
8307 ptr: *mut ::std::os::raw::c_void,
8308 size: usize,
8309 desc: *const hipMemAccessDesc,
8310 count: usize,
8311 ) -> hipError_t;
8312}
8313extern "C" {
8314 #[doc = " @brief Unmap memory allocation of a given address range.\n\n @param [in] ptr - starting address of the range to unmap.\n @param [in] size - size of the virtual address range.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8315 pub fn hipMemUnmap(ptr: *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
8316}
8317extern "C" {
8318 #[doc = " @brief Maps a graphics resource for access.\n\n @param [in] count - Number of resources to map.\n @param [in] resources - Pointer of resources to map.\n @param [in] stream - Stream for synchronization.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorInvalidResourceHandle\n"]
8319 pub fn hipGraphicsMapResources(
8320 count: ::std::os::raw::c_int,
8321 resources: *mut hipGraphicsResource_t,
8322 stream: hipStream_t,
8323 ) -> hipError_t;
8324}
8325extern "C" {
8326 #[doc = " @brief Get an array through which to access a subresource of a mapped graphics resource.\n\n @param [out] array - Pointer of array through which a subresource of resource may be accessed.\n @param [in] resource - Mapped resource to access.\n @param [in] arrayIndex - Array index for the subresource to access.\n @param [in] mipLevel - Mipmap level for the subresource to access.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note In this API, the value of arrayIndex higher than zero is currently not supported.\n"]
8327 pub fn hipGraphicsSubResourceGetMappedArray(
8328 array: *mut hipArray_t,
8329 resource: hipGraphicsResource_t,
8330 arrayIndex: ::std::os::raw::c_uint,
8331 mipLevel: ::std::os::raw::c_uint,
8332 ) -> hipError_t;
8333}
8334extern "C" {
8335 #[doc = " @brief Gets device accessible address of a graphics resource.\n\n @param [out] devPtr - Pointer of device through which graphic resource may be accessed.\n @param [out] size - Size of the buffer accessible from devPtr.\n @param [in] resource - Mapped resource to access.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8336 pub fn hipGraphicsResourceGetMappedPointer(
8337 devPtr: *mut *mut ::std::os::raw::c_void,
8338 size: *mut usize,
8339 resource: hipGraphicsResource_t,
8340 ) -> hipError_t;
8341}
8342extern "C" {
8343 #[doc = " @brief Unmaps graphics resources.\n\n @param [in] count - Number of resources to unmap.\n @param [in] resources - Pointer of resources to unmap.\n @param [in] stream - Stream for synchronization.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorContextIsDestroyed\n"]
8344 pub fn hipGraphicsUnmapResources(
8345 count: ::std::os::raw::c_int,
8346 resources: *mut hipGraphicsResource_t,
8347 stream: hipStream_t,
8348 ) -> hipError_t;
8349}
8350extern "C" {
8351 #[doc = " @brief Unregisters a graphics resource.\n\n @param [in] resource - Graphics resources to unregister.\n\n @returns #hipSuccess\n"]
8352 pub fn hipGraphicsUnregisterResource(resource: hipGraphicsResource_t) -> hipError_t;
8353}
8354extern "C" {
8355 #[doc = " @brief Create a surface object.\n\n @param [out] pSurfObject Pointer of surface object to be created.\n @param [in] pResDesc Pointer of suface object descriptor.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8356 pub fn hipCreateSurfaceObject(
8357 pSurfObject: *mut hipSurfaceObject_t,
8358 pResDesc: *const hipResourceDesc,
8359 ) -> hipError_t;
8360}
8361extern "C" {
8362 #[doc = " @brief Destroy a surface object.\n\n @param [in] surfaceObject Surface object to be destroyed.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
8363 pub fn hipDestroySurfaceObject(surfaceObject: hipSurfaceObject_t) -> hipError_t;
8364}
8365extern "C" {
8366 pub fn hipMemcpy_spt(
8367 dst: *mut ::std::os::raw::c_void,
8368 src: *const ::std::os::raw::c_void,
8369 sizeBytes: usize,
8370 kind: hipMemcpyKind,
8371 ) -> hipError_t;
8372}
8373extern "C" {
8374 pub fn hipMemcpyToSymbol_spt(
8375 symbol: *const ::std::os::raw::c_void,
8376 src: *const ::std::os::raw::c_void,
8377 sizeBytes: usize,
8378 offset: usize,
8379 kind: hipMemcpyKind,
8380 ) -> hipError_t;
8381}
8382extern "C" {
8383 pub fn hipMemcpyFromSymbol_spt(
8384 dst: *mut ::std::os::raw::c_void,
8385 symbol: *const ::std::os::raw::c_void,
8386 sizeBytes: usize,
8387 offset: usize,
8388 kind: hipMemcpyKind,
8389 ) -> hipError_t;
8390}
8391extern "C" {
8392 pub fn hipMemcpy2D_spt(
8393 dst: *mut ::std::os::raw::c_void,
8394 dpitch: usize,
8395 src: *const ::std::os::raw::c_void,
8396 spitch: usize,
8397 width: usize,
8398 height: usize,
8399 kind: hipMemcpyKind,
8400 ) -> hipError_t;
8401}
8402extern "C" {
8403 pub fn hipMemcpy2DFromArray_spt(
8404 dst: *mut ::std::os::raw::c_void,
8405 dpitch: usize,
8406 src: hipArray_const_t,
8407 wOffset: usize,
8408 hOffset: usize,
8409 width: usize,
8410 height: usize,
8411 kind: hipMemcpyKind,
8412 ) -> hipError_t;
8413}
8414extern "C" {
8415 pub fn hipMemcpy3D_spt(p: *const hipMemcpy3DParms) -> hipError_t;
8416}
8417extern "C" {
8418 pub fn hipMemset_spt(
8419 dst: *mut ::std::os::raw::c_void,
8420 value: ::std::os::raw::c_int,
8421 sizeBytes: usize,
8422 ) -> hipError_t;
8423}
8424extern "C" {
8425 pub fn hipMemsetAsync_spt(
8426 dst: *mut ::std::os::raw::c_void,
8427 value: ::std::os::raw::c_int,
8428 sizeBytes: usize,
8429 stream: hipStream_t,
8430 ) -> hipError_t;
8431}
8432extern "C" {
8433 pub fn hipMemset2D_spt(
8434 dst: *mut ::std::os::raw::c_void,
8435 pitch: usize,
8436 value: ::std::os::raw::c_int,
8437 width: usize,
8438 height: usize,
8439 ) -> hipError_t;
8440}
8441extern "C" {
8442 pub fn hipMemset2DAsync_spt(
8443 dst: *mut ::std::os::raw::c_void,
8444 pitch: usize,
8445 value: ::std::os::raw::c_int,
8446 width: usize,
8447 height: usize,
8448 stream: hipStream_t,
8449 ) -> hipError_t;
8450}
8451extern "C" {
8452 pub fn hipMemset3DAsync_spt(
8453 pitchedDevPtr: hipPitchedPtr,
8454 value: ::std::os::raw::c_int,
8455 extent: hipExtent,
8456 stream: hipStream_t,
8457 ) -> hipError_t;
8458}
8459extern "C" {
8460 pub fn hipMemset3D_spt(
8461 pitchedDevPtr: hipPitchedPtr,
8462 value: ::std::os::raw::c_int,
8463 extent: hipExtent,
8464 ) -> hipError_t;
8465}
8466extern "C" {
8467 pub fn hipMemcpyAsync_spt(
8468 dst: *mut ::std::os::raw::c_void,
8469 src: *const ::std::os::raw::c_void,
8470 sizeBytes: usize,
8471 kind: hipMemcpyKind,
8472 stream: hipStream_t,
8473 ) -> hipError_t;
8474}
8475extern "C" {
8476 pub fn hipMemcpy3DAsync_spt(p: *const hipMemcpy3DParms, stream: hipStream_t) -> hipError_t;
8477}
8478extern "C" {
8479 pub fn hipMemcpy2DAsync_spt(
8480 dst: *mut ::std::os::raw::c_void,
8481 dpitch: usize,
8482 src: *const ::std::os::raw::c_void,
8483 spitch: usize,
8484 width: usize,
8485 height: usize,
8486 kind: hipMemcpyKind,
8487 stream: hipStream_t,
8488 ) -> hipError_t;
8489}
8490extern "C" {
8491 pub fn hipMemcpyFromSymbolAsync_spt(
8492 dst: *mut ::std::os::raw::c_void,
8493 symbol: *const ::std::os::raw::c_void,
8494 sizeBytes: usize,
8495 offset: usize,
8496 kind: hipMemcpyKind,
8497 stream: hipStream_t,
8498 ) -> hipError_t;
8499}
8500extern "C" {
8501 pub fn hipMemcpyToSymbolAsync_spt(
8502 symbol: *const ::std::os::raw::c_void,
8503 src: *const ::std::os::raw::c_void,
8504 sizeBytes: usize,
8505 offset: usize,
8506 kind: hipMemcpyKind,
8507 stream: hipStream_t,
8508 ) -> hipError_t;
8509}
8510extern "C" {
8511 pub fn hipMemcpyFromArray_spt(
8512 dst: *mut ::std::os::raw::c_void,
8513 src: hipArray_const_t,
8514 wOffsetSrc: usize,
8515 hOffset: usize,
8516 count: usize,
8517 kind: hipMemcpyKind,
8518 ) -> hipError_t;
8519}
8520extern "C" {
8521 pub fn hipMemcpy2DToArray_spt(
8522 dst: hipArray_t,
8523 wOffset: usize,
8524 hOffset: usize,
8525 src: *const ::std::os::raw::c_void,
8526 spitch: usize,
8527 width: usize,
8528 height: usize,
8529 kind: hipMemcpyKind,
8530 ) -> hipError_t;
8531}
8532extern "C" {
8533 pub fn hipMemcpy2DFromArrayAsync_spt(
8534 dst: *mut ::std::os::raw::c_void,
8535 dpitch: usize,
8536 src: hipArray_const_t,
8537 wOffsetSrc: usize,
8538 hOffsetSrc: usize,
8539 width: usize,
8540 height: usize,
8541 kind: hipMemcpyKind,
8542 stream: hipStream_t,
8543 ) -> hipError_t;
8544}
8545extern "C" {
8546 pub fn hipMemcpy2DToArrayAsync_spt(
8547 dst: hipArray_t,
8548 wOffset: usize,
8549 hOffset: usize,
8550 src: *const ::std::os::raw::c_void,
8551 spitch: usize,
8552 width: usize,
8553 height: usize,
8554 kind: hipMemcpyKind,
8555 stream: hipStream_t,
8556 ) -> hipError_t;
8557}
8558extern "C" {
8559 pub fn hipStreamQuery_spt(stream: hipStream_t) -> hipError_t;
8560}
8561extern "C" {
8562 pub fn hipStreamSynchronize_spt(stream: hipStream_t) -> hipError_t;
8563}
8564extern "C" {
8565 pub fn hipStreamGetPriority_spt(
8566 stream: hipStream_t,
8567 priority: *mut ::std::os::raw::c_int,
8568 ) -> hipError_t;
8569}
8570extern "C" {
8571 pub fn hipStreamWaitEvent_spt(
8572 stream: hipStream_t,
8573 event: hipEvent_t,
8574 flags: ::std::os::raw::c_uint,
8575 ) -> hipError_t;
8576}
8577extern "C" {
8578 pub fn hipStreamGetFlags_spt(
8579 stream: hipStream_t,
8580 flags: *mut ::std::os::raw::c_uint,
8581 ) -> hipError_t;
8582}
8583extern "C" {
8584 pub fn hipStreamAddCallback_spt(
8585 stream: hipStream_t,
8586 callback: hipStreamCallback_t,
8587 userData: *mut ::std::os::raw::c_void,
8588 flags: ::std::os::raw::c_uint,
8589 ) -> hipError_t;
8590}
8591extern "C" {
8592 pub fn hipEventRecord_spt(event: hipEvent_t, stream: hipStream_t) -> hipError_t;
8593}
8594extern "C" {
8595 pub fn hipLaunchCooperativeKernel_spt(
8596 f: *const ::std::os::raw::c_void,
8597 gridDim: dim3,
8598 blockDim: dim3,
8599 kernelParams: *mut *mut ::std::os::raw::c_void,
8600 sharedMemBytes: u32,
8601 hStream: hipStream_t,
8602 ) -> hipError_t;
8603}
8604extern "C" {
8605 pub fn hipLaunchKernel_spt(
8606 function_address: *const ::std::os::raw::c_void,
8607 numBlocks: dim3,
8608 dimBlocks: dim3,
8609 args: *mut *mut ::std::os::raw::c_void,
8610 sharedMemBytes: usize,
8611 stream: hipStream_t,
8612 ) -> hipError_t;
8613}
8614extern "C" {
8615 pub fn hipGraphLaunch_spt(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
8616}
8617extern "C" {
8618 pub fn hipStreamBeginCapture_spt(stream: hipStream_t, mode: hipStreamCaptureMode)
8619 -> hipError_t;
8620}
8621extern "C" {
8622 pub fn hipStreamEndCapture_spt(stream: hipStream_t, pGraph: *mut hipGraph_t) -> hipError_t;
8623}
8624extern "C" {
8625 pub fn hipStreamIsCapturing_spt(
8626 stream: hipStream_t,
8627 pCaptureStatus: *mut hipStreamCaptureStatus,
8628 ) -> hipError_t;
8629}
8630extern "C" {
8631 pub fn hipStreamGetCaptureInfo_spt(
8632 stream: hipStream_t,
8633 pCaptureStatus: *mut hipStreamCaptureStatus,
8634 pId: *mut ::std::os::raw::c_ulonglong,
8635 ) -> hipError_t;
8636}
8637extern "C" {
8638 pub fn hipStreamGetCaptureInfo_v2_spt(
8639 stream: hipStream_t,
8640 captureStatus_out: *mut hipStreamCaptureStatus,
8641 id_out: *mut ::std::os::raw::c_ulonglong,
8642 graph_out: *mut hipGraph_t,
8643 dependencies_out: *mut *const hipGraphNode_t,
8644 numDependencies_out: *mut usize,
8645 ) -> hipError_t;
8646}
8647extern "C" {
8648 pub fn hipLaunchHostFunc_spt(
8649 stream: hipStream_t,
8650 fn_: hipHostFn_t,
8651 userData: *mut ::std::os::raw::c_void,
8652 ) -> hipError_t;
8653}
8654extern "C" {
8655 pub fn hipGetDriverEntryPoint_spt(
8656 symbol: *const ::std::os::raw::c_char,
8657 funcPtr: *mut *mut ::std::os::raw::c_void,
8658 flags: ::std::os::raw::c_ulonglong,
8659 status: *mut hipDriverEntryPointQueryResult,
8660 ) -> hipError_t;
8661}