1#[repr(C)]
4#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
5pub struct __BindgenBitfieldUnit<Storage> {
6 storage: Storage,
7}
8impl<Storage> __BindgenBitfieldUnit<Storage> {
9 #[inline]
10 pub const fn new(storage: Storage) -> Self {
11 Self { storage }
12 }
13}
14impl<Storage> __BindgenBitfieldUnit<Storage>
15where
16 Storage: AsRef<[u8]> + AsMut<[u8]>,
17{
18 #[inline]
19 pub fn get_bit(&self, index: usize) -> bool {
20 debug_assert!(index / 8 < self.storage.as_ref().len());
21 let byte_index = index / 8;
22 let byte = self.storage.as_ref()[byte_index];
23 let bit_index = if cfg!(target_endian = "big") {
24 7 - (index % 8)
25 } else {
26 index % 8
27 };
28 let mask = 1 << bit_index;
29 byte & mask == mask
30 }
31 #[inline]
32 pub fn set_bit(&mut self, index: usize, val: bool) {
33 debug_assert!(index / 8 < self.storage.as_ref().len());
34 let byte_index = index / 8;
35 let byte = &mut self.storage.as_mut()[byte_index];
36 let bit_index = if cfg!(target_endian = "big") {
37 7 - (index % 8)
38 } else {
39 index % 8
40 };
41 let mask = 1 << bit_index;
42 if val {
43 *byte |= mask;
44 } else {
45 *byte &= !mask;
46 }
47 }
48 #[inline]
49 pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
50 debug_assert!(bit_width <= 64);
51 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
52 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
53 let mut val = 0;
54 for i in 0..(bit_width as usize) {
55 if self.get_bit(i + bit_offset) {
56 let index = if cfg!(target_endian = "big") {
57 bit_width as usize - 1 - i
58 } else {
59 i
60 };
61 val |= 1 << index;
62 }
63 }
64 val
65 }
66 #[inline]
67 pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
68 debug_assert!(bit_width <= 64);
69 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
70 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
71 for i in 0..(bit_width as usize) {
72 let mask = 1 << i;
73 let val_bit_is_set = val & mask == mask;
74 let index = if cfg!(target_endian = "big") {
75 bit_width as usize - 1 - i
76 } else {
77 i
78 };
79 self.set_bit(index + bit_offset, val_bit_is_set);
80 }
81 }
82}
83pub const __HIP_ARCH_HAS_GLOBAL_INT32_ATOMICS__: u32 = 0;
84pub const __HIP_ARCH_HAS_GLOBAL_FLOAT_ATOMIC_EXCH__: u32 = 0;
85pub const __HIP_ARCH_HAS_SHARED_INT32_ATOMICS__: u32 = 0;
86pub const __HIP_ARCH_HAS_SHARED_FLOAT_ATOMIC_EXCH__: u32 = 0;
87pub const __HIP_ARCH_HAS_FLOAT_ATOMIC_ADD__: u32 = 0;
88pub const __HIP_ARCH_HAS_GLOBAL_INT64_ATOMICS__: u32 = 0;
89pub const __HIP_ARCH_HAS_SHARED_INT64_ATOMICS__: u32 = 0;
90pub const __HIP_ARCH_HAS_DOUBLES__: u32 = 0;
91pub const __HIP_ARCH_HAS_WARP_VOTE__: u32 = 0;
92pub const __HIP_ARCH_HAS_WARP_BALLOT__: u32 = 0;
93pub const __HIP_ARCH_HAS_WARP_SHUFFLE__: u32 = 0;
94pub const __HIP_ARCH_HAS_WARP_FUNNEL_SHIFT__: u32 = 0;
95pub const __HIP_ARCH_HAS_THREAD_FENCE_SYSTEM__: u32 = 0;
96pub const __HIP_ARCH_HAS_SYNC_THREAD_EXT__: u32 = 0;
97pub const __HIP_ARCH_HAS_SURFACE_FUNCS__: u32 = 0;
98pub const __HIP_ARCH_HAS_3DGRID__: u32 = 0;
99pub const __HIP_ARCH_HAS_DYNAMIC_PARALLEL__: u32 = 0;
100pub const _FEATURES_H: u32 = 1;
101pub const _DEFAULT_SOURCE: u32 = 1;
102pub const __GLIBC_USE_ISOC2X: u32 = 0;
103pub const __USE_ISOC11: u32 = 1;
104pub const __USE_ISOC99: u32 = 1;
105pub const __USE_ISOC95: u32 = 1;
106pub const __USE_POSIX_IMPLICITLY: u32 = 1;
107pub const _POSIX_SOURCE: u32 = 1;
108pub const _POSIX_C_SOURCE: u32 = 200809;
109pub const __USE_POSIX: u32 = 1;
110pub const __USE_POSIX2: u32 = 1;
111pub const __USE_POSIX199309: u32 = 1;
112pub const __USE_POSIX199506: u32 = 1;
113pub const __USE_XOPEN2K: u32 = 1;
114pub const __USE_XOPEN2K8: u32 = 1;
115pub const _ATFILE_SOURCE: u32 = 1;
116pub const __WORDSIZE: u32 = 64;
117pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
118pub const __SYSCALL_WORDSIZE: u32 = 64;
119pub const __TIMESIZE: u32 = 64;
120pub const __USE_MISC: u32 = 1;
121pub const __USE_ATFILE: u32 = 1;
122pub const __USE_FORTIFY_LEVEL: u32 = 0;
123pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
124pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
125pub const __GLIBC_USE_C2X_STRTOL: u32 = 0;
126pub const _STDC_PREDEF_H: u32 = 1;
127pub const __STDC_IEC_559__: u32 = 1;
128pub const __STDC_IEC_60559_BFP__: u32 = 201404;
129pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
130pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
131pub const __STDC_ISO_10646__: u32 = 201706;
132pub const __GNU_LIBRARY__: u32 = 6;
133pub const __GLIBC__: u32 = 2;
134pub const __GLIBC_MINOR__: u32 = 39;
135pub const _SYS_CDEFS_H: u32 = 1;
136pub const __glibc_c99_flexarr_available: u32 = 1;
137pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
138pub const __HAVE_GENERIC_SELECTION: u32 = 1;
139pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
140pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
141pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
142pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
143pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
144pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
145pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
146pub const _STDLIB_H: u32 = 1;
147pub const WNOHANG: u32 = 1;
148pub const WUNTRACED: u32 = 2;
149pub const WSTOPPED: u32 = 2;
150pub const WEXITED: u32 = 4;
151pub const WCONTINUED: u32 = 8;
152pub const WNOWAIT: u32 = 16777216;
153pub const __WNOTHREAD: u32 = 536870912;
154pub const __WALL: u32 = 1073741824;
155pub const __WCLONE: u32 = 2147483648;
156pub const __W_CONTINUED: u32 = 65535;
157pub const __WCOREFLAG: u32 = 128;
158pub const __HAVE_FLOAT128: u32 = 0;
159pub const __HAVE_DISTINCT_FLOAT128: u32 = 0;
160pub const __HAVE_FLOAT64X: u32 = 1;
161pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
162pub const __HAVE_FLOAT16: u32 = 0;
163pub const __HAVE_FLOAT32: u32 = 1;
164pub const __HAVE_FLOAT64: u32 = 1;
165pub const __HAVE_FLOAT32X: u32 = 1;
166pub const __HAVE_FLOAT128X: u32 = 0;
167pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
168pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
169pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
170pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
171pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
172pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
173pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
174pub const __ldiv_t_defined: u32 = 1;
175pub const __lldiv_t_defined: u32 = 1;
176pub const RAND_MAX: u32 = 2147483647;
177pub const EXIT_FAILURE: u32 = 1;
178pub const EXIT_SUCCESS: u32 = 0;
179pub const _SYS_TYPES_H: u32 = 1;
180pub const _BITS_TYPES_H: u32 = 1;
181pub const _BITS_TYPESIZES_H: u32 = 1;
182pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
183pub const __INO_T_MATCHES_INO64_T: u32 = 1;
184pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
185pub const __STATFS_MATCHES_STATFS64: u32 = 1;
186pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
187pub const __FD_SETSIZE: u32 = 1024;
188pub const _BITS_TIME64_H: u32 = 1;
189pub const __clock_t_defined: u32 = 1;
190pub const __clockid_t_defined: u32 = 1;
191pub const __time_t_defined: u32 = 1;
192pub const __timer_t_defined: u32 = 1;
193pub const _BITS_STDINT_INTN_H: u32 = 1;
194pub const __BIT_TYPES_DEFINED__: u32 = 1;
195pub const _ENDIAN_H: u32 = 1;
196pub const _BITS_ENDIAN_H: u32 = 1;
197pub const __LITTLE_ENDIAN: u32 = 1234;
198pub const __BIG_ENDIAN: u32 = 4321;
199pub const __PDP_ENDIAN: u32 = 3412;
200pub const _BITS_ENDIANNESS_H: u32 = 1;
201pub const __BYTE_ORDER: u32 = 1234;
202pub const __FLOAT_WORD_ORDER: u32 = 1234;
203pub const LITTLE_ENDIAN: u32 = 1234;
204pub const BIG_ENDIAN: u32 = 4321;
205pub const PDP_ENDIAN: u32 = 3412;
206pub const BYTE_ORDER: u32 = 1234;
207pub const _BITS_BYTESWAP_H: u32 = 1;
208pub const _BITS_UINTN_IDENTITY_H: u32 = 1;
209pub const _SYS_SELECT_H: u32 = 1;
210pub const __sigset_t_defined: u32 = 1;
211pub const __timeval_defined: u32 = 1;
212pub const _STRUCT_TIMESPEC: u32 = 1;
213pub const FD_SETSIZE: u32 = 1024;
214pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
215pub const _THREAD_SHARED_TYPES_H: u32 = 1;
216pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
217pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40;
218pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56;
219pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56;
220pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32;
221pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4;
222pub const __SIZEOF_PTHREAD_COND_T: u32 = 48;
223pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4;
224pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8;
225pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4;
226pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1;
227pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1;
228pub const __have_pthread_attr_t: u32 = 1;
229pub const _ALLOCA_H: u32 = 1;
230pub const _LIBC_LIMITS_H_: u32 = 1;
231pub const MB_LEN_MAX: u32 = 16;
232pub const _BITS_POSIX1_LIM_H: u32 = 1;
233pub const _POSIX_AIO_LISTIO_MAX: u32 = 2;
234pub const _POSIX_AIO_MAX: u32 = 1;
235pub const _POSIX_ARG_MAX: u32 = 4096;
236pub const _POSIX_CHILD_MAX: u32 = 25;
237pub const _POSIX_DELAYTIMER_MAX: u32 = 32;
238pub const _POSIX_HOST_NAME_MAX: u32 = 255;
239pub const _POSIX_LINK_MAX: u32 = 8;
240pub const _POSIX_LOGIN_NAME_MAX: u32 = 9;
241pub const _POSIX_MAX_CANON: u32 = 255;
242pub const _POSIX_MAX_INPUT: u32 = 255;
243pub const _POSIX_MQ_OPEN_MAX: u32 = 8;
244pub const _POSIX_MQ_PRIO_MAX: u32 = 32;
245pub const _POSIX_NAME_MAX: u32 = 14;
246pub const _POSIX_NGROUPS_MAX: u32 = 8;
247pub const _POSIX_OPEN_MAX: u32 = 20;
248pub const _POSIX_PATH_MAX: u32 = 256;
249pub const _POSIX_PIPE_BUF: u32 = 512;
250pub const _POSIX_RE_DUP_MAX: u32 = 255;
251pub const _POSIX_RTSIG_MAX: u32 = 8;
252pub const _POSIX_SEM_NSEMS_MAX: u32 = 256;
253pub const _POSIX_SEM_VALUE_MAX: u32 = 32767;
254pub const _POSIX_SIGQUEUE_MAX: u32 = 32;
255pub const _POSIX_SSIZE_MAX: u32 = 32767;
256pub const _POSIX_STREAM_MAX: u32 = 8;
257pub const _POSIX_SYMLINK_MAX: u32 = 255;
258pub const _POSIX_SYMLOOP_MAX: u32 = 8;
259pub const _POSIX_TIMER_MAX: u32 = 32;
260pub const _POSIX_TTY_NAME_MAX: u32 = 9;
261pub const _POSIX_TZNAME_MAX: u32 = 6;
262pub const _POSIX_CLOCKRES_MIN: u32 = 20000000;
263pub const NR_OPEN: u32 = 1024;
264pub const NGROUPS_MAX: u32 = 65536;
265pub const ARG_MAX: u32 = 131072;
266pub const LINK_MAX: u32 = 127;
267pub const MAX_CANON: u32 = 255;
268pub const MAX_INPUT: u32 = 255;
269pub const NAME_MAX: u32 = 255;
270pub const PATH_MAX: u32 = 4096;
271pub const PIPE_BUF: u32 = 4096;
272pub const XATTR_NAME_MAX: u32 = 255;
273pub const XATTR_SIZE_MAX: u32 = 65536;
274pub const XATTR_LIST_MAX: u32 = 65536;
275pub const RTSIG_MAX: u32 = 32;
276pub const _POSIX_THREAD_KEYS_MAX: u32 = 128;
277pub const PTHREAD_KEYS_MAX: u32 = 1024;
278pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
279pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
280pub const _POSIX_THREAD_THREADS_MAX: u32 = 64;
281pub const AIO_PRIO_DELTA_MAX: u32 = 20;
282pub const PTHREAD_STACK_MIN: u32 = 16384;
283pub const DELAYTIMER_MAX: u32 = 2147483647;
284pub const TTY_NAME_MAX: u32 = 32;
285pub const LOGIN_NAME_MAX: u32 = 256;
286pub const HOST_NAME_MAX: u32 = 64;
287pub const MQ_PRIO_MAX: u32 = 32768;
288pub const SEM_VALUE_MAX: u32 = 2147483647;
289pub const _BITS_POSIX2_LIM_H: u32 = 1;
290pub const _POSIX2_BC_BASE_MAX: u32 = 99;
291pub const _POSIX2_BC_DIM_MAX: u32 = 2048;
292pub const _POSIX2_BC_SCALE_MAX: u32 = 99;
293pub const _POSIX2_BC_STRING_MAX: u32 = 1000;
294pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2;
295pub const _POSIX2_EXPR_NEST_MAX: u32 = 32;
296pub const _POSIX2_LINE_MAX: u32 = 2048;
297pub const _POSIX2_RE_DUP_MAX: u32 = 255;
298pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14;
299pub const BC_BASE_MAX: u32 = 99;
300pub const BC_DIM_MAX: u32 = 2048;
301pub const BC_SCALE_MAX: u32 = 99;
302pub const BC_STRING_MAX: u32 = 1000;
303pub const COLL_WEIGHTS_MAX: u32 = 255;
304pub const EXPR_NEST_MAX: u32 = 32;
305pub const LINE_MAX: u32 = 2048;
306pub const CHARCLASS_NAME_MAX: u32 = 2048;
307pub const RE_DUP_MAX: u32 = 32767;
308pub const _STDINT_H: u32 = 1;
309pub const _BITS_WCHAR_H: u32 = 1;
310pub const _BITS_STDINT_UINTN_H: u32 = 1;
311pub const _BITS_STDINT_LEAST_H: u32 = 1;
312pub const INT8_MIN: i32 = -128;
313pub const INT16_MIN: i32 = -32768;
314pub const INT32_MIN: i32 = -2147483648;
315pub const INT8_MAX: u32 = 127;
316pub const INT16_MAX: u32 = 32767;
317pub const INT32_MAX: u32 = 2147483647;
318pub const UINT8_MAX: u32 = 255;
319pub const UINT16_MAX: u32 = 65535;
320pub const UINT32_MAX: u32 = 4294967295;
321pub const INT_LEAST8_MIN: i32 = -128;
322pub const INT_LEAST16_MIN: i32 = -32768;
323pub const INT_LEAST32_MIN: i32 = -2147483648;
324pub const INT_LEAST8_MAX: u32 = 127;
325pub const INT_LEAST16_MAX: u32 = 32767;
326pub const INT_LEAST32_MAX: u32 = 2147483647;
327pub const UINT_LEAST8_MAX: u32 = 255;
328pub const UINT_LEAST16_MAX: u32 = 65535;
329pub const UINT_LEAST32_MAX: u32 = 4294967295;
330pub const INT_FAST8_MIN: i32 = -128;
331pub const INT_FAST16_MIN: i64 = -9223372036854775808;
332pub const INT_FAST32_MIN: i64 = -9223372036854775808;
333pub const INT_FAST8_MAX: u32 = 127;
334pub const INT_FAST16_MAX: u64 = 9223372036854775807;
335pub const INT_FAST32_MAX: u64 = 9223372036854775807;
336pub const UINT_FAST8_MAX: u32 = 255;
337pub const UINT_FAST16_MAX: i32 = -1;
338pub const UINT_FAST32_MAX: i32 = -1;
339pub const INTPTR_MIN: i64 = -9223372036854775808;
340pub const INTPTR_MAX: u64 = 9223372036854775807;
341pub const UINTPTR_MAX: i32 = -1;
342pub const PTRDIFF_MIN: i64 = -9223372036854775808;
343pub const PTRDIFF_MAX: u64 = 9223372036854775807;
344pub const SIG_ATOMIC_MIN: i32 = -2147483648;
345pub const SIG_ATOMIC_MAX: u32 = 2147483647;
346pub const SIZE_MAX: i32 = -1;
347pub const WINT_MIN: u32 = 0;
348pub const WINT_MAX: u32 = 4294967295;
349pub const HIP_VERSION_MAJOR: u32 = 7;
350pub const HIP_VERSION_MINOR: u32 = 14;
351pub const HIP_VERSION_PATCH: u32 = 60850;
352pub const HIP_VERSION_GITHASH: &[u8; 8] = b"0000000\0";
353pub const HIP_VERSION_BUILD_ID: u32 = 0;
354pub const HIP_VERSION_BUILD_NAME: &[u8; 1] = b"\0";
355pub const HIP_VERSION: u32 = 71460850;
356pub const __HIP_HAS_GET_PCH: u32 = 1;
357pub const HIP_GET_PROC_ADDRESS_DEFAULT: u32 = 0;
358pub const HIP_GET_PROC_ADDRESS_LEGACY_STREAM: u32 = 1;
359pub const HIP_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM: u32 = 2;
360pub const GENERIC_GRID_LAUNCH: u32 = 1;
361pub const HIP_TRSA_OVERRIDE_FORMAT: u32 = 1;
362pub const HIP_TRSF_READ_AS_INTEGER: u32 = 1;
363pub const HIP_TRSF_NORMALIZED_COORDINATES: u32 = 2;
364pub const HIP_TRSF_SRGB: u32 = 16;
365pub const __HIP_USE_NATIVE_VECTOR__: u32 = 1;
366pub const hipTextureType1D: u32 = 1;
367pub const hipTextureType2D: u32 = 2;
368pub const hipTextureType3D: u32 = 3;
369pub const hipTextureTypeCubemap: u32 = 12;
370pub const hipTextureType1DLayered: u32 = 241;
371pub const hipTextureType2DLayered: u32 = 242;
372pub const hipTextureTypeCubemapLayered: u32 = 252;
373pub const HIP_IMAGE_OBJECT_SIZE_DWORD: u32 = 12;
374pub const HIP_SAMPLER_OBJECT_SIZE_DWORD: u32 = 8;
375pub const HIP_SAMPLER_OBJECT_OFFSET_DWORD: u32 = 12;
376pub const HIP_TEXTURE_OBJECT_SIZE_DWORD: u32 = 20;
377pub 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" ;
378pub const HIP_RESOURCE_ABI_BYTES: u32 = 40;
379pub const hipIpcMemLazyEnablePeerAccess: u32 = 1;
380pub const HIP_IPC_HANDLE_SIZE: u32 = 64;
381pub const hipStreamDefault: u32 = 0;
382pub const hipStreamNonBlocking: u32 = 1;
383pub const hipEventDefault: u32 = 0;
384pub const hipEventBlockingSync: u32 = 1;
385pub const hipEventDisableTiming: u32 = 2;
386pub const hipEventInterprocess: u32 = 4;
387pub const hipEventRecordDefault: u32 = 0;
388pub const hipEventRecordExternal: u32 = 1;
389pub const hipEventWaitDefault: u32 = 0;
390pub const hipEventWaitExternal: u32 = 1;
391pub const hipEventDisableSystemFence: u32 = 536870912;
392pub const hipEventReleaseToDevice: u32 = 1073741824;
393pub const hipEventReleaseToSystem: u32 = 2147483648;
394pub const hipEnableDefault: u32 = 0;
395pub const hipEnableLegacyStream: u32 = 1;
396pub const hipEnablePerThreadDefaultStream: u32 = 2;
397pub const hipHostAllocDefault: u32 = 0;
398pub const hipHostMallocDefault: u32 = 0;
399pub const hipHostAllocPortable: u32 = 1;
400pub const hipHostMallocPortable: u32 = 1;
401pub const hipHostAllocMapped: u32 = 2;
402pub const hipHostMallocMapped: u32 = 2;
403pub const hipHostAllocWriteCombined: u32 = 4;
404pub const hipHostMallocWriteCombined: u32 = 4;
405pub const hipHostMallocUncached: u32 = 268435456;
406pub const hipHostAllocUncached: u32 = 268435456;
407pub const hipHostMallocNumaUser: u32 = 536870912;
408pub const hipHostMallocCoherent: u32 = 1073741824;
409pub const hipHostMallocNonCoherent: u32 = 2147483648;
410pub const hipMemAttachGlobal: u32 = 1;
411pub const hipMemAttachHost: u32 = 2;
412pub const hipMemAttachSingle: u32 = 4;
413pub const hipDeviceMallocDefault: u32 = 0;
414pub const hipDeviceMallocFinegrained: u32 = 1;
415pub const hipMallocSignalMemory: u32 = 2;
416pub const hipDeviceMallocUncached: u32 = 3;
417pub const hipDeviceMallocContiguous: u32 = 4;
418pub const hipHostRegisterDefault: u32 = 0;
419pub const hipHostRegisterPortable: u32 = 1;
420pub const hipHostRegisterMapped: u32 = 2;
421pub const hipHostRegisterIoMemory: u32 = 4;
422pub const hipHostRegisterReadOnly: u32 = 8;
423pub const hipExtHostRegisterCoarseGrained: u32 = 8;
424pub const hipExtHostRegisterUncached: u32 = 2147483648;
425pub const hipDeviceScheduleAuto: u32 = 0;
426pub const hipDeviceScheduleSpin: u32 = 1;
427pub const hipDeviceScheduleYield: u32 = 2;
428pub const hipDeviceScheduleBlockingSync: u32 = 4;
429pub const hipDeviceScheduleMask: u32 = 7;
430pub const hipDeviceMapHost: u32 = 8;
431pub const hipDeviceLmemResizeToMax: u32 = 16;
432pub const hipArrayDefault: u32 = 0;
433pub const hipArrayLayered: u32 = 1;
434pub const hipArraySurfaceLoadStore: u32 = 2;
435pub const hipArrayCubemap: u32 = 4;
436pub const hipArrayTextureGather: u32 = 8;
437pub const hipOccupancyDefault: u32 = 0;
438pub const hipOccupancyDisableCachingOverride: u32 = 1;
439pub const hipCooperativeLaunchMultiDeviceNoPreSync: u32 = 1;
440pub const hipCooperativeLaunchMultiDeviceNoPostSync: u32 = 2;
441pub const hipExtAnyOrderLaunch: u32 = 1;
442pub const hipStreamWaitValueGte: u32 = 0;
443pub const hipStreamWaitValueEq: u32 = 1;
444pub const hipStreamWaitValueAnd: u32 = 2;
445pub const hipStreamWaitValueNor: u32 = 3;
446pub const hipStreamWriteValueDefault: u32 = 0;
447pub const hipExtStreamWriteValueIncrement: u32 = 4096;
448pub const hipExtStreamWriteValueDecrement: u32 = 4097;
449pub const hipExternalMemoryDedicated: u32 = 1;
450pub const HIP_EXT_DYN_DATA_PREFETCH_MAX_REGIONS: u32 = 2;
451pub const hipGraphKernelNodePortDefault: u32 = 0;
452pub const hipGraphKernelNodePortLaunchCompletion: u32 = 2;
453pub const hipGraphKernelNodePortProgrammatic: u32 = 1;
454#[doc = "< CUDA Only Maximum registers may be used in a thread,\n< passed to compiler"]
455pub const hipJitOption_hipJitOptionMaxRegisters: hipJitOption = 0;
456#[doc = "< CUDA Only Number of thread per block"]
457pub const hipJitOption_hipJitOptionThreadsPerBlock: hipJitOption = 1;
458#[doc = "< CUDA Only Value for total wall clock time"]
459pub const hipJitOption_hipJitOptionWallTime: hipJitOption = 2;
460#[doc = "< CUDA Only Pointer to the buffer with logged information"]
461pub const hipJitOption_hipJitOptionInfoLogBuffer: hipJitOption = 3;
462#[doc = "< CUDA Only Size of the buffer in bytes for logged info"]
463pub const hipJitOption_hipJitOptionInfoLogBufferSizeBytes: hipJitOption = 4;
464#[doc = "< CUDA Only Pointer to the buffer with logged error(s)"]
465pub const hipJitOption_hipJitOptionErrorLogBuffer: hipJitOption = 5;
466#[doc = "< CUDA Only Size of the buffer in bytes for logged\n< error(s)"]
467pub const hipJitOption_hipJitOptionErrorLogBufferSizeBytes: hipJitOption = 6;
468#[doc = "< Value of optimization level for generated codes, acceptable\n< options -O0, -O1, -O2, -O3"]
469pub const hipJitOption_hipJitOptionOptimizationLevel: hipJitOption = 7;
470#[doc = "< CUDA Only The target context, which is the default"]
471pub const hipJitOption_hipJitOptionTargetFromContext: hipJitOption = 8;
472#[doc = "< CUDA Only JIT target"]
473pub const hipJitOption_hipJitOptionTarget: hipJitOption = 9;
474#[doc = "< CUDA Only Fallback strategy"]
475pub const hipJitOption_hipJitOptionFallbackStrategy: hipJitOption = 10;
476#[doc = "< CUDA Only Generate debug information"]
477pub const hipJitOption_hipJitOptionGenerateDebugInfo: hipJitOption = 11;
478#[doc = "< CUDA Only Generate log verbose"]
479pub const hipJitOption_hipJitOptionLogVerbose: hipJitOption = 12;
480#[doc = "< CUDA Only Generate line number information"]
481pub const hipJitOption_hipJitOptionGenerateLineInfo: hipJitOption = 13;
482#[doc = "< CUDA Only Set cache mode"]
483pub const hipJitOption_hipJitOptionCacheMode: hipJitOption = 14;
484#[doc = "< @deprecated CUDA Only New SM3X option."]
485pub const hipJitOption_hipJitOptionSm3xOpt: hipJitOption = 15;
486#[doc = "< CUDA Only Set fast compile"]
487pub const hipJitOption_hipJitOptionFastCompile: hipJitOption = 16;
488#[doc = "< CUDA Only Array of device symbol names to be relocated to the\n< host"]
489pub const hipJitOption_hipJitOptionGlobalSymbolNames: hipJitOption = 17;
490#[doc = "< CUDA Only Array of host addresses to be relocated to the\n< device"]
491pub const hipJitOption_hipJitOptionGlobalSymbolAddresses: hipJitOption = 18;
492#[doc = "< CUDA Only Number of symbol count."]
493pub const hipJitOption_hipJitOptionGlobalSymbolCount: hipJitOption = 19;
494#[doc = "< @deprecated CUDA Only Enable link-time optimization for device code"]
495pub const hipJitOption_hipJitOptionLto: hipJitOption = 20;
496#[doc = "< @deprecated CUDA Only Set single-precision denormals."]
497pub const hipJitOption_hipJitOptionFtz: hipJitOption = 21;
498#[doc = "< @deprecated CUDA Only Set single-precision floating-point division\n< and reciprocals"]
499pub const hipJitOption_hipJitOptionPrecDiv: hipJitOption = 22;
500#[doc = "< @deprecated CUDA Only Set single-precision floating-point square root"]
501pub const hipJitOption_hipJitOptionPrecSqrt: hipJitOption = 23;
502#[doc = "< @deprecated CUDA Only Enable floating-point multiplies and\n< adds/subtracts operations"]
503pub const hipJitOption_hipJitOptionFma: hipJitOption = 24;
504#[doc = "< CUDA Only Generates Position Independent code"]
505pub const hipJitOption_hipJitOptionPositionIndependentCode: hipJitOption = 25;
506#[doc = "< CUDA Only Hints to JIT compiler the minimum number of CTAs frin\n< kernel's grid to be mapped to SM"]
507pub const hipJitOption_hipJitOptionMinCTAPerSM: hipJitOption = 26;
508#[doc = "< CUDA only Maximum number of threads in a thread block"]
509pub const hipJitOption_hipJitOptionMaxThreadsPerBlock: hipJitOption = 27;
510#[doc = "< Cuda only Override Directive values"]
511pub const hipJitOption_hipJitOptionOverrideDirectiveValues: hipJitOption = 28;
512#[doc = "< Number of options"]
513pub const hipJitOption_hipJitOptionNumOptions: hipJitOption = 29;
514#[doc = "< Hip Only Linker options to be passed on to compiler"]
515pub const hipJitOption_hipJitOptionIRtoISAOptExt: hipJitOption = 10000;
516#[doc = "< Hip Only Count of linker options to be passed on to compiler"]
517pub const hipJitOption_hipJitOptionIRtoISAOptCountExt: hipJitOption = 10001;
518#[doc = " hipJitOption"]
519pub type hipJitOption = ::std::os::raw::c_uint;
520#[doc = "< Cuda only Input cubin"]
521pub const hipJitInputType_hipJitInputCubin: hipJitInputType = 0;
522#[doc = "< Cuda only Input PTX"]
523pub const hipJitInputType_hipJitInputPtx: hipJitInputType = 1;
524#[doc = "< Cuda Only Input FAT Binary"]
525pub const hipJitInputType_hipJitInputFatBinary: hipJitInputType = 2;
526#[doc = "< Cuda Only Host Object with embedded device code"]
527pub const hipJitInputType_hipJitInputObject: hipJitInputType = 3;
528#[doc = "< Cuda Only Archive of Host Objects with embedded\n< device code"]
529pub const hipJitInputType_hipJitInputLibrary: hipJitInputType = 4;
530#[doc = "< @deprecated Cuda only High Level intermediate\n< code for LTO"]
531pub const hipJitInputType_hipJitInputNvvm: hipJitInputType = 5;
532#[doc = "< Count of Legacy Input Types"]
533pub const hipJitInputType_hipJitNumLegacyInputTypes: hipJitInputType = 6;
534#[doc = "< HIP Only LLVM Bitcode or IR assembly"]
535pub const hipJitInputType_hipJitInputLLVMBitcode: hipJitInputType = 100;
536#[doc = "< HIP Only LLVM Clang Bundled Code"]
537pub const hipJitInputType_hipJitInputLLVMBundledBitcode: hipJitInputType = 101;
538#[doc = "< HIP Only LLVM Archive of Bundled Bitcode"]
539pub const hipJitInputType_hipJitInputLLVMArchivesOfBundledBitcode: hipJitInputType = 102;
540#[doc = "< HIP Only SPIRV Code Object"]
541pub const hipJitInputType_hipJitInputSpirv: hipJitInputType = 103;
542#[doc = "< Count of Input Types"]
543pub const hipJitInputType_hipJitNumInputTypes: hipJitInputType = 10;
544#[doc = " hipJitInputType"]
545pub type hipJitInputType = ::std::os::raw::c_uint;
546pub const hipJitCacheMode_hipJitCacheOptionNone: hipJitCacheMode = 0;
547pub const hipJitCacheMode_hipJitCacheOptionCG: hipJitCacheMode = 1;
548pub const hipJitCacheMode_hipJitCacheOptionCA: hipJitCacheMode = 2;
549#[doc = " hipJitCacheMode"]
550pub type hipJitCacheMode = ::std::os::raw::c_uint;
551pub const hipJitFallback_hipJitPreferPTX: hipJitFallback = 0;
552pub const hipJitFallback_hipJitPreferBinary: hipJitFallback = 1;
553#[doc = " hipJitFallback"]
554pub type hipJitFallback = ::std::os::raw::c_uint;
555pub const hipLibraryOption_e_hipLibraryHostUniversalFunctionAndDataTable: hipLibraryOption_e = 0;
556pub const hipLibraryOption_e_hipLibraryBinaryIsPreserved: hipLibraryOption_e = 1;
557pub type hipLibraryOption_e = ::std::os::raw::c_uint;
558pub use self::hipLibraryOption_e as hipLibraryOption;
559pub type wchar_t = ::std::os::raw::c_int;
560pub type _Float32 = f32;
561pub type _Float64 = f64;
562pub type _Float32x = f64;
563pub type _Float64x = u128;
564#[repr(C)]
565#[derive(Debug, Copy, Clone)]
566pub struct div_t {
567 pub quot: ::std::os::raw::c_int,
568 pub rem: ::std::os::raw::c_int,
569}
570#[repr(C)]
571#[derive(Debug, Copy, Clone)]
572pub struct ldiv_t {
573 pub quot: ::std::os::raw::c_long,
574 pub rem: ::std::os::raw::c_long,
575}
576#[repr(C)]
577#[derive(Debug, Copy, Clone)]
578pub struct lldiv_t {
579 pub quot: ::std::os::raw::c_longlong,
580 pub rem: ::std::os::raw::c_longlong,
581}
582extern "C" {
583 pub fn __ctype_get_mb_cur_max() -> usize;
584}
585extern "C" {
586 pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64;
587}
588extern "C" {
589 pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
590}
591extern "C" {
592 pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
593}
594extern "C" {
595 pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong;
596}
597extern "C" {
598 pub fn strtod(
599 __nptr: *const ::std::os::raw::c_char,
600 __endptr: *mut *mut ::std::os::raw::c_char,
601 ) -> f64;
602}
603extern "C" {
604 pub fn strtof(
605 __nptr: *const ::std::os::raw::c_char,
606 __endptr: *mut *mut ::std::os::raw::c_char,
607 ) -> f32;
608}
609extern "C" {
610 pub fn strtold(
611 __nptr: *const ::std::os::raw::c_char,
612 __endptr: *mut *mut ::std::os::raw::c_char,
613 ) -> u128;
614}
615extern "C" {
616 pub fn strtol(
617 __nptr: *const ::std::os::raw::c_char,
618 __endptr: *mut *mut ::std::os::raw::c_char,
619 __base: ::std::os::raw::c_int,
620 ) -> ::std::os::raw::c_long;
621}
622extern "C" {
623 pub fn strtoul(
624 __nptr: *const ::std::os::raw::c_char,
625 __endptr: *mut *mut ::std::os::raw::c_char,
626 __base: ::std::os::raw::c_int,
627 ) -> ::std::os::raw::c_ulong;
628}
629extern "C" {
630 pub fn strtoq(
631 __nptr: *const ::std::os::raw::c_char,
632 __endptr: *mut *mut ::std::os::raw::c_char,
633 __base: ::std::os::raw::c_int,
634 ) -> ::std::os::raw::c_longlong;
635}
636extern "C" {
637 pub fn strtouq(
638 __nptr: *const ::std::os::raw::c_char,
639 __endptr: *mut *mut ::std::os::raw::c_char,
640 __base: ::std::os::raw::c_int,
641 ) -> ::std::os::raw::c_ulonglong;
642}
643extern "C" {
644 pub fn strtoll(
645 __nptr: *const ::std::os::raw::c_char,
646 __endptr: *mut *mut ::std::os::raw::c_char,
647 __base: ::std::os::raw::c_int,
648 ) -> ::std::os::raw::c_longlong;
649}
650extern "C" {
651 pub fn strtoull(
652 __nptr: *const ::std::os::raw::c_char,
653 __endptr: *mut *mut ::std::os::raw::c_char,
654 __base: ::std::os::raw::c_int,
655 ) -> ::std::os::raw::c_ulonglong;
656}
657extern "C" {
658 pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char;
659}
660extern "C" {
661 pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
662}
663pub type __u_char = ::std::os::raw::c_uchar;
664pub type __u_short = ::std::os::raw::c_ushort;
665pub type __u_int = ::std::os::raw::c_uint;
666pub type __u_long = ::std::os::raw::c_ulong;
667pub type __int8_t = ::std::os::raw::c_schar;
668pub type __uint8_t = ::std::os::raw::c_uchar;
669pub type __int16_t = ::std::os::raw::c_short;
670pub type __uint16_t = ::std::os::raw::c_ushort;
671pub type __int32_t = ::std::os::raw::c_int;
672pub type __uint32_t = ::std::os::raw::c_uint;
673pub type __int64_t = ::std::os::raw::c_long;
674pub type __uint64_t = ::std::os::raw::c_ulong;
675pub type __int_least8_t = __int8_t;
676pub type __uint_least8_t = __uint8_t;
677pub type __int_least16_t = __int16_t;
678pub type __uint_least16_t = __uint16_t;
679pub type __int_least32_t = __int32_t;
680pub type __uint_least32_t = __uint32_t;
681pub type __int_least64_t = __int64_t;
682pub type __uint_least64_t = __uint64_t;
683pub type __quad_t = ::std::os::raw::c_long;
684pub type __u_quad_t = ::std::os::raw::c_ulong;
685pub type __intmax_t = ::std::os::raw::c_long;
686pub type __uintmax_t = ::std::os::raw::c_ulong;
687pub type __dev_t = ::std::os::raw::c_ulong;
688pub type __uid_t = ::std::os::raw::c_uint;
689pub type __gid_t = ::std::os::raw::c_uint;
690pub type __ino_t = ::std::os::raw::c_ulong;
691pub type __ino64_t = ::std::os::raw::c_ulong;
692pub type __mode_t = ::std::os::raw::c_uint;
693pub type __nlink_t = ::std::os::raw::c_ulong;
694pub type __off_t = ::std::os::raw::c_long;
695pub type __off64_t = ::std::os::raw::c_long;
696pub type __pid_t = ::std::os::raw::c_int;
697#[repr(C)]
698#[derive(Debug, Copy, Clone)]
699pub struct __fsid_t {
700 pub __val: [::std::os::raw::c_int; 2usize],
701}
702pub type __clock_t = ::std::os::raw::c_long;
703pub type __rlim_t = ::std::os::raw::c_ulong;
704pub type __rlim64_t = ::std::os::raw::c_ulong;
705pub type __id_t = ::std::os::raw::c_uint;
706pub type __time_t = ::std::os::raw::c_long;
707pub type __useconds_t = ::std::os::raw::c_uint;
708pub type __suseconds_t = ::std::os::raw::c_long;
709pub type __suseconds64_t = ::std::os::raw::c_long;
710pub type __daddr_t = ::std::os::raw::c_int;
711pub type __key_t = ::std::os::raw::c_int;
712pub type __clockid_t = ::std::os::raw::c_int;
713pub type __timer_t = *mut ::std::os::raw::c_void;
714pub type __blksize_t = ::std::os::raw::c_long;
715pub type __blkcnt_t = ::std::os::raw::c_long;
716pub type __blkcnt64_t = ::std::os::raw::c_long;
717pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
718pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
719pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
720pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
721pub type __fsword_t = ::std::os::raw::c_long;
722pub type __ssize_t = ::std::os::raw::c_long;
723pub type __syscall_slong_t = ::std::os::raw::c_long;
724pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
725pub type __loff_t = __off64_t;
726pub type __caddr_t = *mut ::std::os::raw::c_char;
727pub type __intptr_t = ::std::os::raw::c_long;
728pub type __socklen_t = ::std::os::raw::c_uint;
729pub type __sig_atomic_t = ::std::os::raw::c_int;
730pub type u_char = __u_char;
731pub type u_short = __u_short;
732pub type u_int = __u_int;
733pub type u_long = __u_long;
734pub type quad_t = __quad_t;
735pub type u_quad_t = __u_quad_t;
736pub type fsid_t = __fsid_t;
737pub type loff_t = __loff_t;
738pub type ino_t = __ino_t;
739pub type dev_t = __dev_t;
740pub type gid_t = __gid_t;
741pub type mode_t = __mode_t;
742pub type nlink_t = __nlink_t;
743pub type uid_t = __uid_t;
744pub type off_t = __off_t;
745pub type pid_t = __pid_t;
746pub type id_t = __id_t;
747pub type daddr_t = __daddr_t;
748pub type caddr_t = __caddr_t;
749pub type key_t = __key_t;
750pub type clock_t = __clock_t;
751pub type clockid_t = __clockid_t;
752pub type time_t = __time_t;
753pub type timer_t = __timer_t;
754pub type ulong = ::std::os::raw::c_ulong;
755pub type ushort = ::std::os::raw::c_ushort;
756pub type uint = ::std::os::raw::c_uint;
757pub type u_int8_t = __uint8_t;
758pub type u_int16_t = __uint16_t;
759pub type u_int32_t = __uint32_t;
760pub type u_int64_t = __uint64_t;
761pub type register_t = ::std::os::raw::c_long;
762#[repr(C)]
763#[derive(Debug, Copy, Clone)]
764pub struct __sigset_t {
765 pub __val: [::std::os::raw::c_ulong; 16usize],
766}
767pub type sigset_t = __sigset_t;
768#[repr(C)]
769#[derive(Debug, Copy, Clone)]
770pub struct timeval {
771 pub tv_sec: __time_t,
772 pub tv_usec: __suseconds_t,
773}
774#[repr(C)]
775#[derive(Debug, Copy, Clone)]
776pub struct timespec {
777 pub tv_sec: __time_t,
778 pub tv_nsec: __syscall_slong_t,
779}
780pub type suseconds_t = __suseconds_t;
781pub type __fd_mask = ::std::os::raw::c_long;
782#[repr(C)]
783#[derive(Debug, Copy, Clone)]
784pub struct fd_set {
785 pub __fds_bits: [__fd_mask; 16usize],
786}
787pub type fd_mask = __fd_mask;
788extern "C" {
789 pub fn select(
790 __nfds: ::std::os::raw::c_int,
791 __readfds: *mut fd_set,
792 __writefds: *mut fd_set,
793 __exceptfds: *mut fd_set,
794 __timeout: *mut timeval,
795 ) -> ::std::os::raw::c_int;
796}
797extern "C" {
798 pub fn pselect(
799 __nfds: ::std::os::raw::c_int,
800 __readfds: *mut fd_set,
801 __writefds: *mut fd_set,
802 __exceptfds: *mut fd_set,
803 __timeout: *const timespec,
804 __sigmask: *const __sigset_t,
805 ) -> ::std::os::raw::c_int;
806}
807pub type blksize_t = __blksize_t;
808pub type blkcnt_t = __blkcnt_t;
809pub type fsblkcnt_t = __fsblkcnt_t;
810pub type fsfilcnt_t = __fsfilcnt_t;
811#[repr(C)]
812#[derive(Copy, Clone)]
813pub union __atomic_wide_counter {
814 pub __value64: ::std::os::raw::c_ulonglong,
815 pub __value32: __atomic_wide_counter__bindgen_ty_1,
816}
817#[repr(C)]
818#[derive(Debug, Copy, Clone)]
819pub struct __atomic_wide_counter__bindgen_ty_1 {
820 pub __low: ::std::os::raw::c_uint,
821 pub __high: ::std::os::raw::c_uint,
822}
823#[repr(C)]
824#[derive(Debug, Copy, Clone)]
825pub struct __pthread_internal_list {
826 pub __prev: *mut __pthread_internal_list,
827 pub __next: *mut __pthread_internal_list,
828}
829pub type __pthread_list_t = __pthread_internal_list;
830#[repr(C)]
831#[derive(Debug, Copy, Clone)]
832pub struct __pthread_internal_slist {
833 pub __next: *mut __pthread_internal_slist,
834}
835pub type __pthread_slist_t = __pthread_internal_slist;
836#[repr(C)]
837#[derive(Debug, Copy, Clone)]
838pub struct __pthread_mutex_s {
839 pub __lock: ::std::os::raw::c_int,
840 pub __count: ::std::os::raw::c_uint,
841 pub __owner: ::std::os::raw::c_int,
842 pub __nusers: ::std::os::raw::c_uint,
843 pub __kind: ::std::os::raw::c_int,
844 pub __spins: ::std::os::raw::c_short,
845 pub __elision: ::std::os::raw::c_short,
846 pub __list: __pthread_list_t,
847}
848#[repr(C)]
849#[derive(Debug, Copy, Clone)]
850pub struct __pthread_rwlock_arch_t {
851 pub __readers: ::std::os::raw::c_uint,
852 pub __writers: ::std::os::raw::c_uint,
853 pub __wrphase_futex: ::std::os::raw::c_uint,
854 pub __writers_futex: ::std::os::raw::c_uint,
855 pub __pad3: ::std::os::raw::c_uint,
856 pub __pad4: ::std::os::raw::c_uint,
857 pub __cur_writer: ::std::os::raw::c_int,
858 pub __shared: ::std::os::raw::c_int,
859 pub __rwelision: ::std::os::raw::c_schar,
860 pub __pad1: [::std::os::raw::c_uchar; 7usize],
861 pub __pad2: ::std::os::raw::c_ulong,
862 pub __flags: ::std::os::raw::c_uint,
863}
864#[repr(C)]
865#[derive(Copy, Clone)]
866pub struct __pthread_cond_s {
867 pub __wseq: __atomic_wide_counter,
868 pub __g1_start: __atomic_wide_counter,
869 pub __g_refs: [::std::os::raw::c_uint; 2usize],
870 pub __g_size: [::std::os::raw::c_uint; 2usize],
871 pub __g1_orig_size: ::std::os::raw::c_uint,
872 pub __wrefs: ::std::os::raw::c_uint,
873 pub __g_signals: [::std::os::raw::c_uint; 2usize],
874}
875pub type __tss_t = ::std::os::raw::c_uint;
876pub type __thrd_t = ::std::os::raw::c_ulong;
877#[repr(C)]
878#[derive(Debug, Copy, Clone)]
879pub struct __once_flag {
880 pub __data: ::std::os::raw::c_int,
881}
882pub type pthread_t = ::std::os::raw::c_ulong;
883#[repr(C)]
884#[derive(Copy, Clone)]
885pub union pthread_mutexattr_t {
886 pub __size: [::std::os::raw::c_char; 4usize],
887 pub __align: ::std::os::raw::c_int,
888}
889#[repr(C)]
890#[derive(Copy, Clone)]
891pub union pthread_condattr_t {
892 pub __size: [::std::os::raw::c_char; 4usize],
893 pub __align: ::std::os::raw::c_int,
894}
895pub type pthread_key_t = ::std::os::raw::c_uint;
896pub type pthread_once_t = ::std::os::raw::c_int;
897#[repr(C)]
898#[derive(Copy, Clone)]
899pub union pthread_attr_t {
900 pub __size: [::std::os::raw::c_char; 56usize],
901 pub __align: ::std::os::raw::c_long,
902}
903#[repr(C)]
904#[derive(Copy, Clone)]
905pub union pthread_mutex_t {
906 pub __data: __pthread_mutex_s,
907 pub __size: [::std::os::raw::c_char; 40usize],
908 pub __align: ::std::os::raw::c_long,
909}
910#[repr(C)]
911#[derive(Copy, Clone)]
912pub union pthread_cond_t {
913 pub __data: __pthread_cond_s,
914 pub __size: [::std::os::raw::c_char; 48usize],
915 pub __align: ::std::os::raw::c_longlong,
916}
917#[repr(C)]
918#[derive(Copy, Clone)]
919pub union pthread_rwlock_t {
920 pub __data: __pthread_rwlock_arch_t,
921 pub __size: [::std::os::raw::c_char; 56usize],
922 pub __align: ::std::os::raw::c_long,
923}
924#[repr(C)]
925#[derive(Copy, Clone)]
926pub union pthread_rwlockattr_t {
927 pub __size: [::std::os::raw::c_char; 8usize],
928 pub __align: ::std::os::raw::c_long,
929}
930pub type pthread_spinlock_t = ::std::os::raw::c_int;
931#[repr(C)]
932#[derive(Copy, Clone)]
933pub union pthread_barrier_t {
934 pub __size: [::std::os::raw::c_char; 32usize],
935 pub __align: ::std::os::raw::c_long,
936}
937#[repr(C)]
938#[derive(Copy, Clone)]
939pub union pthread_barrierattr_t {
940 pub __size: [::std::os::raw::c_char; 4usize],
941 pub __align: ::std::os::raw::c_int,
942}
943extern "C" {
944 pub fn random() -> ::std::os::raw::c_long;
945}
946extern "C" {
947 pub fn srandom(__seed: ::std::os::raw::c_uint);
948}
949extern "C" {
950 pub fn initstate(
951 __seed: ::std::os::raw::c_uint,
952 __statebuf: *mut ::std::os::raw::c_char,
953 __statelen: usize,
954 ) -> *mut ::std::os::raw::c_char;
955}
956extern "C" {
957 pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
958}
959#[repr(C)]
960#[derive(Debug, Copy, Clone)]
961pub struct random_data {
962 pub fptr: *mut i32,
963 pub rptr: *mut i32,
964 pub state: *mut i32,
965 pub rand_type: ::std::os::raw::c_int,
966 pub rand_deg: ::std::os::raw::c_int,
967 pub rand_sep: ::std::os::raw::c_int,
968 pub end_ptr: *mut i32,
969}
970extern "C" {
971 pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int;
972}
973extern "C" {
974 pub fn srandom_r(
975 __seed: ::std::os::raw::c_uint,
976 __buf: *mut random_data,
977 ) -> ::std::os::raw::c_int;
978}
979extern "C" {
980 pub fn initstate_r(
981 __seed: ::std::os::raw::c_uint,
982 __statebuf: *mut ::std::os::raw::c_char,
983 __statelen: usize,
984 __buf: *mut random_data,
985 ) -> ::std::os::raw::c_int;
986}
987extern "C" {
988 pub fn setstate_r(
989 __statebuf: *mut ::std::os::raw::c_char,
990 __buf: *mut random_data,
991 ) -> ::std::os::raw::c_int;
992}
993extern "C" {
994 pub fn rand() -> ::std::os::raw::c_int;
995}
996extern "C" {
997 pub fn srand(__seed: ::std::os::raw::c_uint);
998}
999extern "C" {
1000 pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
1001}
1002extern "C" {
1003 pub fn drand48() -> f64;
1004}
1005extern "C" {
1006 pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64;
1007}
1008extern "C" {
1009 pub fn lrand48() -> ::std::os::raw::c_long;
1010}
1011extern "C" {
1012 pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
1013}
1014extern "C" {
1015 pub fn mrand48() -> ::std::os::raw::c_long;
1016}
1017extern "C" {
1018 pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
1019}
1020extern "C" {
1021 pub fn srand48(__seedval: ::std::os::raw::c_long);
1022}
1023extern "C" {
1024 pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort;
1025}
1026extern "C" {
1027 pub fn lcong48(__param: *mut ::std::os::raw::c_ushort);
1028}
1029#[repr(C)]
1030#[derive(Debug, Copy, Clone)]
1031pub struct drand48_data {
1032 pub __x: [::std::os::raw::c_ushort; 3usize],
1033 pub __old_x: [::std::os::raw::c_ushort; 3usize],
1034 pub __c: ::std::os::raw::c_ushort,
1035 pub __init: ::std::os::raw::c_ushort,
1036 pub __a: ::std::os::raw::c_ulonglong,
1037}
1038extern "C" {
1039 pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int;
1040}
1041extern "C" {
1042 pub fn erand48_r(
1043 __xsubi: *mut ::std::os::raw::c_ushort,
1044 __buffer: *mut drand48_data,
1045 __result: *mut f64,
1046 ) -> ::std::os::raw::c_int;
1047}
1048extern "C" {
1049 pub fn lrand48_r(
1050 __buffer: *mut drand48_data,
1051 __result: *mut ::std::os::raw::c_long,
1052 ) -> ::std::os::raw::c_int;
1053}
1054extern "C" {
1055 pub fn nrand48_r(
1056 __xsubi: *mut ::std::os::raw::c_ushort,
1057 __buffer: *mut drand48_data,
1058 __result: *mut ::std::os::raw::c_long,
1059 ) -> ::std::os::raw::c_int;
1060}
1061extern "C" {
1062 pub fn mrand48_r(
1063 __buffer: *mut drand48_data,
1064 __result: *mut ::std::os::raw::c_long,
1065 ) -> ::std::os::raw::c_int;
1066}
1067extern "C" {
1068 pub fn jrand48_r(
1069 __xsubi: *mut ::std::os::raw::c_ushort,
1070 __buffer: *mut drand48_data,
1071 __result: *mut ::std::os::raw::c_long,
1072 ) -> ::std::os::raw::c_int;
1073}
1074extern "C" {
1075 pub fn srand48_r(
1076 __seedval: ::std::os::raw::c_long,
1077 __buffer: *mut drand48_data,
1078 ) -> ::std::os::raw::c_int;
1079}
1080extern "C" {
1081 pub fn seed48_r(
1082 __seed16v: *mut ::std::os::raw::c_ushort,
1083 __buffer: *mut drand48_data,
1084 ) -> ::std::os::raw::c_int;
1085}
1086extern "C" {
1087 pub fn lcong48_r(
1088 __param: *mut ::std::os::raw::c_ushort,
1089 __buffer: *mut drand48_data,
1090 ) -> ::std::os::raw::c_int;
1091}
1092extern "C" {
1093 pub fn arc4random() -> __uint32_t;
1094}
1095extern "C" {
1096 pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __size: usize);
1097}
1098extern "C" {
1099 pub fn arc4random_uniform(__upper_bound: __uint32_t) -> __uint32_t;
1100}
1101extern "C" {
1102 pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
1103}
1104extern "C" {
1105 pub fn calloc(
1106 __nmemb: ::std::os::raw::c_ulong,
1107 __size: ::std::os::raw::c_ulong,
1108 ) -> *mut ::std::os::raw::c_void;
1109}
1110extern "C" {
1111 pub fn realloc(
1112 __ptr: *mut ::std::os::raw::c_void,
1113 __size: ::std::os::raw::c_ulong,
1114 ) -> *mut ::std::os::raw::c_void;
1115}
1116extern "C" {
1117 pub fn free(__ptr: *mut ::std::os::raw::c_void);
1118}
1119extern "C" {
1120 pub fn reallocarray(
1121 __ptr: *mut ::std::os::raw::c_void,
1122 __nmemb: usize,
1123 __size: usize,
1124 ) -> *mut ::std::os::raw::c_void;
1125}
1126extern "C" {
1127 pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
1128}
1129extern "C" {
1130 pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void;
1131}
1132extern "C" {
1133 pub fn posix_memalign(
1134 __memptr: *mut *mut ::std::os::raw::c_void,
1135 __alignment: usize,
1136 __size: usize,
1137 ) -> ::std::os::raw::c_int;
1138}
1139extern "C" {
1140 pub fn aligned_alloc(
1141 __alignment: ::std::os::raw::c_ulong,
1142 __size: ::std::os::raw::c_ulong,
1143 ) -> *mut ::std::os::raw::c_void;
1144}
1145extern "C" {
1146 pub fn abort() -> !;
1147}
1148extern "C" {
1149 pub fn atexit(__func: ::std::option::Option<unsafe extern "C" fn()>) -> ::std::os::raw::c_int;
1150}
1151extern "C" {
1152 pub fn at_quick_exit(
1153 __func: ::std::option::Option<unsafe extern "C" fn()>,
1154 ) -> ::std::os::raw::c_int;
1155}
1156extern "C" {
1157 pub fn on_exit(
1158 __func: ::std::option::Option<
1159 unsafe extern "C" fn(
1160 __status: ::std::os::raw::c_int,
1161 __arg: *mut ::std::os::raw::c_void,
1162 ),
1163 >,
1164 __arg: *mut ::std::os::raw::c_void,
1165 ) -> ::std::os::raw::c_int;
1166}
1167extern "C" {
1168 pub fn exit(__status: ::std::os::raw::c_int) -> !;
1169}
1170extern "C" {
1171 pub fn quick_exit(__status: ::std::os::raw::c_int) -> !;
1172}
1173extern "C" {
1174 pub fn _Exit(__status: ::std::os::raw::c_int) -> !;
1175}
1176extern "C" {
1177 pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1178}
1179extern "C" {
1180 pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1181}
1182extern "C" {
1183 pub fn setenv(
1184 __name: *const ::std::os::raw::c_char,
1185 __value: *const ::std::os::raw::c_char,
1186 __replace: ::std::os::raw::c_int,
1187 ) -> ::std::os::raw::c_int;
1188}
1189extern "C" {
1190 pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1191}
1192extern "C" {
1193 pub fn clearenv() -> ::std::os::raw::c_int;
1194}
1195extern "C" {
1196 pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1197}
1198extern "C" {
1199 pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1200}
1201extern "C" {
1202 pub fn mkstemps(
1203 __template: *mut ::std::os::raw::c_char,
1204 __suffixlen: ::std::os::raw::c_int,
1205 ) -> ::std::os::raw::c_int;
1206}
1207extern "C" {
1208 pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1209}
1210extern "C" {
1211 pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1212}
1213extern "C" {
1214 pub fn realpath(
1215 __name: *const ::std::os::raw::c_char,
1216 __resolved: *mut ::std::os::raw::c_char,
1217 ) -> *mut ::std::os::raw::c_char;
1218}
1219pub type __compar_fn_t = ::std::option::Option<
1220 unsafe extern "C" fn(
1221 arg1: *const ::std::os::raw::c_void,
1222 arg2: *const ::std::os::raw::c_void,
1223 ) -> ::std::os::raw::c_int,
1224>;
1225extern "C" {
1226 pub fn bsearch(
1227 __key: *const ::std::os::raw::c_void,
1228 __base: *const ::std::os::raw::c_void,
1229 __nmemb: usize,
1230 __size: usize,
1231 __compar: __compar_fn_t,
1232 ) -> *mut ::std::os::raw::c_void;
1233}
1234extern "C" {
1235 pub fn qsort(
1236 __base: *mut ::std::os::raw::c_void,
1237 __nmemb: usize,
1238 __size: usize,
1239 __compar: __compar_fn_t,
1240 );
1241}
1242extern "C" {
1243 pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
1244}
1245extern "C" {
1246 pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long;
1247}
1248extern "C" {
1249 pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong;
1250}
1251extern "C" {
1252 pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t;
1253}
1254extern "C" {
1255 pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t;
1256}
1257extern "C" {
1258 pub fn lldiv(
1259 __numer: ::std::os::raw::c_longlong,
1260 __denom: ::std::os::raw::c_longlong,
1261 ) -> lldiv_t;
1262}
1263extern "C" {
1264 pub fn ecvt(
1265 __value: f64,
1266 __ndigit: ::std::os::raw::c_int,
1267 __decpt: *mut ::std::os::raw::c_int,
1268 __sign: *mut ::std::os::raw::c_int,
1269 ) -> *mut ::std::os::raw::c_char;
1270}
1271extern "C" {
1272 pub fn fcvt(
1273 __value: f64,
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 gcvt(
1281 __value: f64,
1282 __ndigit: ::std::os::raw::c_int,
1283 __buf: *mut ::std::os::raw::c_char,
1284 ) -> *mut ::std::os::raw::c_char;
1285}
1286extern "C" {
1287 pub fn qecvt(
1288 __value: u128,
1289 __ndigit: ::std::os::raw::c_int,
1290 __decpt: *mut ::std::os::raw::c_int,
1291 __sign: *mut ::std::os::raw::c_int,
1292 ) -> *mut ::std::os::raw::c_char;
1293}
1294extern "C" {
1295 pub fn qfcvt(
1296 __value: u128,
1297 __ndigit: ::std::os::raw::c_int,
1298 __decpt: *mut ::std::os::raw::c_int,
1299 __sign: *mut ::std::os::raw::c_int,
1300 ) -> *mut ::std::os::raw::c_char;
1301}
1302extern "C" {
1303 pub fn qgcvt(
1304 __value: u128,
1305 __ndigit: ::std::os::raw::c_int,
1306 __buf: *mut ::std::os::raw::c_char,
1307 ) -> *mut ::std::os::raw::c_char;
1308}
1309extern "C" {
1310 pub fn ecvt_r(
1311 __value: f64,
1312 __ndigit: ::std::os::raw::c_int,
1313 __decpt: *mut ::std::os::raw::c_int,
1314 __sign: *mut ::std::os::raw::c_int,
1315 __buf: *mut ::std::os::raw::c_char,
1316 __len: usize,
1317 ) -> ::std::os::raw::c_int;
1318}
1319extern "C" {
1320 pub fn fcvt_r(
1321 __value: f64,
1322 __ndigit: ::std::os::raw::c_int,
1323 __decpt: *mut ::std::os::raw::c_int,
1324 __sign: *mut ::std::os::raw::c_int,
1325 __buf: *mut ::std::os::raw::c_char,
1326 __len: usize,
1327 ) -> ::std::os::raw::c_int;
1328}
1329extern "C" {
1330 pub fn qecvt_r(
1331 __value: u128,
1332 __ndigit: ::std::os::raw::c_int,
1333 __decpt: *mut ::std::os::raw::c_int,
1334 __sign: *mut ::std::os::raw::c_int,
1335 __buf: *mut ::std::os::raw::c_char,
1336 __len: usize,
1337 ) -> ::std::os::raw::c_int;
1338}
1339extern "C" {
1340 pub fn qfcvt_r(
1341 __value: u128,
1342 __ndigit: ::std::os::raw::c_int,
1343 __decpt: *mut ::std::os::raw::c_int,
1344 __sign: *mut ::std::os::raw::c_int,
1345 __buf: *mut ::std::os::raw::c_char,
1346 __len: usize,
1347 ) -> ::std::os::raw::c_int;
1348}
1349extern "C" {
1350 pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int;
1351}
1352extern "C" {
1353 pub fn mbtowc(
1354 __pwc: *mut wchar_t,
1355 __s: *const ::std::os::raw::c_char,
1356 __n: usize,
1357 ) -> ::std::os::raw::c_int;
1358}
1359extern "C" {
1360 pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int;
1361}
1362extern "C" {
1363 pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: usize) -> usize;
1364}
1365extern "C" {
1366 pub fn wcstombs(__s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, __n: usize) -> usize;
1367}
1368extern "C" {
1369 pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1370}
1371extern "C" {
1372 pub fn getsubopt(
1373 __optionp: *mut *mut ::std::os::raw::c_char,
1374 __tokens: *const *mut ::std::os::raw::c_char,
1375 __valuep: *mut *mut ::std::os::raw::c_char,
1376 ) -> ::std::os::raw::c_int;
1377}
1378extern "C" {
1379 pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int)
1380 -> ::std::os::raw::c_int;
1381}
1382#[doc = "< Success"]
1383pub const hiprtcResult_HIPRTC_SUCCESS: hiprtcResult = 0;
1384#[doc = "< Out of memory"]
1385pub const hiprtcResult_HIPRTC_ERROR_OUT_OF_MEMORY: hiprtcResult = 1;
1386#[doc = "< Failed to create program"]
1387pub const hiprtcResult_HIPRTC_ERROR_PROGRAM_CREATION_FAILURE: hiprtcResult = 2;
1388#[doc = "< Invalid input"]
1389pub const hiprtcResult_HIPRTC_ERROR_INVALID_INPUT: hiprtcResult = 3;
1390#[doc = "< Invalid program"]
1391pub const hiprtcResult_HIPRTC_ERROR_INVALID_PROGRAM: hiprtcResult = 4;
1392#[doc = "< Invalid option"]
1393pub const hiprtcResult_HIPRTC_ERROR_INVALID_OPTION: hiprtcResult = 5;
1394#[doc = "< Compilation error"]
1395pub const hiprtcResult_HIPRTC_ERROR_COMPILATION: hiprtcResult = 6;
1396#[doc = "< Failed in builtin operation"]
1397pub const hiprtcResult_HIPRTC_ERROR_BUILTIN_OPERATION_FAILURE: hiprtcResult = 7;
1398#[doc = "< No name expression after compilation"]
1399pub const hiprtcResult_HIPRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION: hiprtcResult = 8;
1400#[doc = "< No lowered names before compilation"]
1401pub const hiprtcResult_HIPRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION: hiprtcResult = 9;
1402#[doc = "< Invalid name expression"]
1403pub const hiprtcResult_HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID: hiprtcResult = 10;
1404#[doc = "< Internal error"]
1405pub const hiprtcResult_HIPRTC_ERROR_INTERNAL_ERROR: hiprtcResult = 11;
1406#[doc = "< Error in linking"]
1407pub const hiprtcResult_HIPRTC_ERROR_LINKING: hiprtcResult = 100;
1408#[doc = " @addtogroup GlobalDefs\n @{\n\n/\n/**\n hiprtc error code"]
1409pub type hiprtcResult = ::std::os::raw::c_uint;
1410#[repr(C)]
1411#[derive(Debug, Copy, Clone)]
1412pub struct ihiprtcLinkState {
1413 _unused: [u8; 0],
1414}
1415#[doc = " hiprtc link state\n"]
1416pub type hiprtcLinkState = *mut ihiprtcLinkState;
1417extern "C" {
1418 #[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"]
1419 pub fn hiprtcGetErrorString(result: hiprtcResult) -> *const ::std::os::raw::c_char;
1420}
1421extern "C" {
1422 #[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"]
1423 pub fn hiprtcVersion(
1424 major: *mut ::std::os::raw::c_int,
1425 minor: *mut ::std::os::raw::c_int,
1426 ) -> hiprtcResult;
1427}
1428#[repr(C)]
1429#[derive(Debug, Copy, Clone)]
1430pub struct _hiprtcProgram {
1431 _unused: [u8; 0],
1432}
1433#[doc = " hiprtc program\n"]
1434pub type hiprtcProgram = *mut _hiprtcProgram;
1435extern "C" {
1436 #[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"]
1437 pub fn hiprtcAddNameExpression(
1438 prog: hiprtcProgram,
1439 name_expression: *const ::std::os::raw::c_char,
1440 ) -> hiprtcResult;
1441}
1442extern "C" {
1443 #[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"]
1444 pub fn hiprtcCompileProgram(
1445 prog: hiprtcProgram,
1446 numOptions: ::std::os::raw::c_int,
1447 options: *const *const ::std::os::raw::c_char,
1448 ) -> hiprtcResult;
1449}
1450extern "C" {
1451 #[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"]
1452 pub fn hiprtcCreateProgram(
1453 prog: *mut hiprtcProgram,
1454 src: *const ::std::os::raw::c_char,
1455 name: *const ::std::os::raw::c_char,
1456 numHeaders: ::std::os::raw::c_int,
1457 headers: *const *const ::std::os::raw::c_char,
1458 includeNames: *const *const ::std::os::raw::c_char,
1459 ) -> hiprtcResult;
1460}
1461extern "C" {
1462 #[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"]
1463 pub fn hiprtcDestroyProgram(prog: *mut hiprtcProgram) -> hiprtcResult;
1464}
1465extern "C" {
1466 #[doc = " @brief Gets the lowered (mangled) name from an instance of hiprtcProgram with the given input\n parameters, and sets the output lowered_name with it.\n @ingroup Runtime\n @param [in] prog runtime compilation program instance.\n @param [in] name_expression const char pointer to the name expression.\n @param [in, out] lowered_name const char array to the lowered (mangled) name.\n @returns #HIPRTC_SUCCESS\n\n If any invalide nullptr input parameters, it will return #HIPRTC_ERROR_INVALID_INPUT\n\n If name_expression is not found, it will return #HIPRTC_ERROR_NAME_EXPRESSION_NOT_VALID\n\n If failed to get lowered_name from the program, it will return #HIPRTC_ERROR_COMPILATION.\n\n @see hiprtcResult"]
1467 pub fn hiprtcGetLoweredName(
1468 prog: hiprtcProgram,
1469 name_expression: *const ::std::os::raw::c_char,
1470 lowered_name: *mut *const ::std::os::raw::c_char,
1471 ) -> hiprtcResult;
1472}
1473extern "C" {
1474 #[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"]
1475 pub fn hiprtcGetProgramLog(
1476 prog: hiprtcProgram,
1477 log: *mut ::std::os::raw::c_char,
1478 ) -> hiprtcResult;
1479}
1480extern "C" {
1481 #[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"]
1482 pub fn hiprtcGetProgramLogSize(prog: hiprtcProgram, logSizeRet: *mut usize) -> hiprtcResult;
1483}
1484extern "C" {
1485 #[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"]
1486 pub fn hiprtcGetCode(prog: hiprtcProgram, code: *mut ::std::os::raw::c_char) -> hiprtcResult;
1487}
1488extern "C" {
1489 #[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"]
1490 pub fn hiprtcGetCodeSize(prog: hiprtcProgram, codeSizeRet: *mut usize) -> hiprtcResult;
1491}
1492extern "C" {
1493 #[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"]
1494 pub fn hiprtcGetBitcode(
1495 prog: hiprtcProgram,
1496 bitcode: *mut ::std::os::raw::c_char,
1497 ) -> hiprtcResult;
1498}
1499extern "C" {
1500 #[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"]
1501 pub fn hiprtcGetBitcodeSize(prog: hiprtcProgram, bitcode_size: *mut usize) -> hiprtcResult;
1502}
1503extern "C" {
1504 #[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"]
1505 pub fn hiprtcLinkCreate(
1506 num_options: ::std::os::raw::c_uint,
1507 option_ptr: *mut hipJitOption,
1508 option_vals_pptr: *mut *mut ::std::os::raw::c_void,
1509 hip_link_state_ptr: *mut hiprtcLinkState,
1510 ) -> hiprtcResult;
1511}
1512extern "C" {
1513 #[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"]
1514 pub fn hiprtcLinkAddFile(
1515 hip_link_state: hiprtcLinkState,
1516 input_type: hipJitInputType,
1517 file_path: *const ::std::os::raw::c_char,
1518 num_options: ::std::os::raw::c_uint,
1519 options_ptr: *mut hipJitOption,
1520 option_values: *mut *mut ::std::os::raw::c_void,
1521 ) -> hiprtcResult;
1522}
1523extern "C" {
1524 #[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"]
1525 pub fn hiprtcLinkAddData(
1526 hip_link_state: hiprtcLinkState,
1527 input_type: hipJitInputType,
1528 image: *mut ::std::os::raw::c_void,
1529 image_size: usize,
1530 name: *const ::std::os::raw::c_char,
1531 num_options: ::std::os::raw::c_uint,
1532 options_ptr: *mut hipJitOption,
1533 option_values: *mut *mut ::std::os::raw::c_void,
1534 ) -> hiprtcResult;
1535}
1536extern "C" {
1537 #[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"]
1538 pub fn hiprtcLinkComplete(
1539 hip_link_state: hiprtcLinkState,
1540 bin_out: *mut *mut ::std::os::raw::c_void,
1541 size_out: *mut usize,
1542 ) -> hiprtcResult;
1543}
1544extern "C" {
1545 #[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"]
1546 pub fn hiprtcLinkDestroy(hip_link_state: hiprtcLinkState) -> hiprtcResult;
1547}
1548pub type int_least8_t = __int_least8_t;
1549pub type int_least16_t = __int_least16_t;
1550pub type int_least32_t = __int_least32_t;
1551pub type int_least64_t = __int_least64_t;
1552pub type uint_least8_t = __uint_least8_t;
1553pub type uint_least16_t = __uint_least16_t;
1554pub type uint_least32_t = __uint_least32_t;
1555pub type uint_least64_t = __uint_least64_t;
1556pub type int_fast8_t = ::std::os::raw::c_schar;
1557pub type int_fast16_t = ::std::os::raw::c_long;
1558pub type int_fast32_t = ::std::os::raw::c_long;
1559pub type int_fast64_t = ::std::os::raw::c_long;
1560pub type uint_fast8_t = ::std::os::raw::c_uchar;
1561pub type uint_fast16_t = ::std::os::raw::c_ulong;
1562pub type uint_fast32_t = ::std::os::raw::c_ulong;
1563pub type uint_fast64_t = ::std::os::raw::c_ulong;
1564pub type intmax_t = __intmax_t;
1565pub type uintmax_t = __uintmax_t;
1566pub const HIP_SUCCESS: _bindgen_ty_1 = 0;
1567pub const HIP_ERROR_INVALID_VALUE: _bindgen_ty_1 = 1;
1568pub const HIP_ERROR_NOT_INITIALIZED: _bindgen_ty_1 = 2;
1569pub const HIP_ERROR_LAUNCH_OUT_OF_RESOURCES: _bindgen_ty_1 = 3;
1570pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
1571#[doc = " @defgroup GlobalDefs Global enum and defines\n @{\n\n/\n/**\n hipDeviceArch_t\n"]
1572#[repr(C)]
1573#[repr(align(4))]
1574#[derive(Debug, Copy, Clone)]
1575pub struct hipDeviceArch_t {
1576 pub _bitfield_align_1: [u8; 0],
1577 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
1578 pub __bindgen_padding_0: u8,
1579}
1580impl hipDeviceArch_t {
1581 #[inline]
1582 pub fn hasGlobalInt32Atomics(&self) -> ::std::os::raw::c_uint {
1583 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
1584 }
1585 #[inline]
1586 pub fn set_hasGlobalInt32Atomics(&mut self, val: ::std::os::raw::c_uint) {
1587 unsafe {
1588 let val: u32 = ::std::mem::transmute(val);
1589 self._bitfield_1.set(0usize, 1u8, val as u64)
1590 }
1591 }
1592 #[inline]
1593 pub fn hasGlobalFloatAtomicExch(&self) -> ::std::os::raw::c_uint {
1594 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
1595 }
1596 #[inline]
1597 pub fn set_hasGlobalFloatAtomicExch(&mut self, val: ::std::os::raw::c_uint) {
1598 unsafe {
1599 let val: u32 = ::std::mem::transmute(val);
1600 self._bitfield_1.set(1usize, 1u8, val as u64)
1601 }
1602 }
1603 #[inline]
1604 pub fn hasSharedInt32Atomics(&self) -> ::std::os::raw::c_uint {
1605 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
1606 }
1607 #[inline]
1608 pub fn set_hasSharedInt32Atomics(&mut self, val: ::std::os::raw::c_uint) {
1609 unsafe {
1610 let val: u32 = ::std::mem::transmute(val);
1611 self._bitfield_1.set(2usize, 1u8, val as u64)
1612 }
1613 }
1614 #[inline]
1615 pub fn hasSharedFloatAtomicExch(&self) -> ::std::os::raw::c_uint {
1616 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
1617 }
1618 #[inline]
1619 pub fn set_hasSharedFloatAtomicExch(&mut self, val: ::std::os::raw::c_uint) {
1620 unsafe {
1621 let val: u32 = ::std::mem::transmute(val);
1622 self._bitfield_1.set(3usize, 1u8, val as u64)
1623 }
1624 }
1625 #[inline]
1626 pub fn hasFloatAtomicAdd(&self) -> ::std::os::raw::c_uint {
1627 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
1628 }
1629 #[inline]
1630 pub fn set_hasFloatAtomicAdd(&mut self, val: ::std::os::raw::c_uint) {
1631 unsafe {
1632 let val: u32 = ::std::mem::transmute(val);
1633 self._bitfield_1.set(4usize, 1u8, val as u64)
1634 }
1635 }
1636 #[inline]
1637 pub fn hasGlobalInt64Atomics(&self) -> ::std::os::raw::c_uint {
1638 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
1639 }
1640 #[inline]
1641 pub fn set_hasGlobalInt64Atomics(&mut self, val: ::std::os::raw::c_uint) {
1642 unsafe {
1643 let val: u32 = ::std::mem::transmute(val);
1644 self._bitfield_1.set(5usize, 1u8, val as u64)
1645 }
1646 }
1647 #[inline]
1648 pub fn hasSharedInt64Atomics(&self) -> ::std::os::raw::c_uint {
1649 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
1650 }
1651 #[inline]
1652 pub fn set_hasSharedInt64Atomics(&mut self, val: ::std::os::raw::c_uint) {
1653 unsafe {
1654 let val: u32 = ::std::mem::transmute(val);
1655 self._bitfield_1.set(6usize, 1u8, val as u64)
1656 }
1657 }
1658 #[inline]
1659 pub fn hasDoubles(&self) -> ::std::os::raw::c_uint {
1660 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
1661 }
1662 #[inline]
1663 pub fn set_hasDoubles(&mut self, val: ::std::os::raw::c_uint) {
1664 unsafe {
1665 let val: u32 = ::std::mem::transmute(val);
1666 self._bitfield_1.set(7usize, 1u8, val as u64)
1667 }
1668 }
1669 #[inline]
1670 pub fn hasWarpVote(&self) -> ::std::os::raw::c_uint {
1671 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
1672 }
1673 #[inline]
1674 pub fn set_hasWarpVote(&mut self, val: ::std::os::raw::c_uint) {
1675 unsafe {
1676 let val: u32 = ::std::mem::transmute(val);
1677 self._bitfield_1.set(8usize, 1u8, val as u64)
1678 }
1679 }
1680 #[inline]
1681 pub fn hasWarpBallot(&self) -> ::std::os::raw::c_uint {
1682 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
1683 }
1684 #[inline]
1685 pub fn set_hasWarpBallot(&mut self, val: ::std::os::raw::c_uint) {
1686 unsafe {
1687 let val: u32 = ::std::mem::transmute(val);
1688 self._bitfield_1.set(9usize, 1u8, val as u64)
1689 }
1690 }
1691 #[inline]
1692 pub fn hasWarpShuffle(&self) -> ::std::os::raw::c_uint {
1693 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
1694 }
1695 #[inline]
1696 pub fn set_hasWarpShuffle(&mut self, val: ::std::os::raw::c_uint) {
1697 unsafe {
1698 let val: u32 = ::std::mem::transmute(val);
1699 self._bitfield_1.set(10usize, 1u8, val as u64)
1700 }
1701 }
1702 #[inline]
1703 pub fn hasFunnelShift(&self) -> ::std::os::raw::c_uint {
1704 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
1705 }
1706 #[inline]
1707 pub fn set_hasFunnelShift(&mut self, val: ::std::os::raw::c_uint) {
1708 unsafe {
1709 let val: u32 = ::std::mem::transmute(val);
1710 self._bitfield_1.set(11usize, 1u8, val as u64)
1711 }
1712 }
1713 #[inline]
1714 pub fn hasThreadFenceSystem(&self) -> ::std::os::raw::c_uint {
1715 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
1716 }
1717 #[inline]
1718 pub fn set_hasThreadFenceSystem(&mut self, val: ::std::os::raw::c_uint) {
1719 unsafe {
1720 let val: u32 = ::std::mem::transmute(val);
1721 self._bitfield_1.set(12usize, 1u8, val as u64)
1722 }
1723 }
1724 #[inline]
1725 pub fn hasSyncThreadsExt(&self) -> ::std::os::raw::c_uint {
1726 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
1727 }
1728 #[inline]
1729 pub fn set_hasSyncThreadsExt(&mut self, val: ::std::os::raw::c_uint) {
1730 unsafe {
1731 let val: u32 = ::std::mem::transmute(val);
1732 self._bitfield_1.set(13usize, 1u8, val as u64)
1733 }
1734 }
1735 #[inline]
1736 pub fn hasSurfaceFuncs(&self) -> ::std::os::raw::c_uint {
1737 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
1738 }
1739 #[inline]
1740 pub fn set_hasSurfaceFuncs(&mut self, val: ::std::os::raw::c_uint) {
1741 unsafe {
1742 let val: u32 = ::std::mem::transmute(val);
1743 self._bitfield_1.set(14usize, 1u8, val as u64)
1744 }
1745 }
1746 #[inline]
1747 pub fn has3dGrid(&self) -> ::std::os::raw::c_uint {
1748 unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
1749 }
1750 #[inline]
1751 pub fn set_has3dGrid(&mut self, val: ::std::os::raw::c_uint) {
1752 unsafe {
1753 let val: u32 = ::std::mem::transmute(val);
1754 self._bitfield_1.set(15usize, 1u8, val as u64)
1755 }
1756 }
1757 #[inline]
1758 pub fn hasDynamicParallelism(&self) -> ::std::os::raw::c_uint {
1759 unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) }
1760 }
1761 #[inline]
1762 pub fn set_hasDynamicParallelism(&mut self, val: ::std::os::raw::c_uint) {
1763 unsafe {
1764 let val: u32 = ::std::mem::transmute(val);
1765 self._bitfield_1.set(16usize, 1u8, val as u64)
1766 }
1767 }
1768 #[inline]
1769 pub fn new_bitfield_1(
1770 hasGlobalInt32Atomics: ::std::os::raw::c_uint,
1771 hasGlobalFloatAtomicExch: ::std::os::raw::c_uint,
1772 hasSharedInt32Atomics: ::std::os::raw::c_uint,
1773 hasSharedFloatAtomicExch: ::std::os::raw::c_uint,
1774 hasFloatAtomicAdd: ::std::os::raw::c_uint,
1775 hasGlobalInt64Atomics: ::std::os::raw::c_uint,
1776 hasSharedInt64Atomics: ::std::os::raw::c_uint,
1777 hasDoubles: ::std::os::raw::c_uint,
1778 hasWarpVote: ::std::os::raw::c_uint,
1779 hasWarpBallot: ::std::os::raw::c_uint,
1780 hasWarpShuffle: ::std::os::raw::c_uint,
1781 hasFunnelShift: ::std::os::raw::c_uint,
1782 hasThreadFenceSystem: ::std::os::raw::c_uint,
1783 hasSyncThreadsExt: ::std::os::raw::c_uint,
1784 hasSurfaceFuncs: ::std::os::raw::c_uint,
1785 has3dGrid: ::std::os::raw::c_uint,
1786 hasDynamicParallelism: ::std::os::raw::c_uint,
1787 ) -> __BindgenBitfieldUnit<[u8; 3usize]> {
1788 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
1789 __bindgen_bitfield_unit.set(0usize, 1u8, {
1790 let hasGlobalInt32Atomics: u32 =
1791 unsafe { ::std::mem::transmute(hasGlobalInt32Atomics) };
1792 hasGlobalInt32Atomics as u64
1793 });
1794 __bindgen_bitfield_unit.set(1usize, 1u8, {
1795 let hasGlobalFloatAtomicExch: u32 =
1796 unsafe { ::std::mem::transmute(hasGlobalFloatAtomicExch) };
1797 hasGlobalFloatAtomicExch as u64
1798 });
1799 __bindgen_bitfield_unit.set(2usize, 1u8, {
1800 let hasSharedInt32Atomics: u32 =
1801 unsafe { ::std::mem::transmute(hasSharedInt32Atomics) };
1802 hasSharedInt32Atomics as u64
1803 });
1804 __bindgen_bitfield_unit.set(3usize, 1u8, {
1805 let hasSharedFloatAtomicExch: u32 =
1806 unsafe { ::std::mem::transmute(hasSharedFloatAtomicExch) };
1807 hasSharedFloatAtomicExch as u64
1808 });
1809 __bindgen_bitfield_unit.set(4usize, 1u8, {
1810 let hasFloatAtomicAdd: u32 = unsafe { ::std::mem::transmute(hasFloatAtomicAdd) };
1811 hasFloatAtomicAdd as u64
1812 });
1813 __bindgen_bitfield_unit.set(5usize, 1u8, {
1814 let hasGlobalInt64Atomics: u32 =
1815 unsafe { ::std::mem::transmute(hasGlobalInt64Atomics) };
1816 hasGlobalInt64Atomics as u64
1817 });
1818 __bindgen_bitfield_unit.set(6usize, 1u8, {
1819 let hasSharedInt64Atomics: u32 =
1820 unsafe { ::std::mem::transmute(hasSharedInt64Atomics) };
1821 hasSharedInt64Atomics as u64
1822 });
1823 __bindgen_bitfield_unit.set(7usize, 1u8, {
1824 let hasDoubles: u32 = unsafe { ::std::mem::transmute(hasDoubles) };
1825 hasDoubles as u64
1826 });
1827 __bindgen_bitfield_unit.set(8usize, 1u8, {
1828 let hasWarpVote: u32 = unsafe { ::std::mem::transmute(hasWarpVote) };
1829 hasWarpVote as u64
1830 });
1831 __bindgen_bitfield_unit.set(9usize, 1u8, {
1832 let hasWarpBallot: u32 = unsafe { ::std::mem::transmute(hasWarpBallot) };
1833 hasWarpBallot as u64
1834 });
1835 __bindgen_bitfield_unit.set(10usize, 1u8, {
1836 let hasWarpShuffle: u32 = unsafe { ::std::mem::transmute(hasWarpShuffle) };
1837 hasWarpShuffle as u64
1838 });
1839 __bindgen_bitfield_unit.set(11usize, 1u8, {
1840 let hasFunnelShift: u32 = unsafe { ::std::mem::transmute(hasFunnelShift) };
1841 hasFunnelShift as u64
1842 });
1843 __bindgen_bitfield_unit.set(12usize, 1u8, {
1844 let hasThreadFenceSystem: u32 = unsafe { ::std::mem::transmute(hasThreadFenceSystem) };
1845 hasThreadFenceSystem as u64
1846 });
1847 __bindgen_bitfield_unit.set(13usize, 1u8, {
1848 let hasSyncThreadsExt: u32 = unsafe { ::std::mem::transmute(hasSyncThreadsExt) };
1849 hasSyncThreadsExt as u64
1850 });
1851 __bindgen_bitfield_unit.set(14usize, 1u8, {
1852 let hasSurfaceFuncs: u32 = unsafe { ::std::mem::transmute(hasSurfaceFuncs) };
1853 hasSurfaceFuncs as u64
1854 });
1855 __bindgen_bitfield_unit.set(15usize, 1u8, {
1856 let has3dGrid: u32 = unsafe { ::std::mem::transmute(has3dGrid) };
1857 has3dGrid as u64
1858 });
1859 __bindgen_bitfield_unit.set(16usize, 1u8, {
1860 let hasDynamicParallelism: u32 =
1861 unsafe { ::std::mem::transmute(hasDynamicParallelism) };
1862 hasDynamicParallelism as u64
1863 });
1864 __bindgen_bitfield_unit
1865 }
1866}
1867#[repr(C)]
1868#[derive(Debug, Copy, Clone)]
1869pub struct hipUUID_t {
1870 pub bytes: [::std::os::raw::c_char; 16usize],
1871}
1872pub type hipUUID = hipUUID_t;
1873#[doc = " hipDeviceProp\n"]
1874#[repr(C)]
1875#[derive(Debug, Copy, Clone)]
1876pub struct hipDeviceProp_tR0600 {
1877 #[doc = "< Device name."]
1878 pub name: [::std::os::raw::c_char; 256usize],
1879 #[doc = "< UUID of a device"]
1880 pub uuid: hipUUID,
1881 #[doc = "< 8-byte unique identifier. Only valid on windows"]
1882 pub luid: [::std::os::raw::c_char; 8usize],
1883 #[doc = "< LUID node mask"]
1884 pub luidDeviceNodeMask: ::std::os::raw::c_uint,
1885 #[doc = "< Size of global memory region (in bytes)."]
1886 pub totalGlobalMem: usize,
1887 #[doc = "< Size of shared memory per block (in bytes)."]
1888 pub sharedMemPerBlock: usize,
1889 #[doc = "< Registers per block."]
1890 pub regsPerBlock: ::std::os::raw::c_int,
1891 #[doc = "< Warp size."]
1892 pub warpSize: ::std::os::raw::c_int,
1893 #[doc = "< Maximum pitch in bytes allowed by memory copies\n< pitched memory"]
1894 pub memPitch: usize,
1895 #[doc = "< Max work items per work group or workgroup max size."]
1896 pub maxThreadsPerBlock: ::std::os::raw::c_int,
1897 #[doc = "< Max number of threads in each dimension (XYZ) of a block."]
1898 pub maxThreadsDim: [::std::os::raw::c_int; 3usize],
1899 #[doc = "< Max grid dimensions (XYZ)."]
1900 pub maxGridSize: [::std::os::raw::c_int; 3usize],
1901 #[doc = "< Max clock frequency of the multiProcessors in khz."]
1902 pub clockRate: ::std::os::raw::c_int,
1903 #[doc = "< Size of shared constant memory region on the device\n< (in bytes)."]
1904 pub totalConstMem: usize,
1905 #[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."]
1906 pub major: ::std::os::raw::c_int,
1907 #[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."]
1908 pub minor: ::std::os::raw::c_int,
1909 #[doc = "< Alignment requirement for textures"]
1910 pub textureAlignment: usize,
1911 #[doc = "< Pitch alignment requirement for texture references bound to"]
1912 pub texturePitchAlignment: usize,
1913 #[doc = "< Deprecated. Use asyncEngineCount instead"]
1914 pub deviceOverlap: ::std::os::raw::c_int,
1915 #[doc = "< Number of multi-processors. When the GPU works in Compute\n< Unit (CU) mode, this value equals the number of CUs;\n< when in Workgroup Processor (WGP) mode, this value equels\n< half of CUs, because a single WGP contains two CUs."]
1916 pub multiProcessorCount: ::std::os::raw::c_int,
1917 #[doc = "< Run time limit for kernels executed on the device"]
1918 pub kernelExecTimeoutEnabled: ::std::os::raw::c_int,
1919 #[doc = "< APU vs dGPU"]
1920 pub integrated: ::std::os::raw::c_int,
1921 #[doc = "< Check whether HIP can map host memory"]
1922 pub canMapHostMemory: ::std::os::raw::c_int,
1923 #[doc = "< Compute mode."]
1924 pub computeMode: ::std::os::raw::c_int,
1925 #[doc = "< Maximum number of elements in 1D images"]
1926 pub maxTexture1D: ::std::os::raw::c_int,
1927 #[doc = "< Maximum 1D mipmap texture size"]
1928 pub maxTexture1DMipmap: ::std::os::raw::c_int,
1929 #[doc = "< Maximum size for 1D textures bound to linear memory"]
1930 pub maxTexture1DLinear: ::std::os::raw::c_int,
1931 #[doc = "< Maximum dimensions (width, height) of 2D images, in image elements"]
1932 pub maxTexture2D: [::std::os::raw::c_int; 2usize],
1933 #[doc = "< Maximum number of elements in 2D array mipmap of images"]
1934 pub maxTexture2DMipmap: [::std::os::raw::c_int; 2usize],
1935 #[doc = "< Maximum 2D tex dimensions if tex are bound to pitched memory"]
1936 pub maxTexture2DLinear: [::std::os::raw::c_int; 3usize],
1937 #[doc = "< Maximum 2D tex dimensions if gather has to be performed"]
1938 pub maxTexture2DGather: [::std::os::raw::c_int; 2usize],
1939 #[doc = "< Maximum dimensions (width, height, depth) of 3D images, in image\n< elements"]
1940 pub maxTexture3D: [::std::os::raw::c_int; 3usize],
1941 #[doc = "< Maximum alternate 3D texture dims"]
1942 pub maxTexture3DAlt: [::std::os::raw::c_int; 3usize],
1943 #[doc = "< Maximum cubemap texture dims"]
1944 pub maxTextureCubemap: ::std::os::raw::c_int,
1945 #[doc = "< Maximum number of elements in 1D array images"]
1946 pub maxTexture1DLayered: [::std::os::raw::c_int; 2usize],
1947 #[doc = "< Maximum number of elements in 2D array images"]
1948 pub maxTexture2DLayered: [::std::os::raw::c_int; 3usize],
1949 #[doc = "< Maximum cubemaps layered texture dims"]
1950 pub maxTextureCubemapLayered: [::std::os::raw::c_int; 2usize],
1951 #[doc = "< Maximum 1D surface size"]
1952 pub maxSurface1D: ::std::os::raw::c_int,
1953 #[doc = "< Maximum 2D surface size"]
1954 pub maxSurface2D: [::std::os::raw::c_int; 2usize],
1955 #[doc = "< Maximum 3D surface size"]
1956 pub maxSurface3D: [::std::os::raw::c_int; 3usize],
1957 #[doc = "< Maximum 1D layered surface size"]
1958 pub maxSurface1DLayered: [::std::os::raw::c_int; 2usize],
1959 #[doc = "< Maximum 2D layared surface size"]
1960 pub maxSurface2DLayered: [::std::os::raw::c_int; 3usize],
1961 #[doc = "< Maximum cubemap surface size"]
1962 pub maxSurfaceCubemap: ::std::os::raw::c_int,
1963 #[doc = "< Maximum cubemap layered surface size"]
1964 pub maxSurfaceCubemapLayered: [::std::os::raw::c_int; 2usize],
1965 #[doc = "< Alignment requirement for surface"]
1966 pub surfaceAlignment: usize,
1967 #[doc = "< Device can possibly execute multiple kernels concurrently."]
1968 pub concurrentKernels: ::std::os::raw::c_int,
1969 #[doc = "< Device has ECC support enabled"]
1970 pub ECCEnabled: ::std::os::raw::c_int,
1971 #[doc = "< PCI Bus ID."]
1972 pub pciBusID: ::std::os::raw::c_int,
1973 #[doc = "< PCI Device ID"]
1974 pub pciDeviceID: ::std::os::raw::c_int,
1975 #[doc = "< PCI Domain ID"]
1976 pub pciDomainID: ::std::os::raw::c_int,
1977 #[doc = "< 1:If device is Tesla device using TCC driver, else 0"]
1978 pub tccDriver: ::std::os::raw::c_int,
1979 #[doc = "< Number of async engines"]
1980 pub asyncEngineCount: ::std::os::raw::c_int,
1981 #[doc = "< Does device and host share unified address space"]
1982 pub unifiedAddressing: ::std::os::raw::c_int,
1983 #[doc = "< Max global memory clock frequency in khz."]
1984 pub memoryClockRate: ::std::os::raw::c_int,
1985 #[doc = "< Global memory bus width in bits."]
1986 pub memoryBusWidth: ::std::os::raw::c_int,
1987 #[doc = "< L2 cache size."]
1988 pub l2CacheSize: ::std::os::raw::c_int,
1989 #[doc = "< Device's max L2 persisting lines in bytes"]
1990 pub persistingL2CacheMaxSize: ::std::os::raw::c_int,
1991 #[doc = "< Maximum resident threads per multi-processor."]
1992 pub maxThreadsPerMultiProcessor: ::std::os::raw::c_int,
1993 #[doc = "< Device supports stream priority"]
1994 pub streamPrioritiesSupported: ::std::os::raw::c_int,
1995 #[doc = "< Indicates globals are cached in L1"]
1996 pub globalL1CacheSupported: ::std::os::raw::c_int,
1997 #[doc = "< Locals are cahced in L1"]
1998 pub localL1CacheSupported: ::std::os::raw::c_int,
1999 #[doc = "< Amount of shared memory available per multiprocessor."]
2000 pub sharedMemPerMultiprocessor: usize,
2001 #[doc = "< registers available per multiprocessor"]
2002 pub regsPerMultiprocessor: ::std::os::raw::c_int,
2003 #[doc = "< Device supports allocating managed memory on this system"]
2004 pub managedMemory: ::std::os::raw::c_int,
2005 #[doc = "< 1 if device is on a multi-GPU board, 0 if not."]
2006 pub isMultiGpuBoard: ::std::os::raw::c_int,
2007 #[doc = "< Unique identifier for a group of devices on same multiboard GPU"]
2008 pub multiGpuBoardGroupID: ::std::os::raw::c_int,
2009 #[doc = "< Link between host and device supports native atomics"]
2010 pub hostNativeAtomicSupported: ::std::os::raw::c_int,
2011 #[doc = "< Deprecated. CUDA only."]
2012 pub singleToDoublePrecisionPerfRatio: ::std::os::raw::c_int,
2013 #[doc = "< Device supports coherently accessing pageable memory\n< without calling hipHostRegister on it"]
2014 pub pageableMemoryAccess: ::std::os::raw::c_int,
2015 #[doc = "< Device can coherently access managed memory concurrently with\n< the CPU"]
2016 pub concurrentManagedAccess: ::std::os::raw::c_int,
2017 #[doc = "< Is compute preemption supported on the device"]
2018 pub computePreemptionSupported: ::std::os::raw::c_int,
2019 #[doc = "< Device can access host registered memory with same\n< address as the host"]
2020 pub canUseHostPointerForRegisteredMem: ::std::os::raw::c_int,
2021 #[doc = "< HIP device supports cooperative launch"]
2022 pub cooperativeLaunch: ::std::os::raw::c_int,
2023 #[doc = "< HIP device supports cooperative launch on multiple\n< devices"]
2024 pub cooperativeMultiDeviceLaunch: ::std::os::raw::c_int,
2025 #[doc = "< Per device m ax shared mem per block usable by special opt in"]
2026 pub sharedMemPerBlockOptin: usize,
2027 #[doc = "< Device accesses pageable memory via the host's\n< page tables"]
2028 pub pageableMemoryAccessUsesHostPageTables: ::std::os::raw::c_int,
2029 #[doc = "< Host can directly access managed memory on the device\n< without migration"]
2030 pub directManagedMemAccessFromHost: ::std::os::raw::c_int,
2031 #[doc = "< Max number of blocks on CU"]
2032 pub maxBlocksPerMultiProcessor: ::std::os::raw::c_int,
2033 #[doc = "< Max value of access policy window"]
2034 pub accessPolicyMaxWindowSize: ::std::os::raw::c_int,
2035 #[doc = "< Shared memory reserved by driver per block"]
2036 pub reservedSharedMemPerBlock: usize,
2037 #[doc = "< Device supports hipHostRegister"]
2038 pub hostRegisterSupported: ::std::os::raw::c_int,
2039 #[doc = "< Indicates if device supports sparse hip arrays"]
2040 pub sparseHipArraySupported: ::std::os::raw::c_int,
2041 #[doc = "< Device supports using the hipHostRegisterReadOnly flag\n< with hipHostRegistger"]
2042 pub hostRegisterReadOnlySupported: ::std::os::raw::c_int,
2043 #[doc = "< Indicates external timeline semaphore support"]
2044 pub timelineSemaphoreInteropSupported: ::std::os::raw::c_int,
2045 #[doc = "< Indicates if device supports hipMallocAsync and hipMemPool APIs"]
2046 pub memoryPoolsSupported: ::std::os::raw::c_int,
2047 #[doc = "< Indicates device support of RDMA APIs"]
2048 pub gpuDirectRDMASupported: ::std::os::raw::c_int,
2049 #[doc = "< Bitmask to be interpreted according to\n< hipFlushGPUDirectRDMAWritesOptions"]
2050 pub gpuDirectRDMAFlushWritesOptions: ::std::os::raw::c_uint,
2051 #[doc = "< value of hipGPUDirectRDMAWritesOrdering"]
2052 pub gpuDirectRDMAWritesOrdering: ::std::os::raw::c_int,
2053 #[doc = "< Bitmask of handle types support with mempool based IPC"]
2054 pub memoryPoolSupportedHandleTypes: ::std::os::raw::c_uint,
2055 #[doc = "< Device supports deferred mapping HIP arrays and HIP\n< mipmapped arrays"]
2056 pub deferredMappingHipArraySupported: ::std::os::raw::c_int,
2057 #[doc = "< Device supports IPC events"]
2058 pub ipcEventSupported: ::std::os::raw::c_int,
2059 #[doc = "< Device supports cluster launch"]
2060 pub clusterLaunch: ::std::os::raw::c_int,
2061 #[doc = "< Indicates device supports unified function pointers"]
2062 pub unifiedFunctionPointers: ::std::os::raw::c_int,
2063 #[doc = "< CUDA Reserved."]
2064 pub reserved: [::std::os::raw::c_int; 63usize],
2065 #[doc = "< Reserved for adding new entries for HIP/CUDA."]
2066 pub hipReserved: [::std::os::raw::c_int; 32usize],
2067 #[doc = "< AMD GCN Arch Name. HIP Only."]
2068 pub gcnArchName: [::std::os::raw::c_char; 256usize],
2069 #[doc = "< Maximum Shared Memory Per CU. HIP Only."]
2070 pub maxSharedMemoryPerMultiProcessor: usize,
2071 #[doc = "< Frequency in khz of the timer used by the device-side \"clock*\"\n< instructions. New for HIP."]
2072 pub clockInstructionRate: ::std::os::raw::c_int,
2073 #[doc = "< Architectural feature flags. New for HIP."]
2074 pub arch: hipDeviceArch_t,
2075 #[doc = "< Addres of HDP_MEM_COHERENCY_FLUSH_CNTL register"]
2076 pub hdpMemFlushCntl: *mut ::std::os::raw::c_uint,
2077 #[doc = "< Addres of HDP_REG_COHERENCY_FLUSH_CNTL register"]
2078 pub hdpRegFlushCntl: *mut ::std::os::raw::c_uint,
2079 #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2080 pub cooperativeMultiDeviceUnmatchedFunc: ::std::os::raw::c_int,
2081 #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2082 pub cooperativeMultiDeviceUnmatchedGridDim: ::std::os::raw::c_int,
2083 #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2084 pub cooperativeMultiDeviceUnmatchedBlockDim: ::std::os::raw::c_int,
2085 #[doc = "< HIP device supports cooperative launch on\n< multiple"]
2086 pub cooperativeMultiDeviceUnmatchedSharedMem: ::std::os::raw::c_int,
2087 #[doc = "< 1: if it is a large PCI bar device, else 0"]
2088 pub isLargeBar: ::std::os::raw::c_int,
2089 #[doc = "< Revision of the GPU in this device"]
2090 pub asicRevision: ::std::os::raw::c_int,
2091}
2092#[doc = "< Unregistered memory"]
2093pub const hipMemoryType_hipMemoryTypeUnregistered: hipMemoryType = 0;
2094#[doc = "< Memory is physically located on host"]
2095pub const hipMemoryType_hipMemoryTypeHost: hipMemoryType = 1;
2096#[doc = "< Memory is physically located on device. (see deviceId for\n< specific device)"]
2097pub const hipMemoryType_hipMemoryTypeDevice: hipMemoryType = 2;
2098#[doc = "< Managed memory, automaticallly managed by the unified\n< memory system\n< place holder for new values."]
2099pub const hipMemoryType_hipMemoryTypeManaged: hipMemoryType = 3;
2100#[doc = "< Array memory, physically located on device. (see deviceId for\n< specific device)"]
2101pub const hipMemoryType_hipMemoryTypeArray: hipMemoryType = 10;
2102#[doc = "< unified address space"]
2103pub const hipMemoryType_hipMemoryTypeUnified: hipMemoryType = 11;
2104#[doc = " hipMemoryType (for pointer attributes)\n\n @note hipMemoryType enum values are combination of cudaMemoryType and cuMemoryType and AMD\n specific enum values.\n"]
2105pub type hipMemoryType = ::std::os::raw::c_uint;
2106#[doc = " Pointer attributes"]
2107#[repr(C)]
2108#[derive(Debug, Copy, Clone)]
2109pub struct hipPointerAttribute_t {
2110 pub type_: hipMemoryType,
2111 pub device: ::std::os::raw::c_int,
2112 pub devicePointer: *mut ::std::os::raw::c_void,
2113 pub hostPointer: *mut ::std::os::raw::c_void,
2114 pub isManaged: ::std::os::raw::c_int,
2115 pub allocationFlags: ::std::os::raw::c_uint,
2116}
2117#[doc = "< Successful completion."]
2118pub const hipError_t_hipSuccess: hipError_t = 0;
2119#[doc = "< One or more of the parameters passed to the API call is NULL\n< or not in an acceptable range."]
2120pub const hipError_t_hipErrorInvalidValue: hipError_t = 1;
2121#[doc = "< out of memory range."]
2122pub const hipError_t_hipErrorOutOfMemory: hipError_t = 2;
2123#[doc = "< Memory allocation error."]
2124pub const hipError_t_hipErrorMemoryAllocation: hipError_t = 2;
2125#[doc = "< Invalid not initialized"]
2126pub const hipError_t_hipErrorNotInitialized: hipError_t = 3;
2127pub const hipError_t_hipErrorInitializationError: hipError_t = 3;
2128#[doc = "< Deinitialized"]
2129pub const hipError_t_hipErrorDeinitialized: hipError_t = 4;
2130pub const hipError_t_hipErrorProfilerDisabled: hipError_t = 5;
2131pub const hipError_t_hipErrorProfilerNotInitialized: hipError_t = 6;
2132pub const hipError_t_hipErrorProfilerAlreadyStarted: hipError_t = 7;
2133pub const hipError_t_hipErrorProfilerAlreadyStopped: hipError_t = 8;
2134#[doc = "< Invalide configuration"]
2135pub const hipError_t_hipErrorInvalidConfiguration: hipError_t = 9;
2136#[doc = "< Invalid pitch value"]
2137pub const hipError_t_hipErrorInvalidPitchValue: hipError_t = 12;
2138#[doc = "< Invalid symbol"]
2139pub const hipError_t_hipErrorInvalidSymbol: hipError_t = 13;
2140#[doc = "< Invalid Device Pointer"]
2141pub const hipError_t_hipErrorInvalidDevicePointer: hipError_t = 17;
2142#[doc = "< Invalid memory copy direction"]
2143pub const hipError_t_hipErrorInvalidMemcpyDirection: hipError_t = 21;
2144pub const hipError_t_hipErrorInsufficientDriver: hipError_t = 35;
2145pub const hipError_t_hipErrorMissingConfiguration: hipError_t = 52;
2146pub const hipError_t_hipErrorPriorLaunchFailure: hipError_t = 53;
2147#[doc = "< Invalid device function"]
2148pub const hipError_t_hipErrorInvalidDeviceFunction: hipError_t = 98;
2149#[doc = "< Call to hipGetDeviceCount returned 0 devices"]
2150pub const hipError_t_hipErrorNoDevice: hipError_t = 100;
2151#[doc = "< DeviceID must be in range from 0 to compute-devices."]
2152pub const hipError_t_hipErrorInvalidDevice: hipError_t = 101;
2153#[doc = "< Invalid image"]
2154pub const hipError_t_hipErrorInvalidImage: hipError_t = 200;
2155#[doc = "< Produced when input context is invalid."]
2156pub const hipError_t_hipErrorInvalidContext: hipError_t = 201;
2157pub const hipError_t_hipErrorContextAlreadyCurrent: hipError_t = 202;
2158pub const hipError_t_hipErrorMapFailed: hipError_t = 205;
2159#[doc = "< Produced when the IPC memory attach failed from ROCr."]
2160pub const hipError_t_hipErrorMapBufferObjectFailed: hipError_t = 205;
2161pub const hipError_t_hipErrorUnmapFailed: hipError_t = 206;
2162pub const hipError_t_hipErrorArrayIsMapped: hipError_t = 207;
2163pub const hipError_t_hipErrorAlreadyMapped: hipError_t = 208;
2164pub const hipError_t_hipErrorNoBinaryForGpu: hipError_t = 209;
2165pub const hipError_t_hipErrorAlreadyAcquired: hipError_t = 210;
2166pub const hipError_t_hipErrorNotMapped: hipError_t = 211;
2167pub const hipError_t_hipErrorNotMappedAsArray: hipError_t = 212;
2168pub const hipError_t_hipErrorNotMappedAsPointer: hipError_t = 213;
2169pub const hipError_t_hipErrorECCNotCorrectable: hipError_t = 214;
2170#[doc = "< Unsupported limit"]
2171pub const hipError_t_hipErrorUnsupportedLimit: hipError_t = 215;
2172#[doc = "< The context is already in use"]
2173pub const hipError_t_hipErrorContextAlreadyInUse: hipError_t = 216;
2174pub const hipError_t_hipErrorPeerAccessUnsupported: hipError_t = 217;
2175#[doc = "< In CUDA DRV, it is CUDA_ERROR_INVALID_PTX"]
2176pub const hipError_t_hipErrorInvalidKernelFile: hipError_t = 218;
2177pub const hipError_t_hipErrorInvalidGraphicsContext: hipError_t = 219;
2178#[doc = "< Invalid source."]
2179pub const hipError_t_hipErrorInvalidSource: hipError_t = 300;
2180#[doc = "< the file is not found."]
2181pub const hipError_t_hipErrorFileNotFound: hipError_t = 301;
2182pub const hipError_t_hipErrorSharedObjectSymbolNotFound: hipError_t = 302;
2183#[doc = "< Failed to initialize shared object."]
2184pub const hipError_t_hipErrorSharedObjectInitFailed: hipError_t = 303;
2185#[doc = "< Not the correct operating system"]
2186pub const hipError_t_hipErrorOperatingSystem: hipError_t = 304;
2187#[doc = "< Invalide handle"]
2188pub const hipError_t_hipErrorInvalidHandle: hipError_t = 400;
2189#[doc = "< Resource handle (hipEvent_t or hipStream_t) invalid."]
2190pub const hipError_t_hipErrorInvalidResourceHandle: hipError_t = 400;
2191#[doc = "< Resource required is not in a valid state to perform operation."]
2192pub const hipError_t_hipErrorIllegalState: hipError_t = 401;
2193#[doc = "< Not found"]
2194pub const hipError_t_hipErrorNotFound: hipError_t = 500;
2195#[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."]
2196pub const hipError_t_hipErrorNotReady: hipError_t = 600;
2197pub const hipError_t_hipErrorIllegalAddress: hipError_t = 700;
2198#[doc = "< Out of resources error."]
2199pub const hipError_t_hipErrorLaunchOutOfResources: hipError_t = 701;
2200#[doc = "< Timeout for the launch."]
2201pub const hipError_t_hipErrorLaunchTimeOut: hipError_t = 702;
2202#[doc = "< Peer access was already enabled from the current\n< device."]
2203pub const hipError_t_hipErrorPeerAccessAlreadyEnabled: hipError_t = 704;
2204#[doc = "< Peer access was never enabled from the current device."]
2205pub const hipError_t_hipErrorPeerAccessNotEnabled: hipError_t = 705;
2206#[doc = "< The process is active."]
2207pub const hipError_t_hipErrorSetOnActiveProcess: hipError_t = 708;
2208#[doc = "< The context is already destroyed"]
2209pub const hipError_t_hipErrorContextIsDestroyed: hipError_t = 709;
2210#[doc = "< Produced when the kernel calls assert."]
2211pub const hipError_t_hipErrorAssert: hipError_t = 710;
2212#[doc = "< Produced when trying to lock a page-locked\n< memory."]
2213pub const hipError_t_hipErrorHostMemoryAlreadyRegistered: hipError_t = 712;
2214#[doc = "< Produced when trying to unlock a non-page-locked\n< memory."]
2215pub const hipError_t_hipErrorHostMemoryNotRegistered: hipError_t = 713;
2216#[doc = "< An exception occurred on the device while executing a kernel."]
2217pub const hipError_t_hipErrorLaunchFailure: hipError_t = 719;
2218#[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."]
2219pub const hipError_t_hipErrorCooperativeLaunchTooLarge: hipError_t = 720;
2220#[doc = "< Produced when the hip API is not supported/implemented"]
2221pub const hipError_t_hipErrorNotSupported: hipError_t = 801;
2222#[doc = "< The operation is not permitted when the stream\n< is capturing."]
2223pub const hipError_t_hipErrorStreamCaptureUnsupported: hipError_t = 900;
2224#[doc = "< The current capture sequence on the stream\n< has been invalidated due to a previous error."]
2225pub const hipError_t_hipErrorStreamCaptureInvalidated: hipError_t = 901;
2226#[doc = "< The operation would have resulted in a merge of\n< two independent capture sequences."]
2227pub const hipError_t_hipErrorStreamCaptureMerge: hipError_t = 902;
2228#[doc = "< The capture was not initiated in this stream."]
2229pub const hipError_t_hipErrorStreamCaptureUnmatched: hipError_t = 903;
2230#[doc = "< The capture sequence contains a fork that was not\n< joined to the primary stream."]
2231pub const hipError_t_hipErrorStreamCaptureUnjoined: hipError_t = 904;
2232#[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"]
2233pub const hipError_t_hipErrorStreamCaptureIsolation: hipError_t = 905;
2234#[doc = "< The operation would have resulted in a disallowed\n< implicit dependency on a current capture sequence\n< from hipStreamLegacy."]
2235pub const hipError_t_hipErrorStreamCaptureImplicit: hipError_t = 906;
2236#[doc = "< The operation is not permitted on an event which was last\n< recorded in a capturing stream."]
2237pub const hipError_t_hipErrorCapturedEvent: hipError_t = 907;
2238#[doc = "< A stream capture sequence not initiated with\n< the hipStreamCaptureModeRelaxed argument to\n< hipStreamBeginCapture was passed to\n< hipStreamEndCapture in a different thread."]
2239pub const hipError_t_hipErrorStreamCaptureWrongThread: hipError_t = 908;
2240#[doc = "< This error indicates that the graph update\n< not performed because it included changes which\n< violated constraintsspecific to instantiated graph\n< update."]
2241pub const hipError_t_hipErrorGraphExecUpdateFailure: hipError_t = 910;
2242#[doc = "< Invalid channel descriptor."]
2243pub const hipError_t_hipErrorInvalidChannelDescriptor: hipError_t = 911;
2244#[doc = "< Invalid texture."]
2245pub const hipError_t_hipErrorInvalidTexture: hipError_t = 912;
2246#[doc = "< Resource type is not valid for the operation."]
2247pub const hipError_t_hipErrorInvalidResourceType: hipError_t = 914;
2248#[doc = "< Resource configuration is not valid for\n< the operation."]
2249pub const hipError_t_hipErrorInvalidResourceConfiguration: hipError_t = 915;
2250#[doc = "< The stream is detached."]
2251pub const hipError_t_hipErrorStreamDetached: hipError_t = 916;
2252#[doc = "< Unknown error."]
2253pub const hipError_t_hipErrorUnknown: hipError_t = 999;
2254#[doc = "< HSA runtime memory call returned error. Typically not seen\n< in production systems."]
2255pub const hipError_t_hipErrorRuntimeMemory: hipError_t = 1052;
2256#[doc = "< HSA runtime call other than memory returned error. Typically\n< not seen in production systems."]
2257pub const hipError_t_hipErrorRuntimeOther: hipError_t = 1053;
2258#[doc = "< The specified cluster size is invalid, for instance\n< when passing launch configurations to occupancy\n< calculations"]
2259pub const hipError_t_hipErrorInvalidClusterSize: hipError_t = 1054;
2260#[doc = "< Marker that more error codes are needed."]
2261pub const hipError_t_hipErrorTbd: hipError_t = 1055;
2262#[doc = " HIP error type\n"]
2263pub type hipError_t = ::std::os::raw::c_uint;
2264pub const hipDeviceAttribute_t_hipDeviceAttributeCudaCompatibleBegin: hipDeviceAttribute_t = 0;
2265pub const hipDeviceAttribute_t_hipDeviceAttributeEccEnabled: hipDeviceAttribute_t = 0;
2266#[doc = "< Cuda only. The maximum size of the window\n< policy in bytes."]
2267pub const hipDeviceAttribute_t_hipDeviceAttributeAccessPolicyMaxWindowSize: hipDeviceAttribute_t =
2268 1;
2269#[doc = "< Asynchronous engines number."]
2270pub const hipDeviceAttribute_t_hipDeviceAttributeAsyncEngineCount: hipDeviceAttribute_t = 2;
2271#[doc = "< Whether host memory can be mapped into device address\n< space"]
2272pub const hipDeviceAttribute_t_hipDeviceAttributeCanMapHostMemory: hipDeviceAttribute_t = 3;
2273#[doc = "< Device can access host registered\n< memory at the same virtual address as\n< the CPU"]
2274pub const hipDeviceAttribute_t_hipDeviceAttributeCanUseHostPointerForRegisteredMem:
2275 hipDeviceAttribute_t = 4;
2276#[doc = "< Peak clock frequency in kilohertz."]
2277pub const hipDeviceAttribute_t_hipDeviceAttributeClockRate: hipDeviceAttribute_t = 5;
2278#[doc = "< Compute mode that device is currently in."]
2279pub const hipDeviceAttribute_t_hipDeviceAttributeComputeMode: hipDeviceAttribute_t = 6;
2280#[doc = "< Device supports Compute Preemption."]
2281pub const hipDeviceAttribute_t_hipDeviceAttributeComputePreemptionSupported: hipDeviceAttribute_t =
2282 7;
2283#[doc = "< Device can possibly execute multiple kernels\n< concurrently."]
2284pub const hipDeviceAttribute_t_hipDeviceAttributeConcurrentKernels: hipDeviceAttribute_t = 8;
2285#[doc = "< Device can coherently access managed memory\n< concurrently with the CPU"]
2286pub const hipDeviceAttribute_t_hipDeviceAttributeConcurrentManagedAccess: hipDeviceAttribute_t = 9;
2287#[doc = "< Support cooperative launch"]
2288pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeLaunch: hipDeviceAttribute_t = 10;
2289#[doc = "< Support cooperative launch on multiple\n< devices"]
2290pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceLaunch:
2291 hipDeviceAttribute_t = 11;
2292#[doc = "< Device can concurrently copy memory and execute a kernel.\n< Deprecated. Use instead asyncEngineCount."]
2293pub const hipDeviceAttribute_t_hipDeviceAttributeDeviceOverlap: hipDeviceAttribute_t = 12;
2294#[doc = "< Host can directly access managed memory on\n< the device without migration"]
2295pub const hipDeviceAttribute_t_hipDeviceAttributeDirectManagedMemAccessFromHost:
2296 hipDeviceAttribute_t = 13;
2297#[doc = "< Device supports caching globals in L1"]
2298pub const hipDeviceAttribute_t_hipDeviceAttributeGlobalL1CacheSupported: hipDeviceAttribute_t = 14;
2299#[doc = "< Link between the device and the host supports\n< native atomic operations"]
2300pub const hipDeviceAttribute_t_hipDeviceAttributeHostNativeAtomicSupported: hipDeviceAttribute_t =
2301 15;
2302#[doc = "< Device is integrated GPU"]
2303pub const hipDeviceAttribute_t_hipDeviceAttributeIntegrated: hipDeviceAttribute_t = 16;
2304#[doc = "< Multiple GPU devices."]
2305pub const hipDeviceAttribute_t_hipDeviceAttributeIsMultiGpuBoard: hipDeviceAttribute_t = 17;
2306#[doc = "< Run time limit for kernels executed on the device"]
2307pub const hipDeviceAttribute_t_hipDeviceAttributeKernelExecTimeout: hipDeviceAttribute_t = 18;
2308#[doc = "< Size of L2 cache in bytes. 0 if the device doesn't have L2\n< cache."]
2309pub const hipDeviceAttribute_t_hipDeviceAttributeL2CacheSize: hipDeviceAttribute_t = 19;
2310#[doc = "< caching locals in L1 is supported"]
2311pub const hipDeviceAttribute_t_hipDeviceAttributeLocalL1CacheSupported: hipDeviceAttribute_t = 20;
2312#[doc = "< 8-byte locally unique identifier in 8 bytes. Undefined on TCC and\n< non-Windows platforms"]
2313pub const hipDeviceAttribute_t_hipDeviceAttributeLuid: hipDeviceAttribute_t = 21;
2314#[doc = "< Luid device node mask. Undefined on TCC and\n< non-Windows platforms"]
2315pub const hipDeviceAttribute_t_hipDeviceAttributeLuidDeviceNodeMask: hipDeviceAttribute_t = 22;
2316#[doc = "< Major compute capability version number."]
2317pub const hipDeviceAttribute_t_hipDeviceAttributeComputeCapabilityMajor: hipDeviceAttribute_t = 23;
2318#[doc = "< Device supports allocating managed memory on this system"]
2319pub const hipDeviceAttribute_t_hipDeviceAttributeManagedMemory: hipDeviceAttribute_t = 24;
2320#[doc = "< Max block size per multiprocessor"]
2321pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlocksPerMultiProcessor: hipDeviceAttribute_t =
2322 25;
2323#[doc = "< Max block size in width."]
2324pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlockDimX: hipDeviceAttribute_t = 26;
2325#[doc = "< Max block size in height."]
2326pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlockDimY: hipDeviceAttribute_t = 27;
2327#[doc = "< Max block size in depth."]
2328pub const hipDeviceAttribute_t_hipDeviceAttributeMaxBlockDimZ: hipDeviceAttribute_t = 28;
2329#[doc = "< Max grid size in width."]
2330pub const hipDeviceAttribute_t_hipDeviceAttributeMaxGridDimX: hipDeviceAttribute_t = 29;
2331#[doc = "< Max grid size in height."]
2332pub const hipDeviceAttribute_t_hipDeviceAttributeMaxGridDimY: hipDeviceAttribute_t = 30;
2333#[doc = "< Max grid size in depth."]
2334pub const hipDeviceAttribute_t_hipDeviceAttributeMaxGridDimZ: hipDeviceAttribute_t = 31;
2335#[doc = "< Maximum size of 1D surface."]
2336pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface1D: hipDeviceAttribute_t = 32;
2337#[doc = "< Cuda only. Maximum dimensions of 1D layered surface."]
2338pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface1DLayered: hipDeviceAttribute_t = 33;
2339#[doc = "< Maximum dimension (width, height) of 2D surface."]
2340pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface2D: hipDeviceAttribute_t = 34;
2341#[doc = "< Cuda only. Maximum dimensions of 2D layered surface."]
2342pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface2DLayered: hipDeviceAttribute_t = 35;
2343#[doc = "< Maximum dimension (width, height, depth) of 3D surface."]
2344pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurface3D: hipDeviceAttribute_t = 36;
2345#[doc = "< Cuda only. Maximum dimensions of Cubemap surface."]
2346pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurfaceCubemap: hipDeviceAttribute_t = 37;
2347#[doc = "< Cuda only. Maximum dimension of Cubemap layered\n< surface."]
2348pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSurfaceCubemapLayered: hipDeviceAttribute_t =
2349 38;
2350#[doc = "< Maximum size of 1D texture."]
2351pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DWidth: hipDeviceAttribute_t = 39;
2352#[doc = "< Maximum dimensions of 1D layered texture."]
2353pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DLayered: hipDeviceAttribute_t = 40;
2354#[doc = "< Maximum number of elements allocatable in a 1D linear\n< texture. Use cudaDeviceGetTexture1DLinearMaxWidth()\n< instead on Cuda."]
2355pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DLinear: hipDeviceAttribute_t = 41;
2356#[doc = "< Maximum size of 1D mipmapped texture."]
2357pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture1DMipmap: hipDeviceAttribute_t = 42;
2358#[doc = "< Maximum dimension width of 2D texture."]
2359pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DWidth: hipDeviceAttribute_t = 43;
2360#[doc = "< Maximum dimension hight of 2D texture."]
2361pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DHeight: hipDeviceAttribute_t = 44;
2362#[doc = "< Maximum dimensions of 2D texture if gather operations\n< performed."]
2363pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DGather: hipDeviceAttribute_t = 45;
2364#[doc = "< Maximum dimensions of 2D layered texture."]
2365pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DLayered: hipDeviceAttribute_t = 46;
2366#[doc = "< Maximum dimensions (width, height, pitch) of 2D\n< textures bound to pitched memory."]
2367pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DLinear: hipDeviceAttribute_t = 47;
2368#[doc = "< Maximum dimensions of 2D mipmapped texture."]
2369pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture2DMipmap: hipDeviceAttribute_t = 48;
2370#[doc = "< Maximum dimension width of 3D texture."]
2371pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DWidth: hipDeviceAttribute_t = 49;
2372#[doc = "< Maximum dimension height of 3D texture."]
2373pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DHeight: hipDeviceAttribute_t = 50;
2374#[doc = "< Maximum dimension depth of 3D texture."]
2375pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DDepth: hipDeviceAttribute_t = 51;
2376#[doc = "< Maximum dimensions of alternate 3D texture."]
2377pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTexture3DAlt: hipDeviceAttribute_t = 52;
2378#[doc = "< Maximum dimensions of Cubemap texture"]
2379pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTextureCubemap: hipDeviceAttribute_t = 53;
2380#[doc = "< Maximum dimensions of Cubemap layered texture."]
2381pub const hipDeviceAttribute_t_hipDeviceAttributeMaxTextureCubemapLayered: hipDeviceAttribute_t =
2382 54;
2383#[doc = "< Maximum dimension of a block"]
2384pub const hipDeviceAttribute_t_hipDeviceAttributeMaxThreadsDim: hipDeviceAttribute_t = 55;
2385#[doc = "< Maximum number of threads per block."]
2386pub const hipDeviceAttribute_t_hipDeviceAttributeMaxThreadsPerBlock: hipDeviceAttribute_t = 56;
2387#[doc = "< Maximum resident threads per multiprocessor."]
2388pub const hipDeviceAttribute_t_hipDeviceAttributeMaxThreadsPerMultiProcessor: hipDeviceAttribute_t =
2389 57;
2390#[doc = "< Maximum pitch in bytes allowed by memory copies"]
2391pub const hipDeviceAttribute_t_hipDeviceAttributeMaxPitch: hipDeviceAttribute_t = 58;
2392#[doc = "< Global memory bus width in bits."]
2393pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryBusWidth: hipDeviceAttribute_t = 59;
2394#[doc = "< Peak memory clock frequency in kilohertz."]
2395pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryClockRate: hipDeviceAttribute_t = 60;
2396#[doc = "< Minor compute capability version number."]
2397pub const hipDeviceAttribute_t_hipDeviceAttributeComputeCapabilityMinor: hipDeviceAttribute_t = 61;
2398#[doc = "< Unique ID of device group on the same multi-GPU\n< board"]
2399pub const hipDeviceAttribute_t_hipDeviceAttributeMultiGpuBoardGroupID: hipDeviceAttribute_t = 62;
2400#[doc = "< Number of multi-processors. When the GPU works in Compute\n< Unit (CU) mode, this value equals the number of CUs;\n< when in Workgroup Processor (WGP) mode, this value equels\n< half of CUs, because a single WGP contains two CUs."]
2401pub const hipDeviceAttribute_t_hipDeviceAttributeMultiprocessorCount: hipDeviceAttribute_t = 63;
2402#[doc = "< Previously hipDeviceAttributeName"]
2403pub const hipDeviceAttribute_t_hipDeviceAttributeUnused1: hipDeviceAttribute_t = 64;
2404#[doc = "< Device supports coherently accessing pageable memory\n< without calling hipHostRegister on it"]
2405pub const hipDeviceAttribute_t_hipDeviceAttributePageableMemoryAccess: hipDeviceAttribute_t = 65;
2406#[doc = "< Device accesses pageable memory\n< via the host's page tables"]
2407pub const hipDeviceAttribute_t_hipDeviceAttributePageableMemoryAccessUsesHostPageTables:
2408 hipDeviceAttribute_t = 66;
2409#[doc = "< PCI Bus ID."]
2410pub const hipDeviceAttribute_t_hipDeviceAttributePciBusId: hipDeviceAttribute_t = 67;
2411#[doc = "< PCI Device ID. Returns pcie slot id"]
2412pub const hipDeviceAttribute_t_hipDeviceAttributePciDeviceId: hipDeviceAttribute_t = 68;
2413#[doc = "< PCI Domain Id."]
2414pub const hipDeviceAttribute_t_hipDeviceAttributePciDomainId: hipDeviceAttribute_t = 69;
2415pub const hipDeviceAttribute_t_hipDeviceAttributePciDomainID: hipDeviceAttribute_t = 69;
2416#[doc = "< Maximum l2 persisting lines capacity in bytes"]
2417pub const hipDeviceAttribute_t_hipDeviceAttributePersistingL2CacheMaxSize: hipDeviceAttribute_t =
2418 70;
2419#[doc = "< 32-bit registers available to a thread block. This\n< number is shared by all thread blocks simultaneously\n< resident on a multiprocessor."]
2420pub const hipDeviceAttribute_t_hipDeviceAttributeMaxRegistersPerBlock: hipDeviceAttribute_t = 71;
2421#[doc = "< 32-bit registers available per block."]
2422pub const hipDeviceAttribute_t_hipDeviceAttributeMaxRegistersPerMultiprocessor:
2423 hipDeviceAttribute_t = 72;
2424#[doc = "< Shared memory reserved by CUDA driver per\n< block."]
2425pub const hipDeviceAttribute_t_hipDeviceAttributeReservedSharedMemPerBlock: hipDeviceAttribute_t =
2426 73;
2427#[doc = "< Maximum shared memory available per block in\n< bytes."]
2428pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSharedMemoryPerBlock: hipDeviceAttribute_t = 74;
2429#[doc = "< Maximum shared memory per block usable by special\n< opt in."]
2430pub const hipDeviceAttribute_t_hipDeviceAttributeSharedMemPerBlockOptin: hipDeviceAttribute_t = 75;
2431#[doc = "< Shared memory available per multiprocessor."]
2432pub const hipDeviceAttribute_t_hipDeviceAttributeSharedMemPerMultiprocessor: hipDeviceAttribute_t =
2433 76;
2434#[doc = "< Cuda only. Performance ratio of single\n< precision to double precision."]
2435pub const hipDeviceAttribute_t_hipDeviceAttributeSingleToDoublePrecisionPerfRatio:
2436 hipDeviceAttribute_t = 77;
2437#[doc = "< Whether to support stream priorities."]
2438pub const hipDeviceAttribute_t_hipDeviceAttributeStreamPrioritiesSupported: hipDeviceAttribute_t =
2439 78;
2440#[doc = "< Alignment requirement for surfaces"]
2441pub const hipDeviceAttribute_t_hipDeviceAttributeSurfaceAlignment: hipDeviceAttribute_t = 79;
2442#[doc = "< Cuda only. Whether device is a Tesla device using TCC driver"]
2443pub const hipDeviceAttribute_t_hipDeviceAttributeTccDriver: hipDeviceAttribute_t = 80;
2444#[doc = "< Alignment requirement for textures"]
2445pub const hipDeviceAttribute_t_hipDeviceAttributeTextureAlignment: hipDeviceAttribute_t = 81;
2446#[doc = "< Pitch alignment requirement for 2D texture\n< references bound to pitched memory;"]
2447pub const hipDeviceAttribute_t_hipDeviceAttributeTexturePitchAlignment: hipDeviceAttribute_t = 82;
2448#[doc = "< Constant memory size in bytes."]
2449pub const hipDeviceAttribute_t_hipDeviceAttributeTotalConstantMemory: hipDeviceAttribute_t = 83;
2450#[doc = "< Global memory available on devicice."]
2451pub const hipDeviceAttribute_t_hipDeviceAttributeTotalGlobalMem: hipDeviceAttribute_t = 84;
2452#[doc = "< Cuda only. An unified address space shared with the\n< host."]
2453pub const hipDeviceAttribute_t_hipDeviceAttributeUnifiedAddressing: hipDeviceAttribute_t = 85;
2454#[doc = "< Previously hipDeviceAttributeUuid"]
2455pub const hipDeviceAttribute_t_hipDeviceAttributeUnused2: hipDeviceAttribute_t = 86;
2456#[doc = "< Warp size in threads."]
2457pub const hipDeviceAttribute_t_hipDeviceAttributeWarpSize: hipDeviceAttribute_t = 87;
2458#[doc = "< Device supports HIP Stream Ordered Memory Allocator"]
2459pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryPoolsSupported: hipDeviceAttribute_t = 88;
2460#[doc = "< Device supports HIP virtual memory\n< management"]
2461pub const hipDeviceAttribute_t_hipDeviceAttributeVirtualMemoryManagementSupported:
2462 hipDeviceAttribute_t = 89;
2463#[doc = "< Can device support host memory registration via\n< hipHostRegister"]
2464pub const hipDeviceAttribute_t_hipDeviceAttributeHostRegisterSupported: hipDeviceAttribute_t = 90;
2465#[doc = "< Supported handle mask for HIP Stream\n< Ordered Memory Allocator"]
2466pub const hipDeviceAttribute_t_hipDeviceAttributeMemoryPoolSupportedHandleTypes:
2467 hipDeviceAttribute_t = 91;
2468#[doc = "< NUMA ID of the cpu node closest to the device,\n< or -1 when NUMA isn't supported"]
2469pub const hipDeviceAttribute_t_hipDeviceAttributeHostNumaId: hipDeviceAttribute_t = 92;
2470#[doc = "< Device supports DMABuf buffer sharing"]
2471pub const hipDeviceAttribute_t_hipDeviceAttributeDmaBufSupported: hipDeviceAttribute_t = 93;
2472#[doc = "< GPU Direct RDMA with HIP VMM is supported\n< (requires DMA-Buf and HIP virtual memory\n< management)"]
2473pub const hipDeviceAttribute_t_hipDeviceAttributeGPUDirectRDMAWithHipVMMSupported:
2474 hipDeviceAttribute_t = 94;
2475#[doc = "< Device supports exporting memory to a fabric handle"]
2476pub const hipDeviceAttribute_t_hipDeviceAttributeHandleTypeFabricSupported: hipDeviceAttribute_t =
2477 95;
2478pub const hipDeviceAttribute_t_hipDeviceAttributeCudaCompatibleEnd: hipDeviceAttribute_t = 9999;
2479pub const hipDeviceAttribute_t_hipDeviceAttributeAmdSpecificBegin: hipDeviceAttribute_t = 10000;
2480pub const hipDeviceAttribute_t_hipDeviceAttributeClockInstructionRate: hipDeviceAttribute_t = 10000;
2481#[doc = "< Previously hipDeviceAttributeArch"]
2482pub const hipDeviceAttribute_t_hipDeviceAttributeUnused3: hipDeviceAttribute_t = 10001;
2483#[doc = "< Maximum Shared Memory PerMultiprocessor."]
2484pub const hipDeviceAttribute_t_hipDeviceAttributeMaxSharedMemoryPerMultiprocessor:
2485 hipDeviceAttribute_t = 10002;
2486#[doc = "< Previously hipDeviceAttributeGcnArch"]
2487pub const hipDeviceAttribute_t_hipDeviceAttributeUnused4: hipDeviceAttribute_t = 10003;
2488#[doc = "< Previously hipDeviceAttributeGcnArchName"]
2489pub const hipDeviceAttribute_t_hipDeviceAttributeUnused5: hipDeviceAttribute_t = 10004;
2490#[doc = "< Address of the HDP_MEM_COHERENCY_FLUSH_CNTL register"]
2491pub const hipDeviceAttribute_t_hipDeviceAttributeHdpMemFlushCntl: hipDeviceAttribute_t = 10005;
2492#[doc = "< Address of the HDP_REG_COHERENCY_FLUSH_CNTL register"]
2493pub const hipDeviceAttribute_t_hipDeviceAttributeHdpRegFlushCntl: hipDeviceAttribute_t = 10006;
2494#[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< functions"]
2495pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc:
2496 hipDeviceAttribute_t = 10007;
2497#[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< grid dimensions"]
2498pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim:
2499 hipDeviceAttribute_t = 10008;
2500#[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< block dimensions"]
2501pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim:
2502 hipDeviceAttribute_t = 10009;
2503#[doc = "< Supports cooperative launch on\n< multiple devices with unmatched\n< shared memories"]
2504pub const hipDeviceAttribute_t_hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem:
2505 hipDeviceAttribute_t = 10010;
2506#[doc = "< Whether it is LargeBar"]
2507pub const hipDeviceAttribute_t_hipDeviceAttributeIsLargeBar: hipDeviceAttribute_t = 10011;
2508#[doc = "< Revision of the GPU in this device"]
2509pub const hipDeviceAttribute_t_hipDeviceAttributeAsicRevision: hipDeviceAttribute_t = 10012;
2510#[doc = "< '1' if Device supports hipStreamWaitValue32() and\n< hipStreamWaitValue64(), '0' otherwise."]
2511pub const hipDeviceAttribute_t_hipDeviceAttributeCanUseStreamWaitValue: hipDeviceAttribute_t =
2512 10013;
2513#[doc = "< '1' if Device supports image, '0' otherwise."]
2514pub const hipDeviceAttribute_t_hipDeviceAttributeImageSupport: hipDeviceAttribute_t = 10014;
2515#[doc = "< All available physical compute\n< units for the device"]
2516pub const hipDeviceAttribute_t_hipDeviceAttributePhysicalMultiProcessorCount: hipDeviceAttribute_t =
2517 10015;
2518#[doc = "< '1' if Device supports fine grain, '0' otherwise"]
2519pub const hipDeviceAttribute_t_hipDeviceAttributeFineGrainSupport: hipDeviceAttribute_t = 10016;
2520#[doc = "< Constant frequency of wall clock in kilohertz."]
2521pub const hipDeviceAttribute_t_hipDeviceAttributeWallClockRate: hipDeviceAttribute_t = 10017;
2522#[doc = "< Number of XCC(s) in the device’s current\n< compute partition(XCP).\n< An XCC is AMD’s fundamental GPU compute tile.\n< Devices like MI300X include multiple XCCs\n< per package. Value varies by boot‑time\n< partition mode(compute or memory).\n< Partition modes can be set using amd‑smi."]
2523pub const hipDeviceAttribute_t_hipDeviceAttributeNumberOfXccs: hipDeviceAttribute_t = 10018;
2524#[doc = "< Max number of available (directly or\n< indirectly addressable) VGPRs per thread in\n< DWORDs."]
2525pub const hipDeviceAttribute_t_hipDeviceAttributeMaxAvailableVgprsPerThread: hipDeviceAttribute_t =
2526 10019;
2527#[doc = "< GPU Manufacturer device id"]
2528pub const hipDeviceAttribute_t_hipDeviceAttributePciChipId: hipDeviceAttribute_t = 10020;
2529#[doc = "< '1' if Device supports expert scheduling mode,\n< '0' otherwise."]
2530pub const hipDeviceAttribute_t_hipDeviceAttributeExpertSchedMode: hipDeviceAttribute_t = 10021;
2531#[doc = "< Maximum number of dynamic data prefetch regions\n< per kernel launch (0 if unsupported)."]
2532pub const hipDeviceAttribute_t_hipDeviceAttributeMaxDynDataPrefetchRegions: hipDeviceAttribute_t =
2533 10022;
2534pub const hipDeviceAttribute_t_hipDeviceAttributeAmdSpecificEnd: hipDeviceAttribute_t = 19999;
2535pub const hipDeviceAttribute_t_hipDeviceAttributeVendorSpecificBegin: hipDeviceAttribute_t = 20000;
2536#[doc = " hipDeviceAttribute_t\n hipDeviceAttributeUnused number: 5"]
2537pub type hipDeviceAttribute_t = ::std::os::raw::c_uint;
2538pub const hipDriverProcAddressQueryResult_HIP_GET_PROC_ADDRESS_SUCCESS:
2539 hipDriverProcAddressQueryResult = 0;
2540pub const hipDriverProcAddressQueryResult_HIP_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND:
2541 hipDriverProcAddressQueryResult = 1;
2542pub const hipDriverProcAddressQueryResult_HIP_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT:
2543 hipDriverProcAddressQueryResult = 2;
2544pub type hipDriverProcAddressQueryResult = ::std::os::raw::c_uint;
2545pub const hipComputeMode_hipComputeModeDefault: hipComputeMode = 0;
2546pub const hipComputeMode_hipComputeModeExclusive: hipComputeMode = 1;
2547pub const hipComputeMode_hipComputeModeProhibited: hipComputeMode = 2;
2548pub const hipComputeMode_hipComputeModeExclusiveProcess: hipComputeMode = 3;
2549pub type hipComputeMode = ::std::os::raw::c_uint;
2550pub const hipFlushGPUDirectRDMAWritesOptions_hipFlushGPUDirectRDMAWritesOptionHost:
2551 hipFlushGPUDirectRDMAWritesOptions = 1;
2552pub const hipFlushGPUDirectRDMAWritesOptions_hipFlushGPUDirectRDMAWritesOptionMemOps:
2553 hipFlushGPUDirectRDMAWritesOptions = 2;
2554pub type hipFlushGPUDirectRDMAWritesOptions = ::std::os::raw::c_uint;
2555pub const hipGPUDirectRDMAWritesOrdering_hipGPUDirectRDMAWritesOrderingNone:
2556 hipGPUDirectRDMAWritesOrdering = 0;
2557pub const hipGPUDirectRDMAWritesOrdering_hipGPUDirectRDMAWritesOrderingOwner:
2558 hipGPUDirectRDMAWritesOrdering = 100;
2559pub const hipGPUDirectRDMAWritesOrdering_hipGPUDirectRDMAWritesOrderingAllDevices:
2560 hipGPUDirectRDMAWritesOrdering = 200;
2561pub type hipGPUDirectRDMAWritesOrdering = ::std::os::raw::c_uint;
2562#[doc = " @defgroup DriverTypes Driver Types\n @{\n This section describes the driver data types.\n"]
2563pub type hipDeviceptr_t = *mut ::std::os::raw::c_void;
2564#[doc = "< Signed channel format"]
2565pub const hipChannelFormatKind_hipChannelFormatKindSigned: hipChannelFormatKind = 0;
2566#[doc = "< Unsigned channel format"]
2567pub const hipChannelFormatKind_hipChannelFormatKindUnsigned: hipChannelFormatKind = 1;
2568#[doc = "< Float channel format"]
2569pub const hipChannelFormatKind_hipChannelFormatKindFloat: hipChannelFormatKind = 2;
2570#[doc = "< No channel format"]
2571pub const hipChannelFormatKind_hipChannelFormatKindNone: hipChannelFormatKind = 3;
2572#[doc = " HIP channel format kinds"]
2573pub type hipChannelFormatKind = ::std::os::raw::c_uint;
2574#[doc = " HIP channel format descriptor"]
2575#[repr(C)]
2576#[derive(Debug, Copy, Clone)]
2577pub struct hipChannelFormatDesc {
2578 pub x: ::std::os::raw::c_int,
2579 pub y: ::std::os::raw::c_int,
2580 pub z: ::std::os::raw::c_int,
2581 pub w: ::std::os::raw::c_int,
2582 #[doc = "< Channel format kind"]
2583 pub f: hipChannelFormatKind,
2584}
2585#[repr(C)]
2586#[derive(Debug, Copy, Clone)]
2587pub struct hipArray {
2588 _unused: [u8; 0],
2589}
2590pub type hipArray_t = *mut hipArray;
2591pub type hipArray_const_t = *const hipArray;
2592#[doc = "< Unsigned 8-bit array format"]
2593pub const hipArray_Format_HIP_AD_FORMAT_UNSIGNED_INT8: hipArray_Format = 1;
2594#[doc = "< Unsigned 16-bit array format"]
2595pub const hipArray_Format_HIP_AD_FORMAT_UNSIGNED_INT16: hipArray_Format = 2;
2596#[doc = "< Unsigned 32-bit array format"]
2597pub const hipArray_Format_HIP_AD_FORMAT_UNSIGNED_INT32: hipArray_Format = 3;
2598#[doc = "< Signed 8-bit array format"]
2599pub const hipArray_Format_HIP_AD_FORMAT_SIGNED_INT8: hipArray_Format = 8;
2600#[doc = "< Signed 16-bit array format"]
2601pub const hipArray_Format_HIP_AD_FORMAT_SIGNED_INT16: hipArray_Format = 9;
2602#[doc = "< Signed 32-bit array format"]
2603pub const hipArray_Format_HIP_AD_FORMAT_SIGNED_INT32: hipArray_Format = 10;
2604#[doc = "< Half array format"]
2605pub const hipArray_Format_HIP_AD_FORMAT_HALF: hipArray_Format = 16;
2606#[doc = "< Float array format"]
2607pub const hipArray_Format_HIP_AD_FORMAT_FLOAT: hipArray_Format = 32;
2608#[doc = " HIP array format"]
2609pub type hipArray_Format = ::std::os::raw::c_uint;
2610#[doc = " HIP array descriptor"]
2611#[repr(C)]
2612#[derive(Debug, Copy, Clone)]
2613pub struct HIP_ARRAY_DESCRIPTOR {
2614 #[doc = "< Width of the array"]
2615 pub Width: usize,
2616 #[doc = "< Height of the array"]
2617 pub Height: usize,
2618 #[doc = "< Format of the array"]
2619 pub Format: hipArray_Format,
2620 #[doc = "< Number of channels of the array"]
2621 pub NumChannels: ::std::os::raw::c_uint,
2622}
2623#[doc = " HIP 3D array descriptor"]
2624#[repr(C)]
2625#[derive(Debug, Copy, Clone)]
2626pub struct HIP_ARRAY3D_DESCRIPTOR {
2627 #[doc = "< Width of the array"]
2628 pub Width: usize,
2629 #[doc = "< Height of the array"]
2630 pub Height: usize,
2631 #[doc = "< Depth of the array"]
2632 pub Depth: usize,
2633 #[doc = "< Format of the array"]
2634 pub Format: hipArray_Format,
2635 #[doc = "< Number of channels of the array"]
2636 pub NumChannels: ::std::os::raw::c_uint,
2637 #[doc = "< Flags of the array"]
2638 pub Flags: ::std::os::raw::c_uint,
2639}
2640#[doc = " HIP 2D memory copy parameters"]
2641#[repr(C)]
2642#[derive(Debug, Copy, Clone)]
2643pub struct hip_Memcpy2D {
2644 #[doc = "< Source width in bytes"]
2645 pub srcXInBytes: usize,
2646 #[doc = "< Source height"]
2647 pub srcY: usize,
2648 #[doc = "< Source memory type"]
2649 pub srcMemoryType: hipMemoryType,
2650 #[doc = "< Source pointer"]
2651 pub srcHost: *const ::std::os::raw::c_void,
2652 #[doc = "< Source device"]
2653 pub srcDevice: hipDeviceptr_t,
2654 #[doc = "< Source array"]
2655 pub srcArray: hipArray_t,
2656 #[doc = "< Source pitch"]
2657 pub srcPitch: usize,
2658 #[doc = "< Destination width in bytes"]
2659 pub dstXInBytes: usize,
2660 #[doc = "< Destination height"]
2661 pub dstY: usize,
2662 #[doc = "< Destination memory type"]
2663 pub dstMemoryType: hipMemoryType,
2664 #[doc = "< Destination pointer"]
2665 pub dstHost: *mut ::std::os::raw::c_void,
2666 #[doc = "< Destination device"]
2667 pub dstDevice: hipDeviceptr_t,
2668 #[doc = "< Destination array"]
2669 pub dstArray: hipArray_t,
2670 #[doc = "< Destination pitch"]
2671 pub dstPitch: usize,
2672 #[doc = "< Width in bytes of the 2D memory copy"]
2673 pub WidthInBytes: usize,
2674 #[doc = "< Height of the 2D memory copy"]
2675 pub Height: usize,
2676}
2677#[doc = " HIP mipmapped array"]
2678#[repr(C)]
2679#[derive(Debug, Copy, Clone)]
2680pub struct hipMipmappedArray {
2681 #[doc = "< Data pointer of the mipmapped array"]
2682 pub data: *mut ::std::os::raw::c_void,
2683 #[doc = "< Description of the mipmapped array"]
2684 pub desc: hipChannelFormatDesc,
2685 #[doc = "< Type of the mipmapped array"]
2686 pub type_: ::std::os::raw::c_uint,
2687 #[doc = "< Width of the mipmapped array"]
2688 pub width: ::std::os::raw::c_uint,
2689 #[doc = "< Height of the mipmapped array"]
2690 pub height: ::std::os::raw::c_uint,
2691 #[doc = "< Depth of the mipmapped array"]
2692 pub depth: ::std::os::raw::c_uint,
2693 #[doc = "< Minimum level of the mipmapped array"]
2694 pub min_mipmap_level: ::std::os::raw::c_uint,
2695 #[doc = "< Maximum level of the mipmapped array"]
2696 pub max_mipmap_level: ::std::os::raw::c_uint,
2697 #[doc = "< Flags of the mipmapped array"]
2698 pub flags: ::std::os::raw::c_uint,
2699 #[doc = "< Format of the mipmapped array"]
2700 pub format: hipArray_Format,
2701 #[doc = "< Number of channels of the mipmapped array"]
2702 pub num_channels: ::std::os::raw::c_uint,
2703}
2704#[doc = " HIP mipmapped array pointer"]
2705pub type hipMipmappedArray_t = *mut hipMipmappedArray;
2706pub type hipmipmappedArray = hipMipmappedArray_t;
2707pub type hipMipmappedArray_const_t = *const hipMipmappedArray;
2708#[doc = "< Array resource"]
2709pub const hipResourceType_hipResourceTypeArray: hipResourceType = 0;
2710#[doc = "< Mipmapped array resource"]
2711pub const hipResourceType_hipResourceTypeMipmappedArray: hipResourceType = 1;
2712#[doc = "< Linear resource"]
2713pub const hipResourceType_hipResourceTypeLinear: hipResourceType = 2;
2714#[doc = "< Pitch 2D resource"]
2715pub const hipResourceType_hipResourceTypePitch2D: hipResourceType = 3;
2716#[doc = " HIP resource types"]
2717pub type hipResourceType = ::std::os::raw::c_uint;
2718#[doc = "< Array resource"]
2719pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_ARRAY: HIPresourcetype_enum = 0;
2720#[doc = "< Mipmapped array resource"]
2721pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY: HIPresourcetype_enum = 1;
2722#[doc = "< Linear resource"]
2723pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_LINEAR: HIPresourcetype_enum = 2;
2724#[doc = "< Pitch 2D resource"]
2725pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_PITCH2D: HIPresourcetype_enum = 3;
2726pub type HIPresourcetype_enum = ::std::os::raw::c_uint;
2727pub use self::HIPresourcetype_enum as HIPresourcetype;
2728pub use self::HIPresourcetype_enum as hipResourcetype;
2729#[doc = "< Wrap address mode"]
2730pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_WRAP: HIPaddress_mode_enum = 0;
2731#[doc = "< Clamp address mode"]
2732pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_CLAMP: HIPaddress_mode_enum = 1;
2733#[doc = "< Mirror address mode"]
2734pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_MIRROR: HIPaddress_mode_enum = 2;
2735#[doc = "< Border address mode"]
2736pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_BORDER: HIPaddress_mode_enum = 3;
2737#[doc = " HIP texture address modes"]
2738pub type HIPaddress_mode_enum = ::std::os::raw::c_uint;
2739#[doc = " HIP texture address modes"]
2740pub use self::HIPaddress_mode_enum as HIPaddress_mode;
2741#[doc = "< Filter mode point"]
2742pub const HIPfilter_mode_enum_HIP_TR_FILTER_MODE_POINT: HIPfilter_mode_enum = 0;
2743#[doc = "< Filter mode linear"]
2744pub const HIPfilter_mode_enum_HIP_TR_FILTER_MODE_LINEAR: HIPfilter_mode_enum = 1;
2745#[doc = " HIP filter modes"]
2746pub type HIPfilter_mode_enum = ::std::os::raw::c_uint;
2747#[doc = " HIP filter modes"]
2748pub use self::HIPfilter_mode_enum as HIPfilter_mode;
2749#[doc = " HIP texture descriptor"]
2750#[repr(C)]
2751#[derive(Debug, Copy, Clone)]
2752pub struct HIP_TEXTURE_DESC_st {
2753 #[doc = "< Address modes"]
2754 pub addressMode: [HIPaddress_mode; 3usize],
2755 #[doc = "< Filter mode"]
2756 pub filterMode: HIPfilter_mode,
2757 #[doc = "< Flags"]
2758 pub flags: ::std::os::raw::c_uint,
2759 #[doc = "< Maximum anisotropy ratio"]
2760 pub maxAnisotropy: ::std::os::raw::c_uint,
2761 #[doc = "< Mipmap filter mode"]
2762 pub mipmapFilterMode: HIPfilter_mode,
2763 #[doc = "< Mipmap level bias"]
2764 pub mipmapLevelBias: f32,
2765 #[doc = "< Mipmap minimum level clamp"]
2766 pub minMipmapLevelClamp: f32,
2767 #[doc = "< Mipmap maximum level clamp"]
2768 pub maxMipmapLevelClamp: f32,
2769 #[doc = "< Border Color"]
2770 pub borderColor: [f32; 4usize],
2771 pub reserved: [::std::os::raw::c_int; 12usize],
2772}
2773#[doc = " HIP texture descriptor"]
2774pub type HIP_TEXTURE_DESC = HIP_TEXTURE_DESC_st;
2775#[doc = "< No resource view format (use underlying resource format)"]
2776pub const hipResourceViewFormat_hipResViewFormatNone: hipResourceViewFormat = 0;
2777#[doc = "< 1 channel, unsigned 8-bit integers"]
2778pub const hipResourceViewFormat_hipResViewFormatUnsignedChar1: hipResourceViewFormat = 1;
2779#[doc = "< 2 channels, unsigned 8-bit integers"]
2780pub const hipResourceViewFormat_hipResViewFormatUnsignedChar2: hipResourceViewFormat = 2;
2781#[doc = "< 4 channels, unsigned 8-bit integers"]
2782pub const hipResourceViewFormat_hipResViewFormatUnsignedChar4: hipResourceViewFormat = 3;
2783#[doc = "< 1 channel, signed 8-bit integers"]
2784pub const hipResourceViewFormat_hipResViewFormatSignedChar1: hipResourceViewFormat = 4;
2785#[doc = "< 2 channels, signed 8-bit integers"]
2786pub const hipResourceViewFormat_hipResViewFormatSignedChar2: hipResourceViewFormat = 5;
2787#[doc = "< 4 channels, signed 8-bit integers"]
2788pub const hipResourceViewFormat_hipResViewFormatSignedChar4: hipResourceViewFormat = 6;
2789#[doc = "< 1 channel, unsigned 16-bit integers"]
2790pub const hipResourceViewFormat_hipResViewFormatUnsignedShort1: hipResourceViewFormat = 7;
2791#[doc = "< 2 channels, unsigned 16-bit integers"]
2792pub const hipResourceViewFormat_hipResViewFormatUnsignedShort2: hipResourceViewFormat = 8;
2793#[doc = "< 4 channels, unsigned 16-bit integers"]
2794pub const hipResourceViewFormat_hipResViewFormatUnsignedShort4: hipResourceViewFormat = 9;
2795#[doc = "< 1 channel, signed 16-bit integers"]
2796pub const hipResourceViewFormat_hipResViewFormatSignedShort1: hipResourceViewFormat = 10;
2797#[doc = "< 2 channels, signed 16-bit integers"]
2798pub const hipResourceViewFormat_hipResViewFormatSignedShort2: hipResourceViewFormat = 11;
2799#[doc = "< 4 channels, signed 16-bit integers"]
2800pub const hipResourceViewFormat_hipResViewFormatSignedShort4: hipResourceViewFormat = 12;
2801#[doc = "< 1 channel, unsigned 32-bit integers"]
2802pub const hipResourceViewFormat_hipResViewFormatUnsignedInt1: hipResourceViewFormat = 13;
2803#[doc = "< 2 channels, unsigned 32-bit integers"]
2804pub const hipResourceViewFormat_hipResViewFormatUnsignedInt2: hipResourceViewFormat = 14;
2805#[doc = "< 4 channels, unsigned 32-bit integers"]
2806pub const hipResourceViewFormat_hipResViewFormatUnsignedInt4: hipResourceViewFormat = 15;
2807#[doc = "< 1 channel, signed 32-bit integers"]
2808pub const hipResourceViewFormat_hipResViewFormatSignedInt1: hipResourceViewFormat = 16;
2809#[doc = "< 2 channels, signed 32-bit integers"]
2810pub const hipResourceViewFormat_hipResViewFormatSignedInt2: hipResourceViewFormat = 17;
2811#[doc = "< 4 channels, signed 32-bit integers"]
2812pub const hipResourceViewFormat_hipResViewFormatSignedInt4: hipResourceViewFormat = 18;
2813#[doc = "< 1 channel, 16-bit floating point"]
2814pub const hipResourceViewFormat_hipResViewFormatHalf1: hipResourceViewFormat = 19;
2815#[doc = "< 2 channels, 16-bit floating point"]
2816pub const hipResourceViewFormat_hipResViewFormatHalf2: hipResourceViewFormat = 20;
2817#[doc = "< 4 channels, 16-bit floating point"]
2818pub const hipResourceViewFormat_hipResViewFormatHalf4: hipResourceViewFormat = 21;
2819#[doc = "< 1 channel, 32-bit floating point"]
2820pub const hipResourceViewFormat_hipResViewFormatFloat1: hipResourceViewFormat = 22;
2821#[doc = "< 2 channels, 32-bit floating point"]
2822pub const hipResourceViewFormat_hipResViewFormatFloat2: hipResourceViewFormat = 23;
2823#[doc = "< 4 channels, 32-bit floating point"]
2824pub const hipResourceViewFormat_hipResViewFormatFloat4: hipResourceViewFormat = 24;
2825#[doc = "< Block-compressed 1"]
2826pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed1: hipResourceViewFormat =
2827 25;
2828#[doc = "< Block-compressed 2"]
2829pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed2: hipResourceViewFormat =
2830 26;
2831#[doc = "< Block-compressed 3"]
2832pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed3: hipResourceViewFormat =
2833 27;
2834#[doc = "< Block-compressed 4 unsigned"]
2835pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed4: hipResourceViewFormat =
2836 28;
2837#[doc = "< Block-compressed 4 signed"]
2838pub const hipResourceViewFormat_hipResViewFormatSignedBlockCompressed4: hipResourceViewFormat = 29;
2839#[doc = "< Block-compressed 5 unsigned"]
2840pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed5: hipResourceViewFormat =
2841 30;
2842#[doc = "< Block-compressed 5 signed"]
2843pub const hipResourceViewFormat_hipResViewFormatSignedBlockCompressed5: hipResourceViewFormat = 31;
2844#[doc = "< Block-compressed 6 unsigned half-float"]
2845pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed6H: hipResourceViewFormat =
2846 32;
2847#[doc = "< Block-compressed 6 signed half-float"]
2848pub const hipResourceViewFormat_hipResViewFormatSignedBlockCompressed6H: hipResourceViewFormat = 33;
2849#[doc = "< Block-compressed 7"]
2850pub const hipResourceViewFormat_hipResViewFormatUnsignedBlockCompressed7: hipResourceViewFormat =
2851 34;
2852#[doc = " HIP texture resource view formats"]
2853pub type hipResourceViewFormat = ::std::os::raw::c_uint;
2854#[doc = "< No resource view format (use underlying resource format)"]
2855pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_NONE: HIPresourceViewFormat_enum = 0;
2856#[doc = "< 1 channel, unsigned 8-bit integers"]
2857pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X8: HIPresourceViewFormat_enum = 1;
2858#[doc = "< 2 channels, unsigned 8-bit integers"]
2859pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X8: HIPresourceViewFormat_enum = 2;
2860#[doc = "< 4 channels, unsigned 8-bit integers"]
2861pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X8: HIPresourceViewFormat_enum = 3;
2862#[doc = "< 1 channel, signed 8-bit integers"]
2863pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X8: HIPresourceViewFormat_enum = 4;
2864#[doc = "< 2 channels, signed 8-bit integers"]
2865pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X8: HIPresourceViewFormat_enum = 5;
2866#[doc = "< 4 channels, signed 8-bit integers"]
2867pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X8: HIPresourceViewFormat_enum = 6;
2868#[doc = "< 1 channel, unsigned 16-bit integers"]
2869pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X16: HIPresourceViewFormat_enum = 7;
2870#[doc = "< 2 channels, unsigned 16-bit integers"]
2871pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X16: HIPresourceViewFormat_enum = 8;
2872#[doc = "< 4 channels, unsigned 16-bit integers"]
2873pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X16: HIPresourceViewFormat_enum = 9;
2874#[doc = "< 1 channel, signed 16-bit integers"]
2875pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X16: HIPresourceViewFormat_enum = 10;
2876#[doc = "< 2 channels, signed 16-bit integers"]
2877pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X16: HIPresourceViewFormat_enum = 11;
2878#[doc = "< 4 channels, signed 16-bit integers"]
2879pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X16: HIPresourceViewFormat_enum = 12;
2880#[doc = "< 1 channel, unsigned 32-bit integers"]
2881pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X32: HIPresourceViewFormat_enum = 13;
2882#[doc = "< 2 channels, unsigned 32-bit integers"]
2883pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X32: HIPresourceViewFormat_enum = 14;
2884#[doc = "< 4 channels, unsigned 32-bit integers"]
2885pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X32: HIPresourceViewFormat_enum = 15;
2886#[doc = "< 1 channel, signed 32-bit integers"]
2887pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X32: HIPresourceViewFormat_enum = 16;
2888#[doc = "< 2 channels, signed 32-bit integers"]
2889pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X32: HIPresourceViewFormat_enum = 17;
2890#[doc = "< 4 channels, signed 32-bit integers"]
2891pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X32: HIPresourceViewFormat_enum = 18;
2892#[doc = "< 1 channel, 16-bit floating point"]
2893pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_1X16: HIPresourceViewFormat_enum =
2894 19;
2895#[doc = "< 2 channels, 16-bit floating point"]
2896pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_2X16: HIPresourceViewFormat_enum =
2897 20;
2898#[doc = "< 4 channels, 16-bit floating point"]
2899pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_4X16: HIPresourceViewFormat_enum =
2900 21;
2901#[doc = "< 1 channel, 32-bit floating point"]
2902pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_1X32: HIPresourceViewFormat_enum =
2903 22;
2904#[doc = "< 2 channels, 32-bit floating point"]
2905pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_2X32: HIPresourceViewFormat_enum =
2906 23;
2907#[doc = "< 4 channels, 32-bit floating point"]
2908pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_4X32: HIPresourceViewFormat_enum =
2909 24;
2910#[doc = "< Block-compressed 1"]
2911pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC1: HIPresourceViewFormat_enum =
2912 25;
2913#[doc = "< Block-compressed 2"]
2914pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC2: HIPresourceViewFormat_enum =
2915 26;
2916#[doc = "< Block-compressed 3"]
2917pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC3: HIPresourceViewFormat_enum =
2918 27;
2919#[doc = "< Block-compressed 4 unsigned"]
2920pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC4: HIPresourceViewFormat_enum =
2921 28;
2922#[doc = "< Block-compressed 4 signed"]
2923pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC4: HIPresourceViewFormat_enum =
2924 29;
2925#[doc = "< Block-compressed 5 unsigned"]
2926pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC5: HIPresourceViewFormat_enum =
2927 30;
2928#[doc = "< Block-compressed 5 signed"]
2929pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC5: HIPresourceViewFormat_enum =
2930 31;
2931#[doc = "< Block-compressed 6 unsigned half-float"]
2932pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H: HIPresourceViewFormat_enum =
2933 32;
2934#[doc = "< Block-compressed 6 signed half-float"]
2935pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC6H: HIPresourceViewFormat_enum =
2936 33;
2937#[doc = "< Block-compressed 7"]
2938pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC7: HIPresourceViewFormat_enum =
2939 34;
2940#[doc = " HIP texture resource view formats"]
2941pub type HIPresourceViewFormat_enum = ::std::os::raw::c_uint;
2942#[doc = " HIP texture resource view formats"]
2943pub use self::HIPresourceViewFormat_enum as HIPresourceViewFormat;
2944#[doc = " HIP resource descriptor"]
2945#[repr(C)]
2946#[derive(Copy, Clone)]
2947pub struct hipResourceDesc {
2948 #[doc = "< Resource type"]
2949 pub resType: hipResourceType,
2950 pub res: hipResourceDesc__bindgen_ty_1,
2951}
2952#[repr(C)]
2953#[derive(Copy, Clone)]
2954pub union hipResourceDesc__bindgen_ty_1 {
2955 pub array: hipResourceDesc__bindgen_ty_1__bindgen_ty_1,
2956 pub mipmap: hipResourceDesc__bindgen_ty_1__bindgen_ty_2,
2957 pub linear: hipResourceDesc__bindgen_ty_1__bindgen_ty_3,
2958 pub pitch2D: hipResourceDesc__bindgen_ty_1__bindgen_ty_4,
2959}
2960#[repr(C)]
2961#[derive(Debug, Copy, Clone)]
2962pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_1 {
2963 #[doc = "< HIP array"]
2964 pub array: hipArray_t,
2965}
2966#[repr(C)]
2967#[derive(Debug, Copy, Clone)]
2968pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_2 {
2969 #[doc = "< HIP mipmapped array"]
2970 pub mipmap: hipMipmappedArray_t,
2971}
2972#[repr(C)]
2973#[derive(Debug, Copy, Clone)]
2974pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_3 {
2975 #[doc = "< Device pointer"]
2976 pub devPtr: *mut ::std::os::raw::c_void,
2977 #[doc = "< Channel format description"]
2978 pub desc: hipChannelFormatDesc,
2979 #[doc = "< Size in bytes"]
2980 pub sizeInBytes: usize,
2981}
2982#[repr(C)]
2983#[derive(Debug, Copy, Clone)]
2984pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_4 {
2985 #[doc = "< Device pointer"]
2986 pub devPtr: *mut ::std::os::raw::c_void,
2987 #[doc = "< Channel format description"]
2988 pub desc: hipChannelFormatDesc,
2989 #[doc = "< Width of the array in elements"]
2990 pub width: usize,
2991 #[doc = "< Height of the array in elements"]
2992 pub height: usize,
2993 #[doc = "< Pitch between two rows in bytes"]
2994 pub pitchInBytes: usize,
2995}
2996#[doc = " HIP resource view descriptor struct"]
2997#[repr(C)]
2998#[derive(Copy, Clone)]
2999pub struct HIP_RESOURCE_DESC_st {
3000 #[doc = "< Resource type"]
3001 pub resType: HIPresourcetype,
3002 pub res: HIP_RESOURCE_DESC_st__bindgen_ty_1,
3003 #[doc = "< Flags (must be zero)"]
3004 pub flags: ::std::os::raw::c_uint,
3005}
3006#[repr(C)]
3007#[derive(Copy, Clone)]
3008pub union HIP_RESOURCE_DESC_st__bindgen_ty_1 {
3009 pub array: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1,
3010 pub mipmap: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2,
3011 pub linear: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3,
3012 pub pitch2D: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4,
3013 pub reserved: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5,
3014}
3015#[repr(C)]
3016#[derive(Debug, Copy, Clone)]
3017pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 {
3018 #[doc = "< HIP array"]
3019 pub hArray: hipArray_t,
3020}
3021#[repr(C)]
3022#[derive(Debug, Copy, Clone)]
3023pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 {
3024 #[doc = "< HIP mipmapped array"]
3025 pub hMipmappedArray: hipMipmappedArray_t,
3026}
3027#[repr(C)]
3028#[derive(Debug, Copy, Clone)]
3029pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 {
3030 #[doc = "< Device pointer"]
3031 pub devPtr: hipDeviceptr_t,
3032 #[doc = "< Array format"]
3033 pub format: hipArray_Format,
3034 #[doc = "< Channels per array element"]
3035 pub numChannels: ::std::os::raw::c_uint,
3036 #[doc = "< Size in bytes"]
3037 pub sizeInBytes: usize,
3038}
3039#[repr(C)]
3040#[derive(Debug, Copy, Clone)]
3041pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 {
3042 #[doc = "< Device pointer"]
3043 pub devPtr: hipDeviceptr_t,
3044 #[doc = "< Array format"]
3045 pub format: hipArray_Format,
3046 #[doc = "< Channels per array element"]
3047 pub numChannels: ::std::os::raw::c_uint,
3048 #[doc = "< Width of the array in elements"]
3049 pub width: usize,
3050 #[doc = "< Height of the array in elements"]
3051 pub height: usize,
3052 #[doc = "< Pitch between two rows in bytes"]
3053 pub pitchInBytes: usize,
3054}
3055#[repr(C)]
3056#[derive(Debug, Copy, Clone)]
3057pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5 {
3058 pub reserved: [::std::os::raw::c_int; 32usize],
3059}
3060#[doc = " HIP resource view descriptor struct"]
3061pub type HIP_RESOURCE_DESC = HIP_RESOURCE_DESC_st;
3062#[doc = " HIP resource view descriptor"]
3063#[repr(C)]
3064#[derive(Debug, Copy, Clone)]
3065pub struct hipResourceViewDesc {
3066 #[doc = "< Resource view format"]
3067 pub format: hipResourceViewFormat,
3068 #[doc = "< Width of the resource view"]
3069 pub width: usize,
3070 #[doc = "< Height of the resource view"]
3071 pub height: usize,
3072 #[doc = "< Depth of the resource view"]
3073 pub depth: usize,
3074 #[doc = "< First defined mipmap level"]
3075 pub firstMipmapLevel: ::std::os::raw::c_uint,
3076 #[doc = "< Last defined mipmap level"]
3077 pub lastMipmapLevel: ::std::os::raw::c_uint,
3078 #[doc = "< First layer index"]
3079 pub firstLayer: ::std::os::raw::c_uint,
3080 #[doc = "< Last layer index"]
3081 pub lastLayer: ::std::os::raw::c_uint,
3082}
3083#[doc = " Resource view descriptor"]
3084#[repr(C)]
3085#[derive(Debug, Copy, Clone)]
3086pub struct HIP_RESOURCE_VIEW_DESC_st {
3087 #[doc = "< Resource view format"]
3088 pub format: HIPresourceViewFormat,
3089 #[doc = "< Width of the resource view"]
3090 pub width: usize,
3091 #[doc = "< Height of the resource view"]
3092 pub height: usize,
3093 #[doc = "< Depth of the resource view"]
3094 pub depth: usize,
3095 #[doc = "< First defined mipmap level"]
3096 pub firstMipmapLevel: ::std::os::raw::c_uint,
3097 #[doc = "< Last defined mipmap level"]
3098 pub lastMipmapLevel: ::std::os::raw::c_uint,
3099 #[doc = "< First layer index"]
3100 pub firstLayer: ::std::os::raw::c_uint,
3101 #[doc = "< Last layer index"]
3102 pub lastLayer: ::std::os::raw::c_uint,
3103 pub reserved: [::std::os::raw::c_uint; 16usize],
3104}
3105#[doc = " Resource view descriptor"]
3106pub type HIP_RESOURCE_VIEW_DESC = HIP_RESOURCE_VIEW_DESC_st;
3107#[doc = "< Host-to-Host Copy"]
3108pub const hipMemcpyKind_hipMemcpyHostToHost: hipMemcpyKind = 0;
3109#[doc = "< Host-to-Device Copy"]
3110pub const hipMemcpyKind_hipMemcpyHostToDevice: hipMemcpyKind = 1;
3111#[doc = "< Device-to-Host Copy"]
3112pub const hipMemcpyKind_hipMemcpyDeviceToHost: hipMemcpyKind = 2;
3113#[doc = "< Device-to-Device Copy"]
3114pub const hipMemcpyKind_hipMemcpyDeviceToDevice: hipMemcpyKind = 3;
3115#[doc = "< Runtime will automatically determine\n< copy-kind based on virtual addresses."]
3116pub const hipMemcpyKind_hipMemcpyDefault: hipMemcpyKind = 4;
3117#[doc = "< Device-to-Device Copy without using compute units"]
3118pub const hipMemcpyKind_hipMemcpyDeviceToDeviceNoCU: hipMemcpyKind = 1024;
3119pub type hipMemcpyKind = ::std::os::raw::c_uint;
3120#[doc = " HIP pithed pointer"]
3121#[repr(C)]
3122#[derive(Debug, Copy, Clone)]
3123pub struct hipPitchedPtr {
3124 #[doc = "< Pointer to the allocated memory"]
3125 pub ptr: *mut ::std::os::raw::c_void,
3126 #[doc = "< Pitch in bytes"]
3127 pub pitch: usize,
3128 #[doc = "< Logical size of the first dimension of allocation in elements"]
3129 pub xsize: usize,
3130 #[doc = "< Logical size of the second dimension of allocation in elements"]
3131 pub ysize: usize,
3132}
3133#[doc = " HIP extent"]
3134#[repr(C)]
3135#[derive(Debug, Copy, Clone)]
3136pub struct hipExtent {
3137 pub width: usize,
3138 pub height: usize,
3139 pub depth: usize,
3140}
3141#[doc = " HIP position"]
3142#[repr(C)]
3143#[derive(Debug, Copy, Clone)]
3144pub struct hipPos {
3145 #[doc = "< X coordinate"]
3146 pub x: usize,
3147 #[doc = "< Y coordinate"]
3148 pub y: usize,
3149 #[doc = "< Z coordinate"]
3150 pub z: usize,
3151}
3152#[doc = " HIP 3D memory copy parameters"]
3153#[repr(C)]
3154#[derive(Debug, Copy, Clone)]
3155pub struct hipMemcpy3DParms {
3156 #[doc = "< Source array"]
3157 pub srcArray: hipArray_t,
3158 #[doc = "< Source position"]
3159 pub srcPos: hipPos,
3160 #[doc = "< Source pointer"]
3161 pub srcPtr: hipPitchedPtr,
3162 #[doc = "< Destination array"]
3163 pub dstArray: hipArray_t,
3164 #[doc = "< Destination position"]
3165 pub dstPos: hipPos,
3166 #[doc = "< Destination pointer"]
3167 pub dstPtr: hipPitchedPtr,
3168 #[doc = "< Extent of 3D memory copy"]
3169 pub extent: hipExtent,
3170 #[doc = "< Kind of 3D memory copy"]
3171 pub kind: hipMemcpyKind,
3172}
3173#[doc = " HIP 3D memory copy"]
3174#[repr(C)]
3175#[derive(Debug, Copy, Clone)]
3176pub struct HIP_MEMCPY3D {
3177 #[doc = "< Source X in bytes"]
3178 pub srcXInBytes: usize,
3179 #[doc = "< Source Y"]
3180 pub srcY: usize,
3181 #[doc = "< Source Z"]
3182 pub srcZ: usize,
3183 #[doc = "< Source LOD"]
3184 pub srcLOD: usize,
3185 #[doc = "< Source memory type"]
3186 pub srcMemoryType: hipMemoryType,
3187 #[doc = "< Source host pointer"]
3188 pub srcHost: *const ::std::os::raw::c_void,
3189 #[doc = "< Source device"]
3190 pub srcDevice: hipDeviceptr_t,
3191 #[doc = "< Source array"]
3192 pub srcArray: hipArray_t,
3193 #[doc = "< Source pitch"]
3194 pub srcPitch: usize,
3195 #[doc = "< Source height"]
3196 pub srcHeight: usize,
3197 #[doc = "< Destination X in bytes"]
3198 pub dstXInBytes: usize,
3199 #[doc = "< Destination Y"]
3200 pub dstY: usize,
3201 #[doc = "< Destination Z"]
3202 pub dstZ: usize,
3203 #[doc = "< Destination LOD"]
3204 pub dstLOD: usize,
3205 #[doc = "< Destination memory type"]
3206 pub dstMemoryType: hipMemoryType,
3207 #[doc = "< Destination host pointer"]
3208 pub dstHost: *mut ::std::os::raw::c_void,
3209 #[doc = "< Destination device"]
3210 pub dstDevice: hipDeviceptr_t,
3211 #[doc = "< Destination array"]
3212 pub dstArray: hipArray_t,
3213 #[doc = "< Destination pitch"]
3214 pub dstPitch: usize,
3215 #[doc = "< Destination height"]
3216 pub dstHeight: usize,
3217 #[doc = "< Width in bytes of 3D memory copy"]
3218 pub WidthInBytes: usize,
3219 #[doc = "< Height in bytes of 3D memory copy"]
3220 pub Height: usize,
3221 #[doc = "< Depth in bytes of 3D memory copy"]
3222 pub Depth: usize,
3223}
3224pub const hipMemLocationType_hipMemLocationTypeInvalid: hipMemLocationType = 0;
3225pub const hipMemLocationType_hipMemLocationTypeNone: hipMemLocationType = 0;
3226#[doc = "< Device location, thus it's HIP device ID"]
3227pub const hipMemLocationType_hipMemLocationTypeDevice: hipMemLocationType = 1;
3228#[doc = "< Host location, id is ignored"]
3229pub const hipMemLocationType_hipMemLocationTypeHost: hipMemLocationType = 2;
3230#[doc = "< Host NUMA node location, id is host NUMA node id"]
3231pub const hipMemLocationType_hipMemLocationTypeHostNuma: hipMemLocationType = 3;
3232pub const hipMemLocationType_hipMemLocationTypeHostNumaCurrent: hipMemLocationType = 4;
3233#[doc = " Specifies the type of location"]
3234pub type hipMemLocationType = ::std::os::raw::c_uint;
3235#[doc = " Specifies a memory location.\n\n To specify a gpu, set type = @p hipMemLocationTypeDevice and set id = the gpu's device ID"]
3236#[repr(C)]
3237#[derive(Debug, Copy, Clone)]
3238pub struct hipMemLocation {
3239 #[doc = "< Specifies the location type, which describes the meaning of id"]
3240 pub type_: hipMemLocationType,
3241 #[doc = "< Identifier for the provided location type @p hipMemLocationType"]
3242 pub id: ::std::os::raw::c_int,
3243}
3244#[doc = "< Default flag"]
3245pub const hipMemcpyFlags_hipMemcpyFlagDefault: hipMemcpyFlags = 0;
3246#[doc = "< Tries to overlap copy with compute work."]
3247pub const hipMemcpyFlags_hipMemcpyFlagPreferOverlapWithCompute: hipMemcpyFlags = 1;
3248#[doc = "< Prefer copy engine over compute engine."]
3249pub const hipMemcpyFlags_hipMemcpyFlagExtPreferCE: hipMemcpyFlags = 256;
3250#[doc = "< Swap contents of src and dst."]
3251pub const hipMemcpyFlags_hipMemcpyFlagExtOpSwap: hipMemcpyFlags = 512;
3252#[doc = "< The src pointer holds the address of the real\n< source pointer, read when the copy runs rather\n< than when it is submitted."]
3253pub const hipMemcpyFlags_hipMemcpyFlagExtOpIndirectSrc: hipMemcpyFlags = 1024;
3254#[doc = "< Same as IndirectSrc, but for the dst pointer."]
3255pub const hipMemcpyFlags_hipMemcpyFlagExtOpIndirectDst: hipMemcpyFlags = 2048;
3256#[doc = " Flags to specify for copies within a batch. Used with hipMemcpyBatchAsync"]
3257pub type hipMemcpyFlags = ::std::os::raw::c_uint;
3258#[doc = "< Default Invalid."]
3259pub const hipMemcpySrcAccessOrder_hipMemcpySrcAccessOrderInvalid: hipMemcpySrcAccessOrder = 0;
3260#[doc = "< Access to source pointer must be in stream order."]
3261pub const hipMemcpySrcAccessOrder_hipMemcpySrcAccessOrderStream: hipMemcpySrcAccessOrder = 1;
3262pub const hipMemcpySrcAccessOrder_hipMemcpySrcAccessOrderDuringApiCall: hipMemcpySrcAccessOrder = 2;
3263pub const hipMemcpySrcAccessOrder_hipMemcpySrcAccessOrderAny: hipMemcpySrcAccessOrder = 3;
3264pub const hipMemcpySrcAccessOrder_hipMemcpySrcAccessOrderMax: hipMemcpySrcAccessOrder = 2147483647;
3265#[doc = " Flags to specify order in which source pointer is accessed by Batch memcpy"]
3266pub type hipMemcpySrcAccessOrder = ::std::os::raw::c_uint;
3267#[doc = " Attributes for copies within a batch."]
3268#[repr(C)]
3269#[derive(Debug, Copy, Clone)]
3270pub struct hipMemcpyAttributes {
3271 #[doc = "< Source access ordering to be observed for copies with this attribute."]
3272 pub srcAccessOrder: hipMemcpySrcAccessOrder,
3273 #[doc = "< Location hint for src operand."]
3274 pub srcLocHint: hipMemLocation,
3275 #[doc = "< Location hint for destination operand."]
3276 pub dstLocHint: hipMemLocation,
3277 #[doc = "< Additional Flags for copies. See hipMemcpyFlags."]
3278 pub flags: ::std::os::raw::c_uint,
3279}
3280#[doc = "< Mempcy operand is a valid pointer."]
3281pub const hipMemcpy3DOperandType_hipMemcpyOperandTypePointer: hipMemcpy3DOperandType = 1;
3282#[doc = "< Memcpy operand is a valid hipArray."]
3283pub const hipMemcpy3DOperandType_hipMemcpyOperandTypeArray: hipMemcpy3DOperandType = 2;
3284pub const hipMemcpy3DOperandType_hipMemcpyOperandTypeMax: hipMemcpy3DOperandType = 2147483647;
3285#[doc = " Operand types for individual copies within a batch"]
3286pub type hipMemcpy3DOperandType = ::std::os::raw::c_uint;
3287#[doc = " Struct representing offset into a hipArray_t in elements."]
3288#[repr(C)]
3289#[derive(Debug, Copy, Clone)]
3290pub struct hipOffset3D {
3291 pub x: usize,
3292 pub y: usize,
3293 pub z: usize,
3294}
3295#[doc = " Struct representing an operand for copy with hipMemcpy3DBatchAsync."]
3296#[repr(C)]
3297#[derive(Copy, Clone)]
3298pub struct hipMemcpy3DOperand {
3299 pub type_: hipMemcpy3DOperandType,
3300 pub op: hipMemcpy3DOperand__bindgen_ty_1,
3301}
3302#[repr(C)]
3303#[derive(Copy, Clone)]
3304pub union hipMemcpy3DOperand__bindgen_ty_1 {
3305 pub ptr: hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1,
3306 pub array: hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2,
3307}
3308#[repr(C)]
3309#[derive(Debug, Copy, Clone)]
3310pub struct hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_1 {
3311 pub ptr: *mut ::std::os::raw::c_void,
3312 #[doc = "< Length of each row in elements."]
3313 pub rowLength: usize,
3314 #[doc = "< Height of each layer in elements."]
3315 pub layerHeight: usize,
3316 #[doc = "< Location Hint for the operand."]
3317 pub locHint: hipMemLocation,
3318}
3319#[repr(C)]
3320#[derive(Debug, Copy, Clone)]
3321pub struct hipMemcpy3DOperand__bindgen_ty_1__bindgen_ty_2 {
3322 #[doc = "< Array struct for hipMemcpyOperandTypeArray."]
3323 pub array: hipArray_t,
3324 #[doc = "< Offset into array in elements."]
3325 pub offset: hipOffset3D,
3326}
3327#[doc = " HIP 3D Batch Op"]
3328#[repr(C)]
3329#[derive(Copy, Clone)]
3330pub struct hipMemcpy3DBatchOp {
3331 pub src: hipMemcpy3DOperand,
3332 pub dst: hipMemcpy3DOperand,
3333 pub extent: hipExtent,
3334 pub srcAccessOrder: hipMemcpySrcAccessOrder,
3335 pub flags: ::std::os::raw::c_uint,
3336}
3337#[repr(C)]
3338#[derive(Debug, Copy, Clone)]
3339pub struct hipMemcpy3DPeerParms {
3340 #[doc = "< Source memory address"]
3341 pub srcArray: hipArray_t,
3342 #[doc = "< Source position offset"]
3343 pub srcPos: hipPos,
3344 #[doc = "< Pitched source memory address"]
3345 pub srcPtr: hipPitchedPtr,
3346 #[doc = "< Source device"]
3347 pub srcDevice: ::std::os::raw::c_int,
3348 #[doc = "< Destination memory address"]
3349 pub dstArray: hipArray_t,
3350 #[doc = "< Destination position offset"]
3351 pub dstPos: hipPos,
3352 #[doc = "< Pitched destination memory address"]
3353 pub dstPtr: hipPitchedPtr,
3354 #[doc = "< Destination device"]
3355 pub dstDevice: ::std::os::raw::c_int,
3356 #[doc = "< Requested memory copy size"]
3357 pub extent: hipExtent,
3358}
3359#[doc = "< The maximum number of threads per block. Depends\n< on function and device."]
3360pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: hipFunction_attribute = 0;
3361#[doc = "< The statically allocated shared memory size in bytes\n< per block required by the function."]
3362pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: hipFunction_attribute = 1;
3363#[doc = "< The user-allocated constant memory by the function in\n< bytes."]
3364pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: hipFunction_attribute = 2;
3365#[doc = "< The local memory usage of each thread by this function\n< in bytes."]
3366pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: hipFunction_attribute = 3;
3367#[doc = "< The number of registers used by each thread of this function."]
3368pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_NUM_REGS: hipFunction_attribute = 4;
3369#[doc = "< PTX version"]
3370pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_PTX_VERSION: hipFunction_attribute = 5;
3371#[doc = "< Binary version"]
3372pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_BINARY_VERSION: hipFunction_attribute = 6;
3373#[doc = "< Cache mode"]
3374pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA: hipFunction_attribute = 7;
3375#[doc = "< The maximum dynamic shared memory per\n< block for this function in bytes."]
3376pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES:
3377 hipFunction_attribute = 8;
3378#[doc = "< The shared memory carveout preference\n< in percent of the maximum shared\n< memory."]
3379pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT:
3380 hipFunction_attribute = 9;
3381#[doc = "< the kernel must launch with a valid cluster size specified."]
3382pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_CLUSTER_DIM_MUST_BE_SET: hipFunction_attribute =
3383 10;
3384#[doc = "< The required cluster width in blocks"]
3385pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH: hipFunction_attribute =
3386 11;
3387#[doc = "< The required cluster height in blocks"]
3388pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT: hipFunction_attribute =
3389 12;
3390#[doc = "< The required cluster depth in blocks"]
3391pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH: hipFunction_attribute =
3392 13;
3393#[doc = "< Is the function allowed to launch with non-portable cluster size."]
3394pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED:
3395 hipFunction_attribute = 14;
3396#[doc = "< The block scheduling policy of a function."]
3397pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE:
3398 hipFunction_attribute = 15;
3399pub const hipFunction_attribute_HIP_FUNC_ATTRIBUTE_MAX: hipFunction_attribute = 16;
3400pub type hipFunction_attribute = ::std::os::raw::c_uint;
3401#[doc = "< The context on which a pointer was allocated\n< @warning This attribute is not supported in HIP"]
3402pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_CONTEXT: hipPointer_attribute = 1;
3403#[doc = "< memory type describing the location of a pointer"]
3404pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_MEMORY_TYPE: hipPointer_attribute = 2;
3405#[doc = "< address at which the pointer is allocated on the\n< device"]
3406pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_DEVICE_POINTER: hipPointer_attribute = 3;
3407#[doc = "< address at which the pointer is allocated on the host"]
3408pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_HOST_POINTER: hipPointer_attribute = 4;
3409#[doc = "< A pair of tokens for use with Linux kernel interface\n< @warning This attribute is not supported in HIP"]
3410pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_P2P_TOKENS: hipPointer_attribute = 5;
3411#[doc = "< Synchronize every synchronous memory operation\n< initiated on this region"]
3412pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS: hipPointer_attribute = 6;
3413#[doc = "< Unique ID for an allocated memory region"]
3414pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_BUFFER_ID: hipPointer_attribute = 7;
3415#[doc = "< Indicates if the pointer points to managed memory"]
3416pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_IS_MANAGED: hipPointer_attribute = 8;
3417#[doc = "< device ordinal of a device on which a pointer\n< was allocated or registered"]
3418pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL: hipPointer_attribute = 9;
3419#[doc = "< if this pointer maps to an allocation\n< that is suitable for hipIpcGetMemHandle\n< @warning This attribute is not supported in\n< HIP"]
3420pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE:
3421 hipPointer_attribute = 10;
3422#[doc = "< Starting address for this requested pointer"]
3423pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR: hipPointer_attribute = 11;
3424#[doc = "< Size of the address range for this requested pointer"]
3425pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_RANGE_SIZE: hipPointer_attribute = 12;
3426#[doc = "< tells if this pointer is in a valid address range\n< that is mapped to a backing allocation"]
3427pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_MAPPED: hipPointer_attribute = 13;
3428#[doc = "< Bitmask of allowed hipmemAllocationHandleType\n< for this allocation @warning This attribute is\n< not supported in HIP"]
3429pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES: hipPointer_attribute =
3430 14;
3431#[doc = "< returns if the memory referenced by\n< this pointer can be used with the\n< GPUDirect RDMA API\n< @warning This attribute is not supported\n< in HIP"]
3432pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE:
3433 hipPointer_attribute = 15;
3434#[doc = "< Returns the access flags the device associated with\n< for the corresponding memory referenced by the ptr"]
3435pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS: hipPointer_attribute = 16;
3436#[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"]
3437pub const hipPointer_attribute_HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE: hipPointer_attribute = 17;
3438pub type hipPointer_attribute = ::std::os::raw::c_uint;
3439#[repr(C)]
3440#[derive(Debug, Copy, Clone)]
3441pub struct uchar1 {
3442 pub x: ::std::os::raw::c_uchar,
3443}
3444#[repr(C)]
3445#[derive(Debug, Copy, Clone)]
3446pub struct uchar2 {
3447 pub x: ::std::os::raw::c_uchar,
3448 pub y: ::std::os::raw::c_uchar,
3449}
3450#[repr(C)]
3451#[derive(Debug, Copy, Clone)]
3452pub struct uchar3 {
3453 pub x: ::std::os::raw::c_uchar,
3454 pub y: ::std::os::raw::c_uchar,
3455 pub z: ::std::os::raw::c_uchar,
3456}
3457#[repr(C)]
3458#[derive(Debug, Copy, Clone)]
3459pub struct uchar4 {
3460 pub x: ::std::os::raw::c_uchar,
3461 pub y: ::std::os::raw::c_uchar,
3462 pub z: ::std::os::raw::c_uchar,
3463 pub w: ::std::os::raw::c_uchar,
3464}
3465#[repr(C)]
3466#[derive(Debug, Copy, Clone)]
3467pub struct char1 {
3468 pub x: ::std::os::raw::c_char,
3469}
3470#[repr(C)]
3471#[derive(Debug, Copy, Clone)]
3472pub struct char2 {
3473 pub x: ::std::os::raw::c_char,
3474 pub y: ::std::os::raw::c_char,
3475}
3476#[repr(C)]
3477#[derive(Debug, Copy, Clone)]
3478pub struct char3 {
3479 pub x: ::std::os::raw::c_char,
3480 pub y: ::std::os::raw::c_char,
3481 pub z: ::std::os::raw::c_char,
3482}
3483#[repr(C)]
3484#[derive(Debug, Copy, Clone)]
3485pub struct char4 {
3486 pub x: ::std::os::raw::c_char,
3487 pub y: ::std::os::raw::c_char,
3488 pub z: ::std::os::raw::c_char,
3489 pub w: ::std::os::raw::c_char,
3490}
3491#[repr(C)]
3492#[derive(Debug, Copy, Clone)]
3493pub struct ushort1 {
3494 pub x: ::std::os::raw::c_ushort,
3495}
3496#[repr(C)]
3497#[derive(Debug, Copy, Clone)]
3498pub struct ushort2 {
3499 pub x: ::std::os::raw::c_ushort,
3500 pub y: ::std::os::raw::c_ushort,
3501}
3502#[repr(C)]
3503#[derive(Debug, Copy, Clone)]
3504pub struct ushort3 {
3505 pub x: ::std::os::raw::c_ushort,
3506 pub y: ::std::os::raw::c_ushort,
3507 pub z: ::std::os::raw::c_ushort,
3508}
3509#[repr(C)]
3510#[derive(Debug, Copy, Clone)]
3511pub struct ushort4 {
3512 pub x: ::std::os::raw::c_ushort,
3513 pub y: ::std::os::raw::c_ushort,
3514 pub z: ::std::os::raw::c_ushort,
3515 pub w: ::std::os::raw::c_ushort,
3516}
3517#[repr(C)]
3518#[derive(Debug, Copy, Clone)]
3519pub struct short1 {
3520 pub x: ::std::os::raw::c_short,
3521}
3522#[repr(C)]
3523#[derive(Debug, Copy, Clone)]
3524pub struct short2 {
3525 pub x: ::std::os::raw::c_short,
3526 pub y: ::std::os::raw::c_short,
3527}
3528#[repr(C)]
3529#[derive(Debug, Copy, Clone)]
3530pub struct short3 {
3531 pub x: ::std::os::raw::c_short,
3532 pub y: ::std::os::raw::c_short,
3533 pub z: ::std::os::raw::c_short,
3534}
3535#[repr(C)]
3536#[derive(Debug, Copy, Clone)]
3537pub struct short4 {
3538 pub x: ::std::os::raw::c_short,
3539 pub y: ::std::os::raw::c_short,
3540 pub z: ::std::os::raw::c_short,
3541 pub w: ::std::os::raw::c_short,
3542}
3543#[repr(C)]
3544#[derive(Debug, Copy, Clone)]
3545pub struct uint1 {
3546 pub x: ::std::os::raw::c_uint,
3547}
3548#[repr(C)]
3549#[derive(Debug, Copy, Clone)]
3550pub struct uint2 {
3551 pub x: ::std::os::raw::c_uint,
3552 pub y: ::std::os::raw::c_uint,
3553}
3554#[repr(C)]
3555#[derive(Debug, Copy, Clone)]
3556pub struct uint3 {
3557 pub x: ::std::os::raw::c_uint,
3558 pub y: ::std::os::raw::c_uint,
3559 pub z: ::std::os::raw::c_uint,
3560}
3561#[repr(C)]
3562#[derive(Debug, Copy, Clone)]
3563pub struct uint4 {
3564 pub x: ::std::os::raw::c_uint,
3565 pub y: ::std::os::raw::c_uint,
3566 pub z: ::std::os::raw::c_uint,
3567 pub w: ::std::os::raw::c_uint,
3568}
3569#[repr(C)]
3570#[derive(Debug, Copy, Clone)]
3571pub struct int1 {
3572 pub x: ::std::os::raw::c_int,
3573}
3574#[repr(C)]
3575#[derive(Debug, Copy, Clone)]
3576pub struct int2 {
3577 pub x: ::std::os::raw::c_int,
3578 pub y: ::std::os::raw::c_int,
3579}
3580#[repr(C)]
3581#[derive(Debug, Copy, Clone)]
3582pub struct int3 {
3583 pub x: ::std::os::raw::c_int,
3584 pub y: ::std::os::raw::c_int,
3585 pub z: ::std::os::raw::c_int,
3586}
3587#[repr(C)]
3588#[derive(Debug, Copy, Clone)]
3589pub struct int4 {
3590 pub x: ::std::os::raw::c_int,
3591 pub y: ::std::os::raw::c_int,
3592 pub z: ::std::os::raw::c_int,
3593 pub w: ::std::os::raw::c_int,
3594}
3595#[repr(C)]
3596#[derive(Debug, Copy, Clone)]
3597pub struct ulong1 {
3598 pub x: ::std::os::raw::c_ulong,
3599}
3600#[repr(C)]
3601#[derive(Debug, Copy, Clone)]
3602pub struct ulong2 {
3603 pub x: ::std::os::raw::c_ulong,
3604 pub y: ::std::os::raw::c_ulong,
3605}
3606#[repr(C)]
3607#[derive(Debug, Copy, Clone)]
3608pub struct ulong3 {
3609 pub x: ::std::os::raw::c_ulong,
3610 pub y: ::std::os::raw::c_ulong,
3611 pub z: ::std::os::raw::c_ulong,
3612}
3613#[repr(C)]
3614#[derive(Debug, Copy, Clone)]
3615pub struct ulong4 {
3616 pub x: ::std::os::raw::c_ulong,
3617 pub y: ::std::os::raw::c_ulong,
3618 pub z: ::std::os::raw::c_ulong,
3619 pub w: ::std::os::raw::c_ulong,
3620}
3621#[repr(C)]
3622#[derive(Debug, Copy, Clone)]
3623pub struct long1 {
3624 pub x: ::std::os::raw::c_long,
3625}
3626#[repr(C)]
3627#[derive(Debug, Copy, Clone)]
3628pub struct long2 {
3629 pub x: ::std::os::raw::c_long,
3630 pub y: ::std::os::raw::c_long,
3631}
3632#[repr(C)]
3633#[derive(Debug, Copy, Clone)]
3634pub struct long3 {
3635 pub x: ::std::os::raw::c_long,
3636 pub y: ::std::os::raw::c_long,
3637 pub z: ::std::os::raw::c_long,
3638}
3639#[repr(C)]
3640#[derive(Debug, Copy, Clone)]
3641pub struct long4 {
3642 pub x: ::std::os::raw::c_long,
3643 pub y: ::std::os::raw::c_long,
3644 pub z: ::std::os::raw::c_long,
3645 pub w: ::std::os::raw::c_long,
3646}
3647#[repr(C)]
3648#[derive(Debug, Copy, Clone)]
3649pub struct ulonglong1 {
3650 pub x: ::std::os::raw::c_ulonglong,
3651}
3652#[repr(C)]
3653#[derive(Debug, Copy, Clone)]
3654pub struct ulonglong2 {
3655 pub x: ::std::os::raw::c_ulonglong,
3656 pub y: ::std::os::raw::c_ulonglong,
3657}
3658#[repr(C)]
3659#[derive(Debug, Copy, Clone)]
3660pub struct ulonglong3 {
3661 pub x: ::std::os::raw::c_ulonglong,
3662 pub y: ::std::os::raw::c_ulonglong,
3663 pub z: ::std::os::raw::c_ulonglong,
3664}
3665#[repr(C)]
3666#[derive(Debug, Copy, Clone)]
3667pub struct ulonglong4 {
3668 pub x: ::std::os::raw::c_ulonglong,
3669 pub y: ::std::os::raw::c_ulonglong,
3670 pub z: ::std::os::raw::c_ulonglong,
3671 pub w: ::std::os::raw::c_ulonglong,
3672}
3673#[repr(C)]
3674#[derive(Debug, Copy, Clone)]
3675pub struct longlong1 {
3676 pub x: ::std::os::raw::c_longlong,
3677}
3678#[repr(C)]
3679#[derive(Debug, Copy, Clone)]
3680pub struct longlong2 {
3681 pub x: ::std::os::raw::c_longlong,
3682 pub y: ::std::os::raw::c_longlong,
3683}
3684#[repr(C)]
3685#[derive(Debug, Copy, Clone)]
3686pub struct longlong3 {
3687 pub x: ::std::os::raw::c_longlong,
3688 pub y: ::std::os::raw::c_longlong,
3689 pub z: ::std::os::raw::c_longlong,
3690}
3691#[repr(C)]
3692#[derive(Debug, Copy, Clone)]
3693pub struct longlong4 {
3694 pub x: ::std::os::raw::c_longlong,
3695 pub y: ::std::os::raw::c_longlong,
3696 pub z: ::std::os::raw::c_longlong,
3697 pub w: ::std::os::raw::c_longlong,
3698}
3699#[repr(C)]
3700#[derive(Debug, Copy, Clone)]
3701pub struct float1 {
3702 pub x: f32,
3703}
3704#[repr(C)]
3705#[derive(Debug, Copy, Clone)]
3706pub struct float2 {
3707 pub x: f32,
3708 pub y: f32,
3709}
3710#[repr(C)]
3711#[derive(Debug, Copy, Clone)]
3712pub struct float3 {
3713 pub x: f32,
3714 pub y: f32,
3715 pub z: f32,
3716}
3717#[repr(C)]
3718#[derive(Debug, Copy, Clone)]
3719pub struct float4 {
3720 pub x: f32,
3721 pub y: f32,
3722 pub z: f32,
3723 pub w: f32,
3724}
3725#[repr(C)]
3726#[derive(Debug, Copy, Clone)]
3727pub struct double1 {
3728 pub x: f64,
3729}
3730#[repr(C)]
3731#[derive(Debug, Copy, Clone)]
3732pub struct double2 {
3733 pub x: f64,
3734 pub y: f64,
3735}
3736#[repr(C)]
3737#[derive(Debug, Copy, Clone)]
3738pub struct double3 {
3739 pub x: f64,
3740 pub y: f64,
3741 pub z: f64,
3742}
3743#[repr(C)]
3744#[derive(Debug, Copy, Clone)]
3745pub struct double4 {
3746 pub x: f64,
3747 pub y: f64,
3748 pub z: f64,
3749 pub w: f64,
3750}
3751extern "C" {
3752 pub fn hipCreateChannelDesc(
3753 x: ::std::os::raw::c_int,
3754 y: ::std::os::raw::c_int,
3755 z: ::std::os::raw::c_int,
3756 w: ::std::os::raw::c_int,
3757 f: hipChannelFormatKind,
3758 ) -> hipChannelFormatDesc;
3759}
3760#[doc = " An opaque value that represents a hip texture object"]
3761#[repr(C)]
3762#[derive(Debug, Copy, Clone)]
3763pub struct __hip_texture {
3764 _unused: [u8; 0],
3765}
3766pub type hipTextureObject_t = *mut __hip_texture;
3767pub const hipTextureAddressMode_hipAddressModeWrap: hipTextureAddressMode = 0;
3768pub const hipTextureAddressMode_hipAddressModeClamp: hipTextureAddressMode = 1;
3769pub const hipTextureAddressMode_hipAddressModeMirror: hipTextureAddressMode = 2;
3770pub const hipTextureAddressMode_hipAddressModeBorder: hipTextureAddressMode = 3;
3771#[doc = " hip texture address modes"]
3772pub type hipTextureAddressMode = ::std::os::raw::c_uint;
3773pub const hipTextureFilterMode_hipFilterModePoint: hipTextureFilterMode = 0;
3774pub const hipTextureFilterMode_hipFilterModeLinear: hipTextureFilterMode = 1;
3775#[doc = " hip texture filter modes"]
3776pub type hipTextureFilterMode = ::std::os::raw::c_uint;
3777pub const hipTextureReadMode_hipReadModeElementType: hipTextureReadMode = 0;
3778pub const hipTextureReadMode_hipReadModeNormalizedFloat: hipTextureReadMode = 1;
3779#[doc = " hip texture read modes"]
3780pub type hipTextureReadMode = ::std::os::raw::c_uint;
3781#[doc = " hip texture reference"]
3782#[repr(C)]
3783#[derive(Debug, Copy, Clone)]
3784pub struct textureReference {
3785 pub normalized: ::std::os::raw::c_int,
3786 pub readMode: hipTextureReadMode,
3787 pub filterMode: hipTextureFilterMode,
3788 pub addressMode: [hipTextureAddressMode; 3usize],
3789 pub channelDesc: hipChannelFormatDesc,
3790 pub sRGB: ::std::os::raw::c_int,
3791 pub maxAnisotropy: ::std::os::raw::c_uint,
3792 pub mipmapFilterMode: hipTextureFilterMode,
3793 pub mipmapLevelBias: f32,
3794 pub minMipmapLevelClamp: f32,
3795 pub maxMipmapLevelClamp: f32,
3796 pub textureObject: hipTextureObject_t,
3797 pub numChannels: ::std::os::raw::c_int,
3798 pub format: hipArray_Format,
3799}
3800#[doc = " hip texture descriptor"]
3801#[repr(C)]
3802#[derive(Debug, Copy, Clone)]
3803pub struct hipTextureDesc {
3804 pub addressMode: [hipTextureAddressMode; 3usize],
3805 pub filterMode: hipTextureFilterMode,
3806 pub readMode: hipTextureReadMode,
3807 pub sRGB: ::std::os::raw::c_int,
3808 pub borderColor: [f32; 4usize],
3809 pub normalizedCoords: ::std::os::raw::c_int,
3810 pub maxAnisotropy: ::std::os::raw::c_uint,
3811 pub mipmapFilterMode: hipTextureFilterMode,
3812 pub mipmapLevelBias: f32,
3813 pub minMipmapLevelClamp: f32,
3814 pub maxMipmapLevelClamp: f32,
3815}
3816#[doc = " An opaque value that represents a hip surface object"]
3817#[repr(C)]
3818#[derive(Debug, Copy, Clone)]
3819pub struct __hip_surface {
3820 _unused: [u8; 0],
3821}
3822pub type hipSurfaceObject_t = *mut __hip_surface;
3823#[doc = " hip surface reference"]
3824#[repr(C)]
3825#[derive(Debug, Copy, Clone)]
3826pub struct surfaceReference {
3827 pub surfaceObject: hipSurfaceObject_t,
3828}
3829pub const hipSurfaceBoundaryMode_hipBoundaryModeZero: hipSurfaceBoundaryMode = 0;
3830pub const hipSurfaceBoundaryMode_hipBoundaryModeTrap: hipSurfaceBoundaryMode = 1;
3831pub const hipSurfaceBoundaryMode_hipBoundaryModeClamp: hipSurfaceBoundaryMode = 2;
3832#[doc = " hip surface boundary modes"]
3833pub type hipSurfaceBoundaryMode = ::std::os::raw::c_uint;
3834#[repr(C)]
3835#[derive(Debug, Copy, Clone)]
3836pub struct ihipCtx_t {
3837 _unused: [u8; 0],
3838}
3839pub type hipCtx_t = *mut ihipCtx_t;
3840#[repr(C)]
3841#[derive(Debug, Copy, Clone)]
3842pub struct ihipExecutionCtx_t {
3843 _unused: [u8; 0],
3844}
3845pub type hipExecutionCtx_t = *mut ihipExecutionCtx_t;
3846#[repr(C)]
3847#[derive(Debug, Copy, Clone)]
3848pub struct ihipDevResourceDesc_t {
3849 _unused: [u8; 0],
3850}
3851pub type hipDevResourceDesc_t = *mut ihipDevResourceDesc_t;
3852pub const hipDevResourceType_hipDevResourceTypeInvalid: hipDevResourceType = 0;
3853pub const hipDevResourceType_hipDevResourceTypeSm: hipDevResourceType = 1;
3854pub const hipDevResourceType_hipDevResourceTypeWorkqueueConfig: hipDevResourceType = 1000;
3855pub const hipDevResourceType_hipDevResourceTypeWorkqueue: hipDevResourceType = 10000;
3856pub type hipDevResourceType = ::std::os::raw::c_uint;
3857pub const hipDevSmResourceGroup_flags_hipDevSmResourceGroupDefault: hipDevSmResourceGroup_flags = 0;
3858pub const hipDevSmResourceGroup_flags_hipDevSmResourceGroupBackfill: hipDevSmResourceGroup_flags =
3859 1;
3860pub type hipDevSmResourceGroup_flags = ::std::os::raw::c_uint;
3861pub const hipDevSmResourceSplitByCount_flags_hipDevSmResourceSplitIgnoreSmCoscheduling:
3862 hipDevSmResourceSplitByCount_flags = 1;
3863pub const hipDevSmResourceSplitByCount_flags_hipDevSmResourceSplitMaxPotentialClusterSize:
3864 hipDevSmResourceSplitByCount_flags = 2;
3865pub type hipDevSmResourceSplitByCount_flags = ::std::os::raw::c_uint;
3866pub const hipDevWorkqueueConfigScope_hipDevWorkqueueConfigScopeDeviceCtx:
3867 hipDevWorkqueueConfigScope = 0;
3868pub const hipDevWorkqueueConfigScope_hipDevWorkqueueConfigScopeGreenCtxBalanced:
3869 hipDevWorkqueueConfigScope = 1;
3870pub type hipDevWorkqueueConfigScope = ::std::os::raw::c_uint;
3871#[repr(C)]
3872#[derive(Debug, Copy, Clone)]
3873pub struct hipDevSmResource {
3874 pub smCount: ::std::os::raw::c_uint,
3875 pub minSmPartitionSize: ::std::os::raw::c_uint,
3876 pub smCoscheduledAlignment: ::std::os::raw::c_uint,
3877 pub flags: ::std::os::raw::c_uint,
3878}
3879#[repr(C)]
3880#[derive(Debug, Copy, Clone)]
3881pub struct hipDevWorkqueueConfigResource {
3882 pub device: ::std::os::raw::c_int,
3883 pub wqConcurrencyLimit: ::std::os::raw::c_uint,
3884 pub sharingScope: hipDevWorkqueueConfigScope,
3885}
3886#[repr(C)]
3887#[derive(Debug, Copy, Clone)]
3888pub struct hipDevWorkqueueResource {
3889 pub reserved: [::std::os::raw::c_uchar; 40usize],
3890}
3891#[repr(C)]
3892#[derive(Copy, Clone)]
3893pub struct hipDevResource_st {
3894 pub type_: hipDevResourceType,
3895 pub _internal_padding: [::std::os::raw::c_uchar; 92usize],
3896 pub __bindgen_anon_1: hipDevResource_st__bindgen_ty_1,
3897 pub nextResource: *mut hipDevResource_st,
3898}
3899#[repr(C)]
3900#[derive(Copy, Clone)]
3901pub union hipDevResource_st__bindgen_ty_1 {
3902 pub sm: hipDevSmResource,
3903 pub wqConfig: hipDevWorkqueueConfigResource,
3904 pub wq: hipDevWorkqueueResource,
3905 pub _oversize: [::std::os::raw::c_uchar; 40usize],
3906}
3907pub type hipDevResource = hipDevResource_st;
3908#[repr(C)]
3909#[derive(Debug, Copy, Clone)]
3910pub struct hipDevSmResourceGroupParams_st {
3911 pub smCount: ::std::os::raw::c_uint,
3912 pub coscheduledSmCount: ::std::os::raw::c_uint,
3913 pub preferredCoscheduledSmCount: ::std::os::raw::c_uint,
3914 pub flags: ::std::os::raw::c_uint,
3915 pub reserved: [::std::os::raw::c_uint; 12usize],
3916}
3917pub type hipDevSmResourceGroupParams = hipDevSmResourceGroupParams_st;
3918pub type hipDevice_t = ::std::os::raw::c_int;
3919pub const hipDeviceP2PAttr_hipDevP2PAttrPerformanceRank: hipDeviceP2PAttr = 0;
3920pub const hipDeviceP2PAttr_hipDevP2PAttrAccessSupported: hipDeviceP2PAttr = 1;
3921pub const hipDeviceP2PAttr_hipDevP2PAttrNativeAtomicSupported: hipDeviceP2PAttr = 2;
3922pub const hipDeviceP2PAttr_hipDevP2PAttrHipArrayAccessSupported: hipDeviceP2PAttr = 3;
3923pub type hipDeviceP2PAttr = ::std::os::raw::c_uint;
3924pub const hipDriverEntryPointQueryResult_hipDriverEntryPointSuccess:
3925 hipDriverEntryPointQueryResult = 0;
3926pub const hipDriverEntryPointQueryResult_hipDriverEntryPointSymbolNotFound:
3927 hipDriverEntryPointQueryResult = 1;
3928pub const hipDriverEntryPointQueryResult_hipDriverEntryPointVersionNotSufficent:
3929 hipDriverEntryPointQueryResult = 2;
3930pub type hipDriverEntryPointQueryResult = ::std::os::raw::c_uint;
3931#[repr(C)]
3932#[derive(Debug, Copy, Clone)]
3933pub struct ihipStream_t {
3934 _unused: [u8; 0],
3935}
3936pub type hipStream_t = *mut ihipStream_t;
3937#[repr(C)]
3938#[derive(Debug, Copy, Clone)]
3939pub struct hipIpcMemHandle_st {
3940 pub reserved: [::std::os::raw::c_char; 64usize],
3941}
3942pub type hipIpcMemHandle_t = hipIpcMemHandle_st;
3943#[repr(C)]
3944#[derive(Debug, Copy, Clone)]
3945pub struct hipIpcEventHandle_st {
3946 pub reserved: [::std::os::raw::c_char; 64usize],
3947}
3948pub type hipIpcEventHandle_t = hipIpcEventHandle_st;
3949#[repr(C)]
3950#[derive(Debug, Copy, Clone)]
3951pub struct hipMemFabricHandle_st {
3952 pub data: [::std::os::raw::c_uchar; 64usize],
3953}
3954pub type hipMemFabricHandle_t = hipMemFabricHandle_st;
3955#[repr(C)]
3956#[derive(Debug, Copy, Clone)]
3957pub struct ihipModule_t {
3958 _unused: [u8; 0],
3959}
3960pub type hipModule_t = *mut ihipModule_t;
3961#[repr(C)]
3962#[derive(Debug, Copy, Clone)]
3963pub struct ihipModuleSymbol_t {
3964 _unused: [u8; 0],
3965}
3966pub type hipFunction_t = *mut ihipModuleSymbol_t;
3967#[repr(C)]
3968#[derive(Debug, Copy, Clone)]
3969pub struct ihipLinkState_t {
3970 _unused: [u8; 0],
3971}
3972pub type hipLinkState_t = *mut ihipLinkState_t;
3973#[repr(C)]
3974#[derive(Debug, Copy, Clone)]
3975pub struct ihipLibrary_t {
3976 _unused: [u8; 0],
3977}
3978pub type hipLibrary_t = *mut ihipLibrary_t;
3979#[repr(C)]
3980#[derive(Debug, Copy, Clone)]
3981pub struct ihipKernel_t {
3982 _unused: [u8; 0],
3983}
3984pub type hipKernel_t = *mut ihipKernel_t;
3985#[repr(C)]
3986#[derive(Debug, Copy, Clone)]
3987pub struct ihipMemPoolHandle_t {
3988 _unused: [u8; 0],
3989}
3990#[doc = " HIP memory pool"]
3991pub type hipMemPool_t = *mut ihipMemPoolHandle_t;
3992#[repr(C)]
3993#[derive(Debug, Copy, Clone)]
3994pub struct hipFuncAttributes {
3995 pub binaryVersion: ::std::os::raw::c_int,
3996 pub cacheModeCA: ::std::os::raw::c_int,
3997 pub constSizeBytes: usize,
3998 pub localSizeBytes: usize,
3999 pub maxDynamicSharedSizeBytes: ::std::os::raw::c_int,
4000 pub maxThreadsPerBlock: ::std::os::raw::c_int,
4001 pub numRegs: ::std::os::raw::c_int,
4002 pub preferredShmemCarveout: ::std::os::raw::c_int,
4003 pub ptxVersion: ::std::os::raw::c_int,
4004 pub sharedSizeBytes: usize,
4005}
4006#[repr(C)]
4007#[derive(Debug, Copy, Clone)]
4008pub struct ihipEvent_t {
4009 _unused: [u8; 0],
4010}
4011pub type hipEvent_t = *mut ihipEvent_t;
4012#[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)"]
4013pub const hipLimit_t_hipLimitStackSize: hipLimit_t = 0;
4014#[doc = "< Size limit in bytes of fifo used by printf call on the\n< device. Currently not supported"]
4015pub const hipLimit_t_hipLimitPrintfFifoSize: hipLimit_t = 1;
4016#[doc = "< Limit of heap size in bytes on the current device, should\n< be less than the global memory size on the device"]
4017pub const hipLimit_t_hipLimitMallocHeapSize: hipLimit_t = 2;
4018#[doc = "< Minimum allowed value in bytes for scratch limit on this\n< device. Valid only on Rocm device. This is read only."]
4019pub const hipLimit_t_hipExtLimitScratchMin: hipLimit_t = 4096;
4020#[doc = "< Maximum allowed value in bytes for scratch limit on this\n< device. Valid only on Rocm device. This is read only."]
4021pub const hipLimit_t_hipExtLimitScratchMax: hipLimit_t = 4097;
4022#[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."]
4023pub const hipLimit_t_hipExtLimitScratchCurrent: hipLimit_t = 4098;
4024#[doc = "< Supported limit range"]
4025pub const hipLimit_t_hipLimitRange: hipLimit_t = 4099;
4026#[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."]
4027pub type hipLimit_t = ::std::os::raw::c_uint;
4028pub const hipStreamBatchMemOpType_hipStreamMemOpWaitValue32: hipStreamBatchMemOpType = 1;
4029pub const hipStreamBatchMemOpType_hipStreamMemOpWriteValue32: hipStreamBatchMemOpType = 2;
4030pub const hipStreamBatchMemOpType_hipStreamMemOpWaitValue64: hipStreamBatchMemOpType = 4;
4031pub const hipStreamBatchMemOpType_hipStreamMemOpWriteValue64: hipStreamBatchMemOpType = 5;
4032#[doc = "< Currently not supported"]
4033pub const hipStreamBatchMemOpType_hipStreamMemOpBarrier: hipStreamBatchMemOpType = 6;
4034#[doc = "< Currently not supported"]
4035pub const hipStreamBatchMemOpType_hipStreamMemOpFlushRemoteWrites: hipStreamBatchMemOpType = 3;
4036#[doc = " Operations for hipStreamBatchMemOp"]
4037pub type hipStreamBatchMemOpType = ::std::os::raw::c_uint;
4038#[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"]
4039#[repr(C)]
4040#[derive(Copy, Clone)]
4041pub union hipStreamBatchMemOpParams_union {
4042 pub operation: hipStreamBatchMemOpType,
4043 pub waitValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t,
4044 pub writeValue: hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t,
4045 #[doc = "< Currently not supported on AMD"]
4046 pub flushRemoteWrites: hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t,
4047 #[doc = "< Currently not supported on AMD"]
4048 pub memoryBarrier: hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t,
4049 pub pad: [u64; 6usize],
4050}
4051#[repr(C)]
4052#[derive(Copy, Clone)]
4053pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t {
4054 pub operation: hipStreamBatchMemOpType,
4055 pub address: hipDeviceptr_t,
4056 pub __bindgen_anon_1:
4057 hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t__bindgen_ty_1,
4058 pub flags: ::std::os::raw::c_uint,
4059 #[doc = "< Not valid for AMD backend. Initial value is unimportant"]
4060 pub alias: hipDeviceptr_t,
4061}
4062#[repr(C)]
4063#[derive(Copy, Clone)]
4064pub union hipStreamBatchMemOpParams_union_hipStreamMemOpWaitValueParams_t__bindgen_ty_1 {
4065 pub value: u32,
4066 pub value64: u64,
4067}
4068#[repr(C)]
4069#[derive(Copy, Clone)]
4070pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t {
4071 pub operation: hipStreamBatchMemOpType,
4072 pub address: hipDeviceptr_t,
4073 pub __bindgen_anon_1:
4074 hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t__bindgen_ty_1,
4075 pub flags: ::std::os::raw::c_uint,
4076 #[doc = "< Not valid for AMD backend. Initial value is unimportant"]
4077 pub alias: hipDeviceptr_t,
4078}
4079#[repr(C)]
4080#[derive(Copy, Clone)]
4081pub union hipStreamBatchMemOpParams_union_hipStreamMemOpWriteValueParams_t__bindgen_ty_1 {
4082 pub value: u32,
4083 pub value64: u64,
4084}
4085#[repr(C)]
4086#[derive(Debug, Copy, Clone)]
4087pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpFlushRemoteWritesParams_t {
4088 pub operation: hipStreamBatchMemOpType,
4089 pub flags: ::std::os::raw::c_uint,
4090}
4091#[repr(C)]
4092#[derive(Debug, Copy, Clone)]
4093pub struct hipStreamBatchMemOpParams_union_hipStreamMemOpMemoryBarrierParams_t {
4094 pub operation: hipStreamBatchMemOpType,
4095 pub flags: ::std::os::raw::c_uint,
4096}
4097#[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"]
4098pub type hipStreamBatchMemOpParams = hipStreamBatchMemOpParams_union;
4099#[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"]
4100#[repr(C)]
4101#[derive(Debug, Copy, Clone)]
4102pub struct hipBatchMemOpNodeParams {
4103 pub ctx: hipCtx_t,
4104 pub count: ::std::os::raw::c_uint,
4105 pub paramArray: *mut hipStreamBatchMemOpParams,
4106 pub flags: ::std::os::raw::c_uint,
4107}
4108#[doc = "< Data will mostly be read and only occassionally\n< be written to"]
4109pub const hipMemoryAdvise_hipMemAdviseSetReadMostly: hipMemoryAdvise = 1;
4110#[doc = "< Undo the effect of hipMemAdviseSetReadMostly"]
4111pub const hipMemoryAdvise_hipMemAdviseUnsetReadMostly: hipMemoryAdvise = 2;
4112#[doc = "< Set the preferred location for the data as\n< the specified device"]
4113pub const hipMemoryAdvise_hipMemAdviseSetPreferredLocation: hipMemoryAdvise = 3;
4114#[doc = "< Clear the preferred location for the data"]
4115pub const hipMemoryAdvise_hipMemAdviseUnsetPreferredLocation: hipMemoryAdvise = 4;
4116#[doc = "< Data will be accessed by the specified device\n< so prevent page faults as much as possible"]
4117pub const hipMemoryAdvise_hipMemAdviseSetAccessedBy: hipMemoryAdvise = 5;
4118#[doc = "< Let HIP to decide on the page faulting policy\n< for the specified device"]
4119pub const hipMemoryAdvise_hipMemAdviseUnsetAccessedBy: hipMemoryAdvise = 6;
4120#[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"]
4121pub const hipMemoryAdvise_hipMemAdviseSetCoarseGrain: hipMemoryAdvise = 100;
4122#[doc = "< Restores cache coherency policy back to fine-grain"]
4123pub const hipMemoryAdvise_hipMemAdviseUnsetCoarseGrain: hipMemoryAdvise = 101;
4124#[doc = " HIP Memory Advise values\n\n @note This memory advise enumeration is used on Linux, not Windows."]
4125pub type hipMemoryAdvise = ::std::os::raw::c_uint;
4126#[doc = "< Updates to memory with this attribute can be\n< done coherently from all devices"]
4127pub const hipMemRangeCoherencyMode_hipMemRangeCoherencyModeFineGrain: hipMemRangeCoherencyMode = 0;
4128#[doc = "< Writes to memory with this attribute can be\n< performed by a single device at a time"]
4129pub const hipMemRangeCoherencyMode_hipMemRangeCoherencyModeCoarseGrain: hipMemRangeCoherencyMode =
4130 1;
4131#[doc = "< Memory region queried contains subregions with\n< both hipMemRangeCoherencyModeFineGrain and\n< hipMemRangeCoherencyModeCoarseGrain attributes"]
4132pub const hipMemRangeCoherencyMode_hipMemRangeCoherencyModeIndeterminate: hipMemRangeCoherencyMode =
4133 2;
4134#[doc = " HIP Coherency Mode"]
4135pub type hipMemRangeCoherencyMode = ::std::os::raw::c_uint;
4136#[doc = "< Whether the range will mostly be read and\n< only occassionally be written to"]
4137pub const hipMemRangeAttribute_hipMemRangeAttributeReadMostly: hipMemRangeAttribute = 1;
4138#[doc = "< The preferred location of the range"]
4139pub const hipMemRangeAttribute_hipMemRangeAttributePreferredLocation: hipMemRangeAttribute = 2;
4140#[doc = "< Memory range has hipMemAdviseSetAccessedBy\n< set for the specified device"]
4141pub const hipMemRangeAttribute_hipMemRangeAttributeAccessedBy: hipMemRangeAttribute = 3;
4142#[doc = "< The last location to where the range was\n< prefetched"]
4143pub const hipMemRangeAttribute_hipMemRangeAttributeLastPrefetchLocation: hipMemRangeAttribute = 4;
4144#[doc = "< Returns coherency mode\n< @ref hipMemRangeCoherencyMode for the range"]
4145pub const hipMemRangeAttribute_hipMemRangeAttributeCoherencyMode: hipMemRangeAttribute = 100;
4146#[doc = " HIP range attributes"]
4147pub type hipMemRangeAttribute = ::std::os::raw::c_uint;
4148#[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)"]
4149pub const hipMemPoolAttr_hipMemPoolReuseFollowEventDependencies: hipMemPoolAttr = 1;
4150#[doc = " (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)"]
4151pub const hipMemPoolAttr_hipMemPoolReuseAllowOpportunistic: hipMemPoolAttr = 2;
4152#[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)."]
4153pub const hipMemPoolAttr_hipMemPoolReuseAllowInternalDependencies: hipMemPoolAttr = 3;
4154#[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)"]
4155pub const hipMemPoolAttr_hipMemPoolAttrReleaseThreshold: hipMemPoolAttr = 4;
4156#[doc = " (value type = uint64_t)\n Amount of backing memory currently allocated for the mempool."]
4157pub const hipMemPoolAttr_hipMemPoolAttrReservedMemCurrent: hipMemPoolAttr = 5;
4158#[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."]
4159pub const hipMemPoolAttr_hipMemPoolAttrReservedMemHigh: hipMemPoolAttr = 6;
4160#[doc = " (value type = uint64_t)\n Amount of memory from the pool that is currently in use by the application."]
4161pub const hipMemPoolAttr_hipMemPoolAttrUsedMemCurrent: hipMemPoolAttr = 7;
4162#[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."]
4163pub const hipMemPoolAttr_hipMemPoolAttrUsedMemHigh: hipMemPoolAttr = 8;
4164#[doc = " HIP memory pool attributes"]
4165pub type hipMemPoolAttr = ::std::os::raw::c_uint;
4166#[doc = "< Default, make the address range not accessible"]
4167pub const hipMemAccessFlags_hipMemAccessFlagsProtNone: hipMemAccessFlags = 0;
4168#[doc = "< Set the address range read accessible"]
4169pub const hipMemAccessFlags_hipMemAccessFlagsProtRead: hipMemAccessFlags = 1;
4170#[doc = "< Set the address range read-write accessible"]
4171pub const hipMemAccessFlags_hipMemAccessFlagsProtReadWrite: hipMemAccessFlags = 3;
4172#[doc = " Specifies the memory protection flags for mapping\n"]
4173pub type hipMemAccessFlags = ::std::os::raw::c_uint;
4174#[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."]
4175#[repr(C)]
4176#[derive(Debug, Copy, Clone)]
4177pub struct hipMemAccessDesc {
4178 #[doc = "< Location on which the accessibility has to change"]
4179 pub location: hipMemLocation,
4180 #[doc = "< Accessibility flags to set"]
4181 pub flags: hipMemAccessFlags,
4182}
4183pub const hipMemAllocationType_hipMemAllocationTypeInvalid: hipMemAllocationType = 0;
4184#[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
4185pub const hipMemAllocationType_hipMemAllocationTypePinned: hipMemAllocationType = 1;
4186#[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
4187pub const hipMemAllocationType_hipMemAllocationTypeManaged: hipMemAllocationType = 2;
4188#[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
4189pub const hipMemAllocationType_hipMemAllocationTypeUncached: hipMemAllocationType = 1073741824;
4190#[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"]
4191pub const hipMemAllocationType_hipMemAllocationTypeMax: hipMemAllocationType = 2147483647;
4192#[doc = " Defines the allocation types"]
4193pub type hipMemAllocationType = ::std::os::raw::c_uint;
4194#[doc = "< Does not allow any export mechanism"]
4195pub const hipMemAllocationHandleType_hipMemHandleTypeNone: hipMemAllocationHandleType = 0;
4196pub const hipMemAllocationHandleType_hipMemHandleTypePosixFileDescriptor:
4197 hipMemAllocationHandleType = 1;
4198#[doc = "< Allows a Win32 NT handle for exporting. (HANDLE)"]
4199pub const hipMemAllocationHandleType_hipMemHandleTypeWin32: hipMemAllocationHandleType = 2;
4200#[doc = "< Allows a Win32 KMT handle for exporting. (D3DKMT_HANDLE)"]
4201pub const hipMemAllocationHandleType_hipMemHandleTypeWin32Kmt: hipMemAllocationHandleType = 4;
4202#[doc = "< Allows a fabric handle to be used for exporting."]
4203pub const hipMemAllocationHandleType_hipMemHandleTypeFabric: hipMemAllocationHandleType = 8;
4204#[doc = " Flags for specifying handle types for memory pool allocations\n"]
4205pub type hipMemAllocationHandleType = ::std::os::raw::c_uint;
4206#[doc = " Specifies the properties of allocations made from the pool."]
4207#[repr(C)]
4208#[derive(Debug, Copy, Clone)]
4209pub struct hipMemPoolProps {
4210 #[doc = "< Allocation type. Currently must be specified as @p hipMemAllocationTypePinned"]
4211 pub allocType: hipMemAllocationType,
4212 #[doc = "< Handle types that will be supported by allocations from the pool"]
4213 pub handleTypes: hipMemAllocationHandleType,
4214 #[doc = "< Location where allocations should reside"]
4215 pub location: hipMemLocation,
4216 #[doc = " Windows-specific LPSECURITYATTRIBUTES required when @p hipMemHandleTypeWin32 is specified"]
4217 pub win32SecurityAttributes: *mut ::std::os::raw::c_void,
4218 #[doc = "< Maximum pool size. When set to 0, defaults to a system dependent value"]
4219 pub maxSize: usize,
4220 #[doc = "< Reserved for future use, must be 0"]
4221 pub reserved: [::std::os::raw::c_uchar; 56usize],
4222}
4223#[doc = " Opaque data structure for exporting a pool allocation"]
4224#[repr(C)]
4225#[derive(Debug, Copy, Clone)]
4226pub struct hipMemPoolPtrExportData {
4227 pub reserved: [::std::os::raw::c_uchar; 64usize],
4228}
4229#[doc = "< The maximum number of bytes requested for dynamically allocated shared memory"]
4230pub const hipFuncAttribute_hipFuncAttributeMaxDynamicSharedMemorySize: hipFuncAttribute = 8;
4231#[doc = "< Sets the percentage of total shared memory allocated as the shared memory carveout"]
4232pub const hipFuncAttribute_hipFuncAttributePreferredSharedMemoryCarveout: hipFuncAttribute = 9;
4233#[doc = "< The kernel must launch with a valid cluster size specified."]
4234pub const hipFuncAttribute_hipFuncAttributeClusterDimMustBeSet: hipFuncAttribute = 10;
4235#[doc = "< The required cluster width in blocks"]
4236pub const hipFuncAttribute_hipFuncAttributeRequiredClusterWidth: hipFuncAttribute = 11;
4237#[doc = "< The required cluster height in blocks"]
4238pub const hipFuncAttribute_hipFuncAttributeRequiredClusterHeight: hipFuncAttribute = 12;
4239#[doc = "< The required cluster depth in blocks"]
4240pub const hipFuncAttribute_hipFuncAttributeRequiredClusterDepth: hipFuncAttribute = 13;
4241#[doc = "< Is the function allowed to launch with non-portable cluster size."]
4242pub const hipFuncAttribute_hipFuncAttributeNonPortableClusterSizeAllowed: hipFuncAttribute = 14;
4243#[doc = "< The block scheduling policy of a function."]
4244pub const hipFuncAttribute_hipFuncAttributeClusterSchedulingPolicyPreference: hipFuncAttribute = 15;
4245pub const hipFuncAttribute_hipFuncAttributeMax: hipFuncAttribute = 16;
4246#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
4247pub type hipFuncAttribute = ::std::os::raw::c_uint;
4248#[doc = "< no preference for shared memory or L1 (default)"]
4249pub const hipFuncCache_t_hipFuncCachePreferNone: hipFuncCache_t = 0;
4250#[doc = "< prefer larger shared memory and smaller L1 cache"]
4251pub const hipFuncCache_t_hipFuncCachePreferShared: hipFuncCache_t = 1;
4252#[doc = "< prefer larger L1 cache and smaller shared memory"]
4253pub const hipFuncCache_t_hipFuncCachePreferL1: hipFuncCache_t = 2;
4254#[doc = "< prefer equal size L1 cache and shared memory"]
4255pub const hipFuncCache_t_hipFuncCachePreferEqual: hipFuncCache_t = 3;
4256#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
4257pub type hipFuncCache_t = ::std::os::raw::c_uint;
4258#[doc = "< The compiler selects a device-specific value for the banking."]
4259pub const hipSharedMemConfig_hipSharedMemBankSizeDefault: hipSharedMemConfig = 0;
4260#[doc = "< Shared mem is banked at 4-bytes intervals and performs best\n< when adjacent threads access data 4 bytes apart."]
4261pub const hipSharedMemConfig_hipSharedMemBankSizeFourByte: hipSharedMemConfig = 1;
4262#[doc = "< Shared mem is banked at 8-byte intervals and performs best\n< when adjacent threads access data 4 bytes apart."]
4263pub const hipSharedMemConfig_hipSharedMemBankSizeEightByte: hipSharedMemConfig = 2;
4264#[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."]
4265pub type hipSharedMemConfig = ::std::os::raw::c_uint;
4266#[doc = " Struct for data in 3D"]
4267#[repr(C)]
4268#[derive(Debug, Copy, Clone)]
4269pub struct dim3 {
4270 #[doc = "< x"]
4271 pub x: u32,
4272 #[doc = "< y"]
4273 pub y: u32,
4274 #[doc = "< z"]
4275 pub z: u32,
4276}
4277#[doc = " struct hipLaunchParams_t"]
4278#[repr(C)]
4279#[derive(Debug, Copy, Clone)]
4280pub struct hipLaunchParams_t {
4281 #[doc = "< Device function symbol"]
4282 pub func: *mut ::std::os::raw::c_void,
4283 #[doc = "< Grid dimensions"]
4284 pub gridDim: dim3,
4285 #[doc = "< Block dimensions"]
4286 pub blockDim: dim3,
4287 #[doc = "< Arguments"]
4288 pub args: *mut *mut ::std::os::raw::c_void,
4289 #[doc = "< Shared memory"]
4290 pub sharedMem: usize,
4291 #[doc = "< Stream identifier"]
4292 pub stream: hipStream_t,
4293}
4294#[doc = " struct hipLaunchParams_t"]
4295pub type hipLaunchParams = hipLaunchParams_t;
4296#[doc = " struct hipFunctionLaunchParams_t"]
4297#[repr(C)]
4298#[derive(Debug, Copy, Clone)]
4299pub struct hipFunctionLaunchParams_t {
4300 #[doc = "< Kernel to launch"]
4301 pub function: hipFunction_t,
4302 #[doc = "< Width(X) of grid in blocks"]
4303 pub gridDimX: ::std::os::raw::c_uint,
4304 #[doc = "< Height(Y) of grid in blocks"]
4305 pub gridDimY: ::std::os::raw::c_uint,
4306 #[doc = "< Depth(Z) of grid in blocks"]
4307 pub gridDimZ: ::std::os::raw::c_uint,
4308 #[doc = "< X dimension of each thread block"]
4309 pub blockDimX: ::std::os::raw::c_uint,
4310 #[doc = "< Y dimension of each thread block"]
4311 pub blockDimY: ::std::os::raw::c_uint,
4312 #[doc = "< Z dimension of each thread block"]
4313 pub blockDimZ: ::std::os::raw::c_uint,
4314 #[doc = "< Shared memory"]
4315 pub sharedMemBytes: ::std::os::raw::c_uint,
4316 #[doc = "< Stream identifier"]
4317 pub hStream: hipStream_t,
4318 #[doc = "< Kernel parameters"]
4319 pub kernelParams: *mut *mut ::std::os::raw::c_void,
4320}
4321#[doc = " struct hipFunctionLaunchParams_t"]
4322pub type hipFunctionLaunchParams = hipFunctionLaunchParams_t;
4323pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeOpaqueFd:
4324 hipExternalMemoryHandleType_enum = 1;
4325pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeOpaqueWin32:
4326 hipExternalMemoryHandleType_enum = 2;
4327pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeOpaqueWin32Kmt:
4328 hipExternalMemoryHandleType_enum = 3;
4329pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D12Heap:
4330 hipExternalMemoryHandleType_enum = 4;
4331pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D12Resource:
4332 hipExternalMemoryHandleType_enum = 5;
4333pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D11Resource:
4334 hipExternalMemoryHandleType_enum = 6;
4335pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeD3D11ResourceKmt:
4336 hipExternalMemoryHandleType_enum = 7;
4337pub const hipExternalMemoryHandleType_enum_hipExternalMemoryHandleTypeNvSciBuf:
4338 hipExternalMemoryHandleType_enum = 8;
4339pub type hipExternalMemoryHandleType_enum = ::std::os::raw::c_uint;
4340pub use self::hipExternalMemoryHandleType_enum as hipExternalMemoryHandleType;
4341#[repr(C)]
4342#[derive(Copy, Clone)]
4343pub struct hipExternalMemoryHandleDesc_st {
4344 pub type_: hipExternalMemoryHandleType,
4345 pub handle: hipExternalMemoryHandleDesc_st__bindgen_ty_1,
4346 pub size: ::std::os::raw::c_ulonglong,
4347 pub flags: ::std::os::raw::c_uint,
4348 pub reserved: [::std::os::raw::c_uint; 16usize],
4349}
4350#[repr(C)]
4351#[derive(Copy, Clone)]
4352pub union hipExternalMemoryHandleDesc_st__bindgen_ty_1 {
4353 pub fd: ::std::os::raw::c_int,
4354 pub win32: hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1,
4355 pub nvSciBufObject: *const ::std::os::raw::c_void,
4356}
4357#[repr(C)]
4358#[derive(Debug, Copy, Clone)]
4359pub struct hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1 {
4360 pub handle: *mut ::std::os::raw::c_void,
4361 pub name: *const ::std::os::raw::c_void,
4362}
4363pub type hipExternalMemoryHandleDesc = hipExternalMemoryHandleDesc_st;
4364#[repr(C)]
4365#[derive(Debug, Copy, Clone)]
4366pub struct hipExternalMemoryBufferDesc_st {
4367 pub offset: ::std::os::raw::c_ulonglong,
4368 pub size: ::std::os::raw::c_ulonglong,
4369 pub flags: ::std::os::raw::c_uint,
4370 pub reserved: [::std::os::raw::c_uint; 16usize],
4371}
4372pub type hipExternalMemoryBufferDesc = hipExternalMemoryBufferDesc_st;
4373#[repr(C)]
4374#[derive(Debug, Copy, Clone)]
4375pub struct hipExternalMemoryMipmappedArrayDesc_st {
4376 pub offset: ::std::os::raw::c_ulonglong,
4377 pub formatDesc: hipChannelFormatDesc,
4378 pub extent: hipExtent,
4379 pub flags: ::std::os::raw::c_uint,
4380 pub numLevels: ::std::os::raw::c_uint,
4381}
4382pub type hipExternalMemoryMipmappedArrayDesc = hipExternalMemoryMipmappedArrayDesc_st;
4383pub type hipExternalMemory_t = *mut ::std::os::raw::c_void;
4384pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeOpaqueFd:
4385 hipExternalSemaphoreHandleType_enum = 1;
4386pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeOpaqueWin32:
4387 hipExternalSemaphoreHandleType_enum = 2;
4388pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeOpaqueWin32Kmt:
4389 hipExternalSemaphoreHandleType_enum = 3;
4390pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeD3D12Fence:
4391 hipExternalSemaphoreHandleType_enum = 4;
4392pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeD3D11Fence:
4393 hipExternalSemaphoreHandleType_enum = 5;
4394pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeNvSciSync:
4395 hipExternalSemaphoreHandleType_enum = 6;
4396pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeKeyedMutex:
4397 hipExternalSemaphoreHandleType_enum = 7;
4398pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeKeyedMutexKmt:
4399 hipExternalSemaphoreHandleType_enum = 8;
4400pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeTimelineSemaphoreFd:
4401 hipExternalSemaphoreHandleType_enum = 9;
4402pub const hipExternalSemaphoreHandleType_enum_hipExternalSemaphoreHandleTypeTimelineSemaphoreWin32 : hipExternalSemaphoreHandleType_enum = 10 ;
4403pub type hipExternalSemaphoreHandleType_enum = ::std::os::raw::c_uint;
4404pub use self::hipExternalSemaphoreHandleType_enum as hipExternalSemaphoreHandleType;
4405#[repr(C)]
4406#[derive(Copy, Clone)]
4407pub struct hipExternalSemaphoreHandleDesc_st {
4408 pub type_: hipExternalSemaphoreHandleType,
4409 pub handle: hipExternalSemaphoreHandleDesc_st__bindgen_ty_1,
4410 pub flags: ::std::os::raw::c_uint,
4411 pub reserved: [::std::os::raw::c_uint; 16usize],
4412}
4413#[repr(C)]
4414#[derive(Copy, Clone)]
4415pub union hipExternalSemaphoreHandleDesc_st__bindgen_ty_1 {
4416 pub fd: ::std::os::raw::c_int,
4417 pub win32: hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1,
4418 pub NvSciSyncObj: *const ::std::os::raw::c_void,
4419}
4420#[repr(C)]
4421#[derive(Debug, Copy, Clone)]
4422pub struct hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1 {
4423 pub handle: *mut ::std::os::raw::c_void,
4424 pub name: *const ::std::os::raw::c_void,
4425}
4426pub type hipExternalSemaphoreHandleDesc = hipExternalSemaphoreHandleDesc_st;
4427pub type hipExternalSemaphore_t = *mut ::std::os::raw::c_void;
4428#[repr(C)]
4429#[derive(Copy, Clone)]
4430pub struct hipExternalSemaphoreSignalParams_st {
4431 pub params: hipExternalSemaphoreSignalParams_st__bindgen_ty_1,
4432 pub flags: ::std::os::raw::c_uint,
4433 pub reserved: [::std::os::raw::c_uint; 16usize],
4434}
4435#[repr(C)]
4436#[derive(Copy, Clone)]
4437pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1 {
4438 pub fence: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1,
4439 pub nvSciSync: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2,
4440 pub keyedMutex: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_3,
4441 pub reserved: [::std::os::raw::c_uint; 12usize],
4442}
4443#[repr(C)]
4444#[derive(Debug, Copy, Clone)]
4445pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1 {
4446 pub value: ::std::os::raw::c_ulonglong,
4447}
4448#[repr(C)]
4449#[derive(Copy, Clone)]
4450pub union hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2 {
4451 pub fence: *mut ::std::os::raw::c_void,
4452 pub reserved: ::std::os::raw::c_ulonglong,
4453}
4454#[repr(C)]
4455#[derive(Debug, Copy, Clone)]
4456pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_3 {
4457 pub key: ::std::os::raw::c_ulonglong,
4458}
4459pub type hipExternalSemaphoreSignalParams = hipExternalSemaphoreSignalParams_st;
4460#[doc = " External semaphore wait parameters, compatible with driver type"]
4461#[repr(C)]
4462#[derive(Copy, Clone)]
4463pub struct hipExternalSemaphoreWaitParams_st {
4464 pub params: hipExternalSemaphoreWaitParams_st__bindgen_ty_1,
4465 pub flags: ::std::os::raw::c_uint,
4466 pub reserved: [::std::os::raw::c_uint; 16usize],
4467}
4468#[repr(C)]
4469#[derive(Copy, Clone)]
4470pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1 {
4471 pub fence: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1,
4472 pub nvSciSync: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2,
4473 pub keyedMutex: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_3,
4474 pub reserved: [::std::os::raw::c_uint; 10usize],
4475}
4476#[repr(C)]
4477#[derive(Debug, Copy, Clone)]
4478pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1 {
4479 pub value: ::std::os::raw::c_ulonglong,
4480}
4481#[repr(C)]
4482#[derive(Copy, Clone)]
4483pub union hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2 {
4484 pub fence: *mut ::std::os::raw::c_void,
4485 pub reserved: ::std::os::raw::c_ulonglong,
4486}
4487#[repr(C)]
4488#[derive(Debug, Copy, Clone)]
4489pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_3 {
4490 pub key: ::std::os::raw::c_ulonglong,
4491 pub timeoutMs: ::std::os::raw::c_uint,
4492}
4493#[doc = " External semaphore wait parameters, compatible with driver type"]
4494pub type hipExternalSemaphoreWaitParams = hipExternalSemaphoreWaitParams_st;
4495extern "C" {
4496 #[doc = " Internal use only. This API may change in the future\n Pre-Compiled header for online compilation"]
4497 pub fn __hipGetPCH(pch: *mut *const ::std::os::raw::c_char, size: *mut ::std::os::raw::c_uint);
4498}
4499pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsNone: hipGraphicsRegisterFlags = 0;
4500#[doc = "< HIP will not write to this registered resource, read only"]
4501pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsReadOnly: hipGraphicsRegisterFlags = 1;
4502pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsWriteDiscard: hipGraphicsRegisterFlags =
4503 2;
4504#[doc = "< HIP will bind this resource to a surface, read and write"]
4505pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsSurfaceLoadStore:
4506 hipGraphicsRegisterFlags = 4;
4507pub const hipGraphicsRegisterFlags_hipGraphicsRegisterFlagsTextureGather: hipGraphicsRegisterFlags =
4508 8;
4509#[doc = " HIP Access falgs for Interop resources."]
4510pub type hipGraphicsRegisterFlags = ::std::os::raw::c_uint;
4511#[repr(C)]
4512#[derive(Debug, Copy, Clone)]
4513pub struct _hipGraphicsResource {
4514 _unused: [u8; 0],
4515}
4516pub type hipGraphicsResource = _hipGraphicsResource;
4517pub type hipGraphicsResource_t = *mut hipGraphicsResource;
4518#[repr(C)]
4519#[derive(Debug, Copy, Clone)]
4520pub struct ihipGraph {
4521 _unused: [u8; 0],
4522}
4523#[doc = " An opaque value that represents a hip graph"]
4524pub type hipGraph_t = *mut ihipGraph;
4525#[repr(C)]
4526#[derive(Debug, Copy, Clone)]
4527pub struct hipGraphNode {
4528 _unused: [u8; 0],
4529}
4530#[doc = " An opaque value that represents a hip graph node"]
4531pub type hipGraphNode_t = *mut hipGraphNode;
4532#[repr(C)]
4533#[derive(Debug, Copy, Clone)]
4534pub struct hipGraphExec {
4535 _unused: [u8; 0],
4536}
4537#[doc = " An opaque value that represents a hip graph Exec"]
4538pub type hipGraphExec_t = *mut hipGraphExec;
4539#[repr(C)]
4540#[derive(Debug, Copy, Clone)]
4541pub struct hipUserObject {
4542 _unused: [u8; 0],
4543}
4544#[doc = " An opaque value that represents a user obj"]
4545pub type hipUserObject_t = *mut hipUserObject;
4546#[doc = "< GPU kernel node"]
4547pub const hipGraphNodeType_hipGraphNodeTypeKernel: hipGraphNodeType = 0;
4548#[doc = "< Memcpy node"]
4549pub const hipGraphNodeType_hipGraphNodeTypeMemcpy: hipGraphNodeType = 1;
4550#[doc = "< Memset node"]
4551pub const hipGraphNodeType_hipGraphNodeTypeMemset: hipGraphNodeType = 2;
4552#[doc = "< Host (executable) node"]
4553pub const hipGraphNodeType_hipGraphNodeTypeHost: hipGraphNodeType = 3;
4554#[doc = "< Node which executes an embedded graph"]
4555pub const hipGraphNodeType_hipGraphNodeTypeGraph: hipGraphNodeType = 4;
4556#[doc = "< Empty (no-op) node"]
4557pub const hipGraphNodeType_hipGraphNodeTypeEmpty: hipGraphNodeType = 5;
4558#[doc = "< External event wait node"]
4559pub const hipGraphNodeType_hipGraphNodeTypeWaitEvent: hipGraphNodeType = 6;
4560#[doc = "< External event record node"]
4561pub const hipGraphNodeType_hipGraphNodeTypeEventRecord: hipGraphNodeType = 7;
4562#[doc = "< External Semaphore signal node"]
4563pub const hipGraphNodeType_hipGraphNodeTypeExtSemaphoreSignal: hipGraphNodeType = 8;
4564#[doc = "< External Semaphore wait node"]
4565pub const hipGraphNodeType_hipGraphNodeTypeExtSemaphoreWait: hipGraphNodeType = 9;
4566#[doc = "< Memory alloc node"]
4567pub const hipGraphNodeType_hipGraphNodeTypeMemAlloc: hipGraphNodeType = 10;
4568#[doc = "< Memory free node"]
4569pub const hipGraphNodeType_hipGraphNodeTypeMemFree: hipGraphNodeType = 11;
4570#[doc = "< MemcpyFromSymbol node"]
4571pub const hipGraphNodeType_hipGraphNodeTypeMemcpyFromSymbol: hipGraphNodeType = 12;
4572#[doc = "< MemcpyToSymbol node"]
4573pub const hipGraphNodeType_hipGraphNodeTypeMemcpyToSymbol: hipGraphNodeType = 13;
4574#[doc = "< BatchMemOp node"]
4575pub const hipGraphNodeType_hipGraphNodeTypeBatchMemOp: hipGraphNodeType = 14;
4576pub const hipGraphNodeType_hipGraphNodeTypeCount: hipGraphNodeType = 15;
4577#[doc = " hipGraphNodeType"]
4578pub type hipGraphNodeType = ::std::os::raw::c_uint;
4579pub type hipHostFn_t =
4580 ::std::option::Option<unsafe extern "C" fn(userData: *mut ::std::os::raw::c_void)>;
4581#[repr(C)]
4582#[derive(Debug, Copy, Clone)]
4583pub struct hipHostNodeParams {
4584 pub fn_: hipHostFn_t,
4585 pub userData: *mut ::std::os::raw::c_void,
4586}
4587#[repr(C)]
4588#[derive(Debug, Copy, Clone)]
4589pub struct hipKernelNodeParams {
4590 pub blockDim: dim3,
4591 pub extra: *mut *mut ::std::os::raw::c_void,
4592 pub func: *mut ::std::os::raw::c_void,
4593 pub gridDim: dim3,
4594 pub kernelParams: *mut *mut ::std::os::raw::c_void,
4595 pub sharedMemBytes: ::std::os::raw::c_uint,
4596}
4597#[repr(C)]
4598#[derive(Debug, Copy, Clone)]
4599pub struct hipMemsetParams {
4600 pub dst: *mut ::std::os::raw::c_void,
4601 pub elementSize: ::std::os::raw::c_uint,
4602 pub height: usize,
4603 pub pitch: usize,
4604 pub value: ::std::os::raw::c_uint,
4605 pub width: usize,
4606}
4607#[repr(C)]
4608#[derive(Debug, Copy, Clone)]
4609pub struct hipMemAllocNodeParams {
4610 #[doc = "< Pool properties, which contain where\n< the location should reside"]
4611 pub poolProps: hipMemPoolProps,
4612 #[doc = "< The number of memory access descriptors."]
4613 pub accessDescs: *const hipMemAccessDesc,
4614 #[doc = "< The number of access descriptors.\n< Must not be bigger than the number of GPUs"]
4615 pub accessDescCount: usize,
4616 #[doc = "< The size of the requested allocation in bytes"]
4617 pub bytesize: usize,
4618 #[doc = "< Returned device address of the allocation"]
4619 pub dptr: *mut ::std::os::raw::c_void,
4620}
4621#[doc = "< Normal cache persistence."]
4622pub const hipAccessProperty_hipAccessPropertyNormal: hipAccessProperty = 0;
4623#[doc = "< Streaming access is less likely to persist from cache"]
4624pub const hipAccessProperty_hipAccessPropertyStreaming: hipAccessProperty = 1;
4625#[doc = "< Persisting access is more likely to persist in cache"]
4626pub const hipAccessProperty_hipAccessPropertyPersisting: hipAccessProperty = 2;
4627#[doc = " Specifies performance hint with hipAccessPolicyWindow"]
4628pub type hipAccessProperty = ::std::os::raw::c_uint;
4629#[doc = " Specifies access policy for a window, a contiguous extent of memory\n beginning at base_ptr and ending at base_ptr + num_bytes."]
4630#[repr(C)]
4631#[derive(Debug, Copy, Clone)]
4632pub struct hipAccessPolicyWindow {
4633 #[doc = "< Starting address of the access policy window"]
4634 pub base_ptr: *mut ::std::os::raw::c_void,
4635 #[doc = "< hipAccessProperty set for hit"]
4636 pub hitProp: hipAccessProperty,
4637 #[doc = "< hitRatio specifies percentage of lines assigned hitProp"]
4638 pub hitRatio: f32,
4639 #[doc = "< hipAccessProperty set for miss"]
4640 pub missProp: hipAccessProperty,
4641 #[doc = "< Size in bytes of the window policy."]
4642 pub num_bytes: usize,
4643}
4644#[doc = " Memory Synchronization Domain map"]
4645#[repr(C)]
4646#[derive(Debug, Copy, Clone)]
4647pub struct hipLaunchMemSyncDomainMap {
4648 #[doc = "< The default domain ID to use for designated kernels"]
4649 pub default_: ::std::os::raw::c_uchar,
4650 #[doc = "< The remote domain ID to use for designated kernels"]
4651 pub remote: ::std::os::raw::c_uchar,
4652}
4653#[doc = "< Launch kernels in the default domain"]
4654pub const hipLaunchMemSyncDomain_hipLaunchMemSyncDomainDefault: hipLaunchMemSyncDomain = 0;
4655#[doc = "< Launch kernels in the remote domain"]
4656pub const hipLaunchMemSyncDomain_hipLaunchMemSyncDomainRemote: hipLaunchMemSyncDomain = 1;
4657#[doc = " Memory Synchronization Domain"]
4658pub type hipLaunchMemSyncDomain = ::std::os::raw::c_uint;
4659#[doc = "< Default Synchronization Policy. Host thread waits actively"]
4660pub const hipSynchronizationPolicy_hipSyncPolicyAuto: hipSynchronizationPolicy = 1;
4661#[doc = "< Host thread spins in tight loop waiting for completition"]
4662pub const hipSynchronizationPolicy_hipSyncPolicySpin: hipSynchronizationPolicy = 2;
4663#[doc = "< Host spins but yields to other threads, reducing CPU usage"]
4664pub const hipSynchronizationPolicy_hipSyncPolicyYield: hipSynchronizationPolicy = 3;
4665#[doc = "< Host thread blocks (sleeps) until the stream completes"]
4666pub const hipSynchronizationPolicy_hipSyncPolicyBlockingSync: hipSynchronizationPolicy = 4;
4667#[doc = " Stream Synchronization Policy.\n Can be set with hipStreamSetAttribute"]
4668pub type hipSynchronizationPolicy = ::std::os::raw::c_uint;
4669#[doc = "< the default scheduling policy"]
4670pub const hipClusterSchedulingPolicy_hipClusterSchedulingPolicyDefault: hipClusterSchedulingPolicy =
4671 0;
4672#[doc = "< distribute blocks evenly across cluster's CUs"]
4673pub const hipClusterSchedulingPolicy_hipClusterSchedulingPolicySpread: hipClusterSchedulingPolicy =
4674 1;
4675pub const hipClusterSchedulingPolicy_hipClusterSchedulingPolicyLoadBalancing:
4676 hipClusterSchedulingPolicy = 2;
4677pub type hipClusterSchedulingPolicy = ::std::os::raw::c_uint;
4678#[doc = "< Regular temporal locality"]
4679pub const hipExtDynDataPrefetchTemporal_hipExtDynDataPrefetchTemporalRegular:
4680 hipExtDynDataPrefetchTemporal = 0;
4681#[doc = "< High temporal locality (prefer caching)"]
4682pub const hipExtDynDataPrefetchTemporal_hipExtDynDataPrefetchTemporalHigh:
4683 hipExtDynDataPrefetchTemporal = 1;
4684#[doc = " @brief Temporal locality hint for dynamic data prefetch."]
4685pub type hipExtDynDataPrefetchTemporal = ::std::os::raw::c_uint;
4686#[doc = " @brief Describes one 2D memory region to prefetch into L2 cache.\n\n @p address must be aligned to the device's L2 cache line size.\n @p width is measured in bytes and must be a multiple of the cache line size.\n @p height is the number of rows to prefetch.\n @p stride is the byte stride between the start of consecutive rows."]
4687#[repr(C)]
4688#[derive(Debug, Copy, Clone)]
4689pub struct hipExtDynDataPrefetchRegion {
4690 #[doc = "< Base address (must be cache-line aligned)"]
4691 pub address: *mut ::std::os::raw::c_void,
4692 #[doc = "< Stride between row starts in bytes"]
4693 pub stride: usize,
4694 #[doc = "< Width of each row in bytes (must be a multiple of cache line size)"]
4695 pub width: usize,
4696 #[doc = "< Number of rows to prefetch"]
4697 pub height: usize,
4698}
4699#[doc = " @brief Configuration for dynamic data prefetch.\n\n Pointed to by a launch attribute via @ref hipLaunchAttributeExtDynDataPrefetch.\n @p numRegions must not exceed the device limit queried via\n @ref hipDeviceAttributeMaxDynDataPrefetchRegions (use @ref hipDeviceGetAttribute).\n\n Cooperative prefetch is always enabled internally; the user only controls\n the temporal policy."]
4700#[repr(C)]
4701#[derive(Debug, Copy, Clone)]
4702pub struct hipExtDynDataPrefetchConfig {
4703 #[doc = "< Number of valid regions (1-max)"]
4704 pub numRegions: ::std::os::raw::c_uint,
4705 #[doc = "< Cache retention policy for prefetched data"]
4706 pub temporal: hipExtDynDataPrefetchTemporal,
4707 #[doc = "< Prefetch regions"]
4708 pub regions: [hipExtDynDataPrefetchRegion; 2usize],
4709}
4710#[doc = "< Ignored entry"]
4711pub const hipLaunchAttributeID_hipLaunchAttributeIgnore: hipLaunchAttributeID = 0;
4712#[doc = "< Valid for Streams, graph nodes, launches"]
4713pub const hipLaunchAttributeID_hipLaunchAttributeAccessPolicyWindow: hipLaunchAttributeID = 1;
4714#[doc = "< Valid for graph nodes, launches"]
4715pub const hipLaunchAttributeID_hipLaunchAttributeCooperative: hipLaunchAttributeID = 2;
4716#[doc = "< Valid for streams"]
4717pub const hipLaunchAttributeID_hipLaunchAttributeSynchronizationPolicy: hipLaunchAttributeID = 3;
4718#[doc = "< Valid for graph nodes, launches"]
4719pub const hipLaunchAttributeID_hipLaunchAttributeClusterDimension: hipLaunchAttributeID = 4;
4720#[doc = "< Valid for graph nodes, launches"]
4721pub const hipLaunchAttributeID_hipLaunchAttributeClusterSchedulingPolicyPreference:
4722 hipLaunchAttributeID = 5;
4723#[doc = "< Valid for graph node, streams, launches"]
4724pub const hipLaunchAttributeID_hipLaunchAttributePriority: hipLaunchAttributeID = 8;
4725#[doc = "< Valid for streams, graph nodes, launches"]
4726pub const hipLaunchAttributeID_hipLaunchAttributeMemSyncDomainMap: hipLaunchAttributeID = 9;
4727#[doc = "< Valid for streams, graph nodes, launches"]
4728pub const hipLaunchAttributeID_hipLaunchAttributeMemSyncDomain: hipLaunchAttributeID = 10;
4729#[doc = "< Valid for launches. Prefetch data into L2 before kernel execution."]
4730pub const hipLaunchAttributeID_hipLaunchAttributeExtDynDataPrefetch: hipLaunchAttributeID = 1024;
4731pub const hipLaunchAttributeID_hipLaunchAttributeMax: hipLaunchAttributeID = 1025;
4732#[doc = " Launch Attribute ID"]
4733pub type hipLaunchAttributeID = ::std::os::raw::c_uint;
4734#[doc = " Launch Attribute Value"]
4735#[repr(C)]
4736#[derive(Copy, Clone)]
4737pub union hipLaunchAttributeValue {
4738 #[doc = "< 64 byte padding"]
4739 pub pad: [::std::os::raw::c_char; 64usize],
4740 #[doc = "< Value of launch attribute ::hipLaunchAttributeAccessPolicyWindow."]
4741 pub accessPolicyWindow: hipAccessPolicyWindow,
4742 #[doc = "< Value of launch attribute ::hipLaunchAttributeCooperative. Indicates\n< whether the kernel is cooperative."]
4743 pub cooperative: ::std::os::raw::c_int,
4744 #[doc = "< Value of launch attribute :: hipLaunchAttributePriority. Execution priority of\n< kernel"]
4745 pub priority: ::std::os::raw::c_int,
4746 #[doc = "< Value of launch attribute :: hipLaunchAttributeSynchronizationPolicy. Used\n< to work queued up in stream"]
4747 pub syncPolicy: hipSynchronizationPolicy,
4748 #[doc = "< Value of launch attribute hipLaunchAttributeMemSyncDomainMap"]
4749 pub memSyncDomainMap: hipLaunchMemSyncDomainMap,
4750 #[doc = "< Value of launch attribute hipLaunchAttributeMemSyncDomain"]
4751 pub memSyncDomain: hipLaunchMemSyncDomain,
4752 pub clusterDim: hipLaunchAttributeValue__bindgen_ty_1,
4753 #[doc = "< Value of launch attribute :: hipLaunchAttributeClusterSchedulingPolicyPreference\n< determines the preferred strategy for distributing blocks within a compute cluster"]
4754 pub clusterSchedulingPolicyPreference: hipClusterSchedulingPolicy,
4755 #[doc = "< Value of launch attribute ::hipLaunchAttributeExtDynDataPrefetch"]
4756 pub dynDataPrefetch: *const hipExtDynDataPrefetchConfig,
4757}
4758#[doc = " @brief Specifies the desired cluster dimensions for a kernel launch.\n\n This opaque type is used as the value for the launch attribute\n ::hipLaunchAttributeClusterDimension. It defines the dimensions of the\n compute cluster in terms of blocks, where each field must evenly divide\n the corresponding grid dimension:\n\n - \\p x: Number of blocks along the X-axis.\n - \\p y: Number of blocks along the Y-axis.\n - \\p z: Number of blocks along the Z-axis."]
4759#[repr(C)]
4760#[derive(Debug, Copy, Clone)]
4761pub struct hipLaunchAttributeValue__bindgen_ty_1 {
4762 pub x: ::std::os::raw::c_uint,
4763 pub y: ::std::os::raw::c_uint,
4764 pub z: ::std::os::raw::c_uint,
4765}
4766#[doc = "< The update succeeded"]
4767pub const hipGraphExecUpdateResult_hipGraphExecUpdateSuccess: hipGraphExecUpdateResult = 0;
4768#[doc = "< The update failed for an unexpected reason which is described\n< in the return value of the function"]
4769pub const hipGraphExecUpdateResult_hipGraphExecUpdateError: hipGraphExecUpdateResult = 1;
4770#[doc = "< The update failed because the topology changed"]
4771pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorTopologyChanged:
4772 hipGraphExecUpdateResult = 2;
4773#[doc = "< The update failed because a node type changed"]
4774pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorNodeTypeChanged:
4775 hipGraphExecUpdateResult = 3;
4776pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorFunctionChanged:
4777 hipGraphExecUpdateResult = 4;
4778pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorParametersChanged:
4779 hipGraphExecUpdateResult = 5;
4780pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorNotSupported: hipGraphExecUpdateResult =
4781 6;
4782pub const hipGraphExecUpdateResult_hipGraphExecUpdateErrorUnsupportedFunctionChange:
4783 hipGraphExecUpdateResult = 7;
4784#[doc = " Graph execution update result"]
4785pub type hipGraphExecUpdateResult = ::std::os::raw::c_uint;
4786pub const hipStreamCaptureMode_hipStreamCaptureModeGlobal: hipStreamCaptureMode = 0;
4787pub const hipStreamCaptureMode_hipStreamCaptureModeThreadLocal: hipStreamCaptureMode = 1;
4788pub const hipStreamCaptureMode_hipStreamCaptureModeRelaxed: hipStreamCaptureMode = 2;
4789pub type hipStreamCaptureMode = ::std::os::raw::c_uint;
4790#[doc = "< Stream is not capturing"]
4791pub const hipStreamCaptureStatus_hipStreamCaptureStatusNone: hipStreamCaptureStatus = 0;
4792#[doc = "< Stream is actively capturing"]
4793pub const hipStreamCaptureStatus_hipStreamCaptureStatusActive: hipStreamCaptureStatus = 1;
4794#[doc = "< Stream is part of a capture sequence that has been\n< invalidated, but not terminated"]
4795pub const hipStreamCaptureStatus_hipStreamCaptureStatusInvalidated: hipStreamCaptureStatus = 2;
4796pub type hipStreamCaptureStatus = ::std::os::raw::c_uint;
4797#[doc = "< Add new nodes to the dependency set"]
4798pub const hipStreamUpdateCaptureDependenciesFlags_hipStreamAddCaptureDependencies:
4799 hipStreamUpdateCaptureDependenciesFlags = 0;
4800#[doc = "< Replace the dependency set with the new nodes"]
4801pub const hipStreamUpdateCaptureDependenciesFlags_hipStreamSetCaptureDependencies:
4802 hipStreamUpdateCaptureDependenciesFlags = 1;
4803pub type hipStreamUpdateCaptureDependenciesFlags = ::std::os::raw::c_uint;
4804pub const hipGraphMemAttributeType_hipGraphMemAttrUsedMemCurrent: hipGraphMemAttributeType = 0;
4805#[doc = "< High watermark of memory, in bytes, associated with graphs since\n< the last time."]
4806pub const hipGraphMemAttributeType_hipGraphMemAttrUsedMemHigh: hipGraphMemAttributeType = 1;
4807#[doc = "< Amount of memory, in bytes, currently allocated for\n< graphs."]
4808pub const hipGraphMemAttributeType_hipGraphMemAttrReservedMemCurrent: hipGraphMemAttributeType = 2;
4809#[doc = "< High watermark of memory, in bytes, currently allocated for\n< graphs"]
4810pub const hipGraphMemAttributeType_hipGraphMemAttrReservedMemHigh: hipGraphMemAttributeType = 3;
4811pub type hipGraphMemAttributeType = ::std::os::raw::c_uint;
4812#[doc = "< Destructor execution is not synchronized."]
4813pub const hipUserObjectFlags_hipUserObjectNoDestructorSync: hipUserObjectFlags = 1;
4814pub type hipUserObjectFlags = ::std::os::raw::c_uint;
4815#[doc = "< Add new reference or retain."]
4816pub const hipUserObjectRetainFlags_hipGraphUserObjectMove: hipUserObjectRetainFlags = 1;
4817pub type hipUserObjectRetainFlags = ::std::os::raw::c_uint;
4818pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagAutoFreeOnLaunch:
4819 hipGraphInstantiateFlags = 1;
4820#[doc = "< Automatically upload the graph after instantiation."]
4821pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagUpload: hipGraphInstantiateFlags = 2;
4822pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagDeviceLaunch: hipGraphInstantiateFlags =
4823 4;
4824pub const hipGraphInstantiateFlags_hipGraphInstantiateFlagUseNodePriority:
4825 hipGraphInstantiateFlags = 8;
4826pub type hipGraphInstantiateFlags = ::std::os::raw::c_uint;
4827pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsVerbose: hipGraphDebugDotFlags = 1;
4828#[doc = "< Adds hipKernelNodeParams to output"]
4829pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsKernelNodeParams: hipGraphDebugDotFlags = 4;
4830#[doc = "< Adds hipMemcpy3DParms to output"]
4831pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsMemcpyNodeParams: hipGraphDebugDotFlags = 8;
4832#[doc = "< Adds hipMemsetParams to output"]
4833pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsMemsetNodeParams: hipGraphDebugDotFlags = 16;
4834#[doc = "< Adds hipHostNodeParams to output"]
4835pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsHostNodeParams: hipGraphDebugDotFlags = 32;
4836pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsEventNodeParams: hipGraphDebugDotFlags = 64;
4837pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsExtSemasSignalNodeParams:
4838 hipGraphDebugDotFlags = 128;
4839pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsExtSemasWaitNodeParams: hipGraphDebugDotFlags =
4840 256;
4841pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsKernelNodeAttributes: hipGraphDebugDotFlags =
4842 512;
4843pub const hipGraphDebugDotFlags_hipGraphDebugDotFlagsHandles: hipGraphDebugDotFlags = 1024;
4844pub type hipGraphDebugDotFlags = ::std::os::raw::c_uint;
4845#[doc = "< Instantiation Success"]
4846pub const hipGraphInstantiateResult_hipGraphInstantiateSuccess: hipGraphInstantiateResult = 0;
4847#[doc = "< Instantiation failed for an\nunexpected reason which is described in the return value of the function"]
4848pub const hipGraphInstantiateResult_hipGraphInstantiateError: hipGraphInstantiateResult = 1;
4849#[doc = "< Instantiation failed due\nto invalid structure, such as cycles"]
4850pub const hipGraphInstantiateResult_hipGraphInstantiateInvalidStructure: hipGraphInstantiateResult =
4851 2;
4852#[doc = "< Instantiation for device launch failed\nbecause the graph contained an unsupported operation"]
4853pub const hipGraphInstantiateResult_hipGraphInstantiateNodeOperationNotSupported:
4854 hipGraphInstantiateResult = 3;
4855#[doc = "< Instantiation for device launch failed\ndue to the nodes belonging to different contexts"]
4856pub const hipGraphInstantiateResult_hipGraphInstantiateMultipleDevicesNotSupported:
4857 hipGraphInstantiateResult = 4;
4858#[doc = " hipGraphInstantiateWithParams results"]
4859pub type hipGraphInstantiateResult = ::std::os::raw::c_uint;
4860#[doc = " Graph Instantiation parameters"]
4861#[repr(C)]
4862#[derive(Debug, Copy, Clone)]
4863pub struct hipGraphInstantiateParams {
4864 #[doc = "< The node which caused instantiation to fail, if any"]
4865 pub errNode_out: hipGraphNode_t,
4866 #[doc = "< Instantiation flags"]
4867 pub flags: ::std::os::raw::c_ulonglong,
4868 #[doc = "< Whether instantiation was successful.\nIf it failed, the reason why"]
4869 pub result_out: hipGraphInstantiateResult,
4870 #[doc = "< Upload stream"]
4871 pub uploadStream: hipStream_t,
4872}
4873#[doc = " Memory allocation properties"]
4874#[repr(C)]
4875#[derive(Copy, Clone)]
4876pub struct hipMemAllocationProp {
4877 #[doc = "< Memory allocation type"]
4878 pub type_: hipMemAllocationType,
4879 pub __bindgen_anon_1: hipMemAllocationProp__bindgen_ty_1,
4880 #[doc = "< Memory location"]
4881 pub location: hipMemLocation,
4882 #[doc = "< Metadata for Win32 handles"]
4883 pub win32HandleMetaData: *mut ::std::os::raw::c_void,
4884 pub allocFlags: hipMemAllocationProp__bindgen_ty_2,
4885}
4886#[repr(C)]
4887#[derive(Copy, Clone)]
4888pub union hipMemAllocationProp__bindgen_ty_1 {
4889 #[doc = "< Requested handle type"]
4890 pub requestedHandleType: hipMemAllocationHandleType,
4891 #[doc = "< Requested handle types"]
4892 pub requestedHandleTypes: hipMemAllocationHandleType,
4893}
4894#[repr(C)]
4895#[derive(Debug, Copy, Clone)]
4896pub struct hipMemAllocationProp__bindgen_ty_2 {
4897 #[doc = "< Compression type"]
4898 pub compressionType: ::std::os::raw::c_uchar,
4899 #[doc = "< RDMA capable"]
4900 pub gpuDirectRDMACapable: ::std::os::raw::c_uchar,
4901 #[doc = "< Usage"]
4902 pub usage: ::std::os::raw::c_ushort,
4903}
4904#[doc = " External semaphore signal node parameters"]
4905#[repr(C)]
4906#[derive(Debug, Copy, Clone)]
4907pub struct hipExternalSemaphoreSignalNodeParams {
4908 pub extSemArray: *mut hipExternalSemaphore_t,
4909 pub paramsArray: *const hipExternalSemaphoreSignalParams,
4910 pub numExtSems: ::std::os::raw::c_uint,
4911}
4912#[doc = " External semaphore wait node parameters"]
4913#[repr(C)]
4914#[derive(Debug, Copy, Clone)]
4915pub struct hipExternalSemaphoreWaitNodeParams {
4916 pub extSemArray: *mut hipExternalSemaphore_t,
4917 pub paramsArray: *const hipExternalSemaphoreWaitParams,
4918 pub numExtSems: ::std::os::raw::c_uint,
4919}
4920#[repr(C)]
4921#[derive(Debug, Copy, Clone)]
4922pub struct ihipMemGenericAllocationHandle {
4923 _unused: [u8; 0],
4924}
4925#[doc = " Generic handle for memory allocation"]
4926pub type hipMemGenericAllocationHandle_t = *mut ihipMemGenericAllocationHandle;
4927#[doc = "< Minimum granularity"]
4928pub const hipMemAllocationGranularity_flags_hipMemAllocationGranularityMinimum:
4929 hipMemAllocationGranularity_flags = 0;
4930#[doc = "< Recommended granularity for performance"]
4931pub const hipMemAllocationGranularity_flags_hipMemAllocationGranularityRecommended:
4932 hipMemAllocationGranularity_flags = 1;
4933#[doc = " Flags for granularity"]
4934pub type hipMemAllocationGranularity_flags = ::std::os::raw::c_uint;
4935#[doc = "< Generic handle type"]
4936pub const hipMemHandleType_hipMemHandleTypeGeneric: hipMemHandleType = 0;
4937#[doc = " Memory handle type"]
4938pub type hipMemHandleType = ::std::os::raw::c_uint;
4939#[doc = "< Map operation"]
4940pub const hipMemOperationType_hipMemOperationTypeMap: hipMemOperationType = 1;
4941#[doc = "< Unmap operation"]
4942pub const hipMemOperationType_hipMemOperationTypeUnmap: hipMemOperationType = 2;
4943#[doc = " Memory operation types"]
4944pub type hipMemOperationType = ::std::os::raw::c_uint;
4945#[doc = "< Sparse level"]
4946pub const hipArraySparseSubresourceType_hipArraySparseSubresourceTypeSparseLevel:
4947 hipArraySparseSubresourceType = 0;
4948#[doc = "< Miptail"]
4949pub const hipArraySparseSubresourceType_hipArraySparseSubresourceTypeMiptail:
4950 hipArraySparseSubresourceType = 1;
4951#[doc = " Subresource types for sparse arrays"]
4952pub type hipArraySparseSubresourceType = ::std::os::raw::c_uint;
4953#[doc = " Map info for arrays"]
4954#[repr(C)]
4955#[derive(Copy, Clone)]
4956pub struct hipArrayMapInfo {
4957 #[doc = "< Resource type"]
4958 pub resourceType: hipResourceType,
4959 pub resource: hipArrayMapInfo__bindgen_ty_1,
4960 #[doc = "< Sparse subresource type"]
4961 pub subresourceType: hipArraySparseSubresourceType,
4962 pub subresource: hipArrayMapInfo__bindgen_ty_2,
4963 #[doc = "< Memory operation type"]
4964 pub memOperationType: hipMemOperationType,
4965 #[doc = "< Memory handle type"]
4966 pub memHandleType: hipMemHandleType,
4967 pub memHandle: hipArrayMapInfo__bindgen_ty_3,
4968 #[doc = "< Offset within the memory"]
4969 pub offset: ::std::os::raw::c_ulonglong,
4970 #[doc = "< Device ordinal bit mask"]
4971 pub deviceBitMask: ::std::os::raw::c_uint,
4972 #[doc = "< flags for future use, must be zero now."]
4973 pub flags: ::std::os::raw::c_uint,
4974 #[doc = "< Reserved for future use, must be zero now."]
4975 pub reserved: [::std::os::raw::c_uint; 2usize],
4976}
4977#[repr(C)]
4978#[derive(Copy, Clone)]
4979pub union hipArrayMapInfo__bindgen_ty_1 {
4980 pub mipmap: hipMipmappedArray,
4981 pub array: hipArray_t,
4982}
4983#[repr(C)]
4984#[derive(Copy, Clone)]
4985pub union hipArrayMapInfo__bindgen_ty_2 {
4986 pub sparseLevel: hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1,
4987 pub miptail: hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2,
4988}
4989#[repr(C)]
4990#[derive(Debug, Copy, Clone)]
4991pub struct hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1 {
4992 #[doc = "< For mipmapped arrays must be a valid mipmap level. For arrays must be zero"]
4993 pub level: ::std::os::raw::c_uint,
4994 #[doc = "< For layered arrays must be a valid layer index. Otherwise, must be zero"]
4995 pub layer: ::std::os::raw::c_uint,
4996 #[doc = "< X offset in elements"]
4997 pub offsetX: ::std::os::raw::c_uint,
4998 #[doc = "< Y offset in elements"]
4999 pub offsetY: ::std::os::raw::c_uint,
5000 #[doc = "< Z offset in elements"]
5001 pub offsetZ: ::std::os::raw::c_uint,
5002 #[doc = "< Width in elements"]
5003 pub extentWidth: ::std::os::raw::c_uint,
5004 #[doc = "< Height in elements"]
5005 pub extentHeight: ::std::os::raw::c_uint,
5006 #[doc = "< Depth in elements"]
5007 pub extentDepth: ::std::os::raw::c_uint,
5008}
5009#[repr(C)]
5010#[derive(Debug, Copy, Clone)]
5011pub struct hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2 {
5012 #[doc = "< For layered arrays must be a valid layer index. Otherwise, must be zero"]
5013 pub layer: ::std::os::raw::c_uint,
5014 #[doc = "< Offset within mip tail"]
5015 pub offset: ::std::os::raw::c_ulonglong,
5016 #[doc = "< Extent in bytes"]
5017 pub size: ::std::os::raw::c_ulonglong,
5018}
5019#[repr(C)]
5020#[derive(Copy, Clone)]
5021pub union hipArrayMapInfo__bindgen_ty_3 {
5022 pub memHandle: hipMemGenericAllocationHandle_t,
5023}
5024#[doc = " Memcpy node params"]
5025#[repr(C)]
5026#[derive(Debug, Copy, Clone)]
5027pub struct hipMemcpyNodeParams {
5028 #[doc = "< Must be zero."]
5029 pub flags: ::std::os::raw::c_int,
5030 #[doc = "< Must be zero."]
5031 pub reserved: [::std::os::raw::c_int; 3usize],
5032 #[doc = "< Params set for the memory copy."]
5033 pub copyParams: hipMemcpy3DParms,
5034}
5035#[doc = " Child graph node params"]
5036#[repr(C)]
5037#[derive(Debug, Copy, Clone)]
5038pub struct hipChildGraphNodeParams {
5039 #[doc = "< Either the child graph to clone into the node, or\n< a handle to the graph possesed by the node used during query"]
5040 pub graph: hipGraph_t,
5041}
5042#[doc = " Event record node params"]
5043#[repr(C)]
5044#[derive(Debug, Copy, Clone)]
5045pub struct hipEventWaitNodeParams {
5046 #[doc = "< Event to wait on"]
5047 pub event: hipEvent_t,
5048}
5049#[doc = " Event record node params"]
5050#[repr(C)]
5051#[derive(Debug, Copy, Clone)]
5052pub struct hipEventRecordNodeParams {
5053 #[doc = "< The event to be recorded when node executes"]
5054 pub event: hipEvent_t,
5055}
5056#[doc = " Memory free node params"]
5057#[repr(C)]
5058#[derive(Debug, Copy, Clone)]
5059pub struct hipMemFreeNodeParams {
5060 #[doc = "< the pointer to be freed"]
5061 pub dptr: *mut ::std::os::raw::c_void,
5062}
5063#[doc = " Params for different graph nodes"]
5064#[repr(C)]
5065#[derive(Copy, Clone)]
5066pub struct hipGraphNodeParams {
5067 pub type_: hipGraphNodeType,
5068 pub reserved0: [::std::os::raw::c_int; 3usize],
5069 pub __bindgen_anon_1: hipGraphNodeParams__bindgen_ty_1,
5070 pub reserved2: ::std::os::raw::c_longlong,
5071}
5072#[repr(C)]
5073#[derive(Copy, Clone)]
5074pub union hipGraphNodeParams__bindgen_ty_1 {
5075 pub reserved1: [::std::os::raw::c_longlong; 29usize],
5076 pub kernel: hipKernelNodeParams,
5077 pub memcpy: hipMemcpyNodeParams,
5078 pub memset: hipMemsetParams,
5079 pub host: hipHostNodeParams,
5080 pub graph: hipChildGraphNodeParams,
5081 pub eventWait: hipEventWaitNodeParams,
5082 pub eventRecord: hipEventRecordNodeParams,
5083 pub extSemSignal: hipExternalSemaphoreSignalNodeParams,
5084 pub extSemWait: hipExternalSemaphoreWaitNodeParams,
5085 pub alloc: hipMemAllocNodeParams,
5086 pub free: hipMemFreeNodeParams,
5087}
5088pub const hipGraphDependencyType_hipGraphDependencyTypeDefault: hipGraphDependencyType = 0;
5089pub const hipGraphDependencyType_hipGraphDependencyTypeProgrammatic: hipGraphDependencyType = 1;
5090pub type hipGraphDependencyType = ::std::os::raw::c_uint;
5091#[repr(C)]
5092#[derive(Debug, Copy, Clone)]
5093pub struct hipGraphEdgeData {
5094 #[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."]
5095 pub from_port: ::std::os::raw::c_uchar,
5096 #[doc = "< These bytes are unused and must be zeroed"]
5097 pub reserved: [::std::os::raw::c_uchar; 5usize],
5098 #[doc = "< Currently no node types define non-zero ports. This field must be set to zero."]
5099 pub to_port: ::std::os::raw::c_uchar,
5100 #[doc = "< This should be populated with a value from hipGraphDependencyType"]
5101 pub type_: ::std::os::raw::c_uchar,
5102}
5103#[doc = " Used to specify custom attributes for launching kernels"]
5104#[repr(C)]
5105#[derive(Copy, Clone)]
5106pub struct hipLaunchAttribute_st {
5107 #[doc = "< Identifier of the launch attribute"]
5108 pub id: hipLaunchAttributeID,
5109 #[doc = "< Padding to align the structure to 8 bytes"]
5110 pub pad: [::std::os::raw::c_char; 4usize],
5111 pub __bindgen_anon_1: hipLaunchAttribute_st__bindgen_ty_1,
5112}
5113#[repr(C)]
5114#[derive(Copy, Clone)]
5115pub union hipLaunchAttribute_st__bindgen_ty_1 {
5116 #[doc = "< Value associated with the launch attribute"]
5117 pub val: hipLaunchAttributeValue,
5118 #[doc = "< Value associated with the launch attribute"]
5119 pub value: hipLaunchAttributeValue,
5120}
5121#[doc = " Used to specify custom attributes for launching kernels"]
5122pub type hipLaunchAttribute = hipLaunchAttribute_st;
5123#[doc = " HIP extensible launch configuration"]
5124#[repr(C)]
5125#[derive(Debug, Copy, Clone)]
5126pub struct hipLaunchConfig_st {
5127 #[doc = "< Grid dimensions"]
5128 pub gridDim: dim3,
5129 #[doc = "< Block dimensions"]
5130 pub blockDim: dim3,
5131 #[doc = "< Dynamic shared-memory size per thread block"]
5132 pub dynamicSmemBytes: usize,
5133 #[doc = "< Stream identifier"]
5134 pub stream: hipStream_t,
5135 #[doc = "< Attributes list"]
5136 pub attrs: *mut hipLaunchAttribute,
5137 #[doc = "< Number of attributes"]
5138 pub numAttrs: ::std::os::raw::c_uint,
5139}
5140#[doc = " HIP extensible launch configuration"]
5141pub type hipLaunchConfig_t = hipLaunchConfig_st;
5142#[doc = " HIP driver extensible launch configuration"]
5143#[repr(C)]
5144#[derive(Debug, Copy, Clone)]
5145pub struct HIP_LAUNCH_CONFIG_st {
5146 #[doc = "< Grid width in blocks"]
5147 pub gridDimX: ::std::os::raw::c_uint,
5148 #[doc = "< Grid height in blocks"]
5149 pub gridDimY: ::std::os::raw::c_uint,
5150 #[doc = "< Grid depth in blocks"]
5151 pub gridDimZ: ::std::os::raw::c_uint,
5152 #[doc = "< Thread block dimension in X"]
5153 pub blockDimX: ::std::os::raw::c_uint,
5154 #[doc = "< Thread block dimension in Y"]
5155 pub blockDimY: ::std::os::raw::c_uint,
5156 #[doc = "< Thread block dimension in Z"]
5157 pub blockDimZ: ::std::os::raw::c_uint,
5158 #[doc = "< Dynamic shared-memory size in bytes per block"]
5159 pub sharedMemBytes: ::std::os::raw::c_uint,
5160 #[doc = "< HIP stream identifier"]
5161 pub hStream: hipStream_t,
5162 #[doc = "< Attribute list"]
5163 pub attrs: *mut hipLaunchAttribute,
5164 #[doc = "< Number of attributes"]
5165 pub numAttrs: ::std::os::raw::c_uint,
5166}
5167#[doc = " HIP driver extensible launch configuration"]
5168pub type HIP_LAUNCH_CONFIG = HIP_LAUNCH_CONFIG_st;
5169#[doc = " Struct representing array memory requirements."]
5170#[repr(C)]
5171#[derive(Debug, Copy, Clone)]
5172pub struct hipArrayMemoryRequirements {
5173 pub alignment: usize,
5174 pub size: usize,
5175}
5176pub const hipMemRangeHandleType_hipMemRangeHandleTypeDmaBufFd: hipMemRangeHandleType = 1;
5177pub const hipMemRangeHandleType_hipMemRangeHandleTypeMax: hipMemRangeHandleType = 2147483647;
5178#[doc = " Requested handle type for address range."]
5179pub type hipMemRangeHandleType = ::std::os::raw::c_uint;
5180pub const hipMemRangeFlags_hipMemRangeFlagDmaBufMappingTypePcie: hipMemRangeFlags = 1;
5181pub const hipMemRangeFlags_hipMemRangeFlagsMax: hipMemRangeFlags = 2147483647;
5182#[doc = " Mem Range Flags used in hipMemGetHandleForAddressRange."]
5183pub type hipMemRangeFlags = ::std::os::raw::c_uint;
5184extern "C" {
5185 #[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"]
5186 pub fn hipInit(flags: ::std::os::raw::c_uint) -> hipError_t;
5187}
5188extern "C" {
5189 #[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"]
5190 pub fn hipDriverGetVersion(driverVersion: *mut ::std::os::raw::c_int) -> hipError_t;
5191}
5192extern "C" {
5193 #[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"]
5194 pub fn hipRuntimeGetVersion(runtimeVersion: *mut ::std::os::raw::c_int) -> hipError_t;
5195}
5196extern "C" {
5197 #[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"]
5198 pub fn hipDeviceGet(device: *mut hipDevice_t, ordinal: ::std::os::raw::c_int) -> hipError_t;
5199}
5200extern "C" {
5201 #[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"]
5202 pub fn hipDeviceComputeCapability(
5203 major: *mut ::std::os::raw::c_int,
5204 minor: *mut ::std::os::raw::c_int,
5205 device: hipDevice_t,
5206 ) -> hipError_t;
5207}
5208extern "C" {
5209 #[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"]
5210 pub fn hipDeviceGetName(
5211 name: *mut ::std::os::raw::c_char,
5212 len: ::std::os::raw::c_int,
5213 device: hipDevice_t,
5214 ) -> hipError_t;
5215}
5216extern "C" {
5217 #[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"]
5218 pub fn hipDeviceGetUuid(uuid: *mut hipUUID, device: hipDevice_t) -> hipError_t;
5219}
5220extern "C" {
5221 #[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"]
5222 pub fn hipDeviceGetP2PAttribute(
5223 value: *mut ::std::os::raw::c_int,
5224 attr: hipDeviceP2PAttr,
5225 srcDevice: ::std::os::raw::c_int,
5226 dstDevice: ::std::os::raw::c_int,
5227 ) -> hipError_t;
5228}
5229extern "C" {
5230 #[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"]
5231 pub fn hipDeviceGetPCIBusId(
5232 pciBusId: *mut ::std::os::raw::c_char,
5233 len: ::std::os::raw::c_int,
5234 device: ::std::os::raw::c_int,
5235 ) -> hipError_t;
5236}
5237extern "C" {
5238 #[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"]
5239 pub fn hipDeviceGetByPCIBusId(
5240 device: *mut ::std::os::raw::c_int,
5241 pciBusId: *const ::std::os::raw::c_char,
5242 ) -> hipError_t;
5243}
5244extern "C" {
5245 #[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"]
5246 pub fn hipDeviceTotalMem(bytes: *mut usize, device: hipDevice_t) -> hipError_t;
5247}
5248extern "C" {
5249 #[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"]
5250 pub fn hipDeviceSynchronize() -> hipError_t;
5251}
5252extern "C" {
5253 #[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"]
5254 pub fn hipDeviceReset() -> hipError_t;
5255}
5256extern "C" {
5257 #[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"]
5258 pub fn hipSetDevice(deviceId: ::std::os::raw::c_int) -> hipError_t;
5259}
5260extern "C" {
5261 #[doc = " @brief Set a list of devices that can be used.\n\n @param[in] device_arr List of devices to try\n @param[in] len Number of devices in specified list\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see #hipGetDevice, #hipGetDeviceCount. #hipSetDevice. #hipGetDeviceProperties.\n #hipSetDeviceFlags. #hipChooseDevice\n"]
5262 pub fn hipSetValidDevices(
5263 device_arr: *mut ::std::os::raw::c_int,
5264 len: ::std::os::raw::c_int,
5265 ) -> hipError_t;
5266}
5267extern "C" {
5268 #[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"]
5269 pub fn hipGetDevice(deviceId: *mut ::std::os::raw::c_int) -> hipError_t;
5270}
5271extern "C" {
5272 #[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."]
5273 pub fn hipGetDeviceCount(count: *mut ::std::os::raw::c_int) -> hipError_t;
5274}
5275extern "C" {
5276 #[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"]
5277 pub fn hipDeviceGetAttribute(
5278 pi: *mut ::std::os::raw::c_int,
5279 attr: hipDeviceAttribute_t,
5280 deviceId: ::std::os::raw::c_int,
5281 ) -> hipError_t;
5282}
5283extern "C" {
5284 #[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."]
5285 pub fn hipDeviceGetDefaultMemPool(
5286 mem_pool: *mut hipMemPool_t,
5287 device: ::std::os::raw::c_int,
5288 ) -> hipError_t;
5289}
5290extern "C" {
5291 #[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."]
5292 pub fn hipDeviceSetMemPool(device: ::std::os::raw::c_int, mem_pool: hipMemPool_t)
5293 -> hipError_t;
5294}
5295extern "C" {
5296 #[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."]
5297 pub fn hipDeviceGetMemPool(
5298 mem_pool: *mut hipMemPool_t,
5299 device: ::std::os::raw::c_int,
5300 ) -> hipError_t;
5301}
5302extern "C" {
5303 #[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."]
5304 pub fn hipGetDevicePropertiesR0600(
5305 prop: *mut hipDeviceProp_tR0600,
5306 deviceId: ::std::os::raw::c_int,
5307 ) -> hipError_t;
5308}
5309extern "C" {
5310 #[doc = " @brief Gets the maximum width for 1D linear textures on the specified device\n\n This function queries the maximum width, in elements, of 1D linear textures that can be allocated\n on the specified device. The maximum width depends on the texture element size and the hardware\n limitations of the device.\n\n @param [out] max_width Maximum width, in elements, of 1D linear textures that the device can\n support\n @param [in] desc Requested channel format\n @param [in] device Device index to query for maximum 1D texture width\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDevice\n\n @see hipDeviceGetAttribute, hipMalloc, hipTexRefSetAddressMode"]
5311 pub fn hipDeviceGetTexture1DLinearMaxWidth(
5312 max_width: *mut usize,
5313 desc: *const hipChannelFormatDesc,
5314 device: ::std::os::raw::c_int,
5315 ) -> hipError_t;
5316}
5317extern "C" {
5318 #[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"]
5319 pub fn hipDeviceSetCacheConfig(cacheConfig: hipFuncCache_t) -> hipError_t;
5320}
5321extern "C" {
5322 #[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"]
5323 pub fn hipDeviceGetCacheConfig(cacheConfig: *mut hipFuncCache_t) -> hipError_t;
5324}
5325extern "C" {
5326 #[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"]
5327 pub fn hipDeviceGetLimit(pValue: *mut usize, limit: hipLimit_t) -> hipError_t;
5328}
5329extern "C" {
5330 #[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"]
5331 pub fn hipDeviceSetLimit(limit: hipLimit_t, value: usize) -> hipError_t;
5332}
5333extern "C" {
5334 #[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"]
5335 pub fn hipDeviceGetSharedMemConfig(pConfig: *mut hipSharedMemConfig) -> hipError_t;
5336}
5337extern "C" {
5338 #[doc = " @brief Gets the flags set for current device\n\n @param [out] flags Pointer of the flags\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue"]
5339 pub fn hipGetDeviceFlags(flags: *mut ::std::os::raw::c_uint) -> hipError_t;
5340}
5341extern "C" {
5342 #[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"]
5343 pub fn hipDeviceSetSharedMemConfig(config: hipSharedMemConfig) -> hipError_t;
5344}
5345extern "C" {
5346 #[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"]
5347 pub fn hipSetDeviceFlags(flags: ::std::os::raw::c_uint) -> hipError_t;
5348}
5349extern "C" {
5350 #[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"]
5351 pub fn hipChooseDeviceR0600(
5352 device: *mut ::std::os::raw::c_int,
5353 prop: *const hipDeviceProp_tR0600,
5354 ) -> hipError_t;
5355}
5356extern "C" {
5357 #[doc = " @brief Returns the link type and hop count between two devices\n\n @param [in] device1 Ordinal for device1\n @param [in] device2 Ordinal for device2\n @param [out] linktype Returns the link type (See hsa_amd_link_info_type_t) between the two\n devices\n @param [out] hopcount Returns the hop count between the two devices\n\n Queries and returns the HSA link type and the hop count between the two specified devices.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
5358 pub fn hipExtGetLinkTypeAndHopCount(
5359 device1: ::std::os::raw::c_int,
5360 device2: ::std::os::raw::c_int,
5361 linktype: *mut u32,
5362 hopcount: *mut u32,
5363 ) -> hipError_t;
5364}
5365extern "C" {
5366 #[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"]
5367 pub fn hipIpcGetMemHandle(
5368 handle: *mut hipIpcMemHandle_t,
5369 devPtr: *mut ::std::os::raw::c_void,
5370 ) -> hipError_t;
5371}
5372extern "C" {
5373 #[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"]
5374 pub fn hipIpcOpenMemHandle(
5375 devPtr: *mut *mut ::std::os::raw::c_void,
5376 handle: hipIpcMemHandle_t,
5377 flags: ::std::os::raw::c_uint,
5378 ) -> hipError_t;
5379}
5380extern "C" {
5381 #[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"]
5382 pub fn hipIpcCloseMemHandle(devPtr: *mut ::std::os::raw::c_void) -> hipError_t;
5383}
5384extern "C" {
5385 #[doc = " @brief Gets an opaque interprocess handle for an event.\n\n This opaque handle may be copied into other processes and opened with hipIpcOpenEventHandle.\n Then hipEventRecord, hipEventSynchronize, hipStreamWaitEvent and hipEventQuery may be used in\n either process. Operations on the imported event after the exported event has been freed with\n hipEventDestroy will result in undefined behavior.\n\n @param[out] handle Pointer to hipIpcEventHandle to return the opaque event handle\n @param[in] event Event allocated with hipEventInterprocess and hipEventDisableTiming flags\n\n @returns #hipSuccess, #hipErrorInvalidConfiguration, #hipErrorInvalidValue\n\n @note This IPC event related feature API is currently applicable on Linux.\n"]
5386 pub fn hipIpcGetEventHandle(handle: *mut hipIpcEventHandle_t, event: hipEvent_t) -> hipError_t;
5387}
5388extern "C" {
5389 #[doc = " @brief Opens an interprocess event handles.\n\n Opens an interprocess event handle exported from another process with hipIpcGetEventHandle. The\n returned hipEvent_t behaves like a locally created event with the hipEventDisableTiming flag\n specified. This event need be freed with hipEventDestroy. Operations on the imported event after\n the exported event has been freed with hipEventDestroy will result in undefined behavior. If the\n function is called within the same process where handle is returned by hipIpcGetEventHandle, it\n will return hipErrorInvalidContext.\n\n @param[out] event Pointer to hipEvent_t to return the event\n @param[in] handle The opaque interprocess handle to open\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext\n\n @note This IPC event related feature API is currently applicable on Linux.\n"]
5390 pub fn hipIpcOpenEventHandle(event: *mut hipEvent_t, handle: hipIpcEventHandle_t)
5391 -> hipError_t;
5392}
5393extern "C" {
5394 #[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"]
5395 pub fn hipFuncSetAttribute(
5396 func: *const ::std::os::raw::c_void,
5397 attr: hipFuncAttribute,
5398 value: ::std::os::raw::c_int,
5399 ) -> hipError_t;
5400}
5401extern "C" {
5402 #[doc = " @brief Set attribute for a specific kernel\n\n @param [in] attrib Attribute to set\n @param [in] value Value to set\n @param [in] kernel Kernel to set attribute for\n @param [in] dev Device kernel execute on\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle,\n #hipErrorInvalidDevice, #hipErrorInvalidDeviceFunction, #hipErrorMissingConfiguration\n Note: AMD devices and some Nvidia GPUS do not support reconfigurable cache. This hint is ignored\n on those architectures.\n"]
5403 pub fn hipKernelSetAttribute(
5404 attrib: hipFunction_attribute,
5405 value: ::std::os::raw::c_int,
5406 kernel: hipKernel_t,
5407 dev: hipDevice_t,
5408 ) -> hipError_t;
5409}
5410extern "C" {
5411 #[doc = " @brief Function will be extracted for specific kernel\n\n @param [out] pFunc Pointer to function handle for the kernel\n @param [in] kernel kernel to get handle for\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotFound"]
5412 pub fn hipKernelGetFunction(pFunc: *mut hipFunction_t, kernel: hipKernel_t) -> hipError_t;
5413}
5414extern "C" {
5415 #[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"]
5416 pub fn hipFuncSetCacheConfig(
5417 func: *const ::std::os::raw::c_void,
5418 config: hipFuncCache_t,
5419 ) -> hipError_t;
5420}
5421extern "C" {
5422 #[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"]
5423 pub fn hipFuncSetSharedMemConfig(
5424 func: *const ::std::os::raw::c_void,
5425 config: hipSharedMemConfig,
5426 ) -> hipError_t;
5427}
5428extern "C" {
5429 #[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"]
5430 pub fn hipGetLastError() -> hipError_t;
5431}
5432extern "C" {
5433 #[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"]
5434 pub fn hipExtGetLastError() -> hipError_t;
5435}
5436extern "C" {
5437 #[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"]
5438 pub fn hipPeekAtLastError() -> hipError_t;
5439}
5440extern "C" {
5441 #[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"]
5442 pub fn hipGetErrorName(hip_error: hipError_t) -> *const ::std::os::raw::c_char;
5443}
5444extern "C" {
5445 #[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"]
5446 pub fn hipGetErrorString(hipError: hipError_t) -> *const ::std::os::raw::c_char;
5447}
5448extern "C" {
5449 #[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"]
5450 pub fn hipDrvGetErrorName(
5451 hipError: hipError_t,
5452 errorString: *mut *const ::std::os::raw::c_char,
5453 ) -> hipError_t;
5454}
5455extern "C" {
5456 #[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"]
5457 pub fn hipDrvGetErrorString(
5458 hipError: hipError_t,
5459 errorString: *mut *const ::std::os::raw::c_char,
5460 ) -> hipError_t;
5461}
5462extern "C" {
5463 #[doc = " @brief Creates an asynchronous stream.\n\n @param[out] stream Valid pointer to hipStream_t. This function writes the memory with the\n newly created stream.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Creates a new asynchronous stream with its associated current device. The @p stream returns an\n opaque handle that can be used to reference the newly created stream in subsequent hipStream*\n commands. The stream is allocated on the heap and will remain allocated even if the handle goes\n out-of-scope. To release the memory used by the stream, the application must call\n hipStreamDestroy.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamSynchronize,\n hipStreamWaitEvent, hipStreamDestroy"]
5464 pub fn hipStreamCreate(stream: *mut hipStream_t) -> hipError_t;
5465}
5466extern "C" {
5467 #[doc = " @brief Creates an asynchronous stream with flag.\n\n @param[out] stream Pointer to new stream\n @param[in] flags Parameters to control stream creation\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Creates a new asynchronous stream with its associated current device. @p stream returns an\n opaque handle that can be used to reference the newly created stream in subsequent hipStream*\n commands. The stream is allocated on the heap and will remain allocated even if the handle\n goes out-of-scope. To release the memory used by the stream, application must call\n hipStreamDestroy.\n\n The @p flags parameter controls behavior of the stream. The valid values are #hipStreamDefault\n and #hipStreamNonBlocking.\n\n @see hipStreamCreate, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamWaitEvent,\n hipStreamDestroy.\n"]
5468 pub fn hipStreamCreateWithFlags(
5469 stream: *mut hipStream_t,
5470 flags: ::std::os::raw::c_uint,
5471 ) -> hipError_t;
5472}
5473extern "C" {
5474 #[doc = " @brief Creates an asynchronous stream with the specified priority.\n\n @param[out] stream Pointer to new stream\n @param[in] flags Parameters to control stream creation\n @param[in] priority Priority of the stream. Lower numbers represent higher priorities.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Creates a new asynchronous stream with the specified priority, with its associated current\n device.\n @p stream returns an opaque handle that can be used to reference the newly created stream in\n subsequent hipStream* commands. The stream is allocated on the heap and will remain allocated\n even if the handle goes out-of-scope. To release the memory used by the stream, application must\n call hipStreamDestroy.\n\n The @p flags parameter controls behavior of the stream. The valid values are #hipStreamDefault\n and #hipStreamNonBlocking.\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy\n"]
5475 pub fn hipStreamCreateWithPriority(
5476 stream: *mut hipStream_t,
5477 flags: ::std::os::raw::c_uint,
5478 priority: ::std::os::raw::c_int,
5479 ) -> hipError_t;
5480}
5481extern "C" {
5482 #[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."]
5483 pub fn hipDeviceGetStreamPriorityRange(
5484 leastPriority: *mut ::std::os::raw::c_int,
5485 greatestPriority: *mut ::std::os::raw::c_int,
5486 ) -> hipError_t;
5487}
5488extern "C" {
5489 #[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"]
5490 pub fn hipStreamDestroy(stream: hipStream_t) -> hipError_t;
5491}
5492extern "C" {
5493 #[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"]
5494 pub fn hipStreamQuery(stream: hipStream_t) -> hipError_t;
5495}
5496extern "C" {
5497 #[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"]
5498 pub fn hipStreamSynchronize(stream: hipStream_t) -> hipError_t;
5499}
5500extern "C" {
5501 #[doc = " @brief Makes the specified compute stream wait for the specified event\n\n @param[in] stream Stream to make wait\n @param[in] event Event to wait on\n @param[in] flags Parameters to control the operation\n\n @returns #hipSuccess, #hipErrorInvalidHandle, #hipErrorInvalidValue,\n #hipErrorStreamCaptureIsolation\n\n This function inserts a wait operation into the specified stream.\n All future work submitted to @p stream will wait until @p event reports completion before\n beginning execution.\n\n Flags include:\n hipEventWaitDefault: Default event creation flag.\n hipEventWaitExternal: Wait is captured in the graph as an external event node when\n performing stream capture\n\n This function only waits for commands in the current stream to complete. Notably, this function\n does not implicitly wait for commands in the default stream to complete, even if the specified\n stream is created with hipStreamNonBlocking = 0.\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority,\n hipStreamSynchronize, hipStreamDestroy"]
5502 pub fn hipStreamWaitEvent(
5503 stream: hipStream_t,
5504 event: hipEvent_t,
5505 flags: ::std::os::raw::c_uint,
5506 ) -> hipError_t;
5507}
5508extern "C" {
5509 #[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"]
5510 pub fn hipStreamGetFlags(stream: hipStream_t, flags: *mut ::std::os::raw::c_uint)
5511 -> hipError_t;
5512}
5513extern "C" {
5514 #[doc = " @brief Queries the Id of a stream.\n\n @param[in] stream Stream to be queried\n @param[in,out] flags Pointer to an unsigned long long in which the stream's id is returned\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle.\n\n @see hipStreamCreateWithFlags, hipStreamGetFlags, hipStreamCreateWithPriority, hipStreamGetPriority"]
5515 pub fn hipStreamGetId(
5516 stream: hipStream_t,
5517 streamId: *mut ::std::os::raw::c_ulonglong,
5518 ) -> hipError_t;
5519}
5520extern "C" {
5521 #[doc = " @brief Queries the priority of a stream.\n\n @param[in] stream Stream to be queried\n @param[in,out] priority Pointer to an unsigned integer in which the stream's priority is\n returned\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle.\n\n @see hipStreamCreateWithPriority"]
5522 pub fn hipStreamGetPriority(
5523 stream: hipStream_t,
5524 priority: *mut ::std::os::raw::c_int,
5525 ) -> hipError_t;
5526}
5527extern "C" {
5528 #[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"]
5529 pub fn hipStreamGetDevice(stream: hipStream_t, device: *mut hipDevice_t) -> hipError_t;
5530}
5531extern "C" {
5532 #[doc = " @brief Creates an asynchronous stream with the specified CU mask.\n\n @param[out] stream Pointer to new stream\n @param[in] cuMaskSize Size of CU mask bit array passed in.\n @param[in] cuMask Bit-vector representing the CU mask. Each active bit represents using one CU.\n The first 32 bits represent the first 32 CUs, and so on. If its size is greater than physical\n CU number (i.e., multiProcessorCount member of hipDeviceProp_t), the extra elements are ignored.\n It is user's responsibility to make sure the input is meaningful.\n @returns #hipSuccess, #hipErrorInvalidHandle, #hipErrorInvalidValue\n\n Creates a new asynchronous stream with the specified CU mask. @p stream returns an opaque\n handle that can be used to reference the newly created stream in subsequent hipStream* commands.\n The stream is allocated on the heap and will remain allocated even if the handle goes\n out-of-scope. To release the memory used by the stream, application must call hipStreamDestroy.\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"]
5533 pub fn hipExtStreamCreateWithCUMask(
5534 stream: *mut hipStream_t,
5535 cuMaskSize: u32,
5536 cuMask: *const u32,
5537 ) -> hipError_t;
5538}
5539extern "C" {
5540 #[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"]
5541 pub fn hipExtStreamGetCUMask(
5542 stream: hipStream_t,
5543 cuMaskSize: u32,
5544 cuMask: *mut u32,
5545 ) -> hipError_t;
5546}
5547#[doc = " Stream CallBack struct"]
5548pub type hipStreamCallback_t = ::std::option::Option<
5549 unsafe extern "C" fn(
5550 stream: hipStream_t,
5551 status: hipError_t,
5552 userData: *mut ::std::os::raw::c_void,
5553 ),
5554>;
5555extern "C" {
5556 #[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"]
5557 pub fn hipStreamAddCallback(
5558 stream: hipStream_t,
5559 callback: hipStreamCallback_t,
5560 userData: *mut ::std::os::raw::c_void,
5561 flags: ::std::os::raw::c_uint,
5562 ) -> hipError_t;
5563}
5564extern "C" {
5565 #[doc = "@brief Sets stream attribute. Updated attribute is applied to work submitted to the stream.\n @param[in] stream - Stream to set attributes to\n @param[in] attr - Attribute ID for the attribute to set\n @param[in] value - Attribute value for the attribute to set\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidResourceHandle"]
5566 pub fn hipStreamSetAttribute(
5567 stream: hipStream_t,
5568 attr: hipLaunchAttributeID,
5569 value: *const hipLaunchAttributeValue,
5570 ) -> hipError_t;
5571}
5572extern "C" {
5573 #[doc = "@brief queries stream attribute.\n @param[in] stream - Stream to geet attributes from\n @param[in] attr - Attribute ID for the attribute to query\n @param[out] value - Attribute value output\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidResourceHandle"]
5574 pub fn hipStreamGetAttribute(
5575 stream: hipStream_t,
5576 attr: hipLaunchAttributeID,
5577 value_out: *mut hipLaunchAttributeValue,
5578 ) -> hipError_t;
5579}
5580extern "C" {
5581 #[doc = "@brief Copies attributes from source stream to destination stream.\n @param[in] dst - Destination stream\n @param[in] src - Source stream\n @returns #hipSuccess, #hipErrorInvalidValue"]
5582 pub fn hipStreamCopyAttributes(dst: hipStream_t, src: hipStream_t) -> hipError_t;
5583}
5584extern "C" {
5585 #[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"]
5586 pub fn hipStreamWaitValue32(
5587 stream: hipStream_t,
5588 ptr: *mut ::std::os::raw::c_void,
5589 value: u32,
5590 flags: ::std::os::raw::c_uint,
5591 mask: u32,
5592 ) -> hipError_t;
5593}
5594extern "C" {
5595 #[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"]
5596 pub fn hipStreamWaitValue64(
5597 stream: hipStream_t,
5598 ptr: *mut ::std::os::raw::c_void,
5599 value: u64,
5600 flags: ::std::os::raw::c_uint,
5601 mask: u64,
5602 ) -> hipError_t;
5603}
5604extern "C" {
5605 #[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"]
5606 pub fn hipStreamWriteValue32(
5607 stream: hipStream_t,
5608 ptr: *mut ::std::os::raw::c_void,
5609 value: u32,
5610 flags: ::std::os::raw::c_uint,
5611 ) -> hipError_t;
5612}
5613extern "C" {
5614 #[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"]
5615 pub fn hipStreamWriteValue64(
5616 stream: hipStream_t,
5617 ptr: *mut ::std::os::raw::c_void,
5618 value: u64,
5619 flags: ::std::os::raw::c_uint,
5620 ) -> hipError_t;
5621}
5622extern "C" {
5623 #[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"]
5624 pub fn hipStreamBatchMemOp(
5625 stream: hipStream_t,
5626 count: ::std::os::raw::c_uint,
5627 paramArray: *mut hipStreamBatchMemOpParams,
5628 flags: ::std::os::raw::c_uint,
5629 ) -> hipError_t;
5630}
5631extern "C" {
5632 #[doc = " @brief Creates a batch memory operation node and adds it to a graph.[BETA]\n\n @param [out] 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"]
5633 pub fn hipGraphAddBatchMemOpNode(
5634 phGraphNode: *mut hipGraphNode_t,
5635 hGraph: hipGraph_t,
5636 dependencies: *const hipGraphNode_t,
5637 numDependencies: usize,
5638 nodeParams: *const hipBatchMemOpNodeParams,
5639 ) -> hipError_t;
5640}
5641extern "C" {
5642 #[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"]
5643 pub fn hipGraphBatchMemOpNodeGetParams(
5644 hNode: hipGraphNode_t,
5645 nodeParams_out: *mut hipBatchMemOpNodeParams,
5646 ) -> hipError_t;
5647}
5648extern "C" {
5649 #[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"]
5650 pub fn hipGraphBatchMemOpNodeSetParams(
5651 hNode: hipGraphNode_t,
5652 nodeParams: *mut hipBatchMemOpNodeParams,
5653 ) -> hipError_t;
5654}
5655extern "C" {
5656 #[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"]
5657 pub fn hipGraphExecBatchMemOpNodeSetParams(
5658 hGraphExec: hipGraphExec_t,
5659 hNode: hipGraphNode_t,
5660 nodeParams: *const hipBatchMemOpNodeParams,
5661 ) -> hipError_t;
5662}
5663extern "C" {
5664 #[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[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"]
5665 pub fn hipEventCreateWithFlags(
5666 event: *mut hipEvent_t,
5667 flags: ::std::os::raw::c_uint,
5668 ) -> hipError_t;
5669}
5670extern "C" {
5671 #[doc = " Create an event\n\n @param[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"]
5672 pub fn hipEventCreate(event: *mut hipEvent_t) -> hipError_t;
5673}
5674extern "C" {
5675 #[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"]
5676 pub fn hipEventRecordWithFlags(
5677 event: hipEvent_t,
5678 stream: hipStream_t,
5679 flags: ::std::os::raw::c_uint,
5680 ) -> hipError_t;
5681}
5682extern "C" {
5683 pub fn hipEventRecord(event: hipEvent_t, stream: hipStream_t) -> hipError_t;
5684}
5685extern "C" {
5686 #[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"]
5687 pub fn hipEventDestroy(event: hipEvent_t) -> hipError_t;
5688}
5689extern "C" {
5690 #[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"]
5691 pub fn hipEventSynchronize(event: hipEvent_t) -> hipError_t;
5692}
5693extern "C" {
5694 #[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"]
5695 pub fn hipEventElapsedTime(ms: *mut f32, start: hipEvent_t, stop: hipEvent_t) -> hipError_t;
5696}
5697extern "C" {
5698 #[doc = " @brief Query event status\n\n @param[in] event Event to query.\n @returns #hipSuccess, #hipErrorNotReady, #hipErrorInvalidHandle, #hipErrorInvalidValue,\n #hipErrorNotInitialized, #hipErrorLaunchFailure\n\n Query the status of the specified event. This function will return #hipSuccess if all\n commands in the appropriate stream (specified to hipEventRecord()) have completed. If any\n execution has not completed, then #hipErrorNotReady is returned.\n\n @note This API returns #hipSuccess, if hipEventRecord() is not called before this API.\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventRecord, hipEventDestroy,\n hipEventSynchronize, hipEventElapsedTime"]
5699 pub fn hipEventQuery(event: hipEvent_t) -> hipError_t;
5700}
5701extern "C" {
5702 #[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"]
5703 pub fn hipPointerSetAttribute(
5704 value: *const ::std::os::raw::c_void,
5705 attribute: hipPointer_attribute,
5706 ptr: hipDeviceptr_t,
5707 ) -> hipError_t;
5708}
5709extern "C" {
5710 #[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"]
5711 pub fn hipPointerGetAttributes(
5712 attributes: *mut hipPointerAttribute_t,
5713 ptr: *const ::std::os::raw::c_void,
5714 ) -> hipError_t;
5715}
5716extern "C" {
5717 #[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"]
5718 pub fn hipPointerGetAttribute(
5719 data: *mut ::std::os::raw::c_void,
5720 attribute: hipPointer_attribute,
5721 ptr: hipDeviceptr_t,
5722 ) -> hipError_t;
5723}
5724extern "C" {
5725 #[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"]
5726 pub fn hipDrvPointerGetAttributes(
5727 numAttributes: ::std::os::raw::c_uint,
5728 attributes: *mut hipPointer_attribute,
5729 data: *mut *mut ::std::os::raw::c_void,
5730 ptr: hipDeviceptr_t,
5731 ) -> hipError_t;
5732}
5733extern "C" {
5734 #[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"]
5735 pub fn hipImportExternalSemaphore(
5736 extSem_out: *mut hipExternalSemaphore_t,
5737 semHandleDesc: *const hipExternalSemaphoreHandleDesc,
5738 ) -> hipError_t;
5739}
5740extern "C" {
5741 #[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"]
5742 pub fn hipSignalExternalSemaphoresAsync(
5743 extSemArray: *const hipExternalSemaphore_t,
5744 paramsArray: *const hipExternalSemaphoreSignalParams,
5745 numExtSems: ::std::os::raw::c_uint,
5746 stream: hipStream_t,
5747 ) -> hipError_t;
5748}
5749extern "C" {
5750 #[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"]
5751 pub fn hipWaitExternalSemaphoresAsync(
5752 extSemArray: *const hipExternalSemaphore_t,
5753 paramsArray: *const hipExternalSemaphoreWaitParams,
5754 numExtSems: ::std::os::raw::c_uint,
5755 stream: hipStream_t,
5756 ) -> hipError_t;
5757}
5758extern "C" {
5759 #[doc = " @brief Destroys an external semaphore object and releases any references to the underlying\n resource. Any outstanding signals or waits must have completed before the semaphore is destroyed.\n\n @param[in] extSem handle to an external memory object\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see\n\n @note This API is currently not supported on Linux.\n"]
5760 pub fn hipDestroyExternalSemaphore(extSem: hipExternalSemaphore_t) -> hipError_t;
5761}
5762extern "C" {
5763 #[doc = " @brief Imports an external memory object.\n\n @param[out] extMem_out Returned handle to an external memory object\n @param[in] memHandleDesc Memory import handle descriptor\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see\n"]
5764 pub fn hipImportExternalMemory(
5765 extMem_out: *mut hipExternalMemory_t,
5766 memHandleDesc: *const hipExternalMemoryHandleDesc,
5767 ) -> hipError_t;
5768}
5769extern "C" {
5770 #[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"]
5771 pub fn hipExternalMemoryGetMappedBuffer(
5772 devPtr: *mut *mut ::std::os::raw::c_void,
5773 extMem: hipExternalMemory_t,
5774 bufferDesc: *const hipExternalMemoryBufferDesc,
5775 ) -> hipError_t;
5776}
5777extern "C" {
5778 #[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"]
5779 pub fn hipDestroyExternalMemory(extMem: hipExternalMemory_t) -> hipError_t;
5780}
5781extern "C" {
5782 #[doc = " @brief Maps a mipmapped array onto an external memory object.\n\n @param[out] mipmap mipmapped array to return\n @param[in] extMem external memory object handle\n @param[in] mipmapDesc external mipmapped array descriptor\n\n Returned mipmapped array must be freed using hipFreeMipmappedArray.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidResourceHandle\n\n @see hipImportExternalMemory, hipDestroyExternalMemory, hipExternalMemoryGetMappedBuffer,\n hipFreeMipmappedArray"]
5783 pub fn hipExternalMemoryGetMappedMipmappedArray(
5784 mipmap: *mut hipMipmappedArray_t,
5785 extMem: hipExternalMemory_t,
5786 mipmapDesc: *const hipExternalMemoryMipmappedArrayDesc,
5787 ) -> hipError_t;
5788}
5789extern "C" {
5790 #[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"]
5791 pub fn hipMalloc(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
5792}
5793extern "C" {
5794 #[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"]
5795 pub fn hipExtMallocWithFlags(
5796 ptr: *mut *mut ::std::os::raw::c_void,
5797 sizeBytes: usize,
5798 flags: ::std::os::raw::c_uint,
5799 ) -> hipError_t;
5800}
5801extern "C" {
5802 #[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"]
5803 pub fn hipMallocHost(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
5804}
5805extern "C" {
5806 #[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"]
5807 pub fn hipMemAllocHost(ptr: *mut *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
5808}
5809extern "C" {
5810 #[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"]
5811 pub fn hipHostMalloc(
5812 ptr: *mut *mut ::std::os::raw::c_void,
5813 size: usize,
5814 flags: ::std::os::raw::c_uint,
5815 ) -> hipError_t;
5816}
5817extern "C" {
5818 #[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"]
5819 pub fn hipMallocManaged(
5820 dev_ptr: *mut *mut ::std::os::raw::c_void,
5821 size: usize,
5822 flags: ::std::os::raw::c_uint,
5823 ) -> hipError_t;
5824}
5825extern "C" {
5826 #[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."]
5827 pub fn hipMemPrefetchAsync(
5828 dev_ptr: *const ::std::os::raw::c_void,
5829 count: usize,
5830 device: ::std::os::raw::c_int,
5831 stream: hipStream_t,
5832 ) -> hipError_t;
5833}
5834extern "C" {
5835 #[doc = " @brief Prefetches memory to the specified destination device using HIP.\n\n @param [in] dev_ptr pointer to be prefetched\n @param [in] count size in bytes for prefetching\n @param [in] location destination location to prefetch to\n @param [in] flags flags for future use, must be zero now.\n @param [in] stream stream to enqueue prefetch operation\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5836 pub fn hipMemPrefetchAsync_v2(
5837 dev_ptr: *const ::std::os::raw::c_void,
5838 count: usize,
5839 location: hipMemLocation,
5840 flags: ::std::os::raw::c_uint,
5841 stream: hipStream_t,
5842 ) -> hipError_t;
5843}
5844extern "C" {
5845 #[doc = " @brief Prefetches a batch of memory ranges to the specified locations using HIP.\n\n @param [in] dev_ptrs pointers to the memory ranges to prefetch\n @param [in] sizes sizes in bytes of the memory ranges to prefetch\n @param [in] count number of memory ranges to prefetch\n @param [in] prefetch_locs locations to prefetch the memory ranges to\n @param [in] prefetch_loc_idxs indices of the memory ranges to prefetch\n @param [in] num_prefetch_locs number of locations to prefetch\n @param [in] flags flags for future use, must be zero now.\n @param [in] stream stream to enqueue the prefetch operation\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5846 pub fn hipMemPrefetchBatchAsync(
5847 dev_ptrs: *mut *mut ::std::os::raw::c_void,
5848 sizes: *mut usize,
5849 count: usize,
5850 prefetch_locs: *mut hipMemLocation,
5851 prefetch_loc_idxs: *mut usize,
5852 num_prefetch_locs: usize,
5853 flags: ::std::os::raw::c_ulonglong,
5854 stream: hipStream_t,
5855 ) -> hipError_t;
5856}
5857extern "C" {
5858 #[doc = " @brief Discards a batch of memory ranges asynchronously.\n\n @param [in] dev_ptrs pointers to the memory ranges to discard\n @param [in] sizes sizes in bytes of the memory ranges to discard\n @param [in] count number of memory ranges to discard\n @param [in] flags flags for future use, must be zero now.\n @param [in] stream stream to enqueue the discard operation\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning Reading from a discarded range without first writing or prefetching\n to it will return an indeterminate value.\n @warning Concurrent reads, writes, or prefetches to discarded ranges result\n in undefined behavior.\n\n @note All memory ranges must be managed memory allocated via hipMallocManaged\n or system-allocated memory (if device supports pageable memory access).\n @note This API is implemented on Linux and requires XNACK to be enabled.\n @note 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 hipMemPrefetchBatchAsync, hipMallocManaged"]
5859 pub fn hipMemDiscardBatchAsync(
5860 dev_ptrs: *mut *mut ::std::os::raw::c_void,
5861 sizes: *mut usize,
5862 count: usize,
5863 flags: ::std::os::raw::c_ulonglong,
5864 stream: hipStream_t,
5865 ) -> hipError_t;
5866}
5867extern "C" {
5868 #[doc = " @brief Discards a batch of memory ranges asynchronously (driver API variant).\n\n @param [in] dptrs pointers to the memory ranges to discard\n @param [in] sizes sizes in bytes of the memory ranges to discard\n @param [in] count number of memory ranges to discard\n @param [in] flags flags for future use, must be zero now.\n @param [in] stream stream to enqueue the discard operation\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @warning Reading from a discarded range without first writing or prefetching\n to it will return an indeterminate value.\n\n @note This is the driver API variant that uses hipDeviceptr_t instead of void*.\n Both hipMemDiscardBatchAsync and hipDrvMemDiscardBatchAsync use the same\n internal implementation.\n\n @see hipMemDiscardBatchAsync, hipMemPrefetchBatchAsync, hipMallocManaged"]
5869 pub fn hipDrvMemDiscardBatchAsync(
5870 dptrs: *mut hipDeviceptr_t,
5871 sizes: *mut usize,
5872 count: usize,
5873 flags: ::std::os::raw::c_ulonglong,
5874 stream: hipStream_t,
5875 ) -> hipError_t;
5876}
5877extern "C" {
5878 #[doc = " @brief Discards and prefetches a batch of memory ranges asynchronously.\n\n @param [in] dptrs pointers to the memory ranges\n @param [in] sizes sizes in bytes of the memory ranges\n @param [in] count number of memory ranges\n @param [in] prefetchLocs array of target locations for prefetching\n @param [in] prefetchLocIdxs indices mapping each range to a prefetch location\n @param [in] numPrefetchLocs number of unique prefetch locations\n @param [in] flags flags for future use, must be zero now.\n @param [in] stream stream to enqueue the operation\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n Semantically equivalent to calling @p hipMemDiscardBatchAsync followed by\n @p hipMemPrefetchBatchAsync, but combines both operations into a single\n command submission for reduced overhead.\n\n @warning Reading from a discarded range without first writing or prefetching\n to it will return an indeterminate value.\n\n @note All memory ranges must be managed memory allocated via hipMallocManaged\n or system-allocated memory (if device supports pageable memory access).\n @note This API is implemented on Linux and requires XNACK to be enabled.\n @note 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 hipMemDiscardBatchAsync, hipMemPrefetchBatchAsync, hipMallocManaged"]
5879 pub fn hipMemDiscardAndPrefetchBatchAsync(
5880 dptrs: *mut *mut ::std::os::raw::c_void,
5881 sizes: *mut usize,
5882 count: usize,
5883 prefetchLocs: *mut hipMemLocation,
5884 prefetchLocIdxs: *mut usize,
5885 numPrefetchLocs: usize,
5886 flags: ::std::os::raw::c_ulonglong,
5887 stream: hipStream_t,
5888 ) -> hipError_t;
5889}
5890extern "C" {
5891 #[doc = " @brief Discards and prefetches a batch of memory ranges asynchronously (driver API variant).\n\n @param [in] dptrs pointers to the memory ranges\n @param [in] sizes sizes in bytes of the memory ranges\n @param [in] count number of memory ranges\n @param [in] prefetchLocs array of target locations for prefetching\n @param [in] prefetchLocIdxs indices mapping each range to a prefetch location\n @param [in] numPrefetchLocs number of unique prefetch locations\n @param [in] flags flags for future use, must be zero now.\n @param [in] stream stream to enqueue the operation\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @note This is the driver API variant that uses hipDeviceptr_t instead of void*.\n\n @see hipMemDiscardAndPrefetchBatchAsync, hipMemDiscardBatchAsync, hipMemPrefetchBatchAsync"]
5892 pub fn hipDrvMemDiscardAndPrefetchBatchAsync(
5893 dptrs: *mut hipDeviceptr_t,
5894 sizes: *mut usize,
5895 count: usize,
5896 prefetchLocs: *mut hipMemLocation,
5897 prefetchLocIdxs: *mut usize,
5898 numPrefetchLocs: usize,
5899 flags: ::std::os::raw::c_ulonglong,
5900 stream: hipStream_t,
5901 ) -> hipError_t;
5902}
5903extern "C" {
5904 #[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."]
5905 pub fn hipMemAdvise(
5906 dev_ptr: *const ::std::os::raw::c_void,
5907 count: usize,
5908 advice: hipMemoryAdvise,
5909 device: ::std::os::raw::c_int,
5910 ) -> hipError_t;
5911}
5912extern "C" {
5913 #[doc = " @brief Advise about the usage of a given memory range to HIP.\n\n @param [in] dev_ptr pointer to memory to set the advice for\n @param [in] count size in bytes of the memory range, it should be CPU page size alligned.\n @param [in] advice advice to be applied for the specified memory range\n @param [in] location location to apply the advice for\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n This HIP API advises about the usage to be applied on unified memory allocation in the\n range starting from the pointer address devPtr, with the size of count bytes.\n The memory range must refer to managed memory allocated via the API hipMallocManaged, and the\n range will be handled with proper round down and round up respectively in the driver to\n be aligned to CPU page size, the same way as corresponding CUDA API behaves in CUDA version 8.0\n and afterwards.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5914 pub fn hipMemAdvise_v2(
5915 dev_ptr: *const ::std::os::raw::c_void,
5916 count: usize,
5917 advice: hipMemoryAdvise,
5918 location: hipMemLocation,
5919 ) -> hipError_t;
5920}
5921extern "C" {
5922 #[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."]
5923 pub fn hipMemRangeGetAttribute(
5924 data: *mut ::std::os::raw::c_void,
5925 data_size: usize,
5926 attribute: hipMemRangeAttribute,
5927 dev_ptr: *const ::std::os::raw::c_void,
5928 count: usize,
5929 ) -> hipError_t;
5930}
5931extern "C" {
5932 #[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."]
5933 pub fn hipMemRangeGetAttributes(
5934 data: *mut *mut ::std::os::raw::c_void,
5935 data_sizes: *mut usize,
5936 attributes: *mut hipMemRangeAttribute,
5937 num_attributes: usize,
5938 dev_ptr: *const ::std::os::raw::c_void,
5939 count: usize,
5940 ) -> hipError_t;
5941}
5942extern "C" {
5943 #[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."]
5944 pub fn hipStreamAttachMemAsync(
5945 stream: hipStream_t,
5946 dev_ptr: *mut ::std::os::raw::c_void,
5947 length: usize,
5948 flags: ::std::os::raw::c_uint,
5949 ) -> hipError_t;
5950}
5951extern "C" {
5952 #[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."]
5953 pub fn hipMallocAsync(
5954 dev_ptr: *mut *mut ::std::os::raw::c_void,
5955 size: usize,
5956 stream: hipStream_t,
5957 ) -> hipError_t;
5958}
5959extern "C" {
5960 #[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."]
5961 pub fn hipFreeAsync(dev_ptr: *mut ::std::os::raw::c_void, stream: hipStream_t) -> hipError_t;
5962}
5963extern "C" {
5964 #[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."]
5965 pub fn hipMemPoolTrimTo(mem_pool: hipMemPool_t, min_bytes_to_hold: usize) -> hipError_t;
5966}
5967extern "C" {
5968 #[doc = " @brief Sets attributes of a memory pool\n\n Supported attributes are:\n - @p hipMemPoolAttrReleaseThreshold: (value type = cuuint64_t)\n Amount of reserved memory in bytes to hold onto before trying\n to release memory back to the OS. When more than the release\n threshold bytes of memory are held by the memory pool, the\n allocator will try to release memory back to the OS on the\n next call to stream, event or context synchronize. (default 0)\n - @p hipMemPoolReuseFollowEventDependencies: (value type = int)\n Allow @p hipMallocAsync to use memory asynchronously freed\n in another stream as long as a stream ordering dependency\n of the allocating stream on the free action exists.\n HIP events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)\n - @p hipMemPoolReuseAllowOpportunistic: (value type = int)\n Allow reuse of already completed frees when there is no\n dependency between the free and allocation. (default enabled)\n - @p hipMemPoolReuseAllowInternalDependencies: (value type = int)\n Allow @p hipMallocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by @p hipFreeAsync (default enabled).\n\n @param [in] mem_pool The memory pool to modify\n @param [in] attr The attribute to modify\n @param [in] value Pointer to the value to assign\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5969 pub fn hipMemPoolSetAttribute(
5970 mem_pool: hipMemPool_t,
5971 attr: hipMemPoolAttr,
5972 value: *mut ::std::os::raw::c_void,
5973 ) -> hipError_t;
5974}
5975extern "C" {
5976 #[doc = " @brief Gets attributes of a memory pool\n\n Supported attributes are:\n - @p hipMemPoolAttrReleaseThreshold: (value type = cuuint64_t)\n Amount of reserved memory in bytes to hold onto before trying\n to release memory back to the OS. When more than the release\n threshold bytes of memory are held by the memory pool, the\n allocator will try to release memory back to the OS on the\n next call to stream, event or context synchronize. (default 0)\n - @p hipMemPoolReuseFollowEventDependencies: (value type = int)\n Allow @p hipMallocAsync to use memory asynchronously freed\n in another stream as long as a stream ordering dependency\n of the allocating stream on the free action exists.\n HIP events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)\n - @p hipMemPoolReuseAllowOpportunistic: (value type = int)\n Allow reuse of already completed frees when there is no\n dependency between the free and allocation. (default enabled)\n - @p hipMemPoolReuseAllowInternalDependencies: (value type = int)\n Allow @p hipMallocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by @p hipFreeAsync (default enabled).\n\n @param [in] mem_pool The memory pool to get attributes of\n @param [in] attr The attribute to get\n @param [in] value Retrieved value\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess,\n hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5977 pub fn hipMemPoolGetAttribute(
5978 mem_pool: hipMemPool_t,
5979 attr: hipMemPoolAttr,
5980 value: *mut ::std::os::raw::c_void,
5981 ) -> hipError_t;
5982}
5983extern "C" {
5984 #[doc = " @brief Controls visibility of the specified pool between devices\n\n @param [in] mem_pool Memory pool for acccess change\n @param [in] desc_list Array of access descriptors. Each descriptor instructs the access to\n enable for a single gpu\n @param [in] count Number of descriptors in the map array.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
5985 pub fn hipMemPoolSetAccess(
5986 mem_pool: hipMemPool_t,
5987 desc_list: *const hipMemAccessDesc,
5988 count: usize,
5989 ) -> hipError_t;
5990}
5991extern "C" {
5992 #[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."]
5993 pub fn hipMemPoolGetAccess(
5994 flags: *mut hipMemAccessFlags,
5995 mem_pool: hipMemPool_t,
5996 location: *mut hipMemLocation,
5997 ) -> hipError_t;
5998}
5999extern "C" {
6000 #[doc = " @brief Creates a memory pool\n\n Creates a HIP memory pool and returns the handle in @p mem_pool. The @p pool_props determines\n the properties of the pool such as the backing device and IPC capabilities.\n\n By default, the memory pool will be accessible from the device it is allocated on.\n\n @param [out] mem_pool Contains createed memory pool\n @param [in] pool_props Memory pool properties\n\n @note Specifying hipMemHandleTypeNone creates a memory pool that will not support IPC.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolDestroy, hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute,\n hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
6001 pub fn hipMemPoolCreate(
6002 mem_pool: *mut hipMemPool_t,
6003 pool_props: *const hipMemPoolProps,
6004 ) -> hipError_t;
6005}
6006extern "C" {
6007 #[doc = " @brief Destroys the specified memory pool\n\n If any pointers obtained from this pool haven't been freed or\n the pool has free operations that haven't completed\n when @p hipMemPoolDestroy is invoked, the function will return immediately and the\n resources associated with the pool will be released automatically\n once there are no more outstanding allocations.\n\n Destroying the current mempool of a device sets the default mempool of\n that device as the current mempool for that device.\n\n @param [in] mem_pool Memory pool for destruction\n\n @note A device's default memory pool cannot be destroyed.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolCreate hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute,\n hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
6008 pub fn hipMemPoolDestroy(mem_pool: hipMemPool_t) -> hipError_t;
6009}
6010extern "C" {
6011 #[doc = " @brief Allocates memory from a specified pool with stream ordered semantics.\n\n Inserts an allocation operation into @p stream.\n A pointer to the allocated memory is returned immediately in @p dev_ptr.\n The allocation must not be accessed until the allocation operation completes.\n The allocation comes from the specified memory pool.\n\n @note The specified memory pool may be from a device different than that of the specified @p\n stream.\n\n Basic stream ordering allows future work submitted into the same stream to use the allocation.\n Stream query, stream synchronize, and HIP events can be used to guarantee that the allocation\n operation completes before work submitted in a separate stream runs.\n\n @note During stream capture, this function results in the creation of an allocation node. In this\n case, the allocation is owned by the graph instead of the memory pool. The memory pool's\n properties are used to set the node's creation parameters.\n\n @param [out] dev_ptr Returned device pointer\n @param [in] size Number of bytes to allocate\n @param [in] mem_pool The pool to allocate from\n @param [in] stream The stream establishing the stream ordering semantic\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported, #hipErrorOutOfMemory\n\n @see hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolCreate\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess,\n hipMemPoolGetAccess,\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
6012 pub fn hipMallocFromPoolAsync(
6013 dev_ptr: *mut *mut ::std::os::raw::c_void,
6014 size: usize,
6015 mem_pool: hipMemPool_t,
6016 stream: hipStream_t,
6017 ) -> hipError_t;
6018}
6019extern "C" {
6020 #[doc = " @brief Exports a memory pool to the requested handle type.\n\n Given an IPC capable mempool, create an OS handle to share the pool with another process.\n A recipient process can convert the shareable handle into a mempool with @p\n hipMemPoolImportFromShareableHandle. Individual pointers can then be shared with the @p\n hipMemPoolExportPointer and @p hipMemPoolImportPointer APIs. The implementation of what the\n shareable handle is and how it can be transferred is defined by the requested handle type.\n\n @note To create an IPC capable mempool, create a mempool with a @p hipMemAllocationHandleType\n other than @p hipMemHandleTypeNone.\n\n @param [out] shared_handle Pointer to the location in which to store the requested handle\n @param [in] mem_pool Pool to export\n @param [in] handle_type The type of handle to create\n @param [in] flags Must be 0\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorOutOfMemory\n\n @see hipMemPoolImportFromShareableHandle\n\n @warning This API is marked as Beta. While this feature is complete, it can\n change and might have outstanding issues.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
6021 pub fn hipMemPoolExportToShareableHandle(
6022 shared_handle: *mut ::std::os::raw::c_void,
6023 mem_pool: hipMemPool_t,
6024 handle_type: hipMemAllocationHandleType,
6025 flags: ::std::os::raw::c_uint,
6026 ) -> hipError_t;
6027}
6028extern "C" {
6029 #[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."]
6030 pub fn hipMemPoolImportFromShareableHandle(
6031 mem_pool: *mut hipMemPool_t,
6032 shared_handle: *mut ::std::os::raw::c_void,
6033 handle_type: hipMemAllocationHandleType,
6034 flags: ::std::os::raw::c_uint,
6035 ) -> hipError_t;
6036}
6037extern "C" {
6038 #[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."]
6039 pub fn hipMemPoolExportPointer(
6040 export_data: *mut hipMemPoolPtrExportData,
6041 dev_ptr: *mut ::std::os::raw::c_void,
6042 ) -> hipError_t;
6043}
6044extern "C" {
6045 #[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."]
6046 pub fn hipMemPoolImportPointer(
6047 dev_ptr: *mut *mut ::std::os::raw::c_void,
6048 mem_pool: hipMemPool_t,
6049 export_data: *mut hipMemPoolPtrExportData,
6050 ) -> hipError_t;
6051}
6052extern "C" {
6053 #[doc = " @brief Sets memory pool for memory location and allocation type.\n\n"]
6054 pub fn hipMemSetMemPool(
6055 location: *mut hipMemLocation,
6056 type_: hipMemAllocationType,
6057 pool: hipMemPool_t,
6058 ) -> hipError_t;
6059}
6060extern "C" {
6061 #[doc = " @brief Retrieves memory pool for memory location and allocation type.\n\n"]
6062 pub fn hipMemGetMemPool(
6063 pool: *mut hipMemPool_t,
6064 location: *mut hipMemLocation,
6065 type_: hipMemAllocationType,
6066 ) -> hipError_t;
6067}
6068extern "C" {
6069 #[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"]
6070 pub fn hipHostAlloc(
6071 ptr: *mut *mut ::std::os::raw::c_void,
6072 size: usize,
6073 flags: ::std::os::raw::c_uint,
6074 ) -> hipError_t;
6075}
6076extern "C" {
6077 #[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"]
6078 pub fn hipHostGetDevicePointer(
6079 devPtr: *mut *mut ::std::os::raw::c_void,
6080 hstPtr: *mut ::std::os::raw::c_void,
6081 flags: ::std::os::raw::c_uint,
6082 ) -> hipError_t;
6083}
6084extern "C" {
6085 #[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"]
6086 pub fn hipHostGetFlags(
6087 flagsPtr: *mut ::std::os::raw::c_uint,
6088 hostPtr: *mut ::std::os::raw::c_void,
6089 ) -> hipError_t;
6090}
6091extern "C" {
6092 #[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"]
6093 pub fn hipHostRegister(
6094 hostPtr: *mut ::std::os::raw::c_void,
6095 sizeBytes: usize,
6096 flags: ::std::os::raw::c_uint,
6097 ) -> hipError_t;
6098}
6099extern "C" {
6100 #[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"]
6101 pub fn hipHostUnregister(hostPtr: *mut ::std::os::raw::c_void) -> hipError_t;
6102}
6103extern "C" {
6104 #[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"]
6105 pub fn hipMallocPitch(
6106 ptr: *mut *mut ::std::os::raw::c_void,
6107 pitch: *mut usize,
6108 width: usize,
6109 height: usize,
6110 ) -> hipError_t;
6111}
6112extern "C" {
6113 #[doc = " Allocates at least width (in bytes) * height bytes of linear memory\n Padding may occur to ensure alighnment requirements are met for the given row\n The change in width size due to padding will be returned in *pitch.\n Currently the alignment is set to 128 bytes\n\n @param[out] dptr Pointer to the allocated device memory\n @param[out] pitch Pitch for allocation (in bytes)\n @param[in] widthInBytes Requested pitched allocation width (in bytes)\n @param[in] height Requested pitched allocation height\n @param[in] elementSizeBytes The size of element bytes, should be 4, 8 or 16\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n The intended usage of pitch is as a separate parameter of the allocation, used to compute\n addresses within the 2D array. Given the row and column of an array element of type T, the\n address is computed as: T* pElement = (T*)((char*)BaseAddress + Row * Pitch) + Column;\n\n @returns Error code\n\n @see hipMalloc, hipFree, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc"]
6114 pub fn hipMemAllocPitch(
6115 dptr: *mut hipDeviceptr_t,
6116 pitch: *mut usize,
6117 widthInBytes: usize,
6118 height: usize,
6119 elementSizeBytes: ::std::os::raw::c_uint,
6120 ) -> hipError_t;
6121}
6122extern "C" {
6123 #[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"]
6124 pub fn hipFree(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
6125}
6126extern "C" {
6127 #[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"]
6128 pub fn hipFreeHost(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
6129}
6130extern "C" {
6131 #[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"]
6132 pub fn hipHostFree(ptr: *mut ::std::os::raw::c_void) -> hipError_t;
6133}
6134extern "C" {
6135 #[doc = " @brief Copy data from src to dst.\n\n It supports memory from host to device,\n device to host, device to device and host to host\n The src and dst must not overlap.\n\n For hipMemcpy, the copy is always performed by the current device (set by hipSetDevice).\n For multi-gpu or peer-to-peer configurations, it is recommended to set the current device to the\n device where the src data is physically located. For optimal peer-to-peer copies, the copy\n device must be able to access the src and dst pointers (by calling hipDeviceEnablePeerAccess with\n copy agent as the current device and src/dst as the peerDevice argument. if this is not done,\n the hipMemcpy will still work, but will perform the copy using a staging buffer on the host.\n Calling hipMemcpy with dst and src pointers that do not match the hipMemcpyKind results in\n undefined behavior.\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] kind Kind of transfer\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown\n\n @see hipArrayCreate, hipArrayDestroy, hipArrayGetDescriptor, hipMemAlloc, hipMemAllocHost,\n hipMemAllocPitch, hipMemcpy2D, hipMemcpy2DAsync, hipMemcpy2DUnaligned, hipMemcpyAtoA,\n hipMemcpyAtoD, hipMemcpyAtoH, hipMemcpyAtoHAsync, hipMemcpyDtoA, hipMemcpyDtoD,\n hipMemcpyDtoDAsync, hipMemcpyDtoH, hipMemcpyDtoHAsync, hipMemcpyHtoA, hipMemcpyHtoAAsync,\n hipMemcpyHtoDAsync, hipMemFree, hipMemFreeHost, hipMemGetAddressRange, hipMemGetInfo,\n hipMemHostAlloc, hipMemHostGetDevicePointer"]
6136 pub fn hipMemcpy(
6137 dst: *mut ::std::os::raw::c_void,
6138 src: *const ::std::os::raw::c_void,
6139 sizeBytes: usize,
6140 kind: hipMemcpyKind,
6141 ) -> hipError_t;
6142}
6143extern "C" {
6144 #[doc = " @brief Memory copy on the stream.\n It allows single or multiple devices to do memory copy on single or multiple streams.\n The operation is akin to hipMemcpyAsync + hipStreamSynchronize.\n Since it is a sync API, it is not allowed during graph capture.\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] kind Kind of transfer\n @param[in] stream Valid stream\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorUnknown, #hipErrorContextIsDestroyed\n\n @see hipMemcpy, hipStreamCreate, hipStreamSynchronize, hipStreamDestroy, hipSetDevice,\n hipLaunchKernelGGL\n"]
6145 pub fn hipMemcpyWithStream(
6146 dst: *mut ::std::os::raw::c_void,
6147 src: *const ::std::os::raw::c_void,
6148 sizeBytes: usize,
6149 kind: hipMemcpyKind,
6150 stream: hipStream_t,
6151 ) -> hipError_t;
6152}
6153extern "C" {
6154 #[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"]
6155 pub fn hipMemcpyHtoD(
6156 dst: hipDeviceptr_t,
6157 src: *const ::std::os::raw::c_void,
6158 sizeBytes: usize,
6159 ) -> hipError_t;
6160}
6161extern "C" {
6162 #[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"]
6163 pub fn hipMemcpyDtoH(
6164 dst: *mut ::std::os::raw::c_void,
6165 src: hipDeviceptr_t,
6166 sizeBytes: usize,
6167 ) -> hipError_t;
6168}
6169extern "C" {
6170 #[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"]
6171 pub fn hipMemcpyDtoD(dst: hipDeviceptr_t, src: hipDeviceptr_t, sizeBytes: usize) -> hipError_t;
6172}
6173extern "C" {
6174 #[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"]
6175 pub fn hipMemcpyAtoD(
6176 dstDevice: hipDeviceptr_t,
6177 srcArray: hipArray_t,
6178 srcOffset: usize,
6179 ByteCount: usize,
6180 ) -> hipError_t;
6181}
6182extern "C" {
6183 #[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"]
6184 pub fn hipMemcpyDtoA(
6185 dstArray: hipArray_t,
6186 dstOffset: usize,
6187 srcDevice: hipDeviceptr_t,
6188 ByteCount: usize,
6189 ) -> hipError_t;
6190}
6191extern "C" {
6192 #[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"]
6193 pub fn hipMemcpyAtoA(
6194 dstArray: hipArray_t,
6195 dstOffset: usize,
6196 srcArray: hipArray_t,
6197 srcOffset: usize,
6198 ByteCount: usize,
6199 ) -> hipError_t;
6200}
6201extern "C" {
6202 #[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"]
6203 pub fn hipMemcpyHtoDAsync(
6204 dst: hipDeviceptr_t,
6205 src: *const ::std::os::raw::c_void,
6206 sizeBytes: usize,
6207 stream: hipStream_t,
6208 ) -> hipError_t;
6209}
6210extern "C" {
6211 #[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"]
6212 pub fn hipMemcpyDtoHAsync(
6213 dst: *mut ::std::os::raw::c_void,
6214 src: hipDeviceptr_t,
6215 sizeBytes: usize,
6216 stream: hipStream_t,
6217 ) -> hipError_t;
6218}
6219extern "C" {
6220 #[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"]
6221 pub fn hipMemcpyDtoDAsync(
6222 dst: hipDeviceptr_t,
6223 src: hipDeviceptr_t,
6224 sizeBytes: usize,
6225 stream: hipStream_t,
6226 ) -> hipError_t;
6227}
6228extern "C" {
6229 #[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"]
6230 pub fn hipMemcpyAtoHAsync(
6231 dstHost: *mut ::std::os::raw::c_void,
6232 srcArray: hipArray_t,
6233 srcOffset: usize,
6234 ByteCount: usize,
6235 stream: hipStream_t,
6236 ) -> hipError_t;
6237}
6238extern "C" {
6239 #[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"]
6240 pub fn hipMemcpyHtoAAsync(
6241 dstArray: hipArray_t,
6242 dstOffset: usize,
6243 srcHost: *const ::std::os::raw::c_void,
6244 ByteCount: usize,
6245 stream: hipStream_t,
6246 ) -> hipError_t;
6247}
6248extern "C" {
6249 #[doc = " @brief Returns a global pointer from a module.\n @ingroup Module\n\n Returns in *dptr and *bytes the pointer and size of the global of name name located in module\n hmod. If no variable of that name exists, it returns hipErrorNotFound. Both parameters dptr and\n bytes are optional. If one of them is NULL, it is ignored and hipSuccess is returned.\n\n @param[out] dptr Returns global device pointer\n @param[out] bytes Returns global size in bytes\n @param[in] hmod Module to retrieve global from\n @param[in] name Name of global to retrieve\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotFound, #hipErrorInvalidContext\n"]
6250 pub fn hipModuleGetGlobal(
6251 dptr: *mut hipDeviceptr_t,
6252 bytes: *mut usize,
6253 hmod: hipModule_t,
6254 name: *const ::std::os::raw::c_char,
6255 ) -> hipError_t;
6256}
6257extern "C" {
6258 #[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"]
6259 pub fn hipGetSymbolAddress(
6260 devPtr: *mut *mut ::std::os::raw::c_void,
6261 symbol: *const ::std::os::raw::c_void,
6262 ) -> hipError_t;
6263}
6264extern "C" {
6265 #[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"]
6266 pub fn hipGetSymbolSize(size: *mut usize, symbol: *const ::std::os::raw::c_void) -> hipError_t;
6267}
6268extern "C" {
6269 #[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."]
6270 pub fn hipGetProcAddress(
6271 symbol: *const ::std::os::raw::c_char,
6272 pfn: *mut *mut ::std::os::raw::c_void,
6273 hipVersion: ::std::os::raw::c_int,
6274 flags: u64,
6275 symbolStatus: *mut hipDriverProcAddressQueryResult,
6276 ) -> hipError_t;
6277}
6278extern "C" {
6279 #[doc = " @brief Copies data to the given symbol on the device.\n Symbol HIP APIs allow a kernel to define a device-side data symbol which can be accessed on\n the host side. The symbol can be in __constant or device space.\n Note that the symbol name needs to be encased in the HIP_SYMBOL macro.\n This also applies to hipMemcpyFromSymbol, hipGetSymbolAddress, and hipGetSymbolSize.\n For detailed usage, see the\n <a\n href=\"https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/hip_porting_guide.html#memcpytosymbol\">memcpyToSymbol\n example</a> in the HIP Porting Guide.\n\n\n @param[out] symbol pointer to the device symbole\n @param[in] src pointer to the source address\n @param[in] sizeBytes size in bytes to copy\n @param[in] offset offset in bytes from start of symbole\n @param[in] kind type of memory transfer\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
6280 pub fn hipMemcpyToSymbol(
6281 symbol: *const ::std::os::raw::c_void,
6282 src: *const ::std::os::raw::c_void,
6283 sizeBytes: usize,
6284 offset: usize,
6285 kind: hipMemcpyKind,
6286 ) -> hipError_t;
6287}
6288extern "C" {
6289 #[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"]
6290 pub fn hipMemcpyToSymbolAsync(
6291 symbol: *const ::std::os::raw::c_void,
6292 src: *const ::std::os::raw::c_void,
6293 sizeBytes: usize,
6294 offset: usize,
6295 kind: hipMemcpyKind,
6296 stream: hipStream_t,
6297 ) -> hipError_t;
6298}
6299extern "C" {
6300 #[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"]
6301 pub fn hipMemcpyFromSymbol(
6302 dst: *mut ::std::os::raw::c_void,
6303 symbol: *const ::std::os::raw::c_void,
6304 sizeBytes: usize,
6305 offset: usize,
6306 kind: hipMemcpyKind,
6307 ) -> hipError_t;
6308}
6309extern "C" {
6310 #[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"]
6311 pub fn hipMemcpyFromSymbolAsync(
6312 dst: *mut ::std::os::raw::c_void,
6313 symbol: *const ::std::os::raw::c_void,
6314 sizeBytes: usize,
6315 offset: usize,
6316 kind: hipMemcpyKind,
6317 stream: hipStream_t,
6318 ) -> hipError_t;
6319}
6320extern "C" {
6321 #[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"]
6322 pub fn hipMemcpyAsync(
6323 dst: *mut ::std::os::raw::c_void,
6324 src: *const ::std::os::raw::c_void,
6325 sizeBytes: usize,
6326 kind: hipMemcpyKind,
6327 stream: hipStream_t,
6328 ) -> hipError_t;
6329}
6330extern "C" {
6331 #[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"]
6332 pub fn hipMemset(
6333 dst: *mut ::std::os::raw::c_void,
6334 value: ::std::os::raw::c_int,
6335 sizeBytes: usize,
6336 ) -> hipError_t;
6337}
6338extern "C" {
6339 #[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"]
6340 pub fn hipMemsetD8(
6341 dest: hipDeviceptr_t,
6342 value: ::std::os::raw::c_uchar,
6343 count: usize,
6344 ) -> hipError_t;
6345}
6346extern "C" {
6347 #[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"]
6348 pub fn hipMemsetD8Async(
6349 dest: hipDeviceptr_t,
6350 value: ::std::os::raw::c_uchar,
6351 count: usize,
6352 stream: hipStream_t,
6353 ) -> hipError_t;
6354}
6355extern "C" {
6356 #[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"]
6357 pub fn hipMemsetD16(
6358 dest: hipDeviceptr_t,
6359 value: ::std::os::raw::c_ushort,
6360 count: usize,
6361 ) -> hipError_t;
6362}
6363extern "C" {
6364 #[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"]
6365 pub fn hipMemsetD16Async(
6366 dest: hipDeviceptr_t,
6367 value: ::std::os::raw::c_ushort,
6368 count: usize,
6369 stream: hipStream_t,
6370 ) -> hipError_t;
6371}
6372extern "C" {
6373 #[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"]
6374 pub fn hipMemsetD32(
6375 dest: hipDeviceptr_t,
6376 value: ::std::os::raw::c_int,
6377 count: usize,
6378 ) -> hipError_t;
6379}
6380extern "C" {
6381 #[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"]
6382 pub fn hipMemsetAsync(
6383 dst: *mut ::std::os::raw::c_void,
6384 value: ::std::os::raw::c_int,
6385 sizeBytes: usize,
6386 stream: hipStream_t,
6387 ) -> hipError_t;
6388}
6389extern "C" {
6390 #[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"]
6391 pub fn hipMemsetD32Async(
6392 dst: hipDeviceptr_t,
6393 value: ::std::os::raw::c_int,
6394 count: usize,
6395 stream: hipStream_t,
6396 ) -> hipError_t;
6397}
6398extern "C" {
6399 #[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"]
6400 pub fn hipMemset2D(
6401 dst: *mut ::std::os::raw::c_void,
6402 pitch: usize,
6403 value: ::std::os::raw::c_int,
6404 width: usize,
6405 height: usize,
6406 ) -> hipError_t;
6407}
6408extern "C" {
6409 #[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"]
6410 pub fn hipMemset2DAsync(
6411 dst: *mut ::std::os::raw::c_void,
6412 pitch: usize,
6413 value: ::std::os::raw::c_int,
6414 width: usize,
6415 height: usize,
6416 stream: hipStream_t,
6417 ) -> hipError_t;
6418}
6419extern "C" {
6420 #[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"]
6421 pub fn hipMemset3D(
6422 pitchedDevPtr: hipPitchedPtr,
6423 value: ::std::os::raw::c_int,
6424 extent: hipExtent,
6425 ) -> hipError_t;
6426}
6427extern "C" {
6428 #[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"]
6429 pub fn hipMemset3DAsync(
6430 pitchedDevPtr: hipPitchedPtr,
6431 value: ::std::os::raw::c_int,
6432 extent: hipExtent,
6433 stream: hipStream_t,
6434 ) -> hipError_t;
6435}
6436extern "C" {
6437 #[doc = " @brief Fills 2D memory range of 'width' 8-bit values synchronously to the specified char value.\n Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each\n row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @returns #hipSuccess, #hipErrorInvalidValue"]
6438 pub fn hipMemsetD2D8(
6439 dst: hipDeviceptr_t,
6440 dstPitch: usize,
6441 value: ::std::os::raw::c_uchar,
6442 width: usize,
6443 height: usize,
6444 ) -> hipError_t;
6445}
6446extern "C" {
6447 #[doc = " @brief Fills 2D memory range of 'width' 8-bit values asynchronously to the specified char value.\n Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each\n row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @param[in] stream Stream Identifier\n @returns #hipSuccess, #hipErrorInvalidValue"]
6448 pub fn hipMemsetD2D8Async(
6449 dst: hipDeviceptr_t,
6450 dstPitch: usize,
6451 value: ::std::os::raw::c_uchar,
6452 width: usize,
6453 height: usize,
6454 stream: hipStream_t,
6455 ) -> hipError_t;
6456}
6457extern "C" {
6458 #[doc = " @brief Fills 2D memory range of 'width' 16-bit values synchronously to the specified short\n value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes\n between each row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @returns #hipSuccess, #hipErrorInvalidValue"]
6459 pub fn hipMemsetD2D16(
6460 dst: hipDeviceptr_t,
6461 dstPitch: usize,
6462 value: ::std::os::raw::c_ushort,
6463 width: usize,
6464 height: usize,
6465 ) -> hipError_t;
6466}
6467extern "C" {
6468 #[doc = " @brief Fills 2D memory range of 'width' 16-bit values asynchronously to the specified short\n value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes\n between each row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @param[in] stream Stream Identifier\n @returns #hipSuccess, #hipErrorInvalidValue"]
6469 pub fn hipMemsetD2D16Async(
6470 dst: hipDeviceptr_t,
6471 dstPitch: usize,
6472 value: ::std::os::raw::c_ushort,
6473 width: usize,
6474 height: usize,
6475 stream: hipStream_t,
6476 ) -> hipError_t;
6477}
6478extern "C" {
6479 #[doc = " @brief Fills 2D memory range of 'width' 32-bit values synchronously to the specified int value.\n Height specifies numbers of rows to set and dstPitch speicifies the number of bytes between each\n row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @returns #hipSuccess, #hipErrorInvalidValue"]
6480 pub fn hipMemsetD2D32(
6481 dst: hipDeviceptr_t,
6482 dstPitch: usize,
6483 value: ::std::os::raw::c_uint,
6484 width: usize,
6485 height: usize,
6486 ) -> hipError_t;
6487}
6488extern "C" {
6489 #[doc = " @brief Fills 2D memory range of 'width' 32-bit values asynchronously to the specified int\n value. Height specifies numbers of rows to set and dstPitch speicifies the number of bytes\n between each row.\n @param[in] dst Pointer to device memory\n @param[in] dstPitch Pitch of dst device pointer\n @param[in] value value to set\n @param[in] width Width of row\n @param[in] height Number of rows\n @param[in] stream Stream Identifier\n @returns #hipSuccess, #hipErrorInvalidValue"]
6490 pub fn hipMemsetD2D32Async(
6491 dst: hipDeviceptr_t,
6492 dstPitch: usize,
6493 value: ::std::os::raw::c_uint,
6494 width: usize,
6495 height: usize,
6496 stream: hipStream_t,
6497 ) -> hipError_t;
6498}
6499extern "C" {
6500 #[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"]
6501 pub fn hipMemGetInfo(free: *mut usize, total: *mut usize) -> hipError_t;
6502}
6503extern "C" {
6504 #[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"]
6505 pub fn hipMemPtrGetInfo(ptr: *mut ::std::os::raw::c_void, size: *mut usize) -> hipError_t;
6506}
6507extern "C" {
6508 #[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"]
6509 pub fn hipMallocArray(
6510 array: *mut hipArray_t,
6511 desc: *const hipChannelFormatDesc,
6512 width: usize,
6513 height: usize,
6514 flags: ::std::os::raw::c_uint,
6515 ) -> hipError_t;
6516}
6517extern "C" {
6518 #[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"]
6519 pub fn hipArrayCreate(
6520 pHandle: *mut hipArray_t,
6521 pAllocateArray: *const HIP_ARRAY_DESCRIPTOR,
6522 ) -> hipError_t;
6523}
6524extern "C" {
6525 #[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"]
6526 pub fn hipArrayDestroy(array: hipArray_t) -> hipError_t;
6527}
6528extern "C" {
6529 #[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"]
6530 pub fn hipArray3DCreate(
6531 array: *mut hipArray_t,
6532 pAllocateArray: *const HIP_ARRAY3D_DESCRIPTOR,
6533 ) -> hipError_t;
6534}
6535extern "C" {
6536 #[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"]
6537 pub fn hipMalloc3D(pitchedDevPtr: *mut hipPitchedPtr, extent: hipExtent) -> hipError_t;
6538}
6539extern "C" {
6540 #[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"]
6541 pub fn hipFreeArray(array: hipArray_t) -> hipError_t;
6542}
6543extern "C" {
6544 #[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"]
6545 pub fn hipMalloc3DArray(
6546 array: *mut hipArray_t,
6547 desc: *const hipChannelFormatDesc,
6548 extent: hipExtent,
6549 flags: ::std::os::raw::c_uint,
6550 ) -> hipError_t;
6551}
6552extern "C" {
6553 #[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"]
6554 pub fn hipArrayGetInfo(
6555 desc: *mut hipChannelFormatDesc,
6556 extent: *mut hipExtent,
6557 flags: *mut ::std::os::raw::c_uint,
6558 array: hipArray_t,
6559 ) -> hipError_t;
6560}
6561extern "C" {
6562 #[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"]
6563 pub fn hipArrayGetDescriptor(
6564 pArrayDescriptor: *mut HIP_ARRAY_DESCRIPTOR,
6565 array: hipArray_t,
6566 ) -> hipError_t;
6567}
6568extern "C" {
6569 #[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"]
6570 pub fn hipArray3DGetDescriptor(
6571 pArrayDescriptor: *mut HIP_ARRAY3D_DESCRIPTOR,
6572 array: hipArray_t,
6573 ) -> hipError_t;
6574}
6575extern "C" {
6576 #[doc = " @brief Copies data between host and device.\n\n hipMemcpy2D supports memory matrix copy from the pointed area src to the pointed area dst.\n The copy direction is defined by kind which must be one of #hipMemcpyHostToDevice,\n #hipMemcpyHostToDevice, #hipMemcpyDeviceToHost #hipMemcpyDeviceToDevice or #hipMemcpyDefault.\n Device to Device copies don't need to wait for host synchronization.\n The copy is executed on the default null tream. The src and dst must not overlap.\n dpitch and spitch are the widths in bytes in memory matrix, width cannot exceed dpitch or\n spitch.\n\n For hipMemcpy2D, the copy is always performed by the current device (set by hipSetDevice).\n For multi-gpu or peer-to-peer configurations, it is recommended to set the current device to the\n device where the src data is physically located. For optimal peer-to-peer copies, the copy device\n must be able to access the src and dst pointers (by calling hipDeviceEnablePeerAccess with copy\n agent as the current device and src/dst as the peerDevice argument. if this is not done, the\n hipMemcpy2D will still work, but will perform the copy using a staging buffer on the host.\n\n @warning Calling hipMemcpy2D with dst and src pointers that do not match the hipMemcpyKind\n results in undefined behavior.\n\n @param[out] 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"]
6577 pub fn hipMemcpy2D(
6578 dst: *mut ::std::os::raw::c_void,
6579 dpitch: usize,
6580 src: *const ::std::os::raw::c_void,
6581 spitch: usize,
6582 width: usize,
6583 height: usize,
6584 kind: hipMemcpyKind,
6585 ) -> hipError_t;
6586}
6587extern "C" {
6588 #[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"]
6589 pub fn hipMemcpyParam2D(pCopy: *const hip_Memcpy2D) -> hipError_t;
6590}
6591extern "C" {
6592 #[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"]
6593 pub fn hipMemcpyParam2DAsync(pCopy: *const hip_Memcpy2D, stream: hipStream_t) -> hipError_t;
6594}
6595extern "C" {
6596 #[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[out] 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"]
6597 pub fn hipMemcpy2DAsync(
6598 dst: *mut ::std::os::raw::c_void,
6599 dpitch: usize,
6600 src: *const ::std::os::raw::c_void,
6601 spitch: usize,
6602 width: usize,
6603 height: usize,
6604 kind: hipMemcpyKind,
6605 stream: hipStream_t,
6606 ) -> hipError_t;
6607}
6608extern "C" {
6609 #[doc = " @brief Copies data between host and device.\n\n @param[out] 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"]
6610 pub fn hipMemcpy2DToArray(
6611 dst: hipArray_t,
6612 wOffset: usize,
6613 hOffset: usize,
6614 src: *const ::std::os::raw::c_void,
6615 spitch: usize,
6616 width: usize,
6617 height: usize,
6618 kind: hipMemcpyKind,
6619 ) -> hipError_t;
6620}
6621extern "C" {
6622 #[doc = " @brief Copies data between host and device.\n\n @param[out] 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"]
6623 pub fn hipMemcpy2DToArrayAsync(
6624 dst: hipArray_t,
6625 wOffset: usize,
6626 hOffset: usize,
6627 src: *const ::std::os::raw::c_void,
6628 spitch: usize,
6629 width: usize,
6630 height: usize,
6631 kind: hipMemcpyKind,
6632 stream: hipStream_t,
6633 ) -> hipError_t;
6634}
6635extern "C" {
6636 #[doc = " @brief Copies data between host and device.\n\n @param[out] 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"]
6637 pub fn hipMemcpy2DArrayToArray(
6638 dst: hipArray_t,
6639 wOffsetDst: usize,
6640 hOffsetDst: usize,
6641 src: hipArray_const_t,
6642 wOffsetSrc: usize,
6643 hOffsetSrc: usize,
6644 width: usize,
6645 height: usize,
6646 kind: hipMemcpyKind,
6647 ) -> hipError_t;
6648}
6649extern "C" {
6650 #[doc = " @brief Copies data between host and device [Deprecated]\n\n @ingroup MemoryD\n\n @param[out] 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."]
6651 pub fn hipMemcpyToArray(
6652 dst: hipArray_t,
6653 wOffset: usize,
6654 hOffset: usize,
6655 src: *const ::std::os::raw::c_void,
6656 count: usize,
6657 kind: hipMemcpyKind,
6658 ) -> hipError_t;
6659}
6660extern "C" {
6661 #[doc = " @brief Copies data between host and device [Deprecated]\n\n @ingroup MemoryD\n\n @param[out] 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."]
6662 pub fn hipMemcpyFromArray(
6663 dst: *mut ::std::os::raw::c_void,
6664 srcArray: hipArray_const_t,
6665 wOffset: usize,
6666 hOffset: usize,
6667 count: usize,
6668 kind: hipMemcpyKind,
6669 ) -> hipError_t;
6670}
6671extern "C" {
6672 #[doc = " @brief Copies data between host and device.\n\n @param[out] 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"]
6673 pub fn hipMemcpy2DFromArray(
6674 dst: *mut ::std::os::raw::c_void,
6675 dpitch: usize,
6676 src: hipArray_const_t,
6677 wOffset: usize,
6678 hOffset: usize,
6679 width: usize,
6680 height: usize,
6681 kind: hipMemcpyKind,
6682 ) -> hipError_t;
6683}
6684extern "C" {
6685 #[doc = " @brief Copies data between host and device asynchronously.\n\n @param[out] 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"]
6686 pub fn hipMemcpy2DFromArrayAsync(
6687 dst: *mut ::std::os::raw::c_void,
6688 dpitch: usize,
6689 src: hipArray_const_t,
6690 wOffset: usize,
6691 hOffset: usize,
6692 width: usize,
6693 height: usize,
6694 kind: hipMemcpyKind,
6695 stream: hipStream_t,
6696 ) -> hipError_t;
6697}
6698extern "C" {
6699 #[doc = " @brief Copies data between host and device.\n\n @param[out] 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"]
6700 pub fn hipMemcpyAtoH(
6701 dst: *mut ::std::os::raw::c_void,
6702 srcArray: hipArray_t,
6703 srcOffset: usize,
6704 count: usize,
6705 ) -> hipError_t;
6706}
6707extern "C" {
6708 #[doc = " @brief Copies data between host and device.\n\n @param[out] 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"]
6709 pub fn hipMemcpyHtoA(
6710 dstArray: hipArray_t,
6711 dstOffset: usize,
6712 srcHost: *const ::std::os::raw::c_void,
6713 count: usize,
6714 ) -> hipError_t;
6715}
6716extern "C" {
6717 #[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"]
6718 pub fn hipMemcpy3D(p: *const hipMemcpy3DParms) -> hipError_t;
6719}
6720extern "C" {
6721 #[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"]
6722 pub fn hipMemcpy3DAsync(p: *const hipMemcpy3DParms, stream: hipStream_t) -> hipError_t;
6723}
6724extern "C" {
6725 #[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"]
6726 pub fn hipDrvMemcpy3D(pCopy: *const HIP_MEMCPY3D) -> hipError_t;
6727}
6728extern "C" {
6729 #[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"]
6730 pub fn hipDrvMemcpy3DAsync(pCopy: *const HIP_MEMCPY3D, stream: hipStream_t) -> hipError_t;
6731}
6732extern "C" {
6733 #[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"]
6734 pub fn hipMemGetAddressRange(
6735 pbase: *mut hipDeviceptr_t,
6736 psize: *mut usize,
6737 dptr: hipDeviceptr_t,
6738 ) -> hipError_t;
6739}
6740extern "C" {
6741 #[doc = " @brief Perform Batch of 1D copies\n\n @param [out] dsts - Array of destination pointers\n @param [in] srcs - Array of source pointers.\n @param [in] sizes - Array of sizes for memcpy operations\n @param [in] count - Size of dsts, srcs and sizes arrays\n @param [in] attrs - Array of memcpy attributes (not supported)\n @param [in] attrsIdxs - Array of indices to map attrs to copies (not supported)\n @param [in] numAttrs - Size of attrs and attrsIdxs arrays (not supported)\n @param [in] failIdx - Pointer to a location to return failure index inside the batch\n @param [in] stream - stream used to enqueue operations in.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
6742 pub fn hipMemcpyBatchAsync(
6743 dsts: *mut *mut ::std::os::raw::c_void,
6744 srcs: *mut *mut ::std::os::raw::c_void,
6745 sizes: *mut usize,
6746 count: usize,
6747 attrs: *mut hipMemcpyAttributes,
6748 attrsIdxs: *mut usize,
6749 numAttrs: usize,
6750 failIdx: *mut usize,
6751 stream: hipStream_t,
6752 ) -> hipError_t;
6753}
6754extern "C" {
6755 #[doc = " @brief Perform Batch of 3D copies\n\n @param [in] numOps - Total number of memcpy operations.\n @param [in] opList - Array of size numOps containing the actual memcpy operations.\n @param [in] failIdx - Pointer to a location to return the index of the copy where a failure\n - was encountered.\n @param [in] flags - Flags for future use, must be zero now.\n @param [in] stream - The stream to enqueue the operations in.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
6756 pub fn hipMemcpy3DBatchAsync(
6757 numOps: usize,
6758 opList: *mut hipMemcpy3DBatchOp,
6759 failIdx: *mut usize,
6760 flags: ::std::os::raw::c_ulonglong,
6761 stream: hipStream_t,
6762 ) -> hipError_t;
6763}
6764extern "C" {
6765 #[doc = " @brief Performs 3D memory copies between devices\n This API is asynchronous with respect to host\n\n @param [in] p - Parameters for memory copy\n\n @returns #hipSuccess, #hipErrorInvalidValue, hipErrorInvalidDevice"]
6766 pub fn hipMemcpy3DPeer(p: *mut hipMemcpy3DPeerParms) -> hipError_t;
6767}
6768extern "C" {
6769 #[doc = " @brief Performs 3D memory copies between devices asynchronously\n\n @param [in] p - Parameters for memory copy\n @param [in] stream - Stream to enqueue operation in.\n\n @returns #hipSuccess, #hipErrorInvalidValue, hipErrorInvalidDevice"]
6770 pub fn hipMemcpy3DPeerAsync(p: *mut hipMemcpy3DPeerParms, stream: hipStream_t) -> hipError_t;
6771}
6772extern "C" {
6773 #[doc = " @brief Returns the memory requirements of a HIP mipmapped array.\n\n @param[out] memoryRequirements Pointer to hipArrayMemoryRequirements\n @param[in] mipmap HIP mipmapped array to get the memory requirements of\n @param[in] device Device to get the memory requirements for\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n Returns the memory requirements of a HIP mipmapped array in memoryRequirements.\n\n The returned value in hipArrayMemoryRequirements::size represents the total size of the HIP\nmipmapped array. The returned value in hipArrayMemoryRequirements::alignment represents the\nalignment necessary for mapping the HIP mipmapped array."]
6774 pub fn hipMipmappedArrayGetMemoryRequirements(
6775 memoryRequirements: *mut hipArrayMemoryRequirements,
6776 mipmap: hipMipmappedArray_t,
6777 device: hipDevice_t,
6778 ) -> hipError_t;
6779}
6780extern "C" {
6781 #[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"]
6782 pub fn hipDeviceCanAccessPeer(
6783 canAccessPeer: *mut ::std::os::raw::c_int,
6784 deviceId: ::std::os::raw::c_int,
6785 peerDeviceId: ::std::os::raw::c_int,
6786 ) -> hipError_t;
6787}
6788extern "C" {
6789 #[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."]
6790 pub fn hipDeviceEnablePeerAccess(
6791 peerDeviceId: ::std::os::raw::c_int,
6792 flags: ::std::os::raw::c_uint,
6793 ) -> hipError_t;
6794}
6795extern "C" {
6796 #[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"]
6797 pub fn hipDeviceDisablePeerAccess(peerDeviceId: ::std::os::raw::c_int) -> hipError_t;
6798}
6799extern "C" {
6800 #[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"]
6801 pub fn hipMemcpyPeer(
6802 dst: *mut ::std::os::raw::c_void,
6803 dstDeviceId: ::std::os::raw::c_int,
6804 src: *const ::std::os::raw::c_void,
6805 srcDeviceId: ::std::os::raw::c_int,
6806 sizeBytes: usize,
6807 ) -> hipError_t;
6808}
6809extern "C" {
6810 #[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"]
6811 pub fn hipMemcpyPeerAsync(
6812 dst: *mut ::std::os::raw::c_void,
6813 dstDeviceId: ::std::os::raw::c_int,
6814 src: *const ::std::os::raw::c_void,
6815 srcDevice: ::std::os::raw::c_int,
6816 sizeBytes: usize,
6817 stream: hipStream_t,
6818 ) -> hipError_t;
6819}
6820extern "C" {
6821 #[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup ExecutionContext Execution Context Management\n @{\n This section describes execution context management functions of HIP runtime API."]
6822 pub fn hipDeviceGetDevResource(
6823 device: hipDevice_t,
6824 resource: *mut hipDevResource,
6825 type_: hipDevResourceType,
6826 ) -> hipError_t;
6827}
6828extern "C" {
6829 pub fn hipDevSmResourceSplitByCount(
6830 result: *mut hipDevResource,
6831 nbGroups: *mut ::std::os::raw::c_uint,
6832 input: *const hipDevResource,
6833 remainder: *mut hipDevResource,
6834 flags: ::std::os::raw::c_uint,
6835 minCount: ::std::os::raw::c_uint,
6836 ) -> hipError_t;
6837}
6838extern "C" {
6839 pub fn hipDevSmResourceSplit(
6840 result: *mut hipDevResource,
6841 nbGroups: ::std::os::raw::c_uint,
6842 input: *const hipDevResource,
6843 remainder: *mut hipDevResource,
6844 flags: ::std::os::raw::c_uint,
6845 groupParams: *mut hipDevSmResourceGroupParams,
6846 ) -> hipError_t;
6847}
6848extern "C" {
6849 pub fn hipDevResourceGenerateDesc(
6850 phDesc: *mut hipDevResourceDesc_t,
6851 resources: *mut hipDevResource,
6852 nbResources: ::std::os::raw::c_uint,
6853 ) -> hipError_t;
6854}
6855extern "C" {
6856 pub fn hipGreenCtxCreate(
6857 ctx: *mut hipExecutionCtx_t,
6858 desc: hipDevResourceDesc_t,
6859 device: ::std::os::raw::c_int,
6860 flags: ::std::os::raw::c_uint,
6861 ) -> hipError_t;
6862}
6863extern "C" {
6864 pub fn hipExecutionCtxDestroy(ctx: hipExecutionCtx_t) -> hipError_t;
6865}
6866extern "C" {
6867 pub fn hipDeviceGetExecutionCtx(
6868 ctx: *mut hipExecutionCtx_t,
6869 device: ::std::os::raw::c_int,
6870 ) -> hipError_t;
6871}
6872extern "C" {
6873 pub fn hipExecutionCtxStreamCreate(
6874 stream: *mut hipStream_t,
6875 greenctx: hipExecutionCtx_t,
6876 flags: ::std::os::raw::c_uint,
6877 priority: ::std::os::raw::c_int,
6878 ) -> hipError_t;
6879}
6880extern "C" {
6881 pub fn hipExecutionCtxGetDevResource(
6882 ctx: hipExecutionCtx_t,
6883 resource: *mut hipDevResource,
6884 type_: hipDevResourceType,
6885 ) -> hipError_t;
6886}
6887extern "C" {
6888 pub fn hipExecutionCtxGetDevice(
6889 device: *mut ::std::os::raw::c_int,
6890 ctx: hipExecutionCtx_t,
6891 ) -> hipError_t;
6892}
6893extern "C" {
6894 pub fn hipExecutionCtxGetId(
6895 ctx: hipExecutionCtx_t,
6896 ctxId: *mut ::std::os::raw::c_ulonglong,
6897 ) -> hipError_t;
6898}
6899extern "C" {
6900 pub fn hipStreamGetDevResource(
6901 hStream: hipStream_t,
6902 resource: *mut hipDevResource,
6903 type_: hipDevResourceType,
6904 ) -> hipError_t;
6905}
6906extern "C" {
6907 pub fn hipExecutionCtxRecordEvent(ctx: hipExecutionCtx_t, event: hipEvent_t) -> hipError_t;
6908}
6909extern "C" {
6910 pub fn hipExecutionCtxSynchronize(ctx: hipExecutionCtx_t) -> hipError_t;
6911}
6912extern "C" {
6913 pub fn hipExecutionCtxWaitEvent(ctx: hipExecutionCtx_t, event: hipEvent_t) -> hipError_t;
6914}
6915extern "C" {
6916 #[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"]
6917 pub fn hipCtxCreate(
6918 ctx: *mut hipCtx_t,
6919 flags: ::std::os::raw::c_uint,
6920 device: hipDevice_t,
6921 ) -> hipError_t;
6922}
6923extern "C" {
6924 #[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."]
6925 pub fn hipCtxDestroy(ctx: hipCtx_t) -> hipError_t;
6926}
6927extern "C" {
6928 #[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."]
6929 pub fn hipCtxPopCurrent(ctx: *mut hipCtx_t) -> hipError_t;
6930}
6931extern "C" {
6932 #[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."]
6933 pub fn hipCtxPushCurrent(ctx: hipCtx_t) -> hipError_t;
6934}
6935extern "C" {
6936 #[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."]
6937 pub fn hipCtxSetCurrent(ctx: hipCtx_t) -> hipError_t;
6938}
6939extern "C" {
6940 #[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."]
6941 pub fn hipCtxGetCurrent(ctx: *mut hipCtx_t) -> hipError_t;
6942}
6943extern "C" {
6944 #[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."]
6945 pub fn hipCtxGetDevice(device: *mut hipDevice_t) -> hipError_t;
6946}
6947extern "C" {
6948 #[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."]
6949 pub fn hipCtxGetApiVersion(
6950 ctx: hipCtx_t,
6951 apiVersion: *mut ::std::os::raw::c_uint,
6952 ) -> hipError_t;
6953}
6954extern "C" {
6955 #[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."]
6956 pub fn hipCtxGetCacheConfig(cacheConfig: *mut hipFuncCache_t) -> hipError_t;
6957}
6958extern "C" {
6959 #[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."]
6960 pub fn hipCtxSetCacheConfig(cacheConfig: hipFuncCache_t) -> hipError_t;
6961}
6962extern "C" {
6963 #[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."]
6964 pub fn hipCtxSetSharedMemConfig(config: hipSharedMemConfig) -> hipError_t;
6965}
6966extern "C" {
6967 #[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."]
6968 pub fn hipCtxGetSharedMemConfig(pConfig: *mut hipSharedMemConfig) -> hipError_t;
6969}
6970extern "C" {
6971 #[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."]
6972 pub fn hipCtxSynchronize() -> hipError_t;
6973}
6974extern "C" {
6975 #[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."]
6976 pub fn hipCtxGetFlags(flags: *mut ::std::os::raw::c_uint) -> hipError_t;
6977}
6978extern "C" {
6979 #[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."]
6980 pub fn hipCtxEnablePeerAccess(peerCtx: hipCtx_t, flags: ::std::os::raw::c_uint) -> hipError_t;
6981}
6982extern "C" {
6983 #[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."]
6984 pub fn hipCtxDisablePeerAccess(peerCtx: hipCtx_t) -> hipError_t;
6985}
6986extern "C" {
6987 #[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."]
6988 pub fn hipDevicePrimaryCtxGetState(
6989 dev: hipDevice_t,
6990 flags: *mut ::std::os::raw::c_uint,
6991 active: *mut ::std::os::raw::c_int,
6992 ) -> hipError_t;
6993}
6994extern "C" {
6995 #[doc = " @brief Release the primary context on the GPU.\n\n @param [in] dev Device which primary context is released [Deprecated]\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n @warning This function return #hipSuccess though doesn't release the primaryCtx by design on\n HIP/HIP-CLANG path.\n\n @warning This API is deprecated on the AMD platform, only for equivalent driver API on the\n NVIDIA platform."]
6996 pub fn hipDevicePrimaryCtxRelease(dev: hipDevice_t) -> hipError_t;
6997}
6998extern "C" {
6999 #[doc = " @brief Retain the primary context on the GPU [Deprecated]\n\n @param [out] pctx Returned context handle of the new context\n @param [in] dev Device which primary context is released\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent driver API on the\n NVIDIA platform."]
7000 pub fn hipDevicePrimaryCtxRetain(pctx: *mut hipCtx_t, dev: hipDevice_t) -> hipError_t;
7001}
7002extern "C" {
7003 #[doc = " @brief Resets the primary context on the GPU [Deprecated]\n\n @param [in] dev Device which primary context is reset\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent driver API on the\n NVIDIA platform."]
7004 pub fn hipDevicePrimaryCtxReset(dev: hipDevice_t) -> hipError_t;
7005}
7006extern "C" {
7007 #[doc = " @brief Set flags for the primary context [Deprecated]\n\n @param [in] dev Device for which the primary context flags are set\n @param [in] flags New flags for the device\n\n @returns #hipSuccess, #hipErrorContextAlreadyInUse\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice\n\n @warning This API is deprecated on the AMD platform, only for equivalent driver API on the\n NVIDIA platform."]
7008 pub fn hipDevicePrimaryCtxSetFlags(
7009 dev: hipDevice_t,
7010 flags: ::std::os::raw::c_uint,
7011 ) -> hipError_t;
7012}
7013extern "C" {
7014 #[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n\n @defgroup Module Module Management\n @{\n @ingroup API\n This section describes the module management functions of HIP runtime API.\n\n/\n/**\n @brief Loads fatbin object\n\n @param [in] fatbin fatbin to be loaded as a module\n @param [out] module Module\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext, #hipErrorFileNotFound,\n #hipErrorOutOfMemory, #hipErrorSharedObjectInitFailed, #hipErrorNotInitialized\n"]
7015 pub fn hipModuleLoadFatBinary(
7016 module: *mut hipModule_t,
7017 fatbin: *const ::std::os::raw::c_void,
7018 ) -> hipError_t;
7019}
7020extern "C" {
7021 #[doc = " @brief Loads code object from file into a module the currrent context.\n\n @param [in] fname Filename of code object to load\n\n @param [out] module Module\n\n @warning File/memory resources allocated in this function are released only in hipModuleUnload.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext, #hipErrorFileNotFound,\n #hipErrorOutOfMemory, #hipErrorSharedObjectInitFailed, #hipErrorNotInitialized\n"]
7022 pub fn hipModuleLoad(
7023 module: *mut hipModule_t,
7024 fname: *const ::std::os::raw::c_char,
7025 ) -> hipError_t;
7026}
7027extern "C" {
7028 #[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."]
7029 pub fn hipModuleUnload(module: hipModule_t) -> hipError_t;
7030}
7031extern "C" {
7032 #[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,"]
7033 pub fn hipModuleGetFunction(
7034 function: *mut hipFunction_t,
7035 module: hipModule_t,
7036 kname: *const ::std::os::raw::c_char,
7037 ) -> hipError_t;
7038}
7039extern "C" {
7040 #[doc = " @brief Returns the number of functions within a module.\n\n @param [in] mod Module to get function count from\n @param [out] count function count from module\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext, #hipErrorNotInitialized,\n #hipErrorNotFound,"]
7041 pub fn hipModuleGetFunctionCount(
7042 count: *mut ::std::os::raw::c_uint,
7043 mod_: hipModule_t,
7044 ) -> hipError_t;
7045}
7046extern "C" {
7047 #[doc = " @brief Returns information about a kernel.\n\n @param[out] pi Returned attribute value\n @param[in] attrib Attribute requested\n @param[in] kernel Kernel to query attribute of\n @param[in] dev Device to query attribute of\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle, #hipErrorInvalidDevice, #hipErrorInvalidDeviceFunction, #hipErrorMissingConfiguration\n\n Returns in *pi the integer value of the attribute attrib for the kernel kernel for the requested\ndevice dev. The supported attributes are:\n - HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK The maximum number of threads per block. This number depends on both the kernel and the requested device.\n - HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES The size in bytes of statically-allocated shared memory per block required by this kernel. This does not include dynamically-allocated shared memory requested by the user at runtime.\n - HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES The size in bytes of user-allocated constant memory required by this kernel.\n - HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES The size in bytes of local memory used by each thread of this kernel.\n - HIP_FUNC_ATTRIBUTE_NUM_REGS The number of registers used by each thread of this kernel.\n - HIP_FUNC_ATTRIBUTE_PTX_VERSION The PTX virtual architecture version for which the kernel was compiled. This value is the major PTX version * 10 + the minor PTX version, so a PTX version 1.3 function would return the value 13.\n - HIP_FUNC_ATTRIBUTE_BINARY_VERSION The binary architecture version for which the kernel was compiled. This value is the major binary version * 10 + the minor binary version, so a binary version 1.3 function would return the value 13.\n - HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES The maximum size in bytes of dynamically-allocated shared memory.\n - HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA The attribute to indicate whether the kernel has been compiled with user specified option \"-Xptxas --dlcm=ca\" set.\n - HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT Preferred shared memory-L1 cache split ratio in percent of total shared memory.\n\n @see hipLibraryLoadData, hipLibraryLoadFromFile, hipLibraryUnload, hipKernelSetAttribute,\nhipLibraryGetKernel, hipLaunchKernel, hipKernelGetFunction, hipLibraryGetModule,\nhipModuleGetFunction, hipFuncGetAttribute"]
7048 pub fn hipKernelGetAttribute(
7049 pi: *mut ::std::os::raw::c_int,
7050 attrib: hipFunction_attribute,
7051 kernel: hipKernel_t,
7052 dev: hipDevice_t,
7053 ) -> hipError_t;
7054}
7055extern "C" {
7056 #[doc = " @brief Load hip Library from inmemory object\n\n @param [out] library Output Library\n @param [in] code In memory object\n @param [in] jitOptions JIT options, CUDA only\n @param [in] jitOptionsValues JIT options values, CUDA only\n @param [in] numJitOptions Number of JIT options\n @param [in] libraryOptions Library options\n @param [in] libraryOptionValues Library options values\n @param [in] numLibraryOptions Number of library options\n @return #hipSuccess, #hipErrorInvalidValue,"]
7057 pub fn hipLibraryLoadData(
7058 library: *mut hipLibrary_t,
7059 code: *const ::std::os::raw::c_void,
7060 jitOptions: *mut hipJitOption,
7061 jitOptionsValues: *mut *mut ::std::os::raw::c_void,
7062 numJitOptions: ::std::os::raw::c_uint,
7063 libraryOptions: *mut hipLibraryOption,
7064 libraryOptionValues: *mut *mut ::std::os::raw::c_void,
7065 numLibraryOptions: ::std::os::raw::c_uint,
7066 ) -> hipError_t;
7067}
7068extern "C" {
7069 #[doc = " @brief Load hip Library from file\n\n @param [out] library Output Library\n @param [in] fileName file which contains code object\n @param [in] jitOptions JIT options, CUDA only\n @param [in] jitOptionsValues JIT options values, CUDA only\n @param [in] numJitOptions Number of JIT options\n @param [in] libraryOptions Library options\n @param [in] libraryOptionValues Library options values\n @param [in] numLibraryOptions Number of library options\n @return #hipSuccess, #hipErrorInvalidValue"]
7070 pub fn hipLibraryLoadFromFile(
7071 library: *mut hipLibrary_t,
7072 fileName: *const ::std::os::raw::c_char,
7073 jitOptions: *mut hipJitOption,
7074 jitOptionsValues: *mut *mut ::std::os::raw::c_void,
7075 numJitOptions: ::std::os::raw::c_uint,
7076 libraryOptions: *mut hipLibraryOption,
7077 libraryOptionValues: *mut *mut ::std::os::raw::c_void,
7078 numLibraryOptions: ::std::os::raw::c_uint,
7079 ) -> hipError_t;
7080}
7081extern "C" {
7082 #[doc = " @brief Unload HIP Library\n\n @param [in] library Input created hip library\n @return #hipSuccess, #hipErrorInvalidValue"]
7083 pub fn hipLibraryUnload(library: hipLibrary_t) -> hipError_t;
7084}
7085extern "C" {
7086 #[doc = " @brief Get Kernel object from library\n\n @param [out] pKernel Output kernel object\n @param [in] library Input hip library\n @param [in] name kernel name to be searched for\n @return #hipSuccess, #hipErrorInvalidValue"]
7087 pub fn hipLibraryGetKernel(
7088 pKernel: *mut hipKernel_t,
7089 library: hipLibrary_t,
7090 name: *const ::std::os::raw::c_char,
7091 ) -> hipError_t;
7092}
7093extern "C" {
7094 #[doc = " @brief Get Kernel count in library\n\n @param [out] count Count of kernels in library\n @param [in] library Input created hip library\n @return #hipSuccess, #hipErrorInvalidValue"]
7095 pub fn hipLibraryGetKernelCount(
7096 count: *mut ::std::os::raw::c_uint,
7097 library: hipLibrary_t,
7098 ) -> hipError_t;
7099}
7100extern "C" {
7101 #[doc = " @brief Get device pointer to a `__device__` global variable defined in a library.\n\n Returns the device pointer and size of the named global symbol within the\n library's code object. Mirrors CUDA's `cuLibraryGetGlobal` /\n `cudaLibraryGetGlobal`. Either `dptr` or `bytes` (but not both) may be NULL.\n\n @param [out] dptr Pointer to receive the device pointer, may be NULL.\n @param [out] bytes Pointer to receive the size in bytes, may be NULL.\n @param [in] library Input hip library handle.\n @param [in] name Name of the global symbol to look up.\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidResourceHandle,\n #hipErrorNotFound"]
7102 pub fn hipLibraryGetGlobal(
7103 dptr: *mut *mut ::std::os::raw::c_void,
7104 bytes: *mut usize,
7105 library: hipLibrary_t,
7106 name: *const ::std::os::raw::c_char,
7107 ) -> hipError_t;
7108}
7109extern "C" {
7110 #[doc = " @brief Get host pointer to a `__managed__` variable defined in a library.\n\n Returns the host-accessible managed pointer and size of the named managed\n symbol within the library's code object. Mirrors CUDA's\n `cuLibraryGetManaged` / `cudaLibraryGetManaged`. Either `dptr` or `bytes`\n (but not both) may be NULL. Returns #hipErrorNotFound if the symbol does\n not exist or is not a `__managed__` variable.\n\n @param [out] dptr Pointer to receive the managed host pointer, may be NULL.\n @param [out] bytes Pointer to receive the size in bytes, may be NULL.\n @param [in] library Input hip library handle.\n @param [in] name Name of the managed symbol to look up.\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidResourceHandle,\n #hipErrorNotFound"]
7111 pub fn hipLibraryGetManaged(
7112 dptr: *mut *mut ::std::os::raw::c_void,
7113 bytes: *mut usize,
7114 library: hipLibrary_t,
7115 name: *const ::std::os::raw::c_char,
7116 ) -> hipError_t;
7117}
7118extern "C" {
7119 #[doc = " @brief Retrieve kernel handles within a library\n\n @param [out] kernels Buffer for kernel handles\n @param [in] numKernels Maximum number of kernel handles to return to buffer\n @oaram [in] library Library handle to query from\n @return #hipSuccess, #hipErrorInvalidValue"]
7120 pub fn hipLibraryEnumerateKernels(
7121 kernels: *mut hipKernel_t,
7122 numKernels: ::std::os::raw::c_uint,
7123 library: hipLibrary_t,
7124 ) -> hipError_t;
7125}
7126extern "C" {
7127 #[doc = " @brief Returns a Library Handle\n\n @param [out] library Returned Library handle\n @param [in] kernel Kernel to retrieve library Handle\n @return #hipSuccess, #hipErrorInvalidValue"]
7128 pub fn hipKernelGetLibrary(library: *mut hipLibrary_t, kernel: hipKernel_t) -> hipError_t;
7129}
7130extern "C" {
7131 #[doc = " @brief Returns a Kernel Name\n\n @param [out] name Returned Kernel Name\n @param [in] kernel Kernel handle to retrieve name\n @return #hipSuccess, #hipErrorInvalidValue"]
7132 pub fn hipKernelGetName(
7133 name: *mut *const ::std::os::raw::c_char,
7134 kernel: hipKernel_t,
7135 ) -> hipError_t;
7136}
7137extern "C" {
7138 #[doc = " @brief Returns the offset and size of a kernel parameter\n\n @param [in] kernel Kernel handle to retrieve parameter info\n @param [in] paramIndex Index of the parameter\n @param [out] paramOffset returns the offset of the parameter\n @param [out] paramSize Optionally returns the size of the parameter\n\n @return #hipSuccess, #hipErrorInvalidValue"]
7139 pub fn hipKernelGetParamInfo(
7140 kernel: hipKernel_t,
7141 paramIndex: usize,
7142 paramOffset: *mut usize,
7143 paramSize: *mut usize,
7144 ) -> hipError_t;
7145}
7146extern "C" {
7147 #[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"]
7148 pub fn hipFuncGetAttributes(
7149 attr: *mut hipFuncAttributes,
7150 func: *const ::std::os::raw::c_void,
7151 ) -> hipError_t;
7152}
7153extern "C" {
7154 #[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"]
7155 pub fn hipFuncGetAttribute(
7156 value: *mut ::std::os::raw::c_int,
7157 attrib: hipFunction_attribute,
7158 hfunc: hipFunction_t,
7159 ) -> hipError_t;
7160}
7161extern "C" {
7162 #[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"]
7163 pub fn hipGetFuncBySymbol(
7164 functionPtr: *mut hipFunction_t,
7165 symbolPtr: *const ::std::os::raw::c_void,
7166 ) -> hipError_t;
7167}
7168extern "C" {
7169 #[doc = " @brief Gets function pointer of a requested HIP API\n\n @param [in] symbol The API base name\n @param [out] funcPtr Pointer to the requested function\n @param [in] flags Flags for the search\n @param [out] driverStatus Optional returned status of the search\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7170 pub fn hipGetDriverEntryPoint(
7171 symbol: *const ::std::os::raw::c_char,
7172 funcPtr: *mut *mut ::std::os::raw::c_void,
7173 flags: ::std::os::raw::c_ulonglong,
7174 driverStatus: *mut hipDriverEntryPointQueryResult,
7175 ) -> hipError_t;
7176}
7177extern "C" {
7178 #[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"]
7179 pub fn hipModuleGetTexRef(
7180 texRef: *mut *mut textureReference,
7181 hmod: hipModule_t,
7182 name: *const ::std::os::raw::c_char,
7183 ) -> hipError_t;
7184}
7185extern "C" {
7186 #[doc = " @brief builds module from code object data which resides in host memory.\n\n The \"image\" is a pointer to the location of code object data. This data can be either\n a single code object or a fat binary (fatbin), which serves as the entry point for loading and\n launching device-specific kernel executions.\n\n By default, the following command generates a fatbin:\n\n \"amdclang++ -O3 -c --offload-device-only --offload-arch=<GPU_ARCH> <input_file> -o <output_file>\"\n\n For more details, refer to:\n <a\n href= \"https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/kernel_language_cpp_support.html#kernel-compilation\">\n Kernel Compilation</a> in the HIP kernel language C++ support, or\n <a\n href=\"https://rocm.docs.amd.com/projects/HIP/en/latest/how-to/hip_rtc.html\">HIP runtime compilation (HIP RTC)</a>.\n\n @param [in] image The pointer to the location of data\n @param [out] module Retuned module\n\n @returns hipSuccess, hipErrorNotInitialized, hipErrorOutOfMemory, hipErrorNotInitialized"]
7187 pub fn hipModuleLoadData(
7188 module: *mut hipModule_t,
7189 image: *const ::std::os::raw::c_void,
7190 ) -> hipError_t;
7191}
7192extern "C" {
7193 #[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"]
7194 pub fn hipModuleLoadDataEx(
7195 module: *mut hipModule_t,
7196 image: *const ::std::os::raw::c_void,
7197 numOptions: ::std::os::raw::c_uint,
7198 options: *mut hipJitOption,
7199 optionValues: *mut *mut ::std::os::raw::c_void,
7200 ) -> hipError_t;
7201}
7202extern "C" {
7203 #[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"]
7204 pub fn hipLinkAddData(
7205 state: hipLinkState_t,
7206 type_: hipJitInputType,
7207 data: *mut ::std::os::raw::c_void,
7208 size: usize,
7209 name: *const ::std::os::raw::c_char,
7210 numOptions: ::std::os::raw::c_uint,
7211 options: *mut hipJitOption,
7212 optionValues: *mut *mut ::std::os::raw::c_void,
7213 ) -> hipError_t;
7214}
7215extern "C" {
7216 #[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"]
7217 pub fn hipLinkAddFile(
7218 state: hipLinkState_t,
7219 type_: hipJitInputType,
7220 path: *const ::std::os::raw::c_char,
7221 numOptions: ::std::os::raw::c_uint,
7222 options: *mut hipJitOption,
7223 optionValues: *mut *mut ::std::os::raw::c_void,
7224 ) -> hipError_t;
7225}
7226extern "C" {
7227 #[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"]
7228 pub fn hipLinkComplete(
7229 state: hipLinkState_t,
7230 hipBinOut: *mut *mut ::std::os::raw::c_void,
7231 sizeOut: *mut usize,
7232 ) -> hipError_t;
7233}
7234extern "C" {
7235 #[doc = " @brief Creates a linker instance with options.\n @param [in] numOptions Number of options\n @param [in] options Array of options\n @param [in] optionValues Array of option values cast to void*\n @param [out] stateOut hip link state created upon success\n\n @returns #hipSuccess #hipErrorInvalidValue #hipErrorInvalidConfiguration\n\n @see hipSuccess"]
7236 pub fn hipLinkCreate(
7237 numOptions: ::std::os::raw::c_uint,
7238 options: *mut hipJitOption,
7239 optionValues: *mut *mut ::std::os::raw::c_void,
7240 stateOut: *mut hipLinkState_t,
7241 ) -> hipError_t;
7242}
7243extern "C" {
7244 #[doc = " @brief Deletes the linker instance.\n @param [in] state link state instance\n\n @returns #hipSuccess #hipErrorInvalidValue\n\n @see hipSuccess"]
7245 pub fn hipLinkDestroy(state: hipLinkState_t) -> hipError_t;
7246}
7247extern "C" {
7248 #[doc = " @brief launches kernel f with launch parameters and shared memory on stream with arguments passed\n to kernelparams or extra\n @ingroup Execution\n @param [in] f Kernel to launch.\n @param [in] gridDimX X grid dimension specified as multiple of blockDimX.\n @param [in] gridDimY Y grid dimension specified as multiple of blockDimY.\n @param [in] gridDimZ Z grid dimension specified as multiple of blockDimZ.\n @param [in] blockDimX X block dimensions specified in work-items\n @param [in] blockDimY Y grid dimension specified in work-items\n @param [in] blockDimZ Z grid dimension specified in work-items\n @param [in] sharedMemBytes Amount of dynamic shared memory to allocate for this kernel. The\n HIP-Clang compiler provides support for extern shared declarations.\n @param [in] stream Stream where the kernel should be dispatched. May be 0, in which case th\n default stream is used with associated synchronization rules.\n @param [in] kernelParams Kernel parameters to launch\n @param [in] extra Pointer to kernel arguments. These are passed directly to the kernel and\n must be in the memory layout and alignment expected by the kernel.\n All passed arguments must be naturally aligned according to their type. The memory address of\n each argument should be a multiple of its size in bytes. Please refer to\n hip_porting_driver_api.md for sample usage.\n\n Please note, HIP does not support kernel launch with total work items defined in dimension with\n size gridDim x blockDim >= 2^32. So gridDim.x * blockDim.x, gridDim.y * blockDim.y\n and gridDim.z * blockDim.z are always less than 2^32.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue"]
7249 pub fn hipModuleLaunchKernel(
7250 f: hipFunction_t,
7251 gridDimX: ::std::os::raw::c_uint,
7252 gridDimY: ::std::os::raw::c_uint,
7253 gridDimZ: ::std::os::raw::c_uint,
7254 blockDimX: ::std::os::raw::c_uint,
7255 blockDimY: ::std::os::raw::c_uint,
7256 blockDimZ: ::std::os::raw::c_uint,
7257 sharedMemBytes: ::std::os::raw::c_uint,
7258 stream: hipStream_t,
7259 kernelParams: *mut *mut ::std::os::raw::c_void,
7260 extra: *mut *mut ::std::os::raw::c_void,
7261 ) -> hipError_t;
7262}
7263extern "C" {
7264 #[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"]
7265 pub fn hipModuleLaunchCooperativeKernel(
7266 f: hipFunction_t,
7267 gridDimX: ::std::os::raw::c_uint,
7268 gridDimY: ::std::os::raw::c_uint,
7269 gridDimZ: ::std::os::raw::c_uint,
7270 blockDimX: ::std::os::raw::c_uint,
7271 blockDimY: ::std::os::raw::c_uint,
7272 blockDimZ: ::std::os::raw::c_uint,
7273 sharedMemBytes: ::std::os::raw::c_uint,
7274 stream: hipStream_t,
7275 kernelParams: *mut *mut ::std::os::raw::c_void,
7276 ) -> hipError_t;
7277}
7278extern "C" {
7279 #[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"]
7280 pub fn hipModuleLaunchCooperativeKernelMultiDevice(
7281 launchParamsList: *mut hipFunctionLaunchParams,
7282 numDevices: ::std::os::raw::c_uint,
7283 flags: ::std::os::raw::c_uint,
7284 ) -> hipError_t;
7285}
7286extern "C" {
7287 #[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"]
7288 pub fn hipLaunchCooperativeKernel(
7289 f: *const ::std::os::raw::c_void,
7290 gridDim: dim3,
7291 blockDimX: dim3,
7292 kernelParams: *mut *mut ::std::os::raw::c_void,
7293 sharedMemBytes: ::std::os::raw::c_uint,
7294 stream: hipStream_t,
7295 ) -> hipError_t;
7296}
7297extern "C" {
7298 #[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"]
7299 pub fn hipLaunchCooperativeKernelMultiDevice(
7300 launchParamsList: *mut hipLaunchParams,
7301 numDevices: ::std::os::raw::c_int,
7302 flags: ::std::os::raw::c_uint,
7303 ) -> hipError_t;
7304}
7305extern "C" {
7306 #[doc = " @brief Launches kernels on multiple devices and guarantees all specified kernels are dispatched\n on respective streams before enqueuing any other work on the specified streams from any other\n threads\n @ingroup Execution\n @param [in] launchParamsList List of launch parameters, one per device.\n @param [in] numDevices Size of the launchParamsList array.\n @param [in] flags Flags to control launch behavior.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue"]
7307 pub fn hipExtLaunchMultiKernelMultiDevice(
7308 launchParamsList: *mut hipLaunchParams,
7309 numDevices: ::std::os::raw::c_int,
7310 flags: ::std::os::raw::c_uint,
7311 ) -> hipError_t;
7312}
7313extern "C" {
7314 #[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."]
7315 pub fn hipLaunchKernelExC(
7316 config: *const hipLaunchConfig_t,
7317 fPtr: *const ::std::os::raw::c_void,
7318 args: *mut *mut ::std::os::raw::c_void,
7319 ) -> hipError_t;
7320}
7321extern "C" {
7322 #[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."]
7323 pub fn hipDrvLaunchKernelEx(
7324 config: *const HIP_LAUNCH_CONFIG,
7325 f: hipFunction_t,
7326 params: *mut *mut ::std::os::raw::c_void,
7327 extra: *mut *mut ::std::os::raw::c_void,
7328 ) -> hipError_t;
7329}
7330extern "C" {
7331 #[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."]
7332 pub fn hipMemGetHandleForAddressRange(
7333 handle: *mut ::std::os::raw::c_void,
7334 dptr: hipDeviceptr_t,
7335 size: usize,
7336 handleType: hipMemRangeHandleType,
7337 flags: ::std::os::raw::c_ulonglong,
7338 ) -> hipError_t;
7339}
7340extern "C" {
7341 #[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 calculated\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"]
7342 pub fn hipModuleOccupancyMaxPotentialBlockSize(
7343 gridSize: *mut ::std::os::raw::c_int,
7344 blockSize: *mut ::std::os::raw::c_int,
7345 f: hipFunction_t,
7346 dynSharedMemPerBlk: usize,
7347 blockSizeLimit: ::std::os::raw::c_int,
7348 ) -> hipError_t;
7349}
7350extern "C" {
7351 #[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 calculated\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"]
7352 pub fn hipModuleOccupancyMaxPotentialBlockSizeWithFlags(
7353 gridSize: *mut ::std::os::raw::c_int,
7354 blockSize: *mut ::std::os::raw::c_int,
7355 f: hipFunction_t,
7356 dynSharedMemPerBlk: usize,
7357 blockSizeLimit: ::std::os::raw::c_int,
7358 flags: ::std::os::raw::c_uint,
7359 ) -> hipError_t;
7360}
7361extern "C" {
7362 #[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 calculated\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"]
7363 pub fn hipModuleOccupancyMaxActiveBlocksPerMultiprocessor(
7364 numBlocks: *mut ::std::os::raw::c_int,
7365 f: hipFunction_t,
7366 blockSize: ::std::os::raw::c_int,
7367 dynSharedMemPerBlk: usize,
7368 ) -> hipError_t;
7369}
7370extern "C" {
7371 #[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 calculated\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"]
7372 pub fn hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
7373 numBlocks: *mut ::std::os::raw::c_int,
7374 f: hipFunction_t,
7375 blockSize: ::std::os::raw::c_int,
7376 dynSharedMemPerBlk: usize,
7377 flags: ::std::os::raw::c_uint,
7378 ) -> hipError_t;
7379}
7380extern "C" {
7381 #[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 calculated\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"]
7382 pub fn hipOccupancyMaxActiveBlocksPerMultiprocessor(
7383 numBlocks: *mut ::std::os::raw::c_int,
7384 f: *const ::std::os::raw::c_void,
7385 blockSize: ::std::os::raw::c_int,
7386 dynSharedMemPerBlk: usize,
7387 ) -> hipError_t;
7388}
7389extern "C" {
7390 #[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 calculated\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"]
7391 pub fn hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(
7392 numBlocks: *mut ::std::os::raw::c_int,
7393 f: *const ::std::os::raw::c_void,
7394 blockSize: ::std::os::raw::c_int,
7395 dynSharedMemPerBlk: usize,
7396 flags: ::std::os::raw::c_uint,
7397 ) -> hipError_t;
7398}
7399extern "C" {
7400 #[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 calculated\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"]
7401 pub fn hipOccupancyMaxPotentialBlockSize(
7402 gridSize: *mut ::std::os::raw::c_int,
7403 blockSize: *mut ::std::os::raw::c_int,
7404 f: *const ::std::os::raw::c_void,
7405 dynSharedMemPerBlk: usize,
7406 blockSizeLimit: ::std::os::raw::c_int,
7407 ) -> hipError_t;
7408}
7409extern "C" {
7410 #[doc = " @brief Returns dynamic shared memory available per block when launching numBlocks blocks on SM.\n\n @ingroup Occupancy\n Returns in \\p *dynamicSmemSize the maximum size of dynamic shared memory /\n to allow numBlocks blocks per SM.\n\n @param [out] dynamicSmemSize Returned maximum dynamic shared memory.\n @param [in] f Kernel function for which occupancy is calculated.\n @param [in] numBlocks Number of blocks to fit on SM\n @param [in] blockSize Size of the block\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidDeviceFunction, #hipErrorInvalidValue,\n #hipErrorUnknown"]
7411 pub fn hipOccupancyAvailableDynamicSMemPerBlock(
7412 dynamicSmemSize: *mut usize,
7413 f: *const ::std::os::raw::c_void,
7414 numBlocks: ::std::os::raw::c_int,
7415 blockSize: ::std::os::raw::c_int,
7416 ) -> hipError_t;
7417}
7418extern "C" {
7419 #[doc = " @brief determines the amount of active kernel clusters can co-exist at the same time in a device\n\n @param [out] numClusters the amount of clusters\n @param [in] f kernel function for which occupancy is calculated\n @param [in] config pointer to the kernel launch configuration structure\n\n @returns #hipSuccess, #hipErrorInvalidDeviceFunction, hipErrorInvalidClusterSize,\n #hipErrorInvalidValue"]
7420 pub fn hipOccupancyMaxActiveClusters(
7421 numClusters: *mut ::std::os::raw::c_int,
7422 f: *const ::std::os::raw::c_void,
7423 config: *const hipLaunchConfig_t,
7424 ) -> hipError_t;
7425}
7426extern "C" {
7427 #[doc = " @brief returns the maximum cluster size (in number of blocks) that can run on the device\n\n @param [out] clusterSize the maximum cluster size\n @param [in] f kernel function for which occupancy is calculated\n @param [in] config pointer to the kernel launch configuration structure\n\n @returns #hipSuccess, #hipErrorInvalidDeviceFunction, hipErrorInvalidClusterSize,\n #hipErrorInvalidValue"]
7428 pub fn hipOccupancyMaxPotentialClusterSize(
7429 clusterSize: *mut ::std::os::raw::c_int,
7430 f: *const ::std::os::raw::c_void,
7431 config: *const hipLaunchConfig_t,
7432 ) -> hipError_t;
7433}
7434extern "C" {
7435 #[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."]
7436 pub fn hipProfilerStart() -> hipError_t;
7437}
7438extern "C" {
7439 #[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."]
7440 pub fn hipProfilerStop() -> hipError_t;
7441}
7442extern "C" {
7443 #[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"]
7444 pub fn hipConfigureCall(
7445 gridDim: dim3,
7446 blockDim: dim3,
7447 sharedMem: usize,
7448 stream: hipStream_t,
7449 ) -> hipError_t;
7450}
7451extern "C" {
7452 #[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"]
7453 pub fn hipSetupArgument(
7454 arg: *const ::std::os::raw::c_void,
7455 size: usize,
7456 offset: usize,
7457 ) -> hipError_t;
7458}
7459extern "C" {
7460 #[doc = " @brief Launch a kernel.\n\n @param [in] func Kernel to launch.\n\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue\n"]
7461 pub fn hipLaunchByPtr(func: *const ::std::os::raw::c_void) -> hipError_t;
7462}
7463extern "C" {
7464 #[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"]
7465 pub fn __hipPushCallConfiguration(
7466 gridDim: dim3,
7467 blockDim: dim3,
7468 sharedMem: usize,
7469 stream: hipStream_t,
7470 ) -> hipError_t;
7471}
7472extern "C" {
7473 #[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"]
7474 pub fn __hipPopCallConfiguration(
7475 gridDim: *mut dim3,
7476 blockDim: *mut dim3,
7477 sharedMem: *mut usize,
7478 stream: *mut hipStream_t,
7479 ) -> hipError_t;
7480}
7481extern "C" {
7482 #[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"]
7483 pub fn hipLaunchKernel(
7484 function_address: *const ::std::os::raw::c_void,
7485 numBlocks: dim3,
7486 dimBlocks: dim3,
7487 args: *mut *mut ::std::os::raw::c_void,
7488 sharedMemBytes: usize,
7489 stream: hipStream_t,
7490 ) -> hipError_t;
7491}
7492extern "C" {
7493 #[doc = " @brief Enqueues a host function call in a stream.\n\n @param [in] stream - The stream to enqueue work in.\n @param [in] fn - The function to call once enqueued preceeding operations are complete.\n @param [in] userData - User-specified data to be passed to the function.\n\n @returns #hipSuccess, #hipErrorInvalidResourceHandle, #hipErrorInvalidValue,\n #hipErrorNotSupported\n\n The host function to call in this API will be executed after the preceding operations in\n the stream are complete. The function is a blocking operation that blocks operations in the\n stream that follow it, until the function is returned.\n Event synchronization and internal callback functions make sure enqueued operations will\n execute in order, in the stream.\n\n The host function must not make any HIP API calls. The host function is non-reentrant. It must\n not perform sychronization with any operation that may depend on other processing execution\n but is not enqueued to run earlier in the stream.\n\n Host functions that are enqueued respectively in different non-blocking streams can run\n concurrently.\n\n @warning This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."]
7494 pub fn hipLaunchHostFunc(
7495 stream: hipStream_t,
7496 fn_: hipHostFn_t,
7497 userData: *mut ::std::os::raw::c_void,
7498 ) -> hipError_t;
7499}
7500extern "C" {
7501 #[doc = " Copies memory for 2D arrays.\n\n @param pCopy - Parameters for the memory copy\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
7502 pub fn hipDrvMemcpy2DUnaligned(pCopy: *const hip_Memcpy2D) -> hipError_t;
7503}
7504extern "C" {
7505 #[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"]
7506 pub fn hipExtLaunchKernel(
7507 function_address: *const ::std::os::raw::c_void,
7508 numBlocks: dim3,
7509 dimBlocks: dim3,
7510 args: *mut *mut ::std::os::raw::c_void,
7511 sharedMemBytes: usize,
7512 stream: hipStream_t,
7513 startEvent: hipEvent_t,
7514 stopEvent: hipEvent_t,
7515 flags: ::std::os::raw::c_int,
7516 ) -> hipError_t;
7517}
7518extern "C" {
7519 #[doc = " @brief Creates a texture object.\n\n @param [out] pTexObject pointer to the texture object to create\n @param [in] pResDesc pointer to resource descriptor\n @param [in] pTexDesc pointer to texture descriptor\n @param [in] pResViewDesc pointer to resource view descriptor\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported, #hipErrorOutOfMemory\n\n @note 3D linear filter isn't supported on GFX90A boards, on which the API @p\n hipCreateTextureObject will return hipErrorNotSupported.\n"]
7520 pub fn hipCreateTextureObject(
7521 pTexObject: *mut hipTextureObject_t,
7522 pResDesc: *const hipResourceDesc,
7523 pTexDesc: *const hipTextureDesc,
7524 pResViewDesc: *const hipResourceViewDesc,
7525 ) -> hipError_t;
7526}
7527extern "C" {
7528 #[doc = " @brief Destroys a texture object.\n\n @param [in] textureObject texture object to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7529 pub fn hipDestroyTextureObject(textureObject: hipTextureObject_t) -> hipError_t;
7530}
7531extern "C" {
7532 #[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"]
7533 pub fn hipGetChannelDesc(
7534 desc: *mut hipChannelFormatDesc,
7535 array: hipArray_const_t,
7536 ) -> hipError_t;
7537}
7538extern "C" {
7539 #[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"]
7540 pub fn hipGetTextureObjectResourceDesc(
7541 pResDesc: *mut hipResourceDesc,
7542 textureObject: hipTextureObject_t,
7543 ) -> hipError_t;
7544}
7545extern "C" {
7546 #[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"]
7547 pub fn hipGetTextureObjectResourceViewDesc(
7548 pResViewDesc: *mut hipResourceViewDesc,
7549 textureObject: hipTextureObject_t,
7550 ) -> hipError_t;
7551}
7552extern "C" {
7553 #[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"]
7554 pub fn hipGetTextureObjectTextureDesc(
7555 pTexDesc: *mut hipTextureDesc,
7556 textureObject: hipTextureObject_t,
7557 ) -> hipError_t;
7558}
7559extern "C" {
7560 #[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"]
7561 pub fn hipTexObjectCreate(
7562 pTexObject: *mut hipTextureObject_t,
7563 pResDesc: *const HIP_RESOURCE_DESC,
7564 pTexDesc: *const HIP_TEXTURE_DESC,
7565 pResViewDesc: *const HIP_RESOURCE_VIEW_DESC,
7566 ) -> hipError_t;
7567}
7568extern "C" {
7569 #[doc = " @brief Destroys a texture object.\n\n @param [in] texObject texture object to destroy\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7570 pub fn hipTexObjectDestroy(texObject: hipTextureObject_t) -> hipError_t;
7571}
7572extern "C" {
7573 #[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"]
7574 pub fn hipTexObjectGetResourceDesc(
7575 pResDesc: *mut HIP_RESOURCE_DESC,
7576 texObject: hipTextureObject_t,
7577 ) -> hipError_t;
7578}
7579extern "C" {
7580 #[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"]
7581 pub fn hipTexObjectGetResourceViewDesc(
7582 pResViewDesc: *mut HIP_RESOURCE_VIEW_DESC,
7583 texObject: hipTextureObject_t,
7584 ) -> hipError_t;
7585}
7586extern "C" {
7587 #[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"]
7588 pub fn hipTexObjectGetTextureDesc(
7589 pTexDesc: *mut HIP_TEXTURE_DESC,
7590 texObject: hipTextureObject_t,
7591 ) -> hipError_t;
7592}
7593extern "C" {
7594 #[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"]
7595 pub fn hipMallocMipmappedArray(
7596 mipmappedArray: *mut hipMipmappedArray_t,
7597 desc: *const hipChannelFormatDesc,
7598 extent: hipExtent,
7599 numLevels: ::std::os::raw::c_uint,
7600 flags: ::std::os::raw::c_uint,
7601 ) -> hipError_t;
7602}
7603extern "C" {
7604 #[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"]
7605 pub fn hipFreeMipmappedArray(mipmappedArray: hipMipmappedArray_t) -> hipError_t;
7606}
7607extern "C" {
7608 #[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"]
7609 pub fn hipGetMipmappedArrayLevel(
7610 levelArray: *mut hipArray_t,
7611 mipmappedArray: hipMipmappedArray_const_t,
7612 level: ::std::os::raw::c_uint,
7613 ) -> hipError_t;
7614}
7615extern "C" {
7616 #[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."]
7617 pub fn hipMipmappedArrayCreate(
7618 pHandle: *mut hipMipmappedArray_t,
7619 pMipmappedArrayDesc: *mut HIP_ARRAY3D_DESCRIPTOR,
7620 numMipmapLevels: ::std::os::raw::c_uint,
7621 ) -> hipError_t;
7622}
7623extern "C" {
7624 #[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"]
7625 pub fn hipMipmappedArrayDestroy(hMipmappedArray: hipMipmappedArray_t) -> hipError_t;
7626}
7627extern "C" {
7628 #[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"]
7629 pub fn hipMipmappedArrayGetLevel(
7630 pLevelArray: *mut hipArray_t,
7631 hMipMappedArray: hipMipmappedArray_t,
7632 level: ::std::os::raw::c_uint,
7633 ) -> hipError_t;
7634}
7635extern "C" {
7636 #[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"]
7637 pub fn hipBindTextureToMipmappedArray(
7638 tex: *const textureReference,
7639 mipmappedArray: hipMipmappedArray_const_t,
7640 desc: *const hipChannelFormatDesc,
7641 ) -> hipError_t;
7642}
7643extern "C" {
7644 #[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"]
7645 pub fn hipGetTextureReference(
7646 texref: *mut *const textureReference,
7647 symbol: *const ::std::os::raw::c_void,
7648 ) -> hipError_t;
7649}
7650extern "C" {
7651 #[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"]
7652 pub fn hipTexRefGetBorderColor(
7653 pBorderColor: *mut f32,
7654 texRef: *const textureReference,
7655 ) -> hipError_t;
7656}
7657extern "C" {
7658 #[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"]
7659 pub fn hipTexRefGetArray(
7660 pArray: *mut hipArray_t,
7661 texRef: *const textureReference,
7662 ) -> hipError_t;
7663}
7664extern "C" {
7665 #[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"]
7666 pub fn hipTexRefSetAddressMode(
7667 texRef: *mut textureReference,
7668 dim: ::std::os::raw::c_int,
7669 am: hipTextureAddressMode,
7670 ) -> hipError_t;
7671}
7672extern "C" {
7673 #[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"]
7674 pub fn hipTexRefSetArray(
7675 tex: *mut textureReference,
7676 array: hipArray_const_t,
7677 flags: ::std::os::raw::c_uint,
7678 ) -> hipError_t;
7679}
7680extern "C" {
7681 #[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"]
7682 pub fn hipTexRefSetFilterMode(
7683 texRef: *mut textureReference,
7684 fm: hipTextureFilterMode,
7685 ) -> hipError_t;
7686}
7687extern "C" {
7688 #[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"]
7689 pub fn hipTexRefSetFlags(
7690 texRef: *mut textureReference,
7691 Flags: ::std::os::raw::c_uint,
7692 ) -> hipError_t;
7693}
7694extern "C" {
7695 #[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"]
7696 pub fn hipTexRefSetFormat(
7697 texRef: *mut textureReference,
7698 fmt: hipArray_Format,
7699 NumPackedComponents: ::std::os::raw::c_int,
7700 ) -> hipError_t;
7701}
7702extern "C" {
7703 #[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"]
7704 pub fn hipBindTexture(
7705 offset: *mut usize,
7706 tex: *const textureReference,
7707 devPtr: *const ::std::os::raw::c_void,
7708 desc: *const hipChannelFormatDesc,
7709 size: usize,
7710 ) -> hipError_t;
7711}
7712extern "C" {
7713 #[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"]
7714 pub fn hipBindTexture2D(
7715 offset: *mut usize,
7716 tex: *const textureReference,
7717 devPtr: *const ::std::os::raw::c_void,
7718 desc: *const hipChannelFormatDesc,
7719 width: usize,
7720 height: usize,
7721 pitch: usize,
7722 ) -> hipError_t;
7723}
7724extern "C" {
7725 #[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"]
7726 pub fn hipBindTextureToArray(
7727 tex: *const textureReference,
7728 array: hipArray_const_t,
7729 desc: *const hipChannelFormatDesc,
7730 ) -> hipError_t;
7731}
7732extern "C" {
7733 #[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"]
7734 pub fn hipGetTextureAlignmentOffset(
7735 offset: *mut usize,
7736 texref: *const textureReference,
7737 ) -> hipError_t;
7738}
7739extern "C" {
7740 #[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"]
7741 pub fn hipUnbindTexture(tex: *const textureReference) -> hipError_t;
7742}
7743extern "C" {
7744 #[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"]
7745 pub fn hipTexRefGetAddress(
7746 dev_ptr: *mut hipDeviceptr_t,
7747 texRef: *const textureReference,
7748 ) -> hipError_t;
7749}
7750extern "C" {
7751 #[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"]
7752 pub fn hipTexRefGetAddressMode(
7753 pam: *mut hipTextureAddressMode,
7754 texRef: *const textureReference,
7755 dim: ::std::os::raw::c_int,
7756 ) -> hipError_t;
7757}
7758extern "C" {
7759 #[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"]
7760 pub fn hipTexRefGetFilterMode(
7761 pfm: *mut hipTextureFilterMode,
7762 texRef: *const textureReference,
7763 ) -> hipError_t;
7764}
7765extern "C" {
7766 #[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"]
7767 pub fn hipTexRefGetFlags(
7768 pFlags: *mut ::std::os::raw::c_uint,
7769 texRef: *const textureReference,
7770 ) -> hipError_t;
7771}
7772extern "C" {
7773 #[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"]
7774 pub fn hipTexRefGetFormat(
7775 pFormat: *mut hipArray_Format,
7776 pNumChannels: *mut ::std::os::raw::c_int,
7777 texRef: *const textureReference,
7778 ) -> hipError_t;
7779}
7780extern "C" {
7781 #[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"]
7782 pub fn hipTexRefGetMaxAnisotropy(
7783 pmaxAnsio: *mut ::std::os::raw::c_int,
7784 texRef: *const textureReference,
7785 ) -> hipError_t;
7786}
7787extern "C" {
7788 #[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"]
7789 pub fn hipTexRefGetMipmapFilterMode(
7790 pfm: *mut hipTextureFilterMode,
7791 texRef: *const textureReference,
7792 ) -> hipError_t;
7793}
7794extern "C" {
7795 #[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"]
7796 pub fn hipTexRefGetMipmapLevelBias(
7797 pbias: *mut f32,
7798 texRef: *const textureReference,
7799 ) -> hipError_t;
7800}
7801extern "C" {
7802 #[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"]
7803 pub fn hipTexRefGetMipmapLevelClamp(
7804 pminMipmapLevelClamp: *mut f32,
7805 pmaxMipmapLevelClamp: *mut f32,
7806 texRef: *const textureReference,
7807 ) -> hipError_t;
7808}
7809extern "C" {
7810 #[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"]
7811 pub fn hipTexRefGetMipMappedArray(
7812 pArray: *mut hipMipmappedArray_t,
7813 texRef: *const textureReference,
7814 ) -> hipError_t;
7815}
7816extern "C" {
7817 #[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"]
7818 pub fn hipTexRefSetAddress(
7819 ByteOffset: *mut usize,
7820 texRef: *mut textureReference,
7821 dptr: hipDeviceptr_t,
7822 bytes: usize,
7823 ) -> hipError_t;
7824}
7825extern "C" {
7826 #[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"]
7827 pub fn hipTexRefSetAddress2D(
7828 texRef: *mut textureReference,
7829 desc: *const HIP_ARRAY_DESCRIPTOR,
7830 dptr: hipDeviceptr_t,
7831 Pitch: usize,
7832 ) -> hipError_t;
7833}
7834extern "C" {
7835 #[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"]
7836 pub fn hipTexRefSetMaxAnisotropy(
7837 texRef: *mut textureReference,
7838 maxAniso: ::std::os::raw::c_uint,
7839 ) -> hipError_t;
7840}
7841extern "C" {
7842 #[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"]
7843 pub fn hipTexRefSetBorderColor(
7844 texRef: *mut textureReference,
7845 pBorderColor: *mut f32,
7846 ) -> hipError_t;
7847}
7848extern "C" {
7849 #[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"]
7850 pub fn hipTexRefSetMipmapFilterMode(
7851 texRef: *mut textureReference,
7852 fm: hipTextureFilterMode,
7853 ) -> hipError_t;
7854}
7855extern "C" {
7856 #[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"]
7857 pub fn hipTexRefSetMipmapLevelBias(texRef: *mut textureReference, bias: f32) -> hipError_t;
7858}
7859extern "C" {
7860 #[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"]
7861 pub fn hipTexRefSetMipmapLevelClamp(
7862 texRef: *mut textureReference,
7863 minMipMapLevelClamp: f32,
7864 maxMipMapLevelClamp: f32,
7865 ) -> hipError_t;
7866}
7867extern "C" {
7868 #[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"]
7869 pub fn hipTexRefSetMipmappedArray(
7870 texRef: *mut textureReference,
7871 mipmappedArray: *mut hipMipmappedArray,
7872 Flags: ::std::os::raw::c_uint,
7873 ) -> hipError_t;
7874}
7875extern "C" {
7876 #[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"]
7877 pub fn hipApiName(id: u32) -> *const ::std::os::raw::c_char;
7878}
7879extern "C" {
7880 #[doc = " @brief Returns kernel name reference by function name.\n\n @param [in] f Name of function\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7881 pub fn hipKernelNameRef(f: hipFunction_t) -> *const ::std::os::raw::c_char;
7882}
7883extern "C" {
7884 #[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 The name of the passed kernel function object, or nullptr.\n"]
7885 pub fn hipKernelNameRefByPtr(
7886 hostFunction: *const ::std::os::raw::c_void,
7887 stream: hipStream_t,
7888 ) -> *const ::std::os::raw::c_char;
7889}
7890extern "C" {
7891 #[doc = " @brief Returns device ID on the stream.\n\n @param [in] stream Stream of device executed on.\n\n @returns The device ID on the stream.\n"]
7892 pub fn hipGetStreamDeviceId(stream: hipStream_t) -> ::std::os::raw::c_int;
7893}
7894extern "C" {
7895 #[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"]
7896 pub fn hipStreamBeginCapture(stream: hipStream_t, mode: hipStreamCaptureMode) -> hipError_t;
7897}
7898extern "C" {
7899 #[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."]
7900 pub fn hipStreamBeginCaptureToGraph(
7901 stream: hipStream_t,
7902 graph: hipGraph_t,
7903 dependencies: *const hipGraphNode_t,
7904 dependencyData: *const hipGraphEdgeData,
7905 numDependencies: usize,
7906 mode: hipStreamCaptureMode,
7907 ) -> hipError_t;
7908}
7909extern "C" {
7910 #[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"]
7911 pub fn hipStreamEndCapture(stream: hipStream_t, pGraph: *mut hipGraph_t) -> hipError_t;
7912}
7913extern "C" {
7914 #[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"]
7915 pub fn hipStreamGetCaptureInfo(
7916 stream: hipStream_t,
7917 pCaptureStatus: *mut hipStreamCaptureStatus,
7918 pId: *mut ::std::os::raw::c_ulonglong,
7919 ) -> hipError_t;
7920}
7921extern "C" {
7922 #[doc = " @brief Get stream's capture state\n\n @param [in] stream - Stream of which to get capture status from.\n @param [out] captureStatus_out - Returns current capture status.\n @param [out] id_out - Unique capture ID.\n @param [out] graph_out - Returns the graph being captured into.\n @param [out] dependencies_out - Pointer to an array of nodes representing the graphs\n dependencies.\n @param [out] numDependencies_out - Returns size of the array returned in dependencies_out.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorStreamCaptureImplicit\n"]
7923 pub fn hipStreamGetCaptureInfo_v2(
7924 stream: hipStream_t,
7925 captureStatus_out: *mut hipStreamCaptureStatus,
7926 id_out: *mut ::std::os::raw::c_ulonglong,
7927 graph_out: *mut hipGraph_t,
7928 dependencies_out: *mut *const hipGraphNode_t,
7929 numDependencies_out: *mut usize,
7930 ) -> hipError_t;
7931}
7932extern "C" {
7933 #[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"]
7934 pub fn hipStreamIsCapturing(
7935 stream: hipStream_t,
7936 pCaptureStatus: *mut hipStreamCaptureStatus,
7937 ) -> hipError_t;
7938}
7939extern "C" {
7940 #[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"]
7941 pub fn hipStreamUpdateCaptureDependencies(
7942 stream: hipStream_t,
7943 dependencies: *mut hipGraphNode_t,
7944 numDependencies: usize,
7945 flags: ::std::os::raw::c_uint,
7946 ) -> hipError_t;
7947}
7948extern "C" {
7949 #[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"]
7950 pub fn hipThreadExchangeStreamCaptureMode(mode: *mut hipStreamCaptureMode) -> hipError_t;
7951}
7952extern "C" {
7953 #[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"]
7954 pub fn hipGraphCreate(pGraph: *mut hipGraph_t, flags: ::std::os::raw::c_uint) -> hipError_t;
7955}
7956extern "C" {
7957 #[doc = " @brief Destroys a graph\n\n @param [in] graph - instance of graph to destroy.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
7958 pub fn hipGraphDestroy(graph: hipGraph_t) -> hipError_t;
7959}
7960extern "C" {
7961 #[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"]
7962 pub fn hipGraphAddDependencies(
7963 graph: hipGraph_t,
7964 from: *const hipGraphNode_t,
7965 to: *const hipGraphNode_t,
7966 numDependencies: usize,
7967 ) -> hipError_t;
7968}
7969extern "C" {
7970 #[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"]
7971 pub fn hipGraphRemoveDependencies(
7972 graph: hipGraph_t,
7973 from: *const hipGraphNode_t,
7974 to: *const hipGraphNode_t,
7975 numDependencies: usize,
7976 ) -> hipError_t;
7977}
7978extern "C" {
7979 #[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"]
7980 pub fn hipGraphGetEdges(
7981 graph: hipGraph_t,
7982 from: *mut hipGraphNode_t,
7983 to: *mut hipGraphNode_t,
7984 numEdges: *mut usize,
7985 ) -> hipError_t;
7986}
7987extern "C" {
7988 #[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"]
7989 pub fn hipGraphGetNodes(
7990 graph: hipGraph_t,
7991 nodes: *mut hipGraphNode_t,
7992 numNodes: *mut usize,
7993 ) -> hipError_t;
7994}
7995extern "C" {
7996 #[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"]
7997 pub fn hipGraphGetRootNodes(
7998 graph: hipGraph_t,
7999 pRootNodes: *mut hipGraphNode_t,
8000 pNumRootNodes: *mut usize,
8001 ) -> hipError_t;
8002}
8003extern "C" {
8004 #[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"]
8005 pub fn hipGraphNodeGetDependencies(
8006 node: hipGraphNode_t,
8007 pDependencies: *mut hipGraphNode_t,
8008 pNumDependencies: *mut usize,
8009 ) -> hipError_t;
8010}
8011extern "C" {
8012 #[doc = " @brief Returns a node's dependent nodes.\n\n @param [in] node - Graph node to get the dependent nodes from.\n @param [out] pDependentNodes - Pointer to return the graph dependent nodes.\n @param [out] pNumDependentNodes - Returns the number of graph node dependent nodes.\n @returns #hipSuccess, #hipErrorInvalidValue\n\n pDependentNodes may be NULL, in which case this function will return the number of dependent\n nodes in pNumDependentNodes. Otherwise, pNumDependentNodes entries will be filled in. If\n pNumDependentNodes is higher than the actual number of dependent nodes, the remaining entries in\n pDependentNodes will be set to NULL, and the number of nodes actually obtained will be returned\n in pNumDependentNodes.\n"]
8013 pub fn hipGraphNodeGetDependentNodes(
8014 node: hipGraphNode_t,
8015 pDependentNodes: *mut hipGraphNode_t,
8016 pNumDependentNodes: *mut usize,
8017 ) -> hipError_t;
8018}
8019extern "C" {
8020 #[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"]
8021 pub fn hipGraphNodeGetType(node: hipGraphNode_t, pType: *mut hipGraphNodeType) -> hipError_t;
8022}
8023extern "C" {
8024 #[doc = " @brief Remove a node from the graph.\n\n @param [in] node - graph node to remove\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8025 pub fn hipGraphDestroyNode(node: hipGraphNode_t) -> hipError_t;
8026}
8027extern "C" {
8028 #[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"]
8029 pub fn hipGraphClone(pGraphClone: *mut hipGraph_t, originalGraph: hipGraph_t) -> hipError_t;
8030}
8031extern "C" {
8032 #[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"]
8033 pub fn hipGraphNodeFindInClone(
8034 pNode: *mut hipGraphNode_t,
8035 originalNode: hipGraphNode_t,
8036 clonedGraph: hipGraph_t,
8037 ) -> hipError_t;
8038}
8039extern "C" {
8040 #[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"]
8041 pub fn hipGraphInstantiate(
8042 pGraphExec: *mut hipGraphExec_t,
8043 graph: hipGraph_t,
8044 pErrorNode: *mut hipGraphNode_t,
8045 pLogBuffer: *mut ::std::os::raw::c_char,
8046 bufferSize: usize,
8047 ) -> hipError_t;
8048}
8049extern "C" {
8050 #[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."]
8051 pub fn hipGraphInstantiateWithFlags(
8052 pGraphExec: *mut hipGraphExec_t,
8053 graph: hipGraph_t,
8054 flags: ::std::os::raw::c_ulonglong,
8055 ) -> hipError_t;
8056}
8057extern "C" {
8058 #[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"]
8059 pub fn hipGraphInstantiateWithParams(
8060 pGraphExec: *mut hipGraphExec_t,
8061 graph: hipGraph_t,
8062 instantiateParams: *mut hipGraphInstantiateParams,
8063 ) -> hipError_t;
8064}
8065extern "C" {
8066 #[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"]
8067 pub fn hipGraphLaunch(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
8068}
8069extern "C" {
8070 #[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"]
8071 pub fn hipGraphUpload(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
8072}
8073extern "C" {
8074 #[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"]
8075 pub fn hipGraphAddNode(
8076 pGraphNode: *mut hipGraphNode_t,
8077 graph: hipGraph_t,
8078 pDependencies: *const hipGraphNode_t,
8079 numDependencies: usize,
8080 nodeParams: *mut hipGraphNodeParams,
8081 ) -> hipError_t;
8082}
8083extern "C" {
8084 #[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"]
8085 pub fn hipGraphExecGetFlags(
8086 graphExec: hipGraphExec_t,
8087 flags: *mut ::std::os::raw::c_ulonglong,
8088 ) -> hipError_t;
8089}
8090extern "C" {
8091 #[doc = " @brief Updates parameters of a graph's node.\n\n @param [in] node - Instance of the node to set parameters for.\n @param [in] nodeParams - Pointer to the parameters to be set.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction,\n #hipErrorNotSupported.\n"]
8092 pub fn hipGraphNodeSetParams(
8093 node: hipGraphNode_t,
8094 nodeParams: *mut hipGraphNodeParams,
8095 ) -> hipError_t;
8096}
8097extern "C" {
8098 #[doc = " @brief Updates parameters of an executable graph's node.\n\n @param [in] graphExec - Instance of the executable graph.\n @param [in] node - Instance of the node to set parameters to.\n @param [in] nodeParams - Pointer to the parameters to be set.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction,\n #hipErrorNotSupported.\n"]
8099 pub fn hipGraphExecNodeSetParams(
8100 graphExec: hipGraphExec_t,
8101 node: hipGraphNode_t,
8102 nodeParams: *mut hipGraphNodeParams,
8103 ) -> hipError_t;
8104}
8105extern "C" {
8106 #[doc = " @brief Destroys an executable graph\n\n @param [in] graphExec - Instance of executable graph to destroy.\n\n @returns #hipSuccess.\n"]
8107 pub fn hipGraphExecDestroy(graphExec: hipGraphExec_t) -> hipError_t;
8108}
8109extern "C" {
8110 #[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"]
8111 pub fn hipGraphExecUpdate(
8112 hGraphExec: hipGraphExec_t,
8113 hGraph: hipGraph_t,
8114 hErrorNode_out: *mut hipGraphNode_t,
8115 updateResult_out: *mut hipGraphExecUpdateResult,
8116 ) -> hipError_t;
8117}
8118extern "C" {
8119 #[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"]
8120 pub fn hipGraphAddKernelNode(
8121 pGraphNode: *mut hipGraphNode_t,
8122 graph: hipGraph_t,
8123 pDependencies: *const hipGraphNode_t,
8124 numDependencies: usize,
8125 pNodeParams: *const hipKernelNodeParams,
8126 ) -> hipError_t;
8127}
8128extern "C" {
8129 #[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"]
8130 pub fn hipGraphKernelNodeGetParams(
8131 node: hipGraphNode_t,
8132 pNodeParams: *mut hipKernelNodeParams,
8133 ) -> hipError_t;
8134}
8135extern "C" {
8136 #[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"]
8137 pub fn hipGraphKernelNodeSetParams(
8138 node: hipGraphNode_t,
8139 pNodeParams: *const hipKernelNodeParams,
8140 ) -> hipError_t;
8141}
8142extern "C" {
8143 #[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"]
8144 pub fn hipGraphExecKernelNodeSetParams(
8145 hGraphExec: hipGraphExec_t,
8146 node: hipGraphNode_t,
8147 pNodeParams: *const hipKernelNodeParams,
8148 ) -> hipError_t;
8149}
8150extern "C" {
8151 #[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"]
8152 pub fn hipDrvGraphAddMemcpyNode(
8153 phGraphNode: *mut hipGraphNode_t,
8154 hGraph: hipGraph_t,
8155 dependencies: *const hipGraphNode_t,
8156 numDependencies: usize,
8157 copyParams: *const HIP_MEMCPY3D,
8158 ctx: hipCtx_t,
8159 ) -> hipError_t;
8160}
8161extern "C" {
8162 #[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"]
8163 pub fn hipGraphAddMemcpyNode(
8164 pGraphNode: *mut hipGraphNode_t,
8165 graph: hipGraph_t,
8166 pDependencies: *const hipGraphNode_t,
8167 numDependencies: usize,
8168 pCopyParams: *const hipMemcpy3DParms,
8169 ) -> hipError_t;
8170}
8171extern "C" {
8172 #[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"]
8173 pub fn hipGraphMemcpyNodeGetParams(
8174 node: hipGraphNode_t,
8175 pNodeParams: *mut hipMemcpy3DParms,
8176 ) -> hipError_t;
8177}
8178extern "C" {
8179 #[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"]
8180 pub fn hipGraphMemcpyNodeSetParams(
8181 node: hipGraphNode_t,
8182 pNodeParams: *const hipMemcpy3DParms,
8183 ) -> hipError_t;
8184}
8185extern "C" {
8186 #[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"]
8187 pub fn hipGraphKernelNodeSetAttribute(
8188 hNode: hipGraphNode_t,
8189 attr: hipLaunchAttributeID,
8190 value: *const hipLaunchAttributeValue,
8191 ) -> hipError_t;
8192}
8193extern "C" {
8194 #[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"]
8195 pub fn hipGraphKernelNodeGetAttribute(
8196 hNode: hipGraphNode_t,
8197 attr: hipLaunchAttributeID,
8198 value: *mut hipLaunchAttributeValue,
8199 ) -> hipError_t;
8200}
8201extern "C" {
8202 #[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"]
8203 pub fn hipGraphExecMemcpyNodeSetParams(
8204 hGraphExec: hipGraphExec_t,
8205 node: hipGraphNode_t,
8206 pNodeParams: *mut hipMemcpy3DParms,
8207 ) -> hipError_t;
8208}
8209extern "C" {
8210 #[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"]
8211 pub fn hipGraphAddMemcpyNode1D(
8212 pGraphNode: *mut hipGraphNode_t,
8213 graph: hipGraph_t,
8214 pDependencies: *const hipGraphNode_t,
8215 numDependencies: usize,
8216 dst: *mut ::std::os::raw::c_void,
8217 src: *const ::std::os::raw::c_void,
8218 count: usize,
8219 kind: hipMemcpyKind,
8220 ) -> hipError_t;
8221}
8222extern "C" {
8223 #[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"]
8224 pub fn hipGraphMemcpyNodeSetParams1D(
8225 node: hipGraphNode_t,
8226 dst: *mut ::std::os::raw::c_void,
8227 src: *const ::std::os::raw::c_void,
8228 count: usize,
8229 kind: hipMemcpyKind,
8230 ) -> hipError_t;
8231}
8232extern "C" {
8233 #[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"]
8234 pub fn hipGraphExecMemcpyNodeSetParams1D(
8235 hGraphExec: hipGraphExec_t,
8236 node: hipGraphNode_t,
8237 dst: *mut ::std::os::raw::c_void,
8238 src: *const ::std::os::raw::c_void,
8239 count: usize,
8240 kind: hipMemcpyKind,
8241 ) -> hipError_t;
8242}
8243extern "C" {
8244 #[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"]
8245 pub fn hipGraphAddMemcpyNodeFromSymbol(
8246 pGraphNode: *mut hipGraphNode_t,
8247 graph: hipGraph_t,
8248 pDependencies: *const hipGraphNode_t,
8249 numDependencies: usize,
8250 dst: *mut ::std::os::raw::c_void,
8251 symbol: *const ::std::os::raw::c_void,
8252 count: usize,
8253 offset: usize,
8254 kind: hipMemcpyKind,
8255 ) -> hipError_t;
8256}
8257extern "C" {
8258 #[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"]
8259 pub fn hipGraphMemcpyNodeSetParamsFromSymbol(
8260 node: hipGraphNode_t,
8261 dst: *mut ::std::os::raw::c_void,
8262 symbol: *const ::std::os::raw::c_void,
8263 count: usize,
8264 offset: usize,
8265 kind: hipMemcpyKind,
8266 ) -> hipError_t;
8267}
8268extern "C" {
8269 #[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"]
8270 pub fn hipGraphExecMemcpyNodeSetParamsFromSymbol(
8271 hGraphExec: hipGraphExec_t,
8272 node: hipGraphNode_t,
8273 dst: *mut ::std::os::raw::c_void,
8274 symbol: *const ::std::os::raw::c_void,
8275 count: usize,
8276 offset: usize,
8277 kind: hipMemcpyKind,
8278 ) -> hipError_t;
8279}
8280extern "C" {
8281 #[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"]
8282 pub fn hipGraphAddMemcpyNodeToSymbol(
8283 pGraphNode: *mut hipGraphNode_t,
8284 graph: hipGraph_t,
8285 pDependencies: *const hipGraphNode_t,
8286 numDependencies: usize,
8287 symbol: *const ::std::os::raw::c_void,
8288 src: *const ::std::os::raw::c_void,
8289 count: usize,
8290 offset: usize,
8291 kind: hipMemcpyKind,
8292 ) -> hipError_t;
8293}
8294extern "C" {
8295 #[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"]
8296 pub fn hipGraphMemcpyNodeSetParamsToSymbol(
8297 node: hipGraphNode_t,
8298 symbol: *const ::std::os::raw::c_void,
8299 src: *const ::std::os::raw::c_void,
8300 count: usize,
8301 offset: usize,
8302 kind: hipMemcpyKind,
8303 ) -> hipError_t;
8304}
8305extern "C" {
8306 #[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"]
8307 pub fn hipGraphExecMemcpyNodeSetParamsToSymbol(
8308 hGraphExec: hipGraphExec_t,
8309 node: hipGraphNode_t,
8310 symbol: *const ::std::os::raw::c_void,
8311 src: *const ::std::os::raw::c_void,
8312 count: usize,
8313 offset: usize,
8314 kind: hipMemcpyKind,
8315 ) -> hipError_t;
8316}
8317extern "C" {
8318 #[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"]
8319 pub fn hipGraphAddMemsetNode(
8320 pGraphNode: *mut hipGraphNode_t,
8321 graph: hipGraph_t,
8322 pDependencies: *const hipGraphNode_t,
8323 numDependencies: usize,
8324 pMemsetParams: *const hipMemsetParams,
8325 ) -> hipError_t;
8326}
8327extern "C" {
8328 #[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"]
8329 pub fn hipGraphMemsetNodeGetParams(
8330 node: hipGraphNode_t,
8331 pNodeParams: *mut hipMemsetParams,
8332 ) -> hipError_t;
8333}
8334extern "C" {
8335 #[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"]
8336 pub fn hipGraphMemsetNodeSetParams(
8337 node: hipGraphNode_t,
8338 pNodeParams: *const hipMemsetParams,
8339 ) -> hipError_t;
8340}
8341extern "C" {
8342 #[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"]
8343 pub fn hipGraphExecMemsetNodeSetParams(
8344 hGraphExec: hipGraphExec_t,
8345 node: hipGraphNode_t,
8346 pNodeParams: *const hipMemsetParams,
8347 ) -> hipError_t;
8348}
8349extern "C" {
8350 #[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"]
8351 pub fn hipGraphAddHostNode(
8352 pGraphNode: *mut hipGraphNode_t,
8353 graph: hipGraph_t,
8354 pDependencies: *const hipGraphNode_t,
8355 numDependencies: usize,
8356 pNodeParams: *const hipHostNodeParams,
8357 ) -> hipError_t;
8358}
8359extern "C" {
8360 #[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"]
8361 pub fn hipGraphHostNodeGetParams(
8362 node: hipGraphNode_t,
8363 pNodeParams: *mut hipHostNodeParams,
8364 ) -> hipError_t;
8365}
8366extern "C" {
8367 #[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"]
8368 pub fn hipGraphHostNodeSetParams(
8369 node: hipGraphNode_t,
8370 pNodeParams: *const hipHostNodeParams,
8371 ) -> hipError_t;
8372}
8373extern "C" {
8374 #[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"]
8375 pub fn hipGraphExecHostNodeSetParams(
8376 hGraphExec: hipGraphExec_t,
8377 node: hipGraphNode_t,
8378 pNodeParams: *const hipHostNodeParams,
8379 ) -> hipError_t;
8380}
8381extern "C" {
8382 #[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"]
8383 pub fn hipGraphAddChildGraphNode(
8384 pGraphNode: *mut hipGraphNode_t,
8385 graph: hipGraph_t,
8386 pDependencies: *const hipGraphNode_t,
8387 numDependencies: usize,
8388 childGraph: hipGraph_t,
8389 ) -> hipError_t;
8390}
8391extern "C" {
8392 #[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"]
8393 pub fn hipGraphChildGraphNodeGetGraph(
8394 node: hipGraphNode_t,
8395 pGraph: *mut hipGraph_t,
8396 ) -> hipError_t;
8397}
8398extern "C" {
8399 #[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"]
8400 pub fn hipGraphExecChildGraphNodeSetParams(
8401 hGraphExec: hipGraphExec_t,
8402 node: hipGraphNode_t,
8403 childGraph: hipGraph_t,
8404 ) -> hipError_t;
8405}
8406extern "C" {
8407 #[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"]
8408 pub fn hipGraphAddEmptyNode(
8409 pGraphNode: *mut hipGraphNode_t,
8410 graph: hipGraph_t,
8411 pDependencies: *const hipGraphNode_t,
8412 numDependencies: usize,
8413 ) -> hipError_t;
8414}
8415extern "C" {
8416 #[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"]
8417 pub fn hipGraphAddEventRecordNode(
8418 pGraphNode: *mut hipGraphNode_t,
8419 graph: hipGraph_t,
8420 pDependencies: *const hipGraphNode_t,
8421 numDependencies: usize,
8422 event: hipEvent_t,
8423 ) -> hipError_t;
8424}
8425extern "C" {
8426 #[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"]
8427 pub fn hipGraphEventRecordNodeGetEvent(
8428 node: hipGraphNode_t,
8429 event_out: *mut hipEvent_t,
8430 ) -> hipError_t;
8431}
8432extern "C" {
8433 #[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"]
8434 pub fn hipGraphEventRecordNodeSetEvent(node: hipGraphNode_t, event: hipEvent_t) -> hipError_t;
8435}
8436extern "C" {
8437 #[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"]
8438 pub fn hipGraphExecEventRecordNodeSetEvent(
8439 hGraphExec: hipGraphExec_t,
8440 hNode: hipGraphNode_t,
8441 event: hipEvent_t,
8442 ) -> hipError_t;
8443}
8444extern "C" {
8445 #[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"]
8446 pub fn hipGraphAddEventWaitNode(
8447 pGraphNode: *mut hipGraphNode_t,
8448 graph: hipGraph_t,
8449 pDependencies: *const hipGraphNode_t,
8450 numDependencies: usize,
8451 event: hipEvent_t,
8452 ) -> hipError_t;
8453}
8454extern "C" {
8455 #[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"]
8456 pub fn hipGraphEventWaitNodeGetEvent(
8457 node: hipGraphNode_t,
8458 event_out: *mut hipEvent_t,
8459 ) -> hipError_t;
8460}
8461extern "C" {
8462 #[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"]
8463 pub fn hipGraphEventWaitNodeSetEvent(node: hipGraphNode_t, event: hipEvent_t) -> hipError_t;
8464}
8465extern "C" {
8466 #[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"]
8467 pub fn hipGraphExecEventWaitNodeSetEvent(
8468 hGraphExec: hipGraphExec_t,
8469 hNode: hipGraphNode_t,
8470 event: hipEvent_t,
8471 ) -> hipError_t;
8472}
8473extern "C" {
8474 #[doc = " @brief Creates a memory allocation node and adds it to a graph\n\n @param [out] pGraphNode - Pointer to the graph node to create and add to the graph\n @param [in] graph - Instance of the graph node to be added\n @param [in] pDependencies - Const pointer to the node dependencies\n @param [in] numDependencies - The number of dependencies\n @param [in, out] pNodeParams - Node parameters for memory allocation, returns a pointer to the\n allocated memory.\n @returns #hipSuccess, #hipErrorInvalidValue\n"]
8475 pub fn hipGraphAddMemAllocNode(
8476 pGraphNode: *mut hipGraphNode_t,
8477 graph: hipGraph_t,
8478 pDependencies: *const hipGraphNode_t,
8479 numDependencies: usize,
8480 pNodeParams: *mut hipMemAllocNodeParams,
8481 ) -> hipError_t;
8482}
8483extern "C" {
8484 #[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"]
8485 pub fn hipGraphMemAllocNodeGetParams(
8486 node: hipGraphNode_t,
8487 pNodeParams: *mut hipMemAllocNodeParams,
8488 ) -> hipError_t;
8489}
8490extern "C" {
8491 #[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"]
8492 pub fn hipGraphAddMemFreeNode(
8493 pGraphNode: *mut hipGraphNode_t,
8494 graph: hipGraph_t,
8495 pDependencies: *const hipGraphNode_t,
8496 numDependencies: usize,
8497 dev_ptr: *mut ::std::os::raw::c_void,
8498 ) -> hipError_t;
8499}
8500extern "C" {
8501 #[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"]
8502 pub fn hipGraphMemFreeNodeGetParams(
8503 node: hipGraphNode_t,
8504 dev_ptr: *mut ::std::os::raw::c_void,
8505 ) -> hipError_t;
8506}
8507extern "C" {
8508 #[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"]
8509 pub fn hipDeviceGetGraphMemAttribute(
8510 device: ::std::os::raw::c_int,
8511 attr: hipGraphMemAttributeType,
8512 value: *mut ::std::os::raw::c_void,
8513 ) -> hipError_t;
8514}
8515extern "C" {
8516 #[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"]
8517 pub fn hipDeviceSetGraphMemAttribute(
8518 device: ::std::os::raw::c_int,
8519 attr: hipGraphMemAttributeType,
8520 value: *mut ::std::os::raw::c_void,
8521 ) -> hipError_t;
8522}
8523extern "C" {
8524 #[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"]
8525 pub fn hipDeviceGraphMemTrim(device: ::std::os::raw::c_int) -> hipError_t;
8526}
8527extern "C" {
8528 #[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"]
8529 pub fn hipUserObjectCreate(
8530 object_out: *mut hipUserObject_t,
8531 ptr: *mut ::std::os::raw::c_void,
8532 destroy: hipHostFn_t,
8533 initialRefcount: ::std::os::raw::c_uint,
8534 flags: ::std::os::raw::c_uint,
8535 ) -> hipError_t;
8536}
8537extern "C" {
8538 #[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"]
8539 pub fn hipUserObjectRelease(
8540 object: hipUserObject_t,
8541 count: ::std::os::raw::c_uint,
8542 ) -> hipError_t;
8543}
8544extern "C" {
8545 #[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"]
8546 pub fn hipUserObjectRetain(
8547 object: hipUserObject_t,
8548 count: ::std::os::raw::c_uint,
8549 ) -> hipError_t;
8550}
8551extern "C" {
8552 #[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"]
8553 pub fn hipGraphRetainUserObject(
8554 graph: hipGraph_t,
8555 object: hipUserObject_t,
8556 count: ::std::os::raw::c_uint,
8557 flags: ::std::os::raw::c_uint,
8558 ) -> hipError_t;
8559}
8560extern "C" {
8561 #[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"]
8562 pub fn hipGraphReleaseUserObject(
8563 graph: hipGraph_t,
8564 object: hipUserObject_t,
8565 count: ::std::os::raw::c_uint,
8566 ) -> hipError_t;
8567}
8568extern "C" {
8569 #[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"]
8570 pub fn hipGraphDebugDotPrint(
8571 graph: hipGraph_t,
8572 path: *const ::std::os::raw::c_char,
8573 flags: ::std::os::raw::c_uint,
8574 ) -> hipError_t;
8575}
8576extern "C" {
8577 #[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"]
8578 pub fn hipGraphKernelNodeCopyAttributes(
8579 hSrc: hipGraphNode_t,
8580 hDst: hipGraphNode_t,
8581 ) -> hipError_t;
8582}
8583extern "C" {
8584 #[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"]
8585 pub fn hipGraphNodeSetEnabled(
8586 hGraphExec: hipGraphExec_t,
8587 hNode: hipGraphNode_t,
8588 isEnabled: ::std::os::raw::c_uint,
8589 ) -> hipError_t;
8590}
8591extern "C" {
8592 #[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"]
8593 pub fn hipGraphNodeGetEnabled(
8594 hGraphExec: hipGraphExec_t,
8595 hNode: hipGraphNode_t,
8596 isEnabled: *mut ::std::os::raw::c_uint,
8597 ) -> hipError_t;
8598}
8599extern "C" {
8600 #[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"]
8601 pub fn hipGraphAddExternalSemaphoresWaitNode(
8602 pGraphNode: *mut hipGraphNode_t,
8603 graph: hipGraph_t,
8604 pDependencies: *const hipGraphNode_t,
8605 numDependencies: usize,
8606 nodeParams: *const hipExternalSemaphoreWaitNodeParams,
8607 ) -> hipError_t;
8608}
8609extern "C" {
8610 #[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"]
8611 pub fn hipGraphAddExternalSemaphoresSignalNode(
8612 pGraphNode: *mut hipGraphNode_t,
8613 graph: hipGraph_t,
8614 pDependencies: *const hipGraphNode_t,
8615 numDependencies: usize,
8616 nodeParams: *const hipExternalSemaphoreSignalNodeParams,
8617 ) -> hipError_t;
8618}
8619extern "C" {
8620 #[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"]
8621 pub fn hipGraphExternalSemaphoresSignalNodeSetParams(
8622 hNode: hipGraphNode_t,
8623 nodeParams: *const hipExternalSemaphoreSignalNodeParams,
8624 ) -> hipError_t;
8625}
8626extern "C" {
8627 #[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"]
8628 pub fn hipGraphExternalSemaphoresWaitNodeSetParams(
8629 hNode: hipGraphNode_t,
8630 nodeParams: *const hipExternalSemaphoreWaitNodeParams,
8631 ) -> hipError_t;
8632}
8633extern "C" {
8634 #[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"]
8635 pub fn hipGraphExternalSemaphoresSignalNodeGetParams(
8636 hNode: hipGraphNode_t,
8637 params_out: *mut hipExternalSemaphoreSignalNodeParams,
8638 ) -> hipError_t;
8639}
8640extern "C" {
8641 #[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"]
8642 pub fn hipGraphExternalSemaphoresWaitNodeGetParams(
8643 hNode: hipGraphNode_t,
8644 params_out: *mut hipExternalSemaphoreWaitNodeParams,
8645 ) -> hipError_t;
8646}
8647extern "C" {
8648 #[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"]
8649 pub fn hipGraphExecExternalSemaphoresSignalNodeSetParams(
8650 hGraphExec: hipGraphExec_t,
8651 hNode: hipGraphNode_t,
8652 nodeParams: *const hipExternalSemaphoreSignalNodeParams,
8653 ) -> hipError_t;
8654}
8655extern "C" {
8656 #[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"]
8657 pub fn hipGraphExecExternalSemaphoresWaitNodeSetParams(
8658 hGraphExec: hipGraphExec_t,
8659 hNode: hipGraphNode_t,
8660 nodeParams: *const hipExternalSemaphoreWaitNodeParams,
8661 ) -> hipError_t;
8662}
8663extern "C" {
8664 #[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"]
8665 pub fn hipDrvGraphMemcpyNodeGetParams(
8666 hNode: hipGraphNode_t,
8667 nodeParams: *mut HIP_MEMCPY3D,
8668 ) -> hipError_t;
8669}
8670extern "C" {
8671 #[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"]
8672 pub fn hipDrvGraphMemcpyNodeSetParams(
8673 hNode: hipGraphNode_t,
8674 nodeParams: *const HIP_MEMCPY3D,
8675 ) -> hipError_t;
8676}
8677extern "C" {
8678 #[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"]
8679 pub fn hipDrvGraphAddMemsetNode(
8680 phGraphNode: *mut hipGraphNode_t,
8681 hGraph: hipGraph_t,
8682 dependencies: *const hipGraphNode_t,
8683 numDependencies: usize,
8684 memsetParams: *const hipMemsetParams,
8685 ctx: hipCtx_t,
8686 ) -> hipError_t;
8687}
8688extern "C" {
8689 #[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"]
8690 pub fn hipDrvGraphAddMemFreeNode(
8691 phGraphNode: *mut hipGraphNode_t,
8692 hGraph: hipGraph_t,
8693 dependencies: *const hipGraphNode_t,
8694 numDependencies: usize,
8695 dptr: hipDeviceptr_t,
8696 ) -> hipError_t;
8697}
8698extern "C" {
8699 #[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"]
8700 pub fn hipDrvGraphExecMemcpyNodeSetParams(
8701 hGraphExec: hipGraphExec_t,
8702 hNode: hipGraphNode_t,
8703 copyParams: *const HIP_MEMCPY3D,
8704 ctx: hipCtx_t,
8705 ) -> hipError_t;
8706}
8707extern "C" {
8708 #[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"]
8709 pub fn hipDrvGraphExecMemsetNodeSetParams(
8710 hGraphExec: hipGraphExec_t,
8711 hNode: hipGraphNode_t,
8712 memsetParams: *const hipMemsetParams,
8713 ctx: hipCtx_t,
8714 ) -> hipError_t;
8715}
8716extern "C" {
8717 #[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\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8718 pub fn hipMemAddressFree(devPtr: *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
8719}
8720extern "C" {
8721 #[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\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8722 pub fn hipMemAddressReserve(
8723 ptr: *mut *mut ::std::os::raw::c_void,
8724 size: usize,
8725 alignment: usize,
8726 addr: *mut ::std::os::raw::c_void,
8727 flags: ::std::os::raw::c_ulonglong,
8728 ) -> hipError_t;
8729}
8730extern "C" {
8731 #[doc = " @brief Creates a memory handle for the allocation described by the properties and given 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\n This API creates a memory allocation on the target device specified through the prop structure.\n The prop allocation type must be specified as either #hipMemAllocationTypePinned or\n #hipMemAllocationTypeUncached.\n The prop location type must be specified as #hipMemLocationTypeDevice or #hipMemLocationTypeHost.\n Any other value results in #hipErrorInvalidValue.\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8732 pub fn hipMemCreate(
8733 handle: *mut hipMemGenericAllocationHandle_t,
8734 size: usize,
8735 prop: *const hipMemAllocationProp,
8736 flags: ::std::os::raw::c_ulonglong,
8737 ) -> hipError_t;
8738}
8739extern "C" {
8740 #[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\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8741 pub fn hipMemExportToShareableHandle(
8742 shareableHandle: *mut ::std::os::raw::c_void,
8743 handle: hipMemGenericAllocationHandle_t,
8744 handleType: hipMemAllocationHandleType,
8745 flags: ::std::os::raw::c_ulonglong,
8746 ) -> hipError_t;
8747}
8748extern "C" {
8749 #[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\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8750 pub fn hipMemGetAccess(
8751 flags: *mut ::std::os::raw::c_ulonglong,
8752 location: *const hipMemLocation,
8753 ptr: *mut ::std::os::raw::c_void,
8754 ) -> hipError_t;
8755}
8756extern "C" {
8757 #[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\n @note This API is implemented on Linux and is under development on Microsoft Windows.\n"]
8758 pub fn hipMemGetAllocationGranularity(
8759 granularity: *mut usize,
8760 prop: *const hipMemAllocationProp,
8761 option: hipMemAllocationGranularity_flags,
8762 ) -> hipError_t;
8763}
8764extern "C" {
8765 #[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\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8766 pub fn hipMemGetAllocationPropertiesFromHandle(
8767 prop: *mut hipMemAllocationProp,
8768 handle: hipMemGenericAllocationHandle_t,
8769 ) -> hipError_t;
8770}
8771extern "C" {
8772 #[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\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8773 pub fn hipMemImportFromShareableHandle(
8774 handle: *mut hipMemGenericAllocationHandle_t,
8775 osHandle: *mut ::std::os::raw::c_void,
8776 shHandleType: hipMemAllocationHandleType,
8777 ) -> hipError_t;
8778}
8779extern "C" {
8780 #[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\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8781 pub fn hipMemMap(
8782 ptr: *mut ::std::os::raw::c_void,
8783 size: usize,
8784 offset: usize,
8785 handle: hipMemGenericAllocationHandle_t,
8786 flags: ::std::os::raw::c_ulonglong,
8787 ) -> hipError_t;
8788}
8789extern "C" {
8790 #[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"]
8791 pub fn hipMemMapArrayAsync(
8792 mapInfoList: *mut hipArrayMapInfo,
8793 count: ::std::os::raw::c_uint,
8794 stream: hipStream_t,
8795 ) -> hipError_t;
8796}
8797extern "C" {
8798 #[doc = " @brief Release a memory handle representing a memory allocation which was previously allocated\n through hipMemCreate.\n\n @param [in] handle - handle of the memory allocation.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8799 pub fn hipMemRelease(handle: hipMemGenericAllocationHandle_t) -> hipError_t;
8800}
8801extern "C" {
8802 #[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\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8803 pub fn hipMemRetainAllocationHandle(
8804 handle: *mut hipMemGenericAllocationHandle_t,
8805 addr: *mut ::std::os::raw::c_void,
8806 ) -> hipError_t;
8807}
8808extern "C" {
8809 #[doc = " @brief Set the access flags for each location specified in desc for the given virtual address\n range.\n\n @param [in] ptr - starting address of the virtual address range.\n @param [in] size - size of the range.\n @param [in] desc - array of hipMemAccessDesc.\n @param [in] count - number of hipMemAccessDesc in desc.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8810 pub fn hipMemSetAccess(
8811 ptr: *mut ::std::os::raw::c_void,
8812 size: usize,
8813 desc: *const hipMemAccessDesc,
8814 count: usize,
8815 ) -> hipError_t;
8816}
8817extern "C" {
8818 #[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\n @note This API is implemented on Linux and is under development on Microsoft Windows."]
8819 pub fn hipMemUnmap(ptr: *mut ::std::os::raw::c_void, size: usize) -> hipError_t;
8820}
8821extern "C" {
8822 #[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"]
8823 pub fn hipGraphicsMapResources(
8824 count: ::std::os::raw::c_int,
8825 resources: *mut hipGraphicsResource_t,
8826 stream: hipStream_t,
8827 ) -> hipError_t;
8828}
8829extern "C" {
8830 #[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"]
8831 pub fn hipGraphicsSubResourceGetMappedArray(
8832 array: *mut hipArray_t,
8833 resource: hipGraphicsResource_t,
8834 arrayIndex: ::std::os::raw::c_uint,
8835 mipLevel: ::std::os::raw::c_uint,
8836 ) -> hipError_t;
8837}
8838extern "C" {
8839 #[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"]
8840 pub fn hipGraphicsResourceGetMappedPointer(
8841 devPtr: *mut *mut ::std::os::raw::c_void,
8842 size: *mut usize,
8843 resource: hipGraphicsResource_t,
8844 ) -> hipError_t;
8845}
8846extern "C" {
8847 #[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"]
8848 pub fn hipGraphicsUnmapResources(
8849 count: ::std::os::raw::c_int,
8850 resources: *mut hipGraphicsResource_t,
8851 stream: hipStream_t,
8852 ) -> hipError_t;
8853}
8854extern "C" {
8855 #[doc = " @brief Unregisters a graphics resource.\n\n @param [in] resource - Graphics resources to unregister.\n\n @returns #hipSuccess\n"]
8856 pub fn hipGraphicsUnregisterResource(resource: hipGraphicsResource_t) -> hipError_t;
8857}
8858extern "C" {
8859 #[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"]
8860 pub fn hipCreateSurfaceObject(
8861 pSurfObject: *mut hipSurfaceObject_t,
8862 pResDesc: *const hipResourceDesc,
8863 ) -> hipError_t;
8864}
8865extern "C" {
8866 #[doc = " @brief Destroy a surface object.\n\n @param [in] surfaceObject Surface object to be destroyed.\n\n @returns #hipSuccess, #hipErrorInvalidValue"]
8867 pub fn hipDestroySurfaceObject(surfaceObject: hipSurfaceObject_t) -> hipError_t;
8868}
8869extern "C" {
8870 #[doc = " @brief Enable HIP runtime logging.\n\n This function enables the HIP runtime logging mechanism, allowing diagnostic\n and trace information to be captured during HIP API execution.\n\n @returns #hipSuccess\n\n @see hipExtDisableLogging, hipExtSetLoggingParams"]
8871 pub fn hipExtEnableLogging() -> hipError_t;
8872}
8873extern "C" {
8874 #[doc = " @brief Disable HIP runtime logging.\n\n This function disables the HIP runtime logging mechanism, stopping the capture\n of diagnostic and trace information during HIP API execution.\n\n @returns #hipSuccess\n\n @see hipExtEnableLogging, hipExtSetLoggingParams"]
8875 pub fn hipExtDisableLogging() -> hipError_t;
8876}
8877extern "C" {
8878 #[doc = " @brief Set HIP runtime logging parameters.\n\n This function configures the logging behavior of the HIP runtime, including\n the verbosity level, buffer size, and which components to log.\n\n @param [in] log_level The logging verbosity level. Higher values produce more detailed output.\n @param [in] log_size Reserved for future use. Currently not implemented.\n @param [in] log_mask A bitmask specifying which HIP runtime components to log.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipExtEnableLogging, hipExtDisableLogging"]
8879 pub fn hipExtSetLoggingParams(log_level: usize, log_size: usize, log_mask: usize)
8880 -> hipError_t;
8881}
8882extern "C" {
8883 pub fn hipMemcpy_spt(
8884 dst: *mut ::std::os::raw::c_void,
8885 src: *const ::std::os::raw::c_void,
8886 sizeBytes: usize,
8887 kind: hipMemcpyKind,
8888 ) -> hipError_t;
8889}
8890extern "C" {
8891 pub fn hipMemcpyToSymbol_spt(
8892 symbol: *const ::std::os::raw::c_void,
8893 src: *const ::std::os::raw::c_void,
8894 sizeBytes: usize,
8895 offset: usize,
8896 kind: hipMemcpyKind,
8897 ) -> hipError_t;
8898}
8899extern "C" {
8900 pub fn hipMemcpyFromSymbol_spt(
8901 dst: *mut ::std::os::raw::c_void,
8902 symbol: *const ::std::os::raw::c_void,
8903 sizeBytes: usize,
8904 offset: usize,
8905 kind: hipMemcpyKind,
8906 ) -> hipError_t;
8907}
8908extern "C" {
8909 pub fn hipMemcpy2D_spt(
8910 dst: *mut ::std::os::raw::c_void,
8911 dpitch: usize,
8912 src: *const ::std::os::raw::c_void,
8913 spitch: usize,
8914 width: usize,
8915 height: usize,
8916 kind: hipMemcpyKind,
8917 ) -> hipError_t;
8918}
8919extern "C" {
8920 pub fn hipMemcpy2DFromArray_spt(
8921 dst: *mut ::std::os::raw::c_void,
8922 dpitch: usize,
8923 src: hipArray_const_t,
8924 wOffset: usize,
8925 hOffset: usize,
8926 width: usize,
8927 height: usize,
8928 kind: hipMemcpyKind,
8929 ) -> hipError_t;
8930}
8931extern "C" {
8932 pub fn hipMemcpy3D_spt(p: *const hipMemcpy3DParms) -> hipError_t;
8933}
8934extern "C" {
8935 pub fn hipMemset_spt(
8936 dst: *mut ::std::os::raw::c_void,
8937 value: ::std::os::raw::c_int,
8938 sizeBytes: usize,
8939 ) -> hipError_t;
8940}
8941extern "C" {
8942 pub fn hipMemsetAsync_spt(
8943 dst: *mut ::std::os::raw::c_void,
8944 value: ::std::os::raw::c_int,
8945 sizeBytes: usize,
8946 stream: hipStream_t,
8947 ) -> hipError_t;
8948}
8949extern "C" {
8950 pub fn hipMemset2D_spt(
8951 dst: *mut ::std::os::raw::c_void,
8952 pitch: usize,
8953 value: ::std::os::raw::c_int,
8954 width: usize,
8955 height: usize,
8956 ) -> hipError_t;
8957}
8958extern "C" {
8959 pub fn hipMemset2DAsync_spt(
8960 dst: *mut ::std::os::raw::c_void,
8961 pitch: usize,
8962 value: ::std::os::raw::c_int,
8963 width: usize,
8964 height: usize,
8965 stream: hipStream_t,
8966 ) -> hipError_t;
8967}
8968extern "C" {
8969 pub fn hipMemset3DAsync_spt(
8970 pitchedDevPtr: hipPitchedPtr,
8971 value: ::std::os::raw::c_int,
8972 extent: hipExtent,
8973 stream: hipStream_t,
8974 ) -> hipError_t;
8975}
8976extern "C" {
8977 pub fn hipMemset3D_spt(
8978 pitchedDevPtr: hipPitchedPtr,
8979 value: ::std::os::raw::c_int,
8980 extent: hipExtent,
8981 ) -> hipError_t;
8982}
8983extern "C" {
8984 pub fn hipMemcpyAsync_spt(
8985 dst: *mut ::std::os::raw::c_void,
8986 src: *const ::std::os::raw::c_void,
8987 sizeBytes: usize,
8988 kind: hipMemcpyKind,
8989 stream: hipStream_t,
8990 ) -> hipError_t;
8991}
8992extern "C" {
8993 pub fn hipMemcpy3DAsync_spt(p: *const hipMemcpy3DParms, stream: hipStream_t) -> hipError_t;
8994}
8995extern "C" {
8996 pub fn hipMemcpy2DAsync_spt(
8997 dst: *mut ::std::os::raw::c_void,
8998 dpitch: usize,
8999 src: *const ::std::os::raw::c_void,
9000 spitch: usize,
9001 width: usize,
9002 height: usize,
9003 kind: hipMemcpyKind,
9004 stream: hipStream_t,
9005 ) -> hipError_t;
9006}
9007extern "C" {
9008 pub fn hipMemcpyFromSymbolAsync_spt(
9009 dst: *mut ::std::os::raw::c_void,
9010 symbol: *const ::std::os::raw::c_void,
9011 sizeBytes: usize,
9012 offset: usize,
9013 kind: hipMemcpyKind,
9014 stream: hipStream_t,
9015 ) -> hipError_t;
9016}
9017extern "C" {
9018 pub fn hipMemcpyToSymbolAsync_spt(
9019 symbol: *const ::std::os::raw::c_void,
9020 src: *const ::std::os::raw::c_void,
9021 sizeBytes: usize,
9022 offset: usize,
9023 kind: hipMemcpyKind,
9024 stream: hipStream_t,
9025 ) -> hipError_t;
9026}
9027extern "C" {
9028 pub fn hipMemcpyFromArray_spt(
9029 dst: *mut ::std::os::raw::c_void,
9030 src: hipArray_const_t,
9031 wOffsetSrc: usize,
9032 hOffset: usize,
9033 count: usize,
9034 kind: hipMemcpyKind,
9035 ) -> hipError_t;
9036}
9037extern "C" {
9038 pub fn hipMemcpy2DToArray_spt(
9039 dst: hipArray_t,
9040 wOffset: usize,
9041 hOffset: usize,
9042 src: *const ::std::os::raw::c_void,
9043 spitch: usize,
9044 width: usize,
9045 height: usize,
9046 kind: hipMemcpyKind,
9047 ) -> hipError_t;
9048}
9049extern "C" {
9050 pub fn hipMemcpy2DFromArrayAsync_spt(
9051 dst: *mut ::std::os::raw::c_void,
9052 dpitch: usize,
9053 src: hipArray_const_t,
9054 wOffsetSrc: usize,
9055 hOffsetSrc: usize,
9056 width: usize,
9057 height: usize,
9058 kind: hipMemcpyKind,
9059 stream: hipStream_t,
9060 ) -> hipError_t;
9061}
9062extern "C" {
9063 pub fn hipMemcpy2DToArrayAsync_spt(
9064 dst: hipArray_t,
9065 wOffset: usize,
9066 hOffset: usize,
9067 src: *const ::std::os::raw::c_void,
9068 spitch: usize,
9069 width: usize,
9070 height: usize,
9071 kind: hipMemcpyKind,
9072 stream: hipStream_t,
9073 ) -> hipError_t;
9074}
9075extern "C" {
9076 pub fn hipStreamQuery_spt(stream: hipStream_t) -> hipError_t;
9077}
9078extern "C" {
9079 pub fn hipStreamSynchronize_spt(stream: hipStream_t) -> hipError_t;
9080}
9081extern "C" {
9082 pub fn hipStreamGetPriority_spt(
9083 stream: hipStream_t,
9084 priority: *mut ::std::os::raw::c_int,
9085 ) -> hipError_t;
9086}
9087extern "C" {
9088 pub fn hipStreamWaitEvent_spt(
9089 stream: hipStream_t,
9090 event: hipEvent_t,
9091 flags: ::std::os::raw::c_uint,
9092 ) -> hipError_t;
9093}
9094extern "C" {
9095 pub fn hipStreamGetFlags_spt(
9096 stream: hipStream_t,
9097 flags: *mut ::std::os::raw::c_uint,
9098 ) -> hipError_t;
9099}
9100extern "C" {
9101 pub fn hipStreamAddCallback_spt(
9102 stream: hipStream_t,
9103 callback: hipStreamCallback_t,
9104 userData: *mut ::std::os::raw::c_void,
9105 flags: ::std::os::raw::c_uint,
9106 ) -> hipError_t;
9107}
9108extern "C" {
9109 pub fn hipEventRecord_spt(event: hipEvent_t, stream: hipStream_t) -> hipError_t;
9110}
9111extern "C" {
9112 pub fn hipLaunchCooperativeKernel_spt(
9113 f: *const ::std::os::raw::c_void,
9114 gridDim: dim3,
9115 blockDim: dim3,
9116 kernelParams: *mut *mut ::std::os::raw::c_void,
9117 sharedMemBytes: u32,
9118 hStream: hipStream_t,
9119 ) -> hipError_t;
9120}
9121extern "C" {
9122 pub fn hipLaunchKernel_spt(
9123 function_address: *const ::std::os::raw::c_void,
9124 numBlocks: dim3,
9125 dimBlocks: dim3,
9126 args: *mut *mut ::std::os::raw::c_void,
9127 sharedMemBytes: usize,
9128 stream: hipStream_t,
9129 ) -> hipError_t;
9130}
9131extern "C" {
9132 pub fn hipGraphLaunch_spt(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t;
9133}
9134extern "C" {
9135 pub fn hipStreamBeginCapture_spt(stream: hipStream_t, mode: hipStreamCaptureMode)
9136 -> hipError_t;
9137}
9138extern "C" {
9139 pub fn hipStreamEndCapture_spt(stream: hipStream_t, pGraph: *mut hipGraph_t) -> hipError_t;
9140}
9141extern "C" {
9142 pub fn hipStreamIsCapturing_spt(
9143 stream: hipStream_t,
9144 pCaptureStatus: *mut hipStreamCaptureStatus,
9145 ) -> hipError_t;
9146}
9147extern "C" {
9148 pub fn hipStreamGetCaptureInfo_spt(
9149 stream: hipStream_t,
9150 pCaptureStatus: *mut hipStreamCaptureStatus,
9151 pId: *mut ::std::os::raw::c_ulonglong,
9152 ) -> hipError_t;
9153}
9154extern "C" {
9155 pub fn hipStreamGetCaptureInfo_v2_spt(
9156 stream: hipStream_t,
9157 captureStatus_out: *mut hipStreamCaptureStatus,
9158 id_out: *mut ::std::os::raw::c_ulonglong,
9159 graph_out: *mut hipGraph_t,
9160 dependencies_out: *mut *const hipGraphNode_t,
9161 numDependencies_out: *mut usize,
9162 ) -> hipError_t;
9163}
9164extern "C" {
9165 pub fn hipLaunchHostFunc_spt(
9166 stream: hipStream_t,
9167 fn_: hipHostFn_t,
9168 userData: *mut ::std::os::raw::c_void,
9169 ) -> hipError_t;
9170}
9171extern "C" {
9172 pub fn hipGetDriverEntryPoint_spt(
9173 symbol: *const ::std::os::raw::c_char,
9174 funcPtr: *mut *mut ::std::os::raw::c_void,
9175 flags: ::std::os::raw::c_ulonglong,
9176 status: *mut hipDriverEntryPointQueryResult,
9177 ) -> hipError_t;
9178}
9179extern "C" {
9180 pub fn hipGetProcAddress_spt(
9181 symbol: *const ::std::os::raw::c_char,
9182 pfn: *mut *mut ::std::os::raw::c_void,
9183 hipVersion: ::std::os::raw::c_int,
9184 flags: u64,
9185 symbolStatus: *mut hipDriverProcAddressQueryResult,
9186 ) -> hipError_t;
9187}