From 0c0f0e5a6bc5d375171090becafbf4cca18a377c Mon Sep 17 00:00:00 2001 From: Andrzej Janik Date: Sun, 10 May 2020 19:19:53 +0200 Subject: [PATCH] Update L0 bindings --- level_zero-sys/Cargo.toml | 2 +- level_zero-sys/src/lib.rs | 4 +- level_zero-sys/src/{zex_api.rs => ze_api.rs} | 7134 +++++++++--------- level_zero-sys/src/ze_loader.lib | Bin 0 -> 70198 bytes 4 files changed, 3369 insertions(+), 3771 deletions(-) rename level_zero-sys/src/{zex_api.rs => ze_api.rs} (92%) create mode 100644 level_zero-sys/src/ze_loader.lib diff --git a/level_zero-sys/Cargo.toml b/level_zero-sys/Cargo.toml index a2e25e1..c88db5d 100644 --- a/level_zero-sys/Cargo.toml +++ b/level_zero-sys/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "level_zero-sys" -version = "0.4.1" +version = "0.91.0" authors = ["Andrzej Janik "] edition = "2018" links = "ze_loader" diff --git a/level_zero-sys/src/lib.rs b/level_zero-sys/src/lib.rs index b6ed5a9..f7a7feb 100644 --- a/level_zero-sys/src/lib.rs +++ b/level_zero-sys/src/lib.rs @@ -1,3 +1,3 @@ #![allow(warnings)] -pub mod zex_api; -pub use zex_api::*; \ No newline at end of file +pub mod ze_api; +pub use ze_api::*; \ No newline at end of file diff --git a/level_zero-sys/src/zex_api.rs b/level_zero-sys/src/ze_api.rs similarity index 92% rename from level_zero-sys/src/zex_api.rs rename to level_zero-sys/src/ze_api.rs index bcdf079..06c971c 100644 --- a/level_zero-sys/src/zex_api.rs +++ b/level_zero-sys/src/ze_api.rs @@ -1,8 +1,5 @@ /* automatically generated by rust-bindgen */ -pub type __uint8_t = ::std::os::raw::c_uchar; -pub type __uint32_t = ::std::os::raw::c_uint; -pub type __uint64_t = ::std::os::raw::c_ulong; #[doc = ""] #[doc = " @brief compiler-independent type"] pub type ze_bool_t = u8; @@ -134,7 +131,7 @@ fn bindgen_test_layout__ze_ipc_mem_handle_t() { ); } #[doc = ""] -#[doc = " @brief Forward-declare ze_ipc_mem_handle_t"] +#[doc = " @brief IPC handle to a memory allocation"] pub type ze_ipc_mem_handle_t = _ze_ipc_mem_handle_t; #[doc = ""] #[doc = " @brief IPC handle to a event pool allocation"] @@ -170,15 +167,11 @@ fn bindgen_test_layout__ze_ipc_event_pool_handle_t() { ); } #[doc = ""] -#[doc = " @brief Forward-declare ze_ipc_event_pool_handle_t"] +#[doc = " @brief IPC handle to a event pool allocation"] pub type ze_ipc_event_pool_handle_t = _ze_ipc_event_pool_handle_t; -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief Defines Return/Error codes"] -#[doc = ""] -#[doc = " @remarks"] -#[doc = " _Analogues_"] -#[doc = " - **CUresult**"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] #[must_use] pub enum _ze_result_t { @@ -257,6 +250,8 @@ pub enum _ze_result_t { #[doc = "< [Core] unknown or internal error"] ZE_RESULT_ERROR_UNKNOWN = 2147483647, } +#[doc = ""] +#[doc = " @brief Defines Return/Error codes"] pub use self::_ze_result_t as ze_result_t; #[doc = ""] #[doc = " @brief Forward-declare ze_driver_uuid_t"] @@ -304,21 +299,6 @@ pub type ze_command_queue_desc_t = _ze_command_queue_desc_t; #[doc = " @brief Forward-declare ze_command_list_desc_t"] pub type ze_command_list_desc_t = _ze_command_list_desc_t; #[doc = ""] -#[doc = " @brief Forward-declare ze_copy_region_t"] -pub type ze_copy_region_t = _ze_copy_region_t; -#[doc = ""] -#[doc = " @brief Forward-declare ze_image_region_t"] -pub type ze_image_region_t = _ze_image_region_t; -#[doc = ""] -#[doc = " @brief Forward-declare ze_event_pool_desc_t"] -pub type ze_event_pool_desc_t = _ze_event_pool_desc_t; -#[doc = ""] -#[doc = " @brief Forward-declare ze_event_desc_t"] -pub type ze_event_desc_t = _ze_event_desc_t; -#[doc = ""] -#[doc = " @brief Forward-declare ze_fence_desc_t"] -pub type ze_fence_desc_t = _ze_fence_desc_t; -#[doc = ""] #[doc = " @brief Forward-declare ze_image_format_desc_t"] pub type ze_image_format_desc_t = _ze_image_format_desc_t; #[doc = ""] @@ -328,15 +308,6 @@ pub type ze_image_desc_t = _ze_image_desc_t; #[doc = " @brief Forward-declare ze_image_properties_t"] pub type ze_image_properties_t = _ze_image_properties_t; #[doc = ""] -#[doc = " @brief Forward-declare ze_device_mem_alloc_desc_t"] -pub type ze_device_mem_alloc_desc_t = _ze_device_mem_alloc_desc_t; -#[doc = ""] -#[doc = " @brief Forward-declare ze_host_mem_alloc_desc_t"] -pub type ze_host_mem_alloc_desc_t = _ze_host_mem_alloc_desc_t; -#[doc = ""] -#[doc = " @brief Forward-declare ze_memory_allocation_properties_t"] -pub type ze_memory_allocation_properties_t = _ze_memory_allocation_properties_t; -#[doc = ""] #[doc = " @brief Forward-declare ze_module_constants_t"] pub type ze_module_constants_t = _ze_module_constants_t; #[doc = ""] @@ -352,9 +323,33 @@ pub type ze_kernel_properties_t = _ze_kernel_properties_t; #[doc = " @brief Forward-declare ze_group_count_t"] pub type ze_group_count_t = _ze_group_count_t; #[doc = ""] +#[doc = " @brief Forward-declare ze_event_pool_desc_t"] +pub type ze_event_pool_desc_t = _ze_event_pool_desc_t; +#[doc = ""] +#[doc = " @brief Forward-declare ze_event_desc_t"] +pub type ze_event_desc_t = _ze_event_desc_t; +#[doc = ""] #[doc = " @brief Forward-declare ze_sampler_desc_t"] pub type ze_sampler_desc_t = _ze_sampler_desc_t; -#[repr(u32)] +#[doc = ""] +#[doc = " @brief Forward-declare ze_device_mem_alloc_desc_t"] +pub type ze_device_mem_alloc_desc_t = _ze_device_mem_alloc_desc_t; +#[doc = ""] +#[doc = " @brief Forward-declare ze_host_mem_alloc_desc_t"] +pub type ze_host_mem_alloc_desc_t = _ze_host_mem_alloc_desc_t; +#[doc = ""] +#[doc = " @brief Forward-declare ze_memory_allocation_properties_t"] +pub type ze_memory_allocation_properties_t = _ze_memory_allocation_properties_t; +#[doc = ""] +#[doc = " @brief Forward-declare ze_fence_desc_t"] +pub type ze_fence_desc_t = _ze_fence_desc_t; +#[doc = ""] +#[doc = " @brief Forward-declare ze_copy_region_t"] +pub type ze_copy_region_t = _ze_copy_region_t; +#[doc = ""] +#[doc = " @brief Forward-declare ze_image_region_t"] +pub type ze_image_region_t = _ze_image_region_t; +#[repr(i32)] #[doc = ""] #[doc = " @brief Supported initialization flags"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -364,6 +359,8 @@ pub enum _ze_init_flag_t { #[doc = "< only initialize GPU drivers"] ZE_INIT_FLAG_GPU_ONLY = 1, } +#[doc = ""] +#[doc = " @brief Supported initialization flags"] pub use self::_ze_init_flag_t as ze_init_flag_t; extern "C" { #[doc = ""] @@ -377,10 +374,6 @@ extern "C" { #[doc = " - This function is thread-safe for scenarios where multiple libraries"] #[doc = " may initialize the driver simultaneously."] #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuInit**"] - #[doc = ""] #[doc = " @returns"] #[doc = " - ::ZE_RESULT_SUCCESS"] #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] @@ -413,7 +406,7 @@ extern "C" { #[doc = " + `nullptr == pCount`"] pub fn zeDriverGet(pCount: *mut u32, phDrivers: *mut ze_driver_handle_t) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief Supported API versions"] #[doc = ""] @@ -422,9 +415,15 @@ extern "C" { #[doc = " ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_api_version_t { - #[doc = "< 1.0"] - ZE_API_VERSION_1_0 = 65536, + #[doc = "< 0.91"] + ZE_API_VERSION_1_0 = 91, } +#[doc = ""] +#[doc = " @brief Supported API versions"] +#[doc = ""] +#[doc = " @details"] +#[doc = " - API versions contain major and minor attributes, use"] +#[doc = " ::ZE_MAJOR_VERSION and ::ZE_MINOR_VERSION"] pub use self::_ze_api_version_t as ze_api_version_t; extern "C" { #[doc = ""] @@ -434,10 +433,6 @@ extern "C" { #[doc = " - The application may call this function from simultaneous threads."] #[doc = " - The implementation of this function should be lock-free."] #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuCtxGetApiVersion**"] - #[doc = ""] #[doc = " @returns"] #[doc = " - ::ZE_RESULT_SUCCESS"] #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] @@ -451,14 +446,16 @@ extern "C" { version: *mut ze_api_version_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_driver_properties_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_driver_properties_version_t { - #[doc = "< version 1.0"] - ZE_DRIVER_PROPERTIES_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_DRIVER_PROPERTIES_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_driver_properties_t"] pub use self::_ze_driver_properties_version_t as ze_driver_properties_version_t; #[doc = ""] #[doc = " @brief Driver universal unique id (UUID)"] @@ -560,7 +557,6 @@ extern "C" { #[doc = ""] #[doc = " @remarks"] #[doc = " _Analogues_"] - #[doc = " - **cuDriverGetVersion**"] #[doc = " - **clGetPlatformInfo**"] #[doc = ""] #[doc = " @returns"] @@ -576,14 +572,16 @@ extern "C" { pDriverProperties: *mut ze_driver_properties_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_driver_ipc_properties_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_driver_ipc_properties_version_t { - #[doc = "< version 1.0"] - ZE_DRIVER_IPC_PROPERTIES_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_DRIVER_IPC_PROPERTIES_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_driver_ipc_properties_t"] pub use self::_ze_driver_ipc_properties_version_t as ze_driver_ipc_properties_version_t; #[doc = ""] #[doc = " @brief IPC properties queried using ::zeDriverGetIPCProperties"] @@ -658,10 +656,6 @@ extern "C" { #[doc = " - The application may call this function from simultaneous threads."] #[doc = " - The implementation of this function should be lock-free."] #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuDeviceGetAttribute**"] - #[doc = ""] #[doc = " @returns"] #[doc = " - ::ZE_RESULT_SUCCESS"] #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] @@ -710,10 +704,6 @@ extern "C" { #[doc = " - The application may call this function from simultaneous threads."] #[doc = " - The implementation of this function should be lock-free."] #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuDeviceGet**"] - #[doc = ""] #[doc = " @returns"] #[doc = " - ::ZE_RESULT_SUCCESS"] #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] @@ -754,16 +744,18 @@ extern "C" { phSubdevices: *mut ze_device_handle_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_device_properties_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_device_properties_version_t { - #[doc = "< version 1.0"] - ZE_DEVICE_PROPERTIES_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_DEVICE_PROPERTIES_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_device_properties_t"] pub use self::_ze_device_properties_version_t as ze_device_properties_version_t; -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief Supported device types"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -773,6 +765,8 @@ pub enum _ze_device_type_t { #[doc = "< Field Programmable Gate Array"] ZE_DEVICE_TYPE_FPGA = 2, } +#[doc = ""] +#[doc = " @brief Supported device types"] pub use self::_ze_device_type_t as ze_device_type_t; #[doc = ""] #[doc = " @brief Device universal unique id (UUID)"] @@ -849,11 +843,10 @@ pub struct _ze_device_properties_t { pub numEUsPerSubslice: u32, #[doc = "< [out] Number of sub-slices per slice."] pub numSubslicesPerSlice: u32, - #[doc = "< [out] Number of slices per tile."] - pub numSlicesPerTile: u32, - #[doc = "< [out] Number of tiles."] - pub numTiles: u32, - #[doc = "< [out] Returns the resolution of device timer in nanoseconds."] + #[doc = "< [out] Number of slices."] + pub numSlices: u32, + #[doc = "< [out] Returns the resolution of device timer in nanoseconds used for"] + #[doc = "< profiling, timestamps, etc."] pub timerResolution: u64, #[doc = "< [out] Device name"] pub name: [::std::os::raw::c_char; 256usize], @@ -1104,27 +1097,14 @@ fn bindgen_test_layout__ze_device_properties_t() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::<_ze_device_properties_t>())).numSlicesPerTile as *const _ - as usize + &(*(::std::ptr::null::<_ze_device_properties_t>())).numSlices as *const _ as usize }, 80usize, concat!( "Offset of field: ", stringify!(_ze_device_properties_t), "::", - stringify!(numSlicesPerTile) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_device_properties_t>())).numTiles as *const _ as usize - }, - 84usize, - concat!( - "Offset of field: ", - stringify!(_ze_device_properties_t), - "::", - stringify!(numTiles) + stringify!(numSlices) ) ); assert_eq!( @@ -1160,8 +1140,6 @@ extern "C" { #[doc = ""] #[doc = " @remarks"] #[doc = " _Analogues_"] - #[doc = " - **cuDeviceGetAttribute**"] - #[doc = " - cuDeviceGetName"] #[doc = " - clGetDeviceInfo"] #[doc = ""] #[doc = " @returns"] @@ -1177,14 +1155,16 @@ extern "C" { pDeviceProperties: *mut ze_device_properties_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_device_compute_properties_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_device_compute_properties_version_t { - #[doc = "< version 1.0"] - ZE_DEVICE_COMPUTE_PROPERTIES_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_DEVICE_COMPUTE_PROPERTIES_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_device_compute_properties_t"] pub use self::_ze_device_compute_properties_version_t as ze_device_compute_properties_version_t; #[doc = ""] #[doc = " @brief Device compute properties queried using ::zeDeviceGetComputeProperties"] @@ -1381,7 +1361,6 @@ extern "C" { #[doc = ""] #[doc = " @remarks"] #[doc = " _Analogues_"] - #[doc = " - **cuDeviceGetAttribute**"] #[doc = " - clGetDeviceInfo"] #[doc = ""] #[doc = " @returns"] @@ -1397,14 +1376,16 @@ extern "C" { pComputeProperties: *mut ze_device_compute_properties_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_device_kernel_properties_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_device_kernel_properties_version_t { - #[doc = "< version 1.0"] - ZE_DEVICE_KERNEL_PROPERTIES_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_DEVICE_KERNEL_PROPERTIES_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_device_kernel_properties_t"] pub use self::_ze_device_kernel_properties_version_t as ze_device_kernel_properties_version_t; #[doc = ""] #[doc = " @brief Native kernel universal unique id (UUID)"] @@ -1437,14 +1418,14 @@ fn bindgen_test_layout__ze_native_kernel_uuid_t() { ) ); } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief Floating Point capabilities"] #[doc = ""] #[doc = " @details"] #[doc = " - floating-point capabilities of the device."] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_floating_point_capabilities_t { +pub enum _ze_fp_capabilities_t { #[doc = "< None"] ZE_FP_CAPS_NONE = 0, #[doc = "< Supports denorms"] @@ -1465,7 +1446,12 @@ pub enum _ze_floating_point_capabilities_t { #[doc = "< Uses software implementation for basic floating-point operations."] ZE_FP_CAPS_SOFT_FLOAT = 128, } -pub use self::_ze_floating_point_capabilities_t as ze_floating_point_capabilities_t; +#[doc = ""] +#[doc = " @brief Floating Point capabilities"] +#[doc = ""] +#[doc = " @details"] +#[doc = " - floating-point capabilities of the device."] +pub use self::_ze_fp_capabilities_t as ze_fp_capabilities_t; #[doc = ""] #[doc = " @brief Device properties queried using ::zeDeviceGetKernelProperties"] #[repr(C)] @@ -1492,10 +1478,12 @@ pub struct _ze_device_kernel_properties_t { pub int64AtomicsSupported: ze_bool_t, #[doc = "< [out] Supports four component dot product and accumulate operations"] pub dp4aSupported: ze_bool_t, + #[doc = "< [out] Capabilities for half-precision floating-point operations."] + pub halfFpCapabilities: ze_fp_capabilities_t, #[doc = "< [out] Capabilities for single-precision floating-point operations."] - pub singleFpCapabilities: ze_floating_point_capabilities_t, + pub singleFpCapabilities: ze_fp_capabilities_t, #[doc = "< [out] Capabilities for double-precision floating-point operations."] - pub doubleFpCapabilities: ze_floating_point_capabilities_t, + pub doubleFpCapabilities: ze_fp_capabilities_t, #[doc = "< [out] Maximum kernel argument size that is supported."] pub maxArgumentsSize: u32, #[doc = "< [out] Maximum size of internal buffer that holds output of printf"] @@ -1506,7 +1494,7 @@ pub struct _ze_device_kernel_properties_t { fn bindgen_test_layout__ze_device_kernel_properties_t() { assert_eq!( ::std::mem::size_of::<_ze_device_kernel_properties_t>(), - 44usize, + 48usize, concat!("Size of: ", stringify!(_ze_device_kernel_properties_t)) ); assert_eq!( @@ -1606,10 +1594,23 @@ fn bindgen_test_layout__ze_device_kernel_properties_t() { ); assert_eq!( unsafe { - &(*(::std::ptr::null::<_ze_device_kernel_properties_t>())).singleFpCapabilities + &(*(::std::ptr::null::<_ze_device_kernel_properties_t>())).halfFpCapabilities as *const _ as usize }, 28usize, + concat!( + "Offset of field: ", + stringify!(_ze_device_kernel_properties_t), + "::", + stringify!(halfFpCapabilities) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_device_kernel_properties_t>())).singleFpCapabilities + as *const _ as usize + }, + 32usize, concat!( "Offset of field: ", stringify!(_ze_device_kernel_properties_t), @@ -1622,7 +1623,7 @@ fn bindgen_test_layout__ze_device_kernel_properties_t() { &(*(::std::ptr::null::<_ze_device_kernel_properties_t>())).doubleFpCapabilities as *const _ as usize }, - 32usize, + 36usize, concat!( "Offset of field: ", stringify!(_ze_device_kernel_properties_t), @@ -1635,7 +1636,7 @@ fn bindgen_test_layout__ze_device_kernel_properties_t() { &(*(::std::ptr::null::<_ze_device_kernel_properties_t>())).maxArgumentsSize as *const _ as usize }, - 36usize, + 40usize, concat!( "Offset of field: ", stringify!(_ze_device_kernel_properties_t), @@ -1648,7 +1649,7 @@ fn bindgen_test_layout__ze_device_kernel_properties_t() { &(*(::std::ptr::null::<_ze_device_kernel_properties_t>())).printfBufferSize as *const _ as usize }, - 40usize, + 44usize, concat!( "Offset of field: ", stringify!(_ze_device_kernel_properties_t), @@ -1678,14 +1679,16 @@ extern "C" { pKernelProperties: *mut ze_device_kernel_properties_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_device_memory_properties_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_device_memory_properties_version_t { - #[doc = "< version 1.0"] - ZE_DEVICE_MEMORY_PROPERTIES_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_DEVICE_MEMORY_PROPERTIES_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_device_memory_properties_t"] pub use self::_ze_device_memory_properties_version_t as ze_device_memory_properties_version_t; #[doc = ""] #[doc = " @brief Device local memory properties queried using"] @@ -1778,8 +1781,6 @@ extern "C" { #[doc = ""] #[doc = " @remarks"] #[doc = " _Analogues_"] - #[doc = " - **cuDeviceGetAttribute**"] - #[doc = " - cuDeviceTotalMem"] #[doc = " - clGetDeviceInfo"] #[doc = ""] #[doc = " @returns"] @@ -1796,16 +1797,18 @@ extern "C" { pMemProperties: *mut ze_device_memory_properties_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_device_memory_access_properties_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_device_memory_access_properties_version_t { - #[doc = "< version 1.0"] - ZE_DEVICE_MEMORY_ACCESS_PROPERTIES_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_DEVICE_MEMORY_ACCESS_PROPERTIES_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_device_memory_access_properties_t"] pub use self::_ze_device_memory_access_properties_version_t as ze_device_memory_access_properties_version_t; -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief Memory access capabilities"] #[doc = ""] @@ -1825,6 +1828,12 @@ pub enum _ze_memory_access_capabilities_t { #[doc = "< Supports concurrent atomic access"] ZE_MEMORY_CONCURRENT_ATOMIC_ACCESS = 8, } +#[doc = ""] +#[doc = " @brief Memory access capabilities"] +#[doc = ""] +#[doc = " @details"] +#[doc = " - Supported access capabilities for different types of memory"] +#[doc = " allocations"] pub use self::_ze_memory_access_capabilities_t as ze_memory_access_capabilities_t; #[doc = ""] #[doc = " @brief Device memory access properties queried using"] @@ -1952,8 +1961,6 @@ extern "C" { #[doc = ""] #[doc = " @remarks"] #[doc = " _Analogues_"] - #[doc = " - **cuDeviceGetAttribute**"] - #[doc = " - cuDeviceTotalMem"] #[doc = " - clGetDeviceInfo"] #[doc = ""] #[doc = " @returns"] @@ -1969,14 +1976,16 @@ extern "C" { pMemAccessProperties: *mut ze_device_memory_access_properties_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_device_cache_properties_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_device_cache_properties_version_t { - #[doc = "< version 1.0"] - ZE_DEVICE_CACHE_PROPERTIES_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_DEVICE_CACHE_PROPERTIES_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_device_cache_properties_t"] pub use self::_ze_device_cache_properties_version_t as ze_device_cache_properties_version_t; #[doc = ""] #[doc = " @brief Device cache properties queried using ::zeDeviceGetCacheProperties"] @@ -2113,8 +2122,6 @@ extern "C" { #[doc = ""] #[doc = " @remarks"] #[doc = " _Analogues_"] - #[doc = " - **cuDeviceGetAttribute**"] - #[doc = " - cuDeviceTotalMem"] #[doc = " - clGetDeviceInfo"] #[doc = ""] #[doc = " @returns"] @@ -2130,14 +2137,16 @@ extern "C" { pCacheProperties: *mut ze_device_cache_properties_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_device_image_properties_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_device_image_properties_version_t { - #[doc = "< version 1.0"] - ZE_DEVICE_IMAGE_PROPERTIES_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_DEVICE_IMAGE_PROPERTIES_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_device_image_properties_t"] pub use self::_ze_device_image_properties_version_t as ze_device_image_properties_version_t; #[doc = ""] #[doc = " @brief Device image properties queried using ::zeDeviceGetComputeProperties"] @@ -2318,10 +2327,6 @@ extern "C" { #[doc = " - The application may call this function from simultaneous threads."] #[doc = " - The implementation of this function should be lock-free."] #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuDeviceGetAttribute**"] - #[doc = ""] #[doc = " @returns"] #[doc = " - ::ZE_RESULT_SUCCESS"] #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] @@ -2335,14 +2340,16 @@ extern "C" { pImageProperties: *mut ze_device_image_properties_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_device_p2p_properties_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_device_p2p_properties_version_t { - #[doc = "< version 1.0"] - ZE_DEVICE_P2P_PROPERTIES_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_DEVICE_P2P_PROPERTIES_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_device_p2p_properties_t"] pub use self::_ze_device_p2p_properties_version_t as ze_device_p2p_properties_version_t; #[doc = ""] #[doc = " @brief Device properties queried using ::zeDeviceGetP2PProperties"] @@ -2416,10 +2423,6 @@ extern "C" { #[doc = " - The application may call this function from simultaneous threads."] #[doc = " - The implementation of this function should be lock-free."] #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cudaDeviceGetP2PAttribute**"] - #[doc = ""] #[doc = " @returns"] #[doc = " - ::ZE_RESULT_SUCCESS"] #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] @@ -2457,10 +2460,6 @@ extern "C" { #[doc = " - The application may call this function from simultaneous threads."] #[doc = " - The implementation of this function should be lock-free."] #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cudaDeviceCanAccessPeer**"] - #[doc = ""] #[doc = " @returns"] #[doc = " - ::ZE_RESULT_SUCCESS"] #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] @@ -2476,7 +2475,7 @@ extern "C" { value: *mut ze_bool_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief Supported Cache Config"] #[doc = ""] @@ -2491,6 +2490,11 @@ pub enum _ze_cache_config_t { #[doc = "< Large General Data size"] ZE_CACHE_CONFIG_LARGE_DATA = 4, } +#[doc = ""] +#[doc = " @brief Supported Cache Config"] +#[doc = ""] +#[doc = " @details"] +#[doc = " - Supported Cache Config (Default, Large SLM, Large Data Cache)"] pub use self::_ze_cache_config_t as ze_cache_config_t; extern "C" { #[doc = ""] @@ -2500,10 +2504,6 @@ extern "C" { #[doc = " - The application may **not** call this function from simultaneous"] #[doc = " threads with the same device handle."] #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cudaFuncSetCacheConfig **"] - #[doc = ""] #[doc = " @returns"] #[doc = " - ::ZE_RESULT_SUCCESS"] #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] @@ -2518,28 +2518,30 @@ extern "C" { CacheConfig: ze_cache_config_t, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_command_queue_desc_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_command_queue_desc_version_t { - #[doc = "< version 1.0"] - ZE_COMMAND_QUEUE_DESC_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_COMMAND_QUEUE_DESC_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_command_queue_desc_t"] pub use self::_ze_command_queue_desc_version_t as ze_command_queue_desc_version_t; -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief Supported command queue flags"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_command_queue_flag_t { #[doc = "< default behavior"] ZE_COMMAND_QUEUE_FLAG_NONE = 0, - #[doc = "< command queue only supports enqueing copy-only command lists"] + #[doc = "< command queue only supports enqueuing copy-only command lists"] ZE_COMMAND_QUEUE_FLAG_COPY_ONLY = 1, #[doc = "< command queue is not tied to a physical command queue; driver may"] #[doc = "< dynamically assign based on usage"] ZE_COMMAND_QUEUE_FLAG_LOGICAL_ONLY = 2, - #[doc = "< command queue reserves and cannot comsume more than a single slice."] + #[doc = "< command queue reserves and cannot consume more than a single slice."] #[doc = "< 'slice' size is device-specific. cannot be combined with COPY_ONLY."] ZE_COMMAND_QUEUE_FLAG_SINGLE_SLICE_ONLY = 4, #[doc = "< command queue supports command list with cooperative kernels. See"] @@ -2547,8 +2549,10 @@ pub enum _ze_command_queue_flag_t { #[doc = "< be combined with COPY_ONLY."] ZE_COMMAND_QUEUE_FLAG_SUPPORTS_COOPERATIVE_KERNELS = 8, } +#[doc = ""] +#[doc = " @brief Supported command queue flags"] pub use self::_ze_command_queue_flag_t as ze_command_queue_flag_t; -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief Supported command queue modes"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -2562,8 +2566,10 @@ pub enum _ze_command_queue_mode_t { #[doc = "< explicit synchronization object must be used to determine completeness"] ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS = 2, } +#[doc = ""] +#[doc = " @brief Supported command queue modes"] pub use self::_ze_command_queue_mode_t as ze_command_queue_mode_t; -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief Supported command queue priorities"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -2575,6 +2581,8 @@ pub enum _ze_command_queue_priority_t { #[doc = "< higher priority than normal"] ZE_COMMAND_QUEUE_PRIORITY_HIGH = 2, } +#[doc = ""] +#[doc = " @brief Supported command queue priorities"] pub use self::_ze_command_queue_priority_t as ze_command_queue_priority_t; #[doc = ""] #[doc = " @brief Command Queue descriptor"] @@ -2680,8 +2688,6 @@ extern "C" { #[doc = " @remarks"] #[doc = " _Analogues_"] #[doc = " - **clCreateCommandQueue**"] - #[doc = " - cuCtxCreate"] - #[doc = " - cuCtxGetCurrent"] #[doc = ""] #[doc = " @returns"] #[doc = " - ::ZE_RESULT_SUCCESS"] @@ -2722,7 +2728,6 @@ extern "C" { #[doc = " @remarks"] #[doc = " _Analogues_"] #[doc = " - **clReleaseCommandQueue**"] - #[doc = " - cuCtxDestroy"] #[doc = ""] #[doc = " @returns"] #[doc = " - ::ZE_RESULT_SUCCESS"] @@ -2785,16 +2790,18 @@ extern "C" { timeout: u32, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief API version of ::ze_command_list_desc_t"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum _ze_command_list_desc_version_t { - #[doc = "< version 1.0"] - ZE_COMMAND_LIST_DESC_VERSION_CURRENT = 65536, + #[doc = "< version 0.91"] + ZE_COMMAND_LIST_DESC_VERSION_CURRENT = 91, } +#[doc = ""] +#[doc = " @brief API version of ::ze_command_list_desc_t"] pub use self::_ze_command_list_desc_version_t as ze_command_list_desc_version_t; -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief Supported command list creation flags"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -2823,6 +2830,8 @@ pub enum _ze_command_list_flag_t { #[doc = "< multi-engine submission and scheduling."] ZE_COMMAND_LIST_FLAG_EXPLICIT_ONLY = 8, } +#[doc = ""] +#[doc = " @brief Supported command list creation flags"] pub use self::_ze_command_list_flag_t as ze_command_list_flag_t; #[doc = ""] #[doc = " @brief Command List descriptor"] @@ -2995,6 +3004,550 @@ extern "C" { #[doc = " + `nullptr == hCommandList`"] pub fn zeCommandListReset(hCommandList: ze_command_list_handle_t) -> ze_result_t; } +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_image_desc_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_image_desc_version_t { + #[doc = "< version 0.91"] + ZE_IMAGE_DESC_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_image_desc_t"] +pub use self::_ze_image_desc_version_t as ze_image_desc_version_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported image creation flags"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_image_flag_t { + #[doc = "< programs will read contents"] + ZE_IMAGE_FLAG_PROGRAM_READ = 1, + #[doc = "< programs will write contents"] + ZE_IMAGE_FLAG_PROGRAM_WRITE = 2, + #[doc = "< device should cache contents"] + ZE_IMAGE_FLAG_BIAS_CACHED = 4, + #[doc = "< device should not cache contents"] + ZE_IMAGE_FLAG_BIAS_UNCACHED = 8, +} +#[doc = ""] +#[doc = " @brief Supported image creation flags"] +pub use self::_ze_image_flag_t as ze_image_flag_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported image types"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_image_type_t { + #[doc = "< 1D"] + ZE_IMAGE_TYPE_1D = 0, + #[doc = "< 1D array"] + ZE_IMAGE_TYPE_1DARRAY = 1, + #[doc = "< 2D"] + ZE_IMAGE_TYPE_2D = 2, + #[doc = "< 2D array"] + ZE_IMAGE_TYPE_2DARRAY = 3, + #[doc = "< 3D"] + ZE_IMAGE_TYPE_3D = 4, + #[doc = "< Buffer"] + ZE_IMAGE_TYPE_BUFFER = 5, +} +#[doc = ""] +#[doc = " @brief Supported image types"] +pub use self::_ze_image_type_t as ze_image_type_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported image format layouts"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_image_format_layout_t { + #[doc = "< 8-bit single component layout"] + ZE_IMAGE_FORMAT_LAYOUT_8 = 0, + #[doc = "< 16-bit single component layout"] + ZE_IMAGE_FORMAT_LAYOUT_16 = 1, + #[doc = "< 32-bit single component layout"] + ZE_IMAGE_FORMAT_LAYOUT_32 = 2, + #[doc = "< 2-component 8-bit layout"] + ZE_IMAGE_FORMAT_LAYOUT_8_8 = 3, + #[doc = "< 4-component 8-bit layout"] + ZE_IMAGE_FORMAT_LAYOUT_8_8_8_8 = 4, + #[doc = "< 2-component 16-bit layout"] + ZE_IMAGE_FORMAT_LAYOUT_16_16 = 5, + #[doc = "< 4-component 16-bit layout"] + ZE_IMAGE_FORMAT_LAYOUT_16_16_16_16 = 6, + #[doc = "< 2-component 32-bit layout"] + ZE_IMAGE_FORMAT_LAYOUT_32_32 = 7, + #[doc = "< 4-component 32-bit layout"] + ZE_IMAGE_FORMAT_LAYOUT_32_32_32_32 = 8, + #[doc = "< 4-component 10_10_10_2 layout"] + ZE_IMAGE_FORMAT_LAYOUT_10_10_10_2 = 9, + #[doc = "< 3-component 11_11_10 layout"] + ZE_IMAGE_FORMAT_LAYOUT_11_11_10 = 10, + #[doc = "< 3-component 5_6_5 layout"] + ZE_IMAGE_FORMAT_LAYOUT_5_6_5 = 11, + #[doc = "< 4-component 5_5_5_1 layout"] + ZE_IMAGE_FORMAT_LAYOUT_5_5_5_1 = 12, + #[doc = "< 4-component 4_4_4_4 layout"] + ZE_IMAGE_FORMAT_LAYOUT_4_4_4_4 = 13, + #[doc = "< Media Format: Y8. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_Y8 = 14, + #[doc = "< Media Format: NV12. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_NV12 = 15, + #[doc = "< Media Format: YUYV. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_YUYV = 16, + #[doc = "< Media Format: VYUY. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_VYUY = 17, + #[doc = "< Media Format: YVYU. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_YVYU = 18, + #[doc = "< Media Format: UYVY. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_UYVY = 19, + #[doc = "< Media Format: AYUV. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_AYUV = 20, + #[doc = "< Media Format: YUAV. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_YUAV = 21, + #[doc = "< Media Format: P010. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_P010 = 22, + #[doc = "< Media Format: Y410. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_Y410 = 23, + #[doc = "< Media Format: P012. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_P012 = 24, + #[doc = "< Media Format: Y16. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_Y16 = 25, + #[doc = "< Media Format: P016. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_P016 = 26, + #[doc = "< Media Format: Y216. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_Y216 = 27, + #[doc = "< Media Format: P216. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_P216 = 28, + #[doc = "< Media Format: P416. Format type and swizzle is ignored for this."] + ZE_IMAGE_FORMAT_LAYOUT_P416 = 29, +} +#[doc = ""] +#[doc = " @brief Supported image format layouts"] +pub use self::_ze_image_format_layout_t as ze_image_format_layout_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported image format types"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_image_format_type_t { + #[doc = "< Unsigned integer"] + ZE_IMAGE_FORMAT_TYPE_UINT = 0, + #[doc = "< Signed integer"] + ZE_IMAGE_FORMAT_TYPE_SINT = 1, + #[doc = "< Unsigned normalized integer"] + ZE_IMAGE_FORMAT_TYPE_UNORM = 2, + #[doc = "< Signed normalized integer"] + ZE_IMAGE_FORMAT_TYPE_SNORM = 3, + #[doc = "< Float"] + ZE_IMAGE_FORMAT_TYPE_FLOAT = 4, +} +#[doc = ""] +#[doc = " @brief Supported image format types"] +pub use self::_ze_image_format_type_t as ze_image_format_type_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported image format component swizzle into channel"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_image_format_swizzle_t { + #[doc = "< Red component"] + ZE_IMAGE_FORMAT_SWIZZLE_R = 0, + #[doc = "< Green component"] + ZE_IMAGE_FORMAT_SWIZZLE_G = 1, + #[doc = "< Blue component"] + ZE_IMAGE_FORMAT_SWIZZLE_B = 2, + #[doc = "< Alpha component"] + ZE_IMAGE_FORMAT_SWIZZLE_A = 3, + #[doc = "< Zero"] + ZE_IMAGE_FORMAT_SWIZZLE_0 = 4, + #[doc = "< One"] + ZE_IMAGE_FORMAT_SWIZZLE_1 = 5, + #[doc = "< Don't care"] + ZE_IMAGE_FORMAT_SWIZZLE_X = 6, +} +#[doc = ""] +#[doc = " @brief Supported image format component swizzle into channel"] +pub use self::_ze_image_format_swizzle_t as ze_image_format_swizzle_t; +#[doc = ""] +#[doc = " @brief Image format descriptor"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_image_format_desc_t { + #[doc = "< [in] image format component layout"] + pub layout: ze_image_format_layout_t, + #[doc = "< [in] image format type. Media formats can't be used for"] + #[doc = "< ::ZE_IMAGE_TYPE_BUFFER."] + pub type_: ze_image_format_type_t, + #[doc = "< [in] image component swizzle into channel x"] + pub x: ze_image_format_swizzle_t, + #[doc = "< [in] image component swizzle into channel y"] + pub y: ze_image_format_swizzle_t, + #[doc = "< [in] image component swizzle into channel z"] + pub z: ze_image_format_swizzle_t, + #[doc = "< [in] image component swizzle into channel w"] + pub w: ze_image_format_swizzle_t, +} +#[test] +fn bindgen_test_layout__ze_image_format_desc_t() { + assert_eq!( + ::std::mem::size_of::<_ze_image_format_desc_t>(), + 24usize, + concat!("Size of: ", stringify!(_ze_image_format_desc_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_image_format_desc_t>(), + 4usize, + concat!("Alignment of ", stringify!(_ze_image_format_desc_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).layout as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_format_desc_t), + "::", + stringify!(layout) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).type_ as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_format_desc_t), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).x as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_format_desc_t), + "::", + stringify!(x) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).y as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_format_desc_t), + "::", + stringify!(y) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).z as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_format_desc_t), + "::", + stringify!(z) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).w as *const _ as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_format_desc_t), + "::", + stringify!(w) + ) + ); +} +#[doc = ""] +#[doc = " @brief Image descriptor"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_image_desc_t { + #[doc = "< [in] ::ZE_IMAGE_DESC_VERSION_CURRENT"] + pub version: ze_image_desc_version_t, + #[doc = "< [in] creation flags"] + pub flags: ze_image_flag_t, + #[doc = "< [in] image type"] + pub type_: ze_image_type_t, + #[doc = "< [in] image format"] + pub format: ze_image_format_desc_t, + #[doc = "< [in] width in pixels for ::ze_image_type_t::1D/2D/3D and bytes for"] + #[doc = "< Buffer, see ::ze_device_image_properties_t::maxImageDims1D/2D/3D and"] + #[doc = "< maxImageBufferSize."] + pub width: u64, + #[doc = "< [in] height in pixels (2D or 3D only), see"] + #[doc = "< ::ze_device_image_properties_t::maxImageDims2D/3D"] + pub height: u32, + #[doc = "< [in] depth in pixels (3D only), see"] + #[doc = "< ::ze_device_image_properties_t::maxImageDims3D"] + pub depth: u32, + #[doc = "< [in] array levels (array types only), see"] + #[doc = "< ::ze_device_image_properties_t::maxImageArraySlices"] + pub arraylevels: u32, + #[doc = "< [in] mipmap levels (must be 0)"] + pub miplevels: u32, +} +#[test] +fn bindgen_test_layout__ze_image_desc_t() { + assert_eq!( + ::std::mem::size_of::<_ze_image_desc_t>(), + 64usize, + concat!("Size of: ", stringify!(_ze_image_desc_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_image_desc_t>(), + 8usize, + concat!("Alignment of ", stringify!(_ze_image_desc_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).version as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_desc_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).flags as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_desc_t), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).type_ as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_desc_t), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).format as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_desc_t), + "::", + stringify!(format) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).width as *const _ as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_desc_t), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).height as *const _ as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_desc_t), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).depth as *const _ as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_desc_t), + "::", + stringify!(depth) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).arraylevels as *const _ as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_desc_t), + "::", + stringify!(arraylevels) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).miplevels as *const _ as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_desc_t), + "::", + stringify!(miplevels) + ) + ); +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_image_properties_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_image_properties_version_t { + #[doc = "< version 0.91"] + ZE_IMAGE_PROPERTIES_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_image_properties_t"] +pub use self::_ze_image_properties_version_t as ze_image_properties_version_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported sampler filtering flags"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_image_sampler_filter_flags_t { + #[doc = "< device does not support filtering"] + ZE_IMAGE_SAMPLER_FILTER_FLAGS_NONE = 0, + #[doc = "< device supports point filtering"] + ZE_IMAGE_SAMPLER_FILTER_FLAGS_POINT = 1, + #[doc = "< device supports linear filtering"] + ZE_IMAGE_SAMPLER_FILTER_FLAGS_LINEAR = 2, +} +#[doc = ""] +#[doc = " @brief Supported sampler filtering flags"] +pub use self::_ze_image_sampler_filter_flags_t as ze_image_sampler_filter_flags_t; +#[doc = ""] +#[doc = " @brief Image properties"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_image_properties_t { + #[doc = "< [in] ::ZE_IMAGE_PROPERTIES_VERSION_CURRENT"] + pub version: ze_image_properties_version_t, + #[doc = "< [out] supported sampler filtering"] + pub samplerFilterFlags: ze_image_sampler_filter_flags_t, +} +#[test] +fn bindgen_test_layout__ze_image_properties_t() { + assert_eq!( + ::std::mem::size_of::<_ze_image_properties_t>(), + 8usize, + concat!("Size of: ", stringify!(_ze_image_properties_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_image_properties_t>(), + 4usize, + concat!("Alignment of ", stringify!(_ze_image_properties_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_image_properties_t>())).version as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_properties_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_image_properties_t>())).samplerFilterFlags as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_image_properties_t), + "::", + stringify!(samplerFilterFlags) + ) + ); +} +extern "C" { + #[doc = ""] + #[doc = " @brief Retrieves supported properties of an image."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDevice`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == desc`"] + #[doc = " + `nullptr == pImageProperties`"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] + #[doc = " + `::ZE_IMAGE_DESC_VERSION_CURRENT < desc->version`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + desc->flags"] + #[doc = " + desc->type"] + pub fn zeImageGetProperties( + hDevice: ze_device_handle_t, + desc: *const ze_image_desc_t, + pImageProperties: *mut ze_image_properties_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Creates a image object on the device."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The image is only visible to the device on which it was created."] + #[doc = " - The image can be copied to another device using the"] + #[doc = " ::::zeCommandListAppendImageCopy functions."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - clCreateImage"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDevice`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == desc`"] + #[doc = " + `nullptr == phImage`"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] + #[doc = " + `::ZE_IMAGE_DESC_VERSION_CURRENT < desc->version`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + desc->flags"] + #[doc = " + desc->type"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] + pub fn zeImageCreate( + hDevice: ze_device_handle_t, + desc: *const ze_image_desc_t, + phImage: *mut ze_image_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Deletes a image object."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application is responsible for making sure the device is not"] + #[doc = " currently referencing the image before it is deleted"] + #[doc = " - The implementation of this function will immediately free all Host and"] + #[doc = " Device allocations associated with this image"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same image handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hImage`"] + #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] + pub fn zeImageDestroy(hImage: ze_image_handle_t) -> ze_result_t; +} extern "C" { #[doc = ""] #[doc = " @brief Appends an execution and global memory barrier into a command list."] @@ -3003,11 +3556,9 @@ extern "C" { #[doc = " - If numWaitEvents is zero, then all previous commands are completed"] #[doc = " prior to the execution of the barrier."] #[doc = " - If numWaitEvents is non-zero, then then all phWaitEvents must be"] - #[doc = " signalled prior to the execution of the barrier."] + #[doc = " signaled prior to the execution of the barrier."] #[doc = " - This command blocks all following commands from beginning until the"] #[doc = " execution of the barrier completes."] - #[doc = " - Memory and cache hierarchies are flushed and invalidated sufficient"] - #[doc = " for device and host access."] #[doc = " - The application may **not** call this function from simultaneous"] #[doc = " threads with the same command list handle."] #[doc = " - The implementation of this function should be lock-free."] @@ -3039,11 +3590,9 @@ extern "C" { #[doc = " - If numWaitEvents is zero, then all previous commands are completed"] #[doc = " prior to the execution of the barrier."] #[doc = " - If numWaitEvents is non-zero, then then all phWaitEvents must be"] - #[doc = " signalled prior to the execution of the barrier."] + #[doc = " signaled prior to the execution of the barrier."] #[doc = " - This command blocks all following commands from beginning until the"] #[doc = " execution of the barrier completes."] - #[doc = " - Memory and cache hierarchies are flushed and invalidated sufficient"] - #[doc = " for device and host access."] #[doc = " - The application may **not** call this function from simultaneous"] #[doc = " threads with the same command list handle."] #[doc = " - The implementation of this function should be lock-free."] @@ -3090,6 +3639,2656 @@ extern "C" { #[doc = " + `nullptr == hDevice`"] pub fn zeDeviceSystemBarrier(hDevice: ze_device_handle_t) -> ze_result_t; } +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_module_desc_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_module_desc_version_t { + #[doc = "< version 0.91"] + ZE_MODULE_DESC_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_module_desc_t"] +pub use self::_ze_module_desc_version_t as ze_module_desc_version_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported module creation input formats"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_module_format_t { + #[doc = "< Format is SPIRV IL format"] + ZE_MODULE_FORMAT_IL_SPIRV = 0, + #[doc = "< Format is device native format"] + ZE_MODULE_FORMAT_NATIVE = 1, +} +#[doc = ""] +#[doc = " @brief Supported module creation input formats"] +pub use self::_ze_module_format_t as ze_module_format_t; +#[doc = ""] +#[doc = " @brief Specialization constants - User defined constants"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_module_constants_t { + #[doc = "< [in] Number of specialization constants."] + pub numConstants: u32, + #[doc = "< [in] Pointer to array of IDs that is sized to numConstants."] + pub pConstantIds: *const u32, + #[doc = "< [in] Pointer to array of values that is sized to numConstants."] + pub pConstantValues: *const u64, +} +#[test] +fn bindgen_test_layout__ze_module_constants_t() { + assert_eq!( + ::std::mem::size_of::<_ze_module_constants_t>(), + 24usize, + concat!("Size of: ", stringify!(_ze_module_constants_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_module_constants_t>(), + 8usize, + concat!("Alignment of ", stringify!(_ze_module_constants_t)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_module_constants_t>())).numConstants as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_module_constants_t), + "::", + stringify!(numConstants) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_module_constants_t>())).pConstantIds as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_ze_module_constants_t), + "::", + stringify!(pConstantIds) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_module_constants_t>())).pConstantValues as *const _ as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_ze_module_constants_t), + "::", + stringify!(pConstantValues) + ) + ); +} +#[doc = ""] +#[doc = " @brief Module descriptor"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_module_desc_t { + #[doc = "< [in] ::ZE_MODULE_DESC_VERSION_CURRENT"] + pub version: ze_module_desc_version_t, + #[doc = "< [in] Module format passed in with pInputModule"] + pub format: ze_module_format_t, + #[doc = "< [in] size of input IL or ISA from pInputModule."] + pub inputSize: usize, + #[doc = "< [in] pointer to IL or ISA"] + pub pInputModule: *const u8, + #[doc = "< [in] string containing compiler flags. See programming guide for build"] + #[doc = "< flags."] + pub pBuildFlags: *const ::std::os::raw::c_char, + #[doc = "< [in] pointer to specialization constants. Valid only for SPIR-V input."] + #[doc = "< This must be set to nullptr if no specialization constants are"] + #[doc = "< provided."] + pub pConstants: *const ze_module_constants_t, +} +#[test] +fn bindgen_test_layout__ze_module_desc_t() { + assert_eq!( + ::std::mem::size_of::<_ze_module_desc_t>(), + 40usize, + concat!("Size of: ", stringify!(_ze_module_desc_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_module_desc_t>(), + 8usize, + concat!("Alignment of ", stringify!(_ze_module_desc_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).version as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_module_desc_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).format as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_module_desc_t), + "::", + stringify!(format) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).inputSize as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_ze_module_desc_t), + "::", + stringify!(inputSize) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).pInputModule as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_ze_module_desc_t), + "::", + stringify!(pInputModule) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).pBuildFlags as *const _ as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_ze_module_desc_t), + "::", + stringify!(pBuildFlags) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).pConstants as *const _ as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_ze_module_desc_t), + "::", + stringify!(pConstants) + ) + ); +} +extern "C" { + #[doc = ""] + #[doc = " @brief Creates module object from an input IL or native binary."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - Compiles the module for execution on the device."] + #[doc = " - The module can only be used on the device on which it was created."] + #[doc = " - The module can be copied to other devices within the same driver"] + #[doc = " instance by using ::zeModuleGetNativeBinary."] + #[doc = " - The following build options are supported:"] + #[doc = " + \"-ze-opt-disable\" - Disable optimizations"] + #[doc = " + \"-ze-opt-greater-than-4GB-buffer-required\" - Use 64-bit offset"] + #[doc = " calculations for buffers."] + #[doc = " + \"-ze-opt-large-register-file\" - Increase number of registers"] + #[doc = " available to threads."] + #[doc = " - A build log can optionally be returned to the caller. The caller is"] + #[doc = " responsible for destroying build log using ::zeModuleBuildLogDestroy."] + #[doc = " - The module descriptor constants are only supported for SPIR-V"] + #[doc = " specialization constants."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDevice`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == desc`"] + #[doc = " + `nullptr == desc->pInputModule`"] + #[doc = " + `nullptr == desc->pBuildFlags`"] + #[doc = " + `nullptr == desc->pConstants`"] + #[doc = " + `nullptr == phModule`"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] + #[doc = " + `::ZE_MODULE_DESC_VERSION_CURRENT < desc->version`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + desc->format"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NATIVE_BINARY"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SIZE"] + #[doc = " + `0 == desc->inputSize`"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_MODULE_BUILD_FAILURE"] + pub fn zeModuleCreate( + hDevice: ze_device_handle_t, + desc: *const ze_module_desc_t, + phModule: *mut ze_module_handle_t, + phBuildLog: *mut ze_module_build_log_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Destroys module"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application is responsible for making sure the device is not"] + #[doc = " currently referencing the module before it is deleted"] + #[doc = " - The implementation of this function will immediately free all Host and"] + #[doc = " Device allocations associated with this module"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same module handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hModule`"] + #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] + pub fn zeModuleDestroy(hModule: ze_module_handle_t) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Destroys module build log object"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The implementation of this function will immediately free all Host"] + #[doc = " allocations associated with this object"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same build log handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = " - This function can be called before or after ::zeModuleDestroy for the"] + #[doc = " associated module."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hModuleBuildLog`"] + #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] + pub fn zeModuleBuildLogDestroy(hModuleBuildLog: ze_module_build_log_handle_t) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Retrieves text string for build log."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The caller can pass nullptr for pBuildLog when querying only for size."] + #[doc = " - The caller must provide memory for build log."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hModuleBuildLog`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == pSize`"] + pub fn zeModuleBuildLogGetString( + hModuleBuildLog: ze_module_build_log_handle_t, + pSize: *mut usize, + pBuildLog: *mut ::std::os::raw::c_char, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Retrieve native binary from Module."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The native binary output can be cached to disk and new modules can be"] + #[doc = " later constructed from the cached copy."] + #[doc = " - The native binary will retain debugging information that is associated"] + #[doc = " with a module."] + #[doc = " - The caller can pass nullptr for pModuleNativeBinary when querying only"] + #[doc = " for size."] + #[doc = " - The implementation will copy the native binary into a buffer supplied"] + #[doc = " by the caller."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hModule`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == pSize`"] + pub fn zeModuleGetNativeBinary( + hModule: ze_module_handle_t, + pSize: *mut usize, + pModuleNativeBinary: *mut u8, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Retrieve global variable pointer from Module."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hModule`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == pGlobalName`"] + #[doc = " + `nullptr == pptr`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_GLOBAL_NAME"] + pub fn zeModuleGetGlobalPointer( + hModule: ze_module_handle_t, + pGlobalName: *const ::std::os::raw::c_char, + pptr: *mut *mut ::std::os::raw::c_void, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Retrieve all kernel names in the module."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hModule`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == pCount`"] + pub fn zeModuleGetKernelNames( + hModule: ze_module_handle_t, + pCount: *mut u32, + pNames: *mut *const ::std::os::raw::c_char, + ) -> ze_result_t; +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_kernel_desc_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_kernel_desc_version_t { + #[doc = "< version 0.91"] + ZE_KERNEL_DESC_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_kernel_desc_t"] +pub use self::_ze_kernel_desc_version_t as ze_kernel_desc_version_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported kernel creation flags"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_kernel_flag_t { + #[doc = "< default driver behavior"] + ZE_KERNEL_FLAG_NONE = 0, + #[doc = "< force all device allocations to be resident during execution"] + ZE_KERNEL_FLAG_FORCE_RESIDENCY = 1, +} +#[doc = ""] +#[doc = " @brief Supported kernel creation flags"] +pub use self::_ze_kernel_flag_t as ze_kernel_flag_t; +#[doc = ""] +#[doc = " @brief Kernel descriptor"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_kernel_desc_t { + #[doc = "< [in] ::ZE_KERNEL_DESC_VERSION_CURRENT"] + pub version: ze_kernel_desc_version_t, + #[doc = "< [in] creation flags"] + pub flags: ze_kernel_flag_t, + #[doc = "< [in] null-terminated name of kernel in module"] + pub pKernelName: *const ::std::os::raw::c_char, +} +#[test] +fn bindgen_test_layout__ze_kernel_desc_t() { + assert_eq!( + ::std::mem::size_of::<_ze_kernel_desc_t>(), + 16usize, + concat!("Size of: ", stringify!(_ze_kernel_desc_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_kernel_desc_t>(), + 8usize, + concat!("Alignment of ", stringify!(_ze_kernel_desc_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_kernel_desc_t>())).version as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_kernel_desc_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_kernel_desc_t>())).flags as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_kernel_desc_t), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_kernel_desc_t>())).pKernelName as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_ze_kernel_desc_t), + "::", + stringify!(pKernelName) + ) + ); +} +extern "C" { + #[doc = ""] + #[doc = " @brief Create a kernel object from a module by name"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hModule`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == desc`"] + #[doc = " + `nullptr == desc->pKernelName`"] + #[doc = " + `nullptr == phKernel`"] + #[doc = " + `nullptr == desc->pKernelName`"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] + #[doc = " + `::ZE_KERNEL_DESC_VERSION_CURRENT < desc->version`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + desc->flags"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_KERNEL_NAME"] + pub fn zeKernelCreate( + hModule: ze_module_handle_t, + desc: *const ze_kernel_desc_t, + phKernel: *mut ze_kernel_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Destroys a kernel object"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - All kernels must be destroyed before the module is destroyed."] + #[doc = " - The application is responsible for making sure the device is not"] + #[doc = " currently referencing the kernel before it is deleted"] + #[doc = " - The implementation of this function will immediately free all Host and"] + #[doc = " Device allocations associated with this kernel"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same kernel handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] + pub fn zeKernelDestroy(hKernel: ze_kernel_handle_t) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Retrieve a function pointer from a module by name"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The function pointer is unique for the device on which the module was"] + #[doc = " created."] + #[doc = " - The function pointer is no longer valid if module is destroyed."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hModule`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == pFunctionName`"] + #[doc = " + `nullptr == pfnFunction`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_FUNCTION_NAME"] + pub fn zeModuleGetFunctionPointer( + hModule: ze_module_handle_t, + pFunctionName: *const ::std::os::raw::c_char, + pfnFunction: *mut *mut ::std::os::raw::c_void, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Set group size for a kernel"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same kernel handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = " - The implementation will copy the group size information into a command"] + #[doc = " list when the function is appended."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION"] + pub fn zeKernelSetGroupSize( + hKernel: ze_kernel_handle_t, + groupSizeX: u32, + groupSizeY: u32, + groupSizeZ: u32, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Query a suggested group size for a kernel given a global size for each"] + #[doc = " dimension."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = " - This function ignores the group size that is set using"] + #[doc = " ::zeKernelSetGroupSize."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == groupSizeX`"] + #[doc = " + `nullptr == groupSizeY`"] + #[doc = " + `nullptr == groupSizeZ`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION"] + pub fn zeKernelSuggestGroupSize( + hKernel: ze_kernel_handle_t, + globalSizeX: u32, + globalSizeY: u32, + globalSizeZ: u32, + groupSizeX: *mut u32, + groupSizeY: *mut u32, + groupSizeZ: *mut u32, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Query a suggested max group count a cooperative kernel."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == totalGroupCount`"] + pub fn zeKernelSuggestMaxCooperativeGroupCount( + hKernel: ze_kernel_handle_t, + totalGroupCount: *mut u32, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Set kernel argument used on kernel launch."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - This function may **not** be called from simultaneous threads with the"] + #[doc = " same function handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = " - The implementation will copy the arguments into a command list when"] + #[doc = " the function is appended."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE"] + pub fn zeKernelSetArgumentValue( + hKernel: ze_kernel_handle_t, + argIndex: u32, + argSize: usize, + pArgValue: *const ::std::os::raw::c_void, + ) -> ze_result_t; +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Kernel attributes"] +#[doc = ""] +#[doc = " @remarks"] +#[doc = " _Analogues_"] +#[doc = " - **cl_kernel_exec_info**"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_kernel_attribute_t { + #[doc = "< Indicates that the function accesses host allocations indirectly"] + #[doc = "< (default: false, type: bool_t)"] + ZE_KERNEL_ATTR_INDIRECT_HOST_ACCESS = 0, + #[doc = "< Indicates that the function accesses device allocations indirectly"] + #[doc = "< (default: false, type: bool_t)"] + ZE_KERNEL_ATTR_INDIRECT_DEVICE_ACCESS = 1, + #[doc = "< Indicates that the function accesses shared allocations indirectly"] + #[doc = "< (default: false, type: bool_t)"] + ZE_KERNEL_ATTR_INDIRECT_SHARED_ACCESS = 2, + #[doc = "< Declared kernel attributes (i.e. can be specified with __attribute__"] + #[doc = "< in runtime language). (type: char[]) Returned as a null-terminated"] + #[doc = "< string and each attribute is separated by a space."] + #[doc = "< ::zeKernelSetAttribute is not supported for this."] + ZE_KERNEL_ATTR_SOURCE_ATTRIBUTE = 3, +} +#[doc = ""] +#[doc = " @brief Kernel attributes"] +#[doc = ""] +#[doc = " @remarks"] +#[doc = " _Analogues_"] +#[doc = " - **cl_kernel_exec_info**"] +pub use self::_ze_kernel_attribute_t as ze_kernel_attribute_t; +extern "C" { + #[doc = ""] + #[doc = " @brief Sets a kernel attribute"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - This function may **not** be called from simultaneous threads with the"] + #[doc = " same function handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - **clSetKernelExecInfo**"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + attr"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE"] + pub fn zeKernelSetAttribute( + hKernel: ze_kernel_handle_t, + attr: ze_kernel_attribute_t, + size: u32, + pValue: *const ::std::os::raw::c_void, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Gets a kernel attribute"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - This function may **not** be called from simultaneous threads with the"] + #[doc = " same function handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = " - The caller sets pValue to nullptr when querying only for size."] + #[doc = " - The caller must provide memory for pValue querying when querying size."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + attr"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == pSize`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE"] + pub fn zeKernelGetAttribute( + hKernel: ze_kernel_handle_t, + attr: ze_kernel_attribute_t, + pSize: *mut u32, + pValue: *mut ::std::os::raw::c_void, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Sets the preferred Intermediate cache configuration for a kernel."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same kernel handle."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + CacheConfig"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE"] + pub fn zeKernelSetIntermediateCacheConfig( + hKernel: ze_kernel_handle_t, + CacheConfig: ze_cache_config_t, + ) -> ze_result_t; +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_kernel_properties_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_kernel_properties_version_t { + #[doc = "< version 0.91"] + ZE_KERNEL_PROPERTIES_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_kernel_properties_t"] +pub use self::_ze_kernel_properties_version_t as ze_kernel_properties_version_t; +#[doc = ""] +#[doc = " @brief Kernel properties"] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _ze_kernel_properties_t { + #[doc = "< [in] ::ZE_KERNEL_PROPERTIES_VERSION_CURRENT"] + pub version: ze_kernel_properties_version_t, + #[doc = "< [out] Kernel name"] + pub name: [::std::os::raw::c_char; 256usize], + #[doc = "< [out] number of kernel arguments."] + pub numKernelArgs: u32, + #[doc = "< [out] required group size in the X dimension"] + pub requiredGroupSizeX: u32, + #[doc = "< [out] required group size in the Y dimension"] + pub requiredGroupSizeY: u32, + #[doc = "< [out] required group size in the Z dimension"] + pub requiredGroupSizeZ: u32, +} +#[test] +fn bindgen_test_layout__ze_kernel_properties_t() { + assert_eq!( + ::std::mem::size_of::<_ze_kernel_properties_t>(), + 276usize, + concat!("Size of: ", stringify!(_ze_kernel_properties_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_kernel_properties_t>(), + 4usize, + concat!("Alignment of ", stringify!(_ze_kernel_properties_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_kernel_properties_t>())).version as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_kernel_properties_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_kernel_properties_t>())).name as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_kernel_properties_t), + "::", + stringify!(name) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_kernel_properties_t>())).numKernelArgs as *const _ as usize + }, + 260usize, + concat!( + "Offset of field: ", + stringify!(_ze_kernel_properties_t), + "::", + stringify!(numKernelArgs) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_kernel_properties_t>())).requiredGroupSizeX as *const _ + as usize + }, + 264usize, + concat!( + "Offset of field: ", + stringify!(_ze_kernel_properties_t), + "::", + stringify!(requiredGroupSizeX) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_kernel_properties_t>())).requiredGroupSizeY as *const _ + as usize + }, + 268usize, + concat!( + "Offset of field: ", + stringify!(_ze_kernel_properties_t), + "::", + stringify!(requiredGroupSizeY) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_kernel_properties_t>())).requiredGroupSizeZ as *const _ + as usize + }, + 272usize, + concat!( + "Offset of field: ", + stringify!(_ze_kernel_properties_t), + "::", + stringify!(requiredGroupSizeZ) + ) + ); +} +extern "C" { + #[doc = ""] + #[doc = " @brief Retrieve kernel properties."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == pKernelProperties`"] + pub fn zeKernelGetProperties( + hKernel: ze_kernel_handle_t, + pKernelProperties: *mut ze_kernel_properties_t, + ) -> ze_result_t; +} +#[doc = ""] +#[doc = " @brief Kernel dispatch group count."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_group_count_t { + #[doc = "< [in] number of thread groups in X dimension"] + pub groupCountX: u32, + #[doc = "< [in] number of thread groups in Y dimension"] + pub groupCountY: u32, + #[doc = "< [in] number of thread groups in Z dimension"] + pub groupCountZ: u32, +} +#[test] +fn bindgen_test_layout__ze_group_count_t() { + assert_eq!( + ::std::mem::size_of::<_ze_group_count_t>(), + 12usize, + concat!("Size of: ", stringify!(_ze_group_count_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_group_count_t>(), + 4usize, + concat!("Alignment of ", stringify!(_ze_group_count_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_group_count_t>())).groupCountX as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_group_count_t), + "::", + stringify!(groupCountX) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_group_count_t>())).groupCountY as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_group_count_t), + "::", + stringify!(groupCountY) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_group_count_t>())).groupCountZ as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_ze_group_count_t), + "::", + stringify!(groupCountZ) + ) + ); +} +extern "C" { + #[doc = ""] + #[doc = " @brief Launch kernel over one or more work groups."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - This may **only** be called for a command list created with command"] + #[doc = " queue group ordinal that supports compute."] + #[doc = " - This function may **not** be called from simultaneous threads with the"] + #[doc = " same command list handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hCommandList`"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == pLaunchFuncArgs`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + pub fn zeCommandListAppendLaunchKernel( + hCommandList: ze_command_list_handle_t, + hKernel: ze_kernel_handle_t, + pLaunchFuncArgs: *const ze_group_count_t, + hSignalEvent: ze_event_handle_t, + numWaitEvents: u32, + phWaitEvents: *mut ze_event_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Launch kernel cooperatively over one or more work groups."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - This may **only** be called for a command list created with command"] + #[doc = " queue group ordinal that supports compute."] + #[doc = " - This may only be used for a command list that are submitted to command"] + #[doc = " queue with cooperative flag set."] + #[doc = " - This function may **not** be called from simultaneous threads with the"] + #[doc = " same command list handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = " - Use ::zeKernelSuggestMaxCooperativeGroupCount to recommend max group"] + #[doc = " count for device for cooperative functions that device supports."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hCommandList`"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == pLaunchFuncArgs`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + pub fn zeCommandListAppendLaunchCooperativeKernel( + hCommandList: ze_command_list_handle_t, + hKernel: ze_kernel_handle_t, + pLaunchFuncArgs: *const ze_group_count_t, + hSignalEvent: ze_event_handle_t, + numWaitEvents: u32, + phWaitEvents: *mut ze_event_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Launch kernel over one or more work groups using indirect arguments."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The launch arguments need to be device visible."] + #[doc = " - The launch arguments buffer may not be reused until the function has"] + #[doc = " completed on the device."] + #[doc = " - This may **only** be called for a command list created with command"] + #[doc = " queue group ordinal that supports compute."] + #[doc = " - This function may **not** be called from simultaneous threads with the"] + #[doc = " same command list handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hCommandList`"] + #[doc = " + `nullptr == hKernel`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == pLaunchArgumentsBuffer`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + pub fn zeCommandListAppendLaunchKernelIndirect( + hCommandList: ze_command_list_handle_t, + hKernel: ze_kernel_handle_t, + pLaunchArgumentsBuffer: *const ze_group_count_t, + hSignalEvent: ze_event_handle_t, + numWaitEvents: u32, + phWaitEvents: *mut ze_event_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Launch multiple kernels over one or more work groups using an array of"] + #[doc = " indirect arguments."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The array of launch arguments need to be device visible."] + #[doc = " - The array of launch arguments buffer may not be reused until the"] + #[doc = " kernel has completed on the device."] + #[doc = " - This may **only** be called for a command list created with command"] + #[doc = " queue group ordinal that supports compute."] + #[doc = " - This function may **not** be called from simultaneous threads with the"] + #[doc = " same command list handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hCommandList`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == phKernels`"] + #[doc = " + `nullptr == pCountBuffer`"] + #[doc = " + `nullptr == pLaunchArgumentsBuffer`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + pub fn zeCommandListAppendLaunchMultipleKernelsIndirect( + hCommandList: ze_command_list_handle_t, + numKernels: u32, + phKernels: *mut ze_kernel_handle_t, + pCountBuffer: *const u32, + pLaunchArgumentsBuffer: *const ze_group_count_t, + hSignalEvent: ze_event_handle_t, + numWaitEvents: u32, + phWaitEvents: *mut ze_event_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Makes memory resident for the device."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - If the application does not properly manage residency then the device"] + #[doc = " may experience unrecoverable page-faults."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDevice`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == ptr`"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] + pub fn zeDeviceMakeMemoryResident( + hDevice: ze_device_handle_t, + ptr: *mut ::std::os::raw::c_void, + size: usize, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Allows memory to be evicted from the device."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application is responsible for making sure the device is not"] + #[doc = " currently referencing the memory before it is evicted"] + #[doc = " - Memory is always implicitly evicted if it is resident when freed."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDevice`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == ptr`"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] + pub fn zeDeviceEvictMemory( + hDevice: ze_device_handle_t, + ptr: *mut ::std::os::raw::c_void, + size: usize, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Makes image resident for the device."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - If the application does not properly manage residency then the device"] + #[doc = " may experience unrecoverable page-faults."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDevice`"] + #[doc = " + `nullptr == hImage`"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] + pub fn zeDeviceMakeImageResident( + hDevice: ze_device_handle_t, + hImage: ze_image_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Allows image to be evicted from the device."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application is responsible for making sure the device is not"] + #[doc = " currently referencing the memory before it is evicted"] + #[doc = " - An image is always implicitly evicted if it is resident when"] + #[doc = " destroyed."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDevice`"] + #[doc = " + `nullptr == hImage`"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] + pub fn zeDeviceEvictImage( + hDevice: ze_device_handle_t, + hImage: ze_image_handle_t, + ) -> ze_result_t; +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_event_pool_desc_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_event_pool_desc_version_t { + #[doc = "< version 0.91"] + ZE_EVENT_POOL_DESC_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_event_pool_desc_t"] +pub use self::_ze_event_pool_desc_version_t as ze_event_pool_desc_version_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported event pool creation flags"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_event_pool_flag_t { + #[doc = "< signals and waits visible to the entire device and peer devices"] + ZE_EVENT_POOL_FLAG_DEFAULT = 0, + #[doc = "< signals and waits are also visible to host"] + ZE_EVENT_POOL_FLAG_HOST_VISIBLE = 1, + #[doc = "< signals and waits may be shared across processes"] + ZE_EVENT_POOL_FLAG_IPC = 2, + #[doc = "< Indicates all events in pool will contain timestamp information that"] + #[doc = "< can be queried using ::zeEventGetTimestamp"] + ZE_EVENT_POOL_FLAG_TIMESTAMP = 4, +} +#[doc = ""] +#[doc = " @brief Supported event pool creation flags"] +pub use self::_ze_event_pool_flag_t as ze_event_pool_flag_t; +#[doc = ""] +#[doc = " @brief Event pool descriptor"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_event_pool_desc_t { + #[doc = "< [in] ::ZE_EVENT_POOL_DESC_VERSION_CURRENT"] + pub version: ze_event_pool_desc_version_t, + #[doc = "< [in] creation flags"] + pub flags: ze_event_pool_flag_t, + #[doc = "< [in] number of events within the pool"] + pub count: u32, +} +#[test] +fn bindgen_test_layout__ze_event_pool_desc_t() { + assert_eq!( + ::std::mem::size_of::<_ze_event_pool_desc_t>(), + 12usize, + concat!("Size of: ", stringify!(_ze_event_pool_desc_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_event_pool_desc_t>(), + 4usize, + concat!("Alignment of ", stringify!(_ze_event_pool_desc_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_event_pool_desc_t>())).version as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_event_pool_desc_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_event_pool_desc_t>())).flags as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_event_pool_desc_t), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_event_pool_desc_t>())).count as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_ze_event_pool_desc_t), + "::", + stringify!(count) + ) + ); +} +extern "C" { + #[doc = ""] + #[doc = " @brief Creates a pool for a set of event(s) for the driver"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDriver`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == desc`"] + #[doc = " + `nullptr == phEventPool`"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] + #[doc = " + `::ZE_EVENT_POOL_DESC_VERSION_CURRENT < desc->version`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + desc->flags"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] + pub fn zeEventPoolCreate( + hDriver: ze_driver_handle_t, + desc: *const ze_event_pool_desc_t, + numDevices: u32, + phDevices: *mut ze_device_handle_t, + phEventPool: *mut ze_event_pool_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Deletes an event pool object."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application is responsible for destroying all event handles"] + #[doc = " created from the pool before destroying the pool itself"] + #[doc = " - The application is responsible for making sure the device is not"] + #[doc = " currently referencing the any event within the pool before it is"] + #[doc = " deleted"] + #[doc = " - The implementation of this function will immediately free all Host and"] + #[doc = " Device allocations associated with this event pool"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same event pool handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hEventPool`"] + #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] + pub fn zeEventPoolDestroy(hEventPool: ze_event_pool_handle_t) -> ze_result_t; +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_event_desc_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_event_desc_version_t { + #[doc = "< version 0.91"] + ZE_EVENT_DESC_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_event_desc_t"] +pub use self::_ze_event_desc_version_t as ze_event_desc_version_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported event scope flags"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_event_scope_flag_t { + #[doc = "< execution synchronization only; no cache hierarchies are flushed or"] + #[doc = "< invalidated"] + ZE_EVENT_SCOPE_FLAG_NONE = 0, + #[doc = "< cache hierarchies are flushed or invalidated sufficient for local"] + #[doc = "< sub-device access"] + ZE_EVENT_SCOPE_FLAG_SUBDEVICE = 1, + #[doc = "< cache hierarchies are flushed or invalidated sufficient for global"] + #[doc = "< device access and peer device access"] + ZE_EVENT_SCOPE_FLAG_DEVICE = 2, + #[doc = "< cache hierarchies are flushed or invalidated sufficient for device and"] + #[doc = "< host access"] + ZE_EVENT_SCOPE_FLAG_HOST = 4, +} +#[doc = ""] +#[doc = " @brief Supported event scope flags"] +pub use self::_ze_event_scope_flag_t as ze_event_scope_flag_t; +#[doc = ""] +#[doc = " @brief Event descriptor"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_event_desc_t { + #[doc = "< [in] ::ZE_EVENT_DESC_VERSION_CURRENT"] + pub version: ze_event_desc_version_t, + #[doc = "< [in] index of the event within the pool; must be less-than the count"] + #[doc = "< specified during pool creation"] + pub index: u32, + #[doc = "< [in] defines the scope of relevant cache hierarchies to flush on a"] + #[doc = "< signal action before the event is triggered"] + pub signal: ze_event_scope_flag_t, + #[doc = "< [in] defines the scope of relevant cache hierarchies to invalidate on"] + #[doc = "< a wait action after the event is complete"] + pub wait: ze_event_scope_flag_t, +} +#[test] +fn bindgen_test_layout__ze_event_desc_t() { + assert_eq!( + ::std::mem::size_of::<_ze_event_desc_t>(), + 16usize, + concat!("Size of: ", stringify!(_ze_event_desc_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_event_desc_t>(), + 4usize, + concat!("Alignment of ", stringify!(_ze_event_desc_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_event_desc_t>())).version as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_event_desc_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_event_desc_t>())).index as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_event_desc_t), + "::", + stringify!(index) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_event_desc_t>())).signal as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_ze_event_desc_t), + "::", + stringify!(signal) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_event_desc_t>())).wait as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(_ze_event_desc_t), + "::", + stringify!(wait) + ) + ); +} +extern "C" { + #[doc = ""] + #[doc = " @brief Creates an event on the device."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - Multiple events cannot be created using the same location within the"] + #[doc = " same pool."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - **clCreateUserEvent**"] + #[doc = " - vkCreateEvent"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hEventPool`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == desc`"] + #[doc = " + `nullptr == phEvent`"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] + #[doc = " + `::ZE_EVENT_DESC_VERSION_CURRENT < desc->version`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + desc->signal"] + #[doc = " + desc->wait"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + pub fn zeEventCreate( + hEventPool: ze_event_pool_handle_t, + desc: *const ze_event_desc_t, + phEvent: *mut ze_event_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Deletes an event object."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application is responsible for making sure the device is not"] + #[doc = " currently referencing the event before it is deleted"] + #[doc = " - The implementation of this function will immediately free all Host and"] + #[doc = " Device allocations associated with this event"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same event handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - **clReleaseEvent**"] + #[doc = " - vkDestroyEvent"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hEvent`"] + #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] + pub fn zeEventDestroy(hEvent: ze_event_handle_t) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Gets an IPC event pool handle for the specified event handle that can"] + #[doc = " be shared with another process."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hEventPool`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == phIpc`"] + pub fn zeEventPoolGetIpcHandle( + hEventPool: ze_event_pool_handle_t, + phIpc: *mut ze_ipc_event_pool_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Opens an IPC event pool handle to retrieve an event pool handle from"] + #[doc = " another process."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The event handle in this process should not be freed with"] + #[doc = " ::zeEventPoolDestroy, but rather with ::zeEventPoolCloseIpcHandle."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDriver`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == phEventPool`"] + pub fn zeEventPoolOpenIpcHandle( + hDriver: ze_driver_handle_t, + hIpc: ze_ipc_event_pool_handle_t, + phEventPool: *mut ze_event_pool_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Closes an IPC event handle in the current process."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - Closes an IPC event handle by destroying events that were opened in"] + #[doc = " this process using ::zeEventPoolOpenIpcHandle."] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same event pool handle."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hEventPool`"] + pub fn zeEventPoolCloseIpcHandle(hEventPool: ze_event_pool_handle_t) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Appends a signal of the event from the device into a command list."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same command list handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - **clSetUserEventStatus**"] + #[doc = " - vkCmdSetEvent"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hCommandList`"] + #[doc = " + `nullptr == hEvent`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + pub fn zeCommandListAppendSignalEvent( + hCommandList: ze_command_list_handle_t, + hEvent: ze_event_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Appends wait on event(s) on the device into a command list."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same command list handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hCommandList`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == phEvents`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + pub fn zeCommandListAppendWaitOnEvents( + hCommandList: ze_command_list_handle_t, + numEvents: u32, + phEvents: *mut ze_event_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Signals a event from host."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - clSetUserEventStatus"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hEvent`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + pub fn zeEventHostSignal(hEvent: ze_event_handle_t) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief The current host thread waits on an event to be signaled."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - clWaitForEvents"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hEvent`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + #[doc = " - ::ZE_RESULT_NOT_READY"] + #[doc = " + timeout expired"] + pub fn zeEventHostSynchronize(hEvent: ze_event_handle_t, timeout: u32) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Queries an event object's status."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - **clGetEventInfo**"] + #[doc = " - vkGetEventStatus"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hEvent`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + #[doc = " - ::ZE_RESULT_NOT_READY"] + #[doc = " + not signaled"] + pub fn zeEventQueryStatus(hEvent: ze_event_handle_t) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Reset an event back to not signaled state"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same command list handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - vkResetEvent"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hCommandList`"] + #[doc = " + `nullptr == hEvent`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + pub fn zeCommandListAppendEventReset( + hCommandList: ze_command_list_handle_t, + hEvent: ze_event_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Reset an event back to not signaled state"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - vkResetEvent"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hEvent`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + pub fn zeEventHostReset(hEvent: ze_event_handle_t) -> ze_result_t; +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported timestamp types"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_event_timestamp_type_t { + #[doc = "< wall-clock time start in GPU clocks for event. Data is uint64_t."] + ZE_EVENT_TIMESTAMP_GLOBAL_START = 0, + #[doc = "< wall-clock time end in GPU clocks for event.Data is uint64_t."] + ZE_EVENT_TIMESTAMP_GLOBAL_END = 1, + #[doc = "< context time start in GPU clocks for event. Only includes time while"] + #[doc = "< HW context is actively running on GPU. Data is uint64_t."] + ZE_EVENT_TIMESTAMP_CONTEXT_START = 2, + #[doc = "< context time end in GPU clocks for event. Only includes time while HW"] + #[doc = "< context is actively running on GPU. Data is uint64_t."] + ZE_EVENT_TIMESTAMP_CONTEXT_END = 3, +} +#[doc = ""] +#[doc = " @brief Supported timestamp types"] +pub use self::_ze_event_timestamp_type_t as ze_event_timestamp_type_t; +extern "C" { + #[doc = ""] + #[doc = " @brief Query timestamp information associated with an event. Event must come"] + #[doc = " from an event pool that was created using"] + #[doc = " ::ZE_EVENT_POOL_FLAG_TIMESTAMP flag."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hEvent`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + timestampType"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == dstptr`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + pub fn zeEventGetTimestamp( + hEvent: ze_event_handle_t, + timestampType: ze_event_timestamp_type_t, + dstptr: *mut ::std::os::raw::c_void, + ) -> ze_result_t; +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_sampler_desc_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_sampler_desc_version_t { + #[doc = "< version 0.91"] + ZE_SAMPLER_DESC_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_sampler_desc_t"] +pub use self::_ze_sampler_desc_version_t as ze_sampler_desc_version_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Sampler addressing modes"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_sampler_address_mode_t { + #[doc = "< No coordinate modifications for out-of-bounds image access."] + ZE_SAMPLER_ADDRESS_MODE_NONE = 0, + #[doc = "< Out-of-bounds coordinates are wrapped back around."] + ZE_SAMPLER_ADDRESS_MODE_REPEAT = 1, + #[doc = "< Out-of-bounds coordinates are clamped to edge."] + ZE_SAMPLER_ADDRESS_MODE_CLAMP = 2, + #[doc = "< Out-of-bounds coordinates are clamped to border color which is (0.0f,"] + #[doc = "< 0.0f, 0.0f, 0.0f) if image format swizzle contains alpha, otherwise"] + #[doc = "< (0.0f, 0.0f, 0.0f, 1.0f)."] + ZE_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3, + #[doc = "< Out-of-bounds coordinates are mirrored starting from edge."] + ZE_SAMPLER_ADDRESS_MODE_MIRROR = 4, +} +#[doc = ""] +#[doc = " @brief Sampler addressing modes"] +pub use self::_ze_sampler_address_mode_t as ze_sampler_address_mode_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Sampler filtering modes"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_sampler_filter_mode_t { + #[doc = "< No coordinate modifications for out of bounds image access."] + ZE_SAMPLER_FILTER_MODE_NEAREST = 0, + #[doc = "< Out-of-bounds coordinates are wrapped back around."] + ZE_SAMPLER_FILTER_MODE_LINEAR = 1, +} +#[doc = ""] +#[doc = " @brief Sampler filtering modes"] +pub use self::_ze_sampler_filter_mode_t as ze_sampler_filter_mode_t; +#[doc = ""] +#[doc = " @brief Sampler descriptor"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_sampler_desc_t { + #[doc = "< [in] ::ZE_SAMPLER_DESC_VERSION_CURRENT"] + pub version: ze_sampler_desc_version_t, + #[doc = "< [in] Sampler addressing mode to determine how out-of-bounds"] + #[doc = "< coordinates are handled."] + pub addressMode: ze_sampler_address_mode_t, + #[doc = "< [in] Sampler filter mode to determine how samples are filtered."] + pub filterMode: ze_sampler_filter_mode_t, + #[doc = "< [in] Are coordinates normalized [0, 1] or not."] + pub isNormalized: ze_bool_t, +} +#[test] +fn bindgen_test_layout__ze_sampler_desc_t() { + assert_eq!( + ::std::mem::size_of::<_ze_sampler_desc_t>(), + 16usize, + concat!("Size of: ", stringify!(_ze_sampler_desc_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_sampler_desc_t>(), + 4usize, + concat!("Alignment of ", stringify!(_ze_sampler_desc_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_sampler_desc_t>())).version as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_sampler_desc_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_sampler_desc_t>())).addressMode as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_sampler_desc_t), + "::", + stringify!(addressMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_sampler_desc_t>())).filterMode as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_ze_sampler_desc_t), + "::", + stringify!(filterMode) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_sampler_desc_t>())).isNormalized as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(_ze_sampler_desc_t), + "::", + stringify!(isNormalized) + ) + ); +} +extern "C" { + #[doc = ""] + #[doc = " @brief Creates sampler object."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The sampler can only be used on the device on which it was created."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDevice`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == desc`"] + #[doc = " + `nullptr == phSampler`"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] + #[doc = " + `::ZE_SAMPLER_DESC_VERSION_CURRENT < desc->version`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + desc->addressMode"] + #[doc = " + desc->filterMode"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + pub fn zeSamplerCreate( + hDevice: ze_device_handle_t, + desc: *const ze_sampler_desc_t, + phSampler: *mut ze_sampler_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Destroys sampler object"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application is responsible for making sure the device is not"] + #[doc = " currently referencing the sampler before it is deleted"] + #[doc = " - The implementation of this function will immediately free all Host and"] + #[doc = " Device allocations associated with this module"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same sampler handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hSampler`"] + #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] + pub fn zeSamplerDestroy(hSampler: ze_sampler_handle_t) -> ze_result_t; +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_device_mem_alloc_desc_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_device_mem_alloc_desc_version_t { + #[doc = "< version 0.91"] + ZE_DEVICE_MEM_ALLOC_DESC_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_device_mem_alloc_desc_t"] +pub use self::_ze_device_mem_alloc_desc_version_t as ze_device_mem_alloc_desc_version_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported memory allocation flags"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_device_mem_alloc_flag_t { + #[doc = "< implicit default behavior; uses driver-based heuristics"] + ZE_DEVICE_MEM_ALLOC_FLAG_DEFAULT = 0, + #[doc = "< device should cache allocation"] + ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED = 1, + #[doc = "< device should not cache allocation (UC)"] + ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_UNCACHED = 2, +} +#[doc = ""] +#[doc = " @brief Supported memory allocation flags"] +pub use self::_ze_device_mem_alloc_flag_t as ze_device_mem_alloc_flag_t; +#[doc = ""] +#[doc = " @brief Device mem alloc descriptor"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_device_mem_alloc_desc_t { + #[doc = "< [in] ::ZE_DEVICE_MEM_ALLOC_DESC_VERSION_CURRENT"] + pub version: ze_device_mem_alloc_desc_version_t, + #[doc = "< [in] flags specifying additional allocation controls"] + pub flags: ze_device_mem_alloc_flag_t, + #[doc = "< [in] ordinal of the device's local memory to allocate from;"] + #[doc = "< must be less than the count returned from ::zeDeviceGetMemoryProperties"] + pub ordinal: u32, +} +#[test] +fn bindgen_test_layout__ze_device_mem_alloc_desc_t() { + assert_eq!( + ::std::mem::size_of::<_ze_device_mem_alloc_desc_t>(), + 12usize, + concat!("Size of: ", stringify!(_ze_device_mem_alloc_desc_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_device_mem_alloc_desc_t>(), + 4usize, + concat!("Alignment of ", stringify!(_ze_device_mem_alloc_desc_t)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_device_mem_alloc_desc_t>())).version as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_device_mem_alloc_desc_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_device_mem_alloc_desc_t>())).flags as *const _ as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_device_mem_alloc_desc_t), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_device_mem_alloc_desc_t>())).ordinal as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_ze_device_mem_alloc_desc_t), + "::", + stringify!(ordinal) + ) + ); +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_host_mem_alloc_desc_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_host_mem_alloc_desc_version_t { + #[doc = "< version 0.91"] + ZE_HOST_MEM_ALLOC_DESC_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_host_mem_alloc_desc_t"] +pub use self::_ze_host_mem_alloc_desc_version_t as ze_host_mem_alloc_desc_version_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported host memory allocation flags"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_host_mem_alloc_flag_t { + #[doc = "< implicit default behavior; uses driver-based heuristics"] + ZE_HOST_MEM_ALLOC_FLAG_DEFAULT = 0, + #[doc = "< host should cache allocation"] + ZE_HOST_MEM_ALLOC_FLAG_BIAS_CACHED = 1, + #[doc = "< host should not cache allocation (UC)"] + ZE_HOST_MEM_ALLOC_FLAG_BIAS_UNCACHED = 2, + #[doc = "< host memory should be allocated write-combined (WC)"] + ZE_HOST_MEM_ALLOC_FLAG_BIAS_WRITE_COMBINED = 4, +} +#[doc = ""] +#[doc = " @brief Supported host memory allocation flags"] +pub use self::_ze_host_mem_alloc_flag_t as ze_host_mem_alloc_flag_t; +#[doc = ""] +#[doc = " @brief Host mem alloc descriptor"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_host_mem_alloc_desc_t { + #[doc = "< [in] ::ZE_HOST_MEM_ALLOC_DESC_VERSION_CURRENT"] + pub version: ze_host_mem_alloc_desc_version_t, + #[doc = "< [in] flags specifying additional allocation controls"] + pub flags: ze_host_mem_alloc_flag_t, +} +#[test] +fn bindgen_test_layout__ze_host_mem_alloc_desc_t() { + assert_eq!( + ::std::mem::size_of::<_ze_host_mem_alloc_desc_t>(), + 8usize, + concat!("Size of: ", stringify!(_ze_host_mem_alloc_desc_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_host_mem_alloc_desc_t>(), + 4usize, + concat!("Alignment of ", stringify!(_ze_host_mem_alloc_desc_t)) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_host_mem_alloc_desc_t>())).version as *const _ as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_host_mem_alloc_desc_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_host_mem_alloc_desc_t>())).flags as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_host_mem_alloc_desc_t), + "::", + stringify!(flags) + ) + ); +} +extern "C" { + #[doc = ""] + #[doc = " @brief Allocates memory that is shared between the host and one or more"] + #[doc = " devices"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - Shared allocations share ownership between the host and one or more"] + #[doc = " devices."] + #[doc = " - Shared allocations may optionally be associated with a device by"] + #[doc = " passing a handle to the device."] + #[doc = " - Devices supporting only single-device shared access capabilities may"] + #[doc = " access shared memory associated with the device."] + #[doc = " For these devices, ownership of the allocation is shared between the"] + #[doc = " host and the associated device only."] + #[doc = " - Passing nullptr as the device handle does not associate the shared"] + #[doc = " allocation with any device."] + #[doc = " For allocations with no associated device, ownership of the allocation"] + #[doc = " is shared between the host and all devices supporting cross-device"] + #[doc = " shared access capabilities."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDriver`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == device_desc`"] + #[doc = " + `nullptr == host_desc`"] + #[doc = " + `nullptr == pptr`"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] + #[doc = " + `::ZE_DEVICE_MEM_ALLOC_DESC_VERSION_CURRENT < device_desc->version`"] + #[doc = " + `::ZE_HOST_MEM_ALLOC_DESC_VERSION_CURRENT < host_desc->version`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + device_desc->flags"] + #[doc = " + host_desc->flags"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] + pub fn zeDriverAllocSharedMem( + hDriver: ze_driver_handle_t, + device_desc: *const ze_device_mem_alloc_desc_t, + host_desc: *const ze_host_mem_alloc_desc_t, + size: usize, + alignment: usize, + hDevice: ze_device_handle_t, + pptr: *mut *mut ::std::os::raw::c_void, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Allocates memory specific to a device"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - A device allocation is owned by a specific device."] + #[doc = " - In general, a device allocation may only be accessed by the device"] + #[doc = " that owns it."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDriver`"] + #[doc = " + `nullptr == hDevice`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == device_desc`"] + #[doc = " + `nullptr == pptr`"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] + #[doc = " + `::ZE_DEVICE_MEM_ALLOC_DESC_VERSION_CURRENT < device_desc->version`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + device_desc->flags"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] + pub fn zeDriverAllocDeviceMem( + hDriver: ze_driver_handle_t, + device_desc: *const ze_device_mem_alloc_desc_t, + size: usize, + alignment: usize, + hDevice: ze_device_handle_t, + pptr: *mut *mut ::std::os::raw::c_void, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Allocates host memory"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - A host allocation is owned by the host process."] + #[doc = " - Host allocations are accessible by the host and all devices within the"] + #[doc = " driver driver."] + #[doc = " - Host allocations are frequently used as staging areas to transfer data"] + #[doc = " to or from devices."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDriver`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == host_desc`"] + #[doc = " + `nullptr == pptr`"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] + #[doc = " + `::ZE_HOST_MEM_ALLOC_DESC_VERSION_CURRENT < host_desc->version`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + host_desc->flags"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] + pub fn zeDriverAllocHostMem( + hDriver: ze_driver_handle_t, + host_desc: *const ze_host_mem_alloc_desc_t, + size: usize, + alignment: usize, + pptr: *mut *mut ::std::os::raw::c_void, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Frees allocated host memory, device memory, or shared memory"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application is responsible for making sure the device is not"] + #[doc = " currently referencing the memory before it is freed"] + #[doc = " - The implementation of this function will immediately free all Host and"] + #[doc = " Device allocations associated with this memory"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same pointer."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDriver`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == ptr`"] + pub fn zeDriverFreeMem( + hDriver: ze_driver_handle_t, + ptr: *mut ::std::os::raw::c_void, + ) -> ze_result_t; +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_memory_allocation_properties_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_memory_allocation_properties_version_t { + #[doc = "< version 0.91"] + ZE_MEMORY_ALLOCATION_PROPERTIES_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_memory_allocation_properties_t"] +pub use self::_ze_memory_allocation_properties_version_t as ze_memory_allocation_properties_version_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Memory allocation type"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_memory_type_t { + #[doc = "< the memory pointed to is of unknown type"] + ZE_MEMORY_TYPE_UNKNOWN = 0, + #[doc = "< the memory pointed to is a host allocation"] + ZE_MEMORY_TYPE_HOST = 1, + #[doc = "< the memory pointed to is a device allocation"] + ZE_MEMORY_TYPE_DEVICE = 2, + #[doc = "< the memory pointed to is a shared ownership allocation"] + ZE_MEMORY_TYPE_SHARED = 3, +} +#[doc = ""] +#[doc = " @brief Memory allocation type"] +pub use self::_ze_memory_type_t as ze_memory_type_t; +#[doc = ""] +#[doc = " @brief Memory allocation properties queried using"] +#[doc = " ::zeDriverGetMemAllocProperties"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_memory_allocation_properties_t { + #[doc = "< [in] ::ZE_MEMORY_ALLOCATION_PROPERTIES_VERSION_CURRENT"] + pub version: ze_memory_allocation_properties_version_t, + #[doc = "< [out] type of allocated memory"] + pub type_: ze_memory_type_t, + #[doc = "< [out] identifier for this allocation"] + pub id: u64, +} +#[test] +fn bindgen_test_layout__ze_memory_allocation_properties_t() { + assert_eq!( + ::std::mem::size_of::<_ze_memory_allocation_properties_t>(), + 16usize, + concat!("Size of: ", stringify!(_ze_memory_allocation_properties_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_memory_allocation_properties_t>(), + 8usize, + concat!( + "Alignment of ", + stringify!(_ze_memory_allocation_properties_t) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_memory_allocation_properties_t>())).version as *const _ + as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_memory_allocation_properties_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_memory_allocation_properties_t>())).type_ as *const _ + as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_memory_allocation_properties_t), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { + &(*(::std::ptr::null::<_ze_memory_allocation_properties_t>())).id as *const _ as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_ze_memory_allocation_properties_t), + "::", + stringify!(id) + ) + ); +} +extern "C" { + #[doc = ""] + #[doc = " @brief Retrieves attributes of a memory allocation"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDriver`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == ptr`"] + #[doc = " + `nullptr == pMemAllocProperties`"] + pub fn zeDriverGetMemAllocProperties( + hDriver: ze_driver_handle_t, + ptr: *const ::std::os::raw::c_void, + pMemAllocProperties: *mut ze_memory_allocation_properties_t, + phDevice: *mut ze_device_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Retrieves the base address and/or size of an allocation"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDriver`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == ptr`"] + pub fn zeDriverGetMemAddressRange( + hDriver: ze_driver_handle_t, + ptr: *const ::std::os::raw::c_void, + pBase: *mut *mut ::std::os::raw::c_void, + pSize: *mut usize, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Creates an IPC memory handle for the specified allocation in the"] + #[doc = " sending process"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - Takes a pointer to the base of a device memory allocation and exports"] + #[doc = " it for use in another process."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDriver`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == ptr`"] + #[doc = " + `nullptr == pIpcHandle`"] + pub fn zeDriverGetMemIpcHandle( + hDriver: ze_driver_handle_t, + ptr: *const ::std::os::raw::c_void, + pIpcHandle: *mut ze_ipc_mem_handle_t, + ) -> ze_result_t; +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported IPC memory flags"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_ipc_memory_flag_t { + #[doc = "< No special flags"] + ZE_IPC_MEMORY_FLAG_NONE = 0, +} +#[doc = ""] +#[doc = " @brief Supported IPC memory flags"] +pub use self::_ze_ipc_memory_flag_t as ze_ipc_memory_flag_t; +extern "C" { + #[doc = ""] + #[doc = " @brief Opens an IPC memory handle to retrieve a device pointer in a receiving"] + #[doc = " process"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - Takes an IPC memory handle from a sending process and associates it"] + #[doc = " with a device pointer usable in this process."] + #[doc = " - The device pointer in this process should not be freed with"] + #[doc = " ::zeDriverFreeMem, but rather with ::zeDriverCloseMemIpcHandle."] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDriver`"] + #[doc = " + `nullptr == hDevice`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + flags"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == pptr`"] + pub fn zeDriverOpenMemIpcHandle( + hDriver: ze_driver_handle_t, + hDevice: ze_device_handle_t, + handle: ze_ipc_mem_handle_t, + flags: ze_ipc_memory_flag_t, + pptr: *mut *mut ::std::os::raw::c_void, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Closes an IPC memory handle in a receiving process"] + #[doc = ""] + #[doc = " @details"] + #[doc = " - Closes an IPC memory handle by unmapping memory that was opened in"] + #[doc = " this process using ::zeDriverOpenMemIpcHandle."] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same pointer."] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hDriver`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == ptr`"] + pub fn zeDriverCloseMemIpcHandle( + hDriver: ze_driver_handle_t, + ptr: *const ::std::os::raw::c_void, + ) -> ze_result_t; +} +#[repr(i32)] +#[doc = ""] +#[doc = " @brief API version of ::ze_fence_desc_t"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_fence_desc_version_t { + #[doc = "< version 0.91"] + ZE_FENCE_DESC_VERSION_CURRENT = 91, +} +#[doc = ""] +#[doc = " @brief API version of ::ze_fence_desc_t"] +pub use self::_ze_fence_desc_version_t as ze_fence_desc_version_t; +#[repr(i32)] +#[doc = ""] +#[doc = " @brief Supported fence creation flags"] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum _ze_fence_flag_t { + #[doc = "< default behavior"] + ZE_FENCE_FLAG_NONE = 0, +} +#[doc = ""] +#[doc = " @brief Supported fence creation flags"] +pub use self::_ze_fence_flag_t as ze_fence_flag_t; +#[doc = ""] +#[doc = " @brief Fence descriptor"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _ze_fence_desc_t { + #[doc = "< [in] ::ZE_FENCE_DESC_VERSION_CURRENT"] + pub version: ze_fence_desc_version_t, + #[doc = "< [in] creation flags"] + pub flags: ze_fence_flag_t, +} +#[test] +fn bindgen_test_layout__ze_fence_desc_t() { + assert_eq!( + ::std::mem::size_of::<_ze_fence_desc_t>(), + 8usize, + concat!("Size of: ", stringify!(_ze_fence_desc_t)) + ); + assert_eq!( + ::std::mem::align_of::<_ze_fence_desc_t>(), + 4usize, + concat!("Alignment of ", stringify!(_ze_fence_desc_t)) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_fence_desc_t>())).version as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_ze_fence_desc_t), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { &(*(::std::ptr::null::<_ze_fence_desc_t>())).flags as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_ze_fence_desc_t), + "::", + stringify!(flags) + ) + ); +} +extern "C" { + #[doc = ""] + #[doc = " @brief Creates a fence object on the device's command queue."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - **vkCreateFence**"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hCommandQueue`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] + #[doc = " + `nullptr == desc`"] + #[doc = " + `nullptr == phFence`"] + #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] + #[doc = " + `::ZE_FENCE_DESC_VERSION_CURRENT < desc->version`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] + #[doc = " + desc->flags"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] + #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] + pub fn zeFenceCreate( + hCommandQueue: ze_command_queue_handle_t, + desc: *const ze_fence_desc_t, + phFence: *mut ze_fence_handle_t, + ) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Deletes a fence object."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application is responsible for making sure the device is not"] + #[doc = " currently referencing the fence before it is deleted"] + #[doc = " - The implementation of this function will immediately free all Host and"] + #[doc = " Device allocations associated with this fence"] + #[doc = " - The application may **not** call this function from simultaneous"] + #[doc = " threads with the same fence handle."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - **vkDestroyFence**"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hFence`"] + #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] + pub fn zeFenceDestroy(hFence: ze_fence_handle_t) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief The current host thread waits on a fence to be signaled."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - **vkWaitForFences**"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hFence`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + #[doc = " - ::ZE_RESULT_NOT_READY"] + #[doc = " + timeout expired"] + pub fn zeFenceHostSynchronize(hFence: ze_fence_handle_t, timeout: u32) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Queries a fence object's status."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - **vkGetFenceStatus**"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hFence`"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] + #[doc = " - ::ZE_RESULT_NOT_READY"] + #[doc = " + not signaled"] + pub fn zeFenceQueryStatus(hFence: ze_fence_handle_t) -> ze_result_t; +} +extern "C" { + #[doc = ""] + #[doc = " @brief Reset a fence back to the not signaled state."] + #[doc = ""] + #[doc = " @details"] + #[doc = " - The application may call this function from simultaneous threads."] + #[doc = " - The implementation of this function should be lock-free."] + #[doc = ""] + #[doc = " @remarks"] + #[doc = " _Analogues_"] + #[doc = " - **vkResetFences**"] + #[doc = ""] + #[doc = " @returns"] + #[doc = " - ::ZE_RESULT_SUCCESS"] + #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] + #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] + #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] + #[doc = " + `nullptr == hFence`"] + pub fn zeFenceReset(hFence: ze_fence_handle_t) -> ze_result_t; +} extern "C" { #[doc = ""] #[doc = " @brief Copies host, device, or shared memory."] @@ -3539,7 +6738,6 @@ extern "C" { #[doc = ""] #[doc = " @remarks"] #[doc = " _Analogues_"] - #[doc = " - cudaMemPrefetchAsync"] #[doc = " - clEnqueueSVMMigrateMem"] #[doc = ""] #[doc = " @returns"] @@ -3556,7 +6754,7 @@ extern "C" { size: usize, ) -> ze_result_t; } -#[repr(u32)] +#[repr(i32)] #[doc = ""] #[doc = " @brief Supported memory advice hints"] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] @@ -3582,6 +6780,8 @@ pub enum _ze_memory_advice_t { #[doc = "< hints that memory should be not be cached"] ZE_MEMORY_ADVICE_BIAS_UNCACHED = 9, } +#[doc = ""] +#[doc = " @brief Supported memory advice hints"] pub use self::_ze_memory_advice_t as ze_memory_advice_t; extern "C" { #[doc = ""] @@ -3603,10 +6803,6 @@ extern "C" { #[doc = " threads with the same command list handle."] #[doc = " - The implementation of this function should be lock-free."] #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cudaMemAdvise**"] - #[doc = ""] #[doc = " @returns"] #[doc = " - ::ZE_RESULT_SUCCESS"] #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] @@ -3626,3601 +6822,3 @@ extern "C" { advice: ze_memory_advice_t, ) -> ze_result_t; } -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_event_pool_desc_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_event_pool_desc_version_t { - #[doc = "< version 1.0"] - ZE_EVENT_POOL_DESC_VERSION_CURRENT = 65536, -} -pub use self::_ze_event_pool_desc_version_t as ze_event_pool_desc_version_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported event pool creation flags"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_event_pool_flag_t { - #[doc = "< signals and waits visible to the entire device and peer devices"] - ZE_EVENT_POOL_FLAG_DEFAULT = 0, - #[doc = "< signals and waits are also visible to host"] - ZE_EVENT_POOL_FLAG_HOST_VISIBLE = 1, - #[doc = "< signals and waits may be shared across processes"] - ZE_EVENT_POOL_FLAG_IPC = 2, - #[doc = "< Indicates all events in pool will contain timestamp information that"] - #[doc = "< can be queried using ::zeEventGetTimestamp"] - ZE_EVENT_POOL_FLAG_TIMESTAMP = 4, -} -pub use self::_ze_event_pool_flag_t as ze_event_pool_flag_t; -#[doc = ""] -#[doc = " @brief Event pool descriptor"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_event_pool_desc_t { - #[doc = "< [in] ::ZE_EVENT_POOL_DESC_VERSION_CURRENT"] - pub version: ze_event_pool_desc_version_t, - #[doc = "< [in] creation flags"] - pub flags: ze_event_pool_flag_t, - #[doc = "< [in] number of events within the pool"] - pub count: u32, -} -#[test] -fn bindgen_test_layout__ze_event_pool_desc_t() { - assert_eq!( - ::std::mem::size_of::<_ze_event_pool_desc_t>(), - 12usize, - concat!("Size of: ", stringify!(_ze_event_pool_desc_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_event_pool_desc_t>(), - 4usize, - concat!("Alignment of ", stringify!(_ze_event_pool_desc_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_event_pool_desc_t>())).version as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_event_pool_desc_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_event_pool_desc_t>())).flags as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_event_pool_desc_t), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_event_pool_desc_t>())).count as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ze_event_pool_desc_t), - "::", - stringify!(count) - ) - ); -} -extern "C" { - #[doc = ""] - #[doc = " @brief Creates a pool for a set of event(s) for the driver"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDriver`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == desc`"] - #[doc = " + `nullptr == phEventPool`"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] - #[doc = " + `::ZE_EVENT_POOL_DESC_VERSION_CURRENT < desc->version`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + desc->flags"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - pub fn zeEventPoolCreate( - hDriver: ze_driver_handle_t, - desc: *const ze_event_pool_desc_t, - numDevices: u32, - phDevices: *mut ze_device_handle_t, - phEventPool: *mut ze_event_pool_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Deletes an event pool object."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application is responsible for destroying all event handles"] - #[doc = " created from the pool before destroying the pool itself"] - #[doc = " - The application is responsible for making sure the device is not"] - #[doc = " currently referencing the any event within the pool before it is"] - #[doc = " deleted"] - #[doc = " - The implementation of this function will immediately free all Host and"] - #[doc = " Device allocations associated with this event pool"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same event pool handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hEventPool`"] - #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] - pub fn zeEventPoolDestroy(hEventPool: ze_event_pool_handle_t) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_event_desc_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_event_desc_version_t { - #[doc = "< version 1.0"] - ZE_EVENT_DESC_VERSION_CURRENT = 65536, -} -pub use self::_ze_event_desc_version_t as ze_event_desc_version_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported event scope flags"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_event_scope_flag_t { - #[doc = "< execution synchronization only; no cache hierarchies are flushed or"] - #[doc = "< invalidated"] - ZE_EVENT_SCOPE_FLAG_NONE = 0, - #[doc = "< cache hierarchies are flushed or invalidated sufficient for local"] - #[doc = "< sub-device access"] - ZE_EVENT_SCOPE_FLAG_SUBDEVICE = 1, - #[doc = "< cache hierarchies are flushed or invalidated sufficient for global"] - #[doc = "< device access and peer device access"] - ZE_EVENT_SCOPE_FLAG_DEVICE = 2, - #[doc = "< cache hierarchies are flushed or invalidated sufficient for device and"] - #[doc = "< host access"] - ZE_EVENT_SCOPE_FLAG_HOST = 4, -} -pub use self::_ze_event_scope_flag_t as ze_event_scope_flag_t; -#[doc = ""] -#[doc = " @brief Event descriptor"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_event_desc_t { - #[doc = "< [in] ::ZE_EVENT_DESC_VERSION_CURRENT"] - pub version: ze_event_desc_version_t, - #[doc = "< [in] index of the event within the pool; must be less-than the count"] - #[doc = "< specified during pool creation"] - pub index: u32, - #[doc = "< [in] defines the scope of relevant cache hierarchies to flush on a"] - #[doc = "< signal action before the event is triggered"] - pub signal: ze_event_scope_flag_t, - #[doc = "< [in] defines the scope of relevant cache hierarchies to invalidate on"] - #[doc = "< a wait action after the event is complete"] - pub wait: ze_event_scope_flag_t, -} -#[test] -fn bindgen_test_layout__ze_event_desc_t() { - assert_eq!( - ::std::mem::size_of::<_ze_event_desc_t>(), - 16usize, - concat!("Size of: ", stringify!(_ze_event_desc_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_event_desc_t>(), - 4usize, - concat!("Alignment of ", stringify!(_ze_event_desc_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_event_desc_t>())).version as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_event_desc_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_event_desc_t>())).index as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_event_desc_t), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_event_desc_t>())).signal as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ze_event_desc_t), - "::", - stringify!(signal) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_event_desc_t>())).wait as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_ze_event_desc_t), - "::", - stringify!(wait) - ) - ); -} -extern "C" { - #[doc = ""] - #[doc = " @brief Creates an event on the device."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - Multiple events cannot be created using the same location within the"] - #[doc = " same pool."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **clCreateUserEvent**"] - #[doc = " - vkCreateEvent"] - #[doc = " - cuEventCreate"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hEventPool`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == desc`"] - #[doc = " + `nullptr == phEvent`"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] - #[doc = " + `::ZE_EVENT_DESC_VERSION_CURRENT < desc->version`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + desc->signal"] - #[doc = " + desc->wait"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - pub fn zeEventCreate( - hEventPool: ze_event_pool_handle_t, - desc: *const ze_event_desc_t, - phEvent: *mut ze_event_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Deletes an event object."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application is responsible for making sure the device is not"] - #[doc = " currently referencing the event before it is deleted"] - #[doc = " - The implementation of this function will immediately free all Host and"] - #[doc = " Device allocations associated with this event"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same event handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **clReleaseEvent**"] - #[doc = " - vkDestroyEvent"] - #[doc = " - cuEventDestroy"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hEvent`"] - #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] - pub fn zeEventDestroy(hEvent: ze_event_handle_t) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Gets an IPC event pool handle for the specified event handle that can"] - #[doc = " be shared with another process."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuIpcGetEventHandle**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hEventPool`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == phIpc`"] - pub fn zeEventPoolGetIpcHandle( - hEventPool: ze_event_pool_handle_t, - phIpc: *mut ze_ipc_event_pool_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Opens an IPC event pool handle to retrieve an event pool handle from"] - #[doc = " another process."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The event handle in this process should not be freed with"] - #[doc = " ::zeEventPoolDestroy, but rather with ::zeEventPoolCloseIpcHandle."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuIpcOpenMemHandle**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDriver`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == phEventPool`"] - pub fn zeEventPoolOpenIpcHandle( - hDriver: ze_driver_handle_t, - hIpc: ze_ipc_event_pool_handle_t, - phEventPool: *mut ze_event_pool_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Closes an IPC event handle in the current process."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - Closes an IPC event handle by destroying events that were opened in"] - #[doc = " this process using ::zeEventPoolOpenIpcHandle."] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same event pool handle."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuIpcCloseMemHandle**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hEventPool`"] - pub fn zeEventPoolCloseIpcHandle(hEventPool: ze_event_pool_handle_t) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Appends a signal of the event from the device into a command list."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same command list handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **clSetUserEventStatus**"] - #[doc = " - cuEventRecord"] - #[doc = " - vkCmdSetEvent"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hCommandList`"] - #[doc = " + `nullptr == hEvent`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - pub fn zeCommandListAppendSignalEvent( - hCommandList: ze_command_list_handle_t, - hEvent: ze_event_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Appends wait on event(s) on the device into a command list."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same command list handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hCommandList`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == phEvents`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - pub fn zeCommandListAppendWaitOnEvents( - hCommandList: ze_command_list_handle_t, - numEvents: u32, - phEvents: *mut ze_event_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Signals a event from host."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - clSetUserEventStatus"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hEvent`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - pub fn zeEventHostSignal(hEvent: ze_event_handle_t) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief The current host thread waits on an event to be signalled."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - clWaitForEvents"] - #[doc = " - cuEventSynchronize"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hEvent`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - #[doc = " - ::ZE_RESULT_NOT_READY"] - #[doc = " + timeout expired"] - pub fn zeEventHostSynchronize(hEvent: ze_event_handle_t, timeout: u32) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Queries an event object's status."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **clGetEventInfo**"] - #[doc = " - vkGetEventStatus"] - #[doc = " - cuEventQuery"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hEvent`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - #[doc = " - ::ZE_RESULT_NOT_READY"] - #[doc = " + not signaled"] - pub fn zeEventQueryStatus(hEvent: ze_event_handle_t) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Reset an event back to not signaled state"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same command list handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - vkResetEvent"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hCommandList`"] - #[doc = " + `nullptr == hEvent`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - pub fn zeCommandListAppendEventReset( - hCommandList: ze_command_list_handle_t, - hEvent: ze_event_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Reset an event back to not signaled state"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - vkResetEvent"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hEvent`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - pub fn zeEventHostReset(hEvent: ze_event_handle_t) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported timestamp types"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_event_timestamp_type_t { - #[doc = "< wall-clock time start in GPU clocks for event. Data is uint64_t."] - ZE_EVENT_TIMESTAMP_GLOBAL_START = 0, - #[doc = "< wall-clock time end in GPU clocks for event.Data is uint64_t."] - ZE_EVENT_TIMESTAMP_GLOBAL_END = 1, - #[doc = "< context time start in GPU clocks for event. Only includes time while"] - #[doc = "< HW context is actively running on GPU. Data is uint64_t."] - ZE_EVENT_TIMESTAMP_CONTEXT_START = 2, - #[doc = "< context time end in GPU clocks for event. Only includes time while HW"] - #[doc = "< context is actively running on GPU. Data is uint64_t."] - ZE_EVENT_TIMESTAMP_CONTEXT_END = 3, -} -pub use self::_ze_event_timestamp_type_t as ze_event_timestamp_type_t; -extern "C" { - #[doc = ""] - #[doc = " @brief Query timestamp information associated with an event. Event must come"] - #[doc = " from an event pool that was created using"] - #[doc = " ::ZE_EVENT_POOL_FLAG_TIMESTAMP flag."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hEvent`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + timestampType"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == dstptr`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - pub fn zeEventGetTimestamp( - hEvent: ze_event_handle_t, - timestampType: ze_event_timestamp_type_t, - dstptr: *mut ::std::os::raw::c_void, - ) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_fence_desc_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_fence_desc_version_t { - #[doc = "< version 1.0"] - ZE_FENCE_DESC_VERSION_CURRENT = 65536, -} -pub use self::_ze_fence_desc_version_t as ze_fence_desc_version_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported fence creation flags"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_fence_flag_t { - #[doc = "< default behavior"] - ZE_FENCE_FLAG_NONE = 0, -} -pub use self::_ze_fence_flag_t as ze_fence_flag_t; -#[doc = ""] -#[doc = " @brief Fence descriptor"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_fence_desc_t { - #[doc = "< [in] ::ZE_FENCE_DESC_VERSION_CURRENT"] - pub version: ze_fence_desc_version_t, - #[doc = "< [in] creation flags"] - pub flags: ze_fence_flag_t, -} -#[test] -fn bindgen_test_layout__ze_fence_desc_t() { - assert_eq!( - ::std::mem::size_of::<_ze_fence_desc_t>(), - 8usize, - concat!("Size of: ", stringify!(_ze_fence_desc_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_fence_desc_t>(), - 4usize, - concat!("Alignment of ", stringify!(_ze_fence_desc_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_fence_desc_t>())).version as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_fence_desc_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_fence_desc_t>())).flags as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_fence_desc_t), - "::", - stringify!(flags) - ) - ); -} -extern "C" { - #[doc = ""] - #[doc = " @brief Creates a fence object on the device's command queue."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **vkCreateFence**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hCommandQueue`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == desc`"] - #[doc = " + `nullptr == phFence`"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] - #[doc = " + `::ZE_FENCE_DESC_VERSION_CURRENT < desc->version`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + desc->flags"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - pub fn zeFenceCreate( - hCommandQueue: ze_command_queue_handle_t, - desc: *const ze_fence_desc_t, - phFence: *mut ze_fence_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Deletes a fence object."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application is responsible for making sure the device is not"] - #[doc = " currently referencing the fence before it is deleted"] - #[doc = " - The implementation of this function will immediately free all Host and"] - #[doc = " Device allocations associated with this fence"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same fence handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **vkDestroyFence**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hFence`"] - #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] - pub fn zeFenceDestroy(hFence: ze_fence_handle_t) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief The current host thread waits on a fence to be signaled."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **vkWaitForFences**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hFence`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - #[doc = " - ::ZE_RESULT_NOT_READY"] - #[doc = " + timeout expired"] - pub fn zeFenceHostSynchronize(hFence: ze_fence_handle_t, timeout: u32) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Queries a fence object's status."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **vkGetFenceStatus**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hFence`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - #[doc = " - ::ZE_RESULT_NOT_READY"] - #[doc = " + not signaled"] - pub fn zeFenceQueryStatus(hFence: ze_fence_handle_t) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Reset a fence back to the not signaled state."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **vkResetFences**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hFence`"] - pub fn zeFenceReset(hFence: ze_fence_handle_t) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_image_desc_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_image_desc_version_t { - #[doc = "< version 1.0"] - ZE_IMAGE_DESC_VERSION_CURRENT = 65536, -} -pub use self::_ze_image_desc_version_t as ze_image_desc_version_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported image creation flags"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_image_flag_t { - #[doc = "< programs will read contents"] - ZE_IMAGE_FLAG_PROGRAM_READ = 1, - #[doc = "< programs will write contents"] - ZE_IMAGE_FLAG_PROGRAM_WRITE = 2, - #[doc = "< device should cache contents"] - ZE_IMAGE_FLAG_BIAS_CACHED = 4, - #[doc = "< device should not cache contents"] - ZE_IMAGE_FLAG_BIAS_UNCACHED = 8, -} -pub use self::_ze_image_flag_t as ze_image_flag_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported image types"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_image_type_t { - #[doc = "< 1D"] - ZE_IMAGE_TYPE_1D = 0, - #[doc = "< 1D array"] - ZE_IMAGE_TYPE_1DARRAY = 1, - #[doc = "< 2D"] - ZE_IMAGE_TYPE_2D = 2, - #[doc = "< 2D array"] - ZE_IMAGE_TYPE_2DARRAY = 3, - #[doc = "< 3D"] - ZE_IMAGE_TYPE_3D = 4, - #[doc = "< Buffer"] - ZE_IMAGE_TYPE_BUFFER = 5, -} -pub use self::_ze_image_type_t as ze_image_type_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported image format layouts"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_image_format_layout_t { - #[doc = "< 8-bit single component layout"] - ZE_IMAGE_FORMAT_LAYOUT_8 = 0, - #[doc = "< 16-bit single component layout"] - ZE_IMAGE_FORMAT_LAYOUT_16 = 1, - #[doc = "< 32-bit single component layout"] - ZE_IMAGE_FORMAT_LAYOUT_32 = 2, - #[doc = "< 2-component 8-bit layout"] - ZE_IMAGE_FORMAT_LAYOUT_8_8 = 3, - #[doc = "< 4-component 8-bit layout"] - ZE_IMAGE_FORMAT_LAYOUT_8_8_8_8 = 4, - #[doc = "< 2-component 16-bit layout"] - ZE_IMAGE_FORMAT_LAYOUT_16_16 = 5, - #[doc = "< 4-component 16-bit layout"] - ZE_IMAGE_FORMAT_LAYOUT_16_16_16_16 = 6, - #[doc = "< 2-component 32-bit layout"] - ZE_IMAGE_FORMAT_LAYOUT_32_32 = 7, - #[doc = "< 4-component 32-bit layout"] - ZE_IMAGE_FORMAT_LAYOUT_32_32_32_32 = 8, - #[doc = "< 4-component 10_10_10_2 layout"] - ZE_IMAGE_FORMAT_LAYOUT_10_10_10_2 = 9, - #[doc = "< 3-component 11_11_10 layout"] - ZE_IMAGE_FORMAT_LAYOUT_11_11_10 = 10, - #[doc = "< 3-component 5_6_5 layout"] - ZE_IMAGE_FORMAT_LAYOUT_5_6_5 = 11, - #[doc = "< 4-component 5_5_5_1 layout"] - ZE_IMAGE_FORMAT_LAYOUT_5_5_5_1 = 12, - #[doc = "< 4-component 4_4_4_4 layout"] - ZE_IMAGE_FORMAT_LAYOUT_4_4_4_4 = 13, - #[doc = "< Media Format: Y8. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_Y8 = 14, - #[doc = "< Media Format: NV12. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_NV12 = 15, - #[doc = "< Media Format: YUYV. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_YUYV = 16, - #[doc = "< Media Format: VYUY. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_VYUY = 17, - #[doc = "< Media Format: YVYU. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_YVYU = 18, - #[doc = "< Media Format: UYVY. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_UYVY = 19, - #[doc = "< Media Format: AYUV. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_AYUV = 20, - #[doc = "< Media Format: YUAV. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_YUAV = 21, - #[doc = "< Media Format: P010. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_P010 = 22, - #[doc = "< Media Format: Y410. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_Y410 = 23, - #[doc = "< Media Format: P012. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_P012 = 24, - #[doc = "< Media Format: Y16. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_Y16 = 25, - #[doc = "< Media Format: P016. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_P016 = 26, - #[doc = "< Media Format: Y216. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_Y216 = 27, - #[doc = "< Media Format: P216. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_P216 = 28, - #[doc = "< Media Format: P416. Format type and swizzle is ignored for this."] - ZE_IMAGE_FORMAT_LAYOUT_P416 = 29, -} -pub use self::_ze_image_format_layout_t as ze_image_format_layout_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported image format types"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_image_format_type_t { - #[doc = "< Unsigned integer"] - ZE_IMAGE_FORMAT_TYPE_UINT = 0, - #[doc = "< Signed integer"] - ZE_IMAGE_FORMAT_TYPE_SINT = 1, - #[doc = "< Unsigned normalized integer"] - ZE_IMAGE_FORMAT_TYPE_UNORM = 2, - #[doc = "< Signed normalized integer"] - ZE_IMAGE_FORMAT_TYPE_SNORM = 3, - #[doc = "< Float"] - ZE_IMAGE_FORMAT_TYPE_FLOAT = 4, -} -pub use self::_ze_image_format_type_t as ze_image_format_type_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported image format component swizzle into channel"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_image_format_swizzle_t { - #[doc = "< Red component"] - ZE_IMAGE_FORMAT_SWIZZLE_R = 0, - #[doc = "< Green component"] - ZE_IMAGE_FORMAT_SWIZZLE_G = 1, - #[doc = "< Blue component"] - ZE_IMAGE_FORMAT_SWIZZLE_B = 2, - #[doc = "< Alpha component"] - ZE_IMAGE_FORMAT_SWIZZLE_A = 3, - #[doc = "< Zero"] - ZE_IMAGE_FORMAT_SWIZZLE_0 = 4, - #[doc = "< One"] - ZE_IMAGE_FORMAT_SWIZZLE_1 = 5, - #[doc = "< Don't care"] - ZE_IMAGE_FORMAT_SWIZZLE_X = 6, -} -pub use self::_ze_image_format_swizzle_t as ze_image_format_swizzle_t; -#[doc = ""] -#[doc = " @brief Image format descriptor"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_image_format_desc_t { - #[doc = "< [in] image format component layout"] - pub layout: ze_image_format_layout_t, - #[doc = "< [in] image format type. Media formats can not be used for"] - #[doc = "< ::ZE_IMAGE_TYPE_BUFFER."] - pub type_: ze_image_format_type_t, - #[doc = "< [in] image component swizzle into channel x"] - pub x: ze_image_format_swizzle_t, - #[doc = "< [in] image component swizzle into channel y"] - pub y: ze_image_format_swizzle_t, - #[doc = "< [in] image component swizzle into channel z"] - pub z: ze_image_format_swizzle_t, - #[doc = "< [in] image component swizzle into channel w"] - pub w: ze_image_format_swizzle_t, -} -#[test] -fn bindgen_test_layout__ze_image_format_desc_t() { - assert_eq!( - ::std::mem::size_of::<_ze_image_format_desc_t>(), - 24usize, - concat!("Size of: ", stringify!(_ze_image_format_desc_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_image_format_desc_t>(), - 4usize, - concat!("Alignment of ", stringify!(_ze_image_format_desc_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).layout as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_format_desc_t), - "::", - stringify!(layout) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).type_ as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_format_desc_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).x as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_format_desc_t), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).y as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_format_desc_t), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).z as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_format_desc_t), - "::", - stringify!(z) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_format_desc_t>())).w as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_format_desc_t), - "::", - stringify!(w) - ) - ); -} -#[doc = ""] -#[doc = " @brief Image descriptor"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_image_desc_t { - #[doc = "< [in] ::ZE_IMAGE_DESC_VERSION_CURRENT"] - pub version: ze_image_desc_version_t, - #[doc = "< [in] creation flags"] - pub flags: ze_image_flag_t, - #[doc = "< [in] image type"] - pub type_: ze_image_type_t, - #[doc = "< [in] image format"] - pub format: ze_image_format_desc_t, - #[doc = "< [in] width in pixels for ::ze_image_type_t::1D/2D/3D and bytes for"] - #[doc = "< Buffer, see ::ze_device_image_properties_t::maxImageDims1D/2D/3D and"] - #[doc = "< maxImageBufferSize."] - pub width: u64, - #[doc = "< [in] height in pixels (2D or 3D only), see"] - #[doc = "< ::ze_device_image_properties_t::maxImageDims2D/3D"] - pub height: u32, - #[doc = "< [in] depth in pixels (3D only), see"] - #[doc = "< ::ze_device_image_properties_t::maxImageDims3D"] - pub depth: u32, - #[doc = "< [in] array levels (array types only), see"] - #[doc = "< ::ze_device_image_properties_t::maxImageArraySlices"] - pub arraylevels: u32, - #[doc = "< [in] mipmap levels (must be 0)"] - pub miplevels: u32, -} -#[test] -fn bindgen_test_layout__ze_image_desc_t() { - assert_eq!( - ::std::mem::size_of::<_ze_image_desc_t>(), - 64usize, - concat!("Size of: ", stringify!(_ze_image_desc_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_image_desc_t>(), - 8usize, - concat!("Alignment of ", stringify!(_ze_image_desc_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).version as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_desc_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).flags as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_desc_t), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).type_ as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_desc_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).format as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_desc_t), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).width as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_desc_t), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).height as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_desc_t), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).depth as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_desc_t), - "::", - stringify!(depth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).arraylevels as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_desc_t), - "::", - stringify!(arraylevels) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_desc_t>())).miplevels as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_desc_t), - "::", - stringify!(miplevels) - ) - ); -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_image_properties_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_image_properties_version_t { - #[doc = "< version 1.0"] - ZE_IMAGE_PROPERTIES_VERSION_CURRENT = 65536, -} -pub use self::_ze_image_properties_version_t as ze_image_properties_version_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported sampler filtering flags"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_image_sampler_filter_flags_t { - #[doc = "< device does not support filtering"] - ZE_IMAGE_SAMPLER_FILTER_FLAGS_NONE = 0, - #[doc = "< device supports point filtering"] - ZE_IMAGE_SAMPLER_FILTER_FLAGS_POINT = 1, - #[doc = "< device supports linear filtering"] - ZE_IMAGE_SAMPLER_FILTER_FLAGS_LINEAR = 2, -} -pub use self::_ze_image_sampler_filter_flags_t as ze_image_sampler_filter_flags_t; -#[doc = ""] -#[doc = " @brief Image properties"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_image_properties_t { - #[doc = "< [in] ::ZE_IMAGE_PROPERTIES_VERSION_CURRENT"] - pub version: ze_image_properties_version_t, - #[doc = "< [out] supported sampler filtering"] - pub samplerFilterFlags: ze_image_sampler_filter_flags_t, -} -#[test] -fn bindgen_test_layout__ze_image_properties_t() { - assert_eq!( - ::std::mem::size_of::<_ze_image_properties_t>(), - 8usize, - concat!("Size of: ", stringify!(_ze_image_properties_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_image_properties_t>(), - 4usize, - concat!("Alignment of ", stringify!(_ze_image_properties_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_image_properties_t>())).version as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_properties_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_image_properties_t>())).samplerFilterFlags as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_image_properties_t), - "::", - stringify!(samplerFilterFlags) - ) - ); -} -extern "C" { - #[doc = ""] - #[doc = " @brief Retrieves supported properties of an image."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDevice`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == desc`"] - #[doc = " + `nullptr == pImageProperties`"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] - #[doc = " + `::ZE_IMAGE_DESC_VERSION_CURRENT < desc->version`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + desc->flags"] - #[doc = " + desc->type"] - pub fn zeImageGetProperties( - hDevice: ze_device_handle_t, - desc: *const ze_image_desc_t, - pImageProperties: *mut ze_image_properties_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Creates a image object on the device."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The image is only visible to the device on which it was created."] - #[doc = " - The image can be copied to another device using the"] - #[doc = " ::::zeCommandListAppendImageCopy functions."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - clCreateImage"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDevice`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == desc`"] - #[doc = " + `nullptr == phImage`"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] - #[doc = " + `::ZE_IMAGE_DESC_VERSION_CURRENT < desc->version`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + desc->flags"] - #[doc = " + desc->type"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_IMAGE_FORMAT"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - pub fn zeImageCreate( - hDevice: ze_device_handle_t, - desc: *const ze_image_desc_t, - phImage: *mut ze_image_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Deletes a image object."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application is responsible for making sure the device is not"] - #[doc = " currently referencing the image before it is deleted"] - #[doc = " - The implementation of this function will immediately free all Host and"] - #[doc = " Device allocations associated with this image"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same image handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hImage`"] - #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] - pub fn zeImageDestroy(hImage: ze_image_handle_t) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_device_mem_alloc_desc_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_device_mem_alloc_desc_version_t { - #[doc = "< version 1.0"] - ZE_DEVICE_MEM_ALLOC_DESC_VERSION_CURRENT = 65536, -} -pub use self::_ze_device_mem_alloc_desc_version_t as ze_device_mem_alloc_desc_version_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported memory allocation flags"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_device_mem_alloc_flag_t { - #[doc = "< implicit default behavior; uses driver-based heuristics"] - ZE_DEVICE_MEM_ALLOC_FLAG_DEFAULT = 0, - #[doc = "< device should cache allocation"] - ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED = 1, - #[doc = "< device should not cache allocation (UC)"] - ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_UNCACHED = 2, -} -pub use self::_ze_device_mem_alloc_flag_t as ze_device_mem_alloc_flag_t; -#[doc = ""] -#[doc = " @brief Device mem alloc descriptor"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_device_mem_alloc_desc_t { - #[doc = "< [in] ::ZE_DEVICE_MEM_ALLOC_DESC_VERSION_CURRENT"] - pub version: ze_device_mem_alloc_desc_version_t, - #[doc = "< [in] flags specifying additional allocation controls"] - pub flags: ze_device_mem_alloc_flag_t, - #[doc = "< [in] ordinal of the device's local memory to allocate from;"] - #[doc = "< must be less than the count returned from ::zeDeviceGetMemoryProperties"] - pub ordinal: u32, -} -#[test] -fn bindgen_test_layout__ze_device_mem_alloc_desc_t() { - assert_eq!( - ::std::mem::size_of::<_ze_device_mem_alloc_desc_t>(), - 12usize, - concat!("Size of: ", stringify!(_ze_device_mem_alloc_desc_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_device_mem_alloc_desc_t>(), - 4usize, - concat!("Alignment of ", stringify!(_ze_device_mem_alloc_desc_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_device_mem_alloc_desc_t>())).version as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_device_mem_alloc_desc_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_device_mem_alloc_desc_t>())).flags as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_device_mem_alloc_desc_t), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_device_mem_alloc_desc_t>())).ordinal as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ze_device_mem_alloc_desc_t), - "::", - stringify!(ordinal) - ) - ); -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_host_mem_alloc_desc_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_host_mem_alloc_desc_version_t { - #[doc = "< version 1.0"] - ZE_HOST_MEM_ALLOC_DESC_VERSION_CURRENT = 65536, -} -pub use self::_ze_host_mem_alloc_desc_version_t as ze_host_mem_alloc_desc_version_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported host memory allocation flags"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_host_mem_alloc_flag_t { - #[doc = "< implicit default behavior; uses driver-based heuristics"] - ZE_HOST_MEM_ALLOC_FLAG_DEFAULT = 0, - #[doc = "< host should cache allocation"] - ZE_HOST_MEM_ALLOC_FLAG_BIAS_CACHED = 1, - #[doc = "< host should not cache allocation (UC)"] - ZE_HOST_MEM_ALLOC_FLAG_BIAS_UNCACHED = 2, - #[doc = "< host memory should be allocated write-combined (WC)"] - ZE_HOST_MEM_ALLOC_FLAG_BIAS_WRITE_COMBINED = 4, -} -pub use self::_ze_host_mem_alloc_flag_t as ze_host_mem_alloc_flag_t; -#[doc = ""] -#[doc = " @brief Host mem alloc descriptor"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_host_mem_alloc_desc_t { - #[doc = "< [in] ::ZE_HOST_MEM_ALLOC_DESC_VERSION_CURRENT"] - pub version: ze_host_mem_alloc_desc_version_t, - #[doc = "< [in] flags specifying additional allocation controls"] - pub flags: ze_host_mem_alloc_flag_t, -} -#[test] -fn bindgen_test_layout__ze_host_mem_alloc_desc_t() { - assert_eq!( - ::std::mem::size_of::<_ze_host_mem_alloc_desc_t>(), - 8usize, - concat!("Size of: ", stringify!(_ze_host_mem_alloc_desc_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_host_mem_alloc_desc_t>(), - 4usize, - concat!("Alignment of ", stringify!(_ze_host_mem_alloc_desc_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_host_mem_alloc_desc_t>())).version as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_host_mem_alloc_desc_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_host_mem_alloc_desc_t>())).flags as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_host_mem_alloc_desc_t), - "::", - stringify!(flags) - ) - ); -} -extern "C" { - #[doc = ""] - #[doc = " @brief Allocates memory that is shared between the host and one or more"] - #[doc = " devices"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - Shared allocations share ownership between the host and one or more"] - #[doc = " devices."] - #[doc = " - Shared allocations may optionally be associated with a device by"] - #[doc = " passing a handle to the device."] - #[doc = " - Devices supporting only single-device shared access capabilities may"] - #[doc = " access shared memory associated with the device."] - #[doc = " For these devices, ownership of the allocation is shared between the"] - #[doc = " host and the associated device only."] - #[doc = " - Passing nullptr as the device handle does not associate the shared"] - #[doc = " allocation with any device."] - #[doc = " For allocations with no associated device, ownership of the allocation"] - #[doc = " is shared between the host and all devices supporting cross-device"] - #[doc = " shared access capabilities."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cudaMallocManaged**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDriver`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == device_desc`"] - #[doc = " + `nullptr == host_desc`"] - #[doc = " + `nullptr == pptr`"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] - #[doc = " + `::ZE_DEVICE_MEM_ALLOC_DESC_VERSION_CURRENT < device_desc->version`"] - #[doc = " + `::ZE_HOST_MEM_ALLOC_DESC_VERSION_CURRENT < host_desc->version`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + device_desc->flags"] - #[doc = " + host_desc->flags"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - pub fn zeDriverAllocSharedMem( - hDriver: ze_driver_handle_t, - device_desc: *const ze_device_mem_alloc_desc_t, - host_desc: *const ze_host_mem_alloc_desc_t, - size: usize, - alignment: usize, - hDevice: ze_device_handle_t, - pptr: *mut *mut ::std::os::raw::c_void, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Allocates memory specific to a device"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - A device allocation is owned by a specific device."] - #[doc = " - In general, a device allocation may only be accessed by the device"] - #[doc = " that owns it."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cudaMalloc**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDriver`"] - #[doc = " + `nullptr == hDevice`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == device_desc`"] - #[doc = " + `nullptr == pptr`"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] - #[doc = " + `::ZE_DEVICE_MEM_ALLOC_DESC_VERSION_CURRENT < device_desc->version`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + device_desc->flags"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - pub fn zeDriverAllocDeviceMem( - hDriver: ze_driver_handle_t, - device_desc: *const ze_device_mem_alloc_desc_t, - size: usize, - alignment: usize, - hDevice: ze_device_handle_t, - pptr: *mut *mut ::std::os::raw::c_void, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Allocates host memory"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - A host allocation is owned by the host process."] - #[doc = " - Host allocations are accessible by the host and all devices within the"] - #[doc = " driver driver."] - #[doc = " - Host allocations are frequently used as staging areas to transfer data"] - #[doc = " to or from devices."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cudaHostAlloc**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDriver`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == host_desc`"] - #[doc = " + `nullptr == pptr`"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] - #[doc = " + `::ZE_HOST_MEM_ALLOC_DESC_VERSION_CURRENT < host_desc->version`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + host_desc->flags"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_SIZE"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_ALIGNMENT"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - pub fn zeDriverAllocHostMem( - hDriver: ze_driver_handle_t, - host_desc: *const ze_host_mem_alloc_desc_t, - size: usize, - alignment: usize, - pptr: *mut *mut ::std::os::raw::c_void, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Frees allocated host memory, device memory, or shared memory"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application is responsible for making sure the device is not"] - #[doc = " currently referencing the memory before it is freed"] - #[doc = " - The implementation of this function will immediately free all Host and"] - #[doc = " Device allocations associated with this memory"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same pointer."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cudaFree**"] - #[doc = " - **cudaFreeHost**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDriver`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == ptr`"] - pub fn zeDriverFreeMem( - hDriver: ze_driver_handle_t, - ptr: *mut ::std::os::raw::c_void, - ) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_memory_allocation_properties_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_memory_allocation_properties_version_t { - #[doc = "< version 1.0"] - ZE_MEMORY_ALLOCATION_PROPERTIES_VERSION_CURRENT = 65536, -} -pub use self::_ze_memory_allocation_properties_version_t as ze_memory_allocation_properties_version_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Memory allocation type"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_memory_type_t { - #[doc = "< the memory pointed to is of unknown type"] - ZE_MEMORY_TYPE_UNKNOWN = 0, - #[doc = "< the memory pointed to is a host allocation"] - ZE_MEMORY_TYPE_HOST = 1, - #[doc = "< the memory pointed to is a device allocation"] - ZE_MEMORY_TYPE_DEVICE = 2, - #[doc = "< the memory pointed to is a shared ownership allocation"] - ZE_MEMORY_TYPE_SHARED = 3, -} -pub use self::_ze_memory_type_t as ze_memory_type_t; -#[doc = ""] -#[doc = " @brief Memory allocation properties queried using"] -#[doc = " ::zeDriverGetMemAllocProperties"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_memory_allocation_properties_t { - #[doc = "< [in] ::ZE_MEMORY_ALLOCATION_PROPERTIES_VERSION_CURRENT"] - pub version: ze_memory_allocation_properties_version_t, - #[doc = "< [out] type of allocated memory"] - pub type_: ze_memory_type_t, - #[doc = "< [out] identifier for this allocation"] - pub id: u64, -} -#[test] -fn bindgen_test_layout__ze_memory_allocation_properties_t() { - assert_eq!( - ::std::mem::size_of::<_ze_memory_allocation_properties_t>(), - 16usize, - concat!("Size of: ", stringify!(_ze_memory_allocation_properties_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_memory_allocation_properties_t>(), - 8usize, - concat!( - "Alignment of ", - stringify!(_ze_memory_allocation_properties_t) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_memory_allocation_properties_t>())).version as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_memory_allocation_properties_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_memory_allocation_properties_t>())).type_ as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_memory_allocation_properties_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_memory_allocation_properties_t>())).id as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ze_memory_allocation_properties_t), - "::", - stringify!(id) - ) - ); -} -extern "C" { - #[doc = ""] - #[doc = " @brief Retrieves attributes of a memory allocation"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuPointerGetAttribute**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDriver`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == ptr`"] - #[doc = " + `nullptr == pMemAllocProperties`"] - pub fn zeDriverGetMemAllocProperties( - hDriver: ze_driver_handle_t, - ptr: *const ::std::os::raw::c_void, - pMemAllocProperties: *mut ze_memory_allocation_properties_t, - phDevice: *mut ze_device_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Retrieves the base address and/or size of an allocation"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuMemGetAddressRange**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDriver`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == ptr`"] - pub fn zeDriverGetMemAddressRange( - hDriver: ze_driver_handle_t, - ptr: *const ::std::os::raw::c_void, - pBase: *mut *mut ::std::os::raw::c_void, - pSize: *mut usize, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Creates an IPC memory handle for the specified allocation in the"] - #[doc = " sending process"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - Takes a pointer to the base of a device memory allocation and exports"] - #[doc = " it for use in another process."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuIpcGetMemHandle**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDriver`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == ptr`"] - #[doc = " + `nullptr == pIpcHandle`"] - pub fn zeDriverGetMemIpcHandle( - hDriver: ze_driver_handle_t, - ptr: *const ::std::os::raw::c_void, - pIpcHandle: *mut ze_ipc_mem_handle_t, - ) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported IPC memory flags"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_ipc_memory_flag_t { - #[doc = "< No special flags"] - ZE_IPC_MEMORY_FLAG_NONE = 0, -} -pub use self::_ze_ipc_memory_flag_t as ze_ipc_memory_flag_t; -extern "C" { - #[doc = ""] - #[doc = " @brief Opens an IPC memory handle to retrieve a device pointer in a receiving"] - #[doc = " process"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - Takes an IPC memory handle from a sending process and associates it"] - #[doc = " with a device pointer usable in this process."] - #[doc = " - The device pointer in this process should not be freed with"] - #[doc = " ::zeDriverFreeMem, but rather with ::zeDriverCloseMemIpcHandle."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuIpcOpenMemHandle**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDriver`"] - #[doc = " + `nullptr == hDevice`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + flags"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == pptr`"] - pub fn zeDriverOpenMemIpcHandle( - hDriver: ze_driver_handle_t, - hDevice: ze_device_handle_t, - handle: ze_ipc_mem_handle_t, - flags: ze_ipc_memory_flag_t, - pptr: *mut *mut ::std::os::raw::c_void, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Closes an IPC memory handle in a receiving process"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - Closes an IPC memory handle by unmapping memory that was opened in"] - #[doc = " this process using ::zeDriverOpenMemIpcHandle."] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same pointer."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuIpcCloseMemHandle**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDriver`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == ptr`"] - pub fn zeDriverCloseMemIpcHandle( - hDriver: ze_driver_handle_t, - ptr: *const ::std::os::raw::c_void, - ) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_module_desc_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_module_desc_version_t { - #[doc = "< version 1.0"] - ZE_MODULE_DESC_VERSION_CURRENT = 65536, -} -pub use self::_ze_module_desc_version_t as ze_module_desc_version_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported module creation input formats"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_module_format_t { - #[doc = "< Format is SPIRV IL format"] - ZE_MODULE_FORMAT_IL_SPIRV = 0, - #[doc = "< Format is device native format"] - ZE_MODULE_FORMAT_NATIVE = 1, -} -pub use self::_ze_module_format_t as ze_module_format_t; -#[doc = ""] -#[doc = " @brief Specialization constants - User defined constants"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_module_constants_t { - #[doc = "< [in] Number of specialization constants."] - pub numConstants: u32, - #[doc = "< [in] Pointer to array of IDs that is sized to numConstants."] - pub pConstantIds: *const u32, - #[doc = "< [in] Pointer to array of values that is sized to numConstants."] - pub pConstantValues: *const u64, -} -#[test] -fn bindgen_test_layout__ze_module_constants_t() { - assert_eq!( - ::std::mem::size_of::<_ze_module_constants_t>(), - 24usize, - concat!("Size of: ", stringify!(_ze_module_constants_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_module_constants_t>(), - 8usize, - concat!("Alignment of ", stringify!(_ze_module_constants_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_module_constants_t>())).numConstants as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_module_constants_t), - "::", - stringify!(numConstants) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_module_constants_t>())).pConstantIds as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ze_module_constants_t), - "::", - stringify!(pConstantIds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_module_constants_t>())).pConstantValues as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ze_module_constants_t), - "::", - stringify!(pConstantValues) - ) - ); -} -#[doc = ""] -#[doc = " @brief Module descriptor"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_module_desc_t { - #[doc = "< [in] ::ZE_MODULE_DESC_VERSION_CURRENT"] - pub version: ze_module_desc_version_t, - #[doc = "< [in] Module format passed in with pInputModule"] - pub format: ze_module_format_t, - #[doc = "< [in] size of input IL or ISA from pInputModule."] - pub inputSize: usize, - #[doc = "< [in] pointer to IL or ISA"] - pub pInputModule: *const u8, - #[doc = "< [in] string containing compiler flags. See programming guide for build"] - #[doc = "< flags."] - pub pBuildFlags: *const ::std::os::raw::c_char, - #[doc = "< [in] pointer to specialization constants. Valid only for SPIR-V input."] - #[doc = "< This must be set to nullptr if no specialization constants are"] - #[doc = "< provided."] - pub pConstants: *const ze_module_constants_t, -} -#[test] -fn bindgen_test_layout__ze_module_desc_t() { - assert_eq!( - ::std::mem::size_of::<_ze_module_desc_t>(), - 40usize, - concat!("Size of: ", stringify!(_ze_module_desc_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_module_desc_t>(), - 8usize, - concat!("Alignment of ", stringify!(_ze_module_desc_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).version as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_module_desc_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).format as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_module_desc_t), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).inputSize as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ze_module_desc_t), - "::", - stringify!(inputSize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).pInputModule as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_ze_module_desc_t), - "::", - stringify!(pInputModule) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).pBuildFlags as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_ze_module_desc_t), - "::", - stringify!(pBuildFlags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_module_desc_t>())).pConstants as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_ze_module_desc_t), - "::", - stringify!(pConstants) - ) - ); -} -extern "C" { - #[doc = ""] - #[doc = " @brief Creates module object from an input IL or native binary."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - Compiles the module for execution on the device."] - #[doc = " - The module can only be used on the device on which it was created."] - #[doc = " - The module can be copied to other devices within the same driver"] - #[doc = " instance by using ::zeModuleGetNativeBinary."] - #[doc = " - The following build options are supported:"] - #[doc = " + \"-ze-opt-disable\" - Disable optimizations"] - #[doc = " + \"-ze-opt-greater-than-4GB-buffer-required\" - Use 64-bit offset"] - #[doc = " calculations for buffers."] - #[doc = " + \"-ze-opt-large-register-file\" - Increase number of registers"] - #[doc = " available to threads."] - #[doc = " - A build log can optionally be returned to the caller. The caller is"] - #[doc = " responsible for destroying build log using ::zeModuleBuildLogDestroy."] - #[doc = " - The module descriptor constants are only supported for SPIR-V"] - #[doc = " specialization constants."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuModuleLoad**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDevice`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == desc`"] - #[doc = " + `nullptr == desc->pInputModule`"] - #[doc = " + `nullptr == desc->pBuildFlags`"] - #[doc = " + `nullptr == desc->pConstants`"] - #[doc = " + `nullptr == phModule`"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] - #[doc = " + `::ZE_MODULE_DESC_VERSION_CURRENT < desc->version`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + desc->format"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NATIVE_BINARY"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SIZE"] - #[doc = " + `0 == desc->inputSize`"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_MODULE_BUILD_FAILURE"] - pub fn zeModuleCreate( - hDevice: ze_device_handle_t, - desc: *const ze_module_desc_t, - phModule: *mut ze_module_handle_t, - phBuildLog: *mut ze_module_build_log_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Destroys module"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application is responsible for making sure the device is not"] - #[doc = " currently referencing the module before it is deleted"] - #[doc = " - The implementation of this function will immediately free all Host and"] - #[doc = " Device allocations associated with this module"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same module handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuModuleUnload**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hModule`"] - #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] - pub fn zeModuleDestroy(hModule: ze_module_handle_t) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Destroys module build log object"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The implementation of this function will immediately free all Host"] - #[doc = " allocations associated with this object"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same build log handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = " - This function can be called before or after ::zeModuleDestroy for the"] - #[doc = " associated module."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hModuleBuildLog`"] - #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] - pub fn zeModuleBuildLogDestroy(hModuleBuildLog: ze_module_build_log_handle_t) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Retrieves text string for build log."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The caller can pass nullptr for pBuildLog when querying only for size."] - #[doc = " - The caller must provide memory for build log."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hModuleBuildLog`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == pSize`"] - pub fn zeModuleBuildLogGetString( - hModuleBuildLog: ze_module_build_log_handle_t, - pSize: *mut usize, - pBuildLog: *mut ::std::os::raw::c_char, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Retrieve native binary from Module."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The native binary output can be cached to disk and new modules can be"] - #[doc = " later constructed from the cached copy."] - #[doc = " - The native binary will retain debugging information that is associated"] - #[doc = " with a module."] - #[doc = " - The caller can pass nullptr for pModuleNativeBinary when querying only"] - #[doc = " for size."] - #[doc = " - The implementation will copy the native binary into a buffer supplied"] - #[doc = " by the caller."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hModule`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == pSize`"] - pub fn zeModuleGetNativeBinary( - hModule: ze_module_handle_t, - pSize: *mut usize, - pModuleNativeBinary: *mut u8, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Retrieve global variable pointer from Module."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hModule`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == pGlobalName`"] - #[doc = " + `nullptr == pptr`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_GLOBAL_NAME"] - pub fn zeModuleGetGlobalPointer( - hModule: ze_module_handle_t, - pGlobalName: *const ::std::os::raw::c_char, - pptr: *mut *mut ::std::os::raw::c_void, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Retrieve all kernel names in the module."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hModule`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == pCount`"] - pub fn zeModuleGetKernelNames( - hModule: ze_module_handle_t, - pCount: *mut u32, - pNames: *mut *const ::std::os::raw::c_char, - ) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_kernel_desc_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_kernel_desc_version_t { - #[doc = "< version 1.0"] - ZE_KERNEL_DESC_VERSION_CURRENT = 65536, -} -pub use self::_ze_kernel_desc_version_t as ze_kernel_desc_version_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Supported kernel creation flags"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_kernel_flag_t { - #[doc = "< default driver behavior"] - ZE_KERNEL_FLAG_NONE = 0, - #[doc = "< force all device allocations to be resident during execution"] - ZE_KERNEL_FLAG_FORCE_RESIDENCY = 1, -} -pub use self::_ze_kernel_flag_t as ze_kernel_flag_t; -#[doc = ""] -#[doc = " @brief Kernel descriptor"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_kernel_desc_t { - #[doc = "< [in] ::ZE_KERNEL_DESC_VERSION_CURRENT"] - pub version: ze_kernel_desc_version_t, - #[doc = "< [in] creation flags"] - pub flags: ze_kernel_flag_t, - #[doc = "< [in] null-terminated name of kernel in module"] - pub pKernelName: *const ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout__ze_kernel_desc_t() { - assert_eq!( - ::std::mem::size_of::<_ze_kernel_desc_t>(), - 16usize, - concat!("Size of: ", stringify!(_ze_kernel_desc_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_kernel_desc_t>(), - 8usize, - concat!("Alignment of ", stringify!(_ze_kernel_desc_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_kernel_desc_t>())).version as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_kernel_desc_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_kernel_desc_t>())).flags as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_kernel_desc_t), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_kernel_desc_t>())).pKernelName as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ze_kernel_desc_t), - "::", - stringify!(pKernelName) - ) - ); -} -extern "C" { - #[doc = ""] - #[doc = " @brief Create a kernel object from a module by name"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuModuleGetFunction**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hModule`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == desc`"] - #[doc = " + `nullptr == desc->pKernelName`"] - #[doc = " + `nullptr == phKernel`"] - #[doc = " + `nullptr == desc->pKernelName`"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] - #[doc = " + `::ZE_KERNEL_DESC_VERSION_CURRENT < desc->version`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + desc->flags"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_KERNEL_NAME"] - pub fn zeKernelCreate( - hModule: ze_module_handle_t, - desc: *const ze_kernel_desc_t, - phKernel: *mut ze_kernel_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Destroys a kernel object"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - All kernels must be destroyed before the module is destroyed."] - #[doc = " - The application is responsible for making sure the device is not"] - #[doc = " currently referencing the kernel before it is deleted"] - #[doc = " - The implementation of this function will immediately free all Host and"] - #[doc = " Device allocations associated with this kernel"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same kernel handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] - pub fn zeKernelDestroy(hKernel: ze_kernel_handle_t) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Retrieve a function pointer from a module by name"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The function pointer is unique for the device on which the module was"] - #[doc = " created."] - #[doc = " - The function pointer is no longer valid if module is destroyed."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hModule`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == pFunctionName`"] - #[doc = " + `nullptr == pfnFunction`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_FUNCTION_NAME"] - pub fn zeModuleGetFunctionPointer( - hModule: ze_module_handle_t, - pFunctionName: *const ::std::os::raw::c_char, - pfnFunction: *mut *mut ::std::os::raw::c_void, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Set group size for a kernel"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same kernel handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = " - The implementation will copy the group size information into a command"] - #[doc = " list when the function is appended."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION"] - pub fn zeKernelSetGroupSize( - hKernel: ze_kernel_handle_t, - groupSizeX: u32, - groupSizeY: u32, - groupSizeZ: u32, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Query a suggested group size for a kernel given a global size for each"] - #[doc = " dimension."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = " - This function ignores the group size that is set using"] - #[doc = " ::zeKernelSetGroupSize."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == groupSizeX`"] - #[doc = " + `nullptr == groupSizeY`"] - #[doc = " + `nullptr == groupSizeZ`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_GLOBAL_WIDTH_DIMENSION"] - pub fn zeKernelSuggestGroupSize( - hKernel: ze_kernel_handle_t, - globalSizeX: u32, - globalSizeY: u32, - globalSizeZ: u32, - groupSizeX: *mut u32, - groupSizeY: *mut u32, - groupSizeZ: *mut u32, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Query a suggested max group count a cooperative kernel."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == totalGroupCount`"] - pub fn zeKernelSuggestMaxCooperativeGroupCount( - hKernel: ze_kernel_handle_t, - totalGroupCount: *mut u32, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Set kernel argument used on kernel launch."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - This function may **not** be called from simultaneous threads with the"] - #[doc = " same function handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = " - The implementation will copy the arguments into a command list when"] - #[doc = " the function is appended."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE"] - pub fn zeKernelSetArgumentValue( - hKernel: ze_kernel_handle_t, - argIndex: u32, - argSize: usize, - pArgValue: *const ::std::os::raw::c_void, - ) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Kernel attributes"] -#[doc = ""] -#[doc = " @remarks"] -#[doc = " _Analogues_"] -#[doc = " - **cl_kernel_exec_info**"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_kernel_attribute_t { - #[doc = "< Indicates that the function accesses host allocations indirectly"] - #[doc = "< (default: false, type: bool_t)"] - ZE_KERNEL_ATTR_INDIRECT_HOST_ACCESS = 0, - #[doc = "< Indicates that the function accesses device allocations indirectly"] - #[doc = "< (default: false, type: bool_t)"] - ZE_KERNEL_ATTR_INDIRECT_DEVICE_ACCESS = 1, - #[doc = "< Indicates that the function accesses shared allocations indirectly"] - #[doc = "< (default: false, type: bool_t)"] - ZE_KERNEL_ATTR_INDIRECT_SHARED_ACCESS = 2, - #[doc = "< Declared kernel attributes (i.e. can be specified with __attribute__"] - #[doc = "< in runtime language). (type: char[]) Returned as a null-terminated"] - #[doc = "< string and each attribute is separated by a space."] - #[doc = "< ::zeKernelSetAttribute is not supported for this."] - ZE_KERNEL_ATTR_SOURCE_ATTRIBUTE = 3, -} -pub use self::_ze_kernel_attribute_t as ze_kernel_attribute_t; -extern "C" { - #[doc = ""] - #[doc = " @brief Sets a kernel attribute"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - This function may **not** be called from simultaneous threads with the"] - #[doc = " same function handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **clSetKernelExecInfo**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + attr"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE"] - pub fn zeKernelSetAttribute( - hKernel: ze_kernel_handle_t, - attr: ze_kernel_attribute_t, - size: u32, - pValue: *const ::std::os::raw::c_void, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Gets a kernel attribute"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - This function may **not** be called from simultaneous threads with the"] - #[doc = " same function handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = " - The caller sets pValue to nullptr when querying only for size."] - #[doc = " - The caller must provide memory for pValue querying when querying size."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + attr"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == pSize`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_KERNEL_ATTRIBUTE_VALUE"] - pub fn zeKernelGetAttribute( - hKernel: ze_kernel_handle_t, - attr: ze_kernel_attribute_t, - pSize: *mut u32, - pValue: *mut ::std::os::raw::c_void, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Sets the preferred Intermediate cache configuration for a kernel."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same kernel handle."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cudaFuncSetCacheConfig **"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + CacheConfig"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_FEATURE"] - pub fn zeKernelSetIntermediateCacheConfig( - hKernel: ze_kernel_handle_t, - CacheConfig: ze_cache_config_t, - ) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_kernel_properties_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_kernel_properties_version_t { - #[doc = "< version 1.0"] - ZE_KERNEL_PROPERTIES_VERSION_CURRENT = 65536, -} -pub use self::_ze_kernel_properties_version_t as ze_kernel_properties_version_t; -#[doc = ""] -#[doc = " @brief Kernel properties"] -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _ze_kernel_properties_t { - #[doc = "< [in] ::ZE_KERNEL_PROPERTIES_VERSION_CURRENT"] - pub version: ze_kernel_properties_version_t, - #[doc = "< [out] Kernel name"] - pub name: [::std::os::raw::c_char; 256usize], - #[doc = "< [out] number of kernel arguments."] - pub numKernelArgs: u32, - #[doc = "< [out] required group size in the X dimension"] - pub requiredGroupSizeX: u32, - #[doc = "< [out] required group size in the Y dimension"] - pub requiredGroupSizeY: u32, - #[doc = "< [out] required group size in the Z dimension"] - pub requiredGroupSizeZ: u32, -} -#[test] -fn bindgen_test_layout__ze_kernel_properties_t() { - assert_eq!( - ::std::mem::size_of::<_ze_kernel_properties_t>(), - 276usize, - concat!("Size of: ", stringify!(_ze_kernel_properties_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_kernel_properties_t>(), - 4usize, - concat!("Alignment of ", stringify!(_ze_kernel_properties_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_kernel_properties_t>())).version as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_kernel_properties_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_kernel_properties_t>())).name as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_kernel_properties_t), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_kernel_properties_t>())).numKernelArgs as *const _ as usize - }, - 260usize, - concat!( - "Offset of field: ", - stringify!(_ze_kernel_properties_t), - "::", - stringify!(numKernelArgs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_kernel_properties_t>())).requiredGroupSizeX as *const _ - as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(_ze_kernel_properties_t), - "::", - stringify!(requiredGroupSizeX) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_kernel_properties_t>())).requiredGroupSizeY as *const _ - as usize - }, - 268usize, - concat!( - "Offset of field: ", - stringify!(_ze_kernel_properties_t), - "::", - stringify!(requiredGroupSizeY) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_ze_kernel_properties_t>())).requiredGroupSizeZ as *const _ - as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(_ze_kernel_properties_t), - "::", - stringify!(requiredGroupSizeZ) - ) - ); -} -extern "C" { - #[doc = ""] - #[doc = " @brief Retrieve kernel properties."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuFuncGetAttribute**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == pKernelProperties`"] - pub fn zeKernelGetProperties( - hKernel: ze_kernel_handle_t, - pKernelProperties: *mut ze_kernel_properties_t, - ) -> ze_result_t; -} -#[doc = ""] -#[doc = " @brief Kernel dispatch group count."] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_group_count_t { - #[doc = "< [in] number of thread groups in X dimension"] - pub groupCountX: u32, - #[doc = "< [in] number of thread groups in Y dimension"] - pub groupCountY: u32, - #[doc = "< [in] number of thread groups in Z dimension"] - pub groupCountZ: u32, -} -#[test] -fn bindgen_test_layout__ze_group_count_t() { - assert_eq!( - ::std::mem::size_of::<_ze_group_count_t>(), - 12usize, - concat!("Size of: ", stringify!(_ze_group_count_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_group_count_t>(), - 4usize, - concat!("Alignment of ", stringify!(_ze_group_count_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_group_count_t>())).groupCountX as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_group_count_t), - "::", - stringify!(groupCountX) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_group_count_t>())).groupCountY as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_group_count_t), - "::", - stringify!(groupCountY) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_group_count_t>())).groupCountZ as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ze_group_count_t), - "::", - stringify!(groupCountZ) - ) - ); -} -extern "C" { - #[doc = ""] - #[doc = " @brief Launch kernel over one or more work groups."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - This may **not** be called for a command list created with"] - #[doc = " ::ZE_COMMAND_LIST_FLAG_COPY_ONLY."] - #[doc = " - This function may **not** be called from simultaneous threads with the"] - #[doc = " same command list handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuLaunchKernel**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hCommandList`"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == pLaunchFuncArgs`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - pub fn zeCommandListAppendLaunchKernel( - hCommandList: ze_command_list_handle_t, - hKernel: ze_kernel_handle_t, - pLaunchFuncArgs: *const ze_group_count_t, - hSignalEvent: ze_event_handle_t, - numWaitEvents: u32, - phWaitEvents: *mut ze_event_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Launch kernel cooperatively over one or more work groups."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - This may **not** be called for a command list created with"] - #[doc = " ::ZE_COMMAND_LIST_FLAG_COPY_ONLY."] - #[doc = " - This may only be used for a command list that are submitted to command"] - #[doc = " queue with cooperative flag set."] - #[doc = " - This function may **not** be called from simultaneous threads with the"] - #[doc = " same command list handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = " - Use ::zeKernelSuggestMaxCooperativeGroupCount to recommend max group"] - #[doc = " count for device for cooperative functions that device supports."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cudaLaunchCooperativeKernel**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hCommandList`"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == pLaunchFuncArgs`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - pub fn zeCommandListAppendLaunchCooperativeKernel( - hCommandList: ze_command_list_handle_t, - hKernel: ze_kernel_handle_t, - pLaunchFuncArgs: *const ze_group_count_t, - hSignalEvent: ze_event_handle_t, - numWaitEvents: u32, - phWaitEvents: *mut ze_event_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Launch kernel over one or more work groups using indirect arguments."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The launch arguments need to be device visible."] - #[doc = " - The launch arguments buffer may not be reused until the function has"] - #[doc = " completed on the device."] - #[doc = " - This may **not** be called for a command list created with"] - #[doc = " ::ZE_COMMAND_LIST_FLAG_COPY_ONLY."] - #[doc = " - This function may **not** be called from simultaneous threads with the"] - #[doc = " same command list handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuLaunchKernel**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hCommandList`"] - #[doc = " + `nullptr == hKernel`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == pLaunchArgumentsBuffer`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - pub fn zeCommandListAppendLaunchKernelIndirect( - hCommandList: ze_command_list_handle_t, - hKernel: ze_kernel_handle_t, - pLaunchArgumentsBuffer: *const ze_group_count_t, - hSignalEvent: ze_event_handle_t, - numWaitEvents: u32, - phWaitEvents: *mut ze_event_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Launch multiple kernels over one or more work groups using an array of"] - #[doc = " indirect arguments."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The array of launch arguments need to be device visible."] - #[doc = " - The array of launch arguments buffer may not be reused until the"] - #[doc = " kernel has completed on the device."] - #[doc = " - This may **not** be called for a command list created with"] - #[doc = " ::ZE_COMMAND_LIST_FLAG_COPY_ONLY."] - #[doc = " - This function may **not** be called from simultaneous threads with the"] - #[doc = " same command list handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuLaunchKernel**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hCommandList`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == phKernels`"] - #[doc = " + `nullptr == pCountBuffer`"] - #[doc = " + `nullptr == pLaunchArgumentsBuffer`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_SYNCHRONIZATION_OBJECT"] - pub fn zeCommandListAppendLaunchMultipleKernelsIndirect( - hCommandList: ze_command_list_handle_t, - numKernels: u32, - phKernels: *mut ze_kernel_handle_t, - pCountBuffer: *const u32, - pLaunchArgumentsBuffer: *const ze_group_count_t, - hSignalEvent: ze_event_handle_t, - numWaitEvents: u32, - phWaitEvents: *mut ze_event_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Makes memory resident for the device."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - If the application does not properly manage residency then the device"] - #[doc = " may experience unrecoverable page-faults."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDevice`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == ptr`"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - pub fn zeDeviceMakeMemoryResident( - hDevice: ze_device_handle_t, - ptr: *mut ::std::os::raw::c_void, - size: usize, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Allows memory to be evicted from the device."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application is responsible for making sure the device is not"] - #[doc = " currently referencing the memory before it is evicted"] - #[doc = " - Memory is always implicitly evicted if it is resident when freed."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDevice`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == ptr`"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - pub fn zeDeviceEvictMemory( - hDevice: ze_device_handle_t, - ptr: *mut ::std::os::raw::c_void, - size: usize, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Makes image resident for the device."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - If the application does not properly manage residency then the device"] - #[doc = " may experience unrecoverable page-faults."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDevice`"] - #[doc = " + `nullptr == hImage`"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - pub fn zeDeviceMakeImageResident( - hDevice: ze_device_handle_t, - hImage: ze_image_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Allows image to be evicted from the device."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application is responsible for making sure the device is not"] - #[doc = " currently referencing the memory before it is evicted"] - #[doc = " - An image is always implicitly evicted if it is resident when"] - #[doc = " destroyed."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDevice`"] - #[doc = " + `nullptr == hImage`"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - pub fn zeDeviceEvictImage( - hDevice: ze_device_handle_t, - hImage: ze_image_handle_t, - ) -> ze_result_t; -} -#[repr(u32)] -#[doc = ""] -#[doc = " @brief API version of ::ze_sampler_desc_t"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_sampler_desc_version_t { - #[doc = "< version 1.0"] - ZE_SAMPLER_DESC_VERSION_CURRENT = 65536, -} -pub use self::_ze_sampler_desc_version_t as ze_sampler_desc_version_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Sampler addressing modes"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_sampler_address_mode_t { - #[doc = "< No coordinate modifications for out-of-bounds image access."] - ZE_SAMPLER_ADDRESS_MODE_NONE = 0, - #[doc = "< Out-of-bounds coordinates are wrapped back around."] - ZE_SAMPLER_ADDRESS_MODE_REPEAT = 1, - #[doc = "< Out-of-bounds coordinates are clamped to edge."] - ZE_SAMPLER_ADDRESS_MODE_CLAMP = 2, - #[doc = "< Out-of-bounds coordinates are clamped to border color which is (0.0f,"] - #[doc = "< 0.0f, 0.0f, 0.0f) if image format swizzle contains alpha, otherwise"] - #[doc = "< (0.0f, 0.0f, 0.0f, 1.0f)."] - ZE_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3, - #[doc = "< Out-of-bounds coordinates are mirrored starting from edge."] - ZE_SAMPLER_ADDRESS_MODE_MIRROR = 4, -} -pub use self::_ze_sampler_address_mode_t as ze_sampler_address_mode_t; -#[repr(u32)] -#[doc = ""] -#[doc = " @brief Sampler filtering modes"] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum _ze_sampler_filter_mode_t { - #[doc = "< No coordinate modifications for out of bounds image access."] - ZE_SAMPLER_FILTER_MODE_NEAREST = 0, - #[doc = "< Out-of-bounds coordinates are wrapped back around."] - ZE_SAMPLER_FILTER_MODE_LINEAR = 1, -} -pub use self::_ze_sampler_filter_mode_t as ze_sampler_filter_mode_t; -#[doc = ""] -#[doc = " @brief Sampler descriptor"] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _ze_sampler_desc_t { - #[doc = "< [in] ::ZE_SAMPLER_DESC_VERSION_CURRENT"] - pub version: ze_sampler_desc_version_t, - #[doc = "< [in] Sampler addressing mode to determine how out-of-bounds"] - #[doc = "< coordinates are handled."] - pub addressMode: ze_sampler_address_mode_t, - #[doc = "< [in] Sampler filter mode to determine how samples are filtered."] - pub filterMode: ze_sampler_filter_mode_t, - #[doc = "< [in] Are coordinates normalized [0, 1] or not."] - pub isNormalized: ze_bool_t, -} -#[test] -fn bindgen_test_layout__ze_sampler_desc_t() { - assert_eq!( - ::std::mem::size_of::<_ze_sampler_desc_t>(), - 16usize, - concat!("Size of: ", stringify!(_ze_sampler_desc_t)) - ); - assert_eq!( - ::std::mem::align_of::<_ze_sampler_desc_t>(), - 4usize, - concat!("Alignment of ", stringify!(_ze_sampler_desc_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_sampler_desc_t>())).version as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_ze_sampler_desc_t), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_sampler_desc_t>())).addressMode as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_ze_sampler_desc_t), - "::", - stringify!(addressMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_sampler_desc_t>())).filterMode as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_ze_sampler_desc_t), - "::", - stringify!(filterMode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_ze_sampler_desc_t>())).isNormalized as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_ze_sampler_desc_t), - "::", - stringify!(isNormalized) - ) - ); -} -extern "C" { - #[doc = ""] - #[doc = " @brief Creates sampler object."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The sampler can only be used on the device on which it was created."] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuTexObjectCreate**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hDevice`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_POINTER"] - #[doc = " + `nullptr == desc`"] - #[doc = " + `nullptr == phSampler`"] - #[doc = " - ::ZE_RESULT_ERROR_UNSUPPORTED_VERSION"] - #[doc = " + `::ZE_SAMPLER_DESC_VERSION_CURRENT < desc->version`"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ENUMERATION"] - #[doc = " + desc->addressMode"] - #[doc = " + desc->filterMode"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - pub fn zeSamplerCreate( - hDevice: ze_device_handle_t, - desc: *const ze_sampler_desc_t, - phSampler: *mut ze_sampler_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Destroys sampler object"] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application is responsible for making sure the device is not"] - #[doc = " currently referencing the sampler before it is deleted"] - #[doc = " - The implementation of this function will immediately free all Host and"] - #[doc = " Device allocations associated with this module"] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same sampler handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuModuleUnload**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_NULL_HANDLE"] - #[doc = " + `nullptr == hSampler`"] - #[doc = " - ::ZE_RESULT_ERROR_HANDLE_OBJECT_IN_USE"] - pub fn zeSamplerDestroy(hSampler: ze_sampler_handle_t) -> ze_result_t; -} -#[doc = ""] -#[doc = " @brief Handle of command list object"] -pub type zex_command_list_handle_t = ze_command_list_handle_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _zex_command_graph_handle_t { - _unused: [u8; 0], -} -#[doc = ""] -#[doc = " @brief Handle of driver's command graph object"] -pub type zex_command_graph_handle_t = *mut _zex_command_graph_handle_t; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum ALU_REG { - GPR0 = 0, - GPR0_1 = 1, - GPR1 = 2, - GPR1_1 = 3, - GPR2 = 4, - GPR2_1 = 5, - GPR3 = 6, - GPR3_1 = 7, - GPR4 = 8, - GPR4_1 = 9, - GPR5 = 10, - GPR5_1 = 11, - GPR6 = 12, - GPR6_1 = 13, - GPR7 = 14, - GPR7_1 = 15, - GPR8 = 16, - GPR8_1 = 17, - GPR9 = 18, - GPR9_1 = 19, - GPR10 = 20, - GPR10_1 = 21, - GPR11 = 22, - GPR11_1 = 23, - GPR12 = 24, - GPR12_1 = 25, - GPR13 = 26, - GPR13_1 = 27, - GPR14 = 28, - GPR14_1 = 29, - GPR15 = 30, - GPR15_1 = 31, - GPR_MAX = 32, - PREDICATE1 = 33, - REG_MAX = 34, - CONST0 = 35, - CONST1 = 36, - NONE = 37, - MAX = 38, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum ALU_OP_TYPE { - ADD = 256, - SUB = 257, - AND = 258, - OR = 259, - XOR = 260, - STORE = 384, - STOREINV = 1408, - LOAD = 128, - LOAD0 = 129, - LOAD1 = 1153, - LOADINV = 1152, - NOOP = 0, - MAX = 1, -} -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum ALU_FLAG { - ACC = 49, - ZF = 50, - CF = 51, - NACC = 305, - NZF = 306, - NCF = 307, - MAX = 308, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _zex_alu_operation_t { - pub opType: ALU_OP_TYPE, - pub regDest: ALU_REG, - pub regSource1: ALU_REG, - pub regSource2: ALU_REG, - pub flag: ALU_FLAG, -} -#[test] -fn bindgen_test_layout__zex_alu_operation_t() { - assert_eq!( - ::std::mem::size_of::<_zex_alu_operation_t>(), - 20usize, - concat!("Size of: ", stringify!(_zex_alu_operation_t)) - ); - assert_eq!( - ::std::mem::align_of::<_zex_alu_operation_t>(), - 4usize, - concat!("Alignment of ", stringify!(_zex_alu_operation_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_zex_alu_operation_t>())).opType as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_zex_alu_operation_t), - "::", - stringify!(opType) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_zex_alu_operation_t>())).regDest as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_zex_alu_operation_t), - "::", - stringify!(regDest) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_zex_alu_operation_t>())).regSource1 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_zex_alu_operation_t), - "::", - stringify!(regSource1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_zex_alu_operation_t>())).regSource2 as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_zex_alu_operation_t), - "::", - stringify!(regSource2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_zex_alu_operation_t>())).flag as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_zex_alu_operation_t), - "::", - stringify!(flag) - ) - ); -} -pub type zex_alu_operation_t = _zex_alu_operation_t; -#[repr(u32)] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum COMMANDGRAPH_TYPE { - COMMAND = 0, - CONDITION = 1, - OR = 2, - START = 3, - MAX = 4, -} -extern "C" { - #[doc = ""] - #[doc = " @brief Creates a command graph on the device for submitting commands to any"] - #[doc = " command queue."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The application may call this function from simultaneous threads."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ARGUMENT"] - #[doc = " + nullptr == hDevice"] - #[doc = " + nullptr == desc"] - #[doc = " + nullptr == phCommandGraph"] - #[doc = " - ::ZE_RESULT_ERROR_UNKNOWN"] - #[doc = " + ::ZEX_COMMAND_GRAPH_DESC_VERSION_CURRENT < desc->version"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY"] - pub fn zexCommandGraphCreate( - hDevice: ze_device_handle_t, - desc: *const ze_command_list_desc_t, - phCommandGraph: *mut zex_command_graph_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Destroys a command graph."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The implementation of this function will immediately free all Host"] - #[doc = " allocations associated with this command graph."] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same command graph handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ARGUMENT"] - #[doc = " + nullptr == hCommandGraph"] - #[doc = " - ::ZE_RESULT_ERROR_UNKNOWN"] - pub fn zexCommandGraphDestroy(hCommandGraph: zex_command_graph_handle_t) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Closes a command graph; ready to be executed by a command queue."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The command graph will optimize the execution order of the command"] - #[doc = " lists."] - #[doc = " - A command list may **not** be reset after the command graph is closed."] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same command graph handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ARGUMENT"] - #[doc = " + nullptr == hCommandGraph"] - #[doc = " - ::ZE_RESULT_ERROR_UNKNOWN"] - pub fn zexCommandGraphClose(hCommandGraph: zex_command_graph_handle_t) -> ze_result_t; -} -extern "C" { - pub fn zexCommandGraphCreateNode( - hCommandGraph: zex_command_graph_handle_t, - phCommandNode: *mut zex_command_graph_handle_t, - phParentNodes: *mut zex_command_graph_handle_t, - noParentNodes: usize, - nodeType: COMMANDGRAPH_TYPE, - ) -> ze_result_t; -} -extern "C" { - pub fn zexCommandGraphCreateLoadRegImemNode( - hCommandGraph: zex_command_graph_handle_t, - phCommandNode: *mut zex_command_graph_handle_t, - phParentNodes: *mut zex_command_graph_handle_t, - noParentNodes: usize, - regDestination: ALU_REG, - regSourceAddress: ALU_REG, - ) -> ze_result_t; -} -extern "C" { - pub fn zexCommandGraphCreateStoreRegImemNode( - hCommandGraph: zex_command_graph_handle_t, - phCommandNode: *mut zex_command_graph_handle_t, - phParentNodes: *mut zex_command_graph_handle_t, - noParentNodes: usize, - regDestinationAddress: ALU_REG, - regSource: ALU_REG, - ) -> ze_result_t; -} -extern "C" { - pub fn zexCommandGraphNodeAddChildren( - hCommandNode: zex_command_graph_handle_t, - phChildrenNodes: *mut zex_command_graph_handle_t, - noChildrenNodes: usize, - ) -> ze_result_t; -} -extern "C" { - pub fn zexCommandGraphOpenNode( - hCommandNode: zex_command_graph_handle_t, - phCommandList: *mut zex_command_list_handle_t, - ) -> ze_result_t; -} -extern "C" { - pub fn zexCommandGraphCloseNode(hCommandNode: zex_command_graph_handle_t) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Reserve a section of contiguous command buffer space within the"] - #[doc = " command list."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - The pointer returned is valid for both Host and device access."] - #[doc = " - The application may **not** call this function from simultaneous"] - #[doc = " threads with the same command list handle."] - #[doc = " - The implementation of this function should be lock-free."] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ARGUMENT"] - #[doc = " + nullptr == hCommandList"] - #[doc = " + nullptr == ptr"] - #[doc = " + 0 for size"] - #[doc = " - ::ZE_RESULT_ERROR_UNKNOWN"] - pub fn zexCommandListReserveSpace( - hCommandList: zex_command_list_handle_t, - size: usize, - ptr: *mut *mut ::std::os::raw::c_void, - ) -> ze_result_t; -} -extern "C" { - pub fn zexCommandListAppendMILoadRegReg( - hCommandList: zex_command_list_handle_t, - destination: ALU_REG, - source: ALU_REG, - ) -> ze_result_t; -} -extern "C" { - pub fn zexCommandListAppendMILoadRegMem( - hCommandList: zex_command_list_handle_t, - reg: ALU_REG, - address: u64, - ) -> ze_result_t; -} -extern "C" { - pub fn zexCommandListAppendMILoadRegImm( - hCommandList: zex_command_list_handle_t, - destination: ALU_REG, - val: u32, - ) -> ze_result_t; -} -extern "C" { - pub fn zexCommandListAppendMIStoreRegMem( - hCommandList: zex_command_list_handle_t, - reg: ALU_REG, - address: u64, - ) -> ze_result_t; -} -extern "C" { - pub fn zexCommandListAppendMIMath( - hCommandList: zex_command_list_handle_t, - opArray: *mut zex_alu_operation_t, - noOperations: usize, - ) -> ze_result_t; -} -extern "C" { - pub fn zexCommandQueueExecuteCommandGraphs( - hCommandQueue: ze_command_queue_handle_t, - numCommandGraphs: u32, - phCommandGraphs: *mut zex_command_graph_handle_t, - hFence: ze_fence_handle_t, - ) -> ze_result_t; -} -extern "C" { - #[doc = ""] - #[doc = " @brief Initialize the 'One API' driver and must be called before any other"] - #[doc = " API function."] - #[doc = ""] - #[doc = " @details"] - #[doc = " - If this function is not called then all other functions will return"] - #[doc = " ::ZE_RESULT_ERROR_UNINITIALIZED."] - #[doc = " - Only one instance of a driver per process will be initialized."] - #[doc = " - This function is thread-safe for scenarios where multiple libraries"] - #[doc = " may initialize the driver simultaneously."] - #[doc = ""] - #[doc = " @remarks"] - #[doc = " _Analogues_"] - #[doc = " - **cuInit**"] - #[doc = ""] - #[doc = " @returns"] - #[doc = " - ::ZE_RESULT_SUCCESS"] - #[doc = " - ::ZE_RESULT_ERROR_UNINITIALIZED"] - #[doc = " - ::ZE_RESULT_ERROR_DEVICE_LOST"] - #[doc = " - ::ZE_RESULT_ERROR_INVALID_ARGUMENT"] - #[doc = " + invalid value for flags"] - #[doc = " - ::ZE_RESULT_ERROR_UNKNOWN"] - #[doc = " - ::ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY"] - pub fn zexInit(flags: ze_init_flag_t) -> ze_result_t; -} diff --git a/level_zero-sys/src/ze_loader.lib b/level_zero-sys/src/ze_loader.lib new file mode 100644 index 0000000000000000000000000000000000000000..03137fa7bec9c013ad384a60fcee825708262c30 GIT binary patch literal 70198 zcmeHQdz@TFl|CIHK!6YsSr-)}0wP8XkW7NhV%{b)c{mx6Wm!XKrju#tdDznvA?qUR zvaIX+7Li3nMC2tRq9R5_1VlhYR76BjR76BX1VluH{pxY+)~Q$DJKgcG&F^K)VTaVK(KfKx;7&>CwYiII*2hW{<*ujU+K4i{39zR<@9z5@`!{*DskDo>~Wj~_# z?oagoV~9TR0iq8+s^~*QM3Npr2>S5xnjS<5Is@sF9zh8D$R4P*~h!Aw) zOikw^1YNYJruQKPUA(g<*l@9+rxaas0+A%xa0%#A)Q_Z_5Q08~{7Je1A?ULGH38!? z&}Uzy=?sLR%TW)KPC+OLID$Tha+GujLeLe9G+l`h^!a@>orMr|_ANP?|j z0c}COO9I9g&{umjU4;;I4eCP@>f##E*LK$g%&!T0Qqi^0E9qv0psz!Zq)QQkuG?GF znFvAOKzT|!1tI8q(sU9+LC-0=p+zJKedGqvjlhuvj2l7UT%>6WLeNdKHNn=KK;J?+ zNjeQ7=w{$bLfg3+bPMW35^TB!bnCX7ng|6wsOZ~A6G^%WA?UXGnl45N`p%x3-i1)m zGm38CL?j92bUWy~4Na(v?}F|)PSc$TLEr1sbSpy8_j@&ozd=7(uIW02pgWgnLIK_h z`r!gi;&0GhM`*ehA?Qa)mvjw6(A}@obTvZIk5PV-E<*^q=KxI?BLw|qmZl33g6^HB z=~RS*9#M4PdLl{4<9(o?_G`KwA?Rm|G+l)dbpL^x&PNFP`CgjdgAnu!(u6wsg`kHN z{SxIT>28Fe2aeW+vU&jYE96(wbqGNZ97a{1k$7s3>A?Oj?0bQ?m@qbPStmm>uIet%78BLqD*UDIg@ z1wF0k4=o}|k0S&<4m%`0j1ct1kR}w^6QC!L(*zrz1pV3(If_6l@B=GJCng)4ES0e=NG+)yegrJ>~4@u`E z1nsi7rZW(Nro(PYry~UII#ts<5ej-v(ToOFB;AV;wA(68*CV`s-MSSk*R1aAU$E?L?~>(;G0s<+o?p?4S_#nHd~s8vUqW9v58 z7LN`OS4ReW>*KA3V`H_E!9~?(vtDabA}K1nbW?4l)mIy@wL;=nYE;9D;p#@%G=VT$VOtxk*#3@siV9ji5~ zt@@_gk+tSXtr4;@#@a@AJB2#Ekd_rAgY{-@AlN#Tc}kn%Yom4LM59$7Yv@dm8?iv! zRqA5`Q5;m#!of}T@mi=v^Td=qnqaI!t0o{*3uuTpzg$nd_NO?P)f>SkVx_jRXHB!V zq1GB0iWCd-Y&hCz>Z^`ytc@o|9c2_}i|Slk-#Aij$dM*wnw=cg@#bp1wR%MA7!N67 z=>aW^8>4P}QBfh@X06(C8rNbK7v)|tJX{;BN5t~Pfc%o$c&j<;jEGrefIl#lt0;%} zO%t_=nl{_?Jv%bQpW$+WEH)&u^rYIrM9Y3 z$tAT-^?};r>d3-@f!g@^nwoq)hGMzIQi!$WOAF0Nv0G6AUe(k&vyS83Z;)?TrBeLu zr7o@x4As^&#cQEeuZdzZ%x;n|J32guVvb0AiJrX7aah_-@?_Qc9~Sn~JZV){x|V{O zk8ngZh3!x}tTa!0%^_>7WUK6Xf-e`e*;3_6tese|Dwb8T70V@7R!^+SIzTtB4`Q-r z8it?ZOR9_qMV%xrD_%axL1q~EXNl^LyVltG(Uw)E^F3mHca-+x%8MO zGt0)bEN007Q%&tgH4R!#&XC8#vPZ^)%=FiXF}0}%2&P?GUhOBwk!5IeO|oQFGtW+s;>d~6JlZ(Q4vVCbf|YqKsuCQ z%gF&aBo|1q=rwMy<)yH`maDgDIJ$EDY0& z?I*^Ob=%Eqf|@-t9zX#-|E7`3c%v7C&t#Q z4`O8)`144Qf5ix9^m-wJPmhgsjK$G4u@MVE7F1S}Yu$vP+{)@n*7Bz`c=70j{Ib!8 zC^b>OOe^m_S&eV5h2z6gsQk5P5F_F%fy?D7T+*~g#jYPYk84Zz%(;M&O>@_b)9v!up&^dsjHH9s-jKZKdyplC!& z9gpP_a%5>vjENy$apy6dvkyAul)-T3F+Qhi1&mck`MhHODh6bQFSM!{mvbD$x5XwO zInSG$^_KWRR-08ypB)$A=HQaqLl=vd3-Q^z33jSRE=NaQ!qHTNh6+ebTwAGRTZe2L z?xaCT2NJlPFflCXr`VFASsUsJkf9V?QjJ<6%utFgX%%otJeut5h>P5&w52VjUEe|dUN<~ zSW8SO333E9HEVC3z*j$Z5BWE)mGv--udBB<7}w$@`toW(j;jcz`&!nFzRmw+%5xJ) z4(Ny$2DdICIX=NzR3BE2XpNib%lB0iJ;zJ*(Mu8d;Rd z))yLcRH1}YjHLXI1RwjJY^j$5dL;^ZL%o5o%?+dCRUeEuy7aq1ZsB1WR?I%3BA>6B zC}_>Ub#qQD+SMt(;TBgL0}~DN&X?bf@|~~s#(6^8gk{K)B^$C;=v2kv8|t4f&C&uLaYGc)UQ_O(nin4x7s&!4MXURbwrr>RCr{r}~KB<6aQJTSc7llb#Jvbt7 zaU?bMW93A4?vN2GF)rUXF%p+IiH^LQOIwMq zyqIQjGqacor`g}lOw{~3J|d+)yK>94kctk;h@+OO8>%{!6Fwao;>R*v(6T(XXkwF2BMAZ>*+7npJw1QBFz_%PUYJ6e-D(Ja;xq z9_u3L&xB=->bP82(yfO@M`UDIx2& zDN8oovMdJCMO&>#O&kFT7X{;pS+QEo!53G@s_W~Gx;`@JX2s`8Ys=0Hh4rY^q=pp( z1K73*?GiE;V7pZe`$^+2AQ)R4#nG_=hFc;b05i7^Yn5Nnqv$&qDU zQam{6SUF%U`Z>sD^&C@zir-2JN;*A42?hHCl8_aj-$Xk4)v^W4LLL?4U4+m0x77z* z)}U;J^0b(=m042^M%+q_$vc@dqQUZ5Gf+q7u#sa8j8>e3p;9axjDcQCP|`6?2_@_j zNuFUU($!yUZWwK16;rN(i`4~IXKRAVMRcs47#qXFVNGr#sTXWeS-dONu$5^^D=j3A5>y$?P0JgqP!V8==n2{m@rdnMdc=Xr+BoXUZR=i=i#R^PYgj!8 zxvc!>8I$~0N>I|ZN(!k+hac;e%pUz5LPNMPMXkd{in}-A2|*4QoKL1aY%?N6OlJ zVEJ?6lTvQK=Ca|jhx1suGGkDbBWa5>CUGUfvB_eQ?OorM(BD46RAYf&xNhpZa4q)i zaAnKq$e?1&A{;&#v2;XyCCk^mVzuG|+++2|=*9^(qUHQ1)|WtW2PE>?(w=DM&z_xm zqS>QDwEugFj(NZGL-XhdiH1G|9|)l1KMY?7prJG1ivYCgBk%(3VI53!X?lF zItKm#ZUW8z41C0Z_P-1=pcj1>zH>m+;3MD^&{LrGpMxI_(4s5gR|T}s=iw&@G~-I> z1w9TL`U3QV`o0KXC7@Yff^Qno9#??}^ekxem%$4<;cAp2=-977FKGD|$bfpj3V$o0 zgRVh7K)ZhpvY;nH$6gEHBA}kH!`BRG@9W^p2Q=*)uoEPlotz|m9)MampiV%?-Uu1c zqHm&nK(lXxUeF%jLOp<{-Hh@9&A0`+K-=C*)C4^UI{MovAJF{U;QI!&=XZ$S1$qXw z>2}xzYJ3;@03CM+>I2mGJ@_>N^?n~AX!#G|mj$%sPM8N;@I!>4Bkn?eK?{C_ItRV( zZupS_&Hgd`j1a$^l^E>!x0ln@~`0N4g|9kjG0!@DmWea*5)cOPJ8?@nZv|rHB6EF*O z+>_7=ddnZ-{{(dOQ}DwATJ;ujEGjxJ>e+K;tB>Z4B{(|}et$!AI0=@CC zC{s|+b7&W!1D=OHAmQ3VxV6};QlYa!Gp1DN-JogPROnRDGoYbuD|A1of4d4@59*m( zq02%0Y+s=>L3{2{p|e2y?1*?!&$J3%4Vu4Gg|>iZ?OdVrL3{5~p))|!rdQ~6(9~Tk z^iI%opvH^}-3wZ^8!$loO(9q{g|?;bXew<_JJ60ajdr4)X&0JKyV4BWjdrIO&>r+c z+LQi{UPOOSd(n&OCG=9-n_fmU>E*N!y@K|o{b+xBB^^Moq66vG$nR_DAbKs$ri1Aa zI+W(nT-F;q;Gm1ihXX&_Y^7i)jfhrDgO6T23qIjdUdS(n?xIt7#3r ziTY?Q_0v&wG`*RQp?{)d>7VI1`WJc&t)t_qO6zHW2B}6HXd?|#olc+=sX@auLZdWB zZ>1)UQ;Q~O6TOX2B5XL(ztY?3-{=&22c1g)PVc1upws9->2&%pdKdjSy_^1r-b3%D z_tE?51N1@q5Pg`=ppVd*^ietsgXh`wG1TS9>0J5*okyRf^XXG`0ezY-q>Jccx`ZyJ z&(LM`S-PA)M_172=}P(neUZLISJ9X0YWfOop|8?4^fkJczE0QCH!xJ(KsVAi=_dLX z-AuR8t@LfWjlM&-(|73(`W}6sen5B959u!Y5#3EcrhDiobT8dUKc%11{q%EmtzXgu z^ecLheoYV2Z|GtAEj>cNqetoY^cekt9;YYhN%|u_MSr5F>Cf~G{e_;TztVGrhFPgp zrc}16Y+Ko`GPSaOWrxa+m1&ioDmzzpsZ6izTA5MVt+IRN1(iK2|KCFXzlEe*$Tpa- zPs%4vHjT25mU724Q3knD%J<|wCF**K@E;RZV^}8R`=!0s$@^@H>b6~@#Pely8BZu} zbavnmC8}91&z5v*(ngzfSki`Pat=qLO3S+n38+#BbV3R0TPK=Q$c;xpI@mpM(8;*x zaAahX`vs+Yl}wwAM~w_aoxkCJGk97dcNkp6UMesLd?w-3!qY0p1?vmiV=za+vomfU zhidws|A`1+3ahxI2v2zl=MP*~xPVYOKr2$-AvnY295uvrAp6oE15d{%deG~F!&TgW zf)SLLRpoVgaqAZuHAAW8V4=A41Fkpj(tz`!^-juRfv2UU&jC*!`7h@>z|#3(i}9Hm^6IivYBJ7+myv~Uv@`X*G-19qu|hpt7nL)y zoJYPUqD+&xTW&#^qK@iU95EBiU;DPevll`*_vUR7PR8PK^s=^vq1d9iD}1p!Qz>nB z8-|QTg#pHWb+Pm8DoajNQ<1Jp6$_oQ8^vKbC5ADc-)hdR&y$PXQ}(1LdEeO4)6sR| zOc$?y6o$SQ%+sBsRzhx3t5~RTZ})OtU?_1@*OM)9^){2~=w@xE#2#Vnd$@80R5xY| zv6jB+YP8B7JAH+fM;5rG$_3hAKIQ!41ihMRnKzZ%Kokki?us-MoQ8*2*uPcT{buIQZB|Ae9wq1DKxcflu*^# zwMDxO)ajQ=-#GMD<;R-i_Uq%g?sdU{GJOiRt*Y!GXFEoma%;z;I#fHZNnE(|vp1QW zbG{aIbpLXk&t`3%#xs{}dF&-$_;Q-DM0dB~{6RN-<#r=@@yu1DuY=`dnbn)ok&s1q zj-oMSS9RW)c9Q$vw9~|(B<_AW#+crpP#c=)+p780S*NJ#;Hy6@Nqhsi)+izI3UF-o zZ&#Uos2*w7K|-bHuoS%uEdnvcn7z;0$)V)%3jV==dKQXuiFW4eObWE|qqy}mgU#lv?%%x-b1 z#LuvZO-ZDzFLq7EwN<~z)P-6As zLbY5?51fXMiO6gP4mcnlQo5Yk0xGD>g}EW1sQV`BWxZlkh7lDufEvFF9KTFZ?LfR%qNOfA^Pi{v&kNj zAG2VI*-`?FbQ&nu4$Pqn!zUv>X&D9x`747cJ}*g^fDp zKZ6lD;*d$^$xcz{39yg-%ml{F;DLrrCEh44_5%_5IR#aVKoYf>M`y1A&ZtB z0mAuKbC!}FR>+>kJIwmqI-p?1Mt>*4;^Bu9tOS^m`UwQ*Hw?I-Z$Iqitss2tKzo)q zygCj8A+sK4TXNW*gp$%zc7ek+H3J!{Yk#b`qlAxm`cnc}{ti zAajoAZBs;w(G`S%yP=+8A&GCLTM4SrJa^Y@``kF6HYPY*=D53N^(uS&TfJ7=yP=jn zzmQ|;w6|zAug{%8+neIBQa(B^oKZRfZ_W7@cqS$`GGu4QyCvVZ>Mal3U%` zqrJ(^;w-7?#x?|CtyR=+|5Urx@L3m5@ZAh6jp1=cC{xWNq|MsqiYLcYWQB_tL^~E| zbWCqftL%iwE+Ogd?u5|wCPzExxME)=E}m~5qGE-~3At|M#g^g6FD<4`;==@3T&Pm#tDvkxn(R4Fr2W^2|@ z3K@~j(k)HgEn}{Rd0ynvL7$75;ONCU!<>&otgKjcQpRkuhE;}g$dsG6nkqGxW^Jhk zvCG*n7&RVKj3lSDSl3Y- zka<<9=TP~p6sLF*2>>Tjy@(l%iOM%7P2rlf5UNRZFsyAzqe#VtwAfpZ4!h86ImuZQ z+-}TeLdj-NC@)4|4T{N1)*F9*4BuAFakYTE)8{b+-AAD+f~6AiOvRPLa8D^Fu`#bx zYO^p`;W~+OQk-g48-01PsAsodsMt`JREn<@nQ)cZyL$HKpE1y8Fjb7Xc+97gSg0!D zDarWZ3FX6JOTz=3e7=?7^6Vq-SpY)%-b-O;?`*rn@wS1(+$ zv~S(2qk4PS^)Eka)sgF#EbL!MCgq^PMgtCN4xT&zu!9eseaM`7Gugk{`f2X$gY{p> zPa8aa8`^%()o+1o3HXjs{|*`yF5mZEs~_Rr0X{&o2OTb;8H*0858?pkzK3K2gxE3||nwfj;)uTx#jEB4Yo?U2K=K9~2jp8+6MZi${YR~M1&siLRZ{}#}K ztf$S%;zf^!Lm>7~@NI?iEmF2GgCU7#S+-U7WW(6Z zzUM`-MZ?^t4YqZfqeClt4hxsS!LVZ6Hdg3E5FJ`DFVgbFz_wi*3(Q%RPHix6ci#FB zgAG%|HpGs)bZALWPq;n~f+gFhEKw`#d{pI61^UChNM96h;~m%cOes+u- zQU2{bH#{D_2Bk0~Y=wO^tyA>GXt-M#ot=E+@a(BT`=1*bhhC1n@9v_jb9D@&{75r5 z(%bg|;tM=P^>xf4*;9c$rpC5C!if2yKn6C6+(z2gE0Eh4y4cyKQ>U1TI^EO73{5dh z_n^6nT>hPnh>bUMVzSd*M*7XZDA^ZznBk&jCKPE&iShF9J4$q@Cf;O_cSEC2r`bYKNGKR{RnR(>e&t0n4}I#K`ng7g22*@EYV#1=`b`NV)EX z`rO+>6pNKSbL^=AQtI3HWgN*pBg~-6kASJsccz2v9YO9CJM!HnzW86xv9sfV+3|%= zk+TIbXJ&OEkoV!p=DbiCni*20rW0e-D>$-h!`|_1hREAp5&T5X_YL7&3+kOA&y9TN zzY=A>A4ld#%Q*133wQod#rZ=VA!O#jq< zhq#Ge{3-`mHEB$0)R}$`T)Jj^BJ&#YWpJQ{oFDzyD~NKQ!wb0l$eC)-uMVOIUrOb3 zov7zoL0oiUdEtQ)eud#5kBNn_)!SHzD7eG(-sDo^Dc3GoC%*dMDerR8> zRhapmkNheK2Q6K{soDB$7d5+S(kW&lrw6;3`9+ovQF{_C`49`$zbC_i*;A3W6v5pa z^?Imzt zYHjiLIT{AS{Kj8r`I{S=n~JUL1vz4VpOC|q&tc^2Y9{a&ay)%qkpr@)BE2#3-d^P3 zS(hOhO!=8_>b<=(M9HAZ(ANXcFncP{gHv;gf0nrFz-BjQq^UW@aXD7E<`j|jb#Xf4Uvf0O1fw6_ zrCaZu$QRoSf%z7NiQn?(Lr?jcXQ~|6NfgyFgCE(Y^E5ZH-gvx)7Ou9k?J>1}T(!_p zZMpXl22#E}Q|mM9IcBt}FcS*&yVUqPU}0iEg1b*)K$FO8qE`$$xW+rnR>Z7v%-s1) zhnT5z*&8@!%(qO37Nlx;qiuofx~4J&FJ2NgS~qa0VgXqCIBPEiv*W{jgUZ%`bTJr!uVski%EC90lu2Aghav`AYL zE80yPE!=cVx1iKmI4<$*6_B{2ESAsGqeJS3PAh4JTzXP&xVQ-@@bcB6 z1*!A+o01l&yUN;$Scg`mM(VdID{LQSTM_Lf3r)K~>kut9k3HE!!$@s;SmU7VsmS;d zS$mp^9=+MZ%>B191m37R#QRqZug`dg>ku!oM*MaMuRABC%=KpHbf+lMe{&F(H-OG^ znCcOyFg)ovkAsyShf=$!@37EpzkD2$Jr!v&i5fiBMGO^a={%-Z-v2#Aj5-x$`77N& zQY-K8RM_bL1(*Fx=REbz^B)FX4zPc-)w9zqT;Jhhhov1^8xeOV{?p*LUle9m6ll|_ z@0`;OZu{lg(zub;194{czYK2F6(xf!zjl$z^}8JORP$nH6e;bi==j)m*KsrJv|y@5#{vKYhvSx%5bynzg^z;CikM zQ(5n7$-mFBL3uz-!L#xx((V(z{rxVw?|zlRmGAATvzZ@o&~rbAUCn=F<{-RVe9*JN z@g3V??o+p?KjdNuUDI*{*i(_ZPmFmVcJVVef2qPR-}V!we}-cL-1v1DJ2B#Y#KBgx z{uF%avQPB8GadARQ(y*HzTc(ZvLAKP6R#O&Mv)emsPD5}T-T#91Diyi6WIUjV8caU zsgTy=j9AiWG=N5A!s~3Bs>_4t> zrLSsU#O$d+%TAqFIai^msXD&QP^=s3joONl4WoR=O#rxYp*% z%lDtTkv1$=%+GVMki+n0)Y3gCHADC$Lydb0XLZSop+Fg@)@si8EI{>g1pZV2FLl!E zQz5))VY7S}Ku+z;UtlB451`;?LFxKUt!IAP!whd3l+I`5%`fiTUg%+>My1nrhElp# zQ>!Kyd6@EGdgwS#>GDmz=`RlAcBzabH-LnfmPjeQ}G zuYSj(!&**Ze=&mHH!;!`?9{!MFWK1UCpY*&RetuEx{G>M5Yha|$5t%oF9(sM&8vK` zihO&_MEky)Ve20raf+E`y~sN-(x1fbtgnRdw5xK4!)+*nn)ou<5<>0D4qR%K{Hlkl zf4zlgw0wOg%J&)%GxyfcVcAoM<@+@oHD4n2hvw3GO^r|2Mp1(esyue${rmMOw)x>4 zR=|@Ot0L`Ltkzr?Mep9Ik@^DsMif8PsaQc2XlbdN8P`XVtsfO)fRiZs#2VcVVf}XT& zYPP++V`t=``r!*qYcjDePKWhviU-;LQ2Ep}#1ff7i4J=_sPS3fDn zpeB*;$Z2MAGX8rpZk9v9`+C8*!uVHI>b)Qg6@iAt6$gS(51(>RGI%Mg59n6XA1l7IQCXA^B>2tyHnrR6?593% zSKbsU%%3@!XgS@%jEqsj@BjTaraC&)h4z#BD*ky8G5;M;J}9!MB5f&>S8+z{7eVA` zb1L6!5-U!>3}T0>w``76C-@(*QLUdiWf)!UufOsUqXo>YC{VYlzVo1u8!FuLbsAaS z5?%{_9med~uT<)*=^=(0`t?{|o#kiIsXKbVX^U=t*witjY+a|y;Ni3t7&aa7^0l7W z3-~QV&whB9<&VP`XxXXUJ`%#?KkLiEOXoJVlK8tgI=)|O<3pp3j&CBS_A?(1;p^WI z=GkUXMan!<$HGg~??b3v8^==R{g{W0=Is7TGs|lE9-b=iKZNkRQ{IW0^WzK^hgkWq zL3f(p$Z1C5q4^1htbS~o!?C9#?J9yM?jSwsqjjxSrQVKz^l`iMc8ugzl)SdE;tiy}_yT90&<~POh zd1C*(I_sY0$HLUg*|RZxGszLZIPOmOm_Y?v^}I+4h~Mh`Ys>=cXV;@muJk-$UgVC6 z_}S^_QkH~%dY%=-B9AiQ%(LNJ%cP?5~M)RERg;H literal 0 HcmV?d00001