@@ -165,7 +165,7 @@ pub const ETIMEDOUT: u32 = 138;
165165pub const ETXTBSY : u32 = 139 ;
166166pub const EWOULDBLOCK : u32 = 140 ;
167167pub const _NLSCMPERROR: u32 = 2147483647 ;
168- pub const ORT_API_VERSION : u32 = 6 ;
168+ pub const ORT_API_VERSION : u32 = 7 ;
169169pub const __SAL_H_FULL_VER: u32 = 140050727 ;
170170pub const __SPECSTRINGS_STRICT_LEVEL: u32 = 1 ;
171171pub const __drv_typeConst: u32 = 0 ;
@@ -473,21 +473,7 @@ extern "C" {
473473 _Alignment : usize ,
474474 ) -> * mut :: std:: os:: raw:: c_void ;
475475}
476- extern "C" {
477- pub fn _errno ( ) -> * mut :: std:: os:: raw:: c_int ;
478- }
479- extern "C" {
480- pub fn _set_errno ( _Value : :: std:: os:: raw:: c_int ) -> errno_t ;
481- }
482- extern "C" {
483- pub fn _get_errno ( _Value : * mut :: std:: os:: raw:: c_int ) -> errno_t ;
484- }
485- extern "C" {
486- pub fn __threadid ( ) -> :: std:: os:: raw:: c_ulong ;
487- }
488- extern "C" {
489- pub fn __threadhandle ( ) -> usize ;
490- }
476+ pub type max_align_t = f64 ;
491477pub type _CoreCrtSecureSearchSortCompareFunction = :: std:: option:: Option <
492478 unsafe extern "C" fn (
493479 arg1 : * mut :: std:: os:: raw:: c_void ,
@@ -986,6 +972,15 @@ extern "C" {
986972extern "C" {
987973 pub fn _set_error_mode ( _Mode : :: std:: os:: raw:: c_int ) -> :: std:: os:: raw:: c_int ;
988974}
975+ extern "C" {
976+ pub fn _errno ( ) -> * mut :: std:: os:: raw:: c_int ;
977+ }
978+ extern "C" {
979+ pub fn _set_errno ( _Value : :: std:: os:: raw:: c_int ) -> errno_t ;
980+ }
981+ extern "C" {
982+ pub fn _get_errno ( _Value : * mut :: std:: os:: raw:: c_int ) -> errno_t ;
983+ }
989984extern "C" {
990985 pub fn __doserrno ( ) -> * mut :: std:: os:: raw:: c_ulong ;
991986}
@@ -3054,12 +3049,14 @@ pub struct OrtCUDAProviderOptions {
30543049 pub cuda_mem_limit : usize ,
30553050 pub arena_extend_strategy : :: std:: os:: raw:: c_int ,
30563051 pub do_copy_in_default_stream : :: std:: os:: raw:: c_int ,
3052+ pub has_user_compute_stream : :: std:: os:: raw:: c_int ,
3053+ pub user_compute_stream : * mut :: std:: os:: raw:: c_void ,
30573054}
30583055#[ test]
30593056fn bindgen_test_layout_OrtCUDAProviderOptions ( ) {
30603057 assert_eq ! (
30613058 :: std:: mem:: size_of:: <OrtCUDAProviderOptions >( ) ,
3062- 20usize ,
3059+ 28usize ,
30633060 concat!( "Size of: " , stringify!( OrtCUDAProviderOptions ) )
30643061 ) ;
30653062 assert_eq ! (
@@ -3130,6 +3127,93 @@ fn bindgen_test_layout_OrtCUDAProviderOptions() {
31303127 stringify!( do_copy_in_default_stream)
31313128 )
31323129 ) ;
3130+ assert_eq ! (
3131+ unsafe {
3132+ & ( * ( :: std:: ptr:: null:: <OrtCUDAProviderOptions >( ) ) ) . has_user_compute_stream as * const _
3133+ as usize
3134+ } ,
3135+ 20usize ,
3136+ concat!(
3137+ "Offset of field: " ,
3138+ stringify!( OrtCUDAProviderOptions ) ,
3139+ "::" ,
3140+ stringify!( has_user_compute_stream)
3141+ )
3142+ ) ;
3143+ assert_eq ! (
3144+ unsafe {
3145+ & ( * ( :: std:: ptr:: null:: <OrtCUDAProviderOptions >( ) ) ) . user_compute_stream as * const _
3146+ as usize
3147+ } ,
3148+ 24usize ,
3149+ concat!(
3150+ "Offset of field: " ,
3151+ stringify!( OrtCUDAProviderOptions ) ,
3152+ "::" ,
3153+ stringify!( user_compute_stream)
3154+ )
3155+ ) ;
3156+ }
3157+ #[ doc = " <summary>" ]
3158+ #[ doc = " Options for the TensorRT provider that are passed to SessionOptionsAppendExecutionProvider_TensorRT" ]
3159+ #[ doc = " </summary>" ]
3160+ #[ repr( C ) ]
3161+ #[ derive( Debug , Copy , Clone ) ]
3162+ pub struct OrtTensorRTProviderOptions {
3163+ pub device_id : :: std:: os:: raw:: c_int ,
3164+ pub has_user_compute_stream : :: std:: os:: raw:: c_int ,
3165+ pub user_compute_stream : * mut :: std:: os:: raw:: c_void ,
3166+ }
3167+ #[ test]
3168+ fn bindgen_test_layout_OrtTensorRTProviderOptions ( ) {
3169+ assert_eq ! (
3170+ :: std:: mem:: size_of:: <OrtTensorRTProviderOptions >( ) ,
3171+ 12usize ,
3172+ concat!( "Size of: " , stringify!( OrtTensorRTProviderOptions ) )
3173+ ) ;
3174+ assert_eq ! (
3175+ :: std:: mem:: align_of:: <OrtTensorRTProviderOptions >( ) ,
3176+ 4usize ,
3177+ concat!( "Alignment of " , stringify!( OrtTensorRTProviderOptions ) )
3178+ ) ;
3179+ assert_eq ! (
3180+ unsafe {
3181+ & ( * ( :: std:: ptr:: null:: <OrtTensorRTProviderOptions >( ) ) ) . device_id as * const _ as usize
3182+ } ,
3183+ 0usize ,
3184+ concat!(
3185+ "Offset of field: " ,
3186+ stringify!( OrtTensorRTProviderOptions ) ,
3187+ "::" ,
3188+ stringify!( device_id)
3189+ )
3190+ ) ;
3191+ assert_eq ! (
3192+ unsafe {
3193+ & ( * ( :: std:: ptr:: null:: <OrtTensorRTProviderOptions >( ) ) ) . has_user_compute_stream
3194+ as * const _ as usize
3195+ } ,
3196+ 4usize ,
3197+ concat!(
3198+ "Offset of field: " ,
3199+ stringify!( OrtTensorRTProviderOptions ) ,
3200+ "::" ,
3201+ stringify!( has_user_compute_stream)
3202+ )
3203+ ) ;
3204+ assert_eq ! (
3205+ unsafe {
3206+ & ( * ( :: std:: ptr:: null:: <OrtTensorRTProviderOptions >( ) ) ) . user_compute_stream as * const _
3207+ as usize
3208+ } ,
3209+ 8usize ,
3210+ concat!(
3211+ "Offset of field: " ,
3212+ stringify!( OrtTensorRTProviderOptions ) ,
3213+ "::" ,
3214+ stringify!( user_compute_stream)
3215+ )
3216+ ) ;
31333217}
31343218#[ doc = " <summary>" ]
31353219#[ doc = " Options for the OpenVINO provider that are passed to SessionOptionsAppendExecutionProvider_OpenVINO" ]
@@ -4135,12 +4219,31 @@ pub struct OrtApi {
41354219 ) -> OrtStatusPtr ,
41364220 > ,
41374221 pub ReleaseArenaCfg : :: std:: option:: Option < unsafe extern "stdcall" fn ( input : * mut OrtArenaCfg ) > ,
4222+ pub ModelMetadataGetGraphDescription : :: std:: option:: Option <
4223+ unsafe extern "stdcall" fn (
4224+ model_metadata : * const OrtModelMetadata ,
4225+ allocator : * mut OrtAllocator ,
4226+ value : * mut * mut :: std:: os:: raw:: c_char ,
4227+ ) -> OrtStatusPtr ,
4228+ > ,
4229+ pub SessionOptionsAppendExecutionProvider_TensorRT : :: std:: option:: Option <
4230+ unsafe extern "stdcall" fn (
4231+ options : * mut OrtSessionOptions ,
4232+ tensorrt_options : * const OrtTensorRTProviderOptions ,
4233+ ) -> OrtStatusPtr ,
4234+ > ,
4235+ pub SetCurrentGpuDeviceId : :: std:: option:: Option <
4236+ unsafe extern "stdcall" fn ( device_id : :: std:: os:: raw:: c_int ) -> OrtStatusPtr ,
4237+ > ,
4238+ pub GetCurrentGpuDeviceId : :: std:: option:: Option <
4239+ unsafe extern "stdcall" fn ( device_id : * mut :: std:: os:: raw:: c_int ) -> OrtStatusPtr ,
4240+ > ,
41384241}
41394242#[ test]
41404243fn bindgen_test_layout_OrtApi ( ) {
41414244 assert_eq ! (
41424245 :: std:: mem:: size_of:: <OrtApi >( ) ,
4143- 628usize ,
4246+ 644usize ,
41444247 concat!( "Size of: " , stringify!( OrtApi ) )
41454248 ) ;
41464249 assert_eq ! (
@@ -5812,6 +5915,51 @@ fn bindgen_test_layout_OrtApi() {
58125915 stringify!( ReleaseArenaCfg )
58135916 )
58145917 ) ;
5918+ assert_eq ! (
5919+ unsafe {
5920+ & ( * ( :: std:: ptr:: null:: <OrtApi >( ) ) ) . ModelMetadataGetGraphDescription as * const _ as usize
5921+ } ,
5922+ 628usize ,
5923+ concat!(
5924+ "Offset of field: " ,
5925+ stringify!( OrtApi ) ,
5926+ "::" ,
5927+ stringify!( ModelMetadataGetGraphDescription )
5928+ )
5929+ ) ;
5930+ assert_eq ! (
5931+ unsafe {
5932+ & ( * ( :: std:: ptr:: null:: <OrtApi >( ) ) ) . SessionOptionsAppendExecutionProvider_TensorRT
5933+ as * const _ as usize
5934+ } ,
5935+ 632usize ,
5936+ concat!(
5937+ "Offset of field: " ,
5938+ stringify!( OrtApi ) ,
5939+ "::" ,
5940+ stringify!( SessionOptionsAppendExecutionProvider_TensorRT )
5941+ )
5942+ ) ;
5943+ assert_eq ! (
5944+ unsafe { & ( * ( :: std:: ptr:: null:: <OrtApi >( ) ) ) . SetCurrentGpuDeviceId as * const _ as usize } ,
5945+ 636usize ,
5946+ concat!(
5947+ "Offset of field: " ,
5948+ stringify!( OrtApi ) ,
5949+ "::" ,
5950+ stringify!( SetCurrentGpuDeviceId )
5951+ )
5952+ ) ;
5953+ assert_eq ! (
5954+ unsafe { & ( * ( :: std:: ptr:: null:: <OrtApi >( ) ) ) . GetCurrentGpuDeviceId as * const _ as usize } ,
5955+ 640usize ,
5956+ concat!(
5957+ "Offset of field: " ,
5958+ stringify!( OrtApi ) ,
5959+ "::" ,
5960+ stringify!( GetCurrentGpuDeviceId )
5961+ )
5962+ ) ;
58155963}
58165964#[ repr( C ) ]
58175965#[ derive( Copy , Clone ) ]
0 commit comments