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