diff --git a/Cargo.toml b/Cargo.toml index e156ad3..953509e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,11 +18,11 @@ include = [ ] [dependencies] -ispc_rt = "1.0.7" +ispc_rt = "1.1" [build-dependencies] -ispc_compile = { version = "1.0.4", optional = true } -ispc_rt = "1.0.7" +ispc_compile = { version = "1.1", optional = true } +ispc_rt = "1.1" [dev-dependencies] image = "0.24.1" diff --git a/build.rs b/build.rs index 70c4679..6988f0e 100644 --- a/build.rs +++ b/build.rs @@ -1,11 +1,11 @@ #[cfg(feature = "ispc")] fn compile_bindings() { - use ispc_compile::{MathLib, TargetISA, TargetOS}; + use ispc_compile::{BindgenOptions, Config, MathLib, TargetISA}; // Compile our ISPC library, this call will exit with EXIT_FAILURE if // compilation fails. - ispc_compile::Config::new() + Config::new() .file("src/ispc/kernels/lanczos3.ispc") .opt_level(2) .woff() @@ -18,6 +18,9 @@ fn compile_bindings() { TargetISA::AVX512SKXi32x16, ]) .math_lib(MathLib::Fast) + .bindgen_options(BindgenOptions { + allowlist_functions: vec!["resample".into()], + }) .out_dir("src/ispc") .compile("downsample_ispc"); } diff --git a/src/ispc/downsample_ispc.rs b/src/ispc/downsample_ispc.rs index 2d5bb30..2e97919 100644 --- a/src/ispc/downsample_ispc.rs +++ b/src/ispc/downsample_ispc.rs @@ -2,62 +2,8 @@ pub mod downsample_ispc { /* automatically generated by rust-bindgen 0.59.2 */ -pub const _VCRT_COMPILER_PREPROCESSOR: u32 = 1; -pub const _SAL_VERSION: u32 = 20; -pub const __SAL_H_VERSION: u32 = 180000000; -pub const _USE_DECLSPECS_FOR_SAL: u32 = 0; -pub const _USE_ATTRIBUTES_FOR_SAL: u32 = 0; -pub const _CRT_PACKING: u32 = 8; -pub const _HAS_EXCEPTIONS: u32 = 1; -pub const _STL_LANG: u32 = 0; -pub const _HAS_CXX17: u32 = 0; -pub const _HAS_CXX20: u32 = 0; -pub const _HAS_CXX23: u32 = 0; -pub const _HAS_NODISCARD: u32 = 0; -pub const WCHAR_MIN: u32 = 0; -pub const WCHAR_MAX: u32 = 65535; -pub const WINT_MIN: u32 = 0; -pub const WINT_MAX: u32 = 65535; -pub const true_: u32 = 1; -pub const false_: u32 = 0; -pub const __bool_true_false_are_defined: u32 = 1; -pub type va_list = *mut ::std::os::raw::c_char; -extern "C" { - pub fn __va_start(arg1: *mut *mut ::std::os::raw::c_char, ...); -} -pub type size_t = ::std::os::raw::c_ulonglong; -pub type __vcrt_bool = bool; -pub type wchar_t = ::std::os::raw::c_ushort; -extern "C" { - pub fn __security_init_cookie(); -} -extern "C" { - pub fn __security_check_cookie(_StackCookie: usize); -} -extern "C" { - pub fn __report_gsfailure(_StackCookie: usize); -} -extern "C" { - pub static mut __security_cookie: usize; -} -pub type int_least8_t = ::std::os::raw::c_schar; -pub type int_least16_t = ::std::os::raw::c_short; -pub type int_least32_t = ::std::os::raw::c_int; -pub type int_least64_t = ::std::os::raw::c_longlong; -pub type uint_least8_t = ::std::os::raw::c_uchar; -pub type uint_least16_t = ::std::os::raw::c_ushort; -pub type uint_least32_t = ::std::os::raw::c_uint; -pub type uint_least64_t = ::std::os::raw::c_ulonglong; -pub type int_fast8_t = ::std::os::raw::c_schar; -pub type int_fast16_t = ::std::os::raw::c_int; -pub type int_fast32_t = ::std::os::raw::c_int; -pub type int_fast64_t = ::std::os::raw::c_longlong; -pub type uint_fast8_t = ::std::os::raw::c_uchar; -pub type uint_fast16_t = ::std::os::raw::c_uint; -pub type uint_fast32_t = ::std::os::raw::c_uint; -pub type uint_fast64_t = ::std::os::raw::c_ulonglong; -pub type intmax_t = ::std::os::raw::c_longlong; -pub type uintmax_t = ::std::os::raw::c_ulonglong; +pub type __uint8_t = ::std::os::raw::c_uchar; +pub type __uint32_t = ::std::os::raw::c_uint; extern "C" { pub fn resample( width: u32, diff --git a/src/ispc/libdownsample_ispcx86_64-unknown-linux-gnu.a b/src/ispc/libdownsample_ispcx86_64-unknown-linux-gnu.a index 3fcc414..48466ad 100644 Binary files a/src/ispc/libdownsample_ispcx86_64-unknown-linux-gnu.a and b/src/ispc/libdownsample_ispcx86_64-unknown-linux-gnu.a differ