diff --git a/.github/actions/auto_gen_bind_pr/action.yaml b/.github/actions/auto_gen_bind_pr/action.yaml index 83ea6dde..b57503dc 100644 --- a/.github/actions/auto_gen_bind_pr/action.yaml +++ b/.github/actions/auto_gen_bind_pr/action.yaml @@ -14,6 +14,12 @@ runs: shell: bash run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" id: extract_branch + - name: Install cross compiler for aarch64 + if: inputs.triple == 'aarch64-unknown-linux-gnu' + shell: bash + run: | + sudo apt update + sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - uses: actions-rs/toolchain@v1 with: toolchain: stable diff --git a/.github/workflows/gen_bind.yaml b/.github/workflows/gen_bind.yaml index 159fd80c..25cd78fa 100644 --- a/.github/workflows/gen_bind.yaml +++ b/.github/workflows/gen_bind.yaml @@ -13,6 +13,8 @@ jobs: include: - os: ubuntu-latest triple: x86_64-unknown-linux-gnu + - os: ubuntu-latest + triple: aarch64-unknown-linux-gnu - os: windows-latest triple: x86_64-pc-windows-msvc - os: windows-latest diff --git a/onnxruntime-sys/build.rs b/onnxruntime-sys/build.rs index 521b2e61..bb93f418 100644 --- a/onnxruntime-sys/build.rs +++ b/onnxruntime-sys/build.rs @@ -435,7 +435,8 @@ impl OnnxPrebuiltArchive for Triplet { Cow::from(format!("{}-{}", self.os.as_onnx_str(), "x64")) } (Os::Windows, Architecture::X86, Accelerator::None) - | (Os::MacOs, Architecture::X86_64, Accelerator::None) => Cow::from(format!( + | (Os::MacOs, Architecture::X86_64, Accelerator::None) + | (Os::Linux, Architecture::Arm64, Accelerator::None) => Cow::from(format!( "{}-{}", self.os.as_onnx_str(), self.arch.as_onnx_str() diff --git a/onnxruntime-sys/src/generated/bindings.rs b/onnxruntime-sys/src/generated/bindings.rs index 655833b8..af31c260 100644 --- a/onnxruntime-sys/src/generated/bindings.rs +++ b/onnxruntime-sys/src/generated/bindings.rs @@ -4,6 +4,12 @@ include!(concat!( "/src/generated/linux/x86_64/bindings.rs" )); +#[cfg(all(target_os = "linux", target_arch = "aarch64"))] +include!(concat!( + env!("CARGO_MANIFEST_DIR"), + "/src/generated/linux/aarch64/bindings.rs" +)); + #[cfg(all(target_os = "macos", target_arch = "x86_64"))] include!(concat!( env!("CARGO_MANIFEST_DIR"), diff --git a/onnxruntime-sys/src/generated/linux/aarch64/bindings.rs b/onnxruntime-sys/src/generated/linux/aarch64/bindings.rs new file mode 100644 index 00000000..b9fb4e22 --- /dev/null +++ b/onnxruntime-sys/src/generated/linux/aarch64/bindings.rs @@ -0,0 +1,6565 @@ +/* automatically generated by rust-bindgen 0.60.1 */ + +pub const ORT_API_VERSION: u32 = 11; +pub type __int32_t = ::std::os::raw::c_int; +pub type __uint32_t = ::std::os::raw::c_uint; +pub type __int64_t = ::std::os::raw::c_long; +pub type __uint64_t = ::std::os::raw::c_ulong; +#[repr(u32)] +#[doc = " Copied from TensorProto::DataType"] +#[doc = " Currently, Ort doesn't support complex64, complex128"] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum ONNXTensorElementDataType { + ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED = 0, + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT = 1, + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8 = 2, + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8 = 3, + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16 = 4, + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16 = 5, + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32 = 6, + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64 = 7, + ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING = 8, + ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL = 9, + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16 = 10, + ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE = 11, + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32 = 12, + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64 = 13, + ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64 = 14, + ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128 = 15, + ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16 = 16, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum ONNXType { + ONNX_TYPE_UNKNOWN = 0, + ONNX_TYPE_TENSOR = 1, + ONNX_TYPE_SEQUENCE = 2, + ONNX_TYPE_MAP = 3, + ONNX_TYPE_OPAQUE = 4, + ONNX_TYPE_SPARSETENSOR = 5, + ONNX_TYPE_OPTIONAL = 6, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum OrtSparseFormat { + ORT_SPARSE_UNDEFINED = 0, + ORT_SPARSE_COO = 1, + ORT_SPARSE_CSRC = 2, + ORT_SPARSE_BLOCK_SPARSE = 4, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum OrtSparseIndicesFormat { + ORT_SPARSE_COO_INDICES = 0, + ORT_SPARSE_CSR_INNER_INDICES = 1, + ORT_SPARSE_CSR_OUTER_INDICES = 2, + ORT_SPARSE_BLOCK_SPARSE_INDICES = 3, +} +#[repr(u32)] +#[doc = " \\brief Logging severity levels"] +#[doc = ""] +#[doc = " In typical API usage, specifying a logging severity level specifies the minimum severity of log messages to show."] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum OrtLoggingLevel { + #[doc = "< Verbose informational messages (least severe)."] + ORT_LOGGING_LEVEL_VERBOSE = 0, + #[doc = "< Informational messages."] + ORT_LOGGING_LEVEL_INFO = 1, + #[doc = "< Warning messages."] + ORT_LOGGING_LEVEL_WARNING = 2, + #[doc = "< Error messages."] + ORT_LOGGING_LEVEL_ERROR = 3, + #[doc = "< Fatal error messages (most severe)."] + ORT_LOGGING_LEVEL_FATAL = 4, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum OrtErrorCode { + ORT_OK = 0, + ORT_FAIL = 1, + ORT_INVALID_ARGUMENT = 2, + ORT_NO_SUCHFILE = 3, + ORT_NO_MODEL = 4, + ORT_ENGINE_ERROR = 5, + ORT_RUNTIME_EXCEPTION = 6, + ORT_INVALID_PROTOBUF = 7, + ORT_MODEL_LOADED = 8, + ORT_NOT_IMPLEMENTED = 9, + ORT_INVALID_GRAPH = 10, + ORT_EP_FAIL = 11, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtEnv { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtStatus { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtMemoryInfo { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtIoBinding { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtSession { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtValue { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtRunOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtTypeInfo { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtTensorTypeAndShapeInfo { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtSessionOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtCustomOpDomain { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtMapTypeInfo { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtSequenceTypeInfo { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtModelMetadata { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtThreadPoolParams { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtThreadingOptions { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtArenaCfg { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtPrepackedWeightsContainer { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtTensorRTProviderOptionsV2 { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtCUDAProviderOptionsV2 { + _unused: [u8; 0], +} +pub type OrtStatusPtr = *mut OrtStatus; +#[doc = " \\brief Memory allocation interface"] +#[doc = ""] +#[doc = " Structure of function pointers that defines a memory allocator. This can be created and filled in by the user for custom allocators."] +#[doc = ""] +#[doc = " When an allocator is passed to any function, be sure that the allocator object is not destroyed until the last allocated object using it is freed."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtAllocator { + #[doc = "< Must be initialized to ORT_API_VERSION"] + pub version: u32, + #[doc = "< Returns a pointer to an allocated block of `size` bytes"] + pub Alloc: ::std::option::Option< + unsafe extern "C" fn(this_: *mut OrtAllocator, size: usize) -> *mut ::std::os::raw::c_void, + >, + #[doc = "< Free a block of memory previously allocated with OrtAllocator::Alloc"] + pub Free: ::std::option::Option< + unsafe extern "C" fn(this_: *mut OrtAllocator, p: *mut ::std::os::raw::c_void), + >, + #[doc = "< Return a pointer to an ::OrtMemoryInfo that describes this allocator"] + pub Info: ::std::option::Option< + unsafe extern "C" fn(this_: *const OrtAllocator) -> *const OrtMemoryInfo, + >, +} +#[test] +fn bindgen_test_layout_OrtAllocator() { + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(OrtAllocator)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OrtAllocator)) + ); + fn test_field_version() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtAllocator), + "::", + stringify!(version) + ) + ); + } + test_field_version(); + fn test_field_Alloc() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).Alloc) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtAllocator), + "::", + stringify!(Alloc) + ) + ); + } + test_field_Alloc(); + fn test_field_Free() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).Free) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OrtAllocator), + "::", + stringify!(Free) + ) + ); + } + test_field_Free(); + fn test_field_Info() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).Info) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OrtAllocator), + "::", + stringify!(Info) + ) + ); + } + test_field_Info(); +} +pub type OrtLoggingFunction = ::std::option::Option< + unsafe extern "C" fn( + param: *mut ::std::os::raw::c_void, + severity: OrtLoggingLevel, + category: *const ::std::os::raw::c_char, + logid: *const ::std::os::raw::c_char, + code_location: *const ::std::os::raw::c_char, + message: *const ::std::os::raw::c_char, + ), +>; +#[repr(u32)] +#[doc = " \\brief Graph optimization level"] +#[doc = ""] +#[doc = " Refer to https://www.onnxruntime.ai/docs/resources/graph-optimizations.html"] +#[doc = " for an in-depth understanding of Graph Optimizations"] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum GraphOptimizationLevel { + ORT_DISABLE_ALL = 0, + ORT_ENABLE_BASIC = 1, + ORT_ENABLE_EXTENDED = 2, + ORT_ENABLE_ALL = 99, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum ExecutionMode { + ORT_SEQUENTIAL = 0, + ORT_PARALLEL = 1, +} +#[repr(u32)] +#[doc = " \\brief Language projection identifiers"] +#[doc = " /see OrtApi::SetLanguageProjection"] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum OrtLanguageProjection { + ORT_PROJECTION_C = 0, + ORT_PROJECTION_CPLUSPLUS = 1, + ORT_PROJECTION_CSHARP = 2, + ORT_PROJECTION_PYTHON = 3, + ORT_PROJECTION_JAVA = 4, + ORT_PROJECTION_WINML = 5, + ORT_PROJECTION_NODEJS = 6, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtKernelInfo { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtKernelContext { + _unused: [u8; 0], +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum OrtAllocatorType { + OrtInvalidAllocator = -1, + OrtDeviceAllocator = 0, + OrtArenaAllocator = 1, +} +impl OrtMemType { + pub const OrtMemTypeCPU: OrtMemType = OrtMemType::OrtMemTypeCPUOutput; +} +#[repr(i32)] +#[doc = " \\brief Memory types for allocated memory, execution provider specific types should be extended in each provider."] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum OrtMemType { + #[doc = "< Any CPU memory used by non-CPU execution provider"] + OrtMemTypeCPUInput = -2, + #[doc = "< CPU accessible memory outputted by non-CPU execution provider, i.e. CUDA_PINNED"] + OrtMemTypeCPUOutput = -1, + #[doc = "< The default allocator for execution provider"] + OrtMemTypeDefault = 0, +} +#[repr(u32)] +#[doc = " \\brief Algorithm to use for cuDNN Convolution Op"] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum OrtCudnnConvAlgoSearch { + OrtCudnnConvAlgoSearchExhaustive = 0, + OrtCudnnConvAlgoSearchHeuristic = 1, + OrtCudnnConvAlgoSearchDefault = 2, +} +#[doc = " \\brief CUDA Provider Options"] +#[doc = ""] +#[doc = " \\see OrtApi::SessionOptionsAppendExecutionProvider_CUDA"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtCUDAProviderOptions { + #[doc = " \\brief CUDA device Id"] + #[doc = " Defaults to 0."] + pub device_id: ::std::os::raw::c_int, + #[doc = " \\brief CUDA Convolution algorithm search configuration."] + #[doc = " See enum OrtCudnnConvAlgoSearch for more details."] + #[doc = " Defaults to OrtCudnnConvAlgoSearchExhaustive."] + pub cudnn_conv_algo_search: OrtCudnnConvAlgoSearch, + #[doc = " \\brief CUDA memory limit (To use all possible memory pass in maximum size_t)"] + #[doc = " Defaults to SIZE_MAX."] + #[doc = " \\note If a ::OrtArenaCfg has been applied, it will override this field"] + pub gpu_mem_limit: usize, + #[doc = " \\brief Strategy used to grow the memory arena"] + #[doc = " 0 = kNextPowerOfTwo
"] + #[doc = " 1 = kSameAsRequested
"] + #[doc = " Defaults to 0."] + #[doc = " \\note If a ::OrtArenaCfg has been applied, it will override this field"] + pub arena_extend_strategy: ::std::os::raw::c_int, + #[doc = " \\brief Flag indicating if copying needs to take place on the same stream as the compute stream in the CUDA EP"] + #[doc = " 0 = Use separate streams for copying and compute."] + #[doc = " 1 = Use the same stream for copying and compute."] + #[doc = " Defaults to 1."] + #[doc = " WARNING: Setting this to 0 may result in data races for some models."] + #[doc = " Please see issue #4829 for more details."] + pub do_copy_in_default_stream: ::std::os::raw::c_int, + #[doc = " \\brief Flag indicating if there is a user provided compute stream"] + #[doc = " Defaults to 0."] + pub has_user_compute_stream: ::std::os::raw::c_int, + #[doc = " \\brief User provided compute stream."] + #[doc = " If provided, please set `has_user_compute_stream` to 1."] + pub user_compute_stream: *mut ::std::os::raw::c_void, + #[doc = " \\brief CUDA memory arena configuration parameters"] + pub default_memory_arena_cfg: *mut OrtArenaCfg, +} +#[test] +fn bindgen_test_layout_OrtCUDAProviderOptions() { + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(OrtCUDAProviderOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OrtCUDAProviderOptions)) + ); + fn test_field_device_id() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).device_id) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtCUDAProviderOptions), + "::", + stringify!(device_id) + ) + ); + } + test_field_device_id(); + fn test_field_cudnn_conv_algo_search() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).cudnn_conv_algo_search) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OrtCUDAProviderOptions), + "::", + stringify!(cudnn_conv_algo_search) + ) + ); + } + test_field_cudnn_conv_algo_search(); + fn test_field_gpu_mem_limit() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).gpu_mem_limit) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtCUDAProviderOptions), + "::", + stringify!(gpu_mem_limit) + ) + ); + } + test_field_gpu_mem_limit(); + fn test_field_arena_extend_strategy() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).arena_extend_strategy) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OrtCUDAProviderOptions), + "::", + stringify!(arena_extend_strategy) + ) + ); + } + test_field_arena_extend_strategy(); + fn test_field_do_copy_in_default_stream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).do_copy_in_default_stream) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(OrtCUDAProviderOptions), + "::", + stringify!(do_copy_in_default_stream) + ) + ); + } + test_field_do_copy_in_default_stream(); + fn test_field_has_user_compute_stream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).has_user_compute_stream) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OrtCUDAProviderOptions), + "::", + stringify!(has_user_compute_stream) + ) + ); + } + test_field_has_user_compute_stream(); + fn test_field_user_compute_stream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).user_compute_stream) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OrtCUDAProviderOptions), + "::", + stringify!(user_compute_stream) + ) + ); + } + test_field_user_compute_stream(); + fn test_field_default_memory_arena_cfg() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).default_memory_arena_cfg) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OrtCUDAProviderOptions), + "::", + stringify!(default_memory_arena_cfg) + ) + ); + } + test_field_default_memory_arena_cfg(); +} +#[doc = " \\brief ROCM Provider Options"] +#[doc = ""] +#[doc = " \\see OrtApi::SessionOptionsAppendExecutionProvider_ROCM"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtROCMProviderOptions { + #[doc = " \\brief ROCM device Id"] + #[doc = " Defaults to 0."] + pub device_id: ::std::os::raw::c_int, + #[doc = " \\brief ROCM MIOpen Convolution algorithm exaustive search option."] + #[doc = " Defaults to 0 (false)."] + pub miopen_conv_exhaustive_search: ::std::os::raw::c_int, + #[doc = " \\brief ROCM memory limit (To use all possible memory pass in maximum size_t)"] + #[doc = " Defaults to SIZE_MAX."] + #[doc = " \\note If a ::OrtArenaCfg has been applied, it will override this field"] + pub gpu_mem_limit: usize, + #[doc = " \\brief Strategy used to grow the memory arena"] + #[doc = " 0 = kNextPowerOfTwo
"] + #[doc = " 1 = kSameAsRequested
"] + #[doc = " Defaults to 0."] + #[doc = " \\note If a ::OrtArenaCfg has been applied, it will override this field"] + pub arena_extend_strategy: ::std::os::raw::c_int, + #[doc = " \\brief Flag indicating if copying needs to take place on the same stream as the compute stream in the ROCM EP"] + #[doc = " 0 = Use separate streams for copying and compute."] + #[doc = " 1 = Use the same stream for copying and compute."] + #[doc = " Defaults to 1."] + #[doc = " WARNING: Setting this to 0 may result in data races for some models."] + #[doc = " Please see issue #4829 for more details."] + pub do_copy_in_default_stream: ::std::os::raw::c_int, + #[doc = " \\brief Flag indicating if there is a user provided compute stream"] + #[doc = " Defaults to 0."] + pub has_user_compute_stream: ::std::os::raw::c_int, + #[doc = " \\brief User provided compute stream."] + #[doc = " If provided, please set `has_user_compute_stream` to 1."] + pub user_compute_stream: *mut ::std::os::raw::c_void, + #[doc = " \\brief ROCM memory arena configuration parameters"] + pub default_memory_arena_cfg: *mut OrtArenaCfg, +} +#[test] +fn bindgen_test_layout_OrtROCMProviderOptions() { + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(OrtROCMProviderOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OrtROCMProviderOptions)) + ); + fn test_field_device_id() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).device_id) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtROCMProviderOptions), + "::", + stringify!(device_id) + ) + ); + } + test_field_device_id(); + fn test_field_miopen_conv_exhaustive_search() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).miopen_conv_exhaustive_search) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OrtROCMProviderOptions), + "::", + stringify!(miopen_conv_exhaustive_search) + ) + ); + } + test_field_miopen_conv_exhaustive_search(); + fn test_field_gpu_mem_limit() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).gpu_mem_limit) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtROCMProviderOptions), + "::", + stringify!(gpu_mem_limit) + ) + ); + } + test_field_gpu_mem_limit(); + fn test_field_arena_extend_strategy() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).arena_extend_strategy) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OrtROCMProviderOptions), + "::", + stringify!(arena_extend_strategy) + ) + ); + } + test_field_arena_extend_strategy(); + fn test_field_do_copy_in_default_stream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).do_copy_in_default_stream) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(OrtROCMProviderOptions), + "::", + stringify!(do_copy_in_default_stream) + ) + ); + } + test_field_do_copy_in_default_stream(); + fn test_field_has_user_compute_stream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).has_user_compute_stream) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OrtROCMProviderOptions), + "::", + stringify!(has_user_compute_stream) + ) + ); + } + test_field_has_user_compute_stream(); + fn test_field_user_compute_stream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).user_compute_stream) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OrtROCMProviderOptions), + "::", + stringify!(user_compute_stream) + ) + ); + } + test_field_user_compute_stream(); + fn test_field_default_memory_arena_cfg() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).default_memory_arena_cfg) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OrtROCMProviderOptions), + "::", + stringify!(default_memory_arena_cfg) + ) + ); + } + test_field_default_memory_arena_cfg(); +} +#[doc = " \\brief TensorRT Provider Options"] +#[doc = ""] +#[doc = " \\see OrtApi::SessionOptionsAppendExecutionProvider_TensorRT"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtTensorRTProviderOptions { + #[doc = "< CUDA device id (0 = default device)"] + pub device_id: ::std::os::raw::c_int, + pub has_user_compute_stream: ::std::os::raw::c_int, + pub user_compute_stream: *mut ::std::os::raw::c_void, + pub trt_max_partition_iterations: ::std::os::raw::c_int, + pub trt_min_subgraph_size: ::std::os::raw::c_int, + pub trt_max_workspace_size: usize, + pub trt_fp16_enable: ::std::os::raw::c_int, + pub trt_int8_enable: ::std::os::raw::c_int, + pub trt_int8_calibration_table_name: *const ::std::os::raw::c_char, + pub trt_int8_use_native_calibration_table: ::std::os::raw::c_int, + pub trt_dla_enable: ::std::os::raw::c_int, + pub trt_dla_core: ::std::os::raw::c_int, + pub trt_dump_subgraphs: ::std::os::raw::c_int, + pub trt_engine_cache_enable: ::std::os::raw::c_int, + pub trt_engine_cache_path: *const ::std::os::raw::c_char, + pub trt_engine_decryption_enable: ::std::os::raw::c_int, + pub trt_engine_decryption_lib_path: *const ::std::os::raw::c_char, + pub trt_force_sequential_engine_build: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_OrtTensorRTProviderOptions() { + assert_eq!( + ::std::mem::size_of::(), + 104usize, + concat!("Size of: ", stringify!(OrtTensorRTProviderOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OrtTensorRTProviderOptions)) + ); + fn test_field_device_id() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).device_id) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(device_id) + ) + ); + } + test_field_device_id(); + fn test_field_has_user_compute_stream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).has_user_compute_stream) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(has_user_compute_stream) + ) + ); + } + test_field_has_user_compute_stream(); + fn test_field_user_compute_stream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).user_compute_stream) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(user_compute_stream) + ) + ); + } + test_field_user_compute_stream(); + fn test_field_trt_max_partition_iterations() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_max_partition_iterations) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_max_partition_iterations) + ) + ); + } + test_field_trt_max_partition_iterations(); + fn test_field_trt_min_subgraph_size() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_min_subgraph_size) as usize - ptr as usize + }, + 20usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_min_subgraph_size) + ) + ); + } + test_field_trt_min_subgraph_size(); + fn test_field_trt_max_workspace_size() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_max_workspace_size) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_max_workspace_size) + ) + ); + } + test_field_trt_max_workspace_size(); + fn test_field_trt_fp16_enable() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_fp16_enable) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_fp16_enable) + ) + ); + } + test_field_trt_fp16_enable(); + fn test_field_trt_int8_enable() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_int8_enable) as usize - ptr as usize + }, + 36usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_int8_enable) + ) + ); + } + test_field_trt_int8_enable(); + fn test_field_trt_int8_calibration_table_name() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_int8_calibration_table_name) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_int8_calibration_table_name) + ) + ); + } + test_field_trt_int8_calibration_table_name(); + fn test_field_trt_int8_use_native_calibration_table() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_int8_use_native_calibration_table) as usize + - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_int8_use_native_calibration_table) + ) + ); + } + test_field_trt_int8_use_native_calibration_table(); + fn test_field_trt_dla_enable() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_dla_enable) as usize - ptr as usize + }, + 52usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_dla_enable) + ) + ); + } + test_field_trt_dla_enable(); + fn test_field_trt_dla_core() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_dla_core) as usize - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_dla_core) + ) + ); + } + test_field_trt_dla_core(); + fn test_field_trt_dump_subgraphs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_dump_subgraphs) as usize - ptr as usize + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_dump_subgraphs) + ) + ); + } + test_field_trt_dump_subgraphs(); + fn test_field_trt_engine_cache_enable() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_engine_cache_enable) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_engine_cache_enable) + ) + ); + } + test_field_trt_engine_cache_enable(); + fn test_field_trt_engine_cache_path() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_engine_cache_path) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_engine_cache_path) + ) + ); + } + test_field_trt_engine_cache_path(); + fn test_field_trt_engine_decryption_enable() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_engine_decryption_enable) as usize - ptr as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_engine_decryption_enable) + ) + ); + } + test_field_trt_engine_decryption_enable(); + fn test_field_trt_engine_decryption_lib_path() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_engine_decryption_lib_path) as usize - ptr as usize + }, + 88usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_engine_decryption_lib_path) + ) + ); + } + test_field_trt_engine_decryption_lib_path(); + fn test_field_trt_force_sequential_engine_build() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).trt_force_sequential_engine_build) as usize + - ptr as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(OrtTensorRTProviderOptions), + "::", + stringify!(trt_force_sequential_engine_build) + ) + ); + } + test_field_trt_force_sequential_engine_build(); +} +#[doc = " \\brief MIGraphX Provider Options"] +#[doc = ""] +#[doc = " \\see OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtMIGraphXProviderOptions { + pub device_id: ::std::os::raw::c_int, + pub migraphx_fp16_enable: ::std::os::raw::c_int, + pub migraphx_int8_enable: ::std::os::raw::c_int, +} +#[test] +fn bindgen_test_layout_OrtMIGraphXProviderOptions() { + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(OrtMIGraphXProviderOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(OrtMIGraphXProviderOptions)) + ); + fn test_field_device_id() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).device_id) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(device_id) + ) + ); + } + test_field_device_id(); + fn test_field_migraphx_fp16_enable() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).migraphx_fp16_enable) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(migraphx_fp16_enable) + ) + ); + } + test_field_migraphx_fp16_enable(); + fn test_field_migraphx_int8_enable() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).migraphx_int8_enable) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtMIGraphXProviderOptions), + "::", + stringify!(migraphx_int8_enable) + ) + ); + } + test_field_migraphx_int8_enable(); +} +#[doc = " \\brief OpenVINO Provider Options"] +#[doc = ""] +#[doc = " \\see OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtOpenVINOProviderOptions { + #[doc = " \\brief Device type string"] + #[doc = ""] + #[doc = " Valid settings are one of: \"CPU_FP32\", \"GPU_FP32\", \"GPU_FP16\", \"MYRIAD_FP16\", \"VAD-M_FP16\" or \"VAD-F_FP32\""] + pub device_type: *const ::std::os::raw::c_char, + #[doc = "< 0 = disabled, nonzero = enabled"] + pub enable_vpu_fast_compile: ::std::os::raw::c_uchar, + pub device_id: *const ::std::os::raw::c_char, + #[doc = "< 0 = Use default number of threads"] + pub num_of_threads: usize, + #[doc = "< 0 = disabled, nonzero = enabled"] + pub use_compiled_network: ::std::os::raw::c_uchar, + pub blob_dump_path: *const ::std::os::raw::c_char, + pub context: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout_OrtOpenVINOProviderOptions() { + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(OrtOpenVINOProviderOptions)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OrtOpenVINOProviderOptions)) + ); + fn test_field_device_type() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).device_type) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtOpenVINOProviderOptions), + "::", + stringify!(device_type) + ) + ); + } + test_field_device_type(); + fn test_field_enable_vpu_fast_compile() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).enable_vpu_fast_compile) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtOpenVINOProviderOptions), + "::", + stringify!(enable_vpu_fast_compile) + ) + ); + } + test_field_enable_vpu_fast_compile(); + fn test_field_device_id() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).device_id) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OrtOpenVINOProviderOptions), + "::", + stringify!(device_id) + ) + ); + } + test_field_device_id(); + fn test_field_num_of_threads() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).num_of_threads) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OrtOpenVINOProviderOptions), + "::", + stringify!(num_of_threads) + ) + ); + } + test_field_num_of_threads(); + fn test_field_use_compiled_network() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).use_compiled_network) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OrtOpenVINOProviderOptions), + "::", + stringify!(use_compiled_network) + ) + ); + } + test_field_use_compiled_network(); + fn test_field_blob_dump_path() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).blob_dump_path) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OrtOpenVINOProviderOptions), + "::", + stringify!(blob_dump_path) + ) + ); + } + test_field_blob_dump_path(); + fn test_field_context() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(OrtOpenVINOProviderOptions), + "::", + stringify!(context) + ) + ); + } + test_field_context(); +} +#[doc = " \\brief The helper interface to get the right version of OrtApi"] +#[doc = ""] +#[doc = " Get a pointer to this structure through ::OrtGetApiBase"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtApiBase { + #[doc = " \\brief Get a pointer to the requested version of the ::OrtApi"] + #[doc = ""] + #[doc = " \\param[in] version Must be ::ORT_API_VERSION"] + #[doc = " \\return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime"] + #[doc = " older than the version created with this header file."] + pub GetApi: ::std::option::Option *const OrtApi>, + #[doc = "< Returns a null terminated string of the version of the Onnxruntime library (eg: \"1.8.1\")"] + pub GetVersionString: + ::std::option::Option *const ::std::os::raw::c_char>, +} +#[test] +fn bindgen_test_layout_OrtApiBase() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(OrtApiBase)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OrtApiBase)) + ); + fn test_field_GetApi() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetApi) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtApiBase), + "::", + stringify!(GetApi) + ) + ); + } + test_field_GetApi(); + fn test_field_GetVersionString() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetVersionString) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtApiBase), + "::", + stringify!(GetVersionString) + ) + ); + } + test_field_GetVersionString(); +} +extern "C" { + #[doc = " \\brief The Onnxruntime library's entry point to access the C API"] + #[doc = ""] + #[doc = " Call this to get the a pointer to an ::OrtApiBase"] + pub fn OrtGetApiBase() -> *const OrtApiBase; +} +#[doc = " \\brief Thread work loop function"] +#[doc = ""] +#[doc = " Onnxruntime will provide the working loop on custom thread creation"] +#[doc = " Argument is an onnxruntime built-in type which will be provided when thread pool calls OrtCustomCreateThreadFn"] +pub type OrtThreadWorkerFn = + ::std::option::Option; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtCustomHandleType { + pub __place_holder: ::std::os::raw::c_char, +} +#[test] +fn bindgen_test_layout_OrtCustomHandleType() { + assert_eq!( + ::std::mem::size_of::(), + 1usize, + concat!("Size of: ", stringify!(OrtCustomHandleType)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(OrtCustomHandleType)) + ); + fn test_field___place_holder() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).__place_holder) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomHandleType), + "::", + stringify!(__place_holder) + ) + ); + } + test_field___place_holder(); +} +pub type OrtCustomThreadHandle = *const OrtCustomHandleType; +#[doc = " \\brief Ort custom thread creation function"] +#[doc = ""] +#[doc = " The function should return a thread handle to be used in onnxruntime thread pools"] +#[doc = " Onnxruntime will throw exception on return value of nullptr or 0, indicating that the function failed to create a thread"] +pub type OrtCustomCreateThreadFn = ::std::option::Option< + unsafe extern "C" fn( + ort_custom_thread_creation_options: *mut ::std::os::raw::c_void, + ort_thread_worker_fn: OrtThreadWorkerFn, + ort_worker_fn_param: *mut ::std::os::raw::c_void, + ) -> OrtCustomThreadHandle, +>; +#[doc = " \\brief Custom thread join function"] +#[doc = ""] +#[doc = " Onnxruntime thread pool destructor will call the function to join a custom thread."] +#[doc = " Argument ort_custom_thread_handle is the value returned by OrtCustomCreateThreadFn"] +pub type OrtCustomJoinThreadFn = + ::std::option::Option; +#[doc = " \\brief The C API"] +#[doc = ""] +#[doc = " All C API functions are defined inside this structure as pointers to functions."] +#[doc = " Call OrtApiBase::GetApi to get a pointer to it"] +#[doc = ""] +#[doc = " \\nosubgrouping"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtApi { + #[doc = " \\brief Create an OrtStatus from a null terminated string"] + #[doc = ""] + #[doc = " \\param[in] code"] + #[doc = " \\param[in] msg A null-terminated string. Its contents will be copied."] + #[doc = " \\return A new OrtStatus object, must be destroyed with OrtApi::ReleaseStatus"] + pub CreateStatus: ::std::option::Option< + unsafe extern "C" fn( + code: OrtErrorCode, + msg: *const ::std::os::raw::c_char, + ) -> *mut OrtStatus, + >, + #[doc = " \\brief Get OrtErrorCode from OrtStatus"] + #[doc = ""] + #[doc = " \\param[in] status"] + #[doc = " \\return OrtErrorCode that \\p status was created with"] + pub GetErrorCode: + ::std::option::Option OrtErrorCode>, + #[doc = " \\brief Get error string from OrtStatus"] + #[doc = ""] + #[doc = " \\param[in] status"] + #[doc = " \\return The error message inside the `status`. Do not free the returned value."] + pub GetErrorMessage: ::std::option::Option< + unsafe extern "C" fn(status: *const OrtStatus) -> *const ::std::os::raw::c_char, + >, + pub CreateEnv: ::std::option::Option< + unsafe extern "C" fn( + log_severity_level: OrtLoggingLevel, + logid: *const ::std::os::raw::c_char, + out: *mut *mut OrtEnv, + ) -> OrtStatusPtr, + >, + pub CreateEnvWithCustomLogger: ::std::option::Option< + unsafe extern "C" fn( + logging_function: OrtLoggingFunction, + logger_param: *mut ::std::os::raw::c_void, + log_severity_level: OrtLoggingLevel, + logid: *const ::std::os::raw::c_char, + out: *mut *mut OrtEnv, + ) -> OrtStatusPtr, + >, + pub EnableTelemetryEvents: + ::std::option::Option OrtStatusPtr>, + pub DisableTelemetryEvents: + ::std::option::Option OrtStatusPtr>, + pub CreateSession: ::std::option::Option< + unsafe extern "C" fn( + env: *const OrtEnv, + model_path: *const ::std::os::raw::c_char, + options: *const OrtSessionOptions, + out: *mut *mut OrtSession, + ) -> OrtStatusPtr, + >, + pub CreateSessionFromArray: ::std::option::Option< + unsafe extern "C" fn( + env: *const OrtEnv, + model_data: *const ::std::os::raw::c_void, + model_data_length: usize, + options: *const OrtSessionOptions, + out: *mut *mut OrtSession, + ) -> OrtStatusPtr, + >, + pub Run: ::std::option::Option< + unsafe extern "C" fn( + session: *mut OrtSession, + run_options: *const OrtRunOptions, + input_names: *const *const ::std::os::raw::c_char, + inputs: *const *const OrtValue, + input_len: usize, + output_names: *const *const ::std::os::raw::c_char, + output_names_len: usize, + outputs: *mut *mut OrtValue, + ) -> OrtStatusPtr, + >, + pub CreateSessionOptions: ::std::option::Option< + unsafe extern "C" fn(options: *mut *mut OrtSessionOptions) -> OrtStatusPtr, + >, + pub SetOptimizedModelFilePath: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + optimized_model_filepath: *const ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub CloneSessionOptions: ::std::option::Option< + unsafe extern "C" fn( + in_options: *const OrtSessionOptions, + out_options: *mut *mut OrtSessionOptions, + ) -> OrtStatusPtr, + >, + pub SetSessionExecutionMode: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + execution_mode: ExecutionMode, + ) -> OrtStatusPtr, + >, + pub EnableProfiling: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + profile_file_prefix: *const ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub DisableProfiling: ::std::option::Option< + unsafe extern "C" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr, + >, + pub EnableMemPattern: ::std::option::Option< + unsafe extern "C" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr, + >, + pub DisableMemPattern: ::std::option::Option< + unsafe extern "C" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr, + >, + pub EnableCpuMemArena: ::std::option::Option< + unsafe extern "C" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr, + >, + pub DisableCpuMemArena: ::std::option::Option< + unsafe extern "C" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr, + >, + pub SetSessionLogId: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + logid: *const ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub SetSessionLogVerbosityLevel: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + session_log_verbosity_level: ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub SetSessionLogSeverityLevel: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + session_log_severity_level: ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub SetSessionGraphOptimizationLevel: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + graph_optimization_level: GraphOptimizationLevel, + ) -> OrtStatusPtr, + >, + pub SetIntraOpNumThreads: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + intra_op_num_threads: ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub SetInterOpNumThreads: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + inter_op_num_threads: ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub CreateCustomOpDomain: ::std::option::Option< + unsafe extern "C" fn( + domain: *const ::std::os::raw::c_char, + out: *mut *mut OrtCustomOpDomain, + ) -> OrtStatusPtr, + >, + pub CustomOpDomain_Add: ::std::option::Option< + unsafe extern "C" fn( + custom_op_domain: *mut OrtCustomOpDomain, + op: *const OrtCustomOp, + ) -> OrtStatusPtr, + >, + pub AddCustomOpDomain: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + custom_op_domain: *mut OrtCustomOpDomain, + ) -> OrtStatusPtr, + >, + pub RegisterCustomOpsLibrary: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + library_path: *const ::std::os::raw::c_char, + library_handle: *mut *mut ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub SessionGetInputCount: ::std::option::Option< + unsafe extern "C" fn(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr, + >, + pub SessionGetOutputCount: ::std::option::Option< + unsafe extern "C" fn(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr, + >, + pub SessionGetOverridableInitializerCount: ::std::option::Option< + unsafe extern "C" fn(session: *const OrtSession, out: *mut usize) -> OrtStatusPtr, + >, + pub SessionGetInputTypeInfo: ::std::option::Option< + unsafe extern "C" fn( + session: *const OrtSession, + index: usize, + type_info: *mut *mut OrtTypeInfo, + ) -> OrtStatusPtr, + >, + pub SessionGetOutputTypeInfo: ::std::option::Option< + unsafe extern "C" fn( + session: *const OrtSession, + index: usize, + type_info: *mut *mut OrtTypeInfo, + ) -> OrtStatusPtr, + >, + pub SessionGetOverridableInitializerTypeInfo: ::std::option::Option< + unsafe extern "C" fn( + session: *const OrtSession, + index: usize, + type_info: *mut *mut OrtTypeInfo, + ) -> OrtStatusPtr, + >, + pub SessionGetInputName: ::std::option::Option< + unsafe extern "C" fn( + session: *const OrtSession, + index: usize, + allocator: *mut OrtAllocator, + value: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub SessionGetOutputName: ::std::option::Option< + unsafe extern "C" fn( + session: *const OrtSession, + index: usize, + allocator: *mut OrtAllocator, + value: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub SessionGetOverridableInitializerName: ::std::option::Option< + unsafe extern "C" fn( + session: *const OrtSession, + index: usize, + allocator: *mut OrtAllocator, + value: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub CreateRunOptions: + ::std::option::Option OrtStatusPtr>, + pub RunOptionsSetRunLogVerbosityLevel: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtRunOptions, + log_verbosity_level: ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub RunOptionsSetRunLogSeverityLevel: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtRunOptions, + log_severity_level: ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub RunOptionsSetRunTag: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtRunOptions, + run_tag: *const ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub RunOptionsGetRunLogVerbosityLevel: ::std::option::Option< + unsafe extern "C" fn( + options: *const OrtRunOptions, + log_verbosity_level: *mut ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub RunOptionsGetRunLogSeverityLevel: ::std::option::Option< + unsafe extern "C" fn( + options: *const OrtRunOptions, + log_severity_level: *mut ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub RunOptionsGetRunTag: ::std::option::Option< + unsafe extern "C" fn( + options: *const OrtRunOptions, + run_tag: *mut *const ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub RunOptionsSetTerminate: + ::std::option::Option OrtStatusPtr>, + pub RunOptionsUnsetTerminate: + ::std::option::Option OrtStatusPtr>, + pub CreateTensorAsOrtValue: ::std::option::Option< + unsafe extern "C" fn( + allocator: *mut OrtAllocator, + shape: *const i64, + shape_len: usize, + type_: ONNXTensorElementDataType, + out: *mut *mut OrtValue, + ) -> OrtStatusPtr, + >, + pub CreateTensorWithDataAsOrtValue: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtMemoryInfo, + p_data: *mut ::std::os::raw::c_void, + p_data_len: usize, + shape: *const i64, + shape_len: usize, + type_: ONNXTensorElementDataType, + out: *mut *mut OrtValue, + ) -> OrtStatusPtr, + >, + pub IsTensor: ::std::option::Option< + unsafe extern "C" fn( + value: *const OrtValue, + out: *mut ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub GetTensorMutableData: ::std::option::Option< + unsafe extern "C" fn( + value: *mut OrtValue, + out: *mut *mut ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub FillStringTensor: ::std::option::Option< + unsafe extern "C" fn( + value: *mut OrtValue, + s: *const *const ::std::os::raw::c_char, + s_len: usize, + ) -> OrtStatusPtr, + >, + pub GetStringTensorDataLength: ::std::option::Option< + unsafe extern "C" fn(value: *const OrtValue, len: *mut usize) -> OrtStatusPtr, + >, + pub GetStringTensorContent: ::std::option::Option< + unsafe extern "C" fn( + value: *const OrtValue, + s: *mut ::std::os::raw::c_void, + s_len: usize, + offsets: *mut usize, + offsets_len: usize, + ) -> OrtStatusPtr, + >, + pub CastTypeInfoToTensorInfo: ::std::option::Option< + unsafe extern "C" fn( + type_info: *const OrtTypeInfo, + out: *mut *const OrtTensorTypeAndShapeInfo, + ) -> OrtStatusPtr, + >, + pub GetOnnxTypeFromTypeInfo: ::std::option::Option< + unsafe extern "C" fn(type_info: *const OrtTypeInfo, out: *mut ONNXType) -> OrtStatusPtr, + >, + pub CreateTensorTypeAndShapeInfo: ::std::option::Option< + unsafe extern "C" fn(out: *mut *mut OrtTensorTypeAndShapeInfo) -> OrtStatusPtr, + >, + pub SetTensorElementType: ::std::option::Option< + unsafe extern "C" fn( + info: *mut OrtTensorTypeAndShapeInfo, + type_: ONNXTensorElementDataType, + ) -> OrtStatusPtr, + >, + pub SetDimensions: ::std::option::Option< + unsafe extern "C" fn( + info: *mut OrtTensorTypeAndShapeInfo, + dim_values: *const i64, + dim_count: usize, + ) -> OrtStatusPtr, + >, + pub GetTensorElementType: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtTensorTypeAndShapeInfo, + out: *mut ONNXTensorElementDataType, + ) -> OrtStatusPtr, + >, + pub GetDimensionsCount: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtTensorTypeAndShapeInfo, + out: *mut usize, + ) -> OrtStatusPtr, + >, + pub GetDimensions: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtTensorTypeAndShapeInfo, + dim_values: *mut i64, + dim_values_length: usize, + ) -> OrtStatusPtr, + >, + pub GetSymbolicDimensions: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtTensorTypeAndShapeInfo, + dim_params: *mut *const ::std::os::raw::c_char, + dim_params_length: usize, + ) -> OrtStatusPtr, + >, + pub GetTensorShapeElementCount: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtTensorTypeAndShapeInfo, + out: *mut usize, + ) -> OrtStatusPtr, + >, + pub GetTensorTypeAndShape: ::std::option::Option< + unsafe extern "C" fn( + value: *const OrtValue, + out: *mut *mut OrtTensorTypeAndShapeInfo, + ) -> OrtStatusPtr, + >, + pub GetTypeInfo: ::std::option::Option< + unsafe extern "C" fn(value: *const OrtValue, out: *mut *mut OrtTypeInfo) -> OrtStatusPtr, + >, + pub GetValueType: ::std::option::Option< + unsafe extern "C" fn(value: *const OrtValue, out: *mut ONNXType) -> OrtStatusPtr, + >, + pub CreateMemoryInfo: ::std::option::Option< + unsafe extern "C" fn( + name: *const ::std::os::raw::c_char, + type_: OrtAllocatorType, + id: ::std::os::raw::c_int, + mem_type: OrtMemType, + out: *mut *mut OrtMemoryInfo, + ) -> OrtStatusPtr, + >, + pub CreateCpuMemoryInfo: ::std::option::Option< + unsafe extern "C" fn( + type_: OrtAllocatorType, + mem_type: OrtMemType, + out: *mut *mut OrtMemoryInfo, + ) -> OrtStatusPtr, + >, + pub CompareMemoryInfo: ::std::option::Option< + unsafe extern "C" fn( + info1: *const OrtMemoryInfo, + info2: *const OrtMemoryInfo, + out: *mut ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub MemoryInfoGetName: ::std::option::Option< + unsafe extern "C" fn( + ptr: *const OrtMemoryInfo, + out: *mut *const ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub MemoryInfoGetId: ::std::option::Option< + unsafe extern "C" fn( + ptr: *const OrtMemoryInfo, + out: *mut ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub MemoryInfoGetMemType: ::std::option::Option< + unsafe extern "C" fn(ptr: *const OrtMemoryInfo, out: *mut OrtMemType) -> OrtStatusPtr, + >, + pub MemoryInfoGetType: ::std::option::Option< + unsafe extern "C" fn(ptr: *const OrtMemoryInfo, out: *mut OrtAllocatorType) -> OrtStatusPtr, + >, + pub AllocatorAlloc: ::std::option::Option< + unsafe extern "C" fn( + ort_allocator: *mut OrtAllocator, + size: usize, + out: *mut *mut ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub AllocatorFree: ::std::option::Option< + unsafe extern "C" fn( + ort_allocator: *mut OrtAllocator, + p: *mut ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub AllocatorGetInfo: ::std::option::Option< + unsafe extern "C" fn( + ort_allocator: *const OrtAllocator, + out: *mut *const OrtMemoryInfo, + ) -> OrtStatusPtr, + >, + pub GetAllocatorWithDefaultOptions: + ::std::option::Option OrtStatusPtr>, + pub AddFreeDimensionOverride: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + dim_denotation: *const ::std::os::raw::c_char, + dim_value: i64, + ) -> OrtStatusPtr, + >, + pub GetValue: ::std::option::Option< + unsafe extern "C" fn( + value: *const OrtValue, + index: ::std::os::raw::c_int, + allocator: *mut OrtAllocator, + out: *mut *mut OrtValue, + ) -> OrtStatusPtr, + >, + pub GetValueCount: ::std::option::Option< + unsafe extern "C" fn(value: *const OrtValue, out: *mut usize) -> OrtStatusPtr, + >, + pub CreateValue: ::std::option::Option< + unsafe extern "C" fn( + in_: *const *const OrtValue, + num_values: usize, + value_type: ONNXType, + out: *mut *mut OrtValue, + ) -> OrtStatusPtr, + >, + pub CreateOpaqueValue: ::std::option::Option< + unsafe extern "C" fn( + domain_name: *const ::std::os::raw::c_char, + type_name: *const ::std::os::raw::c_char, + data_container: *const ::std::os::raw::c_void, + data_container_size: usize, + out: *mut *mut OrtValue, + ) -> OrtStatusPtr, + >, + pub GetOpaqueValue: ::std::option::Option< + unsafe extern "C" fn( + domain_name: *const ::std::os::raw::c_char, + type_name: *const ::std::os::raw::c_char, + in_: *const OrtValue, + data_container: *mut ::std::os::raw::c_void, + data_container_size: usize, + ) -> OrtStatusPtr, + >, + pub KernelInfoGetAttribute_float: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtKernelInfo, + name: *const ::std::os::raw::c_char, + out: *mut f32, + ) -> OrtStatusPtr, + >, + pub KernelInfoGetAttribute_int64: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtKernelInfo, + name: *const ::std::os::raw::c_char, + out: *mut i64, + ) -> OrtStatusPtr, + >, + pub KernelInfoGetAttribute_string: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtKernelInfo, + name: *const ::std::os::raw::c_char, + out: *mut ::std::os::raw::c_char, + size: *mut usize, + ) -> OrtStatusPtr, + >, + pub KernelContext_GetInputCount: ::std::option::Option< + unsafe extern "C" fn(context: *const OrtKernelContext, out: *mut usize) -> OrtStatusPtr, + >, + pub KernelContext_GetOutputCount: ::std::option::Option< + unsafe extern "C" fn(context: *const OrtKernelContext, out: *mut usize) -> OrtStatusPtr, + >, + pub KernelContext_GetInput: ::std::option::Option< + unsafe extern "C" fn( + context: *const OrtKernelContext, + index: usize, + out: *mut *const OrtValue, + ) -> OrtStatusPtr, + >, + pub KernelContext_GetOutput: ::std::option::Option< + unsafe extern "C" fn( + context: *mut OrtKernelContext, + index: usize, + dim_values: *const i64, + dim_count: usize, + out: *mut *mut OrtValue, + ) -> OrtStatusPtr, + >, + pub ReleaseEnv: ::std::option::Option, + pub ReleaseStatus: ::std::option::Option, + pub ReleaseMemoryInfo: ::std::option::Option, + pub ReleaseSession: ::std::option::Option, + pub ReleaseValue: ::std::option::Option, + pub ReleaseRunOptions: ::std::option::Option, + pub ReleaseTypeInfo: ::std::option::Option, + pub ReleaseTensorTypeAndShapeInfo: + ::std::option::Option, + pub ReleaseSessionOptions: + ::std::option::Option, + pub ReleaseCustomOpDomain: + ::std::option::Option, + pub GetDenotationFromTypeInfo: ::std::option::Option< + unsafe extern "C" fn( + type_info: *const OrtTypeInfo, + denotation: *mut *const ::std::os::raw::c_char, + len: *mut usize, + ) -> OrtStatusPtr, + >, + pub CastTypeInfoToMapTypeInfo: ::std::option::Option< + unsafe extern "C" fn( + type_info: *const OrtTypeInfo, + out: *mut *const OrtMapTypeInfo, + ) -> OrtStatusPtr, + >, + pub CastTypeInfoToSequenceTypeInfo: ::std::option::Option< + unsafe extern "C" fn( + type_info: *const OrtTypeInfo, + out: *mut *const OrtSequenceTypeInfo, + ) -> OrtStatusPtr, + >, + pub GetMapKeyType: ::std::option::Option< + unsafe extern "C" fn( + map_type_info: *const OrtMapTypeInfo, + out: *mut ONNXTensorElementDataType, + ) -> OrtStatusPtr, + >, + pub GetMapValueType: ::std::option::Option< + unsafe extern "C" fn( + map_type_info: *const OrtMapTypeInfo, + type_info: *mut *mut OrtTypeInfo, + ) -> OrtStatusPtr, + >, + pub GetSequenceElementType: ::std::option::Option< + unsafe extern "C" fn( + sequence_type_info: *const OrtSequenceTypeInfo, + type_info: *mut *mut OrtTypeInfo, + ) -> OrtStatusPtr, + >, + pub ReleaseMapTypeInfo: ::std::option::Option, + pub ReleaseSequenceTypeInfo: + ::std::option::Option, + pub SessionEndProfiling: ::std::option::Option< + unsafe extern "C" fn( + session: *mut OrtSession, + allocator: *mut OrtAllocator, + out: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub SessionGetModelMetadata: ::std::option::Option< + unsafe extern "C" fn( + session: *const OrtSession, + out: *mut *mut OrtModelMetadata, + ) -> OrtStatusPtr, + >, + pub ModelMetadataGetProducerName: ::std::option::Option< + unsafe extern "C" fn( + model_metadata: *const OrtModelMetadata, + allocator: *mut OrtAllocator, + value: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub ModelMetadataGetGraphName: ::std::option::Option< + unsafe extern "C" fn( + model_metadata: *const OrtModelMetadata, + allocator: *mut OrtAllocator, + value: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub ModelMetadataGetDomain: ::std::option::Option< + unsafe extern "C" fn( + model_metadata: *const OrtModelMetadata, + allocator: *mut OrtAllocator, + value: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub ModelMetadataGetDescription: ::std::option::Option< + unsafe extern "C" fn( + model_metadata: *const OrtModelMetadata, + allocator: *mut OrtAllocator, + value: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub ModelMetadataLookupCustomMetadataMap: ::std::option::Option< + unsafe extern "C" fn( + model_metadata: *const OrtModelMetadata, + allocator: *mut OrtAllocator, + key: *const ::std::os::raw::c_char, + value: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub ModelMetadataGetVersion: ::std::option::Option< + unsafe extern "C" fn( + model_metadata: *const OrtModelMetadata, + value: *mut i64, + ) -> OrtStatusPtr, + >, + pub ReleaseModelMetadata: + ::std::option::Option, + pub CreateEnvWithGlobalThreadPools: ::std::option::Option< + unsafe extern "C" fn( + log_severity_level: OrtLoggingLevel, + logid: *const ::std::os::raw::c_char, + tp_options: *const OrtThreadingOptions, + out: *mut *mut OrtEnv, + ) -> OrtStatusPtr, + >, + pub DisablePerSessionThreads: ::std::option::Option< + unsafe extern "C" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr, + >, + pub CreateThreadingOptions: ::std::option::Option< + unsafe extern "C" fn(out: *mut *mut OrtThreadingOptions) -> OrtStatusPtr, + >, + pub ReleaseThreadingOptions: + ::std::option::Option, + pub ModelMetadataGetCustomMetadataMapKeys: ::std::option::Option< + unsafe extern "C" fn( + model_metadata: *const OrtModelMetadata, + allocator: *mut OrtAllocator, + keys: *mut *mut *mut ::std::os::raw::c_char, + num_keys: *mut i64, + ) -> OrtStatusPtr, + >, + pub AddFreeDimensionOverrideByName: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + dim_name: *const ::std::os::raw::c_char, + dim_value: i64, + ) -> OrtStatusPtr, + >, + pub GetAvailableProviders: ::std::option::Option< + unsafe extern "C" fn( + out_ptr: *mut *mut *mut ::std::os::raw::c_char, + provider_length: *mut ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub ReleaseAvailableProviders: ::std::option::Option< + unsafe extern "C" fn( + ptr: *mut *mut ::std::os::raw::c_char, + providers_length: ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub GetStringTensorElementLength: ::std::option::Option< + unsafe extern "C" fn(value: *const OrtValue, index: usize, out: *mut usize) -> OrtStatusPtr, + >, + pub GetStringTensorElement: ::std::option::Option< + unsafe extern "C" fn( + value: *const OrtValue, + s_len: usize, + index: usize, + s: *mut ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub FillStringTensorElement: ::std::option::Option< + unsafe extern "C" fn( + value: *mut OrtValue, + s: *const ::std::os::raw::c_char, + index: usize, + ) -> OrtStatusPtr, + >, + pub AddSessionConfigEntry: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + config_key: *const ::std::os::raw::c_char, + config_value: *const ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub CreateAllocator: ::std::option::Option< + unsafe extern "C" fn( + session: *const OrtSession, + mem_info: *const OrtMemoryInfo, + out: *mut *mut OrtAllocator, + ) -> OrtStatusPtr, + >, + pub ReleaseAllocator: ::std::option::Option, + pub RunWithBinding: ::std::option::Option< + unsafe extern "C" fn( + session: *mut OrtSession, + run_options: *const OrtRunOptions, + binding_ptr: *const OrtIoBinding, + ) -> OrtStatusPtr, + >, + pub CreateIoBinding: ::std::option::Option< + unsafe extern "C" fn(session: *mut OrtSession, out: *mut *mut OrtIoBinding) -> OrtStatusPtr, + >, + pub ReleaseIoBinding: ::std::option::Option, + pub BindInput: ::std::option::Option< + unsafe extern "C" fn( + binding_ptr: *mut OrtIoBinding, + name: *const ::std::os::raw::c_char, + val_ptr: *const OrtValue, + ) -> OrtStatusPtr, + >, + pub BindOutput: ::std::option::Option< + unsafe extern "C" fn( + binding_ptr: *mut OrtIoBinding, + name: *const ::std::os::raw::c_char, + val_ptr: *const OrtValue, + ) -> OrtStatusPtr, + >, + pub BindOutputToDevice: ::std::option::Option< + unsafe extern "C" fn( + binding_ptr: *mut OrtIoBinding, + name: *const ::std::os::raw::c_char, + mem_info_ptr: *const OrtMemoryInfo, + ) -> OrtStatusPtr, + >, + pub GetBoundOutputNames: ::std::option::Option< + unsafe extern "C" fn( + binding_ptr: *const OrtIoBinding, + allocator: *mut OrtAllocator, + buffer: *mut *mut ::std::os::raw::c_char, + lengths: *mut *mut usize, + count: *mut usize, + ) -> OrtStatusPtr, + >, + pub GetBoundOutputValues: ::std::option::Option< + unsafe extern "C" fn( + binding_ptr: *const OrtIoBinding, + allocator: *mut OrtAllocator, + output: *mut *mut *mut OrtValue, + output_count: *mut usize, + ) -> OrtStatusPtr, + >, + #[doc = " \\brief Clears any previously set Inputs for an ::OrtIoBinding"] + pub ClearBoundInputs: + ::std::option::Option, + #[doc = " \\brief Clears any previously set Outputs for an ::OrtIoBinding"] + pub ClearBoundOutputs: + ::std::option::Option, + pub TensorAt: ::std::option::Option< + unsafe extern "C" fn( + value: *mut OrtValue, + location_values: *const i64, + location_values_count: usize, + out: *mut *mut ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub CreateAndRegisterAllocator: ::std::option::Option< + unsafe extern "C" fn( + env: *mut OrtEnv, + mem_info: *const OrtMemoryInfo, + arena_cfg: *const OrtArenaCfg, + ) -> OrtStatusPtr, + >, + pub SetLanguageProjection: ::std::option::Option< + unsafe extern "C" fn( + ort_env: *const OrtEnv, + projection: OrtLanguageProjection, + ) -> OrtStatusPtr, + >, + pub SessionGetProfilingStartTimeNs: ::std::option::Option< + unsafe extern "C" fn(session: *const OrtSession, out: *mut u64) -> OrtStatusPtr, + >, + pub SetGlobalIntraOpNumThreads: ::std::option::Option< + unsafe extern "C" fn( + tp_options: *mut OrtThreadingOptions, + intra_op_num_threads: ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub SetGlobalInterOpNumThreads: ::std::option::Option< + unsafe extern "C" fn( + tp_options: *mut OrtThreadingOptions, + inter_op_num_threads: ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub SetGlobalSpinControl: ::std::option::Option< + unsafe extern "C" fn( + tp_options: *mut OrtThreadingOptions, + allow_spinning: ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub AddInitializer: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + name: *const ::std::os::raw::c_char, + val: *const OrtValue, + ) -> OrtStatusPtr, + >, + pub CreateEnvWithCustomLoggerAndGlobalThreadPools: ::std::option::Option< + unsafe extern "C" fn( + logging_function: OrtLoggingFunction, + logger_param: *mut ::std::os::raw::c_void, + log_severity_level: OrtLoggingLevel, + logid: *const ::std::os::raw::c_char, + tp_options: *const OrtThreadingOptions, + out: *mut *mut OrtEnv, + ) -> OrtStatusPtr, + >, + pub SessionOptionsAppendExecutionProvider_CUDA: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + cuda_options: *const OrtCUDAProviderOptions, + ) -> OrtStatusPtr, + >, + pub SessionOptionsAppendExecutionProvider_ROCM: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + rocm_options: *const OrtROCMProviderOptions, + ) -> OrtStatusPtr, + >, + pub SessionOptionsAppendExecutionProvider_OpenVINO: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + provider_options: *const OrtOpenVINOProviderOptions, + ) -> OrtStatusPtr, + >, + pub SetGlobalDenormalAsZero: ::std::option::Option< + unsafe extern "C" fn(tp_options: *mut OrtThreadingOptions) -> OrtStatusPtr, + >, + pub CreateArenaCfg: ::std::option::Option< + unsafe extern "C" fn( + max_mem: usize, + arena_extend_strategy: ::std::os::raw::c_int, + initial_chunk_size_bytes: ::std::os::raw::c_int, + max_dead_bytes_per_chunk: ::std::os::raw::c_int, + out: *mut *mut OrtArenaCfg, + ) -> OrtStatusPtr, + >, + pub ReleaseArenaCfg: ::std::option::Option, + pub ModelMetadataGetGraphDescription: ::std::option::Option< + unsafe extern "C" fn( + model_metadata: *const OrtModelMetadata, + allocator: *mut OrtAllocator, + value: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub SessionOptionsAppendExecutionProvider_TensorRT: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + tensorrt_options: *const OrtTensorRTProviderOptions, + ) -> OrtStatusPtr, + >, + pub SetCurrentGpuDeviceId: ::std::option::Option< + unsafe extern "C" fn(device_id: ::std::os::raw::c_int) -> OrtStatusPtr, + >, + pub GetCurrentGpuDeviceId: ::std::option::Option< + unsafe extern "C" fn(device_id: *mut ::std::os::raw::c_int) -> OrtStatusPtr, + >, + pub KernelInfoGetAttributeArray_float: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtKernelInfo, + name: *const ::std::os::raw::c_char, + out: *mut f32, + size: *mut usize, + ) -> OrtStatusPtr, + >, + pub KernelInfoGetAttributeArray_int64: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtKernelInfo, + name: *const ::std::os::raw::c_char, + out: *mut i64, + size: *mut usize, + ) -> OrtStatusPtr, + >, + pub CreateArenaCfgV2: ::std::option::Option< + unsafe extern "C" fn( + arena_config_keys: *const *const ::std::os::raw::c_char, + arena_config_values: *const usize, + num_keys: usize, + out: *mut *mut OrtArenaCfg, + ) -> OrtStatusPtr, + >, + pub AddRunConfigEntry: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtRunOptions, + config_key: *const ::std::os::raw::c_char, + config_value: *const ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + pub CreatePrepackedWeightsContainer: ::std::option::Option< + unsafe extern "C" fn(out: *mut *mut OrtPrepackedWeightsContainer) -> OrtStatusPtr, + >, + pub ReleasePrepackedWeightsContainer: + ::std::option::Option, + pub CreateSessionWithPrepackedWeightsContainer: ::std::option::Option< + unsafe extern "C" fn( + env: *const OrtEnv, + model_path: *const ::std::os::raw::c_char, + options: *const OrtSessionOptions, + prepacked_weights_container: *mut OrtPrepackedWeightsContainer, + out: *mut *mut OrtSession, + ) -> OrtStatusPtr, + >, + pub CreateSessionFromArrayWithPrepackedWeightsContainer: ::std::option::Option< + unsafe extern "C" fn( + env: *const OrtEnv, + model_data: *const ::std::os::raw::c_void, + model_data_length: usize, + options: *const OrtSessionOptions, + prepacked_weights_container: *mut OrtPrepackedWeightsContainer, + out: *mut *mut OrtSession, + ) -> OrtStatusPtr, + >, + pub SessionOptionsAppendExecutionProvider_TensorRT_V2: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + tensorrt_options: *const OrtTensorRTProviderOptionsV2, + ) -> OrtStatusPtr, + >, + pub CreateTensorRTProviderOptions: ::std::option::Option< + unsafe extern "C" fn(out: *mut *mut OrtTensorRTProviderOptionsV2) -> OrtStatusPtr, + >, + pub UpdateTensorRTProviderOptions: ::std::option::Option< + unsafe extern "C" fn( + tensorrt_options: *mut OrtTensorRTProviderOptionsV2, + provider_options_keys: *const *const ::std::os::raw::c_char, + provider_options_values: *const *const ::std::os::raw::c_char, + num_keys: usize, + ) -> OrtStatusPtr, + >, + pub GetTensorRTProviderOptionsAsString: ::std::option::Option< + unsafe extern "C" fn( + tensorrt_options: *const OrtTensorRTProviderOptionsV2, + allocator: *mut OrtAllocator, + ptr: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + #[doc = " \\brief Release an ::OrtTensorRTProviderOptionsV2"] + #[doc = ""] + #[doc = " \\note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does"] + pub ReleaseTensorRTProviderOptions: + ::std::option::Option, + pub EnableOrtCustomOps: ::std::option::Option< + unsafe extern "C" fn(options: *mut OrtSessionOptions) -> OrtStatusPtr, + >, + pub RegisterAllocator: ::std::option::Option< + unsafe extern "C" fn(env: *mut OrtEnv, allocator: *mut OrtAllocator) -> OrtStatusPtr, + >, + pub UnregisterAllocator: ::std::option::Option< + unsafe extern "C" fn(env: *mut OrtEnv, mem_info: *const OrtMemoryInfo) -> OrtStatusPtr, + >, + pub IsSparseTensor: ::std::option::Option< + unsafe extern "C" fn( + value: *const OrtValue, + out: *mut ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub CreateSparseTensorAsOrtValue: ::std::option::Option< + unsafe extern "C" fn( + allocator: *mut OrtAllocator, + dense_shape: *const i64, + dense_shape_len: usize, + type_: ONNXTensorElementDataType, + out: *mut *mut OrtValue, + ) -> OrtStatusPtr, + >, + pub FillSparseTensorCoo: ::std::option::Option< + unsafe extern "C" fn( + ort_value: *mut OrtValue, + data_mem_info: *const OrtMemoryInfo, + values_shape: *const i64, + values_shape_len: usize, + values: *const ::std::os::raw::c_void, + indices_data: *const i64, + indices_num: usize, + ) -> OrtStatusPtr, + >, + pub FillSparseTensorCsr: ::std::option::Option< + unsafe extern "C" fn( + ort_value: *mut OrtValue, + data_mem_info: *const OrtMemoryInfo, + values_shape: *const i64, + values_shape_len: usize, + values: *const ::std::os::raw::c_void, + inner_indices_data: *const i64, + inner_indices_num: usize, + outer_indices_data: *const i64, + outer_indices_num: usize, + ) -> OrtStatusPtr, + >, + pub FillSparseTensorBlockSparse: ::std::option::Option< + unsafe extern "C" fn( + ort_value: *mut OrtValue, + data_mem_info: *const OrtMemoryInfo, + values_shape: *const i64, + values_shape_len: usize, + values: *const ::std::os::raw::c_void, + indices_shape_data: *const i64, + indices_shape_len: usize, + indices_data: *const i32, + ) -> OrtStatusPtr, + >, + pub CreateSparseTensorWithValuesAsOrtValue: ::std::option::Option< + unsafe extern "C" fn( + info: *const OrtMemoryInfo, + p_data: *mut ::std::os::raw::c_void, + dense_shape: *const i64, + dense_shape_len: usize, + values_shape: *const i64, + values_shape_len: usize, + type_: ONNXTensorElementDataType, + out: *mut *mut OrtValue, + ) -> OrtStatusPtr, + >, + pub UseCooIndices: ::std::option::Option< + unsafe extern "C" fn( + ort_value: *mut OrtValue, + indices_data: *mut i64, + indices_num: usize, + ) -> OrtStatusPtr, + >, + pub UseCsrIndices: ::std::option::Option< + unsafe extern "C" fn( + ort_value: *mut OrtValue, + inner_data: *mut i64, + inner_num: usize, + outer_data: *mut i64, + outer_num: usize, + ) -> OrtStatusPtr, + >, + pub UseBlockSparseIndices: ::std::option::Option< + unsafe extern "C" fn( + ort_value: *mut OrtValue, + indices_shape: *const i64, + indices_shape_len: usize, + indices_data: *mut i32, + ) -> OrtStatusPtr, + >, + pub GetSparseTensorFormat: ::std::option::Option< + unsafe extern "C" fn(ort_value: *const OrtValue, out: *mut OrtSparseFormat) -> OrtStatusPtr, + >, + pub GetSparseTensorValuesTypeAndShape: ::std::option::Option< + unsafe extern "C" fn( + ort_value: *const OrtValue, + out: *mut *mut OrtTensorTypeAndShapeInfo, + ) -> OrtStatusPtr, + >, + pub GetSparseTensorValues: ::std::option::Option< + unsafe extern "C" fn( + ort_value: *const OrtValue, + out: *mut *const ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub GetSparseTensorIndicesTypeShape: ::std::option::Option< + unsafe extern "C" fn( + ort_value: *const OrtValue, + indices_format: OrtSparseIndicesFormat, + out: *mut *mut OrtTensorTypeAndShapeInfo, + ) -> OrtStatusPtr, + >, + pub GetSparseTensorIndices: ::std::option::Option< + unsafe extern "C" fn( + ort_value: *const OrtValue, + indices_format: OrtSparseIndicesFormat, + num_indices: *mut usize, + indices: *mut *const ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub HasValue: ::std::option::Option< + unsafe extern "C" fn( + value: *const OrtValue, + out: *mut ::std::os::raw::c_int, + ) -> OrtStatusPtr, + >, + pub KernelContext_GetGPUComputeStream: ::std::option::Option< + unsafe extern "C" fn( + context: *const OrtKernelContext, + out: *mut *mut ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub GetTensorMemoryInfo: ::std::option::Option< + unsafe extern "C" fn( + value: *const OrtValue, + mem_info: *mut *const OrtMemoryInfo, + ) -> OrtStatusPtr, + >, + pub GetExecutionProviderApi: ::std::option::Option< + unsafe extern "C" fn( + provider_name: *const ::std::os::raw::c_char, + version: u32, + provider_api: *mut *const ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub SessionOptionsSetCustomCreateThreadFn: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + ort_custom_create_thread_fn: OrtCustomCreateThreadFn, + ) -> OrtStatusPtr, + >, + pub SessionOptionsSetCustomThreadCreationOptions: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + ort_custom_thread_creation_options: *mut ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub SessionOptionsSetCustomJoinThreadFn: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + ort_custom_join_thread_fn: OrtCustomJoinThreadFn, + ) -> OrtStatusPtr, + >, + pub SetGlobalCustomCreateThreadFn: ::std::option::Option< + unsafe extern "C" fn( + tp_options: *mut OrtThreadingOptions, + ort_custom_create_thread_fn: OrtCustomCreateThreadFn, + ) -> OrtStatusPtr, + >, + pub SetGlobalCustomThreadCreationOptions: ::std::option::Option< + unsafe extern "C" fn( + tp_options: *mut OrtThreadingOptions, + ort_custom_thread_creation_options: *mut ::std::os::raw::c_void, + ) -> OrtStatusPtr, + >, + pub SetGlobalCustomJoinThreadFn: ::std::option::Option< + unsafe extern "C" fn( + tp_options: *mut OrtThreadingOptions, + ort_custom_join_thread_fn: OrtCustomJoinThreadFn, + ) -> OrtStatusPtr, + >, + pub SynchronizeBoundInputs: + ::std::option::Option OrtStatusPtr>, + pub SynchronizeBoundOutputs: + ::std::option::Option OrtStatusPtr>, + pub SessionOptionsAppendExecutionProvider_CUDA_V2: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + cuda_options: *const OrtCUDAProviderOptionsV2, + ) -> OrtStatusPtr, + >, + pub CreateCUDAProviderOptions: ::std::option::Option< + unsafe extern "C" fn(out: *mut *mut OrtCUDAProviderOptionsV2) -> OrtStatusPtr, + >, + pub UpdateCUDAProviderOptions: ::std::option::Option< + unsafe extern "C" fn( + cuda_options: *mut OrtCUDAProviderOptionsV2, + provider_options_keys: *const *const ::std::os::raw::c_char, + provider_options_values: *const *const ::std::os::raw::c_char, + num_keys: usize, + ) -> OrtStatusPtr, + >, + pub GetCUDAProviderOptionsAsString: ::std::option::Option< + unsafe extern "C" fn( + cuda_options: *const OrtCUDAProviderOptionsV2, + allocator: *mut OrtAllocator, + ptr: *mut *mut ::std::os::raw::c_char, + ) -> OrtStatusPtr, + >, + #[doc = " \\brief Release an ::OrtCUDAProviderOptionsV2"] + #[doc = ""] + #[doc = " \\note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does"] + #[doc = ""] + #[doc = " \\since Version 1.11."] + pub ReleaseCUDAProviderOptions: + ::std::option::Option, + pub SessionOptionsAppendExecutionProvider_MIGraphX: ::std::option::Option< + unsafe extern "C" fn( + options: *mut OrtSessionOptions, + migraphx_options: *const OrtMIGraphXProviderOptions, + ) -> OrtStatusPtr, + >, +} +#[test] +fn bindgen_test_layout_OrtApi() { + assert_eq!( + ::std::mem::size_of::(), + 1680usize, + concat!("Size of: ", stringify!(OrtApi)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OrtApi)) + ); + fn test_field_CreateStatus() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateStatus) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateStatus) + ) + ); + } + test_field_CreateStatus(); + fn test_field_GetErrorCode() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetErrorCode) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetErrorCode) + ) + ); + } + test_field_GetErrorCode(); + fn test_field_GetErrorMessage() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetErrorMessage) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetErrorMessage) + ) + ); + } + test_field_GetErrorMessage(); + fn test_field_CreateEnv() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateEnv) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateEnv) + ) + ); + } + test_field_CreateEnv(); + fn test_field_CreateEnvWithCustomLogger() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateEnvWithCustomLogger) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateEnvWithCustomLogger) + ) + ); + } + test_field_CreateEnvWithCustomLogger(); + fn test_field_EnableTelemetryEvents() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).EnableTelemetryEvents) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(EnableTelemetryEvents) + ) + ); + } + test_field_EnableTelemetryEvents(); + fn test_field_DisableTelemetryEvents() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).DisableTelemetryEvents) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(DisableTelemetryEvents) + ) + ); + } + test_field_DisableTelemetryEvents(); + fn test_field_CreateSession() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateSession) as usize - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateSession) + ) + ); + } + test_field_CreateSession(); + fn test_field_CreateSessionFromArray() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateSessionFromArray) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateSessionFromArray) + ) + ); + } + test_field_CreateSessionFromArray(); + fn test_field_Run() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).Run) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(Run) + ) + ); + } + test_field_Run(); + fn test_field_CreateSessionOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateSessionOptions) as usize - ptr as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateSessionOptions) + ) + ); + } + test_field_CreateSessionOptions(); + fn test_field_SetOptimizedModelFilePath() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetOptimizedModelFilePath) as usize - ptr as usize + }, + 88usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetOptimizedModelFilePath) + ) + ); + } + test_field_SetOptimizedModelFilePath(); + fn test_field_CloneSessionOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CloneSessionOptions) as usize - ptr as usize + }, + 96usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CloneSessionOptions) + ) + ); + } + test_field_CloneSessionOptions(); + fn test_field_SetSessionExecutionMode() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetSessionExecutionMode) as usize - ptr as usize + }, + 104usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetSessionExecutionMode) + ) + ); + } + test_field_SetSessionExecutionMode(); + fn test_field_EnableProfiling() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).EnableProfiling) as usize - ptr as usize + }, + 112usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(EnableProfiling) + ) + ); + } + test_field_EnableProfiling(); + fn test_field_DisableProfiling() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).DisableProfiling) as usize - ptr as usize + }, + 120usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(DisableProfiling) + ) + ); + } + test_field_DisableProfiling(); + fn test_field_EnableMemPattern() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).EnableMemPattern) as usize - ptr as usize + }, + 128usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(EnableMemPattern) + ) + ); + } + test_field_EnableMemPattern(); + fn test_field_DisableMemPattern() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).DisableMemPattern) as usize - ptr as usize + }, + 136usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(DisableMemPattern) + ) + ); + } + test_field_DisableMemPattern(); + fn test_field_EnableCpuMemArena() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).EnableCpuMemArena) as usize - ptr as usize + }, + 144usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(EnableCpuMemArena) + ) + ); + } + test_field_EnableCpuMemArena(); + fn test_field_DisableCpuMemArena() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).DisableCpuMemArena) as usize - ptr as usize + }, + 152usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(DisableCpuMemArena) + ) + ); + } + test_field_DisableCpuMemArena(); + fn test_field_SetSessionLogId() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetSessionLogId) as usize - ptr as usize + }, + 160usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetSessionLogId) + ) + ); + } + test_field_SetSessionLogId(); + fn test_field_SetSessionLogVerbosityLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetSessionLogVerbosityLevel) as usize - ptr as usize + }, + 168usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetSessionLogVerbosityLevel) + ) + ); + } + test_field_SetSessionLogVerbosityLevel(); + fn test_field_SetSessionLogSeverityLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetSessionLogSeverityLevel) as usize - ptr as usize + }, + 176usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetSessionLogSeverityLevel) + ) + ); + } + test_field_SetSessionLogSeverityLevel(); + fn test_field_SetSessionGraphOptimizationLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetSessionGraphOptimizationLevel) as usize + - ptr as usize + }, + 184usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetSessionGraphOptimizationLevel) + ) + ); + } + test_field_SetSessionGraphOptimizationLevel(); + fn test_field_SetIntraOpNumThreads() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetIntraOpNumThreads) as usize - ptr as usize + }, + 192usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetIntraOpNumThreads) + ) + ); + } + test_field_SetIntraOpNumThreads(); + fn test_field_SetInterOpNumThreads() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetInterOpNumThreads) as usize - ptr as usize + }, + 200usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetInterOpNumThreads) + ) + ); + } + test_field_SetInterOpNumThreads(); + fn test_field_CreateCustomOpDomain() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateCustomOpDomain) as usize - ptr as usize + }, + 208usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateCustomOpDomain) + ) + ); + } + test_field_CreateCustomOpDomain(); + fn test_field_CustomOpDomain_Add() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CustomOpDomain_Add) as usize - ptr as usize + }, + 216usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CustomOpDomain_Add) + ) + ); + } + test_field_CustomOpDomain_Add(); + fn test_field_AddCustomOpDomain() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).AddCustomOpDomain) as usize - ptr as usize + }, + 224usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(AddCustomOpDomain) + ) + ); + } + test_field_AddCustomOpDomain(); + fn test_field_RegisterCustomOpsLibrary() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RegisterCustomOpsLibrary) as usize - ptr as usize + }, + 232usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(RegisterCustomOpsLibrary) + ) + ); + } + test_field_RegisterCustomOpsLibrary(); + fn test_field_SessionGetInputCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionGetInputCount) as usize - ptr as usize + }, + 240usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionGetInputCount) + ) + ); + } + test_field_SessionGetInputCount(); + fn test_field_SessionGetOutputCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionGetOutputCount) as usize - ptr as usize + }, + 248usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionGetOutputCount) + ) + ); + } + test_field_SessionGetOutputCount(); + fn test_field_SessionGetOverridableInitializerCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionGetOverridableInitializerCount) as usize + - ptr as usize + }, + 256usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionGetOverridableInitializerCount) + ) + ); + } + test_field_SessionGetOverridableInitializerCount(); + fn test_field_SessionGetInputTypeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionGetInputTypeInfo) as usize - ptr as usize + }, + 264usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionGetInputTypeInfo) + ) + ); + } + test_field_SessionGetInputTypeInfo(); + fn test_field_SessionGetOutputTypeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionGetOutputTypeInfo) as usize - ptr as usize + }, + 272usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionGetOutputTypeInfo) + ) + ); + } + test_field_SessionGetOutputTypeInfo(); + fn test_field_SessionGetOverridableInitializerTypeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionGetOverridableInitializerTypeInfo) as usize + - ptr as usize + }, + 280usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionGetOverridableInitializerTypeInfo) + ) + ); + } + test_field_SessionGetOverridableInitializerTypeInfo(); + fn test_field_SessionGetInputName() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionGetInputName) as usize - ptr as usize + }, + 288usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionGetInputName) + ) + ); + } + test_field_SessionGetInputName(); + fn test_field_SessionGetOutputName() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionGetOutputName) as usize - ptr as usize + }, + 296usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionGetOutputName) + ) + ); + } + test_field_SessionGetOutputName(); + fn test_field_SessionGetOverridableInitializerName() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionGetOverridableInitializerName) as usize + - ptr as usize + }, + 304usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionGetOverridableInitializerName) + ) + ); + } + test_field_SessionGetOverridableInitializerName(); + fn test_field_CreateRunOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateRunOptions) as usize - ptr as usize + }, + 312usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateRunOptions) + ) + ); + } + test_field_CreateRunOptions(); + fn test_field_RunOptionsSetRunLogVerbosityLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RunOptionsSetRunLogVerbosityLevel) as usize + - ptr as usize + }, + 320usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(RunOptionsSetRunLogVerbosityLevel) + ) + ); + } + test_field_RunOptionsSetRunLogVerbosityLevel(); + fn test_field_RunOptionsSetRunLogSeverityLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RunOptionsSetRunLogSeverityLevel) as usize + - ptr as usize + }, + 328usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(RunOptionsSetRunLogSeverityLevel) + ) + ); + } + test_field_RunOptionsSetRunLogSeverityLevel(); + fn test_field_RunOptionsSetRunTag() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RunOptionsSetRunTag) as usize - ptr as usize + }, + 336usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(RunOptionsSetRunTag) + ) + ); + } + test_field_RunOptionsSetRunTag(); + fn test_field_RunOptionsGetRunLogVerbosityLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RunOptionsGetRunLogVerbosityLevel) as usize + - ptr as usize + }, + 344usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(RunOptionsGetRunLogVerbosityLevel) + ) + ); + } + test_field_RunOptionsGetRunLogVerbosityLevel(); + fn test_field_RunOptionsGetRunLogSeverityLevel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RunOptionsGetRunLogSeverityLevel) as usize + - ptr as usize + }, + 352usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(RunOptionsGetRunLogSeverityLevel) + ) + ); + } + test_field_RunOptionsGetRunLogSeverityLevel(); + fn test_field_RunOptionsGetRunTag() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RunOptionsGetRunTag) as usize - ptr as usize + }, + 360usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(RunOptionsGetRunTag) + ) + ); + } + test_field_RunOptionsGetRunTag(); + fn test_field_RunOptionsSetTerminate() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RunOptionsSetTerminate) as usize - ptr as usize + }, + 368usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(RunOptionsSetTerminate) + ) + ); + } + test_field_RunOptionsSetTerminate(); + fn test_field_RunOptionsUnsetTerminate() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RunOptionsUnsetTerminate) as usize - ptr as usize + }, + 376usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(RunOptionsUnsetTerminate) + ) + ); + } + test_field_RunOptionsUnsetTerminate(); + fn test_field_CreateTensorAsOrtValue() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateTensorAsOrtValue) as usize - ptr as usize + }, + 384usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateTensorAsOrtValue) + ) + ); + } + test_field_CreateTensorAsOrtValue(); + fn test_field_CreateTensorWithDataAsOrtValue() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateTensorWithDataAsOrtValue) as usize - ptr as usize + }, + 392usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateTensorWithDataAsOrtValue) + ) + ); + } + test_field_CreateTensorWithDataAsOrtValue(); + fn test_field_IsTensor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).IsTensor) as usize - ptr as usize + }, + 400usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(IsTensor) + ) + ); + } + test_field_IsTensor(); + fn test_field_GetTensorMutableData() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetTensorMutableData) as usize - ptr as usize + }, + 408usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetTensorMutableData) + ) + ); + } + test_field_GetTensorMutableData(); + fn test_field_FillStringTensor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).FillStringTensor) as usize - ptr as usize + }, + 416usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(FillStringTensor) + ) + ); + } + test_field_FillStringTensor(); + fn test_field_GetStringTensorDataLength() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetStringTensorDataLength) as usize - ptr as usize + }, + 424usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetStringTensorDataLength) + ) + ); + } + test_field_GetStringTensorDataLength(); + fn test_field_GetStringTensorContent() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetStringTensorContent) as usize - ptr as usize + }, + 432usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetStringTensorContent) + ) + ); + } + test_field_GetStringTensorContent(); + fn test_field_CastTypeInfoToTensorInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CastTypeInfoToTensorInfo) as usize - ptr as usize + }, + 440usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CastTypeInfoToTensorInfo) + ) + ); + } + test_field_CastTypeInfoToTensorInfo(); + fn test_field_GetOnnxTypeFromTypeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetOnnxTypeFromTypeInfo) as usize - ptr as usize + }, + 448usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetOnnxTypeFromTypeInfo) + ) + ); + } + test_field_GetOnnxTypeFromTypeInfo(); + fn test_field_CreateTensorTypeAndShapeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateTensorTypeAndShapeInfo) as usize - ptr as usize + }, + 456usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateTensorTypeAndShapeInfo) + ) + ); + } + test_field_CreateTensorTypeAndShapeInfo(); + fn test_field_SetTensorElementType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetTensorElementType) as usize - ptr as usize + }, + 464usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetTensorElementType) + ) + ); + } + test_field_SetTensorElementType(); + fn test_field_SetDimensions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetDimensions) as usize - ptr as usize + }, + 472usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetDimensions) + ) + ); + } + test_field_SetDimensions(); + fn test_field_GetTensorElementType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetTensorElementType) as usize - ptr as usize + }, + 480usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetTensorElementType) + ) + ); + } + test_field_GetTensorElementType(); + fn test_field_GetDimensionsCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetDimensionsCount) as usize - ptr as usize + }, + 488usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetDimensionsCount) + ) + ); + } + test_field_GetDimensionsCount(); + fn test_field_GetDimensions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetDimensions) as usize - ptr as usize + }, + 496usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetDimensions) + ) + ); + } + test_field_GetDimensions(); + fn test_field_GetSymbolicDimensions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetSymbolicDimensions) as usize - ptr as usize + }, + 504usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetSymbolicDimensions) + ) + ); + } + test_field_GetSymbolicDimensions(); + fn test_field_GetTensorShapeElementCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetTensorShapeElementCount) as usize - ptr as usize + }, + 512usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetTensorShapeElementCount) + ) + ); + } + test_field_GetTensorShapeElementCount(); + fn test_field_GetTensorTypeAndShape() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetTensorTypeAndShape) as usize - ptr as usize + }, + 520usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetTensorTypeAndShape) + ) + ); + } + test_field_GetTensorTypeAndShape(); + fn test_field_GetTypeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetTypeInfo) as usize - ptr as usize + }, + 528usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetTypeInfo) + ) + ); + } + test_field_GetTypeInfo(); + fn test_field_GetValueType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetValueType) as usize - ptr as usize + }, + 536usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetValueType) + ) + ); + } + test_field_GetValueType(); + fn test_field_CreateMemoryInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateMemoryInfo) as usize - ptr as usize + }, + 544usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateMemoryInfo) + ) + ); + } + test_field_CreateMemoryInfo(); + fn test_field_CreateCpuMemoryInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateCpuMemoryInfo) as usize - ptr as usize + }, + 552usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateCpuMemoryInfo) + ) + ); + } + test_field_CreateCpuMemoryInfo(); + fn test_field_CompareMemoryInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CompareMemoryInfo) as usize - ptr as usize + }, + 560usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CompareMemoryInfo) + ) + ); + } + test_field_CompareMemoryInfo(); + fn test_field_MemoryInfoGetName() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).MemoryInfoGetName) as usize - ptr as usize + }, + 568usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(MemoryInfoGetName) + ) + ); + } + test_field_MemoryInfoGetName(); + fn test_field_MemoryInfoGetId() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).MemoryInfoGetId) as usize - ptr as usize + }, + 576usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(MemoryInfoGetId) + ) + ); + } + test_field_MemoryInfoGetId(); + fn test_field_MemoryInfoGetMemType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).MemoryInfoGetMemType) as usize - ptr as usize + }, + 584usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(MemoryInfoGetMemType) + ) + ); + } + test_field_MemoryInfoGetMemType(); + fn test_field_MemoryInfoGetType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).MemoryInfoGetType) as usize - ptr as usize + }, + 592usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(MemoryInfoGetType) + ) + ); + } + test_field_MemoryInfoGetType(); + fn test_field_AllocatorAlloc() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).AllocatorAlloc) as usize - ptr as usize + }, + 600usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(AllocatorAlloc) + ) + ); + } + test_field_AllocatorAlloc(); + fn test_field_AllocatorFree() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).AllocatorFree) as usize - ptr as usize + }, + 608usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(AllocatorFree) + ) + ); + } + test_field_AllocatorFree(); + fn test_field_AllocatorGetInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).AllocatorGetInfo) as usize - ptr as usize + }, + 616usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(AllocatorGetInfo) + ) + ); + } + test_field_AllocatorGetInfo(); + fn test_field_GetAllocatorWithDefaultOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetAllocatorWithDefaultOptions) as usize - ptr as usize + }, + 624usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetAllocatorWithDefaultOptions) + ) + ); + } + test_field_GetAllocatorWithDefaultOptions(); + fn test_field_AddFreeDimensionOverride() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).AddFreeDimensionOverride) as usize - ptr as usize + }, + 632usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(AddFreeDimensionOverride) + ) + ); + } + test_field_AddFreeDimensionOverride(); + fn test_field_GetValue() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetValue) as usize - ptr as usize + }, + 640usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetValue) + ) + ); + } + test_field_GetValue(); + fn test_field_GetValueCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetValueCount) as usize - ptr as usize + }, + 648usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetValueCount) + ) + ); + } + test_field_GetValueCount(); + fn test_field_CreateValue() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateValue) as usize - ptr as usize + }, + 656usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateValue) + ) + ); + } + test_field_CreateValue(); + fn test_field_CreateOpaqueValue() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateOpaqueValue) as usize - ptr as usize + }, + 664usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateOpaqueValue) + ) + ); + } + test_field_CreateOpaqueValue(); + fn test_field_GetOpaqueValue() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetOpaqueValue) as usize - ptr as usize + }, + 672usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetOpaqueValue) + ) + ); + } + test_field_GetOpaqueValue(); + fn test_field_KernelInfoGetAttribute_float() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelInfoGetAttribute_float) as usize - ptr as usize + }, + 680usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(KernelInfoGetAttribute_float) + ) + ); + } + test_field_KernelInfoGetAttribute_float(); + fn test_field_KernelInfoGetAttribute_int64() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelInfoGetAttribute_int64) as usize - ptr as usize + }, + 688usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(KernelInfoGetAttribute_int64) + ) + ); + } + test_field_KernelInfoGetAttribute_int64(); + fn test_field_KernelInfoGetAttribute_string() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelInfoGetAttribute_string) as usize - ptr as usize + }, + 696usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(KernelInfoGetAttribute_string) + ) + ); + } + test_field_KernelInfoGetAttribute_string(); + fn test_field_KernelContext_GetInputCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelContext_GetInputCount) as usize - ptr as usize + }, + 704usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(KernelContext_GetInputCount) + ) + ); + } + test_field_KernelContext_GetInputCount(); + fn test_field_KernelContext_GetOutputCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelContext_GetOutputCount) as usize - ptr as usize + }, + 712usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(KernelContext_GetOutputCount) + ) + ); + } + test_field_KernelContext_GetOutputCount(); + fn test_field_KernelContext_GetInput() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelContext_GetInput) as usize - ptr as usize + }, + 720usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(KernelContext_GetInput) + ) + ); + } + test_field_KernelContext_GetInput(); + fn test_field_KernelContext_GetOutput() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelContext_GetOutput) as usize - ptr as usize + }, + 728usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(KernelContext_GetOutput) + ) + ); + } + test_field_KernelContext_GetOutput(); + fn test_field_ReleaseEnv() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseEnv) as usize - ptr as usize + }, + 736usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseEnv) + ) + ); + } + test_field_ReleaseEnv(); + fn test_field_ReleaseStatus() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseStatus) as usize - ptr as usize + }, + 744usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseStatus) + ) + ); + } + test_field_ReleaseStatus(); + fn test_field_ReleaseMemoryInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseMemoryInfo) as usize - ptr as usize + }, + 752usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseMemoryInfo) + ) + ); + } + test_field_ReleaseMemoryInfo(); + fn test_field_ReleaseSession() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseSession) as usize - ptr as usize + }, + 760usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseSession) + ) + ); + } + test_field_ReleaseSession(); + fn test_field_ReleaseValue() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseValue) as usize - ptr as usize + }, + 768usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseValue) + ) + ); + } + test_field_ReleaseValue(); + fn test_field_ReleaseRunOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseRunOptions) as usize - ptr as usize + }, + 776usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseRunOptions) + ) + ); + } + test_field_ReleaseRunOptions(); + fn test_field_ReleaseTypeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseTypeInfo) as usize - ptr as usize + }, + 784usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseTypeInfo) + ) + ); + } + test_field_ReleaseTypeInfo(); + fn test_field_ReleaseTensorTypeAndShapeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseTensorTypeAndShapeInfo) as usize - ptr as usize + }, + 792usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseTensorTypeAndShapeInfo) + ) + ); + } + test_field_ReleaseTensorTypeAndShapeInfo(); + fn test_field_ReleaseSessionOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseSessionOptions) as usize - ptr as usize + }, + 800usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseSessionOptions) + ) + ); + } + test_field_ReleaseSessionOptions(); + fn test_field_ReleaseCustomOpDomain() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseCustomOpDomain) as usize - ptr as usize + }, + 808usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseCustomOpDomain) + ) + ); + } + test_field_ReleaseCustomOpDomain(); + fn test_field_GetDenotationFromTypeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetDenotationFromTypeInfo) as usize - ptr as usize + }, + 816usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetDenotationFromTypeInfo) + ) + ); + } + test_field_GetDenotationFromTypeInfo(); + fn test_field_CastTypeInfoToMapTypeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CastTypeInfoToMapTypeInfo) as usize - ptr as usize + }, + 824usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CastTypeInfoToMapTypeInfo) + ) + ); + } + test_field_CastTypeInfoToMapTypeInfo(); + fn test_field_CastTypeInfoToSequenceTypeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CastTypeInfoToSequenceTypeInfo) as usize - ptr as usize + }, + 832usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CastTypeInfoToSequenceTypeInfo) + ) + ); + } + test_field_CastTypeInfoToSequenceTypeInfo(); + fn test_field_GetMapKeyType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetMapKeyType) as usize - ptr as usize + }, + 840usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetMapKeyType) + ) + ); + } + test_field_GetMapKeyType(); + fn test_field_GetMapValueType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetMapValueType) as usize - ptr as usize + }, + 848usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetMapValueType) + ) + ); + } + test_field_GetMapValueType(); + fn test_field_GetSequenceElementType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetSequenceElementType) as usize - ptr as usize + }, + 856usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetSequenceElementType) + ) + ); + } + test_field_GetSequenceElementType(); + fn test_field_ReleaseMapTypeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseMapTypeInfo) as usize - ptr as usize + }, + 864usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseMapTypeInfo) + ) + ); + } + test_field_ReleaseMapTypeInfo(); + fn test_field_ReleaseSequenceTypeInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseSequenceTypeInfo) as usize - ptr as usize + }, + 872usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseSequenceTypeInfo) + ) + ); + } + test_field_ReleaseSequenceTypeInfo(); + fn test_field_SessionEndProfiling() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionEndProfiling) as usize - ptr as usize + }, + 880usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionEndProfiling) + ) + ); + } + test_field_SessionEndProfiling(); + fn test_field_SessionGetModelMetadata() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionGetModelMetadata) as usize - ptr as usize + }, + 888usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionGetModelMetadata) + ) + ); + } + test_field_SessionGetModelMetadata(); + fn test_field_ModelMetadataGetProducerName() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ModelMetadataGetProducerName) as usize - ptr as usize + }, + 896usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ModelMetadataGetProducerName) + ) + ); + } + test_field_ModelMetadataGetProducerName(); + fn test_field_ModelMetadataGetGraphName() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ModelMetadataGetGraphName) as usize - ptr as usize + }, + 904usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ModelMetadataGetGraphName) + ) + ); + } + test_field_ModelMetadataGetGraphName(); + fn test_field_ModelMetadataGetDomain() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ModelMetadataGetDomain) as usize - ptr as usize + }, + 912usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ModelMetadataGetDomain) + ) + ); + } + test_field_ModelMetadataGetDomain(); + fn test_field_ModelMetadataGetDescription() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ModelMetadataGetDescription) as usize - ptr as usize + }, + 920usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ModelMetadataGetDescription) + ) + ); + } + test_field_ModelMetadataGetDescription(); + fn test_field_ModelMetadataLookupCustomMetadataMap() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ModelMetadataLookupCustomMetadataMap) as usize + - ptr as usize + }, + 928usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ModelMetadataLookupCustomMetadataMap) + ) + ); + } + test_field_ModelMetadataLookupCustomMetadataMap(); + fn test_field_ModelMetadataGetVersion() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ModelMetadataGetVersion) as usize - ptr as usize + }, + 936usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ModelMetadataGetVersion) + ) + ); + } + test_field_ModelMetadataGetVersion(); + fn test_field_ReleaseModelMetadata() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseModelMetadata) as usize - ptr as usize + }, + 944usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseModelMetadata) + ) + ); + } + test_field_ReleaseModelMetadata(); + fn test_field_CreateEnvWithGlobalThreadPools() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateEnvWithGlobalThreadPools) as usize - ptr as usize + }, + 952usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateEnvWithGlobalThreadPools) + ) + ); + } + test_field_CreateEnvWithGlobalThreadPools(); + fn test_field_DisablePerSessionThreads() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).DisablePerSessionThreads) as usize - ptr as usize + }, + 960usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(DisablePerSessionThreads) + ) + ); + } + test_field_DisablePerSessionThreads(); + fn test_field_CreateThreadingOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateThreadingOptions) as usize - ptr as usize + }, + 968usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateThreadingOptions) + ) + ); + } + test_field_CreateThreadingOptions(); + fn test_field_ReleaseThreadingOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseThreadingOptions) as usize - ptr as usize + }, + 976usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseThreadingOptions) + ) + ); + } + test_field_ReleaseThreadingOptions(); + fn test_field_ModelMetadataGetCustomMetadataMapKeys() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ModelMetadataGetCustomMetadataMapKeys) as usize + - ptr as usize + }, + 984usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ModelMetadataGetCustomMetadataMapKeys) + ) + ); + } + test_field_ModelMetadataGetCustomMetadataMapKeys(); + fn test_field_AddFreeDimensionOverrideByName() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).AddFreeDimensionOverrideByName) as usize - ptr as usize + }, + 992usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(AddFreeDimensionOverrideByName) + ) + ); + } + test_field_AddFreeDimensionOverrideByName(); + fn test_field_GetAvailableProviders() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetAvailableProviders) as usize - ptr as usize + }, + 1000usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetAvailableProviders) + ) + ); + } + test_field_GetAvailableProviders(); + fn test_field_ReleaseAvailableProviders() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseAvailableProviders) as usize - ptr as usize + }, + 1008usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseAvailableProviders) + ) + ); + } + test_field_ReleaseAvailableProviders(); + fn test_field_GetStringTensorElementLength() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetStringTensorElementLength) as usize - ptr as usize + }, + 1016usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetStringTensorElementLength) + ) + ); + } + test_field_GetStringTensorElementLength(); + fn test_field_GetStringTensorElement() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetStringTensorElement) as usize - ptr as usize + }, + 1024usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetStringTensorElement) + ) + ); + } + test_field_GetStringTensorElement(); + fn test_field_FillStringTensorElement() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).FillStringTensorElement) as usize - ptr as usize + }, + 1032usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(FillStringTensorElement) + ) + ); + } + test_field_FillStringTensorElement(); + fn test_field_AddSessionConfigEntry() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).AddSessionConfigEntry) as usize - ptr as usize + }, + 1040usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(AddSessionConfigEntry) + ) + ); + } + test_field_AddSessionConfigEntry(); + fn test_field_CreateAllocator() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateAllocator) as usize - ptr as usize + }, + 1048usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateAllocator) + ) + ); + } + test_field_CreateAllocator(); + fn test_field_ReleaseAllocator() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseAllocator) as usize - ptr as usize + }, + 1056usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseAllocator) + ) + ); + } + test_field_ReleaseAllocator(); + fn test_field_RunWithBinding() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RunWithBinding) as usize - ptr as usize + }, + 1064usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(RunWithBinding) + ) + ); + } + test_field_RunWithBinding(); + fn test_field_CreateIoBinding() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateIoBinding) as usize - ptr as usize + }, + 1072usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateIoBinding) + ) + ); + } + test_field_CreateIoBinding(); + fn test_field_ReleaseIoBinding() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseIoBinding) as usize - ptr as usize + }, + 1080usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseIoBinding) + ) + ); + } + test_field_ReleaseIoBinding(); + fn test_field_BindInput() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).BindInput) as usize - ptr as usize + }, + 1088usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(BindInput) + ) + ); + } + test_field_BindInput(); + fn test_field_BindOutput() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).BindOutput) as usize - ptr as usize + }, + 1096usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(BindOutput) + ) + ); + } + test_field_BindOutput(); + fn test_field_BindOutputToDevice() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).BindOutputToDevice) as usize - ptr as usize + }, + 1104usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(BindOutputToDevice) + ) + ); + } + test_field_BindOutputToDevice(); + fn test_field_GetBoundOutputNames() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetBoundOutputNames) as usize - ptr as usize + }, + 1112usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetBoundOutputNames) + ) + ); + } + test_field_GetBoundOutputNames(); + fn test_field_GetBoundOutputValues() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetBoundOutputValues) as usize - ptr as usize + }, + 1120usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetBoundOutputValues) + ) + ); + } + test_field_GetBoundOutputValues(); + fn test_field_ClearBoundInputs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ClearBoundInputs) as usize - ptr as usize + }, + 1128usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ClearBoundInputs) + ) + ); + } + test_field_ClearBoundInputs(); + fn test_field_ClearBoundOutputs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ClearBoundOutputs) as usize - ptr as usize + }, + 1136usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ClearBoundOutputs) + ) + ); + } + test_field_ClearBoundOutputs(); + fn test_field_TensorAt() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).TensorAt) as usize - ptr as usize + }, + 1144usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(TensorAt) + ) + ); + } + test_field_TensorAt(); + fn test_field_CreateAndRegisterAllocator() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateAndRegisterAllocator) as usize - ptr as usize + }, + 1152usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateAndRegisterAllocator) + ) + ); + } + test_field_CreateAndRegisterAllocator(); + fn test_field_SetLanguageProjection() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetLanguageProjection) as usize - ptr as usize + }, + 1160usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetLanguageProjection) + ) + ); + } + test_field_SetLanguageProjection(); + fn test_field_SessionGetProfilingStartTimeNs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionGetProfilingStartTimeNs) as usize - ptr as usize + }, + 1168usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionGetProfilingStartTimeNs) + ) + ); + } + test_field_SessionGetProfilingStartTimeNs(); + fn test_field_SetGlobalIntraOpNumThreads() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetGlobalIntraOpNumThreads) as usize - ptr as usize + }, + 1176usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetGlobalIntraOpNumThreads) + ) + ); + } + test_field_SetGlobalIntraOpNumThreads(); + fn test_field_SetGlobalInterOpNumThreads() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetGlobalInterOpNumThreads) as usize - ptr as usize + }, + 1184usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetGlobalInterOpNumThreads) + ) + ); + } + test_field_SetGlobalInterOpNumThreads(); + fn test_field_SetGlobalSpinControl() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetGlobalSpinControl) as usize - ptr as usize + }, + 1192usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetGlobalSpinControl) + ) + ); + } + test_field_SetGlobalSpinControl(); + fn test_field_AddInitializer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).AddInitializer) as usize - ptr as usize + }, + 1200usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(AddInitializer) + ) + ); + } + test_field_AddInitializer(); + fn test_field_CreateEnvWithCustomLoggerAndGlobalThreadPools() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateEnvWithCustomLoggerAndGlobalThreadPools) as usize + - ptr as usize + }, + 1208usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateEnvWithCustomLoggerAndGlobalThreadPools) + ) + ); + } + test_field_CreateEnvWithCustomLoggerAndGlobalThreadPools(); + fn test_field_SessionOptionsAppendExecutionProvider_CUDA() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_CUDA) as usize + - ptr as usize + }, + 1216usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_CUDA) + ) + ); + } + test_field_SessionOptionsAppendExecutionProvider_CUDA(); + fn test_field_SessionOptionsAppendExecutionProvider_ROCM() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_ROCM) as usize + - ptr as usize + }, + 1224usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_ROCM) + ) + ); + } + test_field_SessionOptionsAppendExecutionProvider_ROCM(); + fn test_field_SessionOptionsAppendExecutionProvider_OpenVINO() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_OpenVINO) as usize + - ptr as usize + }, + 1232usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_OpenVINO) + ) + ); + } + test_field_SessionOptionsAppendExecutionProvider_OpenVINO(); + fn test_field_SetGlobalDenormalAsZero() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetGlobalDenormalAsZero) as usize - ptr as usize + }, + 1240usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetGlobalDenormalAsZero) + ) + ); + } + test_field_SetGlobalDenormalAsZero(); + fn test_field_CreateArenaCfg() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateArenaCfg) as usize - ptr as usize + }, + 1248usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateArenaCfg) + ) + ); + } + test_field_CreateArenaCfg(); + fn test_field_ReleaseArenaCfg() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseArenaCfg) as usize - ptr as usize + }, + 1256usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseArenaCfg) + ) + ); + } + test_field_ReleaseArenaCfg(); + fn test_field_ModelMetadataGetGraphDescription() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ModelMetadataGetGraphDescription) as usize + - ptr as usize + }, + 1264usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ModelMetadataGetGraphDescription) + ) + ); + } + test_field_ModelMetadataGetGraphDescription(); + fn test_field_SessionOptionsAppendExecutionProvider_TensorRT() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_TensorRT) as usize + - ptr as usize + }, + 1272usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_TensorRT) + ) + ); + } + test_field_SessionOptionsAppendExecutionProvider_TensorRT(); + fn test_field_SetCurrentGpuDeviceId() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetCurrentGpuDeviceId) as usize - ptr as usize + }, + 1280usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetCurrentGpuDeviceId) + ) + ); + } + test_field_SetCurrentGpuDeviceId(); + fn test_field_GetCurrentGpuDeviceId() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetCurrentGpuDeviceId) as usize - ptr as usize + }, + 1288usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetCurrentGpuDeviceId) + ) + ); + } + test_field_GetCurrentGpuDeviceId(); + fn test_field_KernelInfoGetAttributeArray_float() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelInfoGetAttributeArray_float) as usize + - ptr as usize + }, + 1296usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(KernelInfoGetAttributeArray_float) + ) + ); + } + test_field_KernelInfoGetAttributeArray_float(); + fn test_field_KernelInfoGetAttributeArray_int64() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelInfoGetAttributeArray_int64) as usize + - ptr as usize + }, + 1304usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(KernelInfoGetAttributeArray_int64) + ) + ); + } + test_field_KernelInfoGetAttributeArray_int64(); + fn test_field_CreateArenaCfgV2() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateArenaCfgV2) as usize - ptr as usize + }, + 1312usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateArenaCfgV2) + ) + ); + } + test_field_CreateArenaCfgV2(); + fn test_field_AddRunConfigEntry() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).AddRunConfigEntry) as usize - ptr as usize + }, + 1320usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(AddRunConfigEntry) + ) + ); + } + test_field_AddRunConfigEntry(); + fn test_field_CreatePrepackedWeightsContainer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreatePrepackedWeightsContainer) as usize - ptr as usize + }, + 1328usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreatePrepackedWeightsContainer) + ) + ); + } + test_field_CreatePrepackedWeightsContainer(); + fn test_field_ReleasePrepackedWeightsContainer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleasePrepackedWeightsContainer) as usize + - ptr as usize + }, + 1336usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleasePrepackedWeightsContainer) + ) + ); + } + test_field_ReleasePrepackedWeightsContainer(); + fn test_field_CreateSessionWithPrepackedWeightsContainer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateSessionWithPrepackedWeightsContainer) as usize + - ptr as usize + }, + 1344usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateSessionWithPrepackedWeightsContainer) + ) + ); + } + test_field_CreateSessionWithPrepackedWeightsContainer(); + fn test_field_CreateSessionFromArrayWithPrepackedWeightsContainer() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateSessionFromArrayWithPrepackedWeightsContainer) + as usize + - ptr as usize + }, + 1352usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateSessionFromArrayWithPrepackedWeightsContainer) + ) + ); + } + test_field_CreateSessionFromArrayWithPrepackedWeightsContainer(); + fn test_field_SessionOptionsAppendExecutionProvider_TensorRT_V2() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_TensorRT_V2) + as usize + - ptr as usize + }, + 1360usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_TensorRT_V2) + ) + ); + } + test_field_SessionOptionsAppendExecutionProvider_TensorRT_V2(); + fn test_field_CreateTensorRTProviderOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateTensorRTProviderOptions) as usize - ptr as usize + }, + 1368usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateTensorRTProviderOptions) + ) + ); + } + test_field_CreateTensorRTProviderOptions(); + fn test_field_UpdateTensorRTProviderOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).UpdateTensorRTProviderOptions) as usize - ptr as usize + }, + 1376usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(UpdateTensorRTProviderOptions) + ) + ); + } + test_field_UpdateTensorRTProviderOptions(); + fn test_field_GetTensorRTProviderOptionsAsString() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetTensorRTProviderOptionsAsString) as usize + - ptr as usize + }, + 1384usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetTensorRTProviderOptionsAsString) + ) + ); + } + test_field_GetTensorRTProviderOptionsAsString(); + fn test_field_ReleaseTensorRTProviderOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseTensorRTProviderOptions) as usize - ptr as usize + }, + 1392usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseTensorRTProviderOptions) + ) + ); + } + test_field_ReleaseTensorRTProviderOptions(); + fn test_field_EnableOrtCustomOps() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).EnableOrtCustomOps) as usize - ptr as usize + }, + 1400usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(EnableOrtCustomOps) + ) + ); + } + test_field_EnableOrtCustomOps(); + fn test_field_RegisterAllocator() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).RegisterAllocator) as usize - ptr as usize + }, + 1408usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(RegisterAllocator) + ) + ); + } + test_field_RegisterAllocator(); + fn test_field_UnregisterAllocator() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).UnregisterAllocator) as usize - ptr as usize + }, + 1416usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(UnregisterAllocator) + ) + ); + } + test_field_UnregisterAllocator(); + fn test_field_IsSparseTensor() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).IsSparseTensor) as usize - ptr as usize + }, + 1424usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(IsSparseTensor) + ) + ); + } + test_field_IsSparseTensor(); + fn test_field_CreateSparseTensorAsOrtValue() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateSparseTensorAsOrtValue) as usize - ptr as usize + }, + 1432usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateSparseTensorAsOrtValue) + ) + ); + } + test_field_CreateSparseTensorAsOrtValue(); + fn test_field_FillSparseTensorCoo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).FillSparseTensorCoo) as usize - ptr as usize + }, + 1440usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(FillSparseTensorCoo) + ) + ); + } + test_field_FillSparseTensorCoo(); + fn test_field_FillSparseTensorCsr() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).FillSparseTensorCsr) as usize - ptr as usize + }, + 1448usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(FillSparseTensorCsr) + ) + ); + } + test_field_FillSparseTensorCsr(); + fn test_field_FillSparseTensorBlockSparse() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).FillSparseTensorBlockSparse) as usize - ptr as usize + }, + 1456usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(FillSparseTensorBlockSparse) + ) + ); + } + test_field_FillSparseTensorBlockSparse(); + fn test_field_CreateSparseTensorWithValuesAsOrtValue() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateSparseTensorWithValuesAsOrtValue) as usize + - ptr as usize + }, + 1464usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateSparseTensorWithValuesAsOrtValue) + ) + ); + } + test_field_CreateSparseTensorWithValuesAsOrtValue(); + fn test_field_UseCooIndices() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).UseCooIndices) as usize - ptr as usize + }, + 1472usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(UseCooIndices) + ) + ); + } + test_field_UseCooIndices(); + fn test_field_UseCsrIndices() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).UseCsrIndices) as usize - ptr as usize + }, + 1480usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(UseCsrIndices) + ) + ); + } + test_field_UseCsrIndices(); + fn test_field_UseBlockSparseIndices() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).UseBlockSparseIndices) as usize - ptr as usize + }, + 1488usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(UseBlockSparseIndices) + ) + ); + } + test_field_UseBlockSparseIndices(); + fn test_field_GetSparseTensorFormat() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetSparseTensorFormat) as usize - ptr as usize + }, + 1496usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetSparseTensorFormat) + ) + ); + } + test_field_GetSparseTensorFormat(); + fn test_field_GetSparseTensorValuesTypeAndShape() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetSparseTensorValuesTypeAndShape) as usize + - ptr as usize + }, + 1504usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetSparseTensorValuesTypeAndShape) + ) + ); + } + test_field_GetSparseTensorValuesTypeAndShape(); + fn test_field_GetSparseTensorValues() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetSparseTensorValues) as usize - ptr as usize + }, + 1512usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetSparseTensorValues) + ) + ); + } + test_field_GetSparseTensorValues(); + fn test_field_GetSparseTensorIndicesTypeShape() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetSparseTensorIndicesTypeShape) as usize - ptr as usize + }, + 1520usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetSparseTensorIndicesTypeShape) + ) + ); + } + test_field_GetSparseTensorIndicesTypeShape(); + fn test_field_GetSparseTensorIndices() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetSparseTensorIndices) as usize - ptr as usize + }, + 1528usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetSparseTensorIndices) + ) + ); + } + test_field_GetSparseTensorIndices(); + fn test_field_HasValue() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).HasValue) as usize - ptr as usize + }, + 1536usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(HasValue) + ) + ); + } + test_field_HasValue(); + fn test_field_KernelContext_GetGPUComputeStream() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelContext_GetGPUComputeStream) as usize + - ptr as usize + }, + 1544usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(KernelContext_GetGPUComputeStream) + ) + ); + } + test_field_KernelContext_GetGPUComputeStream(); + fn test_field_GetTensorMemoryInfo() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetTensorMemoryInfo) as usize - ptr as usize + }, + 1552usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetTensorMemoryInfo) + ) + ); + } + test_field_GetTensorMemoryInfo(); + fn test_field_GetExecutionProviderApi() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetExecutionProviderApi) as usize - ptr as usize + }, + 1560usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetExecutionProviderApi) + ) + ); + } + test_field_GetExecutionProviderApi(); + fn test_field_SessionOptionsSetCustomCreateThreadFn() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionOptionsSetCustomCreateThreadFn) as usize + - ptr as usize + }, + 1568usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsSetCustomCreateThreadFn) + ) + ); + } + test_field_SessionOptionsSetCustomCreateThreadFn(); + fn test_field_SessionOptionsSetCustomThreadCreationOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionOptionsSetCustomThreadCreationOptions) as usize + - ptr as usize + }, + 1576usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsSetCustomThreadCreationOptions) + ) + ); + } + test_field_SessionOptionsSetCustomThreadCreationOptions(); + fn test_field_SessionOptionsSetCustomJoinThreadFn() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionOptionsSetCustomJoinThreadFn) as usize + - ptr as usize + }, + 1584usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsSetCustomJoinThreadFn) + ) + ); + } + test_field_SessionOptionsSetCustomJoinThreadFn(); + fn test_field_SetGlobalCustomCreateThreadFn() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetGlobalCustomCreateThreadFn) as usize - ptr as usize + }, + 1592usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetGlobalCustomCreateThreadFn) + ) + ); + } + test_field_SetGlobalCustomCreateThreadFn(); + fn test_field_SetGlobalCustomThreadCreationOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetGlobalCustomThreadCreationOptions) as usize + - ptr as usize + }, + 1600usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetGlobalCustomThreadCreationOptions) + ) + ); + } + test_field_SetGlobalCustomThreadCreationOptions(); + fn test_field_SetGlobalCustomJoinThreadFn() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SetGlobalCustomJoinThreadFn) as usize - ptr as usize + }, + 1608usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SetGlobalCustomJoinThreadFn) + ) + ); + } + test_field_SetGlobalCustomJoinThreadFn(); + fn test_field_SynchronizeBoundInputs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SynchronizeBoundInputs) as usize - ptr as usize + }, + 1616usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SynchronizeBoundInputs) + ) + ); + } + test_field_SynchronizeBoundInputs(); + fn test_field_SynchronizeBoundOutputs() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SynchronizeBoundOutputs) as usize - ptr as usize + }, + 1624usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SynchronizeBoundOutputs) + ) + ); + } + test_field_SynchronizeBoundOutputs(); + fn test_field_SessionOptionsAppendExecutionProvider_CUDA_V2() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_CUDA_V2) as usize + - ptr as usize + }, + 1632usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_CUDA_V2) + ) + ); + } + test_field_SessionOptionsAppendExecutionProvider_CUDA_V2(); + fn test_field_CreateCUDAProviderOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateCUDAProviderOptions) as usize - ptr as usize + }, + 1640usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(CreateCUDAProviderOptions) + ) + ); + } + test_field_CreateCUDAProviderOptions(); + fn test_field_UpdateCUDAProviderOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).UpdateCUDAProviderOptions) as usize - ptr as usize + }, + 1648usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(UpdateCUDAProviderOptions) + ) + ); + } + test_field_UpdateCUDAProviderOptions(); + fn test_field_GetCUDAProviderOptionsAsString() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetCUDAProviderOptionsAsString) as usize - ptr as usize + }, + 1656usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(GetCUDAProviderOptionsAsString) + ) + ); + } + test_field_GetCUDAProviderOptionsAsString(); + fn test_field_ReleaseCUDAProviderOptions() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).ReleaseCUDAProviderOptions) as usize - ptr as usize + }, + 1664usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(ReleaseCUDAProviderOptions) + ) + ); + } + test_field_ReleaseCUDAProviderOptions(); + fn test_field_SessionOptionsAppendExecutionProvider_MIGraphX() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).SessionOptionsAppendExecutionProvider_MIGraphX) as usize + - ptr as usize + }, + 1672usize, + concat!( + "Offset of field: ", + stringify!(OrtApi), + "::", + stringify!(SessionOptionsAppendExecutionProvider_MIGraphX) + ) + ); + } + test_field_SessionOptionsAppendExecutionProvider_MIGraphX(); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum OrtCustomOpInputOutputCharacteristic { + INPUT_OUTPUT_REQUIRED = 0, + INPUT_OUTPUT_OPTIONAL = 1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct OrtCustomOp { + pub version: u32, + pub CreateKernel: ::std::option::Option< + unsafe extern "C" fn( + op: *const OrtCustomOp, + api: *const OrtApi, + info: *const OrtKernelInfo, + ) -> *mut ::std::os::raw::c_void, + >, + pub GetName: ::std::option::Option< + unsafe extern "C" fn(op: *const OrtCustomOp) -> *const ::std::os::raw::c_char, + >, + pub GetExecutionProviderType: ::std::option::Option< + unsafe extern "C" fn(op: *const OrtCustomOp) -> *const ::std::os::raw::c_char, + >, + pub GetInputType: ::std::option::Option< + unsafe extern "C" fn(op: *const OrtCustomOp, index: usize) -> ONNXTensorElementDataType, + >, + pub GetInputTypeCount: + ::std::option::Option usize>, + pub GetOutputType: ::std::option::Option< + unsafe extern "C" fn(op: *const OrtCustomOp, index: usize) -> ONNXTensorElementDataType, + >, + pub GetOutputTypeCount: + ::std::option::Option usize>, + pub KernelCompute: ::std::option::Option< + unsafe extern "C" fn( + op_kernel: *mut ::std::os::raw::c_void, + context: *mut OrtKernelContext, + ), + >, + pub KernelDestroy: + ::std::option::Option, + pub GetInputCharacteristic: ::std::option::Option< + unsafe extern "C" fn( + op: *const OrtCustomOp, + index: usize, + ) -> OrtCustomOpInputOutputCharacteristic, + >, + pub GetOutputCharacteristic: ::std::option::Option< + unsafe extern "C" fn( + op: *const OrtCustomOp, + index: usize, + ) -> OrtCustomOpInputOutputCharacteristic, + >, +} +#[test] +fn bindgen_test_layout_OrtCustomOp() { + assert_eq!( + ::std::mem::size_of::(), + 96usize, + concat!("Size of: ", stringify!(OrtCustomOp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(OrtCustomOp)) + ); + fn test_field_version() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(version) + ) + ); + } + test_field_version(); + fn test_field_CreateKernel() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).CreateKernel) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(CreateKernel) + ) + ); + } + test_field_CreateKernel(); + fn test_field_GetName() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetName) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(GetName) + ) + ); + } + test_field_GetName(); + fn test_field_GetExecutionProviderType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetExecutionProviderType) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(GetExecutionProviderType) + ) + ); + } + test_field_GetExecutionProviderType(); + fn test_field_GetInputType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetInputType) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(GetInputType) + ) + ); + } + test_field_GetInputType(); + fn test_field_GetInputTypeCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetInputTypeCount) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(GetInputTypeCount) + ) + ); + } + test_field_GetInputTypeCount(); + fn test_field_GetOutputType() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetOutputType) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(GetOutputType) + ) + ); + } + test_field_GetOutputType(); + fn test_field_GetOutputTypeCount() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetOutputTypeCount) as usize - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(GetOutputTypeCount) + ) + ); + } + test_field_GetOutputTypeCount(); + fn test_field_KernelCompute() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelCompute) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(KernelCompute) + ) + ); + } + test_field_KernelCompute(); + fn test_field_KernelDestroy() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).KernelDestroy) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(KernelDestroy) + ) + ); + } + test_field_KernelDestroy(); + fn test_field_GetInputCharacteristic() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetInputCharacteristic) as usize - ptr as usize + }, + 80usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(GetInputCharacteristic) + ) + ); + } + test_field_GetInputCharacteristic(); + fn test_field_GetOutputCharacteristic() { + assert_eq!( + unsafe { + let uninit = ::std::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::std::ptr::addr_of!((*ptr).GetOutputCharacteristic) as usize - ptr as usize + }, + 88usize, + concat!( + "Offset of field: ", + stringify!(OrtCustomOp), + "::", + stringify!(GetOutputCharacteristic) + ) + ); + } + test_field_GetOutputCharacteristic(); +} +extern "C" { + pub fn OrtSessionOptionsAppendExecutionProvider_CUDA( + options: *mut OrtSessionOptions, + device_id: ::std::os::raw::c_int, + ) -> OrtStatusPtr; +} +extern "C" { + pub fn OrtSessionOptionsAppendExecutionProvider_MIGraphX( + options: *mut OrtSessionOptions, + device_id: ::std::os::raw::c_int, + ) -> OrtStatusPtr; +} diff --git a/onnxruntime/src/error.rs b/onnxruntime/src/error.rs index 7d70fc0f..1466310b 100644 --- a/onnxruntime/src/error.rs +++ b/onnxruntime/src/error.rs @@ -1,6 +1,6 @@ //! Module containing error definitions. -use std::{io, path::PathBuf}; +use std::{io, os::raw::c_char, path::PathBuf}; use thiserror::Error; @@ -212,7 +212,7 @@ impl From for std::result::Result<(), OrtApiError> { if status.0.is_null() { Ok(()) } else { - let raw: *const i8 = unsafe { g_ort().GetErrorMessage.unwrap()(status.0) }; + let raw: *const c_char = unsafe { g_ort().GetErrorMessage.unwrap()(status.0) }; match char_p_to_string(raw) { Ok(msg) => Err(OrtApiError::Msg(msg)), Err(err) => match err { diff --git a/onnxruntime/src/lib.rs b/onnxruntime/src/lib.rs index 0320157a..2da7792d 100644 --- a/onnxruntime/src/lib.rs +++ b/onnxruntime/src/lib.rs @@ -117,6 +117,7 @@ to download. use std::{ ffi::c_void, + os::raw::c_char, ptr::null_mut, sync::{atomic::AtomicPtr, Arc, Mutex}, }; @@ -190,8 +191,8 @@ fn g_ort() -> sys::OrtApi { unsafe { *api_ptr_mut } } -fn char_p_to_string(raw: *const i8) -> Result { - let c_string = unsafe { std::ffi::CStr::from_ptr(raw as *mut i8).to_owned() }; +fn char_p_to_string(raw: *const c_char) -> Result { + let c_string = unsafe { std::ffi::CStr::from_ptr(raw as *mut c_char).to_owned() }; match c_string.into_string() { Ok(string) => Ok(string), @@ -204,7 +205,7 @@ mod onnxruntime { //! Module containing a custom logger, used to catch the runtime's own logging and send it //! to Rust's tracing logging instead. - use std::ffi::CStr; + use std::{ffi::CStr, os::raw::c_char}; use tracing::{debug, error, info, span, trace, warn, Level}; use onnxruntime_sys as sys; @@ -243,10 +244,10 @@ mod onnxruntime { pub(crate) fn custom_logger( _params: *mut std::ffi::c_void, severity: sys::OrtLoggingLevel, - category: *const i8, - logid: *const i8, - code_location: *const i8, - message: *const i8, + category: *const c_char, + logid: *const c_char, + code_location: *const c_char, + message: *const c_char, ) { let log_level = match severity { sys::OrtLoggingLevel::ORT_LOGGING_LEVEL_VERBOSE => Level::TRACE, diff --git a/onnxruntime/src/session.rs b/onnxruntime/src/session.rs index 58a69fda..77670caa 100644 --- a/onnxruntime/src/session.rs +++ b/onnxruntime/src/session.rs @@ -518,12 +518,12 @@ impl<'a> Session<'a> { // Build arguments to Run() - let input_names_ptr: Vec<*const i8> = self + let input_names_ptr: Vec<*const c_char> = self .inputs .iter() .map(|input| input.name.clone()) .map(|n| CString::new(n).unwrap()) - .map(|n| n.into_raw() as *const i8) + .map(|n| n.into_raw() as *const c_char) .collect(); let output_names_cstring: Vec = self @@ -532,9 +532,9 @@ impl<'a> Session<'a> { .map(|output| output.name.clone()) .map(|n| CString::new(n).unwrap()) .collect(); - let output_names_ptr: Vec<*const i8> = output_names_cstring + let output_names_ptr: Vec<*const c_char> = output_names_cstring .iter() - .map(|n| n.as_ptr() as *const i8) + .map(|n| n.as_ptr() as *const c_char) .collect(); let mut output_tensor_extractors_ptrs: Vec<*mut sys::OrtValue> = @@ -595,7 +595,7 @@ impl<'a> Session<'a> { .into_iter() .map(|p| { assert_not_null_pointer(p, "i8 for CString")?; - unsafe { Ok(CString::from_raw(p as *mut i8)) } + unsafe { Ok(CString::from_raw(p as *mut c_char)) } }) .collect(); cstrings?; @@ -787,13 +787,13 @@ mod dangerous { *const sys::OrtSession, usize, *mut sys::OrtAllocator, - *mut *mut i8, + *mut *mut c_char, ) -> *mut sys::OrtStatus }, session_ptr: *mut sys::OrtSession, allocator_ptr: *mut sys::OrtAllocator, i: usize, ) -> Result { - let mut name_bytes: *mut i8 = std::ptr::null_mut(); + let mut name_bytes: *mut c_char = std::ptr::null_mut(); let status = unsafe { f(session_ptr, i, allocator_ptr, &mut name_bytes) }; status_to_result(status).map_err(OrtError::InputName)?;