diff --git a/intel-mkl-sys/src/lib.rs b/intel-mkl-sys/src/lib.rs index 818d504b..5fb71b3c 100644 --- a/intel-mkl-sys/src/lib.rs +++ b/intel-mkl-sys/src/lib.rs @@ -48,7 +48,12 @@ mod tests { vdCos(n as i32, a.as_ptr(), b.as_mut_ptr()); } for i in 0..n { - ulps_eq!(b[i], a[i].cos(), max_ulps = 4, epsilon = std::f64::EPSILON); + assert!(ulps_eq!( + b[i], + a[i].cos(), + max_ulps = 4, + epsilon = std::f64::EPSILON + )); } } diff --git a/intel-mkl-sys/src/mkl.rs b/intel-mkl-sys/src/mkl.rs index 31a979ff..1e117076 100644 --- a/intel-mkl-sys/src/mkl.rs +++ b/intel-mkl-sys/src/mkl.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen */ +/* automatically generated by rust-bindgen 0.60.1 */ pub const VML_LA: u32 = 1; pub const VML_HA: u32 = 2; @@ -43,6 +43,7 @@ pub const MKL_DOMAIN_BLAS: u32 = 1; pub const MKL_DOMAIN_FFT: u32 = 2; pub const MKL_DOMAIN_VML: u32 = 3; pub const MKL_DOMAIN_PARDISO: u32 = 4; +pub const MKL_DOMAIN_LAPACK: u32 = 5; pub const MKL_CBWR_BRANCH: u32 = 1; pub const MKL_CBWR_ALL: i32 = -1; pub const MKL_CBWR_STRICT: u32 = 65536; @@ -78,6 +79,7 @@ pub const VSL_ERROR_CPU_NOT_SUPPORTED: i32 = -6; pub const VSL_RNG_ERROR_INVALID_BRNG_INDEX: i32 = -1000; pub const VSL_RNG_ERROR_LEAPFROG_UNSUPPORTED: i32 = -1002; pub const VSL_RNG_ERROR_SKIPAHEAD_UNSUPPORTED: i32 = -1003; +pub const VSL_RNG_ERROR_SKIPAHEADEX_UNSUPPORTED: i32 = -1004; pub const VSL_RNG_ERROR_BRNGS_INCOMPATIBLE: i32 = -1005; pub const VSL_RNG_ERROR_BAD_STREAM: i32 = -1006; pub const VSL_RNG_ERROR_BRNG_TABLE_FULL: i32 = -1007; @@ -274,6 +276,7 @@ pub const VSL_QRNG_OVERRIDE_1ST_DIM_INIT: u32 = 8; pub const VSL_INIT_METHOD_STANDARD: u32 = 0; pub const VSL_INIT_METHOD_LEAPFROG: u32 = 1; pub const VSL_INIT_METHOD_SKIPAHEAD: u32 = 2; +pub const VSL_INIT_METHOD_SKIPAHEADEX: u32 = 3; pub const VSL_RNG_METHOD_ACCURACY_FLAG: u32 = 1073741824; pub const VSL_RNG_METHOD_UNIFORM_STD: u32 = 0; pub const VSL_RNG_METHOD_UNIFORM_STD_ACCURATE: u32 = 1073741824; @@ -477,26 +480,40 @@ fn bindgen_test_layout__MKL_Complex8() { 4usize, concat!("Alignment of ", stringify!(_MKL_Complex8)) ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_MKL_Complex8>())).real as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MKL_Complex8), - "::", - stringify!(real) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_MKL_Complex8>())).imag as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_MKL_Complex8), - "::", - stringify!(imag) - ) - ); + fn test_field_real() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_MKL_Complex8>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).real) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_MKL_Complex8), + "::", + stringify!(real) + ) + ); + } + test_field_real(); + fn test_field_imag() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_MKL_Complex8>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).imag) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_MKL_Complex8), + "::", + stringify!(imag) + ) + ); + } + test_field_imag(); } pub type MKL_Complex8 = _MKL_Complex8; #[repr(C)] @@ -517,26 +534,40 @@ fn bindgen_test_layout__MKL_Complex16() { 8usize, concat!("Alignment of ", stringify!(_MKL_Complex16)) ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_MKL_Complex16>())).real as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_MKL_Complex16), - "::", - stringify!(real) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_MKL_Complex16>())).imag as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_MKL_Complex16), - "::", - stringify!(imag) - ) - ); + fn test_field_real() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_MKL_Complex16>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).real) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_MKL_Complex16), + "::", + stringify!(real) + ) + ); + } + test_field_real(); + fn test_field_imag() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_MKL_Complex16>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).imag) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_MKL_Complex16), + "::", + stringify!(imag) + ) + ); + } + test_field_imag(); } pub type MKL_Complex16 = _MKL_Complex16; #[repr(C)] @@ -562,102 +593,155 @@ fn bindgen_test_layout_MKLVersion() { 8usize, concat!("Alignment of ", stringify!(MKLVersion)) ); - assert_eq!( - unsafe { &(*(::core::ptr::null::())).MajorVersion as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(MKLVersion), - "::", - stringify!(MajorVersion) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::())).MinorVersion as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(MKLVersion), - "::", - stringify!(MinorVersion) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::())).UpdateVersion as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(MKLVersion), - "::", - stringify!(UpdateVersion) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::())).ProductStatus as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(MKLVersion), - "::", - stringify!(ProductStatus) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::())).Build as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(MKLVersion), - "::", - stringify!(Build) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::())).Processor as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(MKLVersion), - "::", - stringify!(Processor) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::())).Platform as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(MKLVersion), - "::", - stringify!(Platform) - ) - ); + fn test_field_MajorVersion() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).MajorVersion) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(MKLVersion), + "::", + stringify!(MajorVersion) + ) + ); + } + test_field_MajorVersion(); + fn test_field_MinorVersion() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).MinorVersion) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(MKLVersion), + "::", + stringify!(MinorVersion) + ) + ); + } + test_field_MinorVersion(); + fn test_field_UpdateVersion() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).UpdateVersion) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(MKLVersion), + "::", + stringify!(UpdateVersion) + ) + ); + } + test_field_UpdateVersion(); + fn test_field_ProductStatus() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).ProductStatus) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(MKLVersion), + "::", + stringify!(ProductStatus) + ) + ); + } + test_field_ProductStatus(); + fn test_field_Build() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).Build) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(MKLVersion), + "::", + stringify!(Build) + ) + ); + } + test_field_Build(); + fn test_field_Processor() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).Processor) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(MKLVersion), + "::", + stringify!(Processor) + ) + ); + } + test_field_Processor(); + fn test_field_Platform() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).Platform) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(MKLVersion), + "::", + stringify!(Platform) + ) + ); + } + test_field_Platform(); } impl Default for MKLVersion { fn default() -> Self { - unsafe { ::core::mem::zeroed() } + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub const MKL_LAYOUT_MKL_ROW_MAJOR: MKL_LAYOUT = 101; pub const MKL_LAYOUT_MKL_COL_MAJOR: MKL_LAYOUT = 102; -pub type MKL_LAYOUT = u32; +pub type MKL_LAYOUT = ::std::os::raw::c_uint; pub const MKL_TRANSPOSE_MKL_NOTRANS: MKL_TRANSPOSE = 111; pub const MKL_TRANSPOSE_MKL_TRANS: MKL_TRANSPOSE = 112; pub const MKL_TRANSPOSE_MKL_CONJTRANS: MKL_TRANSPOSE = 113; -pub type MKL_TRANSPOSE = u32; +pub type MKL_TRANSPOSE = ::std::os::raw::c_uint; pub const MKL_UPLO_MKL_UPPER: MKL_UPLO = 121; pub const MKL_UPLO_MKL_LOWER: MKL_UPLO = 122; -pub type MKL_UPLO = u32; +pub type MKL_UPLO = ::std::os::raw::c_uint; pub const MKL_DIAG_MKL_NONUNIT: MKL_DIAG = 131; pub const MKL_DIAG_MKL_UNIT: MKL_DIAG = 132; -pub type MKL_DIAG = u32; +pub type MKL_DIAG = ::std::os::raw::c_uint; pub const MKL_SIDE_MKL_LEFT: MKL_SIDE = 141; pub const MKL_SIDE_MKL_RIGHT: MKL_SIDE = 142; -pub type MKL_SIDE = u32; +pub type MKL_SIDE = ::std::os::raw::c_uint; pub const MKL_COMPACT_PACK_MKL_COMPACT_SSE: MKL_COMPACT_PACK = 181; pub const MKL_COMPACT_PACK_MKL_COMPACT_AVX: MKL_COMPACT_PACK = 182; pub const MKL_COMPACT_PACK_MKL_COMPACT_AVX512: MKL_COMPACT_PACK = 183; -pub type MKL_COMPACT_PACK = u32; +pub type MKL_COMPACT_PACK = ::std::os::raw::c_uint; pub type sgemm_jit_kernel_t = ::core::option::Option< unsafe extern "C" fn( arg1: *mut ::core::ffi::c_void, @@ -693,9 +777,9 @@ pub type zgemm_jit_kernel_t = ::core::option::Option< pub const mkl_jit_status_t_MKL_JIT_SUCCESS: mkl_jit_status_t = 0; pub const mkl_jit_status_t_MKL_NO_JIT: mkl_jit_status_t = 1; pub const mkl_jit_status_t_MKL_JIT_ERROR: mkl_jit_status_t = 2; -pub type mkl_jit_status_t = u32; +pub type mkl_jit_status_t = ::std::os::raw::c_uint; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)] pub struct _DefVmlErrorContext { pub iCode: ::std::os::raw::c_int, pub iIndex: ::std::os::raw::c_int, @@ -722,132 +806,218 @@ fn bindgen_test_layout__DefVmlErrorContext() { 8usize, concat!("Alignment of ", stringify!(_DefVmlErrorContext)) ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_DefVmlErrorContext>())).iCode as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(iCode) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_DefVmlErrorContext>())).iIndex as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(iIndex) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_DefVmlErrorContext>())).dbA1 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(dbA1) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_DefVmlErrorContext>())).dbA2 as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(dbA2) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_DefVmlErrorContext>())).dbR1 as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(dbR1) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_DefVmlErrorContext>())).dbR2 as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(dbR2) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_DefVmlErrorContext>())).cFuncName as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(cFuncName) - ) - ); - assert_eq!( - unsafe { - &(*(::core::ptr::null::<_DefVmlErrorContext>())).iFuncNameLen as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(iFuncNameLen) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_DefVmlErrorContext>())).dbA1Im as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(dbA1Im) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_DefVmlErrorContext>())).dbA2Im as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(dbA2Im) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_DefVmlErrorContext>())).dbR1Im as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(dbR1Im) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_DefVmlErrorContext>())).dbR2Im as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_DefVmlErrorContext), - "::", - stringify!(dbR2Im) - ) - ); + fn test_field_iCode() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).iCode) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(iCode) + ) + ); + } + test_field_iCode(); + fn test_field_iIndex() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).iIndex) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(iIndex) + ) + ); + } + test_field_iIndex(); + fn test_field_dbA1() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).dbA1) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(dbA1) + ) + ); + } + test_field_dbA1(); + fn test_field_dbA2() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).dbA2) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(dbA2) + ) + ); + } + test_field_dbA2(); + fn test_field_dbR1() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).dbR1) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(dbR1) + ) + ); + } + test_field_dbR1(); + fn test_field_dbR2() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).dbR2) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(dbR2) + ) + ); + } + test_field_dbR2(); + fn test_field_cFuncName() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).cFuncName) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(cFuncName) + ) + ); + } + test_field_cFuncName(); + fn test_field_iFuncNameLen() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).iFuncNameLen) as usize - ptr as usize + }, + 104usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(iFuncNameLen) + ) + ); + } + test_field_iFuncNameLen(); + fn test_field_dbA1Im() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).dbA1Im) as usize - ptr as usize + }, + 112usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(dbA1Im) + ) + ); + } + test_field_dbA1Im(); + fn test_field_dbA2Im() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).dbA2Im) as usize - ptr as usize + }, + 120usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(dbA2Im) + ) + ); + } + test_field_dbA2Im(); + fn test_field_dbR1Im() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).dbR1Im) as usize - ptr as usize + }, + 128usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(dbR1Im) + ) + ); + } + test_field_dbR1Im(); + fn test_field_dbR2Im() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_DefVmlErrorContext>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).dbR2Im) as usize - ptr as usize + }, + 136usize, + concat!( + "Offset of field: ", + stringify!(_DefVmlErrorContext), + "::", + stringify!(dbR2Im) + ) + ); + } + test_field_dbR2Im(); } impl Default for _DefVmlErrorContext { fn default() -> Self { - unsafe { ::core::mem::zeroed() } + let mut s = ::core::mem::MaybeUninit::::uninit(); + unsafe { + ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } pub type DefVmlErrorContext = _DefVmlErrorContext; @@ -8953,100 +9123,159 @@ fn bindgen_test_layout__VSLBRngProperties() { 8usize, concat!("Alignment of ", stringify!(_VSLBRngProperties)) ); - assert_eq!( - unsafe { - &(*(::core::ptr::null::<_VSLBRngProperties>())).StreamStateSize as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_VSLBRngProperties), - "::", - stringify!(StreamStateSize) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_VSLBRngProperties>())).NSeeds as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_VSLBRngProperties), - "::", - stringify!(NSeeds) - ) - ); - assert_eq!( - unsafe { - &(*(::core::ptr::null::<_VSLBRngProperties>())).IncludesZero as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_VSLBRngProperties), - "::", - stringify!(IncludesZero) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_VSLBRngProperties>())).WordSize as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_VSLBRngProperties), - "::", - stringify!(WordSize) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_VSLBRngProperties>())).NBits as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_VSLBRngProperties), - "::", - stringify!(NBits) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_VSLBRngProperties>())).InitStream as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_VSLBRngProperties), - "::", - stringify!(InitStream) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_VSLBRngProperties>())).sBRng as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_VSLBRngProperties), - "::", - stringify!(sBRng) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_VSLBRngProperties>())).dBRng as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_VSLBRngProperties), - "::", - stringify!(dBRng) - ) - ); - assert_eq!( - unsafe { &(*(::core::ptr::null::<_VSLBRngProperties>())).iBRng as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_VSLBRngProperties), - "::", - stringify!(iBRng) - ) - ); + fn test_field_StreamStateSize() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_VSLBRngProperties>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).StreamStateSize) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(_VSLBRngProperties), + "::", + stringify!(StreamStateSize) + ) + ); + } + test_field_StreamStateSize(); + fn test_field_NSeeds() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_VSLBRngProperties>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).NSeeds) as usize - ptr as usize + }, + 4usize, + concat!( + "Offset of field: ", + stringify!(_VSLBRngProperties), + "::", + stringify!(NSeeds) + ) + ); + } + test_field_NSeeds(); + fn test_field_IncludesZero() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_VSLBRngProperties>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).IncludesZero) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(_VSLBRngProperties), + "::", + stringify!(IncludesZero) + ) + ); + } + test_field_IncludesZero(); + fn test_field_WordSize() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_VSLBRngProperties>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).WordSize) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(_VSLBRngProperties), + "::", + stringify!(WordSize) + ) + ); + } + test_field_WordSize(); + fn test_field_NBits() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_VSLBRngProperties>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).NBits) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(_VSLBRngProperties), + "::", + stringify!(NBits) + ) + ); + } + test_field_NBits(); + fn test_field_InitStream() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_VSLBRngProperties>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).InitStream) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(_VSLBRngProperties), + "::", + stringify!(InitStream) + ) + ); + } + test_field_InitStream(); + fn test_field_sBRng() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_VSLBRngProperties>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).sBRng) as usize - ptr as usize + }, + 32usize, + concat!( + "Offset of field: ", + stringify!(_VSLBRngProperties), + "::", + stringify!(sBRng) + ) + ); + } + test_field_sBRng(); + fn test_field_dBRng() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_VSLBRngProperties>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).dBRng) as usize - ptr as usize + }, + 40usize, + concat!( + "Offset of field: ", + stringify!(_VSLBRngProperties), + "::", + stringify!(dBRng) + ) + ); + } + test_field_dBRng(); + fn test_field_iBRng() { + assert_eq!( + unsafe { + let uninit = ::core::mem::MaybeUninit::<_VSLBRngProperties>::uninit(); + let ptr = uninit.as_ptr(); + ::core::ptr::addr_of!((*ptr).iBRng) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(_VSLBRngProperties), + "::", + stringify!(iBRng) + ) + ); + } + test_field_iBRng(); } pub type VSLBRngProperties = _VSLBRngProperties; extern "C" { @@ -10430,6 +10659,27 @@ extern "C" { arg2: *const ::std::os::raw::c_longlong, ) -> ::std::os::raw::c_int; } +extern "C" { + pub fn vslSkipAheadStreamEx( + arg1: VSLStreamStatePtr, + arg2: ::std::os::raw::c_int, + arg3: *const ::std::os::raw::c_ulonglong, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vslskipaheadstreamex_( + arg1: *mut VSLStreamStatePtr, + arg2: *const ::std::os::raw::c_int, + arg3: *const ::std::os::raw::c_ulonglong, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn VSLSKIPAHEADSTREAMEX_( + arg1: *mut VSLStreamStatePtr, + arg2: *const ::std::os::raw::c_int, + arg3: *const ::std::os::raw::c_ulonglong, + ) -> ::std::os::raw::c_int; +} extern "C" { pub fn vslGetStreamStateBrng(arg1: VSLStreamStatePtr) -> ::std::os::raw::c_int; }