cubecl_hip_sys/bindings/
bindings_51831.rs

1/* automatically generated by rust-bindgen 0.70.1 */
2
3#[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 = 0;
351pub const HIP_VERSION_PATCH: u32 = 51831;
352pub const HIP_VERSION_GITHASH: &[u8; 10] = b"a3e329ad8\0";
353pub const HIP_VERSION_BUILD_ID: u32 = 0;
354pub const HIP_VERSION_BUILD_NAME: &[u8; 1] = b"\0";
355pub const HIP_VERSION: u32 = 70051831;
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 hipHostAllocDefault: u32 = 0;
391pub const hipHostMallocDefault: u32 = 0;
392pub const hipHostAllocPortable: u32 = 1;
393pub const hipHostMallocPortable: u32 = 1;
394pub const hipHostAllocMapped: u32 = 2;
395pub const hipHostMallocMapped: u32 = 2;
396pub const hipHostAllocWriteCombined: u32 = 4;
397pub const hipHostMallocWriteCombined: u32 = 4;
398pub const hipHostMallocUncached: u32 = 268435456;
399pub const hipHostAllocUncached: u32 = 268435456;
400pub const hipHostMallocNumaUser: u32 = 536870912;
401pub const hipHostMallocCoherent: u32 = 1073741824;
402pub const hipHostMallocNonCoherent: u32 = 2147483648;
403pub const hipMemAttachGlobal: u32 = 1;
404pub const hipMemAttachHost: u32 = 2;
405pub const hipMemAttachSingle: u32 = 4;
406pub const hipDeviceMallocDefault: u32 = 0;
407pub const hipDeviceMallocFinegrained: u32 = 1;
408pub const hipMallocSignalMemory: u32 = 2;
409pub const hipDeviceMallocUncached: u32 = 3;
410pub const hipDeviceMallocContiguous: u32 = 4;
411pub const hipHostRegisterDefault: u32 = 0;
412pub const hipHostRegisterPortable: u32 = 1;
413pub const hipHostRegisterMapped: u32 = 2;
414pub const hipHostRegisterIoMemory: u32 = 4;
415pub const hipHostRegisterReadOnly: u32 = 8;
416pub const hipExtHostRegisterCoarseGrained: u32 = 8;
417pub const hipExtHostRegisterUncached: u32 = 2147483648;
418pub const hipDeviceScheduleAuto: u32 = 0;
419pub const hipDeviceScheduleSpin: u32 = 1;
420pub const hipDeviceScheduleYield: u32 = 2;
421pub const hipDeviceScheduleBlockingSync: u32 = 4;
422pub const hipDeviceScheduleMask: u32 = 7;
423pub const hipDeviceMapHost: u32 = 8;
424pub const hipDeviceLmemResizeToMax: u32 = 16;
425pub const hipArrayDefault: u32 = 0;
426pub const hipArrayLayered: u32 = 1;
427pub const hipArraySurfaceLoadStore: u32 = 2;
428pub const hipArrayCubemap: u32 = 4;
429pub const hipArrayTextureGather: u32 = 8;
430pub const hipOccupancyDefault: u32 = 0;
431pub const hipOccupancyDisableCachingOverride: u32 = 1;
432pub const hipCooperativeLaunchMultiDeviceNoPreSync: u32 = 1;
433pub const hipCooperativeLaunchMultiDeviceNoPostSync: u32 = 2;
434pub const hipExtAnyOrderLaunch: u32 = 1;
435pub const hipStreamWaitValueGte: u32 = 0;
436pub const hipStreamWaitValueEq: u32 = 1;
437pub const hipStreamWaitValueAnd: u32 = 2;
438pub const hipStreamWaitValueNor: u32 = 3;
439pub const hipExternalMemoryDedicated: u32 = 1;
440pub const hipGraphKernelNodePortDefault: u32 = 0;
441pub const hipGraphKernelNodePortLaunchCompletion: u32 = 2;
442pub const hipGraphKernelNodePortProgrammatic: u32 = 1;
443#[doc = "< CUDA Only Maximum registers may be used in a thread,\n< passed to compiler"]
444pub const hipJitOption_hipJitOptionMaxRegisters: hipJitOption = 0;
445#[doc = "< CUDA Only Number of thread per block"]
446pub const hipJitOption_hipJitOptionThreadsPerBlock: hipJitOption = 1;
447#[doc = "< CUDA Only Value for total wall clock time"]
448pub const hipJitOption_hipJitOptionWallTime: hipJitOption = 2;
449#[doc = "< CUDA Only Pointer to the buffer with logged information"]
450pub const hipJitOption_hipJitOptionInfoLogBuffer: hipJitOption = 3;
451#[doc = "< CUDA Only Size of the buffer in bytes for logged info"]
452pub const hipJitOption_hipJitOptionInfoLogBufferSizeBytes: hipJitOption = 4;
453#[doc = "< CUDA Only Pointer to the buffer with logged error(s)"]
454pub const hipJitOption_hipJitOptionErrorLogBuffer: hipJitOption = 5;
455#[doc = "< CUDA Only Size of the buffer in bytes for logged error(s)"]
456pub const hipJitOption_hipJitOptionErrorLogBufferSizeBytes: hipJitOption = 6;
457#[doc = "< Value of optimization level for generated codes, acceptable options\n< -O0, -O1, -O2, -O3"]
458pub const hipJitOption_hipJitOptionOptimizationLevel: hipJitOption = 7;
459#[doc = "< CUDA Only The target context, which is the default"]
460pub const hipJitOption_hipJitOptionTargetFromContext: hipJitOption = 8;
461#[doc = "< CUDA Only JIT target"]
462pub const hipJitOption_hipJitOptionTarget: hipJitOption = 9;
463#[doc = "< CUDA Only Fallback strategy"]
464pub const hipJitOption_hipJitOptionFallbackStrategy: hipJitOption = 10;
465#[doc = "< CUDA Only Generate debug information"]
466pub const hipJitOption_hipJitOptionGenerateDebugInfo: hipJitOption = 11;
467#[doc = "< CUDA Only Generate log verbose"]
468pub const hipJitOption_hipJitOptionLogVerbose: hipJitOption = 12;
469#[doc = "< CUDA Only Generate line number information"]
470pub const hipJitOption_hipJitOptionGenerateLineInfo: hipJitOption = 13;
471#[doc = "< CUDA Only Set cache mode"]
472pub const hipJitOption_hipJitOptionCacheMode: hipJitOption = 14;
473#[doc = "< @deprecated CUDA Only New SM3X option."]
474pub const hipJitOption_hipJitOptionSm3xOpt: hipJitOption = 15;
475#[doc = "< CUDA Only Set fast compile"]
476pub const hipJitOption_hipJitOptionFastCompile: hipJitOption = 16;
477#[doc = "< CUDA Only Array of device symbol names to be relocated to the host"]
478pub const hipJitOption_hipJitOptionGlobalSymbolNames: hipJitOption = 17;
479#[doc = "< CUDA Only Array of host addresses to be relocated to the device"]
480pub const hipJitOption_hipJitOptionGlobalSymbolAddresses: hipJitOption = 18;
481#[doc = "< CUDA Only Number of symbol count."]
482pub const hipJitOption_hipJitOptionGlobalSymbolCount: hipJitOption = 19;
483#[doc = "< @deprecated CUDA Only Enable link-time optimization for device code"]
484pub const hipJitOption_hipJitOptionLto: hipJitOption = 20;
485#[doc = "< @deprecated CUDA Only Set single-precision denormals."]
486pub const hipJitOption_hipJitOptionFtz: hipJitOption = 21;
487#[doc = "< @deprecated CUDA Only Set single-precision floating-point division\n< and reciprocals"]
488pub const hipJitOption_hipJitOptionPrecDiv: hipJitOption = 22;
489#[doc = "< @deprecated CUDA Only Set single-precision floating-point square root"]
490pub const hipJitOption_hipJitOptionPrecSqrt: hipJitOption = 23;
491#[doc = "< @deprecated CUDA Only Enable floating-point multiplies and\n< adds/subtracts operations"]
492pub const hipJitOption_hipJitOptionFma: hipJitOption = 24;
493#[doc = "< CUDA Only Generates Position Independent code"]
494pub const hipJitOption_hipJitOptionPositionIndependentCode: hipJitOption = 25;
495#[doc = "< CUDA Only Hints to JIT compiler the minimum number of CTAs frin kernel's\n< grid to be mapped to SM"]
496pub const hipJitOption_hipJitOptionMinCTAPerSM: hipJitOption = 26;
497#[doc = "< CUDA only Maximum number of threads in a thread block"]
498pub const hipJitOption_hipJitOptionMaxThreadsPerBlock: hipJitOption = 27;
499#[doc = "< Cuda only Override Directive values"]
500pub const hipJitOption_hipJitOptionOverrideDirectiveValues: hipJitOption = 28;
501#[doc = "< Number of options"]
502pub const hipJitOption_hipJitOptionNumOptions: hipJitOption = 29;
503#[doc = "< Hip Only Linker options to be passed on to compiler"]
504pub const hipJitOption_hipJitOptionIRtoISAOptExt: hipJitOption = 10000;
505#[doc = "< Hip Only Count of linker options to be passed on to compiler"]
506pub const hipJitOption_hipJitOptionIRtoISAOptCountExt: hipJitOption = 10001;
507#[doc = " hipJitOption"]
508pub type hipJitOption = ::std::os::raw::c_uint;
509#[doc = "< Cuda only Input cubin"]
510pub const hipJitInputType_hipJitInputCubin: hipJitInputType = 0;
511#[doc = "< Cuda only Input PTX"]
512pub const hipJitInputType_hipJitInputPtx: hipJitInputType = 1;
513#[doc = "< Cuda Only Input FAT Binary"]
514pub const hipJitInputType_hipJitInputFatBinary: hipJitInputType = 2;
515#[doc = "< Cuda Only Host Object with embedded device code"]
516pub const hipJitInputType_hipJitInputObject: hipJitInputType = 3;
517#[doc = "< Cuda Only Archive of Host Objects with embedded\n< device code"]
518pub const hipJitInputType_hipJitInputLibrary: hipJitInputType = 4;
519#[doc = "< @deprecated Cuda only High Level intermediate\n< code for LTO"]
520pub const hipJitInputType_hipJitInputNvvm: hipJitInputType = 5;
521#[doc = "< Count of Legacy Input Types"]
522pub const hipJitInputType_hipJitNumLegacyInputTypes: hipJitInputType = 6;
523#[doc = "< HIP Only LLVM Bitcode or IR assembly"]
524pub const hipJitInputType_hipJitInputLLVMBitcode: hipJitInputType = 100;
525#[doc = "< HIP Only LLVM Clang Bundled Code"]
526pub const hipJitInputType_hipJitInputLLVMBundledBitcode: hipJitInputType = 101;
527#[doc = "< HIP Only LLVM Archive of Bundled Bitcode"]
528pub const hipJitInputType_hipJitInputLLVMArchivesOfBundledBitcode: hipJitInputType = 102;
529#[doc = "< HIP Only SPIRV Code Object"]
530pub const hipJitInputType_hipJitInputSpirv: hipJitInputType = 103;
531#[doc = "< Count of Input Types"]
532pub const hipJitInputType_hipJitNumInputTypes: hipJitInputType = 10;
533#[doc = " hipJitInputType"]
534pub type hipJitInputType = ::std::os::raw::c_uint;
535pub const hipJitCacheMode_hipJitCacheOptionNone: hipJitCacheMode = 0;
536pub const hipJitCacheMode_hipJitCacheOptionCG: hipJitCacheMode = 1;
537pub const hipJitCacheMode_hipJitCacheOptionCA: hipJitCacheMode = 2;
538#[doc = " hipJitCacheMode"]
539pub type hipJitCacheMode = ::std::os::raw::c_uint;
540pub const hipJitFallback_hipJitPreferPTX: hipJitFallback = 0;
541pub const hipJitFallback_hipJitPreferBinary: hipJitFallback = 1;
542#[doc = " hipJitFallback"]
543pub type hipJitFallback = ::std::os::raw::c_uint;
544pub type wchar_t = ::std::os::raw::c_int;
545pub type _Float32 = f32;
546pub type _Float64 = f64;
547pub type _Float32x = f64;
548pub type _Float64x = u128;
549#[repr(C)]
550#[derive(Debug, Copy, Clone)]
551pub struct div_t {
552    pub quot: ::std::os::raw::c_int,
553    pub rem: ::std::os::raw::c_int,
554}
555#[repr(C)]
556#[derive(Debug, Copy, Clone)]
557pub struct ldiv_t {
558    pub quot: ::std::os::raw::c_long,
559    pub rem: ::std::os::raw::c_long,
560}
561#[repr(C)]
562#[derive(Debug, Copy, Clone)]
563pub struct lldiv_t {
564    pub quot: ::std::os::raw::c_longlong,
565    pub rem: ::std::os::raw::c_longlong,
566}
567extern "C" {
568    pub fn __ctype_get_mb_cur_max() -> usize;
569}
570extern "C" {
571    pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64;
572}
573extern "C" {
574    pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
575}
576extern "C" {
577    pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
578}
579extern "C" {
580    pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong;
581}
582extern "C" {
583    pub fn strtod(
584        __nptr: *const ::std::os::raw::c_char,
585        __endptr: *mut *mut ::std::os::raw::c_char,
586    ) -> f64;
587}
588extern "C" {
589    pub fn strtof(
590        __nptr: *const ::std::os::raw::c_char,
591        __endptr: *mut *mut ::std::os::raw::c_char,
592    ) -> f32;
593}
594extern "C" {
595    pub fn strtold(
596        __nptr: *const ::std::os::raw::c_char,
597        __endptr: *mut *mut ::std::os::raw::c_char,
598    ) -> u128;
599}
600extern "C" {
601    pub fn strtol(
602        __nptr: *const ::std::os::raw::c_char,
603        __endptr: *mut *mut ::std::os::raw::c_char,
604        __base: ::std::os::raw::c_int,
605    ) -> ::std::os::raw::c_long;
606}
607extern "C" {
608    pub fn strtoul(
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_ulong;
613}
614extern "C" {
615    pub fn strtoq(
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_longlong;
620}
621extern "C" {
622    pub fn strtouq(
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_ulonglong;
627}
628extern "C" {
629    pub fn strtoll(
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_longlong;
634}
635extern "C" {
636    pub fn strtoull(
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_ulonglong;
641}
642extern "C" {
643    pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char;
644}
645extern "C" {
646    pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
647}
648pub type __u_char = ::std::os::raw::c_uchar;
649pub type __u_short = ::std::os::raw::c_ushort;
650pub type __u_int = ::std::os::raw::c_uint;
651pub type __u_long = ::std::os::raw::c_ulong;
652pub type __int8_t = ::std::os::raw::c_schar;
653pub type __uint8_t = ::std::os::raw::c_uchar;
654pub type __int16_t = ::std::os::raw::c_short;
655pub type __uint16_t = ::std::os::raw::c_ushort;
656pub type __int32_t = ::std::os::raw::c_int;
657pub type __uint32_t = ::std::os::raw::c_uint;
658pub type __int64_t = ::std::os::raw::c_long;
659pub type __uint64_t = ::std::os::raw::c_ulong;
660pub type __int_least8_t = __int8_t;
661pub type __uint_least8_t = __uint8_t;
662pub type __int_least16_t = __int16_t;
663pub type __uint_least16_t = __uint16_t;
664pub type __int_least32_t = __int32_t;
665pub type __uint_least32_t = __uint32_t;
666pub type __int_least64_t = __int64_t;
667pub type __uint_least64_t = __uint64_t;
668pub type __quad_t = ::std::os::raw::c_long;
669pub type __u_quad_t = ::std::os::raw::c_ulong;
670pub type __intmax_t = ::std::os::raw::c_long;
671pub type __uintmax_t = ::std::os::raw::c_ulong;
672pub type __dev_t = ::std::os::raw::c_ulong;
673pub type __uid_t = ::std::os::raw::c_uint;
674pub type __gid_t = ::std::os::raw::c_uint;
675pub type __ino_t = ::std::os::raw::c_ulong;
676pub type __ino64_t = ::std::os::raw::c_ulong;
677pub type __mode_t = ::std::os::raw::c_uint;
678pub type __nlink_t = ::std::os::raw::c_ulong;
679pub type __off_t = ::std::os::raw::c_long;
680pub type __off64_t = ::std::os::raw::c_long;
681pub type __pid_t = ::std::os::raw::c_int;
682#[repr(C)]
683#[derive(Debug, Copy, Clone)]
684pub struct __fsid_t {
685    pub __val: [::std::os::raw::c_int; 2usize],
686}
687pub type __clock_t = ::std::os::raw::c_long;
688pub type __rlim_t = ::std::os::raw::c_ulong;
689pub type __rlim64_t = ::std::os::raw::c_ulong;
690pub type __id_t = ::std::os::raw::c_uint;
691pub type __time_t = ::std::os::raw::c_long;
692pub type __useconds_t = ::std::os::raw::c_uint;
693pub type __suseconds_t = ::std::os::raw::c_long;
694pub type __suseconds64_t = ::std::os::raw::c_long;
695pub type __daddr_t = ::std::os::raw::c_int;
696pub type __key_t = ::std::os::raw::c_int;
697pub type __clockid_t = ::std::os::raw::c_int;
698pub type __timer_t = *mut ::std::os::raw::c_void;
699pub type __blksize_t = ::std::os::raw::c_long;
700pub type __blkcnt_t = ::std::os::raw::c_long;
701pub type __blkcnt64_t = ::std::os::raw::c_long;
702pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
703pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
704pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
705pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
706pub type __fsword_t = ::std::os::raw::c_long;
707pub type __ssize_t = ::std::os::raw::c_long;
708pub type __syscall_slong_t = ::std::os::raw::c_long;
709pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
710pub type __loff_t = __off64_t;
711pub type __caddr_t = *mut ::std::os::raw::c_char;
712pub type __intptr_t = ::std::os::raw::c_long;
713pub type __socklen_t = ::std::os::raw::c_uint;
714pub type __sig_atomic_t = ::std::os::raw::c_int;
715pub type u_char = __u_char;
716pub type u_short = __u_short;
717pub type u_int = __u_int;
718pub type u_long = __u_long;
719pub type quad_t = __quad_t;
720pub type u_quad_t = __u_quad_t;
721pub type fsid_t = __fsid_t;
722pub type loff_t = __loff_t;
723pub type ino_t = __ino_t;
724pub type dev_t = __dev_t;
725pub type gid_t = __gid_t;
726pub type mode_t = __mode_t;
727pub type nlink_t = __nlink_t;
728pub type uid_t = __uid_t;
729pub type off_t = __off_t;
730pub type pid_t = __pid_t;
731pub type id_t = __id_t;
732pub type daddr_t = __daddr_t;
733pub type caddr_t = __caddr_t;
734pub type key_t = __key_t;
735pub type clock_t = __clock_t;
736pub type clockid_t = __clockid_t;
737pub type time_t = __time_t;
738pub type timer_t = __timer_t;
739pub type ulong = ::std::os::raw::c_ulong;
740pub type ushort = ::std::os::raw::c_ushort;
741pub type uint = ::std::os::raw::c_uint;
742pub type u_int8_t = __uint8_t;
743pub type u_int16_t = __uint16_t;
744pub type u_int32_t = __uint32_t;
745pub type u_int64_t = __uint64_t;
746pub type register_t = ::std::os::raw::c_long;
747#[repr(C)]
748#[derive(Debug, Copy, Clone)]
749pub struct __sigset_t {
750    pub __val: [::std::os::raw::c_ulong; 16usize],
751}
752pub type sigset_t = __sigset_t;
753#[repr(C)]
754#[derive(Debug, Copy, Clone)]
755pub struct timeval {
756    pub tv_sec: __time_t,
757    pub tv_usec: __suseconds_t,
758}
759#[repr(C)]
760#[derive(Debug, Copy, Clone)]
761pub struct timespec {
762    pub tv_sec: __time_t,
763    pub tv_nsec: __syscall_slong_t,
764}
765pub type suseconds_t = __suseconds_t;
766pub type __fd_mask = ::std::os::raw::c_long;
767#[repr(C)]
768#[derive(Debug, Copy, Clone)]
769pub struct fd_set {
770    pub __fds_bits: [__fd_mask; 16usize],
771}
772pub type fd_mask = __fd_mask;
773extern "C" {
774    pub fn select(
775        __nfds: ::std::os::raw::c_int,
776        __readfds: *mut fd_set,
777        __writefds: *mut fd_set,
778        __exceptfds: *mut fd_set,
779        __timeout: *mut timeval,
780    ) -> ::std::os::raw::c_int;
781}
782extern "C" {
783    pub fn pselect(
784        __nfds: ::std::os::raw::c_int,
785        __readfds: *mut fd_set,
786        __writefds: *mut fd_set,
787        __exceptfds: *mut fd_set,
788        __timeout: *const timespec,
789        __sigmask: *const __sigset_t,
790    ) -> ::std::os::raw::c_int;
791}
792pub type blksize_t = __blksize_t;
793pub type blkcnt_t = __blkcnt_t;
794pub type fsblkcnt_t = __fsblkcnt_t;
795pub type fsfilcnt_t = __fsfilcnt_t;
796#[repr(C)]
797#[derive(Copy, Clone)]
798pub union __atomic_wide_counter {
799    pub __value64: ::std::os::raw::c_ulonglong,
800    pub __value32: __atomic_wide_counter__bindgen_ty_1,
801}
802#[repr(C)]
803#[derive(Debug, Copy, Clone)]
804pub struct __atomic_wide_counter__bindgen_ty_1 {
805    pub __low: ::std::os::raw::c_uint,
806    pub __high: ::std::os::raw::c_uint,
807}
808#[repr(C)]
809#[derive(Debug, Copy, Clone)]
810pub struct __pthread_internal_list {
811    pub __prev: *mut __pthread_internal_list,
812    pub __next: *mut __pthread_internal_list,
813}
814pub type __pthread_list_t = __pthread_internal_list;
815#[repr(C)]
816#[derive(Debug, Copy, Clone)]
817pub struct __pthread_internal_slist {
818    pub __next: *mut __pthread_internal_slist,
819}
820pub type __pthread_slist_t = __pthread_internal_slist;
821#[repr(C)]
822#[derive(Debug, Copy, Clone)]
823pub struct __pthread_mutex_s {
824    pub __lock: ::std::os::raw::c_int,
825    pub __count: ::std::os::raw::c_uint,
826    pub __owner: ::std::os::raw::c_int,
827    pub __nusers: ::std::os::raw::c_uint,
828    pub __kind: ::std::os::raw::c_int,
829    pub __spins: ::std::os::raw::c_short,
830    pub __elision: ::std::os::raw::c_short,
831    pub __list: __pthread_list_t,
832}
833#[repr(C)]
834#[derive(Debug, Copy, Clone)]
835pub struct __pthread_rwlock_arch_t {
836    pub __readers: ::std::os::raw::c_uint,
837    pub __writers: ::std::os::raw::c_uint,
838    pub __wrphase_futex: ::std::os::raw::c_uint,
839    pub __writers_futex: ::std::os::raw::c_uint,
840    pub __pad3: ::std::os::raw::c_uint,
841    pub __pad4: ::std::os::raw::c_uint,
842    pub __cur_writer: ::std::os::raw::c_int,
843    pub __shared: ::std::os::raw::c_int,
844    pub __rwelision: ::std::os::raw::c_schar,
845    pub __pad1: [::std::os::raw::c_uchar; 7usize],
846    pub __pad2: ::std::os::raw::c_ulong,
847    pub __flags: ::std::os::raw::c_uint,
848}
849#[repr(C)]
850#[derive(Copy, Clone)]
851pub struct __pthread_cond_s {
852    pub __wseq: __atomic_wide_counter,
853    pub __g1_start: __atomic_wide_counter,
854    pub __g_refs: [::std::os::raw::c_uint; 2usize],
855    pub __g_size: [::std::os::raw::c_uint; 2usize],
856    pub __g1_orig_size: ::std::os::raw::c_uint,
857    pub __wrefs: ::std::os::raw::c_uint,
858    pub __g_signals: [::std::os::raw::c_uint; 2usize],
859}
860pub type __tss_t = ::std::os::raw::c_uint;
861pub type __thrd_t = ::std::os::raw::c_ulong;
862#[repr(C)]
863#[derive(Debug, Copy, Clone)]
864pub struct __once_flag {
865    pub __data: ::std::os::raw::c_int,
866}
867pub type pthread_t = ::std::os::raw::c_ulong;
868#[repr(C)]
869#[derive(Copy, Clone)]
870pub union pthread_mutexattr_t {
871    pub __size: [::std::os::raw::c_char; 4usize],
872    pub __align: ::std::os::raw::c_int,
873}
874#[repr(C)]
875#[derive(Copy, Clone)]
876pub union pthread_condattr_t {
877    pub __size: [::std::os::raw::c_char; 4usize],
878    pub __align: ::std::os::raw::c_int,
879}
880pub type pthread_key_t = ::std::os::raw::c_uint;
881pub type pthread_once_t = ::std::os::raw::c_int;
882#[repr(C)]
883#[derive(Copy, Clone)]
884pub union pthread_attr_t {
885    pub __size: [::std::os::raw::c_char; 56usize],
886    pub __align: ::std::os::raw::c_long,
887}
888#[repr(C)]
889#[derive(Copy, Clone)]
890pub union pthread_mutex_t {
891    pub __data: __pthread_mutex_s,
892    pub __size: [::std::os::raw::c_char; 40usize],
893    pub __align: ::std::os::raw::c_long,
894}
895#[repr(C)]
896#[derive(Copy, Clone)]
897pub union pthread_cond_t {
898    pub __data: __pthread_cond_s,
899    pub __size: [::std::os::raw::c_char; 48usize],
900    pub __align: ::std::os::raw::c_longlong,
901}
902#[repr(C)]
903#[derive(Copy, Clone)]
904pub union pthread_rwlock_t {
905    pub __data: __pthread_rwlock_arch_t,
906    pub __size: [::std::os::raw::c_char; 56usize],
907    pub __align: ::std::os::raw::c_long,
908}
909#[repr(C)]
910#[derive(Copy, Clone)]
911pub union pthread_rwlockattr_t {
912    pub __size: [::std::os::raw::c_char; 8usize],
913    pub __align: ::std::os::raw::c_long,
914}
915pub type pthread_spinlock_t = ::std::os::raw::c_int;
916#[repr(C)]
917#[derive(Copy, Clone)]
918pub union pthread_barrier_t {
919    pub __size: [::std::os::raw::c_char; 32usize],
920    pub __align: ::std::os::raw::c_long,
921}
922#[repr(C)]
923#[derive(Copy, Clone)]
924pub union pthread_barrierattr_t {
925    pub __size: [::std::os::raw::c_char; 4usize],
926    pub __align: ::std::os::raw::c_int,
927}
928extern "C" {
929    pub fn random() -> ::std::os::raw::c_long;
930}
931extern "C" {
932    pub fn srandom(__seed: ::std::os::raw::c_uint);
933}
934extern "C" {
935    pub fn initstate(
936        __seed: ::std::os::raw::c_uint,
937        __statebuf: *mut ::std::os::raw::c_char,
938        __statelen: usize,
939    ) -> *mut ::std::os::raw::c_char;
940}
941extern "C" {
942    pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
943}
944#[repr(C)]
945#[derive(Debug, Copy, Clone)]
946pub struct random_data {
947    pub fptr: *mut i32,
948    pub rptr: *mut i32,
949    pub state: *mut i32,
950    pub rand_type: ::std::os::raw::c_int,
951    pub rand_deg: ::std::os::raw::c_int,
952    pub rand_sep: ::std::os::raw::c_int,
953    pub end_ptr: *mut i32,
954}
955extern "C" {
956    pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int;
957}
958extern "C" {
959    pub fn srandom_r(
960        __seed: ::std::os::raw::c_uint,
961        __buf: *mut random_data,
962    ) -> ::std::os::raw::c_int;
963}
964extern "C" {
965    pub fn initstate_r(
966        __seed: ::std::os::raw::c_uint,
967        __statebuf: *mut ::std::os::raw::c_char,
968        __statelen: usize,
969        __buf: *mut random_data,
970    ) -> ::std::os::raw::c_int;
971}
972extern "C" {
973    pub fn setstate_r(
974        __statebuf: *mut ::std::os::raw::c_char,
975        __buf: *mut random_data,
976    ) -> ::std::os::raw::c_int;
977}
978extern "C" {
979    pub fn rand() -> ::std::os::raw::c_int;
980}
981extern "C" {
982    pub fn srand(__seed: ::std::os::raw::c_uint);
983}
984extern "C" {
985    pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
986}
987extern "C" {
988    pub fn drand48() -> f64;
989}
990extern "C" {
991    pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64;
992}
993extern "C" {
994    pub fn lrand48() -> ::std::os::raw::c_long;
995}
996extern "C" {
997    pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
998}
999extern "C" {
1000    pub fn mrand48() -> ::std::os::raw::c_long;
1001}
1002extern "C" {
1003    pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
1004}
1005extern "C" {
1006    pub fn srand48(__seedval: ::std::os::raw::c_long);
1007}
1008extern "C" {
1009    pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort;
1010}
1011extern "C" {
1012    pub fn lcong48(__param: *mut ::std::os::raw::c_ushort);
1013}
1014#[repr(C)]
1015#[derive(Debug, Copy, Clone)]
1016pub struct drand48_data {
1017    pub __x: [::std::os::raw::c_ushort; 3usize],
1018    pub __old_x: [::std::os::raw::c_ushort; 3usize],
1019    pub __c: ::std::os::raw::c_ushort,
1020    pub __init: ::std::os::raw::c_ushort,
1021    pub __a: ::std::os::raw::c_ulonglong,
1022}
1023extern "C" {
1024    pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int;
1025}
1026extern "C" {
1027    pub fn erand48_r(
1028        __xsubi: *mut ::std::os::raw::c_ushort,
1029        __buffer: *mut drand48_data,
1030        __result: *mut f64,
1031    ) -> ::std::os::raw::c_int;
1032}
1033extern "C" {
1034    pub fn lrand48_r(
1035        __buffer: *mut drand48_data,
1036        __result: *mut ::std::os::raw::c_long,
1037    ) -> ::std::os::raw::c_int;
1038}
1039extern "C" {
1040    pub fn nrand48_r(
1041        __xsubi: *mut ::std::os::raw::c_ushort,
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 mrand48_r(
1048        __buffer: *mut drand48_data,
1049        __result: *mut ::std::os::raw::c_long,
1050    ) -> ::std::os::raw::c_int;
1051}
1052extern "C" {
1053    pub fn jrand48_r(
1054        __xsubi: *mut ::std::os::raw::c_ushort,
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 srand48_r(
1061        __seedval: ::std::os::raw::c_long,
1062        __buffer: *mut drand48_data,
1063    ) -> ::std::os::raw::c_int;
1064}
1065extern "C" {
1066    pub fn seed48_r(
1067        __seed16v: *mut ::std::os::raw::c_ushort,
1068        __buffer: *mut drand48_data,
1069    ) -> ::std::os::raw::c_int;
1070}
1071extern "C" {
1072    pub fn lcong48_r(
1073        __param: *mut ::std::os::raw::c_ushort,
1074        __buffer: *mut drand48_data,
1075    ) -> ::std::os::raw::c_int;
1076}
1077extern "C" {
1078    pub fn arc4random() -> __uint32_t;
1079}
1080extern "C" {
1081    pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __size: usize);
1082}
1083extern "C" {
1084    pub fn arc4random_uniform(__upper_bound: __uint32_t) -> __uint32_t;
1085}
1086extern "C" {
1087    pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
1088}
1089extern "C" {
1090    pub fn calloc(
1091        __nmemb: ::std::os::raw::c_ulong,
1092        __size: ::std::os::raw::c_ulong,
1093    ) -> *mut ::std::os::raw::c_void;
1094}
1095extern "C" {
1096    pub fn realloc(
1097        __ptr: *mut ::std::os::raw::c_void,
1098        __size: ::std::os::raw::c_ulong,
1099    ) -> *mut ::std::os::raw::c_void;
1100}
1101extern "C" {
1102    pub fn free(__ptr: *mut ::std::os::raw::c_void);
1103}
1104extern "C" {
1105    pub fn reallocarray(
1106        __ptr: *mut ::std::os::raw::c_void,
1107        __nmemb: usize,
1108        __size: usize,
1109    ) -> *mut ::std::os::raw::c_void;
1110}
1111extern "C" {
1112    pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
1113}
1114extern "C" {
1115    pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void;
1116}
1117extern "C" {
1118    pub fn posix_memalign(
1119        __memptr: *mut *mut ::std::os::raw::c_void,
1120        __alignment: usize,
1121        __size: usize,
1122    ) -> ::std::os::raw::c_int;
1123}
1124extern "C" {
1125    pub fn aligned_alloc(
1126        __alignment: ::std::os::raw::c_ulong,
1127        __size: ::std::os::raw::c_ulong,
1128    ) -> *mut ::std::os::raw::c_void;
1129}
1130extern "C" {
1131    pub fn abort() -> !;
1132}
1133extern "C" {
1134    pub fn atexit(__func: ::std::option::Option<unsafe extern "C" fn()>) -> ::std::os::raw::c_int;
1135}
1136extern "C" {
1137    pub fn at_quick_exit(
1138        __func: ::std::option::Option<unsafe extern "C" fn()>,
1139    ) -> ::std::os::raw::c_int;
1140}
1141extern "C" {
1142    pub fn on_exit(
1143        __func: ::std::option::Option<
1144            unsafe extern "C" fn(
1145                __status: ::std::os::raw::c_int,
1146                __arg: *mut ::std::os::raw::c_void,
1147            ),
1148        >,
1149        __arg: *mut ::std::os::raw::c_void,
1150    ) -> ::std::os::raw::c_int;
1151}
1152extern "C" {
1153    pub fn exit(__status: ::std::os::raw::c_int) -> !;
1154}
1155extern "C" {
1156    pub fn quick_exit(__status: ::std::os::raw::c_int) -> !;
1157}
1158extern "C" {
1159    pub fn _Exit(__status: ::std::os::raw::c_int) -> !;
1160}
1161extern "C" {
1162    pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1163}
1164extern "C" {
1165    pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1166}
1167extern "C" {
1168    pub fn setenv(
1169        __name: *const ::std::os::raw::c_char,
1170        __value: *const ::std::os::raw::c_char,
1171        __replace: ::std::os::raw::c_int,
1172    ) -> ::std::os::raw::c_int;
1173}
1174extern "C" {
1175    pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1176}
1177extern "C" {
1178    pub fn clearenv() -> ::std::os::raw::c_int;
1179}
1180extern "C" {
1181    pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1182}
1183extern "C" {
1184    pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1185}
1186extern "C" {
1187    pub fn mkstemps(
1188        __template: *mut ::std::os::raw::c_char,
1189        __suffixlen: ::std::os::raw::c_int,
1190    ) -> ::std::os::raw::c_int;
1191}
1192extern "C" {
1193    pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1194}
1195extern "C" {
1196    pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1197}
1198extern "C" {
1199    pub fn realpath(
1200        __name: *const ::std::os::raw::c_char,
1201        __resolved: *mut ::std::os::raw::c_char,
1202    ) -> *mut ::std::os::raw::c_char;
1203}
1204pub type __compar_fn_t = ::std::option::Option<
1205    unsafe extern "C" fn(
1206        arg1: *const ::std::os::raw::c_void,
1207        arg2: *const ::std::os::raw::c_void,
1208    ) -> ::std::os::raw::c_int,
1209>;
1210extern "C" {
1211    pub fn bsearch(
1212        __key: *const ::std::os::raw::c_void,
1213        __base: *const ::std::os::raw::c_void,
1214        __nmemb: usize,
1215        __size: usize,
1216        __compar: __compar_fn_t,
1217    ) -> *mut ::std::os::raw::c_void;
1218}
1219extern "C" {
1220    pub fn qsort(
1221        __base: *mut ::std::os::raw::c_void,
1222        __nmemb: usize,
1223        __size: usize,
1224        __compar: __compar_fn_t,
1225    );
1226}
1227extern "C" {
1228    pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
1229}
1230extern "C" {
1231    pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long;
1232}
1233extern "C" {
1234    pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong;
1235}
1236extern "C" {
1237    pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t;
1238}
1239extern "C" {
1240    pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t;
1241}
1242extern "C" {
1243    pub fn lldiv(
1244        __numer: ::std::os::raw::c_longlong,
1245        __denom: ::std::os::raw::c_longlong,
1246    ) -> lldiv_t;
1247}
1248extern "C" {
1249    pub fn ecvt(
1250        __value: f64,
1251        __ndigit: ::std::os::raw::c_int,
1252        __decpt: *mut ::std::os::raw::c_int,
1253        __sign: *mut ::std::os::raw::c_int,
1254    ) -> *mut ::std::os::raw::c_char;
1255}
1256extern "C" {
1257    pub fn fcvt(
1258        __value: f64,
1259        __ndigit: ::std::os::raw::c_int,
1260        __decpt: *mut ::std::os::raw::c_int,
1261        __sign: *mut ::std::os::raw::c_int,
1262    ) -> *mut ::std::os::raw::c_char;
1263}
1264extern "C" {
1265    pub fn gcvt(
1266        __value: f64,
1267        __ndigit: ::std::os::raw::c_int,
1268        __buf: *mut ::std::os::raw::c_char,
1269    ) -> *mut ::std::os::raw::c_char;
1270}
1271extern "C" {
1272    pub fn qecvt(
1273        __value: u128,
1274        __ndigit: ::std::os::raw::c_int,
1275        __decpt: *mut ::std::os::raw::c_int,
1276        __sign: *mut ::std::os::raw::c_int,
1277    ) -> *mut ::std::os::raw::c_char;
1278}
1279extern "C" {
1280    pub fn qfcvt(
1281        __value: u128,
1282        __ndigit: ::std::os::raw::c_int,
1283        __decpt: *mut ::std::os::raw::c_int,
1284        __sign: *mut ::std::os::raw::c_int,
1285    ) -> *mut ::std::os::raw::c_char;
1286}
1287extern "C" {
1288    pub fn qgcvt(
1289        __value: u128,
1290        __ndigit: ::std::os::raw::c_int,
1291        __buf: *mut ::std::os::raw::c_char,
1292    ) -> *mut ::std::os::raw::c_char;
1293}
1294extern "C" {
1295    pub fn ecvt_r(
1296        __value: f64,
1297        __ndigit: ::std::os::raw::c_int,
1298        __decpt: *mut ::std::os::raw::c_int,
1299        __sign: *mut ::std::os::raw::c_int,
1300        __buf: *mut ::std::os::raw::c_char,
1301        __len: usize,
1302    ) -> ::std::os::raw::c_int;
1303}
1304extern "C" {
1305    pub fn fcvt_r(
1306        __value: f64,
1307        __ndigit: ::std::os::raw::c_int,
1308        __decpt: *mut ::std::os::raw::c_int,
1309        __sign: *mut ::std::os::raw::c_int,
1310        __buf: *mut ::std::os::raw::c_char,
1311        __len: usize,
1312    ) -> ::std::os::raw::c_int;
1313}
1314extern "C" {
1315    pub fn qecvt_r(
1316        __value: u128,
1317        __ndigit: ::std::os::raw::c_int,
1318        __decpt: *mut ::std::os::raw::c_int,
1319        __sign: *mut ::std::os::raw::c_int,
1320        __buf: *mut ::std::os::raw::c_char,
1321        __len: usize,
1322    ) -> ::std::os::raw::c_int;
1323}
1324extern "C" {
1325    pub fn qfcvt_r(
1326        __value: u128,
1327        __ndigit: ::std::os::raw::c_int,
1328        __decpt: *mut ::std::os::raw::c_int,
1329        __sign: *mut ::std::os::raw::c_int,
1330        __buf: *mut ::std::os::raw::c_char,
1331        __len: usize,
1332    ) -> ::std::os::raw::c_int;
1333}
1334extern "C" {
1335    pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int;
1336}
1337extern "C" {
1338    pub fn mbtowc(
1339        __pwc: *mut wchar_t,
1340        __s: *const ::std::os::raw::c_char,
1341        __n: usize,
1342    ) -> ::std::os::raw::c_int;
1343}
1344extern "C" {
1345    pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int;
1346}
1347extern "C" {
1348    pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: usize) -> usize;
1349}
1350extern "C" {
1351    pub fn wcstombs(__s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, __n: usize) -> usize;
1352}
1353extern "C" {
1354    pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1355}
1356extern "C" {
1357    pub fn getsubopt(
1358        __optionp: *mut *mut ::std::os::raw::c_char,
1359        __tokens: *const *mut ::std::os::raw::c_char,
1360        __valuep: *mut *mut ::std::os::raw::c_char,
1361    ) -> ::std::os::raw::c_int;
1362}
1363extern "C" {
1364    pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int)
1365        -> ::std::os::raw::c_int;
1366}
1367#[doc = "< Success"]
1368pub const hiprtcResult_HIPRTC_SUCCESS: hiprtcResult = 0;
1369#[doc = "< Out of memory"]
1370pub const hiprtcResult_HIPRTC_ERROR_OUT_OF_MEMORY: hiprtcResult = 1;
1371#[doc = "< Failed to create program"]
1372pub const hiprtcResult_HIPRTC_ERROR_PROGRAM_CREATION_FAILURE: hiprtcResult = 2;
1373#[doc = "< Invalid input"]
1374pub const hiprtcResult_HIPRTC_ERROR_INVALID_INPUT: hiprtcResult = 3;
1375#[doc = "< Invalid program"]
1376pub const hiprtcResult_HIPRTC_ERROR_INVALID_PROGRAM: hiprtcResult = 4;
1377#[doc = "< Invalid option"]
1378pub const hiprtcResult_HIPRTC_ERROR_INVALID_OPTION: hiprtcResult = 5;
1379#[doc = "< Compilation error"]
1380pub const hiprtcResult_HIPRTC_ERROR_COMPILATION: hiprtcResult = 6;
1381#[doc = "< Failed in builtin operation"]
1382pub const hiprtcResult_HIPRTC_ERROR_BUILTIN_OPERATION_FAILURE: hiprtcResult = 7;
1383#[doc = "< No name expression after compilation"]
1384pub const hiprtcResult_HIPRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION: hiprtcResult = 8;
1385#[doc = "< No lowered names before compilation"]
1386pub const hiprtcResult_HIPRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION: hiprtcResult = 9;
1387#[doc = "< Invalid name expression"]
1388pub const hiprtcResult_HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID: hiprtcResult = 10;
1389#[doc = "< Internal error"]
1390pub const hiprtcResult_HIPRTC_ERROR_INTERNAL_ERROR: hiprtcResult = 11;
1391#[doc = "< Error in linking"]
1392pub const hiprtcResult_HIPRTC_ERROR_LINKING: hiprtcResult = 100;
1393#[doc = " @addtogroup GlobalDefs\n @{\n\n/\n/**\n hiprtc error code"]
1394pub type hiprtcResult = ::std::os::raw::c_uint;
1395#[repr(C)]
1396#[derive(Debug, Copy, Clone)]
1397pub struct ihiprtcLinkState {
1398    _unused: [u8; 0],
1399}
1400#[doc = "  hiprtc link state\n"]
1401pub type hiprtcLinkState = *mut ihiprtcLinkState;
1402extern "C" {
1403    #[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"]
1404    pub fn hiprtcGetErrorString(result: hiprtcResult) -> *const ::std::os::raw::c_char;
1405}
1406extern "C" {
1407    #[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"]
1408    pub fn hiprtcVersion(
1409        major: *mut ::std::os::raw::c_int,
1410        minor: *mut ::std::os::raw::c_int,
1411    ) -> hiprtcResult;
1412}
1413#[repr(C)]
1414#[derive(Debug, Copy, Clone)]
1415pub struct _hiprtcProgram {
1416    _unused: [u8; 0],
1417}
1418#[doc = "  hiprtc program\n"]
1419pub type hiprtcProgram = *mut _hiprtcProgram;
1420extern "C" {
1421    #[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"]
1422    pub fn hiprtcAddNameExpression(
1423        prog: hiprtcProgram,
1424        name_expression: *const ::std::os::raw::c_char,
1425    ) -> hiprtcResult;
1426}
1427extern "C" {
1428    #[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"]
1429    pub fn hiprtcCompileProgram(
1430        prog: hiprtcProgram,
1431        numOptions: ::std::os::raw::c_int,
1432        options: *const *const ::std::os::raw::c_char,
1433    ) -> hiprtcResult;
1434}
1435extern "C" {
1436    #[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"]
1437    pub fn hiprtcCreateProgram(
1438        prog: *mut hiprtcProgram,
1439        src: *const ::std::os::raw::c_char,
1440        name: *const ::std::os::raw::c_char,
1441        numHeaders: ::std::os::raw::c_int,
1442        headers: *const *const ::std::os::raw::c_char,
1443        includeNames: *const *const ::std::os::raw::c_char,
1444    ) -> hiprtcResult;
1445}
1446extern "C" {
1447    #[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"]
1448    pub fn hiprtcDestroyProgram(prog: *mut hiprtcProgram) -> hiprtcResult;
1449}
1450extern "C" {
1451    #[doc = " @brief Gets the lowered (mangled) name from an instance of hiprtcProgram with the given input parameters,\n 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"]
1452    pub fn hiprtcGetLoweredName(
1453        prog: hiprtcProgram,
1454        name_expression: *const ::std::os::raw::c_char,
1455        lowered_name: *mut *const ::std::os::raw::c_char,
1456    ) -> hiprtcResult;
1457}
1458extern "C" {
1459    #[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"]
1460    pub fn hiprtcGetProgramLog(
1461        prog: hiprtcProgram,
1462        log: *mut ::std::os::raw::c_char,
1463    ) -> hiprtcResult;
1464}
1465extern "C" {
1466    #[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"]
1467    pub fn hiprtcGetProgramLogSize(prog: hiprtcProgram, logSizeRet: *mut usize) -> hiprtcResult;
1468}
1469extern "C" {
1470    #[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"]
1471    pub fn hiprtcGetCode(prog: hiprtcProgram, code: *mut ::std::os::raw::c_char) -> hiprtcResult;
1472}
1473extern "C" {
1474    #[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"]
1475    pub fn hiprtcGetCodeSize(prog: hiprtcProgram, codeSizeRet: *mut usize) -> hiprtcResult;
1476}
1477extern "C" {
1478    #[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"]
1479    pub fn hiprtcGetBitcode(
1480        prog: hiprtcProgram,
1481        bitcode: *mut ::std::os::raw::c_char,
1482    ) -> hiprtcResult;
1483}
1484extern "C" {
1485    #[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"]
1486    pub fn hiprtcGetBitcodeSize(prog: hiprtcProgram, bitcode_size: *mut usize) -> hiprtcResult;
1487}
1488extern "C" {
1489    #[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"]
1490    pub fn hiprtcLinkCreate(
1491        num_options: ::std::os::raw::c_uint,
1492        option_ptr: *mut hipJitOption,
1493        option_vals_pptr: *mut *mut ::std::os::raw::c_void,
1494        hip_link_state_ptr: *mut hiprtcLinkState,
1495    ) -> hiprtcResult;
1496}
1497extern "C" {
1498    #[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"]
1499    pub fn hiprtcLinkAddFile(
1500        hip_link_state: hiprtcLinkState,
1501        input_type: hipJitInputType,
1502        file_path: *const ::std::os::raw::c_char,
1503        num_options: ::std::os::raw::c_uint,
1504        options_ptr: *mut hipJitOption,
1505        option_values: *mut *mut ::std::os::raw::c_void,
1506    ) -> hiprtcResult;
1507}
1508extern "C" {
1509    #[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"]
1510    pub fn hiprtcLinkAddData(
1511        hip_link_state: hiprtcLinkState,
1512        input_type: hipJitInputType,
1513        image: *mut ::std::os::raw::c_void,
1514        image_size: usize,
1515        name: *const ::std::os::raw::c_char,
1516        num_options: ::std::os::raw::c_uint,
1517        options_ptr: *mut hipJitOption,
1518        option_values: *mut *mut ::std::os::raw::c_void,
1519    ) -> hiprtcResult;
1520}
1521extern "C" {
1522    #[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"]
1523    pub fn hiprtcLinkComplete(
1524        hip_link_state: hiprtcLinkState,
1525        bin_out: *mut *mut ::std::os::raw::c_void,
1526        size_out: *mut usize,
1527    ) -> hiprtcResult;
1528}
1529extern "C" {
1530    #[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"]
1531    pub fn hiprtcLinkDestroy(hip_link_state: hiprtcLinkState) -> hiprtcResult;
1532}
1533pub type int_least8_t = __int_least8_t;
1534pub type int_least16_t = __int_least16_t;
1535pub type int_least32_t = __int_least32_t;
1536pub type int_least64_t = __int_least64_t;
1537pub type uint_least8_t = __uint_least8_t;
1538pub type uint_least16_t = __uint_least16_t;
1539pub type uint_least32_t = __uint_least32_t;
1540pub type uint_least64_t = __uint_least64_t;
1541pub type int_fast8_t = ::std::os::raw::c_schar;
1542pub type int_fast16_t = ::std::os::raw::c_long;
1543pub type int_fast32_t = ::std::os::raw::c_long;
1544pub type int_fast64_t = ::std::os::raw::c_long;
1545pub type uint_fast8_t = ::std::os::raw::c_uchar;
1546pub type uint_fast16_t = ::std::os::raw::c_ulong;
1547pub type uint_fast32_t = ::std::os::raw::c_ulong;
1548pub type uint_fast64_t = ::std::os::raw::c_ulong;
1549pub type intmax_t = __intmax_t;
1550pub type uintmax_t = __uintmax_t;
1551pub const HIP_SUCCESS: _bindgen_ty_1 = 0;
1552pub const HIP_ERROR_INVALID_VALUE: _bindgen_ty_1 = 1;
1553pub const HIP_ERROR_NOT_INITIALIZED: _bindgen_ty_1 = 2;
1554pub const HIP_ERROR_LAUNCH_OUT_OF_RESOURCES: _bindgen_ty_1 = 3;
1555pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
1556#[doc = " @defgroup GlobalDefs Global enum and defines\n @{\n\n/\n/**\n hipDeviceArch_t\n"]
1557#[repr(C)]
1558#[repr(align(4))]
1559#[derive(Debug, Copy, Clone)]
1560pub struct hipDeviceArch_t {
1561    pub _bitfield_align_1: [u8; 0],
1562    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
1563    pub __bindgen_padding_0: u8,
1564}
1565impl hipDeviceArch_t {
1566    #[inline]
1567    pub fn hasGlobalInt32Atomics(&self) -> ::std::os::raw::c_uint {
1568        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
1569    }
1570    #[inline]
1571    pub fn set_hasGlobalInt32Atomics(&mut self, val: ::std::os::raw::c_uint) {
1572        unsafe {
1573            let val: u32 = ::std::mem::transmute(val);
1574            self._bitfield_1.set(0usize, 1u8, val as u64)
1575        }
1576    }
1577    #[inline]
1578    pub fn hasGlobalFloatAtomicExch(&self) -> ::std::os::raw::c_uint {
1579        unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
1580    }
1581    #[inline]
1582    pub fn set_hasGlobalFloatAtomicExch(&mut self, val: ::std::os::raw::c_uint) {
1583        unsafe {
1584            let val: u32 = ::std::mem::transmute(val);
1585            self._bitfield_1.set(1usize, 1u8, val as u64)
1586        }
1587    }
1588    #[inline]
1589    pub fn hasSharedInt32Atomics(&self) -> ::std::os::raw::c_uint {
1590        unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
1591    }
1592    #[inline]
1593    pub fn set_hasSharedInt32Atomics(&mut self, val: ::std::os::raw::c_uint) {
1594        unsafe {
1595            let val: u32 = ::std::mem::transmute(val);
1596            self._bitfield_1.set(2usize, 1u8, val as u64)
1597        }
1598    }
1599    #[inline]
1600    pub fn hasSharedFloatAtomicExch(&self) -> ::std::os::raw::c_uint {
1601        unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
1602    }
1603    #[inline]
1604    pub fn set_hasSharedFloatAtomicExch(&mut self, val: ::std::os::raw::c_uint) {
1605        unsafe {
1606            let val: u32 = ::std::mem::transmute(val);
1607            self._bitfield_1.set(3usize, 1u8, val as u64)
1608        }
1609    }
1610    #[inline]
1611    pub fn hasFloatAtomicAdd(&self) -> ::std::os::raw::c_uint {
1612        unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
1613    }
1614    #[inline]
1615    pub fn set_hasFloatAtomicAdd(&mut self, val: ::std::os::raw::c_uint) {
1616        unsafe {
1617            let val: u32 = ::std::mem::transmute(val);
1618            self._bitfield_1.set(4usize, 1u8, val as u64)
1619        }
1620    }
1621    #[inline]
1622    pub fn hasGlobalInt64Atomics(&self) -> ::std::os::raw::c_uint {
1623        unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
1624    }
1625    #[inline]
1626    pub fn set_hasGlobalInt64Atomics(&mut self, val: ::std::os::raw::c_uint) {
1627        unsafe {
1628            let val: u32 = ::std::mem::transmute(val);
1629            self._bitfield_1.set(5usize, 1u8, val as u64)
1630        }
1631    }
1632    #[inline]
1633    pub fn hasSharedInt64Atomics(&self) -> ::std::os::raw::c_uint {
1634        unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
1635    }
1636    #[inline]
1637    pub fn set_hasSharedInt64Atomics(&mut self, val: ::std::os::raw::c_uint) {
1638        unsafe {
1639            let val: u32 = ::std::mem::transmute(val);
1640            self._bitfield_1.set(6usize, 1u8, val as u64)
1641        }
1642    }
1643    #[inline]
1644    pub fn hasDoubles(&self) -> ::std::os::raw::c_uint {
1645        unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
1646    }
1647    #[inline]
1648    pub fn set_hasDoubles(&mut self, val: ::std::os::raw::c_uint) {
1649        unsafe {
1650            let val: u32 = ::std::mem::transmute(val);
1651            self._bitfield_1.set(7usize, 1u8, val as u64)
1652        }
1653    }
1654    #[inline]
1655    pub fn hasWarpVote(&self) -> ::std::os::raw::c_uint {
1656        unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
1657    }
1658    #[inline]
1659    pub fn set_hasWarpVote(&mut self, val: ::std::os::raw::c_uint) {
1660        unsafe {
1661            let val: u32 = ::std::mem::transmute(val);
1662            self._bitfield_1.set(8usize, 1u8, val as u64)
1663        }
1664    }
1665    #[inline]
1666    pub fn hasWarpBallot(&self) -> ::std::os::raw::c_uint {
1667        unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
1668    }
1669    #[inline]
1670    pub fn set_hasWarpBallot(&mut self, val: ::std::os::raw::c_uint) {
1671        unsafe {
1672            let val: u32 = ::std::mem::transmute(val);
1673            self._bitfield_1.set(9usize, 1u8, val as u64)
1674        }
1675    }
1676    #[inline]
1677    pub fn hasWarpShuffle(&self) -> ::std::os::raw::c_uint {
1678        unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
1679    }
1680    #[inline]
1681    pub fn set_hasWarpShuffle(&mut self, val: ::std::os::raw::c_uint) {
1682        unsafe {
1683            let val: u32 = ::std::mem::transmute(val);
1684            self._bitfield_1.set(10usize, 1u8, val as u64)
1685        }
1686    }
1687    #[inline]
1688    pub fn hasFunnelShift(&self) -> ::std::os::raw::c_uint {
1689        unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
1690    }
1691    #[inline]
1692    pub fn set_hasFunnelShift(&mut self, val: ::std::os::raw::c_uint) {
1693        unsafe {
1694            let val: u32 = ::std::mem::transmute(val);
1695            self._bitfield_1.set(11usize, 1u8, val as u64)
1696        }
1697    }
1698    #[inline]
1699    pub fn hasThreadFenceSystem(&self) -> ::std::os::raw::c_uint {
1700        unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
1701    }
1702    #[inline]
1703    pub fn set_hasThreadFenceSystem(&mut self, val: ::std::os::raw::c_uint) {
1704        unsafe {
1705            let val: u32 = ::std::mem::transmute(val);
1706            self._bitfield_1.set(12usize, 1u8, val as u64)
1707        }
1708    }
1709    #[inline]
1710    pub fn hasSyncThreadsExt(&self) -> ::std::os::raw::c_uint {
1711        unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
1712    }
1713    #[inline]
1714    pub fn set_hasSyncThreadsExt(&mut self, val: ::std::os::raw::c_uint) {
1715        unsafe {
1716            let val: u32 = ::std::mem::transmute(val);
1717            self._bitfield_1.set(13usize, 1u8, val as u64)
1718        }
1719    }
1720    #[inline]
1721    pub fn hasSurfaceFuncs(&self) -> ::std::os::raw::c_uint {
1722        unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
1723    }
1724    #[inline]
1725    pub fn set_hasSurfaceFuncs(&mut self, val: ::std::os::raw::c_uint) {
1726        unsafe {
1727            let val: u32 = ::std::mem::transmute(val);
1728            self._bitfield_1.set(14usize, 1u8, val as u64)
1729        }
1730    }
1731    #[inline]
1732    pub fn has3dGrid(&self) -> ::std::os::raw::c_uint {
1733        unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
1734    }
1735    #[inline]
1736    pub fn set_has3dGrid(&mut self, val: ::std::os::raw::c_uint) {
1737        unsafe {
1738            let val: u32 = ::std::mem::transmute(val);
1739            self._bitfield_1.set(15usize, 1u8, val as u64)
1740        }
1741    }
1742    #[inline]
1743    pub fn hasDynamicParallelism(&self) -> ::std::os::raw::c_uint {
1744        unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) }
1745    }
1746    #[inline]
1747    pub fn set_hasDynamicParallelism(&mut self, val: ::std::os::raw::c_uint) {
1748        unsafe {
1749            let val: u32 = ::std::mem::transmute(val);
1750            self._bitfield_1.set(16usize, 1u8, val as u64)
1751        }
1752    }
1753    #[inline]
1754    pub fn new_bitfield_1(
1755        hasGlobalInt32Atomics: ::std::os::raw::c_uint,
1756        hasGlobalFloatAtomicExch: ::std::os::raw::c_uint,
1757        hasSharedInt32Atomics: ::std::os::raw::c_uint,
1758        hasSharedFloatAtomicExch: ::std::os::raw::c_uint,
1759        hasFloatAtomicAdd: ::std::os::raw::c_uint,
1760        hasGlobalInt64Atomics: ::std::os::raw::c_uint,
1761        hasSharedInt64Atomics: ::std::os::raw::c_uint,
1762        hasDoubles: ::std::os::raw::c_uint,
1763        hasWarpVote: ::std::os::raw::c_uint,
1764        hasWarpBallot: ::std::os::raw::c_uint,
1765        hasWarpShuffle: ::std::os::raw::c_uint,
1766        hasFunnelShift: ::std::os::raw::c_uint,
1767        hasThreadFenceSystem: ::std::os::raw::c_uint,
1768        hasSyncThreadsExt: ::std::os::raw::c_uint,
1769        hasSurfaceFuncs: ::std::os::raw::c_uint,
1770        has3dGrid: ::std::os::raw::c_uint,
1771        hasDynamicParallelism: ::std::os::raw::c_uint,
1772    ) -> __BindgenBitfieldUnit<[u8; 3usize]> {
1773        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
1774        __bindgen_bitfield_unit.set(0usize, 1u8, {
1775            let hasGlobalInt32Atomics: u32 =
1776                unsafe { ::std::mem::transmute(hasGlobalInt32Atomics) };
1777            hasGlobalInt32Atomics as u64
1778        });
1779        __bindgen_bitfield_unit.set(1usize, 1u8, {
1780            let hasGlobalFloatAtomicExch: u32 =
1781                unsafe { ::std::mem::transmute(hasGlobalFloatAtomicExch) };
1782            hasGlobalFloatAtomicExch as u64
1783        });
1784        __bindgen_bitfield_unit.set(2usize, 1u8, {
1785            let hasSharedInt32Atomics: u32 =
1786                unsafe { ::std::mem::transmute(hasSharedInt32Atomics) };
1787            hasSharedInt32Atomics as u64
1788        });
1789        __bindgen_bitfield_unit.set(3usize, 1u8, {
1790            let hasSharedFloatAtomicExch: u32 =
1791                unsafe { ::std::mem::transmute(hasSharedFloatAtomicExch) };
1792            hasSharedFloatAtomicExch as u64
1793        });
1794        __bindgen_bitfield_unit.set(4usize, 1u8, {
1795            let hasFloatAtomicAdd: u32 = unsafe { ::std::mem::transmute(hasFloatAtomicAdd) };
1796            hasFloatAtomicAdd as u64
1797        });
1798        __bindgen_bitfield_unit.set(5usize, 1u8, {
1799            let hasGlobalInt64Atomics: u32 =
1800                unsafe { ::std::mem::transmute(hasGlobalInt64Atomics) };
1801            hasGlobalInt64Atomics as u64
1802        });
1803        __bindgen_bitfield_unit.set(6usize, 1u8, {
1804            let hasSharedInt64Atomics: u32 =
1805                unsafe { ::std::mem::transmute(hasSharedInt64Atomics) };
1806            hasSharedInt64Atomics as u64
1807        });
1808        __bindgen_bitfield_unit.set(7usize, 1u8, {
1809            let hasDoubles: u32 = unsafe { ::std::mem::transmute(hasDoubles) };
1810            hasDoubles as u64
1811        });
1812        __bindgen_bitfield_unit.set(8usize, 1u8, {
1813            let hasWarpVote: u32 = unsafe { ::std::mem::transmute(hasWarpVote) };
1814            hasWarpVote as u64
1815        });
1816        __bindgen_bitfield_unit.set(9usize, 1u8, {
1817            let hasWarpBallot: u32 = unsafe { ::std::mem::transmute(hasWarpBallot) };
1818            hasWarpBallot as u64
1819        });
1820        __bindgen_bitfield_unit.set(10usize, 1u8, {
1821            let hasWarpShuffle: u32 = unsafe { ::std::mem::transmute(hasWarpShuffle) };
1822            hasWarpShuffle as u64
1823        });
1824        __bindgen_bitfield_unit.set(11usize, 1u8, {
1825            let hasFunnelShift: u32 = unsafe { ::std::mem::transmute(hasFunnelShift) };
1826            hasFunnelShift as u64
1827        });
1828        __bindgen_bitfield_unit.set(12usize, 1u8, {
1829            let hasThreadFenceSystem: u32 = unsafe { ::std::mem::transmute(hasThreadFenceSystem) };
1830            hasThreadFenceSystem as u64
1831        });
1832        __bindgen_bitfield_unit.set(13usize, 1u8, {
1833            let hasSyncThreadsExt: u32 = unsafe { ::std::mem::transmute(hasSyncThreadsExt) };
1834            hasSyncThreadsExt as u64
1835        });
1836        __bindgen_bitfield_unit.set(14usize, 1u8, {
1837            let hasSurfaceFuncs: u32 = unsafe { ::std::mem::transmute(hasSurfaceFuncs) };
1838            hasSurfaceFuncs as u64
1839        });
1840        __bindgen_bitfield_unit.set(15usize, 1u8, {
1841            let has3dGrid: u32 = unsafe { ::std::mem::transmute(has3dGrid) };
1842            has3dGrid as u64
1843        });
1844        __bindgen_bitfield_unit.set(16usize, 1u8, {
1845            let hasDynamicParallelism: u32 =
1846                unsafe { ::std::mem::transmute(hasDynamicParallelism) };
1847            hasDynamicParallelism as u64
1848        });
1849        __bindgen_bitfield_unit
1850    }
1851}
1852#[repr(C)]
1853#[derive(Debug, Copy, Clone)]
1854pub struct hipUUID_t {
1855    pub bytes: [::std::os::raw::c_char; 16usize],
1856}
1857pub type hipUUID = hipUUID_t;
1858#[doc = " hipDeviceProp\n"]
1859#[repr(C)]
1860#[derive(Debug, Copy, Clone)]
1861pub struct hipDeviceProp_tR0600 {
1862    #[doc = "< Device name."]
1863    pub name: [::std::os::raw::c_char; 256usize],
1864    #[doc = "< UUID of a device"]
1865    pub uuid: hipUUID,
1866    #[doc = "< 8-byte unique identifier. Only valid on windows"]
1867    pub luid: [::std::os::raw::c_char; 8usize],
1868    #[doc = "< LUID node mask"]
1869    pub luidDeviceNodeMask: ::std::os::raw::c_uint,
1870    #[doc = "< Size of global memory region (in bytes)."]
1871    pub totalGlobalMem: usize,
1872    #[doc = "< Size of shared memory per block (in bytes)."]
1873    pub sharedMemPerBlock: usize,
1874    #[doc = "< Registers per block."]
1875    pub regsPerBlock: ::std::os::raw::c_int,
1876    #[doc = "< Warp size."]
1877    pub warpSize: ::std::os::raw::c_int,
1878    #[doc = "< Maximum pitch in bytes allowed by memory copies\n< pitched memory"]
1879    pub memPitch: usize,
1880    #[doc = "< Max work items per work group or workgroup max size."]
1881    pub maxThreadsPerBlock: ::std::os::raw::c_int,
1882    #[doc = "< Max number of threads in each dimension (XYZ) of a block."]
1883    pub maxThreadsDim: [::std::os::raw::c_int; 3usize],
1884    #[doc = "< Max grid dimensions (XYZ)."]
1885    pub maxGridSize: [::std::os::raw::c_int; 3usize],
1886    #[doc = "< Max clock frequency of the multiProcessors in khz."]
1887    pub clockRate: ::std::os::raw::c_int,
1888    #[doc = "< Size of shared constant memory region on the device\n< (in bytes)."]
1889    pub totalConstMem: usize,
1890    #[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."]
1891    pub major: ::std::os::raw::c_int,
1892    #[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."]
1893    pub minor: ::std::os::raw::c_int,
1894    #[doc = "< Alignment requirement for textures"]
1895    pub textureAlignment: usize,
1896    #[doc = "< Pitch alignment requirement for texture references bound to"]
1897    pub texturePitchAlignment: usize,
1898    #[doc = "< Deprecated. Use asyncEngineCount instead"]
1899    pub deviceOverlap: ::std::os::raw::c_int,
1900    #[doc = "< Number of multi-processors (compute units)."]
1901    pub multiProcessorCount: ::std::os::raw::c_int,
1902    #[doc = "< Run time limit for kernels executed on the device"]
1903    pub kernelExecTimeoutEnabled: ::std::os::raw::c_int,
1904    #[doc = "< APU vs dGPU"]
1905    pub integrated: ::std::os::raw::c_int,
1906    #[doc = "< Check whether HIP can map host memory"]
1907    pub canMapHostMemory: ::std::os::raw::c_int,
1908    #[doc = "< Compute mode."]
1909    pub computeMode: ::std::os::raw::c_int,
1910    #[doc = "< Maximum number of elements in 1D images"]
1911    pub maxTexture1D: ::std::os::raw::c_int,
1912    #[doc = "< Maximum 1D mipmap texture size"]
1913    pub maxTexture1DMipmap: ::std::os::raw::c_int,
1914    #[doc = "< Maximum size for 1D textures bound to linear memory"]
1915    pub maxTexture1DLinear: ::std::os::raw::c_int,
1916    #[doc = "< Maximum dimensions (width, height) of 2D images, in image elements"]
1917    pub maxTexture2D: [::std::os::raw::c_int; 2usize],
1918    #[doc = "< Maximum number of elements in 2D array mipmap of images"]
1919    pub maxTexture2DMipmap: [::std::os::raw::c_int; 2usize],
1920    #[doc = "< Maximum 2D tex dimensions if tex are bound to pitched memory"]
1921    pub maxTexture2DLinear: [::std::os::raw::c_int; 3usize],
1922    #[doc = "< Maximum 2D tex dimensions if gather has to be performed"]
1923    pub maxTexture2DGather: [::std::os::raw::c_int; 2usize],
1924    #[doc = "< Maximum dimensions (width, height, depth) of 3D images, in image\n< elements"]
1925    pub maxTexture3D: [::std::os::raw::c_int; 3usize],
1926    #[doc = "< Maximum alternate 3D texture dims"]
1927    pub maxTexture3DAlt: [::std::os::raw::c_int; 3usize],
1928    #[doc = "< Maximum cubemap texture dims"]
1929    pub maxTextureCubemap: ::std::os::raw::c_int,
1930    #[doc = "< Maximum number of elements in 1D array images"]
1931    pub maxTexture1DLayered: [::std::os::raw::c_int; 2usize],
1932    #[doc = "< Maximum number of elements in 2D array images"]
1933    pub maxTexture2DLayered: [::std::os::raw::c_int; 3usize],
1934    #[doc = "< Maximum cubemaps layered texture dims"]
1935    pub maxTextureCubemapLayered: [::std::os::raw::c_int; 2usize],
1936    #[doc = "< Maximum 1D surface size"]
1937    pub maxSurface1D: ::std::os::raw::c_int,
1938    #[doc = "< Maximum 2D surface size"]
1939    pub maxSurface2D: [::std::os::raw::c_int; 2usize],
1940    #[doc = "< Maximum 3D surface size"]
1941    pub maxSurface3D: [::std::os::raw::c_int; 3usize],
1942    #[doc = "< Maximum 1D layered surface size"]
1943    pub maxSurface1DLayered: [::std::os::raw::c_int; 2usize],
1944    #[doc = "< Maximum 2D layared surface size"]
1945    pub maxSurface2DLayered: [::std::os::raw::c_int; 3usize],
1946    #[doc = "< Maximum cubemap surface size"]
1947    pub maxSurfaceCubemap: ::std::os::raw::c_int,
1948    #[doc = "< Maximum cubemap layered surface size"]
1949    pub maxSurfaceCubemapLayered: [::std::os::raw::c_int; 2usize],
1950    #[doc = "< Alignment requirement for surface"]
1951    pub surfaceAlignment: usize,
1952    #[doc = "< Device can possibly execute multiple kernels concurrently."]
1953    pub concurrentKernels: ::std::os::raw::c_int,
1954    #[doc = "< Device has ECC support enabled"]
1955    pub ECCEnabled: ::std::os::raw::c_int,
1956    #[doc = "< PCI Bus ID."]
1957    pub pciBusID: ::std::os::raw::c_int,
1958    #[doc = "< PCI Device ID"]
1959    pub pciDeviceID: ::std::os::raw::c_int,
1960    #[doc = "< PCI Domain ID"]
1961    pub pciDomainID: ::std::os::raw::c_int,
1962    #[doc = "< 1:If device is Tesla device using TCC driver, else 0"]
1963    pub tccDriver: ::std::os::raw::c_int,
1964    #[doc = "< Number of async engines"]
1965    pub asyncEngineCount: ::std::os::raw::c_int,
1966    #[doc = "< Does device and host share unified address space"]
1967    pub unifiedAddressing: ::std::os::raw::c_int,
1968    #[doc = "< Max global memory clock frequency in khz."]
1969    pub memoryClockRate: ::std::os::raw::c_int,
1970    #[doc = "< Global memory bus width in bits."]
1971    pub memoryBusWidth: ::std::os::raw::c_int,
1972    #[doc = "< L2 cache size."]
1973    pub l2CacheSize: ::std::os::raw::c_int,
1974    #[doc = "< Device's max L2 persisting lines in bytes"]
1975    pub persistingL2CacheMaxSize: ::std::os::raw::c_int,
1976    #[doc = "< Maximum resident threads per multi-processor."]
1977    pub maxThreadsPerMultiProcessor: ::std::os::raw::c_int,
1978    #[doc = "< Device supports stream priority"]
1979    pub streamPrioritiesSupported: ::std::os::raw::c_int,
1980    #[doc = "< Indicates globals are cached in L1"]
1981    pub globalL1CacheSupported: ::std::os::raw::c_int,
1982    #[doc = "< Locals are cahced in L1"]
1983    pub localL1CacheSupported: ::std::os::raw::c_int,
1984    #[doc = "< Amount of shared memory available per multiprocessor."]
1985    pub sharedMemPerMultiprocessor: usize,
1986    #[doc = "< registers available per multiprocessor"]
1987    pub regsPerMultiprocessor: ::std::os::raw::c_int,
1988    #[doc = "< Device supports allocating managed memory on this system"]
1989    pub managedMemory: ::std::os::raw::c_int,
1990    #[doc = "< 1 if device is on a multi-GPU board, 0 if not."]
1991    pub isMultiGpuBoard: ::std::os::raw::c_int,
1992    #[doc = "< Unique identifier for a group of devices on same multiboard GPU"]
1993    pub multiGpuBoardGroupID: ::std::os::raw::c_int,
1994    #[doc = "< Link between host and device supports native atomics"]
1995    pub hostNativeAtomicSupported: ::std::os::raw::c_int,
1996    #[doc = "< Deprecated. CUDA only."]
1997    pub singleToDoublePrecisionPerfRatio: ::std::os::raw::c_int,
1998    #[doc = "< Device supports coherently accessing pageable memory\n< without calling hipHostRegister on it"]
1999    pub pageableMemoryAccess: ::std::os::raw::c_int,
2000    #[doc = "< Device can coherently access managed memory concurrently with\n< the CPU"]
2001    pub concurrentManagedAccess: ::std::os::raw::c_int,
2002    #[doc = "< Is compute preemption supported on the device"]
2003    pub computePreemptionSupported: ::std::os::raw::c_int,
2004    #[doc = "< Device can access host registered memory with same\n< address as the host"]
2005    pub canUseHostPointerForRegisteredMem: ::std::os::raw::c_int,
2006    #[doc = "< HIP device supports cooperative launch"]
2007    pub cooperativeLaunch: ::std::os::raw::c_int,
2008    #[doc = "< HIP device supports cooperative launch on multiple\n< devices"]
2009    pub cooperativeMultiDeviceLaunch: ::std::os::raw::c_int,
2010    #[doc = "< Per device m ax shared mem per block usable by special opt in"]
2011    pub sharedMemPerBlockOptin: usize,
2012    #[doc = "< Device accesses pageable memory via the host's\n< page tables"]
2013    pub pageableMemoryAccessUsesHostPageTables: ::std::os::raw::c_int,
2014    #[doc = "< Host can directly access managed memory on the device\n< without migration"]
2015    pub directManagedMemAccessFromHost: ::std::os::raw::c_int,
2016    #[doc = "< Max number of blocks on CU"]
2017    pub maxBlocksPerMultiProcessor: ::std::os::raw::c_int,
2018    #[doc = "< Max value of access policy window"]
2019    pub accessPolicyMaxWindowSize: ::std::os::raw::c_int,
2020    #[doc = "< Shared memory reserved by driver per block"]
2021    pub reservedSharedMemPerBlock: usize,
2022    #[doc = "< Device supports hipHostRegister"]
2023    pub hostRegisterSupported: ::std::os::raw::c_int,
2024    #[doc = "< Indicates if device supports sparse hip arrays"]
2025    pub sparseHipArraySupported: ::std::os::raw::c_int,
2026    #[doc = "< Device supports using the hipHostRegisterReadOnly flag\n< with hipHostRegistger"]
2027    pub hostRegisterReadOnlySupported: ::std::os::raw::c_int,
2028    #[doc = "< Indicates external timeline semaphore support"]
2029    pub timelineSemaphoreInteropSupported: ::std::os::raw::c_int,
2030    #[doc = "< Indicates if device supports hipMallocAsync and hipMemPool APIs"]
2031    pub memoryPoolsSupported: ::std::os::raw::c_int,
2032    #[doc = "< Indicates device support of RDMA APIs"]
2033    pub gpuDirectRDMASupported: ::std::os::raw::c_int,
2034    #[doc = "< Bitmask to be interpreted according to\n< hipFlushGPUDirectRDMAWritesOptions"]
2035    pub gpuDirectRDMAFlushWritesOptions: ::std::os::raw::c_uint,
2036    #[doc = "< value of hipGPUDirectRDMAWritesOrdering"]
2037    pub gpuDirectRDMAWritesOrdering: ::std::os::raw::c_int,
2038    #[doc = "< Bitmask of handle types support with mempool based IPC"]
2039    pub memoryPoolSupportedHandleTypes: ::std::os::raw::c_uint,
2040    #[doc = "< Device supports deferred mapping HIP arrays and HIP\n< mipmapped arrays"]
2041    pub deferredMappingHipArraySupported: ::std::os::raw::c_int,
2042    #[doc = "< Device supports IPC events"]
2043    pub ipcEventSupported: ::std::os::raw::c_int,
2044    #[doc = "< Device supports cluster launch"]
2045    pub clusterLaunch: ::std::os::raw::c_int,
2046    #[doc = "< Indicates device supports unified function pointers"]
2047    pub unifiedFunctionPointers: ::std::os::raw::c_int,
2048    #[doc = "< CUDA Reserved."]
2049    pub reserved: [::std::os::raw::c_int; 63usize],
2050    #[doc = "< Reserved for adding new entries for HIP/CUDA."]
2051    pub hipReserved: [::std::os::raw::c_int; 32usize],
2052    #[doc = "< AMD GCN Arch Name. HIP Only."]
2053    pub gcnArchName: [::std::os::raw::c_char; 256usize],
2054    #[doc = "< Maximum Shared Memory Per CU. HIP Only."]
2055    pub maxSharedMemoryPerMultiProcessor: usize,
2056    #[doc = "< Frequency in khz of the timer used by the device-side \"clock*\"\n< instructions.  New for HIP."]
2057    pub clockInstructionRate: ::std::os::raw::c_int,
2058    #[doc = "< Architectural feature flags.  New for HIP."]
2059    pub arch: hipDeviceArch_t,
2060    #[doc = "< Addres of HDP_MEM_COHERENCY_FLUSH_CNTL register"]
2061    pub hdpMemFlushCntl: *mut ::std::os::raw::c_uint,
2062    #[doc = "< Addres of HDP_REG_COHERENCY_FLUSH_CNTL register"]
2063    pub hdpRegFlushCntl: *mut ::std::os::raw::c_uint,
2064    #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2065    pub cooperativeMultiDeviceUnmatchedFunc: ::std::os::raw::c_int,
2066    #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2067    pub cooperativeMultiDeviceUnmatchedGridDim: ::std::os::raw::c_int,
2068    #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2069    pub cooperativeMultiDeviceUnmatchedBlockDim: ::std::os::raw::c_int,
2070    #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2071    pub cooperativeMultiDeviceUnmatchedSharedMem: ::std::os::raw::c_int,
2072    #[doc = "< 1: if it is a large PCI bar device, else 0"]
2073    pub isLargeBar: ::std::os::raw::c_int,
2074    #[doc = "< Revision of the GPU in this device"]
2075    pub asicRevision: ::std::os::raw::c_int,
2076}
2077#[doc = "< Unregistered memory"]
2078pub const hipMemoryType_hipMemoryTypeUnregistered: hipMemoryType = 0;
2079#[doc = "< Memory is physically located on host"]
2080pub const hipMemoryType_hipMemoryTypeHost: hipMemoryType = 1;
2081#[doc = "< Memory is physically located on device. (see deviceId for\n< specific device)"]
2082pub const hipMemoryType_hipMemoryTypeDevice: hipMemoryType = 2;
2083#[doc = "< Managed memory, automaticallly managed by the unified\n< memory system\n< place holder for new values."]
2084pub const hipMemoryType_hipMemoryTypeManaged: hipMemoryType = 3;
2085#[doc = "< Array memory, physically located on device. (see deviceId for\n< specific device)"]
2086pub const hipMemoryType_hipMemoryTypeArray: hipMemoryType = 10;
2087#[doc = "< unified address space"]
2088pub const hipMemoryType_hipMemoryTypeUnified: hipMemoryType = 11;
2089#[doc = " hipMemoryType (for pointer attributes)\n\n @note hipMemoryType enum values are combination of cudaMemoryType and cuMemoryType and AMD specific enum values.\n"]
2090pub type hipMemoryType = ::std::os::raw::c_uint;
2091#[doc = " Pointer attributes"]
2092#[repr(C)]
2093#[derive(Debug, Copy, Clone)]
2094pub struct hipPointerAttribute_t {
2095    pub type_: hipMemoryType,
2096    pub device: ::std::os::raw::c_int,
2097    pub devicePointer: *mut ::std::os::raw::c_void,
2098    pub hostPointer: *mut ::std::os::raw::c_void,
2099    pub isManaged: ::std::os::raw::c_int,
2100    pub allocationFlags: ::std::os::raw::c_uint,
2101}
2102#[doc = "< Successful completion."]
2103pub const hipError_t_hipSuccess: hipError_t = 0;
2104#[doc = "< One or more of the parameters passed to the API call is NULL\n< or not in an acceptable range."]
2105pub const hipError_t_hipErrorInvalidValue: hipError_t = 1;
2106#[doc = "< out of memory range."]
2107pub const hipError_t_hipErrorOutOfMemory: hipError_t = 2;
2108#[doc = "< Memory allocation error."]
2109pub const hipError_t_hipErrorMemoryAllocation: hipError_t = 2;
2110#[doc = "< Invalid not initialized"]
2111pub const hipError_t_hipErrorNotInitialized: hipError_t = 3;
2112pub const hipError_t_hipErrorInitializationError: hipError_t = 3;
2113#[doc = "< Deinitialized"]
2114pub const hipError_t_hipErrorDeinitialized: hipError_t = 4;
2115pub const hipError_t_hipErrorProfilerDisabled: hipError_t = 5;
2116pub const hipError_t_hipErrorProfilerNotInitialized: hipError_t = 6;
2117pub const hipError_t_hipErrorProfilerAlreadyStarted: hipError_t = 7;
2118pub const hipError_t_hipErrorProfilerAlreadyStopped: hipError_t = 8;
2119#[doc = "< Invalide configuration"]
2120pub const hipError_t_hipErrorInvalidConfiguration: hipError_t = 9;
2121#[doc = "< Invalid pitch value"]
2122pub const hipError_t_hipErrorInvalidPitchValue: hipError_t = 12;
2123#[doc = "< Invalid symbol"]
2124pub const hipError_t_hipErrorInvalidSymbol: hipError_t = 13;
2125#[doc = "< Invalid Device Pointer"]
2126pub const hipError_t_hipErrorInvalidDevicePointer: hipError_t = 17;
2127#[doc = "< Invalid memory copy direction"]
2128pub const hipError_t_hipErrorInvalidMemcpyDirection: hipError_t = 21;
2129pub const hipError_t_hipErrorInsufficientDriver: hipError_t = 35;
2130pub const hipError_t_hipErrorMissingConfiguration: hipError_t = 52;
2131pub const hipError_t_hipErrorPriorLaunchFailure: hipError_t = 53;
2132#[doc = "< Invalid device function"]
2133pub const hipError_t_hipErrorInvalidDeviceFunction: hipError_t = 98;
2134#[doc = "< Call to hipGetDeviceCount returned 0 devices"]
2135pub const hipError_t_hipErrorNoDevice: hipError_t = 100;
2136#[doc = "< DeviceID must be in range from 0 to compute-devices."]
2137pub const hipError_t_hipErrorInvalidDevice: hipError_t = 101;
2138#[doc = "< Invalid image"]
2139pub const hipError_t_hipErrorInvalidImage: hipError_t = 200;
2140#[doc = "< Produced when input context is invalid."]
2141pub const hipError_t_hipErrorInvalidContext: hipError_t = 201;
2142pub const hipError_t_hipErrorContextAlreadyCurrent: hipError_t = 202;
2143pub const hipError_t_hipErrorMapFailed: hipError_t = 205;
2144#[doc = "< Produced when the IPC memory attach failed from ROCr."]
2145pub const hipError_t_hipErrorMapBufferObjectFailed: hipError_t = 205;
2146pub const hipError_t_hipErrorUnmapFailed: hipError_t = 206;
2147pub const hipError_t_hipErrorArrayIsMapped: hipError_t = 207;
2148pub const hipError_t_hipErrorAlreadyMapped: hipError_t = 208;
2149pub const hipError_t_hipErrorNoBinaryForGpu: hipError_t = 209;
2150pub const hipError_t_hipErrorAlreadyAcquired: hipError_t = 210;
2151pub const hipError_t_hipErrorNotMapped: hipError_t = 211;
2152pub const hipError_t_hipErrorNotMappedAsArray: hipError_t = 212;
2153pub const hipError_t_hipErrorNotMappedAsPointer: hipError_t = 213;
2154pub const hipError_t_hipErrorECCNotCorrectable: hipError_t = 214;
2155#[doc = "< Unsupported limit"]
2156pub const hipError_t_hipErrorUnsupportedLimit: hipError_t = 215;
2157#[doc = "< The context is already in use"]
2158pub const hipError_t_hipErrorContextAlreadyInUse: hipError_t = 216;
2159pub const hipError_t_hipErrorPeerAccessUnsupported: hipError_t = 217;
2160#[doc = "< In CUDA DRV, it is CUDA_ERROR_INVALID_PTX"]
2161pub const hipError_t_hipErrorInvalidKernelFile: hipError_t = 218;
2162pub const hipError_t_hipErrorInvalidGraphicsContext: hipError_t = 219;
2163#[doc = "< Invalid source."]
2164pub const hipError_t_hipErrorInvalidSource: hipError_t = 300;
2165#[doc = "< the file is not found."]
2166pub const hipError_t_hipErrorFileNotFound: hipError_t = 301;
2167pub const hipError_t_hipErrorSharedObjectSymbolNotFound: hipError_t = 302;
2168#[doc = "< Failed to initialize shared object."]
2169pub const hipError_t_hipErrorSharedObjectInitFailed: hipError_t = 303;
2170#[doc = "< Not the correct operating system"]
2171pub const hipError_t_hipErrorOperatingSystem: hipError_t = 304;
2172#[doc = "< Invalide handle"]
2173pub const hipError_t_hipErrorInvalidHandle: hipError_t = 400;
2174#[doc = "< Resource handle (hipEvent_t or hipStream_t) invalid."]
2175pub const hipError_t_hipErrorInvalidResourceHandle: hipError_t = 400;
2176#[doc = "< Resource required is not in a valid state to perform operation."]
2177pub const hipError_t_hipErrorIllegalState: hipError_t = 401;
2178#[doc = "< Not found"]
2179pub const hipError_t_hipErrorNotFound: hipError_t = 500;
2180#[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."]
2181pub const hipError_t_hipErrorNotReady: hipError_t = 600;
2182pub const hipError_t_hipErrorIllegalAddress: hipError_t = 700;
2183#[doc = "< Out of resources error."]
2184pub const hipError_t_hipErrorLaunchOutOfResources: hipError_t = 701;
2185#[doc = "< Timeout for the launch."]
2186pub const hipError_t_hipErrorLaunchTimeOut: hipError_t = 702;
2187#[doc = "< Peer access was already enabled from the current\n< device."]
2188pub const hipError_t_hipErrorPeerAccessAlreadyEnabled: hipError_t = 704;
2189#[doc = "< Peer access was never enabled from the current device."]
2190pub const hipError_t_hipErrorPeerAccessNotEnabled: hipError_t = 705;
2191#[doc = "< The process is active."]
2192pub const hipError_t_hipErrorSetOnActiveProcess: hipError_t = 708;
2193#[doc = "< The context is already destroyed"]
2194pub const hipError_t_hipErrorContextIsDestroyed: hipError_t = 709;
2195#[doc = "< Produced when the kernel calls assert."]
2196pub const hipError_t_hipErrorAssert: hipError_t = 710;
2197#[doc = "< Produced when trying to lock a page-locked\n< memory."]
2198pub const hipError_t_hipErrorHostMemoryAlreadyRegistered: hipError_t = 712;
2199#[doc = "< Produced when trying to unlock a non-page-locked\n< memory."]
2200pub const hipError_t_hipErrorHostMemoryNotRegistered: hipError_t = 713;
2201#[doc = "< An exception occurred on the device while executing a kernel."]
2202pub const hipError_t_hipErrorLaunchFailure: hipError_t = 719;
2203#[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."]
2204pub const hipError_t_hipErrorCooperativeLaunchTooLarge: hipError_t = 720;
2205#[doc = "< Produced when the hip API is not supported/implemented"]
2206pub const hipError_t_hipErrorNotSupported: hipError_t = 801;
2207#[doc = "< The operation is not permitted when the stream\n< is capturing."]
2208pub const hipError_t_hipErrorStreamCaptureUnsupported: hipError_t = 900;
2209#[doc = "< The current capture sequence on the stream\n< has been invalidated due to a previous error."]
2210pub const hipError_t_hipErrorStreamCaptureInvalidated: hipError_t = 901;
2211#[doc = "< The operation would have resulted in a merge of\n< two independent capture sequences."]
2212pub const hipError_t_hipErrorStreamCaptureMerge: hipError_t = 902;
2213#[doc = "< The capture was not initiated in this stream."]
2214pub const hipError_t_hipErrorStreamCaptureUnmatched: hipError_t = 903;
2215#[doc = "< The capture sequence contains a fork that was not\n< joined to the primary stream."]
2216pub const hipError_t_hipErrorStreamCaptureUnjoined: hipError_t = 904;
2217#[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"]
2218pub const hipError_t_hipErrorStreamCaptureIsolation: hipError_t = 905;
2219#[doc = "< The operation would have resulted in a disallowed\n< implicit dependency on a current capture sequence\n< from hipStreamLegacy."]
2220pub const hipError_t_hipErrorStreamCaptureImplicit: hipError_t = 906;
2221#[doc = "< The operation is not permitted on an event which was last\n< recorded in a capturing stream."]
2222pub const hipError_t_hipErrorCapturedEvent: hipError_t = 907;
2223#[doc = "< A stream capture sequence not initiated with\n< the hipStreamCaptureModeRelaxed argument to\n< hipStreamBeginCapture was passed to\n< hipStreamEndCapture in a different thread."]
2224pub const hipError_t_hipErrorStreamCaptureWrongThread: hipError_t = 908;
2225#[doc = "< This error indicates that the graph update\n< not performed because it included changes which\n< violated constraintsspecific to instantiated graph\n< update."]
2226pub const hipError_t_hipErrorGraphExecUpdateFailure: hipError_t = 910;
2227#[doc = "< Invalid channel descriptor."]
2228pub const hipError_t_hipErrorInvalidChannelDescriptor: hipError_t = 911;
2229#[doc = "< Invalid texture."]
2230pub const hipError_t_hipErrorInvalidTexture: hipError_t = 912;
2231#[doc = "< Unknown error."]
2232pub const hipError_t_hipErrorUnknown: hipError_t = 999;
2233#[doc = "< HSA runtime memory call returned error.  Typically not seen\n< in production systems."]
2234pub const hipError_t_hipErrorRuntimeMemory: hipError_t = 1052;
2235#[doc = "< HSA runtime call other than memory returned error.  Typically\n< not seen in production systems."]
2236pub const hipError_t_hipErrorRuntimeOther: hipError_t = 1053;
2237#[doc = "< Marker that more error codes are needed."]
2238pub const hipError_t_hipErrorTbd: hipError_t = 1054;
2239#[doc = " HIP error type\n"]
2240pub type hipError_t = ::std::os::raw::c_uint;
2241pub const hipDeviceAttribute_t_hipDeviceAttributeCudaCompatibleBegin: hipDeviceAttribute_t = 0;
2242#[doc = "< Whether ECC support is enabled."]
2243pub const hipDeviceAttribute_t_hipDeviceAttributeEccEnabled: hipDeviceAttribute_t = 0;
2244#[doc = "< Cuda only. The maximum size of the window policy in bytes."]
2245pub const hipDeviceAttribute_t_hipDeviceAttributeAccessPolicyMaxWindowSize: hipDeviceAttribute_t =
2246    1;
2247#[doc = "< Asynchronous engines number."]
2248pub const hipDeviceAttribute_t_hipDeviceAttributeAsyncEngineCount: hipDeviceAttribute_t = 2;
2249#[doc = "< Whether host memory can be mapped into device address space"]
2250pub const hipDeviceAttribute_t_hipDeviceAttributeCanMapHostMemory: hipDeviceAttribute_t = 3;
2251#[doc = "< Device can access host registered memory\n< at the same virtual address as the CPU"]
2252pub const hipDeviceAttribute_t_hipDeviceAttributeCanUseHostPointerForRegisteredMem:
2253    hipDeviceAttribute_t = 4;
2254#[doc = "< Peak clock frequency in kilohertz."]
2255pub const hipDeviceAttribute_t_hipDeviceAttributeClockRate: hipDeviceAttribute_t = 5;
2256#[doc = "< Compute mode that device is currently in."]
2257pub const hipDeviceAttribute_t_hipDeviceAttributeComputeMode: hipDeviceAttribute_t = 6;
2258#[doc = "< Device supports Compute Preemption."]
2259pub const hipDeviceAttribute_t_hipDeviceAttributeComputePreemptionSupported: hipDeviceAttribute_t =
2260    7;
2261#[doc = "< Device can possibly execute multiple kernels concurrently."]
2262pub const hipDeviceAttribute_t_hipDeviceAttributeConcurrentKernels: hipDeviceAttribute_t = 8;
2263#[doc = "< Device can coherently access managed memory concurrently with the CPU"]
2264pub const hipDeviceAttribute_t_hipDeviceAttributeConcurrentManagedAccess: hipDeviceAttribute_t = 9;
2265#[doc = "< Support cooperative launch"]
2266pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeLaunch: hipDeviceAttribute_t = 10;
2267#[doc = "< Support cooperative launch on multiple devices"]
2268pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceLaunch:
2269    hipDeviceAttribute_t = 11;
2270#[doc = "< Device can concurrently copy memory and execute a kernel.\n< Deprecated. Use instead asyncEngineCount."]
2271pub const hipDeviceAttribute_t_hipDeviceAttributeDeviceOverlap: hipDeviceAttribute_t = 12;
2272#[doc = "< Host can directly access managed memory on\n< the device without migration"]
2273pub const hipDeviceAttribute_t_hipDeviceAttributeDirectManagedMemAccessFromHost:
2274    hipDeviceAttribute_t = 13;
2275#[doc = "< Device supports caching globals in L1"]
2276pub const hipDeviceAttribute_t_hipDeviceAttributeGlobalL1CacheSupported: hipDeviceAttribute_t = 14;
2277#[doc = "< Link between the device and the host supports native atomic operations"]
2278pub const hipDeviceAttribute_t_hipDeviceAttributeHostNativeAtomicSupported: hipDeviceAttribute_t =
2279    15;
2280#[doc = "< Device is integrated GPU"]
2281pub const hipDeviceAttribute_t_hipDeviceAttributeIntegrated: hipDeviceAttribute_t = 16;
2282#[doc = "< Multiple GPU devices."]
2283pub const hipDeviceAttribute_t_hipDeviceAttributeIsMultiGpuBoard: hipDeviceAttribute_t = 17;
2284#[doc = "< Run time limit for kernels executed on the device"]
2285pub const hipDeviceAttribute_t_hipDeviceAttributeKernelExecTimeout: hipDeviceAttribute_t = 18;
2286#[doc = "< Size of L2 cache in bytes. 0 if the device doesn't have L2 cache."]
2287pub const hipDeviceAttribute_t_hipDeviceAttributeL2CacheSize: hipDeviceAttribute_t = 19;
2288#[doc = "< caching locals in L1 is supported"]
2289pub const hipDeviceAttribute_t_hipDeviceAttributeLocalL1CacheSupported: hipDeviceAttribute_t = 20;
2290#[doc = "< 8-byte locally unique identifier in 8 bytes. Undefined on TCC and non-Windows platforms"]
2291pub const hipDeviceAttribute_t_hipDeviceAttributeLuid: hipDeviceAttribute_t = 21;
2292#[doc = "< Luid device node mask. Undefined on TCC and non-Windows platforms"]
2293pub const hipDeviceAttribute_t_hipDeviceAttributeLuidDeviceNodeMask: hipDeviceAttribute_t = 22;
2294#[doc = "< Major compute capability version number."]
2295pub const hipDeviceAttribute_t_hipDeviceAttributeComputeCapabilityMajor: hipDeviceAttribute_t = 23;
2296#[doc = "< Device supports allocating managed memory on this system"]
2297pub const hipDeviceAttribute_t_hipDeviceAttributeManagedMemory: hipDeviceAttribute_t = 24;
2298#[doc = "< Max block size per multiprocessor"]
2299pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlocksPerMultiProcessor: hipDeviceAttribute_t =
2300    25;
2301#[doc = "< Max block size in width."]
2302pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlockDimX: hipDeviceAttribute_t = 26;
2303#[doc = "< Max block size in height."]
2304pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlockDimY: hipDeviceAttribute_t = 27;
2305#[doc = "< Max block size in depth."]
2306pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlockDimZ: hipDeviceAttribute_t = 28;
2307#[doc = "< Max grid size  in width."]
2308pub const hipDeviceAttribute_t_hipDeviceAttributeMaxGridDimX: hipDeviceAttribute_t = 29;
2309#[doc = "< Max grid size  in height."]
2310pub const hipDeviceAttribute_t_hipDeviceAttributeMaxGridDimY: hipDeviceAttribute_t = 30;
2311#[doc = "< Max grid size  in depth."]
2312pub const hipDeviceAttribute_t_hipDeviceAttributeMaxGridDimZ: hipDeviceAttribute_t = 31;
2313#[doc = "< Maximum size of 1D surface."]
2314pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface1D: hipDeviceAttribute_t = 32;
2315#[doc = "< Cuda only. Maximum dimensions of 1D layered surface."]
2316pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface1DLayered: hipDeviceAttribute_t = 33;
2317#[doc = "< Maximum dimension (width, height) of 2D surface."]
2318pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface2D: hipDeviceAttribute_t = 34;
2319#[doc = "< Cuda only. Maximum dimensions of 2D layered surface."]
2320pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface2DLayered: hipDeviceAttribute_t = 35;
2321#[doc = "< Maximum dimension (width, height, depth) of 3D surface."]
2322pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface3D: hipDeviceAttribute_t = 36;
2323#[doc = "< Cuda only. Maximum dimensions of Cubemap surface."]
2324pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurfaceCubemap: hipDeviceAttribute_t = 37;
2325#[doc = "< Cuda only. Maximum dimension of Cubemap layered surface."]
2326pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurfaceCubemapLayered: hipDeviceAttribute_t =
2327    38;
2328#[doc = "< Maximum size of 1D texture."]
2329pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DWidth: hipDeviceAttribute_t = 39;
2330#[doc = "< Maximum dimensions of 1D layered texture."]
2331pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DLayered: hipDeviceAttribute_t = 40;
2332#[doc = "< Maximum number of elements allocatable in a 1D linear texture.\n< Use cudaDeviceGetTexture1DLinearMaxWidth() instead on Cuda."]
2333pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DLinear: hipDeviceAttribute_t = 41;
2334#[doc = "< Maximum size of 1D mipmapped texture."]
2335pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DMipmap: hipDeviceAttribute_t = 42;
2336#[doc = "< Maximum dimension width of 2D texture."]
2337pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DWidth: hipDeviceAttribute_t = 43;
2338#[doc = "< Maximum dimension hight of 2D texture."]
2339pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DHeight: hipDeviceAttribute_t = 44;
2340#[doc = "< Maximum dimensions of 2D texture if gather operations  performed."]
2341pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DGather: hipDeviceAttribute_t = 45;
2342#[doc = "< Maximum dimensions of 2D layered texture."]
2343pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DLayered: hipDeviceAttribute_t = 46;
2344#[doc = "< Maximum dimensions (width, height, pitch) of 2D textures bound to pitched memory."]
2345pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DLinear: hipDeviceAttribute_t = 47;
2346#[doc = "< Maximum dimensions of 2D mipmapped texture."]
2347pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DMipmap: hipDeviceAttribute_t = 48;
2348#[doc = "< Maximum dimension width of 3D texture."]
2349pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DWidth: hipDeviceAttribute_t = 49;
2350#[doc = "< Maximum dimension height of 3D texture."]
2351pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DHeight: hipDeviceAttribute_t = 50;
2352#[doc = "< Maximum dimension depth of 3D texture."]
2353pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DDepth: hipDeviceAttribute_t = 51;
2354#[doc = "< Maximum dimensions of alternate 3D texture."]
2355pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DAlt: hipDeviceAttribute_t = 52;
2356#[doc = "< Maximum dimensions of Cubemap texture"]
2357pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTextureCubemap: hipDeviceAttribute_t = 53;
2358#[doc = "< Maximum dimensions of Cubemap layered texture."]
2359pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTextureCubemapLayered: hipDeviceAttribute_t =
2360    54;
2361#[doc = "< Maximum dimension of a block"]
2362pub const hipDeviceAttribute_t_hipDeviceAttributeMaxThreadsDim: hipDeviceAttribute_t = 55;
2363#[doc = "< Maximum number of threads per block."]
2364pub const hipDeviceAttribute_t_hipDeviceAttributeMaxThreadsPerBlock: hipDeviceAttribute_t = 56;
2365#[doc = "< Maximum resident threads per multiprocessor."]
2366pub const hipDeviceAttribute_t_hipDeviceAttributeMaxThreadsPerMultiProcessor: hipDeviceAttribute_t =
2367    57;
2368#[doc = "< Maximum pitch in bytes allowed by memory copies"]
2369pub const hipDeviceAttribute_t_hipDeviceAttributeMaxPitch: hipDeviceAttribute_t = 58;
2370#[doc = "< Global memory bus width in bits."]
2371pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryBusWidth: hipDeviceAttribute_t = 59;
2372#[doc = "< Peak memory clock frequency in kilohertz."]
2373pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryClockRate: hipDeviceAttribute_t = 60;
2374#[doc = "< Minor compute capability version number."]
2375pub const hipDeviceAttribute_t_hipDeviceAttributeComputeCapabilityMinor: hipDeviceAttribute_t = 61;
2376#[doc = "< Unique ID of device group on the same multi-GPU board"]
2377pub const hipDeviceAttribute_t_hipDeviceAttributeMultiGpuBoardGroupID: hipDeviceAttribute_t = 62;
2378#[doc = "< Number of multiprocessors on the device."]
2379pub const hipDeviceAttribute_t_hipDeviceAttributeMultiprocessorCount: hipDeviceAttribute_t = 63;
2380#[doc = "< Previously hipDeviceAttributeName"]
2381pub const hipDeviceAttribute_t_hipDeviceAttributeUnused1: hipDeviceAttribute_t = 64;
2382#[doc = "< Device supports coherently accessing pageable memory\n< without calling hipHostRegister on it"]
2383pub const hipDeviceAttribute_t_hipDeviceAttributePageableMemoryAccess: hipDeviceAttribute_t = 65;
2384#[doc = "< Device accesses pageable memory via the host's page tables"]
2385pub const hipDeviceAttribute_t_hipDeviceAttributePageableMemoryAccessUsesHostPageTables:
2386    hipDeviceAttribute_t = 66;
2387#[doc = "< PCI Bus ID."]
2388pub const hipDeviceAttribute_t_hipDeviceAttributePciBusId: hipDeviceAttribute_t = 67;
2389#[doc = "< PCI Device ID."]
2390pub const hipDeviceAttribute_t_hipDeviceAttributePciDeviceId: hipDeviceAttribute_t = 68;
2391#[doc = "< PCI Domain Id."]
2392pub const hipDeviceAttribute_t_hipDeviceAttributePciDomainId: hipDeviceAttribute_t = 69;
2393#[doc = "< PCI Domain ID, for backward compatibility."]
2394pub const hipDeviceAttribute_t_hipDeviceAttributePciDomainID: hipDeviceAttribute_t = 69;
2395#[doc = "< Maximum l2 persisting lines capacity in bytes"]
2396pub const hipDeviceAttribute_t_hipDeviceAttributePersistingL2CacheMaxSize: hipDeviceAttribute_t =
2397    70;
2398#[doc = "< 32-bit registers available to a thread block. This number is shared\n< by all thread blocks simultaneously resident on a multiprocessor."]
2399pub const hipDeviceAttribute_t_hipDeviceAttributeMaxRegistersPerBlock: hipDeviceAttribute_t = 71;
2400#[doc = "< 32-bit registers available per block."]
2401pub const hipDeviceAttribute_t_hipDeviceAttributeMaxRegistersPerMultiprocessor:
2402    hipDeviceAttribute_t = 72;
2403#[doc = "< Shared memory reserved by CUDA driver per block."]
2404pub const hipDeviceAttribute_t_hipDeviceAttributeReservedSharedMemPerBlock: hipDeviceAttribute_t =
2405    73;
2406#[doc = "< Maximum shared memory available per block in bytes."]
2407pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSharedMemoryPerBlock: hipDeviceAttribute_t = 74;
2408#[doc = "< Maximum shared memory per block usable by special opt in."]
2409pub const hipDeviceAttribute_t_hipDeviceAttributeSharedMemPerBlockOptin: hipDeviceAttribute_t = 75;
2410#[doc = "< Shared memory available per multiprocessor."]
2411pub const hipDeviceAttribute_t_hipDeviceAttributeSharedMemPerMultiprocessor: hipDeviceAttribute_t =
2412    76;
2413#[doc = "< Cuda only. Performance ratio of single precision to double precision."]
2414pub const hipDeviceAttribute_t_hipDeviceAttributeSingleToDoublePrecisionPerfRatio:
2415    hipDeviceAttribute_t = 77;
2416#[doc = "< Whether to support stream priorities."]
2417pub const hipDeviceAttribute_t_hipDeviceAttributeStreamPrioritiesSupported: hipDeviceAttribute_t =
2418    78;
2419#[doc = "< Alignment requirement for surfaces"]
2420pub const hipDeviceAttribute_t_hipDeviceAttributeSurfaceAlignment: hipDeviceAttribute_t = 79;
2421#[doc = "< Cuda only. Whether device is a Tesla device using TCC driver"]
2422pub const hipDeviceAttribute_t_hipDeviceAttributeTccDriver: hipDeviceAttribute_t = 80;
2423#[doc = "< Alignment requirement for textures"]
2424pub const hipDeviceAttribute_t_hipDeviceAttributeTextureAlignment: hipDeviceAttribute_t = 81;
2425#[doc = "< Pitch alignment requirement for 2D texture references bound to pitched memory;"]
2426pub const hipDeviceAttribute_t_hipDeviceAttributeTexturePitchAlignment: hipDeviceAttribute_t = 82;
2427#[doc = "< Constant memory size in bytes."]
2428pub const hipDeviceAttribute_t_hipDeviceAttributeTotalConstantMemory: hipDeviceAttribute_t = 83;
2429#[doc = "< Global memory available on devicice."]
2430pub const hipDeviceAttribute_t_hipDeviceAttributeTotalGlobalMem: hipDeviceAttribute_t = 84;
2431#[doc = "< Cuda only. An unified address space shared with the host."]
2432pub const hipDeviceAttribute_t_hipDeviceAttributeUnifiedAddressing: hipDeviceAttribute_t = 85;
2433#[doc = "< Previously hipDeviceAttributeUuid"]
2434pub const hipDeviceAttribute_t_hipDeviceAttributeUnused2: hipDeviceAttribute_t = 86;
2435#[doc = "< Warp size in threads."]
2436pub const hipDeviceAttribute_t_hipDeviceAttributeWarpSize: hipDeviceAttribute_t = 87;
2437#[doc = "< Device supports HIP Stream Ordered Memory Allocator"]
2438pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryPoolsSupported: hipDeviceAttribute_t = 88;
2439#[doc = "< Device supports HIP virtual memory management"]
2440pub const hipDeviceAttribute_t_hipDeviceAttributeVirtualMemoryManagementSupported:
2441    hipDeviceAttribute_t = 89;
2442#[doc = "< Can device support host memory registration via hipHostRegister"]
2443pub const hipDeviceAttribute_t_hipDeviceAttributeHostRegisterSupported: hipDeviceAttribute_t = 90;
2444#[doc = "< Supported handle mask for HIP Stream Ordered Memory Allocator"]
2445pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryPoolSupportedHandleTypes:
2446    hipDeviceAttribute_t = 91;
2447pub const hipDeviceAttribute_t_hipDeviceAttributeCudaCompatibleEnd: hipDeviceAttribute_t = 9999;
2448pub const hipDeviceAttribute_t_hipDeviceAttributeAmdSpecificBegin: hipDeviceAttribute_t = 10000;
2449#[doc = "< Frequency in khz of the timer used by the device-side \"clock*\""]
2450pub const hipDeviceAttribute_t_hipDeviceAttributeClockInstructionRate: hipDeviceAttribute_t = 10000;
2451#[doc = "< Previously hipDeviceAttributeArch"]
2452pub const hipDeviceAttribute_t_hipDeviceAttributeUnused3: hipDeviceAttribute_t = 10001;
2453#[doc = "< Maximum Shared Memory PerMultiprocessor."]
2454pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSharedMemoryPerMultiprocessor:
2455    hipDeviceAttribute_t = 10002;
2456#[doc = "< Previously hipDeviceAttributeGcnArch"]
2457pub const hipDeviceAttribute_t_hipDeviceAttributeUnused4: hipDeviceAttribute_t = 10003;
2458#[doc = "< Previously hipDeviceAttributeGcnArchName"]
2459pub const hipDeviceAttribute_t_hipDeviceAttributeUnused5: hipDeviceAttribute_t = 10004;
2460#[doc = "< Address of the HDP_MEM_COHERENCY_FLUSH_CNTL register"]
2461pub const hipDeviceAttribute_t_hipDeviceAttributeHdpMemFlushCntl: hipDeviceAttribute_t = 10005;
2462#[doc = "< Address of the HDP_REG_COHERENCY_FLUSH_CNTL register"]
2463pub const hipDeviceAttribute_t_hipDeviceAttributeHdpRegFlushCntl: hipDeviceAttribute_t = 10006;
2464#[doc = "< Supports cooperative launch on multiple\n< devices with unmatched functions"]
2465pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc:
2466    hipDeviceAttribute_t = 10007;
2467#[doc = "< Supports cooperative launch on multiple\n< devices with unmatched grid dimensions"]
2468pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim:
2469    hipDeviceAttribute_t = 10008;
2470#[doc = "< Supports cooperative launch on multiple\n< devices with unmatched block dimensions"]
2471pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim:
2472    hipDeviceAttribute_t = 10009;
2473#[doc = "< Supports cooperative launch on multiple\n< devices with unmatched shared memories"]
2474pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem:
2475    hipDeviceAttribute_t = 10010;
2476#[doc = "< Whether it is LargeBar"]
2477pub const hipDeviceAttribute_t_hipDeviceAttributeIsLargeBar: hipDeviceAttribute_t = 10011;
2478#[doc = "< Revision of the GPU in this device"]
2479pub const hipDeviceAttribute_t_hipDeviceAttributeAsicRevision: hipDeviceAttribute_t = 10012;
2480#[doc = "< '1' if Device supports hipStreamWaitValue32() and\n< hipStreamWaitValue64(), '0' otherwise."]
2481pub const hipDeviceAttribute_t_hipDeviceAttributeCanUseStreamWaitValue: hipDeviceAttribute_t =
2482    10013;
2483#[doc = "< '1' if Device supports image, '0' otherwise."]
2484pub const hipDeviceAttribute_t_hipDeviceAttributeImageSupport: hipDeviceAttribute_t = 10014;
2485#[doc = "< All available physical compute\n< units for the device"]
2486pub const hipDeviceAttribute_t_hipDeviceAttributePhysicalMultiProcessorCount: hipDeviceAttribute_t =
2487    10015;
2488#[doc = "< '1' if Device supports fine grain, '0' otherwise"]
2489pub const hipDeviceAttribute_t_hipDeviceAttributeFineGrainSupport: hipDeviceAttribute_t = 10016;
2490#[doc = "< Constant frequency of wall clock in kilohertz."]
2491pub const hipDeviceAttribute_t_hipDeviceAttributeWallClockRate: hipDeviceAttribute_t = 10017;
2492#[doc = "< The number of XCC(s) on the device"]
2493pub const hipDeviceAttribute_t_hipDeviceAttributeNumberOfXccs: hipDeviceAttribute_t = 10018;
2494#[doc = "< PCI Chip ID. Returns gpu manufacturer device id"]
2495pub const hipDeviceAttribute_t_hipDeviceAttributePciChipId: hipDeviceAttribute_t = 10019;
2496pub const hipDeviceAttribute_t_hipDeviceAttributeAmdSpecificEnd: hipDeviceAttribute_t = 19999;
2497pub const hipDeviceAttribute_t_hipDeviceAttributeVendorSpecificBegin: hipDeviceAttribute_t = 20000;
2498#[doc = " hipDeviceAttribute_t\n hipDeviceAttributeUnused number: 5"]
2499pub type hipDeviceAttribute_t = ::std::os::raw::c_uint;
2500pub const hipDriverProcAddressQueryResult_HIP_GET_PROC_ADDRESS_SUCCESS:
2501    hipDriverProcAddressQueryResult = 0;
2502pub const hipDriverProcAddressQueryResult_HIP_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND:
2503    hipDriverProcAddressQueryResult = 1;
2504pub const hipDriverProcAddressQueryResult_HIP_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT:
2505    hipDriverProcAddressQueryResult = 2;
2506pub type hipDriverProcAddressQueryResult = ::std::os::raw::c_uint;
2507pub const hipComputeMode_hipComputeModeDefault: hipComputeMode = 0;
2508pub const hipComputeMode_hipComputeModeExclusive: hipComputeMode = 1;
2509pub const hipComputeMode_hipComputeModeProhibited: hipComputeMode = 2;
2510pub const hipComputeMode_hipComputeModeExclusiveProcess: hipComputeMode = 3;
2511pub type hipComputeMode = ::std::os::raw::c_uint;
2512pub const hipFlushGPUDirectRDMAWritesOptions_hipFlushGPUDirectRDMAWritesOptionHost:
2513    hipFlushGPUDirectRDMAWritesOptions = 1;
2514pub const hipFlushGPUDirectRDMAWritesOptions_hipFlushGPUDirectRDMAWritesOptionMemOps:
2515    hipFlushGPUDirectRDMAWritesOptions = 2;
2516pub type hipFlushGPUDirectRDMAWritesOptions = ::std::os::raw::c_uint;
2517pub const hipGPUDirectRDMAWritesOrdering_hipGPUDirectRDMAWritesOrderingNone:
2518    hipGPUDirectRDMAWritesOrdering = 0;
2519pub const hipGPUDirectRDMAWritesOrdering_hipGPUDirectRDMAWritesOrderingOwner:
2520    hipGPUDirectRDMAWritesOrdering = 100;
2521pub const hipGPUDirectRDMAWritesOrdering_hipGPUDirectRDMAWritesOrderingAllDevices:
2522    hipGPUDirectRDMAWritesOrdering = 200;
2523pub type hipGPUDirectRDMAWritesOrdering = ::std::os::raw::c_uint;
2524#[doc = "  @defgroup DriverTypes Driver Types\n  @{\n  This section describes the driver data types.\n"]
2525pub type hipDeviceptr_t = *mut ::std::os::raw::c_void;
2526#[doc = "< Signed channel format"]
2527pub const hipChannelFormatKind_hipChannelFormatKindSigned: hipChannelFormatKind = 0;
2528#[doc = "< Unsigned channel format"]
2529pub const hipChannelFormatKind_hipChannelFormatKindUnsigned: hipChannelFormatKind = 1;
2530#[doc = "< Float channel format"]
2531pub const hipChannelFormatKind_hipChannelFormatKindFloat: hipChannelFormatKind = 2;
2532#[doc = "< No channel format"]
2533pub const hipChannelFormatKind_hipChannelFormatKindNone: hipChannelFormatKind = 3;
2534#[doc = " HIP channel format kinds"]
2535pub type hipChannelFormatKind = ::std::os::raw::c_uint;
2536#[doc = " HIP channel format descriptor"]
2537#[repr(C)]
2538#[derive(Debug, Copy, Clone)]
2539pub struct hipChannelFormatDesc {
2540    pub x: ::std::os::raw::c_int,
2541    pub y: ::std::os::raw::c_int,
2542    pub z: ::std::os::raw::c_int,
2543    pub w: ::std::os::raw::c_int,
2544    #[doc = "< Channel format kind"]
2545    pub f: hipChannelFormatKind,
2546}
2547#[repr(C)]
2548#[derive(Debug, Copy, Clone)]
2549pub struct hipArray {
2550    _unused: [u8; 0],
2551}
2552pub type hipArray_t = *mut hipArray;
2553pub type hipArray_const_t = *const hipArray;
2554#[doc = "< Unsigned 8-bit array format"]
2555pub const hipArray_Format_HIP_AD_FORMAT_UNSIGNED_INT8: hipArray_Format = 1;
2556#[doc = "< Unsigned 16-bit array format"]
2557pub const hipArray_Format_HIP_AD_FORMAT_UNSIGNED_INT16: hipArray_Format = 2;
2558#[doc = "< Unsigned 32-bit array format"]
2559pub const hipArray_Format_HIP_AD_FORMAT_UNSIGNED_INT32: hipArray_Format = 3;
2560#[doc = "< Signed 8-bit array format"]
2561pub const hipArray_Format_HIP_AD_FORMAT_SIGNED_INT8: hipArray_Format = 8;
2562#[doc = "< Signed 16-bit array format"]
2563pub const hipArray_Format_HIP_AD_FORMAT_SIGNED_INT16: hipArray_Format = 9;
2564#[doc = "< Signed 32-bit array format"]
2565pub const hipArray_Format_HIP_AD_FORMAT_SIGNED_INT32: hipArray_Format = 10;
2566#[doc = "< Half array format"]
2567pub const hipArray_Format_HIP_AD_FORMAT_HALF: hipArray_Format = 16;
2568#[doc = "< Float array format"]
2569pub const hipArray_Format_HIP_AD_FORMAT_FLOAT: hipArray_Format = 32;
2570#[doc = " HIP array format"]
2571pub type hipArray_Format = ::std::os::raw::c_uint;
2572#[doc = " HIP array descriptor"]
2573#[repr(C)]
2574#[derive(Debug, Copy, Clone)]
2575pub struct HIP_ARRAY_DESCRIPTOR {
2576    #[doc = "< Width of the array"]
2577    pub Width: usize,
2578    #[doc = "< Height of the array"]
2579    pub Height: usize,
2580    #[doc = "< Format of the array"]
2581    pub Format: hipArray_Format,
2582    #[doc = "< Number of channels of the array"]
2583    pub NumChannels: ::std::os::raw::c_uint,
2584}
2585#[doc = " HIP 3D array descriptor"]
2586#[repr(C)]
2587#[derive(Debug, Copy, Clone)]
2588pub struct HIP_ARRAY3D_DESCRIPTOR {
2589    #[doc = "< Width of the array"]
2590    pub Width: usize,
2591    #[doc = "< Height of the array"]
2592    pub Height: usize,
2593    #[doc = "< Depth of the array"]
2594    pub Depth: usize,
2595    #[doc = "< Format of the array"]
2596    pub Format: hipArray_Format,
2597    #[doc = "< Number of channels of the array"]
2598    pub NumChannels: ::std::os::raw::c_uint,
2599    #[doc = "< Flags of the array"]
2600    pub Flags: ::std::os::raw::c_uint,
2601}
2602#[doc = " HIP 2D memory copy parameters"]
2603#[repr(C)]
2604#[derive(Debug, Copy, Clone)]
2605pub struct hip_Memcpy2D {
2606    #[doc = "< Source width in bytes"]
2607    pub srcXInBytes: usize,
2608    #[doc = "< Source height"]
2609    pub srcY: usize,
2610    #[doc = "< Source memory type"]
2611    pub srcMemoryType: hipMemoryType,
2612    #[doc = "< Source pointer"]
2613    pub srcHost: *const ::std::os::raw::c_void,
2614    #[doc = "< Source device"]
2615    pub srcDevice: hipDeviceptr_t,
2616    #[doc = "< Source array"]
2617    pub srcArray: hipArray_t,
2618    #[doc = "< Source pitch"]
2619    pub srcPitch: usize,
2620    #[doc = "< Destination width in bytes"]
2621    pub dstXInBytes: usize,
2622    #[doc = "< Destination height"]
2623    pub dstY: usize,
2624    #[doc = "< Destination memory type"]
2625    pub dstMemoryType: hipMemoryType,
2626    #[doc = "< Destination pointer"]
2627    pub dstHost: *mut ::std::os::raw::c_void,
2628    #[doc = "< Destination device"]
2629    pub dstDevice: hipDeviceptr_t,
2630    #[doc = "< Destination array"]
2631    pub dstArray: hipArray_t,
2632    #[doc = "< Destination pitch"]
2633    pub dstPitch: usize,
2634    #[doc = "< Width in bytes of the 2D memory copy"]
2635    pub WidthInBytes: usize,
2636    #[doc = "< Height of the 2D memory copy"]
2637    pub Height: usize,
2638}
2639#[doc = " HIP mipmapped array"]
2640#[repr(C)]
2641#[derive(Debug, Copy, Clone)]
2642pub struct hipMipmappedArray {
2643    #[doc = "< Data pointer of the mipmapped array"]
2644    pub data: *mut ::std::os::raw::c_void,
2645    #[doc = "< Description of the mipmapped array"]
2646    pub desc: hipChannelFormatDesc,
2647    #[doc = "< Type of the mipmapped array"]
2648    pub type_: ::std::os::raw::c_uint,
2649    #[doc = "< Width of the mipmapped array"]
2650    pub width: ::std::os::raw::c_uint,
2651    #[doc = "< Height of the mipmapped array"]
2652    pub height: ::std::os::raw::c_uint,
2653    #[doc = "< Depth of the mipmapped array"]
2654    pub depth: ::std::os::raw::c_uint,
2655    #[doc = "< Minimum level of the mipmapped array"]
2656    pub min_mipmap_level: ::std::os::raw::c_uint,
2657    #[doc = "< Maximum level of the mipmapped array"]
2658    pub max_mipmap_level: ::std::os::raw::c_uint,
2659    #[doc = "< Flags of the mipmapped array"]
2660    pub flags: ::std::os::raw::c_uint,
2661    #[doc = "< Format of the mipmapped array"]
2662    pub format: hipArray_Format,
2663    #[doc = "< Number of channels of the mipmapped array"]
2664    pub num_channels: ::std::os::raw::c_uint,
2665}
2666#[doc = " HIP mipmapped array pointer"]
2667pub type hipMipmappedArray_t = *mut hipMipmappedArray;
2668pub type hipmipmappedArray = hipMipmappedArray_t;
2669pub type hipMipmappedArray_const_t = *const hipMipmappedArray;
2670#[doc = "< Array resource"]
2671pub const hipResourceType_hipResourceTypeArray: hipResourceType = 0;
2672#[doc = "< Mipmapped array resource"]
2673pub const hipResourceType_hipResourceTypeMipmappedArray: hipResourceType = 1;
2674#[doc = "< Linear resource"]
2675pub const hipResourceType_hipResourceTypeLinear: hipResourceType = 2;
2676#[doc = "< Pitch 2D resource"]
2677pub const hipResourceType_hipResourceTypePitch2D: hipResourceType = 3;
2678#[doc = " HIP resource types"]
2679pub type hipResourceType = ::std::os::raw::c_uint;
2680#[doc = "< Array resource"]
2681pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_ARRAY: HIPresourcetype_enum = 0;
2682#[doc = "< Mipmapped array resource"]
2683pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY: HIPresourcetype_enum = 1;
2684#[doc = "< Linear resource"]
2685pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_LINEAR: HIPresourcetype_enum = 2;
2686#[doc = "< Pitch 2D resource"]
2687pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_PITCH2D: HIPresourcetype_enum = 3;
2688pub type HIPresourcetype_enum = ::std::os::raw::c_uint;
2689pub use self::HIPresourcetype_enum as HIPresourcetype;
2690pub use self::HIPresourcetype_enum as hipResourcetype;
2691#[doc = "< Wrap address mode"]
2692pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_WRAP: HIPaddress_mode_enum = 0;
2693#[doc = "< Clamp address mode"]
2694pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_CLAMP: HIPaddress_mode_enum = 1;
2695#[doc = "< Mirror address mode"]
2696pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_MIRROR: HIPaddress_mode_enum = 2;
2697#[doc = "< Border address mode"]
2698pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_BORDER: HIPaddress_mode_enum = 3;
2699#[doc = " HIP texture address modes"]
2700pub type HIPaddress_mode_enum = ::std::os::raw::c_uint;
2701#[doc = " HIP texture address modes"]
2702pub use self::HIPaddress_mode_enum as HIPaddress_mode;
2703#[doc = "< Filter mode point"]
2704pub const HIPfilter_mode_enum_HIP_TR_FILTER_MODE_POINT: HIPfilter_mode_enum = 0;
2705#[doc = "< Filter mode linear"]
2706pub const HIPfilter_mode_enum_HIP_TR_FILTER_MODE_LINEAR: HIPfilter_mode_enum = 1;
2707#[doc = " HIP filter modes"]
2708pub type HIPfilter_mode_enum = ::std::os::raw::c_uint;
2709#[doc = " HIP filter modes"]
2710pub use self::HIPfilter_mode_enum as HIPfilter_mode;
2711#[doc = " HIP texture descriptor"]
2712#[repr(C)]
2713#[derive(Debug, Copy, Clone)]
2714pub struct HIP_TEXTURE_DESC_st {
2715    #[doc = "< Address modes"]
2716    pub addressMode: [HIPaddress_mode; 3usize],
2717    #[doc = "< Filter mode"]
2718    pub filterMode: HIPfilter_mode,
2719    #[doc = "< Flags"]
2720    pub flags: ::std::os::raw::c_uint,
2721    #[doc = "< Maximum anisotropy ratio"]
2722    pub maxAnisotropy: ::std::os::raw::c_uint,
2723    #[doc = "< Mipmap filter mode"]
2724    pub mipmapFilterMode: HIPfilter_mode,
2725    #[doc = "< Mipmap level bias"]
2726    pub mipmapLevelBias: f32,
2727    #[doc = "< Mipmap minimum level clamp"]
2728    pub minMipmapLevelClamp: f32,
2729    #[doc = "< Mipmap maximum level clamp"]
2730    pub maxMipmapLevelClamp: f32,
2731    #[doc = "< Border Color"]
2732    pub borderColor: [f32; 4usize],
2733    pub reserved: [::std::os::raw::c_int; 12usize],
2734}
2735#[doc = " HIP texture descriptor"]
2736pub type HIP_TEXTURE_DESC = HIP_TEXTURE_DESC_st;
2737#[doc = "< No resource view format (use underlying resource format)"]
2738pub const hipResourceViewFormat_hipResViewFormatNone: hipResourceViewFormat = 0;
2739#[doc = "< 1 channel, unsigned 8-bit integers"]
2740pub const hipResourceViewFormat_hipResViewFormatUnsignedChar1: hipResourceViewFormat = 1;
2741#[doc = "< 2 channels, unsigned 8-bit integers"]
2742pub const hipResourceViewFormat_hipResViewFormatUnsignedChar2: hipResourceViewFormat = 2;
2743#[doc = "< 4 channels, unsigned 8-bit integers"]
2744pub const hipResourceViewFormat_hipResViewFormatUnsignedChar4: hipResourceViewFormat = 3;
2745#[doc = "< 1 channel, signed 8-bit integers"]
2746pub const hipResourceViewFormat_hipResViewFormatSignedChar1: hipResourceViewFormat = 4;
2747#[doc = "< 2 channels, signed 8-bit integers"]
2748pub const hipResourceViewFormat_hipResViewFormatSignedChar2: hipResourceViewFormat = 5;
2749#[doc = "< 4 channels, signed 8-bit integers"]
2750pub const hipResourceViewFormat_hipResViewFormatSignedChar4: hipResourceViewFormat = 6;
2751#[doc = "< 1 channel, unsigned 16-bit integers"]
2752pub const hipResourceViewFormat_hipResViewFormatUnsignedShort1: hipResourceViewFormat = 7;
2753#[doc = "< 2 channels, unsigned 16-bit integers"]
2754pub const hipResourceViewFormat_hipResViewFormatUnsignedShort2: hipResourceViewFormat = 8;
2755#[doc = "< 4 channels, unsigned 16-bit integers"]
2756pub const hipResourceViewFormat_hipResViewFormatUnsignedShort4: hipResourceViewFormat = 9;
2757#[doc = "< 1 channel, signed 16-bit integers"]
2758pub const hipResourceViewFormat_hipResViewFormatSignedShort1: hipResourceViewFormat = 10;
2759#[doc = "< 2 channels, signed 16-bit integers"]
2760pub const hipResourceViewFormat_hipResViewFormatSignedShort2: hipResourceViewFormat = 11;
2761#[doc = "< 4 channels, signed 16-bit integers"]
2762pub const hipResourceViewFormat_hipResViewFormatSignedShort4: hipResourceViewFormat = 12;
2763#[doc = "< 1 channel, unsigned 32-bit integers"]
2764pub const hipResourceViewFormat_hipResViewFormatUnsignedInt1: hipResourceViewFormat = 13;
2765#[doc = "< 2 channels, unsigned 32-bit integers"]
2766pub const hipResourceViewFormat_hipResViewFormatUnsignedInt2: hipResourceViewFormat = 14;
2767#[doc = "< 4 channels, unsigned 32-bit integers"]
2768pub const hipResourceViewFormat_hipResViewFormatUnsignedInt4: hipResourceViewFormat = 15;
2769#[doc = "< 1 channel, signed 32-bit integers"]
2770pub const hipResourceViewFormat_hipResViewFormatSignedInt1: hipResourceViewFormat = 16;
2771#[doc = "< 2 channels, signed 32-bit integers"]
2772pub const hipResourceViewFormat_hipResViewFormatSignedInt2: hipResourceViewFormat = 17;
2773#[doc = "< 4 channels, signed 32-bit integers"]
2774pub const hipResourceViewFormat_hipResViewFormatSignedInt4: hipResourceViewFormat = 18;
2775#[doc = "< 1 channel, 16-bit floating point"]
2776pub const hipResourceViewFormat_hipResViewFormatHalf1: hipResourceViewFormat = 19;
2777#[doc = "< 2 channels, 16-bit floating point"]
2778pub const hipResourceViewFormat_hipResViewFormatHalf2: hipResourceViewFormat = 20;
2779#[doc = "< 4 channels, 16-bit floating point"]
2780pub const hipResourceViewFormat_hipResViewFormatHalf4: hipResourceViewFormat = 21;
2781#[doc = "< 1 channel, 32-bit floating point"]
2782pub const hipResourceViewFormat_hipResViewFormatFloat1: hipResourceViewFormat = 22;
2783#[doc = "< 2 channels, 32-bit floating point"]
2784pub const hipResourceViewFormat_hipResViewFormatFloat2: hipResourceViewFormat = 23;
2785#[doc = "< 4 channels, 32-bit floating point"]
2786pub const hipResourceViewFormat_hipResViewFormatFloat4: hipResourceViewFormat = 24;
2787#[doc = "< Block-compressed 1"]
2788pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed1: hipResourceViewFormat =
2789    25;
2790#[doc = "< Block-compressed 2"]
2791pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed2: hipResourceViewFormat =
2792    26;
2793#[doc = "< Block-compressed 3"]
2794pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed3: hipResourceViewFormat =
2795    27;
2796#[doc = "< Block-compressed 4 unsigned"]
2797pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed4: hipResourceViewFormat =
2798    28;
2799#[doc = "< Block-compressed 4 signed"]
2800pub const hipResourceViewFormat_hipResViewFormatSignedBlockCompressed4: hipResourceViewFormat = 29;
2801#[doc = "< Block-compressed 5 unsigned"]
2802pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed5: hipResourceViewFormat =
2803    30;
2804#[doc = "< Block-compressed 5 signed"]
2805pub const hipResourceViewFormat_hipResViewFormatSignedBlockCompressed5: hipResourceViewFormat = 31;
2806#[doc = "< Block-compressed 6 unsigned half-float"]
2807pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed6H: hipResourceViewFormat =
2808    32;
2809#[doc = "< Block-compressed 6 signed half-float"]
2810pub const hipResourceViewFormat_hipResViewFormatSignedBlockCompressed6H: hipResourceViewFormat = 33;
2811#[doc = "< Block-compressed 7"]
2812pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed7: hipResourceViewFormat =
2813    34;
2814#[doc = " HIP texture resource view formats"]
2815pub type hipResourceViewFormat = ::std::os::raw::c_uint;
2816#[doc = "< No resource view format (use underlying resource format)"]
2817pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_NONE: HIPresourceViewFormat_enum = 0;
2818#[doc = "< 1 channel, unsigned 8-bit integers"]
2819pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X8: HIPresourceViewFormat_enum = 1;
2820#[doc = "< 2 channels, unsigned 8-bit integers"]
2821pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X8: HIPresourceViewFormat_enum = 2;
2822#[doc = "< 4 channels, unsigned 8-bit integers"]
2823pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X8: HIPresourceViewFormat_enum = 3;
2824#[doc = "< 1 channel, signed 8-bit integers"]
2825pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X8: HIPresourceViewFormat_enum = 4;
2826#[doc = "< 2 channels, signed 8-bit integers"]
2827pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X8: HIPresourceViewFormat_enum = 5;
2828#[doc = "< 4 channels, signed 8-bit integers"]
2829pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X8: HIPresourceViewFormat_enum = 6;
2830#[doc = "< 1 channel, unsigned 16-bit integers"]
2831pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X16: HIPresourceViewFormat_enum = 7;
2832#[doc = "< 2 channels, unsigned 16-bit integers"]
2833pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X16: HIPresourceViewFormat_enum = 8;
2834#[doc = "< 4 channels, unsigned 16-bit integers"]
2835pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X16: HIPresourceViewFormat_enum = 9;
2836#[doc = "< 1 channel, signed 16-bit integers"]
2837pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X16: HIPresourceViewFormat_enum = 10;
2838#[doc = "< 2 channels, signed 16-bit integers"]
2839pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X16: HIPresourceViewFormat_enum = 11;
2840#[doc = "< 4 channels, signed 16-bit integers"]
2841pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X16: HIPresourceViewFormat_enum = 12;
2842#[doc = "< 1 channel, unsigned 32-bit integers"]
2843pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X32: HIPresourceViewFormat_enum = 13;
2844#[doc = "< 2 channels, unsigned 32-bit integers"]
2845pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X32: HIPresourceViewFormat_enum = 14;
2846#[doc = "< 4 channels, unsigned 32-bit integers"]
2847pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X32: HIPresourceViewFormat_enum = 15;
2848#[doc = "< 1 channel, signed 32-bit integers"]
2849pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X32: HIPresourceViewFormat_enum = 16;
2850#[doc = "< 2 channels, signed 32-bit integers"]
2851pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X32: HIPresourceViewFormat_enum = 17;
2852#[doc = "< 4 channels, signed 32-bit integers"]
2853pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X32: HIPresourceViewFormat_enum = 18;
2854#[doc = "< 1 channel, 16-bit floating point"]
2855pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_1X16: HIPresourceViewFormat_enum =
2856    19;
2857#[doc = "< 2 channels, 16-bit floating point"]
2858pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_2X16: HIPresourceViewFormat_enum =
2859    20;
2860#[doc = "< 4 channels, 16-bit floating point"]
2861pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_4X16: HIPresourceViewFormat_enum =
2862    21;
2863#[doc = "< 1 channel, 32-bit floating point"]
2864pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_1X32: HIPresourceViewFormat_enum =
2865    22;
2866#[doc = "< 2 channels, 32-bit floating point"]
2867pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_2X32: HIPresourceViewFormat_enum =
2868    23;
2869#[doc = "< 4 channels, 32-bit floating point"]
2870pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_4X32: HIPresourceViewFormat_enum =
2871    24;
2872#[doc = "< Block-compressed 1"]
2873pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC1: HIPresourceViewFormat_enum =
2874    25;
2875#[doc = "< Block-compressed 2"]
2876pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC2: HIPresourceViewFormat_enum =
2877    26;
2878#[doc = "< Block-compressed 3"]
2879pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC3: HIPresourceViewFormat_enum =
2880    27;
2881#[doc = "< Block-compressed 4 unsigned"]
2882pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC4: HIPresourceViewFormat_enum =
2883    28;
2884#[doc = "< Block-compressed 4 signed"]
2885pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC4: HIPresourceViewFormat_enum =
2886    29;
2887#[doc = "< Block-compressed 5 unsigned"]
2888pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC5: HIPresourceViewFormat_enum =
2889    30;
2890#[doc = "< Block-compressed 5 signed"]
2891pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC5: HIPresourceViewFormat_enum =
2892    31;
2893#[doc = "< Block-compressed 6 unsigned half-float"]
2894pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H: HIPresourceViewFormat_enum =
2895    32;
2896#[doc = "< Block-compressed 6 signed half-float"]
2897pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC6H: HIPresourceViewFormat_enum =
2898    33;
2899#[doc = "< Block-compressed 7"]
2900pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC7: HIPresourceViewFormat_enum =
2901    34;
2902#[doc = " HIP texture resource view formats"]
2903pub type HIPresourceViewFormat_enum = ::std::os::raw::c_uint;
2904#[doc = " HIP texture resource view formats"]
2905pub use self::HIPresourceViewFormat_enum as HIPresourceViewFormat;
2906#[doc = " HIP resource descriptor"]
2907#[repr(C)]
2908#[derive(Copy, Clone)]
2909pub struct hipResourceDesc {
2910    #[doc = "< Resource type"]
2911    pub resType: hipResourceType,
2912    pub res: hipResourceDesc__bindgen_ty_1,
2913}
2914#[repr(C)]
2915#[derive(Copy, Clone)]
2916pub union hipResourceDesc__bindgen_ty_1 {
2917    pub array: hipResourceDesc__bindgen_ty_1__bindgen_ty_1,
2918    pub mipmap: hipResourceDesc__bindgen_ty_1__bindgen_ty_2,
2919    pub linear: hipResourceDesc__bindgen_ty_1__bindgen_ty_3,
2920    pub pitch2D: hipResourceDesc__bindgen_ty_1__bindgen_ty_4,
2921}
2922#[repr(C)]
2923#[derive(Debug, Copy, Clone)]
2924pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_1 {
2925    #[doc = "< HIP array"]
2926    pub array: hipArray_t,
2927}
2928#[repr(C)]
2929#[derive(Debug, Copy, Clone)]
2930pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_2 {
2931    #[doc = "< HIP mipmapped array"]
2932    pub mipmap: hipMipmappedArray_t,
2933}
2934#[repr(C)]
2935#[derive(Debug, Copy, Clone)]
2936pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_3 {
2937    #[doc = "< Device pointer"]
2938    pub devPtr: *mut ::std::os::raw::c_void,
2939    #[doc = "< Channel format description"]
2940    pub desc: hipChannelFormatDesc,
2941    #[doc = "< Size in bytes"]
2942    pub sizeInBytes: usize,
2943}
2944#[repr(C)]
2945#[derive(Debug, Copy, Clone)]
2946pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_4 {
2947    #[doc = "< Device pointer"]
2948    pub devPtr: *mut ::std::os::raw::c_void,
2949    #[doc = "< Channel format description"]
2950    pub desc: hipChannelFormatDesc,
2951    #[doc = "< Width of the array in elements"]
2952    pub width: usize,
2953    #[doc = "< Height of the array in elements"]
2954    pub height: usize,
2955    #[doc = "< Pitch between two rows in bytes"]
2956    pub pitchInBytes: usize,
2957}
2958#[doc = " HIP resource view descriptor struct"]
2959#[repr(C)]
2960#[derive(Copy, Clone)]
2961pub struct HIP_RESOURCE_DESC_st {
2962    #[doc = "< Resource type"]
2963    pub resType: HIPresourcetype,
2964    pub res: HIP_RESOURCE_DESC_st__bindgen_ty_1,
2965    #[doc = "< Flags (must be zero)"]
2966    pub flags: ::std::os::raw::c_uint,
2967}
2968#[repr(C)]
2969#[derive(Copy, Clone)]
2970pub union HIP_RESOURCE_DESC_st__bindgen_ty_1 {
2971    pub array: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1,
2972    pub mipmap: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2,
2973    pub linear: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3,
2974    pub pitch2D: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
2975    pub reserved: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5,
2976}
2977#[repr(C)]
2978#[derive(Debug, Copy, Clone)]
2979pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
2980    #[doc = "< HIP array"]
2981    pub hArray: hipArray_t,
2982}
2983#[repr(C)]
2984#[derive(Debug, Copy, Clone)]
2985pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 {
2986    #[doc = "< HIP mipmapped array"]
2987    pub hMipmappedArray: hipMipmappedArray_t,
2988}
2989#[repr(C)]
2990#[derive(Debug, Copy, Clone)]
2991pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 {
2992    #[doc = "< Device pointer"]
2993    pub devPtr: hipDeviceptr_t,
2994    #[doc = "< Array format"]
2995    pub format: hipArray_Format,
2996    #[doc = "< Channels per array element"]
2997    pub numChannels: ::std::os::raw::c_uint,
2998    #[doc = "< Size in bytes"]
2999    pub sizeInBytes: usize,
3000}
3001#[repr(C)]
3002#[derive(Debug, Copy, Clone)]
3003pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 {
3004    #[doc = "< Device pointer"]
3005    pub devPtr: hipDeviceptr_t,
3006    #[doc = "< Array format"]
3007    pub format: hipArray_Format,
3008    #[doc = "< Channels per array element"]
3009    pub numChannels: ::std::os::raw::c_uint,
3010    #[doc = "< Width of the array in elements"]
3011    pub width: usize,
3012    #[doc = "< Height of the array in elements"]
3013    pub height: usize,
3014    #[doc = "< Pitch between two rows in bytes"]
3015    pub pitchInBytes: usize,
3016}
3017#[repr(C)]
3018#[derive(Debug, Copy, Clone)]
3019pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5 {
3020    pub reserved: [::std::os::raw::c_int; 32usize],
3021}
3022#[doc = " HIP resource view descriptor struct"]
3023pub type HIP_RESOURCE_DESC = HIP_RESOURCE_DESC_st;
3024#[doc = " HIP resource view descriptor"]
3025#[repr(C)]
3026#[derive(Debug, Copy, Clone)]
3027pub struct hipResourceViewDesc {
3028    #[doc = "< Resource view format"]
3029    pub format: hipResourceViewFormat,
3030    #[doc = "< Width of the resource view"]
3031    pub width: usize,
3032    #[doc = "< Height of the resource view"]
3033    pub height: usize,
3034    #[doc = "< Depth of the resource view"]
3035    pub depth: usize,
3036    #[doc = "< First defined mipmap level"]
3037    pub firstMipmapLevel: ::std::os::raw::c_uint,
3038    #[doc = "< Last defined mipmap level"]
3039    pub lastMipmapLevel: ::std::os::raw::c_uint,
3040    #[doc = "< First layer index"]
3041    pub firstLayer: ::std::os::raw::c_uint,
3042    #[doc = "< Last layer index"]
3043    pub lastLayer: ::std::os::raw::c_uint,
3044}
3045#[doc = " Resource view descriptor"]
3046#[repr(C)]
3047#[derive(Debug, Copy, Clone)]
3048pub struct HIP_RESOURCE_VIEW_DESC_st {
3049    #[doc = "< Resource view format"]
3050    pub format: HIPresourceViewFormat,
3051    #[doc = "< Width of the resource view"]
3052    pub width: usize,
3053    #[doc = "< Height of the resource view"]
3054    pub height: usize,
3055    #[doc = "< Depth of the resource view"]
3056    pub depth: usize,
3057    #[doc = "< First defined mipmap level"]
3058    pub firstMipmapLevel: ::std::os::raw::c_uint,
3059    #[doc = "< Last defined mipmap level"]
3060    pub lastMipmapLevel: ::std::os::raw::c_uint,
3061    #[doc = "< First layer index"]
3062    pub firstLayer: ::std::os::raw::c_uint,
3063    #[doc = "< Last layer index"]
3064    pub lastLayer: ::std::os::raw::c_uint,
3065    pub reserved: [::std::os::raw::c_uint; 16usize],
3066}
3067#[doc = " Resource view descriptor"]
3068pub type HIP_RESOURCE_VIEW_DESC = HIP_RESOURCE_VIEW_DESC_st;
3069#[doc = "< Host-to-Host Copy"]
3070pub const hipMemcpyKind_hipMemcpyHostToHost: hipMemcpyKind = 0;
3071#[doc = "< Host-to-Device Copy"]
3072pub const hipMemcpyKind_hipMemcpyHostToDevice: hipMemcpyKind = 1;
3073#[doc = "< Device-to-Host Copy"]
3074pub const hipMemcpyKind_hipMemcpyDeviceToHost: hipMemcpyKind = 2;
3075#[doc = "< Device-to-Device Copy"]
3076pub const hipMemcpyKind_hipMemcpyDeviceToDevice: hipMemcpyKind = 3;
3077#[doc = "< Runtime will automatically determine\n<copy-kind based on virtual addresses."]
3078pub const hipMemcpyKind_hipMemcpyDefault: hipMemcpyKind = 4;
3079#[doc = "< Device-to-Device Copy without using compute units"]
3080pub const hipMemcpyKind_hipMemcpyDeviceToDeviceNoCU: hipMemcpyKind = 1024;
3081pub type hipMemcpyKind = ::std::os::raw::c_uint;
3082#[doc = " HIP pithed pointer"]
3083#[repr(C)]
3084#[derive(Debug, Copy, Clone)]
3085pub struct hipPitchedPtr {
3086    #[doc = "< Pointer to the allocated memory"]
3087    pub ptr: *mut ::std::os::raw::c_void,
3088    #[doc = "< Pitch in bytes"]
3089    pub pitch: usize,
3090    #[doc = "< Logical size of the first dimension of allocation in elements"]
3091    pub xsize: usize,
3092    #[doc = "< Logical size of the second dimension of allocation in elements"]
3093    pub ysize: usize,
3094}
3095#[doc = " HIP extent"]
3096#[repr(C)]
3097#[derive(Debug, Copy, Clone)]
3098pub struct hipExtent {
3099    pub width: usize,
3100    pub height: usize,
3101    pub depth: usize,
3102}
3103#[doc = "  HIP position"]
3104#[repr(C)]
3105#[derive(Debug, Copy, Clone)]
3106pub struct hipPos {
3107    #[doc = "< X coordinate"]
3108    pub x: usize,
3109    #[doc = "< Y coordinate"]
3110    pub y: usize,
3111    #[doc = "< Z coordinate"]
3112    pub z: usize,
3113}
3114#[doc = " HIP 3D memory copy parameters"]
3115#[repr(C)]
3116#[derive(Debug, Copy, Clone)]
3117pub struct hipMemcpy3DParms {
3118    #[doc = "< Source array"]
3119    pub srcArray: hipArray_t,
3120    #[doc = "< Source position"]
3121    pub srcPos: hipPos,
3122    #[doc = "< Source pointer"]
3123    pub srcPtr: hipPitchedPtr,
3124    #[doc = "< Destination array"]
3125    pub dstArray: hipArray_t,
3126    #[doc = "< Destination position"]
3127    pub dstPos: hipPos,
3128    #[doc = "< Destination pointer"]
3129    pub dstPtr: hipPitchedPtr,
3130    #[doc = "< Extent of 3D memory copy"]
3131    pub extent: hipExtent,
3132    #[doc = "< Kind of 3D memory copy"]
3133    pub kind: hipMemcpyKind,
3134}
3135#[doc = " HIP 3D memory copy"]
3136#[repr(C)]
3137#[derive(Debug, Copy, Clone)]
3138pub struct HIP_MEMCPY3D {
3139    #[doc = "< Source X in bytes"]
3140    pub srcXInBytes: usize,
3141    #[doc = "< Source Y"]
3142    pub srcY: usize,
3143    #[doc = "< Source Z"]
3144    pub srcZ: usize,
3145    #[doc = "< Source LOD"]
3146    pub srcLOD: usize,
3147    #[doc = "< Source memory type"]
3148    pub srcMemoryType: hipMemoryType,
3149    #[doc = "< Source host pointer"]
3150    pub srcHost: *const ::std::os::raw::c_void,
3151    #[doc = "< Source device"]
3152    pub srcDevice: hipDeviceptr_t,
3153    #[doc = "< Source array"]
3154    pub srcArray: hipArray_t,
3155    #[doc = "< Source pitch"]
3156    pub srcPitch: usize,
3157    #[doc = "< Source height"]
3158    pub srcHeight: usize,
3159    #[doc = "< Destination X in bytes"]
3160    pub dstXInBytes: usize,
3161    #[doc = "< Destination Y"]
3162    pub dstY: usize,
3163    #[doc = "< Destination Z"]
3164    pub dstZ: usize,
3165    #[doc = "< Destination LOD"]
3166    pub dstLOD: usize,
3167    #[doc = "< Destination memory type"]
3168    pub dstMemoryType: hipMemoryType,
3169    #[doc = "< Destination host pointer"]
3170    pub dstHost: *mut ::std::os::raw::c_void,
3171    #[doc = "< Destination device"]
3172    pub dstDevice: hipDeviceptr_t,
3173    #[doc = "< Destination array"]
3174    pub dstArray: hipArray_t,
3175    #[doc = "< Destination pitch"]
3176    pub dstPitch: usize,
3177    #[doc = "< Destination height"]
3178    pub dstHeight: usize,
3179    #[doc = "< Width in bytes of 3D memory copy"]
3180    pub WidthInBytes: usize,
3181    #[doc = "< Height in bytes of 3D memory copy"]
3182    pub Height: usize,
3183    #[doc = "< Depth in bytes of 3D memory copy"]
3184    pub Depth: usize,
3185}
3186#[doc = "< The maximum number of threads per block. Depends on function and device."]
3187pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: hipFunction_attribute = 0;
3188#[doc = "< The statically allocated shared memory size in bytes per block required by the function."]
3189pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: hipFunction_attribute = 1;
3190#[doc = "< The user-allocated constant memory by the function in bytes."]
3191pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: hipFunction_attribute = 2;
3192#[doc = "< The local memory usage of each thread by this function in bytes."]
3193pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: hipFunction_attribute = 3;
3194#[doc = "< The number of registers used by each thread of this function."]
3195pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_NUM_REGS: hipFunction_attribute = 4;
3196#[doc = "< PTX version"]
3197pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_PTX_VERSION: hipFunction_attribute = 5;
3198#[doc = "< Binary version"]
3199pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_BINARY_VERSION: hipFunction_attribute = 6;
3200#[doc = "< Cache mode"]
3201pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA: hipFunction_attribute = 7;
3202#[doc = "< The maximum dynamic shared memory per block for this function in bytes."]
3203pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES:
3204    hipFunction_attribute = 8;
3205#[doc = "< The shared memory carveout preference in percent of the maximum shared memory."]
3206pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT:
3207    hipFunction_attribute = 9;
3208pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_MAX: hipFunction_attribute = 10;
3209pub type hipFunction_attribute = ::std::os::raw::c_uint;
3210#[doc = "< The context on which a pointer was allocated\n< @warning This attribute is not supported in HIP"]
3211pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_CONTEXT: hipPointer_attribute = 1;
3212#[doc = "< memory type describing the location of a pointer"]
3213pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_MEMORY_TYPE: hipPointer_attribute = 2;
3214#[doc = "< address at which the pointer is allocated on the device"]
3215pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_DEVICE_POINTER: hipPointer_attribute = 3;
3216#[doc = "< address at which the pointer is allocated on the host"]
3217pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_HOST_POINTER: hipPointer_attribute = 4;
3218#[doc = "< A pair of tokens for use with Linux kernel interface\n< @warning This attribute is not supported in HIP"]
3219pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_P2P_TOKENS: hipPointer_attribute = 5;
3220#[doc = "< Synchronize every synchronous memory operation\n< initiated on this region"]
3221pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS: hipPointer_attribute = 6;
3222#[doc = "< Unique ID for an allocated memory region"]
3223pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_BUFFER_ID: hipPointer_attribute = 7;
3224#[doc = "< Indicates if the pointer points to managed memory"]
3225pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_IS_MANAGED: hipPointer_attribute = 8;
3226#[doc = "< device ordinal of a device on which a pointer\n< was allocated or registered"]
3227pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL: hipPointer_attribute = 9;
3228#[doc = "< if this pointer maps to an allocation\n< that is suitable for hipIpcGetMemHandle\n< @warning This attribute is not supported in HIP"]
3229pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE:
3230    hipPointer_attribute = 10;
3231#[doc = "< Starting address for this requested pointer"]
3232pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR: hipPointer_attribute = 11;
3233#[doc = "< Size of the address range for this requested pointer"]
3234pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_RANGE_SIZE: hipPointer_attribute = 12;
3235#[doc = "< tells if this pointer is in a valid address range\n< that is mapped to a backing allocation"]
3236pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_MAPPED: hipPointer_attribute = 13;
3237#[doc = "< Bitmask of allowed hipmemAllocationHandleType\n< for this allocation @warning This attribute is not supported in HIP"]
3238pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES: hipPointer_attribute =
3239    14;
3240#[doc = "< returns if the memory referenced by\n< this pointer can be used with the GPUDirect RDMA API\n< @warning This attribute is not supported in HIP"]
3241pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE:
3242    hipPointer_attribute = 15;
3243#[doc = "< Returns the access flags the device associated with\n< for the corresponding memory referenced by the ptr"]
3244pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS: hipPointer_attribute = 16;
3245#[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"]
3246pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE: hipPointer_attribute = 17;
3247pub type hipPointer_attribute = ::std::os::raw::c_uint;
3248#[repr(C)]
3249#[derive(Debug, Copy, Clone)]
3250pub struct uchar1 {
3251    pub x: ::std::os::raw::c_uchar,
3252}
3253#[repr(C)]
3254#[derive(Debug, Copy, Clone)]
3255pub struct uchar2 {
3256    pub x: ::std::os::raw::c_uchar,
3257    pub y: ::std::os::raw::c_uchar,
3258}
3259#[repr(C)]
3260#[derive(Debug, Copy, Clone)]
3261pub struct uchar3 {
3262    pub x: ::std::os::raw::c_uchar,
3263    pub y: ::std::os::raw::c_uchar,
3264    pub z: ::std::os::raw::c_uchar,
3265}
3266#[repr(C)]
3267#[derive(Debug, Copy, Clone)]
3268pub struct uchar4 {
3269    pub x: ::std::os::raw::c_uchar,
3270    pub y: ::std::os::raw::c_uchar,
3271    pub z: ::std::os::raw::c_uchar,
3272    pub w: ::std::os::raw::c_uchar,
3273}
3274#[repr(C)]
3275#[derive(Debug, Copy, Clone)]
3276pub struct char1 {
3277    pub x: ::std::os::raw::c_char,
3278}
3279#[repr(C)]
3280#[derive(Debug, Copy, Clone)]
3281pub struct char2 {
3282    pub x: ::std::os::raw::c_char,
3283    pub y: ::std::os::raw::c_char,
3284}
3285#[repr(C)]
3286#[derive(Debug, Copy, Clone)]
3287pub struct char3 {
3288    pub x: ::std::os::raw::c_char,
3289    pub y: ::std::os::raw::c_char,
3290    pub z: ::std::os::raw::c_char,
3291}
3292#[repr(C)]
3293#[derive(Debug, Copy, Clone)]
3294pub struct char4 {
3295    pub x: ::std::os::raw::c_char,
3296    pub y: ::std::os::raw::c_char,
3297    pub z: ::std::os::raw::c_char,
3298    pub w: ::std::os::raw::c_char,
3299}
3300#[repr(C)]
3301#[derive(Debug, Copy, Clone)]
3302pub struct ushort1 {
3303    pub x: ::std::os::raw::c_ushort,
3304}
3305#[repr(C)]
3306#[derive(Debug, Copy, Clone)]
3307pub struct ushort2 {
3308    pub x: ::std::os::raw::c_ushort,
3309    pub y: ::std::os::raw::c_ushort,
3310}
3311#[repr(C)]
3312#[derive(Debug, Copy, Clone)]
3313pub struct ushort3 {
3314    pub x: ::std::os::raw::c_ushort,
3315    pub y: ::std::os::raw::c_ushort,
3316    pub z: ::std::os::raw::c_ushort,
3317}
3318#[repr(C)]
3319#[derive(Debug, Copy, Clone)]
3320pub struct ushort4 {
3321    pub x: ::std::os::raw::c_ushort,
3322    pub y: ::std::os::raw::c_ushort,
3323    pub z: ::std::os::raw::c_ushort,
3324    pub w: ::std::os::raw::c_ushort,
3325}
3326#[repr(C)]
3327#[derive(Debug, Copy, Clone)]
3328pub struct short1 {
3329    pub x: ::std::os::raw::c_short,
3330}
3331#[repr(C)]
3332#[derive(Debug, Copy, Clone)]
3333pub struct short2 {
3334    pub x: ::std::os::raw::c_short,
3335    pub y: ::std::os::raw::c_short,
3336}
3337#[repr(C)]
3338#[derive(Debug, Copy, Clone)]
3339pub struct short3 {
3340    pub x: ::std::os::raw::c_short,
3341    pub y: ::std::os::raw::c_short,
3342    pub z: ::std::os::raw::c_short,
3343}
3344#[repr(C)]
3345#[derive(Debug, Copy, Clone)]
3346pub struct short4 {
3347    pub x: ::std::os::raw::c_short,
3348    pub y: ::std::os::raw::c_short,
3349    pub z: ::std::os::raw::c_short,
3350    pub w: ::std::os::raw::c_short,
3351}
3352#[repr(C)]
3353#[derive(Debug, Copy, Clone)]
3354pub struct uint1 {
3355    pub x: ::std::os::raw::c_uint,
3356}
3357#[repr(C)]
3358#[derive(Debug, Copy, Clone)]
3359pub struct uint2 {
3360    pub x: ::std::os::raw::c_uint,
3361    pub y: ::std::os::raw::c_uint,
3362}
3363#[repr(C)]
3364#[derive(Debug, Copy, Clone)]
3365pub struct uint3 {
3366    pub x: ::std::os::raw::c_uint,
3367    pub y: ::std::os::raw::c_uint,
3368    pub z: ::std::os::raw::c_uint,
3369}
3370#[repr(C)]
3371#[derive(Debug, Copy, Clone)]
3372pub struct uint4 {
3373    pub x: ::std::os::raw::c_uint,
3374    pub y: ::std::os::raw::c_uint,
3375    pub z: ::std::os::raw::c_uint,
3376    pub w: ::std::os::raw::c_uint,
3377}
3378#[repr(C)]
3379#[derive(Debug, Copy, Clone)]
3380pub struct int1 {
3381    pub x: ::std::os::raw::c_int,
3382}
3383#[repr(C)]
3384#[derive(Debug, Copy, Clone)]
3385pub struct int2 {
3386    pub x: ::std::os::raw::c_int,
3387    pub y: ::std::os::raw::c_int,
3388}
3389#[repr(C)]
3390#[derive(Debug, Copy, Clone)]
3391pub struct int3 {
3392    pub x: ::std::os::raw::c_int,
3393    pub y: ::std::os::raw::c_int,
3394    pub z: ::std::os::raw::c_int,
3395}
3396#[repr(C)]
3397#[derive(Debug, Copy, Clone)]
3398pub struct int4 {
3399    pub x: ::std::os::raw::c_int,
3400    pub y: ::std::os::raw::c_int,
3401    pub z: ::std::os::raw::c_int,
3402    pub w: ::std::os::raw::c_int,
3403}
3404#[repr(C)]
3405#[derive(Debug, Copy, Clone)]
3406pub struct ulong1 {
3407    pub x: ::std::os::raw::c_ulong,
3408}
3409#[repr(C)]
3410#[derive(Debug, Copy, Clone)]
3411pub struct ulong2 {
3412    pub x: ::std::os::raw::c_ulong,
3413    pub y: ::std::os::raw::c_ulong,
3414}
3415#[repr(C)]
3416#[derive(Debug, Copy, Clone)]
3417pub struct ulong3 {
3418    pub x: ::std::os::raw::c_ulong,
3419    pub y: ::std::os::raw::c_ulong,
3420    pub z: ::std::os::raw::c_ulong,
3421}
3422#[repr(C)]
3423#[derive(Debug, Copy, Clone)]
3424pub struct ulong4 {
3425    pub x: ::std::os::raw::c_ulong,
3426    pub y: ::std::os::raw::c_ulong,
3427    pub z: ::std::os::raw::c_ulong,
3428    pub w: ::std::os::raw::c_ulong,
3429}
3430#[repr(C)]
3431#[derive(Debug, Copy, Clone)]
3432pub struct long1 {
3433    pub x: ::std::os::raw::c_long,
3434}
3435#[repr(C)]
3436#[derive(Debug, Copy, Clone)]
3437pub struct long2 {
3438    pub x: ::std::os::raw::c_long,
3439    pub y: ::std::os::raw::c_long,
3440}
3441#[repr(C)]
3442#[derive(Debug, Copy, Clone)]
3443pub struct long3 {
3444    pub x: ::std::os::raw::c_long,
3445    pub y: ::std::os::raw::c_long,
3446    pub z: ::std::os::raw::c_long,
3447}
3448#[repr(C)]
3449#[derive(Debug, Copy, Clone)]
3450pub struct long4 {
3451    pub x: ::std::os::raw::c_long,
3452    pub y: ::std::os::raw::c_long,
3453    pub z: ::std::os::raw::c_long,
3454    pub w: ::std::os::raw::c_long,
3455}
3456#[repr(C)]
3457#[derive(Debug, Copy, Clone)]
3458pub struct ulonglong1 {
3459    pub x: ::std::os::raw::c_ulonglong,
3460}
3461#[repr(C)]
3462#[derive(Debug, Copy, Clone)]
3463pub struct ulonglong2 {
3464    pub x: ::std::os::raw::c_ulonglong,
3465    pub y: ::std::os::raw::c_ulonglong,
3466}
3467#[repr(C)]
3468#[derive(Debug, Copy, Clone)]
3469pub struct ulonglong3 {
3470    pub x: ::std::os::raw::c_ulonglong,
3471    pub y: ::std::os::raw::c_ulonglong,
3472    pub z: ::std::os::raw::c_ulonglong,
3473}
3474#[repr(C)]
3475#[derive(Debug, Copy, Clone)]
3476pub struct ulonglong4 {
3477    pub x: ::std::os::raw::c_ulonglong,
3478    pub y: ::std::os::raw::c_ulonglong,
3479    pub z: ::std::os::raw::c_ulonglong,
3480    pub w: ::std::os::raw::c_ulonglong,
3481}
3482#[repr(C)]
3483#[derive(Debug, Copy, Clone)]
3484pub struct longlong1 {
3485    pub x: ::std::os::raw::c_longlong,
3486}
3487#[repr(C)]
3488#[derive(Debug, Copy, Clone)]
3489pub struct longlong2 {
3490    pub x: ::std::os::raw::c_longlong,
3491    pub y: ::std::os::raw::c_longlong,
3492}
3493#[repr(C)]
3494#[derive(Debug, Copy, Clone)]
3495pub struct longlong3 {
3496    pub x: ::std::os::raw::c_longlong,
3497    pub y: ::std::os::raw::c_longlong,
3498    pub z: ::std::os::raw::c_longlong,
3499}
3500#[repr(C)]
3501#[derive(Debug, Copy, Clone)]
3502pub struct longlong4 {
3503    pub x: ::std::os::raw::c_longlong,
3504    pub y: ::std::os::raw::c_longlong,
3505    pub z: ::std::os::raw::c_longlong,
3506    pub w: ::std::os::raw::c_longlong,
3507}
3508#[repr(C)]
3509#[derive(Debug, Copy, Clone)]
3510pub struct float1 {
3511    pub x: f32,
3512}
3513#[repr(C)]
3514#[derive(Debug, Copy, Clone)]
3515pub struct float2 {
3516    pub x: f32,
3517    pub y: f32,
3518}
3519#[repr(C)]
3520#[derive(Debug, Copy, Clone)]
3521pub struct float3 {
3522    pub x: f32,
3523    pub y: f32,
3524    pub z: f32,
3525}
3526#[repr(C)]
3527#[derive(Debug, Copy, Clone)]
3528pub struct float4 {
3529    pub x: f32,
3530    pub y: f32,
3531    pub z: f32,
3532    pub w: f32,
3533}
3534#[repr(C)]
3535#[derive(Debug, Copy, Clone)]
3536pub struct double1 {
3537    pub x: f64,
3538}
3539#[repr(C)]
3540#[derive(Debug, Copy, Clone)]
3541pub struct double2 {
3542    pub x: f64,
3543    pub y: f64,
3544}
3545#[repr(C)]
3546#[derive(Debug, Copy, Clone)]
3547pub struct double3 {
3548    pub x: f64,
3549    pub y: f64,
3550    pub z: f64,
3551}
3552#[repr(C)]
3553#[derive(Debug, Copy, Clone)]
3554pub struct double4 {
3555    pub x: f64,
3556    pub y: f64,
3557    pub z: f64,
3558    pub w: f64,
3559}
3560extern "C" {
3561    pub fn hipCreateChannelDesc(
3562        x: ::std::os::raw::c_int,
3563        y: ::std::os::raw::c_int,
3564        z: ::std::os::raw::c_int,
3565        w: ::std::os::raw::c_int,
3566        f: hipChannelFormatKind,
3567    ) -> hipChannelFormatDesc;
3568}
3569#[doc = " An opaque value that represents a hip texture object"]
3570#[repr(C)]
3571#[derive(Debug, Copy, Clone)]
3572pub struct __hip_texture {
3573    _unused: [u8; 0],
3574}
3575pub type hipTextureObject_t = *mut __hip_texture;
3576pub const hipTextureAddressMode_hipAddressModeWrap: hipTextureAddressMode = 0;
3577pub const hipTextureAddressMode_hipAddressModeClamp: hipTextureAddressMode = 1;
3578pub const hipTextureAddressMode_hipAddressModeMirror: hipTextureAddressMode = 2;
3579pub const hipTextureAddressMode_hipAddressModeBorder: hipTextureAddressMode = 3;
3580#[doc = " hip texture address modes"]
3581pub type hipTextureAddressMode = ::std::os::raw::c_uint;
3582pub const hipTextureFilterMode_hipFilterModePoint: hipTextureFilterMode = 0;
3583pub const hipTextureFilterMode_hipFilterModeLinear: hipTextureFilterMode = 1;
3584#[doc = " hip texture filter modes"]
3585pub type hipTextureFilterMode = ::std::os::raw::c_uint;
3586pub const hipTextureReadMode_hipReadModeElementType: hipTextureReadMode = 0;
3587pub const hipTextureReadMode_hipReadModeNormalizedFloat: hipTextureReadMode = 1;
3588#[doc = " hip texture read modes"]
3589pub type hipTextureReadMode = ::std::os::raw::c_uint;
3590#[doc = " hip texture reference"]
3591#[repr(C)]
3592#[derive(Debug, Copy, Clone)]
3593pub struct textureReference {
3594    pub normalized: ::std::os::raw::c_int,
3595    pub readMode: hipTextureReadMode,
3596    pub filterMode: hipTextureFilterMode,
3597    pub addressMode: [hipTextureAddressMode; 3usize],
3598    pub channelDesc: hipChannelFormatDesc,
3599    pub sRGB: ::std::os::raw::c_int,
3600    pub maxAnisotropy: ::std::os::raw::c_uint,
3601    pub mipmapFilterMode: hipTextureFilterMode,
3602    pub mipmapLevelBias: f32,
3603    pub minMipmapLevelClamp: f32,
3604    pub maxMipmapLevelClamp: f32,
3605    pub textureObject: hipTextureObject_t,
3606    pub numChannels: ::std::os::raw::c_int,
3607    pub format: hipArray_Format,
3608}
3609#[doc = " hip texture descriptor"]
3610#[repr(C)]
3611#[derive(Debug, Copy, Clone)]
3612pub struct hipTextureDesc {
3613    pub addressMode: [hipTextureAddressMode; 3usize],
3614    pub filterMode: hipTextureFilterMode,
3615    pub readMode: hipTextureReadMode,
3616    pub sRGB: ::std::os::raw::c_int,
3617    pub borderColor: [f32; 4usize],
3618    pub normalizedCoords: ::std::os::raw::c_int,
3619    pub maxAnisotropy: ::std::os::raw::c_uint,
3620    pub mipmapFilterMode: hipTextureFilterMode,
3621    pub mipmapLevelBias: f32,
3622    pub minMipmapLevelClamp: f32,
3623    pub maxMipmapLevelClamp: f32,
3624}
3625#[doc = " An opaque value that represents a hip surface object"]
3626#[repr(C)]
3627#[derive(Debug, Copy, Clone)]
3628pub struct __hip_surface {
3629    _unused: [u8; 0],
3630}
3631pub type hipSurfaceObject_t = *mut __hip_surface;
3632#[doc = " hip surface reference"]
3633#[repr(C)]
3634#[derive(Debug, Copy, Clone)]
3635pub struct surfaceReference {
3636    pub surfaceObject: hipSurfaceObject_t,
3637}
3638pub const hipSurfaceBoundaryMode_hipBoundaryModeZero: hipSurfaceBoundaryMode = 0;
3639pub const hipSurfaceBoundaryMode_hipBoundaryModeTrap: hipSurfaceBoundaryMode = 1;
3640pub const hipSurfaceBoundaryMode_hipBoundaryModeClamp: hipSurfaceBoundaryMode = 2;
3641#[doc = " hip surface boundary modes"]
3642pub type hipSurfaceBoundaryMode = ::std::os::raw::c_uint;
3643#[repr(C)]
3644#[derive(Debug, Copy, Clone)]
3645pub struct ihipCtx_t {
3646    _unused: [u8; 0],
3647}
3648pub type hipCtx_t = *mut ihipCtx_t;
3649pub type hipDevice_t = ::std::os::raw::c_int;
3650pub const hipDeviceP2PAttr_hipDevP2PAttrPerformanceRank: hipDeviceP2PAttr = 0;
3651pub const hipDeviceP2PAttr_hipDevP2PAttrAccessSupported: hipDeviceP2PAttr = 1;
3652pub const hipDeviceP2PAttr_hipDevP2PAttrNativeAtomicSupported: hipDeviceP2PAttr = 2;
3653pub const hipDeviceP2PAttr_hipDevP2PAttrHipArrayAccessSupported: hipDeviceP2PAttr = 3;
3654pub type hipDeviceP2PAttr = ::std::os::raw::c_uint;
3655#[repr(C)]
3656#[derive(Debug, Copy, Clone)]
3657pub struct ihipStream_t {
3658    _unused: [u8; 0],
3659}
3660pub type hipStream_t = *mut ihipStream_t;
3661#[repr(C)]
3662#[derive(Debug, Copy, Clone)]
3663pub struct hipIpcMemHandle_st {
3664    pub reserved: [::std::os::raw::c_char; 64usize],
3665}
3666pub type hipIpcMemHandle_t = hipIpcMemHandle_st;
3667#[repr(C)]
3668#[derive(Debug, Copy, Clone)]
3669pub struct hipIpcEventHandle_st {
3670    pub reserved: [::std::os::raw::c_char; 64usize],
3671}
3672pub type hipIpcEventHandle_t = hipIpcEventHandle_st;
3673#[repr(C)]
3674#[derive(Debug, Copy, Clone)]
3675pub struct ihipModule_t {
3676    _unused: [u8; 0],
3677}
3678pub type hipModule_t = *mut ihipModule_t;
3679#[repr(C)]
3680#[derive(Debug, Copy, Clone)]
3681pub struct ihipModuleSymbol_t {
3682    _unused: [u8; 0],
3683}
3684pub type hipFunction_t = *mut ihipModuleSymbol_t;
3685#[repr(C)]
3686#[derive(Debug, Copy, Clone)]
3687pub struct ihipLinkState_t {
3688    _unused: [u8; 0],
3689}
3690pub type hipLinkState_t = *mut ihipLinkState_t;
3691#[repr(C)]
3692#[derive(Debug, Copy, Clone)]
3693pub struct ihipMemPoolHandle_t {
3694    _unused: [u8; 0],
3695}
3696#[doc = " HIP memory pool"]
3697pub type hipMemPool_t = *mut ihipMemPoolHandle_t;
3698#[repr(C)]
3699#[derive(Debug, Copy, Clone)]
3700pub struct hipFuncAttributes {
3701    pub binaryVersion: ::std::os::raw::c_int,
3702    pub cacheModeCA: ::std::os::raw::c_int,
3703    pub constSizeBytes: usize,
3704    pub localSizeBytes: usize,
3705    pub maxDynamicSharedSizeBytes: ::std::os::raw::c_int,
3706    pub maxThreadsPerBlock: ::std::os::raw::c_int,
3707    pub numRegs: ::std::os::raw::c_int,
3708    pub preferredShmemCarveout: ::std::os::raw::c_int,
3709    pub ptxVersion: ::std::os::raw::c_int,
3710    pub sharedSizeBytes: usize,
3711}
3712#[repr(C)]
3713#[derive(Debug, Copy, Clone)]
3714pub struct ihipEvent_t {
3715    _unused: [u8; 0],
3716}
3717pub type hipEvent_t = *mut ihipEvent_t;
3718#[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)"]
3719pub const hipLimit_t_hipLimitStackSize: hipLimit_t = 0;
3720#[doc = "< Size limit in bytes of fifo used by printf call on the\n< device. Currently not supported"]
3721pub const hipLimit_t_hipLimitPrintfFifoSize: hipLimit_t = 1;
3722#[doc = "< Limit of heap size in bytes on the current device, should\n< be less than the global memory size on the device"]
3723pub const hipLimit_t_hipLimitMallocHeapSize: hipLimit_t = 2;
3724#[doc = "< Minimum allowed value in bytes for scratch limit on this\n< device. Valid only on Rocm device. This is read only."]
3725pub const hipLimit_t_hipExtLimitScratchMin: hipLimit_t = 4096;
3726#[doc = "< Maximum allowed value in bytes for scratch limit on this\n< device. Valid only on Rocm device. This is read only."]
3727pub const hipLimit_t_hipExtLimitScratchMax: hipLimit_t = 4097;
3728#[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."]
3729pub const hipLimit_t_hipExtLimitScratchCurrent: hipLimit_t = 4098;
3730#[doc = "< Supported limit range"]
3731pub const hipLimit_t_hipLimitRange: hipLimit_t = 4099;
3732#[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."]
3733pub type hipLimit_t = ::std::os::raw::c_uint;
3734pub const hipStreamBatchMemOpType_hipStreamMemOpWaitValue32: hipStreamBatchMemOpType = 1;
3735pub const hipStreamBatchMemOpType_hipStreamMemOpWriteValue32: hipStreamBatchMemOpType = 2;
3736pub const hipStreamBatchMemOpType_hipStreamMemOpWaitValue64: hipStreamBatchMemOpType = 4;
3737pub const hipStreamBatchMemOpType_hipStreamMemOpWriteValue64: hipStreamBatchMemOpType = 5;
3738#[doc = "< Currently not supported"]
3739pub const hipStreamBatchMemOpType_hipStreamMemOpBarrier: hipStreamBatchMemOpType = 6;
3740#[doc = "< Currently not supported"]
3741pub const hipStreamBatchMemOpType_hipStreamMemOpFlushRemoteWrites: hipStreamBatchMemOpType = 3;
3742#[doc = " Operations for hipStreamBatchMemOp"]
3743pub type hipStreamBatchMemOpType = ::std::os::raw::c_uint;
3744#[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"]
3745#[repr(C)]
3746#[derive(Copy, Clone)]
3747pub union hipStreamBatchMemOpParams_union {
3748    pub operation: hipStreamBatchMemOpType,
3749    pub waitValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t,
3750    pub writeValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t,
3751    #[doc = "< Currently not supported on AMD"]
3752    pub flushRemoteWrites: hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t,
3753    #[doc = "< Currently not supported on AMD"]
3754    pub memoryBarrier: hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t,
3755    pub pad: [u64; 6usize],
3756}
3757#[repr(C)]
3758#[derive(Copy, Clone)]
3759pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t {
3760    pub operation: hipStreamBatchMemOpType,
3761    pub address: hipDeviceptr_t,
3762    pub __bindgen_anon_1:
3763        hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t__bindgen_ty_1,
3764    pub flags: ::std::os::raw::c_uint,
3765    #[doc = "< Not valid for AMD backend. Initial value is unimportant"]
3766    pub alias: hipDeviceptr_t,
3767}
3768#[repr(C)]
3769#[derive(Copy, Clone)]
3770pub union hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t__bindgen_ty_1 {
3771    pub value: u32,
3772    pub value64: u64,
3773}
3774#[repr(C)]
3775#[derive(Copy, Clone)]
3776pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t {
3777    pub operation: hipStreamBatchMemOpType,
3778    pub address: hipDeviceptr_t,
3779    pub __bindgen_anon_1:
3780        hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t__bindgen_ty_1,
3781    pub flags: ::std::os::raw::c_uint,
3782    #[doc = "< Not valid for AMD backend. Initial value is unimportant"]
3783    pub alias: hipDeviceptr_t,
3784}
3785#[repr(C)]
3786#[derive(Copy, Clone)]
3787pub union hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t__bindgen_ty_1 {
3788    pub value: u32,
3789    pub value64: u64,
3790}
3791#[repr(C)]
3792#[derive(Debug, Copy, Clone)]
3793pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t {
3794    pub operation: hipStreamBatchMemOpType,
3795    pub flags: ::std::os::raw::c_uint,
3796}
3797#[repr(C)]
3798#[derive(Debug, Copy, Clone)]
3799pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t {
3800    pub operation: hipStreamBatchMemOpType,
3801    pub flags: ::std::os::raw::c_uint,
3802}
3803#[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"]
3804pub type hipStreamBatchMemOpParams = hipStreamBatchMemOpParams_union;
3805#[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"]
3806#[repr(C)]
3807#[derive(Debug, Copy, Clone)]
3808pub struct hipBatchMemOpNodeParams {
3809    pub ctx: hipCtx_t,
3810    pub count: ::std::os::raw::c_uint,
3811    pub paramArray: *mut hipStreamBatchMemOpParams,
3812    pub flags: ::std::os::raw::c_uint,
3813}
3814#[doc = "< Data will mostly be read and only occassionally\n< be written to"]
3815pub const hipMemoryAdvise_hipMemAdviseSetReadMostly: hipMemoryAdvise = 1;
3816#[doc = "< Undo the effect of hipMemAdviseSetReadMostly"]
3817pub const hipMemoryAdvise_hipMemAdviseUnsetReadMostly: hipMemoryAdvise = 2;
3818#[doc = "< Set the preferred location for the data as\n< the specified device"]
3819pub const hipMemoryAdvise_hipMemAdviseSetPreferredLocation: hipMemoryAdvise = 3;
3820#[doc = "< Clear the preferred location for the data"]
3821pub const hipMemoryAdvise_hipMemAdviseUnsetPreferredLocation: hipMemoryAdvise = 4;
3822#[doc = "< Data will be accessed by the specified device\n< so prevent page faults as much as possible"]
3823pub const hipMemoryAdvise_hipMemAdviseSetAccessedBy: hipMemoryAdvise = 5;
3824#[doc = "< Let HIP to decide on the page faulting policy\n< for the specified device"]
3825pub const hipMemoryAdvise_hipMemAdviseUnsetAccessedBy: hipMemoryAdvise = 6;
3826#[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"]
3827pub const hipMemoryAdvise_hipMemAdviseSetCoarseGrain: hipMemoryAdvise = 100;
3828#[doc = "< Restores cache coherency policy back to fine-grain"]
3829pub const hipMemoryAdvise_hipMemAdviseUnsetCoarseGrain: hipMemoryAdvise = 101;
3830#[doc = " HIP Memory Advise values\n\n @note This memory advise enumeration is used on Linux, not Windows."]
3831pub type hipMemoryAdvise = ::std::os::raw::c_uint;
3832#[doc = "< Updates to memory with this attribute can be\n< done coherently from all devices"]
3833pub const hipMemRangeCoherencyMode_hipMemRangeCoherencyModeFineGrain: hipMemRangeCoherencyMode = 0;
3834#[doc = "< Writes to memory with this attribute can be\n< performed by a single device at a time"]
3835pub const hipMemRangeCoherencyMode_hipMemRangeCoherencyModeCoarseGrain: hipMemRangeCoherencyMode =
3836    1;
3837#[doc = "< Memory region queried contains subregions with\n< both hipMemRangeCoherencyModeFineGrain and\n< hipMemRangeCoherencyModeCoarseGrain attributes"]
3838pub const hipMemRangeCoherencyMode_hipMemRangeCoherencyModeIndeterminate: hipMemRangeCoherencyMode =
3839    2;
3840#[doc = " HIP Coherency Mode"]
3841pub type hipMemRangeCoherencyMode = ::std::os::raw::c_uint;
3842#[doc = "< Whether the range will mostly be read and\n< only occassionally be written to"]
3843pub const hipMemRangeAttribute_hipMemRangeAttributeReadMostly: hipMemRangeAttribute = 1;
3844#[doc = "< The preferred location of the range"]
3845pub const hipMemRangeAttribute_hipMemRangeAttributePreferredLocation: hipMemRangeAttribute = 2;
3846#[doc = "< Memory range has hipMemAdviseSetAccessedBy\n< set for the specified device"]
3847pub const hipMemRangeAttribute_hipMemRangeAttributeAccessedBy: hipMemRangeAttribute = 3;
3848#[doc = "< The last location to where the range was\n< prefetched"]
3849pub const hipMemRangeAttribute_hipMemRangeAttributeLastPrefetchLocation: hipMemRangeAttribute = 4;
3850#[doc = "< Returns coherency mode\n< @ref hipMemRangeCoherencyMode for the range"]
3851pub const hipMemRangeAttribute_hipMemRangeAttributeCoherencyMode: hipMemRangeAttribute = 100;
3852#[doc = " HIP range attributes"]
3853pub type hipMemRangeAttribute = ::std::os::raw::c_uint;
3854#[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)"]
3855pub const hipMemPoolAttr_hipMemPoolReuseFollowEventDependencies: hipMemPoolAttr = 1;
3856#[doc = " (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)"]
3857pub const hipMemPoolAttr_hipMemPoolReuseAllowOpportunistic: hipMemPoolAttr = 2;
3858#[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)."]
3859pub const hipMemPoolAttr_hipMemPoolReuseAllowInternalDependencies: hipMemPoolAttr = 3;
3860#[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)"]
3861pub const hipMemPoolAttr_hipMemPoolAttrReleaseThreshold: hipMemPoolAttr = 4;
3862#[doc = " (value type = uint64_t)\n Amount of backing memory currently allocated for the mempool."]
3863pub const hipMemPoolAttr_hipMemPoolAttrReservedMemCurrent: hipMemPoolAttr = 5;
3864#[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."]
3865pub const hipMemPoolAttr_hipMemPoolAttrReservedMemHigh: hipMemPoolAttr = 6;
3866#[doc = " (value type = uint64_t)\n Amount of memory from the pool that is currently in use by the application."]
3867pub const hipMemPoolAttr_hipMemPoolAttrUsedMemCurrent: hipMemPoolAttr = 7;
3868#[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."]
3869pub const hipMemPoolAttr_hipMemPoolAttrUsedMemHigh: hipMemPoolAttr = 8;
3870#[doc = " HIP memory pool attributes"]
3871pub type hipMemPoolAttr = ::std::os::raw::c_uint;
3872pub const hipMemLocationType_hipMemLocationTypeInvalid: hipMemLocationType = 0;
3873#[doc = "< Device location, thus it's HIP device ID"]
3874pub const hipMemLocationType_hipMemLocationTypeDevice: hipMemLocationType = 1;
3875#[doc = " Specifies the type of location"]
3876pub type hipMemLocationType = ::std::os::raw::c_uint;
3877#[doc = " Specifies a memory location.\n\n To specify a gpu, set type = @p hipMemLocationTypeDevice and set id = the gpu's device ID"]
3878#[repr(C)]
3879#[derive(Debug, Copy, Clone)]
3880pub struct hipMemLocation {
3881    #[doc = "< Specifies the location type, which describes the meaning of id"]
3882    pub type_: hipMemLocationType,
3883    #[doc = "< Identifier for the provided location type @p hipMemLocationType"]
3884    pub id: ::std::os::raw::c_int,
3885}
3886#[doc = "< Default, make the address range not accessible"]
3887pub const hipMemAccessFlags_hipMemAccessFlagsProtNone: hipMemAccessFlags = 0;
3888#[doc = "< Set the address range read accessible"]
3889pub const hipMemAccessFlags_hipMemAccessFlagsProtRead: hipMemAccessFlags = 1;
3890#[doc = "< Set the address range read-write accessible"]
3891pub const hipMemAccessFlags_hipMemAccessFlagsProtReadWrite: hipMemAccessFlags = 3;
3892#[doc = " Specifies the memory protection flags for mapping\n"]
3893pub type hipMemAccessFlags = ::std::os::raw::c_uint;
3894#[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."]
3895#[repr(C)]
3896#[derive(Debug, Copy, Clone)]
3897pub struct hipMemAccessDesc {
3898    #[doc = "< Location on which the accessibility has to change"]
3899    pub location: hipMemLocation,
3900    #[doc = "< Accessibility flags to set"]
3901    pub flags: hipMemAccessFlags,
3902}
3903pub const hipMemAllocationType_hipMemAllocationTypeInvalid: hipMemAllocationType = 0;
3904#[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
3905pub const hipMemAllocationType_hipMemAllocationTypePinned: hipMemAllocationType = 1;
3906#[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
3907pub const hipMemAllocationType_hipMemAllocationTypeMax: hipMemAllocationType = 2147483647;
3908#[doc = " Defines the allocation types"]
3909pub type hipMemAllocationType = ::std::os::raw::c_uint;
3910#[doc = "< Does not allow any export mechanism"]
3911pub const hipMemAllocationHandleType_hipMemHandleTypeNone: hipMemAllocationHandleType = 0;
3912#[doc = "< Allows a file descriptor for exporting. Permitted only on POSIX systems"]
3913pub const hipMemAllocationHandleType_hipMemHandleTypePosixFileDescriptor:
3914    hipMemAllocationHandleType = 1;
3915#[doc = "< Allows a Win32 NT handle for exporting. (HANDLE)"]
3916pub const hipMemAllocationHandleType_hipMemHandleTypeWin32: hipMemAllocationHandleType = 2;
3917#[doc = "< Allows a Win32 KMT handle for exporting. (D3DKMT_HANDLE)"]
3918pub const hipMemAllocationHandleType_hipMemHandleTypeWin32Kmt: hipMemAllocationHandleType = 4;
3919#[doc = " Flags for specifying handle types for memory pool allocations\n"]
3920pub type hipMemAllocationHandleType = ::std::os::raw::c_uint;
3921#[doc = " Specifies the properties of allocations made from the pool."]
3922#[repr(C)]
3923#[derive(Debug, Copy, Clone)]
3924pub struct hipMemPoolProps {
3925    #[doc = "< Allocation type. Currently must be specified as @p hipMemAllocationTypePinned"]
3926    pub allocType: hipMemAllocationType,
3927    #[doc = "< Handle types that will be supported by allocations from the pool"]
3928    pub handleTypes: hipMemAllocationHandleType,
3929    #[doc = "< Location where allocations should reside"]
3930    pub location: hipMemLocation,
3931    #[doc = " Windows-specific LPSECURITYATTRIBUTES required when @p hipMemHandleTypeWin32 is specified"]
3932    pub win32SecurityAttributes: *mut ::std::os::raw::c_void,
3933    #[doc = "< Maximum pool size. When set to 0, defaults to a system dependent value"]
3934    pub maxSize: usize,
3935    #[doc = "< Reserved for future use, must be 0"]
3936    pub reserved: [::std::os::raw::c_uchar; 56usize],
3937}
3938#[doc = " Opaque data structure for exporting a pool allocation"]
3939#[repr(C)]
3940#[derive(Debug, Copy, Clone)]
3941pub struct hipMemPoolPtrExportData {
3942    pub reserved: [::std::os::raw::c_uchar; 64usize],
3943}
3944#[doc = "< The maximum number of bytes requested for dynamically allocated shared memory"]
3945pub const hipFuncAttribute_hipFuncAttributeMaxDynamicSharedMemorySize: hipFuncAttribute = 8;
3946#[doc = "< Sets the percentage of total shared memory allocated as the shared memory carveout"]
3947pub const hipFuncAttribute_hipFuncAttributePreferredSharedMemoryCarveout: hipFuncAttribute = 9;
3948pub const hipFuncAttribute_hipFuncAttributeMax: hipFuncAttribute = 10;
3949#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
3950pub type hipFuncAttribute = ::std::os::raw::c_uint;
3951#[doc = "< no preference for shared memory or L1 (default)"]
3952pub const hipFuncCache_t_hipFuncCachePreferNone: hipFuncCache_t = 0;
3953#[doc = "< prefer larger shared memory and smaller L1 cache"]
3954pub const hipFuncCache_t_hipFuncCachePreferShared: hipFuncCache_t = 1;
3955#[doc = "< prefer larger L1 cache and smaller shared memory"]
3956pub const hipFuncCache_t_hipFuncCachePreferL1: hipFuncCache_t = 2;
3957#[doc = "< prefer equal size L1 cache and shared memory"]
3958pub const hipFuncCache_t_hipFuncCachePreferEqual: hipFuncCache_t = 3;
3959#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
3960pub type hipFuncCache_t = ::std::os::raw::c_uint;
3961#[doc = "< The compiler selects a device-specific value for the banking."]
3962pub const hipSharedMemConfig_hipSharedMemBankSizeDefault: hipSharedMemConfig = 0;
3963#[doc = "< Shared mem is banked at 4-bytes intervals and performs best\n< when adjacent threads access data 4 bytes apart."]
3964pub const hipSharedMemConfig_hipSharedMemBankSizeFourByte: hipSharedMemConfig = 1;
3965#[doc = "< Shared mem is banked at 8-byte intervals and performs best\n< when adjacent threads access data 4 bytes apart."]
3966pub const hipSharedMemConfig_hipSharedMemBankSizeEightByte: hipSharedMemConfig = 2;
3967#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
3968pub type hipSharedMemConfig = ::std::os::raw::c_uint;
3969#[doc = " Struct for data in 3D"]
3970#[repr(C)]
3971#[derive(Debug, Copy, Clone)]
3972pub struct dim3 {
3973    #[doc = "< x"]
3974    pub x: u32,
3975    #[doc = "< y"]
3976    pub y: u32,
3977    #[doc = "< z"]
3978    pub z: u32,
3979}
3980#[doc = " struct hipLaunchParams_t"]
3981#[repr(C)]
3982#[derive(Debug, Copy, Clone)]
3983pub struct hipLaunchParams_t {
3984    #[doc = "< Device function symbol"]
3985    pub func: *mut ::std::os::raw::c_void,
3986    #[doc = "< Grid dimensions"]
3987    pub gridDim: dim3,
3988    #[doc = "< Block dimensions"]
3989    pub blockDim: dim3,
3990    #[doc = "< Arguments"]
3991    pub args: *mut *mut ::std::os::raw::c_void,
3992    #[doc = "< Shared memory"]
3993    pub sharedMem: usize,
3994    #[doc = "< Stream identifier"]
3995    pub stream: hipStream_t,
3996}
3997#[doc = " struct hipLaunchParams_t"]
3998pub type hipLaunchParams = hipLaunchParams_t;
3999#[doc = " struct hipFunctionLaunchParams_t"]
4000#[repr(C)]
4001#[derive(Debug, Copy, Clone)]
4002pub struct hipFunctionLaunchParams_t {
4003    #[doc = "< Kernel to launch"]
4004    pub function: hipFunction_t,
4005    #[doc = "< Width(X) of grid in blocks"]
4006    pub gridDimX: ::std::os::raw::c_uint,
4007    #[doc = "< Height(Y) of grid in blocks"]
4008    pub gridDimY: ::std::os::raw::c_uint,
4009    #[doc = "< Depth(Z) of grid in blocks"]
4010    pub gridDimZ: ::std::os::raw::c_uint,
4011    #[doc = "< X dimension of each thread block"]
4012    pub blockDimX: ::std::os::raw::c_uint,
4013    #[doc = "< Y dimension of each thread block"]
4014    pub blockDimY: ::std::os::raw::c_uint,
4015    #[doc = "< Z dimension of each thread block"]
4016    pub blockDimZ: ::std::os::raw::c_uint,
4017    #[doc = "< Shared memory"]
4018    pub sharedMemBytes: ::std::os::raw::c_uint,
4019    #[doc = "< Stream identifier"]
4020    pub hStream: hipStream_t,
4021    #[doc = "< Kernel parameters"]
4022    pub kernelParams: *mut *mut ::std::os::raw::c_void,
4023}
4024#[doc = " struct hipFunctionLaunchParams_t"]
4025pub type hipFunctionLaunchParams = hipFunctionLaunchParams_t;
4026pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeOpaqueFd:
4027    hipExternalMemoryHandleType_enum = 1;
4028pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeOpaqueWin32:
4029    hipExternalMemoryHandleType_enum = 2;
4030pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeOpaqueWin32Kmt:
4031    hipExternalMemoryHandleType_enum = 3;
4032pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D12Heap:
4033    hipExternalMemoryHandleType_enum = 4;
4034pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D12Resource:
4035    hipExternalMemoryHandleType_enum = 5;
4036pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D11Resource:
4037    hipExternalMemoryHandleType_enum = 6;
4038pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D11ResourceKmt:
4039    hipExternalMemoryHandleType_enum = 7;
4040pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeNvSciBuf:
4041    hipExternalMemoryHandleType_enum = 8;
4042pub type hipExternalMemoryHandleType_enum = ::std::os::raw::c_uint;
4043pub use self::hipExternalMemoryHandleType_enum as hipExternalMemoryHandleType;
4044#[repr(C)]
4045#[derive(Copy, Clone)]
4046pub struct hipExternalMemoryHandleDesc_st {
4047    pub type_: hipExternalMemoryHandleType,
4048    pub handle: hipExternalMemoryHandleDesc_st__bindgen_ty_1,
4049    pub size: ::std::os::raw::c_ulonglong,
4050    pub flags: ::std::os::raw::c_uint,
4051    pub reserved: [::std::os::raw::c_uint; 16usize],
4052}
4053#[repr(C)]
4054#[derive(Copy, Clone)]
4055pub union hipExternalMemoryHandleDesc_st__bindgen_ty_1 {
4056    pub fd: ::std::os::raw::c_int,
4057    pub win32: hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1,
4058    pub nvSciBufObject: *const ::std::os::raw::c_void,
4059}
4060#[repr(C)]
4061#[derive(Debug, Copy, Clone)]
4062pub struct hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1 {
4063    pub handle: *mut ::std::os::raw::c_void,
4064    pub name: *const ::std::os::raw::c_void,
4065}
4066pub type hipExternalMemoryHandleDesc = hipExternalMemoryHandleDesc_st;
4067#[repr(C)]
4068#[derive(Debug, Copy, Clone)]
4069pub struct hipExternalMemoryBufferDesc_st {
4070    pub offset: ::std::os::raw::c_ulonglong,
4071    pub size: ::std::os::raw::c_ulonglong,
4072    pub flags: ::std::os::raw::c_uint,
4073    pub reserved: [::std::os::raw::c_uint; 16usize],
4074}
4075pub type hipExternalMemoryBufferDesc = hipExternalMemoryBufferDesc_st;
4076#[repr(C)]
4077#[derive(Debug, Copy, Clone)]
4078pub struct hipExternalMemoryMipmappedArrayDesc_st {
4079    pub offset: ::std::os::raw::c_ulonglong,
4080    pub formatDesc: hipChannelFormatDesc,
4081    pub extent: hipExtent,
4082    pub flags: ::std::os::raw::c_uint,
4083    pub numLevels: ::std::os::raw::c_uint,
4084}
4085pub type hipExternalMemoryMipmappedArrayDesc = hipExternalMemoryMipmappedArrayDesc_st;
4086pub type hipExternalMemory_t = *mut ::std::os::raw::c_void;
4087pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeOpaqueFd:
4088    hipExternalSemaphoreHandleType_enum = 1;
4089pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeOpaqueWin32:
4090    hipExternalSemaphoreHandleType_enum = 2;
4091pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeOpaqueWin32Kmt:
4092    hipExternalSemaphoreHandleType_enum = 3;
4093pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeD3D12Fence:
4094    hipExternalSemaphoreHandleType_enum = 4;
4095pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeD3D11Fence:
4096    hipExternalSemaphoreHandleType_enum = 5;
4097pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeNvSciSync:
4098    hipExternalSemaphoreHandleType_enum = 6;
4099pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeKeyedMutex:
4100    hipExternalSemaphoreHandleType_enum = 7;
4101pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeKeyedMutexKmt:
4102    hipExternalSemaphoreHandleType_enum = 8;
4103pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeTimelineSemaphoreFd:
4104    hipExternalSemaphoreHandleType_enum = 9;
4105pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeTimelineSemaphoreWin32 : hipExternalSemaphoreHandleType_enum = 10 ;
4106pub type hipExternalSemaphoreHandleType_enum = ::std::os::raw::c_uint;
4107pub use self::hipExternalSemaphoreHandleType_enum as hipExternalSemaphoreHandleType;
4108#[repr(C)]
4109#[derive(Copy, Clone)]
4110pub struct hipExternalSemaphoreHandleDesc_st {
4111    pub type_: hipExternalSemaphoreHandleType,
4112    pub handle: hipExternalSemaphoreHandleDesc_st__bindgen_ty_1,
4113    pub flags: ::std::os::raw::c_uint,
4114    pub reserved: [::std::os::raw::c_uint; 16usize],
4115}
4116#[repr(C)]
4117#[derive(Copy, Clone)]
4118pub union hipExternalSemaphoreHandleDesc_st__bindgen_ty_1 {
4119    pub fd: ::std::os::raw::c_int,
4120    pub win32: hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1,
4121    pub NvSciSyncObj: *const ::std::os::raw::c_void,
4122}
4123#[repr(C)]
4124#[derive(Debug, Copy, Clone)]
4125pub struct hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1 {
4126    pub handle: *mut ::std::os::raw::c_void,
4127    pub name: *const ::std::os::raw::c_void,
4128}
4129pub type hipExternalSemaphoreHandleDesc = hipExternalSemaphoreHandleDesc_st;
4130pub type hipExternalSemaphore_t = *mut ::std::os::raw::c_void;
4131#[repr(C)]
4132#[derive(Copy, Clone)]
4133pub struct hipExternalSemaphoreSignalParams_st {
4134    pub params: hipExternalSemaphoreSignalParams_st__bindgen_ty_1,
4135    pub flags: ::std::os::raw::c_uint,
4136    pub reserved: [::std::os::raw::c_uint; 16usize],
4137}
4138#[repr(C)]
4139#[derive(Copy, Clone)]
4140pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1 {
4141    pub fence: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1,
4142    pub nvSciSync: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2,
4143    pub keyedMutex: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_3,
4144    pub reserved: [::std::os::raw::c_uint; 12usize],
4145}
4146#[repr(C)]
4147#[derive(Debug, Copy, Clone)]
4148pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1 {
4149    pub value: ::std::os::raw::c_ulonglong,
4150}
4151#[repr(C)]
4152#[derive(Copy, Clone)]
4153pub union hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2 {
4154    pub fence: *mut ::std::os::raw::c_void,
4155    pub reserved: ::std::os::raw::c_ulonglong,
4156}
4157#[repr(C)]
4158#[derive(Debug, Copy, Clone)]
4159pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_3 {
4160    pub key: ::std::os::raw::c_ulonglong,
4161}
4162pub type hipExternalSemaphoreSignalParams = hipExternalSemaphoreSignalParams_st;
4163#[doc = " External semaphore wait parameters, compatible with driver type"]
4164#[repr(C)]
4165#[derive(Copy, Clone)]
4166pub struct hipExternalSemaphoreWaitParams_st {
4167    pub params: hipExternalSemaphoreWaitParams_st__bindgen_ty_1,
4168    pub flags: ::std::os::raw::c_uint,
4169    pub reserved: [::std::os::raw::c_uint; 16usize],
4170}
4171#[repr(C)]
4172#[derive(Copy, Clone)]
4173pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1 {
4174    pub fence: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1,
4175    pub nvSciSync: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2,
4176    pub keyedMutex: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_3,
4177    pub reserved: [::std::os::raw::c_uint; 10usize],
4178}
4179#[repr(C)]
4180#[derive(Debug, Copy, Clone)]
4181pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1 {
4182    pub value: ::std::os::raw::c_ulonglong,
4183}
4184#[repr(C)]
4185#[derive(Copy, Clone)]
4186pub union hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2 {
4187    pub fence: *mut ::std::os::raw::c_void,
4188    pub reserved: ::std::os::raw::c_ulonglong,
4189}
4190#[repr(C)]
4191#[derive(Debug, Copy, Clone)]
4192pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_3 {
4193    pub key: ::std::os::raw::c_ulonglong,
4194    pub timeoutMs: ::std::os::raw::c_uint,
4195}
4196#[doc = " External semaphore wait parameters, compatible with driver type"]
4197pub type hipExternalSemaphoreWaitParams = hipExternalSemaphoreWaitParams_st;
4198extern "C" {
4199    #[doc = " Internal use only. This API may change in the future\n Pre-Compiled header for online compilation"]
4200    pub fn __hipGetPCH(pch: *mut *const ::std::os::raw::c_char, size: *mut ::std::os::raw::c_uint);
4201}
4202pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsNone: hipGraphicsRegisterFlags = 0;
4203#[doc = "< HIP will not write to this registered resource"]
4204pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsReadOnly: hipGraphicsRegisterFlags = 1;
4205pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsWriteDiscard: hipGraphicsRegisterFlags =
4206    2;
4207#[doc = "< HIP will bind this resource to a surface"]
4208pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsSurfaceLoadStore:
4209    hipGraphicsRegisterFlags = 4;
4210pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsTextureGather: hipGraphicsRegisterFlags =
4211    8;
4212#[doc = " HIP Access falgs for Interop resources."]
4213pub type hipGraphicsRegisterFlags = ::std::os::raw::c_uint;
4214#[repr(C)]
4215#[derive(Debug, Copy, Clone)]
4216pub struct _hipGraphicsResource {
4217    _unused: [u8; 0],
4218}
4219pub type hipGraphicsResource = _hipGraphicsResource;
4220pub type hipGraphicsResource_t = *mut hipGraphicsResource;
4221#[repr(C)]
4222#[derive(Debug, Copy, Clone)]
4223pub struct ihipGraph {
4224    _unused: [u8; 0],
4225}
4226#[doc = " An opaque value that represents a hip graph"]
4227pub type hipGraph_t = *mut ihipGraph;
4228#[repr(C)]
4229#[derive(Debug, Copy, Clone)]
4230pub struct hipGraphNode {
4231    _unused: [u8; 0],
4232}
4233#[doc = " An opaque value that represents a hip graph node"]
4234pub type hipGraphNode_t = *mut hipGraphNode;
4235#[repr(C)]
4236#[derive(Debug, Copy, Clone)]
4237pub struct hipGraphExec {
4238    _unused: [u8; 0],
4239}
4240#[doc = " An opaque value that represents a hip graph Exec"]
4241pub type hipGraphExec_t = *mut hipGraphExec;
4242#[repr(C)]
4243#[derive(Debug, Copy, Clone)]
4244pub struct hipUserObject {
4245    _unused: [u8; 0],
4246}
4247#[doc = " An opaque value that represents a user obj"]
4248pub type hipUserObject_t = *mut hipUserObject;
4249#[doc = "< GPU kernel node"]
4250pub const hipGraphNodeType_hipGraphNodeTypeKernel: hipGraphNodeType = 0;
4251#[doc = "< Memcpy node"]
4252pub const hipGraphNodeType_hipGraphNodeTypeMemcpy: hipGraphNodeType = 1;
4253#[doc = "< Memset node"]
4254pub const hipGraphNodeType_hipGraphNodeTypeMemset: hipGraphNodeType = 2;
4255#[doc = "< Host (executable) node"]
4256pub const hipGraphNodeType_hipGraphNodeTypeHost: hipGraphNodeType = 3;
4257#[doc = "< Node which executes an embedded graph"]
4258pub const hipGraphNodeType_hipGraphNodeTypeGraph: hipGraphNodeType = 4;
4259#[doc = "< Empty (no-op) node"]
4260pub const hipGraphNodeType_hipGraphNodeTypeEmpty: hipGraphNodeType = 5;
4261#[doc = "< External event wait node"]
4262pub const hipGraphNodeType_hipGraphNodeTypeWaitEvent: hipGraphNodeType = 6;
4263#[doc = "< External event record node"]
4264pub const hipGraphNodeType_hipGraphNodeTypeEventRecord: hipGraphNodeType = 7;
4265#[doc = "< External Semaphore signal node"]
4266pub const hipGraphNodeType_hipGraphNodeTypeExtSemaphoreSignal: hipGraphNodeType = 8;
4267#[doc = "< External Semaphore wait node"]
4268pub const hipGraphNodeType_hipGraphNodeTypeExtSemaphoreWait: hipGraphNodeType = 9;
4269#[doc = "< Memory alloc node"]
4270pub const hipGraphNodeType_hipGraphNodeTypeMemAlloc: hipGraphNodeType = 10;
4271#[doc = "< Memory free node"]
4272pub const hipGraphNodeType_hipGraphNodeTypeMemFree: hipGraphNodeType = 11;
4273#[doc = "< MemcpyFromSymbol node"]
4274pub const hipGraphNodeType_hipGraphNodeTypeMemcpyFromSymbol: hipGraphNodeType = 12;
4275#[doc = "< MemcpyToSymbol node"]
4276pub const hipGraphNodeType_hipGraphNodeTypeMemcpyToSymbol: hipGraphNodeType = 13;
4277#[doc = "< BatchMemOp node"]
4278pub const hipGraphNodeType_hipGraphNodeTypeBatchMemOp: hipGraphNodeType = 14;
4279pub const hipGraphNodeType_hipGraphNodeTypeCount: hipGraphNodeType = 15;
4280#[doc = " hipGraphNodeType"]
4281pub type hipGraphNodeType = ::std::os::raw::c_uint;
4282pub type hipHostFn_t =
4283    ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void)>;
4284#[repr(C)]
4285#[derive(Debug, Copy, Clone)]
4286pub struct hipHostNodeParams {
4287    pub fn_: hipHostFn_t,
4288    pub userData: *mut ::std::os::raw::c_void,
4289}
4290#[repr(C)]
4291#[derive(Debug, Copy, Clone)]
4292pub struct hipKernelNodeParams {
4293    pub blockDim: dim3,
4294    pub extra: *mut *mut ::std::os::raw::c_void,
4295    pub func: *mut ::std::os::raw::c_void,
4296    pub gridDim: dim3,
4297    pub kernelParams: *mut *mut ::std::os::raw::c_void,
4298    pub sharedMemBytes: ::std::os::raw::c_uint,
4299}
4300#[repr(C)]
4301#[derive(Debug, Copy, Clone)]
4302pub struct hipMemsetParams {
4303    pub dst: *mut ::std::os::raw::c_void,
4304    pub elementSize: ::std::os::raw::c_uint,
4305    pub height: usize,
4306    pub pitch: usize,
4307    pub value: ::std::os::raw::c_uint,
4308    pub width: usize,
4309}
4310#[repr(C)]
4311#[derive(Debug, Copy, Clone)]
4312pub struct hipMemAllocNodeParams {
4313    #[doc = "< Pool properties, which contain where\n< the location should reside"]
4314    pub poolProps: hipMemPoolProps,
4315    #[doc = "< The number of memory access descriptors."]
4316    pub accessDescs: *const hipMemAccessDesc,
4317    #[doc = "< The number of access descriptors.\n< Must not be bigger than the number of GPUs"]
4318    pub accessDescCount: usize,
4319    #[doc = "< The size of the requested allocation in bytes"]
4320    pub bytesize: usize,
4321    #[doc = "< Returned device address of the allocation"]
4322    pub dptr: *mut ::std::os::raw::c_void,
4323}
4324pub const hipAccessProperty_hipAccessPropertyNormal: hipAccessProperty = 0;
4325pub const hipAccessProperty_hipAccessPropertyStreaming: hipAccessProperty = 1;
4326pub const hipAccessProperty_hipAccessPropertyPersisting: hipAccessProperty = 2;
4327pub type hipAccessProperty = ::std::os::raw::c_uint;
4328#[repr(C)]
4329#[derive(Debug, Copy, Clone)]
4330pub struct hipAccessPolicyWindow {
4331    pub base_ptr: *mut ::std::os::raw::c_void,
4332    pub hitProp: hipAccessProperty,
4333    pub hitRatio: f32,
4334    pub missProp: hipAccessProperty,
4335    pub num_bytes: usize,
4336}
4337#[doc = "< Valid for Streams, graph nodes, launches"]
4338pub const hipLaunchAttributeID_hipLaunchAttributeAccessPolicyWindow: hipLaunchAttributeID = 1;
4339#[doc = "< Valid for graph nodes, launches"]
4340pub const hipLaunchAttributeID_hipLaunchAttributeCooperative: hipLaunchAttributeID = 2;
4341#[doc = "< Valid for graph node, streams, launches"]
4342pub const hipLaunchAttributeID_hipLaunchAttributePriority: hipLaunchAttributeID = 8;
4343pub const hipLaunchAttributeID_hipLaunchAttributeMax: hipLaunchAttributeID = 9;
4344#[doc = "  Launch Attribute ID"]
4345pub type hipLaunchAttributeID = ::std::os::raw::c_uint;
4346#[doc = "  Launch Attribute Value"]
4347#[repr(C)]
4348#[derive(Copy, Clone)]
4349pub union hipLaunchAttributeValue {
4350    #[doc = "< 64 byte padding"]
4351    pub pad: [::std::os::raw::c_char; 64usize],
4352    #[doc = "< Value of launch attribute ::hipLaunchAttributePolicyWindow."]
4353    pub accessPolicyWindow: hipAccessPolicyWindow,
4354    #[doc = "< Value of launch attribute ::hipLaunchAttributeCooperative. Indicates whether the kernel is cooperative."]
4355    pub cooperative: ::std::os::raw::c_int,
4356    #[doc = "< Value of launch attribute :: hipLaunchAttributePriority. Execution priority of kernel"]
4357    pub priority: ::std::os::raw::c_int,
4358}
4359#[doc = "< The update succeeded"]
4360pub const hipGraphExecUpdateResult_hipGraphExecUpdateSuccess: hipGraphExecUpdateResult = 0;
4361#[doc = "< The update failed for an unexpected reason which is described\n< in the return value of the function"]
4362pub const hipGraphExecUpdateResult_hipGraphExecUpdateError: hipGraphExecUpdateResult = 1;
4363#[doc = "< The update failed because the topology changed"]
4364pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorTopologyChanged:
4365    hipGraphExecUpdateResult = 2;
4366#[doc = "< The update failed because a node type changed"]
4367pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorNodeTypeChanged:
4368    hipGraphExecUpdateResult = 3;
4369pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorFunctionChanged:
4370    hipGraphExecUpdateResult = 4;
4371pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorParametersChanged:
4372    hipGraphExecUpdateResult = 5;
4373pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorNotSupported: hipGraphExecUpdateResult =
4374    6;
4375pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorUnsupportedFunctionChange:
4376    hipGraphExecUpdateResult = 7;
4377#[doc = " Graph execution update result"]
4378pub type hipGraphExecUpdateResult = ::std::os::raw::c_uint;
4379pub const hipStreamCaptureMode_hipStreamCaptureModeGlobal: hipStreamCaptureMode = 0;
4380pub const hipStreamCaptureMode_hipStreamCaptureModeThreadLocal: hipStreamCaptureMode = 1;
4381pub const hipStreamCaptureMode_hipStreamCaptureModeRelaxed: hipStreamCaptureMode = 2;
4382pub type hipStreamCaptureMode = ::std::os::raw::c_uint;
4383#[doc = "< Stream is not capturing"]
4384pub const hipStreamCaptureStatus_hipStreamCaptureStatusNone: hipStreamCaptureStatus = 0;
4385#[doc = "< Stream is actively capturing"]
4386pub const hipStreamCaptureStatus_hipStreamCaptureStatusActive: hipStreamCaptureStatus = 1;
4387#[doc = "< Stream is part of a capture sequence that has been\n< invalidated, but not terminated"]
4388pub const hipStreamCaptureStatus_hipStreamCaptureStatusInvalidated: hipStreamCaptureStatus = 2;
4389pub type hipStreamCaptureStatus = ::std::os::raw::c_uint;
4390#[doc = "< Add new nodes to the dependency set"]
4391pub const hipStreamUpdateCaptureDependenciesFlags_hipStreamAddCaptureDependencies:
4392    hipStreamUpdateCaptureDependenciesFlags = 0;
4393#[doc = "< Replace the dependency set with the new nodes"]
4394pub const hipStreamUpdateCaptureDependenciesFlags_hipStreamSetCaptureDependencies:
4395    hipStreamUpdateCaptureDependenciesFlags = 1;
4396pub type hipStreamUpdateCaptureDependenciesFlags = ::std::os::raw::c_uint;
4397#[doc = "< Amount of memory, in bytes, currently associated with graphs"]
4398pub const hipGraphMemAttributeType_hipGraphMemAttrUsedMemCurrent: hipGraphMemAttributeType = 0;
4399#[doc = "< High watermark of memory, in bytes, associated with graphs since the last time."]
4400pub const hipGraphMemAttributeType_hipGraphMemAttrUsedMemHigh: hipGraphMemAttributeType = 1;
4401#[doc = "< Amount of memory, in bytes, currently allocated for graphs."]
4402pub const hipGraphMemAttributeType_hipGraphMemAttrReservedMemCurrent: hipGraphMemAttributeType = 2;
4403#[doc = "< High watermark of memory, in bytes, currently allocated for graphs"]
4404pub const hipGraphMemAttributeType_hipGraphMemAttrReservedMemHigh: hipGraphMemAttributeType = 3;
4405pub type hipGraphMemAttributeType = ::std::os::raw::c_uint;
4406#[doc = "< Destructor execution is not synchronized."]
4407pub const hipUserObjectFlags_hipUserObjectNoDestructorSync: hipUserObjectFlags = 1;
4408pub type hipUserObjectFlags = ::std::os::raw::c_uint;
4409#[doc = "< Add new reference or retain."]
4410pub const hipUserObjectRetainFlags_hipGraphUserObjectMove: hipUserObjectRetainFlags = 1;
4411pub type hipUserObjectRetainFlags = ::std::os::raw::c_uint;
4412pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagAutoFreeOnLaunch:
4413    hipGraphInstantiateFlags = 1;
4414pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagUpload: hipGraphInstantiateFlags = 2;
4415pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagDeviceLaunch: hipGraphInstantiateFlags =
4416    4;
4417pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagUseNodePriority:
4418    hipGraphInstantiateFlags = 8;
4419pub type hipGraphInstantiateFlags = ::std::os::raw::c_uint;
4420pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsVerbose: hipGraphDebugDotFlags = 1;
4421#[doc = "< Adds hipKernelNodeParams to output"]
4422pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsKernelNodeParams: hipGraphDebugDotFlags = 4;
4423#[doc = "< Adds hipMemcpy3DParms to output"]
4424pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsMemcpyNodeParams: hipGraphDebugDotFlags = 8;
4425#[doc = "< Adds hipMemsetParams to output"]
4426pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsMemsetNodeParams: hipGraphDebugDotFlags = 16;
4427#[doc = "< Adds hipHostNodeParams to output"]
4428pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsHostNodeParams: hipGraphDebugDotFlags = 32;
4429pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsEventNodeParams: hipGraphDebugDotFlags = 64;
4430pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsExtSemasSignalNodeParams:
4431    hipGraphDebugDotFlags = 128;
4432pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsExtSemasWaitNodeParams: hipGraphDebugDotFlags =
4433    256;
4434pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsKernelNodeAttributes: hipGraphDebugDotFlags =
4435    512;
4436pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsHandles: hipGraphDebugDotFlags = 1024;
4437pub type hipGraphDebugDotFlags = ::std::os::raw::c_uint;
4438#[doc = "< Instantiation Success"]
4439pub const hipGraphInstantiateResult_hipGraphInstantiateSuccess: hipGraphInstantiateResult = 0;
4440#[doc = "< Instantiation failed for an\nunexpected reason which is described in the return value of the function"]
4441pub const hipGraphInstantiateResult_hipGraphInstantiateError: hipGraphInstantiateResult = 1;
4442#[doc = "< Instantiation failed due\nto invalid structure, such as cycles"]
4443pub const hipGraphInstantiateResult_hipGraphInstantiateInvalidStructure: hipGraphInstantiateResult =
4444    2;
4445#[doc = "< Instantiation for device launch failed\nbecause the graph contained an unsupported operation"]
4446pub const hipGraphInstantiateResult_hipGraphInstantiateNodeOperationNotSupported:
4447    hipGraphInstantiateResult = 3;
4448#[doc = "< Instantiation for device launch failed\ndue to the nodes belonging to different contexts"]
4449pub const hipGraphInstantiateResult_hipGraphInstantiateMultipleDevicesNotSupported:
4450    hipGraphInstantiateResult = 4;
4451#[doc = " hipGraphInstantiateWithParams results"]
4452pub type hipGraphInstantiateResult = ::std::os::raw::c_uint;
4453#[doc = " Graph Instantiation parameters"]
4454#[repr(C)]
4455#[derive(Debug, Copy, Clone)]
4456pub struct hipGraphInstantiateParams {
4457    #[doc = "< The node which caused instantiation to fail, if any"]
4458    pub errNode_out: hipGraphNode_t,
4459    #[doc = "< Instantiation flags"]
4460    pub flags: ::std::os::raw::c_ulonglong,
4461    #[doc = "< Whether instantiation was successful.\nIf it failed, the reason why"]
4462    pub result_out: hipGraphInstantiateResult,
4463    #[doc = "< Upload stream"]
4464    pub uploadStream: hipStream_t,
4465}
4466#[doc = " Memory allocation properties"]
4467#[repr(C)]
4468#[derive(Copy, Clone)]
4469pub struct hipMemAllocationProp {
4470    #[doc = "< Memory allocation type"]
4471    pub type_: hipMemAllocationType,
4472    pub __bindgen_anon_1: hipMemAllocationProp__bindgen_ty_1,
4473    #[doc = "< Memory location"]
4474    pub location: hipMemLocation,
4475    #[doc = "< Metadata for Win32 handles"]
4476    pub win32HandleMetaData: *mut ::std::os::raw::c_void,
4477    pub allocFlags: hipMemAllocationProp__bindgen_ty_2,
4478}
4479#[repr(C)]
4480#[derive(Copy, Clone)]
4481pub union hipMemAllocationProp__bindgen_ty_1 {
4482    #[doc = "< Requested handle type"]
4483    pub requestedHandleType: hipMemAllocationHandleType,
4484    #[doc = "< Requested handle types"]
4485    pub requestedHandleTypes: hipMemAllocationHandleType,
4486}
4487#[repr(C)]
4488#[derive(Debug, Copy, Clone)]
4489pub struct hipMemAllocationProp__bindgen_ty_2 {
4490    #[doc = "< Compression type"]
4491    pub compressionType: ::std::os::raw::c_uchar,
4492    #[doc = "< RDMA capable"]
4493    pub gpuDirectRDMACapable: ::std::os::raw::c_uchar,
4494    #[doc = "< Usage"]
4495    pub usage: ::std::os::raw::c_ushort,
4496}
4497#[doc = " External semaphore signal node parameters"]
4498#[repr(C)]
4499#[derive(Debug, Copy, Clone)]
4500pub struct hipExternalSemaphoreSignalNodeParams {
4501    pub extSemArray: *mut hipExternalSemaphore_t,
4502    pub paramsArray: *const hipExternalSemaphoreSignalParams,
4503    pub numExtSems: ::std::os::raw::c_uint,
4504}
4505#[doc = " External semaphore wait node parameters"]
4506#[repr(C)]
4507#[derive(Debug, Copy, Clone)]
4508pub struct hipExternalSemaphoreWaitNodeParams {
4509    pub extSemArray: *mut hipExternalSemaphore_t,
4510    pub paramsArray: *const hipExternalSemaphoreWaitParams,
4511    pub numExtSems: ::std::os::raw::c_uint,
4512}
4513#[repr(C)]
4514#[derive(Debug, Copy, Clone)]
4515pub struct ihipMemGenericAllocationHandle {
4516    _unused: [u8; 0],
4517}
4518#[doc = " Generic handle for memory allocation"]
4519pub type hipMemGenericAllocationHandle_t = *mut ihipMemGenericAllocationHandle;
4520#[doc = "< Minimum granularity"]
4521pub const hipMemAllocationGranularity_flags_hipMemAllocationGranularityMinimum:
4522    hipMemAllocationGranularity_flags = 0;
4523#[doc = "< Recommended granularity for performance"]
4524pub const hipMemAllocationGranularity_flags_hipMemAllocationGranularityRecommended:
4525    hipMemAllocationGranularity_flags = 1;
4526#[doc = " Flags for granularity"]
4527pub type hipMemAllocationGranularity_flags = ::std::os::raw::c_uint;
4528#[doc = "< Generic handle type"]
4529pub const hipMemHandleType_hipMemHandleTypeGeneric: hipMemHandleType = 0;
4530#[doc = " Memory handle type"]
4531pub type hipMemHandleType = ::std::os::raw::c_uint;
4532#[doc = "< Map operation"]
4533pub const hipMemOperationType_hipMemOperationTypeMap: hipMemOperationType = 1;
4534#[doc = "< Unmap operation"]
4535pub const hipMemOperationType_hipMemOperationTypeUnmap: hipMemOperationType = 2;
4536#[doc = " Memory operation types"]
4537pub type hipMemOperationType = ::std::os::raw::c_uint;
4538#[doc = "< Sparse level"]
4539pub const hipArraySparseSubresourceType_hipArraySparseSubresourceTypeSparseLevel:
4540    hipArraySparseSubresourceType = 0;
4541#[doc = "< Miptail"]
4542pub const hipArraySparseSubresourceType_hipArraySparseSubresourceTypeMiptail:
4543    hipArraySparseSubresourceType = 1;
4544#[doc = " Subresource types for sparse arrays"]
4545pub type hipArraySparseSubresourceType = ::std::os::raw::c_uint;
4546#[doc = " Map info for arrays"]
4547#[repr(C)]
4548#[derive(Copy, Clone)]
4549pub struct hipArrayMapInfo {
4550    #[doc = "< Resource type"]
4551    pub resourceType: hipResourceType,
4552    pub resource: hipArrayMapInfo__bindgen_ty_1,
4553    #[doc = "< Sparse subresource type"]
4554    pub subresourceType: hipArraySparseSubresourceType,
4555    pub subresource: hipArrayMapInfo__bindgen_ty_2,
4556    #[doc = "< Memory operation type"]
4557    pub memOperationType: hipMemOperationType,
4558    #[doc = "< Memory handle type"]
4559    pub memHandleType: hipMemHandleType,
4560    pub memHandle: hipArrayMapInfo__bindgen_ty_3,
4561    #[doc = "< Offset within the memory"]
4562    pub offset: ::std::os::raw::c_ulonglong,
4563    #[doc = "< Device ordinal bit mask"]
4564    pub deviceBitMask: ::std::os::raw::c_uint,
4565    #[doc = "< flags for future use, must be zero now."]
4566    pub flags: ::std::os::raw::c_uint,
4567    #[doc = "< Reserved for future use, must be zero now."]
4568    pub reserved: [::std::os::raw::c_uint; 2usize],
4569}
4570#[repr(C)]
4571#[derive(Copy, Clone)]
4572pub union hipArrayMapInfo__bindgen_ty_1 {
4573    pub mipmap: hipMipmappedArray,
4574    pub array: hipArray_t,
4575}
4576#[repr(C)]
4577#[derive(Copy, Clone)]
4578pub union hipArrayMapInfo__bindgen_ty_2 {
4579    pub sparseLevel: hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1,
4580    pub miptail: hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2,
4581}
4582#[repr(C)]
4583#[derive(Debug, Copy, Clone)]
4584pub struct hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1 {
4585    #[doc = "< For mipmapped arrays must be a valid mipmap level. For arrays must be zero"]
4586    pub level: ::std::os::raw::c_uint,
4587    #[doc = "< For layered arrays must be a valid layer index. Otherwise, must be zero"]
4588    pub layer: ::std::os::raw::c_uint,
4589    #[doc = "< X offset in elements"]
4590    pub offsetX: ::std::os::raw::c_uint,
4591    #[doc = "< Y offset in elements"]
4592    pub offsetY: ::std::os::raw::c_uint,
4593    #[doc = "< Z offset in elements"]
4594    pub offsetZ: ::std::os::raw::c_uint,
4595    #[doc = "< Width in elements"]
4596    pub extentWidth: ::std::os::raw::c_uint,
4597    #[doc = "< Height in elements"]
4598    pub extentHeight: ::std::os::raw::c_uint,
4599    #[doc = "< Depth in elements"]
4600    pub extentDepth: ::std::os::raw::c_uint,
4601}
4602#[repr(C)]
4603#[derive(Debug, Copy, Clone)]
4604pub struct hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2 {
4605    #[doc = "< For layered arrays must be a valid layer index. Otherwise, must be zero"]
4606    pub layer: ::std::os::raw::c_uint,
4607    #[doc = "< Offset within mip tail"]
4608    pub offset: ::std::os::raw::c_ulonglong,
4609    #[doc = "< Extent in bytes"]
4610    pub size: ::std::os::raw::c_ulonglong,
4611}
4612#[repr(C)]
4613#[derive(Copy, Clone)]
4614pub union hipArrayMapInfo__bindgen_ty_3 {
4615    pub memHandle: hipMemGenericAllocationHandle_t,
4616}
4617#[doc = " Memcpy node params"]
4618#[repr(C)]
4619#[derive(Debug, Copy, Clone)]
4620pub struct hipMemcpyNodeParams {
4621    #[doc = "< Must be zero."]
4622    pub flags: ::std::os::raw::c_int,
4623    #[doc = "< Must be zero."]
4624    pub reserved: [::std::os::raw::c_int; 3usize],
4625    #[doc = "< Params set for the memory copy."]
4626    pub copyParams: hipMemcpy3DParms,
4627}
4628#[doc = " Child graph node params"]
4629#[repr(C)]
4630#[derive(Debug, Copy, Clone)]
4631pub struct hipChildGraphNodeParams {
4632    #[doc = "< Either the child graph to clone into the node, or\n< a handle to the graph possesed by the node used during query"]
4633    pub graph: hipGraph_t,
4634}
4635#[doc = " Event record node params"]
4636#[repr(C)]
4637#[derive(Debug, Copy, Clone)]
4638pub struct hipEventWaitNodeParams {
4639    #[doc = "< Event to wait on"]
4640    pub event: hipEvent_t,
4641}
4642#[doc = " Event record node params"]
4643#[repr(C)]
4644#[derive(Debug, Copy, Clone)]
4645pub struct hipEventRecordNodeParams {
4646    #[doc = "< The event to be recorded when node executes"]
4647    pub event: hipEvent_t,
4648}
4649#[doc = " Memory free node params"]
4650#[repr(C)]
4651#[derive(Debug, Copy, Clone)]
4652pub struct hipMemFreeNodeParams {
4653    #[doc = "< the pointer to be freed"]
4654    pub dptr: *mut ::std::os::raw::c_void,
4655}
4656#[doc = " Params for different graph nodes"]
4657#[repr(C)]
4658#[derive(Copy, Clone)]
4659pub struct hipGraphNodeParams {
4660    pub type_: hipGraphNodeType,
4661    pub reserved0: [::std::os::raw::c_int; 3usize],
4662    pub __bindgen_anon_1: hipGraphNodeParams__bindgen_ty_1,
4663    pub reserved2: ::std::os::raw::c_longlong,
4664}
4665#[repr(C)]
4666#[derive(Copy, Clone)]
4667pub union hipGraphNodeParams__bindgen_ty_1 {
4668    pub reserved1: [::std::os::raw::c_longlong; 29usize],
4669    pub kernel: hipKernelNodeParams,
4670    pub memcpy: hipMemcpyNodeParams,
4671    pub memset: hipMemsetParams,
4672    pub host: hipHostNodeParams,
4673    pub graph: hipChildGraphNodeParams,
4674    pub eventWait: hipEventWaitNodeParams,
4675    pub eventRecord: hipEventRecordNodeParams,
4676    pub extSemSignal: hipExternalSemaphoreSignalNodeParams,
4677    pub extSemWait: hipExternalSemaphoreWaitNodeParams,
4678    pub alloc: hipMemAllocNodeParams,
4679    pub free: hipMemFreeNodeParams,
4680}
4681pub const hipGraphDependencyType_hipGraphDependencyTypeDefault: hipGraphDependencyType = 0;
4682pub const hipGraphDependencyType_hipGraphDependencyTypeProgrammatic: hipGraphDependencyType = 1;
4683pub type hipGraphDependencyType = ::std::os::raw::c_uint;
4684#[repr(C)]
4685#[derive(Debug, Copy, Clone)]
4686pub struct hipGraphEdgeData {
4687    #[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."]
4688    pub from_port: ::std::os::raw::c_uchar,
4689    #[doc = "< These bytes are unused and must be zeroed"]
4690    pub reserved: [::std::os::raw::c_uchar; 5usize],
4691    #[doc = "< Currently no node types define non-zero ports. This field must be set to zero."]
4692    pub to_port: ::std::os::raw::c_uchar,
4693    #[doc = "< This should be populated with a value from hipGraphDependencyType"]
4694    pub type_: ::std::os::raw::c_uchar,
4695}
4696#[doc = " Used to specify custom attributes for launching kernels"]
4697#[repr(C)]
4698#[derive(Copy, Clone)]
4699pub struct hipLaunchAttribute_st {
4700    #[doc = "< Identifier of the launch attribute"]
4701    pub id: hipLaunchAttributeID,
4702    #[doc = "< Padding to align the structure to 8 bytes"]
4703    pub pad: [::std::os::raw::c_char; 4usize],
4704    pub __bindgen_anon_1: hipLaunchAttribute_st__bindgen_ty_1,
4705}
4706#[repr(C)]
4707#[derive(Copy, Clone)]
4708pub union hipLaunchAttribute_st__bindgen_ty_1 {
4709    #[doc = "< Value associated with the launch attribute"]
4710    pub val: hipLaunchAttributeValue,
4711    #[doc = "< Value associated with the launch attribute"]
4712    pub value: hipLaunchAttributeValue,
4713}
4714#[doc = " Used to specify custom attributes for launching kernels"]
4715pub type hipLaunchAttribute = hipLaunchAttribute_st;
4716#[doc = " HIP extensible launch configuration"]
4717#[repr(C)]
4718#[derive(Debug, Copy, Clone)]
4719pub struct hipLaunchConfig_st {
4720    #[doc = "< Grid dimensions"]
4721    pub gridDim: dim3,
4722    #[doc = "< Block dimensions"]
4723    pub blockDim: dim3,
4724    #[doc = "< Dynamic shared-memory size per thread block"]
4725    pub dynamicSmemBytes: usize,
4726    #[doc = "< Stream identifier"]
4727    pub stream: hipStream_t,
4728    #[doc = "< Attributes list"]
4729    pub attrs: *mut hipLaunchAttribute,
4730    #[doc = "< Number of attributes"]
4731    pub numAttrs: ::std::os::raw::c_uint,
4732}
4733#[doc = " HIP extensible launch configuration"]
4734pub type hipLaunchConfig_t = hipLaunchConfig_st;
4735#[doc = " HIP driver extensible launch configuration"]
4736#[repr(C)]
4737#[derive(Debug, Copy, Clone)]
4738pub struct HIP_LAUNCH_CONFIG_st {
4739    #[doc = "< Grid width in blocks"]
4740    pub gridDimX: ::std::os::raw::c_uint,
4741    #[doc = "< Grid height in blocks"]
4742    pub gridDimY: ::std::os::raw::c_uint,
4743    #[doc = "< Grid depth in blocks"]
4744    pub gridDimZ: ::std::os::raw::c_uint,
4745    #[doc = "< Thread block dimension in X"]
4746    pub blockDimX: ::std::os::raw::c_uint,
4747    #[doc = "< Thread block dimension in Y"]
4748    pub blockDimY: ::std::os::raw::c_uint,
4749    #[doc = "< Thread block dimension in Z"]
4750    pub blockDimZ: ::std::os::raw::c_uint,
4751    #[doc = "< Dynamic shared-memory size in bytes per block"]
4752    pub sharedMemBytes: ::std::os::raw::c_uint,
4753    #[doc = "< HIP stream identifier"]
4754    pub hStream: hipStream_t,
4755    #[doc = "< Attribute list"]
4756    pub attrs: *mut hipLaunchAttribute,
4757    #[doc = "< Number of attributes"]
4758    pub numAttrs: ::std::os::raw::c_uint,
4759}
4760#[doc = " HIP driver extensible launch configuration"]
4761pub type HIP_LAUNCH_CONFIG = HIP_LAUNCH_CONFIG_st;
4762pub const hipMemRangeHandleType_hipMemRangeHandleTypeDmaBufFd: hipMemRangeHandleType = 1;
4763pub const hipMemRangeHandleType_hipMemRangeHandleTypeMax: hipMemRangeHandleType = 2147483647;
4764#[doc = " Requested handle type for address range."]
4765pub type hipMemRangeHandleType = ::std::os::raw::c_uint;
4766pub const hipMemRangeFlags_hipMemRangeFlagDmaBufMappingTypePcie: hipMemRangeFlags = 1;
4767pub const hipMemRangeFlags_hipMemRangeFlagsMax: hipMemRangeFlags = 2147483647;
4768#[doc = " Mem Range Flags used in hipMemGetHandleForAddressRange."]
4769pub type hipMemRangeFlags = ::std::os::raw::c_uint;
4770extern "C" {
4771    #[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"]
4772    pub fn hipInit(flags: ::std::os::raw::c_uint) -> hipError_t;
4773}
4774extern "C" {
4775    #[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"]
4776    pub fn hipDriverGetVersion(driverVersion: *mut ::std::os::raw::c_int) -> hipError_t;
4777}
4778extern "C" {
4779    #[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"]
4780    pub fn hipRuntimeGetVersion(runtimeVersion: *mut ::std::os::raw::c_int) -> hipError_t;
4781}
4782extern "C" {
4783    #[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"]
4784    pub fn hipDeviceGet(device: *mut hipDevice_t, ordinal: ::std::os::raw::c_int) -> hipError_t;
4785}
4786extern "C" {
4787    #[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"]
4788    pub fn hipDeviceComputeCapability(
4789        major: *mut ::std::os::raw::c_int,
4790        minor: *mut ::std::os::raw::c_int,
4791        device: hipDevice_t,
4792    ) -> hipError_t;
4793}
4794extern "C" {
4795    #[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"]
4796    pub fn hipDeviceGetName(
4797        name: *mut ::std::os::raw::c_char,
4798        len: ::std::os::raw::c_int,
4799        device: hipDevice_t,
4800    ) -> hipError_t;
4801}
4802extern "C" {
4803    #[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"]
4804    pub fn hipDeviceGetUuid(uuid: *mut hipUUID, device: hipDevice_t) -> hipError_t;
4805}
4806extern "C" {
4807    #[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"]
4808    pub fn hipDeviceGetP2PAttribute(
4809        value: *mut ::std::os::raw::c_int,
4810        attr: hipDeviceP2PAttr,
4811        srcDevice: ::std::os::raw::c_int,
4812        dstDevice: ::std::os::raw::c_int,
4813    ) -> hipError_t;
4814}
4815extern "C" {
4816    #[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"]
4817    pub fn hipDeviceGetPCIBusId(
4818        pciBusId: *mut ::std::os::raw::c_char,
4819        len: ::std::os::raw::c_int,
4820        device: ::std::os::raw::c_int,
4821    ) -> hipError_t;
4822}
4823extern "C" {
4824    #[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"]
4825    pub fn hipDeviceGetByPCIBusId(
4826        device: *mut ::std::os::raw::c_int,
4827        pciBusId: *const ::std::os::raw::c_char,
4828    ) -> hipError_t;
4829}
4830extern "C" {
4831    #[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"]
4832    pub fn hipDeviceTotalMem(bytes: *mut usize, device: hipDevice_t) -> hipError_t;
4833}
4834extern "C" {
4835    #[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"]
4836    pub fn hipDeviceSynchronize() -> hipError_t;
4837}
4838extern "C" {
4839    #[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"]
4840    pub fn hipDeviceReset() -> hipError_t;
4841}
4842extern "C" {
4843    #[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"]
4844    pub fn hipSetDevice(deviceId: ::std::os::raw::c_int) -> hipError_t;
4845}
4846extern "C" {
4847    #[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. #hipSetDeviceFlags. #hipChooseDevice\n"]
4848    pub fn hipSetValidDevices(
4849        device_arr: *mut ::std::os::raw::c_int,
4850        len: ::std::os::raw::c_int,
4851    ) -> hipError_t;
4852}
4853extern "C" {
4854    #[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"]
4855    pub fn hipGetDevice(deviceId: *mut ::std::os::raw::c_int) -> hipError_t;
4856}
4857extern "C" {
4858    #[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."]
4859    pub fn hipGetDeviceCount(count: *mut ::std::os::raw::c_int) -> hipError_t;
4860}
4861extern "C" {
4862    #[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"]
4863    pub fn hipDeviceGetAttribute(
4864        pi: *mut ::std::os::raw::c_int,
4865        attr: hipDeviceAttribute_t,
4866        deviceId: ::std::os::raw::c_int,
4867    ) -> hipError_t;
4868}
4869extern "C" {
4870    #[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."]
4871    pub fn hipDeviceGetDefaultMemPool(
4872        mem_pool: *mut hipMemPool_t,
4873        device: ::std::os::raw::c_int,
4874    ) -> hipError_t;
4875}
4876extern "C" {
4877    #[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."]
4878    pub fn hipDeviceSetMemPool(device: ::std::os::raw::c_int, mem_pool: hipMemPool_t)
4879        -> hipError_t;
4880}
4881extern "C" {
4882    #[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."]
4883    pub fn hipDeviceGetMemPool(
4884        mem_pool: *mut hipMemPool_t,
4885        device: ::std::os::raw::c_int,
4886    ) -> hipError_t;
4887}
4888extern "C" {
4889    #[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."]
4890    pub fn hipGetDevicePropertiesR0600(
4891        prop: *mut hipDeviceProp_tR0600,
4892        deviceId: ::std::os::raw::c_int,
4893    ) -> hipError_t;
4894}
4895extern "C" {
4896    #[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 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"]
4897    pub fn hipDeviceGetTexture1DLinearMaxWidth(
4898        max_width: *mut usize,
4899        desc: *const hipChannelFormatDesc,
4900        device: ::std::os::raw::c_int,
4901    ) -> hipError_t;
4902}
4903extern "C" {
4904    #[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"]
4905    pub fn hipDeviceSetCacheConfig(cacheConfig: hipFuncCache_t) -> hipError_t;
4906}
4907extern "C" {
4908    #[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"]
4909    pub fn hipDeviceGetCacheConfig(cacheConfig: *mut hipFuncCache_t) -> hipError_t;
4910}
4911extern "C" {
4912    #[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"]
4913    pub fn hipDeviceGetLimit(pValue: *mut usize, limit: hipLimit_t) -> hipError_t;
4914}
4915extern "C" {
4916    #[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"]
4917    pub fn hipDeviceSetLimit(limit: hipLimit_t, value: usize) -> hipError_t;
4918}
4919extern "C" {
4920    #[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"]
4921    pub fn hipDeviceGetSharedMemConfig(pConfig: *mut hipSharedMemConfig) -> hipError_t;
4922}
4923extern "C" {
4924    #[doc = " @brief Gets the flags set for current device\n\n @param [out] flags Pointer of the flags\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue"]
4925    pub fn hipGetDeviceFlags(flags: *mut ::std::os::raw::c_uint) -> hipError_t;
4926}
4927extern "C" {
4928    #[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"]
4929    pub fn hipDeviceSetSharedMemConfig(config: hipSharedMemConfig) -> hipError_t;
4930}
4931extern "C" {
4932    #[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"]
4933    pub fn hipSetDeviceFlags(flags: ::std::os::raw::c_uint) -> hipError_t;
4934}
4935extern "C" {
4936    #[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"]
4937    pub fn hipChooseDeviceR0600(
4938        device: *mut ::std::os::raw::c_int,
4939        prop: *const hipDeviceProp_tR0600,
4940    ) -> hipError_t;
4941}
4942extern "C" {
4943    #[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 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"]
4944    pub fn hipExtGetLinkTypeAndHopCount(
4945        device1: ::std::os::raw::c_int,
4946        device2: ::std::os::raw::c_int,
4947        linktype: *mut u32,
4948        hopcount: *mut u32,
4949    ) -> hipError_t;
4950}
4951extern "C" {
4952    #[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"]
4953    pub fn hipIpcGetMemHandle(
4954        handle: *mut hipIpcMemHandle_t,
4955        devPtr: *mut ::std::os::raw::c_void,
4956    ) -> hipError_t;
4957}
4958extern "C" {
4959    #[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"]
4960    pub fn hipIpcOpenMemHandle(
4961        devPtr: *mut *mut ::std::os::raw::c_void,
4962        handle: hipIpcMemHandle_t,
4963        flags: ::std::os::raw::c_uint,
4964    ) -> hipError_t;
4965}
4966extern "C" {
4967    #[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"]
4968    pub fn hipIpcCloseMemHandle(devPtr: *mut ::std::os::raw::c_void) -> hipError_t;
4969}
4970extern "C" {
4971    #[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 hipEventDestroy\n 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"]
4972    pub fn hipIpcGetEventHandle(handle: *mut hipIpcEventHandle_t, event: hipEvent_t) -> hipError_t;
4973}
4974extern "C" {
4975    #[doc = " @brief Opens an interprocess event handles.\n\n Opens an interprocess event handle exported from another process with hipIpcGetEventHandle. The returned\n hipEvent_t behaves like a locally created event with the hipEventDisableTiming flag specified. This event\n need be freed with hipEventDestroy. Operations on the imported event after the exported event has been freed\n with hipEventDestroy will result in undefined behavior. If the function is called within the same process where\n handle is returned by hipIpcGetEventHandle, it 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"]
4976    pub fn hipIpcOpenEventHandle(event: *mut hipEvent_t, handle: hipIpcEventHandle_t)
4977        -> hipError_t;
4978}
4979extern "C" {
4980    #[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"]
4981    pub fn hipFuncSetAttribute(
4982        func: *const ::std::os::raw::c_void,
4983        attr: hipFuncAttribute,
4984        value: ::std::os::raw::c_int,
4985    ) -> hipError_t;
4986}
4987extern "C" {
4988    #[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"]
4989    pub fn hipFuncSetCacheConfig(
4990        func: *const ::std::os::raw::c_void,
4991        config: hipFuncCache_t,
4992    ) -> hipError_t;
4993}
4994extern "C" {
4995    #[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"]
4996    pub fn hipFuncSetSharedMemConfig(
4997        func: *const ::std::os::raw::c_void,
4998        config: hipSharedMemConfig,
4999    ) -> hipError_t;
5000}
5001extern "C" {
5002    #[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"]
5003    pub fn hipGetLastError() -> hipError_t;
5004}
5005extern "C" {
5006    #[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"]
5007    pub fn hipExtGetLastError() -> hipError_t;
5008}
5009extern "C" {
5010    #[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"]
5011    pub fn hipPeekAtLastError() -> hipError_t;
5012}
5013extern "C" {
5014    #[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"]
5015    pub fn hipGetErrorName(hip_error: hipError_t) -> *const ::std::os::raw::c_char;
5016}
5017extern "C" {
5018    #[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"]
5019    pub fn hipGetErrorString(hipError: hipError_t) -> *const ::std::os::raw::c_char;
5020}
5021extern "C" {
5022    #[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"]
5023    pub fn hipDrvGetErrorName(
5024        hipError: hipError_t,
5025        errorString: *mut *const ::std::os::raw::c_char,
5026    ) -> hipError_t;
5027}
5028extern "C" {
5029    #[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"]
5030    pub fn hipDrvGetErrorString(
5031        hipError: hipError_t,
5032        errorString: *mut *const ::std::os::raw::c_char,
5033    ) -> hipError_t;
5034}
5035extern "C" {
5036    #[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, hipStreamWaitEvent, hipStreamDestroy"]
5037    pub fn hipStreamCreate(stream: *mut hipStream_t) -> hipError_t;
5038}
5039extern "C" {
5040    #[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 and\n #hipStreamNonBlocking.\n\n @see hipStreamCreate, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamWaitEvent,\n hipStreamDestroy.\n"]
5041    pub fn hipStreamCreateWithFlags(
5042        stream: *mut hipStream_t,
5043        flags: ::std::os::raw::c_uint,
5044    ) -> hipError_t;
5045}
5046extern "C" {
5047    #[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 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"]
5048    pub fn hipStreamCreateWithPriority(
5049        stream: *mut hipStream_t,
5050        flags: ::std::os::raw::c_uint,
5051        priority: ::std::os::raw::c_int,
5052    ) -> hipError_t;
5053}
5054extern "C" {
5055    #[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."]
5056    pub fn hipDeviceGetStreamPriorityRange(
5057        leastPriority: *mut ::std::os::raw::c_int,
5058        greatestPriority: *mut ::std::os::raw::c_int,
5059    ) -> hipError_t;
5060}
5061extern "C" {
5062    #[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"]
5063    pub fn hipStreamDestroy(stream: hipStream_t) -> hipError_t;
5064}
5065extern "C" {
5066    #[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"]
5067    pub fn hipStreamQuery(stream: hipStream_t) -> hipError_t;
5068}
5069extern "C" {
5070    #[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"]
5071    pub fn hipStreamSynchronize(stream: hipStream_t) -> hipError_t;
5072}
5073extern "C" {
5074    #[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, hipStreamSynchronize,\n hipStreamDestroy"]
5075    pub fn hipStreamWaitEvent(
5076        stream: hipStream_t,
5077        event: hipEvent_t,
5078        flags: ::std::os::raw::c_uint,
5079    ) -> hipError_t;
5080}
5081extern "C" {
5082    #[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"]
5083    pub fn hipStreamGetFlags(stream: hipStream_t, flags: *mut ::std::os::raw::c_uint)
5084        -> hipError_t;
5085}
5086extern "C" {
5087    #[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 returned\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle.\n\n @see hipStreamCreateWithPriority"]
5088    pub fn hipStreamGetPriority(
5089        stream: hipStream_t,
5090        priority: *mut ::std::os::raw::c_int,
5091    ) -> hipError_t;
5092}
5093extern "C" {
5094    #[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"]
5095    pub fn hipStreamGetDevice(stream: hipStream_t, device: *mut hipDevice_t) -> hipError_t;
5096}
5097extern "C" {
5098    #[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 handle\n that can be used to reference the newly created stream in subsequent hipStream* commands.  The\n stream is allocated on the heap and will remain allocated even if the handle goes out-of-scope.\n To release the memory used by the stream, application must call hipStreamDestroy.\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"]
5099    pub fn hipExtStreamCreateWithCUMask(
5100        stream: *mut hipStream_t,
5101        cuMaskSize: u32,
5102        cuMask: *const u32,
5103    ) -> hipError_t;
5104}
5105extern "C" {
5106    #[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"]
5107    pub fn hipExtStreamGetCUMask(
5108        stream: hipStream_t,
5109        cuMaskSize: u32,
5110        cuMask: *mut u32,
5111    ) -> hipError_t;
5112}
5113#[doc = " Stream CallBack struct"]
5114pub type hipStreamCallback_t = ::std::option::Option<
5115    unsafe extern "C" fn(
5116        stream: hipStream_t,
5117        status: hipError_t,
5118        userData: *mut ::std::os::raw::c_void,
5119    ),
5120>;
5121extern "C" {
5122    #[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"]
5123    pub fn hipStreamAddCallback(
5124        stream: hipStream_t,
5125        callback: hipStreamCallback_t,
5126        userData: *mut ::std::os::raw::c_void,
5127        flags: ::std::os::raw::c_uint,
5128    ) -> hipError_t;
5129}
5130extern "C" {
5131    #[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"]
5132    pub fn hipStreamWaitValue32(
5133        stream: hipStream_t,
5134        ptr: *mut ::std::os::raw::c_void,
5135        value: u32,
5136        flags: ::std::os::raw::c_uint,
5137        mask: u32,
5138    ) -> hipError_t;
5139}
5140extern "C" {
5141    #[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"]
5142    pub fn hipStreamWaitValue64(
5143        stream: hipStream_t,
5144        ptr: *mut ::std::os::raw::c_void,
5145        value: u64,
5146        flags: ::std::os::raw::c_uint,
5147        mask: u64,
5148    ) -> hipError_t;
5149}
5150extern "C" {
5151    #[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"]
5152    pub fn hipStreamWriteValue32(
5153        stream: hipStream_t,
5154        ptr: *mut ::std::os::raw::c_void,
5155        value: u32,
5156        flags: ::std::os::raw::c_uint,
5157    ) -> hipError_t;
5158}
5159extern "C" {
5160    #[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"]
5161    pub fn hipStreamWriteValue64(
5162        stream: hipStream_t,
5163        ptr: *mut ::std::os::raw::c_void,
5164        value: u64,
5165        flags: ::std::os::raw::c_uint,
5166    ) -> hipError_t;
5167}
5168extern "C" {
5169    #[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"]
5170    pub fn hipStreamBatchMemOp(
5171        stream: hipStream_t,
5172        count: ::std::os::raw::c_uint,
5173        paramArray: *mut hipStreamBatchMemOpParams,
5174        flags: ::std::os::raw::c_uint,
5175    ) -> hipError_t;
5176}
5177extern "C" {
5178    #[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"]
5179    pub fn hipGraphAddBatchMemOpNode(
5180        phGraphNode: *mut hipGraphNode_t,
5181        hGraph: hipGraph_t,
5182        dependencies: *const hipGraphNode_t,
5183        numDependencies: usize,
5184        nodeParams: *const hipBatchMemOpNodeParams,
5185    ) -> hipError_t;
5186}
5187extern "C" {
5188    #[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"]
5189    pub fn hipGraphBatchMemOpNodeGetParams(
5190        hNode: hipGraphNode_t,
5191        nodeParams_out: *mut hipBatchMemOpNodeParams,
5192    ) -> hipError_t;
5193}
5194extern "C" {
5195    #[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"]
5196    pub fn hipGraphBatchMemOpNodeSetParams(
5197        hNode: hipGraphNode_t,
5198        nodeParams: *mut hipBatchMemOpNodeParams,
5199    ) -> hipError_t;
5200}
5201extern "C" {
5202    #[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"]
5203    pub fn hipGraphExecBatchMemOpNodeSetParams(
5204        hGraphExec: hipGraphExec_t,
5205        hNode: hipGraphNode_t,
5206        nodeParams: *const hipBatchMemOpNodeParams,
5207    ) -> hipError_t;
5208}
5209extern "C" {
5210    #[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"]
5211    pub fn hipEventCreateWithFlags(
5212        event: *mut hipEvent_t,
5213        flags: ::std::os::raw::c_uint,
5214    ) -> hipError_t;
5215}
5216extern "C" {
5217    #[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"]
5218    pub fn hipEventCreate(event: *mut hipEvent_t) -> hipError_t;
5219}
5220extern "C" {
5221    #[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"]
5222    pub fn hipEventRecordWithFlags(
5223        event: hipEvent_t,
5224        stream: hipStream_t,
5225        flags: ::std::os::raw::c_uint,
5226    ) -> hipError_t;
5227}
5228extern "C" {
5229    pub fn hipEventRecord(event: hipEvent_t, stream: hipStream_t) -> hipError_t;
5230}
5231extern "C" {
5232    #[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"]
5233    pub fn hipEventDestroy(event: hipEvent_t) -> hipError_t;
5234}
5235extern "C" {
5236    #[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"]
5237    pub fn hipEventSynchronize(event: hipEvent_t) -> hipError_t;
5238}
5239extern "C" {
5240    #[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"]
5241    pub fn hipEventElapsedTime(ms: *mut f32, start: hipEvent_t, stop: hipEvent_t) -> hipError_t;
5242}
5243extern "C" {
5244    #[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 execution\n 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"]
5245    pub fn hipEventQuery(event: hipEvent_t) -> hipError_t;
5246}
5247extern "C" {
5248    #[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"]
5249    pub fn hipPointerSetAttribute(
5250        value: *const ::std::os::raw::c_void,
5251        attribute: hipPointer_attribute,
5252        ptr: hipDeviceptr_t,
5253    ) -> hipError_t;
5254}
5255extern "C" {
5256    #[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"]
5257    pub fn hipPointerGetAttributes(
5258        attributes: *mut hipPointerAttribute_t,
5259        ptr: *const ::std::os::raw::c_void,
5260    ) -> hipError_t;
5261}
5262extern "C" {
5263    #[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"]
5264    pub fn hipPointerGetAttribute(
5265        data: *mut ::std::os::raw::c_void,
5266        attribute: hipPointer_attribute,
5267        ptr: hipDeviceptr_t,
5268    ) -> hipError_t;
5269}
5270extern "C" {
5271    #[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"]
5272    pub fn hipDrvPointerGetAttributes(
5273        numAttributes: ::std::os::raw::c_uint,
5274        attributes: *mut hipPointer_attribute,
5275        data: *mut *mut ::std::os::raw::c_void,
5276        ptr: hipDeviceptr_t,
5277    ) -> hipError_t;
5278}
5279extern "C" {
5280    #[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"]
5281    pub fn hipImportExternalSemaphore(
5282        extSem_out: *mut hipExternalSemaphore_t,
5283        semHandleDesc: *const hipExternalSemaphoreHandleDesc,
5284    ) -> hipError_t;
5285}
5286extern "C" {
5287    #[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"]
5288    pub fn hipSignalExternalSemaphoresAsync(
5289        extSemArray: *const hipExternalSemaphore_t,
5290        paramsArray: *const hipExternalSemaphoreSignalParams,
5291        numExtSems: ::std::os::raw::c_uint,
5292        stream: hipStream_t,
5293    ) -> hipError_t;
5294}
5295extern "C" {
5296    #[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"]
5297    pub fn hipWaitExternalSemaphoresAsync(
5298        extSemArray: *const hipExternalSemaphore_t,
5299        paramsArray: *const hipExternalSemaphoreWaitParams,
5300        numExtSems: ::std::os::raw::c_uint,
5301        stream: hipStream_t,
5302    ) -> hipError_t;
5303}
5304extern "C" {
5305    #[doc = "  @brief Destroys an external semaphore object and releases any references to the underlying 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"]
5306    pub fn hipDestroyExternalSemaphore(extSem: hipExternalSemaphore_t) -> hipError_t;
5307}
5308extern "C" {
5309    #[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"]
5310    pub fn hipImportExternalMemory(
5311        extMem_out: *mut hipExternalMemory_t,
5312        memHandleDesc: *const hipExternalMemoryHandleDesc,
5313    ) -> hipError_t;
5314}
5315extern "C" {
5316    #[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"]
5317    pub fn hipExternalMemoryGetMappedBuffer(
5318        devPtr: *mut *mut ::std::os::raw::c_void,
5319        extMem: hipExternalMemory_t,
5320        bufferDesc: *const hipExternalMemoryBufferDesc,
5321    ) -> hipError_t;
5322}
5323extern "C" {
5324    #[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"]
5325    pub fn hipDestroyExternalMemory(extMem: hipExternalMemory_t) -> hipError_t;
5326}
5327extern "C" {
5328    #[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, hipFreeMipmappedArray"]
5329    pub fn hipExternalMemoryGetMappedMipmappedArray(
5330        mipmap: *mut hipMipmappedArray_t,
5331        extMem: hipExternalMemory_t,
5332        mipmapDesc: *const hipExternalMemoryMipmappedArrayDesc,
5333    ) -> hipError_t;
5334}
5335extern "C" {
5336    #[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"]
5337    pub fn hipMalloc(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
5338}
5339extern "C" {
5340    #[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"]
5341    pub fn hipExtMallocWithFlags(
5342        ptr: *mut *mut ::std::os::raw::c_void,
5343        sizeBytes: usize,
5344        flags: ::std::os::raw::c_uint,
5345    ) -> hipError_t;
5346}
5347extern "C" {
5348    #[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"]
5349    pub fn hipMallocHost(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
5350}
5351extern "C" {
5352    #[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"]
5353    pub fn hipMemAllocHost(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
5354}
5355extern "C" {
5356    #[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"]
5357    pub fn hipHostMalloc(
5358        ptr: *mut *mut ::std::os::raw::c_void,
5359        size: usize,
5360        flags: ::std::os::raw::c_uint,
5361    ) -> hipError_t;
5362}
5363extern "C" {
5364    #[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"]
5365    pub fn hipMallocManaged(
5366        dev_ptr: *mut *mut ::std::os::raw::c_void,
5367        size: usize,
5368        flags: ::std::os::raw::c_uint,
5369    ) -> hipError_t;
5370}
5371extern "C" {
5372    #[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."]
5373    pub fn hipMemPrefetchAsync(
5374        dev_ptr: *const ::std::os::raw::c_void,
5375        count: usize,
5376        device: ::std::os::raw::c_int,
5377        stream: hipStream_t,
5378    ) -> hipError_t;
5379}
5380extern "C" {
5381    #[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."]
5382    pub fn hipMemAdvise(
5383        dev_ptr: *const ::std::os::raw::c_void,
5384        count: usize,
5385        advice: hipMemoryAdvise,
5386        device: ::std::os::raw::c_int,
5387    ) -> hipError_t;
5388}
5389extern "C" {
5390    #[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."]
5391    pub fn hipMemRangeGetAttribute(
5392        data: *mut ::std::os::raw::c_void,
5393        data_size: usize,
5394        attribute: hipMemRangeAttribute,
5395        dev_ptr: *const ::std::os::raw::c_void,
5396        count: usize,
5397    ) -> hipError_t;
5398}
5399extern "C" {
5400    #[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."]
5401    pub fn hipMemRangeGetAttributes(
5402        data: *mut *mut ::std::os::raw::c_void,
5403        data_sizes: *mut usize,
5404        attributes: *mut hipMemRangeAttribute,
5405        num_attributes: usize,
5406        dev_ptr: *const ::std::os::raw::c_void,
5407        count: usize,
5408    ) -> hipError_t;
5409}
5410extern "C" {
5411    #[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."]
5412    pub fn hipStreamAttachMemAsync(
5413        stream: hipStream_t,
5414        dev_ptr: *mut ::std::os::raw::c_void,
5415        length: usize,
5416        flags: ::std::os::raw::c_uint,
5417    ) -> hipError_t;
5418}
5419extern "C" {
5420    #[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."]
5421    pub fn hipMallocAsync(
5422        dev_ptr: *mut *mut ::std::os::raw::c_void,
5423        size: usize,
5424        stream: hipStream_t,
5425    ) -> hipError_t;
5426}
5427extern "C" {
5428    #[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."]
5429    pub fn hipFreeAsync(dev_ptr: *mut ::std::os::raw::c_void, stream: hipStream_t) -> hipError_t;
5430}
5431extern "C" {
5432    #[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."]
5433    pub fn hipMemPoolTrimTo(mem_pool: hipMemPool_t, min_bytes_to_hold: usize) -> hipError_t;
5434}
5435extern "C" {
5436    #[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 dependency\n                                  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."]
5437    pub fn hipMemPoolSetAttribute(
5438        mem_pool: hipMemPool_t,
5439        attr: hipMemPoolAttr,
5440        value: *mut ::std::os::raw::c_void,
5441    ) -> hipError_t;
5442}
5443extern "C" {
5444    #[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 dependency\n                                  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, 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."]
5445    pub fn hipMemPoolGetAttribute(
5446        mem_pool: hipMemPool_t,
5447        attr: hipMemPoolAttr,
5448        value: *mut ::std::os::raw::c_void,
5449    ) -> hipError_t;
5450}
5451extern "C" {
5452    #[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 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."]
5453    pub fn hipMemPoolSetAccess(
5454        mem_pool: hipMemPool_t,
5455        desc_list: *const hipMemAccessDesc,
5456        count: usize,
5457    ) -> hipError_t;
5458}
5459extern "C" {
5460    #[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."]
5461    pub fn hipMemPoolGetAccess(
5462        flags: *mut hipMemAccessFlags,
5463        mem_pool: hipMemPool_t,
5464        location: *mut hipMemLocation,
5465    ) -> hipError_t;
5466}
5467extern "C" {
5468    #[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, hipMemPoolDestroy,\n hipMemPoolTrimTo, 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."]
5469    pub fn hipMemPoolCreate(
5470        mem_pool: *mut hipMemPool_t,
5471        pool_props: *const hipMemPoolProps,
5472    ) -> hipError_t;
5473}
5474extern "C" {
5475    #[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, hipMemPoolCreate\n hipMemPoolTrimTo, 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."]
5476    pub fn hipMemPoolDestroy(mem_pool: hipMemPool_t) -> hipError_t;
5477}
5478extern "C" {
5479    #[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 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 case,\n the allocation is owned by the graph instead of the memory pool. The memory pool's properties\n are used to set the node's creation parameters.\n\n @param [out] 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, 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."]
5480    pub fn hipMallocFromPoolAsync(
5481        dev_ptr: *mut *mut ::std::os::raw::c_void,
5482        size: usize,
5483        mem_pool: hipMemPool_t,
5484        stream: hipStream_t,
5485    ) -> hipError_t;
5486}
5487extern "C" {
5488    #[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 hipMemPoolImportFromShareableHandle.\n Individual pointers can then be shared with the @p hipMemPoolExportPointer and @p hipMemPoolImportPointer APIs.\n The implementation of what the shareable handle is and how it can be transferred is defined by the requested\n handle type.\n\n @note To create an IPC capable mempool, create a mempool with a @p hipMemAllocationHandleType other\n 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."]
5489    pub fn hipMemPoolExportToShareableHandle(
5490        shared_handle: *mut ::std::os::raw::c_void,
5491        mem_pool: hipMemPool_t,
5492        handle_type: hipMemAllocationHandleType,
5493        flags: ::std::os::raw::c_uint,
5494    ) -> hipError_t;
5495}
5496extern "C" {
5497    #[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."]
5498    pub fn hipMemPoolImportFromShareableHandle(
5499        mem_pool: *mut hipMemPool_t,
5500        shared_handle: *mut ::std::os::raw::c_void,
5501        handle_type: hipMemAllocationHandleType,
5502        flags: ::std::os::raw::c_uint,
5503    ) -> hipError_t;
5504}
5505extern "C" {
5506    #[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."]
5507    pub fn hipMemPoolExportPointer(
5508        export_data: *mut hipMemPoolPtrExportData,
5509        dev_ptr: *mut ::std::os::raw::c_void,
5510    ) -> hipError_t;
5511}
5512extern "C" {
5513    #[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."]
5514    pub fn hipMemPoolImportPointer(
5515        dev_ptr: *mut *mut ::std::os::raw::c_void,
5516        mem_pool: hipMemPool_t,
5517        export_data: *mut hipMemPoolPtrExportData,
5518    ) -> hipError_t;
5519}
5520extern "C" {
5521    #[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"]
5522    pub fn hipHostAlloc(
5523        ptr: *mut *mut ::std::os::raw::c_void,
5524        size: usize,
5525        flags: ::std::os::raw::c_uint,
5526    ) -> hipError_t;
5527}
5528extern "C" {
5529    #[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"]
5530    pub fn hipHostGetDevicePointer(
5531        devPtr: *mut *mut ::std::os::raw::c_void,
5532        hstPtr: *mut ::std::os::raw::c_void,
5533        flags: ::std::os::raw::c_uint,
5534    ) -> hipError_t;
5535}
5536extern "C" {
5537    #[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"]
5538    pub fn hipHostGetFlags(
5539        flagsPtr: *mut ::std::os::raw::c_uint,
5540        hostPtr: *mut ::std::os::raw::c_void,
5541    ) -> hipError_t;
5542}
5543extern "C" {
5544    #[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"]
5545    pub fn hipHostRegister(
5546        hostPtr: *mut ::std::os::raw::c_void,
5547        sizeBytes: usize,
5548        flags: ::std::os::raw::c_uint,
5549    ) -> hipError_t;
5550}
5551extern "C" {
5552    #[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"]
5553    pub fn hipHostUnregister(hostPtr: *mut ::std::os::raw::c_void) -> hipError_t;
5554}
5555extern "C" {
5556    #[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"]
5557    pub fn hipMallocPitch(
5558        ptr: *mut *mut ::std::os::raw::c_void,
5559        pitch: *mut usize,
5560        width: usize,
5561        height: usize,
5562    ) -> hipError_t;
5563}
5564extern "C" {
5565    #[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 addresses within the 2D array.\n  Given the row and column of an array element of type T, the address is computed as:\n  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"]
5566    pub fn hipMemAllocPitch(
5567        dptr: *mut hipDeviceptr_t,
5568        pitch: *mut usize,
5569        widthInBytes: usize,
5570        height: usize,
5571        elementSizeBytes: ::std::os::raw::c_uint,
5572    ) -> hipError_t;
5573}
5574extern "C" {
5575    #[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"]
5576    pub fn hipFree(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
5577}
5578extern "C" {
5579    #[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"]
5580    pub fn hipFreeHost(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
5581}
5582extern "C" {
5583    #[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"]
5584    pub fn hipHostFree(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
5585}
5586extern "C" {
5587    #[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 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  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"]
5588    pub fn hipMemcpy(
5589        dst: *mut ::std::os::raw::c_void,
5590        src: *const ::std::os::raw::c_void,
5591        sizeBytes: usize,
5592        kind: hipMemcpyKind,
5593    ) -> hipError_t;
5594}
5595extern "C" {
5596    #[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, hipLaunchKernelGGL\n"]
5597    pub fn hipMemcpyWithStream(
5598        dst: *mut ::std::os::raw::c_void,
5599        src: *const ::std::os::raw::c_void,
5600        sizeBytes: usize,
5601        kind: hipMemcpyKind,
5602        stream: hipStream_t,
5603    ) -> hipError_t;
5604}
5605extern "C" {
5606    #[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"]
5607    pub fn hipMemcpyHtoD(
5608        dst: hipDeviceptr_t,
5609        src: *const ::std::os::raw::c_void,
5610        sizeBytes: usize,
5611    ) -> hipError_t;
5612}
5613extern "C" {
5614    #[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"]
5615    pub fn hipMemcpyDtoH(
5616        dst: *mut ::std::os::raw::c_void,
5617        src: hipDeviceptr_t,
5618        sizeBytes: usize,
5619    ) -> hipError_t;
5620}
5621extern "C" {
5622    #[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"]
5623    pub fn hipMemcpyDtoD(dst: hipDeviceptr_t, src: hipDeviceptr_t, sizeBytes: usize) -> hipError_t;
5624}
5625extern "C" {
5626    #[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"]
5627    pub fn hipMemcpyAtoD(
5628        dstDevice: hipDeviceptr_t,
5629        srcArray: hipArray_t,
5630        srcOffset: usize,
5631        ByteCount: usize,
5632    ) -> hipError_t;
5633}
5634extern "C" {
5635    #[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"]
5636    pub fn hipMemcpyDtoA(
5637        dstArray: hipArray_t,
5638        dstOffset: usize,
5639        srcDevice: hipDeviceptr_t,
5640        ByteCount: usize,
5641    ) -> hipError_t;
5642}
5643extern "C" {
5644    #[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"]
5645    pub fn hipMemcpyAtoA(
5646        dstArray: hipArray_t,
5647        dstOffset: usize,
5648        srcArray: hipArray_t,
5649        srcOffset: usize,
5650        ByteCount: usize,
5651    ) -> hipError_t;
5652}
5653extern "C" {
5654    #[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"]
5655    pub fn hipMemcpyHtoDAsync(
5656        dst: hipDeviceptr_t,
5657        src: *const ::std::os::raw::c_void,
5658        sizeBytes: usize,
5659        stream: hipStream_t,
5660    ) -> hipError_t;
5661}
5662extern "C" {
5663    #[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"]
5664    pub fn hipMemcpyDtoHAsync(
5665        dst: *mut ::std::os::raw::c_void,
5666        src: hipDeviceptr_t,
5667        sizeBytes: usize,
5668        stream: hipStream_t,
5669    ) -> hipError_t;
5670}
5671extern "C" {
5672    #[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"]
5673    pub fn hipMemcpyDtoDAsync(
5674        dst: hipDeviceptr_t,
5675        src: hipDeviceptr_t,
5676        sizeBytes: usize,
5677        stream: hipStream_t,
5678    ) -> hipError_t;
5679}
5680extern "C" {
5681    #[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"]
5682    pub fn hipMemcpyAtoHAsync(
5683        dstHost: *mut ::std::os::raw::c_void,
5684        srcArray: hipArray_t,
5685        srcOffset: usize,
5686        ByteCount: usize,
5687        stream: hipStream_t,
5688    ) -> hipError_t;
5689}
5690extern "C" {
5691    #[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"]
5692    pub fn hipMemcpyHtoAAsync(
5693        dstArray: hipArray_t,
5694        dstOffset: usize,
5695        srcHost: *const ::std::os::raw::c_void,
5696        ByteCount: usize,
5697        stream: hipStream_t,
5698    ) -> hipError_t;
5699}
5700extern "C" {
5701    #[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 hmod.\n  If no variable of that name exists, it returns hipErrorNotFound. Both parameters dptr and bytes are optional.\n  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"]
5702    pub fn hipModuleGetGlobal(
5703        dptr: *mut hipDeviceptr_t,
5704        bytes: *mut usize,
5705        hmod: hipModule_t,
5706        name: *const ::std::os::raw::c_char,
5707    ) -> hipError_t;
5708}
5709extern "C" {
5710    #[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"]
5711    pub fn hipGetSymbolAddress(
5712        devPtr: *mut *mut ::std::os::raw::c_void,
5713        symbol: *const ::std::os::raw::c_void,
5714    ) -> hipError_t;
5715}
5716extern "C" {
5717    #[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"]
5718    pub fn hipGetSymbolSize(size: *mut usize, symbol: *const ::std::os::raw::c_void) -> hipError_t;
5719}
5720extern "C" {
5721    #[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."]
5722    pub fn hipGetProcAddress(
5723        symbol: *const ::std::os::raw::c_char,
5724        pfn: *mut *mut ::std::os::raw::c_void,
5725        hipVersion: ::std::os::raw::c_int,
5726        flags: u64,
5727        symbolStatus: *mut hipDriverProcAddressQueryResult,
5728    ) -> hipError_t;
5729}
5730extern "C" {
5731    #[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 href=\"https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/hip_porting_guide.html#memcpytosymbol\">memcpyToSymbol example</a>\n 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"]
5732    pub fn hipMemcpyToSymbol(
5733        symbol: *const ::std::os::raw::c_void,
5734        src: *const ::std::os::raw::c_void,
5735        sizeBytes: usize,
5736        offset: usize,
5737        kind: hipMemcpyKind,
5738    ) -> hipError_t;
5739}
5740extern "C" {
5741    #[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"]
5742    pub fn hipMemcpyToSymbolAsync(
5743        symbol: *const ::std::os::raw::c_void,
5744        src: *const ::std::os::raw::c_void,
5745        sizeBytes: usize,
5746        offset: usize,
5747        kind: hipMemcpyKind,
5748        stream: hipStream_t,
5749    ) -> hipError_t;
5750}
5751extern "C" {
5752    #[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"]
5753    pub fn hipMemcpyFromSymbol(
5754        dst: *mut ::std::os::raw::c_void,
5755        symbol: *const ::std::os::raw::c_void,
5756        sizeBytes: usize,
5757        offset: usize,
5758        kind: hipMemcpyKind,
5759    ) -> hipError_t;
5760}
5761extern "C" {
5762    #[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"]
5763    pub fn hipMemcpyFromSymbolAsync(
5764        dst: *mut ::std::os::raw::c_void,
5765        symbol: *const ::std::os::raw::c_void,
5766        sizeBytes: usize,
5767        offset: usize,
5768        kind: hipMemcpyKind,
5769        stream: hipStream_t,
5770    ) -> hipError_t;
5771}
5772extern "C" {
5773    #[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"]
5774    pub fn hipMemcpyAsync(
5775        dst: *mut ::std::os::raw::c_void,
5776        src: *const ::std::os::raw::c_void,
5777        sizeBytes: usize,
5778        kind: hipMemcpyKind,
5779        stream: hipStream_t,
5780    ) -> hipError_t;
5781}
5782extern "C" {
5783    #[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"]
5784    pub fn hipMemset(
5785        dst: *mut ::std::os::raw::c_void,
5786        value: ::std::os::raw::c_int,
5787        sizeBytes: usize,
5788    ) -> hipError_t;
5789}
5790extern "C" {
5791    #[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"]
5792    pub fn hipMemsetD8(
5793        dest: hipDeviceptr_t,
5794        value: ::std::os::raw::c_uchar,
5795        count: usize,
5796    ) -> hipError_t;
5797}
5798extern "C" {
5799    #[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"]
5800    pub fn hipMemsetD8Async(
5801        dest: hipDeviceptr_t,
5802        value: ::std::os::raw::c_uchar,
5803        count: usize,
5804        stream: hipStream_t,
5805    ) -> hipError_t;
5806}
5807extern "C" {
5808    #[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"]
5809    pub fn hipMemsetD16(
5810        dest: hipDeviceptr_t,
5811        value: ::std::os::raw::c_ushort,
5812        count: usize,
5813    ) -> hipError_t;
5814}
5815extern "C" {
5816    #[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"]
5817    pub fn hipMemsetD16Async(
5818        dest: hipDeviceptr_t,
5819        value: ::std::os::raw::c_ushort,
5820        count: usize,
5821        stream: hipStream_t,
5822    ) -> hipError_t;
5823}
5824extern "C" {
5825    #[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"]
5826    pub fn hipMemsetD32(
5827        dest: hipDeviceptr_t,
5828        value: ::std::os::raw::c_int,
5829        count: usize,
5830    ) -> hipError_t;
5831}
5832extern "C" {
5833    #[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"]
5834    pub fn hipMemsetAsync(
5835        dst: *mut ::std::os::raw::c_void,
5836        value: ::std::os::raw::c_int,
5837        sizeBytes: usize,
5838        stream: hipStream_t,
5839    ) -> hipError_t;
5840}
5841extern "C" {
5842    #[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"]
5843    pub fn hipMemsetD32Async(
5844        dst: hipDeviceptr_t,
5845        value: ::std::os::raw::c_int,
5846        count: usize,
5847        stream: hipStream_t,
5848    ) -> hipError_t;
5849}
5850extern "C" {
5851    #[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"]
5852    pub fn hipMemset2D(
5853        dst: *mut ::std::os::raw::c_void,
5854        pitch: usize,
5855        value: ::std::os::raw::c_int,
5856        width: usize,
5857        height: usize,
5858    ) -> hipError_t;
5859}
5860extern "C" {
5861    #[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"]
5862    pub fn hipMemset2DAsync(
5863        dst: *mut ::std::os::raw::c_void,
5864        pitch: usize,
5865        value: ::std::os::raw::c_int,
5866        width: usize,
5867        height: usize,
5868        stream: hipStream_t,
5869    ) -> hipError_t;
5870}
5871extern "C" {
5872    #[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"]
5873    pub fn hipMemset3D(
5874        pitchedDevPtr: hipPitchedPtr,
5875        value: ::std::os::raw::c_int,
5876        extent: hipExtent,
5877    ) -> hipError_t;
5878}
5879extern "C" {
5880    #[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"]
5881    pub fn hipMemset3DAsync(
5882        pitchedDevPtr: hipPitchedPtr,
5883        value: ::std::os::raw::c_int,
5884        extent: hipExtent,
5885        stream: hipStream_t,
5886    ) -> hipError_t;
5887}
5888extern "C" {
5889    #[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"]
5890    pub fn hipMemGetInfo(free: *mut usize, total: *mut usize) -> hipError_t;
5891}
5892extern "C" {
5893    #[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"]
5894    pub fn hipMemPtrGetInfo(ptr: *mut ::std::os::raw::c_void, size: *mut usize) -> hipError_t;
5895}
5896extern "C" {
5897    #[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"]
5898    pub fn hipMallocArray(
5899        array: *mut hipArray_t,
5900        desc: *const hipChannelFormatDesc,
5901        width: usize,
5902        height: usize,
5903        flags: ::std::os::raw::c_uint,
5904    ) -> hipError_t;
5905}
5906extern "C" {
5907    #[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"]
5908    pub fn hipArrayCreate(
5909        pHandle: *mut hipArray_t,
5910        pAllocateArray: *const HIP_ARRAY_DESCRIPTOR,
5911    ) -> hipError_t;
5912}
5913extern "C" {
5914    #[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"]
5915    pub fn hipArrayDestroy(array: hipArray_t) -> hipError_t;
5916}
5917extern "C" {
5918    #[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"]
5919    pub fn hipArray3DCreate(
5920        array: *mut hipArray_t,
5921        pAllocateArray: *const HIP_ARRAY3D_DESCRIPTOR,
5922    ) -> hipError_t;
5923}
5924extern "C" {
5925    #[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"]
5926    pub fn hipMalloc3D(pitchedDevPtr: *mut hipPitchedPtr, extent: hipExtent) -> hipError_t;
5927}
5928extern "C" {
5929    #[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"]
5930    pub fn hipFreeArray(array: hipArray_t) -> hipError_t;
5931}
5932extern "C" {
5933    #[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"]
5934    pub fn hipMalloc3DArray(
5935        array: *mut hipArray_t,
5936        desc: *const hipChannelFormatDesc,
5937        extent: hipExtent,
5938        flags: ::std::os::raw::c_uint,
5939    ) -> hipError_t;
5940}
5941extern "C" {
5942    #[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"]
5943    pub fn hipArrayGetInfo(
5944        desc: *mut hipChannelFormatDesc,
5945        extent: *mut hipExtent,
5946        flags: *mut ::std::os::raw::c_uint,
5947        array: hipArray_t,
5948    ) -> hipError_t;
5949}
5950extern "C" {
5951    #[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"]
5952    pub fn hipArrayGetDescriptor(
5953        pArrayDescriptor: *mut HIP_ARRAY_DESCRIPTOR,
5954        array: hipArray_t,
5955    ) -> hipError_t;
5956}
5957extern "C" {
5958    #[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"]
5959    pub fn hipArray3DGetDescriptor(
5960        pArrayDescriptor: *mut HIP_ARRAY3D_DESCRIPTOR,
5961        array: hipArray_t,
5962    ) -> hipError_t;
5963}
5964extern "C" {
5965    #[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 results in\n 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"]
5966    pub fn hipMemcpy2D(
5967        dst: *mut ::std::os::raw::c_void,
5968        dpitch: usize,
5969        src: *const ::std::os::raw::c_void,
5970        spitch: usize,
5971        width: usize,
5972        height: usize,
5973        kind: hipMemcpyKind,
5974    ) -> hipError_t;
5975}
5976extern "C" {
5977    #[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"]
5978    pub fn hipMemcpyParam2D(pCopy: *const hip_Memcpy2D) -> hipError_t;
5979}
5980extern "C" {
5981    #[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"]
5982    pub fn hipMemcpyParam2DAsync(pCopy: *const hip_Memcpy2D, stream: hipStream_t) -> hipError_t;
5983}
5984extern "C" {
5985    #[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"]
5986    pub fn hipMemcpy2DAsync(
5987        dst: *mut ::std::os::raw::c_void,
5988        dpitch: usize,
5989        src: *const ::std::os::raw::c_void,
5990        spitch: usize,
5991        width: usize,
5992        height: usize,
5993        kind: hipMemcpyKind,
5994        stream: hipStream_t,
5995    ) -> hipError_t;
5996}
5997extern "C" {
5998    #[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"]
5999    pub fn hipMemcpy2DToArray(
6000        dst: hipArray_t,
6001        wOffset: usize,
6002        hOffset: usize,
6003        src: *const ::std::os::raw::c_void,
6004        spitch: usize,
6005        width: usize,
6006        height: usize,
6007        kind: hipMemcpyKind,
6008    ) -> hipError_t;
6009}
6010extern "C" {
6011    #[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"]
6012    pub fn hipMemcpy2DToArrayAsync(
6013        dst: hipArray_t,
6014        wOffset: usize,
6015        hOffset: usize,
6016        src: *const ::std::os::raw::c_void,
6017        spitch: usize,
6018        width: usize,
6019        height: usize,
6020        kind: hipMemcpyKind,
6021        stream: hipStream_t,
6022    ) -> hipError_t;
6023}
6024extern "C" {
6025    #[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"]
6026    pub fn hipMemcpy2DArrayToArray(
6027        dst: hipArray_t,
6028        wOffsetDst: usize,
6029        hOffsetDst: usize,
6030        src: hipArray_const_t,
6031        wOffsetSrc: usize,
6032        hOffsetSrc: usize,
6033        width: usize,
6034        height: usize,
6035        kind: hipMemcpyKind,
6036    ) -> hipError_t;
6037}
6038extern "C" {
6039    #[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."]
6040    pub fn hipMemcpyToArray(
6041        dst: hipArray_t,
6042        wOffset: usize,
6043        hOffset: usize,
6044        src: *const ::std::os::raw::c_void,
6045        count: usize,
6046        kind: hipMemcpyKind,
6047    ) -> hipError_t;
6048}
6049extern "C" {
6050    #[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."]
6051    pub fn hipMemcpyFromArray(
6052        dst: *mut ::std::os::raw::c_void,
6053        srcArray: hipArray_const_t,
6054        wOffset: usize,
6055        hOffset: usize,
6056        count: usize,
6057        kind: hipMemcpyKind,
6058    ) -> hipError_t;
6059}
6060extern "C" {
6061    #[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"]
6062    pub fn hipMemcpy2DFromArray(
6063        dst: *mut ::std::os::raw::c_void,
6064        dpitch: usize,
6065        src: hipArray_const_t,
6066        wOffset: usize,
6067        hOffset: usize,
6068        width: usize,
6069        height: usize,
6070        kind: hipMemcpyKind,
6071    ) -> hipError_t;
6072}
6073extern "C" {
6074    #[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"]
6075    pub fn hipMemcpy2DFromArrayAsync(
6076        dst: *mut ::std::os::raw::c_void,
6077        dpitch: usize,
6078        src: hipArray_const_t,
6079        wOffset: usize,
6080        hOffset: usize,
6081        width: usize,
6082        height: usize,
6083        kind: hipMemcpyKind,
6084        stream: hipStream_t,
6085    ) -> hipError_t;
6086}
6087extern "C" {
6088    #[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"]
6089    pub fn hipMemcpyAtoH(
6090        dst: *mut ::std::os::raw::c_void,
6091        srcArray: hipArray_t,
6092        srcOffset: usize,
6093        count: usize,
6094    ) -> hipError_t;
6095}
6096extern "C" {
6097    #[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"]
6098    pub fn hipMemcpyHtoA(
6099        dstArray: hipArray_t,
6100        dstOffset: usize,
6101        srcHost: *const ::std::os::raw::c_void,
6102        count: usize,
6103    ) -> hipError_t;
6104}
6105extern "C" {
6106    #[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"]
6107    pub fn hipMemcpy3D(p: *const hipMemcpy3DParms) -> hipError_t;
6108}
6109extern "C" {
6110    #[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"]
6111    pub fn hipMemcpy3DAsync(p: *const hipMemcpy3DParms, stream: hipStream_t) -> hipError_t;
6112}
6113extern "C" {
6114    #[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"]
6115    pub fn hipDrvMemcpy3D(pCopy: *const HIP_MEMCPY3D) -> hipError_t;
6116}
6117extern "C" {
6118    #[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"]
6119    pub fn hipDrvMemcpy3DAsync(pCopy: *const HIP_MEMCPY3D, stream: hipStream_t) -> hipError_t;
6120}
6121extern "C" {
6122    #[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"]
6123    pub fn hipMemGetAddressRange(
6124        pbase: *mut hipDeviceptr_t,
6125        psize: *mut usize,
6126        dptr: hipDeviceptr_t,
6127    ) -> hipError_t;
6128}
6129extern "C" {
6130    #[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"]
6131    pub fn hipDeviceCanAccessPeer(
6132        canAccessPeer: *mut ::std::os::raw::c_int,
6133        deviceId: ::std::os::raw::c_int,
6134        peerDeviceId: ::std::os::raw::c_int,
6135    ) -> hipError_t;
6136}
6137extern "C" {
6138    #[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."]
6139    pub fn hipDeviceEnablePeerAccess(
6140        peerDeviceId: ::std::os::raw::c_int,
6141        flags: ::std::os::raw::c_uint,
6142    ) -> hipError_t;
6143}
6144extern "C" {
6145    #[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"]
6146    pub fn hipDeviceDisablePeerAccess(peerDeviceId: ::std::os::raw::c_int) -> hipError_t;
6147}
6148extern "C" {
6149    #[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"]
6150    pub fn hipMemcpyPeer(
6151        dst: *mut ::std::os::raw::c_void,
6152        dstDeviceId: ::std::os::raw::c_int,
6153        src: *const ::std::os::raw::c_void,
6154        srcDeviceId: ::std::os::raw::c_int,
6155        sizeBytes: usize,
6156    ) -> hipError_t;
6157}
6158extern "C" {
6159    #[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"]
6160    pub fn hipMemcpyPeerAsync(
6161        dst: *mut ::std::os::raw::c_void,
6162        dstDeviceId: ::std::os::raw::c_int,
6163        src: *const ::std::os::raw::c_void,
6164        srcDevice: ::std::os::raw::c_int,
6165        sizeBytes: usize,
6166        stream: hipStream_t,
6167    ) -> hipError_t;
6168}
6169extern "C" {
6170    #[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"]
6171    pub fn hipCtxCreate(
6172        ctx: *mut hipCtx_t,
6173        flags: ::std::os::raw::c_uint,
6174        device: hipDevice_t,
6175    ) -> hipError_t;
6176}
6177extern "C" {
6178    #[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."]
6179    pub fn hipCtxDestroy(ctx: hipCtx_t) -> hipError_t;
6180}
6181extern "C" {
6182    #[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."]
6183    pub fn hipCtxPopCurrent(ctx: *mut hipCtx_t) -> hipError_t;
6184}
6185extern "C" {
6186    #[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."]
6187    pub fn hipCtxPushCurrent(ctx: hipCtx_t) -> hipError_t;
6188}
6189extern "C" {
6190    #[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."]
6191    pub fn hipCtxSetCurrent(ctx: hipCtx_t) -> hipError_t;
6192}
6193extern "C" {
6194    #[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."]
6195    pub fn hipCtxGetCurrent(ctx: *mut hipCtx_t) -> hipError_t;
6196}
6197extern "C" {
6198    #[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."]
6199    pub fn hipCtxGetDevice(device: *mut hipDevice_t) -> hipError_t;
6200}
6201extern "C" {
6202    #[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."]
6203    pub fn hipCtxGetApiVersion(
6204        ctx: hipCtx_t,
6205        apiVersion: *mut ::std::os::raw::c_uint,
6206    ) -> hipError_t;
6207}
6208extern "C" {
6209    #[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."]
6210    pub fn hipCtxGetCacheConfig(cacheConfig: *mut hipFuncCache_t) -> hipError_t;
6211}
6212extern "C" {
6213    #[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."]
6214    pub fn hipCtxSetCacheConfig(cacheConfig: hipFuncCache_t) -> hipError_t;
6215}
6216extern "C" {
6217    #[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."]
6218    pub fn hipCtxSetSharedMemConfig(config: hipSharedMemConfig) -> hipError_t;
6219}
6220extern "C" {
6221    #[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."]
6222    pub fn hipCtxGetSharedMemConfig(pConfig: *mut hipSharedMemConfig) -> hipError_t;
6223}
6224extern "C" {
6225    #[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."]
6226    pub fn hipCtxSynchronize() -> hipError_t;
6227}
6228extern "C" {
6229    #[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."]
6230    pub fn hipCtxGetFlags(flags: *mut ::std::os::raw::c_uint) -> hipError_t;
6231}
6232extern "C" {
6233    #[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."]
6234    pub fn hipCtxEnablePeerAccess(peerCtx: hipCtx_t, flags: ::std::os::raw::c_uint) -> hipError_t;
6235}
6236extern "C" {
6237    #[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."]
6238    pub fn hipCtxDisablePeerAccess(peerCtx: hipCtx_t) -> hipError_t;
6239}
6240extern "C" {
6241    #[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."]
6242    pub fn hipDevicePrimaryCtxGetState(
6243        dev: hipDevice_t,
6244        flags: *mut ::std::os::raw::c_uint,
6245        active: *mut ::std::os::raw::c_int,
6246    ) -> hipError_t;
6247}
6248extern "C" {
6249    #[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 NVIDIA\n platform."]
6250    pub fn hipDevicePrimaryCtxRelease(dev: hipDevice_t) -> hipError_t;
6251}
6252extern "C" {
6253    #[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 NVIDIA\n platform."]
6254    pub fn hipDevicePrimaryCtxRetain(pctx: *mut hipCtx_t, dev: hipDevice_t) -> hipError_t;
6255}
6256extern "C" {
6257    #[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 NVIDIA\n platform."]
6258    pub fn hipDevicePrimaryCtxReset(dev: hipDevice_t) -> hipError_t;
6259}
6260extern "C" {
6261    #[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 NVIDIA\n platform."]
6262    pub fn hipDevicePrimaryCtxSetFlags(
6263        dev: hipDevice_t,
6264        flags: ::std::os::raw::c_uint,
6265    ) -> hipError_t;
6266}
6267extern "C" {
6268    #[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 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"]
6269    pub fn hipModuleLoad(
6270        module: *mut hipModule_t,
6271        fname: *const ::std::os::raw::c_char,
6272    ) -> hipError_t;
6273}
6274extern "C" {
6275    #[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."]
6276    pub fn hipModuleUnload(module: hipModule_t) -> hipError_t;
6277}
6278extern "C" {
6279    #[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,"]
6280    pub fn hipModuleGetFunction(
6281        function: *mut hipFunction_t,
6282        module: hipModule_t,
6283        kname: *const ::std::os::raw::c_char,
6284    ) -> hipError_t;
6285}
6286extern "C" {
6287    #[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"]
6288    pub fn hipFuncGetAttributes(
6289        attr: *mut hipFuncAttributes,
6290        func: *const ::std::os::raw::c_void,
6291    ) -> hipError_t;
6292}
6293extern "C" {
6294    #[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"]
6295    pub fn hipFuncGetAttribute(
6296        value: *mut ::std::os::raw::c_int,
6297        attrib: hipFunction_attribute,
6298        hfunc: hipFunction_t,
6299    ) -> hipError_t;
6300}
6301extern "C" {
6302    #[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"]
6303    pub fn hipGetFuncBySymbol(
6304        functionPtr: *mut hipFunction_t,
6305        symbolPtr: *const ::std::os::raw::c_void,
6306    ) -> hipError_t;
6307}
6308extern "C" {
6309    #[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"]
6310    pub fn hipModuleGetTexRef(
6311        texRef: *mut *mut textureReference,
6312        hmod: hipModule_t,
6313        name: *const ::std::os::raw::c_char,
6314    ) -> hipError_t;
6315}
6316extern "C" {
6317    #[doc = " @brief builds module from code object which resides in host memory. Image is pointer to that\n location.\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"]
6318    pub fn hipModuleLoadData(
6319        module: *mut hipModule_t,
6320        image: *const ::std::os::raw::c_void,
6321    ) -> hipError_t;
6322}
6323extern "C" {
6324    #[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"]
6325    pub fn hipModuleLoadDataEx(
6326        module: *mut hipModule_t,
6327        image: *const ::std::os::raw::c_void,
6328        numOptions: ::std::os::raw::c_uint,
6329        options: *mut hipJitOption,
6330        optionValues: *mut *mut ::std::os::raw::c_void,
6331    ) -> hipError_t;
6332}
6333extern "C" {
6334    #[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"]
6335    pub fn hipLinkAddData(
6336        state: hipLinkState_t,
6337        type_: hipJitInputType,
6338        data: *mut ::std::os::raw::c_void,
6339        size: usize,
6340        name: *const ::std::os::raw::c_char,
6341        numOptions: ::std::os::raw::c_uint,
6342        options: *mut hipJitOption,
6343        optionValues: *mut *mut ::std::os::raw::c_void,
6344    ) -> hipError_t;
6345}
6346extern "C" {
6347    #[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"]
6348    pub fn hipLinkAddFile(
6349        state: hipLinkState_t,
6350        type_: hipJitInputType,
6351        path: *const ::std::os::raw::c_char,
6352        numOptions: ::std::os::raw::c_uint,
6353        options: *mut hipJitOption,
6354        optionValues: *mut *mut ::std::os::raw::c_void,
6355    ) -> hipError_t;
6356}
6357extern "C" {
6358    #[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"]
6359    pub fn hipLinkComplete(
6360        state: hipLinkState_t,
6361        hipBinOut: *mut *mut ::std::os::raw::c_void,
6362        sizeOut: *mut usize,
6363    ) -> hipError_t;
6364}
6365extern "C" {
6366    #[doc = " @brief Creates a linker instance with options.\n @param [in] numOptions  Number of options\n @param [in] option  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"]
6367    pub fn hipLinkCreate(
6368        numOptions: ::std::os::raw::c_uint,
6369        options: *mut hipJitOption,
6370        optionValues: *mut *mut ::std::os::raw::c_void,
6371        stateOut: *mut hipLinkState_t,
6372    ) -> hipError_t;
6373}
6374extern "C" {
6375    #[doc = " @brief Deletes the linker instance.\n @param [in] state link state instance\n\n @returns #hipSuccess #hipErrorInvalidValue\n\n @see hipSuccess"]
6376    pub fn hipLinkDestroy(state: hipLinkState_t) -> hipError_t;
6377}
6378extern "C" {
6379    #[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 each\n argument should be a multiple of its size in bytes. Please refer to hip_porting_driver_api.md\n 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"]
6380    pub fn hipModuleLaunchKernel(
6381        f: hipFunction_t,
6382        gridDimX: ::std::os::raw::c_uint,
6383        gridDimY: ::std::os::raw::c_uint,
6384        gridDimZ: ::std::os::raw::c_uint,
6385        blockDimX: ::std::os::raw::c_uint,
6386        blockDimY: ::std::os::raw::c_uint,
6387        blockDimZ: ::std::os::raw::c_uint,
6388        sharedMemBytes: ::std::os::raw::c_uint,
6389        stream: hipStream_t,
6390        kernelParams: *mut *mut ::std::os::raw::c_void,
6391        extra: *mut *mut ::std::os::raw::c_void,
6392    ) -> hipError_t;
6393}
6394extern "C" {
6395    #[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"]
6396    pub fn hipModuleLaunchCooperativeKernel(
6397        f: hipFunction_t,
6398        gridDimX: ::std::os::raw::c_uint,
6399        gridDimY: ::std::os::raw::c_uint,
6400        gridDimZ: ::std::os::raw::c_uint,
6401        blockDimX: ::std::os::raw::c_uint,
6402        blockDimY: ::std::os::raw::c_uint,
6403        blockDimZ: ::std::os::raw::c_uint,
6404        sharedMemBytes: ::std::os::raw::c_uint,
6405        stream: hipStream_t,
6406        kernelParams: *mut *mut ::std::os::raw::c_void,
6407    ) -> hipError_t;
6408}
6409extern "C" {
6410    #[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"]
6411    pub fn hipModuleLaunchCooperativeKernelMultiDevice(
6412        launchParamsList: *mut hipFunctionLaunchParams,
6413        numDevices: ::std::os::raw::c_uint,
6414        flags: ::std::os::raw::c_uint,
6415    ) -> hipError_t;
6416}
6417extern "C" {
6418    #[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"]
6419    pub fn hipLaunchCooperativeKernel(
6420        f: *const ::std::os::raw::c_void,
6421        gridDim: dim3,
6422        blockDimX: dim3,
6423        kernelParams: *mut *mut ::std::os::raw::c_void,
6424        sharedMemBytes: ::std::os::raw::c_uint,
6425        stream: hipStream_t,
6426    ) -> hipError_t;
6427}
6428extern "C" {
6429    #[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"]
6430    pub fn hipLaunchCooperativeKernelMultiDevice(
6431        launchParamsList: *mut hipLaunchParams,
6432        numDevices: ::std::os::raw::c_int,
6433        flags: ::std::os::raw::c_uint,
6434    ) -> hipError_t;
6435}
6436extern "C" {
6437    #[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 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"]
6438    pub fn hipExtLaunchMultiKernelMultiDevice(
6439        launchParamsList: *mut hipLaunchParams,
6440        numDevices: ::std::os::raw::c_int,
6441        flags: ::std::os::raw::c_uint,
6442    ) -> hipError_t;
6443}
6444extern "C" {
6445    #[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."]
6446    pub fn hipLaunchKernelExC(
6447        config: *const hipLaunchConfig_t,
6448        fPtr: *const ::std::os::raw::c_void,
6449        args: *mut *mut ::std::os::raw::c_void,
6450    ) -> hipError_t;
6451}
6452extern "C" {
6453    #[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."]
6454    pub fn hipDrvLaunchKernelEx(
6455        config: *const HIP_LAUNCH_CONFIG,
6456        f: hipFunction_t,
6457        params: *mut *mut ::std::os::raw::c_void,
6458        extra: *mut *mut ::std::os::raw::c_void,
6459    ) -> hipError_t;
6460}
6461extern "C" {
6462    #[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."]
6463    pub fn hipMemGetHandleForAddressRange(
6464        handle: *mut ::std::os::raw::c_void,
6465        dptr: hipDeviceptr_t,
6466        size: usize,
6467        handleType: hipMemRangeHandleType,
6468        flags: ::std::os::raw::c_ulonglong,
6469    ) -> hipError_t;
6470}
6471extern "C" {
6472    #[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"]
6473    pub fn hipModuleOccupancyMaxPotentialBlockSize(
6474        gridSize: *mut ::std::os::raw::c_int,
6475        blockSize: *mut ::std::os::raw::c_int,
6476        f: hipFunction_t,
6477        dynSharedMemPerBlk: usize,
6478        blockSizeLimit: ::std::os::raw::c_int,
6479    ) -> hipError_t;
6480}
6481extern "C" {
6482    #[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"]
6483    pub fn hipModuleOccupancyMaxPotentialBlockSizeWithFlags(
6484        gridSize: *mut ::std::os::raw::c_int,
6485        blockSize: *mut ::std::os::raw::c_int,
6486        f: hipFunction_t,
6487        dynSharedMemPerBlk: usize,
6488        blockSizeLimit: ::std::os::raw::c_int,
6489        flags: ::std::os::raw::c_uint,
6490    ) -> hipError_t;
6491}
6492extern "C" {
6493    #[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"]
6494    pub fn hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(
6495        numBlocks: *mut ::std::os::raw::c_int,
6496        f: hipFunction_t,
6497        blockSize: ::std::os::raw::c_int,
6498        dynSharedMemPerBlk: usize,
6499    ) -> hipError_t;
6500}
6501extern "C" {
6502    #[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"]
6503    pub fn hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
6504        numBlocks: *mut ::std::os::raw::c_int,
6505        f: hipFunction_t,
6506        blockSize: ::std::os::raw::c_int,
6507        dynSharedMemPerBlk: usize,
6508        flags: ::std::os::raw::c_uint,
6509    ) -> hipError_t;
6510}
6511extern "C" {
6512    #[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"]
6513    pub fn hipOccupancyMaxActiveBlocksPerMultiprocessor(
6514        numBlocks: *mut ::std::os::raw::c_int,
6515        f: *const ::std::os::raw::c_void,
6516        blockSize: ::std::os::raw::c_int,
6517        dynSharedMemPerBlk: usize,
6518    ) -> hipError_t;
6519}
6520extern "C" {
6521    #[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"]
6522    pub fn hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
6523        numBlocks: *mut ::std::os::raw::c_int,
6524        f: *const ::std::os::raw::c_void,
6525        blockSize: ::std::os::raw::c_int,
6526        dynSharedMemPerBlk: usize,
6527        flags: ::std::os::raw::c_uint,
6528    ) -> hipError_t;
6529}
6530extern "C" {
6531    #[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"]
6532    pub fn hipOccupancyMaxPotentialBlockSize(
6533        gridSize: *mut ::std::os::raw::c_int,
6534        blockSize: *mut ::std::os::raw::c_int,
6535        f: *const ::std::os::raw::c_void,
6536        dynSharedMemPerBlk: usize,
6537        blockSizeLimit: ::std::os::raw::c_int,
6538    ) -> hipError_t;
6539}
6540extern "C" {
6541    #[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."]
6542    pub fn hipProfilerStart() -> hipError_t;
6543}
6544extern "C" {
6545    #[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."]
6546    pub fn hipProfilerStop() -> hipError_t;
6547}
6548extern "C" {
6549    #[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"]
6550    pub fn hipConfigureCall(
6551        gridDim: dim3,
6552        blockDim: dim3,
6553        sharedMem: usize,
6554        stream: hipStream_t,
6555    ) -> hipError_t;
6556}
6557extern "C" {
6558    #[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"]
6559    pub fn hipSetupArgument(
6560        arg: *const ::std::os::raw::c_void,
6561        size: usize,
6562        offset: usize,
6563    ) -> hipError_t;
6564}
6565extern "C" {
6566    #[doc = " @brief Launch a kernel.\n\n @param [in] func Kernel to launch.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue\n"]
6567    pub fn hipLaunchByPtr(func: *const ::std::os::raw::c_void) -> hipError_t;
6568}
6569extern "C" {
6570    #[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"]
6571    pub fn __hipPushCallConfiguration(
6572        gridDim: dim3,
6573        blockDim: dim3,
6574        sharedMem: usize,
6575        stream: hipStream_t,
6576    ) -> hipError_t;
6577}
6578extern "C" {
6579    #[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"]
6580    pub fn __hipPopCallConfiguration(
6581        gridDim: *mut dim3,
6582        blockDim: *mut dim3,
6583        sharedMem: *mut usize,
6584        stream: *mut hipStream_t,
6585    ) -> hipError_t;
6586}
6587extern "C" {
6588    #[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"]
6589    pub fn hipLaunchKernel(
6590        function_address: *const ::std::os::raw::c_void,
6591        numBlocks: dim3,
6592        dimBlocks: dim3,
6593        args: *mut *mut ::std::os::raw::c_void,
6594        sharedMemBytes: usize,
6595        stream: hipStream_t,
6596    ) -> hipError_t;
6597}
6598extern "C" {
6599    #[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 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."]
6600    pub fn hipLaunchHostFunc(
6601        stream: hipStream_t,
6602        fn_: hipHostFn_t,
6603        userData: *mut ::std::os::raw::c_void,
6604    ) -> hipError_t;
6605}
6606extern "C" {
6607    #[doc = " Copies memory for 2D arrays.\n\n @param pCopy           - Parameters for the memory copy\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
6608    pub fn hipDrvMemcpy2DUnaligned(pCopy: *const hip_Memcpy2D) -> hipError_t;
6609}
6610extern "C" {
6611    #[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"]
6612    pub fn hipExtLaunchKernel(
6613        function_address: *const ::std::os::raw::c_void,
6614        numBlocks: dim3,
6615        dimBlocks: dim3,
6616        args: *mut *mut ::std::os::raw::c_void,
6617        sharedMemBytes: usize,
6618        stream: hipStream_t,
6619        startEvent: hipEvent_t,
6620        stopEvent: hipEvent_t,
6621        flags: ::std::os::raw::c_int,
6622    ) -> hipError_t;
6623}
6624extern "C" {
6625    #[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 hipCreateTextureObject will\n return hipErrorNotSupported.\n"]
6626    pub fn hipCreateTextureObject(
6627        pTexObject: *mut hipTextureObject_t,
6628        pResDesc: *const hipResourceDesc,
6629        pTexDesc: *const hipTextureDesc,
6630        pResViewDesc: *const hipResourceViewDesc,
6631    ) -> hipError_t;
6632}
6633extern "C" {
6634    #[doc = " @brief Destroys a texture object.\n\n @param [in] textureObject  texture object to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
6635    pub fn hipDestroyTextureObject(textureObject: hipTextureObject_t) -> hipError_t;
6636}
6637extern "C" {
6638    #[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"]
6639    pub fn hipGetChannelDesc(
6640        desc: *mut hipChannelFormatDesc,
6641        array: hipArray_const_t,
6642    ) -> hipError_t;
6643}
6644extern "C" {
6645    #[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"]
6646    pub fn hipGetTextureObjectResourceDesc(
6647        pResDesc: *mut hipResourceDesc,
6648        textureObject: hipTextureObject_t,
6649    ) -> hipError_t;
6650}
6651extern "C" {
6652    #[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"]
6653    pub fn hipGetTextureObjectResourceViewDesc(
6654        pResViewDesc: *mut hipResourceViewDesc,
6655        textureObject: hipTextureObject_t,
6656    ) -> hipError_t;
6657}
6658extern "C" {
6659    #[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"]
6660    pub fn hipGetTextureObjectTextureDesc(
6661        pTexDesc: *mut hipTextureDesc,
6662        textureObject: hipTextureObject_t,
6663    ) -> hipError_t;
6664}
6665extern "C" {
6666    #[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"]
6667    pub fn hipTexObjectCreate(
6668        pTexObject: *mut hipTextureObject_t,
6669        pResDesc: *const HIP_RESOURCE_DESC,
6670        pTexDesc: *const HIP_TEXTURE_DESC,
6671        pResViewDesc: *const HIP_RESOURCE_VIEW_DESC,
6672    ) -> hipError_t;
6673}
6674extern "C" {
6675    #[doc = " @brief Destroys a texture object.\n\n @param [in] texObject  texture object to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
6676    pub fn hipTexObjectDestroy(texObject: hipTextureObject_t) -> hipError_t;
6677}
6678extern "C" {
6679    #[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"]
6680    pub fn hipTexObjectGetResourceDesc(
6681        pResDesc: *mut HIP_RESOURCE_DESC,
6682        texObject: hipTextureObject_t,
6683    ) -> hipError_t;
6684}
6685extern "C" {
6686    #[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"]
6687    pub fn hipTexObjectGetResourceViewDesc(
6688        pResViewDesc: *mut HIP_RESOURCE_VIEW_DESC,
6689        texObject: hipTextureObject_t,
6690    ) -> hipError_t;
6691}
6692extern "C" {
6693    #[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"]
6694    pub fn hipTexObjectGetTextureDesc(
6695        pTexDesc: *mut HIP_TEXTURE_DESC,
6696        texObject: hipTextureObject_t,
6697    ) -> hipError_t;
6698}
6699extern "C" {
6700    #[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"]
6701    pub fn hipMallocMipmappedArray(
6702        mipmappedArray: *mut hipMipmappedArray_t,
6703        desc: *const hipChannelFormatDesc,
6704        extent: hipExtent,
6705        numLevels: ::std::os::raw::c_uint,
6706        flags: ::std::os::raw::c_uint,
6707    ) -> hipError_t;
6708}
6709extern "C" {
6710    #[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"]
6711    pub fn hipFreeMipmappedArray(mipmappedArray: hipMipmappedArray_t) -> hipError_t;
6712}
6713extern "C" {
6714    #[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"]
6715    pub fn hipGetMipmappedArrayLevel(
6716        levelArray: *mut hipArray_t,
6717        mipmappedArray: hipMipmappedArray_const_t,
6718        level: ::std::os::raw::c_uint,
6719    ) -> hipError_t;
6720}
6721extern "C" {
6722    #[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."]
6723    pub fn hipMipmappedArrayCreate(
6724        pHandle: *mut hipMipmappedArray_t,
6725        pMipmappedArrayDesc: *mut HIP_ARRAY3D_DESCRIPTOR,
6726        numMipmapLevels: ::std::os::raw::c_uint,
6727    ) -> hipError_t;
6728}
6729extern "C" {
6730    #[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"]
6731    pub fn hipMipmappedArrayDestroy(hMipmappedArray: hipMipmappedArray_t) -> hipError_t;
6732}
6733extern "C" {
6734    #[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"]
6735    pub fn hipMipmappedArrayGetLevel(
6736        pLevelArray: *mut hipArray_t,
6737        hMipMappedArray: hipMipmappedArray_t,
6738        level: ::std::os::raw::c_uint,
6739    ) -> hipError_t;
6740}
6741extern "C" {
6742    #[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"]
6743    pub fn hipBindTextureToMipmappedArray(
6744        tex: *const textureReference,
6745        mipmappedArray: hipMipmappedArray_const_t,
6746        desc: *const hipChannelFormatDesc,
6747    ) -> hipError_t;
6748}
6749extern "C" {
6750    #[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"]
6751    pub fn hipGetTextureReference(
6752        texref: *mut *const textureReference,
6753        symbol: *const ::std::os::raw::c_void,
6754    ) -> hipError_t;
6755}
6756extern "C" {
6757    #[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"]
6758    pub fn hipTexRefGetBorderColor(
6759        pBorderColor: *mut f32,
6760        texRef: *const textureReference,
6761    ) -> hipError_t;
6762}
6763extern "C" {
6764    #[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"]
6765    pub fn hipTexRefGetArray(
6766        pArray: *mut hipArray_t,
6767        texRef: *const textureReference,
6768    ) -> hipError_t;
6769}
6770extern "C" {
6771    #[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"]
6772    pub fn hipTexRefSetAddressMode(
6773        texRef: *mut textureReference,
6774        dim: ::std::os::raw::c_int,
6775        am: hipTextureAddressMode,
6776    ) -> hipError_t;
6777}
6778extern "C" {
6779    #[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"]
6780    pub fn hipTexRefSetArray(
6781        tex: *mut textureReference,
6782        array: hipArray_const_t,
6783        flags: ::std::os::raw::c_uint,
6784    ) -> hipError_t;
6785}
6786extern "C" {
6787    #[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"]
6788    pub fn hipTexRefSetFilterMode(
6789        texRef: *mut textureReference,
6790        fm: hipTextureFilterMode,
6791    ) -> hipError_t;
6792}
6793extern "C" {
6794    #[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"]
6795    pub fn hipTexRefSetFlags(
6796        texRef: *mut textureReference,
6797        Flags: ::std::os::raw::c_uint,
6798    ) -> hipError_t;
6799}
6800extern "C" {
6801    #[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"]
6802    pub fn hipTexRefSetFormat(
6803        texRef: *mut textureReference,
6804        fmt: hipArray_Format,
6805        NumPackedComponents: ::std::os::raw::c_int,
6806    ) -> hipError_t;
6807}
6808extern "C" {
6809    #[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"]
6810    pub fn hipBindTexture(
6811        offset: *mut usize,
6812        tex: *const textureReference,
6813        devPtr: *const ::std::os::raw::c_void,
6814        desc: *const hipChannelFormatDesc,
6815        size: usize,
6816    ) -> hipError_t;
6817}
6818extern "C" {
6819    #[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"]
6820    pub fn hipBindTexture2D(
6821        offset: *mut usize,
6822        tex: *const textureReference,
6823        devPtr: *const ::std::os::raw::c_void,
6824        desc: *const hipChannelFormatDesc,
6825        width: usize,
6826        height: usize,
6827        pitch: usize,
6828    ) -> hipError_t;
6829}
6830extern "C" {
6831    #[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"]
6832    pub fn hipBindTextureToArray(
6833        tex: *const textureReference,
6834        array: hipArray_const_t,
6835        desc: *const hipChannelFormatDesc,
6836    ) -> hipError_t;
6837}
6838extern "C" {
6839    #[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"]
6840    pub fn hipGetTextureAlignmentOffset(
6841        offset: *mut usize,
6842        texref: *const textureReference,
6843    ) -> hipError_t;
6844}
6845extern "C" {
6846    #[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"]
6847    pub fn hipUnbindTexture(tex: *const textureReference) -> hipError_t;
6848}
6849extern "C" {
6850    #[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"]
6851    pub fn hipTexRefGetAddress(
6852        dev_ptr: *mut hipDeviceptr_t,
6853        texRef: *const textureReference,
6854    ) -> hipError_t;
6855}
6856extern "C" {
6857    #[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"]
6858    pub fn hipTexRefGetAddressMode(
6859        pam: *mut hipTextureAddressMode,
6860        texRef: *const textureReference,
6861        dim: ::std::os::raw::c_int,
6862    ) -> hipError_t;
6863}
6864extern "C" {
6865    #[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"]
6866    pub fn hipTexRefGetFilterMode(
6867        pfm: *mut hipTextureFilterMode,
6868        texRef: *const textureReference,
6869    ) -> hipError_t;
6870}
6871extern "C" {
6872    #[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"]
6873    pub fn hipTexRefGetFlags(
6874        pFlags: *mut ::std::os::raw::c_uint,
6875        texRef: *const textureReference,
6876    ) -> hipError_t;
6877}
6878extern "C" {
6879    #[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"]
6880    pub fn hipTexRefGetFormat(
6881        pFormat: *mut hipArray_Format,
6882        pNumChannels: *mut ::std::os::raw::c_int,
6883        texRef: *const textureReference,
6884    ) -> hipError_t;
6885}
6886extern "C" {
6887    #[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"]
6888    pub fn hipTexRefGetMaxAnisotropy(
6889        pmaxAnsio: *mut ::std::os::raw::c_int,
6890        texRef: *const textureReference,
6891    ) -> hipError_t;
6892}
6893extern "C" {
6894    #[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"]
6895    pub fn hipTexRefGetMipmapFilterMode(
6896        pfm: *mut hipTextureFilterMode,
6897        texRef: *const textureReference,
6898    ) -> hipError_t;
6899}
6900extern "C" {
6901    #[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"]
6902    pub fn hipTexRefGetMipmapLevelBias(
6903        pbias: *mut f32,
6904        texRef: *const textureReference,
6905    ) -> hipError_t;
6906}
6907extern "C" {
6908    #[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"]
6909    pub fn hipTexRefGetMipmapLevelClamp(
6910        pminMipmapLevelClamp: *mut f32,
6911        pmaxMipmapLevelClamp: *mut f32,
6912        texRef: *const textureReference,
6913    ) -> hipError_t;
6914}
6915extern "C" {
6916    #[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"]
6917    pub fn hipTexRefGetMipMappedArray(
6918        pArray: *mut hipMipmappedArray_t,
6919        texRef: *const textureReference,
6920    ) -> hipError_t;
6921}
6922extern "C" {
6923    #[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"]
6924    pub fn hipTexRefSetAddress(
6925        ByteOffset: *mut usize,
6926        texRef: *mut textureReference,
6927        dptr: hipDeviceptr_t,
6928        bytes: usize,
6929    ) -> hipError_t;
6930}
6931extern "C" {
6932    #[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"]
6933    pub fn hipTexRefSetAddress2D(
6934        texRef: *mut textureReference,
6935        desc: *const HIP_ARRAY_DESCRIPTOR,
6936        dptr: hipDeviceptr_t,
6937        Pitch: usize,
6938    ) -> hipError_t;
6939}
6940extern "C" {
6941    #[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"]
6942    pub fn hipTexRefSetMaxAnisotropy(
6943        texRef: *mut textureReference,
6944        maxAniso: ::std::os::raw::c_uint,
6945    ) -> hipError_t;
6946}
6947extern "C" {
6948    #[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"]
6949    pub fn hipTexRefSetBorderColor(
6950        texRef: *mut textureReference,
6951        pBorderColor: *mut f32,
6952    ) -> hipError_t;
6953}
6954extern "C" {
6955    #[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"]
6956    pub fn hipTexRefSetMipmapFilterMode(
6957        texRef: *mut textureReference,
6958        fm: hipTextureFilterMode,
6959    ) -> hipError_t;
6960}
6961extern "C" {
6962    #[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"]
6963    pub fn hipTexRefSetMipmapLevelBias(texRef: *mut textureReference, bias: f32) -> hipError_t;
6964}
6965extern "C" {
6966    #[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"]
6967    pub fn hipTexRefSetMipmapLevelClamp(
6968        texRef: *mut textureReference,
6969        minMipMapLevelClamp: f32,
6970        maxMipMapLevelClamp: f32,
6971    ) -> hipError_t;
6972}
6973extern "C" {
6974    #[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"]
6975    pub fn hipTexRefSetMipmappedArray(
6976        texRef: *mut textureReference,
6977        mipmappedArray: *mut hipMipmappedArray,
6978        Flags: ::std::os::raw::c_uint,
6979    ) -> hipError_t;
6980}
6981extern "C" {
6982    #[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"]
6983    pub fn hipApiName(id: u32) -> *const ::std::os::raw::c_char;
6984}
6985extern "C" {
6986    #[doc = " @brief Returns kernel name reference by function name.\n\n @param [in] f Name of function\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
6987    pub fn hipKernelNameRef(f: hipFunction_t) -> *const ::std::os::raw::c_char;
6988}
6989extern "C" {
6990    #[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"]
6991    pub fn hipKernelNameRefByPtr(
6992        hostFunction: *const ::std::os::raw::c_void,
6993        stream: hipStream_t,
6994    ) -> *const ::std::os::raw::c_char;
6995}
6996extern "C" {
6997    #[doc = " @brief Returns device ID on the stream.\n\n @param [in] stream Stream of device executed on.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
6998    pub fn hipGetStreamDeviceId(stream: hipStream_t) -> ::std::os::raw::c_int;
6999}
7000extern "C" {
7001    #[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"]
7002    pub fn hipStreamBeginCapture(stream: hipStream_t, mode: hipStreamCaptureMode) -> hipError_t;
7003}
7004extern "C" {
7005    #[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."]
7006    pub fn hipStreamBeginCaptureToGraph(
7007        stream: hipStream_t,
7008        graph: hipGraph_t,
7009        dependencies: *const hipGraphNode_t,
7010        dependencyData: *const hipGraphEdgeData,
7011        numDependencies: usize,
7012        mode: hipStreamCaptureMode,
7013    ) -> hipError_t;
7014}
7015extern "C" {
7016    #[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"]
7017    pub fn hipStreamEndCapture(stream: hipStream_t, pGraph: *mut hipGraph_t) -> hipError_t;
7018}
7019extern "C" {
7020    #[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"]
7021    pub fn hipStreamGetCaptureInfo(
7022        stream: hipStream_t,
7023        pCaptureStatus: *mut hipStreamCaptureStatus,
7024        pId: *mut ::std::os::raw::c_ulonglong,
7025    ) -> hipError_t;
7026}
7027extern "C" {
7028    #[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 dependencies.\n @param [out] numDependencies_out - Returns size of the array returned in dependencies_out.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorStreamCaptureImplicit\n"]
7029    pub fn hipStreamGetCaptureInfo_v2(
7030        stream: hipStream_t,
7031        captureStatus_out: *mut hipStreamCaptureStatus,
7032        id_out: *mut ::std::os::raw::c_ulonglong,
7033        graph_out: *mut hipGraph_t,
7034        dependencies_out: *mut *const hipGraphNode_t,
7035        numDependencies_out: *mut usize,
7036    ) -> hipError_t;
7037}
7038extern "C" {
7039    #[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"]
7040    pub fn hipStreamIsCapturing(
7041        stream: hipStream_t,
7042        pCaptureStatus: *mut hipStreamCaptureStatus,
7043    ) -> hipError_t;
7044}
7045extern "C" {
7046    #[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"]
7047    pub fn hipStreamUpdateCaptureDependencies(
7048        stream: hipStream_t,
7049        dependencies: *mut hipGraphNode_t,
7050        numDependencies: usize,
7051        flags: ::std::os::raw::c_uint,
7052    ) -> hipError_t;
7053}
7054extern "C" {
7055    #[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"]
7056    pub fn hipThreadExchangeStreamCaptureMode(mode: *mut hipStreamCaptureMode) -> hipError_t;
7057}
7058extern "C" {
7059    #[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"]
7060    pub fn hipGraphCreate(pGraph: *mut hipGraph_t, flags: ::std::os::raw::c_uint) -> hipError_t;
7061}
7062extern "C" {
7063    #[doc = " @brief Destroys a graph\n\n @param [in] graph - instance of graph to destroy.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7064    pub fn hipGraphDestroy(graph: hipGraph_t) -> hipError_t;
7065}
7066extern "C" {
7067    #[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"]
7068    pub fn hipGraphAddDependencies(
7069        graph: hipGraph_t,
7070        from: *const hipGraphNode_t,
7071        to: *const hipGraphNode_t,
7072        numDependencies: usize,
7073    ) -> hipError_t;
7074}
7075extern "C" {
7076    #[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"]
7077    pub fn hipGraphRemoveDependencies(
7078        graph: hipGraph_t,
7079        from: *const hipGraphNode_t,
7080        to: *const hipGraphNode_t,
7081        numDependencies: usize,
7082    ) -> hipError_t;
7083}
7084extern "C" {
7085    #[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"]
7086    pub fn hipGraphGetEdges(
7087        graph: hipGraph_t,
7088        from: *mut hipGraphNode_t,
7089        to: *mut hipGraphNode_t,
7090        numEdges: *mut usize,
7091    ) -> hipError_t;
7092}
7093extern "C" {
7094    #[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"]
7095    pub fn hipGraphGetNodes(
7096        graph: hipGraph_t,
7097        nodes: *mut hipGraphNode_t,
7098        numNodes: *mut usize,
7099    ) -> hipError_t;
7100}
7101extern "C" {
7102    #[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"]
7103    pub fn hipGraphGetRootNodes(
7104        graph: hipGraph_t,
7105        pRootNodes: *mut hipGraphNode_t,
7106        pNumRootNodes: *mut usize,
7107    ) -> hipError_t;
7108}
7109extern "C" {
7110    #[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"]
7111    pub fn hipGraphNodeGetDependencies(
7112        node: hipGraphNode_t,
7113        pDependencies: *mut hipGraphNode_t,
7114        pNumDependencies: *mut usize,
7115    ) -> hipError_t;
7116}
7117extern "C" {
7118    #[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 nodes\n 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"]
7119    pub fn hipGraphNodeGetDependentNodes(
7120        node: hipGraphNode_t,
7121        pDependentNodes: *mut hipGraphNode_t,
7122        pNumDependentNodes: *mut usize,
7123    ) -> hipError_t;
7124}
7125extern "C" {
7126    #[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"]
7127    pub fn hipGraphNodeGetType(node: hipGraphNode_t, pType: *mut hipGraphNodeType) -> hipError_t;
7128}
7129extern "C" {
7130    #[doc = " @brief Remove a node from the graph.\n\n @param [in] node - graph node to remove\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7131    pub fn hipGraphDestroyNode(node: hipGraphNode_t) -> hipError_t;
7132}
7133extern "C" {
7134    #[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"]
7135    pub fn hipGraphClone(pGraphClone: *mut hipGraph_t, originalGraph: hipGraph_t) -> hipError_t;
7136}
7137extern "C" {
7138    #[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"]
7139    pub fn hipGraphNodeFindInClone(
7140        pNode: *mut hipGraphNode_t,
7141        originalNode: hipGraphNode_t,
7142        clonedGraph: hipGraph_t,
7143    ) -> hipError_t;
7144}
7145extern "C" {
7146    #[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"]
7147    pub fn hipGraphInstantiate(
7148        pGraphExec: *mut hipGraphExec_t,
7149        graph: hipGraph_t,
7150        pErrorNode: *mut hipGraphNode_t,
7151        pLogBuffer: *mut ::std::os::raw::c_char,
7152        bufferSize: usize,
7153    ) -> hipError_t;
7154}
7155extern "C" {
7156    #[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."]
7157    pub fn hipGraphInstantiateWithFlags(
7158        pGraphExec: *mut hipGraphExec_t,
7159        graph: hipGraph_t,
7160        flags: ::std::os::raw::c_ulonglong,
7161    ) -> hipError_t;
7162}
7163extern "C" {
7164    #[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"]
7165    pub fn hipGraphInstantiateWithParams(
7166        pGraphExec: *mut hipGraphExec_t,
7167        graph: hipGraph_t,
7168        instantiateParams: *mut hipGraphInstantiateParams,
7169    ) -> hipError_t;
7170}
7171extern "C" {
7172    #[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"]
7173    pub fn hipGraphLaunch(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
7174}
7175extern "C" {
7176    #[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"]
7177    pub fn hipGraphUpload(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
7178}
7179extern "C" {
7180    #[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"]
7181    pub fn hipGraphAddNode(
7182        pGraphNode: *mut hipGraphNode_t,
7183        graph: hipGraph_t,
7184        pDependencies: *const hipGraphNode_t,
7185        numDependencies: usize,
7186        nodeParams: *mut hipGraphNodeParams,
7187    ) -> hipError_t;
7188}
7189extern "C" {
7190    #[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"]
7191    pub fn hipGraphExecGetFlags(
7192        graphExec: hipGraphExec_t,
7193        flags: *mut ::std::os::raw::c_ulonglong,
7194    ) -> hipError_t;
7195}
7196extern "C" {
7197    #[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, #hipErrorNotSupported.\n"]
7198    pub fn hipGraphNodeSetParams(
7199        node: hipGraphNode_t,
7200        nodeParams: *mut hipGraphNodeParams,
7201    ) -> hipError_t;
7202}
7203extern "C" {
7204    #[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, #hipErrorNotSupported.\n"]
7205    pub fn hipGraphExecNodeSetParams(
7206        graphExec: hipGraphExec_t,
7207        node: hipGraphNode_t,
7208        nodeParams: *mut hipGraphNodeParams,
7209    ) -> hipError_t;
7210}
7211extern "C" {
7212    #[doc = " @brief Destroys an executable graph\n\n @param [in] graphExec - Instance of executable graph to destroy.\n\n @returns #hipSuccess.\n"]
7213    pub fn hipGraphExecDestroy(graphExec: hipGraphExec_t) -> hipError_t;
7214}
7215extern "C" {
7216    #[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"]
7217    pub fn hipGraphExecUpdate(
7218        hGraphExec: hipGraphExec_t,
7219        hGraph: hipGraph_t,
7220        hErrorNode_out: *mut hipGraphNode_t,
7221        updateResult_out: *mut hipGraphExecUpdateResult,
7222    ) -> hipError_t;
7223}
7224extern "C" {
7225    #[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"]
7226    pub fn hipGraphAddKernelNode(
7227        pGraphNode: *mut hipGraphNode_t,
7228        graph: hipGraph_t,
7229        pDependencies: *const hipGraphNode_t,
7230        numDependencies: usize,
7231        pNodeParams: *const hipKernelNodeParams,
7232    ) -> hipError_t;
7233}
7234extern "C" {
7235    #[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"]
7236    pub fn hipGraphKernelNodeGetParams(
7237        node: hipGraphNode_t,
7238        pNodeParams: *mut hipKernelNodeParams,
7239    ) -> hipError_t;
7240}
7241extern "C" {
7242    #[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"]
7243    pub fn hipGraphKernelNodeSetParams(
7244        node: hipGraphNode_t,
7245        pNodeParams: *const hipKernelNodeParams,
7246    ) -> hipError_t;
7247}
7248extern "C" {
7249    #[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"]
7250    pub fn hipGraphExecKernelNodeSetParams(
7251        hGraphExec: hipGraphExec_t,
7252        node: hipGraphNode_t,
7253        pNodeParams: *const hipKernelNodeParams,
7254    ) -> hipError_t;
7255}
7256extern "C" {
7257    #[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"]
7258    pub fn hipDrvGraphAddMemcpyNode(
7259        phGraphNode: *mut hipGraphNode_t,
7260        hGraph: hipGraph_t,
7261        dependencies: *const hipGraphNode_t,
7262        numDependencies: usize,
7263        copyParams: *const HIP_MEMCPY3D,
7264        ctx: hipCtx_t,
7265    ) -> hipError_t;
7266}
7267extern "C" {
7268    #[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"]
7269    pub fn hipGraphAddMemcpyNode(
7270        pGraphNode: *mut hipGraphNode_t,
7271        graph: hipGraph_t,
7272        pDependencies: *const hipGraphNode_t,
7273        numDependencies: usize,
7274        pCopyParams: *const hipMemcpy3DParms,
7275    ) -> hipError_t;
7276}
7277extern "C" {
7278    #[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"]
7279    pub fn hipGraphMemcpyNodeGetParams(
7280        node: hipGraphNode_t,
7281        pNodeParams: *mut hipMemcpy3DParms,
7282    ) -> hipError_t;
7283}
7284extern "C" {
7285    #[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"]
7286    pub fn hipGraphMemcpyNodeSetParams(
7287        node: hipGraphNode_t,
7288        pNodeParams: *const hipMemcpy3DParms,
7289    ) -> hipError_t;
7290}
7291extern "C" {
7292    #[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"]
7293    pub fn hipGraphKernelNodeSetAttribute(
7294        hNode: hipGraphNode_t,
7295        attr: hipLaunchAttributeID,
7296        value: *const hipLaunchAttributeValue,
7297    ) -> hipError_t;
7298}
7299extern "C" {
7300    #[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"]
7301    pub fn hipGraphKernelNodeGetAttribute(
7302        hNode: hipGraphNode_t,
7303        attr: hipLaunchAttributeID,
7304        value: *mut hipLaunchAttributeValue,
7305    ) -> hipError_t;
7306}
7307extern "C" {
7308    #[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"]
7309    pub fn hipGraphExecMemcpyNodeSetParams(
7310        hGraphExec: hipGraphExec_t,
7311        node: hipGraphNode_t,
7312        pNodeParams: *mut hipMemcpy3DParms,
7313    ) -> hipError_t;
7314}
7315extern "C" {
7316    #[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"]
7317    pub fn hipGraphAddMemcpyNode1D(
7318        pGraphNode: *mut hipGraphNode_t,
7319        graph: hipGraph_t,
7320        pDependencies: *const hipGraphNode_t,
7321        numDependencies: usize,
7322        dst: *mut ::std::os::raw::c_void,
7323        src: *const ::std::os::raw::c_void,
7324        count: usize,
7325        kind: hipMemcpyKind,
7326    ) -> hipError_t;
7327}
7328extern "C" {
7329    #[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"]
7330    pub fn hipGraphMemcpyNodeSetParams1D(
7331        node: hipGraphNode_t,
7332        dst: *mut ::std::os::raw::c_void,
7333        src: *const ::std::os::raw::c_void,
7334        count: usize,
7335        kind: hipMemcpyKind,
7336    ) -> hipError_t;
7337}
7338extern "C" {
7339    #[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"]
7340    pub fn hipGraphExecMemcpyNodeSetParams1D(
7341        hGraphExec: hipGraphExec_t,
7342        node: hipGraphNode_t,
7343        dst: *mut ::std::os::raw::c_void,
7344        src: *const ::std::os::raw::c_void,
7345        count: usize,
7346        kind: hipMemcpyKind,
7347    ) -> hipError_t;
7348}
7349extern "C" {
7350    #[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"]
7351    pub fn hipGraphAddMemcpyNodeFromSymbol(
7352        pGraphNode: *mut hipGraphNode_t,
7353        graph: hipGraph_t,
7354        pDependencies: *const hipGraphNode_t,
7355        numDependencies: usize,
7356        dst: *mut ::std::os::raw::c_void,
7357        symbol: *const ::std::os::raw::c_void,
7358        count: usize,
7359        offset: usize,
7360        kind: hipMemcpyKind,
7361    ) -> hipError_t;
7362}
7363extern "C" {
7364    #[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"]
7365    pub fn hipGraphMemcpyNodeSetParamsFromSymbol(
7366        node: hipGraphNode_t,
7367        dst: *mut ::std::os::raw::c_void,
7368        symbol: *const ::std::os::raw::c_void,
7369        count: usize,
7370        offset: usize,
7371        kind: hipMemcpyKind,
7372    ) -> hipError_t;
7373}
7374extern "C" {
7375    #[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"]
7376    pub fn hipGraphExecMemcpyNodeSetParamsFromSymbol(
7377        hGraphExec: hipGraphExec_t,
7378        node: hipGraphNode_t,
7379        dst: *mut ::std::os::raw::c_void,
7380        symbol: *const ::std::os::raw::c_void,
7381        count: usize,
7382        offset: usize,
7383        kind: hipMemcpyKind,
7384    ) -> hipError_t;
7385}
7386extern "C" {
7387    #[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"]
7388    pub fn hipGraphAddMemcpyNodeToSymbol(
7389        pGraphNode: *mut hipGraphNode_t,
7390        graph: hipGraph_t,
7391        pDependencies: *const hipGraphNode_t,
7392        numDependencies: usize,
7393        symbol: *const ::std::os::raw::c_void,
7394        src: *const ::std::os::raw::c_void,
7395        count: usize,
7396        offset: usize,
7397        kind: hipMemcpyKind,
7398    ) -> hipError_t;
7399}
7400extern "C" {
7401    #[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"]
7402    pub fn hipGraphMemcpyNodeSetParamsToSymbol(
7403        node: hipGraphNode_t,
7404        symbol: *const ::std::os::raw::c_void,
7405        src: *const ::std::os::raw::c_void,
7406        count: usize,
7407        offset: usize,
7408        kind: hipMemcpyKind,
7409    ) -> hipError_t;
7410}
7411extern "C" {
7412    #[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"]
7413    pub fn hipGraphExecMemcpyNodeSetParamsToSymbol(
7414        hGraphExec: hipGraphExec_t,
7415        node: hipGraphNode_t,
7416        symbol: *const ::std::os::raw::c_void,
7417        src: *const ::std::os::raw::c_void,
7418        count: usize,
7419        offset: usize,
7420        kind: hipMemcpyKind,
7421    ) -> hipError_t;
7422}
7423extern "C" {
7424    #[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"]
7425    pub fn hipGraphAddMemsetNode(
7426        pGraphNode: *mut hipGraphNode_t,
7427        graph: hipGraph_t,
7428        pDependencies: *const hipGraphNode_t,
7429        numDependencies: usize,
7430        pMemsetParams: *const hipMemsetParams,
7431    ) -> hipError_t;
7432}
7433extern "C" {
7434    #[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"]
7435    pub fn hipGraphMemsetNodeGetParams(
7436        node: hipGraphNode_t,
7437        pNodeParams: *mut hipMemsetParams,
7438    ) -> hipError_t;
7439}
7440extern "C" {
7441    #[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"]
7442    pub fn hipGraphMemsetNodeSetParams(
7443        node: hipGraphNode_t,
7444        pNodeParams: *const hipMemsetParams,
7445    ) -> hipError_t;
7446}
7447extern "C" {
7448    #[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"]
7449    pub fn hipGraphExecMemsetNodeSetParams(
7450        hGraphExec: hipGraphExec_t,
7451        node: hipGraphNode_t,
7452        pNodeParams: *const hipMemsetParams,
7453    ) -> hipError_t;
7454}
7455extern "C" {
7456    #[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"]
7457    pub fn hipGraphAddHostNode(
7458        pGraphNode: *mut hipGraphNode_t,
7459        graph: hipGraph_t,
7460        pDependencies: *const hipGraphNode_t,
7461        numDependencies: usize,
7462        pNodeParams: *const hipHostNodeParams,
7463    ) -> hipError_t;
7464}
7465extern "C" {
7466    #[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 @warning This API is marked as Beta. While this feature is complete, it can\n          change and might have outstanding issues."]
7467    pub fn hipGraphHostNodeGetParams(
7468        node: hipGraphNode_t,
7469        pNodeParams: *mut hipHostNodeParams,
7470    ) -> hipError_t;
7471}
7472extern "C" {
7473    #[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 @warning This API is marked as Beta. While this feature is complete, it can\n          change and might have outstanding issues."]
7474    pub fn hipGraphHostNodeSetParams(
7475        node: hipGraphNode_t,
7476        pNodeParams: *const hipHostNodeParams,
7477    ) -> hipError_t;
7478}
7479extern "C" {
7480    #[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 @warning This API is marked as Beta. While this feature is complete, it can\n          change and might have outstanding issues."]
7481    pub fn hipGraphExecHostNodeSetParams(
7482        hGraphExec: hipGraphExec_t,
7483        node: hipGraphNode_t,
7484        pNodeParams: *const hipHostNodeParams,
7485    ) -> hipError_t;
7486}
7487extern "C" {
7488    #[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"]
7489    pub fn hipGraphAddChildGraphNode(
7490        pGraphNode: *mut hipGraphNode_t,
7491        graph: hipGraph_t,
7492        pDependencies: *const hipGraphNode_t,
7493        numDependencies: usize,
7494        childGraph: hipGraph_t,
7495    ) -> hipError_t;
7496}
7497extern "C" {
7498    #[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"]
7499    pub fn hipGraphChildGraphNodeGetGraph(
7500        node: hipGraphNode_t,
7501        pGraph: *mut hipGraph_t,
7502    ) -> hipError_t;
7503}
7504extern "C" {
7505    #[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"]
7506    pub fn hipGraphExecChildGraphNodeSetParams(
7507        hGraphExec: hipGraphExec_t,
7508        node: hipGraphNode_t,
7509        childGraph: hipGraph_t,
7510    ) -> hipError_t;
7511}
7512extern "C" {
7513    #[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"]
7514    pub fn hipGraphAddEmptyNode(
7515        pGraphNode: *mut hipGraphNode_t,
7516        graph: hipGraph_t,
7517        pDependencies: *const hipGraphNode_t,
7518        numDependencies: usize,
7519    ) -> hipError_t;
7520}
7521extern "C" {
7522    #[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"]
7523    pub fn hipGraphAddEventRecordNode(
7524        pGraphNode: *mut hipGraphNode_t,
7525        graph: hipGraph_t,
7526        pDependencies: *const hipGraphNode_t,
7527        numDependencies: usize,
7528        event: hipEvent_t,
7529    ) -> hipError_t;
7530}
7531extern "C" {
7532    #[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"]
7533    pub fn hipGraphEventRecordNodeGetEvent(
7534        node: hipGraphNode_t,
7535        event_out: *mut hipEvent_t,
7536    ) -> hipError_t;
7537}
7538extern "C" {
7539    #[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"]
7540    pub fn hipGraphEventRecordNodeSetEvent(node: hipGraphNode_t, event: hipEvent_t) -> hipError_t;
7541}
7542extern "C" {
7543    #[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"]
7544    pub fn hipGraphExecEventRecordNodeSetEvent(
7545        hGraphExec: hipGraphExec_t,
7546        hNode: hipGraphNode_t,
7547        event: hipEvent_t,
7548    ) -> hipError_t;
7549}
7550extern "C" {
7551    #[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"]
7552    pub fn hipGraphAddEventWaitNode(
7553        pGraphNode: *mut hipGraphNode_t,
7554        graph: hipGraph_t,
7555        pDependencies: *const hipGraphNode_t,
7556        numDependencies: usize,
7557        event: hipEvent_t,
7558    ) -> hipError_t;
7559}
7560extern "C" {
7561    #[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"]
7562    pub fn hipGraphEventWaitNodeGetEvent(
7563        node: hipGraphNode_t,
7564        event_out: *mut hipEvent_t,
7565    ) -> hipError_t;
7566}
7567extern "C" {
7568    #[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"]
7569    pub fn hipGraphEventWaitNodeSetEvent(node: hipGraphNode_t, event: hipEvent_t) -> hipError_t;
7570}
7571extern "C" {
7572    #[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"]
7573    pub fn hipGraphExecEventWaitNodeSetEvent(
7574        hGraphExec: hipGraphExec_t,
7575        hNode: hipGraphNode_t,
7576        event: hipEvent_t,
7577    ) -> hipError_t;
7578}
7579extern "C" {
7580    #[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 allocated memory.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7581    pub fn hipGraphAddMemAllocNode(
7582        pGraphNode: *mut hipGraphNode_t,
7583        graph: hipGraph_t,
7584        pDependencies: *const hipGraphNode_t,
7585        numDependencies: usize,
7586        pNodeParams: *mut hipMemAllocNodeParams,
7587    ) -> hipError_t;
7588}
7589extern "C" {
7590    #[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"]
7591    pub fn hipGraphMemAllocNodeGetParams(
7592        node: hipGraphNode_t,
7593        pNodeParams: *mut hipMemAllocNodeParams,
7594    ) -> hipError_t;
7595}
7596extern "C" {
7597    #[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"]
7598    pub fn hipGraphAddMemFreeNode(
7599        pGraphNode: *mut hipGraphNode_t,
7600        graph: hipGraph_t,
7601        pDependencies: *const hipGraphNode_t,
7602        numDependencies: usize,
7603        dev_ptr: *mut ::std::os::raw::c_void,
7604    ) -> hipError_t;
7605}
7606extern "C" {
7607    #[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"]
7608    pub fn hipGraphMemFreeNodeGetParams(
7609        node: hipGraphNode_t,
7610        dev_ptr: *mut ::std::os::raw::c_void,
7611    ) -> hipError_t;
7612}
7613extern "C" {
7614    #[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"]
7615    pub fn hipDeviceGetGraphMemAttribute(
7616        device: ::std::os::raw::c_int,
7617        attr: hipGraphMemAttributeType,
7618        value: *mut ::std::os::raw::c_void,
7619    ) -> hipError_t;
7620}
7621extern "C" {
7622    #[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"]
7623    pub fn hipDeviceSetGraphMemAttribute(
7624        device: ::std::os::raw::c_int,
7625        attr: hipGraphMemAttributeType,
7626        value: *mut ::std::os::raw::c_void,
7627    ) -> hipError_t;
7628}
7629extern "C" {
7630    #[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"]
7631    pub fn hipDeviceGraphMemTrim(device: ::std::os::raw::c_int) -> hipError_t;
7632}
7633extern "C" {
7634    #[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"]
7635    pub fn hipUserObjectCreate(
7636        object_out: *mut hipUserObject_t,
7637        ptr: *mut ::std::os::raw::c_void,
7638        destroy: hipHostFn_t,
7639        initialRefcount: ::std::os::raw::c_uint,
7640        flags: ::std::os::raw::c_uint,
7641    ) -> hipError_t;
7642}
7643extern "C" {
7644    #[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"]
7645    pub fn hipUserObjectRelease(
7646        object: hipUserObject_t,
7647        count: ::std::os::raw::c_uint,
7648    ) -> hipError_t;
7649}
7650extern "C" {
7651    #[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"]
7652    pub fn hipUserObjectRetain(
7653        object: hipUserObject_t,
7654        count: ::std::os::raw::c_uint,
7655    ) -> hipError_t;
7656}
7657extern "C" {
7658    #[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"]
7659    pub fn hipGraphRetainUserObject(
7660        graph: hipGraph_t,
7661        object: hipUserObject_t,
7662        count: ::std::os::raw::c_uint,
7663        flags: ::std::os::raw::c_uint,
7664    ) -> hipError_t;
7665}
7666extern "C" {
7667    #[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"]
7668    pub fn hipGraphReleaseUserObject(
7669        graph: hipGraph_t,
7670        object: hipUserObject_t,
7671        count: ::std::os::raw::c_uint,
7672    ) -> hipError_t;
7673}
7674extern "C" {
7675    #[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"]
7676    pub fn hipGraphDebugDotPrint(
7677        graph: hipGraph_t,
7678        path: *const ::std::os::raw::c_char,
7679        flags: ::std::os::raw::c_uint,
7680    ) -> hipError_t;
7681}
7682extern "C" {
7683    #[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"]
7684    pub fn hipGraphKernelNodeCopyAttributes(
7685        hSrc: hipGraphNode_t,
7686        hDst: hipGraphNode_t,
7687    ) -> hipError_t;
7688}
7689extern "C" {
7690    #[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"]
7691    pub fn hipGraphNodeSetEnabled(
7692        hGraphExec: hipGraphExec_t,
7693        hNode: hipGraphNode_t,
7694        isEnabled: ::std::os::raw::c_uint,
7695    ) -> hipError_t;
7696}
7697extern "C" {
7698    #[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"]
7699    pub fn hipGraphNodeGetEnabled(
7700        hGraphExec: hipGraphExec_t,
7701        hNode: hipGraphNode_t,
7702        isEnabled: *mut ::std::os::raw::c_uint,
7703    ) -> hipError_t;
7704}
7705extern "C" {
7706    #[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"]
7707    pub fn hipGraphAddExternalSemaphoresWaitNode(
7708        pGraphNode: *mut hipGraphNode_t,
7709        graph: hipGraph_t,
7710        pDependencies: *const hipGraphNode_t,
7711        numDependencies: usize,
7712        nodeParams: *const hipExternalSemaphoreWaitNodeParams,
7713    ) -> hipError_t;
7714}
7715extern "C" {
7716    #[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"]
7717    pub fn hipGraphAddExternalSemaphoresSignalNode(
7718        pGraphNode: *mut hipGraphNode_t,
7719        graph: hipGraph_t,
7720        pDependencies: *const hipGraphNode_t,
7721        numDependencies: usize,
7722        nodeParams: *const hipExternalSemaphoreSignalNodeParams,
7723    ) -> hipError_t;
7724}
7725extern "C" {
7726    #[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"]
7727    pub fn hipGraphExternalSemaphoresSignalNodeSetParams(
7728        hNode: hipGraphNode_t,
7729        nodeParams: *const hipExternalSemaphoreSignalNodeParams,
7730    ) -> hipError_t;
7731}
7732extern "C" {
7733    #[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"]
7734    pub fn hipGraphExternalSemaphoresWaitNodeSetParams(
7735        hNode: hipGraphNode_t,
7736        nodeParams: *const hipExternalSemaphoreWaitNodeParams,
7737    ) -> hipError_t;
7738}
7739extern "C" {
7740    #[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"]
7741    pub fn hipGraphExternalSemaphoresSignalNodeGetParams(
7742        hNode: hipGraphNode_t,
7743        params_out: *mut hipExternalSemaphoreSignalNodeParams,
7744    ) -> hipError_t;
7745}
7746extern "C" {
7747    #[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"]
7748    pub fn hipGraphExternalSemaphoresWaitNodeGetParams(
7749        hNode: hipGraphNode_t,
7750        params_out: *mut hipExternalSemaphoreWaitNodeParams,
7751    ) -> hipError_t;
7752}
7753extern "C" {
7754    #[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"]
7755    pub fn hipGraphExecExternalSemaphoresSignalNodeSetParams(
7756        hGraphExec: hipGraphExec_t,
7757        hNode: hipGraphNode_t,
7758        nodeParams: *const hipExternalSemaphoreSignalNodeParams,
7759    ) -> hipError_t;
7760}
7761extern "C" {
7762    #[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"]
7763    pub fn hipGraphExecExternalSemaphoresWaitNodeSetParams(
7764        hGraphExec: hipGraphExec_t,
7765        hNode: hipGraphNode_t,
7766        nodeParams: *const hipExternalSemaphoreWaitNodeParams,
7767    ) -> hipError_t;
7768}
7769extern "C" {
7770    #[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"]
7771    pub fn hipDrvGraphMemcpyNodeGetParams(
7772        hNode: hipGraphNode_t,
7773        nodeParams: *mut HIP_MEMCPY3D,
7774    ) -> hipError_t;
7775}
7776extern "C" {
7777    #[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"]
7778    pub fn hipDrvGraphMemcpyNodeSetParams(
7779        hNode: hipGraphNode_t,
7780        nodeParams: *const HIP_MEMCPY3D,
7781    ) -> hipError_t;
7782}
7783extern "C" {
7784    #[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"]
7785    pub fn hipDrvGraphAddMemsetNode(
7786        phGraphNode: *mut hipGraphNode_t,
7787        hGraph: hipGraph_t,
7788        dependencies: *const hipGraphNode_t,
7789        numDependencies: usize,
7790        memsetParams: *const hipMemsetParams,
7791        ctx: hipCtx_t,
7792    ) -> hipError_t;
7793}
7794extern "C" {
7795    #[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"]
7796    pub fn hipDrvGraphAddMemFreeNode(
7797        phGraphNode: *mut hipGraphNode_t,
7798        hGraph: hipGraph_t,
7799        dependencies: *const hipGraphNode_t,
7800        numDependencies: usize,
7801        dptr: hipDeviceptr_t,
7802    ) -> hipError_t;
7803}
7804extern "C" {
7805    #[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"]
7806    pub fn hipDrvGraphExecMemcpyNodeSetParams(
7807        hGraphExec: hipGraphExec_t,
7808        hNode: hipGraphNode_t,
7809        copyParams: *const HIP_MEMCPY3D,
7810        ctx: hipCtx_t,
7811    ) -> hipError_t;
7812}
7813extern "C" {
7814    #[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"]
7815    pub fn hipDrvGraphExecMemsetNodeSetParams(
7816        hGraphExec: hipGraphExec_t,
7817        hNode: hipGraphNode_t,
7818        memsetParams: *const hipMemsetParams,
7819        ctx: hipCtx_t,
7820    ) -> hipError_t;
7821}
7822extern "C" {
7823    #[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."]
7824    pub fn hipMemAddressFree(devPtr: *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
7825}
7826extern "C" {
7827    #[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."]
7828    pub fn hipMemAddressReserve(
7829        ptr: *mut *mut ::std::os::raw::c_void,
7830        size: usize,
7831        alignment: usize,
7832        addr: *mut ::std::os::raw::c_void,
7833        flags: ::std::os::raw::c_ulonglong,
7834    ) -> hipError_t;
7835}
7836extern "C" {
7837    #[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."]
7838    pub fn hipMemCreate(
7839        handle: *mut hipMemGenericAllocationHandle_t,
7840        size: usize,
7841        prop: *const hipMemAllocationProp,
7842        flags: ::std::os::raw::c_ulonglong,
7843    ) -> hipError_t;
7844}
7845extern "C" {
7846    #[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."]
7847    pub fn hipMemExportToShareableHandle(
7848        shareableHandle: *mut ::std::os::raw::c_void,
7849        handle: hipMemGenericAllocationHandle_t,
7850        handleType: hipMemAllocationHandleType,
7851        flags: ::std::os::raw::c_ulonglong,
7852    ) -> hipError_t;
7853}
7854extern "C" {
7855    #[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."]
7856    pub fn hipMemGetAccess(
7857        flags: *mut ::std::os::raw::c_ulonglong,
7858        location: *const hipMemLocation,
7859        ptr: *mut ::std::os::raw::c_void,
7860    ) -> hipError_t;
7861}
7862extern "C" {
7863    #[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"]
7864    pub fn hipMemGetAllocationGranularity(
7865        granularity: *mut usize,
7866        prop: *const hipMemAllocationProp,
7867        option: hipMemAllocationGranularity_flags,
7868    ) -> hipError_t;
7869}
7870extern "C" {
7871    #[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."]
7872    pub fn hipMemGetAllocationPropertiesFromHandle(
7873        prop: *mut hipMemAllocationProp,
7874        handle: hipMemGenericAllocationHandle_t,
7875    ) -> hipError_t;
7876}
7877extern "C" {
7878    #[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."]
7879    pub fn hipMemImportFromShareableHandle(
7880        handle: *mut hipMemGenericAllocationHandle_t,
7881        osHandle: *mut ::std::os::raw::c_void,
7882        shHandleType: hipMemAllocationHandleType,
7883    ) -> hipError_t;
7884}
7885extern "C" {
7886    #[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."]
7887    pub fn hipMemMap(
7888        ptr: *mut ::std::os::raw::c_void,
7889        size: usize,
7890        offset: usize,
7891        handle: hipMemGenericAllocationHandle_t,
7892        flags: ::std::os::raw::c_ulonglong,
7893    ) -> hipError_t;
7894}
7895extern "C" {
7896    #[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."]
7897    pub fn hipMemMapArrayAsync(
7898        mapInfoList: *mut hipArrayMapInfo,
7899        count: ::std::os::raw::c_uint,
7900        stream: hipStream_t,
7901    ) -> hipError_t;
7902}
7903extern "C" {
7904    #[doc = " @brief Release a memory handle representing a memory allocation which was previously allocated 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."]
7905    pub fn hipMemRelease(handle: hipMemGenericAllocationHandle_t) -> hipError_t;
7906}
7907extern "C" {
7908    #[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."]
7909    pub fn hipMemRetainAllocationHandle(
7910        handle: *mut hipMemGenericAllocationHandle_t,
7911        addr: *mut ::std::os::raw::c_void,
7912    ) -> hipError_t;
7913}
7914extern "C" {
7915    #[doc = " @brief Set the access flags for each location specified in desc for the given virtual address 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."]
7916    pub fn hipMemSetAccess(
7917        ptr: *mut ::std::os::raw::c_void,
7918        size: usize,
7919        desc: *const hipMemAccessDesc,
7920        count: usize,
7921    ) -> hipError_t;
7922}
7923extern "C" {
7924    #[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."]
7925    pub fn hipMemUnmap(ptr: *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
7926}
7927extern "C" {
7928    #[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"]
7929    pub fn hipGraphicsMapResources(
7930        count: ::std::os::raw::c_int,
7931        resources: *mut hipGraphicsResource_t,
7932        stream: hipStream_t,
7933    ) -> hipError_t;
7934}
7935extern "C" {
7936    #[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"]
7937    pub fn hipGraphicsSubResourceGetMappedArray(
7938        array: *mut hipArray_t,
7939        resource: hipGraphicsResource_t,
7940        arrayIndex: ::std::os::raw::c_uint,
7941        mipLevel: ::std::os::raw::c_uint,
7942    ) -> hipError_t;
7943}
7944extern "C" {
7945    #[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"]
7946    pub fn hipGraphicsResourceGetMappedPointer(
7947        devPtr: *mut *mut ::std::os::raw::c_void,
7948        size: *mut usize,
7949        resource: hipGraphicsResource_t,
7950    ) -> hipError_t;
7951}
7952extern "C" {
7953    #[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"]
7954    pub fn hipGraphicsUnmapResources(
7955        count: ::std::os::raw::c_int,
7956        resources: *mut hipGraphicsResource_t,
7957        stream: hipStream_t,
7958    ) -> hipError_t;
7959}
7960extern "C" {
7961    #[doc = " @brief Unregisters a graphics resource.\n\n @param [in] resource - Graphics resources to unregister.\n\n @returns #hipSuccess\n"]
7962    pub fn hipGraphicsUnregisterResource(resource: hipGraphicsResource_t) -> hipError_t;
7963}
7964extern "C" {
7965    #[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"]
7966    pub fn hipCreateSurfaceObject(
7967        pSurfObject: *mut hipSurfaceObject_t,
7968        pResDesc: *const hipResourceDesc,
7969    ) -> hipError_t;
7970}
7971extern "C" {
7972    #[doc = " @brief Destroy a surface object.\n\n @param [in] surfaceObject  Surface object to be destroyed.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
7973    pub fn hipDestroySurfaceObject(surfaceObject: hipSurfaceObject_t) -> hipError_t;
7974}
7975extern "C" {
7976    pub fn hipMemcpy_spt(
7977        dst: *mut ::std::os::raw::c_void,
7978        src: *const ::std::os::raw::c_void,
7979        sizeBytes: usize,
7980        kind: hipMemcpyKind,
7981    ) -> hipError_t;
7982}
7983extern "C" {
7984    pub fn hipMemcpyToSymbol_spt(
7985        symbol: *const ::std::os::raw::c_void,
7986        src: *const ::std::os::raw::c_void,
7987        sizeBytes: usize,
7988        offset: usize,
7989        kind: hipMemcpyKind,
7990    ) -> hipError_t;
7991}
7992extern "C" {
7993    pub fn hipMemcpyFromSymbol_spt(
7994        dst: *mut ::std::os::raw::c_void,
7995        symbol: *const ::std::os::raw::c_void,
7996        sizeBytes: usize,
7997        offset: usize,
7998        kind: hipMemcpyKind,
7999    ) -> hipError_t;
8000}
8001extern "C" {
8002    pub fn hipMemcpy2D_spt(
8003        dst: *mut ::std::os::raw::c_void,
8004        dpitch: usize,
8005        src: *const ::std::os::raw::c_void,
8006        spitch: usize,
8007        width: usize,
8008        height: usize,
8009        kind: hipMemcpyKind,
8010    ) -> hipError_t;
8011}
8012extern "C" {
8013    pub fn hipMemcpy2DFromArray_spt(
8014        dst: *mut ::std::os::raw::c_void,
8015        dpitch: usize,
8016        src: hipArray_const_t,
8017        wOffset: usize,
8018        hOffset: usize,
8019        width: usize,
8020        height: usize,
8021        kind: hipMemcpyKind,
8022    ) -> hipError_t;
8023}
8024extern "C" {
8025    pub fn hipMemcpy3D_spt(p: *const hipMemcpy3DParms) -> hipError_t;
8026}
8027extern "C" {
8028    pub fn hipMemset_spt(
8029        dst: *mut ::std::os::raw::c_void,
8030        value: ::std::os::raw::c_int,
8031        sizeBytes: usize,
8032    ) -> hipError_t;
8033}
8034extern "C" {
8035    pub fn hipMemsetAsync_spt(
8036        dst: *mut ::std::os::raw::c_void,
8037        value: ::std::os::raw::c_int,
8038        sizeBytes: usize,
8039        stream: hipStream_t,
8040    ) -> hipError_t;
8041}
8042extern "C" {
8043    pub fn hipMemset2D_spt(
8044        dst: *mut ::std::os::raw::c_void,
8045        pitch: usize,
8046        value: ::std::os::raw::c_int,
8047        width: usize,
8048        height: usize,
8049    ) -> hipError_t;
8050}
8051extern "C" {
8052    pub fn hipMemset2DAsync_spt(
8053        dst: *mut ::std::os::raw::c_void,
8054        pitch: usize,
8055        value: ::std::os::raw::c_int,
8056        width: usize,
8057        height: usize,
8058        stream: hipStream_t,
8059    ) -> hipError_t;
8060}
8061extern "C" {
8062    pub fn hipMemset3DAsync_spt(
8063        pitchedDevPtr: hipPitchedPtr,
8064        value: ::std::os::raw::c_int,
8065        extent: hipExtent,
8066        stream: hipStream_t,
8067    ) -> hipError_t;
8068}
8069extern "C" {
8070    pub fn hipMemset3D_spt(
8071        pitchedDevPtr: hipPitchedPtr,
8072        value: ::std::os::raw::c_int,
8073        extent: hipExtent,
8074    ) -> hipError_t;
8075}
8076extern "C" {
8077    pub fn hipMemcpyAsync_spt(
8078        dst: *mut ::std::os::raw::c_void,
8079        src: *const ::std::os::raw::c_void,
8080        sizeBytes: usize,
8081        kind: hipMemcpyKind,
8082        stream: hipStream_t,
8083    ) -> hipError_t;
8084}
8085extern "C" {
8086    pub fn hipMemcpy3DAsync_spt(p: *const hipMemcpy3DParms, stream: hipStream_t) -> hipError_t;
8087}
8088extern "C" {
8089    pub fn hipMemcpy2DAsync_spt(
8090        dst: *mut ::std::os::raw::c_void,
8091        dpitch: usize,
8092        src: *const ::std::os::raw::c_void,
8093        spitch: usize,
8094        width: usize,
8095        height: usize,
8096        kind: hipMemcpyKind,
8097        stream: hipStream_t,
8098    ) -> hipError_t;
8099}
8100extern "C" {
8101    pub fn hipMemcpyFromSymbolAsync_spt(
8102        dst: *mut ::std::os::raw::c_void,
8103        symbol: *const ::std::os::raw::c_void,
8104        sizeBytes: usize,
8105        offset: usize,
8106        kind: hipMemcpyKind,
8107        stream: hipStream_t,
8108    ) -> hipError_t;
8109}
8110extern "C" {
8111    pub fn hipMemcpyToSymbolAsync_spt(
8112        symbol: *const ::std::os::raw::c_void,
8113        src: *const ::std::os::raw::c_void,
8114        sizeBytes: usize,
8115        offset: usize,
8116        kind: hipMemcpyKind,
8117        stream: hipStream_t,
8118    ) -> hipError_t;
8119}
8120extern "C" {
8121    pub fn hipMemcpyFromArray_spt(
8122        dst: *mut ::std::os::raw::c_void,
8123        src: hipArray_const_t,
8124        wOffsetSrc: usize,
8125        hOffset: usize,
8126        count: usize,
8127        kind: hipMemcpyKind,
8128    ) -> hipError_t;
8129}
8130extern "C" {
8131    pub fn hipMemcpy2DToArray_spt(
8132        dst: hipArray_t,
8133        wOffset: usize,
8134        hOffset: usize,
8135        src: *const ::std::os::raw::c_void,
8136        spitch: usize,
8137        width: usize,
8138        height: usize,
8139        kind: hipMemcpyKind,
8140    ) -> hipError_t;
8141}
8142extern "C" {
8143    pub fn hipMemcpy2DFromArrayAsync_spt(
8144        dst: *mut ::std::os::raw::c_void,
8145        dpitch: usize,
8146        src: hipArray_const_t,
8147        wOffsetSrc: usize,
8148        hOffsetSrc: usize,
8149        width: usize,
8150        height: usize,
8151        kind: hipMemcpyKind,
8152        stream: hipStream_t,
8153    ) -> hipError_t;
8154}
8155extern "C" {
8156    pub fn hipMemcpy2DToArrayAsync_spt(
8157        dst: hipArray_t,
8158        wOffset: usize,
8159        hOffset: usize,
8160        src: *const ::std::os::raw::c_void,
8161        spitch: usize,
8162        width: usize,
8163        height: usize,
8164        kind: hipMemcpyKind,
8165        stream: hipStream_t,
8166    ) -> hipError_t;
8167}
8168extern "C" {
8169    pub fn hipStreamQuery_spt(stream: hipStream_t) -> hipError_t;
8170}
8171extern "C" {
8172    pub fn hipStreamSynchronize_spt(stream: hipStream_t) -> hipError_t;
8173}
8174extern "C" {
8175    pub fn hipStreamGetPriority_spt(
8176        stream: hipStream_t,
8177        priority: *mut ::std::os::raw::c_int,
8178    ) -> hipError_t;
8179}
8180extern "C" {
8181    pub fn hipStreamWaitEvent_spt(
8182        stream: hipStream_t,
8183        event: hipEvent_t,
8184        flags: ::std::os::raw::c_uint,
8185    ) -> hipError_t;
8186}
8187extern "C" {
8188    pub fn hipStreamGetFlags_spt(
8189        stream: hipStream_t,
8190        flags: *mut ::std::os::raw::c_uint,
8191    ) -> hipError_t;
8192}
8193extern "C" {
8194    pub fn hipStreamAddCallback_spt(
8195        stream: hipStream_t,
8196        callback: hipStreamCallback_t,
8197        userData: *mut ::std::os::raw::c_void,
8198        flags: ::std::os::raw::c_uint,
8199    ) -> hipError_t;
8200}
8201extern "C" {
8202    pub fn hipEventRecord_spt(event: hipEvent_t, stream: hipStream_t) -> hipError_t;
8203}
8204extern "C" {
8205    pub fn hipLaunchCooperativeKernel_spt(
8206        f: *const ::std::os::raw::c_void,
8207        gridDim: dim3,
8208        blockDim: dim3,
8209        kernelParams: *mut *mut ::std::os::raw::c_void,
8210        sharedMemBytes: u32,
8211        hStream: hipStream_t,
8212    ) -> hipError_t;
8213}
8214extern "C" {
8215    pub fn hipLaunchKernel_spt(
8216        function_address: *const ::std::os::raw::c_void,
8217        numBlocks: dim3,
8218        dimBlocks: dim3,
8219        args: *mut *mut ::std::os::raw::c_void,
8220        sharedMemBytes: usize,
8221        stream: hipStream_t,
8222    ) -> hipError_t;
8223}
8224extern "C" {
8225    pub fn hipGraphLaunch_spt(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
8226}
8227extern "C" {
8228    pub fn hipStreamBeginCapture_spt(stream: hipStream_t, mode: hipStreamCaptureMode)
8229        -> hipError_t;
8230}
8231extern "C" {
8232    pub fn hipStreamEndCapture_spt(stream: hipStream_t, pGraph: *mut hipGraph_t) -> hipError_t;
8233}
8234extern "C" {
8235    pub fn hipStreamIsCapturing_spt(
8236        stream: hipStream_t,
8237        pCaptureStatus: *mut hipStreamCaptureStatus,
8238    ) -> hipError_t;
8239}
8240extern "C" {
8241    pub fn hipStreamGetCaptureInfo_spt(
8242        stream: hipStream_t,
8243        pCaptureStatus: *mut hipStreamCaptureStatus,
8244        pId: *mut ::std::os::raw::c_ulonglong,
8245    ) -> hipError_t;
8246}
8247extern "C" {
8248    pub fn hipStreamGetCaptureInfo_v2_spt(
8249        stream: hipStream_t,
8250        captureStatus_out: *mut hipStreamCaptureStatus,
8251        id_out: *mut ::std::os::raw::c_ulonglong,
8252        graph_out: *mut hipGraph_t,
8253        dependencies_out: *mut *const hipGraphNode_t,
8254        numDependencies_out: *mut usize,
8255    ) -> hipError_t;
8256}
8257extern "C" {
8258    pub fn hipLaunchHostFunc_spt(
8259        stream: hipStream_t,
8260        fn_: hipHostFn_t,
8261        userData: *mut ::std::os::raw::c_void,
8262    ) -> hipError_t;
8263}