/* automatically generated by rust-bindgen 0.65.1 */ #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] #![allow(non_snake_case)] #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit { storage: Storage, } impl __BindgenBitfieldUnit { #[inline] pub const fn new(storage: Storage) -> Self { Self { storage } } } impl __BindgenBitfieldUnit where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[inline] pub fn get_bit(&self, index: usize) -> bool { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; let byte = self.storage.as_ref()[byte_index]; let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; byte & mask == mask } #[inline] pub fn set_bit(&mut self, index: usize, val: bool) { debug_assert!(index / 8 < self.storage.as_ref().len()); let byte_index = index / 8; let byte = &mut self.storage.as_mut()[byte_index]; let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { index % 8 }; let mask = 1 << bit_index; if val { *byte |= mask; } else { *byte &= !mask; } } #[inline] pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); let mut val = 0; for i in 0..(bit_width as usize) { if self.get_bit(i + bit_offset) { let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { i }; val |= 1 << index; } } val } #[inline] pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { debug_assert!(bit_width <= 64); debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); for i in 0..(bit_width as usize) { let mask = 1 << i; let val_bit_is_set = val & mask == mask; let index = if cfg!(target_endian = "big") { bit_width as usize - 1 - i } else { i }; self.set_bit(index + bit_offset, val_bit_is_set); } } } pub const _STRING_H: u32 = 1; pub const _FEATURES_H: u32 = 1; pub const _DEFAULT_SOURCE: u32 = 1; pub const __GLIBC_USE_ISOC2X: u32 = 0; pub const __USE_ISOC11: u32 = 1; pub const __USE_ISOC99: u32 = 1; pub const __USE_ISOC95: u32 = 1; pub const __USE_POSIX_IMPLICITLY: u32 = 1; pub const _POSIX_SOURCE: u32 = 1; pub const _POSIX_C_SOURCE: u32 = 200809; pub const __USE_POSIX: u32 = 1; pub const __USE_POSIX2: u32 = 1; pub const __USE_POSIX199309: u32 = 1; pub const __USE_POSIX199506: u32 = 1; pub const __USE_XOPEN2K: u32 = 1; pub const __USE_XOPEN2K8: u32 = 1; pub const _ATFILE_SOURCE: u32 = 1; pub const __WORDSIZE: u32 = 64; pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; pub const __SYSCALL_WORDSIZE: u32 = 64; pub const __TIMESIZE: u32 = 64; pub const __USE_MISC: u32 = 1; pub const __USE_ATFILE: u32 = 1; pub const __USE_FORTIFY_LEVEL: u32 = 0; pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0; pub const _STDC_PREDEF_H: u32 = 1; pub const __STDC_IEC_559__: u32 = 1; pub const __STDC_IEC_60559_BFP__: u32 = 201404; pub const __STDC_IEC_559_COMPLEX__: u32 = 1; pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404; pub const __STDC_ISO_10646__: u32 = 201706; pub const __GNU_LIBRARY__: u32 = 6; pub const __GLIBC__: u32 = 2; pub const __GLIBC_MINOR__: u32 = 37; pub const _SYS_CDEFS_H: u32 = 1; pub const __glibc_c99_flexarr_available: u32 = 1; pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0; pub const __HAVE_GENERIC_SELECTION: u32 = 1; pub const __GLIBC_USE_LIB_EXT2: u32 = 0; pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0; pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0; pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0; pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0; pub const _BITS_TYPES_LOCALE_T_H: u32 = 1; pub const _BITS_TYPES___LOCALE_T_H: u32 = 1; pub const _STRINGS_H: u32 = 1; pub const HIP_VERSION_MAJOR: u32 = 5; pub const HIP_VERSION_MINOR: u32 = 4; pub const HIP_VERSION_PATCH: u32 = 22804; pub const HIP_VERSION_GITHASH: &[u8; 1usize] = b"\0"; pub const HIP_VERSION_BUILD_ID: u32 = 0; pub const HIP_VERSION_BUILD_NAME: &[u8; 1usize] = b"\0"; pub const HIP_VERSION: u32 = 50422804; pub const __HIP_HAS_GET_PCH: u32 = 1; pub const __HIP_ARCH_HAS_GLOBAL_INT32_ATOMICS__: u32 = 0; pub const __HIP_ARCH_HAS_GLOBAL_FLOAT_ATOMIC_EXCH__: u32 = 0; pub const __HIP_ARCH_HAS_SHARED_INT32_ATOMICS__: u32 = 0; pub const __HIP_ARCH_HAS_SHARED_FLOAT_ATOMIC_EXCH__: u32 = 0; pub const __HIP_ARCH_HAS_FLOAT_ATOMIC_ADD__: u32 = 0; pub const __HIP_ARCH_HAS_GLOBAL_INT64_ATOMICS__: u32 = 0; pub const __HIP_ARCH_HAS_SHARED_INT64_ATOMICS__: u32 = 0; pub const __HIP_ARCH_HAS_DOUBLES__: u32 = 0; pub const __HIP_ARCH_HAS_WARP_VOTE__: u32 = 0; pub const __HIP_ARCH_HAS_WARP_BALLOT__: u32 = 0; pub const __HIP_ARCH_HAS_WARP_SHUFFLE__: u32 = 0; pub const __HIP_ARCH_HAS_WARP_FUNNEL_SHIFT__: u32 = 0; pub const __HIP_ARCH_HAS_THREAD_FENCE_SYSTEM__: u32 = 0; pub const __HIP_ARCH_HAS_SYNC_THREAD_EXT__: u32 = 0; pub const __HIP_ARCH_HAS_SURFACE_FUNCS__: u32 = 0; pub const __HIP_ARCH_HAS_3DGRID__: u32 = 0; pub const __HIP_ARCH_HAS_DYNAMIC_PARALLEL__: u32 = 0; pub const _STDINT_H: u32 = 1; pub const _BITS_TYPES_H: u32 = 1; pub const _BITS_TYPESIZES_H: u32 = 1; pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; pub const __INO_T_MATCHES_INO64_T: u32 = 1; pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; pub const __STATFS_MATCHES_STATFS64: u32 = 1; pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1; pub const __FD_SETSIZE: u32 = 1024; pub const _BITS_TIME64_H: u32 = 1; pub const _BITS_WCHAR_H: u32 = 1; pub const _BITS_STDINT_INTN_H: u32 = 1; pub const _BITS_STDINT_UINTN_H: u32 = 1; pub const INT8_MIN: i32 = -128; pub const INT16_MIN: i32 = -32768; pub const INT32_MIN: i32 = -2147483648; pub const INT8_MAX: u32 = 127; pub const INT16_MAX: u32 = 32767; pub const INT32_MAX: u32 = 2147483647; pub const UINT8_MAX: u32 = 255; pub const UINT16_MAX: u32 = 65535; pub const UINT32_MAX: u32 = 4294967295; pub const INT_LEAST8_MIN: i32 = -128; pub const INT_LEAST16_MIN: i32 = -32768; pub const INT_LEAST32_MIN: i32 = -2147483648; pub const INT_LEAST8_MAX: u32 = 127; pub const INT_LEAST16_MAX: u32 = 32767; pub const INT_LEAST32_MAX: u32 = 2147483647; pub const UINT_LEAST8_MAX: u32 = 255; pub const UINT_LEAST16_MAX: u32 = 65535; pub const UINT_LEAST32_MAX: u32 = 4294967295; pub const INT_FAST8_MIN: i32 = -128; pub const INT_FAST16_MIN: i64 = -9223372036854775808; pub const INT_FAST32_MIN: i64 = -9223372036854775808; pub const INT_FAST8_MAX: u32 = 127; pub const INT_FAST16_MAX: u64 = 9223372036854775807; pub const INT_FAST32_MAX: u64 = 9223372036854775807; pub const UINT_FAST8_MAX: u32 = 255; pub const UINT_FAST16_MAX: i32 = -1; pub const UINT_FAST32_MAX: i32 = -1; pub const INTPTR_MIN: i64 = -9223372036854775808; pub const INTPTR_MAX: u64 = 9223372036854775807; pub const UINTPTR_MAX: i32 = -1; pub const PTRDIFF_MIN: i64 = -9223372036854775808; pub const PTRDIFF_MAX: u64 = 9223372036854775807; pub const SIG_ATOMIC_MIN: i32 = -2147483648; pub const SIG_ATOMIC_MAX: u32 = 2147483647; pub const SIZE_MAX: i32 = -1; pub const WINT_MIN: u32 = 0; pub const WINT_MAX: u32 = 4294967295; pub const GENERIC_GRID_LAUNCH: u32 = 1; pub const __bool_true_false_are_defined: u32 = 1; pub const true_: u32 = 1; pub const false_: u32 = 0; pub const HIP_TRSA_OVERRIDE_FORMAT: u32 = 1; pub const HIP_TRSF_READ_AS_INTEGER: u32 = 1; pub const HIP_TRSF_NORMALIZED_COORDINATES: u32 = 2; pub const HIP_TRSF_SRGB: u32 = 16; pub const _LIBC_LIMITS_H_: u32 = 1; pub const MB_LEN_MAX: u32 = 16; pub const _BITS_POSIX1_LIM_H: u32 = 1; pub const _POSIX_AIO_LISTIO_MAX: u32 = 2; pub const _POSIX_AIO_MAX: u32 = 1; pub const _POSIX_ARG_MAX: u32 = 4096; pub const _POSIX_CHILD_MAX: u32 = 25; pub const _POSIX_DELAYTIMER_MAX: u32 = 32; pub const _POSIX_HOST_NAME_MAX: u32 = 255; pub const _POSIX_LINK_MAX: u32 = 8; pub const _POSIX_LOGIN_NAME_MAX: u32 = 9; pub const _POSIX_MAX_CANON: u32 = 255; pub const _POSIX_MAX_INPUT: u32 = 255; pub const _POSIX_MQ_OPEN_MAX: u32 = 8; pub const _POSIX_MQ_PRIO_MAX: u32 = 32; pub const _POSIX_NAME_MAX: u32 = 14; pub const _POSIX_NGROUPS_MAX: u32 = 8; pub const _POSIX_OPEN_MAX: u32 = 20; pub const _POSIX_PATH_MAX: u32 = 256; pub const _POSIX_PIPE_BUF: u32 = 512; pub const _POSIX_RE_DUP_MAX: u32 = 255; pub const _POSIX_RTSIG_MAX: u32 = 8; pub const _POSIX_SEM_NSEMS_MAX: u32 = 256; pub const _POSIX_SEM_VALUE_MAX: u32 = 32767; pub const _POSIX_SIGQUEUE_MAX: u32 = 32; pub const _POSIX_SSIZE_MAX: u32 = 32767; pub const _POSIX_STREAM_MAX: u32 = 8; pub const _POSIX_SYMLINK_MAX: u32 = 255; pub const _POSIX_SYMLOOP_MAX: u32 = 8; pub const _POSIX_TIMER_MAX: u32 = 32; pub const _POSIX_TTY_NAME_MAX: u32 = 9; pub const _POSIX_TZNAME_MAX: u32 = 6; pub const _POSIX_CLOCKRES_MIN: u32 = 20000000; pub const NR_OPEN: u32 = 1024; pub const NGROUPS_MAX: u32 = 65536; pub const ARG_MAX: u32 = 131072; pub const LINK_MAX: u32 = 127; pub const MAX_CANON: u32 = 255; pub const MAX_INPUT: u32 = 255; pub const NAME_MAX: u32 = 255; pub const PATH_MAX: u32 = 4096; pub const PIPE_BUF: u32 = 4096; pub const XATTR_NAME_MAX: u32 = 255; pub const XATTR_SIZE_MAX: u32 = 65536; pub const XATTR_LIST_MAX: u32 = 65536; pub const RTSIG_MAX: u32 = 32; pub const _POSIX_THREAD_KEYS_MAX: u32 = 128; pub const PTHREAD_KEYS_MAX: u32 = 1024; pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4; pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4; pub const _POSIX_THREAD_THREADS_MAX: u32 = 64; pub const AIO_PRIO_DELTA_MAX: u32 = 20; pub const PTHREAD_STACK_MIN: u32 = 16384; pub const DELAYTIMER_MAX: u32 = 2147483647; pub const TTY_NAME_MAX: u32 = 32; pub const LOGIN_NAME_MAX: u32 = 256; pub const HOST_NAME_MAX: u32 = 64; pub const MQ_PRIO_MAX: u32 = 32768; pub const SEM_VALUE_MAX: u32 = 2147483647; pub const _BITS_POSIX2_LIM_H: u32 = 1; pub const _POSIX2_BC_BASE_MAX: u32 = 99; pub const _POSIX2_BC_DIM_MAX: u32 = 2048; pub const _POSIX2_BC_SCALE_MAX: u32 = 99; pub const _POSIX2_BC_STRING_MAX: u32 = 1000; pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2; pub const _POSIX2_EXPR_NEST_MAX: u32 = 32; pub const _POSIX2_LINE_MAX: u32 = 2048; pub const _POSIX2_RE_DUP_MAX: u32 = 255; pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14; pub const BC_BASE_MAX: u32 = 99; pub const BC_DIM_MAX: u32 = 2048; pub const BC_SCALE_MAX: u32 = 99; pub const BC_STRING_MAX: u32 = 1000; pub const COLL_WEIGHTS_MAX: u32 = 255; pub const EXPR_NEST_MAX: u32 = 32; pub const LINE_MAX: u32 = 2048; pub const CHARCLASS_NAME_MAX: u32 = 2048; pub const RE_DUP_MAX: u32 = 32767; pub const hipTextureType1D: u32 = 1; pub const hipTextureType2D: u32 = 2; pub const hipTextureType3D: u32 = 3; pub const hipTextureTypeCubemap: u32 = 12; pub const hipTextureType1DLayered: u32 = 241; pub const hipTextureType2DLayered: u32 = 242; pub const hipTextureTypeCubemapLayered: u32 = 252; pub const HIP_IMAGE_OBJECT_SIZE_DWORD: u32 = 12; pub const HIP_SAMPLER_OBJECT_SIZE_DWORD: u32 = 8; pub const HIP_SAMPLER_OBJECT_OFFSET_DWORD: u32 = 12; pub const HIP_TEXTURE_OBJECT_SIZE_DWORD: u32 = 20; pub const DEPRECATED_MSG : & [u8 ; 205usize] = b"This API is marked as deprecated and may not be supported in future releases. For more details please refer https://github.com/ROCm-Developer-Tools/HIP/blob/master/docs/markdown/hip_deprecated_api_list.md\0" ; pub const hipIpcMemLazyEnablePeerAccess: u32 = 0; pub const HIP_IPC_HANDLE_SIZE: u32 = 64; pub const hipStreamDefault: u32 = 0; pub const hipStreamNonBlocking: u32 = 1; pub const hipEventDefault: u32 = 0; pub const hipEventBlockingSync: u32 = 1; pub const hipEventDisableTiming: u32 = 2; pub const hipEventInterprocess: u32 = 4; pub const hipEventReleaseToDevice: u32 = 1073741824; pub const hipEventReleaseToSystem: u32 = 2147483648; pub const hipHostMallocDefault: u32 = 0; pub const hipHostMallocPortable: u32 = 1; pub const hipHostMallocMapped: u32 = 2; pub const hipHostMallocWriteCombined: u32 = 4; pub const hipHostMallocNumaUser: u32 = 536870912; pub const hipHostMallocCoherent: u32 = 1073741824; pub const hipHostMallocNonCoherent: u32 = 2147483648; pub const hipMemAttachGlobal: u32 = 1; pub const hipMemAttachHost: u32 = 2; pub const hipMemAttachSingle: u32 = 4; pub const hipDeviceMallocDefault: u32 = 0; pub const hipDeviceMallocFinegrained: u32 = 1; pub const hipMallocSignalMemory: u32 = 2; pub const hipHostRegisterDefault: u32 = 0; pub const hipHostRegisterPortable: u32 = 1; pub const hipHostRegisterMapped: u32 = 2; pub const hipHostRegisterIoMemory: u32 = 4; pub const hipExtHostRegisterCoarseGrained: u32 = 8; pub const hipDeviceScheduleAuto: u32 = 0; pub const hipDeviceScheduleSpin: u32 = 1; pub const hipDeviceScheduleYield: u32 = 2; pub const hipDeviceScheduleBlockingSync: u32 = 4; pub const hipDeviceScheduleMask: u32 = 7; pub const hipDeviceMapHost: u32 = 8; pub const hipDeviceLmemResizeToMax: u32 = 16; pub const hipArrayDefault: u32 = 0; pub const hipArrayLayered: u32 = 1; pub const hipArraySurfaceLoadStore: u32 = 2; pub const hipArrayCubemap: u32 = 4; pub const hipArrayTextureGather: u32 = 8; pub const hipOccupancyDefault: u32 = 0; pub const hipCooperativeLaunchMultiDeviceNoPreSync: u32 = 1; pub const hipCooperativeLaunchMultiDeviceNoPostSync: u32 = 2; pub const hipExtAnyOrderLaunch: u32 = 1; pub const hipStreamWaitValueGte: u32 = 0; pub const hipStreamWaitValueEq: u32 = 1; pub const hipStreamWaitValueAnd: u32 = 2; pub const hipStreamWaitValueNor: u32 = 3; pub const USE_PEER_NON_UNIFIED: u32 = 1; extern "C" { pub fn memcpy( __dest: *mut ::libc::c_void, __src: *const ::libc::c_void, __n: ::libc::c_ulong, ) -> *mut ::libc::c_void; } extern "C" { pub fn memmove( __dest: *mut ::libc::c_void, __src: *const ::libc::c_void, __n: ::libc::c_ulong, ) -> *mut ::libc::c_void; } extern "C" { pub fn memccpy( __dest: *mut ::libc::c_void, __src: *const ::libc::c_void, __c: ::libc::c_int, __n: ::libc::c_ulong, ) -> *mut ::libc::c_void; } extern "C" { pub fn memset( __s: *mut ::libc::c_void, __c: ::libc::c_int, __n: ::libc::c_ulong, ) -> *mut ::libc::c_void; } extern "C" { pub fn memcmp( __s1: *const ::libc::c_void, __s2: *const ::libc::c_void, __n: ::libc::c_ulong, ) -> ::libc::c_int; } extern "C" { pub fn __memcmpeq( __s1: *const ::libc::c_void, __s2: *const ::libc::c_void, __n: usize, ) -> ::libc::c_int; } extern "C" { pub fn memchr( __s: *const ::libc::c_void, __c: ::libc::c_int, __n: ::libc::c_ulong, ) -> *mut ::libc::c_void; } extern "C" { pub fn strcpy(__dest: *mut ::libc::c_char, __src: *const ::libc::c_char) -> *mut ::libc::c_char; } extern "C" { pub fn strncpy( __dest: *mut ::libc::c_char, __src: *const ::libc::c_char, __n: ::libc::c_ulong, ) -> *mut ::libc::c_char; } extern "C" { pub fn strcat(__dest: *mut ::libc::c_char, __src: *const ::libc::c_char) -> *mut ::libc::c_char; } extern "C" { pub fn strncat( __dest: *mut ::libc::c_char, __src: *const ::libc::c_char, __n: ::libc::c_ulong, ) -> *mut ::libc::c_char; } extern "C" { pub fn strcmp(__s1: *const ::libc::c_char, __s2: *const ::libc::c_char) -> ::libc::c_int; } extern "C" { pub fn strncmp( __s1: *const ::libc::c_char, __s2: *const ::libc::c_char, __n: ::libc::c_ulong, ) -> ::libc::c_int; } extern "C" { pub fn strcoll(__s1: *const ::libc::c_char, __s2: *const ::libc::c_char) -> ::libc::c_int; } extern "C" { pub fn strxfrm( __dest: *mut ::libc::c_char, __src: *const ::libc::c_char, __n: ::libc::c_ulong, ) -> ::libc::c_ulong; } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct __locale_struct { pub __locales: [*mut __locale_data; 13usize], pub __ctype_b: *const ::libc::c_ushort, pub __ctype_tolower: *const ::libc::c_int, pub __ctype_toupper: *const ::libc::c_int, pub __names: [*const ::libc::c_char; 13usize], } #[test] fn bindgen_test_layout___locale_struct() { const UNINIT: ::std::mem::MaybeUninit<__locale_struct> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__locale_struct>(), 232usize, concat!("Size of: ", stringify!(__locale_struct)) ); assert_eq!( ::std::mem::align_of::<__locale_struct>(), 8usize, concat!("Alignment of ", stringify!(__locale_struct)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__locales) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__locale_struct), "::", stringify!(__locales) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__ctype_b) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", stringify!(__locale_struct), "::", stringify!(__ctype_b) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__ctype_tolower) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", stringify!(__locale_struct), "::", stringify!(__ctype_tolower) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__ctype_toupper) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", stringify!(__locale_struct), "::", stringify!(__ctype_toupper) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__names) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", stringify!(__locale_struct), "::", stringify!(__names) ) ); } impl Default for __locale_struct { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type __locale_t = *mut __locale_struct; pub type locale_t = __locale_t; extern "C" { pub fn strcoll_l( __s1: *const ::libc::c_char, __s2: *const ::libc::c_char, __l: locale_t, ) -> ::libc::c_int; } extern "C" { pub fn strxfrm_l( __dest: *mut ::libc::c_char, __src: *const ::libc::c_char, __n: usize, __l: locale_t, ) -> usize; } extern "C" { pub fn strdup(__s: *const ::libc::c_char) -> *mut ::libc::c_char; } extern "C" { pub fn strndup(__string: *const ::libc::c_char, __n: ::libc::c_ulong) -> *mut ::libc::c_char; } extern "C" { pub fn strchr(__s: *const ::libc::c_char, __c: ::libc::c_int) -> *mut ::libc::c_char; } extern "C" { pub fn strrchr(__s: *const ::libc::c_char, __c: ::libc::c_int) -> *mut ::libc::c_char; } extern "C" { pub fn strcspn(__s: *const ::libc::c_char, __reject: *const ::libc::c_char) -> ::libc::c_ulong; } extern "C" { pub fn strspn(__s: *const ::libc::c_char, __accept: *const ::libc::c_char) -> ::libc::c_ulong; } extern "C" { pub fn strpbrk( __s: *const ::libc::c_char, __accept: *const ::libc::c_char, ) -> *mut ::libc::c_char; } extern "C" { pub fn strstr( __haystack: *const ::libc::c_char, __needle: *const ::libc::c_char, ) -> *mut ::libc::c_char; } extern "C" { pub fn strtok(__s: *mut ::libc::c_char, __delim: *const ::libc::c_char) -> *mut ::libc::c_char; } extern "C" { pub fn __strtok_r( __s: *mut ::libc::c_char, __delim: *const ::libc::c_char, __save_ptr: *mut *mut ::libc::c_char, ) -> *mut ::libc::c_char; } extern "C" { pub fn strtok_r( __s: *mut ::libc::c_char, __delim: *const ::libc::c_char, __save_ptr: *mut *mut ::libc::c_char, ) -> *mut ::libc::c_char; } extern "C" { pub fn strlen(__s: *const ::libc::c_char) -> ::libc::c_ulong; } extern "C" { pub fn strnlen(__string: *const ::libc::c_char, __maxlen: usize) -> usize; } extern "C" { pub fn strerror(__errnum: ::libc::c_int) -> *mut ::libc::c_char; } extern "C" { #[link_name = "\u{1}__xpg_strerror_r"] pub fn strerror_r( __errnum: ::libc::c_int, __buf: *mut ::libc::c_char, __buflen: usize, ) -> ::libc::c_int; } extern "C" { pub fn strerror_l(__errnum: ::libc::c_int, __l: locale_t) -> *mut ::libc::c_char; } extern "C" { pub fn bcmp( __s1: *const ::libc::c_void, __s2: *const ::libc::c_void, __n: ::libc::c_ulong, ) -> ::libc::c_int; } extern "C" { pub fn bcopy(__src: *const ::libc::c_void, __dest: *mut ::libc::c_void, __n: usize); } extern "C" { pub fn bzero(__s: *mut ::libc::c_void, __n: ::libc::c_ulong); } extern "C" { pub fn index(__s: *const ::libc::c_char, __c: ::libc::c_int) -> *mut ::libc::c_char; } extern "C" { pub fn rindex(__s: *const ::libc::c_char, __c: ::libc::c_int) -> *mut ::libc::c_char; } extern "C" { pub fn ffs(__i: ::libc::c_int) -> ::libc::c_int; } extern "C" { pub fn ffsl(__l: ::libc::c_long) -> ::libc::c_int; } extern "C" { pub fn ffsll(__ll: ::libc::c_longlong) -> ::libc::c_int; } extern "C" { pub fn strcasecmp(__s1: *const ::libc::c_char, __s2: *const ::libc::c_char) -> ::libc::c_int; } extern "C" { pub fn strncasecmp( __s1: *const ::libc::c_char, __s2: *const ::libc::c_char, __n: ::libc::c_ulong, ) -> ::libc::c_int; } extern "C" { pub fn strcasecmp_l( __s1: *const ::libc::c_char, __s2: *const ::libc::c_char, __loc: locale_t, ) -> ::libc::c_int; } extern "C" { pub fn strncasecmp_l( __s1: *const ::libc::c_char, __s2: *const ::libc::c_char, __n: usize, __loc: locale_t, ) -> ::libc::c_int; } extern "C" { pub fn explicit_bzero(__s: *mut ::libc::c_void, __n: usize); } extern "C" { pub fn strsep( __stringp: *mut *mut ::libc::c_char, __delim: *const ::libc::c_char, ) -> *mut ::libc::c_char; } extern "C" { pub fn strsignal(__sig: ::libc::c_int) -> *mut ::libc::c_char; } extern "C" { pub fn __stpcpy( __dest: *mut ::libc::c_char, __src: *const ::libc::c_char, ) -> *mut ::libc::c_char; } extern "C" { pub fn stpcpy(__dest: *mut ::libc::c_char, __src: *const ::libc::c_char) -> *mut ::libc::c_char; } extern "C" { pub fn __stpncpy( __dest: *mut ::libc::c_char, __src: *const ::libc::c_char, __n: usize, ) -> *mut ::libc::c_char; } extern "C" { pub fn stpncpy( __dest: *mut ::libc::c_char, __src: *const ::libc::c_char, __n: ::libc::c_ulong, ) -> *mut ::libc::c_char; } pub const HIP_SUCCESS: _bindgen_ty_1 = 0; pub const HIP_ERROR_INVALID_VALUE: _bindgen_ty_1 = 1; pub const HIP_ERROR_NOT_INITIALIZED: _bindgen_ty_1 = 2; pub const HIP_ERROR_LAUNCH_OUT_OF_RESOURCES: _bindgen_ty_1 = 3; pub type _bindgen_ty_1 = ::libc::c_uint; #[repr(C)] #[repr(align(4))] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipDeviceArch_t { pub _bitfield_align_1: [u8; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, pub __bindgen_padding_0: u8, } #[test] fn bindgen_test_layout_hipDeviceArch_t() { assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(hipDeviceArch_t)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(hipDeviceArch_t)) ); } impl hipDeviceArch_t { #[inline] pub fn hasGlobalInt32Atomics(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } } #[inline] pub fn set_hasGlobalInt32Atomics(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] pub fn hasGlobalFloatAtomicExch(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } #[inline] pub fn set_hasGlobalFloatAtomicExch(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] pub fn hasSharedInt32Atomics(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } #[inline] pub fn set_hasSharedInt32Atomics(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(2usize, 1u8, val as u64) } } #[inline] pub fn hasSharedFloatAtomicExch(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } #[inline] pub fn set_hasSharedFloatAtomicExch(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(3usize, 1u8, val as u64) } } #[inline] pub fn hasFloatAtomicAdd(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } #[inline] pub fn set_hasFloatAtomicAdd(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(4usize, 1u8, val as u64) } } #[inline] pub fn hasGlobalInt64Atomics(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } #[inline] pub fn set_hasGlobalInt64Atomics(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(5usize, 1u8, val as u64) } } #[inline] pub fn hasSharedInt64Atomics(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } } #[inline] pub fn set_hasSharedInt64Atomics(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(6usize, 1u8, val as u64) } } #[inline] pub fn hasDoubles(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } } #[inline] pub fn set_hasDoubles(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(7usize, 1u8, val as u64) } } #[inline] pub fn hasWarpVote(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } } #[inline] pub fn set_hasWarpVote(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(8usize, 1u8, val as u64) } } #[inline] pub fn hasWarpBallot(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) } } #[inline] pub fn set_hasWarpBallot(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(9usize, 1u8, val as u64) } } #[inline] pub fn hasWarpShuffle(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) } } #[inline] pub fn set_hasWarpShuffle(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(10usize, 1u8, val as u64) } } #[inline] pub fn hasFunnelShift(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) } } #[inline] pub fn set_hasFunnelShift(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(11usize, 1u8, val as u64) } } #[inline] pub fn hasThreadFenceSystem(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) } } #[inline] pub fn set_hasThreadFenceSystem(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(12usize, 1u8, val as u64) } } #[inline] pub fn hasSyncThreadsExt(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) } } #[inline] pub fn set_hasSyncThreadsExt(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(13usize, 1u8, val as u64) } } #[inline] pub fn hasSurfaceFuncs(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) } } #[inline] pub fn set_hasSurfaceFuncs(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(14usize, 1u8, val as u64) } } #[inline] pub fn has3dGrid(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) } } #[inline] pub fn set_has3dGrid(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(15usize, 1u8, val as u64) } } #[inline] pub fn hasDynamicParallelism(&self) -> ::libc::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } } #[inline] pub fn set_hasDynamicParallelism(&mut self, val: ::libc::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); self._bitfield_1.set(16usize, 1u8, val as u64) } } #[inline] pub fn new_bitfield_1( hasGlobalInt32Atomics: ::libc::c_uint, hasGlobalFloatAtomicExch: ::libc::c_uint, hasSharedInt32Atomics: ::libc::c_uint, hasSharedFloatAtomicExch: ::libc::c_uint, hasFloatAtomicAdd: ::libc::c_uint, hasGlobalInt64Atomics: ::libc::c_uint, hasSharedInt64Atomics: ::libc::c_uint, hasDoubles: ::libc::c_uint, hasWarpVote: ::libc::c_uint, hasWarpBallot: ::libc::c_uint, hasWarpShuffle: ::libc::c_uint, hasFunnelShift: ::libc::c_uint, hasThreadFenceSystem: ::libc::c_uint, hasSyncThreadsExt: ::libc::c_uint, hasSurfaceFuncs: ::libc::c_uint, has3dGrid: ::libc::c_uint, hasDynamicParallelism: ::libc::c_uint, ) -> __BindgenBitfieldUnit<[u8; 3usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let hasGlobalInt32Atomics: u32 = unsafe { ::std::mem::transmute(hasGlobalInt32Atomics) }; hasGlobalInt32Atomics as u64 }); __bindgen_bitfield_unit.set(1usize, 1u8, { let hasGlobalFloatAtomicExch: u32 = unsafe { ::std::mem::transmute(hasGlobalFloatAtomicExch) }; hasGlobalFloatAtomicExch as u64 }); __bindgen_bitfield_unit.set(2usize, 1u8, { let hasSharedInt32Atomics: u32 = unsafe { ::std::mem::transmute(hasSharedInt32Atomics) }; hasSharedInt32Atomics as u64 }); __bindgen_bitfield_unit.set(3usize, 1u8, { let hasSharedFloatAtomicExch: u32 = unsafe { ::std::mem::transmute(hasSharedFloatAtomicExch) }; hasSharedFloatAtomicExch as u64 }); __bindgen_bitfield_unit.set(4usize, 1u8, { let hasFloatAtomicAdd: u32 = unsafe { ::std::mem::transmute(hasFloatAtomicAdd) }; hasFloatAtomicAdd as u64 }); __bindgen_bitfield_unit.set(5usize, 1u8, { let hasGlobalInt64Atomics: u32 = unsafe { ::std::mem::transmute(hasGlobalInt64Atomics) }; hasGlobalInt64Atomics as u64 }); __bindgen_bitfield_unit.set(6usize, 1u8, { let hasSharedInt64Atomics: u32 = unsafe { ::std::mem::transmute(hasSharedInt64Atomics) }; hasSharedInt64Atomics as u64 }); __bindgen_bitfield_unit.set(7usize, 1u8, { let hasDoubles: u32 = unsafe { ::std::mem::transmute(hasDoubles) }; hasDoubles as u64 }); __bindgen_bitfield_unit.set(8usize, 1u8, { let hasWarpVote: u32 = unsafe { ::std::mem::transmute(hasWarpVote) }; hasWarpVote as u64 }); __bindgen_bitfield_unit.set(9usize, 1u8, { let hasWarpBallot: u32 = unsafe { ::std::mem::transmute(hasWarpBallot) }; hasWarpBallot as u64 }); __bindgen_bitfield_unit.set(10usize, 1u8, { let hasWarpShuffle: u32 = unsafe { ::std::mem::transmute(hasWarpShuffle) }; hasWarpShuffle as u64 }); __bindgen_bitfield_unit.set(11usize, 1u8, { let hasFunnelShift: u32 = unsafe { ::std::mem::transmute(hasFunnelShift) }; hasFunnelShift as u64 }); __bindgen_bitfield_unit.set(12usize, 1u8, { let hasThreadFenceSystem: u32 = unsafe { ::std::mem::transmute(hasThreadFenceSystem) }; hasThreadFenceSystem as u64 }); __bindgen_bitfield_unit.set(13usize, 1u8, { let hasSyncThreadsExt: u32 = unsafe { ::std::mem::transmute(hasSyncThreadsExt) }; hasSyncThreadsExt as u64 }); __bindgen_bitfield_unit.set(14usize, 1u8, { let hasSurfaceFuncs: u32 = unsafe { ::std::mem::transmute(hasSurfaceFuncs) }; hasSurfaceFuncs as u64 }); __bindgen_bitfield_unit.set(15usize, 1u8, { let has3dGrid: u32 = unsafe { ::std::mem::transmute(has3dGrid) }; has3dGrid as u64 }); __bindgen_bitfield_unit.set(16usize, 1u8, { let hasDynamicParallelism: u32 = unsafe { ::std::mem::transmute(hasDynamicParallelism) }; hasDynamicParallelism as u64 }); __bindgen_bitfield_unit } } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipUUID_t { pub bytes: [::libc::c_char; 16usize], } #[test] fn bindgen_test_layout_hipUUID_t() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(hipUUID_t)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(hipUUID_t)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipUUID_t), "::", stringify!(bytes) ) ); } pub type hipUUID = hipUUID_t; #[doc = " hipDeviceProp\n"] #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipDeviceProp_t { #[doc = "< Device name."] pub name: [::libc::c_char; 256usize], #[doc = "< Size of global memory region (in bytes)."] pub totalGlobalMem: usize, #[doc = "< Size of shared memory region (in bytes)."] pub sharedMemPerBlock: usize, #[doc = "< Registers per block."] pub regsPerBlock: ::libc::c_int, #[doc = "< Warp size."] pub warpSize: ::libc::c_int, #[doc = "< Max work items per work group or workgroup max size."] pub maxThreadsPerBlock: ::libc::c_int, #[doc = "< Max number of threads in each dimension (XYZ) of a block."] pub maxThreadsDim: [::libc::c_int; 3usize], #[doc = "< Max grid dimensions (XYZ)."] pub maxGridSize: [::libc::c_int; 3usize], #[doc = "< Max clock frequency of the multiProcessors in khz."] pub clockRate: ::libc::c_int, #[doc = "< Max global memory clock frequency in khz."] pub memoryClockRate: ::libc::c_int, #[doc = "< Global memory bus width in bits."] pub memoryBusWidth: ::libc::c_int, #[doc = "< Size of shared memory region (in bytes)."] pub totalConstMem: usize, #[doc = "< Major compute capability. On HCC, this is an approximation and features may\n< differ from CUDA CC. See the arch feature flags for portable ways to query\n< feature caps."] pub major: ::libc::c_int, #[doc = "< Minor compute capability. On HCC, this is an approximation and features may\n< differ from CUDA CC. See the arch feature flags for portable ways to query\n< feature caps."] pub minor: ::libc::c_int, #[doc = "< Number of multi-processors (compute units)."] pub multiProcessorCount: ::libc::c_int, #[doc = "< L2 cache size."] pub l2CacheSize: ::libc::c_int, #[doc = "< Maximum resident threads per multi-processor."] pub maxThreadsPerMultiProcessor: ::libc::c_int, #[doc = "< Compute mode."] pub computeMode: ::libc::c_int, #[doc = "< Frequency in khz of the timer used by the device-side \"clock*\"\n< instructions. New for HIP."] pub clockInstructionRate: ::libc::c_int, #[doc = "< Architectural feature flags. New for HIP."] pub arch: hipDeviceArch_t, #[doc = "< Device can possibly execute multiple kernels concurrently."] pub concurrentKernels: ::libc::c_int, #[doc = "< PCI Domain ID"] pub pciDomainID: ::libc::c_int, #[doc = "< PCI Bus ID."] pub pciBusID: ::libc::c_int, #[doc = "< PCI Device ID."] pub pciDeviceID: ::libc::c_int, #[doc = "< Maximum Shared Memory Per Multiprocessor."] pub maxSharedMemoryPerMultiProcessor: usize, #[doc = "< 1 if device is on a multi-GPU board, 0 if not."] pub isMultiGpuBoard: ::libc::c_int, #[doc = "< Check whether HIP can map host memory"] pub canMapHostMemory: ::libc::c_int, #[doc = "< DEPRECATED: use gcnArchName instead"] pub gcnArch: ::libc::c_int, #[doc = "< AMD GCN Arch Name."] pub gcnArchName: [::libc::c_char; 256usize], #[doc = "< APU vs dGPU"] pub integrated: ::libc::c_int, #[doc = "< HIP device supports cooperative launch"] pub cooperativeLaunch: ::libc::c_int, #[doc = "< HIP device supports cooperative launch on multiple devices"] pub cooperativeMultiDeviceLaunch: ::libc::c_int, #[doc = "< Maximum size for 1D textures bound to linear memory"] pub maxTexture1DLinear: ::libc::c_int, #[doc = "< Maximum number of elements in 1D images"] pub maxTexture1D: ::libc::c_int, #[doc = "< Maximum dimensions (width, height) of 2D images, in image elements"] pub maxTexture2D: [::libc::c_int; 2usize], #[doc = "< Maximum dimensions (width, height, depth) of 3D images, in image elements"] pub maxTexture3D: [::libc::c_int; 3usize], #[doc = "< Addres of HDP_MEM_COHERENCY_FLUSH_CNTL register"] pub hdpMemFlushCntl: *mut ::libc::c_uint, #[doc = "< Addres of HDP_REG_COHERENCY_FLUSH_CNTL register"] pub hdpRegFlushCntl: *mut ::libc::c_uint, #[doc = " = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 792usize, concat!("Size of: ", stringify!(hipDeviceProp_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipDeviceProp_t)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(name) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).totalGlobalMem) as usize - ptr as usize }, 256usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(totalGlobalMem) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sharedMemPerBlock) as usize - ptr as usize }, 264usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(sharedMemPerBlock) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).regsPerBlock) as usize - ptr as usize }, 272usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(regsPerBlock) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).warpSize) as usize - ptr as usize }, 276usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(warpSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize }, 280usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(maxThreadsPerBlock) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxThreadsDim) as usize - ptr as usize }, 284usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(maxThreadsDim) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxGridSize) as usize - ptr as usize }, 296usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(maxGridSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).clockRate) as usize - ptr as usize }, 308usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(clockRate) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).memoryClockRate) as usize - ptr as usize }, 312usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(memoryClockRate) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).memoryBusWidth) as usize - ptr as usize }, 316usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(memoryBusWidth) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).totalConstMem) as usize - ptr as usize }, 320usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(totalConstMem) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, 328usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(major) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, 332usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(minor) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).multiProcessorCount) as usize - ptr as usize }, 336usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(multiProcessorCount) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).l2CacheSize) as usize - ptr as usize }, 340usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(l2CacheSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxThreadsPerMultiProcessor) as usize - ptr as usize }, 344usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(maxThreadsPerMultiProcessor) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).computeMode) as usize - ptr as usize }, 348usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(computeMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).clockInstructionRate) as usize - ptr as usize }, 352usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(clockInstructionRate) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).arch) as usize - ptr as usize }, 356usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(arch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).concurrentKernels) as usize - ptr as usize }, 360usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(concurrentKernels) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pciDomainID) as usize - ptr as usize }, 364usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(pciDomainID) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pciBusID) as usize - ptr as usize }, 368usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(pciBusID) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pciDeviceID) as usize - ptr as usize }, 372usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(pciDeviceID) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxSharedMemoryPerMultiProcessor) as usize - ptr as usize }, 376usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(maxSharedMemoryPerMultiProcessor) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).isMultiGpuBoard) as usize - ptr as usize }, 384usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(isMultiGpuBoard) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).canMapHostMemory) as usize - ptr as usize }, 388usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(canMapHostMemory) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gcnArch) as usize - ptr as usize }, 392usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(gcnArch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gcnArchName) as usize - ptr as usize }, 396usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(gcnArchName) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).integrated) as usize - ptr as usize }, 652usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(integrated) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cooperativeLaunch) as usize - ptr as usize }, 656usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(cooperativeLaunch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cooperativeMultiDeviceLaunch) as usize - ptr as usize }, 660usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(cooperativeMultiDeviceLaunch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxTexture1DLinear) as usize - ptr as usize }, 664usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(maxTexture1DLinear) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxTexture1D) as usize - ptr as usize }, 668usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(maxTexture1D) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxTexture2D) as usize - ptr as usize }, 672usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(maxTexture2D) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxTexture3D) as usize - ptr as usize }, 680usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(maxTexture3D) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hdpMemFlushCntl) as usize - ptr as usize }, 696usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(hdpMemFlushCntl) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hdpRegFlushCntl) as usize - ptr as usize }, 704usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(hdpRegFlushCntl) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).memPitch) as usize - ptr as usize }, 712usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(memPitch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).textureAlignment) as usize - ptr as usize }, 720usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(textureAlignment) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).texturePitchAlignment) as usize - ptr as usize }, 728usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(texturePitchAlignment) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kernelExecTimeoutEnabled) as usize - ptr as usize }, 736usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(kernelExecTimeoutEnabled) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ECCEnabled) as usize - ptr as usize }, 740usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(ECCEnabled) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).tccDriver) as usize - ptr as usize }, 744usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(tccDriver) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cooperativeMultiDeviceUnmatchedFunc) as usize - ptr as usize }, 748usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(cooperativeMultiDeviceUnmatchedFunc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cooperativeMultiDeviceUnmatchedGridDim) as usize - ptr as usize }, 752usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(cooperativeMultiDeviceUnmatchedGridDim) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cooperativeMultiDeviceUnmatchedBlockDim) as usize - ptr as usize }, 756usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(cooperativeMultiDeviceUnmatchedBlockDim) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cooperativeMultiDeviceUnmatchedSharedMem) as usize - ptr as usize }, 760usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(cooperativeMultiDeviceUnmatchedSharedMem) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).isLargeBar) as usize - ptr as usize }, 764usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(isLargeBar) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).asicRevision) as usize - ptr as usize }, 768usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(asicRevision) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).managedMemory) as usize - ptr as usize }, 772usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(managedMemory) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).directManagedMemAccessFromHost) as usize - ptr as usize }, 776usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(directManagedMemAccessFromHost) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).concurrentManagedAccess) as usize - ptr as usize }, 780usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(concurrentManagedAccess) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pageableMemoryAccess) as usize - ptr as usize }, 784usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(pageableMemoryAccess) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pageableMemoryAccessUsesHostPageTables) as usize - ptr as usize }, 788usize, concat!( "Offset of field: ", stringify!(hipDeviceProp_t), "::", stringify!(pageableMemoryAccessUsesHostPageTables) ) ); } impl Default for hipDeviceProp_t { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(u32)] #[non_exhaustive] #[doc = " Memory type (for pointer attributes)"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemoryType { #[doc = "< Memory is physically located on host"] hipMemoryTypeHost = 0, #[doc = "< Memory is physically located on device. (see deviceId for specific\n< device)"] hipMemoryTypeDevice = 1, #[doc = "< Array memory, physically located on device. (see deviceId for specific\n< device)"] hipMemoryTypeArray = 2, #[doc = "< Not used currently"] hipMemoryTypeUnified = 3, #[doc = "< Managed memory, automaticallly managed by the unified memory system"] hipMemoryTypeManaged = 4, } #[doc = " Pointer attributes"] #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipPointerAttribute_t { pub memoryType: hipMemoryType, pub device: ::libc::c_int, pub devicePointer: *mut ::libc::c_void, pub hostPointer: *mut ::libc::c_void, pub isManaged: ::libc::c_int, pub allocationFlags: ::libc::c_uint, } #[test] fn bindgen_test_layout_hipPointerAttribute_t() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(hipPointerAttribute_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipPointerAttribute_t)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).memoryType) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipPointerAttribute_t), "::", stringify!(memoryType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).device) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(hipPointerAttribute_t), "::", stringify!(device) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).devicePointer) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipPointerAttribute_t), "::", stringify!(devicePointer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hostPointer) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipPointerAttribute_t), "::", stringify!(hostPointer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).isManaged) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipPointerAttribute_t), "::", stringify!(isManaged) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).allocationFlags) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", stringify!(hipPointerAttribute_t), "::", stringify!(allocationFlags) ) ); } impl Default for hipPointerAttribute_t { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } impl hipError_t { pub const hipErrorMemoryAllocation: hipError_t = hipError_t::hipErrorOutOfMemory; } impl hipError_t { pub const hipErrorInitializationError: hipError_t = hipError_t::hipErrorNotInitialized; } impl hipError_t { pub const hipErrorMapBufferObjectFailed: hipError_t = hipError_t::hipErrorMapFailed; } impl hipError_t { pub const hipErrorInvalidResourceHandle: hipError_t = hipError_t::hipErrorInvalidHandle; } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipError_t { #[doc = "< Successful completion."] hipSuccess = 0, #[doc = "< One or more of the parameters passed to the API call is NULL\n< or not in an acceptable range."] hipErrorInvalidValue = 1, hipErrorOutOfMemory = 2, hipErrorNotInitialized = 3, hipErrorDeinitialized = 4, hipErrorProfilerDisabled = 5, hipErrorProfilerNotInitialized = 6, hipErrorProfilerAlreadyStarted = 7, hipErrorProfilerAlreadyStopped = 8, hipErrorInvalidConfiguration = 9, hipErrorInvalidPitchValue = 12, hipErrorInvalidSymbol = 13, #[doc = "< Invalid Device Pointer"] hipErrorInvalidDevicePointer = 17, #[doc = "< Invalid memory copy direction"] hipErrorInvalidMemcpyDirection = 21, hipErrorInsufficientDriver = 35, hipErrorMissingConfiguration = 52, hipErrorPriorLaunchFailure = 53, hipErrorInvalidDeviceFunction = 98, #[doc = "< Call to hipGetDeviceCount returned 0 devices"] hipErrorNoDevice = 100, #[doc = "< DeviceID must be in range 0...#compute-devices."] hipErrorInvalidDevice = 101, hipErrorInvalidImage = 200, #[doc = "< Produced when input context is invalid."] hipErrorInvalidContext = 201, hipErrorContextAlreadyCurrent = 202, hipErrorMapFailed = 205, hipErrorUnmapFailed = 206, hipErrorArrayIsMapped = 207, hipErrorAlreadyMapped = 208, hipErrorNoBinaryForGpu = 209, hipErrorAlreadyAcquired = 210, hipErrorNotMapped = 211, hipErrorNotMappedAsArray = 212, hipErrorNotMappedAsPointer = 213, hipErrorECCNotCorrectable = 214, hipErrorUnsupportedLimit = 215, hipErrorContextAlreadyInUse = 216, hipErrorPeerAccessUnsupported = 217, #[doc = "< In CUDA DRV, it is CUDA_ERROR_INVALID_PTX"] hipErrorInvalidKernelFile = 218, hipErrorInvalidGraphicsContext = 219, hipErrorInvalidSource = 300, hipErrorFileNotFound = 301, hipErrorSharedObjectSymbolNotFound = 302, hipErrorSharedObjectInitFailed = 303, hipErrorOperatingSystem = 304, hipErrorInvalidHandle = 400, #[doc = "< Resource required is not in a valid state to perform operation."] hipErrorIllegalState = 401, hipErrorNotFound = 500, #[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."] hipErrorNotReady = 600, hipErrorIllegalAddress = 700, #[doc = "< Out of resources error."] hipErrorLaunchOutOfResources = 701, hipErrorLaunchTimeOut = 702, hipErrorPeerAccessAlreadyEnabled = 704, hipErrorPeerAccessNotEnabled = 705, hipErrorSetOnActiveProcess = 708, hipErrorContextIsDestroyed = 709, #[doc = "< Produced when the kernel calls assert."] hipErrorAssert = 710, hipErrorHostMemoryAlreadyRegistered = 712, hipErrorHostMemoryNotRegistered = 713, hipErrorLaunchFailure = 719, hipErrorCooperativeLaunchTooLarge = 720, #[doc = "< Produced when the hip API is not supported/implemented"] hipErrorNotSupported = 801, #[doc = "< The operation is not permitted when the stream\n< is capturing."] hipErrorStreamCaptureUnsupported = 900, #[doc = "< The current capture sequence on the stream\n< has been invalidated due to a previous error."] hipErrorStreamCaptureInvalidated = 901, #[doc = "< The operation would have resulted in a merge of\n< two independent capture sequences."] hipErrorStreamCaptureMerge = 902, #[doc = "< The capture was not initiated in this stream."] hipErrorStreamCaptureUnmatched = 903, #[doc = "< The capture sequence contains a fork that was not\n< joined to the primary stream."] hipErrorStreamCaptureUnjoined = 904, #[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"] hipErrorStreamCaptureIsolation = 905, #[doc = "< The operation would have resulted in a disallowed\n< implicit dependency on a current capture sequence\n< from hipStreamLegacy."] hipErrorStreamCaptureImplicit = 906, #[doc = "< The operation is not permitted on an event which was last\n< recorded in a capturing stream."] hipErrorCapturedEvent = 907, #[doc = "< A stream capture sequence not initiated with\n< the hipStreamCaptureModeRelaxed argument to\n< hipStreamBeginCapture was passed to\n< hipStreamEndCapture in a different thread."] hipErrorStreamCaptureWrongThread = 908, #[doc = "< This error indicates that the graph update\n< not performed because it included changes which\n< violated constraintsspecific to instantiated graph\n< update."] hipErrorGraphExecUpdateFailure = 910, hipErrorUnknown = 999, #[doc = "< HSA runtime memory call returned error. Typically not seen\n< in production systems."] hipErrorRuntimeMemory = 1052, #[doc = "< HSA runtime call other than memory returned error. Typically\n< not seen in production systems."] hipErrorRuntimeOther = 1053, #[doc = "< Marker that more error codes are needed."] hipErrorTbd = 1054, } impl hipDeviceAttribute_t { pub const hipDeviceAttributeEccEnabled: hipDeviceAttribute_t = hipDeviceAttribute_t::hipDeviceAttributeCudaCompatibleBegin; } impl hipDeviceAttribute_t { pub const hipDeviceAttributeClockInstructionRate: hipDeviceAttribute_t = hipDeviceAttribute_t::hipDeviceAttributeAmdSpecificBegin; } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipDeviceAttribute_t { hipDeviceAttributeCudaCompatibleBegin = 0, #[doc = "< Cuda only. The maximum size of the window policy in bytes."] hipDeviceAttributeAccessPolicyMaxWindowSize = 1, #[doc = "< Cuda only. Asynchronous engines number."] hipDeviceAttributeAsyncEngineCount = 2, #[doc = "< Whether host memory can be mapped into device address space"] hipDeviceAttributeCanMapHostMemory = 3, #[doc = "< Cuda only. Device can access host registered memory\n< at the same virtual address as the CPU"] hipDeviceAttributeCanUseHostPointerForRegisteredMem = 4, #[doc = "< Peak clock frequency in kilohertz."] hipDeviceAttributeClockRate = 5, #[doc = "< Compute mode that device is currently in."] hipDeviceAttributeComputeMode = 6, #[doc = "< Cuda only. Device supports Compute Preemption."] hipDeviceAttributeComputePreemptionSupported = 7, #[doc = "< Device can possibly execute multiple kernels concurrently."] hipDeviceAttributeConcurrentKernels = 8, #[doc = "< Device can coherently access managed memory concurrently with the CPU"] hipDeviceAttributeConcurrentManagedAccess = 9, #[doc = "< Support cooperative launch"] hipDeviceAttributeCooperativeLaunch = 10, #[doc = "< Support cooperative launch on multiple devices"] hipDeviceAttributeCooperativeMultiDeviceLaunch = 11, #[doc = "< Cuda only. Device can concurrently copy memory and execute a kernel.\n< Deprecated. Use instead asyncEngineCount."] hipDeviceAttributeDeviceOverlap = 12, #[doc = "< Host can directly access managed memory on\n< the device without migration"] hipDeviceAttributeDirectManagedMemAccessFromHost = 13, #[doc = "< Cuda only. Device supports caching globals in L1"] hipDeviceAttributeGlobalL1CacheSupported = 14, #[doc = "< Cuda only. Link between the device and the host supports native atomic operations"] hipDeviceAttributeHostNativeAtomicSupported = 15, #[doc = "< Device is integrated GPU"] hipDeviceAttributeIntegrated = 16, #[doc = "< Multiple GPU devices."] hipDeviceAttributeIsMultiGpuBoard = 17, #[doc = "< Run time limit for kernels executed on the device"] hipDeviceAttributeKernelExecTimeout = 18, #[doc = "< Size of L2 cache in bytes. 0 if the device doesn't have L2 cache."] hipDeviceAttributeL2CacheSize = 19, #[doc = "< caching locals in L1 is supported"] hipDeviceAttributeLocalL1CacheSupported = 20, #[doc = "< Cuda only. 8-byte locally unique identifier in 8 bytes. Undefined on TCC and non-Windows platforms"] hipDeviceAttributeLuid = 21, #[doc = "< Cuda only. Luid device node mask. Undefined on TCC and non-Windows platforms"] hipDeviceAttributeLuidDeviceNodeMask = 22, #[doc = "< Major compute capability version number."] hipDeviceAttributeComputeCapabilityMajor = 23, #[doc = "< Device supports allocating managed memory on this system"] hipDeviceAttributeManagedMemory = 24, #[doc = "< Cuda only. Max block size per multiprocessor"] hipDeviceAttributeMaxBlocksPerMultiProcessor = 25, #[doc = "< Max block size in width."] hipDeviceAttributeMaxBlockDimX = 26, #[doc = "< Max block size in height."] hipDeviceAttributeMaxBlockDimY = 27, #[doc = "< Max block size in depth."] hipDeviceAttributeMaxBlockDimZ = 28, #[doc = "< Max grid size in width."] hipDeviceAttributeMaxGridDimX = 29, #[doc = "< Max grid size in height."] hipDeviceAttributeMaxGridDimY = 30, #[doc = "< Max grid size in depth."] hipDeviceAttributeMaxGridDimZ = 31, #[doc = "< Maximum size of 1D surface."] hipDeviceAttributeMaxSurface1D = 32, #[doc = "< Cuda only. Maximum dimensions of 1D layered surface."] hipDeviceAttributeMaxSurface1DLayered = 33, #[doc = "< Maximum dimension (width, height) of 2D surface."] hipDeviceAttributeMaxSurface2D = 34, #[doc = "< Cuda only. Maximum dimensions of 2D layered surface."] hipDeviceAttributeMaxSurface2DLayered = 35, #[doc = "< Maximum dimension (width, height, depth) of 3D surface."] hipDeviceAttributeMaxSurface3D = 36, #[doc = "< Cuda only. Maximum dimensions of Cubemap surface."] hipDeviceAttributeMaxSurfaceCubemap = 37, #[doc = "< Cuda only. Maximum dimension of Cubemap layered surface."] hipDeviceAttributeMaxSurfaceCubemapLayered = 38, #[doc = "< Maximum size of 1D texture."] hipDeviceAttributeMaxTexture1DWidth = 39, #[doc = "< Cuda only. Maximum dimensions of 1D layered texture."] hipDeviceAttributeMaxTexture1DLayered = 40, #[doc = "< Maximum number of elements allocatable in a 1D linear texture.\n< Use cudaDeviceGetTexture1DLinearMaxWidth() instead on Cuda."] hipDeviceAttributeMaxTexture1DLinear = 41, #[doc = "< Cuda only. Maximum size of 1D mipmapped texture."] hipDeviceAttributeMaxTexture1DMipmap = 42, #[doc = "< Maximum dimension width of 2D texture."] hipDeviceAttributeMaxTexture2DWidth = 43, #[doc = "< Maximum dimension hight of 2D texture."] hipDeviceAttributeMaxTexture2DHeight = 44, #[doc = "< Cuda only. Maximum dimensions of 2D texture if gather operations performed."] hipDeviceAttributeMaxTexture2DGather = 45, #[doc = "< Cuda only. Maximum dimensions of 2D layered texture."] hipDeviceAttributeMaxTexture2DLayered = 46, #[doc = "< Cuda only. Maximum dimensions (width, height, pitch) of 2D textures bound to pitched memory."] hipDeviceAttributeMaxTexture2DLinear = 47, #[doc = "< Cuda only. Maximum dimensions of 2D mipmapped texture."] hipDeviceAttributeMaxTexture2DMipmap = 48, #[doc = "< Maximum dimension width of 3D texture."] hipDeviceAttributeMaxTexture3DWidth = 49, #[doc = "< Maximum dimension height of 3D texture."] hipDeviceAttributeMaxTexture3DHeight = 50, #[doc = "< Maximum dimension depth of 3D texture."] hipDeviceAttributeMaxTexture3DDepth = 51, #[doc = "< Cuda only. Maximum dimensions of alternate 3D texture."] hipDeviceAttributeMaxTexture3DAlt = 52, #[doc = "< Cuda only. Maximum dimensions of Cubemap texture"] hipDeviceAttributeMaxTextureCubemap = 53, #[doc = "< Cuda only. Maximum dimensions of Cubemap layered texture."] hipDeviceAttributeMaxTextureCubemapLayered = 54, #[doc = "< Maximum dimension of a block"] hipDeviceAttributeMaxThreadsDim = 55, #[doc = "< Maximum number of threads per block."] hipDeviceAttributeMaxThreadsPerBlock = 56, #[doc = "< Maximum resident threads per multiprocessor."] hipDeviceAttributeMaxThreadsPerMultiProcessor = 57, #[doc = "< Maximum pitch in bytes allowed by memory copies"] hipDeviceAttributeMaxPitch = 58, #[doc = "< Global memory bus width in bits."] hipDeviceAttributeMemoryBusWidth = 59, #[doc = "< Peak memory clock frequency in kilohertz."] hipDeviceAttributeMemoryClockRate = 60, #[doc = "< Minor compute capability version number."] hipDeviceAttributeComputeCapabilityMinor = 61, #[doc = "< Cuda only. Unique ID of device group on the same multi-GPU board"] hipDeviceAttributeMultiGpuBoardGroupID = 62, #[doc = "< Number of multiprocessors on the device."] hipDeviceAttributeMultiprocessorCount = 63, #[doc = "< Device name."] hipDeviceAttributeName = 64, #[doc = "< Device supports coherently accessing pageable memory\n< without calling hipHostRegister on it"] hipDeviceAttributePageableMemoryAccess = 65, #[doc = "< Device accesses pageable memory via the host's page tables"] hipDeviceAttributePageableMemoryAccessUsesHostPageTables = 66, #[doc = "< PCI Bus ID."] hipDeviceAttributePciBusId = 67, #[doc = "< PCI Device ID."] hipDeviceAttributePciDeviceId = 68, #[doc = "< PCI Domain ID."] hipDeviceAttributePciDomainID = 69, #[doc = "< Cuda11 only. Maximum l2 persisting lines capacity in bytes"] hipDeviceAttributePersistingL2CacheMaxSize = 70, #[doc = "< 32-bit registers available to a thread block. This number is shared\n< by all thread blocks simultaneously resident on a multiprocessor."] hipDeviceAttributeMaxRegistersPerBlock = 71, #[doc = "< 32-bit registers available per block."] hipDeviceAttributeMaxRegistersPerMultiprocessor = 72, #[doc = "< Cuda11 only. Shared memory reserved by CUDA driver per block."] hipDeviceAttributeReservedSharedMemPerBlock = 73, #[doc = "< Maximum shared memory available per block in bytes."] hipDeviceAttributeMaxSharedMemoryPerBlock = 74, #[doc = "< Cuda only. Maximum shared memory per block usable by special opt in."] hipDeviceAttributeSharedMemPerBlockOptin = 75, #[doc = "< Cuda only. Shared memory available per multiprocessor."] hipDeviceAttributeSharedMemPerMultiprocessor = 76, #[doc = "< Cuda only. Performance ratio of single precision to double precision."] hipDeviceAttributeSingleToDoublePrecisionPerfRatio = 77, #[doc = "< Cuda only. Whether to support stream priorities."] hipDeviceAttributeStreamPrioritiesSupported = 78, #[doc = "< Cuda only. Alignment requirement for surfaces"] hipDeviceAttributeSurfaceAlignment = 79, #[doc = "< Cuda only. Whether device is a Tesla device using TCC driver"] hipDeviceAttributeTccDriver = 80, #[doc = "< Alignment requirement for textures"] hipDeviceAttributeTextureAlignment = 81, #[doc = "< Pitch alignment requirement for 2D texture references bound to pitched memory;"] hipDeviceAttributeTexturePitchAlignment = 82, #[doc = "< Constant memory size in bytes."] hipDeviceAttributeTotalConstantMemory = 83, #[doc = "< Global memory available on devicice."] hipDeviceAttributeTotalGlobalMem = 84, #[doc = "< Cuda only. An unified address space shared with the host."] hipDeviceAttributeUnifiedAddressing = 85, #[doc = "< Cuda only. Unique ID in 16 byte."] hipDeviceAttributeUuid = 86, #[doc = "< Warp size in threads."] hipDeviceAttributeWarpSize = 87, #[doc = "< Device supports HIP Stream Ordered Memory Allocator"] hipDeviceAttributeMemoryPoolsSupported = 88, #[doc = "< Device supports HIP virtual memory management"] hipDeviceAttributeVirtualMemoryManagementSupported = 89, hipDeviceAttributeCudaCompatibleEnd = 9999, hipDeviceAttributeAmdSpecificBegin = 10000, #[doc = "< Device architecture"] hipDeviceAttributeArch = 10001, #[doc = "< Maximum Shared Memory PerMultiprocessor."] hipDeviceAttributeMaxSharedMemoryPerMultiprocessor = 10002, #[doc = "< Device gcn architecture"] hipDeviceAttributeGcnArch = 10003, #[doc = "< Device gcnArch name in 256 bytes"] hipDeviceAttributeGcnArchName = 10004, #[doc = "< Address of the HDP_MEM_COHERENCY_FLUSH_CNTL register"] hipDeviceAttributeHdpMemFlushCntl = 10005, #[doc = "< Address of the HDP_REG_COHERENCY_FLUSH_CNTL register"] hipDeviceAttributeHdpRegFlushCntl = 10006, #[doc = "< Supports cooperative launch on multiple\n< devices with unmatched functions"] hipDeviceAttributeCooperativeMultiDeviceUnmatchedFunc = 10007, #[doc = "< Supports cooperative launch on multiple\n< devices with unmatched grid dimensions"] hipDeviceAttributeCooperativeMultiDeviceUnmatchedGridDim = 10008, #[doc = "< Supports cooperative launch on multiple\n< devices with unmatched block dimensions"] hipDeviceAttributeCooperativeMultiDeviceUnmatchedBlockDim = 10009, #[doc = "< Supports cooperative launch on multiple\n< devices with unmatched shared memories"] hipDeviceAttributeCooperativeMultiDeviceUnmatchedSharedMem = 10010, #[doc = "< Whether it is LargeBar"] hipDeviceAttributeIsLargeBar = 10011, #[doc = "< Revision of the GPU in this device"] hipDeviceAttributeAsicRevision = 10012, #[doc = "< '1' if Device supports hipStreamWaitValue32() and\n< hipStreamWaitValue64(), '0' otherwise."] hipDeviceAttributeCanUseStreamWaitValue = 10013, #[doc = "< '1' if Device supports image, '0' otherwise."] hipDeviceAttributeImageSupport = 10014, #[doc = "< All available physical compute\n< units for the device"] hipDeviceAttributePhysicalMultiProcessorCount = 10015, #[doc = "< '1' if Device supports fine grain, '0' otherwise"] hipDeviceAttributeFineGrainSupport = 10016, #[doc = "< Constant frequency of wall clock in kilohertz."] hipDeviceAttributeWallClockRate = 10017, hipDeviceAttributeAmdSpecificEnd = 19999, hipDeviceAttributeVendorSpecificBegin = 20000, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipComputeMode { hipComputeModeDefault = 0, hipComputeModeExclusive = 1, hipComputeModeProhibited = 2, hipComputeModeExclusiveProcess = 3, } pub type __u_char = ::libc::c_uchar; pub type __u_short = ::libc::c_ushort; pub type __u_int = ::libc::c_uint; pub type __u_long = ::libc::c_ulong; pub type __int8_t = ::libc::c_schar; pub type __uint8_t = ::libc::c_uchar; pub type __int16_t = ::libc::c_short; pub type __uint16_t = ::libc::c_ushort; pub type __int32_t = ::libc::c_int; pub type __uint32_t = ::libc::c_uint; pub type __int64_t = ::libc::c_long; pub type __uint64_t = ::libc::c_ulong; pub type __int_least8_t = __int8_t; pub type __uint_least8_t = __uint8_t; pub type __int_least16_t = __int16_t; pub type __uint_least16_t = __uint16_t; pub type __int_least32_t = __int32_t; pub type __uint_least32_t = __uint32_t; pub type __int_least64_t = __int64_t; pub type __uint_least64_t = __uint64_t; pub type __quad_t = ::libc::c_long; pub type __u_quad_t = ::libc::c_ulong; pub type __intmax_t = ::libc::c_long; pub type __uintmax_t = ::libc::c_ulong; pub type __dev_t = ::libc::c_ulong; pub type __uid_t = ::libc::c_uint; pub type __gid_t = ::libc::c_uint; pub type __ino_t = ::libc::c_ulong; pub type __ino64_t = ::libc::c_ulong; pub type __mode_t = ::libc::c_uint; pub type __nlink_t = ::libc::c_ulong; pub type __off_t = ::libc::c_long; pub type __off64_t = ::libc::c_long; pub type __pid_t = ::libc::c_int; #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct __fsid_t { pub __val: [::libc::c_int; 2usize], } #[test] fn bindgen_test_layout___fsid_t() { const UNINIT: ::std::mem::MaybeUninit<__fsid_t> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<__fsid_t>(), 8usize, concat!("Size of: ", stringify!(__fsid_t)) ); assert_eq!( ::std::mem::align_of::<__fsid_t>(), 4usize, concat!("Alignment of ", stringify!(__fsid_t)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(__fsid_t), "::", stringify!(__val) ) ); } pub type __clock_t = ::libc::c_long; pub type __rlim_t = ::libc::c_ulong; pub type __rlim64_t = ::libc::c_ulong; pub type __id_t = ::libc::c_uint; pub type __time_t = ::libc::c_long; pub type __useconds_t = ::libc::c_uint; pub type __suseconds_t = ::libc::c_long; pub type __suseconds64_t = ::libc::c_long; pub type __daddr_t = ::libc::c_int; pub type __key_t = ::libc::c_int; pub type __clockid_t = ::libc::c_int; pub type __timer_t = *mut ::libc::c_void; pub type __blksize_t = ::libc::c_long; pub type __blkcnt_t = ::libc::c_long; pub type __blkcnt64_t = ::libc::c_long; pub type __fsblkcnt_t = ::libc::c_ulong; pub type __fsblkcnt64_t = ::libc::c_ulong; pub type __fsfilcnt_t = ::libc::c_ulong; pub type __fsfilcnt64_t = ::libc::c_ulong; pub type __fsword_t = ::libc::c_long; pub type __ssize_t = ::libc::c_long; pub type __syscall_slong_t = ::libc::c_long; pub type __syscall_ulong_t = ::libc::c_ulong; pub type __loff_t = __off64_t; pub type __caddr_t = *mut ::libc::c_char; pub type __intptr_t = ::libc::c_long; pub type __socklen_t = ::libc::c_uint; pub type __sig_atomic_t = ::libc::c_int; pub type int_least8_t = __int_least8_t; pub type int_least16_t = __int_least16_t; pub type int_least32_t = __int_least32_t; pub type int_least64_t = __int_least64_t; pub type uint_least8_t = __uint_least8_t; pub type uint_least16_t = __uint_least16_t; pub type uint_least32_t = __uint_least32_t; pub type uint_least64_t = __uint_least64_t; pub type int_fast8_t = ::libc::c_schar; pub type int_fast16_t = ::libc::c_long; pub type int_fast32_t = ::libc::c_long; pub type int_fast64_t = ::libc::c_long; pub type uint_fast8_t = ::libc::c_uchar; pub type uint_fast16_t = ::libc::c_ulong; pub type uint_fast32_t = ::libc::c_ulong; pub type uint_fast64_t = ::libc::c_ulong; pub type intmax_t = __intmax_t; pub type uintmax_t = __uintmax_t; pub type wchar_t = ::libc::c_int; #[repr(C)] #[repr(align(16))] #[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] pub struct max_align_t { pub __clang_max_align_nonce1: ::libc::c_longlong, pub __bindgen_padding_0: u64, pub __clang_max_align_nonce2: u128, } #[test] fn bindgen_test_layout_max_align_t() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(max_align_t)) ); assert_eq!( ::std::mem::align_of::(), 16usize, concat!("Alignment of ", stringify!(max_align_t)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(max_align_t), "::", stringify!(__clang_max_align_nonce1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(max_align_t), "::", stringify!(__clang_max_align_nonce2) ) ); } pub type hipDeviceptr_t = *mut ::libc::c_void; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipChannelFormatKind { hipChannelFormatKindSigned = 0, hipChannelFormatKindUnsigned = 1, hipChannelFormatKindFloat = 2, hipChannelFormatKindNone = 3, } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipChannelFormatDesc { pub x: ::libc::c_int, pub y: ::libc::c_int, pub z: ::libc::c_int, pub w: ::libc::c_int, pub f: hipChannelFormatKind, } #[test] fn bindgen_test_layout_hipChannelFormatDesc() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, concat!("Size of: ", stringify!(hipChannelFormatDesc)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(hipChannelFormatDesc)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipChannelFormatDesc), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(hipChannelFormatDesc), "::", stringify!(y) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipChannelFormatDesc), "::", stringify!(z) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(hipChannelFormatDesc), "::", stringify!(w) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipChannelFormatDesc), "::", stringify!(f) ) ); } impl Default for hipChannelFormatDesc { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipArray_Format { HIP_AD_FORMAT_UNSIGNED_INT8 = 1, HIP_AD_FORMAT_UNSIGNED_INT16 = 2, HIP_AD_FORMAT_UNSIGNED_INT32 = 3, HIP_AD_FORMAT_SIGNED_INT8 = 8, HIP_AD_FORMAT_SIGNED_INT16 = 9, HIP_AD_FORMAT_SIGNED_INT32 = 10, HIP_AD_FORMAT_HALF = 16, HIP_AD_FORMAT_FLOAT = 32, } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct HIP_ARRAY_DESCRIPTOR { pub Width: usize, pub Height: usize, pub Format: hipArray_Format, pub NumChannels: ::libc::c_uint, } #[test] fn bindgen_test_layout_HIP_ARRAY_DESCRIPTOR() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(HIP_ARRAY_DESCRIPTOR)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(HIP_ARRAY_DESCRIPTOR)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_ARRAY_DESCRIPTOR), "::", stringify!(Width) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Height) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(HIP_ARRAY_DESCRIPTOR), "::", stringify!(Height) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Format) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(HIP_ARRAY_DESCRIPTOR), "::", stringify!(Format) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).NumChannels) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(HIP_ARRAY_DESCRIPTOR), "::", stringify!(NumChannels) ) ); } impl Default for HIP_ARRAY_DESCRIPTOR { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct HIP_ARRAY3D_DESCRIPTOR { pub Width: usize, pub Height: usize, pub Depth: usize, pub Format: hipArray_Format, pub NumChannels: ::libc::c_uint, pub Flags: ::libc::c_uint, } #[test] fn bindgen_test_layout_HIP_ARRAY3D_DESCRIPTOR() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, concat!("Size of: ", stringify!(HIP_ARRAY3D_DESCRIPTOR)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(HIP_ARRAY3D_DESCRIPTOR)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_ARRAY3D_DESCRIPTOR), "::", stringify!(Width) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Height) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(HIP_ARRAY3D_DESCRIPTOR), "::", stringify!(Height) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Depth) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(HIP_ARRAY3D_DESCRIPTOR), "::", stringify!(Depth) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Format) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(HIP_ARRAY3D_DESCRIPTOR), "::", stringify!(Format) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).NumChannels) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", stringify!(HIP_ARRAY3D_DESCRIPTOR), "::", stringify!(NumChannels) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Flags) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(HIP_ARRAY3D_DESCRIPTOR), "::", stringify!(Flags) ) ); } impl Default for HIP_ARRAY3D_DESCRIPTOR { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipArray { pub data: *mut ::libc::c_void, pub desc: hipChannelFormatDesc, pub type_: ::libc::c_uint, pub width: ::libc::c_uint, pub height: ::libc::c_uint, pub depth: ::libc::c_uint, pub Format: hipArray_Format, pub NumChannels: ::libc::c_uint, pub isDrv: bool, pub textureType: ::libc::c_uint, } #[test] fn bindgen_test_layout_hipArray() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(hipArray)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipArray)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipArray), "::", stringify!(data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipArray), "::", stringify!(desc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", stringify!(hipArray), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hipArray), "::", stringify!(width) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", stringify!(hipArray), "::", stringify!(height) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(hipArray), "::", stringify!(depth) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Format) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", stringify!(hipArray), "::", stringify!(Format) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).NumChannels) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(hipArray), "::", stringify!(NumChannels) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).isDrv) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", stringify!(hipArray), "::", stringify!(isDrv) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).textureType) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(hipArray), "::", stringify!(textureType) ) ); } impl Default for hipArray { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hip_Memcpy2D { pub srcXInBytes: usize, pub srcY: usize, pub srcMemoryType: hipMemoryType, pub srcHost: *const ::libc::c_void, pub srcDevice: hipDeviceptr_t, pub srcArray: *mut hipArray, pub srcPitch: usize, pub dstXInBytes: usize, pub dstY: usize, pub dstMemoryType: hipMemoryType, pub dstHost: *mut ::libc::c_void, pub dstDevice: hipDeviceptr_t, pub dstArray: *mut hipArray, pub dstPitch: usize, pub WidthInBytes: usize, pub Height: usize, } #[test] fn bindgen_test_layout_hip_Memcpy2D() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 128usize, concat!("Size of: ", stringify!(hip_Memcpy2D)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hip_Memcpy2D)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcXInBytes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(srcXInBytes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcY) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(srcY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcMemoryType) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(srcMemoryType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcHost) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(srcHost) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcDevice) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(srcDevice) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(srcArray) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcPitch) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(srcPitch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstXInBytes) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(dstXInBytes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstY) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(dstY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstMemoryType) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(dstMemoryType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstHost) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(dstHost) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstDevice) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(dstDevice) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(dstArray) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstPitch) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(dstPitch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).WidthInBytes) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(WidthInBytes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Height) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", stringify!(hip_Memcpy2D), "::", stringify!(Height) ) ); } impl Default for hip_Memcpy2D { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type hipArray_t = *mut hipArray; pub type hiparray = hipArray_t; pub type hipArray_const_t = *const hipArray; #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipMipmappedArray { pub data: *mut ::libc::c_void, pub desc: hipChannelFormatDesc, pub type_: ::libc::c_uint, pub width: ::libc::c_uint, pub height: ::libc::c_uint, pub depth: ::libc::c_uint, pub min_mipmap_level: ::libc::c_uint, pub max_mipmap_level: ::libc::c_uint, pub flags: ::libc::c_uint, pub format: hipArray_Format, } #[test] fn bindgen_test_layout_hipMipmappedArray() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(hipMipmappedArray)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipMipmappedArray)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipMipmappedArray), "::", stringify!(data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipMipmappedArray), "::", stringify!(desc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", stringify!(hipMipmappedArray), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hipMipmappedArray), "::", stringify!(width) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", stringify!(hipMipmappedArray), "::", stringify!(height) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(hipMipmappedArray), "::", stringify!(depth) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).min_mipmap_level) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", stringify!(hipMipmappedArray), "::", stringify!(min_mipmap_level) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).max_mipmap_level) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(hipMipmappedArray), "::", stringify!(max_mipmap_level) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", stringify!(hipMipmappedArray), "::", stringify!(flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(hipMipmappedArray), "::", stringify!(format) ) ); } impl Default for hipMipmappedArray { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type hipMipmappedArray_t = *mut hipMipmappedArray; pub type hipMipmappedArray_const_t = *const hipMipmappedArray; #[repr(u32)] #[non_exhaustive] #[doc = " hip resource types"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipResourceType { hipResourceTypeArray = 0, hipResourceTypeMipmappedArray = 1, hipResourceTypeLinear = 2, hipResourceTypePitch2D = 3, } #[doc = "< Array resoure"] pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_ARRAY: HIPresourcetype_enum = 0; #[doc = "< Mipmapped array resource"] pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_MIPMAPPED_ARRAY: HIPresourcetype_enum = 1; #[doc = "< Linear resource"] pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_LINEAR: HIPresourcetype_enum = 2; #[doc = "< Pitch 2D resource"] pub const HIPresourcetype_enum_HIP_RESOURCE_TYPE_PITCH2D: HIPresourcetype_enum = 3; pub type HIPresourcetype_enum = ::libc::c_uint; pub use self::HIPresourcetype_enum as HIPresourcetype; pub use self::HIPresourcetype_enum as hipResourcetype; pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_WRAP: HIPaddress_mode_enum = 0; pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_CLAMP: HIPaddress_mode_enum = 1; pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_MIRROR: HIPaddress_mode_enum = 2; pub const HIPaddress_mode_enum_HIP_TR_ADDRESS_MODE_BORDER: HIPaddress_mode_enum = 3; #[doc = " hip address modes"] pub type HIPaddress_mode_enum = ::libc::c_uint; #[doc = " hip address modes"] pub use self::HIPaddress_mode_enum as HIPaddress_mode; pub const HIPfilter_mode_enum_HIP_TR_FILTER_MODE_POINT: HIPfilter_mode_enum = 0; pub const HIPfilter_mode_enum_HIP_TR_FILTER_MODE_LINEAR: HIPfilter_mode_enum = 1; #[doc = " hip filter modes"] pub type HIPfilter_mode_enum = ::libc::c_uint; #[doc = " hip filter modes"] pub use self::HIPfilter_mode_enum as HIPfilter_mode; #[doc = " Texture descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] pub struct HIP_TEXTURE_DESC_st { #[doc = "< Address modes"] pub addressMode: [HIPaddress_mode; 3usize], #[doc = "< Filter mode"] pub filterMode: HIPfilter_mode, #[doc = "< Flags"] pub flags: ::libc::c_uint, #[doc = "< Maximum anisotropy ratio"] pub maxAnisotropy: ::libc::c_uint, #[doc = "< Mipmap filter mode"] pub mipmapFilterMode: HIPfilter_mode, #[doc = "< Mipmap level bias"] pub mipmapLevelBias: f32, #[doc = "< Mipmap minimum level clamp"] pub minMipmapLevelClamp: f32, #[doc = "< Mipmap maximum level clamp"] pub maxMipmapLevelClamp: f32, #[doc = "< Border Color"] pub borderColor: [f32; 4usize], pub reserved: [::libc::c_int; 12usize], } #[test] fn bindgen_test_layout_HIP_TEXTURE_DESC_st() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 104usize, concat!("Size of: ", stringify!(HIP_TEXTURE_DESC_st)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(HIP_TEXTURE_DESC_st)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).addressMode) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_TEXTURE_DESC_st), "::", stringify!(addressMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).filterMode) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(HIP_TEXTURE_DESC_st), "::", stringify!(filterMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(HIP_TEXTURE_DESC_st), "::", stringify!(flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxAnisotropy) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(HIP_TEXTURE_DESC_st), "::", stringify!(maxAnisotropy) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mipmapFilterMode) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(HIP_TEXTURE_DESC_st), "::", stringify!(mipmapFilterMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mipmapLevelBias) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", stringify!(HIP_TEXTURE_DESC_st), "::", stringify!(mipmapLevelBias) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).minMipmapLevelClamp) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(HIP_TEXTURE_DESC_st), "::", stringify!(minMipmapLevelClamp) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxMipmapLevelClamp) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", stringify!(HIP_TEXTURE_DESC_st), "::", stringify!(maxMipmapLevelClamp) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).borderColor) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(HIP_TEXTURE_DESC_st), "::", stringify!(borderColor) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(HIP_TEXTURE_DESC_st), "::", stringify!(reserved) ) ); } impl Default for HIP_TEXTURE_DESC_st { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[doc = " Texture descriptor"] pub type HIP_TEXTURE_DESC = HIP_TEXTURE_DESC_st; #[repr(u32)] #[non_exhaustive] #[doc = " hip texture resource view formats"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipResourceViewFormat { hipResViewFormatNone = 0, hipResViewFormatUnsignedChar1 = 1, hipResViewFormatUnsignedChar2 = 2, hipResViewFormatUnsignedChar4 = 3, hipResViewFormatSignedChar1 = 4, hipResViewFormatSignedChar2 = 5, hipResViewFormatSignedChar4 = 6, hipResViewFormatUnsignedShort1 = 7, hipResViewFormatUnsignedShort2 = 8, hipResViewFormatUnsignedShort4 = 9, hipResViewFormatSignedShort1 = 10, hipResViewFormatSignedShort2 = 11, hipResViewFormatSignedShort4 = 12, hipResViewFormatUnsignedInt1 = 13, hipResViewFormatUnsignedInt2 = 14, hipResViewFormatUnsignedInt4 = 15, hipResViewFormatSignedInt1 = 16, hipResViewFormatSignedInt2 = 17, hipResViewFormatSignedInt4 = 18, hipResViewFormatHalf1 = 19, hipResViewFormatHalf2 = 20, hipResViewFormatHalf4 = 21, hipResViewFormatFloat1 = 22, hipResViewFormatFloat2 = 23, hipResViewFormatFloat4 = 24, hipResViewFormatUnsignedBlockCompressed1 = 25, hipResViewFormatUnsignedBlockCompressed2 = 26, hipResViewFormatUnsignedBlockCompressed3 = 27, hipResViewFormatUnsignedBlockCompressed4 = 28, hipResViewFormatSignedBlockCompressed4 = 29, hipResViewFormatUnsignedBlockCompressed5 = 30, hipResViewFormatSignedBlockCompressed5 = 31, hipResViewFormatUnsignedBlockCompressed6H = 32, hipResViewFormatSignedBlockCompressed6H = 33, hipResViewFormatUnsignedBlockCompressed7 = 34, } #[doc = "< No resource view format (use underlying resource format)"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_NONE: HIPresourceViewFormat_enum = 0; #[doc = "< 1 channel unsigned 8-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X8: HIPresourceViewFormat_enum = 1; #[doc = "< 2 channel unsigned 8-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X8: HIPresourceViewFormat_enum = 2; #[doc = "< 4 channel unsigned 8-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X8: HIPresourceViewFormat_enum = 3; #[doc = "< 1 channel signed 8-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X8: HIPresourceViewFormat_enum = 4; #[doc = "< 2 channel signed 8-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X8: HIPresourceViewFormat_enum = 5; #[doc = "< 4 channel signed 8-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X8: HIPresourceViewFormat_enum = 6; #[doc = "< 1 channel unsigned 16-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X16: HIPresourceViewFormat_enum = 7; #[doc = "< 2 channel unsigned 16-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X16: HIPresourceViewFormat_enum = 8; #[doc = "< 4 channel unsigned 16-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X16: HIPresourceViewFormat_enum = 9; #[doc = "< 1 channel signed 16-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X16: HIPresourceViewFormat_enum = 10; #[doc = "< 2 channel signed 16-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X16: HIPresourceViewFormat_enum = 11; #[doc = "< 4 channel signed 16-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X16: HIPresourceViewFormat_enum = 12; #[doc = "< 1 channel unsigned 32-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_1X32: HIPresourceViewFormat_enum = 13; #[doc = "< 2 channel unsigned 32-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_2X32: HIPresourceViewFormat_enum = 14; #[doc = "< 4 channel unsigned 32-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UINT_4X32: HIPresourceViewFormat_enum = 15; #[doc = "< 1 channel signed 32-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_1X32: HIPresourceViewFormat_enum = 16; #[doc = "< 2 channel signed 32-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_2X32: HIPresourceViewFormat_enum = 17; #[doc = "< 4 channel signed 32-bit integers"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SINT_4X32: HIPresourceViewFormat_enum = 18; #[doc = "< 1 channel 16-bit floating point"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_1X16: HIPresourceViewFormat_enum = 19; #[doc = "< 2 channel 16-bit floating point"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_2X16: HIPresourceViewFormat_enum = 20; #[doc = "< 4 channel 16-bit floating point"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_4X16: HIPresourceViewFormat_enum = 21; #[doc = "< 1 channel 32-bit floating point"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_1X32: HIPresourceViewFormat_enum = 22; #[doc = "< 2 channel 32-bit floating point"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_2X32: HIPresourceViewFormat_enum = 23; #[doc = "< 4 channel 32-bit floating point"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_FLOAT_4X32: HIPresourceViewFormat_enum = 24; #[doc = "< Block compressed 1"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC1: HIPresourceViewFormat_enum = 25; #[doc = "< Block compressed 2"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC2: HIPresourceViewFormat_enum = 26; #[doc = "< Block compressed 3"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC3: HIPresourceViewFormat_enum = 27; #[doc = "< Block compressed 4 unsigned"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC4: HIPresourceViewFormat_enum = 28; #[doc = "< Block compressed 4 signed"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC4: HIPresourceViewFormat_enum = 29; #[doc = "< Block compressed 5 unsigned"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC5: HIPresourceViewFormat_enum = 30; #[doc = "< Block compressed 5 signed"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC5: HIPresourceViewFormat_enum = 31; #[doc = "< Block compressed 6 unsigned half-float"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC6H: HIPresourceViewFormat_enum = 32; #[doc = "< Block compressed 6 signed half-float"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_SIGNED_BC6H: HIPresourceViewFormat_enum = 33; #[doc = "< Block compressed 7"] pub const HIPresourceViewFormat_enum_HIP_RES_VIEW_FORMAT_UNSIGNED_BC7: HIPresourceViewFormat_enum = 34; pub type HIPresourceViewFormat_enum = ::libc::c_uint; pub use self::HIPresourceViewFormat_enum as HIPresourceViewFormat; #[doc = " HIP resource descriptor"] #[repr(C)] #[derive(Copy, Clone)] pub struct hipResourceDesc { pub resType: hipResourceType, pub res: hipResourceDesc__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union hipResourceDesc__bindgen_ty_1 { pub array: hipResourceDesc__bindgen_ty_1__bindgen_ty_1, pub mipmap: hipResourceDesc__bindgen_ty_1__bindgen_ty_2, pub linear: hipResourceDesc__bindgen_ty_1__bindgen_ty_3, pub pitch2D: hipResourceDesc__bindgen_ty_1__bindgen_ty_4, } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_1 { pub array: hipArray_t, } #[test] fn bindgen_test_layout_hipResourceDesc__bindgen_ty_1__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!( "Size of: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_1), "::", stringify!(array) ) ); } impl Default for hipResourceDesc__bindgen_ty_1__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_2 { pub mipmap: hipMipmappedArray_t, } #[test] fn bindgen_test_layout_hipResourceDesc__bindgen_ty_1__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!( "Size of: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_2), "::", stringify!(mipmap) ) ); } impl Default for hipResourceDesc__bindgen_ty_1__bindgen_ty_2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_3 { pub devPtr: *mut ::libc::c_void, pub desc: hipChannelFormatDesc, pub sizeInBytes: usize, } #[test] fn bindgen_test_layout_hipResourceDesc__bindgen_ty_1__bindgen_ty_3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, concat!( "Size of: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_3) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_3) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_3), "::", stringify!(devPtr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_3), "::", stringify!(desc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sizeInBytes) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_3), "::", stringify!(sizeInBytes) ) ); } impl Default for hipResourceDesc__bindgen_ty_1__bindgen_ty_3 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipResourceDesc__bindgen_ty_1__bindgen_ty_4 { pub devPtr: *mut ::libc::c_void, pub desc: hipChannelFormatDesc, pub width: usize, pub height: usize, pub pitchInBytes: usize, } #[test] fn bindgen_test_layout_hipResourceDesc__bindgen_ty_1__bindgen_ty_4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, concat!( "Size of: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_4) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_4) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_4), "::", stringify!(devPtr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_4), "::", stringify!(desc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_4), "::", stringify!(width) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_4), "::", stringify!(height) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pitchInBytes) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1__bindgen_ty_4), "::", stringify!(pitchInBytes) ) ); } impl Default for hipResourceDesc__bindgen_ty_1__bindgen_ty_4 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout_hipResourceDesc__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, concat!("Size of: ", stringify!(hipResourceDesc__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipResourceDesc__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1), "::", stringify!(array) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1), "::", stringify!(mipmap) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).linear) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1), "::", stringify!(linear) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pitch2D) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipResourceDesc__bindgen_ty_1), "::", stringify!(pitch2D) ) ); } impl Default for hipResourceDesc__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout_hipResourceDesc() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(hipResourceDesc)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipResourceDesc)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).resType) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipResourceDesc), "::", stringify!(resType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).res) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipResourceDesc), "::", stringify!(res) ) ); } impl Default for hipResourceDesc { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Copy, Clone)] pub struct HIP_RESOURCE_DESC_st { #[doc = "< Resource type"] pub resType: HIPresourcetype, pub res: HIP_RESOURCE_DESC_st__bindgen_ty_1, #[doc = "< Flags (must be zero)"] pub flags: ::libc::c_uint, } #[repr(C)] #[derive(Copy, Clone)] pub union HIP_RESOURCE_DESC_st__bindgen_ty_1 { pub array: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1, pub mipmap: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2, pub linear: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3, pub pitch2D: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4, pub reserved: HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5, } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 { #[doc = "< HIP array"] pub hArray: hipArray_t, } #[test] fn bindgen_test_layout_HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!( "Size of: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hArray) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1), "::", stringify!(hArray) ) ); } impl Default for HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 { #[doc = "< HIP mipmapped array"] pub hMipmappedArray: hipMipmappedArray_t, } #[test] fn bindgen_test_layout_HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!( "Size of: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hMipmappedArray) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2), "::", stringify!(hMipmappedArray) ) ); } impl Default for HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 { #[doc = "< Device pointer"] pub devPtr: hipDeviceptr_t, #[doc = "< Array format"] pub format: hipArray_Format, #[doc = "< Channels per array element"] pub numChannels: ::libc::c_uint, #[doc = "< Size in bytes"] pub sizeInBytes: usize, } #[test] fn bindgen_test_layout_HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!( "Size of: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), "::", stringify!(devPtr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), "::", stringify!(format) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).numChannels) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), "::", stringify!(numChannels) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sizeInBytes) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3), "::", stringify!(sizeInBytes) ) ); } impl Default for HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_3 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 { #[doc = "< Device pointer"] pub devPtr: hipDeviceptr_t, #[doc = "< Array format"] pub format: hipArray_Format, #[doc = "< Channels per array element"] pub numChannels: ::libc::c_uint, #[doc = "< Width of the array in elements"] pub width: usize, #[doc = "< Height of the array in elements"] pub height: usize, #[doc = "< Pitch between two rows in bytes"] pub pitchInBytes: usize, } #[test] fn bindgen_test_layout_HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, concat!( "Size of: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), "::", stringify!(devPtr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), "::", stringify!(format) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).numChannels) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), "::", stringify!(numChannels) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), "::", stringify!(width) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), "::", stringify!(height) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pitchInBytes) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4), "::", stringify!(pitchInBytes) ) ); } impl Default for HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_4 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5 { pub reserved: [::libc::c_int; 32usize], } #[test] fn bindgen_test_layout_HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 128usize, concat!( "Size of: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5) ) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!( "Alignment of ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1__bindgen_ty_5), "::", stringify!(reserved) ) ); } #[test] fn bindgen_test_layout_HIP_RESOURCE_DESC_st__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 128usize, concat!("Size of: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1), "::", stringify!(array) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1), "::", stringify!(mipmap) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).linear) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1), "::", stringify!(linear) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pitch2D) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1), "::", stringify!(pitch2D) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st__bindgen_ty_1), "::", stringify!(reserved) ) ); } impl Default for HIP_RESOURCE_DESC_st__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout_HIP_RESOURCE_DESC_st() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 144usize, concat!("Size of: ", stringify!(HIP_RESOURCE_DESC_st)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(HIP_RESOURCE_DESC_st)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).resType) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st), "::", stringify!(resType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).res) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st), "::", stringify!(res) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_DESC_st), "::", stringify!(flags) ) ); } impl Default for HIP_RESOURCE_DESC_st { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type HIP_RESOURCE_DESC = HIP_RESOURCE_DESC_st; #[doc = " hip resource view descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipResourceViewDesc { pub format: hipResourceViewFormat, pub width: usize, pub height: usize, pub depth: usize, pub firstMipmapLevel: ::libc::c_uint, pub lastMipmapLevel: ::libc::c_uint, pub firstLayer: ::libc::c_uint, pub lastLayer: ::libc::c_uint, } #[test] fn bindgen_test_layout_hipResourceViewDesc() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, concat!("Size of: ", stringify!(hipResourceViewDesc)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipResourceViewDesc)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipResourceViewDesc), "::", stringify!(format) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipResourceViewDesc), "::", stringify!(width) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipResourceViewDesc), "::", stringify!(height) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipResourceViewDesc), "::", stringify!(depth) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).firstMipmapLevel) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hipResourceViewDesc), "::", stringify!(firstMipmapLevel) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lastMipmapLevel) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", stringify!(hipResourceViewDesc), "::", stringify!(lastMipmapLevel) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).firstLayer) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(hipResourceViewDesc), "::", stringify!(firstLayer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lastLayer) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", stringify!(hipResourceViewDesc), "::", stringify!(lastLayer) ) ); } impl Default for hipResourceViewDesc { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[doc = " Resource view descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct HIP_RESOURCE_VIEW_DESC_st { #[doc = "< Resource view format"] pub format: HIPresourceViewFormat, #[doc = "< Width of the resource view"] pub width: usize, #[doc = "< Height of the resource view"] pub height: usize, #[doc = "< Depth of the resource view"] pub depth: usize, #[doc = "< First defined mipmap level"] pub firstMipmapLevel: ::libc::c_uint, #[doc = "< Last defined mipmap level"] pub lastMipmapLevel: ::libc::c_uint, #[doc = "< First layer index"] pub firstLayer: ::libc::c_uint, #[doc = "< Last layer index"] pub lastLayer: ::libc::c_uint, pub reserved: [::libc::c_uint; 16usize], } #[test] fn bindgen_test_layout_HIP_RESOURCE_VIEW_DESC_st() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 112usize, concat!("Size of: ", stringify!(HIP_RESOURCE_VIEW_DESC_st)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(HIP_RESOURCE_VIEW_DESC_st)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_VIEW_DESC_st), "::", stringify!(format) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_VIEW_DESC_st), "::", stringify!(width) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_VIEW_DESC_st), "::", stringify!(height) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_VIEW_DESC_st), "::", stringify!(depth) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).firstMipmapLevel) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_VIEW_DESC_st), "::", stringify!(firstMipmapLevel) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lastMipmapLevel) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_VIEW_DESC_st), "::", stringify!(lastMipmapLevel) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).firstLayer) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_VIEW_DESC_st), "::", stringify!(firstLayer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lastLayer) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_VIEW_DESC_st), "::", stringify!(lastLayer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(HIP_RESOURCE_VIEW_DESC_st), "::", stringify!(reserved) ) ); } impl Default for HIP_RESOURCE_VIEW_DESC_st { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[doc = " Resource view descriptor"] pub type HIP_RESOURCE_VIEW_DESC = HIP_RESOURCE_VIEW_DESC_st; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemcpyKind { #[doc = "< Host-to-Host Copy"] hipMemcpyHostToHost = 0, #[doc = "< Host-to-Device Copy"] hipMemcpyHostToDevice = 1, #[doc = "< Device-to-Host Copy"] hipMemcpyDeviceToHost = 2, #[doc = "< Device-to-Device Copy"] hipMemcpyDeviceToDevice = 3, hipMemcpyDefault = 4, } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipPitchedPtr { pub ptr: *mut ::libc::c_void, pub pitch: usize, pub xsize: usize, pub ysize: usize, } #[test] fn bindgen_test_layout_hipPitchedPtr() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(hipPitchedPtr)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipPitchedPtr)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipPitchedPtr), "::", stringify!(ptr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipPitchedPtr), "::", stringify!(pitch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).xsize) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipPitchedPtr), "::", stringify!(xsize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ysize) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipPitchedPtr), "::", stringify!(ysize) ) ); } impl Default for hipPitchedPtr { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExtent { pub width: usize, pub height: usize, pub depth: usize, } #[test] fn bindgen_test_layout_hipExtent() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(hipExtent)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipExtent)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExtent), "::", stringify!(width) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipExtent), "::", stringify!(height) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipExtent), "::", stringify!(depth) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipPos { pub x: usize, pub y: usize, pub z: usize, } #[test] fn bindgen_test_layout_hipPos() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(hipPos)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipPos)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(hipPos), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(hipPos), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 16usize, concat!("Offset of field: ", stringify!(hipPos), "::", stringify!(z)) ); } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipMemcpy3DParms { pub srcArray: hipArray_t, pub srcPos: hipPos, pub srcPtr: hipPitchedPtr, pub dstArray: hipArray_t, pub dstPos: hipPos, pub dstPtr: hipPitchedPtr, pub extent: hipExtent, pub kind: hipMemcpyKind, } #[test] fn bindgen_test_layout_hipMemcpy3DParms() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 160usize, concat!("Size of: ", stringify!(hipMemcpy3DParms)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipMemcpy3DParms)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipMemcpy3DParms), "::", stringify!(srcArray) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipMemcpy3DParms), "::", stringify!(srcPos) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hipMemcpy3DParms), "::", stringify!(srcPtr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(hipMemcpy3DParms), "::", stringify!(dstArray) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(hipMemcpy3DParms), "::", stringify!(dstPos) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(hipMemcpy3DParms), "::", stringify!(dstPtr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", stringify!(hipMemcpy3DParms), "::", stringify!(extent) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kind) as usize - ptr as usize }, 152usize, concat!( "Offset of field: ", stringify!(hipMemcpy3DParms), "::", stringify!(kind) ) ); } impl Default for hipMemcpy3DParms { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct HIP_MEMCPY3D { pub srcXInBytes: ::libc::c_uint, pub srcY: ::libc::c_uint, pub srcZ: ::libc::c_uint, pub srcLOD: ::libc::c_uint, pub srcMemoryType: hipMemoryType, pub srcHost: *const ::libc::c_void, pub srcDevice: hipDeviceptr_t, pub srcArray: hipArray_t, pub srcPitch: ::libc::c_uint, pub srcHeight: ::libc::c_uint, pub dstXInBytes: ::libc::c_uint, pub dstY: ::libc::c_uint, pub dstZ: ::libc::c_uint, pub dstLOD: ::libc::c_uint, pub dstMemoryType: hipMemoryType, pub dstHost: *mut ::libc::c_void, pub dstDevice: hipDeviceptr_t, pub dstArray: hipArray_t, pub dstPitch: ::libc::c_uint, pub dstHeight: ::libc::c_uint, pub WidthInBytes: ::libc::c_uint, pub Height: ::libc::c_uint, pub Depth: ::libc::c_uint, } #[test] fn bindgen_test_layout_HIP_MEMCPY3D() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 128usize, concat!("Size of: ", stringify!(HIP_MEMCPY3D)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(HIP_MEMCPY3D)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcXInBytes) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(srcXInBytes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcY) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(srcY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcZ) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(srcZ) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcLOD) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(srcLOD) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcMemoryType) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(srcMemoryType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcHost) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(srcHost) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcDevice) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(srcDevice) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(srcArray) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcPitch) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(srcPitch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).srcHeight) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(srcHeight) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstXInBytes) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(dstXInBytes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstY) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(dstY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstZ) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(dstZ) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstLOD) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(dstLOD) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstMemoryType) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(dstMemoryType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstHost) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(dstHost) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstDevice) as usize - ptr as usize }, 88usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(dstDevice) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize }, 96usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(dstArray) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstPitch) as usize - ptr as usize }, 104usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(dstPitch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dstHeight) as usize - ptr as usize }, 108usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(dstHeight) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).WidthInBytes) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(WidthInBytes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Height) as usize - ptr as usize }, 116usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(Height) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).Depth) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", stringify!(HIP_MEMCPY3D), "::", stringify!(Depth) ) ); } impl Default for HIP_MEMCPY3D { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipFunction_attribute { HIP_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0, HIP_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1, HIP_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2, HIP_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3, HIP_FUNC_ATTRIBUTE_NUM_REGS = 4, HIP_FUNC_ATTRIBUTE_PTX_VERSION = 5, HIP_FUNC_ATTRIBUTE_BINARY_VERSION = 6, HIP_FUNC_ATTRIBUTE_CACHE_MODE_CA = 7, HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = 8, HIP_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 9, HIP_FUNC_ATTRIBUTE_MAX = 10, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipPointer_attribute { #[doc = "< The context on which a pointer was allocated\n< @warning - not supported in HIP"] HIP_POINTER_ATTRIBUTE_CONTEXT = 1, #[doc = "< memory type describing location of a pointer"] HIP_POINTER_ATTRIBUTE_MEMORY_TYPE = 2, #[doc = "< address at which the pointer is allocated on device"] HIP_POINTER_ATTRIBUTE_DEVICE_POINTER = 3, #[doc = "< address at which the pointer is allocated on host"] HIP_POINTER_ATTRIBUTE_HOST_POINTER = 4, #[doc = "< A pair of tokens for use with linux kernel interface\n< @warning - not supported in HIP"] HIP_POINTER_ATTRIBUTE_P2P_TOKENS = 5, #[doc = "< Synchronize every synchronous memory operation\n< initiated on this region"] HIP_POINTER_ATTRIBUTE_SYNC_MEMOPS = 6, #[doc = "< Unique ID for an allocated memory region"] HIP_POINTER_ATTRIBUTE_BUFFER_ID = 7, #[doc = "< Indicates if the pointer points to managed memory"] HIP_POINTER_ATTRIBUTE_IS_MANAGED = 8, #[doc = "< device ordinal of a device on which a pointer\n< was allocated or registered"] HIP_POINTER_ATTRIBUTE_DEVICE_ORDINAL = 9, #[doc = "< if this pointer maps to an allocation\n< that is suitable for hipIpcGetMemHandle\n< @warning - not supported in HIP"] HIP_POINTER_ATTRIBUTE_IS_LEGACY_HIP_IPC_CAPABLE = 10, #[doc = "< Starting address for this requested pointer"] HIP_POINTER_ATTRIBUTE_RANGE_START_ADDR = 11, #[doc = "< Size of the address range for this requested pointer"] HIP_POINTER_ATTRIBUTE_RANGE_SIZE = 12, #[doc = "< tells if this pointer is in a valid address range\n< that is mapped to a backing allocation"] HIP_POINTER_ATTRIBUTE_MAPPED = 13, #[doc = "< Bitmask of allowed hipmemAllocationHandleType\n< for this allocation @warning - not supported in HIP"] HIP_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = 14, #[doc = "< returns if the memory referenced by\n< this pointer can be used with the GPUDirect RDMA API\n< @warning - not supported in HIP"] HIP_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = 15, #[doc = "< Returns the access flags the device associated with\n< for the corresponding memory referenced by the ptr"] HIP_POINTER_ATTRIBUTE_ACCESS_FLAGS = 16, #[doc = "< Returns the mempool handle for the allocation if\n< it was allocated from a mempool\n< @warning - not supported in HIP"] HIP_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = 17, } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct uchar1 { pub x: ::libc::c_uchar, } #[test] fn bindgen_test_layout_uchar1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1usize, concat!("Size of: ", stringify!(uchar1)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(uchar1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(uchar1), "::", stringify!(x)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct uchar2 { pub x: ::libc::c_uchar, pub y: ::libc::c_uchar, } #[test] fn bindgen_test_layout_uchar2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2usize, concat!("Size of: ", stringify!(uchar2)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(uchar2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(uchar2), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 1usize, concat!("Offset of field: ", stringify!(uchar2), "::", stringify!(y)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct uchar3 { pub x: ::libc::c_uchar, pub y: ::libc::c_uchar, pub z: ::libc::c_uchar, } #[test] fn bindgen_test_layout_uchar3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 3usize, concat!("Size of: ", stringify!(uchar3)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(uchar3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(uchar3), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 1usize, concat!("Offset of field: ", stringify!(uchar3), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 2usize, concat!("Offset of field: ", stringify!(uchar3), "::", stringify!(z)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct uchar4 { pub x: ::libc::c_uchar, pub y: ::libc::c_uchar, pub z: ::libc::c_uchar, pub w: ::libc::c_uchar, } #[test] fn bindgen_test_layout_uchar4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(uchar4)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(uchar4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(uchar4), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 1usize, concat!("Offset of field: ", stringify!(uchar4), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 2usize, concat!("Offset of field: ", stringify!(uchar4), "::", stringify!(z)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 3usize, concat!("Offset of field: ", stringify!(uchar4), "::", stringify!(w)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct char1 { pub x: ::libc::c_char, } #[test] fn bindgen_test_layout_char1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 1usize, concat!("Size of: ", stringify!(char1)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(char1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(char1), "::", stringify!(x)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct char2 { pub x: ::libc::c_char, pub y: ::libc::c_char, } #[test] fn bindgen_test_layout_char2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2usize, concat!("Size of: ", stringify!(char2)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(char2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(char2), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 1usize, concat!("Offset of field: ", stringify!(char2), "::", stringify!(y)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct char3 { pub x: ::libc::c_char, pub y: ::libc::c_char, pub z: ::libc::c_char, } #[test] fn bindgen_test_layout_char3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 3usize, concat!("Size of: ", stringify!(char3)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(char3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(char3), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 1usize, concat!("Offset of field: ", stringify!(char3), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 2usize, concat!("Offset of field: ", stringify!(char3), "::", stringify!(z)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct char4 { pub x: ::libc::c_char, pub y: ::libc::c_char, pub z: ::libc::c_char, pub w: ::libc::c_char, } #[test] fn bindgen_test_layout_char4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(char4)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(char4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(char4), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 1usize, concat!("Offset of field: ", stringify!(char4), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 2usize, concat!("Offset of field: ", stringify!(char4), "::", stringify!(z)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 3usize, concat!("Offset of field: ", stringify!(char4), "::", stringify!(w)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ushort1 { pub x: ::libc::c_ushort, } #[test] fn bindgen_test_layout_ushort1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2usize, concat!("Size of: ", stringify!(ushort1)) ); assert_eq!( ::std::mem::align_of::(), 2usize, concat!("Alignment of ", stringify!(ushort1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(ushort1), "::", stringify!(x) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ushort2 { pub x: ::libc::c_ushort, pub y: ::libc::c_ushort, } #[test] fn bindgen_test_layout_ushort2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(ushort2)) ); assert_eq!( ::std::mem::align_of::(), 2usize, concat!("Alignment of ", stringify!(ushort2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(ushort2), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", stringify!(ushort2), "::", stringify!(y) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ushort3 { pub x: ::libc::c_ushort, pub y: ::libc::c_ushort, pub z: ::libc::c_ushort, } #[test] fn bindgen_test_layout_ushort3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, concat!("Size of: ", stringify!(ushort3)) ); assert_eq!( ::std::mem::align_of::(), 2usize, concat!("Alignment of ", stringify!(ushort3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(ushort3), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", stringify!(ushort3), "::", stringify!(y) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(ushort3), "::", stringify!(z) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ushort4 { pub x: ::libc::c_ushort, pub y: ::libc::c_ushort, pub z: ::libc::c_ushort, pub w: ::libc::c_ushort, } #[test] fn bindgen_test_layout_ushort4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(ushort4)) ); assert_eq!( ::std::mem::align_of::(), 2usize, concat!("Alignment of ", stringify!(ushort4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(ushort4), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", stringify!(ushort4), "::", stringify!(y) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(ushort4), "::", stringify!(z) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 6usize, concat!( "Offset of field: ", stringify!(ushort4), "::", stringify!(w) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct short1 { pub x: ::libc::c_short, } #[test] fn bindgen_test_layout_short1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 2usize, concat!("Size of: ", stringify!(short1)) ); assert_eq!( ::std::mem::align_of::(), 2usize, concat!("Alignment of ", stringify!(short1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(short1), "::", stringify!(x)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct short2 { pub x: ::libc::c_short, pub y: ::libc::c_short, } #[test] fn bindgen_test_layout_short2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(short2)) ); assert_eq!( ::std::mem::align_of::(), 2usize, concat!("Alignment of ", stringify!(short2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(short2), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 2usize, concat!("Offset of field: ", stringify!(short2), "::", stringify!(y)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct short3 { pub x: ::libc::c_short, pub y: ::libc::c_short, pub z: ::libc::c_short, } #[test] fn bindgen_test_layout_short3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 6usize, concat!("Size of: ", stringify!(short3)) ); assert_eq!( ::std::mem::align_of::(), 2usize, concat!("Alignment of ", stringify!(short3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(short3), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 2usize, concat!("Offset of field: ", stringify!(short3), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(short3), "::", stringify!(z)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct short4 { pub x: ::libc::c_short, pub y: ::libc::c_short, pub z: ::libc::c_short, pub w: ::libc::c_short, } #[test] fn bindgen_test_layout_short4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(short4)) ); assert_eq!( ::std::mem::align_of::(), 2usize, concat!("Alignment of ", stringify!(short4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(short4), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 2usize, concat!("Offset of field: ", stringify!(short4), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(short4), "::", stringify!(z)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 6usize, concat!("Offset of field: ", stringify!(short4), "::", stringify!(w)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct uint1 { pub x: ::libc::c_uint, } #[test] fn bindgen_test_layout_uint1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(uint1)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(uint1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(uint1), "::", stringify!(x)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct uint2 { pub x: ::libc::c_uint, pub y: ::libc::c_uint, } #[test] fn bindgen_test_layout_uint2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(uint2)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(uint2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(uint2), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(uint2), "::", stringify!(y)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct uint3 { pub x: ::libc::c_uint, pub y: ::libc::c_uint, pub z: ::libc::c_uint, } #[test] fn bindgen_test_layout_uint3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, concat!("Size of: ", stringify!(uint3)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(uint3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(uint3), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(uint3), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(uint3), "::", stringify!(z)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct uint4 { pub x: ::libc::c_uint, pub y: ::libc::c_uint, pub z: ::libc::c_uint, pub w: ::libc::c_uint, } #[test] fn bindgen_test_layout_uint4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(uint4)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(uint4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(uint4), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(uint4), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(uint4), "::", stringify!(z)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 12usize, concat!("Offset of field: ", stringify!(uint4), "::", stringify!(w)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct int1 { pub x: ::libc::c_int, } #[test] fn bindgen_test_layout_int1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(int1)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(int1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(int1), "::", stringify!(x)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct int2 { pub x: ::libc::c_int, pub y: ::libc::c_int, } #[test] fn bindgen_test_layout_int2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(int2)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(int2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(int2), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(int2), "::", stringify!(y)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct int3 { pub x: ::libc::c_int, pub y: ::libc::c_int, pub z: ::libc::c_int, } #[test] fn bindgen_test_layout_int3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, concat!("Size of: ", stringify!(int3)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(int3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(int3), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(int3), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(int3), "::", stringify!(z)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct int4 { pub x: ::libc::c_int, pub y: ::libc::c_int, pub z: ::libc::c_int, pub w: ::libc::c_int, } #[test] fn bindgen_test_layout_int4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(int4)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(int4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(int4), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(int4), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(int4), "::", stringify!(z)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 12usize, concat!("Offset of field: ", stringify!(int4), "::", stringify!(w)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ulong1 { pub x: ::libc::c_ulong, } #[test] fn bindgen_test_layout_ulong1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(ulong1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(ulong1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(ulong1), "::", stringify!(x)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ulong2 { pub x: ::libc::c_ulong, pub y: ::libc::c_ulong, } #[test] fn bindgen_test_layout_ulong2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(ulong2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(ulong2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(ulong2), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(ulong2), "::", stringify!(y)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ulong3 { pub x: ::libc::c_ulong, pub y: ::libc::c_ulong, pub z: ::libc::c_ulong, } #[test] fn bindgen_test_layout_ulong3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(ulong3)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(ulong3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(ulong3), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(ulong3), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 16usize, concat!("Offset of field: ", stringify!(ulong3), "::", stringify!(z)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ulong4 { pub x: ::libc::c_ulong, pub y: ::libc::c_ulong, pub z: ::libc::c_ulong, pub w: ::libc::c_ulong, } #[test] fn bindgen_test_layout_ulong4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(ulong4)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(ulong4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(ulong4), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(ulong4), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 16usize, concat!("Offset of field: ", stringify!(ulong4), "::", stringify!(z)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 24usize, concat!("Offset of field: ", stringify!(ulong4), "::", stringify!(w)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct long1 { pub x: ::libc::c_long, } #[test] fn bindgen_test_layout_long1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(long1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(long1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(long1), "::", stringify!(x)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct long2 { pub x: ::libc::c_long, pub y: ::libc::c_long, } #[test] fn bindgen_test_layout_long2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(long2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(long2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(long2), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(long2), "::", stringify!(y)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct long3 { pub x: ::libc::c_long, pub y: ::libc::c_long, pub z: ::libc::c_long, } #[test] fn bindgen_test_layout_long3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(long3)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(long3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(long3), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(long3), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 16usize, concat!("Offset of field: ", stringify!(long3), "::", stringify!(z)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct long4 { pub x: ::libc::c_long, pub y: ::libc::c_long, pub z: ::libc::c_long, pub w: ::libc::c_long, } #[test] fn bindgen_test_layout_long4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(long4)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(long4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(long4), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(long4), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 16usize, concat!("Offset of field: ", stringify!(long4), "::", stringify!(z)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 24usize, concat!("Offset of field: ", stringify!(long4), "::", stringify!(w)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ulonglong1 { pub x: ::libc::c_ulonglong, } #[test] fn bindgen_test_layout_ulonglong1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(ulonglong1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(ulonglong1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(ulonglong1), "::", stringify!(x) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ulonglong2 { pub x: ::libc::c_ulonglong, pub y: ::libc::c_ulonglong, } #[test] fn bindgen_test_layout_ulonglong2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(ulonglong2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(ulonglong2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(ulonglong2), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(ulonglong2), "::", stringify!(y) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ulonglong3 { pub x: ::libc::c_ulonglong, pub y: ::libc::c_ulonglong, pub z: ::libc::c_ulonglong, } #[test] fn bindgen_test_layout_ulonglong3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(ulonglong3)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(ulonglong3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(ulonglong3), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(ulonglong3), "::", stringify!(y) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(ulonglong3), "::", stringify!(z) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct ulonglong4 { pub x: ::libc::c_ulonglong, pub y: ::libc::c_ulonglong, pub z: ::libc::c_ulonglong, pub w: ::libc::c_ulonglong, } #[test] fn bindgen_test_layout_ulonglong4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(ulonglong4)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(ulonglong4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(ulonglong4), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(ulonglong4), "::", stringify!(y) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(ulonglong4), "::", stringify!(z) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(ulonglong4), "::", stringify!(w) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct longlong1 { pub x: ::libc::c_longlong, } #[test] fn bindgen_test_layout_longlong1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(longlong1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(longlong1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(longlong1), "::", stringify!(x) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct longlong2 { pub x: ::libc::c_longlong, pub y: ::libc::c_longlong, } #[test] fn bindgen_test_layout_longlong2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(longlong2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(longlong2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(longlong2), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(longlong2), "::", stringify!(y) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct longlong3 { pub x: ::libc::c_longlong, pub y: ::libc::c_longlong, pub z: ::libc::c_longlong, } #[test] fn bindgen_test_layout_longlong3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(longlong3)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(longlong3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(longlong3), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(longlong3), "::", stringify!(y) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(longlong3), "::", stringify!(z) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct longlong4 { pub x: ::libc::c_longlong, pub y: ::libc::c_longlong, pub z: ::libc::c_longlong, pub w: ::libc::c_longlong, } #[test] fn bindgen_test_layout_longlong4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(longlong4)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(longlong4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(longlong4), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(longlong4), "::", stringify!(y) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(longlong4), "::", stringify!(z) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(longlong4), "::", stringify!(w) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] pub struct float1 { pub x: f32, } #[test] fn bindgen_test_layout_float1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(float1)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(float1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(float1), "::", stringify!(x)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] pub struct float2 { pub x: f32, pub y: f32, } #[test] fn bindgen_test_layout_float2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(float2)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(float2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(float2), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(float2), "::", stringify!(y)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] pub struct float3 { pub x: f32, pub y: f32, pub z: f32, } #[test] fn bindgen_test_layout_float3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, concat!("Size of: ", stringify!(float3)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(float3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(float3), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(float3), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(float3), "::", stringify!(z)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] pub struct float4 { pub x: f32, pub y: f32, pub z: f32, pub w: f32, } #[test] fn bindgen_test_layout_float4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(float4)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(float4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(float4), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(float4), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(float4), "::", stringify!(z)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 12usize, concat!("Offset of field: ", stringify!(float4), "::", stringify!(w)) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] pub struct double1 { pub x: f64, } #[test] fn bindgen_test_layout_double1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(double1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(double1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(double1), "::", stringify!(x) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] pub struct double2 { pub x: f64, pub y: f64, } #[test] fn bindgen_test_layout_double2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(double2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(double2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(double2), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(double2), "::", stringify!(y) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] pub struct double3 { pub x: f64, pub y: f64, pub z: f64, } #[test] fn bindgen_test_layout_double3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(double3)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(double3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(double3), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(double3), "::", stringify!(y) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(double3), "::", stringify!(z) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, PartialOrd, PartialEq)] pub struct double4 { pub x: f64, pub y: f64, pub z: f64, pub w: f64, } #[test] fn bindgen_test_layout_double4() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(double4)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(double4)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(double4), "::", stringify!(x) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(double4), "::", stringify!(y) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(double4), "::", stringify!(z) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(double4), "::", stringify!(w) ) ); } extern "C" { pub fn hipCreateChannelDesc( x: ::libc::c_int, y: ::libc::c_int, z: ::libc::c_int, w: ::libc::c_int, f: hipChannelFormatKind, ) -> hipChannelFormatDesc; } #[doc = " An opaque value that represents a hip texture object"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __hip_texture { _unused: [u8; 0], } pub type hipTextureObject_t = *mut __hip_texture; #[repr(u32)] #[non_exhaustive] #[doc = " hip texture address modes"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipTextureAddressMode { hipAddressModeWrap = 0, hipAddressModeClamp = 1, hipAddressModeMirror = 2, hipAddressModeBorder = 3, } #[repr(u32)] #[non_exhaustive] #[doc = " hip texture filter modes"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipTextureFilterMode { hipFilterModePoint = 0, hipFilterModeLinear = 1, } #[repr(u32)] #[non_exhaustive] #[doc = " hip texture read modes"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipTextureReadMode { hipReadModeElementType = 0, hipReadModeNormalizedFloat = 1, } #[doc = " hip texture reference"] #[repr(C)] #[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] pub struct textureReference { pub normalized: ::libc::c_int, pub readMode: hipTextureReadMode, pub filterMode: hipTextureFilterMode, pub addressMode: [hipTextureAddressMode; 3usize], pub channelDesc: hipChannelFormatDesc, pub sRGB: ::libc::c_int, pub maxAnisotropy: ::libc::c_uint, pub mipmapFilterMode: hipTextureFilterMode, pub mipmapLevelBias: f32, pub minMipmapLevelClamp: f32, pub maxMipmapLevelClamp: f32, pub textureObject: hipTextureObject_t, pub numChannels: ::libc::c_int, pub format: hipArray_Format, } #[test] fn bindgen_test_layout_textureReference() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 88usize, concat!("Size of: ", stringify!(textureReference)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(textureReference)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).normalized) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(normalized) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).readMode) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(readMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).filterMode) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(filterMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).addressMode) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(addressMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).channelDesc) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(channelDesc) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sRGB) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(sRGB) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxAnisotropy) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(maxAnisotropy) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mipmapFilterMode) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(mipmapFilterMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mipmapLevelBias) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(mipmapLevelBias) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).minMipmapLevelClamp) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(minMipmapLevelClamp) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxMipmapLevelClamp) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(maxMipmapLevelClamp) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).textureObject) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(textureObject) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).numChannels) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(numChannels) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, 84usize, concat!( "Offset of field: ", stringify!(textureReference), "::", stringify!(format) ) ); } impl Default for textureReference { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[doc = " hip texture descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] pub struct hipTextureDesc { pub addressMode: [hipTextureAddressMode; 3usize], pub filterMode: hipTextureFilterMode, pub readMode: hipTextureReadMode, pub sRGB: ::libc::c_int, pub borderColor: [f32; 4usize], pub normalizedCoords: ::libc::c_int, pub maxAnisotropy: ::libc::c_uint, pub mipmapFilterMode: hipTextureFilterMode, pub mipmapLevelBias: f32, pub minMipmapLevelClamp: f32, pub maxMipmapLevelClamp: f32, } #[test] fn bindgen_test_layout_hipTextureDesc() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(hipTextureDesc)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(hipTextureDesc)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).addressMode) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipTextureDesc), "::", stringify!(addressMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).filterMode) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(hipTextureDesc), "::", stringify!(filterMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).readMode) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipTextureDesc), "::", stringify!(readMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sRGB) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(hipTextureDesc), "::", stringify!(sRGB) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).borderColor) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipTextureDesc), "::", stringify!(borderColor) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).normalizedCoords) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(hipTextureDesc), "::", stringify!(normalizedCoords) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxAnisotropy) as usize - ptr as usize }, 44usize, concat!( "Offset of field: ", stringify!(hipTextureDesc), "::", stringify!(maxAnisotropy) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mipmapFilterMode) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(hipTextureDesc), "::", stringify!(mipmapFilterMode) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mipmapLevelBias) as usize - ptr as usize }, 52usize, concat!( "Offset of field: ", stringify!(hipTextureDesc), "::", stringify!(mipmapLevelBias) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).minMipmapLevelClamp) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(hipTextureDesc), "::", stringify!(minMipmapLevelClamp) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxMipmapLevelClamp) as usize - ptr as usize }, 60usize, concat!( "Offset of field: ", stringify!(hipTextureDesc), "::", stringify!(maxMipmapLevelClamp) ) ); } impl Default for hipTextureDesc { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[doc = " An opaque value that represents a hip surface object"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __hip_surface { _unused: [u8; 0], } pub type hipSurfaceObject_t = *mut __hip_surface; #[doc = " hip surface reference"] #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct surfaceReference { pub surfaceObject: hipSurfaceObject_t, } #[test] fn bindgen_test_layout_surfaceReference() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(surfaceReference)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(surfaceReference)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).surfaceObject) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(surfaceReference), "::", stringify!(surfaceObject) ) ); } impl Default for surfaceReference { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(u32)] #[non_exhaustive] #[doc = " hip surface boundary modes"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipSurfaceBoundaryMode { hipBoundaryModeZero = 0, hipBoundaryModeTrap = 1, hipBoundaryModeClamp = 2, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ihipCtx_t { _unused: [u8; 0], } pub type hipCtx_t = *mut ihipCtx_t; pub type hipDevice_t = ::libc::c_int; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipDeviceP2PAttr { hipDevP2PAttrPerformanceRank = 0, hipDevP2PAttrAccessSupported = 1, hipDevP2PAttrNativeAtomicSupported = 2, hipDevP2PAttrHipArrayAccessSupported = 3, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ihipStream_t { _unused: [u8; 0], } pub type hipStream_t = *mut ihipStream_t; #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipIpcMemHandle_st { pub reserved: [::libc::c_char; 64usize], } #[test] fn bindgen_test_layout_hipIpcMemHandle_st() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(hipIpcMemHandle_st)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(hipIpcMemHandle_st)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipIpcMemHandle_st), "::", stringify!(reserved) ) ); } impl Default for hipIpcMemHandle_st { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type hipIpcMemHandle_t = hipIpcMemHandle_st; #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipIpcEventHandle_st { pub reserved: [::libc::c_char; 64usize], } #[test] fn bindgen_test_layout_hipIpcEventHandle_st() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(hipIpcEventHandle_st)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(hipIpcEventHandle_st)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipIpcEventHandle_st), "::", stringify!(reserved) ) ); } impl Default for hipIpcEventHandle_st { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type hipIpcEventHandle_t = hipIpcEventHandle_st; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ihipModule_t { _unused: [u8; 0], } pub type hipModule_t = *mut ihipModule_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ihipModuleSymbol_t { _unused: [u8; 0], } pub type hipFunction_t = *mut ihipModuleSymbol_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ihipMemPoolHandle_t { _unused: [u8; 0], } #[doc = " HIP memory pool"] pub type hipMemPool_t = *mut ihipMemPoolHandle_t; #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipFuncAttributes { pub binaryVersion: ::libc::c_int, pub cacheModeCA: ::libc::c_int, pub constSizeBytes: usize, pub localSizeBytes: usize, pub maxDynamicSharedSizeBytes: ::libc::c_int, pub maxThreadsPerBlock: ::libc::c_int, pub numRegs: ::libc::c_int, pub preferredShmemCarveout: ::libc::c_int, pub ptxVersion: ::libc::c_int, pub sharedSizeBytes: usize, } #[test] fn bindgen_test_layout_hipFuncAttributes() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, concat!("Size of: ", stringify!(hipFuncAttributes)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipFuncAttributes)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).binaryVersion) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipFuncAttributes), "::", stringify!(binaryVersion) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cacheModeCA) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(hipFuncAttributes), "::", stringify!(cacheModeCA) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).constSizeBytes) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipFuncAttributes), "::", stringify!(constSizeBytes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).localSizeBytes) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipFuncAttributes), "::", stringify!(localSizeBytes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxDynamicSharedSizeBytes) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipFuncAttributes), "::", stringify!(maxDynamicSharedSizeBytes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", stringify!(hipFuncAttributes), "::", stringify!(maxThreadsPerBlock) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).numRegs) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hipFuncAttributes), "::", stringify!(numRegs) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).preferredShmemCarveout) as usize - ptr as usize }, 36usize, concat!( "Offset of field: ", stringify!(hipFuncAttributes), "::", stringify!(preferredShmemCarveout) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).ptxVersion) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(hipFuncAttributes), "::", stringify!(ptxVersion) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sharedSizeBytes) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(hipFuncAttributes), "::", stringify!(sharedSizeBytes) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ihipEvent_t { _unused: [u8; 0], } pub type hipEvent_t = *mut ihipEvent_t; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipLimit_t { hipLimitStackSize = 0, hipLimitPrintfFifoSize = 1, hipLimitMallocHeapSize = 2, hipLimitRange = 3, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemoryAdvise { #[doc = "< Data will mostly be read and only occassionally\n< be written to"] hipMemAdviseSetReadMostly = 1, #[doc = "< Undo the effect of hipMemAdviseSetReadMostly"] hipMemAdviseUnsetReadMostly = 2, #[doc = "< Set the preferred location for the data as\n< the specified device"] hipMemAdviseSetPreferredLocation = 3, #[doc = "< Clear the preferred location for the data"] hipMemAdviseUnsetPreferredLocation = 4, #[doc = "< Data will be accessed by the specified device,\n< so prevent page faults as much as possible"] hipMemAdviseSetAccessedBy = 5, #[doc = "< Let HIP to decide on the page faulting policy\n< for the specified device"] hipMemAdviseUnsetAccessedBy = 6, #[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"] hipMemAdviseSetCoarseGrain = 100, #[doc = "< Restores cache coherency policy back to fine-grain"] hipMemAdviseUnsetCoarseGrain = 101, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemRangeCoherencyMode { #[doc = "< Updates to memory with this attribute can be\n< done coherently from all devices"] hipMemRangeCoherencyModeFineGrain = 0, #[doc = "< Writes to memory with this attribute can be\n< performed by a single device at a time"] hipMemRangeCoherencyModeCoarseGrain = 1, #[doc = "< Memory region queried contains subregions with\n< both hipMemRangeCoherencyModeFineGrain and\n< hipMemRangeCoherencyModeCoarseGrain attributes"] hipMemRangeCoherencyModeIndeterminate = 2, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemRangeAttribute { #[doc = "< Whether the range will mostly be read and\n< only occassionally be written to"] hipMemRangeAttributeReadMostly = 1, #[doc = "< The preferred location of the range"] hipMemRangeAttributePreferredLocation = 2, #[doc = "< Memory range has hipMemAdviseSetAccessedBy\n< set for the specified device"] hipMemRangeAttributeAccessedBy = 3, #[doc = "< The last location to where the range was\n< prefetched"] hipMemRangeAttributeLastPrefetchLocation = 4, #[doc = "< Returns coherency mode\n< @ref hipMemRangeCoherencyMode for the range"] hipMemRangeAttributeCoherencyMode = 100, } #[repr(u32)] #[non_exhaustive] #[doc = " @brief HIP memory pool attributes\n @enum\n @ingroup Enumerations"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemPoolAttr { #[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)"] hipMemPoolReuseFollowEventDependencies = 1, #[doc = " (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)"] hipMemPoolReuseAllowOpportunistic = 2, #[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)."] hipMemPoolReuseAllowInternalDependencies = 3, #[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)"] hipMemPoolAttrReleaseThreshold = 4, #[doc = " (value type = uint64_t)\n Amount of backing memory currently allocated for the mempool."] hipMemPoolAttrReservedMemCurrent = 5, #[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."] hipMemPoolAttrReservedMemHigh = 6, #[doc = " (value type = uint64_t)\n Amount of memory from the pool that is currently in use by the application."] hipMemPoolAttrUsedMemCurrent = 7, #[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."] hipMemPoolAttrUsedMemHigh = 8, } #[repr(u32)] #[non_exhaustive] #[doc = " @brief Specifies the type of location\n @enum\n @ingroup Enumerations"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemLocationType { hipMemLocationTypeInvalid = 0, #[doc = "< Device location, thus it's HIP device ID"] hipMemLocationTypeDevice = 1, } #[doc = " Specifies a memory location.\n\n To specify a gpu, set type = @p hipMemLocationTypeDevice and set id = the gpu's device ID"] #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipMemLocation { #[doc = "< Specifies the location type, which describes the meaning of id"] pub type_: hipMemLocationType, #[doc = "< Identifier for the provided location type @p hipMemLocationType"] pub id: ::libc::c_int, } #[test] fn bindgen_test_layout_hipMemLocation() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(hipMemLocation)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(hipMemLocation)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipMemLocation), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(hipMemLocation), "::", stringify!(id) ) ); } impl Default for hipMemLocation { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(u32)] #[non_exhaustive] #[doc = " @brief Specifies the memory protection flags for mapping\n @enum\n @ingroup Enumerations"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemAccessFlags { #[doc = "< Default, make the address range not accessible"] hipMemAccessFlagsProtNone = 0, #[doc = "< Set the address range read accessible"] hipMemAccessFlagsProtRead = 1, #[doc = "< Set the address range read-write accessible"] hipMemAccessFlagsProtReadWrite = 3, } #[doc = " Memory access descriptor"] #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipMemAccessDesc { #[doc = "< Location on which the accessibility has to change"] pub location: hipMemLocation, #[doc = "< Accessibility flags to set"] pub flags: hipMemAccessFlags, } #[test] fn bindgen_test_layout_hipMemAccessDesc() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, concat!("Size of: ", stringify!(hipMemAccessDesc)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(hipMemAccessDesc)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipMemAccessDesc), "::", stringify!(location) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipMemAccessDesc), "::", stringify!(flags) ) ); } impl Default for hipMemAccessDesc { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(u32)] #[non_exhaustive] #[doc = " @brief Defines the allocation types\n @enum\n @ingroup Enumerations"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemAllocationType { hipMemAllocationTypeInvalid = 0, #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"] hipMemAllocationTypePinned = 1, #[doc = " This allocation type is 'pinned', i.e. cannot migrate from its current\n location while the application is actively using it"] hipMemAllocationTypeMax = 2147483647, } #[repr(u32)] #[non_exhaustive] #[doc = " @brief Flags for specifying handle types for memory pool allocations\n @enum\n @ingroup Enumerations"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemAllocationHandleType { #[doc = "< Does not allow any export mechanism"] hipMemHandleTypeNone = 0, #[doc = "< Allows a file descriptor for exporting. Permitted only on POSIX systems"] hipMemHandleTypePosixFileDescriptor = 1, #[doc = "< Allows a Win32 NT handle for exporting. (HANDLE)"] hipMemHandleTypeWin32 = 2, #[doc = "< Allows a Win32 KMT handle for exporting. (D3DKMT_HANDLE)"] hipMemHandleTypeWin32Kmt = 4, } #[doc = " Specifies the properties of allocations made from the pool."] #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipMemPoolProps { #[doc = "< Allocation type. Currently must be specified as @p hipMemAllocationTypePinned"] pub allocType: hipMemAllocationType, #[doc = "< Handle types that will be supported by allocations from the pool"] pub handleTypes: hipMemAllocationHandleType, #[doc = "< Location where allocations should reside"] pub location: hipMemLocation, #[doc = " Windows-specific LPSECURITYATTRIBUTES required when @p hipMemHandleTypeWin32 is specified"] pub win32SecurityAttributes: *mut ::libc::c_void, #[doc = "< Reserved for future use, must be 0"] pub reserved: [::libc::c_uchar; 64usize], } #[test] fn bindgen_test_layout_hipMemPoolProps() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 88usize, concat!("Size of: ", stringify!(hipMemPoolProps)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipMemPoolProps)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).allocType) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipMemPoolProps), "::", stringify!(allocType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handleTypes) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(hipMemPoolProps), "::", stringify!(handleTypes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipMemPoolProps), "::", stringify!(location) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).win32SecurityAttributes) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipMemPoolProps), "::", stringify!(win32SecurityAttributes) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipMemPoolProps), "::", stringify!(reserved) ) ); } impl Default for hipMemPoolProps { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[doc = " Opaque data structure for exporting a pool allocation"] #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipMemPoolPtrExportData { pub reserved: [::libc::c_uchar; 64usize], } #[test] fn bindgen_test_layout_hipMemPoolPtrExportData() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(hipMemPoolPtrExportData)) ); assert_eq!( ::std::mem::align_of::(), 1usize, concat!("Alignment of ", stringify!(hipMemPoolPtrExportData)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipMemPoolPtrExportData), "::", stringify!(reserved) ) ); } impl Default for hipMemPoolPtrExportData { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipJitOption { hipJitOptionMaxRegisters = 0, hipJitOptionThreadsPerBlock = 1, hipJitOptionWallTime = 2, hipJitOptionInfoLogBuffer = 3, hipJitOptionInfoLogBufferSizeBytes = 4, hipJitOptionErrorLogBuffer = 5, hipJitOptionErrorLogBufferSizeBytes = 6, hipJitOptionOptimizationLevel = 7, hipJitOptionTargetFromContext = 8, hipJitOptionTarget = 9, hipJitOptionFallbackStrategy = 10, hipJitOptionGenerateDebugInfo = 11, hipJitOptionLogVerbose = 12, hipJitOptionGenerateLineInfo = 13, hipJitOptionCacheMode = 14, hipJitOptionSm3xOpt = 15, hipJitOptionFastCompile = 16, hipJitOptionNumOptions = 17, } #[repr(u32)] #[non_exhaustive] #[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipFuncAttribute { hipFuncAttributeMaxDynamicSharedMemorySize = 8, hipFuncAttributePreferredSharedMemoryCarveout = 9, hipFuncAttributeMax = 10, } #[repr(u32)] #[non_exhaustive] #[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipFuncCache_t { #[doc = "< no preference for shared memory or L1 (default)"] hipFuncCachePreferNone = 0, #[doc = "< prefer larger shared memory and smaller L1 cache"] hipFuncCachePreferShared = 1, #[doc = "< prefer larger L1 cache and smaller shared memory"] hipFuncCachePreferL1 = 2, #[doc = "< prefer equal size L1 cache and shared memory"] hipFuncCachePreferEqual = 3, } #[repr(u32)] #[non_exhaustive] #[doc = " @warning On AMD devices and some Nvidia devices, these hints and controls are ignored."] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipSharedMemConfig { #[doc = "< The compiler selects a device-specific value for the banking."] hipSharedMemBankSizeDefault = 0, #[doc = "< Shared mem is banked at 4-bytes intervals and performs best\n< when adjacent threads access data 4 bytes apart."] hipSharedMemBankSizeFourByte = 1, #[doc = "< Shared mem is banked at 8-byte intervals and performs best\n< when adjacent threads access data 4 bytes apart."] hipSharedMemBankSizeEightByte = 2, } #[doc = " Struct for data in 3D\n"] #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct dim3 { #[doc = "< x"] pub x: u32, #[doc = "< y"] pub y: u32, #[doc = "< z"] pub z: u32, } #[test] fn bindgen_test_layout_dim3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, concat!("Size of: ", stringify!(dim3)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(dim3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(dim3), "::", stringify!(x)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(dim3), "::", stringify!(y)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(dim3), "::", stringify!(z)) ); } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipLaunchParams_t { #[doc = "< Device function symbol"] pub func: *mut ::libc::c_void, #[doc = "< Grid dimentions"] pub gridDim: dim3, #[doc = "< Block dimentions"] pub blockDim: dim3, #[doc = "< Arguments"] pub args: *mut *mut ::libc::c_void, #[doc = "< Shared memory"] pub sharedMem: usize, #[doc = "< Stream identifier"] pub stream: hipStream_t, } #[test] fn bindgen_test_layout_hipLaunchParams_t() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, concat!("Size of: ", stringify!(hipLaunchParams_t)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipLaunchParams_t)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipLaunchParams_t), "::", stringify!(func) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipLaunchParams_t), "::", stringify!(gridDim) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(hipLaunchParams_t), "::", stringify!(blockDim) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hipLaunchParams_t), "::", stringify!(args) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sharedMem) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(hipLaunchParams_t), "::", stringify!(sharedMem) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(hipLaunchParams_t), "::", stringify!(stream) ) ); } impl Default for hipLaunchParams_t { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type hipLaunchParams = hipLaunchParams_t; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipExternalMemoryHandleType_enum { hipExternalMemoryHandleTypeOpaqueFd = 1, hipExternalMemoryHandleTypeOpaqueWin32 = 2, hipExternalMemoryHandleTypeOpaqueWin32Kmt = 3, hipExternalMemoryHandleTypeD3D12Heap = 4, hipExternalMemoryHandleTypeD3D12Resource = 5, hipExternalMemoryHandleTypeD3D11Resource = 6, hipExternalMemoryHandleTypeD3D11ResourceKmt = 7, } pub use self::hipExternalMemoryHandleType_enum as hipExternalMemoryHandleType; #[repr(C)] #[derive(Copy, Clone)] pub struct hipExternalMemoryHandleDesc_st { pub type_: hipExternalMemoryHandleType, pub handle: hipExternalMemoryHandleDesc_st__bindgen_ty_1, pub size: ::libc::c_ulonglong, pub flags: ::libc::c_uint, } #[repr(C)] #[derive(Copy, Clone)] pub union hipExternalMemoryHandleDesc_st__bindgen_ty_1 { pub fd: ::libc::c_int, pub win32: hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1 { pub handle: *mut ::libc::c_void, pub name: *const ::libc::c_void, } #[test] fn bindgen_test_layout_hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit< hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1, > = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!( "Size of: ", stringify!(hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1), "::", stringify!(handle) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1), "::", stringify!(name) ) ); } impl Default for hipExternalMemoryHandleDesc_st__bindgen_ty_1__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout_hipExternalMemoryHandleDesc_st__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!( "Size of: ", stringify!(hipExternalMemoryHandleDesc_st__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalMemoryHandleDesc_st__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalMemoryHandleDesc_st__bindgen_ty_1), "::", stringify!(fd) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalMemoryHandleDesc_st__bindgen_ty_1), "::", stringify!(win32) ) ); } impl Default for hipExternalMemoryHandleDesc_st__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout_hipExternalMemoryHandleDesc_st() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, concat!("Size of: ", stringify!(hipExternalMemoryHandleDesc_st)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipExternalMemoryHandleDesc_st)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalMemoryHandleDesc_st), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipExternalMemoryHandleDesc_st), "::", stringify!(handle) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipExternalMemoryHandleDesc_st), "::", stringify!(size) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hipExternalMemoryHandleDesc_st), "::", stringify!(flags) ) ); } impl Default for hipExternalMemoryHandleDesc_st { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type hipExternalMemoryHandleDesc = hipExternalMemoryHandleDesc_st; #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExternalMemoryBufferDesc_st { pub offset: ::libc::c_ulonglong, pub size: ::libc::c_ulonglong, pub flags: ::libc::c_uint, } #[test] fn bindgen_test_layout_hipExternalMemoryBufferDesc_st() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(hipExternalMemoryBufferDesc_st)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipExternalMemoryBufferDesc_st)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalMemoryBufferDesc_st), "::", stringify!(offset) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipExternalMemoryBufferDesc_st), "::", stringify!(size) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipExternalMemoryBufferDesc_st), "::", stringify!(flags) ) ); } pub type hipExternalMemoryBufferDesc = hipExternalMemoryBufferDesc_st; pub type hipExternalMemory_t = *mut ::libc::c_void; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipExternalSemaphoreHandleType_enum { hipExternalSemaphoreHandleTypeOpaqueFd = 1, hipExternalSemaphoreHandleTypeOpaqueWin32 = 2, hipExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, hipExternalSemaphoreHandleTypeD3D12Fence = 4, } pub use self::hipExternalSemaphoreHandleType_enum as hipExternalSemaphoreHandleType; #[repr(C)] #[derive(Copy, Clone)] pub struct hipExternalSemaphoreHandleDesc_st { pub type_: hipExternalSemaphoreHandleType, pub handle: hipExternalSemaphoreHandleDesc_st__bindgen_ty_1, pub flags: ::libc::c_uint, } #[repr(C)] #[derive(Copy, Clone)] pub union hipExternalSemaphoreHandleDesc_st__bindgen_ty_1 { pub fd: ::libc::c_int, pub win32: hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1 { pub handle: *mut ::libc::c_void, pub name: *const ::libc::c_void, } #[test] fn bindgen_test_layout_hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit< hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1, > = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!( "Size of: ", stringify!(hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1), "::", stringify!(handle) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1), "::", stringify!(name) ) ); } impl Default for hipExternalSemaphoreHandleDesc_st__bindgen_ty_1__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout_hipExternalSemaphoreHandleDesc_st__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!( "Size of: ", stringify!(hipExternalSemaphoreHandleDesc_st__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalSemaphoreHandleDesc_st__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreHandleDesc_st__bindgen_ty_1), "::", stringify!(fd) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreHandleDesc_st__bindgen_ty_1), "::", stringify!(win32) ) ); } impl Default for hipExternalSemaphoreHandleDesc_st__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout_hipExternalSemaphoreHandleDesc_st() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(hipExternalSemaphoreHandleDesc_st)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalSemaphoreHandleDesc_st) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreHandleDesc_st), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreHandleDesc_st), "::", stringify!(handle) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreHandleDesc_st), "::", stringify!(flags) ) ); } impl Default for hipExternalSemaphoreHandleDesc_st { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } pub type hipExternalSemaphoreHandleDesc = hipExternalSemaphoreHandleDesc_st; pub type hipExternalSemaphore_t = *mut ::libc::c_void; #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExternalSemaphoreSignalParams_st { pub params: hipExternalSemaphoreSignalParams_st__bindgen_ty_1, pub flags: ::libc::c_uint, pub reserved: [::libc::c_uint; 16usize], } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1 { pub fence: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1, pub keyedMutex: hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2, pub reserved: [::libc::c_uint; 12usize], } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1 { pub value: ::libc::c_ulonglong, } #[test] fn bindgen_test_layout_hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit< hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1, > = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!( "Size of: ", stringify!(hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_1), "::", stringify!(value) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2 { pub key: ::libc::c_ulonglong, } #[test] fn bindgen_test_layout_hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit< hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2, > = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!( "Size of: ", stringify!(hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreSignalParams_st__bindgen_ty_1__bindgen_ty_2), "::", stringify!(key) ) ); } #[test] fn bindgen_test_layout_hipExternalSemaphoreSignalParams_st__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, concat!( "Size of: ", stringify!(hipExternalSemaphoreSignalParams_st__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalSemaphoreSignalParams_st__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreSignalParams_st__bindgen_ty_1), "::", stringify!(fence) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreSignalParams_st__bindgen_ty_1), "::", stringify!(keyedMutex) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreSignalParams_st__bindgen_ty_1), "::", stringify!(reserved) ) ); } #[test] fn bindgen_test_layout_hipExternalSemaphoreSignalParams_st() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 136usize, concat!("Size of: ", stringify!(hipExternalSemaphoreSignalParams_st)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalSemaphoreSignalParams_st) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreSignalParams_st), "::", stringify!(params) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreSignalParams_st), "::", stringify!(flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreSignalParams_st), "::", stringify!(reserved) ) ); } pub type hipExternalSemaphoreSignalParams = hipExternalSemaphoreSignalParams_st; #[doc = " External semaphore wait parameters, compatible with driver type"] #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExternalSemaphoreWaitParams_st { pub params: hipExternalSemaphoreWaitParams_st__bindgen_ty_1, pub flags: ::libc::c_uint, pub reserved: [::libc::c_uint; 16usize], } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1 { pub fence: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1, pub keyedMutex: hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2, pub reserved: [::libc::c_uint; 10usize], } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1 { pub value: ::libc::c_ulonglong, } #[test] fn bindgen_test_layout_hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit< hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1, > = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!( "Size of: ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_1), "::", stringify!(value) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2 { pub key: ::libc::c_ulonglong, pub timeoutMs: ::libc::c_uint, } #[test] fn bindgen_test_layout_hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit< hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2, > = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!( "Size of: ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2), "::", stringify!(key) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1__bindgen_ty_2), "::", stringify!(timeoutMs) ) ); } #[test] fn bindgen_test_layout_hipExternalSemaphoreWaitParams_st__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, concat!( "Size of: ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1), "::", stringify!(fence) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1), "::", stringify!(keyedMutex) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreWaitParams_st__bindgen_ty_1), "::", stringify!(reserved) ) ); } #[test] fn bindgen_test_layout_hipExternalSemaphoreWaitParams_st() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 136usize, concat!("Size of: ", stringify!(hipExternalSemaphoreWaitParams_st)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipExternalSemaphoreWaitParams_st) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreWaitParams_st), "::", stringify!(params) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 64usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreWaitParams_st), "::", stringify!(flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 68usize, concat!( "Offset of field: ", stringify!(hipExternalSemaphoreWaitParams_st), "::", stringify!(reserved) ) ); } #[doc = " External semaphore wait parameters, compatible with driver type"] pub type hipExternalSemaphoreWaitParams = hipExternalSemaphoreWaitParams_st; extern "C" { #[doc = " Internal use only. This API may change in the future\n Pre-Compiled header for online compilation\n"] pub fn __hipGetPCH(pch: *mut *const ::libc::c_char, size: *mut ::libc::c_uint); } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipGLDeviceList { #[doc = "< All hip devices used by current OpenGL context."] hipGLDeviceListAll = 1, #[doc = "< Hip devices used by current OpenGL context in current\n< frame"] hipGLDeviceListCurrentFrame = 2, #[doc = "< Hip devices used by current OpenGL context in next\n< frame."] hipGLDeviceListNextFrame = 3, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipGraphicsRegisterFlags { hipGraphicsRegisterFlagsNone = 0, #[doc = "< HIP will not write to this registered resource"] hipGraphicsRegisterFlagsReadOnly = 1, hipGraphicsRegisterFlagsWriteDiscard = 2, #[doc = "< HIP will bind this resource to a surface"] hipGraphicsRegisterFlagsSurfaceLoadStore = 4, hipGraphicsRegisterFlagsTextureGather = 8, } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _hipGraphicsResource { _unused: [u8; 0], } pub type hipGraphicsResource = _hipGraphicsResource; pub type hipGraphicsResource_t = *mut hipGraphicsResource; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ihipGraph { _unused: [u8; 0], } #[doc = " An opaque value that represents a hip graph"] pub type hipGraph_t = *mut ihipGraph; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hipGraphNode { _unused: [u8; 0], } #[doc = " An opaque value that represents a hip graph node"] pub type hipGraphNode_t = *mut hipGraphNode; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hipGraphExec { _unused: [u8; 0], } #[doc = " An opaque value that represents a hip graph Exec"] pub type hipGraphExec_t = *mut hipGraphExec; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hipUserObject { _unused: [u8; 0], } #[doc = " An opaque value that represents a user obj"] pub type hipUserObject_t = *mut hipUserObject; #[repr(u32)] #[non_exhaustive] #[doc = " @brief hipGraphNodeType\n @enum\n"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipGraphNodeType { #[doc = "< GPU kernel node"] hipGraphNodeTypeKernel = 0, #[doc = "< Memcpy node"] hipGraphNodeTypeMemcpy = 1, #[doc = "< Memset node"] hipGraphNodeTypeMemset = 2, #[doc = "< Host (executable) node"] hipGraphNodeTypeHost = 3, #[doc = "< Node which executes an embedded graph"] hipGraphNodeTypeGraph = 4, #[doc = "< Empty (no-op) node"] hipGraphNodeTypeEmpty = 5, #[doc = "< External event wait node"] hipGraphNodeTypeWaitEvent = 6, #[doc = "< External event record node"] hipGraphNodeTypeEventRecord = 7, #[doc = "< External Semaphore signal node"] hipGraphNodeTypeExtSemaphoreSignal = 8, #[doc = "< External Semaphore wait node"] hipGraphNodeTypeExtSemaphoreWait = 9, #[doc = "< MemcpyFromSymbol node"] hipGraphNodeTypeMemcpyFromSymbol = 10, #[doc = "< MemcpyToSymbol node"] hipGraphNodeTypeMemcpyToSymbol = 11, hipGraphNodeTypeCount = 12, } pub type hipHostFn_t = ::std::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipHostNodeParams { pub fn_: hipHostFn_t, pub userData: *mut ::libc::c_void, } #[test] fn bindgen_test_layout_hipHostNodeParams() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(hipHostNodeParams)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipHostNodeParams)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipHostNodeParams), "::", stringify!(fn_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipHostNodeParams), "::", stringify!(userData) ) ); } impl Default for hipHostNodeParams { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipKernelNodeParams { pub blockDim: dim3, pub extra: *mut *mut ::libc::c_void, pub func: *mut ::libc::c_void, pub gridDim: dim3, pub kernelParams: *mut *mut ::libc::c_void, pub sharedMemBytes: ::libc::c_uint, } #[test] fn bindgen_test_layout_hipKernelNodeParams() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(hipKernelNodeParams)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipKernelNodeParams)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipKernelNodeParams), "::", stringify!(blockDim) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipKernelNodeParams), "::", stringify!(extra) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipKernelNodeParams), "::", stringify!(func) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hipKernelNodeParams), "::", stringify!(gridDim) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).kernelParams) as usize - ptr as usize }, 48usize, concat!( "Offset of field: ", stringify!(hipKernelNodeParams), "::", stringify!(kernelParams) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sharedMemBytes) as usize - ptr as usize }, 56usize, concat!( "Offset of field: ", stringify!(hipKernelNodeParams), "::", stringify!(sharedMemBytes) ) ); } impl Default for hipKernelNodeParams { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipMemsetParams { pub dst: *mut ::libc::c_void, pub elementSize: ::libc::c_uint, pub height: usize, pub pitch: usize, pub value: ::libc::c_uint, pub width: usize, } #[test] fn bindgen_test_layout_hipMemsetParams() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, concat!("Size of: ", stringify!(hipMemsetParams)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipMemsetParams)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipMemsetParams), "::", stringify!(dst) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).elementSize) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipMemsetParams), "::", stringify!(elementSize) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipMemsetParams), "::", stringify!(height) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipMemsetParams), "::", stringify!(pitch) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(hipMemsetParams), "::", stringify!(value) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(hipMemsetParams), "::", stringify!(width) ) ); } impl Default for hipMemsetParams { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(u32)] #[non_exhaustive] #[doc = " @brief hipKernelNodeAttrID\n @enum\n"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipKernelNodeAttrID { hipKernelNodeAttributeAccessPolicyWindow = 1, hipKernelNodeAttributeCooperative = 2, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipAccessProperty { hipAccessPropertyNormal = 0, hipAccessPropertyStreaming = 1, hipAccessPropertyPersisting = 2, } #[repr(C)] #[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] pub struct hipAccessPolicyWindow { pub base_ptr: *mut ::libc::c_void, pub hitProp: hipAccessProperty, pub hitRatio: f32, pub missProp: hipAccessProperty, pub num_bytes: usize, } #[test] fn bindgen_test_layout_hipAccessPolicyWindow() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(hipAccessPolicyWindow)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipAccessPolicyWindow)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).base_ptr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipAccessPolicyWindow), "::", stringify!(base_ptr) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hitProp) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipAccessPolicyWindow), "::", stringify!(hitProp) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hitRatio) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(hipAccessPolicyWindow), "::", stringify!(hitRatio) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).missProp) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipAccessPolicyWindow), "::", stringify!(missProp) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).num_bytes) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipAccessPolicyWindow), "::", stringify!(num_bytes) ) ); } impl Default for hipAccessPolicyWindow { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Copy, Clone)] pub union hipKernelNodeAttrValue { pub accessPolicyWindow: hipAccessPolicyWindow, pub cooperative: ::libc::c_int, } #[test] fn bindgen_test_layout_hipKernelNodeAttrValue() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(hipKernelNodeAttrValue)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipKernelNodeAttrValue)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).accessPolicyWindow) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipKernelNodeAttrValue), "::", stringify!(accessPolicyWindow) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).cooperative) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipKernelNodeAttrValue), "::", stringify!(cooperative) ) ); } impl Default for hipKernelNodeAttrValue { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(u32)] #[non_exhaustive] #[doc = " @brief hipGraphExecUpdateResult\n @enum\n"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipGraphExecUpdateResult { #[doc = "< The update succeeded"] hipGraphExecUpdateSuccess = 0, #[doc = "< The update failed for an unexpected reason which is described\n< in the return value of the function"] hipGraphExecUpdateError = 1, #[doc = "< The update failed because the topology changed"] hipGraphExecUpdateErrorTopologyChanged = 2, #[doc = "< The update failed because a node type changed"] hipGraphExecUpdateErrorNodeTypeChanged = 3, hipGraphExecUpdateErrorFunctionChanged = 4, hipGraphExecUpdateErrorParametersChanged = 5, hipGraphExecUpdateErrorNotSupported = 6, hipGraphExecUpdateErrorUnsupportedFunctionChange = 7, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipStreamCaptureMode { hipStreamCaptureModeGlobal = 0, hipStreamCaptureModeThreadLocal = 1, hipStreamCaptureModeRelaxed = 2, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipStreamCaptureStatus { #[doc = "< Stream is not capturing"] hipStreamCaptureStatusNone = 0, #[doc = "< Stream is actively capturing"] hipStreamCaptureStatusActive = 1, #[doc = "< Stream is part of a capture sequence that has been\n< invalidated, but not terminated"] hipStreamCaptureStatusInvalidated = 2, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipStreamUpdateCaptureDependenciesFlags { #[doc = "< Add new nodes to the dependency set"] hipStreamAddCaptureDependencies = 0, #[doc = "< Replace the dependency set with the new nodes"] hipStreamSetCaptureDependencies = 1, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipGraphMemAttributeType { #[doc = "< Amount of memory, in bytes, currently associated with graphs"] hipGraphMemAttrUsedMemCurrent = 0, #[doc = "< High watermark of memory, in bytes, associated with graphs since the last time."] hipGraphMemAttrUsedMemHigh = 1, #[doc = "< Amount of memory, in bytes, currently allocated for graphs."] hipGraphMemAttrReservedMemCurrent = 2, #[doc = "< High watermark of memory, in bytes, currently allocated for graphs"] hipGraphMemAttrReservedMemHigh = 3, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipUserObjectFlags { #[doc = "< Destructor execution is not synchronized."] hipUserObjectNoDestructorSync = 1, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipUserObjectRetainFlags { #[doc = "< Add new reference or retain."] hipGraphUserObjectMove = 1, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipGraphInstantiateFlags { hipGraphInstantiateFlagAutoFreeOnLaunch = 1, } #[doc = " Memory allocation properties"] #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipMemAllocationProp { #[doc = "< Memory allocation type"] pub type_: hipMemAllocationType, #[doc = "< Requested handle type"] pub requestedHandleType: hipMemAllocationHandleType, #[doc = "< Memory location"] pub location: hipMemLocation, #[doc = "< Metadata for Win32 handles"] pub win32HandleMetaData: *mut ::libc::c_void, pub allocFlags: hipMemAllocationProp__bindgen_ty_1, } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipMemAllocationProp__bindgen_ty_1 { #[doc = "< Compression type"] pub compressionType: ::libc::c_uchar, #[doc = "< RDMA capable"] pub gpuDirectRDMACapable: ::libc::c_uchar, #[doc = "< Usage"] pub usage: ::libc::c_ushort, } #[test] fn bindgen_test_layout_hipMemAllocationProp__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(hipMemAllocationProp__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 2usize, concat!( "Alignment of ", stringify!(hipMemAllocationProp__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).compressionType) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipMemAllocationProp__bindgen_ty_1), "::", stringify!(compressionType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).gpuDirectRDMACapable) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", stringify!(hipMemAllocationProp__bindgen_ty_1), "::", stringify!(gpuDirectRDMACapable) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).usage) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", stringify!(hipMemAllocationProp__bindgen_ty_1), "::", stringify!(usage) ) ); } #[test] fn bindgen_test_layout_hipMemAllocationProp() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(hipMemAllocationProp)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipMemAllocationProp)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipMemAllocationProp), "::", stringify!(type_) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).requestedHandleType) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(hipMemAllocationProp), "::", stringify!(requestedHandleType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipMemAllocationProp), "::", stringify!(location) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).win32HandleMetaData) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipMemAllocationProp), "::", stringify!(win32HandleMetaData) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).allocFlags) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipMemAllocationProp), "::", stringify!(allocFlags) ) ); } impl Default for hipMemAllocationProp { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ihipMemGenericAllocationHandle { _unused: [u8; 0], } #[doc = " Generic handle for memory allocation"] pub type hipMemGenericAllocationHandle_t = *mut ihipMemGenericAllocationHandle; #[repr(u32)] #[non_exhaustive] #[doc = " @brief Flags for granularity\n @enum\n @ingroup Enumerations"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemAllocationGranularity_flags { #[doc = "< Minimum granularity"] hipMemAllocationGranularityMinimum = 0, #[doc = "< Recommended granularity for performance"] hipMemAllocationGranularityRecommended = 1, } #[repr(u32)] #[non_exhaustive] #[doc = " @brief Memory handle type\n @enum\n @ingroup Enumerations"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemHandleType { #[doc = "< Generic handle type"] hipMemHandleTypeGeneric = 0, } #[repr(u32)] #[non_exhaustive] #[doc = " @brief Memory operation types\n @enum\n @ingroup Enumerations"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipMemOperationType { #[doc = "< Map operation"] hipMemOperationTypeMap = 1, #[doc = "< Unmap operation"] hipMemOperationTypeUnmap = 2, } #[repr(u32)] #[non_exhaustive] #[doc = " @brief Subresource types for sparse arrays\n @enum\n @ingroup Enumerations"] #[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub enum hipArraySparseSubresourceType { #[doc = "< Sparse level"] hipArraySparseSubresourceTypeSparseLevel = 0, #[doc = "< Miptail"] hipArraySparseSubresourceTypeMiptail = 1, } #[doc = " Map info for arrays"] #[repr(C)] #[derive(Copy, Clone)] pub struct hipArrayMapInfo { #[doc = "< Resource type"] pub resourceType: hipResourceType, pub resource: hipArrayMapInfo__bindgen_ty_1, #[doc = "< Sparse subresource type"] pub subresourceType: hipArraySparseSubresourceType, pub subresource: hipArrayMapInfo__bindgen_ty_2, #[doc = "< Memory operation type"] pub memOperationType: hipMemOperationType, #[doc = "< Memory handle type"] pub memHandleType: hipMemHandleType, pub memHandle: hipArrayMapInfo__bindgen_ty_3, #[doc = "< Offset within the memory"] pub offset: ::libc::c_ulonglong, #[doc = "< Device ordinal bit mask"] pub deviceBitMask: ::libc::c_uint, #[doc = "< flags for future use, must be zero now."] pub flags: ::libc::c_uint, #[doc = "< Reserved for future use, must be zero now."] pub reserved: [::libc::c_uint; 2usize], } #[repr(C)] #[derive(Copy, Clone)] pub union hipArrayMapInfo__bindgen_ty_1 { pub mipmap: hipMipmappedArray, pub array: hipArray_t, } #[test] fn bindgen_test_layout_hipArrayMapInfo__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, concat!("Size of: ", stringify!(hipArrayMapInfo__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipArrayMapInfo__bindgen_ty_1)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_1), "::", stringify!(mipmap) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_1), "::", stringify!(array) ) ); } impl Default for hipArrayMapInfo__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Copy, Clone)] pub union hipArrayMapInfo__bindgen_ty_2 { pub sparseLevel: hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1, pub miptail: hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2, } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1 { #[doc = "< For mipmapped arrays must be a valid mipmap level. For arrays must be zero"] pub level: ::libc::c_uint, #[doc = "< For layered arrays must be a valid layer index. Otherwise, must be zero"] pub layer: ::libc::c_uint, #[doc = "< X offset in elements"] pub offsetX: ::libc::c_uint, #[doc = "< Y offset in elements"] pub offsetY: ::libc::c_uint, #[doc = "< Z offset in elements"] pub offsetZ: ::libc::c_uint, #[doc = "< Width in elements"] pub extentWidth: ::libc::c_uint, #[doc = "< Height in elements"] pub extentHeight: ::libc::c_uint, #[doc = "< Depth in elements"] pub extentDepth: ::libc::c_uint, } #[test] fn bindgen_test_layout_hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!( "Size of: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1) ) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!( "Alignment of ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1), "::", stringify!(level) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).layer) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1), "::", stringify!(layer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offsetX) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1), "::", stringify!(offsetX) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offsetY) as usize - ptr as usize }, 12usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1), "::", stringify!(offsetY) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offsetZ) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1), "::", stringify!(offsetZ) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extentWidth) as usize - ptr as usize }, 20usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1), "::", stringify!(extentWidth) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extentHeight) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1), "::", stringify!(extentHeight) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).extentDepth) as usize - ptr as usize }, 28usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_1), "::", stringify!(extentDepth) ) ); } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2 { #[doc = "< For layered arrays must be a valid layer index. Otherwise, must be zero"] pub layer: ::libc::c_uint, #[doc = "< Offset within mip tail"] pub offset: ::libc::c_ulonglong, #[doc = "< Extent in bytes"] pub size: ::libc::c_ulonglong, } #[test] fn bindgen_test_layout_hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!( "Size of: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2) ) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).layer) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2), "::", stringify!(layer) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2), "::", stringify!(offset) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2__bindgen_ty_2), "::", stringify!(size) ) ); } #[test] fn bindgen_test_layout_hipArrayMapInfo__bindgen_ty_2() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(hipArrayMapInfo__bindgen_ty_2)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipArrayMapInfo__bindgen_ty_2)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sparseLevel) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2), "::", stringify!(sparseLevel) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).miptail) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_2), "::", stringify!(miptail) ) ); } impl Default for hipArrayMapInfo__bindgen_ty_2 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[repr(C)] #[derive(Copy, Clone)] pub union hipArrayMapInfo__bindgen_ty_3 { pub memHandle: hipMemGenericAllocationHandle_t, } #[test] fn bindgen_test_layout_hipArrayMapInfo__bindgen_ty_3() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(hipArrayMapInfo__bindgen_ty_3)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipArrayMapInfo__bindgen_ty_3)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).memHandle) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo__bindgen_ty_3), "::", stringify!(memHandle) ) ); } impl Default for hipArrayMapInfo__bindgen_ty_3 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } #[test] fn bindgen_test_layout_hipArrayMapInfo() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 152usize, concat!("Size of: ", stringify!(hipArrayMapInfo)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(hipArrayMapInfo)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).resourceType) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo), "::", stringify!(resourceType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).resource) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo), "::", stringify!(resource) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).subresourceType) as usize - ptr as usize }, 72usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo), "::", stringify!(subresourceType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).subresource) as usize - ptr as usize }, 80usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo), "::", stringify!(subresource) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).memOperationType) as usize - ptr as usize }, 112usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo), "::", stringify!(memOperationType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).memHandleType) as usize - ptr as usize }, 116usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo), "::", stringify!(memHandleType) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).memHandle) as usize - ptr as usize }, 120usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo), "::", stringify!(memHandle) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 128usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo), "::", stringify!(offset) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).deviceBitMask) as usize - ptr as usize }, 136usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo), "::", stringify!(deviceBitMask) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, 140usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo), "::", stringify!(flags) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, 144usize, concat!( "Offset of field: ", stringify!(hipArrayMapInfo), "::", stringify!(reserved) ) ); } impl Default for hipArrayMapInfo { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); s.assume_init() } } } extern "C" { #[doc = " @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 Most HIP APIs implicitly initialize the HIP runtime.\n This API provides control over the timing of the initialization."] pub fn hipInit(flags: ::libc::c_uint) -> hipError_t; } extern "C" { #[doc = " @brief Returns the approximate HIP driver version.\n\n @param [out] driverVersion\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @warning The HIP feature set does not correspond to an exact CUDA SDK driver revision.\n This function always set *driverVersion 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 driver revision number here and should\n use arch feature flags to test device capabilities or conditional compilation.\n\n @see hipRuntimeGetVersion"] pub fn hipDriverGetVersion(driverVersion: *mut ::libc::c_int) -> hipError_t; } extern "C" { #[doc = " @brief Returns the approximate HIP Runtime version.\n\n @param [out] runtimeVersion\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"] pub fn hipRuntimeGetVersion(runtimeVersion: *mut ::libc::c_int) -> hipError_t; } extern "C" { #[doc = " @brief Returns a handle to a compute device\n @param [out] device\n @param [in] ordinal\n\n @returns #hipSuccess, #hipErrorInvalidDevice"] pub fn hipDeviceGet(device: *mut hipDevice_t, ordinal: ::libc::c_int) -> hipError_t; } extern "C" { #[doc = " @brief Returns the compute capability of the device\n @param [out] major\n @param [out] minor\n @param [in] device\n\n @returns #hipSuccess, #hipErrorInvalidDevice"] pub fn hipDeviceComputeCapability( major: *mut ::libc::c_int, minor: *mut ::libc::c_int, device: hipDevice_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns an identifer string for the device.\n @param [out] name\n @param [in] len\n @param [in] device\n\n @returns #hipSuccess, #hipErrorInvalidDevice"] pub fn hipDeviceGetName( name: *mut ::libc::c_char, len: ::libc::c_int, device: hipDevice_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns an UUID for the device.[BETA]\n @param [out] uuid\n @param [in] device\n\n @beta 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 @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue, #hipErrorNotInitialized,\n #hipErrorDeinitialized"] pub fn hipDeviceGetUuid(uuid: *mut hipUUID, device: hipDevice_t) -> hipError_t; } extern "C" { #[doc = " @brief Returns a value for attr of link between two devices\n @param [out] value\n @param [in] attr\n @param [in] srcDevice\n @param [in] dstDevice\n\n @returns #hipSuccess, #hipErrorInvalidDevice"] pub fn hipDeviceGetP2PAttribute( value: *mut ::libc::c_int, attr: hipDeviceP2PAttr, srcDevice: ::libc::c_int, dstDevice: ::libc::c_int, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns a PCI Bus Id string for the device, overloaded to take int device ID.\n @param [out] pciBusId\n @param [in] len\n @param [in] device\n\n @returns #hipSuccess, #hipErrorInvalidDevice"] pub fn hipDeviceGetPCIBusId( pciBusId: *mut ::libc::c_char, len: ::libc::c_int, device: ::libc::c_int, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns a handle to a compute device.\n @param [out] device handle\n @param [in] PCI Bus ID\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue"] pub fn hipDeviceGetByPCIBusId( device: *mut ::libc::c_int, pciBusId: *const ::libc::c_char, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns the total amount of memory on the device.\n @param [out] bytes\n @param [in] device\n\n @returns #hipSuccess, #hipErrorInvalidDevice"] pub fn hipDeviceTotalMem(bytes: *mut usize, device: hipDevice_t) -> hipError_t; } extern "C" { #[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"] pub fn hipDeviceSynchronize() -> hipError_t; } extern "C" { #[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"] pub fn hipDeviceReset() -> hipError_t; } extern "C" { #[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, #hipErrorDeviceAlreadyInUse\n\n @see hipGetDevice, hipGetDeviceCount"] pub fn hipSetDevice(deviceId: ::libc::c_int) -> hipError_t; } extern "C" { #[doc = " @brief Return the default device id for the calling host thread.\n\n @param [out] device *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"] pub fn hipGetDevice(deviceId: *mut ::libc::c_int) -> hipError_t; } extern "C" { #[doc = " @brief Return number of compute-capable devices.\n\n @param [output] 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."] pub fn hipGetDeviceCount(count: *mut ::libc::c_int) -> hipError_t; } extern "C" { #[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"] pub fn hipDeviceGetAttribute( pi: *mut ::libc::c_int, attr: hipDeviceAttribute_t, deviceId: ::libc::c_int, ) -> hipError_t; } extern "C" { #[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 #chipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipDeviceGetDefaultMemPool, hipMallocAsync, hipMemPoolTrimTo, hipMemPoolGetAttribute,\n hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\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."] pub fn hipDeviceGetDefaultMemPool( mem_pool: *mut hipMemPool_t, device: ::libc::c_int, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipDeviceSetMemPool(device: ::libc::c_int, mem_pool: hipMemPool_t) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipDeviceGetMemPool(mem_pool: *mut hipMemPool_t, device: ::libc::c_int) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidDevice\n @bug HCC always returns 0 for maxThreadsPerMultiProcessor\n @bug HCC always returns 0 for regsPerBlock\n @bug HCC always returns 0 for l2CacheSize\n\n Populates hipGetDeviceProperties with information for the specified device."] pub fn hipGetDeviceProperties( prop: *mut hipDeviceProp_t, deviceId: ::libc::c_int, ) -> hipError_t; } extern "C" { #[doc = " @brief Set L1/Shared cache partition.\n\n @param [in] cacheConfig\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"] pub fn hipDeviceSetCacheConfig(cacheConfig: hipFuncCache_t) -> hipError_t; } extern "C" { #[doc = " @brief Get Cache configuration for a specific Device\n\n @param [out] cacheConfig\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"] pub fn hipDeviceGetCacheConfig(cacheConfig: *mut hipFuncCache_t) -> hipError_t; } extern "C" { #[doc = " @brief Get Resource limits of current device\n\n @param [out] pValue\n @param [in] limit\n\n @returns #hipSuccess, #hipErrorUnsupportedLimit, #hipErrorInvalidValue\n Note: Currently, only hipLimitMallocHeapSize is available\n"] pub fn hipDeviceGetLimit(pValue: *mut usize, limit: hipLimit_t) -> hipError_t; } extern "C" { #[doc = " @brief Set Resource limits of current device\n\n @param [in] limit\n @param [in] value\n\n @returns #hipSuccess, #hipErrorUnsupportedLimit, #hipErrorInvalidValue\n"] pub fn hipDeviceSetLimit(limit: hipLimit_t, value: usize) -> hipError_t; } extern "C" { #[doc = " @brief Returns bank width of shared memory for current device\n\n @param [out] pConfig\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"] pub fn hipDeviceGetSharedMemConfig(pConfig: *mut hipSharedMemConfig) -> hipError_t; } extern "C" { #[doc = " @brief Gets the flags set for current device\n\n @param [out] flags\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue"] pub fn hipGetDeviceFlags(flags: *mut ::libc::c_uint) -> hipError_t; } extern "C" { #[doc = " @brief The bank width of shared memory on current device is set\n\n @param [in] config\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"] pub fn hipDeviceSetSharedMemConfig(config: hipSharedMemConfig) -> hipError_t; } extern "C" { #[doc = " @brief The current device behavior is changed according the flags passed.\n\n @param [in] flags\n\n The schedule flags impact how HIP waits for the completion of a command running on a device.\n hipDeviceScheduleSpin : HIP runtime will actively spin in the thread which submitted the\n work until the command completes. This offers the lowest latency, but will consume a CPU core\n and may increase power. hipDeviceScheduleYield : The HIP runtime will yield the CPU to\n system so that other tasks can use it. This may increase latency to detect the completion but\n will consume less power and is friendlier to other tasks in the system.\n hipDeviceScheduleBlockingSync : On ROCm platform, this is a synonym for hipDeviceScheduleYield.\n hipDeviceScheduleAuto : Use a hueristic to select between Spin and Yield modes. If the\n number of HIP contexts is greater than the number of logical processors in the system, use Spin\n scheduling. Else use Yield scheduling.\n\n\n hipDeviceMapHost : Allow mapping host memory. On ROCM, this is always allowed and\n the flag is ignored. hipDeviceLmemResizeToMax : @warning ROCm silently ignores this flag.\n\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorSetOnActiveProcess\n\n"] pub fn hipSetDeviceFlags(flags: ::libc::c_uint) -> hipError_t; } extern "C" { #[doc = " @brief Device which matches hipDeviceProp_t is returned\n\n @param [out] device ID\n @param [in] device properties pointer\n\n @returns #hipSuccess, #hipErrorInvalidValue"] pub fn hipChooseDevice(device: *mut ::libc::c_int, prop: *const hipDeviceProp_t) -> hipError_t; } extern "C" { #[doc = " @brief Returns the link type and hop count between two devices\n\n @param [in] device1 Ordinal for device1\n @param [in] device2 Ordinal for device2\n @param [out] linktype Returns the link type (See hsa_amd_link_info_type_t) between the two devices\n @param [out] hopcount Returns the hop count between the two devices\n\n Queries and returns the HSA link type and the hop count between the two specified devices.\n\n @returns #hipSuccess, #hipInvalidDevice, #hipErrorRuntimeOther"] pub fn hipExtGetLinkTypeAndHopCount( device1: ::libc::c_int, device2: ::libc::c_int, linktype: *mut u32, hopcount: *mut u32, ) -> hipError_t; } extern "C" { #[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\n hipSuccess,\n hipErrorInvalidHandle,\n hipErrorOutOfMemory,\n hipErrorMapFailed,\n"] pub fn hipIpcGetMemHandle( handle: *mut hipIpcMemHandle_t, devPtr: *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[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\n hipSuccess,\n hipErrorMapFailed,\n hipErrorInvalidHandle,\n hipErrorTooManyPeers\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"] pub fn hipIpcOpenMemHandle( devPtr: *mut *mut ::libc::c_void, handle: hipIpcMemHandle_t, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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\n hipSuccess,\n hipErrorMapFailed,\n hipErrorInvalidHandle,\n"] pub fn hipIpcCloseMemHandle(devPtr: *mut ::libc::c_void) -> hipError_t; } extern "C" { #[doc = " @brief Gets an opaque interprocess handle for an event.\n\n This opaque handle may be copied into other processes and opened with hipIpcOpenEventHandle.\n Then hipEventRecord, hipEventSynchronize, hipStreamWaitEvent and hipEventQuery may be used in\n either process. Operations on the imported event after the exported event has been freed with hipEventDestroy\n will result in undefined behavior.\n\n @param[out] handle Pointer to hipIpcEventHandle to return the opaque event handle\n @param[in] event Event allocated with hipEventInterprocess and hipEventDisableTiming flags\n\n @returns #hipSuccess, #hipErrorInvalidConfiguration, #hipErrorInvalidValue\n"] pub fn hipIpcGetEventHandle(handle: *mut hipIpcEventHandle_t, event: hipEvent_t) -> hipError_t; } extern "C" { #[doc = " @brief Opens an interprocess event handles.\n\n Opens an interprocess event handle exported from another process with cudaIpcGetEventHandle. The returned\n hipEvent_t behaves like a locally created event with the hipEventDisableTiming flag specified. This event\n need be freed with hipEventDestroy. Operations on the imported event after the exported event has been freed\n with hipEventDestroy will result in undefined behavior. If the function is called within the same process where\n handle is returned by hipIpcGetEventHandle, it will return hipErrorInvalidContext.\n\n @param[out] event Pointer to hipEvent_t to return the event\n @param[in] handle The opaque interprocess handle to open\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidContext\n"] pub fn hipIpcOpenEventHandle(event: *mut hipEvent_t, handle: hipIpcEventHandle_t) -> hipError_t; } extern "C" { #[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;\n @param [in] attr;\n @param [in] value;\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"] pub fn hipFuncSetAttribute( func: *const ::libc::c_void, attr: hipFuncAttribute, value: ::libc::c_int, ) -> hipError_t; } extern "C" { #[doc = " @brief Set Cache configuration for a specific function\n\n @param [in] config;\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"] pub fn hipFuncSetCacheConfig(func: *const ::libc::c_void, config: hipFuncCache_t) -> hipError_t; } extern "C" { #[doc = " @brief Set shared memory configuation for a specific function\n\n @param [in] func\n @param [in] config\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"] pub fn hipFuncSetSharedMemConfig( func: *const ::libc::c_void, config: hipSharedMemConfig, ) -> hipError_t; } extern "C" { #[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"] pub fn hipGetLastError() -> hipError_t; } extern "C" { #[doc = " @brief Return last error returned by any HIP runtime API call.\n\n @return #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"] pub fn hipPeekAtLastError() -> hipError_t; } extern "C" { #[doc = " @brief Return hip error as text string form.\n\n @param hip_error Error code to convert to name.\n @return const char pointer to the NULL-terminated error name\n\n @see hipGetErrorString, hipGetLastError, hipPeakAtLastError, hipError_t"] pub fn hipGetErrorName(hip_error: hipError_t) -> *const ::libc::c_char; } extern "C" { #[doc = " @brief Return handy text string message to explain the error which occurred\n\n @param hipError Error code to convert to string.\n @return const char pointer to the NULL-terminated error string\n\n @see hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t"] pub fn hipGetErrorString(hipError: hipError_t) -> *const ::libc::c_char; } extern "C" { #[doc = " @brief Return hip error as text string form.\n\n @param [in] hipError Error code to convert to string.\n @param [out] const char pointer to the NULL-terminated error string\n @return #hipSuccess, #hipErrorInvalidValue\n\n @see hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t"] pub fn hipDrvGetErrorName( hipError: hipError_t, errorString: *mut *const ::libc::c_char, ) -> hipError_t; } extern "C" { #[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] const char pointer to the NULL-terminated error string\n @return #hipSuccess, #hipErrorInvalidValue\n\n @see hipGetErrorName, hipGetLastError, hipPeakAtLastError, hipError_t"] pub fn hipDrvGetErrorString( hipError: hipError_t, errorString: *mut *const ::libc::c_char, ) -> hipError_t; } extern "C" { #[doc = " @brief Create 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 @return #hipSuccess, #hipErrorInvalidValue\n\n Create a new asynchronous stream. @p stream returns an opaque handle that can be used to\n reference the newly created stream in subsequent hipStream* commands. The stream is allocated on\n the heap and will remain allocated even if the handle goes out-of-scope. To release the memory\n used by the stream, applicaiton must call hipStreamDestroy.\n\n @return #hipSuccess, #hipErrorInvalidValue\n\n @see hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"] pub fn hipStreamCreate(stream: *mut hipStream_t) -> hipError_t; } extern "C" { #[doc = " @brief Create an asynchronous stream.\n\n @param[in, out] stream Pointer to new stream\n @param[in ] flags to control stream creation.\n @return #hipSuccess, #hipErrorInvalidValue\n\n Create a new asynchronous stream. @p stream returns an opaque handle that can be used to\n reference the newly created stream in subsequent hipStream* commands. The stream is allocated on\n the heap and will remain allocated even if the handle goes out-of-scope. To release the memory\n used by the stream, applicaiton must call hipStreamDestroy. Flags controls behavior of the\n stream. See #hipStreamDefault, #hipStreamNonBlocking.\n\n\n @see hipStreamCreate, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"] pub fn hipStreamCreateWithFlags(stream: *mut hipStream_t, flags: ::libc::c_uint) -> hipError_t; } extern "C" { #[doc = " @brief Create an asynchronous stream with the specified priority.\n\n @param[in, out] stream Pointer to new stream\n @param[in ] flags to control stream creation.\n @param[in ] priority of the stream. Lower numbers represent higher priorities.\n @return #hipSuccess, #hipErrorInvalidValue\n\n Create a new asynchronous stream with the specified priority. @p stream returns an opaque handle\n that can be used to reference the newly created stream in subsequent hipStream* commands. The\n stream is allocated on the heap and will remain allocated even if the handle goes out-of-scope.\n To release the memory used by the stream, applicaiton must call hipStreamDestroy. Flags controls\n behavior of the stream. See #hipStreamDefault, #hipStreamNonBlocking.\n\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"] pub fn hipStreamCreateWithPriority( stream: *mut hipStream_t, flags: ::libc::c_uint, priority: ::libc::c_int, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns numerical values that correspond to the least and greatest stream priority.\n\n @param[in, out] leastPriority pointer in which value corresponding to least priority is returned.\n @param[in, out] greatestPriority pointer in which value corresponding to greatest priority is returned.\n\n Returns in *leastPriority and *greatestPriority the numerical values that correspond to the least\n and greatest stream priority respectively. Stream priorities follow a convention where lower numbers\n imply greater priorities. The range of meaningful stream priorities is given by\n [*greatestPriority, *leastPriority]. If the user attempts to create a stream with a priority value\n that is outside the the meaningful range as specified by this API, the priority is automatically\n clamped to within the valid range."] pub fn hipDeviceGetStreamPriorityRange( leastPriority: *mut ::libc::c_int, greatestPriority: *mut ::libc::c_int, ) -> hipError_t; } extern "C" { #[doc = " @brief Destroys the specified stream.\n\n @param[in, out] stream Valid pointer to hipStream_t. This function writes the memory with the\n newly created stream.\n @return #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, hipStreamWaitEvent,\n hipStreamSynchronize"] pub fn hipStreamDestroy(stream: hipStream_t) -> hipError_t; } extern "C" { #[doc = " @brief Return #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 @return #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, hipStreamSynchronize,\n hipStreamDestroy"] pub fn hipStreamQuery(stream: hipStream_t) -> hipError_t; } extern "C" { #[doc = " @brief Wait for all commands in stream to complete.\n\n @param[in] stream stream identifier.\n\n @return #hipSuccess, #hipErrorInvalidHandle\n\n This command is host-synchronous : the host will block until the specified stream is empty.\n\n This command follows standard null-stream semantics. Specifically, specifying the null stream\n will cause the command to wait for other streams on the same device to complete all pending\n operations.\n\n This command honors the hipDeviceLaunchBlocking flag, which controls whether the wait is active\n or blocking.\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamWaitEvent, hipStreamDestroy\n"] pub fn hipStreamSynchronize(stream: hipStream_t) -> hipError_t; } extern "C" { #[doc = " @brief Make the specified compute stream wait for an event\n\n @param[in] stream stream to make wait.\n @param[in] event event to wait on\n @param[in] flags control operation [must be 0]\n\n @return #hipSuccess, #hipErrorInvalidHandle\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 This function only waits for commands in the current stream to complete. Notably,, this function\n does not impliciy wait for commands in the default stream to complete, even if the specified\n stream is created with hipStreamNonBlocking = 0.\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamCreateWithPriority, hipStreamSynchronize, hipStreamDestroy"] pub fn hipStreamWaitEvent( stream: hipStream_t, event: hipEvent_t, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @brief Return 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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle\n\n @returns #hipSuccess #hipErrorInvalidValue #hipErrorInvalidHandle\n\n Return flags associated with this stream in *@p flags.\n\n @see hipStreamCreateWithFlags"] pub fn hipStreamGetFlags(stream: hipStream_t, flags: *mut ::libc::c_uint) -> hipError_t; } extern "C" { #[doc = " @brief Query the priority of a stream.\n\n @param[in] stream stream to be queried\n @param[in,out] priority Pointer to an unsigned integer in which the stream's priority is returned\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidHandle\n\n @returns #hipSuccess #hipErrorInvalidValue #hipErrorInvalidHandle\n\n Query the priority of a stream. The priority is returned in in priority.\n\n @see hipStreamCreateWithFlags"] pub fn hipStreamGetPriority(stream: hipStream_t, priority: *mut ::libc::c_int) -> hipError_t; } extern "C" { #[doc = " @brief Create 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 @return #hipSuccess, #hipErrorInvalidHandle, #hipErrorInvalidValue\n\n Create a new asynchronous stream with the specified CU mask. @p stream returns an opaque handle\n that can be used to reference the newly created stream in subsequent hipStream* commands. The\n stream is allocated on the heap and will remain allocated even if the handle goes out-of-scope.\n To release the memory used by the stream, application must call hipStreamDestroy.\n\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"] pub fn hipExtStreamCreateWithCUMask( stream: *mut hipStream_t, cuMaskSize: u32, cuMask: *const u32, ) -> hipError_t; } extern "C" { #[doc = " @brief Get 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 @return #hipSuccess, #hipErrorInvalidHandle, #hipErrorInvalidValue\n\n @see hipStreamCreate, hipStreamSynchronize, hipStreamWaitEvent, hipStreamDestroy"] pub fn hipExtStreamGetCUMask( stream: hipStream_t, cuMaskSize: u32, cuMask: *mut u32, ) -> hipError_t; } #[doc = " Stream CallBack struct"] pub type hipStreamCallback_t = ::std::option::Option< unsafe extern "C" fn(stream: hipStream_t, status: hipError_t, userData: *mut ::libc::c_void), >; extern "C" { #[doc = " @brief Adds a callback to be called on the host after all currently enqueued\n items in the stream have completed. For each\n hipStreamAddCallback call, a callback will be executed exactly once.\n The callback will block later work in the stream until it is finished.\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 @return #hipSuccess, #hipErrorInvalidHandle, #hipErrorNotSupported\n\n @see hipStreamCreate, hipStreamCreateWithFlags, hipStreamQuery, hipStreamSynchronize,\n hipStreamWaitEvent, hipStreamDestroy, hipStreamCreateWithPriority\n"] pub fn hipStreamAddCallback( stream: hipStream_t, callback: hipStreamCallback_t, userData: *mut ::libc::c_void, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup StreamM Stream Memory Operations\n @{\n This section describes Stream Memory Wait and Write functions of HIP runtime API.\n/\n/**\n @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 hipStreamWaitValueEq : waits until *ptr&mask == value\n hipStreamWaitValueAnd: waits until ((*ptr&mask) & value) != 0\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 @beta 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 hipExtMallocWithFlags, hipFree, hipStreamWaitValue64, hipStreamWriteValue64,\n hipStreamWriteValue32, hipDeviceGetAttribute"] pub fn hipStreamWaitValue32( stream: hipStream_t, ptr: *mut ::libc::c_void, value: u32, flags: ::libc::c_uint, mask: u32, ) -> hipError_t; } extern "C" { #[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 hipStreamWaitValueEq : waits until *ptr&mask == value\n hipStreamWaitValueAnd: waits until ((*ptr&mask) & value) != 0\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 @beta 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 hipExtMallocWithFlags, hipFree, hipStreamWaitValue32, hipStreamWriteValue64,\n hipStreamWriteValue32, hipDeviceGetAttribute"] pub fn hipStreamWaitValue64( stream: hipStream_t, ptr: *mut ::libc::c_void, value: u64, flags: ::libc::c_uint, mask: u64, ) -> hipError_t; } extern "C" { #[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 @beta 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 hipExtMallocWithFlags, hipFree, hipStreamWriteValue32, hipStreamWaitValue32,\n hipStreamWaitValue64"] pub fn hipStreamWriteValue32( stream: hipStream_t, ptr: *mut ::libc::c_void, value: u32, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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 @beta 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 hipExtMallocWithFlags, hipFree, hipStreamWriteValue32, hipStreamWaitValue32,\n hipStreamWaitValue64"] pub fn hipStreamWriteValue64( stream: hipStream_t, ptr: *mut ::libc::c_void, value: u64, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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\n @returns #hipSuccess, #hipErrorNotInitialized, #hipErrorInvalidValue,\n#hipErrorLaunchFailure, #hipErrorOutOfMemory\n\n @see hipEventCreate, hipEventSynchronize, hipEventDestroy, hipEventElapsedTime"] pub fn hipEventCreateWithFlags(event: *mut hipEvent_t, flags: ::libc::c_uint) -> hipError_t; } extern "C" { #[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"] pub fn hipEventCreate(event: *mut hipEvent_t) -> hipError_t; } extern "C" { pub fn hipEventRecord(event: hipEvent_t, stream: hipStream_t) -> hipError_t; } extern "C" { #[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"] pub fn hipEventDestroy(event: hipEvent_t) -> hipError_t; } extern "C" { #[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 immediately.\n\n TODO-hip- This function needs to support hipEventBlockingSync parameter.\n\n @param[in] event Event on which to wait.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized,\n #hipErrorInvalidHandle, #hipErrorLaunchFailure\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventQuery, hipEventDestroy, hipEventRecord,\n hipEventElapsedTime"] pub fn hipEventSynchronize(event: hipEvent_t) -> hipError_t; } extern "C" { #[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"] pub fn hipEventElapsedTime(ms: *mut f32, start: hipEvent_t, stop: hipEvent_t) -> hipError_t; } extern "C" { #[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 that work\n has not completed, or if hipEventRecord() was not called on the event, then #hipErrorNotReady is\n returned.\n\n @see hipEventCreate, hipEventCreateWithFlags, hipEventRecord, hipEventDestroy,\n hipEventSynchronize, hipEventElapsedTime"] pub fn hipEventQuery(event: hipEvent_t) -> hipError_t; } extern "C" { #[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup Memory Memory Management\n @{\n This section describes the memory management functions of HIP runtime API.\n The following CUDA APIs are not currently supported:\n - cudaMalloc3D\n - cudaMalloc3DArray\n - TODO - more 2D, 3D, array APIs here.\n\n\n/\n/**\n @brief Return 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 @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see hipPointerGetAttribute"] pub fn hipPointerGetAttributes( attributes: *mut hipPointerAttribute_t, ptr: *const ::libc::c_void, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns information about the specified pointer.[BETA]\n\n @param [in, out] data returned pointer attribute value\n @param [in] atribute attribute to query for\n @param [in] ptr pointer to get attributes for\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @beta 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 hipPointerGetAttributes"] pub fn hipPointerGetAttribute( data: *mut ::libc::c_void, attribute: hipPointer_attribute, ptr: hipDeviceptr_t, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @beta 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 hipPointerGetAttribute"] pub fn hipDrvPointerGetAttributes( numAttributes: ::libc::c_uint, attributes: *mut hipPointer_attribute, data: *mut *mut ::libc::c_void, ptr: hipDeviceptr_t, ) -> hipError_t; } extern "C" { #[doc = " @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 @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"] pub fn hipImportExternalSemaphore( extSem_out: *mut hipExternalSemaphore_t, semHandleDesc: *const hipExternalSemaphoreHandleDesc, ) -> hipError_t; } extern "C" { #[doc = " @brief Signals a set of external semaphore objects.\n\n @param[in] extSem_out 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 @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"] pub fn hipSignalExternalSemaphoresAsync( extSemArray: *const hipExternalSemaphore_t, paramsArray: *const hipExternalSemaphoreSignalParams, numExtSems: ::libc::c_uint, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Waits on a set of external semaphore objects\n\n @param[in] extSem_out 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 @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"] pub fn hipWaitExternalSemaphoresAsync( extSemArray: *const hipExternalSemaphore_t, paramsArray: *const hipExternalSemaphoreWaitParams, numExtSems: ::libc::c_uint, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Destroys an external semaphore object and releases any references to the underlying resource. Any outstanding signals or waits must have completed before the semaphore is destroyed.\n\n @param[in] extSem handle to an external memory object\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"] pub fn hipDestroyExternalSemaphore(extSem: hipExternalSemaphore_t) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"] pub fn hipImportExternalMemory( extMem_out: *mut hipExternalMemory_t, memHandleDesc: *const hipExternalMemoryHandleDesc, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"] pub fn hipExternalMemoryGetMappedBuffer( devPtr: *mut *mut ::libc::c_void, extMem: hipExternalMemory_t, bufferDesc: *const hipExternalMemoryBufferDesc, ) -> hipError_t; } extern "C" { #[doc = " @brief Destroys an external memory object.\n\n @param[in] extMem External memory object to be destroyed\n\n @return #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n\n @see"] pub fn hipDestroyExternalMemory(extMem: hipExternalMemory_t) -> hipError_t; } extern "C" { #[doc = " @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 @return #hipSuccess, #hipErrorOutOfMemory, #hipErrorInvalidValue (bad context, null *ptr)\n\n @see hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D, hipMalloc3DArray,\n hipHostFree, hipHostMalloc"] pub fn hipMalloc(ptr: *mut *mut ::libc::c_void, size: usize) -> hipError_t; } extern "C" { #[doc = " @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 @param[in] flags Type of memory allocation\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @return #hipSuccess, #hipErrorOutOfMemory, #hipErrorInvalidValue (bad context, null *ptr)\n\n @see hipMallocPitch, hipFree, hipMallocArray, hipFreeArray, hipMalloc3D, hipMalloc3DArray,\n hipHostFree, hipHostMalloc"] pub fn hipExtMallocWithFlags( ptr: *mut *mut ::libc::c_void, sizeBytes: usize, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorOutOfMemory\n\n @deprecated use hipHostMalloc() instead"] pub fn hipMallocHost(ptr: *mut *mut ::libc::c_void, size: usize) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorOutOfMemory\n\n @deprecated use hipHostMalloc() instead"] pub fn hipMemAllocHost(ptr: *mut *mut ::libc::c_void, size: usize) -> hipError_t; } extern "C" { #[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\n @param[in] flags Type of host memory allocation\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @return #hipSuccess, #hipErrorOutOfMemory\n\n @see hipSetDeviceFlags, hipHostFree"] pub fn hipHostMalloc( ptr: *mut *mut ::libc::c_void, size: usize, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = "-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @addtogroup MemoryM Managed Memory\n @{\n @ingroup Memory\n This section describes the managed memory management functions of HIP runtime API.\n\n/\n/**\n @brief Allocates memory that will be automatically managed by HIP.\n\n @param [out] dev_ptr - pointer to allocated device memory\n @param [in] size - requested allocation size in bytes\n @param [in] flags - must be either hipMemAttachGlobal or hipMemAttachHost\n (defaults to hipMemAttachGlobal)\n\n @returns #hipSuccess, #hipErrorMemoryAllocation, #hipErrorNotSupported, #hipErrorInvalidValue"] pub fn hipMallocManaged( dev_ptr: *mut *mut ::libc::c_void, size: usize, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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"] pub fn hipMemPrefetchAsync( dev_ptr: *const ::libc::c_void, count: usize, device: ::libc::c_int, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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\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"] pub fn hipMemAdvise( dev_ptr: *const ::libc::c_void, count: usize, advice: hipMemoryAdvise, device: ::libc::c_int, ) -> hipError_t; } extern "C" { #[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"] pub fn hipMemRangeGetAttribute( data: *mut ::libc::c_void, data_size: usize, attribute: hipMemRangeAttribute, dev_ptr: *const ::libc::c_void, count: usize, ) -> hipError_t; } extern "C" { #[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"] pub fn hipMemRangeGetAttributes( data: *mut *mut ::libc::c_void, data_sizes: *mut usize, attributes: *mut hipMemRangeAttribute, num_attributes: usize, dev_ptr: *const ::libc::c_void, count: usize, ) -> hipError_t; } extern "C" { #[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"] pub fn hipStreamAttachMemAsync( stream: hipStream_t, dev_ptr: *mut ::libc::c_void, length: usize, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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 the allocation operation completes.\n The allocation comes from the memory pool associated with the stream's device.\n\n @note The default memory pool of a device contains device memory from that device.\n @note Basic stream ordering allows future work submitted into the same stream to use the allocation.\n Stream query, stream synchronize, and HIP events can be used to guarantee that the allocation\n operation completes before work submitted in a separate stream runs.\n @note During stream capture, this function results in the creation of an allocation node. In this case,\n the allocation is owned by the graph instead of the memory pool. The memory pool's properties\n are used to set the node's creation parameters.\n\n @param [out] 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 @return #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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMallocAsync( dev_ptr: *mut *mut ::libc::c_void, size: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipFreeAsync(dev_ptr: *mut ::libc::c_void, stream: hipStream_t) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemPoolTrimTo(mem_pool: hipMemPool_t, min_bytes_to_hold: usize) -> hipError_t; } extern "C" { #[doc = " @brief Sets attributes of a memory pool\n\n Supported attributes are:\n - @p hipMemPoolAttrReleaseThreshold: (value type = cuuint64_t)\n Amount of reserved memory in bytes to hold onto before trying\n to release memory back to the OS. When more than the release\n threshold bytes of memory are held by the memory pool, the\n allocator will try to release memory back to the OS on the\n next call to stream, event or context synchronize. (default 0)\n - @p hipMemPoolReuseFollowEventDependencies: (value type = int)\n Allow @p hipMallocAsync to use memory asynchronously freed\n in another stream as long as a stream ordering dependency\n of the allocating stream on the free action exists.\n HIP events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)\n - @p hipMemPoolReuseAllowOpportunistic: (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)\n - @p hipMemPoolReuseAllowInternalDependencies: (value type = int)\n Allow @p hipMallocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by @p hipFreeAsync (default enabled).\n\n @param [in] mem_pool The memory pool to modify\n @param [in] attr The attribute to modify\n @param [in] value Pointer to the value to assign\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemPoolSetAttribute( mem_pool: hipMemPool_t, attr: hipMemPoolAttr, value: *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[doc = " @brief Gets attributes of a memory pool\n\n Supported attributes are:\n - @p hipMemPoolAttrReleaseThreshold: (value type = cuuint64_t)\n Amount of reserved memory in bytes to hold onto before trying\n to release memory back to the OS. When more than the release\n threshold bytes of memory are held by the memory pool, the\n allocator will try to release memory back to the OS on the\n next call to stream, event or context synchronize. (default 0)\n - @p hipMemPoolReuseFollowEventDependencies: (value type = int)\n Allow @p hipMallocAsync to use memory asynchronously freed\n in another stream as long as a stream ordering dependency\n of the allocating stream on the free action exists.\n HIP events and null stream interactions can create the required\n stream ordered dependencies. (default enabled)\n - @p hipMemPoolReuseAllowOpportunistic: (value type = int)\n Allow reuse of already completed frees when there is no dependency\n between the free and allocation. (default enabled)\n - @p hipMemPoolReuseAllowInternalDependencies: (value type = int)\n Allow @p hipMallocAsync to insert new stream dependencies\n in order to establish the stream ordering required to reuse\n a piece of memory released by @p hipFreeAsync (default enabled).\n\n @param [in] mem_pool The memory pool to get attributes of\n @param [in] attr The attribute to get\n @param [in] value Retrieved value\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemPoolGetAttribute( mem_pool: hipMemPool_t, attr: hipMemPoolAttr, value: *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[doc = " @brief Controls visibility of the specified pool between devices\n\n @param [in] mem_pool Memory pool for acccess change\n @param [in] desc_list Array of access descriptors. Each descriptor instructs the access to enable for a single gpu\n @param [in] count Number of descriptors in the map array.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemPoolSetAccess( mem_pool: hipMemPool_t, desc_list: *const hipMemAccessDesc, count: usize, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemPoolGetAccess( flags: *mut hipMemAccessFlags, mem_pool: hipMemPool_t, location: *mut hipMemLocation, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates a memory pool\n\n Creates a HIP memory pool and returns the handle in @p mem_pool. The @p pool_props determines\n the properties of the pool such as the backing device and IPC capabilities.\n\n By default, the memory pool will be accessible from the device it is allocated on.\n\n @param [out] mem_pool Contains createed memory pool\n @param [in] pool_props Memory pool properties\n\n @note Specifying hipMemHandleTypeNone creates a memory pool that will not support IPC.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolDestroy,\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemPoolCreate( mem_pool: *mut hipMemPool_t, pool_props: *const hipMemPoolProps, ) -> hipError_t; } extern "C" { #[doc = " @brief Destroys the specified memory pool\n\n If any pointers obtained from this pool haven't been freed or\n the pool has free operations that haven't completed\n when @p hipMemPoolDestroy is invoked, the function will return immediately and the\n resources associated with the pool will be released automatically\n once there are no more outstanding allocations.\n\n Destroying the current mempool of a device sets the default mempool of\n that device as the current mempool for that device.\n\n @param [in] mem_pool Memory pool for destruction\n\n @note A device's default memory pool cannot be destroyed.\n\n @returns #hipSuccess, #hipErrorInvalidValue\n\n @see hipMallocFromPoolAsync, hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolCreate\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemPoolDestroy(mem_pool: hipMemPool_t) -> hipError_t; } extern "C" { #[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 the allocation operation completes.\n The allocation comes from the specified memory pool.\n\n @note The specified memory pool may be from a device different than that of the specified @p stream.\n\n Basic stream ordering allows future work submitted into the same stream to use the allocation.\n Stream query, stream synchronize, and HIP events can be used to guarantee that the allocation\n operation completes before work submitted in a separate stream runs.\n\n @note During stream capture, this function results in the creation of an allocation node. In this case,\n the allocation is owned by the graph instead of the memory pool. The memory pool's properties\n are used to set the node's creation parameters.\n\n @param [out] dev_ptr Returned device pointer\n @param [in] size Number of bytes to allocate\n @param [in] mem_pool The pool to allocate from\n @param [in] stream The stream establishing the stream ordering semantic\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported, #hipErrorOutOfMemory\n\n @see hipMallocAsync, hipFreeAsync, hipMemPoolGetAttribute, hipMemPoolCreate\n hipMemPoolTrimTo, hipDeviceSetMemPool, hipMemPoolSetAttribute, hipMemPoolSetAccess, hipMemPoolGetAccess,\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMallocFromPoolAsync( dev_ptr: *mut *mut ::libc::c_void, size: usize, mem_pool: hipMemPool_t, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Exports a memory pool to the requested handle type.\n\n Given an IPC capable mempool, create an OS handle to share the pool with another process.\n A recipient process can convert the shareable handle into a mempool with @p hipMemPoolImportFromShareableHandle.\n Individual pointers can then be shared with the @p hipMemPoolExportPointer and @p hipMemPoolImportPointer APIs.\n The implementation of what the shareable handle is and how it can be transferred is defined by the requested\n handle type.\n\n @note: To create an IPC capable mempool, create a mempool with a @p hipMemAllocationHandleType other\n than @p hipMemHandleTypeNone.\n\n @param [out] shared_handle Pointer to the location in which to store the requested handle\n @param [in] mem_pool Pool to export\n @param [in] handle_type The type of handle to create\n @param [in] flags Must be 0\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorOutOfMemory\n\n @see hipMemPoolImportFromShareableHandle\n\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemPoolExportToShareableHandle( shared_handle: *mut ::libc::c_void, mem_pool: hipMemPool_t, handle_type: hipMemAllocationHandleType, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemPoolImportFromShareableHandle( mem_pool: *mut hipMemPool_t, shared_handle: *mut ::libc::c_void, handle_type: hipMemAllocationHandleType, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemPoolExportPointer( export_data: *mut hipMemPoolPtrExportData, dev_ptr: *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemPoolImportPointer( dev_ptr: *mut *mut ::libc::c_void, mem_pool: hipMemPool_t, export_data: *mut hipMemPoolPtrExportData, ) -> hipError_t; } extern "C" { #[doc = " @brief Allocate device accessible page locked host memory [Deprecated]\n\n @param[out] ptr Pointer to the allocated host pinned memory\n @param[in] size Requested memory size\n @param[in] flags Type of host memory allocation\n\n If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.\n\n @return #hipSuccess, #hipErrorOutOfMemory\n\n @deprecated use hipHostMalloc() instead"] pub fn hipHostAlloc( ptr: *mut *mut ::libc::c_void, size: usize, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @brief Get Device pointer from Host Pointer allocated through hipHostMalloc\n\n @param[out] dstPtr 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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorOutOfMemory\n\n @see hipSetDeviceFlags, hipHostMalloc"] pub fn hipHostGetDevicePointer( devPtr: *mut *mut ::libc::c_void, hstPtr: *mut ::libc::c_void, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue\n\n @see hipHostMalloc"] pub fn hipHostGetFlags( flagsPtr: *mut ::libc::c_uint, hostPtr: *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[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\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 device\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 @return #hipSuccess, #hipErrorOutOfMemory\n\n @see hipHostUnregister, hipHostGetFlags, hipHostGetDevicePointer"] pub fn hipHostRegister( hostPtr: *mut ::libc::c_void, sizeBytes: usize, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @brief Un-register host pointer\n\n @param[in] hostPtr Host pointer previously registered with #hipHostRegister\n @return Error code\n\n @see hipHostRegister"] pub fn hipHostUnregister(hostPtr: *mut ::libc::c_void) -> hipError_t; } extern "C" { #[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 @return Error code\n\n @see hipMalloc, hipFree, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc"] pub fn hipMallocPitch( ptr: *mut *mut ::libc::c_void, pitch: *mut usize, width: usize, height: usize, ) -> hipError_t; } extern "C" { #[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] 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 The intended usage of pitch is as a separate parameter of the allocation, used to compute addresses within the 2D array.\n Given the row and column of an array element of type T, the address is computed as:\n T* pElement = (T*)((char*)BaseAddress + Row * Pitch) + Column;\n\n @return Error code\n\n @see hipMalloc, hipFree, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc"] pub fn hipMemAllocPitch( dptr: *mut hipDeviceptr_t, pitch: *mut usize, widthInBytes: usize, height: usize, elementSizeBytes: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @brief Free memory allocated by the hcc 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 @return #hipSuccess\n @return #hipErrorInvalidDevicePointer (if pointer is invalid, including host pointers allocated\n with hipHostMalloc)\n\n @see hipMalloc, hipMallocPitch, hipMallocArray, hipFreeArray, hipHostFree, hipMalloc3D,\n hipMalloc3DArray, hipHostMalloc"] pub fn hipFree(ptr: *mut ::libc::c_void) -> hipError_t; } extern "C" { #[doc = " @brief Free memory allocated by the hcc hip host memory allocation API. [Deprecated]\n\n @param[in] ptr Pointer to memory to be freed\n @return #hipSuccess,\n #hipErrorInvalidValue (if pointer is invalid, including device pointers allocated with\nhipMalloc)\n @deprecated use hipHostFree() instead"] pub fn hipFreeHost(ptr: *mut ::libc::c_void) -> hipError_t; } extern "C" { #[doc = " @brief Free memory allocated by the hcc 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 @param[in] ptr Pointer to memory to be freed\n @return #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"] pub fn hipHostFree(ptr: *mut ::libc::c_void) -> hipError_t; } extern "C" { #[doc = " @brief Copy data from src to dst.\n\n It supports memory from host to device,\n device to host, device to device and host to host\n The src and dst must not overlap.\n\n For hipMemcpy, the copy is always performed by the current device (set by hipSetDevice).\n For multi-gpu or peer-to-peer configurations, it is recommended to set the current device to the\n device where the src data is physically located. For optimal peer-to-peer copies, the copy device\n must be able to access the src and dst pointers (by calling hipDeviceEnablePeerAccess with copy\n agent as the current device and src/dest as the peerDevice argument. if this is not done, the\n hipMemcpy will still work, but will perform the copy using a staging buffer on the host.\n Calling hipMemcpy with dst and src pointers that do not match the hipMemcpyKind results in\n undefined behavior.\n\n @param[out] dst Data being copy to\n @param[in] src Data being copy from\n @param[in] sizeBytes Data size in bytes\n @param[in] copyType Memory copy type\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree, #hipErrorUnknowni\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"] pub fn hipMemcpy( dst: *mut ::libc::c_void, src: *const ::libc::c_void, sizeBytes: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { pub fn hipMemcpyWithStream( dst: *mut ::libc::c_void, src: *const ::libc::c_void, sizeBytes: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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 @return #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"] pub fn hipMemcpyHtoD( dst: hipDeviceptr_t, src: *mut ::libc::c_void, sizeBytes: usize, ) -> hipError_t; } extern "C" { #[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 @return #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"] pub fn hipMemcpyDtoH( dst: *mut ::libc::c_void, src: hipDeviceptr_t, sizeBytes: usize, ) -> hipError_t; } extern "C" { #[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 @return #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"] pub fn hipMemcpyDtoD(dst: hipDeviceptr_t, src: hipDeviceptr_t, sizeBytes: usize) -> hipError_t; } extern "C" { #[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\n @return #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"] pub fn hipMemcpyHtoDAsync( dst: hipDeviceptr_t, src: *mut ::libc::c_void, sizeBytes: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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\n @return #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"] pub fn hipMemcpyDtoHAsync( dst: *mut ::libc::c_void, src: hipDeviceptr_t, sizeBytes: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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\n @return #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"] pub fn hipMemcpyDtoDAsync( dst: hipDeviceptr_t, src: hipDeviceptr_t, sizeBytes: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns a global pointer from a module.\n Returns in *dptr and *bytes the pointer and size of the global of name name located in module hmod.\n If no variable of that name exists, it returns hipErrorNotFound. Both parameters dptr and bytes are optional.\n If one of them is NULL, it is ignored and hipSuccess is returned.\n\n @param[out] dptr Returns global device pointer\n @param[out] bytes Returns global size in bytes\n @param[in] hmod Module to retrieve global from\n @param[in] name Name of global to retrieve\n\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotFound, #hipErrorInvalidContext\n"] pub fn hipModuleGetGlobal( dptr: *mut hipDeviceptr_t, bytes: *mut usize, hmod: hipModule_t, name: *const ::libc::c_char, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue\n"] pub fn hipGetSymbolAddress( devPtr: *mut *mut ::libc::c_void, symbol: *const ::libc::c_void, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue\n"] pub fn hipGetSymbolSize(size: *mut usize, symbol: *const ::libc::c_void) -> hipError_t; } extern "C" { #[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 detail usage, see the example at\n https://github.com/ROCm-Developer-Tools/HIP/blob/rocm-5.0.x/docs/markdown/hip_porting_guide.md\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 @return #hipSuccess, #hipErrorInvalidValue\n"] pub fn hipMemcpyToSymbol( symbol: *const ::libc::c_void, src: *const ::libc::c_void, sizeBytes: usize, offset: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue\n"] pub fn hipMemcpyToSymbolAsync( symbol: *const ::libc::c_void, src: *const ::libc::c_void, sizeBytes: usize, offset: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Copies data from the given symbol on the device.\n\n @param[out] dptr 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 @return #hipSuccess, #hipErrorInvalidValue\n"] pub fn hipMemcpyFromSymbol( dst: *mut ::libc::c_void, symbol: *const ::libc::c_void, sizeBytes: usize, offset: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[doc = " @brief Copies data from the given symbol on the device asynchronously.\n\n @param[out] dptr 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 @return #hipSuccess, #hipErrorInvalidValue\n"] pub fn hipMemcpyFromSymbolAsync( dst: *mut ::libc::c_void, symbol: *const ::libc::c_void, sizeBytes: usize, offset: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Copy data from src to dst asynchronously.\n\n @warning If host or dest 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 @warning on HCC hipMemcpyAsync does not support overlapped H2D and D2H copies.\n For hipMemcpy, 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 a\n attached to the device where the src data is physically located. For optimal peer-to-peer copies,\n the copy device must be able to access the src and dst pointers (by calling\n hipDeviceEnablePeerAccess with copy agent as the current device and src/dest as the peerDevice\n argument. if this is not done, the hipMemcpy will still work, but will perform the copy using a\n staging buffer on the 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 @param[in] accelerator_view Accelerator view which the copy is being enqueued\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree, #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"] pub fn hipMemcpyAsync( dst: *mut ::libc::c_void, src: *const ::libc::c_void, sizeBytes: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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] constant value to be set\n @param[in] sizeBytes Data size in bytes\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"] pub fn hipMemset( dst: *mut ::libc::c_void, value: ::libc::c_int, sizeBytes: usize, ) -> hipError_t; } extern "C" { #[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 ptr to be filled\n @param[in] constant value to be set\n @param[in] number of values to be set\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"] pub fn hipMemsetD8(dest: hipDeviceptr_t, value: ::libc::c_uchar, count: usize) -> hipError_t; } extern "C" { #[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] dst Data ptr to be filled\n @param[in] constant value to be set\n @param[in] number of values to be set\n @param[in] stream - Stream identifier\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"] pub fn hipMemsetD8Async( dest: hipDeviceptr_t, value: ::libc::c_uchar, count: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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] dst Data ptr to be filled\n @param[in] constant value to be set\n @param[in] number of values to be set\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"] pub fn hipMemsetD16(dest: hipDeviceptr_t, value: ::libc::c_ushort, count: usize) -> hipError_t; } extern "C" { #[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] dst Data ptr to be filled\n @param[in] constant value to be set\n @param[in] number of values to be set\n @param[in] stream - Stream identifier\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"] pub fn hipMemsetD16Async( dest: hipDeviceptr_t, value: ::libc::c_ushort, count: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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] dst Data being filled\n @param[in] constant value to be set\n @param[in] number of values to be set\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized"] pub fn hipMemsetD32(dest: hipDeviceptr_t, value: ::libc::c_int, count: usize) -> hipError_t; } extern "C" { #[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, #hipErrorMemoryFree"] pub fn hipMemsetAsync( dst: *mut ::libc::c_void, value: ::libc::c_int, sizeBytes: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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, #hipErrorMemoryFree"] pub fn hipMemsetD32Async( dst: hipDeviceptr_t, value: ::libc::c_int, count: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Fills the memory area pointed to by dst with the constant value.\n\n @param[out] dst Pointer to device memory\n @param[in] pitch - data size in bytes\n @param[in] value - constant value to be set\n @param[in] width\n @param[in] height\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree"] pub fn hipMemset2D( dst: *mut ::libc::c_void, pitch: usize, value: ::libc::c_int, width: usize, height: usize, ) -> hipError_t; } extern "C" { #[doc = " @brief Fills asynchronously the memory area pointed to by dst with the constant value.\n\n @param[in] dst Pointer to device memory\n @param[in] pitch - data size in bytes\n @param[in] value - constant value to be set\n @param[in] width\n @param[in] height\n @param[in] stream\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree"] pub fn hipMemset2DAsync( dst: *mut ::libc::c_void, pitch: usize, value: ::libc::c_int, width: usize, height: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Fills synchronously the memory area pointed to by pitchedDevPtr with the constant value.\n\n @param[in] pitchedDevPtr\n @param[in] value - constant value to be set\n @param[in] extent\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree"] pub fn hipMemset3D( pitchedDevPtr: hipPitchedPtr, value: ::libc::c_int, extent: hipExtent, ) -> hipError_t; } extern "C" { #[doc = " @brief Fills asynchronously the memory area pointed to by pitchedDevPtr with the constant value.\n\n @param[in] pitchedDevPtr\n @param[in] value - constant value to be set\n @param[in] extent\n @param[in] stream\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorMemoryFree"] pub fn hipMemset3DAsync( pitchedDevPtr: hipPitchedPtr, value: ::libc::c_int, extent: hipExtent, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Query memory info.\n Return snapshot of free memory, and total allocatable memory on the device.\n\n Returns in *free a snapshot of the current free memory.\n @returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue\n @warning On HCC, the free memory only accounts for memory allocated by this process and may be\noptimistic."] pub fn hipMemGetInfo(free: *mut usize, total: *mut usize) -> hipError_t; } extern "C" { pub fn hipMemPtrGetInfo(ptr: *mut ::libc::c_void, size: *mut usize) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorOutOfMemory\n\n @see hipMalloc, hipMallocPitch, hipFree, hipFreeArray, hipHostMalloc, hipHostFree"] pub fn hipMallocArray( array: *mut *mut hipArray, desc: *const hipChannelFormatDesc, width: usize, height: usize, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { pub fn hipArrayCreate( pHandle: *mut *mut hipArray, pAllocateArray: *const HIP_ARRAY_DESCRIPTOR, ) -> hipError_t; } extern "C" { pub fn hipArrayDestroy(array: *mut hipArray) -> hipError_t; } extern "C" { pub fn hipArray3DCreate( array: *mut *mut hipArray, pAllocateArray: *const HIP_ARRAY3D_DESCRIPTOR, ) -> hipError_t; } extern "C" { pub fn hipMalloc3D(pitchedDevPtr: *mut hipPitchedPtr, extent: hipExtent) -> hipError_t; } extern "C" { #[doc = " @brief Frees an array on the device.\n\n @param[in] array Pointer to array to free\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorNotInitialized\n\n @see hipMalloc, hipMallocPitch, hipFree, hipMallocArray, hipHostMalloc, hipHostFree"] pub fn hipFreeArray(array: *mut hipArray) -> hipError_t; } extern "C" { #[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"] pub fn hipFreeMipmappedArray(mipmappedArray: hipMipmappedArray_t) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorOutOfMemory\n\n @see hipMalloc, hipMallocPitch, hipFree, hipFreeArray, hipHostMalloc, hipHostFree"] pub fn hipMalloc3DArray( array: *mut *mut hipArray, desc: *const hipChannelFormatDesc, extent: hipExtent, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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"] pub fn hipMallocMipmappedArray( mipmappedArray: *mut hipMipmappedArray_t, desc: *const hipChannelFormatDesc, extent: hipExtent, numLevels: ::libc::c_uint, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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"] pub fn hipGetMipmappedArrayLevel( levelArray: *mut hipArray_t, mipmappedArray: hipMipmappedArray_const_t, level: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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] 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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpy2D( dst: *mut ::libc::c_void, dpitch: usize, src: *const ::libc::c_void, spitch: usize, width: usize, height: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[doc = " @brief Copies memory for 2D arrays.\n @param[in] pCopy Parameters for the memory copy\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2D, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray,\n hipMemcpyToSymbol, hipMemcpyAsync"] pub fn hipMemcpyParam2D(pCopy: *const hip_Memcpy2D) -> hipError_t; } extern "C" { #[doc = " @brief Copies memory for 2D arrays.\n @param[in] pCopy Parameters for the memory copy\n @param[in] stream Stream to use\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2D, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray,\n hipMemcpyToSymbol, hipMemcpyAsync"] pub fn hipMemcpyParam2DAsync(pCopy: *const hip_Memcpy2D, stream: hipStream_t) -> hipError_t; } extern "C" { #[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] 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 Stream to use\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2DToArray, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpy2DAsync( dst: *mut ::libc::c_void, dpitch: usize, src: *const ::libc::c_void, spitch: usize, width: usize, height: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpy2DToArray( dst: *mut hipArray, wOffset: usize, hOffset: usize, src: *const ::libc::c_void, spitch: usize, width: usize, height: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpyToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpy2DToArrayAsync( dst: *mut hipArray, wOffset: usize, hOffset: usize, src: *const ::libc::c_void, spitch: usize, width: usize, height: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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] count size in bytes to copy\n @param[in] kind Type of transfer\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpyToArray( dst: *mut hipArray, wOffset: usize, hOffset: usize, src: *const ::libc::c_void, count: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[doc = " @brief Copies data between host and device.\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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpyFromArray( dst: *mut ::libc::c_void, srcArray: hipArray_const_t, wOffset: usize, hOffset: usize, count: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpy2DFromArray( dst: *mut ::libc::c_void, dpitch: usize, src: hipArray_const_t, wOffset: usize, hOffset: usize, width: usize, height: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpy2DFromArrayAsync( dst: *mut ::libc::c_void, dpitch: usize, src: hipArray_const_t, wOffset: usize, hOffset: usize, width: usize, height: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpyAtoH( dst: *mut ::libc::c_void, srcArray: *mut hipArray, srcOffset: usize, count: usize, ) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpyHtoA( dstArray: *mut hipArray, dstOffset: usize, srcHost: *const ::libc::c_void, count: usize, ) -> hipError_t; } extern "C" { #[doc = " @brief Copies data between host and device.\n\n @param[in] p 3D memory copy parameters\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpy3D(p: *const hipMemcpy3DParms) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipMemcpy3DAsync(p: *const hipMemcpy3DParms, stream: hipStream_t) -> hipError_t; } extern "C" { #[doc = " @brief Copies data between host and device.\n\n @param[in] pCopy 3D memory copy parameters\n @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipDrvMemcpy3D(pCopy: *const HIP_MEMCPY3D) -> hipError_t; } extern "C" { #[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 @return #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidPitchValue,\n #hipErrorInvalidDevicePointer, #hipErrorInvalidMemcpyDirection\n\n @see hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol,\n hipMemcpyAsync"] pub fn hipDrvMemcpy3DAsync(pCopy: *const HIP_MEMCPY3D, stream: hipStream_t) -> hipError_t; } extern "C" { #[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup PeerToPeer PeerToPeer Device Memory Access\n @{\n @warning PeerToPeer support is experimental.\n This section describes the PeerToPeer device memory access functions of HIP runtime API.\n/\n/**\n @brief Determine if a device can access a peer's memory.\n\n @param [out] canAccessPeer Returns the peer access capability (0 or 1)\n @param [in] device - device from where memory may be accessed.\n @param [in] peerDevice - device where memory is physically located\n\n Returns \"1\" in @p canAccessPeer if the specified @p device is capable\n of directly accessing memory physically located on peerDevice , or \"0\" if not.\n\n Returns \"0\" in @p canAccessPeer if deviceId == peerDeviceId, and both are valid devices : a\n device is not a peer of itself.\n\n @returns #hipSuccess,\n @returns #hipErrorInvalidDevice if deviceId or peerDeviceId are not valid devices"] pub fn hipDeviceCanAccessPeer( canAccessPeer: *mut ::libc::c_int, deviceId: ::libc::c_int, peerDeviceId: ::libc::c_int, ) -> hipError_t; } extern "C" { #[doc = " @brief Enable direct access from current device's virtual address space to memory allocations\n physically located on a peer device.\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] peerDeviceId\n @param [in] flags\n\n Returns #hipSuccess, #hipErrorInvalidDevice, #hipErrorInvalidValue,\n @returns #hipErrorPeerAccessAlreadyEnabled if peer access is already enabled for this device."] pub fn hipDeviceEnablePeerAccess( peerDeviceId: ::libc::c_int, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @brief Disable direct access from current device's virtual address space to memory allocations\n physically located on a peer device.\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] peerDeviceId\n\n @returns #hipSuccess, #hipErrorPeerAccessNotEnabled"] pub fn hipDeviceDisablePeerAccess(peerDeviceId: ::libc::c_int) -> hipError_t; } extern "C" { #[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, #hipErrorInvalidDevicePointer\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"] pub fn hipMemGetAddressRange( pbase: *mut hipDeviceptr_t, psize: *mut usize, dptr: hipDeviceptr_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Copies memory from one device to memory on another device.\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"] pub fn hipMemcpyPeer( dst: *mut ::libc::c_void, dstDeviceId: ::libc::c_int, src: *const ::libc::c_void, srcDeviceId: ::libc::c_int, sizeBytes: usize, ) -> hipError_t; } extern "C" { #[doc = " @brief Copies memory from one device to memory on another device.\n\n @param [out] dst - Destination device pointer.\n @param [in] dstDevice - 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"] pub fn hipMemcpyPeerAsync( dst: *mut ::libc::c_void, dstDeviceId: ::libc::c_int, src: *const ::libc::c_void, srcDevice: ::libc::c_int, sizeBytes: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @}\n/\n/**\n-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup Context Context Management\n @{\n This section describes the context management functions of HIP runtime API.\n/\n/**\n\n @addtogroup ContextD Context Management [Deprecated]\n @{\n @ingroup Context\n This section describes the deprecated context management functions of HIP runtime API.\n/\n/**\n @brief Create a context and set it as current/ default context\n\n @param [out] ctx\n @param [in] flags\n @param [in] associated device handle\n\n @return #hipSuccess\n\n @see hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxPushCurrent,\n hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"] pub fn hipCtxCreate( ctx: *mut hipCtx_t, flags: ::libc::c_uint, device: hipDevice_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Destroy a HIP context.\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"] pub fn hipCtxDestroy(ctx: hipCtx_t) -> hipError_t; } extern "C" { #[doc = " @brief Pop the current/default context and return the popped context.\n\n @param [out] ctx\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxSetCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"] pub fn hipCtxPopCurrent(ctx: *mut hipCtx_t) -> hipError_t; } extern "C" { #[doc = " @brief Push the context to be set as current/ default context\n\n @param [in] ctx\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice"] pub fn hipCtxPushCurrent(ctx: hipCtx_t) -> hipError_t; } extern "C" { #[doc = " @brief Set the passed context as current/default\n\n @param [in] ctx\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize , hipCtxGetDevice"] pub fn hipCtxSetCurrent(ctx: hipCtx_t) -> hipError_t; } extern "C" { #[doc = " @brief Get the handle of the current/ default context\n\n @param [out] ctx\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetDevice, hipCtxGetFlags, hipCtxPopCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"] pub fn hipCtxGetCurrent(ctx: *mut hipCtx_t) -> hipError_t; } extern "C" { #[doc = " @brief Get the handle of the device associated with current/default context\n\n @param [out] device\n\n @returns #hipSuccess, #hipErrorInvalidContext\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize"] pub fn hipCtxGetDevice(device: *mut hipDevice_t) -> hipError_t; } extern "C" { #[doc = " @brief Returns the approximate HIP api version.\n\n @param [in] ctx Context to check\n @param [out] apiVersion\n\n @return #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"] pub fn hipCtxGetApiVersion(ctx: hipCtx_t, apiVersion: *mut ::libc::c_int) -> hipError_t; } extern "C" { #[doc = " @brief Set Cache configuration for a specific function\n\n @param [out] cacheConfiguration\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"] pub fn hipCtxGetCacheConfig(cacheConfig: *mut hipFuncCache_t) -> hipError_t; } extern "C" { #[doc = " @brief Set L1/Shared cache partition.\n\n @param [in] cacheConfiguration\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"] pub fn hipCtxSetCacheConfig(cacheConfig: hipFuncCache_t) -> hipError_t; } extern "C" { #[doc = " @brief Set Shared memory bank configuration.\n\n @param [in] sharedMemoryConfiguration\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"] pub fn hipCtxSetSharedMemConfig(config: hipSharedMemConfig) -> hipError_t; } extern "C" { #[doc = " @brief Get Shared memory bank configuration.\n\n @param [out] sharedMemoryConfiguration\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"] pub fn hipCtxGetSharedMemConfig(pConfig: *mut hipSharedMemConfig) -> hipError_t; } extern "C" { #[doc = " @brief Blocks until the default context has completed all preceding requested tasks.\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"] pub fn hipCtxSynchronize() -> hipError_t; } extern "C" { #[doc = " @brief Return flags used for creating default context.\n\n @param [out] flags\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxPopCurrent, hipCtxGetCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"] pub fn hipCtxGetFlags(flags: *mut ::libc::c_uint) -> hipError_t; } extern "C" { #[doc = " @brief Enables direct access to memory allocations in a peer context.\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\n @param [in] flags\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."] pub fn hipCtxEnablePeerAccess(peerCtx: hipCtx_t, flags: ::libc::c_uint) -> hipError_t; } extern "C" { #[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.\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\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."] pub fn hipCtxDisablePeerAccess(peerCtx: hipCtx_t) -> hipError_t; } extern "C" { #[doc = " @}\n/\n/**\n @brief Get the state of the primary context.\n\n @param [in] Device to get primary context flags for\n @param [out] Pointer to store flags\n @param [out] 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"] pub fn hipDevicePrimaryCtxGetState( dev: hipDevice_t, flags: *mut ::libc::c_uint, active: *mut ::libc::c_int, ) -> hipError_t; } extern "C" { #[doc = " @brief Release the primary context on the GPU.\n\n @param [in] 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 @warning This function return #hipSuccess though doesn't release the primaryCtx by design on\n HIP/HCC path."] pub fn hipDevicePrimaryCtxRelease(dev: hipDevice_t) -> hipError_t; } extern "C" { #[doc = " @brief Retain the primary context on the GPU.\n\n @param [out] Returned context handle of the new context\n @param [in] Device which primary context is released\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"] pub fn hipDevicePrimaryCtxRetain(pctx: *mut hipCtx_t, dev: hipDevice_t) -> hipError_t; } extern "C" { #[doc = " @brief Resets the primary context on the GPU.\n\n @param [in] Device which primary context is reset\n\n @returns #hipSuccess\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"] pub fn hipDevicePrimaryCtxReset(dev: hipDevice_t) -> hipError_t; } extern "C" { #[doc = " @brief Set flags for the primary context.\n\n @param [in] Device for which the primary context flags are set\n @param [in] New flags for the device\n\n @returns #hipSuccess, #hipErrorContextAlreadyInUse\n\n @see hipCtxCreate, hipCtxDestroy, hipCtxGetFlags, hipCtxPopCurrent, hipCtxGetCurrent,\n hipCtxSetCurrent, hipCtxPushCurrent, hipCtxSetCacheConfig, hipCtxSynchronize, hipCtxGetDevice"] pub fn hipDevicePrimaryCtxSetFlags(dev: hipDevice_t, flags: ::libc::c_uint) -> hipError_t; } extern "C" { #[doc = " @}\n/\n/**\n\n @defgroup Module Module Management\n @{\n This section describes the module management functions of HIP runtime API.\n\n/\n/**\n @brief Loads code object from file into a hipModule_t\n\n @param [in] fname\n @param [out] 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\n"] pub fn hipModuleLoad(module: *mut hipModule_t, fname: *const ::libc::c_char) -> hipError_t; } extern "C" { #[doc = " @brief Frees the module\n\n @param [in] module\n\n @returns hipSuccess, hipInvalidValue\n module is freed and the code objects associated with it are destroyed\n"] pub fn hipModuleUnload(module: hipModule_t) -> hipError_t; } extern "C" { #[doc = " @brief Function with kname will be extracted if present in module\n\n @param [in] module\n @param [in] kname\n @param [out] function\n\n @returns hipSuccess, hipErrorInvalidValue, hipErrorInvalidContext, hipErrorNotInitialized,\n hipErrorNotFound,"] pub fn hipModuleGetFunction( function: *mut hipFunction_t, module: hipModule_t, kname: *const ::libc::c_char, ) -> hipError_t; } extern "C" { #[doc = " @brief Find out attributes for a given function.\n\n @param [out] attr\n @param [in] func\n\n @returns hipSuccess, hipErrorInvalidValue, hipErrorInvalidDeviceFunction"] pub fn hipFuncGetAttributes( attr: *mut hipFuncAttributes, func: *const ::libc::c_void, ) -> hipError_t; } extern "C" { #[doc = " @brief Find out a specific attribute for a given function.\n\n @param [out] value\n @param [in] attrib\n @param [in] hfunc\n\n @returns hipSuccess, hipErrorInvalidValue, hipErrorInvalidDeviceFunction"] pub fn hipFuncGetAttribute( value: *mut ::libc::c_int, attrib: hipFunction_attribute, hfunc: hipFunction_t, ) -> hipError_t; } extern "C" { #[doc = " @brief returns the handle of the texture reference with the name from the module.\n\n @param [in] hmod\n @param [in] name\n @param [out] texRef\n\n @returns hipSuccess, hipErrorNotInitialized, hipErrorNotFound, hipErrorInvalidValue"] pub fn hipModuleGetTexRef( texRef: *mut *mut textureReference, hmod: hipModule_t, name: *const ::libc::c_char, ) -> hipError_t; } extern "C" { #[doc = " @brief builds module from code object which resides in host memory. Image is pointer to that\n location.\n\n @param [in] image\n @param [out] module\n\n @returns hipSuccess, hipErrorNotInitialized, hipErrorOutOfMemory, hipErrorNotInitialized"] pub fn hipModuleLoadData(module: *mut hipModule_t, image: *const ::libc::c_void) -> hipError_t; } extern "C" { #[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\n @param [out] module\n @param [in] number of options\n @param [in] options for JIT\n @param [in] option values for JIT\n\n @returns hipSuccess, hipErrorNotInitialized, hipErrorOutOfMemory, hipErrorNotInitialized"] pub fn hipModuleLoadDataEx( module: *mut hipModule_t, image: *const ::libc::c_void, numOptions: ::libc::c_uint, options: *mut hipJitOption, optionValues: *mut *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[doc = " @brief launches kernel f with launch parameters and shared memory on stream with arguments passed\n to kernelparams or extra\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 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\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\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, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue\n\n @warning kernellParams argument is not yet implemented in HIP. Please use extra instead. Please\n refer to hip_porting_driver_api.md for sample usage."] pub fn hipModuleLaunchKernel( f: hipFunction_t, gridDimX: ::libc::c_uint, gridDimY: ::libc::c_uint, gridDimZ: ::libc::c_uint, blockDimX: ::libc::c_uint, blockDimY: ::libc::c_uint, blockDimZ: ::libc::c_uint, sharedMemBytes: ::libc::c_uint, stream: hipStream_t, kernelParams: *mut *mut ::libc::c_void, extra: *mut *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[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] blockDim Block dimensions specified in work-items\n @param [in] kernelParams A list of kernel arguments\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 gridDim x blockDim >= 2^32.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue, hipErrorCooperativeLaunchTooLarge"] pub fn hipLaunchCooperativeKernel( f: *const ::libc::c_void, gridDim: dim3, blockDimX: dim3, kernelParams: *mut *mut ::libc::c_void, sharedMemBytes: ::libc::c_uint, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue, hipErrorCooperativeLaunchTooLarge"] pub fn hipLaunchCooperativeKernelMultiDevice( launchParamsList: *mut hipLaunchParams, numDevices: ::libc::c_int, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @brief Launches kernels on multiple devices and guarantees all specified kernels are dispatched\n on respective streams before enqueuing any other work on the specified streams from any other threads\n\n\n @param [in] hipLaunchParams 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, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue"] pub fn hipExtLaunchMultiKernelMultiDevice( launchParamsList: *mut hipLaunchParams, numDevices: ::libc::c_int, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @}\n/\n/**\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, hipInvalidDevice, hipErrorInvalidValue"] pub fn hipModuleOccupancyMaxPotentialBlockSize( gridSize: *mut ::libc::c_int, blockSize: *mut ::libc::c_int, f: hipFunction_t, dynSharedMemPerBlk: usize, blockSizeLimit: ::libc::c_int, ) -> hipError_t; } extern "C" { #[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, hipInvalidDevice, hipErrorInvalidValue"] pub fn hipModuleOccupancyMaxPotentialBlockSizeWithFlags( gridSize: *mut ::libc::c_int, blockSize: *mut ::libc::c_int, f: hipFunction_t, dynSharedMemPerBlk: usize, blockSizeLimit: ::libc::c_int, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns occupancy for a device function.\n\n @param [out] numBlocks Returned occupancy\n @param [in] func 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"] pub fn hipModuleOccupancyMaxActiveBlocksPerMultiprocessor( numBlocks: *mut ::libc::c_int, f: hipFunction_t, blockSize: ::libc::c_int, dynSharedMemPerBlk: usize, ) -> hipError_t; } extern "C" { #[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)"] pub fn hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags( numBlocks: *mut ::libc::c_int, f: hipFunction_t, blockSize: ::libc::c_int, dynSharedMemPerBlk: usize, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns occupancy for a device function.\n\n @param [out] numBlocks Returned occupancy\n @param [in] func 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"] pub fn hipOccupancyMaxActiveBlocksPerMultiprocessor( numBlocks: *mut ::libc::c_int, f: *const ::libc::c_void, blockSize: ::libc::c_int, dynSharedMemPerBlk: usize, ) -> hipError_t; } extern "C" { #[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)"] pub fn hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags( numBlocks: *mut ::libc::c_int, f: *const ::libc::c_void, blockSize: ::libc::c_int, dynSharedMemPerBlk: usize, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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, hipInvalidDevice, hipErrorInvalidValue"] pub fn hipOccupancyMaxPotentialBlockSize( gridSize: *mut ::libc::c_int, blockSize: *mut ::libc::c_int, f: *const ::libc::c_void, dynSharedMemPerBlk: usize, blockSizeLimit: ::libc::c_int, ) -> hipError_t; } extern "C" { #[doc = " @brief Start recording of profiling information\n When using this API, start the profiler with profiling disabled. (--startdisabled)\n @warning : hipProfilerStart API is under development."] pub fn hipProfilerStart() -> hipError_t; } extern "C" { #[doc = " @brief Stop recording of profiling information.\n When using this API, start the profiler with profiling disabled. (--startdisabled)\n @warning : hipProfilerStop API is under development."] pub fn hipProfilerStop() -> hipError_t; } extern "C" { #[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, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue\n"] pub fn hipConfigureCall( gridDim: dim3, blockDim: dim3, sharedMem: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Set a kernel argument.\n\n @returns hipSuccess, hipInvalidDevice, 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"] pub fn hipSetupArgument(arg: *const ::libc::c_void, size: usize, offset: usize) -> hipError_t; } extern "C" { #[doc = " @brief Launch a kernel.\n\n @param [in] func Kernel to launch.\n\n @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue\n"] pub fn hipLaunchByPtr(func: *const ::libc::c_void) -> hipError_t; } extern "C" { #[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, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue\n"] pub fn __hipPushCallConfiguration( gridDim: dim3, blockDim: dim3, sharedMem: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[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, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue\n"] pub fn __hipPopCallConfiguration( gridDim: *mut dim3, blockDim: *mut dim3, sharedMem: *mut usize, stream: *mut hipStream_t, ) -> hipError_t; } extern "C" { #[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 - kernel arguments\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, hipInvalidDevice\n"] pub fn hipLaunchKernel( function_address: *const ::libc::c_void, numBlocks: dim3, dimBlocks: dim3, args: *mut *mut ::libc::c_void, sharedMemBytes: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Enqueues a host function call in a stream.\n\n @param [in] stream - stream to enqueue work to.\n @param [in] fn - function to call once operations enqueued preceeding are complete.\n @param [in] userData - User-specified data to be passed to the function.\n @returns #hipSuccess, #hipErrorInvalidResourceHandle, #hipErrorInvalidValue,\n #hipErrorNotSupported\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."] pub fn hipLaunchHostFunc( stream: hipStream_t, fn_: hipHostFn_t, userData: *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[doc = " Copies memory for 2D arrays.\n\n @param pCopy - Parameters for the memory copy\n\n @returns #hipSuccess, #hipErrorInvalidValue"] pub fn hipDrvMemcpy2DUnaligned(pCopy: *const hip_Memcpy2D) -> hipError_t; } extern "C" { #[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 to kernel arguments.\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 @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 May be 0, in which case the default stream is used with associated synchronization rules.\n @param [in] flags. The value of hipExtAnyOrderLaunch, signifies if kernel can be\n launched in any order.\n @returns hipSuccess, hipInvalidDevice, hipErrorNotInitialized, hipErrorInvalidValue.\n"] pub fn hipExtLaunchKernel( function_address: *const ::libc::c_void, numBlocks: dim3, dimBlocks: dim3, args: *mut *mut ::libc::c_void, sharedMemBytes: usize, stream: hipStream_t, startEvent: hipEvent_t, stopEvent: hipEvent_t, flags: ::libc::c_int, ) -> hipError_t; } extern "C" { #[doc = " @brief Binds a mipmapped array to a texture.\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"] pub fn hipBindTextureToMipmappedArray( tex: *const textureReference, mipmappedArray: hipMipmappedArray_const_t, desc: *const hipChannelFormatDesc, ) -> hipError_t; } extern "C" { #[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 liner filter isn't supported on GFX90A boards, on which the API @p hipCreateTextureObject will\n return hipErrorNotSupported.\n"] pub fn hipCreateTextureObject( pTexObject: *mut hipTextureObject_t, pResDesc: *const hipResourceDesc, pTexDesc: *const hipTextureDesc, pResViewDesc: *const hipResourceViewDesc, ) -> hipError_t; } extern "C" { #[doc = " @brief Destroys a texture object.\n\n @param [in] textureObject texture object to destroy\n\n @returns hipSuccess, hipErrorInvalidValue\n"] pub fn hipDestroyTextureObject(textureObject: hipTextureObject_t) -> hipError_t; } extern "C" { #[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"] pub fn hipGetChannelDesc( desc: *mut hipChannelFormatDesc, array: hipArray_const_t, ) -> hipError_t; } extern "C" { #[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"] pub fn hipGetTextureObjectResourceDesc( pResDesc: *mut hipResourceDesc, textureObject: hipTextureObject_t, ) -> hipError_t; } extern "C" { #[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"] pub fn hipGetTextureObjectResourceViewDesc( pResViewDesc: *mut hipResourceViewDesc, textureObject: hipTextureObject_t, ) -> hipError_t; } extern "C" { #[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"] pub fn hipGetTextureObjectTextureDesc( pTexDesc: *mut hipTextureDesc, textureObject: hipTextureObject_t, ) -> hipError_t; } extern "C" { #[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"] pub fn hipTexObjectCreate( pTexObject: *mut hipTextureObject_t, pResDesc: *const HIP_RESOURCE_DESC, pTexDesc: *const HIP_TEXTURE_DESC, pResViewDesc: *const HIP_RESOURCE_VIEW_DESC, ) -> hipError_t; } extern "C" { #[doc = " @brief Destroys a texture object.\n\n @param [in] texObject texture object to destroy\n\n @returns hipSuccess, hipErrorInvalidValue\n"] pub fn hipTexObjectDestroy(texObject: hipTextureObject_t) -> hipError_t; } extern "C" { #[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"] pub fn hipTexObjectGetResourceDesc( pResDesc: *mut HIP_RESOURCE_DESC, texObject: hipTextureObject_t, ) -> hipError_t; } extern "C" { #[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"] pub fn hipTexObjectGetResourceViewDesc( pResViewDesc: *mut HIP_RESOURCE_VIEW_DESC, texObject: hipTextureObject_t, ) -> hipError_t; } extern "C" { #[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"] pub fn hipTexObjectGetTextureDesc( pTexDesc: *mut HIP_TEXTURE_DESC, texObject: hipTextureObject_t, ) -> hipError_t; } extern "C" { #[doc = " @addtogroup TextureD Texture Management [Deprecated]\n @{\n @ingroup Texture\n This section describes the deprecated texture management functions of HIP runtime API.\n/\n/**\n @brief Gets the texture reference related with the symbol.\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"] pub fn hipGetTextureReference( texref: *mut *const textureReference, symbol: *const ::libc::c_void, ) -> hipError_t; } extern "C" { pub fn hipTexRefSetAddressMode( texRef: *mut textureReference, dim: ::libc::c_int, am: hipTextureAddressMode, ) -> hipError_t; } extern "C" { pub fn hipTexRefSetArray( tex: *mut textureReference, array: hipArray_const_t, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { pub fn hipTexRefSetFilterMode( texRef: *mut textureReference, fm: hipTextureFilterMode, ) -> hipError_t; } extern "C" { pub fn hipTexRefSetFlags(texRef: *mut textureReference, Flags: ::libc::c_uint) -> hipError_t; } extern "C" { pub fn hipTexRefSetFormat( texRef: *mut textureReference, fmt: hipArray_Format, NumPackedComponents: ::libc::c_int, ) -> hipError_t; } extern "C" { pub fn hipBindTexture( offset: *mut usize, tex: *const textureReference, devPtr: *const ::libc::c_void, desc: *const hipChannelFormatDesc, size: usize, ) -> hipError_t; } extern "C" { pub fn hipBindTexture2D( offset: *mut usize, tex: *const textureReference, devPtr: *const ::libc::c_void, desc: *const hipChannelFormatDesc, width: usize, height: usize, pitch: usize, ) -> hipError_t; } extern "C" { pub fn hipBindTextureToArray( tex: *const textureReference, array: hipArray_const_t, desc: *const hipChannelFormatDesc, ) -> hipError_t; } extern "C" { pub fn hipGetTextureAlignmentOffset( offset: *mut usize, texref: *const textureReference, ) -> hipError_t; } extern "C" { pub fn hipUnbindTexture(tex: *const textureReference) -> hipError_t; } extern "C" { pub fn hipTexRefGetAddress( dev_ptr: *mut hipDeviceptr_t, texRef: *const textureReference, ) -> hipError_t; } extern "C" { pub fn hipTexRefGetAddressMode( pam: *mut hipTextureAddressMode, texRef: *const textureReference, dim: ::libc::c_int, ) -> hipError_t; } extern "C" { pub fn hipTexRefGetFilterMode( pfm: *mut hipTextureFilterMode, texRef: *const textureReference, ) -> hipError_t; } extern "C" { pub fn hipTexRefGetFlags( pFlags: *mut ::libc::c_uint, texRef: *const textureReference, ) -> hipError_t; } extern "C" { pub fn hipTexRefGetFormat( pFormat: *mut hipArray_Format, pNumChannels: *mut ::libc::c_int, texRef: *const textureReference, ) -> hipError_t; } extern "C" { pub fn hipTexRefGetMaxAnisotropy( pmaxAnsio: *mut ::libc::c_int, texRef: *const textureReference, ) -> hipError_t; } extern "C" { pub fn hipTexRefGetMipmapFilterMode( pfm: *mut hipTextureFilterMode, texRef: *const textureReference, ) -> hipError_t; } extern "C" { pub fn hipTexRefGetMipmapLevelBias( pbias: *mut f32, texRef: *const textureReference, ) -> hipError_t; } extern "C" { pub fn hipTexRefGetMipmapLevelClamp( pminMipmapLevelClamp: *mut f32, pmaxMipmapLevelClamp: *mut f32, texRef: *const textureReference, ) -> hipError_t; } extern "C" { pub fn hipTexRefGetMipMappedArray( pArray: *mut hipMipmappedArray_t, texRef: *const textureReference, ) -> hipError_t; } extern "C" { pub fn hipTexRefSetAddress( ByteOffset: *mut usize, texRef: *mut textureReference, dptr: hipDeviceptr_t, bytes: usize, ) -> hipError_t; } extern "C" { pub fn hipTexRefSetAddress2D( texRef: *mut textureReference, desc: *const HIP_ARRAY_DESCRIPTOR, dptr: hipDeviceptr_t, Pitch: usize, ) -> hipError_t; } extern "C" { pub fn hipTexRefSetMaxAnisotropy( texRef: *mut textureReference, maxAniso: ::libc::c_uint, ) -> hipError_t; } extern "C" { pub fn hipTexRefSetBorderColor( texRef: *mut textureReference, pBorderColor: *mut f32, ) -> hipError_t; } extern "C" { pub fn hipTexRefSetMipmapFilterMode( texRef: *mut textureReference, fm: hipTextureFilterMode, ) -> hipError_t; } extern "C" { pub fn hipTexRefSetMipmapLevelBias(texRef: *mut textureReference, bias: f32) -> hipError_t; } extern "C" { pub fn hipTexRefSetMipmapLevelClamp( texRef: *mut textureReference, minMipMapLevelClamp: f32, maxMipMapLevelClamp: f32, ) -> hipError_t; } extern "C" { pub fn hipTexRefSetMipmappedArray( texRef: *mut textureReference, mipmappedArray: *mut hipMipmappedArray, Flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @addtogroup TextureU Texture Management [Not supported]\n @{\n @ingroup Texture\n This section describes the texture management functions currently unsupported in HIP runtime."] pub fn hipMipmappedArrayCreate( pHandle: *mut hipMipmappedArray_t, pMipmappedArrayDesc: *mut HIP_ARRAY3D_DESCRIPTOR, numMipmapLevels: ::libc::c_uint, ) -> hipError_t; } extern "C" { pub fn hipMipmappedArrayDestroy(hMipmappedArray: hipMipmappedArray_t) -> hipError_t; } extern "C" { pub fn hipMipmappedArrayGetLevel( pLevelArray: *mut hipArray_t, hMipMappedArray: hipMipmappedArray_t, level: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[doc = " @defgroup Callback Callback Activity APIs\n @{\n This section describes the callback/Activity of HIP runtime API."] pub fn hipApiName(id: u32) -> *const ::libc::c_char; } extern "C" { pub fn hipKernelNameRef(f: hipFunction_t) -> *const ::libc::c_char; } extern "C" { pub fn hipKernelNameRefByPtr( hostFunction: *const ::libc::c_void, stream: hipStream_t, ) -> *const ::libc::c_char; } extern "C" { pub fn hipGetStreamDeviceId(stream: hipStream_t) -> ::libc::c_int; } extern "C" { #[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\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"] pub fn hipStreamBeginCapture(stream: hipStream_t, mode: hipStreamCaptureMode) -> hipError_t; } extern "C" { #[doc = " @brief Ends capture on a stream, returning the captured graph.\n\n @param [in] stream - Stream to end capture.\n @param [out] pGraph - returns the graph captured.\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"] pub fn hipStreamEndCapture(stream: hipStream_t, pGraph: *mut hipGraph_t) -> hipError_t; } extern "C" { #[doc = " @brief Get capture status of a stream.\n\n @param [in] stream - Stream under capture.\n @param [out] pCaptureStatus - returns current status of the capture.\n @param [out] pId - unique ID of the capture.\n\n @returns #hipSuccess, #hipErrorStreamCaptureImplicit\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"] pub fn hipStreamGetCaptureInfo( stream: hipStream_t, pCaptureStatus: *mut hipStreamCaptureStatus, pId: *mut ::libc::c_ulonglong, ) -> hipError_t; } extern "C" { #[doc = " @brief Get stream's capture state\n\n @param [in] stream - Stream under capture.\n @param [out] captureStatus_out - returns current status of the capture.\n @param [out] id_out - unique ID of the capture.\n @param [in] graph_out - returns the graph being captured into.\n @param [out] dependencies_out - returns pointer to an array of nodes.\n @param [out] numDependencies_out - returns size of the array returned in dependencies_out.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorStreamCaptureImplicit\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"] pub fn hipStreamGetCaptureInfo_v2( stream: hipStream_t, captureStatus_out: *mut hipStreamCaptureStatus, id_out: *mut ::libc::c_ulonglong, graph_out: *mut hipGraph_t, dependencies_out: *mut *const hipGraphNode_t, numDependencies_out: *mut usize, ) -> hipError_t; } extern "C" { #[doc = " @brief Get stream's capture state\n\n @param [in] stream - Stream under capture.\n @param [out] pCaptureStatus - returns current status of the capture.\n\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorStreamCaptureImplicit\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"] pub fn hipStreamIsCapturing( stream: hipStream_t, pCaptureStatus: *mut hipStreamCaptureStatus, ) -> hipError_t; } extern "C" { #[doc = " @brief Update the set of dependencies in a capturing stream\n\n @param [in] stream - Stream under capture.\n @param [in] dependencies - pointer to an array of nodes to Add/Replace.\n @param [in] numDependencies - size of the array in dependencies.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorIllegalState\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"] pub fn hipStreamUpdateCaptureDependencies( stream: hipStream_t, dependencies: *mut hipGraphNode_t, numDependencies: usize, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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\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"] pub fn hipThreadExchangeStreamCaptureMode(mode: *mut hipStreamCaptureMode) -> hipError_t; } extern "C" { #[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\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"] pub fn hipGraphCreate(pGraph: *mut hipGraph_t, flags: ::libc::c_uint) -> hipError_t; } extern "C" { #[doc = " @brief Destroys a graph\n\n @param [in] graph - instance of graph to destroy.\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"] pub fn hipGraphDestroy(graph: hipGraph_t) -> hipError_t; } extern "C" { #[doc = " @brief Adds dependency edges to a graph.\n\n @param [in] graph - instance of the graph to add dependencies.\n @param [in] from - pointer to the graph nodes with dependenties to add from.\n @param [in] to - pointer to the graph nodes to add dependenties to.\n @param [in] numDependencies - the number of dependencies to add.\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"] pub fn hipGraphAddDependencies( graph: hipGraph_t, from: *const hipGraphNode_t, to: *const hipGraphNode_t, numDependencies: usize, ) -> hipError_t; } extern "C" { #[doc = " @brief Removes dependency edges from a graph.\n\n @param [in] graph - instance of the graph to remove dependencies.\n @param [in] from - Array of nodes that provide the dependencies.\n @param [in] to - Array of dependent nodes.\n @param [in] numDependencies - the number of dependencies to remove.\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"] pub fn hipGraphRemoveDependencies( graph: hipGraph_t, from: *const hipGraphNode_t, to: *const hipGraphNode_t, numDependencies: usize, ) -> hipError_t; } extern "C" { #[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 @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"] pub fn hipGraphGetEdges( graph: hipGraph_t, from: *mut hipGraphNode_t, to: *mut hipGraphNode_t, numEdges: *mut usize, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns graph nodes.\n\n @param [in] graph - instance of graph to get the nodes.\n @param [out] nodes - pointer to return the graph nodes.\n @param [out] numNodes - returns 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 @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"] pub fn hipGraphGetNodes( graph: hipGraph_t, nodes: *mut hipGraphNode_t, numNodes: *mut usize, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns graph's root nodes.\n\n @param [in] graph - instance of the graph to get the nodes.\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 @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"] pub fn hipGraphGetRootNodes( graph: hipGraph_t, pRootNodes: *mut hipGraphNode_t, pNumRootNodes: *mut usize, ) -> hipError_t; } extern "C" { #[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 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 @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"] pub fn hipGraphNodeGetDependencies( node: hipGraphNode_t, pDependencies: *mut hipGraphNode_t, pNumDependencies: *mut usize, ) -> hipError_t; } extern "C" { #[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 DependentNodes may be NULL, in which case this function will return the number of dependent nodes\n in pNumDependentNodes. Otherwise, pNumDependentNodes entries will be filled in. If\n pNumDependentNodes is higher than the actual number of dependent nodes, the remaining entries in\n pDependentNodes will be set to NULL, and the number of nodes actually obtained will be returned\n in pNumDependentNodes.\n @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"] pub fn hipGraphNodeGetDependentNodes( node: hipGraphNode_t, pDependentNodes: *mut hipGraphNode_t, pNumDependentNodes: *mut usize, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns a node's type.\n\n @param [in] node - instance of the graph to add dependencies.\n @param [out] pType - pointer to the return the type\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"] pub fn hipGraphNodeGetType(node: hipGraphNode_t, pType: *mut hipGraphNodeType) -> hipError_t; } extern "C" { #[doc = " @brief Remove a node from the graph.\n\n @param [in] node - graph node to remove\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"] pub fn hipGraphDestroyNode(node: hipGraphNode_t) -> hipError_t; } extern "C" { #[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\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"] pub fn hipGraphClone(pGraphClone: *mut hipGraph_t, originalGraph: hipGraph_t) -> hipError_t; } extern "C" { #[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\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"] pub fn hipGraphNodeFindInClone( pNode: *mut hipGraphNode_t, originalNode: hipGraphNode_t, clonedGraph: hipGraph_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates an executable graph from a graph\n\n @param [out] pGraphExec - pointer to instantiated executable graph that is created.\n @param [in] graph - instance of graph to instantiate.\n @param [out] pErrorNode - pointer to error node in case error occured in graph instantiation,\n it could modify the correponding node.\n @param [out] pLogBuffer - pointer to log buffer.\n @param [out] bufferSize - the size of log buffer.\n\n @returns #hipSuccess, #hipErrorOutOfMemory\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"] pub fn hipGraphInstantiate( pGraphExec: *mut hipGraphExec_t, graph: hipGraph_t, pErrorNode: *mut hipGraphNode_t, pLogBuffer: *mut ::libc::c_char, bufferSize: usize, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates an executable graph from a graph.\n\n @param [out] pGraphExec - pointer to instantiated executable graph that is created.\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 is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues.\n"] pub fn hipGraphInstantiateWithFlags( pGraphExec: *mut hipGraphExec_t, graph: hipGraph_t, flags: ::libc::c_ulonglong, ) -> hipError_t; } extern "C" { #[doc = " @brief launches an executable graph in a 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\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."] pub fn hipGraphLaunch(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t; } extern "C" { #[doc = " @brief uploads an executable graph in a 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\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."] pub fn hipGraphUpload(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t; } extern "C" { #[doc = " @brief Destroys an executable graph\n\n @param [in] pGraphExec - instance of executable graph to destry.\n\n @returns #hipSuccess.\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."] pub fn hipGraphExecDestroy(graphExec: hipGraphExec_t) -> hipError_t; } extern "C" { #[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 - Whether the graph update was permitted.\n @returns #hipSuccess, #hipErrorGraphExecUpdateFailure\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."] pub fn hipGraphExecUpdate( hGraphExec: hipGraphExec_t, hGraph: hipGraph_t, hErrorNode_out: *mut hipGraphNode_t, updateResult_out: *mut hipGraphExecUpdateResult, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates a kernel execution node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to graph node to create.\n @param [in] graph - instance of graph to add the created node.\n @param [in] pDependencies - pointer to the dependencies on the kernel execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] pNodeParams - pointer to the parameters to the kernel execution node on the GPU.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorInvalidDeviceFunction\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."] pub fn hipGraphAddKernelNode( pGraphNode: *mut hipGraphNode_t, graph: hipGraph_t, pDependencies: *const hipGraphNode_t, numDependencies: usize, pNodeParams: *const hipKernelNodeParams, ) -> hipError_t; } extern "C" { #[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 @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."] pub fn hipGraphKernelNodeGetParams( node: hipGraphNode_t, pNodeParams: *mut hipKernelNodeParams, ) -> hipError_t; } extern "C" { #[doc = " @brief Sets a kernel 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 @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."] pub fn hipGraphKernelNodeSetParams( node: hipGraphNode_t, pNodeParams: *const hipKernelNodeParams, ) -> hipError_t; } extern "C" { #[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 to.\n @param [in] pNodeParams - const pointer to the kernel node parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphExecKernelNodeSetParams( hGraphExec: hipGraphExec_t, node: hipGraphNode_t, pNodeParams: *const hipKernelNodeParams, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates a memcpy node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to graph node to create.\n @param [in] graph - instance of graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memcpy execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] pCopyParams - const pointer to the parameters for the memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphAddMemcpyNode( pGraphNode: *mut hipGraphNode_t, graph: hipGraph_t, pDependencies: *const hipGraphNode_t, numDependencies: usize, pCopyParams: *const hipMemcpy3DParms, ) -> hipError_t; } extern "C" { #[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 @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."] pub fn hipGraphMemcpyNodeGetParams( node: hipGraphNode_t, pNodeParams: *mut hipMemcpy3DParms, ) -> hipError_t; } extern "C" { #[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 @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."] pub fn hipGraphMemcpyNodeSetParams( node: hipGraphNode_t, pNodeParams: *const hipMemcpy3DParms, ) -> hipError_t; } extern "C" { #[doc = " @brief Sets a node attribute.\n\n @param [in] hNode - instance of the node to set parameters to.\n @param [in] attr - the attribute node is set to.\n @param [in] value - const pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphKernelNodeSetAttribute( hNode: hipGraphNode_t, attr: hipKernelNodeAttrID, value: *const hipKernelNodeAttrValue, ) -> hipError_t; } extern "C" { #[doc = " @brief Gets a node attribute.\n\n @param [in] hNode - instance of the node to set parameters to.\n @param [in] attr - the attribute node is set to.\n @param [in] value - const pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphKernelNodeGetAttribute( hNode: hipGraphNode_t, attr: hipKernelNodeAttrID, value: *mut hipKernelNodeAttrValue, ) -> hipError_t; } extern "C" { #[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] node - instance of the node to set parameters to.\n @param [in] pNodeParams - const pointer to the kernel node parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphExecMemcpyNodeSetParams( hGraphExec: hipGraphExec_t, node: hipGraphNode_t, pNodeParams: *mut hipMemcpy3DParms, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates a 1D memcpy node and adds it to a graph.\n\n @param [out] pGraphNode - pointer to graph node to create.\n @param [in] graph - instance of graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memcpy execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] src - pointer to memory address to the source.\n @param [in] count - the size of the memory to copy.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphAddMemcpyNode1D( pGraphNode: *mut hipGraphNode_t, graph: hipGraph_t, pDependencies: *const hipGraphNode_t, numDependencies: usize, dst: *mut ::libc::c_void, src: *const ::libc::c_void, count: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 to.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] src - pointer to memory address to the source.\n @param [in] count - the size of the memory to copy.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphMemcpyNodeSetParams1D( node: hipGraphNode_t, dst: *mut ::libc::c_void, src: *const ::libc::c_void, count: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 to.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] src - pointer to memory address to the source.\n @param [in] count - the size of the memory to copy.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphExecMemcpyNodeSetParams1D( hGraphExec: hipGraphExec_t, node: hipGraphNode_t, dst: *mut ::libc::c_void, src: *const ::libc::c_void, count: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 to create.\n @param [in] graph - instance of graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memcpy execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] symbol - Device symbol address.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphAddMemcpyNodeFromSymbol( pGraphNode: *mut hipGraphNode_t, graph: hipGraph_t, pDependencies: *const hipGraphNode_t, numDependencies: usize, dst: *mut ::libc::c_void, symbol: *const ::libc::c_void, count: usize, offset: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 to.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] symbol - Device symbol address.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphMemcpyNodeSetParamsFromSymbol( node: hipGraphNode_t, dst: *mut ::libc::c_void, symbol: *const ::libc::c_void, count: usize, offset: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 to.\n @param [in] dst - pointer to memory address to the destination.\n @param [in] symbol - Device symbol address.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphExecMemcpyNodeSetParamsFromSymbol( hGraphExec: hipGraphExec_t, node: hipGraphNode_t, dst: *mut ::libc::c_void, symbol: *const ::libc::c_void, count: usize, offset: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 to create.\n @param [in] graph - instance of graph to add the created node.\n @param [in] pDependencies - const pointer to the dependencies on the memcpy execution node.\n @param [in] numDependencies - the number of the dependencies.\n @param [in] symbol - Device symbol address.\n @param [in] src - pointer to memory address of the src.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphAddMemcpyNodeToSymbol( pGraphNode: *mut hipGraphNode_t, graph: hipGraph_t, pDependencies: *const hipGraphNode_t, numDependencies: usize, symbol: *const ::libc::c_void, src: *const ::libc::c_void, count: usize, offset: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 to.\n @param [in] symbol - Device symbol address.\n @param [in] src - pointer to memory address of the src.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphMemcpyNodeSetParamsToSymbol( node: hipGraphNode_t, symbol: *const ::libc::c_void, src: *const ::libc::c_void, count: usize, offset: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[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 to.\n @param [in] symbol - Device symbol address.\n @param [in] src - pointer to memory address of the src.\n @param [in] count - the size of the memory to copy.\n @param [in] offset - Offset from start of symbol in bytes.\n @param [in] kind - the type of memory copy.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphExecMemcpyNodeSetParamsToSymbol( hGraphExec: hipGraphExec_t, node: hipGraphNode_t, symbol: *const ::libc::c_void, src: *const ::libc::c_void, count: usize, offset: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates a memset 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] pMemsetParams - const pointer to the parameters for the memory set.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphAddMemsetNode( pGraphNode: *mut hipGraphNode_t, graph: hipGraph_t, pDependencies: *const hipGraphNode_t, numDependencies: usize, pMemsetParams: *const hipMemsetParams, ) -> hipError_t; } extern "C" { #[doc = " @brief Gets a memset node's parameters.\n\n @param [in] node - instane of the node to get parameters from.\n @param [out] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphMemsetNodeGetParams( node: hipGraphNode_t, pNodeParams: *mut hipMemsetParams, ) -> hipError_t; } extern "C" { #[doc = " @brief Sets a memset node's parameters.\n\n @param [in] node - instance of the node to set parameters to.\n @param [in] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphMemsetNodeSetParams( node: hipGraphNode_t, pNodeParams: *const hipMemsetParams, ) -> hipError_t; } extern "C" { #[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 to.\n @param [in] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphExecMemsetNodeSetParams( hGraphExec: hipGraphExec_t, node: hipGraphNode_t, pNodeParams: *const hipMemsetParams, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates a host execution 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] pNodeParams -pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphAddHostNode( pGraphNode: *mut hipGraphNode_t, graph: hipGraph_t, pDependencies: *const hipGraphNode_t, numDependencies: usize, pNodeParams: *const hipHostNodeParams, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns a host node's parameters.\n\n @param [in] node - instane of the node to get parameters from.\n @param [out] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphHostNodeGetParams( node: hipGraphNode_t, pNodeParams: *mut hipHostNodeParams, ) -> hipError_t; } extern "C" { #[doc = " @brief Sets a host node's parameters.\n\n @param [in] node - instance of the node to set parameters to.\n @param [in] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphHostNodeSetParams( node: hipGraphNode_t, pNodeParams: *const hipHostNodeParams, ) -> hipError_t; } extern "C" { #[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 to.\n @param [in] pNodeParams - pointer to the parameters.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphExecHostNodeSetParams( hGraphExec: hipGraphExec_t, node: hipGraphNode_t, pNodeParams: *const hipHostNodeParams, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates a child graph 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] childGraph - the graph to clone into this node\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphAddChildGraphNode( pGraphNode: *mut hipGraphNode_t, graph: hipGraph_t, pDependencies: *const hipGraphNode_t, numDependencies: usize, childGraph: hipGraph_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Gets a handle to the embedded graph of a child graph node.\n\n @param [in] node - instane of the node to get child graph.\n @param [out] pGraph - pointer to get the graph.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphChildGraphNodeGetGraph( node: hipGraphNode_t, pGraph: *mut hipGraph_t, ) -> hipError_t; } extern "C" { #[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 @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."] pub fn hipGraphExecChildGraphNodeSetParams( hGraphExec: hipGraphExec_t, node: hipGraphNode_t, childGraph: hipGraph_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates an empty 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 - instane of the graph the node is add to.\n @param [in] pDependencies - const pointer to the node dependenties.\n @param [in] numDependencies - the number of dependencies.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphAddEmptyNode( pGraphNode: *mut hipGraphNode_t, graph: hipGraph_t, pDependencies: *const hipGraphNode_t, numDependencies: usize, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates an event record 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 - instane of the graph the node to be added.\n @param [in] pDependencies - const pointer to the node dependenties.\n @param [in] numDependencies - the number of dependencies.\n @param [in] event - Event for the node.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphAddEventRecordNode( pGraphNode: *mut hipGraphNode_t, graph: hipGraph_t, pDependencies: *const hipGraphNode_t, numDependencies: usize, event: hipEvent_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns the event associated with an event record node.\n\n @param [in] node - instane of the node to get event from.\n @param [out] event_out - Pointer to return the event.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphEventRecordNodeGetEvent( node: hipGraphNode_t, event_out: *mut hipEvent_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Sets an event record node's event.\n\n @param [in] node - instane of the node to set event to.\n @param [in] event - pointer to the event.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphEventRecordNodeSetEvent(node: hipGraphNode_t, event: hipEvent_t) -> hipError_t; } extern "C" { #[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 @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."] pub fn hipGraphExecEventRecordNodeSetEvent( hGraphExec: hipGraphExec_t, hNode: hipGraphNode_t, event: hipEvent_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Creates an event wait 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 - instane of the graph the node to be added.\n @param [in] pDependencies - const pointer to the node dependenties.\n @param [in] numDependencies - the number of dependencies.\n @param [in] event - Event for the node.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphAddEventWaitNode( pGraphNode: *mut hipGraphNode_t, graph: hipGraph_t, pDependencies: *const hipGraphNode_t, numDependencies: usize, event: hipEvent_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Returns the event associated with an event wait node.\n\n @param [in] node - instane of the node to get event from.\n @param [out] event_out - Pointer to return the event.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphEventWaitNodeGetEvent( node: hipGraphNode_t, event_out: *mut hipEvent_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Sets an event wait node's event.\n\n @param [in] node - instane of the node to set event to.\n @param [in] event - pointer to the event.\n @returns #hipSuccess, #hipErrorInvalidValue\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."] pub fn hipGraphEventWaitNodeSetEvent(node: hipGraphNode_t, event: hipEvent_t) -> hipError_t; } extern "C" { #[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 @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."] pub fn hipGraphExecEventWaitNodeSetEvent( hGraphExec: hipGraphExec_t, hNode: hipGraphNode_t, event: hipEvent_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Get the mem attribute for graphs.\n\n @param [in] device - device the attr is get for.\n @param [in] attr - attr to get.\n @param [out] value - value for specific attr.\n @returns #hipSuccess, #hipErrorInvalidDevice\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."] pub fn hipDeviceGetGraphMemAttribute( device: ::libc::c_int, attr: hipGraphMemAttributeType, value: *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[doc = " @brief Set the mem attribute for graphs.\n\n @param [in] device - device the attr is set for.\n @param [in] attr - attr to set.\n @param [in] value - value for specific attr.\n @returns #hipSuccess, #hipErrorInvalidDevice\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."] pub fn hipDeviceSetGraphMemAttribute( device: ::libc::c_int, attr: hipGraphMemAttributeType, value: *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[doc = " @brief Free unused memory on specific device used for graph back to OS.\n\n @param [in] device - device the memory is used for graphs\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."] pub fn hipDeviceGraphMemTrim(device: ::libc::c_int) -> hipError_t; } extern "C" { #[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 @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."] pub fn hipUserObjectCreate( object_out: *mut hipUserObject_t, ptr: *mut ::libc::c_void, destroy: hipHostFn_t, initialRefcount: ::libc::c_uint, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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 @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."] pub fn hipUserObjectRelease(object: hipUserObject_t, count: ::libc::c_uint) -> hipError_t; } extern "C" { #[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 @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."] pub fn hipUserObjectRetain(object: hipUserObject_t, count: ::libc::c_uint) -> hipError_t; } extern "C" { #[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 @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."] pub fn hipGraphRetainUserObject( graph: hipGraph_t, object: hipUserObject_t, count: ::libc::c_uint, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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 @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."] pub fn hipGraphReleaseUserObject( graph: hipGraph_t, object: hipUserObject_t, count: ::libc::c_uint, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemAddressFree(devPtr: *mut ::libc::c_void, size: usize) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemAddressReserve( ptr: *mut *mut ::libc::c_void, size: usize, alignment: usize, addr: *mut ::libc::c_void, flags: ::libc::c_ulonglong, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemCreate( handle: *mut hipMemGenericAllocationHandle_t, size: usize, prop: *const hipMemAllocationProp, flags: ::libc::c_ulonglong, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemExportToShareableHandle( shareableHandle: *mut ::libc::c_void, handle: hipMemGenericAllocationHandle_t, handleType: hipMemAllocationHandleType, flags: ::libc::c_ulonglong, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemGetAccess( flags: *mut ::libc::c_ulonglong, location: *const hipMemLocation, ptr: *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemGetAllocationGranularity( granularity: *mut usize, prop: *const hipMemAllocationProp, option: hipMemAllocationGranularity_flags, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemGetAllocationPropertiesFromHandle( prop: *mut hipMemAllocationProp, handle: hipMemGenericAllocationHandle_t, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemImportFromShareableHandle( handle: *mut hipMemGenericAllocationHandle_t, osHandle: *mut ::libc::c_void, shHandleType: hipMemAllocationHandleType, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemMap( ptr: *mut ::libc::c_void, size: usize, offset: usize, handle: hipMemGenericAllocationHandle_t, flags: ::libc::c_ulonglong, ) -> hipError_t; } extern "C" { #[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 marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemMapArrayAsync( mapInfoList: *mut hipArrayMapInfo, count: ::libc::c_uint, stream: hipStream_t, ) -> hipError_t; } extern "C" { #[doc = " @brief Release a memory handle representing a memory allocation which was previously allocated through hipMemCreate.\n\n @param [in] handle - handle of the memory allocation.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemRelease(handle: hipMemGenericAllocationHandle_t) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemRetainAllocationHandle( handle: *mut hipMemGenericAllocationHandle_t, addr: *mut ::libc::c_void, ) -> hipError_t; } extern "C" { #[doc = " @brief Set the access flags for each location specified in desc for the given virtual address range.\n\n @param [in] ptr - starting address of the virtual address range.\n @param [in] size - size of the range.\n @param [in] desc - array of hipMemAccessDesc.\n @param [in] count - number of hipMemAccessDesc in desc.\n @returns #hipSuccess, #hipErrorInvalidValue, #hipErrorNotSupported\n @warning : This API is marked as beta, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemSetAccess( ptr: *mut ::libc::c_void, size: usize, desc: *const hipMemAccessDesc, count: usize, ) -> hipError_t; } extern "C" { #[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, meaning, while this is feature complete,\n it is still open to changes and may have outstanding issues."] pub fn hipMemUnmap(ptr: *mut ::libc::c_void, size: usize) -> hipError_t; } #[doc = "-------------------------------------------------------------------------------------------------\n-------------------------------------------------------------------------------------------------\n @defgroup GL Interop\n @{\n This section describes Stream Memory Wait and Write functions of HIP runtime API."] pub type GLuint = ::libc::c_uint; pub type GLenum = ::libc::c_uint; extern "C" { pub fn hipGLGetDevices( pHipDeviceCount: *mut ::libc::c_uint, pHipDevices: *mut ::libc::c_int, hipDeviceCount: ::libc::c_uint, deviceList: hipGLDeviceList, ) -> hipError_t; } extern "C" { pub fn hipGraphicsGLRegisterBuffer( resource: *mut *mut hipGraphicsResource, buffer: GLuint, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { pub fn hipGraphicsGLRegisterImage( resource: *mut *mut hipGraphicsResource, image: GLuint, target: GLenum, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { pub fn hipGraphicsMapResources( count: ::libc::c_int, resources: *mut hipGraphicsResource_t, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipGraphicsSubResourceGetMappedArray( array: *mut hipArray_t, resource: hipGraphicsResource_t, arrayIndex: ::libc::c_uint, mipLevel: ::libc::c_uint, ) -> hipError_t; } extern "C" { pub fn hipGraphicsResourceGetMappedPointer( devPtr: *mut *mut ::libc::c_void, size: *mut usize, resource: hipGraphicsResource_t, ) -> hipError_t; } extern "C" { pub fn hipGraphicsUnmapResources( count: ::libc::c_int, resources: *mut hipGraphicsResource_t, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipGraphicsUnregisterResource(resource: hipGraphicsResource_t) -> hipError_t; } extern "C" { pub fn hipMemcpy_spt( dst: *mut ::libc::c_void, src: *const ::libc::c_void, sizeBytes: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { pub fn hipMemcpyToSymbol_spt( symbol: *const ::libc::c_void, src: *const ::libc::c_void, sizeBytes: usize, offset: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { pub fn hipMemcpyFromSymbol_spt( dst: *mut ::libc::c_void, symbol: *const ::libc::c_void, sizeBytes: usize, offset: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { pub fn hipMemcpy2D_spt( dst: *mut ::libc::c_void, dpitch: usize, src: *const ::libc::c_void, spitch: usize, width: usize, height: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { pub fn hipMemcpy2DFromArray_spt( dst: *mut ::libc::c_void, dpitch: usize, src: hipArray_const_t, wOffset: usize, hOffset: usize, width: usize, height: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { pub fn hipMemcpy3D_spt(p: *const hipMemcpy3DParms) -> hipError_t; } extern "C" { pub fn hipMemset_spt( dst: *mut ::libc::c_void, value: ::libc::c_int, sizeBytes: usize, ) -> hipError_t; } extern "C" { pub fn hipMemsetAsync_spt( dst: *mut ::libc::c_void, value: ::libc::c_int, sizeBytes: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipMemset2D_spt( dst: *mut ::libc::c_void, pitch: usize, value: ::libc::c_int, width: usize, height: usize, ) -> hipError_t; } extern "C" { pub fn hipMemset2DAsync_spt( dst: *mut ::libc::c_void, pitch: usize, value: ::libc::c_int, width: usize, height: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipMemset3DAsync_spt( pitchedDevPtr: hipPitchedPtr, value: ::libc::c_int, extent: hipExtent, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipMemset3D_spt( pitchedDevPtr: hipPitchedPtr, value: ::libc::c_int, extent: hipExtent, ) -> hipError_t; } extern "C" { pub fn hipMemcpyAsync_spt( dst: *mut ::libc::c_void, src: *const ::libc::c_void, sizeBytes: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipMemcpy3DAsync_spt(p: *const hipMemcpy3DParms, stream: hipStream_t) -> hipError_t; } extern "C" { pub fn hipMemcpy2DAsync_spt( dst: *mut ::libc::c_void, dpitch: usize, src: *const ::libc::c_void, spitch: usize, width: usize, height: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipMemcpyFromSymbolAsync_spt( dst: *mut ::libc::c_void, symbol: *const ::libc::c_void, sizeBytes: usize, offset: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipMemcpyToSymbolAsync_spt( symbol: *const ::libc::c_void, src: *const ::libc::c_void, sizeBytes: usize, offset: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipMemcpyFromArray_spt( dst: *mut ::libc::c_void, src: hipArray_const_t, wOffsetSrc: usize, hOffset: usize, count: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { pub fn hipMemcpy2DToArray_spt( dst: *mut hipArray, wOffset: usize, hOffset: usize, src: *const ::libc::c_void, spitch: usize, width: usize, height: usize, kind: hipMemcpyKind, ) -> hipError_t; } extern "C" { pub fn hipMemcpy2DFromArrayAsync_spt( dst: *mut ::libc::c_void, dpitch: usize, src: hipArray_const_t, wOffsetSrc: usize, hOffsetSrc: usize, width: usize, height: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipMemcpy2DToArrayAsync_spt( dst: *mut hipArray, wOffset: usize, hOffset: usize, src: *const ::libc::c_void, spitch: usize, width: usize, height: usize, kind: hipMemcpyKind, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipStreamQuery_spt(stream: hipStream_t) -> hipError_t; } extern "C" { pub fn hipStreamSynchronize_spt(stream: hipStream_t) -> hipError_t; } extern "C" { pub fn hipStreamGetPriority_spt( stream: hipStream_t, priority: *mut ::libc::c_int, ) -> hipError_t; } extern "C" { pub fn hipStreamWaitEvent_spt( stream: hipStream_t, event: hipEvent_t, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { pub fn hipStreamGetFlags_spt(stream: hipStream_t, flags: *mut ::libc::c_uint) -> hipError_t; } extern "C" { pub fn hipStreamAddCallback_spt( stream: hipStream_t, callback: hipStreamCallback_t, userData: *mut ::libc::c_void, flags: ::libc::c_uint, ) -> hipError_t; } extern "C" { pub fn hipEventRecord_spt(event: hipEvent_t, stream: hipStream_t) -> hipError_t; } extern "C" { pub fn hipLaunchCooperativeKernel_spt( f: *const ::libc::c_void, gridDim: dim3, blockDim: dim3, kernelParams: *mut *mut ::libc::c_void, sharedMemBytes: u32, hStream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipLaunchKernel_spt( function_address: *const ::libc::c_void, numBlocks: dim3, dimBlocks: dim3, args: *mut *mut ::libc::c_void, sharedMemBytes: usize, stream: hipStream_t, ) -> hipError_t; } extern "C" { pub fn hipGraphLaunch_spt(graphExec: hipGraphExec_t, stream: hipStream_t) -> hipError_t; } extern "C" { pub fn hipStreamBeginCapture_spt(stream: hipStream_t, mode: hipStreamCaptureMode) -> hipError_t; } extern "C" { pub fn hipStreamEndCapture_spt(stream: hipStream_t, pGraph: *mut hipGraph_t) -> hipError_t; } extern "C" { pub fn hipStreamIsCapturing_spt( stream: hipStream_t, pCaptureStatus: *mut hipStreamCaptureStatus, ) -> hipError_t; } extern "C" { pub fn hipStreamGetCaptureInfo_spt( stream: hipStream_t, pCaptureStatus: *mut hipStreamCaptureStatus, pId: *mut ::libc::c_ulonglong, ) -> hipError_t; } extern "C" { pub fn hipStreamGetCaptureInfo_v2_spt( stream: hipStream_t, captureStatus_out: *mut hipStreamCaptureStatus, id_out: *mut ::libc::c_ulonglong, graph_out: *mut hipGraph_t, dependencies_out: *mut *const hipGraphNode_t, numDependencies_out: *mut usize, ) -> hipError_t; } extern "C" { pub fn hipLaunchHostFunc_spt( stream: hipStream_t, fn_: hipHostFn_t, userData: *mut ::libc::c_void, ) -> hipError_t; } #[repr(C)] #[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)] pub struct __locale_data { pub _address: u8, }