diff --git a/Cargo.lock b/Cargo.lock index 0f75d2423..4329ba846 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,24 +48,24 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bindgen" -version = "0.60.1" +version = "0.69.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6" +checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" dependencies = [ - "bitflags", + "bitflags 2.5.0", "cexpr", "clang-sys", - "clap", - "env_logger", + "itertools", "lazy_static", "lazycell", "log", - "peeking_take_while", + "prettyplease", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", + "syn 2.0.60", "which", ] @@ -75,6 +75,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" + [[package]] name = "bstr" version = "0.2.17" @@ -158,35 +164,11 @@ dependencies = [ "libloading", ] -[[package]] -name = "clap" -version = "3.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed5341b2301a26ab80be5cbdced622e80ed808483c52e45e3310a877d3b37d7" -dependencies = [ - "atty", - "bitflags", - "clap_lex", - "indexmap", - "strsim", - "termcolor", - "textwrap", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] - [[package]] name = "coaster" version = "0.2.0" dependencies = [ - "bitflags", + "bitflags 1.3.2", "byteorder", "coaster-nn", "enum_primitive", @@ -532,7 +514,7 @@ checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] @@ -782,6 +764,15 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.8" @@ -1109,7 +1100,7 @@ version = "0.10.55" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ - "bitflags", + "bitflags 1.3.2", "cfg-if", "foreign-types", "libc", @@ -1126,7 +1117,7 @@ checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] @@ -1147,18 +1138,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "os_str_bytes" -version = "6.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" - -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "percent-encoding" version = "2.2.0" @@ -1189,7 +1168,7 @@ version = "0.16.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "crc32fast", "deflate", "miniz_oxide 0.3.7", @@ -1201,20 +1180,30 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +[[package]] +name = "prettyplease" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ac2cf0f2e4f42b49f5ffd07dae8d746508ef7526c13940e5f524012ae6c6550" +dependencies = [ + "proc-macro2", + "syn 2.0.60", +] + [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1323,7 +1312,7 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] @@ -1508,7 +1497,7 @@ version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -1542,7 +1531,7 @@ checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] @@ -1616,6 +1605,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "tempfile" version = "3.3.0" @@ -1639,12 +1639,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "textwrap" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" - [[package]] name = "thiserror" version = "1.0.34" @@ -1662,7 +1656,7 @@ checksum = "e8f2591983642de85c921015f3f070c665a197ed69e417af436115e3a1407487" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", ] [[package]] @@ -1906,7 +1900,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.99", "wasm-bindgen-shared", ] @@ -1940,7 +1934,7 @@ checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.99", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/rcublas/cublas-sys/Cargo.toml b/rcublas/cublas-sys/Cargo.toml index e262867d2..a2f0e0cbb 100644 --- a/rcublas/cublas-sys/Cargo.toml +++ b/rcublas/cublas-sys/Cargo.toml @@ -19,7 +19,7 @@ libc = "0.2" [build-dependencies] pkg-config = "0.3" -bindgen = { version = "^0.60.1", optional = true } +bindgen = { version = "^0.69.4", features = ["prettyplease"], optional = true } [features] default = [] diff --git a/rcublas/cublas-sys/build.rs b/rcublas/cublas-sys/build.rs index 7bdefbed4..68534875b 100644 --- a/rcublas/cublas-sys/build.rs +++ b/rcublas/cublas-sys/build.rs @@ -85,8 +85,8 @@ fn main() { .allowlist_var("CUBLAS.*") .allowlist_type("[Cc][Uu].*") .default_alias_style(bindgen::AliasVariation::TypeAlias) - .parse_callbacks(Box::new(bindgen::CargoCallbacks)) - .rustfmt_bindings(true) + .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) + .formatter(bindgen::Formatter::Prettyplease) .generate() .expect("Unable to generate bindings"); diff --git a/rcublas/cublas-sys/src/generated.rs b/rcublas/cublas-sys/src/generated.rs index 6ead6e31b..576d4e5f0 100644 --- a/rcublas/cublas-sys/src/generated.rs +++ b/rcublas/cublas-sys/src/generated.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.60.1 */ +/* automatically generated by rust-bindgen 0.69.4 */ //! Defines the FFI for CUDA cuBLAS. @@ -8,11 +8,11 @@ #![allow(non_upper_case_globals)] -pub const CUBLAS_VER_MAJOR: u32 = 11; -pub const CUBLAS_VER_MINOR: u32 = 10; -pub const CUBLAS_VER_PATCH: u32 = 3; -pub const CUBLAS_VER_BUILD: u32 = 66; -pub const CUBLAS_VERSION: u32 = 111003; +pub const CUBLAS_VER_MAJOR: u32 = 12; +pub const CUBLAS_VER_MINOR: u32 = 4; +pub const CUBLAS_VER_PATCH: u32 = 2; +pub const CUBLAS_VER_BUILD: u32 = 65; +pub const CUBLAS_VERSION: u32 = 120402; #[repr(C)] #[repr(align(8))] #[derive(Debug, Copy, Clone)] @@ -22,6 +22,8 @@ pub struct float2 { } #[test] fn bindgen_test_layout_float2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -32,30 +34,16 @@ fn bindgen_test_layout_float2() { 8usize, concat!("Alignment of ", stringify!(float2)) ); - fn test_field_x() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize - }, - 0usize, - concat!("Offset of field: ", stringify!(float2), "::", stringify!(x)) - ); - } - test_field_x(); - fn test_field_y() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize - }, - 4usize, - concat!("Offset of field: ", stringify!(float2), "::", stringify!(y)) - ); - } - test_field_y(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, + 0usize, + concat!("Offset of field: ", stringify!(float2), "::", stringify!(x)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, + 4usize, + concat!("Offset of field: ", stringify!(float2), "::", stringify!(y)) + ); } #[repr(C)] #[repr(align(16))] @@ -66,6 +54,8 @@ pub struct double2 { } #[test] fn bindgen_test_layout_double2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -76,40 +66,26 @@ fn bindgen_test_layout_double2() { 16usize, concat!("Alignment of ", stringify!(double2)) ); - fn test_field_x() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(double2), - "::", - stringify!(x) - ) - ); - } - test_field_x(); - fn test_field_y() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(double2), - "::", - stringify!(y) - ) - ); - } - test_field_y(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(double2), + "::", + stringify!(x) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(double2), + "::", + stringify!(y) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -120,6 +96,8 @@ pub struct dim3 { } #[test] fn bindgen_test_layout_dim3() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, @@ -130,42 +108,21 @@ fn bindgen_test_layout_dim3() { 4usize, concat!("Alignment of ", stringify!(dim3)) ); - fn test_field_x() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize - }, - 0usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(x)) - ); - } - test_field_x(); - fn test_field_y() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize - }, - 4usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(y)) - ); - } - test_field_y(); - fn test_field_z() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize - }, - 8usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(z)) - ); - } - test_field_z(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, + 0usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(x)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, + 4usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(y)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, + 8usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(z)) + ); } #[repr(u32)] #[non_exhaustive] @@ -242,6 +199,7 @@ pub enum cudaError { cudaErrorUnsupportedPtxVersion = 222, cudaErrorJitCompilationDisabled = 223, cudaErrorUnsupportedExecAffinity = 224, + cudaErrorUnsupportedDevSideSync = 225, cudaErrorInvalidSource = 300, cudaErrorFileNotFound = 301, cudaErrorSharedObjectSymbolNotFound = 302, @@ -249,6 +207,7 @@ pub enum cudaError { cudaErrorOperatingSystem = 304, cudaErrorInvalidResourceHandle = 400, cudaErrorIllegalState = 401, + cudaErrorLossyQuery = 402, cudaErrorSymbolNotFound = 500, cudaErrorNotReady = 600, cudaErrorIllegalAddress = 700, @@ -280,6 +239,9 @@ pub enum cudaError { cudaErrorMpsServerNotReady = 807, cudaErrorMpsMaxClientsReached = 808, cudaErrorMpsMaxConnectionsReached = 809, + cudaErrorMpsClientTerminated = 810, + cudaErrorCdpNotSupported = 811, + cudaErrorCdpVersionMismatch = 812, cudaErrorStreamCaptureUnsupported = 900, cudaErrorStreamCaptureInvalidated = 901, cudaErrorStreamCaptureMerge = 902, @@ -292,6 +254,7 @@ pub enum cudaError { cudaErrorTimeout = 909, cudaErrorGraphExecUpdateFailure = 910, cudaErrorExternalDevice = 911, + cudaErrorInvalidClusterSize = 912, cudaErrorUnknown = 999, cudaErrorApiFailureBase = 10000, } @@ -342,6 +305,9 @@ pub struct cudaChannelFormatDesc { } #[test] fn bindgen_test_layout_cudaChannelFormatDesc() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, @@ -352,91 +318,56 @@ fn bindgen_test_layout_cudaChannelFormatDesc() { 4usize, concat!("Alignment of ", stringify!(cudaChannelFormatDesc)) ); - fn test_field_x() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(x) - ) - ); - } - test_field_x(); - fn test_field_y() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(y) - ) - ); - } - test_field_y(); - fn test_field_z() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(z) - ) - ); - } - test_field_z(); - fn test_field_w() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(w) - ) - ); - } - test_field_w(); - fn test_field_f() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(f) - ) - ); - } - test_field_f(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(x) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(y) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(z) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(w) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(f) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -470,6 +401,9 @@ pub struct cudaArraySparseProperties__bindgen_ty_1 { } #[test] fn bindgen_test_layout_cudaArraySparseProperties__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, @@ -486,63 +420,42 @@ fn bindgen_test_layout_cudaArraySparseProperties__bindgen_ty_1() { stringify!(cudaArraySparseProperties__bindgen_ty_1) ) ); - fn test_field_width() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(width) - ) - ); - } - test_field_width(); - fn test_field_height() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(height) - ) - ); - } - test_field_height(); - fn test_field_depth() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(depth) - ) - ); - } - test_field_depth(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(depth) + ) + ); } #[test] fn bindgen_test_layout_cudaArraySparseProperties() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, @@ -553,91 +466,56 @@ fn bindgen_test_layout_cudaArraySparseProperties() { 8usize, concat!("Alignment of ", stringify!(cudaArraySparseProperties)) ); - fn test_field_tileExtent() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tileExtent) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(tileExtent) - ) - ); - } - test_field_tileExtent(); - fn test_field_miptailFirstLevel() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).miptailFirstLevel) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(miptailFirstLevel) - ) - ); - } - test_field_miptailFirstLevel(); - fn test_field_miptailSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).miptailSize) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(miptailSize) - ) - ); - } - test_field_miptailSize(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tileExtent) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(tileExtent) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).miptailFirstLevel) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(miptailFirstLevel) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).miptailSize) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(miptailSize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(reserved) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -648,6 +526,9 @@ pub struct cudaArrayMemoryRequirements { } #[test] fn bindgen_test_layout_cudaArrayMemoryRequirements() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -658,57 +539,36 @@ fn bindgen_test_layout_cudaArrayMemoryRequirements() { 8usize, concat!("Alignment of ", stringify!(cudaArrayMemoryRequirements)) ); - fn test_field_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaArrayMemoryRequirements), - "::", - stringify!(size) - ) - ); - } - test_field_size(); - fn test_field_alignment() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).alignment) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaArrayMemoryRequirements), - "::", - stringify!(alignment) - ) - ); - } - test_field_alignment(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaArrayMemoryRequirements), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).alignment) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(alignment) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(reserved) + ) + ); } #[repr(u32)] #[non_exhaustive] @@ -739,6 +599,8 @@ pub struct cudaPitchedPtr { } #[test] fn bindgen_test_layout_cudaPitchedPtr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -749,74 +611,46 @@ fn bindgen_test_layout_cudaPitchedPtr() { 8usize, concat!("Alignment of ", stringify!(cudaPitchedPtr)) ); - fn test_field_ptr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(ptr) - ) - ); - } - test_field_ptr(); - fn test_field_pitch() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(pitch) - ) - ); - } - test_field_pitch(); - fn test_field_xsize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).xsize) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(xsize) - ) - ); - } - test_field_xsize(); - fn test_field_ysize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ysize) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(ysize) - ) - ); - } - test_field_ysize(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(ptr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(pitch) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xsize) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(xsize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ysize) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaPitchedPtr), + "::", + stringify!(ysize) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -827,6 +661,8 @@ pub struct cudaExtent { } #[test] fn bindgen_test_layout_cudaExtent() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -837,57 +673,36 @@ fn bindgen_test_layout_cudaExtent() { 8usize, concat!("Alignment of ", stringify!(cudaExtent)) ); - fn test_field_width() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(width) - ) - ); - } - test_field_width(); - fn test_field_height() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(height) - ) - ); - } - test_field_height(); - fn test_field_depth() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(depth) - ) - ); - } - test_field_depth(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExtent), + "::", + stringify!(depth) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -898,6 +713,8 @@ pub struct cudaPos { } #[test] fn bindgen_test_layout_cudaPos() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -908,57 +725,36 @@ fn bindgen_test_layout_cudaPos() { 8usize, concat!("Alignment of ", stringify!(cudaPos)) ); - fn test_field_x() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(x) - ) - ); - } - test_field_x(); - fn test_field_y() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(y) - ) - ); - } - test_field_y(); - fn test_field_z() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(z) - ) - ); - } - test_field_z(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(x) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(y) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPos), + "::", + stringify!(z) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -974,6 +770,8 @@ pub struct cudaMemcpy3DParms { } #[test] fn bindgen_test_layout_cudaMemcpy3DParms() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 160usize, @@ -984,142 +782,138 @@ fn bindgen_test_layout_cudaMemcpy3DParms() { 8usize, concat!("Alignment of ", stringify!(cudaMemcpy3DParms)) ); - fn test_field_srcArray() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcArray) - ) - ); - } - test_field_srcArray(); - fn test_field_srcPos() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcPos) - ) - ); - } - test_field_srcPos(); - fn test_field_srcPtr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcPtr) - ) - ); - } - test_field_srcPtr(); - fn test_field_dstArray() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstArray) - ) - ); - } - test_field_dstArray(); - fn test_field_dstPos() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstPos) - ) - ); - } - test_field_dstPos(); - fn test_field_dstPtr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstPtr) - ) - ); - } - test_field_dstPtr(); - fn test_field_extent() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(extent) - ) - ); - } - test_field_extent(); - fn test_field_kind() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).kind) as usize - ptr as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(kind) - ) - ); - } - test_field_kind(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcPos) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcPtr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstPos) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstPtr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(extent) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).kind) as usize - ptr as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(kind) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaMemcpyNodeParams { + pub flags: ::libc::c_int, + pub reserved: [::libc::c_int; 3usize], + pub copyParams: cudaMemcpy3DParms, +} +#[test] +fn bindgen_test_layout_cudaMemcpyNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 176usize, + concat!("Size of: ", stringify!(cudaMemcpyNodeParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaMemcpyNodeParams)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpyNodeParams), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpyNodeParams), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).copyParams) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpyNodeParams), + "::", + stringify!(copyParams) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1136,6 +930,9 @@ pub struct cudaMemcpy3DPeerParms { } #[test] fn bindgen_test_layout_cudaMemcpy3DPeerParms() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 168usize, @@ -1146,159 +943,96 @@ fn bindgen_test_layout_cudaMemcpy3DPeerParms() { 8usize, concat!("Alignment of ", stringify!(cudaMemcpy3DPeerParms)) ); - fn test_field_srcArray() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcArray) - ) - ); - } - test_field_srcArray(); - fn test_field_srcPos() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcPos) - ) - ); - } - test_field_srcPos(); - fn test_field_srcPtr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcPtr) - ) - ); - } - test_field_srcPtr(); - fn test_field_srcDevice() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcDevice) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcDevice) - ) - ); - } - test_field_srcDevice(); - fn test_field_dstArray() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstArray) - ) - ); - } - test_field_dstArray(); - fn test_field_dstPos() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstPos) - ) - ); - } - test_field_dstPos(); - fn test_field_dstPtr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstPtr) - ) - ); - } - test_field_dstPtr(); - fn test_field_dstDevice() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstDevice) as usize - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstDevice) - ) - ); - } - test_field_dstDevice(); - fn test_field_extent() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(extent) - ) - ); - } - test_field_extent(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcPos) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcPtr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcDevice) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcDevice) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstPos) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstPtr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstDevice) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstDevice) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(extent) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1312,6 +1046,8 @@ pub struct cudaMemsetParams { } #[test] fn bindgen_test_layout_cudaMemsetParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -1322,119 +1058,162 @@ fn bindgen_test_layout_cudaMemsetParams() { 8usize, concat!("Alignment of ", stringify!(cudaMemsetParams)) ); - fn test_field_dst() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(dst) - ) - ); - } - test_field_dst(); - fn test_field_pitch() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(pitch) - ) - ); - } - test_field_pitch(); - fn test_field_value() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(value) - ) - ); - } - test_field_value(); - fn test_field_elementSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).elementSize) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(elementSize) - ) - ); - } - test_field_elementSize(); - fn test_field_width() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(width) - ) - ); - } - test_field_width(); - fn test_field_height() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(height) - ) - ); - } - test_field_height(); -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaAccessProperty { - cudaAccessPropertyNormal = 0, - cudaAccessPropertyStreaming = 1, - cudaAccessPropertyPersisting = 2, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(dst) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(pitch) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(value) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).elementSize) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(elementSize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(height) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaMemsetParamsV2 { + pub dst: *mut ::libc::c_void, + pub pitch: usize, + pub value: ::libc::c_uint, + pub elementSize: ::libc::c_uint, + pub width: usize, + pub height: usize, +} +#[test] +fn bindgen_test_layout_cudaMemsetParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaMemsetParamsV2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaMemsetParamsV2)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(dst) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(pitch) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(value) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).elementSize) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(elementSize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(height) + ) + ); +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaAccessProperty { + cudaAccessPropertyNormal = 0, + cudaAccessPropertyStreaming = 1, + cudaAccessPropertyPersisting = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct cudaAccessPolicyWindow { pub base_ptr: *mut ::libc::c_void, pub num_bytes: usize, @@ -1444,6 +1223,9 @@ pub struct cudaAccessPolicyWindow { } #[test] fn bindgen_test_layout_cudaAccessPolicyWindow() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, @@ -1454,91 +1236,56 @@ fn bindgen_test_layout_cudaAccessPolicyWindow() { 8usize, concat!("Alignment of ", stringify!(cudaAccessPolicyWindow)) ); - fn test_field_base_ptr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).base_ptr) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(base_ptr) - ) - ); - } - test_field_base_ptr(); - fn test_field_num_bytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_bytes) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(num_bytes) - ) - ); - } - test_field_num_bytes(); - fn test_field_hitRatio() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).hitRatio) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(hitRatio) - ) - ); - } - test_field_hitRatio(); - fn test_field_hitProp() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).hitProp) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(hitProp) - ) - ); - } - test_field_hitProp(); - fn test_field_missProp() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).missProp) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(missProp) - ) - ); - } - test_field_missProp(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).base_ptr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(base_ptr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_bytes) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(num_bytes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hitRatio) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(hitRatio) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hitProp) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(hitProp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).missProp) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(missProp) + ) + ); } pub type cudaHostFn_t = ::std::option::Option; #[repr(C)] @@ -1549,6 +1296,8 @@ pub struct cudaHostNodeParams { } #[test] fn bindgen_test_layout_cudaHostNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -1559,40 +1308,67 @@ fn bindgen_test_layout_cudaHostNodeParams() { 8usize, concat!("Alignment of ", stringify!(cudaHostNodeParams)) ); - fn test_field_fn() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaHostNodeParams), - "::", - stringify!(fn_) - ) - ); - } - test_field_fn(); - fn test_field_userData() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaHostNodeParams), - "::", - stringify!(userData) - ) - ); - } - test_field_userData(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParams), + "::", + stringify!(fn_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParams), + "::", + stringify!(userData) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaHostNodeParamsV2 { + pub fn_: cudaHostFn_t, + pub userData: *mut ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaHostNodeParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(cudaHostNodeParamsV2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaHostNodeParamsV2)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParamsV2), + "::", + stringify!(fn_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParamsV2), + "::", + stringify!(userData) + ) + ); } #[repr(u32)] #[non_exhaustive] @@ -1622,6 +1398,14 @@ pub enum cudaSynchronizationPolicy { #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaClusterSchedulingPolicy { + cudaClusterSchedulingPolicyDefault = 0, + cudaClusterSchedulingPolicySpread = 1, + cudaClusterSchedulingPolicyLoadBalancing = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaStreamUpdateCaptureDependenciesFlags { cudaStreamAddCaptureDependencies = 0, cudaStreamSetCaptureDependencies = 1, @@ -1742,6 +1526,9 @@ pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_1 { } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -1758,25 +1545,16 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_1() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1) ) ); - fn test_field_array() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(array) - ) - ); - } - test_field_array(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(array) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1785,6 +1563,9 @@ pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_2 { } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -1801,25 +1582,16 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_2() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2) ) ); - fn test_field_mipmap() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(mipmap) - ) - ); - } - test_field_mipmap(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(mipmap) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1830,6 +1602,9 @@ pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_3 { } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, @@ -1846,63 +1621,36 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_3() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3) ) ); - fn test_field_devPtr() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(devPtr) - ) - ); - } - test_field_devPtr(); - fn test_field_desc() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(desc) - ) - ); - } - test_field_desc(); - fn test_field_sizeInBytes() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sizeInBytes) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(sizeInBytes) - ) - ); - } - test_field_sizeInBytes(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(devPtr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(desc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sizeInBytes) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(sizeInBytes) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1915,6 +1663,9 @@ pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_4 { } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_4() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, @@ -1931,104 +1682,62 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_4() { stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4) ) ); - fn test_field_devPtr() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(devPtr) - ) - ); - } - test_field_devPtr(); - fn test_field_desc() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(desc) - ) - ); - } - test_field_desc(); - fn test_field_width() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(width) - ) - ); - } - test_field_width(); - fn test_field_height() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(height) - ) - ); - } - test_field_height(); - fn test_field_pitchInBytes() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pitchInBytes) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(pitchInBytes) - ) - ); - } - test_field_pitchInBytes(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(devPtr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(desc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pitchInBytes) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(pitchInBytes) + ) + ); } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, @@ -2039,77 +1748,51 @@ fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1() { 8usize, concat!("Alignment of ", stringify!(cudaResourceDesc__bindgen_ty_1)) ); - fn test_field_array() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(array) - ) - ); - } - test_field_array(); - fn test_field_mipmap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(mipmap) - ) - ); - } - test_field_mipmap(); - fn test_field_linear() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).linear) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(linear) - ) - ); - } - test_field_linear(); - fn test_field_pitch2D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pitch2D) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(pitch2D) - ) - ); - } - test_field_pitch2D(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(array) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(mipmap) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).linear) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(linear) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pitch2D) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(pitch2D) + ) + ); } #[test] fn bindgen_test_layout_cudaResourceDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -2120,40 +1803,26 @@ fn bindgen_test_layout_cudaResourceDesc() { 8usize, concat!("Alignment of ", stringify!(cudaResourceDesc)) ); - fn test_field_resType() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).resType) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc), - "::", - stringify!(resType) - ) - ); - } - test_field_resType(); - fn test_field_res() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).res) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc), - "::", - stringify!(res) - ) - ); - } - test_field_res(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).resType) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc), + "::", + stringify!(resType) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).res) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc), + "::", + stringify!(res) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2169,6 +1838,8 @@ pub struct cudaResourceViewDesc { } #[test] fn bindgen_test_layout_cudaResourceViewDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, @@ -2179,142 +1850,86 @@ fn bindgen_test_layout_cudaResourceViewDesc() { 8usize, concat!("Alignment of ", stringify!(cudaResourceViewDesc)) ); - fn test_field_format() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(format) - ) - ); - } - test_field_format(); - fn test_field_width() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(width) - ) - ); - } - test_field_width(); - fn test_field_height() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(height) - ) - ); - } - test_field_height(); - fn test_field_depth() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(depth) - ) - ); - } - test_field_depth(); - fn test_field_firstMipmapLevel() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).firstMipmapLevel) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(firstMipmapLevel) - ) - ); - } - test_field_firstMipmapLevel(); - fn test_field_lastMipmapLevel() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).lastMipmapLevel) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(lastMipmapLevel) - ) - ); - } - test_field_lastMipmapLevel(); - fn test_field_firstLayer() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).firstLayer) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(firstLayer) - ) - ); - } - test_field_firstLayer(); - fn test_field_lastLayer() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).lastLayer) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(lastLayer) - ) - ); - } - test_field_lastLayer(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(format) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(width) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(height) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(depth) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).firstMipmapLevel) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(firstMipmapLevel) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lastMipmapLevel) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(lastMipmapLevel) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).firstLayer) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(firstLayer) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lastLayer) as usize - ptr as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(lastLayer) + ) + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2326,6 +1941,9 @@ pub struct cudaPointerAttributes { } #[test] fn bindgen_test_layout_cudaPointerAttributes() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, @@ -2336,77 +1954,49 @@ fn bindgen_test_layout_cudaPointerAttributes() { 8usize, concat!("Alignment of ", stringify!(cudaPointerAttributes)) ); - fn test_field_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(type_) - ) - ); - } - test_field_type(); - fn test_field_device() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).device) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(device) - ) - ); - } - test_field_device(); - fn test_field_devicePointer() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).devicePointer) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(devicePointer) - ) - ); - } - test_field_devicePointer(); - fn test_field_hostPointer() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).hostPointer) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(hostPointer) - ) - ); - } - test_field_hostPointer(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).device) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(device) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).devicePointer) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(devicePointer) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hostPointer) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(hostPointer) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct cudaFuncAttributes { pub sharedSizeBytes: usize, pub constSizeBytes: usize, @@ -2418,12 +2008,21 @@ pub struct cudaFuncAttributes { pub cacheModeCA: ::libc::c_int, pub maxDynamicSharedSizeBytes: ::libc::c_int, pub preferredShmemCarveout: ::libc::c_int, + pub clusterDimMustBeSet: ::libc::c_int, + pub requiredClusterWidth: ::libc::c_int, + pub requiredClusterHeight: ::libc::c_int, + pub requiredClusterDepth: ::libc::c_int, + pub clusterSchedulingPolicyPreference: ::libc::c_int, + pub nonPortableClusterSizeAllowed: ::libc::c_int, + pub reserved: [::libc::c_int; 16usize], } #[test] fn bindgen_test_layout_cudaFuncAttributes() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 56usize, + 144usize, concat!("Size of: ", stringify!(cudaFuncAttributes)) ); assert_eq!( @@ -2431,176 +2030,180 @@ fn bindgen_test_layout_cudaFuncAttributes() { 8usize, concat!("Alignment of ", stringify!(cudaFuncAttributes)) ); - fn test_field_sharedSizeBytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedSizeBytes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(sharedSizeBytes) - ) - ); - } - test_field_sharedSizeBytes(); - fn test_field_constSizeBytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).constSizeBytes) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(constSizeBytes) - ) - ); - } - test_field_constSizeBytes(); - fn test_field_localSizeBytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).localSizeBytes) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(localSizeBytes) - ) - ); - } - test_field_localSizeBytes(); - fn test_field_maxThreadsPerBlock() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(maxThreadsPerBlock) - ) - ); - } - test_field_maxThreadsPerBlock(); - fn test_field_numRegs() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numRegs) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(numRegs) - ) - ); - } - test_field_numRegs(); - fn test_field_ptxVersion() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ptxVersion) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(ptxVersion) - ) - ); - } - test_field_ptxVersion(); - fn test_field_binaryVersion() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).binaryVersion) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(binaryVersion) - ) - ); - } - test_field_binaryVersion(); - fn test_field_cacheModeCA() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cacheModeCA) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(cacheModeCA) - ) - ); - } - test_field_cacheModeCA(); - fn test_field_maxDynamicSharedSizeBytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxDynamicSharedSizeBytes) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(maxDynamicSharedSizeBytes) - ) - ); - } - test_field_maxDynamicSharedSizeBytes(); - fn test_field_preferredShmemCarveout() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).preferredShmemCarveout) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(preferredShmemCarveout) - ) - ); - } - test_field_preferredShmemCarveout(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharedSizeBytes) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(sharedSizeBytes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).constSizeBytes) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(constSizeBytes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).localSizeBytes) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(localSizeBytes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(maxThreadsPerBlock) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numRegs) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(numRegs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ptxVersion) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(ptxVersion) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).binaryVersion) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(binaryVersion) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cacheModeCA) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(cacheModeCA) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).maxDynamicSharedSizeBytes) as usize - ptr as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(maxDynamicSharedSizeBytes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).preferredShmemCarveout) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(preferredShmemCarveout) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).clusterDimMustBeSet) as usize - ptr as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(clusterDimMustBeSet) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).requiredClusterWidth) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(requiredClusterWidth) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).requiredClusterHeight) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(requiredClusterHeight) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).requiredClusterDepth) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(requiredClusterDepth) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).clusterSchedulingPolicyPreference) as usize - ptr as usize + }, + 68usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(clusterSchedulingPolicyPreference) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).nonPortableClusterSizeAllowed) as usize - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(nonPortableClusterSizeAllowed) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(reserved) + ) + ); } #[repr(u32)] #[non_exhaustive] @@ -2608,7 +2211,13 @@ fn bindgen_test_layout_cudaFuncAttributes() { pub enum cudaFuncAttribute { cudaFuncAttributeMaxDynamicSharedMemorySize = 8, cudaFuncAttributePreferredSharedMemoryCarveout = 9, - cudaFuncAttributeMax = 10, + cudaFuncAttributeClusterDimMustBeSet = 10, + cudaFuncAttributeRequiredClusterWidth = 11, + cudaFuncAttributeRequiredClusterHeight = 12, + cudaFuncAttributeRequiredClusterDepth = 13, + cudaFuncAttributeNonPortableClusterSizeAllowed = 14, + cudaFuncAttributeClusterSchedulingPolicyPreference = 15, + cudaFuncAttributeMax = 16, } #[repr(u32)] #[non_exhaustive] @@ -2675,13 +2284,10 @@ pub enum cudaMemRangeAttribute { cudaMemRangeAttributePreferredLocation = 2, cudaMemRangeAttributeAccessedBy = 3, cudaMemRangeAttributeLastPrefetchLocation = 4, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaOutputMode { - cudaKeyValuePair = 0, - cudaCSV = 1, + cudaMemRangeAttributePreferredLocationType = 5, + cudaMemRangeAttributePreferredLocationId = 6, + cudaMemRangeAttributeLastPrefetchLocationType = 7, + cudaMemRangeAttributeLastPrefetchLocationId = 8, } #[repr(u32)] #[non_exhaustive] @@ -2831,8 +2437,22 @@ pub enum cudaDeviceAttr { cudaDevAttrGPUDirectRDMAFlushWritesOptions = 117, cudaDevAttrGPUDirectRDMAWritesOrdering = 118, cudaDevAttrMemoryPoolSupportedHandleTypes = 119, + cudaDevAttrClusterLaunch = 120, cudaDevAttrDeferredMappingCudaArraySupported = 121, - cudaDevAttrMax = 122, + cudaDevAttrReserved122 = 122, + cudaDevAttrReserved123 = 123, + cudaDevAttrReserved124 = 124, + cudaDevAttrIpcEventSupport = 125, + cudaDevAttrMemSyncDomainCount = 126, + cudaDevAttrReserved127 = 127, + cudaDevAttrReserved128 = 128, + cudaDevAttrReserved129 = 129, + cudaDevAttrNumaConfig = 130, + cudaDevAttrNumaId = 131, + cudaDevAttrReserved132 = 132, + cudaDevAttrMpsEnabled = 133, + cudaDevAttrHostNumaId = 134, + cudaDevAttrMax = 135, } #[repr(u32)] #[non_exhaustive] @@ -2853,6 +2473,9 @@ pub enum cudaMemPoolAttr { pub enum cudaMemLocationType { cudaMemLocationTypeInvalid = 0, cudaMemLocationTypeDevice = 1, + cudaMemLocationTypeHost = 2, + cudaMemLocationTypeHostNuma = 3, + cudaMemLocationTypeHostNumaCurrent = 4, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2862,6 +2485,8 @@ pub struct cudaMemLocation { } #[test] fn bindgen_test_layout_cudaMemLocation() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, @@ -2872,40 +2497,26 @@ fn bindgen_test_layout_cudaMemLocation() { 4usize, concat!("Alignment of ", stringify!(cudaMemLocation)) ); - fn test_field_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemLocation), - "::", - stringify!(type_) - ) - ); - } - test_field_type(); - fn test_field_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaMemLocation), - "::", - stringify!(id) - ) - ); - } - test_field_id(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemLocation), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaMemLocation), + "::", + stringify!(id) + ) + ); } #[repr(u32)] #[non_exhaustive] @@ -2923,6 +2534,8 @@ pub struct cudaMemAccessDesc { } #[test] fn bindgen_test_layout_cudaMemAccessDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, @@ -2933,40 +2546,26 @@ fn bindgen_test_layout_cudaMemAccessDesc() { 4usize, concat!("Alignment of ", stringify!(cudaMemAccessDesc)) ); - fn test_field_location() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAccessDesc), - "::", - stringify!(location) - ) - ); - } - test_field_location(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAccessDesc), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAccessDesc), + "::", + stringify!(location) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAccessDesc), + "::", + stringify!(flags) + ) + ); } #[repr(u32)] #[non_exhaustive] @@ -2984,6 +2583,7 @@ pub enum cudaMemAllocationHandleType { cudaMemHandleTypePosixFileDescriptor = 1, cudaMemHandleTypeWin32 = 2, cudaMemHandleTypeWin32Kmt = 4, + cudaMemHandleTypeFabric = 8, } #[repr(C)] #[derive(Copy, Clone)] @@ -2992,10 +2592,13 @@ pub struct cudaMemPoolProps { pub handleTypes: cudaMemAllocationHandleType, pub location: cudaMemLocation, pub win32SecurityAttributes: *mut ::libc::c_void, - pub reserved: [::libc::c_uchar; 64usize], + pub maxSize: usize, + pub reserved: [::libc::c_uchar; 56usize], } #[test] fn bindgen_test_layout_cudaMemPoolProps() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 88usize, @@ -3006,91 +2609,66 @@ fn bindgen_test_layout_cudaMemPoolProps() { 8usize, concat!("Alignment of ", stringify!(cudaMemPoolProps)) ); - fn test_field_allocType() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).allocType) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(allocType) - ) - ); - } - test_field_allocType(); - fn test_field_handleTypes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).handleTypes) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(handleTypes) - ) - ); - } - test_field_handleTypes(); - fn test_field_location() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(location) - ) - ); - } - test_field_location(); - fn test_field_win32SecurityAttributes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).win32SecurityAttributes) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(win32SecurityAttributes) - ) - ); - } - test_field_win32SecurityAttributes(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).allocType) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(allocType) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handleTypes) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(handleTypes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(location) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).win32SecurityAttributes) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(win32SecurityAttributes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).maxSize) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(maxSize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(reserved) + ) + ); } #[repr(C)] #[derive(Copy, Clone)] @@ -3099,6 +2677,9 @@ pub struct cudaMemPoolPtrExportData { } #[test] fn bindgen_test_layout_cudaMemPoolPtrExportData() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, @@ -3109,23 +2690,16 @@ fn bindgen_test_layout_cudaMemPoolPtrExportData() { 1usize, concat!("Alignment of ", stringify!(cudaMemPoolPtrExportData)) ); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolPtrExportData), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolPtrExportData), + "::", + stringify!(reserved) + ) + ); } #[repr(C)] #[derive(Copy, Clone)] @@ -3138,6 +2712,9 @@ pub struct cudaMemAllocNodeParams { } #[test] fn bindgen_test_layout_cudaMemAllocNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 120usize, @@ -3148,91 +2725,162 @@ fn bindgen_test_layout_cudaMemAllocNodeParams() { 8usize, concat!("Alignment of ", stringify!(cudaMemAllocNodeParams)) ); - fn test_field_poolProps() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).poolProps) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(poolProps) - ) - ); - } - test_field_poolProps(); - fn test_field_accessDescs() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accessDescs) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(accessDescs) - ) - ); - } - test_field_accessDescs(); - fn test_field_accessDescCount() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accessDescCount) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(accessDescCount) - ) - ); - } - test_field_accessDescCount(); - fn test_field_bytesize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bytesize) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(bytesize) - ) - ); - } - test_field_bytesize(); - fn test_field_dptr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dptr) as usize - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(dptr) - ) - ); - } - test_field_dptr(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).poolProps) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(poolProps) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accessDescs) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(accessDescs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accessDescCount) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(accessDescCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bytesize) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(bytesize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dptr) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(dptr) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaMemAllocNodeParamsV2 { + pub poolProps: cudaMemPoolProps, + pub accessDescs: *const cudaMemAccessDesc, + pub accessDescCount: usize, + pub bytesize: usize, + pub dptr: *mut ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaMemAllocNodeParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 120usize, + concat!("Size of: ", stringify!(cudaMemAllocNodeParamsV2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaMemAllocNodeParamsV2)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).poolProps) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParamsV2), + "::", + stringify!(poolProps) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accessDescs) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParamsV2), + "::", + stringify!(accessDescs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accessDescCount) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParamsV2), + "::", + stringify!(accessDescCount) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bytesize) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParamsV2), + "::", + stringify!(bytesize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dptr) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParamsV2), + "::", + stringify!(dptr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaMemFreeNodeParams { + pub dptr: *mut ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaMemFreeNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(cudaMemFreeNodeParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaMemFreeNodeParams)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dptr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemFreeNodeParams), + "::", + stringify!(dptr) + ) + ); } #[repr(u32)] #[non_exhaustive] @@ -3259,6 +2907,8 @@ pub struct CUuuid_st { } #[test] fn bindgen_test_layout_CUuuid_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, @@ -3269,23 +2919,16 @@ fn bindgen_test_layout_CUuuid_st() { 1usize, concat!("Alignment of ", stringify!(CUuuid_st)) ); - fn test_field_bytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUuuid_st), - "::", - stringify!(bytes) - ) - ); - } - test_field_bytes(); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(CUuuid_st), + "::", + stringify!(bytes) + ) + ); } pub type CUuuid = CUuuid_st; pub type cudaUUID_t = CUuuid_st; @@ -3372,12 +3015,30 @@ pub struct cudaDeviceProp { pub maxBlocksPerMultiProcessor: ::libc::c_int, pub accessPolicyMaxWindowSize: ::libc::c_int, pub reservedSharedMemPerBlock: usize, + pub hostRegisterSupported: ::libc::c_int, + pub sparseCudaArraySupported: ::libc::c_int, + pub hostRegisterReadOnlySupported: ::libc::c_int, + pub timelineSemaphoreInteropSupported: ::libc::c_int, + pub memoryPoolsSupported: ::libc::c_int, + pub gpuDirectRDMASupported: ::libc::c_int, + pub gpuDirectRDMAFlushWritesOptions: ::libc::c_uint, + pub gpuDirectRDMAWritesOrdering: ::libc::c_int, + pub memoryPoolSupportedHandleTypes: ::libc::c_uint, + pub deferredMappingCudaArraySupported: ::libc::c_int, + pub ipcEventSupported: ::libc::c_int, + pub clusterLaunch: ::libc::c_int, + pub unifiedFunctionPointers: ::libc::c_int, + pub reserved2: [::libc::c_int; 2usize], + pub reserved1: [::libc::c_int; 1usize], + pub reserved: [::libc::c_int; 60usize], } #[test] fn bindgen_test_layout_cudaDeviceProp() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 728usize, + 1032usize, concat!("Size of: ", stringify!(cudaDeviceProp)) ); assert_eq!( @@ -3385,4048 +3046,6874 @@ fn bindgen_test_layout_cudaDeviceProp() { 8usize, concat!("Alignment of ", stringify!(cudaDeviceProp)) ); - fn test_field_name() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(name) - ) - ); - } - test_field_name(); - fn test_field_uuid() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(uuid) - ) - ); - } - test_field_uuid(); - fn test_field_luid() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luid) as usize - ptr as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(luid) - ) - ); - } - test_field_luid(); - fn test_field_luidDeviceNodeMask() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luidDeviceNodeMask) as usize - ptr as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(luidDeviceNodeMask) - ) - ); - } - test_field_luidDeviceNodeMask(); - fn test_field_totalGlobalMem() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).totalGlobalMem) as usize - ptr as usize - }, - 288usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(totalGlobalMem) - ) - ); - } - test_field_totalGlobalMem(); - fn test_field_sharedMemPerBlock() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedMemPerBlock) as usize - ptr as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerBlock) - ) - ); - } - test_field_sharedMemPerBlock(); - fn test_field_regsPerBlock() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).regsPerBlock) as usize - ptr as usize - }, - 304usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(regsPerBlock) - ) - ); - } - test_field_regsPerBlock(); - fn test_field_warpSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).warpSize) as usize - ptr as usize - }, - 308usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(warpSize) - ) - ); - } - test_field_warpSize(); - fn test_field_memPitch() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).memPitch) as usize - ptr as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memPitch) - ) - ); - } - test_field_memPitch(); - fn test_field_maxThreadsPerBlock() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize - }, - 320usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsPerBlock) - ) - ); - } - test_field_maxThreadsPerBlock(); - fn test_field_maxThreadsDim() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxThreadsDim) as usize - ptr as usize - }, - 324usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsDim) - ) - ); - } - test_field_maxThreadsDim(); - fn test_field_maxGridSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxGridSize) as usize - ptr as usize - }, - 336usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxGridSize) - ) - ); - } - test_field_maxGridSize(); - fn test_field_clockRate() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).clockRate) as usize - ptr as usize - }, - 348usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(clockRate) - ) - ); - } - test_field_clockRate(); - fn test_field_totalConstMem() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).totalConstMem) as usize - ptr as usize - }, - 352usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(totalConstMem) - ) - ); - } - test_field_totalConstMem(); - fn test_field_major() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(major) - ) - ); - } - test_field_major(); - fn test_field_minor() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize - }, - 364usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(minor) - ) - ); - } - test_field_minor(); - fn test_field_textureAlignment() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).textureAlignment) as usize - ptr as usize - }, - 368usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(textureAlignment) - ) - ); - } - test_field_textureAlignment(); - fn test_field_texturePitchAlignment() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).texturePitchAlignment) as usize - ptr as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(texturePitchAlignment) - ) - ); - } - test_field_texturePitchAlignment(); - fn test_field_deviceOverlap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).deviceOverlap) as usize - ptr as usize - }, - 384usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(deviceOverlap) - ) - ); - } - test_field_deviceOverlap(); - fn test_field_multiProcessorCount() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).multiProcessorCount) as usize - ptr as usize - }, - 388usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(multiProcessorCount) - ) - ); - } - test_field_multiProcessorCount(); - fn test_field_kernelExecTimeoutEnabled() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).kernelExecTimeoutEnabled) as usize - ptr as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(kernelExecTimeoutEnabled) - ) - ); - } - test_field_kernelExecTimeoutEnabled(); - fn test_field_integrated() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).integrated) as usize - ptr as usize - }, - 396usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(integrated) - ) - ); - } - test_field_integrated(); - fn test_field_canMapHostMemory() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).canMapHostMemory) as usize - ptr as usize - }, - 400usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(canMapHostMemory) - ) - ); - } - test_field_canMapHostMemory(); - fn test_field_computeMode() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).computeMode) as usize - ptr as usize - }, - 404usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(computeMode) - ) - ); - } - test_field_computeMode(); - fn test_field_maxTexture1D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture1D) as usize - ptr as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1D) - ) - ); - } - test_field_maxTexture1D(); - fn test_field_maxTexture1DMipmap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture1DMipmap) as usize - ptr as usize - }, - 412usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DMipmap) - ) - ); - } - test_field_maxTexture1DMipmap(); - fn test_field_maxTexture1DLinear() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture1DLinear) as usize - ptr as usize - }, - 416usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DLinear) - ) - ); - } - test_field_maxTexture1DLinear(); - fn test_field_maxTexture2D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture2D) as usize - ptr as usize - }, - 420usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2D) - ) - ); - } - test_field_maxTexture2D(); - fn test_field_maxTexture2DMipmap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture2DMipmap) as usize - ptr as usize - }, - 428usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DMipmap) - ) - ); - } - test_field_maxTexture2DMipmap(); - fn test_field_maxTexture2DLinear() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture2DLinear) as usize - ptr as usize - }, - 436usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DLinear) - ) - ); - } - test_field_maxTexture2DLinear(); - fn test_field_maxTexture2DGather() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture2DGather) as usize - ptr as usize - }, - 448usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DGather) - ) - ); - } - test_field_maxTexture2DGather(); - fn test_field_maxTexture3D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture3D) as usize - ptr as usize - }, - 456usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture3D) - ) - ); - } - test_field_maxTexture3D(); - fn test_field_maxTexture3DAlt() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture3DAlt) as usize - ptr as usize - }, - 468usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture3DAlt) - ) - ); - } - test_field_maxTexture3DAlt(); - fn test_field_maxTextureCubemap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTextureCubemap) as usize - ptr as usize - }, - 480usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTextureCubemap) - ) - ); - } - test_field_maxTextureCubemap(); - fn test_field_maxTexture1DLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture1DLayered) as usize - ptr as usize - }, - 484usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DLayered) - ) - ); - } - test_field_maxTexture1DLayered(); - fn test_field_maxTexture2DLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture2DLayered) as usize - ptr as usize - }, - 492usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DLayered) - ) - ); - } - test_field_maxTexture2DLayered(); - fn test_field_maxTextureCubemapLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTextureCubemapLayered) as usize - ptr as usize - }, - 504usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTextureCubemapLayered) - ) - ); - } - test_field_maxTextureCubemapLayered(); - fn test_field_maxSurface1D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurface1D) as usize - ptr as usize - }, - 512usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface1D) - ) - ); - } - test_field_maxSurface1D(); - fn test_field_maxSurface2D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurface2D) as usize - ptr as usize - }, - 516usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface2D) - ) - ); - } - test_field_maxSurface2D(); - fn test_field_maxSurface3D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurface3D) as usize - ptr as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface3D) - ) - ); - } - test_field_maxSurface3D(); - fn test_field_maxSurface1DLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurface1DLayered) as usize - ptr as usize - }, - 536usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface1DLayered) - ) - ); - } - test_field_maxSurface1DLayered(); - fn test_field_maxSurface2DLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurface2DLayered) as usize - ptr as usize - }, - 544usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface2DLayered) - ) - ); - } - test_field_maxSurface2DLayered(); - fn test_field_maxSurfaceCubemap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurfaceCubemap) as usize - ptr as usize - }, - 556usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurfaceCubemap) - ) - ); - } - test_field_maxSurfaceCubemap(); - fn test_field_maxSurfaceCubemapLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurfaceCubemapLayered) as usize - ptr as usize - }, - 560usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurfaceCubemapLayered) - ) - ); - } - test_field_maxSurfaceCubemapLayered(); - fn test_field_surfaceAlignment() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).surfaceAlignment) as usize - ptr as usize - }, - 568usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(surfaceAlignment) - ) - ); - } - test_field_surfaceAlignment(); - fn test_field_concurrentKernels() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).concurrentKernels) as usize - ptr as usize - }, - 576usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(concurrentKernels) - ) - ); - } - test_field_concurrentKernels(); - fn test_field_ECCEnabled() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ECCEnabled) as usize - ptr as usize - }, - 580usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(ECCEnabled) - ) - ); - } - test_field_ECCEnabled(); - fn test_field_pciBusID() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pciBusID) as usize - ptr as usize - }, - 584usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciBusID) - ) - ); - } - test_field_pciBusID(); - fn test_field_pciDeviceID() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pciDeviceID) as usize - ptr as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciDeviceID) - ) - ); - } - test_field_pciDeviceID(); - fn test_field_pciDomainID() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pciDomainID) as usize - ptr as usize - }, - 592usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciDomainID) - ) - ); - } - test_field_pciDomainID(); - fn test_field_tccDriver() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tccDriver) as usize - ptr as usize - }, - 596usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(tccDriver) - ) - ); - } - test_field_tccDriver(); - fn test_field_asyncEngineCount() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).asyncEngineCount) as usize - ptr as usize - }, - 600usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(asyncEngineCount) - ) - ); - } - test_field_asyncEngineCount(); - fn test_field_unifiedAddressing() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).unifiedAddressing) as usize - ptr as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(unifiedAddressing) - ) - ); - } - test_field_unifiedAddressing(); - fn test_field_memoryClockRate() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).memoryClockRate) as usize - ptr as usize - }, - 608usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memoryClockRate) - ) - ); - } - test_field_memoryClockRate(); - fn test_field_memoryBusWidth() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).memoryBusWidth) as usize - ptr as usize - }, - 612usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memoryBusWidth) - ) - ); - } - test_field_memoryBusWidth(); - fn test_field_l2CacheSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).l2CacheSize) as usize - ptr as usize - }, - 616usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(l2CacheSize) - ) - ); - } - test_field_l2CacheSize(); - fn test_field_persistingL2CacheMaxSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).persistingL2CacheMaxSize) as usize - ptr as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(persistingL2CacheMaxSize) - ) - ); - } - test_field_persistingL2CacheMaxSize(); - fn test_field_maxThreadsPerMultiProcessor() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxThreadsPerMultiProcessor) as usize - ptr as usize - }, - 624usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsPerMultiProcessor) - ) - ); - } - test_field_maxThreadsPerMultiProcessor(); - fn test_field_streamPrioritiesSupported() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).streamPrioritiesSupported) as usize - ptr as usize - }, - 628usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(streamPrioritiesSupported) - ) - ); - } - test_field_streamPrioritiesSupported(); - fn test_field_globalL1CacheSupported() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).globalL1CacheSupported) as usize - ptr as usize - }, - 632usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(globalL1CacheSupported) - ) - ); - } - test_field_globalL1CacheSupported(); - fn test_field_localL1CacheSupported() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).localL1CacheSupported) as usize - ptr as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(localL1CacheSupported) - ) - ); - } - test_field_localL1CacheSupported(); - fn test_field_sharedMemPerMultiprocessor() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedMemPerMultiprocessor) as usize - ptr as usize - }, - 640usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerMultiprocessor) - ) - ); - } - test_field_sharedMemPerMultiprocessor(); - fn test_field_regsPerMultiprocessor() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).regsPerMultiprocessor) as usize - ptr as usize - }, - 648usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(regsPerMultiprocessor) - ) - ); - } - test_field_regsPerMultiprocessor(); - fn test_field_managedMemory() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).managedMemory) as usize - ptr as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(managedMemory) - ) - ); - } - test_field_managedMemory(); - fn test_field_isMultiGpuBoard() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).isMultiGpuBoard) as usize - ptr as usize - }, - 656usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(isMultiGpuBoard) - ) - ); - } - test_field_isMultiGpuBoard(); - fn test_field_multiGpuBoardGroupID() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).multiGpuBoardGroupID) as usize - ptr as usize - }, - 660usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(multiGpuBoardGroupID) - ) - ); - } - test_field_multiGpuBoardGroupID(); - fn test_field_hostNativeAtomicSupported() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).hostNativeAtomicSupported) as usize - ptr as usize - }, - 664usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(hostNativeAtomicSupported) - ) - ); - } - test_field_hostNativeAtomicSupported(); - fn test_field_singleToDoublePrecisionPerfRatio() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).singleToDoublePrecisionPerfRatio) as usize - - ptr as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(singleToDoublePrecisionPerfRatio) - ) - ); - } - test_field_singleToDoublePrecisionPerfRatio(); - fn test_field_pageableMemoryAccess() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pageableMemoryAccess) as usize - ptr as usize - }, - 672usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pageableMemoryAccess) - ) - ); - } - test_field_pageableMemoryAccess(); - fn test_field_concurrentManagedAccess() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).concurrentManagedAccess) as usize - ptr as usize - }, - 676usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(concurrentManagedAccess) - ) - ); - } - test_field_concurrentManagedAccess(); - fn test_field_computePreemptionSupported() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).computePreemptionSupported) as usize - ptr as usize - }, - 680usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(computePreemptionSupported) - ) - ); - } - test_field_computePreemptionSupported(); - fn test_field_canUseHostPointerForRegisteredMem() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).canUseHostPointerForRegisteredMem) as usize - - ptr as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(canUseHostPointerForRegisteredMem) - ) - ); - } - test_field_canUseHostPointerForRegisteredMem(); - fn test_field_cooperativeLaunch() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cooperativeLaunch) as usize - ptr as usize - }, - 688usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(cooperativeLaunch) - ) - ); - } - test_field_cooperativeLaunch(); - fn test_field_cooperativeMultiDeviceLaunch() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cooperativeMultiDeviceLaunch) as usize - ptr as usize - }, - 692usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(cooperativeMultiDeviceLaunch) - ) - ); - } - test_field_cooperativeMultiDeviceLaunch(); - fn test_field_sharedMemPerBlockOptin() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedMemPerBlockOptin) as usize - ptr as usize - }, - 696usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerBlockOptin) - ) - ); - } - test_field_sharedMemPerBlockOptin(); - fn test_field_pageableMemoryAccessUsesHostPageTables() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pageableMemoryAccessUsesHostPageTables) as usize - - ptr as usize - }, - 704usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pageableMemoryAccessUsesHostPageTables) - ) - ); - } - test_field_pageableMemoryAccessUsesHostPageTables(); - fn test_field_directManagedMemAccessFromHost() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).directManagedMemAccessFromHost) as usize - ptr as usize - }, - 708usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(directManagedMemAccessFromHost) - ) - ); - } - test_field_directManagedMemAccessFromHost(); - fn test_field_maxBlocksPerMultiProcessor() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxBlocksPerMultiProcessor) as usize - ptr as usize - }, - 712usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxBlocksPerMultiProcessor) - ) - ); - } - test_field_maxBlocksPerMultiProcessor(); - fn test_field_accessPolicyMaxWindowSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accessPolicyMaxWindowSize) as usize - ptr as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(accessPolicyMaxWindowSize) - ) - ); - } - test_field_accessPolicyMaxWindowSize(); - fn test_field_reservedSharedMemPerBlock() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reservedSharedMemPerBlock) as usize - ptr as usize - }, - 720usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(reservedSharedMemPerBlock) - ) - ); - } - test_field_reservedSharedMemPerBlock(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaIpcEventHandle_st { - pub reserved: [::libc::c_char; 64usize], -} -#[test] -fn bindgen_test_layout_cudaIpcEventHandle_st() { assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(cudaIpcEventHandle_st)) + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(name) + ) ); assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(cudaIpcEventHandle_st)) + unsafe { ::std::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize }, + 256usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(uuid) + ) ); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaIpcEventHandle_st), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaIpcMemHandle_st { - pub reserved: [::libc::c_char; 64usize], -} -#[test] -fn bindgen_test_layout_cudaIpcMemHandle_st() { assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(cudaIpcMemHandle_st)) + unsafe { ::std::ptr::addr_of!((*ptr).luid) as usize - ptr as usize }, + 272usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(luid) + ) ); assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(cudaIpcMemHandle_st)) + unsafe { ::std::ptr::addr_of!((*ptr).luidDeviceNodeMask) as usize - ptr as usize }, + 280usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(luidDeviceNodeMask) + ) ); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaIpcMemHandle_st), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st; -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaExternalMemoryHandleType { - cudaExternalMemoryHandleTypeOpaqueFd = 1, - cudaExternalMemoryHandleTypeOpaqueWin32 = 2, - cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3, - cudaExternalMemoryHandleTypeD3D12Heap = 4, - cudaExternalMemoryHandleTypeD3D12Resource = 5, - cudaExternalMemoryHandleTypeD3D11Resource = 6, - cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7, - cudaExternalMemoryHandleTypeNvSciBuf = 8, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalMemoryHandleDesc { - pub type_: cudaExternalMemoryHandleType, - pub handle: cudaExternalMemoryHandleDesc__bindgen_ty_1, - pub size: ::libc::c_ulonglong, - pub flags: ::libc::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 { - pub fd: ::libc::c_int, - pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, - pub nvSciBufObject: *const ::libc::c_void, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { - pub handle: *mut ::libc::c_void, - pub name: *const ::libc::c_void, -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 16usize, + unsafe { ::std::ptr::addr_of!((*ptr).totalGlobalMem) as usize - ptr as usize }, + 288usize, concat!( - "Size of: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(totalGlobalMem) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).sharedMemPerBlock) as usize - ptr as usize }, + 296usize, concat!( - "Alignment of ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerBlock) ) ); - fn test_field_handle() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) - ) - ); - } - test_field_handle(); - fn test_field_name() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) - ) - ); - } - test_field_name(); -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 16usize, + unsafe { ::std::ptr::addr_of!((*ptr).regsPerBlock) as usize - ptr as usize }, + 304usize, concat!( - "Size of: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(regsPerBlock) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).warpSize) as usize - ptr as usize }, + 308usize, concat!( - "Alignment of ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(warpSize) ) ); - fn test_field_fd() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - } - test_field_fd(); - fn test_field_win32() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - } - test_field_win32(); - fn test_field_nvSciBufObject() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciBufObject) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(nvSciBufObject) - ) - ); - } - test_field_nvSciBufObject(); -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc() { assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(cudaExternalMemoryHandleDesc)) + unsafe { ::std::ptr::addr_of!((*ptr).memPitch) as usize - ptr as usize }, + 312usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memPitch) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExternalMemoryHandleDesc)) + unsafe { ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize }, + 320usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsPerBlock) + ) ); - fn test_field_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(type_) - ) - ); - } - test_field_type(); - fn test_field_handle() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(handle) - ) - ); - } - test_field_handle(); - fn test_field_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(size) - ) - ); - } - test_field_size(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryBufferDesc { - pub offset: ::libc::c_ulonglong, - pub size: ::libc::c_ulonglong, - pub flags: ::libc::c_uint, -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryBufferDesc() { assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(cudaExternalMemoryBufferDesc)) + unsafe { ::std::ptr::addr_of!((*ptr).maxThreadsDim) as usize - ptr as usize }, + 324usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsDim) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExternalMemoryBufferDesc)) + unsafe { ::std::ptr::addr_of!((*ptr).maxGridSize) as usize - ptr as usize }, + 336usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxGridSize) + ) ); - fn test_field_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(offset) - ) - ); - } - test_field_offset(); - fn test_field_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(size) - ) - ); - } - test_field_size(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryMipmappedArrayDesc { - pub offset: ::libc::c_ulonglong, - pub formatDesc: cudaChannelFormatDesc, - pub extent: cudaExtent, - pub flags: ::libc::c_uint, - pub numLevels: ::libc::c_uint, -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryMipmappedArrayDesc() { assert_eq!( - ::std::mem::size_of::(), - 64usize, + unsafe { ::std::ptr::addr_of!((*ptr).clockRate) as usize - ptr as usize }, + 348usize, concat!( - "Size of: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(clockRate) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).totalConstMem) as usize - ptr as usize }, + 352usize, concat!( - "Alignment of ", - stringify!(cudaExternalMemoryMipmappedArrayDesc) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(totalConstMem) ) ); - fn test_field_offset() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(offset) - ) - ); - } - test_field_offset(); - fn test_field_formatDesc() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).formatDesc) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(formatDesc) - ) - ); - } - test_field_formatDesc(); - fn test_field_extent() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(extent) - ) - ); - } - test_field_extent(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_numLevels() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numLevels) as usize - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(numLevels) - ) - ); - } - test_field_numLevels(); -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaExternalSemaphoreHandleType { - cudaExternalSemaphoreHandleTypeOpaqueFd = 1, - cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2, - cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, - cudaExternalSemaphoreHandleTypeD3D12Fence = 4, - cudaExternalSemaphoreHandleTypeD3D11Fence = 5, - cudaExternalSemaphoreHandleTypeNvSciSync = 6, - cudaExternalSemaphoreHandleTypeKeyedMutex = 7, - cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8, - cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9, - cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreHandleDesc { - pub type_: cudaExternalSemaphoreHandleType, - pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1, - pub flags: ::libc::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { - pub fd: ::libc::c_int, - pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, - pub nvSciSyncObj: *const ::libc::c_void, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { - pub handle: *mut ::libc::c_void, - pub name: *const ::libc::c_void, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 16usize, + unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, + 360usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(major) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, + 364usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(minor) ) ); - fn test_field_handle() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) - ) - ); - } - test_field_handle(); - fn test_field_name() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) - ) - ); - } - test_field_name(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 16usize, + unsafe { ::std::ptr::addr_of!((*ptr).textureAlignment) as usize - ptr as usize }, + 368usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(textureAlignment) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).texturePitchAlignment) as usize - ptr as usize }, + 376usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(texturePitchAlignment) ) ); - fn test_field_fd() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - } - test_field_fd(); - fn test_field_win32() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - } - test_field_win32(); - fn test_field_nvSciSyncObj() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciSyncObj) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(nvSciSyncObj) - ) - ); - } - test_field_nvSciSyncObj(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc() { assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreHandleDesc)) + unsafe { ::std::ptr::addr_of!((*ptr).deviceOverlap) as usize - ptr as usize }, + 384usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(deviceOverlap) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExternalSemaphoreHandleDesc)) + unsafe { ::std::ptr::addr_of!((*ptr).multiProcessorCount) as usize - ptr as usize }, + 388usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(multiProcessorCount) + ) ); - fn test_field_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(type_) - ) - ); - } - test_field_type(); - fn test_field_handle() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(handle) - ) - ); - } - test_field_handle(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams_v1 { - pub params: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, - pub flags: ::libc::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1 { - pub fence: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, - pub nvSciSync: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, - pub keyedMutex: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1 { - pub value: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).kernelExecTimeoutEnabled) as usize - ptr as usize }, + 392usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(kernelExecTimeoutEnabled) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).integrated) as usize - ptr as usize }, + 396usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(integrated) ) ); - fn test_field_value() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); - } - test_field_value(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2 { - pub fence: *mut ::libc::c_void, - pub reserved: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).canMapHostMemory) as usize - ptr as usize }, + 400usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(canMapHostMemory) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).computeMode) as usize - ptr as usize }, + 404usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(computeMode) ) ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3 { - pub key: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3() { assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture1D) as usize - ptr as usize }, + 408usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1D) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture1DMipmap) as usize - ptr as usize }, + 412usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DMipmap) ) ); - fn test_field_key() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - } - test_field_key(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 24usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture1DLinear) as usize - ptr as usize }, + 416usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DLinear) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture2D) as usize - ptr as usize }, + 420usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2D) ) ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_nvSciSync() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - } - test_field_nvSciSync(); - fn test_field_keyedMutex() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - } - test_field_keyedMutex(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1() { assert_eq!( - ::std::mem::size_of::(), - 32usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture2DMipmap) as usize - ptr as usize }, + 428usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams_v1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DMipmap) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture2DLinear) as usize - ptr as usize }, + 436usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams_v1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DLinear) ) ); - fn test_field_params() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1), - "::", - stringify!(params) - ) - ); - } - test_field_params(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams_v1 { - pub params: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, - pub flags: ::libc::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1 { - pub fence: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, - pub nvSciSync: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, - pub keyedMutex: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1 { - pub value: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture2DGather) as usize - ptr as usize }, + 448usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DGather) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture3D) as usize - ptr as usize }, + 456usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture3D) ) ); - fn test_field_value() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); - } - test_field_value(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2 { - pub fence: *mut ::libc::c_void, - pub reserved: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture3DAlt) as usize - ptr as usize }, + 468usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture3DAlt) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTextureCubemap) as usize - ptr as usize }, + 480usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTextureCubemap) ) ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3 { - pub key: ::libc::c_ulonglong, - pub timeoutMs: ::libc::c_uint, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3() { assert_eq!( - ::std::mem::size_of::(), - 16usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture1DLayered) as usize - ptr as usize }, + 484usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DLayered) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture2DLayered) as usize - ptr as usize }, + 492usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DLayered) ) ); - fn test_field_key() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - } - test_field_key(); - fn test_field_timeoutMs() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(timeoutMs) - ) - ); - } - test_field_timeoutMs(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 32usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTextureCubemapLayered) as usize - ptr as usize }, + 504usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTextureCubemapLayered) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxSurface1D) as usize - ptr as usize }, + 512usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface1D) ) ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_nvSciSync() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - } - test_field_nvSciSync(); - fn test_field_keyedMutex() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - } - test_field_keyedMutex(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1() { assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams_v1)) + unsafe { ::std::ptr::addr_of!((*ptr).maxSurface2D) as usize - ptr as usize }, + 516usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface2D) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxSurface3D) as usize - ptr as usize }, + 524usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams_v1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface3D) ) ); - fn test_field_params() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1), - "::", - stringify!(params) - ) - ); - } - test_field_params(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams { - pub params: cudaExternalSemaphoreSignalParams__bindgen_ty_1, - pub flags: ::libc::c_uint, - pub reserved: [::libc::c_uint; 16usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1 { - pub fence: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, - pub nvSciSync: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, - pub keyedMutex: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, - pub reserved: [::libc::c_uint; 12usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1 { - pub value: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxSurface1DLayered) as usize - ptr as usize }, + 536usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface1DLayered) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxSurface2DLayered) as usize - ptr as usize }, + 544usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface2DLayered) ) ); - fn test_field_value() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); - } - test_field_value(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2 { - pub fence: *mut ::libc::c_void, - pub reserved: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxSurfaceCubemap) as usize - ptr as usize }, + 556usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurfaceCubemap) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxSurfaceCubemapLayered) as usize - ptr as usize }, + 560usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurfaceCubemapLayered) ) ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3 { - pub key: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3() { assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).surfaceAlignment) as usize - ptr as usize }, + 568usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(surfaceAlignment) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).concurrentKernels) as usize - ptr as usize }, + 576usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(concurrentKernels) ) ); - fn test_field_key() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - } - test_field_key(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 72usize, + unsafe { ::std::ptr::addr_of!((*ptr).ECCEnabled) as usize - ptr as usize }, + 580usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(ECCEnabled) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).pciBusID) as usize - ptr as usize }, + 584usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciBusID) ) ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_nvSciSync() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - } - test_field_nvSciSync(); - fn test_field_keyedMutex() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - } - test_field_keyedMutex(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams() { assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreSignalParams)) + unsafe { ::std::ptr::addr_of!((*ptr).pciDeviceID) as usize - ptr as usize }, + 588usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciDeviceID) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).pciDomainID) as usize - ptr as usize }, + 592usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciDomainID) ) ); - fn test_field_params() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(params) - ) - ); - } - test_field_params(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams { - pub params: cudaExternalSemaphoreWaitParams__bindgen_ty_1, - pub flags: ::libc::c_uint, - pub reserved: [::libc::c_uint; 16usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1 { - pub fence: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, - pub nvSciSync: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, - pub keyedMutex: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, - pub reserved: [::libc::c_uint; 10usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1 { - pub value: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).tccDriver) as usize - ptr as usize }, + 596usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(tccDriver) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).asyncEngineCount) as usize - ptr as usize }, + 600usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(asyncEngineCount) ) ); - fn test_field_value() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); - } - test_field_value(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2 { - pub fence: *mut ::libc::c_void, - pub reserved: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2() { assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).unifiedAddressing) as usize - ptr as usize }, + 604usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(unifiedAddressing) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).memoryClockRate) as usize - ptr as usize }, + 608usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryClockRate) ) ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3 { - pub key: ::libc::c_ulonglong, - pub timeoutMs: ::libc::c_uint, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3() { assert_eq!( - ::std::mem::size_of::(), - 16usize, + unsafe { ::std::ptr::addr_of!((*ptr).memoryBusWidth) as usize - ptr as usize }, + 612usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryBusWidth) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).l2CacheSize) as usize - ptr as usize }, + 616usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(l2CacheSize) ) ); - fn test_field_key() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - } - test_field_key(); - fn test_field_timeoutMs() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(timeoutMs) - ) - ); - } - test_field_timeoutMs(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1() { assert_eq!( - ::std::mem::size_of::(), - 72usize, + unsafe { ::std::ptr::addr_of!((*ptr).persistingL2CacheMaxSize) as usize - ptr as usize }, + 620usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(persistingL2CacheMaxSize) ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxThreadsPerMultiProcessor) as usize - ptr as usize }, + 624usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsPerMultiProcessor) ) ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_nvSciSync() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - } - test_field_nvSciSync(); - fn test_field_keyedMutex() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - } - test_field_keyedMutex(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams() { assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams)) + unsafe { ::std::ptr::addr_of!((*ptr).streamPrioritiesSupported) as usize - ptr as usize }, + 628usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(streamPrioritiesSupported) + ) ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExternalSemaphoreWaitParams)) + unsafe { ::std::ptr::addr_of!((*ptr).globalL1CacheSupported) as usize - ptr as usize }, + 632usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(globalL1CacheSupported) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).localL1CacheSupported) as usize - ptr as usize }, + 636usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(localL1CacheSupported) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharedMemPerMultiprocessor) as usize - ptr as usize }, + 640usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerMultiprocessor) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).regsPerMultiprocessor) as usize - ptr as usize }, + 648usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(regsPerMultiprocessor) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).managedMemory) as usize - ptr as usize }, + 652usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(managedMemory) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isMultiGpuBoard) as usize - ptr as usize }, + 656usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(isMultiGpuBoard) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).multiGpuBoardGroupID) as usize - ptr as usize }, + 660usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(multiGpuBoardGroupID) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hostNativeAtomicSupported) as usize - ptr as usize }, + 664usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(hostNativeAtomicSupported) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).singleToDoublePrecisionPerfRatio) as usize - ptr as usize + }, + 668usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(singleToDoublePrecisionPerfRatio) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pageableMemoryAccess) as usize - ptr as usize }, + 672usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pageableMemoryAccess) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).concurrentManagedAccess) as usize - ptr as usize }, + 676usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(concurrentManagedAccess) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).computePreemptionSupported) as usize - ptr as usize }, + 680usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(computePreemptionSupported) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).canUseHostPointerForRegisteredMem) as usize - ptr as usize + }, + 684usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(canUseHostPointerForRegisteredMem) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cooperativeLaunch) as usize - ptr as usize }, + 688usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(cooperativeLaunch) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).cooperativeMultiDeviceLaunch) as usize - ptr as usize + }, + 692usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(cooperativeMultiDeviceLaunch) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharedMemPerBlockOptin) as usize - ptr as usize }, + 696usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerBlockOptin) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pageableMemoryAccessUsesHostPageTables) as usize + - ptr as usize + }, + 704usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pageableMemoryAccessUsesHostPageTables) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).directManagedMemAccessFromHost) as usize - ptr as usize + }, + 708usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(directManagedMemAccessFromHost) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).maxBlocksPerMultiProcessor) as usize - ptr as usize }, + 712usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxBlocksPerMultiProcessor) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accessPolicyMaxWindowSize) as usize - ptr as usize }, + 716usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(accessPolicyMaxWindowSize) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reservedSharedMemPerBlock) as usize - ptr as usize }, + 720usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(reservedSharedMemPerBlock) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hostRegisterSupported) as usize - ptr as usize }, + 728usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(hostRegisterSupported) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sparseCudaArraySupported) as usize - ptr as usize }, + 732usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sparseCudaArraySupported) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).hostRegisterReadOnlySupported) as usize - ptr as usize + }, + 736usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(hostRegisterReadOnlySupported) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).timelineSemaphoreInteropSupported) as usize - ptr as usize + }, + 740usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(timelineSemaphoreInteropSupported) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memoryPoolsSupported) as usize - ptr as usize }, + 744usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryPoolsSupported) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gpuDirectRDMASupported) as usize - ptr as usize }, + 748usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(gpuDirectRDMASupported) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).gpuDirectRDMAFlushWritesOptions) as usize - ptr as usize + }, + 752usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(gpuDirectRDMAFlushWritesOptions) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gpuDirectRDMAWritesOrdering) as usize - ptr as usize }, + 756usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(gpuDirectRDMAWritesOrdering) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).memoryPoolSupportedHandleTypes) as usize - ptr as usize + }, + 760usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryPoolSupportedHandleTypes) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).deferredMappingCudaArraySupported) as usize - ptr as usize + }, + 764usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(deferredMappingCudaArraySupported) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ipcEventSupported) as usize - ptr as usize }, + 768usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(ipcEventSupported) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).clusterLaunch) as usize - ptr as usize }, + 772usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(clusterLaunch) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).unifiedFunctionPointers) as usize - ptr as usize }, + 776usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(unifiedFunctionPointers) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, + 780usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(reserved2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 788usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 792usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(reserved) + ) ); - fn test_field_params() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(params) - ) - ); - } - test_field_params(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -pub use self::cudaError as cudaError_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUstream_st { - _unused: [u8; 0], -} -pub type cudaStream_t = *mut CUstream_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUevent_st { - _unused: [u8; 0], } -pub type cudaEvent_t = *mut CUevent_st; -pub type cudaGraphicsResource_t = *mut cudaGraphicsResource; -pub use self::cudaOutputMode as cudaOutputMode_t; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUexternalMemory_st { - _unused: [u8; 0], +#[derive(Copy, Clone)] +pub struct cudaIpcEventHandle_st { + pub reserved: [::libc::c_char; 64usize], } -pub type cudaExternalMemory_t = *mut CUexternalMemory_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUexternalSemaphore_st { - _unused: [u8; 0], +#[test] +fn bindgen_test_layout_cudaIpcEventHandle_st() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaIpcEventHandle_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaIpcEventHandle_st)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaIpcEventHandle_st), + "::", + stringify!(reserved) + ) + ); } -pub type cudaExternalSemaphore_t = *mut CUexternalSemaphore_st; +pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUgraph_st { - _unused: [u8; 0], +#[derive(Copy, Clone)] +pub struct cudaIpcMemHandle_st { + pub reserved: [::libc::c_char; 64usize], } -pub type cudaGraph_t = *mut CUgraph_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUgraphNode_st { - _unused: [u8; 0], +#[test] +fn bindgen_test_layout_cudaIpcMemHandle_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaIpcMemHandle_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaIpcMemHandle_st)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaIpcMemHandle_st), + "::", + stringify!(reserved) + ) + ); } -pub type cudaGraphNode_t = *mut CUgraphNode_st; +pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUuserObject_st { - _unused: [u8; 0], +#[derive(Copy, Clone)] +pub struct cudaMemFabricHandle_st { + pub reserved: [::libc::c_char; 64usize], } -pub type cudaUserObject_t = *mut CUuserObject_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUfunc_st { - _unused: [u8; 0], +#[test] +fn bindgen_test_layout_cudaMemFabricHandle_st() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaMemFabricHandle_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaMemFabricHandle_st)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemFabricHandle_st), + "::", + stringify!(reserved) + ) + ); +} +pub type cudaMemFabricHandle_t = cudaMemFabricHandle_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaExternalMemoryHandleType { + cudaExternalMemoryHandleTypeOpaqueFd = 1, + cudaExternalMemoryHandleTypeOpaqueWin32 = 2, + cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3, + cudaExternalMemoryHandleTypeD3D12Heap = 4, + cudaExternalMemoryHandleTypeD3D12Resource = 5, + cudaExternalMemoryHandleTypeD3D11Resource = 6, + cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7, + cudaExternalMemoryHandleTypeNvSciBuf = 8, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalMemoryHandleDesc { + pub type_: cudaExternalMemoryHandleType, + pub handle: cudaExternalMemoryHandleDesc__bindgen_ty_1, + pub size: ::libc::c_ulonglong, + pub flags: ::libc::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 { + pub fd: ::libc::c_int, + pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + pub nvSciBufObject: *const ::libc::c_void, } -pub type cudaFunction_t = *mut CUfunc_st; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct CUmemPoolHandle_st { - _unused: [u8; 0], +pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { + pub handle: *mut ::libc::c_void, + pub name: *const ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(win32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciBufObject) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(nvSciBufObject) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryHandleDesc() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaExternalMemoryHandleDesc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalMemoryHandleDesc)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalMemoryBufferDesc { + pub offset: ::libc::c_ulonglong, + pub size: ::libc::c_ulonglong, + pub flags: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryBufferDesc() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaExternalMemoryBufferDesc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalMemoryBufferDesc)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalMemoryMipmappedArrayDesc { + pub offset: ::libc::c_ulonglong, + pub formatDesc: cudaChannelFormatDesc, + pub extent: cudaExtent, + pub flags: ::libc::c_uint, + pub numLevels: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalMemoryMipmappedArrayDesc() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!( + "Size of: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalMemoryMipmappedArrayDesc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).formatDesc) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(formatDesc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(extent) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numLevels) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(numLevels) + ) + ); } -pub type cudaMemPool_t = *mut CUmemPoolHandle_st; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaCGScope { - cudaCGScopeInvalid = 0, - cudaCGScopeGrid = 1, - cudaCGScopeMultiGrid = 2, +pub enum cudaExternalSemaphoreHandleType { + cudaExternalSemaphoreHandleTypeOpaqueFd = 1, + cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2, + cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, + cudaExternalSemaphoreHandleTypeD3D12Fence = 4, + cudaExternalSemaphoreHandleTypeD3D11Fence = 5, + cudaExternalSemaphoreHandleTypeNvSciSync = 6, + cudaExternalSemaphoreHandleTypeKeyedMutex = 7, + cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8, + cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9, + cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreHandleDesc { + pub type_: cudaExternalSemaphoreHandleType, + pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1, + pub flags: ::libc::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { + pub fd: ::libc::c_int, + pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + pub nvSciSyncObj: *const ::libc::c_void, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { + pub handle: *mut ::libc::c_void, + pub name: *const ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(win32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciSyncObj) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(nvSciSyncObj) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreHandleDesc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreHandleDesc)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams_v1 { + pub params: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, + pub flags: ::libc::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1), + "::", + stringify!(params) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams_v1 { + pub params: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, + pub flags: ::libc::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, + pub timeoutMs: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(timeoutMs) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams_v1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1), + "::", + stringify!(params) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams { + pub params: cudaExternalSemaphoreSignalParams__bindgen_ty_1, + pub flags: ::libc::c_uint, + pub reserved: [::libc::c_uint; 16usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, + pub reserved: [::libc::c_uint; 12usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 144usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreSignalParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(params) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams { + pub params: cudaExternalSemaphoreWaitParams__bindgen_ty_1, + pub flags: ::libc::c_uint, + pub reserved: [::libc::c_uint; 16usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, + pub reserved: [::libc::c_uint; 10usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, + pub timeoutMs: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(timeoutMs) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(fence) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(nvSciSync) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(keyedMutex) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 144usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreWaitParams)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(params) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(reserved) + ) + ); +} +pub use self::cudaError as cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUstream_st { + _unused: [u8; 0], +} +pub type cudaStream_t = *mut CUstream_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUevent_st { + _unused: [u8; 0], +} +pub type cudaEvent_t = *mut CUevent_st; +pub type cudaGraphicsResource_t = *mut cudaGraphicsResource; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUexternalMemory_st { + _unused: [u8; 0], +} +pub type cudaExternalMemory_t = *mut CUexternalMemory_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUexternalSemaphore_st { + _unused: [u8; 0], +} +pub type cudaExternalSemaphore_t = *mut CUexternalSemaphore_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraph_st { + _unused: [u8; 0], +} +pub type cudaGraph_t = *mut CUgraph_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraphNode_st { + _unused: [u8; 0], +} +pub type cudaGraphNode_t = *mut CUgraphNode_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUuserObject_st { + _unused: [u8; 0], +} +pub type cudaUserObject_t = *mut CUuserObject_st; +pub type cudaGraphConditionalHandle = ::libc::c_ulonglong; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUfunc_st { + _unused: [u8; 0], +} +pub type cudaFunction_t = *mut CUfunc_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUkern_st { + _unused: [u8; 0], +} +pub type cudaKernel_t = *mut CUkern_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUmemPoolHandle_st { + _unused: [u8; 0], +} +pub type cudaMemPool_t = *mut CUmemPoolHandle_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaCGScope { + cudaCGScopeInvalid = 0, + cudaCGScopeGrid = 1, + cudaCGScopeMultiGrid = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchParams { + pub func: *mut ::libc::c_void, + pub gridDim: dim3, + pub blockDim: dim3, + pub args: *mut *mut ::libc::c_void, + pub sharedMem: usize, + pub stream: cudaStream_t, +} +#[test] +fn bindgen_test_layout_cudaLaunchParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaLaunchParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchParams)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(func) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(gridDim) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(blockDim) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(args) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharedMem) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(sharedMem) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(stream) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaKernelNodeParams { + pub func: *mut ::libc::c_void, + pub gridDim: dim3, + pub blockDim: dim3, + pub sharedMemBytes: ::libc::c_uint, + pub kernelParams: *mut *mut ::libc::c_void, + pub extra: *mut *mut ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaKernelNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaKernelNodeParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaKernelNodeParams)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(func) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(gridDim) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(blockDim) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharedMemBytes) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(sharedMemBytes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).kernelParams) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(kernelParams) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(extra) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaKernelNodeParamsV2 { + pub func: *mut ::libc::c_void, + pub gridDim: dim3, + pub blockDim: dim3, + pub sharedMemBytes: ::libc::c_uint, + pub kernelParams: *mut *mut ::libc::c_void, + pub extra: *mut *mut ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaKernelNodeParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaKernelNodeParamsV2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaKernelNodeParamsV2)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(func) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(gridDim) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(blockDim) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharedMemBytes) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(sharedMemBytes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).kernelParams) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(kernelParams) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(extra) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalNodeParams { + pub extSemArray: *mut cudaExternalSemaphore_t, + pub paramsArray: *const cudaExternalSemaphoreSignalParams, + pub numExtSems: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalNodeParams) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalNodeParams) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(extSemArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(paramsArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(numExtSems) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalNodeParamsV2 { + pub extSemArray: *mut cudaExternalSemaphore_t, + pub paramsArray: *const cudaExternalSemaphoreSignalParams, + pub numExtSems: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalNodeParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalNodeParamsV2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalNodeParamsV2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParamsV2), + "::", + stringify!(extSemArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParamsV2), + "::", + stringify!(paramsArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParamsV2), + "::", + stringify!(numExtSems) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitNodeParams { + pub extSemArray: *mut cudaExternalSemaphore_t, + pub paramsArray: *const cudaExternalSemaphoreWaitParams, + pub numExtSems: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitNodeParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitNodeParams) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(extSemArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(paramsArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(numExtSems) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitNodeParamsV2 { + pub extSemArray: *mut cudaExternalSemaphore_t, + pub paramsArray: *const cudaExternalSemaphoreWaitParams, + pub numExtSems: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitNodeParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitNodeParamsV2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitNodeParamsV2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParamsV2), + "::", + stringify!(extSemArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParamsV2), + "::", + stringify!(paramsArray) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParamsV2), + "::", + stringify!(numExtSems) + ) + ); +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphConditionalHandleFlags { + cudaGraphCondAssignDefault = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphConditionalNodeType { + cudaGraphCondTypeIf = 0, + cudaGraphCondTypeWhile = 1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaConditionalNodeParams { + pub handle: cudaGraphConditionalHandle, + pub type_: cudaGraphConditionalNodeType, + pub size: ::libc::c_uint, + pub phGraph_out: *mut cudaGraph_t, +} +#[test] +fn bindgen_test_layout_cudaConditionalNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaConditionalNodeParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaConditionalNodeParams)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaConditionalNodeParams), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaConditionalNodeParams), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaConditionalNodeParams), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).phGraph_out) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaConditionalNodeParams), + "::", + stringify!(phGraph_out) + ) + ); +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphNodeType { + cudaGraphNodeTypeKernel = 0, + cudaGraphNodeTypeMemcpy = 1, + cudaGraphNodeTypeMemset = 2, + cudaGraphNodeTypeHost = 3, + cudaGraphNodeTypeGraph = 4, + cudaGraphNodeTypeEmpty = 5, + cudaGraphNodeTypeWaitEvent = 6, + cudaGraphNodeTypeEventRecord = 7, + cudaGraphNodeTypeExtSemaphoreSignal = 8, + cudaGraphNodeTypeExtSemaphoreWait = 9, + cudaGraphNodeTypeMemAlloc = 10, + cudaGraphNodeTypeMemFree = 11, + cudaGraphNodeTypeConditional = 13, + cudaGraphNodeTypeCount = 14, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaChildGraphNodeParams { + pub graph: cudaGraph_t, +} +#[test] +fn bindgen_test_layout_cudaChildGraphNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(cudaChildGraphNodeParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaChildGraphNodeParams)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).graph) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaChildGraphNodeParams), + "::", + stringify!(graph) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaEventRecordNodeParams { + pub event: cudaEvent_t, +} +#[test] +fn bindgen_test_layout_cudaEventRecordNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(cudaEventRecordNodeParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaEventRecordNodeParams)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaEventRecordNodeParams), + "::", + stringify!(event) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaEventWaitNodeParams { + pub event: cudaEvent_t, +} +#[test] +fn bindgen_test_layout_cudaEventWaitNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(cudaEventWaitNodeParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaEventWaitNodeParams)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaEventWaitNodeParams), + "::", + stringify!(event) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaGraphNodeParams { + pub type_: cudaGraphNodeType, + pub reserved0: [::libc::c_int; 3usize], + pub __bindgen_anon_1: cudaGraphNodeParams__bindgen_ty_1, + pub reserved2: ::libc::c_longlong, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaGraphNodeParams__bindgen_ty_1 { + pub reserved1: [::libc::c_longlong; 29usize], + pub kernel: cudaKernelNodeParamsV2, + pub memcpy: cudaMemcpyNodeParams, + pub memset: cudaMemsetParamsV2, + pub host: cudaHostNodeParamsV2, + pub graph: cudaChildGraphNodeParams, + pub eventWait: cudaEventWaitNodeParams, + pub eventRecord: cudaEventRecordNodeParams, + pub extSemSignal: cudaExternalSemaphoreSignalNodeParamsV2, + pub extSemWait: cudaExternalSemaphoreWaitNodeParamsV2, + pub alloc: cudaMemAllocNodeParamsV2, + pub free: cudaMemFreeNodeParams, + pub conditional: cudaConditionalNodeParams, +} +#[test] +fn bindgen_test_layout_cudaGraphNodeParams__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 232usize, + concat!("Size of: ", stringify!(cudaGraphNodeParams__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaGraphNodeParams__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).kernel) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(kernel) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memcpy) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(memcpy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(memset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).host) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(host) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).graph) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(graph) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eventWait) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(eventWait) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eventRecord) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(eventRecord) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemSignal) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(extSemSignal) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemWait) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(extSemWait) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).alloc) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(alloc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).free) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(free) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).conditional) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(conditional) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaGraphNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 256usize, + concat!("Size of: ", stringify!(cudaGraphNodeParams)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaGraphNodeParams)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved0) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams), + "::", + stringify!(reserved0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, + 248usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams), + "::", + stringify!(reserved2) + ) + ); +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphDependencyType_enum { + cudaGraphDependencyTypeDefault = 0, + cudaGraphDependencyTypeProgrammatic = 1, +} +pub use self::cudaGraphDependencyType_enum as cudaGraphDependencyType; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaGraphEdgeData_st { + pub from_port: ::libc::c_uchar, + pub to_port: ::libc::c_uchar, + pub type_: ::libc::c_uchar, + pub reserved: [::libc::c_uchar; 5usize], +} +#[test] +fn bindgen_test_layout_cudaGraphEdgeData_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(cudaGraphEdgeData_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaGraphEdgeData_st)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).from_port) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphEdgeData_st), + "::", + stringify!(from_port) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).to_port) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphEdgeData_st), + "::", + stringify!(to_port) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphEdgeData_st), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphEdgeData_st), + "::", + stringify!(reserved) + ) + ); +} +pub type cudaGraphEdgeData = cudaGraphEdgeData_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraphExec_st { + _unused: [u8; 0], +} +pub type cudaGraphExec_t = *mut CUgraphExec_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphExecUpdateResult { + cudaGraphExecUpdateSuccess = 0, + cudaGraphExecUpdateError = 1, + cudaGraphExecUpdateErrorTopologyChanged = 2, + cudaGraphExecUpdateErrorNodeTypeChanged = 3, + cudaGraphExecUpdateErrorFunctionChanged = 4, + cudaGraphExecUpdateErrorParametersChanged = 5, + cudaGraphExecUpdateErrorNotSupported = 6, + cudaGraphExecUpdateErrorUnsupportedFunctionChange = 7, + cudaGraphExecUpdateErrorAttributesChanged = 8, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphInstantiateResult { + cudaGraphInstantiateSuccess = 0, + cudaGraphInstantiateError = 1, + cudaGraphInstantiateInvalidStructure = 2, + cudaGraphInstantiateNodeOperationNotSupported = 3, + cudaGraphInstantiateMultipleDevicesNotSupported = 4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaGraphInstantiateParams_st { + pub flags: ::libc::c_ulonglong, + pub uploadStream: cudaStream_t, + pub errNode_out: cudaGraphNode_t, + pub result_out: cudaGraphInstantiateResult, +} +#[test] +fn bindgen_test_layout_cudaGraphInstantiateParams_st() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaGraphInstantiateParams_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaGraphInstantiateParams_st)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphInstantiateParams_st), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uploadStream) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphInstantiateParams_st), + "::", + stringify!(uploadStream) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).errNode_out) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphInstantiateParams_st), + "::", + stringify!(errNode_out) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).result_out) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphInstantiateParams_st), + "::", + stringify!(result_out) + ) + ); +} +pub type cudaGraphInstantiateParams = cudaGraphInstantiateParams_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaGraphExecUpdateResultInfo_st { + pub result: cudaGraphExecUpdateResult, + pub errorNode: cudaGraphNode_t, + pub errorFromNode: cudaGraphNode_t, +} +#[test] +fn bindgen_test_layout_cudaGraphExecUpdateResultInfo_st() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaGraphExecUpdateResultInfo_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaGraphExecUpdateResultInfo_st) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).result) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphExecUpdateResultInfo_st), + "::", + stringify!(result) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).errorNode) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphExecUpdateResultInfo_st), + "::", + stringify!(errorNode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).errorFromNode) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphExecUpdateResultInfo_st), + "::", + stringify!(errorFromNode) + ) + ); +} +pub type cudaGraphExecUpdateResultInfo = cudaGraphExecUpdateResultInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraphDeviceUpdatableNode_st { + _unused: [u8; 0], +} +pub type cudaGraphDeviceNode_t = *mut CUgraphDeviceUpdatableNode_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphKernelNodeField { + cudaGraphKernelNodeFieldInvalid = 0, + cudaGraphKernelNodeFieldGridDim = 1, + cudaGraphKernelNodeFieldParam = 2, + cudaGraphKernelNodeFieldEnabled = 3, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaGraphKernelNodeUpdate { + pub node: cudaGraphDeviceNode_t, + pub field: cudaGraphKernelNodeField, + pub updateData: cudaGraphKernelNodeUpdate__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaGraphKernelNodeUpdate__bindgen_ty_1 { + pub gridDim: dim3, + pub param: cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1, + pub isEnabled: ::libc::c_uint, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1 { + pub pValue: *const ::libc::c_void, + pub offset: usize, + pub size: usize, +} +#[test] +fn bindgen_test_layout_cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!( + "Size of: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(pValue) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(size) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaGraphKernelNodeUpdate__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!( + "Size of: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1), + "::", + stringify!(gridDim) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).param) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1), + "::", + stringify!(param) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isEnabled) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1), + "::", + stringify!(isEnabled) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaGraphKernelNodeUpdate() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaGraphKernelNodeUpdate)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaGraphKernelNodeUpdate)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).node) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate), + "::", + stringify!(node) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate), + "::", + stringify!(field) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).updateData) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate), + "::", + stringify!(updateData) + ) + ); +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGetDriverEntryPointFlags { + cudaEnableDefault = 0, + cudaEnableLegacyStream = 1, + cudaEnablePerThreadDefaultStream = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaDriverEntryPointQueryResult { + cudaDriverEntryPointSuccess = 0, + cudaDriverEntryPointSymbolNotFound = 1, + cudaDriverEntryPointVersionNotSufficent = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphDebugDotFlags { + cudaGraphDebugDotFlagsVerbose = 1, + cudaGraphDebugDotFlagsKernelNodeParams = 4, + cudaGraphDebugDotFlagsMemcpyNodeParams = 8, + cudaGraphDebugDotFlagsMemsetNodeParams = 16, + cudaGraphDebugDotFlagsHostNodeParams = 32, + cudaGraphDebugDotFlagsEventNodeParams = 64, + cudaGraphDebugDotFlagsExtSemasSignalNodeParams = 128, + cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 256, + cudaGraphDebugDotFlagsKernelNodeAttributes = 512, + cudaGraphDebugDotFlagsHandles = 1024, + cudaGraphDebugDotFlagsConditionalNodeParams = 32768, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphInstantiateFlags { + cudaGraphInstantiateFlagAutoFreeOnLaunch = 1, + cudaGraphInstantiateFlagUpload = 2, + cudaGraphInstantiateFlagDeviceLaunch = 4, + cudaGraphInstantiateFlagUseNodePriority = 8, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaLaunchMemSyncDomain { + cudaLaunchMemSyncDomainDefault = 0, + cudaLaunchMemSyncDomainRemote = 1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchMemSyncDomainMap_st { + pub default_: ::libc::c_uchar, + pub remote: ::libc::c_uchar, +} +#[test] +fn bindgen_test_layout_cudaLaunchMemSyncDomainMap_st() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2usize, + concat!("Size of: ", stringify!(cudaLaunchMemSyncDomainMap_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaLaunchMemSyncDomainMap_st)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).default_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchMemSyncDomainMap_st), + "::", + stringify!(default_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).remote) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchMemSyncDomainMap_st), + "::", + stringify!(remote) + ) + ); +} +pub type cudaLaunchMemSyncDomainMap = cudaLaunchMemSyncDomainMap_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaLaunchAttributeID { + cudaLaunchAttributeIgnore = 0, + cudaLaunchAttributeAccessPolicyWindow = 1, + cudaLaunchAttributeCooperative = 2, + cudaLaunchAttributeSynchronizationPolicy = 3, + cudaLaunchAttributeClusterDimension = 4, + cudaLaunchAttributeClusterSchedulingPolicyPreference = 5, + cudaLaunchAttributeProgrammaticStreamSerialization = 6, + cudaLaunchAttributeProgrammaticEvent = 7, + cudaLaunchAttributePriority = 8, + cudaLaunchAttributeMemSyncDomainMap = 9, + cudaLaunchAttributeMemSyncDomain = 10, + cudaLaunchAttributeLaunchCompletionEvent = 12, + cudaLaunchAttributeDeviceUpdatableKernelNode = 13, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaLaunchAttributeValue { + pub pad: [::libc::c_char; 64usize], + pub accessPolicyWindow: cudaAccessPolicyWindow, + pub cooperative: ::libc::c_int, + pub syncPolicy: cudaSynchronizationPolicy, + pub clusterDim: cudaLaunchAttributeValue__bindgen_ty_1, + pub clusterSchedulingPolicyPreference: cudaClusterSchedulingPolicy, + pub programmaticStreamSerializationAllowed: ::libc::c_int, + pub programmaticEvent: cudaLaunchAttributeValue__bindgen_ty_2, + pub priority: ::libc::c_int, + pub memSyncDomainMap: cudaLaunchMemSyncDomainMap, + pub memSyncDomain: cudaLaunchMemSyncDomain, + pub launchCompletionEvent: cudaLaunchAttributeValue__bindgen_ty_3, + pub deviceUpdatableKernelNode: cudaLaunchAttributeValue__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchAttributeValue__bindgen_ty_1 { + pub x: ::libc::c_uint, + pub y: ::libc::c_uint, + pub z: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaLaunchAttributeValue__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!( + "Size of: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_1), + "::", + stringify!(x) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_1), + "::", + stringify!(y) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_1), + "::", + stringify!(z) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchAttributeValue__bindgen_ty_2 { + pub event: cudaEvent_t, + pub flags: ::libc::c_int, + pub triggerAtBlockStart: ::libc::c_int, +} +#[test] +fn bindgen_test_layout_cudaLaunchAttributeValue__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_2), + "::", + stringify!(event) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_2), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).triggerAtBlockStart) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_2), + "::", + stringify!(triggerAtBlockStart) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchAttributeValue__bindgen_ty_3 { + pub event: cudaEvent_t, + pub flags: ::libc::c_int, +} +#[test] +fn bindgen_test_layout_cudaLaunchAttributeValue__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_3), + "::", + stringify!(event) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_3), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchAttributeValue__bindgen_ty_4 { + pub deviceUpdatable: ::libc::c_int, + pub devNode: cudaGraphDeviceNode_t, +} +#[test] +fn bindgen_test_layout_cudaLaunchAttributeValue__bindgen_ty_4() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_4) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).deviceUpdatable) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_4), + "::", + stringify!(deviceUpdatable) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).devNode) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_4), + "::", + stringify!(devNode) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaLaunchAttributeValue() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaLaunchAttributeValue)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchAttributeValue)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accessPolicyWindow) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(accessPolicyWindow) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cooperative) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(cooperative) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).syncPolicy) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(syncPolicy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).clusterDim) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(clusterDim) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).clusterSchedulingPolicyPreference) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(clusterSchedulingPolicyPreference) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).programmaticStreamSerializationAllowed) as usize + - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(programmaticStreamSerializationAllowed) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).programmaticEvent) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(programmaticEvent) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(priority) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memSyncDomainMap) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(memSyncDomainMap) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memSyncDomain) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(memSyncDomain) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).launchCompletionEvent) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(launchCompletionEvent) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).deviceUpdatableKernelNode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(deviceUpdatableKernelNode) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaLaunchAttribute_st { + pub id: cudaLaunchAttributeID, + pub pad: [::libc::c_char; 4usize], + pub val: cudaLaunchAttributeValue, +} +#[test] +fn bindgen_test_layout_cudaLaunchAttribute_st() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(cudaLaunchAttribute_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchAttribute_st)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttribute_st), + "::", + stringify!(id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttribute_st), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttribute_st), + "::", + stringify!(val) + ) + ); +} +pub type cudaLaunchAttribute = cudaLaunchAttribute_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchConfig_st { + pub gridDim: dim3, + pub blockDim: dim3, + pub dynamicSmemBytes: usize, + pub stream: cudaStream_t, + pub attrs: *mut cudaLaunchAttribute, + pub numAttrs: ::libc::c_uint, +} +#[test] +fn bindgen_test_layout_cudaLaunchConfig_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaLaunchConfig_st)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchConfig_st)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(gridDim) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(blockDim) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dynamicSmemBytes) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(dynamicSmemBytes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(stream) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).attrs) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(attrs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numAttrs) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(numAttrs) + ) + ); +} +pub type cudaLaunchConfig_t = cudaLaunchConfig_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaDeviceNumaConfig { + cudaDeviceNumaConfigNone = 0, + cudaDeviceNumaConfigNumaNode = 1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaAsyncCallbackEntry { + _unused: [u8; 0], +} +pub type cudaAsyncCallbackHandle_t = *mut cudaAsyncCallbackEntry; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaAsyncNotificationType_enum { + cudaAsyncNotificationTypeOverBudget = 1, +} +pub use self::cudaAsyncNotificationType_enum as cudaAsyncNotificationType; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaAsyncNotificationInfo { + pub type_: cudaAsyncNotificationType, + pub info: cudaAsyncNotificationInfo__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaAsyncNotificationInfo__bindgen_ty_1 { + pub overBudget: cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1 { + pub bytesOverBudget: ::libc::c_ulonglong, +} +#[test] +fn bindgen_test_layout_cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bytesOverBudget) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(bytesOverBudget) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaAsyncNotificationInfo__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaAsyncNotificationInfo__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaAsyncNotificationInfo__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).overBudget) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaAsyncNotificationInfo__bindgen_ty_1), + "::", + stringify!(overBudget) + ) + ); +} +#[test] +fn bindgen_test_layout_cudaAsyncNotificationInfo() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(cudaAsyncNotificationInfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaAsyncNotificationInfo)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaAsyncNotificationInfo), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaAsyncNotificationInfo), + "::", + stringify!(info) + ) + ); +} +pub type cudaAsyncNotificationInfo_t = cudaAsyncNotificationInfo; +pub type cudaAsyncCallback = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut cudaAsyncNotificationInfo_t, + arg2: *mut ::libc::c_void, + arg3: cudaAsyncCallbackHandle_t, + ), +>; +pub type cuFloatComplex = float2; +pub type cuDoubleComplex = double2; +pub type cuComplex = cuFloatComplex; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaRoundMode { + cudaRoundNearest = 0, + cudaRoundZero = 1, + cudaRoundPosInf = 2, + cudaRoundMinInf = 3, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaSurfaceBoundaryMode { + cudaBoundaryModeZero = 0, + cudaBoundaryModeClamp = 1, + cudaBoundaryModeTrap = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaSurfaceFormatMode { + cudaFormatModeForced = 0, + cudaFormatModeAuto = 1, +} +pub type cudaSurfaceObject_t = ::libc::c_ulonglong; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaTextureAddressMode { + cudaAddressModeWrap = 0, + cudaAddressModeClamp = 1, + cudaAddressModeMirror = 2, + cudaAddressModeBorder = 3, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaTextureFilterMode { + cudaFilterModePoint = 0, + cudaFilterModeLinear = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaTextureReadMode { + cudaReadModeElementType = 0, + cudaReadModeNormalizedFloat = 1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaTextureDesc { + pub addressMode: [cudaTextureAddressMode; 3usize], + pub filterMode: cudaTextureFilterMode, + pub readMode: cudaTextureReadMode, + pub sRGB: ::libc::c_int, + pub borderColor: [f32; 4usize], + pub normalizedCoords: ::libc::c_int, + pub maxAnisotropy: ::libc::c_uint, + pub mipmapFilterMode: cudaTextureFilterMode, + pub mipmapLevelBias: f32, + pub minMipmapLevelClamp: f32, + pub maxMipmapLevelClamp: f32, + pub disableTrilinearOptimization: ::libc::c_int, + pub seamlessCubemap: ::libc::c_int, +} +#[test] +fn bindgen_test_layout_cudaTextureDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(cudaTextureDesc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(cudaTextureDesc)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addressMode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(addressMode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).filterMode) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(filterMode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).readMode) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(readMode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sRGB) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(sRGB) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).borderColor) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(borderColor) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).normalizedCoords) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(normalizedCoords) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).maxAnisotropy) as usize - ptr as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(maxAnisotropy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mipmapFilterMode) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(mipmapFilterMode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mipmapLevelBias) as usize - ptr as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(mipmapLevelBias) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).minMipmapLevelClamp) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(minMipmapLevelClamp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).maxMipmapLevelClamp) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(maxMipmapLevelClamp) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).disableTrilinearOptimization) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(disableTrilinearOptimization) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).seamlessCubemap) as usize - ptr as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(seamlessCubemap) + ) + ); +} +pub type cudaTextureObject_t = ::libc::c_ulonglong; +extern "C" { + pub fn cudaDeviceReset() -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceSynchronize() -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceSetLimit(limit: cudaLimit, value: usize) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetTexture1DLinearMaxWidth( + maxWidthInElements: *mut usize, + fmtDesc: *const cudaChannelFormatDesc, + device: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetStreamPriorityRange( + leastPriority: *mut ::libc::c_int, + greatestPriority: *mut ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceSetCacheConfig(cacheConfig: cudaFuncCache) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetByPCIBusId( + device: *mut ::libc::c_int, + pciBusId: *const ::libc::c_char, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetPCIBusId( + pciBusId: *mut ::libc::c_char, + len: ::libc::c_int, + device: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaIpcGetEventHandle( + handle: *mut cudaIpcEventHandle_t, + event: cudaEvent_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaIpcOpenEventHandle( + event: *mut cudaEvent_t, + handle: cudaIpcEventHandle_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaIpcGetMemHandle( + handle: *mut cudaIpcMemHandle_t, + devPtr: *mut ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaIpcOpenMemHandle( + devPtr: *mut *mut ::libc::c_void, + handle: cudaIpcMemHandle_t, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaIpcCloseMemHandle(devPtr: *mut ::libc::c_void) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceFlushGPUDirectRDMAWrites( + target: cudaFlushGPUDirectRDMAWritesTarget, + scope: cudaFlushGPUDirectRDMAWritesScope, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceRegisterAsyncNotification( + device: ::libc::c_int, + callbackFunc: cudaAsyncCallback, + userData: *mut ::libc::c_void, + callback: *mut cudaAsyncCallbackHandle_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceUnregisterAsyncNotification( + device: ::libc::c_int, + callback: cudaAsyncCallbackHandle_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetSharedMemConfig(pConfig: *mut cudaSharedMemConfig) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceSetSharedMemConfig(config: cudaSharedMemConfig) -> cudaError_t; +} +extern "C" { + pub fn cudaThreadExit() -> cudaError_t; +} +extern "C" { + pub fn cudaThreadSynchronize() -> cudaError_t; +} +extern "C" { + pub fn cudaThreadSetLimit(limit: cudaLimit, value: usize) -> cudaError_t; +} +extern "C" { + pub fn cudaThreadGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t; +} +extern "C" { + pub fn cudaThreadGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t; +} +extern "C" { + pub fn cudaThreadSetCacheConfig(cacheConfig: cudaFuncCache) -> cudaError_t; +} +extern "C" { + pub fn cudaGetLastError() -> cudaError_t; +} +extern "C" { + pub fn cudaPeekAtLastError() -> cudaError_t; +} +extern "C" { + pub fn cudaGetErrorName(error: cudaError_t) -> *const ::libc::c_char; +} +extern "C" { + pub fn cudaGetErrorString(error: cudaError_t) -> *const ::libc::c_char; +} +extern "C" { + pub fn cudaGetDeviceCount(count: *mut ::libc::c_int) -> cudaError_t; +} +extern "C" { + pub fn cudaGetDeviceProperties_v2( + prop: *mut cudaDeviceProp, + device: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetAttribute( + value: *mut ::libc::c_int, + attr: cudaDeviceAttr, + device: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetDefaultMemPool( + memPool: *mut cudaMemPool_t, + device: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceSetMemPool(device: ::libc::c_int, memPool: cudaMemPool_t) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetMemPool(memPool: *mut cudaMemPool_t, device: ::libc::c_int) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetNvSciSyncAttributes( + nvSciSyncAttrList: *mut ::libc::c_void, + device: ::libc::c_int, + flags: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetP2PAttribute( + value: *mut ::libc::c_int, + attr: cudaDeviceP2PAttr, + srcDevice: ::libc::c_int, + dstDevice: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaChooseDevice(device: *mut ::libc::c_int, prop: *const cudaDeviceProp) + -> cudaError_t; +} +extern "C" { + pub fn cudaInitDevice( + device: ::libc::c_int, + deviceFlags: ::libc::c_uint, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaSetDevice(device: ::libc::c_int) -> cudaError_t; +} +extern "C" { + pub fn cudaGetDevice(device: *mut ::libc::c_int) -> cudaError_t; +} +extern "C" { + pub fn cudaSetValidDevices(device_arr: *mut ::libc::c_int, len: ::libc::c_int) -> cudaError_t; +} +extern "C" { + pub fn cudaSetDeviceFlags(flags: ::libc::c_uint) -> cudaError_t; +} +extern "C" { + pub fn cudaGetDeviceFlags(flags: *mut ::libc::c_uint) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamCreate(pStream: *mut cudaStream_t) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamCreateWithFlags( + pStream: *mut cudaStream_t, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamCreateWithPriority( + pStream: *mut cudaStream_t, + flags: ::libc::c_uint, + priority: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamGetPriority( + hStream: cudaStream_t, + priority: *mut ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamGetFlags(hStream: cudaStream_t, flags: *mut ::libc::c_uint) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamGetId( + hStream: cudaStream_t, + streamId: *mut ::libc::c_ulonglong, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaCtxResetPersistingL2Cache() -> cudaError_t; +} +extern "C" { + pub fn cudaStreamCopyAttributes(dst: cudaStream_t, src: cudaStream_t) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamGetAttribute( + hStream: cudaStream_t, + attr: cudaLaunchAttributeID, + value_out: *mut cudaLaunchAttributeValue, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamSetAttribute( + hStream: cudaStream_t, + attr: cudaLaunchAttributeID, + value: *const cudaLaunchAttributeValue, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamDestroy(stream: cudaStream_t) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamWaitEvent( + stream: cudaStream_t, + event: cudaEvent_t, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +pub type cudaStreamCallback_t = ::std::option::Option< + unsafe extern "C" fn(stream: cudaStream_t, status: cudaError_t, userData: *mut ::libc::c_void), +>; +extern "C" { + pub fn cudaStreamAddCallback( + stream: cudaStream_t, + callback: cudaStreamCallback_t, + userData: *mut ::libc::c_void, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamSynchronize(stream: cudaStream_t) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamQuery(stream: cudaStream_t) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamAttachMemAsync( + stream: cudaStream_t, + devPtr: *mut ::libc::c_void, + length: usize, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamBeginCapture(stream: cudaStream_t, mode: cudaStreamCaptureMode) + -> cudaError_t; +} +extern "C" { + pub fn cudaStreamBeginCaptureToGraph( + stream: cudaStream_t, + graph: cudaGraph_t, + dependencies: *const cudaGraphNode_t, + dependencyData: *const cudaGraphEdgeData, + numDependencies: usize, + mode: cudaStreamCaptureMode, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaThreadExchangeStreamCaptureMode(mode: *mut cudaStreamCaptureMode) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamEndCapture(stream: cudaStream_t, pGraph: *mut cudaGraph_t) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamIsCapturing( + stream: cudaStream_t, + pCaptureStatus: *mut cudaStreamCaptureStatus, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamGetCaptureInfo_v2( + stream: cudaStream_t, + captureStatus_out: *mut cudaStreamCaptureStatus, + id_out: *mut ::libc::c_ulonglong, + graph_out: *mut cudaGraph_t, + dependencies_out: *mut *const cudaGraphNode_t, + numDependencies_out: *mut usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamGetCaptureInfo_v3( + stream: cudaStream_t, + captureStatus_out: *mut cudaStreamCaptureStatus, + id_out: *mut ::libc::c_ulonglong, + graph_out: *mut cudaGraph_t, + dependencies_out: *mut *const cudaGraphNode_t, + edgeData_out: *mut *const cudaGraphEdgeData, + numDependencies_out: *mut usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamUpdateCaptureDependencies( + stream: cudaStream_t, + dependencies: *mut cudaGraphNode_t, + numDependencies: usize, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamUpdateCaptureDependencies_v2( + stream: cudaStream_t, + dependencies: *mut cudaGraphNode_t, + dependencyData: *const cudaGraphEdgeData, + numDependencies: usize, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaEventCreate(event: *mut cudaEvent_t) -> cudaError_t; +} +extern "C" { + pub fn cudaEventCreateWithFlags(event: *mut cudaEvent_t, flags: ::libc::c_uint) -> cudaError_t; +} +extern "C" { + pub fn cudaEventRecord(event: cudaEvent_t, stream: cudaStream_t) -> cudaError_t; +} +extern "C" { + pub fn cudaEventRecordWithFlags( + event: cudaEvent_t, + stream: cudaStream_t, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaEventQuery(event: cudaEvent_t) -> cudaError_t; +} +extern "C" { + pub fn cudaEventSynchronize(event: cudaEvent_t) -> cudaError_t; +} +extern "C" { + pub fn cudaEventDestroy(event: cudaEvent_t) -> cudaError_t; +} +extern "C" { + pub fn cudaEventElapsedTime(ms: *mut f32, start: cudaEvent_t, end: cudaEvent_t) -> cudaError_t; +} +extern "C" { + pub fn cudaImportExternalMemory( + extMem_out: *mut cudaExternalMemory_t, + memHandleDesc: *const cudaExternalMemoryHandleDesc, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaExternalMemoryGetMappedBuffer( + devPtr: *mut *mut ::libc::c_void, + extMem: cudaExternalMemory_t, + bufferDesc: *const cudaExternalMemoryBufferDesc, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaExternalMemoryGetMappedMipmappedArray( + mipmap: *mut cudaMipmappedArray_t, + extMem: cudaExternalMemory_t, + mipmapDesc: *const cudaExternalMemoryMipmappedArrayDesc, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDestroyExternalMemory(extMem: cudaExternalMemory_t) -> cudaError_t; +} +extern "C" { + pub fn cudaImportExternalSemaphore( + extSem_out: *mut cudaExternalSemaphore_t, + semHandleDesc: *const cudaExternalSemaphoreHandleDesc, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaSignalExternalSemaphoresAsync_v2( + extSemArray: *const cudaExternalSemaphore_t, + paramsArray: *const cudaExternalSemaphoreSignalParams, + numExtSems: ::libc::c_uint, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaWaitExternalSemaphoresAsync_v2( + extSemArray: *const cudaExternalSemaphore_t, + paramsArray: *const cudaExternalSemaphoreWaitParams, + numExtSems: ::libc::c_uint, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDestroyExternalSemaphore(extSem: cudaExternalSemaphore_t) -> cudaError_t; +} +extern "C" { + pub fn cudaLaunchKernel( + func: *const ::libc::c_void, + gridDim: dim3, + blockDim: dim3, + args: *mut *mut ::libc::c_void, + sharedMem: usize, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaLaunchKernelExC( + config: *const cudaLaunchConfig_t, + func: *const ::libc::c_void, + args: *mut *mut ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaLaunchCooperativeKernel( + func: *const ::libc::c_void, + gridDim: dim3, + blockDim: dim3, + args: *mut *mut ::libc::c_void, + sharedMem: usize, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaLaunchCooperativeKernelMultiDevice( + launchParamsList: *mut cudaLaunchParams, + numDevices: ::libc::c_uint, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaFuncSetCacheConfig( + func: *const ::libc::c_void, + cacheConfig: cudaFuncCache, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaFuncGetAttributes( + attr: *mut cudaFuncAttributes, + func: *const ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaFuncSetAttribute( + func: *const ::libc::c_void, + attr: cudaFuncAttribute, + value: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaFuncGetName( + name: *mut *const ::libc::c_char, + func: *const ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaFuncGetParamInfo( + func: *const ::libc::c_void, + paramIndex: usize, + paramOffset: *mut usize, + paramSize: *mut usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaSetDoubleForDevice(d: *mut f64) -> cudaError_t; +} +extern "C" { + pub fn cudaSetDoubleForHost(d: *mut f64) -> cudaError_t; +} +extern "C" { + pub fn cudaLaunchHostFunc( + stream: cudaStream_t, + fn_: cudaHostFn_t, + userData: *mut ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaFuncSetSharedMemConfig( + func: *const ::libc::c_void, + config: cudaSharedMemConfig, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessor( + numBlocks: *mut ::libc::c_int, + func: *const ::libc::c_void, + blockSize: ::libc::c_int, + dynamicSMemSize: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaOccupancyAvailableDynamicSMemPerBlock( + dynamicSmemSize: *mut usize, + func: *const ::libc::c_void, + numBlocks: ::libc::c_int, + blockSize: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags( + numBlocks: *mut ::libc::c_int, + func: *const ::libc::c_void, + blockSize: ::libc::c_int, + dynamicSMemSize: usize, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaOccupancyMaxPotentialClusterSize( + clusterSize: *mut ::libc::c_int, + func: *const ::libc::c_void, + launchConfig: *const cudaLaunchConfig_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaOccupancyMaxActiveClusters( + numClusters: *mut ::libc::c_int, + func: *const ::libc::c_void, + launchConfig: *const cudaLaunchConfig_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMallocManaged( + devPtr: *mut *mut ::libc::c_void, + size: usize, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMalloc(devPtr: *mut *mut ::libc::c_void, size: usize) -> cudaError_t; +} +extern "C" { + pub fn cudaMallocHost(ptr: *mut *mut ::libc::c_void, size: usize) -> cudaError_t; +} +extern "C" { + pub fn cudaMallocPitch( + devPtr: *mut *mut ::libc::c_void, + pitch: *mut usize, + width: usize, + height: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMallocArray( + array: *mut cudaArray_t, + desc: *const cudaChannelFormatDesc, + width: usize, + height: usize, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaFree(devPtr: *mut ::libc::c_void) -> cudaError_t; +} +extern "C" { + pub fn cudaFreeHost(ptr: *mut ::libc::c_void) -> cudaError_t; +} +extern "C" { + pub fn cudaFreeArray(array: cudaArray_t) -> cudaError_t; +} +extern "C" { + pub fn cudaFreeMipmappedArray(mipmappedArray: cudaMipmappedArray_t) -> cudaError_t; +} +extern "C" { + pub fn cudaHostAlloc( + pHost: *mut *mut ::libc::c_void, + size: usize, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaHostRegister( + ptr: *mut ::libc::c_void, + size: usize, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaHostUnregister(ptr: *mut ::libc::c_void) -> cudaError_t; +} +extern "C" { + pub fn cudaHostGetDevicePointer( + pDevice: *mut *mut ::libc::c_void, + pHost: *mut ::libc::c_void, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaHostGetFlags(pFlags: *mut ::libc::c_uint, pHost: *mut ::libc::c_void) + -> cudaError_t; +} +extern "C" { + pub fn cudaMalloc3D(pitchedDevPtr: *mut cudaPitchedPtr, extent: cudaExtent) -> cudaError_t; +} +extern "C" { + pub fn cudaMalloc3DArray( + array: *mut cudaArray_t, + desc: *const cudaChannelFormatDesc, + extent: cudaExtent, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMallocMipmappedArray( + mipmappedArray: *mut cudaMipmappedArray_t, + desc: *const cudaChannelFormatDesc, + extent: cudaExtent, + numLevels: ::libc::c_uint, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGetMipmappedArrayLevel( + levelArray: *mut cudaArray_t, + mipmappedArray: cudaMipmappedArray_const_t, + level: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy3D(p: *const cudaMemcpy3DParms) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy3DPeer(p: *const cudaMemcpy3DPeerParms) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy3DAsync(p: *const cudaMemcpy3DParms, stream: cudaStream_t) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy3DPeerAsync( + p: *const cudaMemcpy3DPeerParms, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemGetInfo(free: *mut usize, total: *mut usize) -> cudaError_t; +} +extern "C" { + pub fn cudaArrayGetInfo( + desc: *mut cudaChannelFormatDesc, + extent: *mut cudaExtent, + flags: *mut ::libc::c_uint, + array: cudaArray_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaArrayGetPlane( + pPlaneArray: *mut cudaArray_t, + hArray: cudaArray_t, + planeIdx: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaArrayGetMemoryRequirements( + memoryRequirements: *mut cudaArrayMemoryRequirements, + array: cudaArray_t, + device: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMipmappedArrayGetMemoryRequirements( + memoryRequirements: *mut cudaArrayMemoryRequirements, + mipmap: cudaMipmappedArray_t, + device: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaArrayGetSparseProperties( + sparseProperties: *mut cudaArraySparseProperties, + array: cudaArray_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMipmappedArrayGetSparseProperties( + sparseProperties: *mut cudaArraySparseProperties, + mipmap: cudaMipmappedArray_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy( + dst: *mut ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyPeer( + dst: *mut ::libc::c_void, + dstDevice: ::libc::c_int, + src: *const ::libc::c_void, + srcDevice: ::libc::c_int, + count: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy2D( + dst: *mut ::libc::c_void, + dpitch: usize, + src: *const ::libc::c_void, + spitch: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy2DToArray( + dst: cudaArray_t, + wOffset: usize, + hOffset: usize, + src: *const ::libc::c_void, + spitch: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy2DFromArray( + dst: *mut ::libc::c_void, + dpitch: usize, + src: cudaArray_const_t, + wOffset: usize, + hOffset: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy2DArrayToArray( + dst: cudaArray_t, + wOffsetDst: usize, + hOffsetDst: usize, + src: cudaArray_const_t, + wOffsetSrc: usize, + hOffsetSrc: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyToSymbol( + symbol: *const ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyFromSymbol( + dst: *mut ::libc::c_void, + symbol: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyAsync( + dst: *mut ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyPeerAsync( + dst: *mut ::libc::c_void, + dstDevice: ::libc::c_int, + src: *const ::libc::c_void, + srcDevice: ::libc::c_int, + count: usize, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy2DAsync( + dst: *mut ::libc::c_void, + dpitch: usize, + src: *const ::libc::c_void, + spitch: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy2DToArrayAsync( + dst: cudaArray_t, + wOffset: usize, + hOffset: usize, + src: *const ::libc::c_void, + spitch: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy2DFromArrayAsync( + dst: *mut ::libc::c_void, + dpitch: usize, + src: cudaArray_const_t, + wOffset: usize, + hOffset: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyToSymbolAsync( + symbol: *const ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyFromSymbolAsync( + dst: *mut ::libc::c_void, + symbol: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemset( + devPtr: *mut ::libc::c_void, + value: ::libc::c_int, + count: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemset2D( + devPtr: *mut ::libc::c_void, + pitch: usize, + value: ::libc::c_int, + width: usize, + height: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemset3D( + pitchedDevPtr: cudaPitchedPtr, + value: ::libc::c_int, + extent: cudaExtent, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemsetAsync( + devPtr: *mut ::libc::c_void, + value: ::libc::c_int, + count: usize, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemset2DAsync( + devPtr: *mut ::libc::c_void, + pitch: usize, + value: ::libc::c_int, + width: usize, + height: usize, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemset3DAsync( + pitchedDevPtr: cudaPitchedPtr, + value: ::libc::c_int, + extent: cudaExtent, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGetSymbolAddress( + devPtr: *mut *mut ::libc::c_void, + symbol: *const ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGetSymbolSize(size: *mut usize, symbol: *const ::libc::c_void) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPrefetchAsync( + devPtr: *const ::libc::c_void, + count: usize, + dstDevice: ::libc::c_int, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPrefetchAsync_v2( + devPtr: *const ::libc::c_void, + count: usize, + location: cudaMemLocation, + flags: ::libc::c_uint, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemAdvise( + devPtr: *const ::libc::c_void, + count: usize, + advice: cudaMemoryAdvise, + device: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemAdvise_v2( + devPtr: *const ::libc::c_void, + count: usize, + advice: cudaMemoryAdvise, + location: cudaMemLocation, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemRangeGetAttribute( + data: *mut ::libc::c_void, + dataSize: usize, + attribute: cudaMemRangeAttribute, + devPtr: *const ::libc::c_void, + count: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemRangeGetAttributes( + data: *mut *mut ::libc::c_void, + dataSizes: *mut usize, + attributes: *mut cudaMemRangeAttribute, + numAttributes: usize, + devPtr: *const ::libc::c_void, + count: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyToArray( + dst: cudaArray_t, + wOffset: usize, + hOffset: usize, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyFromArray( + dst: *mut ::libc::c_void, + src: cudaArray_const_t, + wOffset: usize, + hOffset: usize, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyArrayToArray( + dst: cudaArray_t, + wOffsetDst: usize, + hOffsetDst: usize, + src: cudaArray_const_t, + wOffsetSrc: usize, + hOffsetSrc: usize, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyToArrayAsync( + dst: cudaArray_t, + wOffset: usize, + hOffset: usize, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpyFromArrayAsync( + dst: *mut ::libc::c_void, + src: cudaArray_const_t, + wOffset: usize, + hOffset: usize, + count: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMallocAsync( + devPtr: *mut *mut ::libc::c_void, + size: usize, + hStream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaFreeAsync(devPtr: *mut ::libc::c_void, hStream: cudaStream_t) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPoolTrimTo(memPool: cudaMemPool_t, minBytesToKeep: usize) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPoolSetAttribute( + memPool: cudaMemPool_t, + attr: cudaMemPoolAttr, + value: *mut ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPoolGetAttribute( + memPool: cudaMemPool_t, + attr: cudaMemPoolAttr, + value: *mut ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPoolSetAccess( + memPool: cudaMemPool_t, + descList: *const cudaMemAccessDesc, + count: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPoolGetAccess( + flags: *mut cudaMemAccessFlags, + memPool: cudaMemPool_t, + location: *mut cudaMemLocation, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPoolCreate( + memPool: *mut cudaMemPool_t, + poolProps: *const cudaMemPoolProps, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPoolDestroy(memPool: cudaMemPool_t) -> cudaError_t; +} +extern "C" { + pub fn cudaMallocFromPoolAsync( + ptr: *mut *mut ::libc::c_void, + size: usize, + memPool: cudaMemPool_t, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPoolExportToShareableHandle( + shareableHandle: *mut ::libc::c_void, + memPool: cudaMemPool_t, + handleType: cudaMemAllocationHandleType, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPoolImportFromShareableHandle( + memPool: *mut cudaMemPool_t, + shareableHandle: *mut ::libc::c_void, + handleType: cudaMemAllocationHandleType, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPoolExportPointer( + exportData: *mut cudaMemPoolPtrExportData, + ptr: *mut ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaMemPoolImportPointer( + ptr: *mut *mut ::libc::c_void, + memPool: cudaMemPool_t, + exportData: *mut cudaMemPoolPtrExportData, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaPointerGetAttributes( + attributes: *mut cudaPointerAttributes, + ptr: *const ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceCanAccessPeer( + canAccessPeer: *mut ::libc::c_int, + device: ::libc::c_int, + peerDevice: ::libc::c_int, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceEnablePeerAccess( + peerDevice: ::libc::c_int, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceDisablePeerAccess(peerDevice: ::libc::c_int) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphicsUnregisterResource(resource: cudaGraphicsResource_t) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphicsResourceSetMapFlags( + resource: cudaGraphicsResource_t, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphicsMapResources( + count: ::libc::c_int, + resources: *mut cudaGraphicsResource_t, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphicsUnmapResources( + count: ::libc::c_int, + resources: *mut cudaGraphicsResource_t, + stream: cudaStream_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphicsResourceGetMappedPointer( + devPtr: *mut *mut ::libc::c_void, + size: *mut usize, + resource: cudaGraphicsResource_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphicsSubResourceGetMappedArray( + array: *mut cudaArray_t, + resource: cudaGraphicsResource_t, + arrayIndex: ::libc::c_uint, + mipLevel: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphicsResourceGetMappedMipmappedArray( + mipmappedArray: *mut cudaMipmappedArray_t, + resource: cudaGraphicsResource_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGetChannelDesc( + desc: *mut cudaChannelFormatDesc, + array: cudaArray_const_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaCreateChannelDesc( + x: ::libc::c_int, + y: ::libc::c_int, + z: ::libc::c_int, + w: ::libc::c_int, + f: cudaChannelFormatKind, + ) -> cudaChannelFormatDesc; +} +extern "C" { + pub fn cudaCreateTextureObject( + pTexObject: *mut cudaTextureObject_t, + pResDesc: *const cudaResourceDesc, + pTexDesc: *const cudaTextureDesc, + pResViewDesc: *const cudaResourceViewDesc, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDestroyTextureObject(texObject: cudaTextureObject_t) -> cudaError_t; +} +extern "C" { + pub fn cudaGetTextureObjectResourceDesc( + pResDesc: *mut cudaResourceDesc, + texObject: cudaTextureObject_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGetTextureObjectTextureDesc( + pTexDesc: *mut cudaTextureDesc, + texObject: cudaTextureObject_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGetTextureObjectResourceViewDesc( + pResViewDesc: *mut cudaResourceViewDesc, + texObject: cudaTextureObject_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaCreateSurfaceObject( + pSurfObject: *mut cudaSurfaceObject_t, + pResDesc: *const cudaResourceDesc, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDestroySurfaceObject(surfObject: cudaSurfaceObject_t) -> cudaError_t; +} +extern "C" { + pub fn cudaGetSurfaceObjectResourceDesc( + pResDesc: *mut cudaResourceDesc, + surfObject: cudaSurfaceObject_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDriverGetVersion(driverVersion: *mut ::libc::c_int) -> cudaError_t; +} +extern "C" { + pub fn cudaRuntimeGetVersion(runtimeVersion: *mut ::libc::c_int) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphCreate(pGraph: *mut cudaGraph_t, flags: ::libc::c_uint) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddKernelNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + pNodeParams: *const cudaKernelNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphKernelNodeGetParams( + node: cudaGraphNode_t, + pNodeParams: *mut cudaKernelNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphKernelNodeSetParams( + node: cudaGraphNode_t, + pNodeParams: *const cudaKernelNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphKernelNodeCopyAttributes( + hSrc: cudaGraphNode_t, + hDst: cudaGraphNode_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphKernelNodeGetAttribute( + hNode: cudaGraphNode_t, + attr: cudaLaunchAttributeID, + value_out: *mut cudaLaunchAttributeValue, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphKernelNodeSetAttribute( + hNode: cudaGraphNode_t, + attr: cudaLaunchAttributeID, + value: *const cudaLaunchAttributeValue, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddMemcpyNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + pCopyParams: *const cudaMemcpy3DParms, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddMemcpyNodeToSymbol( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + symbol: *const ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddMemcpyNodeFromSymbol( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + dst: *mut ::libc::c_void, + symbol: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddMemcpyNode1D( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + dst: *mut ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphMemcpyNodeGetParams( + node: cudaGraphNode_t, + pNodeParams: *mut cudaMemcpy3DParms, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphMemcpyNodeSetParams( + node: cudaGraphNode_t, + pNodeParams: *const cudaMemcpy3DParms, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphMemcpyNodeSetParamsToSymbol( + node: cudaGraphNode_t, + symbol: *const ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphMemcpyNodeSetParamsFromSymbol( + node: cudaGraphNode_t, + dst: *mut ::libc::c_void, + symbol: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphMemcpyNodeSetParams1D( + node: cudaGraphNode_t, + dst: *mut ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddMemsetNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + pMemsetParams: *const cudaMemsetParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphMemsetNodeGetParams( + node: cudaGraphNode_t, + pNodeParams: *mut cudaMemsetParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphMemsetNodeSetParams( + node: cudaGraphNode_t, + pNodeParams: *const cudaMemsetParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddHostNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + pNodeParams: *const cudaHostNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphHostNodeGetParams( + node: cudaGraphNode_t, + pNodeParams: *mut cudaHostNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphHostNodeSetParams( + node: cudaGraphNode_t, + pNodeParams: *const cudaHostNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddChildGraphNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + childGraph: cudaGraph_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphChildGraphNodeGetGraph( + node: cudaGraphNode_t, + pGraph: *mut cudaGraph_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddEmptyNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddEventRecordNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + event: cudaEvent_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphEventRecordNodeGetEvent( + node: cudaGraphNode_t, + event_out: *mut cudaEvent_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphEventRecordNodeSetEvent( + node: cudaGraphNode_t, + event: cudaEvent_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddEventWaitNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + event: cudaEvent_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphEventWaitNodeGetEvent( + node: cudaGraphNode_t, + event_out: *mut cudaEvent_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphEventWaitNodeSetEvent(node: cudaGraphNode_t, event: cudaEvent_t) + -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddExternalSemaphoresSignalNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + nodeParams: *const cudaExternalSemaphoreSignalNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExternalSemaphoresSignalNodeGetParams( + hNode: cudaGraphNode_t, + params_out: *mut cudaExternalSemaphoreSignalNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExternalSemaphoresSignalNodeSetParams( + hNode: cudaGraphNode_t, + nodeParams: *const cudaExternalSemaphoreSignalNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddExternalSemaphoresWaitNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + nodeParams: *const cudaExternalSemaphoreWaitNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExternalSemaphoresWaitNodeGetParams( + hNode: cudaGraphNode_t, + params_out: *mut cudaExternalSemaphoreWaitNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExternalSemaphoresWaitNodeSetParams( + hNode: cudaGraphNode_t, + nodeParams: *const cudaExternalSemaphoreWaitNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddMemAllocNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + nodeParams: *mut cudaMemAllocNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphMemAllocNodeGetParams( + node: cudaGraphNode_t, + params_out: *mut cudaMemAllocNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddMemFreeNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + dptr: *mut ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphMemFreeNodeGetParams( + node: cudaGraphNode_t, + dptr_out: *mut ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGraphMemTrim(device: ::libc::c_int) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceGetGraphMemAttribute( + device: ::libc::c_int, + attr: cudaGraphMemAttributeType, + value: *mut ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaDeviceSetGraphMemAttribute( + device: ::libc::c_int, + attr: cudaGraphMemAttributeType, + value: *mut ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphClone(pGraphClone: *mut cudaGraph_t, originalGraph: cudaGraph_t) + -> cudaError_t; +} +extern "C" { + pub fn cudaGraphNodeFindInClone( + pNode: *mut cudaGraphNode_t, + originalNode: cudaGraphNode_t, + clonedGraph: cudaGraph_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphNodeGetType( + node: cudaGraphNode_t, + pType: *mut cudaGraphNodeType, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphGetNodes( + graph: cudaGraph_t, + nodes: *mut cudaGraphNode_t, + numNodes: *mut usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphGetRootNodes( + graph: cudaGraph_t, + pRootNodes: *mut cudaGraphNode_t, + pNumRootNodes: *mut usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphGetEdges( + graph: cudaGraph_t, + from: *mut cudaGraphNode_t, + to: *mut cudaGraphNode_t, + numEdges: *mut usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphGetEdges_v2( + graph: cudaGraph_t, + from: *mut cudaGraphNode_t, + to: *mut cudaGraphNode_t, + edgeData: *mut cudaGraphEdgeData, + numEdges: *mut usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphNodeGetDependencies( + node: cudaGraphNode_t, + pDependencies: *mut cudaGraphNode_t, + pNumDependencies: *mut usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphNodeGetDependencies_v2( + node: cudaGraphNode_t, + pDependencies: *mut cudaGraphNode_t, + edgeData: *mut cudaGraphEdgeData, + pNumDependencies: *mut usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphNodeGetDependentNodes( + node: cudaGraphNode_t, + pDependentNodes: *mut cudaGraphNode_t, + pNumDependentNodes: *mut usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphNodeGetDependentNodes_v2( + node: cudaGraphNode_t, + pDependentNodes: *mut cudaGraphNode_t, + edgeData: *mut cudaGraphEdgeData, + pNumDependentNodes: *mut usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddDependencies( + graph: cudaGraph_t, + from: *const cudaGraphNode_t, + to: *const cudaGraphNode_t, + numDependencies: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddDependencies_v2( + graph: cudaGraph_t, + from: *const cudaGraphNode_t, + to: *const cudaGraphNode_t, + edgeData: *const cudaGraphEdgeData, + numDependencies: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphRemoveDependencies( + graph: cudaGraph_t, + from: *const cudaGraphNode_t, + to: *const cudaGraphNode_t, + numDependencies: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphRemoveDependencies_v2( + graph: cudaGraph_t, + from: *const cudaGraphNode_t, + to: *const cudaGraphNode_t, + edgeData: *const cudaGraphEdgeData, + numDependencies: usize, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphDestroyNode(node: cudaGraphNode_t) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphInstantiate( + pGraphExec: *mut cudaGraphExec_t, + graph: cudaGraph_t, + flags: ::libc::c_ulonglong, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphInstantiateWithFlags( + pGraphExec: *mut cudaGraphExec_t, + graph: cudaGraph_t, + flags: ::libc::c_ulonglong, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphInstantiateWithParams( + pGraphExec: *mut cudaGraphExec_t, + graph: cudaGraph_t, + instantiateParams: *mut cudaGraphInstantiateParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecGetFlags( + graphExec: cudaGraphExec_t, + flags: *mut ::libc::c_ulonglong, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecKernelNodeSetParams( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + pNodeParams: *const cudaKernelNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecMemcpyNodeSetParams( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + pNodeParams: *const cudaMemcpy3DParms, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecMemcpyNodeSetParamsToSymbol( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + symbol: *const ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecMemcpyNodeSetParamsFromSymbol( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + dst: *mut ::libc::c_void, + symbol: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecMemcpyNodeSetParams1D( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + dst: *mut ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecMemsetNodeSetParams( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + pNodeParams: *const cudaMemsetParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecHostNodeSetParams( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + pNodeParams: *const cudaHostNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecChildGraphNodeSetParams( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + childGraph: cudaGraph_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecEventRecordNodeSetEvent( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + event: cudaEvent_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecEventWaitNodeSetEvent( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + event: cudaEvent_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecExternalSemaphoresSignalNodeSetParams( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + nodeParams: *const cudaExternalSemaphoreSignalNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecExternalSemaphoresWaitNodeSetParams( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + nodeParams: *const cudaExternalSemaphoreWaitNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphNodeSetEnabled( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + isEnabled: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphNodeGetEnabled( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + isEnabled: *mut ::libc::c_uint, + ) -> cudaError_t; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaLaunchParams { - pub func: *mut ::libc::c_void, - pub gridDim: dim3, - pub blockDim: dim3, - pub args: *mut *mut ::libc::c_void, - pub sharedMem: usize, - pub stream: cudaStream_t, +extern "C" { + pub fn cudaGraphExecUpdate( + hGraphExec: cudaGraphExec_t, + hGraph: cudaGraph_t, + resultInfo: *mut cudaGraphExecUpdateResultInfo, + ) -> cudaError_t; } -#[test] -fn bindgen_test_layout_cudaLaunchParams() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(cudaLaunchParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaLaunchParams)) - ); - fn test_field_func() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(func) - ) - ); - } - test_field_func(); - fn test_field_gridDim() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(gridDim) - ) - ); - } - test_field_gridDim(); - fn test_field_blockDim() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(blockDim) - ) - ); - } - test_field_blockDim(); - fn test_field_args() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(args) - ) - ); - } - test_field_args(); - fn test_field_sharedMem() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedMem) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(sharedMem) - ) - ); - } - test_field_sharedMem(); - fn test_field_stream() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(stream) - ) - ); - } - test_field_stream(); +extern "C" { + pub fn cudaGraphUpload(graphExec: cudaGraphExec_t, stream: cudaStream_t) -> cudaError_t; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaKernelNodeParams { - pub func: *mut ::libc::c_void, - pub gridDim: dim3, - pub blockDim: dim3, - pub sharedMemBytes: ::libc::c_uint, - pub kernelParams: *mut *mut ::libc::c_void, - pub extra: *mut *mut ::libc::c_void, +extern "C" { + pub fn cudaGraphLaunch(graphExec: cudaGraphExec_t, stream: cudaStream_t) -> cudaError_t; } -#[test] -fn bindgen_test_layout_cudaKernelNodeParams() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(cudaKernelNodeParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaKernelNodeParams)) - ); - fn test_field_func() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(func) - ) - ); - } - test_field_func(); - fn test_field_gridDim() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(gridDim) - ) - ); - } - test_field_gridDim(); - fn test_field_blockDim() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(blockDim) - ) - ); - } - test_field_blockDim(); - fn test_field_sharedMemBytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedMemBytes) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(sharedMemBytes) - ) - ); - } - test_field_sharedMemBytes(); - fn test_field_kernelParams() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).kernelParams) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(kernelParams) - ) - ); - } - test_field_kernelParams(); - fn test_field_extra() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(extra) - ) - ); - } - test_field_extra(); +extern "C" { + pub fn cudaGraphExecDestroy(graphExec: cudaGraphExec_t) -> cudaError_t; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreSignalNodeParams { - pub extSemArray: *mut cudaExternalSemaphore_t, - pub paramsArray: *const cudaExternalSemaphoreSignalParams, - pub numExtSems: ::libc::c_uint, +extern "C" { + pub fn cudaGraphDestroy(graph: cudaGraph_t) -> cudaError_t; } -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalNodeParams() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalNodeParams) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalNodeParams) - ) - ); - fn test_field_extSemArray() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(extSemArray) - ) - ); - } - test_field_extSemArray(); - fn test_field_paramsArray() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(paramsArray) - ) - ); - } - test_field_paramsArray(); - fn test_field_numExtSems() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(numExtSems) - ) - ); - } - test_field_numExtSems(); +extern "C" { + pub fn cudaGraphDebugDotPrint( + graph: cudaGraph_t, + path: *const ::libc::c_char, + flags: ::libc::c_uint, + ) -> cudaError_t; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreWaitNodeParams { - pub extSemArray: *mut cudaExternalSemaphore_t, - pub paramsArray: *const cudaExternalSemaphoreWaitParams, - pub numExtSems: ::libc::c_uint, +extern "C" { + pub fn cudaUserObjectCreate( + object_out: *mut cudaUserObject_t, + ptr: *mut ::libc::c_void, + destroy: cudaHostFn_t, + initialRefcount: ::libc::c_uint, + flags: ::libc::c_uint, + ) -> cudaError_t; } -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitNodeParams() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitNodeParams)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitNodeParams) - ) - ); - fn test_field_extSemArray() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(extSemArray) - ) - ); - } - test_field_extSemArray(); - fn test_field_paramsArray() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(paramsArray) - ) - ); - } - test_field_paramsArray(); - fn test_field_numExtSems() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(numExtSems) - ) - ); - } - test_field_numExtSems(); +extern "C" { + pub fn cudaUserObjectRetain(object: cudaUserObject_t, count: ::libc::c_uint) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaGraphNodeType { - cudaGraphNodeTypeKernel = 0, - cudaGraphNodeTypeMemcpy = 1, - cudaGraphNodeTypeMemset = 2, - cudaGraphNodeTypeHost = 3, - cudaGraphNodeTypeGraph = 4, - cudaGraphNodeTypeEmpty = 5, - cudaGraphNodeTypeWaitEvent = 6, - cudaGraphNodeTypeEventRecord = 7, - cudaGraphNodeTypeExtSemaphoreSignal = 8, - cudaGraphNodeTypeExtSemaphoreWait = 9, - cudaGraphNodeTypeMemAlloc = 10, - cudaGraphNodeTypeMemFree = 11, - cudaGraphNodeTypeCount = 12, +extern "C" { + pub fn cudaUserObjectRelease(object: cudaUserObject_t, count: ::libc::c_uint) -> cudaError_t; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUgraphExec_st { - _unused: [u8; 0], +extern "C" { + pub fn cudaGraphRetainUserObject( + graph: cudaGraph_t, + object: cudaUserObject_t, + count: ::libc::c_uint, + flags: ::libc::c_uint, + ) -> cudaError_t; } -pub type cudaGraphExec_t = *mut CUgraphExec_st; -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaGraphExecUpdateResult { - cudaGraphExecUpdateSuccess = 0, - cudaGraphExecUpdateError = 1, - cudaGraphExecUpdateErrorTopologyChanged = 2, - cudaGraphExecUpdateErrorNodeTypeChanged = 3, - cudaGraphExecUpdateErrorFunctionChanged = 4, - cudaGraphExecUpdateErrorParametersChanged = 5, - cudaGraphExecUpdateErrorNotSupported = 6, - cudaGraphExecUpdateErrorUnsupportedFunctionChange = 7, - cudaGraphExecUpdateErrorAttributesChanged = 8, +extern "C" { + pub fn cudaGraphReleaseUserObject( + graph: cudaGraph_t, + object: cudaUserObject_t, + count: ::libc::c_uint, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaGetDriverEntryPointFlags { - cudaEnableDefault = 0, - cudaEnableLegacyStream = 1, - cudaEnablePerThreadDefaultStream = 2, +extern "C" { + pub fn cudaGraphAddNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + nodeParams: *mut cudaGraphNodeParams, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaGraphDebugDotFlags { - cudaGraphDebugDotFlagsVerbose = 1, - cudaGraphDebugDotFlagsKernelNodeParams = 4, - cudaGraphDebugDotFlagsMemcpyNodeParams = 8, - cudaGraphDebugDotFlagsMemsetNodeParams = 16, - cudaGraphDebugDotFlagsHostNodeParams = 32, - cudaGraphDebugDotFlagsEventNodeParams = 64, - cudaGraphDebugDotFlagsExtSemasSignalNodeParams = 128, - cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 256, - cudaGraphDebugDotFlagsKernelNodeAttributes = 512, - cudaGraphDebugDotFlagsHandles = 1024, +extern "C" { + pub fn cudaGraphAddNode_v2( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + dependencyData: *const cudaGraphEdgeData, + numDependencies: usize, + nodeParams: *mut cudaGraphNodeParams, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaGraphInstantiateFlags { - cudaGraphInstantiateFlagAutoFreeOnLaunch = 1, - cudaGraphInstantiateFlagUseNodePriority = 8, +extern "C" { + pub fn cudaGraphNodeSetParams( + node: cudaGraphNode_t, + nodeParams: *mut cudaGraphNodeParams, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaStreamAttrID { - cudaStreamAttributeAccessPolicyWindow = 1, - cudaStreamAttributeSynchronizationPolicy = 3, +extern "C" { + pub fn cudaGraphExecNodeSetParams( + graphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + nodeParams: *mut cudaGraphNodeParams, + ) -> cudaError_t; } -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaStreamAttrValue { - pub accessPolicyWindow: cudaAccessPolicyWindow, - pub syncPolicy: cudaSynchronizationPolicy, +extern "C" { + pub fn cudaGraphConditionalHandleCreate( + pHandle_out: *mut cudaGraphConditionalHandle, + graph: cudaGraph_t, + defaultLaunchValue: ::libc::c_uint, + flags: ::libc::c_uint, + ) -> cudaError_t; } -#[test] -fn bindgen_test_layout_cudaStreamAttrValue() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaStreamAttrValue)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaStreamAttrValue)) - ); - fn test_field_accessPolicyWindow() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accessPolicyWindow) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaStreamAttrValue), - "::", - stringify!(accessPolicyWindow) - ) - ); - } - test_field_accessPolicyWindow(); - fn test_field_syncPolicy() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).syncPolicy) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaStreamAttrValue), - "::", - stringify!(syncPolicy) - ) - ); - } - test_field_syncPolicy(); +extern "C" { + pub fn cudaGetDriverEntryPoint( + symbol: *const ::libc::c_char, + funcPtr: *mut *mut ::libc::c_void, + flags: ::libc::c_ulonglong, + driverStatus: *mut cudaDriverEntryPointQueryResult, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaKernelNodeAttrID { - cudaKernelNodeAttributeAccessPolicyWindow = 1, - cudaKernelNodeAttributeCooperative = 2, - cudaKernelNodeAttributePriority = 8, +extern "C" { + pub fn cudaGetExportTable( + ppExportTable: *mut *const ::libc::c_void, + pExportTableId: *const cudaUUID_t, + ) -> cudaError_t; } -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaKernelNodeAttrValue { - pub accessPolicyWindow: cudaAccessPolicyWindow, - pub cooperative: ::libc::c_int, - pub priority: ::libc::c_int, +extern "C" { + pub fn cudaGetFuncBySymbol( + functionPtr: *mut cudaFunction_t, + symbolPtr: *const ::libc::c_void, + ) -> cudaError_t; } -#[test] -fn bindgen_test_layout_cudaKernelNodeAttrValue() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaKernelNodeAttrValue)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaKernelNodeAttrValue)) - ); - fn test_field_accessPolicyWindow() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accessPolicyWindow) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeAttrValue), - "::", - stringify!(accessPolicyWindow) - ) - ); - } - test_field_accessPolicyWindow(); - fn test_field_cooperative() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cooperative) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeAttrValue), - "::", - stringify!(cooperative) - ) - ); - } - test_field_cooperative(); - fn test_field_priority() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeAttrValue), - "::", - stringify!(priority) - ) - ); - } - test_field_priority(); +extern "C" { + pub fn cudaGetKernel( + kernelPtr: *mut cudaKernel_t, + entryFuncAddr: *const ::libc::c_void, + ) -> cudaError_t; } -pub type cuFloatComplex = float2; -pub type cuDoubleComplex = double2; -pub type cuComplex = cuFloatComplex; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -7459,6 +9946,8 @@ pub enum cudaDataType_t { CUDA_C_64I = 25, CUDA_R_64U = 26, CUDA_C_64U = 27, + CUDA_R_8F_E4M3 = 28, + CUDA_R_8F_E5M2 = 29, } pub use self::cudaDataType_t as cudaDataType; pub const libraryPropertyType_t_MAJOR_VERSION: libraryPropertyType_t = 0; @@ -7616,6 +10105,8 @@ pub struct cublasContext { _unused: [u8; 0], } pub type cublasHandle_t = *mut cublasContext; +pub type cublasLogCallback = + ::std::option::Option; extern "C" { pub fn cublasCreate_v2(handle: *mut cublasHandle_t) -> cublasStatus_t; } @@ -7701,8 +10192,6 @@ extern "C" { extern "C" { pub fn cublasGetStatusString(status: cublasStatus_t) -> *const ::libc::c_char; } -pub type cublasLogCallback = - ::std::option::Option; extern "C" { pub fn cublasLoggerConfigure( logIsOn: ::libc::c_int, @@ -7727,6 +10216,16 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSetVector_64( + n: i64, + elemSize: i64, + x: *const ::libc::c_void, + incx: i64, + devicePtr: *mut ::libc::c_void, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasGetVector( n: ::libc::c_int, @@ -7737,6 +10236,16 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasGetVector_64( + n: i64, + elemSize: i64, + x: *const ::libc::c_void, + incx: i64, + y: *mut ::libc::c_void, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSetMatrix( rows: ::libc::c_int, @@ -7748,6 +10257,17 @@ extern "C" { ldb: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSetMatrix_64( + rows: i64, + cols: i64, + elemSize: i64, + A: *const ::libc::c_void, + lda: i64, + B: *mut ::libc::c_void, + ldb: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasGetMatrix( rows: ::libc::c_int, @@ -7759,6 +10279,17 @@ extern "C" { ldb: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasGetMatrix_64( + rows: i64, + cols: i64, + elemSize: i64, + A: *const ::libc::c_void, + lda: i64, + B: *mut ::libc::c_void, + ldb: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSetVectorAsync( n: ::libc::c_int, @@ -7770,6 +10301,17 @@ extern "C" { stream: cudaStream_t, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSetVectorAsync_64( + n: i64, + elemSize: i64, + hostPtr: *const ::libc::c_void, + incx: i64, + devicePtr: *mut ::libc::c_void, + incy: i64, + stream: cudaStream_t, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasGetVectorAsync( n: ::libc::c_int, @@ -7781,6 +10323,17 @@ extern "C" { stream: cudaStream_t, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasGetVectorAsync_64( + n: i64, + elemSize: i64, + devicePtr: *const ::libc::c_void, + incx: i64, + hostPtr: *mut ::libc::c_void, + incy: i64, + stream: cudaStream_t, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSetMatrixAsync( rows: ::libc::c_int, @@ -7793,6 +10346,18 @@ extern "C" { stream: cudaStream_t, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSetMatrixAsync_64( + rows: i64, + cols: i64, + elemSize: i64, + A: *const ::libc::c_void, + lda: i64, + B: *mut ::libc::c_void, + ldb: i64, + stream: cudaStream_t, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasGetMatrixAsync( rows: ::libc::c_int, @@ -7806,15 +10371,39 @@ extern "C" { ) -> cublasStatus_t; } extern "C" { - pub fn cublasXerbla(srName: *const ::libc::c_char, info: ::libc::c_int); -} -extern "C" { - pub fn cublasNrm2Ex( + pub fn cublasGetMatrixAsync_64( + rows: i64, + cols: i64, + elemSize: i64, + A: *const ::libc::c_void, + lda: i64, + B: *mut ::libc::c_void, + ldb: i64, + stream: cudaStream_t, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasXerbla(srName: *const ::libc::c_char, info: ::libc::c_int); +} +extern "C" { + pub fn cublasNrm2Ex( + handle: cublasHandle_t, + n: ::libc::c_int, + x: *const ::libc::c_void, + xType: cudaDataType, + incx: ::libc::c_int, + result: *mut ::libc::c_void, + resultType: cudaDataType, + executionType: cudaDataType, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasNrm2Ex_64( handle: cublasHandle_t, - n: ::libc::c_int, + n: i64, x: *const ::libc::c_void, xType: cudaDataType, - incx: ::libc::c_int, + incx: i64, result: *mut ::libc::c_void, resultType: cudaDataType, executionType: cudaDataType, @@ -7829,6 +10418,15 @@ extern "C" { result: *mut f32, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSnrm2_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const f32, + incx: i64, + result: *mut f32, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDnrm2_v2( handle: cublasHandle_t, @@ -7838,6 +10436,15 @@ extern "C" { result: *mut f64, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDnrm2_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const f64, + incx: i64, + result: *mut f64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasScnrm2_v2( handle: cublasHandle_t, @@ -7847,6 +10454,15 @@ extern "C" { result: *mut f32, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasScnrm2_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuComplex, + incx: i64, + result: *mut f32, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDznrm2_v2( handle: cublasHandle_t, @@ -7856,6 +10472,15 @@ extern "C" { result: *mut f64, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDznrm2_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuDoubleComplex, + incx: i64, + result: *mut f64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDotEx( handle: cublasHandle_t, @@ -7871,6 +10496,21 @@ extern "C" { executionType: cudaDataType, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDotEx_64( + handle: cublasHandle_t, + n: i64, + x: *const ::libc::c_void, + xType: cudaDataType, + incx: i64, + y: *const ::libc::c_void, + yType: cudaDataType, + incy: i64, + result: *mut ::libc::c_void, + resultType: cudaDataType, + executionType: cudaDataType, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDotcEx( handle: cublasHandle_t, @@ -7886,6 +10526,21 @@ extern "C" { executionType: cudaDataType, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDotcEx_64( + handle: cublasHandle_t, + n: i64, + x: *const ::libc::c_void, + xType: cudaDataType, + incx: i64, + y: *const ::libc::c_void, + yType: cudaDataType, + incy: i64, + result: *mut ::libc::c_void, + resultType: cudaDataType, + executionType: cudaDataType, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSdot_v2( handle: cublasHandle_t, @@ -7897,6 +10552,17 @@ extern "C" { result: *mut f32, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSdot_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const f32, + incx: i64, + y: *const f32, + incy: i64, + result: *mut f32, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDdot_v2( handle: cublasHandle_t, @@ -7908,6 +10574,17 @@ extern "C" { result: *mut f64, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDdot_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const f64, + incx: i64, + y: *const f64, + incy: i64, + result: *mut f64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCdotu_v2( handle: cublasHandle_t, @@ -7919,6 +10596,17 @@ extern "C" { result: *mut cuComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCdotu_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuComplex, + incx: i64, + y: *const cuComplex, + incy: i64, + result: *mut cuComplex, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCdotc_v2( handle: cublasHandle_t, @@ -7930,6 +10618,17 @@ extern "C" { result: *mut cuComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCdotc_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuComplex, + incx: i64, + y: *const cuComplex, + incy: i64, + result: *mut cuComplex, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZdotu_v2( handle: cublasHandle_t, @@ -7941,6 +10640,17 @@ extern "C" { result: *mut cuDoubleComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZdotu_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuDoubleComplex, + incx: i64, + y: *const cuDoubleComplex, + incy: i64, + result: *mut cuDoubleComplex, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZdotc_v2( handle: cublasHandle_t, @@ -7952,6 +10662,17 @@ extern "C" { result: *mut cuDoubleComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZdotc_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuDoubleComplex, + incx: i64, + y: *const cuDoubleComplex, + incy: i64, + result: *mut cuDoubleComplex, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasScalEx( handle: cublasHandle_t, @@ -7964,6 +10685,18 @@ extern "C" { executionType: cudaDataType, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasScalEx_64( + handle: cublasHandle_t, + n: i64, + alpha: *const ::libc::c_void, + alphaType: cudaDataType, + x: *mut ::libc::c_void, + xType: cudaDataType, + incx: i64, + executionType: cudaDataType, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSscal_v2( handle: cublasHandle_t, @@ -7973,6 +10706,15 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSscal_v2_64( + handle: cublasHandle_t, + n: i64, + alpha: *const f32, + x: *mut f32, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDscal_v2( handle: cublasHandle_t, @@ -7982,6 +10724,15 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDscal_v2_64( + handle: cublasHandle_t, + n: i64, + alpha: *const f64, + x: *mut f64, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCscal_v2( handle: cublasHandle_t, @@ -7991,6 +10742,15 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCscal_v2_64( + handle: cublasHandle_t, + n: i64, + alpha: *const cuComplex, + x: *mut cuComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCsscal_v2( handle: cublasHandle_t, @@ -8000,6 +10760,15 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCsscal_v2_64( + handle: cublasHandle_t, + n: i64, + alpha: *const f32, + x: *mut cuComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZscal_v2( handle: cublasHandle_t, @@ -8009,6 +10778,15 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZscal_v2_64( + handle: cublasHandle_t, + n: i64, + alpha: *const cuDoubleComplex, + x: *mut cuDoubleComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZdscal_v2( handle: cublasHandle_t, @@ -8018,6 +10796,15 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZdscal_v2_64( + handle: cublasHandle_t, + n: i64, + alpha: *const f64, + x: *mut cuDoubleComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasAxpyEx( handle: cublasHandle_t, @@ -8033,6 +10820,21 @@ extern "C" { executiontype: cudaDataType, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasAxpyEx_64( + handle: cublasHandle_t, + n: i64, + alpha: *const ::libc::c_void, + alphaType: cudaDataType, + x: *const ::libc::c_void, + xType: cudaDataType, + incx: i64, + y: *mut ::libc::c_void, + yType: cudaDataType, + incy: i64, + executiontype: cudaDataType, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSaxpy_v2( handle: cublasHandle_t, @@ -8044,6 +10846,17 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSaxpy_v2_64( + handle: cublasHandle_t, + n: i64, + alpha: *const f32, + x: *const f32, + incx: i64, + y: *mut f32, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDaxpy_v2( handle: cublasHandle_t, @@ -8055,6 +10868,17 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDaxpy_v2_64( + handle: cublasHandle_t, + n: i64, + alpha: *const f64, + x: *const f64, + incx: i64, + y: *mut f64, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCaxpy_v2( handle: cublasHandle_t, @@ -8066,6 +10890,17 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCaxpy_v2_64( + handle: cublasHandle_t, + n: i64, + alpha: *const cuComplex, + x: *const cuComplex, + incx: i64, + y: *mut cuComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZaxpy_v2( handle: cublasHandle_t, @@ -8077,6 +10912,17 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZaxpy_v2_64( + handle: cublasHandle_t, + n: i64, + alpha: *const cuDoubleComplex, + x: *const cuDoubleComplex, + incx: i64, + y: *mut cuDoubleComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCopyEx( handle: cublasHandle_t, @@ -8089,6 +10935,18 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCopyEx_64( + handle: cublasHandle_t, + n: i64, + x: *const ::libc::c_void, + xType: cudaDataType, + incx: i64, + y: *mut ::libc::c_void, + yType: cudaDataType, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasScopy_v2( handle: cublasHandle_t, @@ -8099,6 +10957,16 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasScopy_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const f32, + incx: i64, + y: *mut f32, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDcopy_v2( handle: cublasHandle_t, @@ -8109,6 +10977,16 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDcopy_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const f64, + incx: i64, + y: *mut f64, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCcopy_v2( handle: cublasHandle_t, @@ -8119,6 +10997,16 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCcopy_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuComplex, + incx: i64, + y: *mut cuComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZcopy_v2( handle: cublasHandle_t, @@ -8129,6 +11017,16 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZcopy_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuDoubleComplex, + incx: i64, + y: *mut cuDoubleComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSswap_v2( handle: cublasHandle_t, @@ -8139,6 +11037,16 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSswap_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut f32, + incx: i64, + y: *mut f32, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDswap_v2( handle: cublasHandle_t, @@ -8149,6 +11057,16 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDswap_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut f64, + incx: i64, + y: *mut f64, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCswap_v2( handle: cublasHandle_t, @@ -8159,6 +11077,16 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCswap_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut cuComplex, + incx: i64, + y: *mut cuComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZswap_v2( handle: cublasHandle_t, @@ -8169,6 +11097,16 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZswap_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut cuDoubleComplex, + incx: i64, + y: *mut cuDoubleComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSwapEx( handle: cublasHandle_t, @@ -8182,21 +11120,51 @@ extern "C" { ) -> cublasStatus_t; } extern "C" { - pub fn cublasIsamax_v2( + pub fn cublasSwapEx_64( + handle: cublasHandle_t, + n: i64, + x: *mut ::libc::c_void, + xType: cudaDataType, + incx: i64, + y: *mut ::libc::c_void, + yType: cudaDataType, + incy: i64, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasIsamax_v2( + handle: cublasHandle_t, + n: ::libc::c_int, + x: *const f32, + incx: ::libc::c_int, + result: *mut ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasIsamax_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const f32, + incx: i64, + result: *mut i64, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasIdamax_v2( handle: cublasHandle_t, n: ::libc::c_int, - x: *const f32, + x: *const f64, incx: ::libc::c_int, result: *mut ::libc::c_int, ) -> cublasStatus_t; } extern "C" { - pub fn cublasIdamax_v2( + pub fn cublasIdamax_v2_64( handle: cublasHandle_t, - n: ::libc::c_int, + n: i64, x: *const f64, - incx: ::libc::c_int, - result: *mut ::libc::c_int, + incx: i64, + result: *mut i64, ) -> cublasStatus_t; } extern "C" { @@ -8208,6 +11176,15 @@ extern "C" { result: *mut ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasIcamax_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuComplex, + incx: i64, + result: *mut i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasIzamax_v2( handle: cublasHandle_t, @@ -8217,6 +11194,15 @@ extern "C" { result: *mut ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasIzamax_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuDoubleComplex, + incx: i64, + result: *mut i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasIamaxEx( handle: cublasHandle_t, @@ -8227,6 +11213,16 @@ extern "C" { result: *mut ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasIamaxEx_64( + handle: cublasHandle_t, + n: i64, + x: *const ::libc::c_void, + xType: cudaDataType, + incx: i64, + result: *mut i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasIsamin_v2( handle: cublasHandle_t, @@ -8236,6 +11232,15 @@ extern "C" { result: *mut ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasIsamin_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const f32, + incx: i64, + result: *mut i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasIdamin_v2( handle: cublasHandle_t, @@ -8245,6 +11250,15 @@ extern "C" { result: *mut ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasIdamin_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const f64, + incx: i64, + result: *mut i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasIcamin_v2( handle: cublasHandle_t, @@ -8254,6 +11268,15 @@ extern "C" { result: *mut ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasIcamin_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuComplex, + incx: i64, + result: *mut i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasIzamin_v2( handle: cublasHandle_t, @@ -8263,6 +11286,15 @@ extern "C" { result: *mut ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasIzamin_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuDoubleComplex, + incx: i64, + result: *mut i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasIaminEx( handle: cublasHandle_t, @@ -8273,6 +11305,16 @@ extern "C" { result: *mut ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasIaminEx_64( + handle: cublasHandle_t, + n: i64, + x: *const ::libc::c_void, + xType: cudaDataType, + incx: i64, + result: *mut i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasAsumEx( handle: cublasHandle_t, @@ -8285,6 +11327,18 @@ extern "C" { executiontype: cudaDataType, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasAsumEx_64( + handle: cublasHandle_t, + n: i64, + x: *const ::libc::c_void, + xType: cudaDataType, + incx: i64, + result: *mut ::libc::c_void, + resultType: cudaDataType, + executiontype: cudaDataType, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSasum_v2( handle: cublasHandle_t, @@ -8294,6 +11348,15 @@ extern "C" { result: *mut f32, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSasum_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const f32, + incx: i64, + result: *mut f32, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDasum_v2( handle: cublasHandle_t, @@ -8303,6 +11366,15 @@ extern "C" { result: *mut f64, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDasum_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const f64, + incx: i64, + result: *mut f64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasScasum_v2( handle: cublasHandle_t, @@ -8312,6 +11384,15 @@ extern "C" { result: *mut f32, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasScasum_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuComplex, + incx: i64, + result: *mut f32, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDzasum_v2( handle: cublasHandle_t, @@ -8321,6 +11402,15 @@ extern "C" { result: *mut f64, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDzasum_v2_64( + handle: cublasHandle_t, + n: i64, + x: *const cuDoubleComplex, + incx: i64, + result: *mut f64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSrot_v2( handle: cublasHandle_t, @@ -8333,6 +11423,18 @@ extern "C" { s: *const f32, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSrot_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut f32, + incx: i64, + y: *mut f32, + incy: i64, + c: *const f32, + s: *const f32, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDrot_v2( handle: cublasHandle_t, @@ -8345,6 +11447,18 @@ extern "C" { s: *const f64, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDrot_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut f64, + incx: i64, + y: *mut f64, + incy: i64, + c: *const f64, + s: *const f64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCrot_v2( handle: cublasHandle_t, @@ -8357,6 +11471,18 @@ extern "C" { s: *const cuComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCrot_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut cuComplex, + incx: i64, + y: *mut cuComplex, + incy: i64, + c: *const f32, + s: *const cuComplex, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCsrot_v2( handle: cublasHandle_t, @@ -8369,6 +11495,18 @@ extern "C" { s: *const f32, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCsrot_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut cuComplex, + incx: i64, + y: *mut cuComplex, + incy: i64, + c: *const f32, + s: *const f32, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZrot_v2( handle: cublasHandle_t, @@ -8381,6 +11519,18 @@ extern "C" { s: *const cuDoubleComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZrot_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut cuDoubleComplex, + incx: i64, + y: *mut cuDoubleComplex, + incy: i64, + c: *const f64, + s: *const cuDoubleComplex, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZdrot_v2( handle: cublasHandle_t, @@ -8393,6 +11543,18 @@ extern "C" { s: *const f64, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZdrot_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut cuDoubleComplex, + incx: i64, + y: *mut cuDoubleComplex, + incy: i64, + c: *const f64, + s: *const f64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasRotEx( handle: cublasHandle_t, @@ -8409,6 +11571,22 @@ extern "C" { executiontype: cudaDataType, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasRotEx_64( + handle: cublasHandle_t, + n: i64, + x: *mut ::libc::c_void, + xType: cudaDataType, + incx: i64, + y: *mut ::libc::c_void, + yType: cudaDataType, + incy: i64, + c: *const ::libc::c_void, + s: *const ::libc::c_void, + csType: cudaDataType, + executiontype: cudaDataType, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSrotg_v2( handle: cublasHandle_t, @@ -8468,6 +11646,17 @@ extern "C" { param: *const f32, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSrotm_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut f32, + incx: i64, + y: *mut f32, + incy: i64, + param: *const f32, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDrotm_v2( handle: cublasHandle_t, @@ -8479,6 +11668,17 @@ extern "C" { param: *const f64, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDrotm_v2_64( + handle: cublasHandle_t, + n: i64, + x: *mut f64, + incx: i64, + y: *mut f64, + incy: i64, + param: *const f64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasRotmEx( handle: cublasHandle_t, @@ -8494,6 +11694,21 @@ extern "C" { executiontype: cudaDataType, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasRotmEx_64( + handle: cublasHandle_t, + n: i64, + x: *mut ::libc::c_void, + xType: cudaDataType, + incx: i64, + y: *mut ::libc::c_void, + yType: cudaDataType, + incy: i64, + param: *const ::libc::c_void, + paramType: cudaDataType, + executiontype: cudaDataType, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSrotmg_v2( handle: cublasHandle_t, @@ -8546,6 +11761,22 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSgemv_v2_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + x: *const f32, + incx: i64, + beta: *const f32, + y: *mut f32, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDgemv_v2( handle: cublasHandle_t, @@ -8562,6 +11793,22 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDgemv_v2_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + x: *const f64, + incx: i64, + beta: *const f64, + y: *mut f64, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgemv_v2( handle: cublasHandle_t, @@ -8578,6 +11825,22 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCgemv_v2_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + x: *const cuComplex, + incx: i64, + beta: *const cuComplex, + y: *mut cuComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZgemv_v2( handle: cublasHandle_t, @@ -8594,6 +11857,22 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZgemv_v2_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + x: *const cuDoubleComplex, + incx: i64, + beta: *const cuDoubleComplex, + y: *mut cuDoubleComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSgbmv_v2( handle: cublasHandle_t, @@ -8612,6 +11891,24 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSgbmv_v2_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + kl: i64, + ku: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + x: *const f32, + incx: i64, + beta: *const f32, + y: *mut f32, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDgbmv_v2( handle: cublasHandle_t, @@ -8630,6 +11927,24 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDgbmv_v2_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + kl: i64, + ku: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + x: *const f64, + incx: i64, + beta: *const f64, + y: *mut f64, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgbmv_v2( handle: cublasHandle_t, @@ -8649,21 +11964,57 @@ extern "C" { ) -> cublasStatus_t; } extern "C" { - pub fn cublasZgbmv_v2( + pub fn cublasCgbmv_v2_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + kl: i64, + ku: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + x: *const cuComplex, + incx: i64, + beta: *const cuComplex, + y: *mut cuComplex, + incy: i64, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasZgbmv_v2( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + kl: ::libc::c_int, + ku: ::libc::c_int, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: ::libc::c_int, + x: *const cuDoubleComplex, + incx: ::libc::c_int, + beta: *const cuDoubleComplex, + y: *mut cuDoubleComplex, + incy: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasZgbmv_v2_64( handle: cublasHandle_t, trans: cublasOperation_t, - m: ::libc::c_int, - n: ::libc::c_int, - kl: ::libc::c_int, - ku: ::libc::c_int, + m: i64, + n: i64, + kl: i64, + ku: i64, alpha: *const cuDoubleComplex, A: *const cuDoubleComplex, - lda: ::libc::c_int, + lda: i64, x: *const cuDoubleComplex, - incx: ::libc::c_int, + incx: i64, beta: *const cuDoubleComplex, y: *mut cuDoubleComplex, - incy: ::libc::c_int, + incy: i64, ) -> cublasStatus_t; } extern "C" { @@ -8679,6 +12030,19 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasStrmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + A: *const f32, + lda: i64, + x: *mut f32, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDtrmv_v2( handle: cublasHandle_t, @@ -8692,6 +12056,19 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDtrmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + A: *const f64, + lda: i64, + x: *mut f64, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCtrmv_v2( handle: cublasHandle_t, @@ -8705,6 +12082,19 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCtrmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + A: *const cuComplex, + lda: i64, + x: *mut cuComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZtrmv_v2( handle: cublasHandle_t, @@ -8718,6 +12108,19 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZtrmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + A: *const cuDoubleComplex, + lda: i64, + x: *mut cuDoubleComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasStbmv_v2( handle: cublasHandle_t, @@ -8732,6 +12135,20 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasStbmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + k: i64, + A: *const f32, + lda: i64, + x: *mut f32, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDtbmv_v2( handle: cublasHandle_t, @@ -8746,6 +12163,20 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDtbmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + k: i64, + A: *const f64, + lda: i64, + x: *mut f64, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCtbmv_v2( handle: cublasHandle_t, @@ -8760,6 +12191,20 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCtbmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + k: i64, + A: *const cuComplex, + lda: i64, + x: *mut cuComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZtbmv_v2( handle: cublasHandle_t, @@ -8774,6 +12219,20 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZtbmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + k: i64, + A: *const cuDoubleComplex, + lda: i64, + x: *mut cuDoubleComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasStpmv_v2( handle: cublasHandle_t, @@ -8786,6 +12245,18 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasStpmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + AP: *const f32, + x: *mut f32, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDtpmv_v2( handle: cublasHandle_t, @@ -8798,6 +12269,18 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDtpmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + AP: *const f64, + x: *mut f64, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCtpmv_v2( handle: cublasHandle_t, @@ -8810,6 +12293,18 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCtpmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + AP: *const cuComplex, + x: *mut cuComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZtpmv_v2( handle: cublasHandle_t, @@ -8822,6 +12317,18 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZtpmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + AP: *const cuDoubleComplex, + x: *mut cuDoubleComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasStrsv_v2( handle: cublasHandle_t, @@ -8835,6 +12342,19 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasStrsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + A: *const f32, + lda: i64, + x: *mut f32, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDtrsv_v2( handle: cublasHandle_t, @@ -8848,6 +12368,19 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDtrsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + A: *const f64, + lda: i64, + x: *mut f64, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCtrsv_v2( handle: cublasHandle_t, @@ -8861,6 +12394,19 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCtrsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + A: *const cuComplex, + lda: i64, + x: *mut cuComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZtrsv_v2( handle: cublasHandle_t, @@ -8874,6 +12420,19 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZtrsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + A: *const cuDoubleComplex, + lda: i64, + x: *mut cuDoubleComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasStpsv_v2( handle: cublasHandle_t, @@ -8886,6 +12445,18 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasStpsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + AP: *const f32, + x: *mut f32, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDtpsv_v2( handle: cublasHandle_t, @@ -8898,6 +12469,18 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDtpsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + AP: *const f64, + x: *mut f64, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCtpsv_v2( handle: cublasHandle_t, @@ -8910,6 +12493,18 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCtpsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + AP: *const cuComplex, + x: *mut cuComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZtpsv_v2( handle: cublasHandle_t, @@ -8922,6 +12517,18 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZtpsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + AP: *const cuDoubleComplex, + x: *mut cuDoubleComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasStbsv_v2( handle: cublasHandle_t, @@ -8936,6 +12543,20 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasStbsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + k: i64, + A: *const f32, + lda: i64, + x: *mut f32, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDtbsv_v2( handle: cublasHandle_t, @@ -8950,6 +12571,20 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDtbsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + k: i64, + A: *const f64, + lda: i64, + x: *mut f64, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCtbsv_v2( handle: cublasHandle_t, @@ -8964,6 +12599,20 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCtbsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + k: i64, + A: *const cuComplex, + lda: i64, + x: *mut cuComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZtbsv_v2( handle: cublasHandle_t, @@ -8978,6 +12627,20 @@ extern "C" { incx: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZtbsv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + n: i64, + k: i64, + A: *const cuDoubleComplex, + lda: i64, + x: *mut cuDoubleComplex, + incx: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSsymv_v2( handle: cublasHandle_t, @@ -8993,6 +12656,21 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSsymv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + x: *const f32, + incx: i64, + beta: *const f32, + y: *mut f32, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDsymv_v2( handle: cublasHandle_t, @@ -9009,18 +12687,48 @@ extern "C" { ) -> cublasStatus_t; } extern "C" { - pub fn cublasCsymv_v2( + pub fn cublasDsymv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + x: *const f64, + incx: i64, + beta: *const f64, + y: *mut f64, + incy: i64, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasCsymv_v2( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: ::libc::c_int, + alpha: *const cuComplex, + A: *const cuComplex, + lda: ::libc::c_int, + x: *const cuComplex, + incx: ::libc::c_int, + beta: *const cuComplex, + y: *mut cuComplex, + incy: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasCsymv_v2_64( handle: cublasHandle_t, uplo: cublasFillMode_t, - n: ::libc::c_int, + n: i64, alpha: *const cuComplex, A: *const cuComplex, - lda: ::libc::c_int, + lda: i64, x: *const cuComplex, - incx: ::libc::c_int, + incx: i64, beta: *const cuComplex, y: *mut cuComplex, - incy: ::libc::c_int, + incy: i64, ) -> cublasStatus_t; } extern "C" { @@ -9038,6 +12746,21 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZsymv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + x: *const cuDoubleComplex, + incx: i64, + beta: *const cuDoubleComplex, + y: *mut cuDoubleComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasChemv_v2( handle: cublasHandle_t, @@ -9053,6 +12776,21 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasChemv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + x: *const cuComplex, + incx: i64, + beta: *const cuComplex, + y: *mut cuComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZhemv_v2( handle: cublasHandle_t, @@ -9068,6 +12806,21 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZhemv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + x: *const cuDoubleComplex, + incx: i64, + beta: *const cuDoubleComplex, + y: *mut cuDoubleComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSsbmv_v2( handle: cublasHandle_t, @@ -9084,6 +12837,22 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSsbmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + k: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + x: *const f32, + incx: i64, + beta: *const f32, + y: *mut f32, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDsbmv_v2( handle: cublasHandle_t, @@ -9100,6 +12869,22 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDsbmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + k: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + x: *const f64, + incx: i64, + beta: *const f64, + y: *mut f64, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasChbmv_v2( handle: cublasHandle_t, @@ -9116,6 +12901,22 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasChbmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + x: *const cuComplex, + incx: i64, + beta: *const cuComplex, + y: *mut cuComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZhbmv_v2( handle: cublasHandle_t, @@ -9132,6 +12933,22 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZhbmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + k: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + x: *const cuDoubleComplex, + incx: i64, + beta: *const cuDoubleComplex, + y: *mut cuDoubleComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSspmv_v2( handle: cublasHandle_t, @@ -9146,6 +12963,20 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSspmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f32, + AP: *const f32, + x: *const f32, + incx: i64, + beta: *const f32, + y: *mut f32, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDspmv_v2( handle: cublasHandle_t, @@ -9160,6 +12991,20 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDspmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f64, + AP: *const f64, + x: *const f64, + incx: i64, + beta: *const f64, + y: *mut f64, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasChpmv_v2( handle: cublasHandle_t, @@ -9174,6 +13019,20 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasChpmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuComplex, + AP: *const cuComplex, + x: *const cuComplex, + incx: i64, + beta: *const cuComplex, + y: *mut cuComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZhpmv_v2( handle: cublasHandle_t, @@ -9188,6 +13047,20 @@ extern "C" { incy: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZhpmv_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuDoubleComplex, + AP: *const cuDoubleComplex, + x: *const cuDoubleComplex, + incx: i64, + beta: *const cuDoubleComplex, + y: *mut cuDoubleComplex, + incy: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSger_v2( handle: cublasHandle_t, @@ -9202,6 +13075,20 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSger_v2_64( + handle: cublasHandle_t, + m: i64, + n: i64, + alpha: *const f32, + x: *const f32, + incx: i64, + y: *const f32, + incy: i64, + A: *mut f32, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDger_v2( handle: cublasHandle_t, @@ -9216,6 +13103,20 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDger_v2_64( + handle: cublasHandle_t, + m: i64, + n: i64, + alpha: *const f64, + x: *const f64, + incx: i64, + y: *const f64, + incy: i64, + A: *mut f64, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgeru_v2( handle: cublasHandle_t, @@ -9230,6 +13131,20 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCgeru_v2_64( + handle: cublasHandle_t, + m: i64, + n: i64, + alpha: *const cuComplex, + x: *const cuComplex, + incx: i64, + y: *const cuComplex, + incy: i64, + A: *mut cuComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgerc_v2( handle: cublasHandle_t, @@ -9244,6 +13159,20 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCgerc_v2_64( + handle: cublasHandle_t, + m: i64, + n: i64, + alpha: *const cuComplex, + x: *const cuComplex, + incx: i64, + y: *const cuComplex, + incy: i64, + A: *mut cuComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZgeru_v2( handle: cublasHandle_t, @@ -9258,6 +13187,20 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZgeru_v2_64( + handle: cublasHandle_t, + m: i64, + n: i64, + alpha: *const cuDoubleComplex, + x: *const cuDoubleComplex, + incx: i64, + y: *const cuDoubleComplex, + incy: i64, + A: *mut cuDoubleComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZgerc_v2( handle: cublasHandle_t, @@ -9272,6 +13215,20 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZgerc_v2_64( + handle: cublasHandle_t, + m: i64, + n: i64, + alpha: *const cuDoubleComplex, + x: *const cuDoubleComplex, + incx: i64, + y: *const cuDoubleComplex, + incy: i64, + A: *mut cuDoubleComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSsyr_v2( handle: cublasHandle_t, @@ -9284,6 +13241,18 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSsyr_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f32, + x: *const f32, + incx: i64, + A: *mut f32, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDsyr_v2( handle: cublasHandle_t, @@ -9296,6 +13265,18 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDsyr_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f64, + x: *const f64, + incx: i64, + A: *mut f64, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCsyr_v2( handle: cublasHandle_t, @@ -9308,6 +13289,18 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCsyr_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuComplex, + x: *const cuComplex, + incx: i64, + A: *mut cuComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZsyr_v2( handle: cublasHandle_t, @@ -9320,6 +13313,18 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZsyr_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuDoubleComplex, + x: *const cuDoubleComplex, + incx: i64, + A: *mut cuDoubleComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCher_v2( handle: cublasHandle_t, @@ -9332,6 +13337,18 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCher_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f32, + x: *const cuComplex, + incx: i64, + A: *mut cuComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZher_v2( handle: cublasHandle_t, @@ -9344,6 +13361,18 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZher_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f64, + x: *const cuDoubleComplex, + incx: i64, + A: *mut cuDoubleComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSspr_v2( handle: cublasHandle_t, @@ -9355,6 +13384,17 @@ extern "C" { AP: *mut f32, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSspr_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f32, + x: *const f32, + incx: i64, + AP: *mut f32, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDspr_v2( handle: cublasHandle_t, @@ -9366,6 +13406,17 @@ extern "C" { AP: *mut f64, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDspr_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f64, + x: *const f64, + incx: i64, + AP: *mut f64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasChpr_v2( handle: cublasHandle_t, @@ -9377,6 +13428,17 @@ extern "C" { AP: *mut cuComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasChpr_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f32, + x: *const cuComplex, + incx: i64, + AP: *mut cuComplex, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZhpr_v2( handle: cublasHandle_t, @@ -9388,6 +13450,17 @@ extern "C" { AP: *mut cuDoubleComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZhpr_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f64, + x: *const cuDoubleComplex, + incx: i64, + AP: *mut cuDoubleComplex, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSsyr2_v2( handle: cublasHandle_t, @@ -9399,7 +13472,21 @@ extern "C" { y: *const f32, incy: ::libc::c_int, A: *mut f32, - lda: ::libc::c_int, + lda: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasSsyr2_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f32, + x: *const f32, + incx: i64, + y: *const f32, + incy: i64, + A: *mut f32, + lda: i64, ) -> cublasStatus_t; } extern "C" { @@ -9416,6 +13503,20 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDsyr2_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f64, + x: *const f64, + incx: i64, + y: *const f64, + incy: i64, + A: *mut f64, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCsyr2_v2( handle: cublasHandle_t, @@ -9430,6 +13531,20 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCsyr2_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuComplex, + x: *const cuComplex, + incx: i64, + y: *const cuComplex, + incy: i64, + A: *mut cuComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZsyr2_v2( handle: cublasHandle_t, @@ -9444,6 +13559,20 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZsyr2_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuDoubleComplex, + x: *const cuDoubleComplex, + incx: i64, + y: *const cuDoubleComplex, + incy: i64, + A: *mut cuDoubleComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCher2_v2( handle: cublasHandle_t, @@ -9458,6 +13587,20 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCher2_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuComplex, + x: *const cuComplex, + incx: i64, + y: *const cuComplex, + incy: i64, + A: *mut cuComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZher2_v2( handle: cublasHandle_t, @@ -9472,6 +13615,20 @@ extern "C" { lda: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZher2_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuDoubleComplex, + x: *const cuDoubleComplex, + incx: i64, + y: *const cuDoubleComplex, + incy: i64, + A: *mut cuDoubleComplex, + lda: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSspr2_v2( handle: cublasHandle_t, @@ -9485,6 +13642,19 @@ extern "C" { AP: *mut f32, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSspr2_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f32, + x: *const f32, + incx: i64, + y: *const f32, + incy: i64, + AP: *mut f32, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDspr2_v2( handle: cublasHandle_t, @@ -9498,6 +13668,19 @@ extern "C" { AP: *mut f64, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDspr2_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const f64, + x: *const f64, + incx: i64, + y: *const f64, + incy: i64, + AP: *mut f64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasChpr2_v2( handle: cublasHandle_t, @@ -9511,6 +13694,19 @@ extern "C" { AP: *mut cuComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasChpr2_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuComplex, + x: *const cuComplex, + incx: i64, + y: *const cuComplex, + incy: i64, + AP: *mut cuComplex, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZhpr2_v2( handle: cublasHandle_t, @@ -9524,6 +13720,19 @@ extern "C" { AP: *mut cuDoubleComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZhpr2_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + n: i64, + alpha: *const cuDoubleComplex, + x: *const cuDoubleComplex, + incx: i64, + y: *const cuDoubleComplex, + incy: i64, + AP: *mut cuDoubleComplex, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSgemvBatched( handle: cublasHandle_t, @@ -9541,6 +13750,23 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSgemvBatched_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const f32, + Aarray: *const *const f32, + lda: i64, + xarray: *const *const f32, + incx: i64, + beta: *const f32, + yarray: *const *mut f32, + incy: i64, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDgemvBatched( handle: cublasHandle_t, @@ -9558,6 +13784,23 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDgemvBatched_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const f64, + Aarray: *const *const f64, + lda: i64, + xarray: *const *const f64, + incx: i64, + beta: *const f64, + yarray: *const *mut f64, + incy: i64, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgemvBatched( handle: cublasHandle_t, @@ -9575,6 +13818,23 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCgemvBatched_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const cuComplex, + Aarray: *const *const cuComplex, + lda: i64, + xarray: *const *const cuComplex, + incx: i64, + beta: *const cuComplex, + yarray: *const *mut cuComplex, + incy: i64, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZgemvBatched( handle: cublasHandle_t, @@ -9592,6 +13852,23 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZgemvBatched_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const cuDoubleComplex, + Aarray: *const *const cuDoubleComplex, + lda: i64, + xarray: *const *const cuDoubleComplex, + incx: i64, + beta: *const cuDoubleComplex, + yarray: *const *mut cuDoubleComplex, + incy: i64, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSgemvStridedBatched( handle: cublasHandle_t, @@ -9612,6 +13889,26 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSgemvStridedBatched_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + strideA: ::libc::c_longlong, + x: *const f32, + incx: i64, + stridex: ::libc::c_longlong, + beta: *const f32, + y: *mut f32, + incy: i64, + stridey: ::libc::c_longlong, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDgemvStridedBatched( handle: cublasHandle_t, @@ -9632,6 +13929,26 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDgemvStridedBatched_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + strideA: ::libc::c_longlong, + x: *const f64, + incx: i64, + stridex: ::libc::c_longlong, + beta: *const f64, + y: *mut f64, + incy: i64, + stridey: ::libc::c_longlong, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgemvStridedBatched( handle: cublasHandle_t, @@ -9652,6 +13969,26 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCgemvStridedBatched_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + strideA: ::libc::c_longlong, + x: *const cuComplex, + incx: i64, + stridex: ::libc::c_longlong, + beta: *const cuComplex, + y: *mut cuComplex, + incy: i64, + stridey: ::libc::c_longlong, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZgemvStridedBatched( handle: cublasHandle_t, @@ -9672,6 +14009,26 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZgemvStridedBatched_64( + handle: cublasHandle_t, + trans: cublasOperation_t, + m: i64, + n: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + strideA: ::libc::c_longlong, + x: *const cuDoubleComplex, + incx: i64, + stridex: ::libc::c_longlong, + beta: *const cuDoubleComplex, + y: *mut cuDoubleComplex, + incy: i64, + stridey: ::libc::c_longlong, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSgemm_v2( handle: cublasHandle_t, @@ -9690,6 +14047,24 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSgemm_v2_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + B: *const f32, + ldb: i64, + beta: *const f32, + C: *mut f32, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDgemm_v2( handle: cublasHandle_t, @@ -9708,6 +14083,24 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDgemm_v2_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + B: *const f64, + ldb: i64, + beta: *const f64, + C: *mut f64, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgemm_v2( handle: cublasHandle_t, @@ -9726,6 +14119,24 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCgemm_v2_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + B: *const cuComplex, + ldb: i64, + beta: *const cuComplex, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgemm3m( handle: cublasHandle_t, @@ -9744,6 +14155,24 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCgemm3m_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + B: *const cuComplex, + ldb: i64, + beta: *const cuComplex, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgemm3mEx( handle: cublasHandle_t, @@ -9765,6 +14194,27 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCgemm3mEx_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const ::libc::c_void, + Atype: cudaDataType, + lda: i64, + B: *const ::libc::c_void, + Btype: cudaDataType, + ldb: i64, + beta: *const cuComplex, + C: *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZgemm_v2( handle: cublasHandle_t, @@ -9783,6 +14233,24 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZgemm_v2_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + B: *const cuDoubleComplex, + ldb: i64, + beta: *const cuDoubleComplex, + C: *mut cuDoubleComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZgemm3m( handle: cublasHandle_t, @@ -9795,10 +14263,28 @@ extern "C" { A: *const cuDoubleComplex, lda: ::libc::c_int, B: *const cuDoubleComplex, - ldb: ::libc::c_int, + ldb: ::libc::c_int, + beta: *const cuDoubleComplex, + C: *mut cuDoubleComplex, + ldc: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasZgemm3m_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + B: *const cuDoubleComplex, + ldb: i64, beta: *const cuDoubleComplex, C: *mut cuDoubleComplex, - ldc: ::libc::c_int, + ldc: i64, ) -> cublasStatus_t; } extern "C" { @@ -9822,6 +14308,27 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSgemmEx_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const f32, + A: *const ::libc::c_void, + Atype: cudaDataType, + lda: i64, + B: *const ::libc::c_void, + Btype: cudaDataType, + ldb: i64, + beta: *const f32, + C: *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasGemmEx( handle: cublasHandle_t, @@ -9845,6 +14352,29 @@ extern "C" { algo: cublasGemmAlgo_t, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasGemmEx_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const ::libc::c_void, + A: *const ::libc::c_void, + Atype: cudaDataType, + lda: i64, + B: *const ::libc::c_void, + Btype: cudaDataType, + ldb: i64, + beta: *const ::libc::c_void, + C: *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: i64, + computeType: cublasComputeType_t, + algo: cublasGemmAlgo_t, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgemmEx( handle: cublasHandle_t, @@ -9867,25 +14397,24 @@ extern "C" { ) -> cublasStatus_t; } extern "C" { - pub fn cublasUint8gemmBias( + pub fn cublasCgemmEx_64( handle: cublasHandle_t, transa: cublasOperation_t, transb: cublasOperation_t, - transc: cublasOperation_t, - m: ::libc::c_int, - n: ::libc::c_int, - k: ::libc::c_int, - A: *const ::libc::c_uchar, - A_bias: ::libc::c_int, - lda: ::libc::c_int, - B: *const ::libc::c_uchar, - B_bias: ::libc::c_int, - ldb: ::libc::c_int, - C: *mut ::libc::c_uchar, - C_bias: ::libc::c_int, - ldc: ::libc::c_int, - C_mult: ::libc::c_int, - C_shift: ::libc::c_int, + m: i64, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const ::libc::c_void, + Atype: cudaDataType, + lda: i64, + B: *const ::libc::c_void, + Btype: cudaDataType, + ldb: i64, + beta: *const cuComplex, + C: *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: i64, ) -> cublasStatus_t; } extern "C" { @@ -9903,6 +14432,21 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSsyrk_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + beta: *const f32, + C: *mut f32, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDsyrk_v2( handle: cublasHandle_t, @@ -9918,6 +14462,21 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDsyrk_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + beta: *const f64, + C: *mut f64, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCsyrk_v2( handle: cublasHandle_t, @@ -9933,6 +14492,21 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCsyrk_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + beta: *const cuComplex, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZsyrk_v2( handle: cublasHandle_t, @@ -9948,6 +14522,21 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZsyrk_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + beta: *const cuDoubleComplex, + C: *mut cuDoubleComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCsyrkEx( handle: cublasHandle_t, @@ -9965,6 +14554,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCsyrkEx_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const ::libc::c_void, + Atype: cudaDataType, + lda: i64, + beta: *const cuComplex, + C: *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCsyrk3mEx( handle: cublasHandle_t, @@ -9982,6 +14588,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCsyrk3mEx_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const ::libc::c_void, + Atype: cudaDataType, + lda: i64, + beta: *const cuComplex, + C: *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCherk_v2( handle: cublasHandle_t, @@ -9997,6 +14620,21 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCherk_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const f32, + A: *const cuComplex, + lda: i64, + beta: *const f32, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZherk_v2( handle: cublasHandle_t, @@ -10012,6 +14650,21 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZherk_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const f64, + A: *const cuDoubleComplex, + lda: i64, + beta: *const f64, + C: *mut cuDoubleComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCherkEx( handle: cublasHandle_t, @@ -10029,6 +14682,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCherkEx_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const f32, + A: *const ::libc::c_void, + Atype: cudaDataType, + lda: i64, + beta: *const f32, + C: *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCherk3mEx( handle: cublasHandle_t, @@ -10046,6 +14716,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCherk3mEx_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const f32, + A: *const ::libc::c_void, + Atype: cudaDataType, + lda: i64, + beta: *const f32, + C: *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSsyr2k_v2( handle: cublasHandle_t, @@ -10063,6 +14750,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSsyr2k_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + B: *const f32, + ldb: i64, + beta: *const f32, + C: *mut f32, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDsyr2k_v2( handle: cublasHandle_t, @@ -10080,6 +14784,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDsyr2k_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + B: *const f64, + ldb: i64, + beta: *const f64, + C: *mut f64, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCsyr2k_v2( handle: cublasHandle_t, @@ -10097,6 +14818,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCsyr2k_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + B: *const cuComplex, + ldb: i64, + beta: *const cuComplex, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZsyr2k_v2( handle: cublasHandle_t, @@ -10114,6 +14852,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZsyr2k_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + B: *const cuDoubleComplex, + ldb: i64, + beta: *const cuDoubleComplex, + C: *mut cuDoubleComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCher2k_v2( handle: cublasHandle_t, @@ -10131,6 +14886,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCher2k_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + B: *const cuComplex, + ldb: i64, + beta: *const f32, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZher2k_v2( handle: cublasHandle_t, @@ -10148,6 +14920,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZher2k_v2_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + B: *const cuDoubleComplex, + ldb: i64, + beta: *const f64, + C: *mut cuDoubleComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSsyrkx( handle: cublasHandle_t, @@ -10166,20 +14955,54 @@ extern "C" { ) -> cublasStatus_t; } extern "C" { - pub fn cublasDsyrkx( + pub fn cublasSsyrkx_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + B: *const f32, + ldb: i64, + beta: *const f32, + C: *mut f32, + ldc: i64, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasDsyrkx( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: ::libc::c_int, + k: ::libc::c_int, + alpha: *const f64, + A: *const f64, + lda: ::libc::c_int, + B: *const f64, + ldb: ::libc::c_int, + beta: *const f64, + C: *mut f64, + ldc: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasDsyrkx_64( handle: cublasHandle_t, uplo: cublasFillMode_t, trans: cublasOperation_t, - n: ::libc::c_int, - k: ::libc::c_int, + n: i64, + k: i64, alpha: *const f64, A: *const f64, - lda: ::libc::c_int, + lda: i64, B: *const f64, - ldb: ::libc::c_int, + ldb: i64, beta: *const f64, C: *mut f64, - ldc: ::libc::c_int, + ldc: i64, ) -> cublasStatus_t; } extern "C" { @@ -10199,6 +15022,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCsyrkx_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + B: *const cuComplex, + ldb: i64, + beta: *const cuComplex, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZsyrkx( handle: cublasHandle_t, @@ -10216,6 +15056,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZsyrkx_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + B: *const cuDoubleComplex, + ldb: i64, + beta: *const cuDoubleComplex, + C: *mut cuDoubleComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCherkx( handle: cublasHandle_t, @@ -10233,6 +15090,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCherkx_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + B: *const cuComplex, + ldb: i64, + beta: *const f32, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZherkx( handle: cublasHandle_t, @@ -10250,6 +15124,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZherkx_64( + handle: cublasHandle_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + n: i64, + k: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + B: *const cuDoubleComplex, + ldb: i64, + beta: *const f64, + C: *mut cuDoubleComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSsymm_v2( handle: cublasHandle_t, @@ -10267,6 +15158,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSsymm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + m: i64, + n: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + B: *const f32, + ldb: i64, + beta: *const f32, + C: *mut f32, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDsymm_v2( handle: cublasHandle_t, @@ -10284,6 +15192,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDsymm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + m: i64, + n: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + B: *const f64, + ldb: i64, + beta: *const f64, + C: *mut f64, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCsymm_v2( handle: cublasHandle_t, @@ -10301,6 +15226,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCsymm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + m: i64, + n: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + B: *const cuComplex, + ldb: i64, + beta: *const cuComplex, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZsymm_v2( handle: cublasHandle_t, @@ -10318,6 +15260,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZsymm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + m: i64, + n: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + B: *const cuDoubleComplex, + ldb: i64, + beta: *const cuDoubleComplex, + C: *mut cuDoubleComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasChemm_v2( handle: cublasHandle_t, @@ -10335,6 +15294,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasChemm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + m: i64, + n: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + B: *const cuComplex, + ldb: i64, + beta: *const cuComplex, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZhemm_v2( handle: cublasHandle_t, @@ -10352,6 +15328,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZhemm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + m: i64, + n: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + B: *const cuDoubleComplex, + ldb: i64, + beta: *const cuDoubleComplex, + C: *mut cuDoubleComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasStrsm_v2( handle: cublasHandle_t, @@ -10368,6 +15361,22 @@ extern "C" { ldb: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasStrsm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + B: *mut f32, + ldb: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDtrsm_v2( handle: cublasHandle_t, @@ -10384,6 +15393,22 @@ extern "C" { ldb: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDtrsm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + B: *mut f64, + ldb: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCtrsm_v2( handle: cublasHandle_t, @@ -10400,6 +15425,22 @@ extern "C" { ldb: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCtrsm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + B: *mut cuComplex, + ldb: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZtrsm_v2( handle: cublasHandle_t, @@ -10416,6 +15457,22 @@ extern "C" { ldb: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZtrsm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + B: *mut cuDoubleComplex, + ldb: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasStrmm_v2( handle: cublasHandle_t, @@ -10434,6 +15491,24 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasStrmm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + B: *const f32, + ldb: i64, + C: *mut f32, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDtrmm_v2( handle: cublasHandle_t, @@ -10452,6 +15527,24 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDtrmm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + B: *const f64, + ldb: i64, + C: *mut f64, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCtrmm_v2( handle: cublasHandle_t, @@ -10470,6 +15563,24 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCtrmm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + B: *const cuComplex, + ldb: i64, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZtrmm_v2( handle: cublasHandle_t, @@ -10488,6 +15599,24 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZtrmm_v2_64( + handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + B: *const cuDoubleComplex, + ldb: i64, + C: *mut cuDoubleComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSgemmBatched( handle: cublasHandle_t, @@ -10507,6 +15636,25 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSgemmBatched_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const f32, + Aarray: *const *const f32, + lda: i64, + Barray: *const *const f32, + ldb: i64, + beta: *const f32, + Carray: *const *mut f32, + ldc: i64, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDgemmBatched( handle: cublasHandle_t, @@ -10527,7 +15675,64 @@ extern "C" { ) -> cublasStatus_t; } extern "C" { - pub fn cublasCgemmBatched( + pub fn cublasDgemmBatched_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const f64, + Aarray: *const *const f64, + lda: i64, + Barray: *const *const f64, + ldb: i64, + beta: *const f64, + Carray: *const *mut f64, + ldc: i64, + batchCount: i64, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasCgemmBatched( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + k: ::libc::c_int, + alpha: *const cuComplex, + Aarray: *const *const cuComplex, + lda: ::libc::c_int, + Barray: *const *const cuComplex, + ldb: ::libc::c_int, + beta: *const cuComplex, + Carray: *const *mut cuComplex, + ldc: ::libc::c_int, + batchCount: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasCgemmBatched_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const cuComplex, + Aarray: *const *const cuComplex, + lda: i64, + Barray: *const *const cuComplex, + ldb: i64, + beta: *const cuComplex, + Carray: *const *mut cuComplex, + ldc: i64, + batchCount: i64, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasCgemm3mBatched( handle: cublasHandle_t, transa: cublasOperation_t, transb: cublasOperation_t, @@ -10546,22 +15751,22 @@ extern "C" { ) -> cublasStatus_t; } extern "C" { - pub fn cublasCgemm3mBatched( + pub fn cublasCgemm3mBatched_64( handle: cublasHandle_t, transa: cublasOperation_t, transb: cublasOperation_t, - m: ::libc::c_int, - n: ::libc::c_int, - k: ::libc::c_int, + m: i64, + n: i64, + k: i64, alpha: *const cuComplex, Aarray: *const *const cuComplex, - lda: ::libc::c_int, + lda: i64, Barray: *const *const cuComplex, - ldb: ::libc::c_int, + ldb: i64, beta: *const cuComplex, Carray: *const *mut cuComplex, - ldc: ::libc::c_int, - batchCount: ::libc::c_int, + ldc: i64, + batchCount: i64, ) -> cublasStatus_t; } extern "C" { @@ -10584,76 +15789,66 @@ extern "C" { ) -> cublasStatus_t; } extern "C" { - pub fn cublasGemmBatchedEx( + pub fn cublasZgemmBatched_64( handle: cublasHandle_t, transa: cublasOperation_t, transb: cublasOperation_t, - m: ::libc::c_int, - n: ::libc::c_int, - k: ::libc::c_int, - alpha: *const ::libc::c_void, - Aarray: *const *const ::libc::c_void, - Atype: cudaDataType, - lda: ::libc::c_int, - Barray: *const *const ::libc::c_void, - Btype: cudaDataType, - ldb: ::libc::c_int, - beta: *const ::libc::c_void, - Carray: *const *mut ::libc::c_void, - Ctype: cudaDataType, - ldc: ::libc::c_int, - batchCount: ::libc::c_int, - computeType: cublasComputeType_t, - algo: cublasGemmAlgo_t, + m: i64, + n: i64, + k: i64, + alpha: *const cuDoubleComplex, + Aarray: *const *const cuDoubleComplex, + lda: i64, + Barray: *const *const cuDoubleComplex, + ldb: i64, + beta: *const cuDoubleComplex, + Carray: *const *mut cuDoubleComplex, + ldc: i64, + batchCount: i64, ) -> cublasStatus_t; } extern "C" { - pub fn cublasGemmStridedBatchedEx( + pub fn cublasSgemmStridedBatched( handle: cublasHandle_t, transa: cublasOperation_t, transb: cublasOperation_t, m: ::libc::c_int, n: ::libc::c_int, k: ::libc::c_int, - alpha: *const ::libc::c_void, - A: *const ::libc::c_void, - Atype: cudaDataType, + alpha: *const f32, + A: *const f32, lda: ::libc::c_int, strideA: ::libc::c_longlong, - B: *const ::libc::c_void, - Btype: cudaDataType, + B: *const f32, ldb: ::libc::c_int, strideB: ::libc::c_longlong, - beta: *const ::libc::c_void, - C: *mut ::libc::c_void, - Ctype: cudaDataType, + beta: *const f32, + C: *mut f32, ldc: ::libc::c_int, strideC: ::libc::c_longlong, batchCount: ::libc::c_int, - computeType: cublasComputeType_t, - algo: cublasGemmAlgo_t, ) -> cublasStatus_t; } extern "C" { - pub fn cublasSgemmStridedBatched( + pub fn cublasSgemmStridedBatched_64( handle: cublasHandle_t, transa: cublasOperation_t, transb: cublasOperation_t, - m: ::libc::c_int, - n: ::libc::c_int, - k: ::libc::c_int, + m: i64, + n: i64, + k: i64, alpha: *const f32, A: *const f32, - lda: ::libc::c_int, + lda: i64, strideA: ::libc::c_longlong, B: *const f32, - ldb: ::libc::c_int, + ldb: i64, strideB: ::libc::c_longlong, beta: *const f32, C: *mut f32, - ldc: ::libc::c_int, + ldc: i64, strideC: ::libc::c_longlong, - batchCount: ::libc::c_int, + batchCount: i64, ) -> cublasStatus_t; } extern "C" { @@ -10678,6 +15873,28 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDgemmStridedBatched_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + strideA: ::libc::c_longlong, + B: *const f64, + ldb: i64, + strideB: ::libc::c_longlong, + beta: *const f64, + C: *mut f64, + ldc: i64, + strideC: ::libc::c_longlong, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgemmStridedBatched( handle: cublasHandle_t, @@ -10700,6 +15917,28 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCgemmStridedBatched_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + strideA: ::libc::c_longlong, + B: *const cuComplex, + ldb: i64, + strideB: ::libc::c_longlong, + beta: *const cuComplex, + C: *mut cuComplex, + ldc: i64, + strideC: ::libc::c_longlong, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgemm3mStridedBatched( handle: cublasHandle_t, @@ -10722,6 +15961,28 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCgemm3mStridedBatched_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + strideA: ::libc::c_longlong, + B: *const cuComplex, + ldb: i64, + strideB: ::libc::c_longlong, + beta: *const cuComplex, + C: *mut cuComplex, + ldc: i64, + strideC: ::libc::c_longlong, + batchCount: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZgemmStridedBatched( handle: cublasHandle_t, @@ -10744,6 +16005,210 @@ extern "C" { batchCount: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasZgemmStridedBatched_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + strideA: ::libc::c_longlong, + B: *const cuDoubleComplex, + ldb: i64, + strideB: ::libc::c_longlong, + beta: *const cuDoubleComplex, + C: *mut cuDoubleComplex, + ldc: i64, + strideC: ::libc::c_longlong, + batchCount: i64, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasGemmBatchedEx( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + k: ::libc::c_int, + alpha: *const ::libc::c_void, + Aarray: *const *const ::libc::c_void, + Atype: cudaDataType, + lda: ::libc::c_int, + Barray: *const *const ::libc::c_void, + Btype: cudaDataType, + ldb: ::libc::c_int, + beta: *const ::libc::c_void, + Carray: *const *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: ::libc::c_int, + batchCount: ::libc::c_int, + computeType: cublasComputeType_t, + algo: cublasGemmAlgo_t, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasGemmBatchedEx_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const ::libc::c_void, + Aarray: *const *const ::libc::c_void, + Atype: cudaDataType, + lda: i64, + Barray: *const *const ::libc::c_void, + Btype: cudaDataType, + ldb: i64, + beta: *const ::libc::c_void, + Carray: *const *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: i64, + batchCount: i64, + computeType: cublasComputeType_t, + algo: cublasGemmAlgo_t, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasGemmStridedBatchedEx( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + k: ::libc::c_int, + alpha: *const ::libc::c_void, + A: *const ::libc::c_void, + Atype: cudaDataType, + lda: ::libc::c_int, + strideA: ::libc::c_longlong, + B: *const ::libc::c_void, + Btype: cudaDataType, + ldb: ::libc::c_int, + strideB: ::libc::c_longlong, + beta: *const ::libc::c_void, + C: *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: ::libc::c_int, + strideC: ::libc::c_longlong, + batchCount: ::libc::c_int, + computeType: cublasComputeType_t, + algo: cublasGemmAlgo_t, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasGemmStridedBatchedEx_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + k: i64, + alpha: *const ::libc::c_void, + A: *const ::libc::c_void, + Atype: cudaDataType, + lda: i64, + strideA: ::libc::c_longlong, + B: *const ::libc::c_void, + Btype: cudaDataType, + ldb: i64, + strideB: ::libc::c_longlong, + beta: *const ::libc::c_void, + C: *mut ::libc::c_void, + Ctype: cudaDataType, + ldc: i64, + strideC: ::libc::c_longlong, + batchCount: i64, + computeType: cublasComputeType_t, + algo: cublasGemmAlgo_t, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasSgemmGroupedBatched( + handle: cublasHandle_t, + transa_array: *const cublasOperation_t, + transb_array: *const cublasOperation_t, + m_array: *const ::libc::c_int, + n_array: *const ::libc::c_int, + k_array: *const ::libc::c_int, + alpha_array: *const f32, + Aarray: *const *const f32, + lda_array: *const ::libc::c_int, + Barray: *const *const f32, + ldb_array: *const ::libc::c_int, + beta_array: *const f32, + Carray: *const *mut f32, + ldc_array: *const ::libc::c_int, + group_count: ::libc::c_int, + group_size: *const ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasSgemmGroupedBatched_64( + handle: cublasHandle_t, + transa_array: *const cublasOperation_t, + transb_array: *const cublasOperation_t, + m_array: *const i64, + n_array: *const i64, + k_array: *const i64, + alpha_array: *const f32, + Aarray: *const *const f32, + lda_array: *const i64, + Barray: *const *const f32, + ldb_array: *const i64, + beta_array: *const f32, + Carray: *const *mut f32, + ldc_array: *const i64, + group_count: i64, + group_size: *const i64, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasDgemmGroupedBatched( + handle: cublasHandle_t, + transa_array: *const cublasOperation_t, + transb_array: *const cublasOperation_t, + m_array: *const ::libc::c_int, + n_array: *const ::libc::c_int, + k_array: *const ::libc::c_int, + alpha_array: *const f64, + Aarray: *const *const f64, + lda_array: *const ::libc::c_int, + Barray: *const *const f64, + ldb_array: *const ::libc::c_int, + beta_array: *const f64, + Carray: *const *mut f64, + ldc_array: *const ::libc::c_int, + group_count: ::libc::c_int, + group_size: *const ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasDgemmGroupedBatched_64( + handle: cublasHandle_t, + transa_array: *const cublasOperation_t, + transb_array: *const cublasOperation_t, + m_array: *const i64, + n_array: *const i64, + k_array: *const i64, + alpha_array: *const f64, + Aarray: *const *const f64, + lda_array: *const i64, + Barray: *const *const f64, + ldb_array: *const i64, + beta_array: *const f64, + Carray: *const *mut f64, + ldc_array: *const i64, + group_count: i64, + group_size: *const i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasSgeam( handle: cublasHandle_t, @@ -10761,6 +16226,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSgeam_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + alpha: *const f32, + A: *const f32, + lda: i64, + beta: *const f32, + B: *const f32, + ldb: i64, + C: *mut f32, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasDgeam( handle: cublasHandle_t, @@ -10778,6 +16260,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasDgeam_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + alpha: *const f64, + A: *const f64, + lda: i64, + beta: *const f64, + B: *const f64, + ldb: i64, + C: *mut f64, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasCgeam( handle: cublasHandle_t, @@ -10795,6 +16294,23 @@ extern "C" { ldc: ::libc::c_int, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasCgeam_64( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + alpha: *const cuComplex, + A: *const cuComplex, + lda: i64, + beta: *const cuComplex, + B: *const cuComplex, + ldb: i64, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} extern "C" { pub fn cublasZgeam( handle: cublasHandle_t, @@ -10813,227 +16329,268 @@ extern "C" { ) -> cublasStatus_t; } extern "C" { - pub fn cublasSgetrfBatched( + pub fn cublasZgeam_64( handle: cublasHandle_t, - n: ::libc::c_int, - A: *const *mut f32, - lda: ::libc::c_int, - P: *mut ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + transa: cublasOperation_t, + transb: cublasOperation_t, + m: i64, + n: i64, + alpha: *const cuDoubleComplex, + A: *const cuDoubleComplex, + lda: i64, + beta: *const cuDoubleComplex, + B: *const cuDoubleComplex, + ldb: i64, + C: *mut cuDoubleComplex, + ldc: i64, ) -> cublasStatus_t; } extern "C" { - pub fn cublasDgetrfBatched( + pub fn cublasStrsmBatched( handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: ::libc::c_int, n: ::libc::c_int, - A: *const *mut f64, + alpha: *const f32, + A: *const *const f32, lda: ::libc::c_int, - P: *mut ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + B: *const *mut f32, + ldb: ::libc::c_int, + batchCount: ::libc::c_int, ) -> cublasStatus_t; } extern "C" { - pub fn cublasCgetrfBatched( + pub fn cublasStrsmBatched_64( handle: cublasHandle_t, - n: ::libc::c_int, - A: *const *mut cuComplex, - lda: ::libc::c_int, - P: *mut ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const f32, + A: *const *const f32, + lda: i64, + B: *const *mut f32, + ldb: i64, + batchCount: i64, ) -> cublasStatus_t; } extern "C" { - pub fn cublasZgetrfBatched( + pub fn cublasDtrsmBatched( handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: ::libc::c_int, n: ::libc::c_int, - A: *const *mut cuDoubleComplex, + alpha: *const f64, + A: *const *const f64, lda: ::libc::c_int, - P: *mut ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + B: *const *mut f64, + ldb: ::libc::c_int, + batchCount: ::libc::c_int, ) -> cublasStatus_t; } extern "C" { - pub fn cublasSgetriBatched( + pub fn cublasDtrsmBatched_64( handle: cublasHandle_t, - n: ::libc::c_int, - A: *const *const f32, - lda: ::libc::c_int, - P: *const ::libc::c_int, - C: *const *mut f32, - ldc: ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const f64, + A: *const *const f64, + lda: i64, + B: *const *mut f64, + ldb: i64, + batchCount: i64, ) -> cublasStatus_t; } extern "C" { - pub fn cublasDgetriBatched( + pub fn cublasCtrsmBatched( handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: ::libc::c_int, n: ::libc::c_int, - A: *const *const f64, + alpha: *const cuComplex, + A: *const *const cuComplex, lda: ::libc::c_int, - P: *const ::libc::c_int, - C: *const *mut f64, - ldc: ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + B: *const *mut cuComplex, + ldb: ::libc::c_int, + batchCount: ::libc::c_int, ) -> cublasStatus_t; } extern "C" { - pub fn cublasCgetriBatched( + pub fn cublasCtrsmBatched_64( handle: cublasHandle_t, - n: ::libc::c_int, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const cuComplex, A: *const *const cuComplex, - lda: ::libc::c_int, - P: *const ::libc::c_int, - C: *const *mut cuComplex, - ldc: ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + lda: i64, + B: *const *mut cuComplex, + ldb: i64, + batchCount: i64, ) -> cublasStatus_t; } extern "C" { - pub fn cublasZgetriBatched( + pub fn cublasZtrsmBatched( handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, + trans: cublasOperation_t, + diag: cublasDiagType_t, + m: ::libc::c_int, n: ::libc::c_int, + alpha: *const cuDoubleComplex, A: *const *const cuDoubleComplex, lda: ::libc::c_int, - P: *const ::libc::c_int, - C: *const *mut cuDoubleComplex, - ldc: ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + B: *const *mut cuDoubleComplex, + ldb: ::libc::c_int, + batchCount: ::libc::c_int, ) -> cublasStatus_t; } extern "C" { - pub fn cublasSgetrsBatched( + pub fn cublasZtrsmBatched_64( handle: cublasHandle_t, + side: cublasSideMode_t, + uplo: cublasFillMode_t, trans: cublasOperation_t, - n: ::libc::c_int, - nrhs: ::libc::c_int, - Aarray: *const *const f32, - lda: ::libc::c_int, - devIpiv: *const ::libc::c_int, - Barray: *const *mut f32, - ldb: ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + diag: cublasDiagType_t, + m: i64, + n: i64, + alpha: *const cuDoubleComplex, + A: *const *const cuDoubleComplex, + lda: i64, + B: *const *mut cuDoubleComplex, + ldb: i64, + batchCount: i64, ) -> cublasStatus_t; } extern "C" { - pub fn cublasDgetrsBatched( + pub fn cublasSdgmm( handle: cublasHandle_t, - trans: cublasOperation_t, + mode: cublasSideMode_t, + m: ::libc::c_int, n: ::libc::c_int, - nrhs: ::libc::c_int, - Aarray: *const *const f64, + A: *const f32, lda: ::libc::c_int, - devIpiv: *const ::libc::c_int, - Barray: *const *mut f64, - ldb: ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + x: *const f32, + incx: ::libc::c_int, + C: *mut f32, + ldc: ::libc::c_int, ) -> cublasStatus_t; } extern "C" { - pub fn cublasCgetrsBatched( + pub fn cublasSdgmm_64( handle: cublasHandle_t, - trans: cublasOperation_t, - n: ::libc::c_int, - nrhs: ::libc::c_int, - Aarray: *const *const cuComplex, - lda: ::libc::c_int, - devIpiv: *const ::libc::c_int, - Barray: *const *mut cuComplex, - ldb: ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + mode: cublasSideMode_t, + m: i64, + n: i64, + A: *const f32, + lda: i64, + x: *const f32, + incx: i64, + C: *mut f32, + ldc: i64, ) -> cublasStatus_t; } extern "C" { - pub fn cublasZgetrsBatched( + pub fn cublasDdgmm( handle: cublasHandle_t, - trans: cublasOperation_t, + mode: cublasSideMode_t, + m: ::libc::c_int, n: ::libc::c_int, - nrhs: ::libc::c_int, - Aarray: *const *const cuDoubleComplex, + A: *const f64, lda: ::libc::c_int, - devIpiv: *const ::libc::c_int, - Barray: *const *mut cuDoubleComplex, - ldb: ::libc::c_int, - info: *mut ::libc::c_int, - batchSize: ::libc::c_int, + x: *const f64, + incx: ::libc::c_int, + C: *mut f64, + ldc: ::libc::c_int, ) -> cublasStatus_t; } extern "C" { - pub fn cublasStrsmBatched( + pub fn cublasDdgmm_64( handle: cublasHandle_t, - side: cublasSideMode_t, - uplo: cublasFillMode_t, - trans: cublasOperation_t, - diag: cublasDiagType_t, - m: ::libc::c_int, - n: ::libc::c_int, - alpha: *const f32, - A: *const *const f32, - lda: ::libc::c_int, - B: *const *mut f32, - ldb: ::libc::c_int, - batchCount: ::libc::c_int, + mode: cublasSideMode_t, + m: i64, + n: i64, + A: *const f64, + lda: i64, + x: *const f64, + incx: i64, + C: *mut f64, + ldc: i64, ) -> cublasStatus_t; } extern "C" { - pub fn cublasDtrsmBatched( + pub fn cublasCdgmm( handle: cublasHandle_t, - side: cublasSideMode_t, - uplo: cublasFillMode_t, - trans: cublasOperation_t, - diag: cublasDiagType_t, + mode: cublasSideMode_t, m: ::libc::c_int, n: ::libc::c_int, - alpha: *const f64, - A: *const *const f64, + A: *const cuComplex, lda: ::libc::c_int, - B: *const *mut f64, - ldb: ::libc::c_int, - batchCount: ::libc::c_int, + x: *const cuComplex, + incx: ::libc::c_int, + C: *mut cuComplex, + ldc: ::libc::c_int, ) -> cublasStatus_t; } extern "C" { - pub fn cublasCtrsmBatched( + pub fn cublasCdgmm_64( handle: cublasHandle_t, - side: cublasSideMode_t, - uplo: cublasFillMode_t, - trans: cublasOperation_t, - diag: cublasDiagType_t, + mode: cublasSideMode_t, + m: i64, + n: i64, + A: *const cuComplex, + lda: i64, + x: *const cuComplex, + incx: i64, + C: *mut cuComplex, + ldc: i64, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasZdgmm( + handle: cublasHandle_t, + mode: cublasSideMode_t, m: ::libc::c_int, n: ::libc::c_int, - alpha: *const cuComplex, - A: *const *const cuComplex, - lda: ::libc::c_int, - B: *const *mut cuComplex, - ldb: ::libc::c_int, - batchCount: ::libc::c_int, + A: *const cuDoubleComplex, + lda: ::libc::c_int, + x: *const cuDoubleComplex, + incx: ::libc::c_int, + C: *mut cuDoubleComplex, + ldc: ::libc::c_int, ) -> cublasStatus_t; } extern "C" { - pub fn cublasZtrsmBatched( + pub fn cublasZdgmm_64( handle: cublasHandle_t, - side: cublasSideMode_t, - uplo: cublasFillMode_t, - trans: cublasOperation_t, - diag: cublasDiagType_t, - m: ::libc::c_int, - n: ::libc::c_int, - alpha: *const cuDoubleComplex, - A: *const *const cuDoubleComplex, - lda: ::libc::c_int, - B: *const *mut cuDoubleComplex, - ldb: ::libc::c_int, - batchCount: ::libc::c_int, + mode: cublasSideMode_t, + m: i64, + n: i64, + A: *const cuDoubleComplex, + lda: i64, + x: *const cuDoubleComplex, + incx: i64, + C: *mut cuDoubleComplex, + ldc: i64, ) -> cublasStatus_t; } extern "C" { @@ -11196,62 +16753,6 @@ extern "C" { batchSize: ::libc::c_int, ) -> cublasStatus_t; } -extern "C" { - pub fn cublasSdgmm( - handle: cublasHandle_t, - mode: cublasSideMode_t, - m: ::libc::c_int, - n: ::libc::c_int, - A: *const f32, - lda: ::libc::c_int, - x: *const f32, - incx: ::libc::c_int, - C: *mut f32, - ldc: ::libc::c_int, - ) -> cublasStatus_t; -} -extern "C" { - pub fn cublasDdgmm( - handle: cublasHandle_t, - mode: cublasSideMode_t, - m: ::libc::c_int, - n: ::libc::c_int, - A: *const f64, - lda: ::libc::c_int, - x: *const f64, - incx: ::libc::c_int, - C: *mut f64, - ldc: ::libc::c_int, - ) -> cublasStatus_t; -} -extern "C" { - pub fn cublasCdgmm( - handle: cublasHandle_t, - mode: cublasSideMode_t, - m: ::libc::c_int, - n: ::libc::c_int, - A: *const cuComplex, - lda: ::libc::c_int, - x: *const cuComplex, - incx: ::libc::c_int, - C: *mut cuComplex, - ldc: ::libc::c_int, - ) -> cublasStatus_t; -} -extern "C" { - pub fn cublasZdgmm( - handle: cublasHandle_t, - mode: cublasSideMode_t, - m: ::libc::c_int, - n: ::libc::c_int, - A: *const cuDoubleComplex, - lda: ::libc::c_int, - x: *const cuDoubleComplex, - incx: ::libc::c_int, - C: *mut cuDoubleComplex, - ldc: ::libc::c_int, - ) -> cublasStatus_t; -} extern "C" { pub fn cublasStpttr( handle: cublasHandle_t, @@ -11332,3 +16833,181 @@ extern "C" { AP: *mut cuDoubleComplex, ) -> cublasStatus_t; } +extern "C" { + pub fn cublasSgetrfBatched( + handle: cublasHandle_t, + n: ::libc::c_int, + A: *const *mut f32, + lda: ::libc::c_int, + P: *mut ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasDgetrfBatched( + handle: cublasHandle_t, + n: ::libc::c_int, + A: *const *mut f64, + lda: ::libc::c_int, + P: *mut ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasCgetrfBatched( + handle: cublasHandle_t, + n: ::libc::c_int, + A: *const *mut cuComplex, + lda: ::libc::c_int, + P: *mut ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasZgetrfBatched( + handle: cublasHandle_t, + n: ::libc::c_int, + A: *const *mut cuDoubleComplex, + lda: ::libc::c_int, + P: *mut ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasSgetriBatched( + handle: cublasHandle_t, + n: ::libc::c_int, + A: *const *const f32, + lda: ::libc::c_int, + P: *const ::libc::c_int, + C: *const *mut f32, + ldc: ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasDgetriBatched( + handle: cublasHandle_t, + n: ::libc::c_int, + A: *const *const f64, + lda: ::libc::c_int, + P: *const ::libc::c_int, + C: *const *mut f64, + ldc: ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasCgetriBatched( + handle: cublasHandle_t, + n: ::libc::c_int, + A: *const *const cuComplex, + lda: ::libc::c_int, + P: *const ::libc::c_int, + C: *const *mut cuComplex, + ldc: ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasZgetriBatched( + handle: cublasHandle_t, + n: ::libc::c_int, + A: *const *const cuDoubleComplex, + lda: ::libc::c_int, + P: *const ::libc::c_int, + C: *const *mut cuDoubleComplex, + ldc: ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasSgetrsBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + n: ::libc::c_int, + nrhs: ::libc::c_int, + Aarray: *const *const f32, + lda: ::libc::c_int, + devIpiv: *const ::libc::c_int, + Barray: *const *mut f32, + ldb: ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasDgetrsBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + n: ::libc::c_int, + nrhs: ::libc::c_int, + Aarray: *const *const f64, + lda: ::libc::c_int, + devIpiv: *const ::libc::c_int, + Barray: *const *mut f64, + ldb: ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasCgetrsBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + n: ::libc::c_int, + nrhs: ::libc::c_int, + Aarray: *const *const cuComplex, + lda: ::libc::c_int, + devIpiv: *const ::libc::c_int, + Barray: *const *mut cuComplex, + ldb: ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasZgetrsBatched( + handle: cublasHandle_t, + trans: cublasOperation_t, + n: ::libc::c_int, + nrhs: ::libc::c_int, + Aarray: *const *const cuDoubleComplex, + lda: ::libc::c_int, + devIpiv: *const ::libc::c_int, + Barray: *const *mut cuDoubleComplex, + ldb: ::libc::c_int, + info: *mut ::libc::c_int, + batchSize: ::libc::c_int, + ) -> cublasStatus_t; +} +extern "C" { + pub fn cublasUint8gemmBias( + handle: cublasHandle_t, + transa: cublasOperation_t, + transb: cublasOperation_t, + transc: cublasOperation_t, + m: ::libc::c_int, + n: ::libc::c_int, + k: ::libc::c_int, + A: *const ::libc::c_uchar, + A_bias: ::libc::c_int, + lda: ::libc::c_int, + B: *const ::libc::c_uchar, + B_bias: ::libc::c_int, + ldb: ::libc::c_int, + C: *mut ::libc::c_uchar, + C_bias: ::libc::c_int, + ldc: ::libc::c_int, + C_mult: ::libc::c_int, + C_shift: ::libc::c_int, + ) -> cublasStatus_t; +} diff --git a/rcudnn/cudnn-sys/Cargo.toml b/rcudnn/cudnn-sys/Cargo.toml index 197e9f44b..a7feb0df3 100644 --- a/rcudnn/cudnn-sys/Cargo.toml +++ b/rcudnn/cudnn-sys/Cargo.toml @@ -19,7 +19,7 @@ libc = "0.2" [build-dependencies] pkg-config = "0.3" -bindgen = { version = "^0.60.1", optional = true } +bindgen = { version = "^0.69.4", features = ["prettyplease"], optional = true } [features] default = [] diff --git a/rcudnn/cudnn-sys/build.rs b/rcudnn/cudnn-sys/build.rs index 81610d6d9..5f904944c 100644 --- a/rcudnn/cudnn-sys/build.rs +++ b/rcudnn/cudnn-sys/build.rs @@ -84,8 +84,8 @@ fn main() { .allowlist_function("cu.*") .allowlist_var("CUDNN.*") .allowlist_type("[Cc][Uu].*") - .parse_callbacks(Box::new(bindgen::CargoCallbacks)) - .rustfmt_bindings(true) + .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) + .formatter(bindgen::Formatter::Prettyplease) .generate() .expect("Unable to generate bindings"); diff --git a/rcudnn/cudnn-sys/src/generated.rs b/rcudnn/cudnn-sys/src/generated.rs index 467260d45..da5a2afc6 100644 --- a/rcudnn/cudnn-sys/src/generated.rs +++ b/rcudnn/cudnn-sys/src/generated.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.60.1 */ +/* automatically generated by rust-bindgen 0.69.4 */ //! Defines the FFI for CUDA cuDNN. @@ -8,25 +8,28 @@ #![allow(non_upper_case_globals)] -pub const CUDNN_MAJOR: u32 = 8; -pub const CUDNN_MINOR: u32 = 3; -pub const CUDNN_PATCHLEVEL: u32 = 3; -pub const CUDNN_VERSION: u32 = 8303; -pub const CUDNN_OPS_INFER_MAJOR: u32 = 8; -pub const CUDNN_OPS_INFER_MINOR: u32 = 3; -pub const CUDNN_OPS_INFER_PATCH: u32 = 3; +pub const CUDNN_MAJOR: u32 = 9; +pub const CUDNN_MINOR: u32 = 0; +pub const CUDNN_PATCHLEVEL: u32 = 0; +pub const CUDNN_VERSION: u32 = 90000; +pub const CUDNN_MAX_SM_MAJOR_NUMBER: u32 = 9; +pub const CUDNN_MAX_SM_MINOR_NUMBER: u32 = 0; +pub const CUDNN_MAX_DEVICE_VERSION: u32 = 900; +pub const CUDNN_GRAPH_MAJOR: u32 = 9; +pub const CUDNN_GRAPH_MINOR: u32 = 0; +pub const CUDNN_GRAPH_PATCH: u32 = 0; pub const CUDNN_DIM_MAX: u32 = 8; +pub const CUDNN_OPS_MAJOR: u32 = 9; +pub const CUDNN_OPS_MINOR: u32 = 0; +pub const CUDNN_OPS_PATCH: u32 = 0; pub const CUDNN_LRN_MIN_N: u32 = 1; pub const CUDNN_LRN_MAX_N: u32 = 16; pub const CUDNN_LRN_MIN_K: f64 = 0.00001; pub const CUDNN_LRN_MIN_BETA: f64 = 0.01; pub const CUDNN_BN_MIN_EPSILON: f64 = 0.0; -pub const CUDNN_OPS_TRAIN_MAJOR: u32 = 8; -pub const CUDNN_OPS_TRAIN_MINOR: u32 = 3; -pub const CUDNN_OPS_TRAIN_PATCH: u32 = 3; -pub const CUDNN_ADV_INFER_MAJOR: u32 = 8; -pub const CUDNN_ADV_INFER_MINOR: u32 = 3; -pub const CUDNN_ADV_INFER_PATCH: u32 = 3; +pub const CUDNN_ADV_MAJOR: u32 = 9; +pub const CUDNN_ADV_MINOR: u32 = 0; +pub const CUDNN_ADV_PATCH: u32 = 0; pub const CUDNN_RNN_PADDED_IO_DISABLED: u32 = 0; pub const CUDNN_RNN_PADDED_IO_ENABLED: u32 = 1; pub const CUDNN_SEQDATA_DIM_COUNT: u32 = 4; @@ -35,15 +38,9 @@ pub const CUDNN_ATTN_QUERYMAP_ONE_TO_ONE: u32 = 1; pub const CUDNN_ATTN_DISABLE_PROJ_BIASES: u32 = 0; pub const CUDNN_ATTN_ENABLE_PROJ_BIASES: u32 = 2; pub const CUDNN_ATTN_WKIND_COUNT: u32 = 8; -pub const CUDNN_ADV_TRAIN_MAJOR: u32 = 8; -pub const CUDNN_ADV_TRAIN_MINOR: u32 = 3; -pub const CUDNN_ADV_TRAIN_PATCH: u32 = 3; -pub const CUDNN_CNN_INFER_MAJOR: u32 = 8; -pub const CUDNN_CNN_INFER_MINOR: u32 = 3; -pub const CUDNN_CNN_INFER_PATCH: u32 = 3; -pub const CUDNN_CNN_TRAIN_MAJOR: u32 = 8; -pub const CUDNN_CNN_TRAIN_MINOR: u32 = 3; -pub const CUDNN_CNN_TRAIN_PATCH: u32 = 3; +pub const CUDNN_CNN_MAJOR: u32 = 9; +pub const CUDNN_CNN_MINOR: u32 = 0; +pub const CUDNN_CNN_PATCH: u32 = 0; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] @@ -62,52 +59,33 @@ pub struct dim3 { } #[test] fn bindgen_test_layout_dim3() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(dim3)) + concat!("Size of: ", stringify!(dim3)), ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(dim3)) - ); - fn test_field_x() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize - }, - 0usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(x)) - ); - } - test_field_x(); - fn test_field_y() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize - }, - 4usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(y)) - ); - } - test_field_y(); - fn test_field_z() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize - }, - 8usize, - concat!("Offset of field: ", stringify!(dim3), "::", stringify!(z)) - ); - } - test_field_z(); + concat!("Alignment of ", stringify!(dim3)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, + 0usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(x)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, + 4usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(y)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, + 8usize, + concat!("Offset of field: ", stringify!(dim3), "::", stringify!(z)), + ); } #[repr(u32)] #[non_exhaustive] @@ -184,6 +162,7 @@ pub enum cudaError { cudaErrorUnsupportedPtxVersion = 222, cudaErrorJitCompilationDisabled = 223, cudaErrorUnsupportedExecAffinity = 224, + cudaErrorUnsupportedDevSideSync = 225, cudaErrorInvalidSource = 300, cudaErrorFileNotFound = 301, cudaErrorSharedObjectSymbolNotFound = 302, @@ -191,6 +170,7 @@ pub enum cudaError { cudaErrorOperatingSystem = 304, cudaErrorInvalidResourceHandle = 400, cudaErrorIllegalState = 401, + cudaErrorLossyQuery = 402, cudaErrorSymbolNotFound = 500, cudaErrorNotReady = 600, cudaErrorIllegalAddress = 700, @@ -222,6 +202,9 @@ pub enum cudaError { cudaErrorMpsServerNotReady = 807, cudaErrorMpsMaxClientsReached = 808, cudaErrorMpsMaxConnectionsReached = 809, + cudaErrorMpsClientTerminated = 810, + cudaErrorCdpNotSupported = 811, + cudaErrorCdpVersionMismatch = 812, cudaErrorStreamCaptureUnsupported = 900, cudaErrorStreamCaptureInvalidated = 901, cudaErrorStreamCaptureMerge = 902, @@ -234,6 +217,7 @@ pub enum cudaError { cudaErrorTimeout = 909, cudaErrorGraphExecUpdateFailure = 910, cudaErrorExternalDevice = 911, + cudaErrorInvalidClusterSize = 912, cudaErrorUnknown = 999, cudaErrorApiFailureBase = 10000, } @@ -284,101 +268,68 @@ pub struct cudaChannelFormatDesc { } #[test] fn bindgen_test_layout_cudaChannelFormatDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 20usize, - concat!("Size of: ", stringify!(cudaChannelFormatDesc)) + concat!("Size of: ", stringify!(cudaChannelFormatDesc)), ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(cudaChannelFormatDesc)) - ); - fn test_field_x() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(x) - ) - ); - } - test_field_x(); - fn test_field_y() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(y) - ) - ); - } - test_field_y(); - fn test_field_z() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(z) - ) - ); - } - test_field_z(); - fn test_field_w() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(w) - ) - ); - } - test_field_w(); - fn test_field_f() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaChannelFormatDesc), - "::", - stringify!(f) - ) - ); - } - test_field_f(); + concat!("Alignment of ", stringify!(cudaChannelFormatDesc)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(x), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(y), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(z), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).w) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(w), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaChannelFormatDesc), + "::", + stringify!(f), + ), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -412,174 +363,115 @@ pub struct cudaArraySparseProperties__bindgen_ty_1 { } #[test] fn bindgen_test_layout_cudaArraySparseProperties__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, - concat!( - "Size of: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1) - ) + concat!("Size of: ", stringify!(cudaArraySparseProperties__bindgen_ty_1)), ); assert_eq!( ::std::mem::align_of::(), 4usize, + concat!("Alignment of ", stringify!(cudaArraySparseProperties__bindgen_ty_1)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(width), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 4usize, concat!( - "Alignment of ", - stringify!(cudaArraySparseProperties__bindgen_ty_1) - ) - ); - fn test_field_width() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(width) - ) - ); - } - test_field_width(); - fn test_field_height() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(height) - ) - ); - } - test_field_height(); - fn test_field_depth() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties__bindgen_ty_1), - "::", - stringify!(depth) - ) - ); - } - test_field_depth(); + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(height), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties__bindgen_ty_1), + "::", + stringify!(depth), + ), + ); } #[test] fn bindgen_test_layout_cudaArraySparseProperties() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(cudaArraySparseProperties)) + concat!("Size of: ", stringify!(cudaArraySparseProperties)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaArraySparseProperties)) - ); - fn test_field_tileExtent() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tileExtent) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(tileExtent) - ) - ); - } - test_field_tileExtent(); - fn test_field_miptailFirstLevel() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).miptailFirstLevel) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(miptailFirstLevel) - ) - ); - } - test_field_miptailFirstLevel(); - fn test_field_miptailSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).miptailSize) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(miptailSize) - ) - ); - } - test_field_miptailSize(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudaArraySparseProperties), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); + concat!("Alignment of ", stringify!(cudaArraySparseProperties)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tileExtent) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(tileExtent), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).miptailFirstLevel) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(miptailFirstLevel), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).miptailSize) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(miptailSize), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(flags), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudaArraySparseProperties), + "::", + stringify!(reserved), + ), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -590,67 +482,48 @@ pub struct cudaArrayMemoryRequirements { } #[test] fn bindgen_test_layout_cudaArrayMemoryRequirements() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(cudaArrayMemoryRequirements)) + concat!("Size of: ", stringify!(cudaArrayMemoryRequirements)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaArrayMemoryRequirements)) - ); - fn test_field_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaArrayMemoryRequirements), - "::", - stringify!(size) - ) - ); - } - test_field_size(); - fn test_field_alignment() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).alignment) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaArrayMemoryRequirements), - "::", - stringify!(alignment) - ) - ); - } - test_field_alignment(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaArrayMemoryRequirements), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); + concat!("Alignment of ", stringify!(cudaArrayMemoryRequirements)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(size), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).alignment) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(alignment), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaArrayMemoryRequirements), + "::", + stringify!(reserved), + ), + ); } #[repr(u32)] #[non_exhaustive] @@ -681,84 +554,38 @@ pub struct cudaPitchedPtr { } #[test] fn bindgen_test_layout_cudaPitchedPtr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(cudaPitchedPtr)) + concat!("Size of: ", stringify!(cudaPitchedPtr)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaPitchedPtr)) - ); - fn test_field_ptr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(ptr) - ) - ); - } - test_field_ptr(); - fn test_field_pitch() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(pitch) - ) - ); - } - test_field_pitch(); - fn test_field_xsize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).xsize) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(xsize) - ) - ); - } - test_field_xsize(); - fn test_field_ysize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ysize) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaPitchedPtr), - "::", - stringify!(ysize) - ) - ); - } - test_field_ysize(); + concat!("Alignment of ", stringify!(cudaPitchedPtr)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ptr) as usize - ptr as usize }, + 0usize, + concat!("Offset of field: ", stringify!(cudaPitchedPtr), "::", stringify!(ptr)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, + 8usize, + concat!("Offset of field: ", stringify!(cudaPitchedPtr), "::", stringify!(pitch)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xsize) as usize - ptr as usize }, + 16usize, + concat!("Offset of field: ", stringify!(cudaPitchedPtr), "::", stringify!(xsize)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ysize) as usize - ptr as usize }, + 24usize, + concat!("Offset of field: ", stringify!(cudaPitchedPtr), "::", stringify!(ysize)), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -769,67 +596,33 @@ pub struct cudaExtent { } #[test] fn bindgen_test_layout_cudaExtent() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(cudaExtent)) + concat!("Size of: ", stringify!(cudaExtent)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaExtent)) - ); - fn test_field_width() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(width) - ) - ); - } - test_field_width(); - fn test_field_height() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(height) - ) - ); - } - test_field_height(); - fn test_field_depth() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExtent), - "::", - stringify!(depth) - ) - ); - } - test_field_depth(); + concat!("Alignment of ", stringify!(cudaExtent)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 0usize, + concat!("Offset of field: ", stringify!(cudaExtent), "::", stringify!(width)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 8usize, + concat!("Offset of field: ", stringify!(cudaExtent), "::", stringify!(height)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, + 16usize, + concat!("Offset of field: ", stringify!(cudaExtent), "::", stringify!(depth)), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -840,67 +633,33 @@ pub struct cudaPos { } #[test] fn bindgen_test_layout_cudaPos() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(cudaPos)) + concat!("Size of: ", stringify!(cudaPos)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaPos)) - ); - fn test_field_x() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(x) - ) - ); - } - test_field_x(); - fn test_field_y() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(y) - ) - ); - } - test_field_y(); - fn test_field_z() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPos), - "::", - stringify!(z) - ) - ); - } - test_field_z(); + concat!("Alignment of ", stringify!(cudaPos)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, + 0usize, + concat!("Offset of field: ", stringify!(cudaPos), "::", stringify!(x)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, + 8usize, + concat!("Offset of field: ", stringify!(cudaPos), "::", stringify!(y)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, + 16usize, + concat!("Offset of field: ", stringify!(cudaPos), "::", stringify!(z)), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -916,152 +675,150 @@ pub struct cudaMemcpy3DParms { } #[test] fn bindgen_test_layout_cudaMemcpy3DParms() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 160usize, - concat!("Size of: ", stringify!(cudaMemcpy3DParms)) + concat!("Size of: ", stringify!(cudaMemcpy3DParms)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaMemcpy3DParms)) - ); - fn test_field_srcArray() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcArray) - ) - ); - } - test_field_srcArray(); - fn test_field_srcPos() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcPos) - ) - ); - } - test_field_srcPos(); - fn test_field_srcPtr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(srcPtr) - ) - ); - } - test_field_srcPtr(); - fn test_field_dstArray() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstArray) - ) - ); - } - test_field_dstArray(); - fn test_field_dstPos() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstPos) - ) - ); - } - test_field_dstPos(); - fn test_field_dstPtr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(dstPtr) - ) - ); - } - test_field_dstPtr(); - fn test_field_extent() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(extent) - ) - ); - } - test_field_extent(); - fn test_field_kind() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).kind) as usize - ptr as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DParms), - "::", - stringify!(kind) - ) - ); - } - test_field_kind(); + concat!("Alignment of ", stringify!(cudaMemcpy3DParms)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcPos), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(srcPtr), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstPos), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(dstPtr), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(extent), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).kind) as usize - ptr as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DParms), + "::", + stringify!(kind), + ), + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaMemcpyNodeParams { + pub flags: ::libc::c_int, + pub reserved: [::libc::c_int; 3usize], + pub copyParams: cudaMemcpy3DParms, +} +#[test] +fn bindgen_test_layout_cudaMemcpyNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 176usize, + concat!("Size of: ", stringify!(cudaMemcpyNodeParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaMemcpyNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpyNodeParams), + "::", + stringify!(flags), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpyNodeParams), + "::", + stringify!(reserved), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).copyParams) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpyNodeParams), + "::", + stringify!(copyParams), + ), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1078,169 +835,108 @@ pub struct cudaMemcpy3DPeerParms { } #[test] fn bindgen_test_layout_cudaMemcpy3DPeerParms() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 168usize, - concat!("Size of: ", stringify!(cudaMemcpy3DPeerParms)) + concat!("Size of: ", stringify!(cudaMemcpy3DPeerParms)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaMemcpy3DPeerParms)) - ); - fn test_field_srcArray() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcArray) - ) - ); - } - test_field_srcArray(); - fn test_field_srcPos() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcPos) - ) - ); - } - test_field_srcPos(); - fn test_field_srcPtr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcPtr) - ) - ); - } - test_field_srcPtr(); - fn test_field_srcDevice() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).srcDevice) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(srcDevice) - ) - ); - } - test_field_srcDevice(); - fn test_field_dstArray() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstArray) - ) - ); - } - test_field_dstArray(); - fn test_field_dstPos() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstPos) - ) - ); - } - test_field_dstPos(); - fn test_field_dstPtr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstPtr) - ) - ); - } - test_field_dstPtr(); - fn test_field_dstDevice() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dstDevice) as usize - ptr as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(dstDevice) - ) - ); - } - test_field_dstDevice(); - fn test_field_extent() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(cudaMemcpy3DPeerParms), - "::", - stringify!(extent) - ) - ); - } - test_field_extent(); + concat!("Alignment of ", stringify!(cudaMemcpy3DPeerParms)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcPos) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcPos), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcPtr) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcPtr), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).srcDevice) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(srcDevice), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstArray) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstPos) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstPos), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstPtr) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstPtr), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dstDevice) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(dstDevice), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(cudaMemcpy3DPeerParms), + "::", + stringify!(extent), + ), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1254,118 +950,158 @@ pub struct cudaMemsetParams { } #[test] fn bindgen_test_layout_cudaMemsetParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, - concat!("Size of: ", stringify!(cudaMemsetParams)) + concat!("Size of: ", stringify!(cudaMemsetParams)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaMemsetParams)) - ); - fn test_field_dst() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(dst) - ) - ); - } - test_field_dst(); - fn test_field_pitch() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(pitch) - ) - ); - } - test_field_pitch(); - fn test_field_value() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(value) - ) - ); - } - test_field_value(); - fn test_field_elementSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).elementSize) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(elementSize) - ) - ); - } - test_field_elementSize(); - fn test_field_width() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(width) - ) - ); - } - test_field_width(); - fn test_field_height() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaMemsetParams), - "::", - stringify!(height) - ) - ); - } - test_field_height(); + concat!("Alignment of ", stringify!(cudaMemsetParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize }, + 0usize, + concat!("Offset of field: ", stringify!(cudaMemsetParams), "::", stringify!(dst)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(pitch), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(value), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).elementSize) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(elementSize), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(width), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParams), + "::", + stringify!(height), + ), + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaMemsetParamsV2 { + pub dst: *mut ::libc::c_void, + pub pitch: usize, + pub value: ::libc::c_uint, + pub elementSize: ::libc::c_uint, + pub width: usize, + pub height: usize, +} +#[test] +fn bindgen_test_layout_cudaMemsetParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaMemsetParamsV2)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaMemsetParamsV2)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dst) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(dst), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pitch) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(pitch), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(value), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).elementSize) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(elementSize), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(width), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemsetParamsV2), + "::", + stringify!(height), + ), + ); } #[repr(u32)] #[non_exhaustive] @@ -1386,155 +1122,153 @@ pub struct cudaAccessPolicyWindow { } #[test] fn bindgen_test_layout_cudaAccessPolicyWindow() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, - concat!("Size of: ", stringify!(cudaAccessPolicyWindow)) + concat!("Size of: ", stringify!(cudaAccessPolicyWindow)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaAccessPolicyWindow)) - ); - fn test_field_base_ptr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).base_ptr) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(base_ptr) - ) - ); - } - test_field_base_ptr(); - fn test_field_num_bytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).num_bytes) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(num_bytes) - ) - ); - } - test_field_num_bytes(); - fn test_field_hitRatio() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).hitRatio) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(hitRatio) - ) - ); - } - test_field_hitRatio(); - fn test_field_hitProp() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).hitProp) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(hitProp) - ) - ); - } - test_field_hitProp(); - fn test_field_missProp() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).missProp) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaAccessPolicyWindow), - "::", - stringify!(missProp) - ) - ); - } - test_field_missProp(); -} -pub type cudaHostFn_t = ::std::option::Option; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaHostNodeParams { - pub fn_: cudaHostFn_t, - pub userData: *mut ::libc::c_void, + concat!("Alignment of ", stringify!(cudaAccessPolicyWindow)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).base_ptr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(base_ptr), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_bytes) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(num_bytes), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hitRatio) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(hitRatio), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hitProp) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(hitProp), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).missProp) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaAccessPolicyWindow), + "::", + stringify!(missProp), + ), + ); +} +pub type cudaHostFn_t = ::std::option::Option< + unsafe extern "C" fn(userData: *mut ::libc::c_void), +>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaHostNodeParams { + pub fn_: cudaHostFn_t, + pub userData: *mut ::libc::c_void, } #[test] fn bindgen_test_layout_cudaHostNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(cudaHostNodeParams)) + concat!("Size of: ", stringify!(cudaHostNodeParams)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaHostNodeParams)) - ); - fn test_field_fn() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaHostNodeParams), - "::", - stringify!(fn_) - ) - ); - } - test_field_fn(); - fn test_field_userData() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaHostNodeParams), - "::", - stringify!(userData) - ) - ); - } - test_field_userData(); + concat!("Alignment of ", stringify!(cudaHostNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParams), + "::", + stringify!(fn_), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParams), + "::", + stringify!(userData), + ), + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaHostNodeParamsV2 { + pub fn_: cudaHostFn_t, + pub userData: *mut ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaHostNodeParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(cudaHostNodeParamsV2)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaHostNodeParamsV2)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fn_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParamsV2), + "::", + stringify!(fn_), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).userData) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaHostNodeParamsV2), + "::", + stringify!(userData), + ), + ); } #[repr(u32)] #[non_exhaustive] @@ -1564,6 +1298,14 @@ pub enum cudaSynchronizationPolicy { #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaClusterSchedulingPolicy { + cudaClusterSchedulingPolicyDefault = 0, + cudaClusterSchedulingPolicySpread = 1, + cudaClusterSchedulingPolicyLoadBalancing = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub enum cudaStreamUpdateCaptureDependenciesFlags { cudaStreamAddCaptureDependencies = 0, cudaStreamSetCaptureDependencies = 1, @@ -1684,41 +1426,33 @@ pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_1 { } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaResourceDesc__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1) - ) + concat!("Size of: ", stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1)), ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1) - ) - ); - fn test_field_array() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(array) - ) - ); - } - test_field_array(); + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(array), + ), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1727,41 +1461,33 @@ pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_2 { } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit< + cudaResourceDesc__bindgen_ty_1__bindgen_ty_2, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, - concat!( - "Size of: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2) - ) + concat!("Size of: ", stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2)), ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2) - ) - ); - fn test_field_mipmap() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(mipmap) - ) - ); - } - test_field_mipmap(); + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(mipmap), + ), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1772,79 +1498,53 @@ pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_3 { } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit< + cudaResourceDesc__bindgen_ty_1__bindgen_ty_3, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, - concat!( - "Size of: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3) - ) + concat!("Size of: ", stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3)), ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3) - ) - ); - fn test_field_devPtr() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(devPtr) - ) - ); - } - test_field_devPtr(); - fn test_field_desc() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(desc) - ) - ); - } - test_field_desc(); - fn test_field_sizeInBytes() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sizeInBytes) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(sizeInBytes) - ) - ); - } - test_field_sizeInBytes(); + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(devPtr), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(desc), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sizeInBytes) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(sizeInBytes), + ), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -1857,245 +1557,158 @@ pub struct cudaResourceDesc__bindgen_ty_1__bindgen_ty_4 { } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1__bindgen_ty_4() { + const UNINIT: ::std::mem::MaybeUninit< + cudaResourceDesc__bindgen_ty_1__bindgen_ty_4, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, - concat!( - "Size of: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4) - ) + concat!("Size of: ", stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4)), ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!( "Alignment of ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4) - ) - ); - fn test_field_devPtr() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(devPtr) - ) - ); - } - test_field_devPtr(); - fn test_field_desc() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(desc) - ) - ); - } - test_field_desc(); - fn test_field_width() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(width) - ) - ); - } - test_field_width(); - fn test_field_height() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(height) - ) - ); - } - test_field_height(); - fn test_field_pitchInBytes() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit( - ); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pitchInBytes) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), - "::", - stringify!(pitchInBytes) - ) - ); - } - test_field_pitchInBytes(); + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).devPtr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(devPtr), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).desc) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(desc), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(width), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(height), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pitchInBytes) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(pitchInBytes), + ), + ); } #[test] fn bindgen_test_layout_cudaResourceDesc__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 56usize, - concat!("Size of: ", stringify!(cudaResourceDesc__bindgen_ty_1)) + concat!("Size of: ", stringify!(cudaResourceDesc__bindgen_ty_1)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaResourceDesc__bindgen_ty_1)) - ); - fn test_field_array() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(array) - ) - ); - } - test_field_array(); - fn test_field_mipmap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(mipmap) - ) - ); - } - test_field_mipmap(); - fn test_field_linear() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).linear) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(linear) - ) - ); - } - test_field_linear(); - fn test_field_pitch2D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pitch2D) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc__bindgen_ty_1), - "::", - stringify!(pitch2D) - ) - ); - } - test_field_pitch2D(); + concat!("Alignment of ", stringify!(cudaResourceDesc__bindgen_ty_1)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(array), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mipmap) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(mipmap), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).linear) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(linear), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pitch2D) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc__bindgen_ty_1), + "::", + stringify!(pitch2D), + ), + ); } #[test] fn bindgen_test_layout_cudaResourceDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, - concat!("Size of: ", stringify!(cudaResourceDesc)) + concat!("Size of: ", stringify!(cudaResourceDesc)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaResourceDesc)) - ); - fn test_field_resType() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).resType) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc), - "::", - stringify!(resType) - ) - ); - } - test_field_resType(); - fn test_field_res() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).res) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceDesc), - "::", - stringify!(res) - ) - ); - } - test_field_res(); + concat!("Alignment of ", stringify!(cudaResourceDesc)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).resType) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceDesc), + "::", + stringify!(resType), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).res) as usize - ptr as usize }, + 8usize, + concat!("Offset of field: ", stringify!(cudaResourceDesc), "::", stringify!(res)), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2111,152 +1724,98 @@ pub struct cudaResourceViewDesc { } #[test] fn bindgen_test_layout_cudaResourceViewDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, - concat!("Size of: ", stringify!(cudaResourceViewDesc)) + concat!("Size of: ", stringify!(cudaResourceViewDesc)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaResourceViewDesc)) - ); - fn test_field_format() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(format) - ) - ); - } - test_field_format(); - fn test_field_width() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(width) - ) - ); - } - test_field_width(); - fn test_field_height() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(height) - ) - ); - } - test_field_height(); - fn test_field_depth() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(depth) - ) - ); - } - test_field_depth(); - fn test_field_firstMipmapLevel() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).firstMipmapLevel) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(firstMipmapLevel) - ) - ); - } - test_field_firstMipmapLevel(); - fn test_field_lastMipmapLevel() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).lastMipmapLevel) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(lastMipmapLevel) - ) - ); - } - test_field_lastMipmapLevel(); - fn test_field_firstLayer() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).firstLayer) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(firstLayer) - ) - ); - } - test_field_firstLayer(); - fn test_field_lastLayer() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).lastLayer) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaResourceViewDesc), - "::", - stringify!(lastLayer) - ) - ); - } - test_field_lastLayer(); + concat!("Alignment of ", stringify!(cudaResourceViewDesc)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(format), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(width), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).height) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(height), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).depth) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(depth), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).firstMipmapLevel) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(firstMipmapLevel), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lastMipmapLevel) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(lastMipmapLevel), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).firstLayer) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(firstLayer), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lastLayer) as usize - ptr as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaResourceViewDesc), + "::", + stringify!(lastLayer), + ), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2268,84 +1827,58 @@ pub struct cudaPointerAttributes { } #[test] fn bindgen_test_layout_cudaPointerAttributes() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, - concat!("Size of: ", stringify!(cudaPointerAttributes)) + concat!("Size of: ", stringify!(cudaPointerAttributes)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaPointerAttributes)) - ); - fn test_field_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(type_) - ) - ); - } - test_field_type(); - fn test_field_device() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).device) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(device) - ) - ); - } - test_field_device(); - fn test_field_devicePointer() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).devicePointer) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(devicePointer) - ) - ); - } - test_field_devicePointer(); - fn test_field_hostPointer() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).hostPointer) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaPointerAttributes), - "::", - stringify!(hostPointer) - ) - ); - } - test_field_hostPointer(); + concat!("Alignment of ", stringify!(cudaPointerAttributes)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(type_), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).device) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(device), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).devicePointer) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(devicePointer), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hostPointer) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaPointerAttributes), + "::", + stringify!(hostPointer), + ), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2360,189 +1893,219 @@ pub struct cudaFuncAttributes { pub cacheModeCA: ::libc::c_int, pub maxDynamicSharedSizeBytes: ::libc::c_int, pub preferredShmemCarveout: ::libc::c_int, + pub clusterDimMustBeSet: ::libc::c_int, + pub requiredClusterWidth: ::libc::c_int, + pub requiredClusterHeight: ::libc::c_int, + pub requiredClusterDepth: ::libc::c_int, + pub clusterSchedulingPolicyPreference: ::libc::c_int, + pub nonPortableClusterSizeAllowed: ::libc::c_int, + pub reserved: [::libc::c_int; 16usize], } #[test] fn bindgen_test_layout_cudaFuncAttributes() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(cudaFuncAttributes)) + 144usize, + concat!("Size of: ", stringify!(cudaFuncAttributes)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaFuncAttributes)) - ); - fn test_field_sharedSizeBytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedSizeBytes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(sharedSizeBytes) - ) - ); - } - test_field_sharedSizeBytes(); - fn test_field_constSizeBytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).constSizeBytes) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(constSizeBytes) - ) - ); - } - test_field_constSizeBytes(); - fn test_field_localSizeBytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).localSizeBytes) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(localSizeBytes) - ) - ); - } - test_field_localSizeBytes(); - fn test_field_maxThreadsPerBlock() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(maxThreadsPerBlock) - ) - ); - } - test_field_maxThreadsPerBlock(); - fn test_field_numRegs() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numRegs) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(numRegs) - ) - ); - } - test_field_numRegs(); - fn test_field_ptxVersion() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ptxVersion) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(ptxVersion) - ) - ); - } - test_field_ptxVersion(); - fn test_field_binaryVersion() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).binaryVersion) as usize - ptr as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(binaryVersion) - ) - ); - } - test_field_binaryVersion(); - fn test_field_cacheModeCA() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cacheModeCA) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(cacheModeCA) - ) - ); - } - test_field_cacheModeCA(); - fn test_field_maxDynamicSharedSizeBytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxDynamicSharedSizeBytes) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(maxDynamicSharedSizeBytes) - ) - ); - } - test_field_maxDynamicSharedSizeBytes(); - fn test_field_preferredShmemCarveout() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).preferredShmemCarveout) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaFuncAttributes), - "::", - stringify!(preferredShmemCarveout) - ) - ); - } - test_field_preferredShmemCarveout(); + concat!("Alignment of ", stringify!(cudaFuncAttributes)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharedSizeBytes) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(sharedSizeBytes), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).constSizeBytes) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(constSizeBytes), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).localSizeBytes) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(localSizeBytes), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(maxThreadsPerBlock), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numRegs) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(numRegs), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ptxVersion) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(ptxVersion), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).binaryVersion) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(binaryVersion), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cacheModeCA) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(cacheModeCA), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).maxDynamicSharedSizeBytes) as usize + - ptr as usize + }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(maxDynamicSharedSizeBytes), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).preferredShmemCarveout) as usize - ptr as usize + }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(preferredShmemCarveout), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).clusterDimMustBeSet) as usize - ptr as usize + }, + 52usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(clusterDimMustBeSet), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).requiredClusterWidth) as usize - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(requiredClusterWidth), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).requiredClusterHeight) as usize - ptr as usize + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(requiredClusterHeight), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).requiredClusterDepth) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(requiredClusterDepth), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).clusterSchedulingPolicyPreference) as usize + - ptr as usize + }, + 68usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(clusterSchedulingPolicyPreference), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).nonPortableClusterSizeAllowed) as usize + - ptr as usize + }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(nonPortableClusterSizeAllowed), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(cudaFuncAttributes), + "::", + stringify!(reserved), + ), + ); } #[repr(u32)] #[non_exhaustive] @@ -2550,7 +2113,13 @@ fn bindgen_test_layout_cudaFuncAttributes() { pub enum cudaFuncAttribute { cudaFuncAttributeMaxDynamicSharedMemorySize = 8, cudaFuncAttributePreferredSharedMemoryCarveout = 9, - cudaFuncAttributeMax = 10, + cudaFuncAttributeClusterDimMustBeSet = 10, + cudaFuncAttributeRequiredClusterWidth = 11, + cudaFuncAttributeRequiredClusterHeight = 12, + cudaFuncAttributeRequiredClusterDepth = 13, + cudaFuncAttributeNonPortableClusterSizeAllowed = 14, + cudaFuncAttributeClusterSchedulingPolicyPreference = 15, + cudaFuncAttributeMax = 16, } #[repr(u32)] #[non_exhaustive] @@ -2617,13 +2186,10 @@ pub enum cudaMemRangeAttribute { cudaMemRangeAttributePreferredLocation = 2, cudaMemRangeAttributeAccessedBy = 3, cudaMemRangeAttributeLastPrefetchLocation = 4, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaOutputMode { - cudaKeyValuePair = 0, - cudaCSV = 1, + cudaMemRangeAttributePreferredLocationType = 5, + cudaMemRangeAttributePreferredLocationId = 6, + cudaMemRangeAttributeLastPrefetchLocationType = 7, + cudaMemRangeAttributeLastPrefetchLocationId = 8, } #[repr(u32)] #[non_exhaustive] @@ -2654,8 +2220,7 @@ pub enum cudaFlushGPUDirectRDMAWritesTarget { cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = 0, } impl cudaDeviceAttr { - pub const cudaDevAttrMaxTimelineSemaphoreInteropSupported: cudaDeviceAttr = - cudaDeviceAttr::cudaDevAttrTimelineSemaphoreInteropSupported; + pub const cudaDevAttrMaxTimelineSemaphoreInteropSupported: cudaDeviceAttr = cudaDeviceAttr::cudaDevAttrTimelineSemaphoreInteropSupported; } #[repr(u32)] #[non_exhaustive] @@ -2773,8 +2338,22 @@ pub enum cudaDeviceAttr { cudaDevAttrGPUDirectRDMAFlushWritesOptions = 117, cudaDevAttrGPUDirectRDMAWritesOrdering = 118, cudaDevAttrMemoryPoolSupportedHandleTypes = 119, + cudaDevAttrClusterLaunch = 120, cudaDevAttrDeferredMappingCudaArraySupported = 121, - cudaDevAttrMax = 122, + cudaDevAttrReserved122 = 122, + cudaDevAttrReserved123 = 123, + cudaDevAttrReserved124 = 124, + cudaDevAttrIpcEventSupport = 125, + cudaDevAttrMemSyncDomainCount = 126, + cudaDevAttrReserved127 = 127, + cudaDevAttrReserved128 = 128, + cudaDevAttrReserved129 = 129, + cudaDevAttrNumaConfig = 130, + cudaDevAttrNumaId = 131, + cudaDevAttrReserved132 = 132, + cudaDevAttrMpsEnabled = 133, + cudaDevAttrHostNumaId = 134, + cudaDevAttrMax = 135, } #[repr(u32)] #[non_exhaustive] @@ -2795,6 +2374,9 @@ pub enum cudaMemPoolAttr { pub enum cudaMemLocationType { cudaMemLocationTypeInvalid = 0, cudaMemLocationTypeDevice = 1, + cudaMemLocationTypeHost = 2, + cudaMemLocationTypeHostNuma = 3, + cudaMemLocationTypeHostNumaCurrent = 4, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2804,50 +2386,33 @@ pub struct cudaMemLocation { } #[test] fn bindgen_test_layout_cudaMemLocation() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, - concat!("Size of: ", stringify!(cudaMemLocation)) + concat!("Size of: ", stringify!(cudaMemLocation)), ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(cudaMemLocation)) - ); - fn test_field_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemLocation), - "::", - stringify!(type_) - ) - ); - } - test_field_type(); - fn test_field_id() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaMemLocation), - "::", - stringify!(id) - ) - ); - } - test_field_id(); + concat!("Alignment of ", stringify!(cudaMemLocation)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemLocation), + "::", + stringify!(type_), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, + 4usize, + concat!("Offset of field: ", stringify!(cudaMemLocation), "::", stringify!(id)), + ); } #[repr(u32)] #[non_exhaustive] @@ -2865,50 +2430,38 @@ pub struct cudaMemAccessDesc { } #[test] fn bindgen_test_layout_cudaMemAccessDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 12usize, - concat!("Size of: ", stringify!(cudaMemAccessDesc)) + concat!("Size of: ", stringify!(cudaMemAccessDesc)), ); assert_eq!( ::std::mem::align_of::(), 4usize, - concat!("Alignment of ", stringify!(cudaMemAccessDesc)) - ); - fn test_field_location() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAccessDesc), - "::", - stringify!(location) - ) - ); - } - test_field_location(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAccessDesc), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); + concat!("Alignment of ", stringify!(cudaMemAccessDesc)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAccessDesc), + "::", + stringify!(location), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAccessDesc), + "::", + stringify!(flags), + ), + ); } #[repr(u32)] #[non_exhaustive] @@ -2926,6 +2479,7 @@ pub enum cudaMemAllocationHandleType { cudaMemHandleTypePosixFileDescriptor = 1, cudaMemHandleTypeWin32 = 2, cudaMemHandleTypeWin32Kmt = 4, + cudaMemHandleTypeFabric = 8, } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -2934,140 +2488,115 @@ pub struct cudaMemPoolProps { pub handleTypes: cudaMemAllocationHandleType, pub location: cudaMemLocation, pub win32SecurityAttributes: *mut ::libc::c_void, - pub reserved: [::libc::c_uchar; 64usize], + pub maxSize: usize, + pub reserved: [::libc::c_uchar; 56usize], } #[test] fn bindgen_test_layout_cudaMemPoolProps() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 88usize, - concat!("Size of: ", stringify!(cudaMemPoolProps)) + concat!("Size of: ", stringify!(cudaMemPoolProps)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaMemPoolProps)) - ); - fn test_field_allocType() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).allocType) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(allocType) - ) - ); - } - test_field_allocType(); - fn test_field_handleTypes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).handleTypes) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(handleTypes) - ) - ); - } - test_field_handleTypes(); - fn test_field_location() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(location) - ) - ); - } - test_field_location(); - fn test_field_win32SecurityAttributes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).win32SecurityAttributes) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(win32SecurityAttributes) - ) - ); - } - test_field_win32SecurityAttributes(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolProps), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaMemPoolPtrExportData { + concat!("Alignment of ", stringify!(cudaMemPoolProps)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).allocType) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(allocType), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handleTypes) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(handleTypes), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).location) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(location), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).win32SecurityAttributes) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(win32SecurityAttributes), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).maxSize) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(maxSize), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolProps), + "::", + stringify!(reserved), + ), + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaMemPoolPtrExportData { pub reserved: [::libc::c_uchar; 64usize], } #[test] fn bindgen_test_layout_cudaMemPoolPtrExportData() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 64usize, - concat!("Size of: ", stringify!(cudaMemPoolPtrExportData)) + concat!("Size of: ", stringify!(cudaMemPoolPtrExportData)), ); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(cudaMemPoolPtrExportData)) - ); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemPoolPtrExportData), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); + concat!("Alignment of ", stringify!(cudaMemPoolPtrExportData)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemPoolPtrExportData), + "::", + stringify!(reserved), + ), + ); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3080,101 +2609,172 @@ pub struct cudaMemAllocNodeParams { } #[test] fn bindgen_test_layout_cudaMemAllocNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 120usize, - concat!("Size of: ", stringify!(cudaMemAllocNodeParams)) + concat!("Size of: ", stringify!(cudaMemAllocNodeParams)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaMemAllocNodeParams)) - ); - fn test_field_poolProps() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).poolProps) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(poolProps) - ) - ); - } - test_field_poolProps(); - fn test_field_accessDescs() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accessDescs) as usize - ptr as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(accessDescs) - ) - ); - } - test_field_accessDescs(); - fn test_field_accessDescCount() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accessDescCount) as usize - ptr as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(accessDescCount) - ) - ); - } - test_field_accessDescCount(); - fn test_field_bytesize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bytesize) as usize - ptr as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(bytesize) - ) - ); - } - test_field_bytesize(); - fn test_field_dptr() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).dptr) as usize - ptr as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(cudaMemAllocNodeParams), - "::", - stringify!(dptr) - ) - ); - } - test_field_dptr(); + concat!("Alignment of ", stringify!(cudaMemAllocNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).poolProps) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(poolProps), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accessDescs) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(accessDescs), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accessDescCount) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(accessDescCount), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bytesize) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(bytesize), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dptr) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParams), + "::", + stringify!(dptr), + ), + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaMemAllocNodeParamsV2 { + pub poolProps: cudaMemPoolProps, + pub accessDescs: *const cudaMemAccessDesc, + pub accessDescCount: usize, + pub bytesize: usize, + pub dptr: *mut ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaMemAllocNodeParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 120usize, + concat!("Size of: ", stringify!(cudaMemAllocNodeParamsV2)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaMemAllocNodeParamsV2)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).poolProps) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParamsV2), + "::", + stringify!(poolProps), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accessDescs) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParamsV2), + "::", + stringify!(accessDescs), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).accessDescCount) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParamsV2), + "::", + stringify!(accessDescCount), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bytesize) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParamsV2), + "::", + stringify!(bytesize), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dptr) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(cudaMemAllocNodeParamsV2), + "::", + stringify!(dptr), + ), + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaMemFreeNodeParams { + pub dptr: *mut ::libc::c_void, +} +#[test] +fn bindgen_test_layout_cudaMemFreeNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(cudaMemFreeNodeParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaMemFreeNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dptr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaMemFreeNodeParams), + "::", + stringify!(dptr), + ), + ); } #[repr(u32)] #[non_exhaustive] @@ -3201,33 +2801,23 @@ pub struct CUuuid_st { } #[test] fn bindgen_test_layout_CUuuid_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(CUuuid_st)) + concat!("Size of: ", stringify!(CUuuid_st)), ); assert_eq!( ::std::mem::align_of::(), 1usize, - concat!("Alignment of ", stringify!(CUuuid_st)) - ); - fn test_field_bytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(CUuuid_st), - "::", - stringify!(bytes) - ) - ); - } - test_field_bytes(); + concat!("Alignment of ", stringify!(CUuuid_st)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bytes) as usize - ptr as usize }, + 0usize, + concat!("Offset of field: ", stringify!(CUuuid_st), "::", stringify!(bytes)), + ); } pub type CUuuid = CUuuid_st; pub type cudaUUID_t = CUuuid_st; @@ -3314,6314 +2904,5724 @@ pub struct cudaDeviceProp { pub maxBlocksPerMultiProcessor: ::libc::c_int, pub accessPolicyMaxWindowSize: ::libc::c_int, pub reservedSharedMemPerBlock: usize, + pub hostRegisterSupported: ::libc::c_int, + pub sparseCudaArraySupported: ::libc::c_int, + pub hostRegisterReadOnlySupported: ::libc::c_int, + pub timelineSemaphoreInteropSupported: ::libc::c_int, + pub memoryPoolsSupported: ::libc::c_int, + pub gpuDirectRDMASupported: ::libc::c_int, + pub gpuDirectRDMAFlushWritesOptions: ::libc::c_uint, + pub gpuDirectRDMAWritesOrdering: ::libc::c_int, + pub memoryPoolSupportedHandleTypes: ::libc::c_uint, + pub deferredMappingCudaArraySupported: ::libc::c_int, + pub ipcEventSupported: ::libc::c_int, + pub clusterLaunch: ::libc::c_int, + pub unifiedFunctionPointers: ::libc::c_int, + pub reserved2: [::libc::c_int; 2usize], + pub reserved1: [::libc::c_int; 1usize], + pub reserved: [::libc::c_int; 60usize], } #[test] fn bindgen_test_layout_cudaDeviceProp() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), - 728usize, - concat!("Size of: ", stringify!(cudaDeviceProp)) + 1032usize, + concat!("Size of: ", stringify!(cudaDeviceProp)), ); assert_eq!( ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaDeviceProp)) - ); - fn test_field_name() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(name) - ) - ); - } - test_field_name(); - fn test_field_uuid() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize - }, - 256usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(uuid) - ) - ); - } - test_field_uuid(); - fn test_field_luid() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luid) as usize - ptr as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(luid) - ) - ); - } - test_field_luid(); - fn test_field_luidDeviceNodeMask() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).luidDeviceNodeMask) as usize - ptr as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(luidDeviceNodeMask) - ) - ); - } - test_field_luidDeviceNodeMask(); - fn test_field_totalGlobalMem() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).totalGlobalMem) as usize - ptr as usize - }, - 288usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(totalGlobalMem) - ) - ); - } - test_field_totalGlobalMem(); - fn test_field_sharedMemPerBlock() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedMemPerBlock) as usize - ptr as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerBlock) - ) - ); - } - test_field_sharedMemPerBlock(); - fn test_field_regsPerBlock() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).regsPerBlock) as usize - ptr as usize - }, - 304usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(regsPerBlock) - ) - ); - } - test_field_regsPerBlock(); - fn test_field_warpSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).warpSize) as usize - ptr as usize - }, - 308usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(warpSize) - ) - ); - } - test_field_warpSize(); - fn test_field_memPitch() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).memPitch) as usize - ptr as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memPitch) - ) - ); - } - test_field_memPitch(); - fn test_field_maxThreadsPerBlock() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize - }, - 320usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsPerBlock) - ) - ); - } - test_field_maxThreadsPerBlock(); - fn test_field_maxThreadsDim() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxThreadsDim) as usize - ptr as usize - }, - 324usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsDim) - ) - ); - } - test_field_maxThreadsDim(); - fn test_field_maxGridSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxGridSize) as usize - ptr as usize - }, - 336usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxGridSize) - ) - ); - } - test_field_maxGridSize(); - fn test_field_clockRate() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).clockRate) as usize - ptr as usize - }, - 348usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(clockRate) - ) - ); - } - test_field_clockRate(); - fn test_field_totalConstMem() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).totalConstMem) as usize - ptr as usize - }, - 352usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(totalConstMem) - ) - ); - } - test_field_totalConstMem(); - fn test_field_major() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(major) - ) - ); - } - test_field_major(); - fn test_field_minor() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize - }, - 364usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(minor) - ) - ); - } - test_field_minor(); - fn test_field_textureAlignment() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).textureAlignment) as usize - ptr as usize - }, - 368usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(textureAlignment) - ) - ); - } - test_field_textureAlignment(); - fn test_field_texturePitchAlignment() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).texturePitchAlignment) as usize - ptr as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(texturePitchAlignment) - ) - ); - } - test_field_texturePitchAlignment(); - fn test_field_deviceOverlap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).deviceOverlap) as usize - ptr as usize - }, - 384usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(deviceOverlap) - ) - ); - } - test_field_deviceOverlap(); - fn test_field_multiProcessorCount() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).multiProcessorCount) as usize - ptr as usize - }, - 388usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(multiProcessorCount) - ) - ); - } - test_field_multiProcessorCount(); - fn test_field_kernelExecTimeoutEnabled() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).kernelExecTimeoutEnabled) as usize - ptr as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(kernelExecTimeoutEnabled) - ) - ); - } - test_field_kernelExecTimeoutEnabled(); - fn test_field_integrated() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).integrated) as usize - ptr as usize - }, - 396usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(integrated) - ) - ); - } - test_field_integrated(); - fn test_field_canMapHostMemory() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).canMapHostMemory) as usize - ptr as usize - }, - 400usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(canMapHostMemory) - ) - ); - } - test_field_canMapHostMemory(); - fn test_field_computeMode() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).computeMode) as usize - ptr as usize - }, - 404usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(computeMode) - ) - ); - } - test_field_computeMode(); - fn test_field_maxTexture1D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture1D) as usize - ptr as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1D) - ) - ); - } - test_field_maxTexture1D(); - fn test_field_maxTexture1DMipmap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture1DMipmap) as usize - ptr as usize - }, - 412usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DMipmap) - ) - ); - } - test_field_maxTexture1DMipmap(); - fn test_field_maxTexture1DLinear() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture1DLinear) as usize - ptr as usize - }, - 416usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DLinear) - ) - ); - } - test_field_maxTexture1DLinear(); - fn test_field_maxTexture2D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture2D) as usize - ptr as usize - }, - 420usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2D) - ) - ); - } - test_field_maxTexture2D(); - fn test_field_maxTexture2DMipmap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture2DMipmap) as usize - ptr as usize - }, - 428usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DMipmap) - ) - ); - } - test_field_maxTexture2DMipmap(); - fn test_field_maxTexture2DLinear() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture2DLinear) as usize - ptr as usize - }, - 436usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DLinear) - ) - ); - } - test_field_maxTexture2DLinear(); - fn test_field_maxTexture2DGather() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture2DGather) as usize - ptr as usize - }, - 448usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DGather) - ) - ); - } - test_field_maxTexture2DGather(); - fn test_field_maxTexture3D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture3D) as usize - ptr as usize - }, - 456usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture3D) - ) - ); - } - test_field_maxTexture3D(); - fn test_field_maxTexture3DAlt() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture3DAlt) as usize - ptr as usize - }, - 468usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture3DAlt) - ) - ); - } - test_field_maxTexture3DAlt(); - fn test_field_maxTextureCubemap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTextureCubemap) as usize - ptr as usize - }, - 480usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTextureCubemap) - ) - ); - } - test_field_maxTextureCubemap(); - fn test_field_maxTexture1DLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture1DLayered) as usize - ptr as usize - }, - 484usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture1DLayered) - ) - ); - } - test_field_maxTexture1DLayered(); - fn test_field_maxTexture2DLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTexture2DLayered) as usize - ptr as usize - }, - 492usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTexture2DLayered) - ) - ); - } - test_field_maxTexture2DLayered(); - fn test_field_maxTextureCubemapLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxTextureCubemapLayered) as usize - ptr as usize - }, - 504usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxTextureCubemapLayered) - ) - ); - } - test_field_maxTextureCubemapLayered(); - fn test_field_maxSurface1D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurface1D) as usize - ptr as usize - }, - 512usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface1D) - ) - ); - } - test_field_maxSurface1D(); - fn test_field_maxSurface2D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurface2D) as usize - ptr as usize - }, - 516usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface2D) - ) - ); - } - test_field_maxSurface2D(); - fn test_field_maxSurface3D() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurface3D) as usize - ptr as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface3D) - ) - ); - } - test_field_maxSurface3D(); - fn test_field_maxSurface1DLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurface1DLayered) as usize - ptr as usize - }, - 536usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface1DLayered) - ) - ); - } - test_field_maxSurface1DLayered(); - fn test_field_maxSurface2DLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurface2DLayered) as usize - ptr as usize - }, - 544usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurface2DLayered) - ) - ); - } - test_field_maxSurface2DLayered(); - fn test_field_maxSurfaceCubemap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurfaceCubemap) as usize - ptr as usize - }, - 556usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurfaceCubemap) - ) - ); - } - test_field_maxSurfaceCubemap(); - fn test_field_maxSurfaceCubemapLayered() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxSurfaceCubemapLayered) as usize - ptr as usize - }, - 560usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxSurfaceCubemapLayered) - ) - ); - } - test_field_maxSurfaceCubemapLayered(); - fn test_field_surfaceAlignment() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).surfaceAlignment) as usize - ptr as usize - }, - 568usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(surfaceAlignment) - ) - ); - } - test_field_surfaceAlignment(); - fn test_field_concurrentKernels() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).concurrentKernels) as usize - ptr as usize - }, - 576usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(concurrentKernels) - ) - ); - } - test_field_concurrentKernels(); - fn test_field_ECCEnabled() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).ECCEnabled) as usize - ptr as usize - }, - 580usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(ECCEnabled) - ) - ); - } - test_field_ECCEnabled(); - fn test_field_pciBusID() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pciBusID) as usize - ptr as usize - }, - 584usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciBusID) - ) - ); - } - test_field_pciBusID(); - fn test_field_pciDeviceID() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pciDeviceID) as usize - ptr as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciDeviceID) - ) - ); - } - test_field_pciDeviceID(); - fn test_field_pciDomainID() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pciDomainID) as usize - ptr as usize - }, - 592usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pciDomainID) - ) - ); - } - test_field_pciDomainID(); - fn test_field_tccDriver() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tccDriver) as usize - ptr as usize - }, - 596usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(tccDriver) - ) - ); - } - test_field_tccDriver(); - fn test_field_asyncEngineCount() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).asyncEngineCount) as usize - ptr as usize - }, - 600usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(asyncEngineCount) - ) - ); - } - test_field_asyncEngineCount(); - fn test_field_unifiedAddressing() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).unifiedAddressing) as usize - ptr as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(unifiedAddressing) - ) - ); - } - test_field_unifiedAddressing(); - fn test_field_memoryClockRate() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).memoryClockRate) as usize - ptr as usize - }, - 608usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memoryClockRate) - ) - ); - } - test_field_memoryClockRate(); - fn test_field_memoryBusWidth() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).memoryBusWidth) as usize - ptr as usize - }, - 612usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(memoryBusWidth) - ) - ); - } - test_field_memoryBusWidth(); - fn test_field_l2CacheSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).l2CacheSize) as usize - ptr as usize - }, - 616usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(l2CacheSize) - ) - ); - } - test_field_l2CacheSize(); - fn test_field_persistingL2CacheMaxSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).persistingL2CacheMaxSize) as usize - ptr as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(persistingL2CacheMaxSize) - ) - ); - } - test_field_persistingL2CacheMaxSize(); - fn test_field_maxThreadsPerMultiProcessor() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxThreadsPerMultiProcessor) as usize - ptr as usize - }, - 624usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxThreadsPerMultiProcessor) - ) - ); - } - test_field_maxThreadsPerMultiProcessor(); - fn test_field_streamPrioritiesSupported() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).streamPrioritiesSupported) as usize - ptr as usize - }, - 628usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(streamPrioritiesSupported) - ) - ); - } - test_field_streamPrioritiesSupported(); - fn test_field_globalL1CacheSupported() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).globalL1CacheSupported) as usize - ptr as usize - }, - 632usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(globalL1CacheSupported) - ) - ); - } - test_field_globalL1CacheSupported(); - fn test_field_localL1CacheSupported() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).localL1CacheSupported) as usize - ptr as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(localL1CacheSupported) - ) - ); - } - test_field_localL1CacheSupported(); - fn test_field_sharedMemPerMultiprocessor() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedMemPerMultiprocessor) as usize - ptr as usize - }, - 640usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerMultiprocessor) - ) - ); - } - test_field_sharedMemPerMultiprocessor(); - fn test_field_regsPerMultiprocessor() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).regsPerMultiprocessor) as usize - ptr as usize - }, - 648usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(regsPerMultiprocessor) - ) - ); - } - test_field_regsPerMultiprocessor(); - fn test_field_managedMemory() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).managedMemory) as usize - ptr as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(managedMemory) - ) - ); - } - test_field_managedMemory(); - fn test_field_isMultiGpuBoard() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).isMultiGpuBoard) as usize - ptr as usize - }, - 656usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(isMultiGpuBoard) - ) - ); - } - test_field_isMultiGpuBoard(); - fn test_field_multiGpuBoardGroupID() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).multiGpuBoardGroupID) as usize - ptr as usize - }, - 660usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(multiGpuBoardGroupID) - ) - ); - } - test_field_multiGpuBoardGroupID(); - fn test_field_hostNativeAtomicSupported() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).hostNativeAtomicSupported) as usize - ptr as usize - }, - 664usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(hostNativeAtomicSupported) - ) - ); - } - test_field_hostNativeAtomicSupported(); - fn test_field_singleToDoublePrecisionPerfRatio() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).singleToDoublePrecisionPerfRatio) as usize - - ptr as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(singleToDoublePrecisionPerfRatio) - ) - ); - } - test_field_singleToDoublePrecisionPerfRatio(); - fn test_field_pageableMemoryAccess() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pageableMemoryAccess) as usize - ptr as usize - }, - 672usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pageableMemoryAccess) - ) - ); - } - test_field_pageableMemoryAccess(); - fn test_field_concurrentManagedAccess() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).concurrentManagedAccess) as usize - ptr as usize - }, - 676usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(concurrentManagedAccess) - ) - ); - } - test_field_concurrentManagedAccess(); - fn test_field_computePreemptionSupported() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).computePreemptionSupported) as usize - ptr as usize - }, - 680usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(computePreemptionSupported) - ) - ); - } - test_field_computePreemptionSupported(); - fn test_field_canUseHostPointerForRegisteredMem() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).canUseHostPointerForRegisteredMem) as usize - - ptr as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(canUseHostPointerForRegisteredMem) - ) - ); - } - test_field_canUseHostPointerForRegisteredMem(); - fn test_field_cooperativeLaunch() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cooperativeLaunch) as usize - ptr as usize - }, - 688usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(cooperativeLaunch) - ) - ); - } - test_field_cooperativeLaunch(); - fn test_field_cooperativeMultiDeviceLaunch() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cooperativeMultiDeviceLaunch) as usize - ptr as usize - }, - 692usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(cooperativeMultiDeviceLaunch) - ) - ); - } - test_field_cooperativeMultiDeviceLaunch(); - fn test_field_sharedMemPerBlockOptin() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedMemPerBlockOptin) as usize - ptr as usize - }, - 696usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(sharedMemPerBlockOptin) - ) - ); - } - test_field_sharedMemPerBlockOptin(); - fn test_field_pageableMemoryAccessUsesHostPageTables() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pageableMemoryAccessUsesHostPageTables) as usize - - ptr as usize - }, - 704usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(pageableMemoryAccessUsesHostPageTables) - ) - ); - } - test_field_pageableMemoryAccessUsesHostPageTables(); - fn test_field_directManagedMemAccessFromHost() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).directManagedMemAccessFromHost) as usize - ptr as usize - }, - 708usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(directManagedMemAccessFromHost) - ) - ); - } - test_field_directManagedMemAccessFromHost(); - fn test_field_maxBlocksPerMultiProcessor() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxBlocksPerMultiProcessor) as usize - ptr as usize - }, - 712usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(maxBlocksPerMultiProcessor) - ) - ); - } - test_field_maxBlocksPerMultiProcessor(); - fn test_field_accessPolicyMaxWindowSize() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accessPolicyMaxWindowSize) as usize - ptr as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(accessPolicyMaxWindowSize) - ) - ); - } - test_field_accessPolicyMaxWindowSize(); - fn test_field_reservedSharedMemPerBlock() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reservedSharedMemPerBlock) as usize - ptr as usize - }, - 720usize, - concat!( - "Offset of field: ", - stringify!(cudaDeviceProp), - "::", - stringify!(reservedSharedMemPerBlock) - ) - ); - } - test_field_reservedSharedMemPerBlock(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaIpcEventHandle_st { - pub reserved: [::libc::c_char; 64usize], -} -#[test] -fn bindgen_test_layout_cudaIpcEventHandle_st() { + concat!("Alignment of ", stringify!(cudaDeviceProp)), + ); assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(cudaIpcEventHandle_st)) + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, + 0usize, + concat!("Offset of field: ", stringify!(cudaDeviceProp), "::", stringify!(name)), ); assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(cudaIpcEventHandle_st)) - ); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaIpcEventHandle_st), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaIpcMemHandle_st { - pub reserved: [::libc::c_char; 64usize], -} -#[test] -fn bindgen_test_layout_cudaIpcMemHandle_st() { + unsafe { ::std::ptr::addr_of!((*ptr).uuid) as usize - ptr as usize }, + 256usize, + concat!("Offset of field: ", stringify!(cudaDeviceProp), "::", stringify!(uuid)), + ); assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(cudaIpcMemHandle_st)) + unsafe { ::std::ptr::addr_of!((*ptr).luid) as usize - ptr as usize }, + 272usize, + concat!("Offset of field: ", stringify!(cudaDeviceProp), "::", stringify!(luid)), ); assert_eq!( - ::std::mem::align_of::(), - 1usize, - concat!("Alignment of ", stringify!(cudaIpcMemHandle_st)) - ); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaIpcMemHandle_st), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st; -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaExternalMemoryHandleType { - cudaExternalMemoryHandleTypeOpaqueFd = 1, - cudaExternalMemoryHandleTypeOpaqueWin32 = 2, - cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3, - cudaExternalMemoryHandleTypeD3D12Heap = 4, - cudaExternalMemoryHandleTypeD3D12Resource = 5, - cudaExternalMemoryHandleTypeD3D11Resource = 6, - cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7, - cudaExternalMemoryHandleTypeNvSciBuf = 8, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalMemoryHandleDesc { - pub type_: cudaExternalMemoryHandleType, - pub handle: cudaExternalMemoryHandleDesc__bindgen_ty_1, - pub size: ::libc::c_ulonglong, - pub flags: ::libc::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 { - pub fd: ::libc::c_int, - pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, - pub nvSciBufObject: *const ::libc::c_void, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { - pub handle: *mut ::libc::c_void, - pub name: *const ::libc::c_void, -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1() { + unsafe { + ::std::ptr::addr_of!((*ptr).luidDeviceNodeMask) as usize - ptr as usize + }, + 280usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(luidDeviceNodeMask), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 16usize, + unsafe { ::std::ptr::addr_of!((*ptr).totalGlobalMem) as usize - ptr as usize }, + 288usize, concat!( - "Size of: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(totalGlobalMem), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).sharedMemPerBlock) as usize - ptr as usize + }, + 296usize, concat!( - "Alignment of ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1) - ) - ); - fn test_field_handle() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) - ) - ); - } - test_field_handle(); - fn test_field_name() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) - ) - ); - } - test_field_name(); -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerBlock), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 16usize, + unsafe { ::std::ptr::addr_of!((*ptr).regsPerBlock) as usize - ptr as usize }, + 304usize, concat!( - "Size of: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(regsPerBlock), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).warpSize) as usize - ptr as usize }, + 308usize, concat!( - "Alignment of ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1) - ) - ); - fn test_field_fd() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - } - test_field_fd(); - fn test_field_win32() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - } - test_field_win32(); - fn test_field_nvSciBufObject() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciBufObject) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), - "::", - stringify!(nvSciBufObject) - ) - ); - } - test_field_nvSciBufObject(); -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryHandleDesc() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(warpSize), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(cudaExternalMemoryHandleDesc)) + unsafe { ::std::ptr::addr_of!((*ptr).memPitch) as usize - ptr as usize }, + 312usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memPitch), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExternalMemoryHandleDesc)) - ); - fn test_field_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(type_) - ) - ); - } - test_field_type(); - fn test_field_handle() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(handle) - ) - ); - } - test_field_handle(); - fn test_field_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(size) - ) - ); - } - test_field_size(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryHandleDesc), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryBufferDesc { - pub offset: ::libc::c_ulonglong, - pub size: ::libc::c_ulonglong, - pub flags: ::libc::c_uint, -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryBufferDesc() { + unsafe { + ::std::ptr::addr_of!((*ptr).maxThreadsPerBlock) as usize - ptr as usize + }, + 320usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsPerBlock), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(cudaExternalMemoryBufferDesc)) + unsafe { ::std::ptr::addr_of!((*ptr).maxThreadsDim) as usize - ptr as usize }, + 324usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsDim), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExternalMemoryBufferDesc)) - ); - fn test_field_offset() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(offset) - ) - ); - } - test_field_offset(); - fn test_field_size() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(size) - ) - ); - } - test_field_size(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryBufferDesc), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalMemoryMipmappedArrayDesc { - pub offset: ::libc::c_ulonglong, - pub formatDesc: cudaChannelFormatDesc, - pub extent: cudaExtent, - pub flags: ::libc::c_uint, - pub numLevels: ::libc::c_uint, -} -#[test] -fn bindgen_test_layout_cudaExternalMemoryMipmappedArrayDesc() { + unsafe { ::std::ptr::addr_of!((*ptr).maxGridSize) as usize - ptr as usize }, + 336usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxGridSize), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 64usize, + unsafe { ::std::ptr::addr_of!((*ptr).clockRate) as usize - ptr as usize }, + 348usize, concat!( - "Size of: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(clockRate), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).totalConstMem) as usize - ptr as usize }, + 352usize, concat!( - "Alignment of ", - stringify!(cudaExternalMemoryMipmappedArrayDesc) - ) - ); - fn test_field_offset() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(offset) - ) - ); - } - test_field_offset(); - fn test_field_formatDesc() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).formatDesc) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(formatDesc) - ) - ); - } - test_field_formatDesc(); - fn test_field_extent() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(extent) - ) - ); - } - test_field_extent(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_numLevels() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numLevels) as usize - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalMemoryMipmappedArrayDesc), - "::", - stringify!(numLevels) - ) - ); - } - test_field_numLevels(); -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaExternalSemaphoreHandleType { - cudaExternalSemaphoreHandleTypeOpaqueFd = 1, - cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2, - cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, - cudaExternalSemaphoreHandleTypeD3D12Fence = 4, - cudaExternalSemaphoreHandleTypeD3D11Fence = 5, - cudaExternalSemaphoreHandleTypeNvSciSync = 6, - cudaExternalSemaphoreHandleTypeKeyedMutex = 7, - cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8, - cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9, - cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreHandleDesc { - pub type_: cudaExternalSemaphoreHandleType, - pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1, - pub flags: ::libc::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { - pub fd: ::libc::c_int, - pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, - pub nvSciSyncObj: *const ::libc::c_void, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { - pub handle: *mut ::libc::c_void, - pub name: *const ::libc::c_void, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(totalConstMem), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) - ) + unsafe { ::std::ptr::addr_of!((*ptr).major) as usize - ptr as usize }, + 360usize, + concat!("Offset of field: ", stringify!(cudaDeviceProp), "::", stringify!(major)), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).minor) as usize - ptr as usize }, + 364usize, + concat!("Offset of field: ", stringify!(cudaDeviceProp), "::", stringify!(minor)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).textureAlignment) as usize - ptr as usize }, + 368usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1) - ) - ); - fn test_field_handle() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(handle) - ) - ); - } - test_field_handle(); - fn test_field_name() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(name) - ) - ); - } - test_field_name(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(textureAlignment), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 16usize, + unsafe { + ::std::ptr::addr_of!((*ptr).texturePitchAlignment) as usize - ptr as usize + }, + 376usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(texturePitchAlignment), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).deviceOverlap) as usize - ptr as usize }, + 384usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1) - ) - ); - fn test_field_fd() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(fd) - ) - ); - } - test_field_fd(); - fn test_field_win32() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(win32) - ) - ); - } - test_field_win32(); - fn test_field_nvSciSyncObj() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreHandleDesc__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciSyncObj) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), - "::", - stringify!(nvSciSyncObj) - ) - ); - } - test_field_nvSciSyncObj(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(deviceOverlap), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreHandleDesc)) + unsafe { + ::std::ptr::addr_of!((*ptr).multiProcessorCount) as usize - ptr as usize + }, + 388usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(multiProcessorCount), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaExternalSemaphoreHandleDesc)) - ); - fn test_field_type() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(type_) - ) - ); - } - test_field_type(); - fn test_field_handle() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(handle) - ) - ); - } - test_field_handle(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreHandleDesc), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams_v1 { - pub params: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, - pub flags: ::libc::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1 { - pub fence: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, - pub nvSciSync: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, - pub keyedMutex: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1 { - pub value: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1() { + unsafe { + ::std::ptr::addr_of!((*ptr).kernelExecTimeoutEnabled) as usize - ptr as usize + }, + 392usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(kernelExecTimeoutEnabled), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).integrated) as usize - ptr as usize }, + 396usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(integrated), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).canMapHostMemory) as usize - ptr as usize }, + 400usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1) - ) - ); - fn test_field_value() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); - } - test_field_value(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2 { - pub fence: *mut ::libc::c_void, - pub reserved: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(canMapHostMemory), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).computeMode) as usize - ptr as usize }, + 404usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(computeMode), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture1D) as usize - ptr as usize }, + 408usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2) - ) - ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3 { - pub key: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1D), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxTexture1DMipmap) as usize - ptr as usize + }, + 412usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DMipmap), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxTexture1DLinear) as usize - ptr as usize + }, + 416usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3) - ) - ); - fn test_field_key() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - } - test_field_key(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DLinear), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 24usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture2D) as usize - ptr as usize }, + 420usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2D), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxTexture2DMipmap) as usize - ptr as usize + }, + 428usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1) - ) - ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_nvSciSync() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - } - test_field_nvSciSync(); - fn test_field_keyedMutex() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - } - test_field_keyedMutex(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DMipmap), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 32usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxTexture2DLinear) as usize - ptr as usize + }, + 436usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams_v1) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DLinear), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxTexture2DGather) as usize - ptr as usize + }, + 448usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams_v1) - ) - ); - fn test_field_params() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1), - "::", - stringify!(params) - ) - ); - } - test_field_params(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams_v1), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams_v1 { - pub params: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, - pub flags: ::libc::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1 { - pub fence: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, - pub nvSciSync: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, - pub keyedMutex: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1 { - pub value: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DGather), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture3D) as usize - ptr as usize }, + 456usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture3D), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxTexture3DAlt) as usize - ptr as usize }, + 468usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1) - ) - ); - fn test_field_value() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); - } - test_field_value(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2 { - pub fence: *mut ::libc::c_void, - pub reserved: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture3DAlt), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxTextureCubemap) as usize - ptr as usize + }, + 480usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTextureCubemap), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxTexture1DLayered) as usize - ptr as usize + }, + 484usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2) - ) - ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3 { - pub key: ::libc::c_ulonglong, - pub timeoutMs: ::libc::c_uint, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture1DLayered), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 16usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxTexture2DLayered) as usize - ptr as usize + }, + 492usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTexture2DLayered), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxTextureCubemapLayered) as usize - ptr as usize + }, + 504usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3) - ) - ); - fn test_field_key() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - } - test_field_key(); - fn test_field_timeoutMs() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(timeoutMs) - ) - ); - } - test_field_timeoutMs(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxTextureCubemapLayered), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 32usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxSurface1D) as usize - ptr as usize }, + 512usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface1D), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).maxSurface2D) as usize - ptr as usize }, + 516usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1) - ) - ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_nvSciSync() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - } - test_field_nvSciSync(); - fn test_field_keyedMutex() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - } - test_field_keyedMutex(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface2D), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams_v1)) + unsafe { ::std::ptr::addr_of!((*ptr).maxSurface3D) as usize - ptr as usize }, + 524usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface3D), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxSurface1DLayered) as usize - ptr as usize + }, + 536usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams_v1) - ) - ); - fn test_field_params() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1), - "::", - stringify!(params) - ) - ); - } - test_field_params(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams_v1), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams { - pub params: cudaExternalSemaphoreSignalParams__bindgen_ty_1, - pub flags: ::libc::c_uint, - pub reserved: [::libc::c_uint; 16usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1 { - pub fence: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, - pub nvSciSync: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, - pub keyedMutex: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, - pub reserved: [::libc::c_uint; 12usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1 { - pub value: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface1DLayered), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxSurface2DLayered) as usize - ptr as usize + }, + 544usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurface2DLayered), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxSurfaceCubemap) as usize - ptr as usize + }, + 556usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1) - ) - ); - fn test_field_value() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); - } - test_field_value(); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2 { - pub fence: *mut ::libc::c_void, - pub reserved: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurfaceCubemap), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).maxSurfaceCubemapLayered) as usize - ptr as usize + }, + 560usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxSurfaceCubemapLayered), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).surfaceAlignment) as usize - ptr as usize }, + 568usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2) - ) - ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3 { - pub key: ::libc::c_ulonglong, -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(surfaceAlignment), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 8usize, + unsafe { + ::std::ptr::addr_of!((*ptr).concurrentKernels) as usize - ptr as usize + }, + 576usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(concurrentKernels), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).ECCEnabled) as usize - ptr as usize }, + 580usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3) - ) - ); - fn test_field_key() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - } - test_field_key(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(ECCEnabled), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 72usize, + unsafe { ::std::ptr::addr_of!((*ptr).pciBusID) as usize - ptr as usize }, + 584usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1) - ) + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciBusID), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).pciDeviceID) as usize - ptr as usize }, + 588usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1) - ) - ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_nvSciSync() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - } - test_field_nvSciSync(); - fn test_field_keyedMutex() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - } - test_field_keyedMutex(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreSignalParams__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -#[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalParams() { + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciDeviceID), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreSignalParams)) + unsafe { ::std::ptr::addr_of!((*ptr).pciDomainID) as usize - ptr as usize }, + 592usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pciDomainID), + ), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + unsafe { ::std::ptr::addr_of!((*ptr).tccDriver) as usize - ptr as usize }, + 596usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalParams) - ) - ); - fn test_field_params() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(params) - ) - ); - } - test_field_params(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalParams), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(tccDriver), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).asyncEngineCount) as usize - ptr as usize }, + 600usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(asyncEngineCount), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).unifiedAddressing) as usize - ptr as usize + }, + 604usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(unifiedAddressing), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memoryClockRate) as usize - ptr as usize }, + 608usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryClockRate), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memoryBusWidth) as usize - ptr as usize }, + 612usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryBusWidth), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).l2CacheSize) as usize - ptr as usize }, + 616usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(l2CacheSize), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).persistingL2CacheMaxSize) as usize - ptr as usize + }, + 620usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(persistingL2CacheMaxSize), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).maxThreadsPerMultiProcessor) as usize + - ptr as usize + }, + 624usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxThreadsPerMultiProcessor), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).streamPrioritiesSupported) as usize + - ptr as usize + }, + 628usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(streamPrioritiesSupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).globalL1CacheSupported) as usize - ptr as usize + }, + 632usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(globalL1CacheSupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).localL1CacheSupported) as usize - ptr as usize + }, + 636usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(localL1CacheSupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).sharedMemPerMultiprocessor) as usize + - ptr as usize + }, + 640usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerMultiprocessor), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).regsPerMultiprocessor) as usize - ptr as usize + }, + 648usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(regsPerMultiprocessor), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).managedMemory) as usize - ptr as usize }, + 652usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(managedMemory), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isMultiGpuBoard) as usize - ptr as usize }, + 656usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(isMultiGpuBoard), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).multiGpuBoardGroupID) as usize - ptr as usize + }, + 660usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(multiGpuBoardGroupID), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).hostNativeAtomicSupported) as usize + - ptr as usize + }, + 664usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(hostNativeAtomicSupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).singleToDoublePrecisionPerfRatio) as usize + - ptr as usize + }, + 668usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(singleToDoublePrecisionPerfRatio), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pageableMemoryAccess) as usize - ptr as usize + }, + 672usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pageableMemoryAccess), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).concurrentManagedAccess) as usize - ptr as usize + }, + 676usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(concurrentManagedAccess), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).computePreemptionSupported) as usize + - ptr as usize + }, + 680usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(computePreemptionSupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).canUseHostPointerForRegisteredMem) as usize + - ptr as usize + }, + 684usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(canUseHostPointerForRegisteredMem), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).cooperativeLaunch) as usize - ptr as usize + }, + 688usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(cooperativeLaunch), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).cooperativeMultiDeviceLaunch) as usize + - ptr as usize + }, + 692usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(cooperativeMultiDeviceLaunch), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).sharedMemPerBlockOptin) as usize - ptr as usize + }, + 696usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sharedMemPerBlockOptin), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pageableMemoryAccessUsesHostPageTables) as usize + - ptr as usize + }, + 704usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(pageableMemoryAccessUsesHostPageTables), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).directManagedMemAccessFromHost) as usize + - ptr as usize + }, + 708usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(directManagedMemAccessFromHost), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).maxBlocksPerMultiProcessor) as usize + - ptr as usize + }, + 712usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(maxBlocksPerMultiProcessor), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).accessPolicyMaxWindowSize) as usize + - ptr as usize + }, + 716usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(accessPolicyMaxWindowSize), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).reservedSharedMemPerBlock) as usize + - ptr as usize + }, + 720usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(reservedSharedMemPerBlock), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).hostRegisterSupported) as usize - ptr as usize + }, + 728usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(hostRegisterSupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).sparseCudaArraySupported) as usize - ptr as usize + }, + 732usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(sparseCudaArraySupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).hostRegisterReadOnlySupported) as usize + - ptr as usize + }, + 736usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(hostRegisterReadOnlySupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).timelineSemaphoreInteropSupported) as usize + - ptr as usize + }, + 740usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(timelineSemaphoreInteropSupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).memoryPoolsSupported) as usize - ptr as usize + }, + 744usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryPoolsSupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).gpuDirectRDMASupported) as usize - ptr as usize + }, + 748usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(gpuDirectRDMASupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).gpuDirectRDMAFlushWritesOptions) as usize + - ptr as usize + }, + 752usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(gpuDirectRDMAFlushWritesOptions), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).gpuDirectRDMAWritesOrdering) as usize + - ptr as usize + }, + 756usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(gpuDirectRDMAWritesOrdering), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).memoryPoolSupportedHandleTypes) as usize + - ptr as usize + }, + 760usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(memoryPoolSupportedHandleTypes), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).deferredMappingCudaArraySupported) as usize + - ptr as usize + }, + 764usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(deferredMappingCudaArraySupported), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).ipcEventSupported) as usize - ptr as usize + }, + 768usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(ipcEventSupported), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).clusterLaunch) as usize - ptr as usize }, + 772usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(clusterLaunch), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).unifiedFunctionPointers) as usize - ptr as usize + }, + 776usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(unifiedFunctionPointers), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, + 780usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(reserved2), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 788usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(reserved1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 792usize, + concat!( + "Offset of field: ", + stringify!(cudaDeviceProp), + "::", + stringify!(reserved), + ), + ); } #[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams { - pub params: cudaExternalSemaphoreWaitParams__bindgen_ty_1, - pub flags: ::libc::c_uint, - pub reserved: [::libc::c_uint; 16usize], +#[derive(Debug, Copy, Clone)] +pub struct cudaIpcEventHandle_st { + pub reserved: [::libc::c_char; 64usize], } -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1 { - pub fence: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, - pub nvSciSync: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, - pub keyedMutex: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, - pub reserved: [::libc::c_uint; 10usize], +#[test] +fn bindgen_test_layout_cudaIpcEventHandle_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaIpcEventHandle_st)), + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaIpcEventHandle_st)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaIpcEventHandle_st), + "::", + stringify!(reserved), + ), + ); } +pub type cudaIpcEventHandle_t = cudaIpcEventHandle_st; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1 { - pub value: ::libc::c_ulonglong, +pub struct cudaIpcMemHandle_st { + pub reserved: [::libc::c_char; 64usize], } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1() { +fn bindgen_test_layout_cudaIpcMemHandle_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1) - ) + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaIpcMemHandle_st)), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaIpcMemHandle_st)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1) - ) - ); - fn test_field_value() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(value) - ) - ); - } - test_field_value(); + "Offset of field: ", + stringify!(cudaIpcMemHandle_st), + "::", + stringify!(reserved), + ), + ); } +pub type cudaIpcMemHandle_t = cudaIpcMemHandle_st; #[repr(C)] -#[derive(Copy, Clone)] -pub union cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2 { - pub fence: *mut ::libc::c_void, - pub reserved: ::libc::c_ulonglong, +#[derive(Debug, Copy, Clone)] +pub struct cudaMemFabricHandle_st { + pub reserved: [::libc::c_char; 64usize], } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2() { +fn bindgen_test_layout_cudaMemFabricHandle_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2) - ) + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaMemFabricHandle_st)), ); assert_eq!( - ::std::mem::align_of::(), - 8usize, + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaMemFabricHandle_st)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2) - ) - ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); + "Offset of field: ", + stringify!(cudaMemFabricHandle_st), + "::", + stringify!(reserved), + ), + ); +} +pub type cudaMemFabricHandle_t = cudaMemFabricHandle_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaExternalMemoryHandleType { + cudaExternalMemoryHandleTypeOpaqueFd = 1, + cudaExternalMemoryHandleTypeOpaqueWin32 = 2, + cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3, + cudaExternalMemoryHandleTypeD3D12Heap = 4, + cudaExternalMemoryHandleTypeD3D12Resource = 5, + cudaExternalMemoryHandleTypeD3D11Resource = 6, + cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7, + cudaExternalMemoryHandleTypeNvSciBuf = 8, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalMemoryHandleDesc { + pub type_: cudaExternalMemoryHandleType, + pub handle: cudaExternalMemoryHandleDesc__bindgen_ty_1, + pub size: ::libc::c_ulonglong, + pub flags: ::libc::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalMemoryHandleDesc__bindgen_ty_1 { + pub fd: ::libc::c_int, + pub win32: cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + pub nvSciBufObject: *const ::libc::c_void, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3 { - pub key: ::libc::c_ulonglong, - pub timeoutMs: ::libc::c_uint, +pub struct cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1 { + pub handle: *mut ::libc::c_void, + pub name: *const ::libc::c_void, } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3() { - assert_eq!( - ::std::mem::size_of::(), +fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + >(), 16usize, concat!( "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3) - ) + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + ), ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::< + cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1, + >(), 8usize, concat!( "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3) - ) - ); - fn test_field_key() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(key) - ) - ); - } - test_field_key(); - fn test_field_timeoutMs() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::< - cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, - >::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), - "::", - stringify!(timeoutMs) - ) - ); - } - test_field_timeoutMs(); + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name), + ), + ); } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1() { +fn bindgen_test_layout_cudaExternalMemoryHandleDesc__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1) - ) + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1)), ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, + concat!("Alignment of ", stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 0usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1) - ) - ); - fn test_field_fence() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(fence) - ) - ); - } - test_field_fence(); - fn test_field_nvSciSync() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(nvSciSync) - ) - ); - } - test_field_nvSciSync(); - fn test_field_keyedMutex() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(keyedMutex) - ) - ); - } - test_field_keyedMutex(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = :: std :: mem :: MaybeUninit :: < cudaExternalSemaphoreWaitParams__bindgen_ty_1 > :: uninit () ; - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(fd), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(win32), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciBufObject) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc__bindgen_ty_1), + "::", + stringify!(nvSciBufObject), + ), + ); } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitParams() { +fn bindgen_test_layout_cudaExternalMemoryHandleDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams)) + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaExternalMemoryHandleDesc)), ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaExternalSemaphoreWaitParams)) - ); - fn test_field_params() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(params) - ) - ); - } - test_field_params(); - fn test_field_flags() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(flags) - ) - ); - } - test_field_flags(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitParams), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); + concat!("Alignment of ", stringify!(cudaExternalMemoryHandleDesc)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(type_), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(handle), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(size), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryHandleDesc), + "::", + stringify!(flags), + ), + ); } -pub use self::cudaError as cudaError_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUstream_st { - _unused: [u8; 0], -} -pub type cudaStream_t = *mut CUstream_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUevent_st { - _unused: [u8; 0], -} -pub type cudaEvent_t = *mut CUevent_st; -pub type cudaGraphicsResource_t = *mut cudaGraphicsResource; -pub use self::cudaOutputMode as cudaOutputMode_t; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct CUexternalMemory_st { - _unused: [u8; 0], +pub struct cudaExternalMemoryBufferDesc { + pub offset: ::libc::c_ulonglong, + pub size: ::libc::c_ulonglong, + pub flags: ::libc::c_uint, } -pub type cudaExternalMemory_t = *mut CUexternalMemory_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUexternalSemaphore_st { - _unused: [u8; 0], +#[test] +fn bindgen_test_layout_cudaExternalMemoryBufferDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaExternalMemoryBufferDesc)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalMemoryBufferDesc)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(offset), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(size), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryBufferDesc), + "::", + stringify!(flags), + ), + ); } -pub type cudaExternalSemaphore_t = *mut CUexternalSemaphore_st; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct CUgraph_st { - _unused: [u8; 0], +pub struct cudaExternalMemoryMipmappedArrayDesc { + pub offset: ::libc::c_ulonglong, + pub formatDesc: cudaChannelFormatDesc, + pub extent: cudaExtent, + pub flags: ::libc::c_uint, + pub numLevels: ::libc::c_uint, } -pub type cudaGraph_t = *mut CUgraph_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUgraphNode_st { - _unused: [u8; 0], +#[test] +fn bindgen_test_layout_cudaExternalMemoryMipmappedArrayDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaExternalMemoryMipmappedArrayDesc)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalMemoryMipmappedArrayDesc)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(offset), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).formatDesc) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(formatDesc), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extent) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(extent), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(flags), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numLevels) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalMemoryMipmappedArrayDesc), + "::", + stringify!(numLevels), + ), + ); } -pub type cudaGraphNode_t = *mut CUgraphNode_st; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUuserObject_st { - _unused: [u8; 0], +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaExternalSemaphoreHandleType { + cudaExternalSemaphoreHandleTypeOpaqueFd = 1, + cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2, + cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3, + cudaExternalSemaphoreHandleTypeD3D12Fence = 4, + cudaExternalSemaphoreHandleTypeD3D11Fence = 5, + cudaExternalSemaphoreHandleTypeNvSciSync = 6, + cudaExternalSemaphoreHandleTypeKeyedMutex = 7, + cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8, + cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9, + cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10, } -pub type cudaUserObject_t = *mut CUuserObject_st; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUfunc_st { - _unused: [u8; 0], +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreHandleDesc { + pub type_: cudaExternalSemaphoreHandleType, + pub handle: cudaExternalSemaphoreHandleDesc__bindgen_ty_1, + pub flags: ::libc::c_uint, } -pub type cudaFunction_t = *mut CUfunc_st; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUmemPoolHandle_st { - _unused: [u8; 0], -} -pub type cudaMemPool_t = *mut CUmemPoolHandle_st; -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaCGScope { - cudaCGScopeInvalid = 0, - cudaCGScopeGrid = 1, - cudaCGScopeMultiGrid = 2, +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreHandleDesc__bindgen_ty_1 { + pub fd: ::libc::c_int, + pub win32: cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + pub nvSciSyncObj: *const ::libc::c_void, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cudaLaunchParams { - pub func: *mut ::libc::c_void, - pub gridDim: dim3, - pub blockDim: dim3, - pub args: *mut *mut ::libc::c_void, - pub sharedMem: usize, - pub stream: cudaStream_t, +pub struct cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1 { + pub handle: *mut ::libc::c_void, + pub name: *const ::libc::c_void, } #[test] -fn bindgen_test_layout_cudaLaunchParams() { +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + >(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(cudaLaunchParams)) + ::std::mem::align_of::< + cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + ), ); assert_eq!( - ::std::mem::align_of::(), + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(handle), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, 8usize, - concat!("Alignment of ", stringify!(cudaLaunchParams)) - ); - fn test_field_func() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(func) - ) - ); - } - test_field_func(); - fn test_field_gridDim() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(gridDim) - ) - ); - } - test_field_gridDim(); - fn test_field_blockDim() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(blockDim) - ) - ); - } - test_field_blockDim(); - fn test_field_args() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(args) - ) - ); - } - test_field_args(); - fn test_field_sharedMem() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedMem) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(sharedMem) - ) - ); - } - test_field_sharedMem(); - fn test_field_stream() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaLaunchParams), - "::", - stringify!(stream) - ) - ); - } - test_field_stream(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaKernelNodeParams { - pub func: *mut ::libc::c_void, - pub gridDim: dim3, - pub blockDim: dim3, - pub sharedMemBytes: ::libc::c_uint, - pub kernelParams: *mut *mut ::libc::c_void, - pub extra: *mut *mut ::libc::c_void, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(name), + ), + ); } #[test] -fn bindgen_test_layout_cudaKernelNodeParams() { +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreHandleDesc__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(cudaKernelNodeParams)) + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1)), ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cudaKernelNodeParams)) - ); - fn test_field_func() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(func) - ) - ); - } - test_field_func(); - fn test_field_gridDim() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(gridDim) - ) - ); - } - test_field_gridDim(); - fn test_field_blockDim() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(blockDim) - ) - ); - } - test_field_blockDim(); - fn test_field_sharedMemBytes() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sharedMemBytes) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(sharedMemBytes) - ) - ); - } - test_field_sharedMemBytes(); - fn test_field_kernelParams() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).kernelParams) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(kernelParams) - ) - ); - } - test_field_kernelParams(); - fn test_field_extra() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeParams), - "::", - stringify!(extra) - ) - ); - } - test_field_extra(); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreSignalNodeParams { - pub extSemArray: *mut cudaExternalSemaphore_t, - pub paramsArray: *const cudaExternalSemaphoreSignalParams, - pub numExtSems: ::libc::c_uint, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(fd), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).win32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(win32), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciSyncObj) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc__bindgen_ty_1), + "::", + stringify!(nvSciSyncObj), + ), + ); } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreSignalNodeParams() { +fn bindgen_test_layout_cudaExternalSemaphoreHandleDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 24usize, + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreHandleDesc)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreHandleDesc)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, concat!( - "Size of: ", - stringify!(cudaExternalSemaphoreSignalNodeParams) - ) + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(type_), + ), ); assert_eq!( - ::std::mem::align_of::(), + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, 8usize, concat!( - "Alignment of ", - stringify!(cudaExternalSemaphoreSignalNodeParams) - ) - ); - fn test_field_extSemArray() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(extSemArray) - ) - ); - } - test_field_extSemArray(); - fn test_field_paramsArray() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(paramsArray) - ) - ); - } - test_field_paramsArray(); - fn test_field_numExtSems() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreSignalNodeParams), - "::", - stringify!(numExtSems) - ) - ); - } - test_field_numExtSems(); + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(handle), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreHandleDesc), + "::", + stringify!(flags), + ), + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams_v1 { + pub params: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, + pub flags: ::libc::c_uint, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cudaExternalSemaphoreWaitNodeParams { - pub extSemArray: *mut cudaExternalSemaphore_t, - pub paramsArray: *const cudaExternalSemaphoreWaitParams, - pub numExtSems: ::libc::c_uint, +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_cudaExternalSemaphoreWaitNodeParams() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitNodeParams)) +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1), + ), ); assert_eq!( - ::std::mem::align_of::(), + ::std::mem::align_of::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1, + >(), 8usize, concat!( "Alignment of ", - stringify!(cudaExternalSemaphoreWaitNodeParams) - ) - ); - fn test_field_extSemArray() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(extSemArray) - ) - ); - } - test_field_extSemArray(); - fn test_field_paramsArray() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(paramsArray) - ) - ); - } - test_field_paramsArray(); - fn test_field_numExtSems() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaExternalSemaphoreWaitNodeParams), - "::", - stringify!(numExtSems) - ) - ); - } - test_field_numExtSems(); -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaGraphNodeType { - cudaGraphNodeTypeKernel = 0, - cudaGraphNodeTypeMemcpy = 1, - cudaGraphNodeTypeMemset = 2, - cudaGraphNodeTypeHost = 3, - cudaGraphNodeTypeGraph = 4, - cudaGraphNodeTypeEmpty = 5, - cudaGraphNodeTypeWaitEvent = 6, - cudaGraphNodeTypeEventRecord = 7, - cudaGraphNodeTypeExtSemaphoreSignal = 8, - cudaGraphNodeTypeExtSemaphoreWait = 9, - cudaGraphNodeTypeMemAlloc = 10, - cudaGraphNodeTypeMemFree = 11, - cudaGraphNodeTypeCount = 12, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CUgraphExec_st { - _unused: [u8; 0], -} -pub type cudaGraphExec_t = *mut CUgraphExec_st; -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaGraphExecUpdateResult { - cudaGraphExecUpdateSuccess = 0, - cudaGraphExecUpdateError = 1, - cudaGraphExecUpdateErrorTopologyChanged = 2, - cudaGraphExecUpdateErrorNodeTypeChanged = 3, - cudaGraphExecUpdateErrorFunctionChanged = 4, - cudaGraphExecUpdateErrorParametersChanged = 5, - cudaGraphExecUpdateErrorNotSupported = 6, - cudaGraphExecUpdateErrorUnsupportedFunctionChange = 7, - cudaGraphExecUpdateErrorAttributesChanged = 8, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaGetDriverEntryPointFlags { - cudaEnableDefault = 0, - cudaEnableLegacyStream = 1, - cudaEnablePerThreadDefaultStream = 2, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaGraphDebugDotFlags { - cudaGraphDebugDotFlagsVerbose = 1, - cudaGraphDebugDotFlagsKernelNodeParams = 4, - cudaGraphDebugDotFlagsMemcpyNodeParams = 8, - cudaGraphDebugDotFlagsMemsetNodeParams = 16, - cudaGraphDebugDotFlagsHostNodeParams = 32, - cudaGraphDebugDotFlagsEventNodeParams = 64, - cudaGraphDebugDotFlagsExtSemasSignalNodeParams = 128, - cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 256, - cudaGraphDebugDotFlagsKernelNodeAttributes = 512, - cudaGraphDebugDotFlagsHandles = 1024, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaGraphInstantiateFlags { - cudaGraphInstantiateFlagAutoFreeOnLaunch = 1, - cudaGraphInstantiateFlagUseNodePriority = 8, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaStreamAttrID { - cudaStreamAttributeAccessPolicyWindow = 1, - cudaStreamAttributeSynchronizationPolicy = 3, + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value), + ), + ); } #[repr(C)] #[derive(Copy, Clone)] -pub union cudaStreamAttrValue { - pub accessPolicyWindow: cudaAccessPolicyWindow, - pub syncPolicy: cudaSynchronizationPolicy, +pub union cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_cudaStreamAttrValue() { +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaStreamAttrValue)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaStreamAttrValue)) - ); - fn test_field_accessPolicyWindow() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accessPolicyWindow) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaStreamAttrValue), - "::", - stringify!(accessPolicyWindow) - ) - ); - } - test_field_accessPolicyWindow(); - fn test_field_syncPolicy() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).syncPolicy) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaStreamAttrValue), - "::", - stringify!(syncPolicy) - ) - ); - } - test_field_syncPolicy(); -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaKernelNodeAttrID { - cudaKernelNodeAttributeAccessPolicyWindow = 1, - cudaKernelNodeAttributeCooperative = 2, - cudaKernelNodeAttributePriority = 8, + ::std::mem::align_of::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved), + ), + ); } #[repr(C)] -#[derive(Copy, Clone)] -pub union cudaKernelNodeAttrValue { - pub accessPolicyWindow: cudaAccessPolicyWindow, - pub cooperative: ::libc::c_int, - pub priority: ::libc::c_int, +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_cudaKernelNodeAttrValue() { +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(cudaKernelNodeAttrValue)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudaKernelNodeAttrValue)) - ); - fn test_field_accessPolicyWindow() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).accessPolicyWindow) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeAttrValue), - "::", - stringify!(accessPolicyWindow) - ) - ); - } - test_field_accessPolicyWindow(); - fn test_field_cooperative() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cooperative) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeAttrValue), - "::", - stringify!(cooperative) - ) - ); - } - test_field_cooperative(); - fn test_field_priority() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaKernelNodeAttrValue), - "::", - stringify!(priority) - ) - ); - } - test_field_priority(); -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaSurfaceBoundaryMode { - cudaBoundaryModeZero = 0, - cudaBoundaryModeClamp = 1, - cudaBoundaryModeTrap = 2, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaSurfaceFormatMode { - cudaFormatModeForced = 0, - cudaFormatModeAuto = 1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct surfaceReference { - pub channelDesc: cudaChannelFormatDesc, + ::std::mem::align_of::< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key), + ), + ); } #[test] -fn bindgen_test_layout_surfaceReference() { +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(surfaceReference)) + ::std::mem::size_of::(), + 24usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + ), ); assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(surfaceReference)) - ); - fn test_field_channelDesc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).channelDesc) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(surfaceReference), - "::", - stringify!(channelDesc) - ) - ); - } - test_field_channelDesc(); + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(fence), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(nvSciSync), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1__bindgen_ty_1), + "::", + stringify!(keyedMutex), + ), + ); } -pub type cudaSurfaceObject_t = ::libc::c_ulonglong; -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaTextureAddressMode { - cudaAddressModeWrap = 0, - cudaAddressModeClamp = 1, - cudaAddressModeMirror = 2, - cudaAddressModeBorder = 3, +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams_v1() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreSignalParams_v1)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreSignalParams_v1)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1), + "::", + stringify!(params), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams_v1), + "::", + stringify!(flags), + ), + ); } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaTextureFilterMode { - cudaFilterModePoint = 0, - cudaFilterModeLinear = 1, +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams_v1 { + pub params: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, + pub flags: ::libc::c_uint, } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaTextureReadMode { - cudaReadModeElementType = 0, - cudaReadModeNormalizedFloat = 1, +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct textureReference { - pub normalized: ::libc::c_int, - pub filterMode: cudaTextureFilterMode, - pub addressMode: [cudaTextureAddressMode; 3usize], - pub channelDesc: cudaChannelFormatDesc, - pub sRGB: ::libc::c_int, - pub maxAnisotropy: ::libc::c_uint, - pub mipmapFilterMode: cudaTextureFilterMode, - pub mipmapLevelBias: f32, - pub minMipmapLevelClamp: f32, - pub maxMipmapLevelClamp: f32, - pub disableTrilinearOptimization: ::libc::c_int, - pub __cudaReserved: [::libc::c_int; 14usize], +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_textureReference() { +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 124usize, - concat!("Size of: ", stringify!(textureReference)) + ::std::mem::align_of::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1), + ), ); assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(textureReference)) - ); - fn test_field_normalized() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).normalized) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(normalized) - ) - ); - } - test_field_normalized(); - fn test_field_filterMode() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).filterMode) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(filterMode) - ) - ); - } - test_field_filterMode(); - fn test_field_addressMode() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).addressMode) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(addressMode) - ) - ); - } - test_field_addressMode(); - fn test_field_channelDesc() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).channelDesc) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(channelDesc) - ) - ); - } - test_field_channelDesc(); - fn test_field_sRGB() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sRGB) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(sRGB) - ) - ); - } - test_field_sRGB(); - fn test_field_maxAnisotropy() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxAnisotropy) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(maxAnisotropy) - ) - ); - } - test_field_maxAnisotropy(); - fn test_field_mipmapFilterMode() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mipmapFilterMode) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(mipmapFilterMode) - ) - ); - } - test_field_mipmapFilterMode(); - fn test_field_mipmapLevelBias() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mipmapLevelBias) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(mipmapLevelBias) - ) - ); - } - test_field_mipmapLevelBias(); - fn test_field_minMipmapLevelClamp() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).minMipmapLevelClamp) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(minMipmapLevelClamp) - ) - ); - } - test_field_minMipmapLevelClamp(); - fn test_field_maxMipmapLevelClamp() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxMipmapLevelClamp) as usize - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(maxMipmapLevelClamp) - ) - ); - } - test_field_maxMipmapLevelClamp(); - fn test_field_disableTrilinearOptimization() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).disableTrilinearOptimization) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(disableTrilinearOptimization) - ) - ); - } - test_field_disableTrilinearOptimization(); - fn test_field___cudaReserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).__cudaReserved) as usize - ptr as usize - }, - 68usize, - concat!( - "Offset of field: ", - stringify!(textureReference), - "::", - stringify!(__cudaReserved) - ) - ); - } - test_field___cudaReserved(); + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value), + ), + ); } #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudaTextureDesc { - pub addressMode: [cudaTextureAddressMode; 3usize], - pub filterMode: cudaTextureFilterMode, - pub readMode: cudaTextureReadMode, - pub sRGB: ::libc::c_int, - pub borderColor: [f32; 4usize], - pub normalizedCoords: ::libc::c_int, - pub maxAnisotropy: ::libc::c_uint, - pub mipmapFilterMode: cudaTextureFilterMode, - pub mipmapLevelBias: f32, - pub minMipmapLevelClamp: f32, - pub maxMipmapLevelClamp: f32, - pub disableTrilinearOptimization: ::libc::c_int, - pub seamlessCubemap: ::libc::c_int, +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, } #[test] -fn bindgen_test_layout_cudaTextureDesc() { +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), + ), + ); assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(cudaTextureDesc)) + ::std::mem::align_of::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), + ), ); assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(cudaTextureDesc)) - ); - fn test_field_addressMode() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).addressMode) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(addressMode) - ) - ); - } - test_field_addressMode(); - fn test_field_filterMode() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).filterMode) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(filterMode) - ) - ); - } - test_field_filterMode(); - fn test_field_readMode() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).readMode) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(readMode) - ) - ); - } - test_field_readMode(); - fn test_field_sRGB() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).sRGB) as usize - ptr as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(sRGB) - ) - ); - } - test_field_sRGB(); - fn test_field_borderColor() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).borderColor) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(borderColor) - ) - ); - } - test_field_borderColor(); - fn test_field_normalizedCoords() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).normalizedCoords) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(normalizedCoords) - ) - ); - } - test_field_normalizedCoords(); - fn test_field_maxAnisotropy() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxAnisotropy) as usize - ptr as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(maxAnisotropy) - ) - ); - } - test_field_maxAnisotropy(); - fn test_field_mipmapFilterMode() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mipmapFilterMode) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(mipmapFilterMode) - ) - ); - } - test_field_mipmapFilterMode(); - fn test_field_mipmapLevelBias() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mipmapLevelBias) as usize - ptr as usize - }, - 52usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(mipmapLevelBias) - ) - ); - } - test_field_mipmapLevelBias(); - fn test_field_minMipmapLevelClamp() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).minMipmapLevelClamp) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(minMipmapLevelClamp) - ) - ); - } - test_field_minMipmapLevelClamp(); - fn test_field_maxMipmapLevelClamp() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).maxMipmapLevelClamp) as usize - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(maxMipmapLevelClamp) - ) - ); - } - test_field_maxMipmapLevelClamp(); - fn test_field_disableTrilinearOptimization() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).disableTrilinearOptimization) as usize - ptr as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(disableTrilinearOptimization) - ) - ); - } - test_field_disableTrilinearOptimization(); - fn test_field_seamlessCubemap() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).seamlessCubemap) as usize - ptr as usize - }, - 68usize, - concat!( - "Offset of field: ", - stringify!(cudaTextureDesc), - "::", - stringify!(seamlessCubemap) - ) - ); - } - test_field_seamlessCubemap(); -} -pub type cudaTextureObject_t = ::libc::c_ulonglong; -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudaDataType_t { - CUDA_R_16F = 2, - CUDA_C_16F = 6, - CUDA_R_16BF = 14, - CUDA_C_16BF = 15, - CUDA_R_32F = 0, - CUDA_C_32F = 4, - CUDA_R_64F = 1, - CUDA_C_64F = 5, - CUDA_R_4I = 16, - CUDA_C_4I = 17, - CUDA_R_4U = 18, - CUDA_C_4U = 19, - CUDA_R_8I = 3, - CUDA_C_8I = 7, - CUDA_R_8U = 8, - CUDA_C_8U = 9, - CUDA_R_16I = 20, - CUDA_C_16I = 21, - CUDA_R_16U = 22, - CUDA_C_16U = 23, - CUDA_R_32I = 10, - CUDA_C_32I = 11, - CUDA_R_32U = 12, - CUDA_C_32U = 13, - CUDA_R_64I = 24, - CUDA_C_64I = 25, - CUDA_R_64U = 26, - CUDA_C_64U = 27, -} -pub use self::cudaDataType_t as cudaDataType; -pub const libraryPropertyType_t_MAJOR_VERSION: libraryPropertyType_t = 0; -pub const libraryPropertyType_t_MINOR_VERSION: libraryPropertyType_t = 1; -pub const libraryPropertyType_t_PATCH_LEVEL: libraryPropertyType_t = 2; -pub type libraryPropertyType_t = ::libc::c_uint; -pub use self::libraryPropertyType_t as libraryPropertyType; -extern "C" { - pub fn cudaDeviceReset() -> cudaError_t; + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved), + ), + ); } -extern "C" { - pub fn cudaDeviceSynchronize() -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, + pub timeoutMs: ::libc::c_uint, } -extern "C" { - pub fn cudaDeviceSetLimit(limit: cudaLimit, value: usize) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, + >(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), + ), + ); + assert_eq!( + ::std::mem::align_of::< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(timeoutMs), + ), + ); } -extern "C" { - pub fn cudaDeviceGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + ), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(fence), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(nvSciSync), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1__bindgen_ty_1), + "::", + stringify!(keyedMutex), + ), + ); } -extern "C" { - pub fn cudaDeviceGetTexture1DLinearMaxWidth( - maxWidthInElements: *mut usize, - fmtDesc: *const cudaChannelFormatDesc, - device: ::libc::c_int, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams_v1() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams_v1)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreWaitParams_v1)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1), + "::", + stringify!(params), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams_v1), + "::", + stringify!(flags), + ), + ); } -extern "C" { - pub fn cudaDeviceGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams { + pub params: cudaExternalSemaphoreSignalParams__bindgen_ty_1, + pub flags: ::libc::c_uint, + pub reserved: [::libc::c_uint; 16usize], } -extern "C" { - pub fn cudaDeviceGetStreamPriorityRange( - leastPriority: *mut ::libc::c_int, - greatestPriority: *mut ::libc::c_int, - ) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, + pub reserved: [::libc::c_uint; 12usize], } -extern "C" { - pub fn cudaDeviceSetCacheConfig(cacheConfig: cudaFuncCache) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, } -extern "C" { - pub fn cudaDeviceGetSharedMemConfig(pConfig: *mut cudaSharedMemConfig) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1), + ), + ); + assert_eq!( + ::std::mem::align_of::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value), + ), + ); } -extern "C" { - pub fn cudaDeviceSetSharedMemConfig(config: cudaSharedMemConfig) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, } -extern "C" { - pub fn cudaDeviceGetByPCIBusId( - device: *mut ::libc::c_int, - pciBusId: *const ::libc::c_char, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + ), + ); + assert_eq!( + ::std::mem::align_of::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved), + ), + ); } -extern "C" { - pub fn cudaDeviceGetPCIBusId( - pciBusId: *mut ::libc::c_char, - len: ::libc::c_int, - device: ::libc::c_int, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, } -extern "C" { - pub fn cudaIpcGetEventHandle( - handle: *mut cudaIpcEventHandle_t, - event: cudaEvent_t, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3), + ), + ); + assert_eq!( + ::std::mem::align_of::< + cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key), + ), + ); } -extern "C" { - pub fn cudaIpcOpenEventHandle( - event: *mut cudaEvent_t, - handle: cudaIpcEventHandle_t, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreSignalParams__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(fence), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(nvSciSync), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(keyedMutex), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams__bindgen_ty_1), + "::", + stringify!(reserved), + ), + ); } -extern "C" { - pub fn cudaIpcGetMemHandle( - handle: *mut cudaIpcMemHandle_t, - devPtr: *mut ::libc::c_void, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 144usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreSignalParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreSignalParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(params), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(flags), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalParams), + "::", + stringify!(reserved), + ), + ); } -extern "C" { - pub fn cudaIpcOpenMemHandle( - devPtr: *mut *mut ::libc::c_void, - handle: cudaIpcMemHandle_t, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams { + pub params: cudaExternalSemaphoreWaitParams__bindgen_ty_1, + pub flags: ::libc::c_uint, + pub reserved: [::libc::c_uint; 16usize], } -extern "C" { - pub fn cudaIpcCloseMemHandle(devPtr: *mut ::libc::c_void) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1 { + pub fence: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, + pub nvSciSync: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, + pub keyedMutex: cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, + pub reserved: [::libc::c_uint; 10usize], } -extern "C" { - pub fn cudaDeviceFlushGPUDirectRDMAWrites( - target: cudaFlushGPUDirectRDMAWritesTarget, - scope: cudaFlushGPUDirectRDMAWritesScope, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1 { + pub value: ::libc::c_ulonglong, } -extern "C" { - pub fn cudaThreadExit() -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1), + ), + ); + assert_eq!( + ::std::mem::align_of::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(value), + ), + ); } -extern "C" { - pub fn cudaThreadSynchronize() -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2 { + pub fence: *mut ::libc::c_void, + pub reserved: ::libc::c_ulonglong, } -extern "C" { - pub fn cudaThreadSetLimit(limit: cudaLimit, value: usize) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + ), + ); + assert_eq!( + ::std::mem::align_of::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fence), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(reserved), + ), + ); } -extern "C" { - pub fn cudaThreadGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3 { + pub key: ::libc::c_ulonglong, + pub timeoutMs: ::libc::c_uint, } -extern "C" { - pub fn cudaThreadGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, + >(), + 16usize, + concat!( + "Size of: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), + ), + ); + assert_eq!( + ::std::mem::align_of::< + cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3, + >(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(key), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).timeoutMs) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(timeoutMs), + ), + ); } -extern "C" { - pub fn cudaThreadSetCacheConfig(cacheConfig: cudaFuncCache) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaExternalSemaphoreWaitParams__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fence) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(fence), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nvSciSync) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(nvSciSync), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).keyedMutex) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(keyedMutex), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams__bindgen_ty_1), + "::", + stringify!(reserved), + ), + ); } -extern "C" { - pub fn cudaGetLastError() -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 144usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreWaitParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(params), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(flags), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 76usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitParams), + "::", + stringify!(reserved), + ), + ); } -extern "C" { - pub fn cudaPeekAtLastError() -> cudaError_t; +pub use self::cudaError as cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUstream_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaGetErrorName(error: cudaError_t) -> *const ::libc::c_char; +pub type cudaStream_t = *mut CUstream_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUevent_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaGetErrorString(error: cudaError_t) -> *const ::libc::c_char; +pub type cudaEvent_t = *mut CUevent_st; +pub type cudaGraphicsResource_t = *mut cudaGraphicsResource; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUexternalMemory_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaGetDeviceCount(count: *mut ::libc::c_int) -> cudaError_t; +pub type cudaExternalMemory_t = *mut CUexternalMemory_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUexternalSemaphore_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaGetDeviceProperties(prop: *mut cudaDeviceProp, device: ::libc::c_int) - -> cudaError_t; +pub type cudaExternalSemaphore_t = *mut CUexternalSemaphore_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraph_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaDeviceGetAttribute( - value: *mut ::libc::c_int, - attr: cudaDeviceAttr, - device: ::libc::c_int, - ) -> cudaError_t; +pub type cudaGraph_t = *mut CUgraph_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraphNode_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaDeviceGetDefaultMemPool( - memPool: *mut cudaMemPool_t, - device: ::libc::c_int, - ) -> cudaError_t; +pub type cudaGraphNode_t = *mut CUgraphNode_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUuserObject_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaDeviceSetMemPool(device: ::libc::c_int, memPool: cudaMemPool_t) -> cudaError_t; +pub type cudaUserObject_t = *mut CUuserObject_st; +pub type cudaGraphConditionalHandle = ::libc::c_ulonglong; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUfunc_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaDeviceGetMemPool(memPool: *mut cudaMemPool_t, device: ::libc::c_int) -> cudaError_t; +pub type cudaFunction_t = *mut CUfunc_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUkern_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaDeviceGetNvSciSyncAttributes( - nvSciSyncAttrList: *mut ::libc::c_void, - device: ::libc::c_int, - flags: ::libc::c_int, - ) -> cudaError_t; +pub type cudaKernel_t = *mut CUkern_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUmemPoolHandle_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaDeviceGetP2PAttribute( - value: *mut ::libc::c_int, - attr: cudaDeviceP2PAttr, - srcDevice: ::libc::c_int, - dstDevice: ::libc::c_int, - ) -> cudaError_t; -} -extern "C" { - pub fn cudaChooseDevice(device: *mut ::libc::c_int, prop: *const cudaDeviceProp) - -> cudaError_t; -} -extern "C" { - pub fn cudaSetDevice(device: ::libc::c_int) -> cudaError_t; +pub type cudaMemPool_t = *mut CUmemPoolHandle_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaCGScope { + cudaCGScopeInvalid = 0, + cudaCGScopeGrid = 1, + cudaCGScopeMultiGrid = 2, } -extern "C" { - pub fn cudaGetDevice(device: *mut ::libc::c_int) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchParams { + pub func: *mut ::libc::c_void, + pub gridDim: dim3, + pub blockDim: dim3, + pub args: *mut *mut ::libc::c_void, + pub sharedMem: usize, + pub stream: cudaStream_t, } -extern "C" { - pub fn cudaSetValidDevices(device_arr: *mut ::libc::c_int, len: ::libc::c_int) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaLaunchParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaLaunchParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(func), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(gridDim), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(blockDim), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(args), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharedMem) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(sharedMem), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchParams), + "::", + stringify!(stream), + ), + ); } -extern "C" { - pub fn cudaSetDeviceFlags(flags: ::libc::c_uint) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaKernelNodeParams { + pub func: *mut ::libc::c_void, + pub gridDim: dim3, + pub blockDim: dim3, + pub sharedMemBytes: ::libc::c_uint, + pub kernelParams: *mut *mut ::libc::c_void, + pub extra: *mut *mut ::libc::c_void, } -extern "C" { - pub fn cudaGetDeviceFlags(flags: *mut ::libc::c_uint) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaKernelNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaKernelNodeParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaKernelNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(func), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(gridDim), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(blockDim), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharedMemBytes) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(sharedMemBytes), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).kernelParams) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(kernelParams), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParams), + "::", + stringify!(extra), + ), + ); } -extern "C" { - pub fn cudaStreamCreate(pStream: *mut cudaStream_t) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaKernelNodeParamsV2 { + pub func: *mut ::libc::c_void, + pub gridDim: dim3, + pub blockDim: dim3, + pub sharedMemBytes: ::libc::c_uint, + pub kernelParams: *mut *mut ::libc::c_void, + pub extra: *mut *mut ::libc::c_void, } -extern "C" { - pub fn cudaStreamCreateWithFlags( - pStream: *mut cudaStream_t, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaKernelNodeParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaKernelNodeParamsV2)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaKernelNodeParamsV2)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(func), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(gridDim), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(blockDim), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sharedMemBytes) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(sharedMemBytes), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).kernelParams) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(kernelParams), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaKernelNodeParamsV2), + "::", + stringify!(extra), + ), + ); } -extern "C" { - pub fn cudaStreamCreateWithPriority( - pStream: *mut cudaStream_t, - flags: ::libc::c_uint, - priority: ::libc::c_int, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalNodeParams { + pub extSemArray: *mut cudaExternalSemaphore_t, + pub paramsArray: *const cudaExternalSemaphoreSignalParams, + pub numExtSems: ::libc::c_uint, } -extern "C" { - pub fn cudaStreamGetPriority( - hStream: cudaStream_t, - priority: *mut ::libc::c_int, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreSignalNodeParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreSignalNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(extSemArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(paramsArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParams), + "::", + stringify!(numExtSems), + ), + ); } -extern "C" { - pub fn cudaStreamGetFlags(hStream: cudaStream_t, flags: *mut ::libc::c_uint) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreSignalNodeParamsV2 { + pub extSemArray: *mut cudaExternalSemaphore_t, + pub paramsArray: *const cudaExternalSemaphoreSignalParams, + pub numExtSems: ::libc::c_uint, } -extern "C" { - pub fn cudaCtxResetPersistingL2Cache() -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreSignalNodeParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreSignalNodeParamsV2)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreSignalNodeParamsV2)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParamsV2), + "::", + stringify!(extSemArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParamsV2), + "::", + stringify!(paramsArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreSignalNodeParamsV2), + "::", + stringify!(numExtSems), + ), + ); } -extern "C" { - pub fn cudaStreamCopyAttributes(dst: cudaStream_t, src: cudaStream_t) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitNodeParams { + pub extSemArray: *mut cudaExternalSemaphore_t, + pub paramsArray: *const cudaExternalSemaphoreWaitParams, + pub numExtSems: ::libc::c_uint, } -extern "C" { - pub fn cudaStreamGetAttribute( - hStream: cudaStream_t, - attr: cudaStreamAttrID, - value_out: *mut cudaStreamAttrValue, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitNodeParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreWaitNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(extSemArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(paramsArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParams), + "::", + stringify!(numExtSems), + ), + ); } -extern "C" { - pub fn cudaStreamSetAttribute( - hStream: cudaStream_t, - attr: cudaStreamAttrID, - value: *const cudaStreamAttrValue, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaExternalSemaphoreWaitNodeParamsV2 { + pub extSemArray: *mut cudaExternalSemaphore_t, + pub paramsArray: *const cudaExternalSemaphoreWaitParams, + pub numExtSems: ::libc::c_uint, } -extern "C" { - pub fn cudaStreamDestroy(stream: cudaStream_t) -> cudaError_t; -} -extern "C" { - pub fn cudaStreamWaitEvent( - stream: cudaStream_t, - event: cudaEvent_t, - flags: ::libc::c_uint, - ) -> cudaError_t; -} -pub type cudaStreamCallback_t = ::std::option::Option< - unsafe extern "C" fn(stream: cudaStream_t, status: cudaError_t, userData: *mut ::libc::c_void), ->; -extern "C" { - pub fn cudaStreamAddCallback( - stream: cudaStream_t, - callback: cudaStreamCallback_t, - userData: *mut ::libc::c_void, - flags: ::libc::c_uint, - ) -> cudaError_t; -} -extern "C" { - pub fn cudaStreamSynchronize(stream: cudaStream_t) -> cudaError_t; -} -extern "C" { - pub fn cudaStreamQuery(stream: cudaStream_t) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaExternalSemaphoreWaitNodeParamsV2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaExternalSemaphoreWaitNodeParamsV2)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaExternalSemaphoreWaitNodeParamsV2)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemArray) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParamsV2), + "::", + stringify!(extSemArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).paramsArray) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParamsV2), + "::", + stringify!(paramsArray), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numExtSems) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaExternalSemaphoreWaitNodeParamsV2), + "::", + stringify!(numExtSems), + ), + ); } -extern "C" { - pub fn cudaStreamAttachMemAsync( - stream: cudaStream_t, - devPtr: *mut ::libc::c_void, - length: usize, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphConditionalHandleFlags { + cudaGraphCondAssignDefault = 1, } -extern "C" { - pub fn cudaStreamBeginCapture(stream: cudaStream_t, mode: cudaStreamCaptureMode) - -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphConditionalNodeType { + cudaGraphCondTypeIf = 0, + cudaGraphCondTypeWhile = 1, } -extern "C" { - pub fn cudaThreadExchangeStreamCaptureMode(mode: *mut cudaStreamCaptureMode) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaConditionalNodeParams { + pub handle: cudaGraphConditionalHandle, + pub type_: cudaGraphConditionalNodeType, + pub size: ::libc::c_uint, + pub phGraph_out: *mut cudaGraph_t, } -extern "C" { - pub fn cudaStreamEndCapture(stream: cudaStream_t, pGraph: *mut cudaGraph_t) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaConditionalNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaConditionalNodeParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaConditionalNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaConditionalNodeParams), + "::", + stringify!(handle), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaConditionalNodeParams), + "::", + stringify!(type_), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaConditionalNodeParams), + "::", + stringify!(size), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).phGraph_out) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaConditionalNodeParams), + "::", + stringify!(phGraph_out), + ), + ); } -extern "C" { - pub fn cudaStreamIsCapturing( - stream: cudaStream_t, - pCaptureStatus: *mut cudaStreamCaptureStatus, - ) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphNodeType { + cudaGraphNodeTypeKernel = 0, + cudaGraphNodeTypeMemcpy = 1, + cudaGraphNodeTypeMemset = 2, + cudaGraphNodeTypeHost = 3, + cudaGraphNodeTypeGraph = 4, + cudaGraphNodeTypeEmpty = 5, + cudaGraphNodeTypeWaitEvent = 6, + cudaGraphNodeTypeEventRecord = 7, + cudaGraphNodeTypeExtSemaphoreSignal = 8, + cudaGraphNodeTypeExtSemaphoreWait = 9, + cudaGraphNodeTypeMemAlloc = 10, + cudaGraphNodeTypeMemFree = 11, + cudaGraphNodeTypeConditional = 13, + cudaGraphNodeTypeCount = 14, } -extern "C" { - pub fn cudaStreamGetCaptureInfo( - stream: cudaStream_t, - pCaptureStatus: *mut cudaStreamCaptureStatus, - pId: *mut ::libc::c_ulonglong, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaChildGraphNodeParams { + pub graph: cudaGraph_t, } -extern "C" { - pub fn cudaStreamGetCaptureInfo_v2( - stream: cudaStream_t, - captureStatus_out: *mut cudaStreamCaptureStatus, - id_out: *mut ::libc::c_ulonglong, - graph_out: *mut cudaGraph_t, - dependencies_out: *mut *const cudaGraphNode_t, - numDependencies_out: *mut usize, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaChildGraphNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(cudaChildGraphNodeParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaChildGraphNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).graph) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaChildGraphNodeParams), + "::", + stringify!(graph), + ), + ); } -extern "C" { - pub fn cudaStreamUpdateCaptureDependencies( - stream: cudaStream_t, - dependencies: *mut cudaGraphNode_t, - numDependencies: usize, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaEventRecordNodeParams { + pub event: cudaEvent_t, } -extern "C" { - pub fn cudaEventCreate(event: *mut cudaEvent_t) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaEventRecordNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(cudaEventRecordNodeParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaEventRecordNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaEventRecordNodeParams), + "::", + stringify!(event), + ), + ); } -extern "C" { - pub fn cudaEventCreateWithFlags(event: *mut cudaEvent_t, flags: ::libc::c_uint) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaEventWaitNodeParams { + pub event: cudaEvent_t, } -extern "C" { - pub fn cudaEventRecord(event: cudaEvent_t, stream: cudaStream_t) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaEventWaitNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(cudaEventWaitNodeParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaEventWaitNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaEventWaitNodeParams), + "::", + stringify!(event), + ), + ); } -extern "C" { - pub fn cudaEventRecordWithFlags( - event: cudaEvent_t, - stream: cudaStream_t, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaGraphNodeParams { + pub type_: cudaGraphNodeType, + pub reserved0: [::libc::c_int; 3usize], + pub __bindgen_anon_1: cudaGraphNodeParams__bindgen_ty_1, + pub reserved2: ::libc::c_longlong, } -extern "C" { - pub fn cudaEventQuery(event: cudaEvent_t) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaGraphNodeParams__bindgen_ty_1 { + pub reserved1: [::libc::c_longlong; 29usize], + pub kernel: cudaKernelNodeParamsV2, + pub memcpy: cudaMemcpyNodeParams, + pub memset: cudaMemsetParamsV2, + pub host: cudaHostNodeParamsV2, + pub graph: cudaChildGraphNodeParams, + pub eventWait: cudaEventWaitNodeParams, + pub eventRecord: cudaEventRecordNodeParams, + pub extSemSignal: cudaExternalSemaphoreSignalNodeParamsV2, + pub extSemWait: cudaExternalSemaphoreWaitNodeParamsV2, + pub alloc: cudaMemAllocNodeParamsV2, + pub free: cudaMemFreeNodeParams, + pub conditional: cudaConditionalNodeParams, } -extern "C" { - pub fn cudaEventSynchronize(event: cudaEvent_t) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaGraphNodeParams__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 232usize, + concat!("Size of: ", stringify!(cudaGraphNodeParams__bindgen_ty_1)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaGraphNodeParams__bindgen_ty_1)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(reserved1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).kernel) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(kernel), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memcpy) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(memcpy), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(memset), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).host) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(host), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).graph) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(graph), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eventWait) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(eventWait), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eventRecord) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(eventRecord), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemSignal) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(extSemSignal), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extSemWait) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(extSemWait), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).alloc) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(alloc), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).free) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(free), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).conditional) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams__bindgen_ty_1), + "::", + stringify!(conditional), + ), + ); } -extern "C" { - pub fn cudaEventDestroy(event: cudaEvent_t) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaGraphNodeParams() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 256usize, + concat!("Size of: ", stringify!(cudaGraphNodeParams)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaGraphNodeParams)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams), + "::", + stringify!(type_), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved0) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams), + "::", + stringify!(reserved0), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, + 248usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphNodeParams), + "::", + stringify!(reserved2), + ), + ); } -extern "C" { - pub fn cudaEventElapsedTime(ms: *mut f32, start: cudaEvent_t, end: cudaEvent_t) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphDependencyType_enum { + cudaGraphDependencyTypeDefault = 0, + cudaGraphDependencyTypeProgrammatic = 1, } -extern "C" { - pub fn cudaImportExternalMemory( - extMem_out: *mut cudaExternalMemory_t, - memHandleDesc: *const cudaExternalMemoryHandleDesc, - ) -> cudaError_t; +pub use self::cudaGraphDependencyType_enum as cudaGraphDependencyType; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaGraphEdgeData_st { + pub from_port: ::libc::c_uchar, + pub to_port: ::libc::c_uchar, + pub type_: ::libc::c_uchar, + pub reserved: [::libc::c_uchar; 5usize], } -extern "C" { - pub fn cudaExternalMemoryGetMappedBuffer( - devPtr: *mut *mut ::libc::c_void, - extMem: cudaExternalMemory_t, - bufferDesc: *const cudaExternalMemoryBufferDesc, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaGraphEdgeData_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(cudaGraphEdgeData_st)), + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaGraphEdgeData_st)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).from_port) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphEdgeData_st), + "::", + stringify!(from_port), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).to_port) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphEdgeData_st), + "::", + stringify!(to_port), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphEdgeData_st), + "::", + stringify!(type_), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphEdgeData_st), + "::", + stringify!(reserved), + ), + ); } -extern "C" { - pub fn cudaExternalMemoryGetMappedMipmappedArray( - mipmap: *mut cudaMipmappedArray_t, - extMem: cudaExternalMemory_t, - mipmapDesc: *const cudaExternalMemoryMipmappedArrayDesc, - ) -> cudaError_t; +pub type cudaGraphEdgeData = cudaGraphEdgeData_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraphExec_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaDestroyExternalMemory(extMem: cudaExternalMemory_t) -> cudaError_t; +pub type cudaGraphExec_t = *mut CUgraphExec_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphExecUpdateResult { + cudaGraphExecUpdateSuccess = 0, + cudaGraphExecUpdateError = 1, + cudaGraphExecUpdateErrorTopologyChanged = 2, + cudaGraphExecUpdateErrorNodeTypeChanged = 3, + cudaGraphExecUpdateErrorFunctionChanged = 4, + cudaGraphExecUpdateErrorParametersChanged = 5, + cudaGraphExecUpdateErrorNotSupported = 6, + cudaGraphExecUpdateErrorUnsupportedFunctionChange = 7, + cudaGraphExecUpdateErrorAttributesChanged = 8, } -extern "C" { - pub fn cudaImportExternalSemaphore( - extSem_out: *mut cudaExternalSemaphore_t, - semHandleDesc: *const cudaExternalSemaphoreHandleDesc, - ) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphInstantiateResult { + cudaGraphInstantiateSuccess = 0, + cudaGraphInstantiateError = 1, + cudaGraphInstantiateInvalidStructure = 2, + cudaGraphInstantiateNodeOperationNotSupported = 3, + cudaGraphInstantiateMultipleDevicesNotSupported = 4, } -extern "C" { - pub fn cudaSignalExternalSemaphoresAsync_v2( - extSemArray: *const cudaExternalSemaphore_t, - paramsArray: *const cudaExternalSemaphoreSignalParams, - numExtSems: ::libc::c_uint, - stream: cudaStream_t, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaGraphInstantiateParams_st { + pub flags: ::libc::c_ulonglong, + pub uploadStream: cudaStream_t, + pub errNode_out: cudaGraphNode_t, + pub result_out: cudaGraphInstantiateResult, } -extern "C" { - pub fn cudaWaitExternalSemaphoresAsync_v2( - extSemArray: *const cudaExternalSemaphore_t, - paramsArray: *const cudaExternalSemaphoreWaitParams, - numExtSems: ::libc::c_uint, - stream: cudaStream_t, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaGraphInstantiateParams_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(cudaGraphInstantiateParams_st)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaGraphInstantiateParams_st)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphInstantiateParams_st), + "::", + stringify!(flags), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uploadStream) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphInstantiateParams_st), + "::", + stringify!(uploadStream), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).errNode_out) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphInstantiateParams_st), + "::", + stringify!(errNode_out), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).result_out) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphInstantiateParams_st), + "::", + stringify!(result_out), + ), + ); } -extern "C" { - pub fn cudaDestroyExternalSemaphore(extSem: cudaExternalSemaphore_t) -> cudaError_t; +pub type cudaGraphInstantiateParams = cudaGraphInstantiateParams_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaGraphExecUpdateResultInfo_st { + pub result: cudaGraphExecUpdateResult, + pub errorNode: cudaGraphNode_t, + pub errorFromNode: cudaGraphNode_t, } -extern "C" { - pub fn cudaLaunchKernel( - func: *const ::libc::c_void, - gridDim: dim3, - blockDim: dim3, - args: *mut *mut ::libc::c_void, - sharedMem: usize, - stream: cudaStream_t, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaGraphExecUpdateResultInfo_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaGraphExecUpdateResultInfo_st)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaGraphExecUpdateResultInfo_st)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).result) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphExecUpdateResultInfo_st), + "::", + stringify!(result), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).errorNode) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphExecUpdateResultInfo_st), + "::", + stringify!(errorNode), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).errorFromNode) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphExecUpdateResultInfo_st), + "::", + stringify!(errorFromNode), + ), + ); } -extern "C" { - pub fn cudaLaunchCooperativeKernel( - func: *const ::libc::c_void, - gridDim: dim3, - blockDim: dim3, - args: *mut *mut ::libc::c_void, - sharedMem: usize, - stream: cudaStream_t, - ) -> cudaError_t; +pub type cudaGraphExecUpdateResultInfo = cudaGraphExecUpdateResultInfo_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CUgraphDeviceUpdatableNode_st { + _unused: [u8; 0], } -extern "C" { - pub fn cudaLaunchCooperativeKernelMultiDevice( - launchParamsList: *mut cudaLaunchParams, - numDevices: ::libc::c_uint, - flags: ::libc::c_uint, - ) -> cudaError_t; +pub type cudaGraphDeviceNode_t = *mut CUgraphDeviceUpdatableNode_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphKernelNodeField { + cudaGraphKernelNodeFieldInvalid = 0, + cudaGraphKernelNodeFieldGridDim = 1, + cudaGraphKernelNodeFieldParam = 2, + cudaGraphKernelNodeFieldEnabled = 3, } -extern "C" { - pub fn cudaFuncSetCacheConfig( - func: *const ::libc::c_void, - cacheConfig: cudaFuncCache, - ) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaGraphKernelNodeUpdate { + pub node: cudaGraphDeviceNode_t, + pub field: cudaGraphKernelNodeField, + pub updateData: cudaGraphKernelNodeUpdate__bindgen_ty_1, } -extern "C" { - pub fn cudaFuncSetSharedMemConfig( - func: *const ::libc::c_void, - config: cudaSharedMemConfig, - ) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaGraphKernelNodeUpdate__bindgen_ty_1 { + pub gridDim: dim3, + pub param: cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1, + pub isEnabled: ::libc::c_uint, } -extern "C" { - pub fn cudaFuncGetAttributes( - attr: *mut cudaFuncAttributes, - func: *const ::libc::c_void, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1 { + pub pValue: *const ::libc::c_void, + pub offset: usize, + pub size: usize, } -extern "C" { - pub fn cudaFuncSetAttribute( - func: *const ::libc::c_void, - attr: cudaFuncAttribute, - value: ::libc::c_int, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!( + "Size of: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1), + ), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pValue) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(pValue), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(offset), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(size), + ), + ); } -extern "C" { - pub fn cudaSetDoubleForDevice(d: *mut f64) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaGraphKernelNodeUpdate__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1), + "::", + stringify!(gridDim), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).param) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1), + "::", + stringify!(param), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isEnabled) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate__bindgen_ty_1), + "::", + stringify!(isEnabled), + ), + ); } -extern "C" { - pub fn cudaSetDoubleForHost(d: *mut f64) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaGraphKernelNodeUpdate() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(cudaGraphKernelNodeUpdate)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaGraphKernelNodeUpdate)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).node) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate), + "::", + stringify!(node), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate), + "::", + stringify!(field), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).updateData) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaGraphKernelNodeUpdate), + "::", + stringify!(updateData), + ), + ); } -extern "C" { - pub fn cudaLaunchHostFunc( - stream: cudaStream_t, - fn_: cudaHostFn_t, - userData: *mut ::libc::c_void, - ) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGetDriverEntryPointFlags { + cudaEnableDefault = 0, + cudaEnableLegacyStream = 1, + cudaEnablePerThreadDefaultStream = 2, } -extern "C" { - pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessor( - numBlocks: *mut ::libc::c_int, - func: *const ::libc::c_void, - blockSize: ::libc::c_int, - dynamicSMemSize: usize, - ) -> cudaError_t; -} -extern "C" { - pub fn cudaOccupancyAvailableDynamicSMemPerBlock( - dynamicSmemSize: *mut usize, - func: *const ::libc::c_void, - numBlocks: ::libc::c_int, - blockSize: ::libc::c_int, - ) -> cudaError_t; -} -extern "C" { - pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags( - numBlocks: *mut ::libc::c_int, - func: *const ::libc::c_void, - blockSize: ::libc::c_int, - dynamicSMemSize: usize, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaDriverEntryPointQueryResult { + cudaDriverEntryPointSuccess = 0, + cudaDriverEntryPointSymbolNotFound = 1, + cudaDriverEntryPointVersionNotSufficent = 2, } -extern "C" { - pub fn cudaMallocManaged( - devPtr: *mut *mut ::libc::c_void, - size: usize, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphDebugDotFlags { + cudaGraphDebugDotFlagsVerbose = 1, + cudaGraphDebugDotFlagsKernelNodeParams = 4, + cudaGraphDebugDotFlagsMemcpyNodeParams = 8, + cudaGraphDebugDotFlagsMemsetNodeParams = 16, + cudaGraphDebugDotFlagsHostNodeParams = 32, + cudaGraphDebugDotFlagsEventNodeParams = 64, + cudaGraphDebugDotFlagsExtSemasSignalNodeParams = 128, + cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 256, + cudaGraphDebugDotFlagsKernelNodeAttributes = 512, + cudaGraphDebugDotFlagsHandles = 1024, + cudaGraphDebugDotFlagsConditionalNodeParams = 32768, } -extern "C" { - pub fn cudaMalloc(devPtr: *mut *mut ::libc::c_void, size: usize) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaGraphInstantiateFlags { + cudaGraphInstantiateFlagAutoFreeOnLaunch = 1, + cudaGraphInstantiateFlagUpload = 2, + cudaGraphInstantiateFlagDeviceLaunch = 4, + cudaGraphInstantiateFlagUseNodePriority = 8, } -extern "C" { - pub fn cudaMallocHost(ptr: *mut *mut ::libc::c_void, size: usize) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaLaunchMemSyncDomain { + cudaLaunchMemSyncDomainDefault = 0, + cudaLaunchMemSyncDomainRemote = 1, } -extern "C" { - pub fn cudaMallocPitch( - devPtr: *mut *mut ::libc::c_void, - pitch: *mut usize, - width: usize, - height: usize, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchMemSyncDomainMap_st { + pub default_: ::libc::c_uchar, + pub remote: ::libc::c_uchar, } -extern "C" { - pub fn cudaMallocArray( - array: *mut cudaArray_t, - desc: *const cudaChannelFormatDesc, - width: usize, - height: usize, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaLaunchMemSyncDomainMap_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2usize, + concat!("Size of: ", stringify!(cudaLaunchMemSyncDomainMap_st)), + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(cudaLaunchMemSyncDomainMap_st)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).default_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchMemSyncDomainMap_st), + "::", + stringify!(default_), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).remote) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchMemSyncDomainMap_st), + "::", + stringify!(remote), + ), + ); } -extern "C" { - pub fn cudaFree(devPtr: *mut ::libc::c_void) -> cudaError_t; +pub type cudaLaunchMemSyncDomainMap = cudaLaunchMemSyncDomainMap_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaLaunchAttributeID { + cudaLaunchAttributeIgnore = 0, + cudaLaunchAttributeAccessPolicyWindow = 1, + cudaLaunchAttributeCooperative = 2, + cudaLaunchAttributeSynchronizationPolicy = 3, + cudaLaunchAttributeClusterDimension = 4, + cudaLaunchAttributeClusterSchedulingPolicyPreference = 5, + cudaLaunchAttributeProgrammaticStreamSerialization = 6, + cudaLaunchAttributeProgrammaticEvent = 7, + cudaLaunchAttributePriority = 8, + cudaLaunchAttributeMemSyncDomainMap = 9, + cudaLaunchAttributeMemSyncDomain = 10, + cudaLaunchAttributeLaunchCompletionEvent = 12, + cudaLaunchAttributeDeviceUpdatableKernelNode = 13, } -extern "C" { - pub fn cudaFreeHost(ptr: *mut ::libc::c_void) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaLaunchAttributeValue { + pub pad: [::libc::c_char; 64usize], + pub accessPolicyWindow: cudaAccessPolicyWindow, + pub cooperative: ::libc::c_int, + pub syncPolicy: cudaSynchronizationPolicy, + pub clusterDim: cudaLaunchAttributeValue__bindgen_ty_1, + pub clusterSchedulingPolicyPreference: cudaClusterSchedulingPolicy, + pub programmaticStreamSerializationAllowed: ::libc::c_int, + pub programmaticEvent: cudaLaunchAttributeValue__bindgen_ty_2, + pub priority: ::libc::c_int, + pub memSyncDomainMap: cudaLaunchMemSyncDomainMap, + pub memSyncDomain: cudaLaunchMemSyncDomain, + pub launchCompletionEvent: cudaLaunchAttributeValue__bindgen_ty_3, + pub deviceUpdatableKernelNode: cudaLaunchAttributeValue__bindgen_ty_4, } -extern "C" { - pub fn cudaFreeArray(array: cudaArray_t) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchAttributeValue__bindgen_ty_1 { + pub x: ::libc::c_uint, + pub y: ::libc::c_uint, + pub z: ::libc::c_uint, } -extern "C" { - pub fn cudaFreeMipmappedArray(mipmappedArray: cudaMipmappedArray_t) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaLaunchAttributeValue__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(cudaLaunchAttributeValue__bindgen_ty_1)), + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(cudaLaunchAttributeValue__bindgen_ty_1)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_1), + "::", + stringify!(x), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).y) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_1), + "::", + stringify!(y), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).z) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_1), + "::", + stringify!(z), + ), + ); } -extern "C" { - pub fn cudaHostAlloc( - pHost: *mut *mut ::libc::c_void, - size: usize, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchAttributeValue__bindgen_ty_2 { + pub event: cudaEvent_t, + pub flags: ::libc::c_int, + pub triggerAtBlockStart: ::libc::c_int, } -extern "C" { - pub fn cudaHostRegister( - ptr: *mut ::libc::c_void, - size: usize, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaLaunchAttributeValue__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(cudaLaunchAttributeValue__bindgen_ty_2)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchAttributeValue__bindgen_ty_2)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_2), + "::", + stringify!(event), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_2), + "::", + stringify!(flags), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).triggerAtBlockStart) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_2), + "::", + stringify!(triggerAtBlockStart), + ), + ); } -extern "C" { - pub fn cudaHostUnregister(ptr: *mut ::libc::c_void) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchAttributeValue__bindgen_ty_3 { + pub event: cudaEvent_t, + pub flags: ::libc::c_int, } -extern "C" { - pub fn cudaHostGetDevicePointer( - pDevice: *mut *mut ::libc::c_void, - pHost: *mut ::libc::c_void, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaLaunchAttributeValue__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(cudaLaunchAttributeValue__bindgen_ty_3)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchAttributeValue__bindgen_ty_3)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_3), + "::", + stringify!(event), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_3), + "::", + stringify!(flags), + ), + ); } -extern "C" { - pub fn cudaHostGetFlags(pFlags: *mut ::libc::c_uint, pHost: *mut ::libc::c_void) - -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchAttributeValue__bindgen_ty_4 { + pub deviceUpdatable: ::libc::c_int, + pub devNode: cudaGraphDeviceNode_t, } -extern "C" { - pub fn cudaMalloc3D(pitchedDevPtr: *mut cudaPitchedPtr, extent: cudaExtent) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaLaunchAttributeValue__bindgen_ty_4() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(cudaLaunchAttributeValue__bindgen_ty_4)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchAttributeValue__bindgen_ty_4)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).deviceUpdatable) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_4), + "::", + stringify!(deviceUpdatable), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).devNode) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue__bindgen_ty_4), + "::", + stringify!(devNode), + ), + ); } -extern "C" { - pub fn cudaMalloc3DArray( - array: *mut cudaArray_t, - desc: *const cudaChannelFormatDesc, - extent: cudaExtent, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaLaunchAttributeValue() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(cudaLaunchAttributeValue)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchAttributeValue)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(pad), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).accessPolicyWindow) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(accessPolicyWindow), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cooperative) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(cooperative), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).syncPolicy) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(syncPolicy), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).clusterDim) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(clusterDim), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).clusterSchedulingPolicyPreference) as usize + - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(clusterSchedulingPolicyPreference), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).programmaticStreamSerializationAllowed) as usize + - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(programmaticStreamSerializationAllowed), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).programmaticEvent) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(programmaticEvent), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(priority), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memSyncDomainMap) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(memSyncDomainMap), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memSyncDomain) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(memSyncDomain), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).launchCompletionEvent) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(launchCompletionEvent), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).deviceUpdatableKernelNode) as usize + - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttributeValue), + "::", + stringify!(deviceUpdatableKernelNode), + ), + ); } -extern "C" { - pub fn cudaMallocMipmappedArray( - mipmappedArray: *mut cudaMipmappedArray_t, - desc: *const cudaChannelFormatDesc, - extent: cudaExtent, - numLevels: ::libc::c_uint, - flags: ::libc::c_uint, - ) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaLaunchAttribute_st { + pub id: cudaLaunchAttributeID, + pub pad: [::libc::c_char; 4usize], + pub val: cudaLaunchAttributeValue, } -extern "C" { - pub fn cudaGetMipmappedArrayLevel( - levelArray: *mut cudaArray_t, - mipmappedArray: cudaMipmappedArray_const_t, - level: ::libc::c_uint, - ) -> cudaError_t; -} -extern "C" { - pub fn cudaMemcpy3D(p: *const cudaMemcpy3DParms) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaLaunchAttribute_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(cudaLaunchAttribute_st)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchAttribute_st)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttribute_st), + "::", + stringify!(id), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttribute_st), + "::", + stringify!(pad), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchAttribute_st), + "::", + stringify!(val), + ), + ); } -extern "C" { - pub fn cudaMemcpy3DPeer(p: *const cudaMemcpy3DPeerParms) -> cudaError_t; +pub type cudaLaunchAttribute = cudaLaunchAttribute_st; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaLaunchConfig_st { + pub gridDim: dim3, + pub blockDim: dim3, + pub dynamicSmemBytes: usize, + pub stream: cudaStream_t, + pub attrs: *mut cudaLaunchAttribute, + pub numAttrs: ::libc::c_uint, } -extern "C" { - pub fn cudaMemcpy3DAsync(p: *const cudaMemcpy3DParms, stream: cudaStream_t) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaLaunchConfig_st() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(cudaLaunchConfig_st)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaLaunchConfig_st)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gridDim) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(gridDim), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).blockDim) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(blockDim), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dynamicSmemBytes) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(dynamicSmemBytes), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(stream), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).attrs) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(attrs), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numAttrs) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaLaunchConfig_st), + "::", + stringify!(numAttrs), + ), + ); } -extern "C" { - pub fn cudaMemcpy3DPeerAsync( - p: *const cudaMemcpy3DPeerParms, - stream: cudaStream_t, - ) -> cudaError_t; +pub type cudaLaunchConfig_t = cudaLaunchConfig_st; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaDeviceNumaConfig { + cudaDeviceNumaConfigNone = 0, + cudaDeviceNumaConfigNumaNode = 1, } -extern "C" { - pub fn cudaMemGetInfo(free: *mut usize, total: *mut usize) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaAsyncCallbackEntry { + _unused: [u8; 0], } -extern "C" { - pub fn cudaArrayGetInfo( - desc: *mut cudaChannelFormatDesc, - extent: *mut cudaExtent, - flags: *mut ::libc::c_uint, - array: cudaArray_t, - ) -> cudaError_t; +pub type cudaAsyncCallbackHandle_t = *mut cudaAsyncCallbackEntry; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaAsyncNotificationType_enum { + cudaAsyncNotificationTypeOverBudget = 1, } -extern "C" { - pub fn cudaArrayGetPlane( - pPlaneArray: *mut cudaArray_t, - hArray: cudaArray_t, - planeIdx: ::libc::c_uint, - ) -> cudaError_t; +pub use self::cudaAsyncNotificationType_enum as cudaAsyncNotificationType; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct cudaAsyncNotificationInfo { + pub type_: cudaAsyncNotificationType, + pub info: cudaAsyncNotificationInfo__bindgen_ty_1, } -extern "C" { - pub fn cudaArrayGetMemoryRequirements( - memoryRequirements: *mut cudaArrayMemoryRequirements, - array: cudaArray_t, - device: ::libc::c_int, - ) -> cudaError_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub union cudaAsyncNotificationInfo__bindgen_ty_1 { + pub overBudget: cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1, } -extern "C" { - pub fn cudaMipmappedArrayGetMemoryRequirements( - memoryRequirements: *mut cudaArrayMemoryRequirements, - mipmap: cudaMipmappedArray_t, - device: ::libc::c_int, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1 { + pub bytesOverBudget: ::libc::c_ulonglong, } -extern "C" { - pub fn cudaArrayGetSparseProperties( - sparseProperties: *mut cudaArraySparseProperties, - array: cudaArray_t, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1), + ), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bytesOverBudget) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaAsyncNotificationInfo__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(bytesOverBudget), + ), + ); } -extern "C" { - pub fn cudaMipmappedArrayGetSparseProperties( - sparseProperties: *mut cudaArraySparseProperties, - mipmap: cudaMipmappedArray_t, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaAsyncNotificationInfo__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(cudaAsyncNotificationInfo__bindgen_ty_1)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaAsyncNotificationInfo__bindgen_ty_1)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).overBudget) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaAsyncNotificationInfo__bindgen_ty_1), + "::", + stringify!(overBudget), + ), + ); } -extern "C" { - pub fn cudaMemcpy( - dst: *mut ::libc::c_void, - src: *const ::libc::c_void, - count: usize, - kind: cudaMemcpyKind, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaAsyncNotificationInfo() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(cudaAsyncNotificationInfo)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudaAsyncNotificationInfo)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaAsyncNotificationInfo), + "::", + stringify!(type_), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).info) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudaAsyncNotificationInfo), + "::", + stringify!(info), + ), + ); } -extern "C" { - pub fn cudaMemcpyPeer( - dst: *mut ::libc::c_void, - dstDevice: ::libc::c_int, - src: *const ::libc::c_void, - srcDevice: ::libc::c_int, - count: usize, - ) -> cudaError_t; +pub type cudaAsyncNotificationInfo_t = cudaAsyncNotificationInfo; +pub type cudaAsyncCallback = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut cudaAsyncNotificationInfo_t, + arg2: *mut ::libc::c_void, + arg3: cudaAsyncCallbackHandle_t, + ), +>; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaSurfaceBoundaryMode { + cudaBoundaryModeZero = 0, + cudaBoundaryModeClamp = 1, + cudaBoundaryModeTrap = 2, } -extern "C" { - pub fn cudaMemcpy2D( - dst: *mut ::libc::c_void, - dpitch: usize, - src: *const ::libc::c_void, - spitch: usize, - width: usize, - height: usize, - kind: cudaMemcpyKind, - ) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaSurfaceFormatMode { + cudaFormatModeForced = 0, + cudaFormatModeAuto = 1, } -extern "C" { - pub fn cudaMemcpy2DToArray( - dst: cudaArray_t, - wOffset: usize, - hOffset: usize, - src: *const ::libc::c_void, - spitch: usize, - width: usize, - height: usize, - kind: cudaMemcpyKind, - ) -> cudaError_t; +pub type cudaSurfaceObject_t = ::libc::c_ulonglong; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaTextureAddressMode { + cudaAddressModeWrap = 0, + cudaAddressModeClamp = 1, + cudaAddressModeMirror = 2, + cudaAddressModeBorder = 3, } -extern "C" { - pub fn cudaMemcpy2DFromArray( - dst: *mut ::libc::c_void, - dpitch: usize, - src: cudaArray_const_t, - wOffset: usize, - hOffset: usize, - width: usize, - height: usize, - kind: cudaMemcpyKind, - ) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaTextureFilterMode { + cudaFilterModePoint = 0, + cudaFilterModeLinear = 1, } -extern "C" { - pub fn cudaMemcpy2DArrayToArray( - dst: cudaArray_t, - wOffsetDst: usize, - hOffsetDst: usize, - src: cudaArray_const_t, - wOffsetSrc: usize, - hOffsetSrc: usize, - width: usize, - height: usize, - kind: cudaMemcpyKind, - ) -> cudaError_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaTextureReadMode { + cudaReadModeElementType = 0, + cudaReadModeNormalizedFloat = 1, } -extern "C" { - pub fn cudaMemcpyToSymbol( - symbol: *const ::libc::c_void, - src: *const ::libc::c_void, - count: usize, - offset: usize, - kind: cudaMemcpyKind, - ) -> cudaError_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudaTextureDesc { + pub addressMode: [cudaTextureAddressMode; 3usize], + pub filterMode: cudaTextureFilterMode, + pub readMode: cudaTextureReadMode, + pub sRGB: ::libc::c_int, + pub borderColor: [f32; 4usize], + pub normalizedCoords: ::libc::c_int, + pub maxAnisotropy: ::libc::c_uint, + pub mipmapFilterMode: cudaTextureFilterMode, + pub mipmapLevelBias: f32, + pub minMipmapLevelClamp: f32, + pub maxMipmapLevelClamp: f32, + pub disableTrilinearOptimization: ::libc::c_int, + pub seamlessCubemap: ::libc::c_int, } -extern "C" { - pub fn cudaMemcpyFromSymbol( - dst: *mut ::libc::c_void, - symbol: *const ::libc::c_void, - count: usize, - offset: usize, - kind: cudaMemcpyKind, - ) -> cudaError_t; +#[test] +fn bindgen_test_layout_cudaTextureDesc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(cudaTextureDesc)), + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(cudaTextureDesc)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addressMode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(addressMode), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).filterMode) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(filterMode), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).readMode) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(readMode), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sRGB) as usize - ptr as usize }, + 20usize, + concat!("Offset of field: ", stringify!(cudaTextureDesc), "::", stringify!(sRGB)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).borderColor) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(borderColor), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).normalizedCoords) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(normalizedCoords), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).maxAnisotropy) as usize - ptr as usize }, + 44usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(maxAnisotropy), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mipmapFilterMode) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(mipmapFilterMode), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mipmapLevelBias) as usize - ptr as usize }, + 52usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(mipmapLevelBias), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).minMipmapLevelClamp) as usize - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(minMipmapLevelClamp), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).maxMipmapLevelClamp) as usize - ptr as usize + }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(maxMipmapLevelClamp), + ), + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).disableTrilinearOptimization) as usize + - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(disableTrilinearOptimization), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).seamlessCubemap) as usize - ptr as usize }, + 68usize, + concat!( + "Offset of field: ", + stringify!(cudaTextureDesc), + "::", + stringify!(seamlessCubemap), + ), + ); } +pub type cudaTextureObject_t = ::libc::c_ulonglong; extern "C" { - pub fn cudaMemcpyAsync( - dst: *mut ::libc::c_void, - src: *const ::libc::c_void, - count: usize, - kind: cudaMemcpyKind, - stream: cudaStream_t, - ) -> cudaError_t; + pub fn cudaDeviceReset() -> cudaError_t; } extern "C" { - pub fn cudaMemcpyPeerAsync( - dst: *mut ::libc::c_void, - dstDevice: ::libc::c_int, - src: *const ::libc::c_void, - srcDevice: ::libc::c_int, - count: usize, - stream: cudaStream_t, - ) -> cudaError_t; + pub fn cudaDeviceSynchronize() -> cudaError_t; } extern "C" { - pub fn cudaMemcpy2DAsync( - dst: *mut ::libc::c_void, - dpitch: usize, - src: *const ::libc::c_void, - spitch: usize, - width: usize, - height: usize, - kind: cudaMemcpyKind, - stream: cudaStream_t, - ) -> cudaError_t; + pub fn cudaDeviceSetLimit(limit: cudaLimit, value: usize) -> cudaError_t; } extern "C" { - pub fn cudaMemcpy2DToArrayAsync( - dst: cudaArray_t, - wOffset: usize, - hOffset: usize, - src: *const ::libc::c_void, - spitch: usize, - width: usize, - height: usize, - kind: cudaMemcpyKind, - stream: cudaStream_t, - ) -> cudaError_t; + pub fn cudaDeviceGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t; } extern "C" { - pub fn cudaMemcpy2DFromArrayAsync( - dst: *mut ::libc::c_void, - dpitch: usize, - src: cudaArray_const_t, - wOffset: usize, - hOffset: usize, - width: usize, - height: usize, - kind: cudaMemcpyKind, - stream: cudaStream_t, + pub fn cudaDeviceGetTexture1DLinearMaxWidth( + maxWidthInElements: *mut usize, + fmtDesc: *const cudaChannelFormatDesc, + device: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaMemcpyToSymbolAsync( - symbol: *const ::libc::c_void, - src: *const ::libc::c_void, - count: usize, - offset: usize, - kind: cudaMemcpyKind, - stream: cudaStream_t, - ) -> cudaError_t; + pub fn cudaDeviceGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t; } extern "C" { - pub fn cudaMemcpyFromSymbolAsync( - dst: *mut ::libc::c_void, - symbol: *const ::libc::c_void, - count: usize, - offset: usize, - kind: cudaMemcpyKind, - stream: cudaStream_t, + pub fn cudaDeviceGetStreamPriorityRange( + leastPriority: *mut ::libc::c_int, + greatestPriority: *mut ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaMemset( - devPtr: *mut ::libc::c_void, - value: ::libc::c_int, - count: usize, - ) -> cudaError_t; + pub fn cudaDeviceSetCacheConfig(cacheConfig: cudaFuncCache) -> cudaError_t; } extern "C" { - pub fn cudaMemset2D( - devPtr: *mut ::libc::c_void, - pitch: usize, - value: ::libc::c_int, - width: usize, - height: usize, + pub fn cudaDeviceGetByPCIBusId( + device: *mut ::libc::c_int, + pciBusId: *const ::libc::c_char, ) -> cudaError_t; } extern "C" { - pub fn cudaMemset3D( - pitchedDevPtr: cudaPitchedPtr, - value: ::libc::c_int, - extent: cudaExtent, + pub fn cudaDeviceGetPCIBusId( + pciBusId: *mut ::libc::c_char, + len: ::libc::c_int, + device: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaMemsetAsync( - devPtr: *mut ::libc::c_void, - value: ::libc::c_int, - count: usize, - stream: cudaStream_t, + pub fn cudaIpcGetEventHandle( + handle: *mut cudaIpcEventHandle_t, + event: cudaEvent_t, ) -> cudaError_t; } extern "C" { - pub fn cudaMemset2DAsync( - devPtr: *mut ::libc::c_void, - pitch: usize, - value: ::libc::c_int, - width: usize, - height: usize, - stream: cudaStream_t, + pub fn cudaIpcOpenEventHandle( + event: *mut cudaEvent_t, + handle: cudaIpcEventHandle_t, ) -> cudaError_t; } extern "C" { - pub fn cudaMemset3DAsync( - pitchedDevPtr: cudaPitchedPtr, - value: ::libc::c_int, - extent: cudaExtent, - stream: cudaStream_t, + pub fn cudaIpcGetMemHandle( + handle: *mut cudaIpcMemHandle_t, + devPtr: *mut ::libc::c_void, ) -> cudaError_t; } extern "C" { - pub fn cudaGetSymbolAddress( + pub fn cudaIpcOpenMemHandle( devPtr: *mut *mut ::libc::c_void, - symbol: *const ::libc::c_void, + handle: cudaIpcMemHandle_t, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGetSymbolSize(size: *mut usize, symbol: *const ::libc::c_void) -> cudaError_t; + pub fn cudaIpcCloseMemHandle(devPtr: *mut ::libc::c_void) -> cudaError_t; } extern "C" { - pub fn cudaMemPrefetchAsync( - devPtr: *const ::libc::c_void, - count: usize, - dstDevice: ::libc::c_int, - stream: cudaStream_t, + pub fn cudaDeviceFlushGPUDirectRDMAWrites( + target: cudaFlushGPUDirectRDMAWritesTarget, + scope: cudaFlushGPUDirectRDMAWritesScope, ) -> cudaError_t; } extern "C" { - pub fn cudaMemAdvise( - devPtr: *const ::libc::c_void, - count: usize, - advice: cudaMemoryAdvise, + pub fn cudaDeviceRegisterAsyncNotification( device: ::libc::c_int, + callbackFunc: cudaAsyncCallback, + userData: *mut ::libc::c_void, + callback: *mut cudaAsyncCallbackHandle_t, ) -> cudaError_t; } extern "C" { - pub fn cudaMemRangeGetAttribute( - data: *mut ::libc::c_void, - dataSize: usize, - attribute: cudaMemRangeAttribute, - devPtr: *const ::libc::c_void, - count: usize, + pub fn cudaDeviceUnregisterAsyncNotification( + device: ::libc::c_int, + callback: cudaAsyncCallbackHandle_t, ) -> cudaError_t; } extern "C" { - pub fn cudaMemRangeGetAttributes( - data: *mut *mut ::libc::c_void, - dataSizes: *mut usize, - attributes: *mut cudaMemRangeAttribute, - numAttributes: usize, - devPtr: *const ::libc::c_void, - count: usize, + pub fn cudaDeviceGetSharedMemConfig( + pConfig: *mut cudaSharedMemConfig, ) -> cudaError_t; } extern "C" { - pub fn cudaMemcpyToArray( - dst: cudaArray_t, - wOffset: usize, - hOffset: usize, - src: *const ::libc::c_void, - count: usize, - kind: cudaMemcpyKind, - ) -> cudaError_t; + pub fn cudaDeviceSetSharedMemConfig(config: cudaSharedMemConfig) -> cudaError_t; } extern "C" { - pub fn cudaMemcpyFromArray( - dst: *mut ::libc::c_void, - src: cudaArray_const_t, - wOffset: usize, - hOffset: usize, - count: usize, - kind: cudaMemcpyKind, - ) -> cudaError_t; + pub fn cudaThreadExit() -> cudaError_t; } extern "C" { - pub fn cudaMemcpyArrayToArray( - dst: cudaArray_t, - wOffsetDst: usize, - hOffsetDst: usize, - src: cudaArray_const_t, - wOffsetSrc: usize, - hOffsetSrc: usize, - count: usize, - kind: cudaMemcpyKind, - ) -> cudaError_t; + pub fn cudaThreadSynchronize() -> cudaError_t; } extern "C" { - pub fn cudaMemcpyToArrayAsync( - dst: cudaArray_t, - wOffset: usize, - hOffset: usize, - src: *const ::libc::c_void, - count: usize, - kind: cudaMemcpyKind, - stream: cudaStream_t, - ) -> cudaError_t; + pub fn cudaThreadSetLimit(limit: cudaLimit, value: usize) -> cudaError_t; } extern "C" { - pub fn cudaMemcpyFromArrayAsync( - dst: *mut ::libc::c_void, - src: cudaArray_const_t, - wOffset: usize, - hOffset: usize, - count: usize, - kind: cudaMemcpyKind, - stream: cudaStream_t, - ) -> cudaError_t; + pub fn cudaThreadGetLimit(pValue: *mut usize, limit: cudaLimit) -> cudaError_t; } extern "C" { - pub fn cudaMallocAsync( - devPtr: *mut *mut ::libc::c_void, - size: usize, - hStream: cudaStream_t, - ) -> cudaError_t; + pub fn cudaThreadGetCacheConfig(pCacheConfig: *mut cudaFuncCache) -> cudaError_t; } extern "C" { - pub fn cudaFreeAsync(devPtr: *mut ::libc::c_void, hStream: cudaStream_t) -> cudaError_t; + pub fn cudaThreadSetCacheConfig(cacheConfig: cudaFuncCache) -> cudaError_t; } extern "C" { - pub fn cudaMemPoolTrimTo(memPool: cudaMemPool_t, minBytesToKeep: usize) -> cudaError_t; + pub fn cudaGetLastError() -> cudaError_t; } extern "C" { - pub fn cudaMemPoolSetAttribute( - memPool: cudaMemPool_t, - attr: cudaMemPoolAttr, - value: *mut ::libc::c_void, - ) -> cudaError_t; + pub fn cudaPeekAtLastError() -> cudaError_t; } extern "C" { - pub fn cudaMemPoolGetAttribute( - memPool: cudaMemPool_t, - attr: cudaMemPoolAttr, - value: *mut ::libc::c_void, - ) -> cudaError_t; + pub fn cudaGetErrorName(error: cudaError_t) -> *const ::libc::c_char; } extern "C" { - pub fn cudaMemPoolSetAccess( - memPool: cudaMemPool_t, - descList: *const cudaMemAccessDesc, - count: usize, - ) -> cudaError_t; + pub fn cudaGetErrorString(error: cudaError_t) -> *const ::libc::c_char; } extern "C" { - pub fn cudaMemPoolGetAccess( - flags: *mut cudaMemAccessFlags, - memPool: cudaMemPool_t, - location: *mut cudaMemLocation, - ) -> cudaError_t; + pub fn cudaGetDeviceCount(count: *mut ::libc::c_int) -> cudaError_t; } extern "C" { - pub fn cudaMemPoolCreate( - memPool: *mut cudaMemPool_t, - poolProps: *const cudaMemPoolProps, + pub fn cudaGetDeviceProperties_v2( + prop: *mut cudaDeviceProp, + device: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaMemPoolDestroy(memPool: cudaMemPool_t) -> cudaError_t; + pub fn cudaDeviceGetAttribute( + value: *mut ::libc::c_int, + attr: cudaDeviceAttr, + device: ::libc::c_int, + ) -> cudaError_t; } extern "C" { - pub fn cudaMallocFromPoolAsync( - ptr: *mut *mut ::libc::c_void, - size: usize, - memPool: cudaMemPool_t, - stream: cudaStream_t, + pub fn cudaDeviceGetDefaultMemPool( + memPool: *mut cudaMemPool_t, + device: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaMemPoolExportToShareableHandle( - shareableHandle: *mut ::libc::c_void, + pub fn cudaDeviceSetMemPool( + device: ::libc::c_int, memPool: cudaMemPool_t, - handleType: cudaMemAllocationHandleType, - flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaMemPoolImportFromShareableHandle( + pub fn cudaDeviceGetMemPool( memPool: *mut cudaMemPool_t, - shareableHandle: *mut ::libc::c_void, - handleType: cudaMemAllocationHandleType, - flags: ::libc::c_uint, + device: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaMemPoolExportPointer( - exportData: *mut cudaMemPoolPtrExportData, - ptr: *mut ::libc::c_void, + pub fn cudaDeviceGetNvSciSyncAttributes( + nvSciSyncAttrList: *mut ::libc::c_void, + device: ::libc::c_int, + flags: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaMemPoolImportPointer( - ptr: *mut *mut ::libc::c_void, - memPool: cudaMemPool_t, - exportData: *mut cudaMemPoolPtrExportData, + pub fn cudaDeviceGetP2PAttribute( + value: *mut ::libc::c_int, + attr: cudaDeviceP2PAttr, + srcDevice: ::libc::c_int, + dstDevice: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaPointerGetAttributes( - attributes: *mut cudaPointerAttributes, - ptr: *const ::libc::c_void, + pub fn cudaChooseDevice( + device: *mut ::libc::c_int, + prop: *const cudaDeviceProp, ) -> cudaError_t; } extern "C" { - pub fn cudaDeviceCanAccessPeer( - canAccessPeer: *mut ::libc::c_int, + pub fn cudaInitDevice( device: ::libc::c_int, - peerDevice: ::libc::c_int, - ) -> cudaError_t; -} -extern "C" { - pub fn cudaDeviceEnablePeerAccess( - peerDevice: ::libc::c_int, + deviceFlags: ::libc::c_uint, flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaDeviceDisablePeerAccess(peerDevice: ::libc::c_int) -> cudaError_t; + pub fn cudaSetDevice(device: ::libc::c_int) -> cudaError_t; } extern "C" { - pub fn cudaGraphicsUnregisterResource(resource: cudaGraphicsResource_t) -> cudaError_t; + pub fn cudaGetDevice(device: *mut ::libc::c_int) -> cudaError_t; } extern "C" { - pub fn cudaGraphicsResourceSetMapFlags( - resource: cudaGraphicsResource_t, - flags: ::libc::c_uint, + pub fn cudaSetValidDevices( + device_arr: *mut ::libc::c_int, + len: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphicsMapResources( - count: ::libc::c_int, - resources: *mut cudaGraphicsResource_t, - stream: cudaStream_t, - ) -> cudaError_t; + pub fn cudaSetDeviceFlags(flags: ::libc::c_uint) -> cudaError_t; } extern "C" { - pub fn cudaGraphicsUnmapResources( - count: ::libc::c_int, - resources: *mut cudaGraphicsResource_t, - stream: cudaStream_t, - ) -> cudaError_t; + pub fn cudaGetDeviceFlags(flags: *mut ::libc::c_uint) -> cudaError_t; } extern "C" { - pub fn cudaGraphicsResourceGetMappedPointer( - devPtr: *mut *mut ::libc::c_void, - size: *mut usize, - resource: cudaGraphicsResource_t, - ) -> cudaError_t; + pub fn cudaStreamCreate(pStream: *mut cudaStream_t) -> cudaError_t; } extern "C" { - pub fn cudaGraphicsSubResourceGetMappedArray( - array: *mut cudaArray_t, - resource: cudaGraphicsResource_t, - arrayIndex: ::libc::c_uint, - mipLevel: ::libc::c_uint, + pub fn cudaStreamCreateWithFlags( + pStream: *mut cudaStream_t, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphicsResourceGetMappedMipmappedArray( - mipmappedArray: *mut cudaMipmappedArray_t, - resource: cudaGraphicsResource_t, + pub fn cudaStreamCreateWithPriority( + pStream: *mut cudaStream_t, + flags: ::libc::c_uint, + priority: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaBindTexture( - offset: *mut usize, - texref: *const textureReference, - devPtr: *const ::libc::c_void, - desc: *const cudaChannelFormatDesc, - size: usize, + pub fn cudaStreamGetPriority( + hStream: cudaStream_t, + priority: *mut ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaBindTexture2D( - offset: *mut usize, - texref: *const textureReference, - devPtr: *const ::libc::c_void, - desc: *const cudaChannelFormatDesc, - width: usize, - height: usize, - pitch: usize, + pub fn cudaStreamGetFlags( + hStream: cudaStream_t, + flags: *mut ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaBindTextureToArray( - texref: *const textureReference, - array: cudaArray_const_t, - desc: *const cudaChannelFormatDesc, + pub fn cudaStreamGetId( + hStream: cudaStream_t, + streamId: *mut ::libc::c_ulonglong, ) -> cudaError_t; } extern "C" { - pub fn cudaBindTextureToMipmappedArray( - texref: *const textureReference, - mipmappedArray: cudaMipmappedArray_const_t, - desc: *const cudaChannelFormatDesc, - ) -> cudaError_t; + pub fn cudaCtxResetPersistingL2Cache() -> cudaError_t; } extern "C" { - pub fn cudaUnbindTexture(texref: *const textureReference) -> cudaError_t; + pub fn cudaStreamCopyAttributes(dst: cudaStream_t, src: cudaStream_t) -> cudaError_t; } extern "C" { - pub fn cudaGetTextureAlignmentOffset( - offset: *mut usize, - texref: *const textureReference, + pub fn cudaStreamGetAttribute( + hStream: cudaStream_t, + attr: cudaLaunchAttributeID, + value_out: *mut cudaLaunchAttributeValue, ) -> cudaError_t; } extern "C" { - pub fn cudaGetTextureReference( - texref: *mut *const textureReference, - symbol: *const ::libc::c_void, + pub fn cudaStreamSetAttribute( + hStream: cudaStream_t, + attr: cudaLaunchAttributeID, + value: *const cudaLaunchAttributeValue, ) -> cudaError_t; } extern "C" { - pub fn cudaBindSurfaceToArray( - surfref: *const surfaceReference, - array: cudaArray_const_t, - desc: *const cudaChannelFormatDesc, - ) -> cudaError_t; + pub fn cudaStreamDestroy(stream: cudaStream_t) -> cudaError_t; } extern "C" { - pub fn cudaGetSurfaceReference( - surfref: *mut *const surfaceReference, - symbol: *const ::libc::c_void, + pub fn cudaStreamWaitEvent( + stream: cudaStream_t, + event: cudaEvent_t, + flags: ::libc::c_uint, ) -> cudaError_t; } +pub type cudaStreamCallback_t = ::std::option::Option< + unsafe extern "C" fn( + stream: cudaStream_t, + status: cudaError_t, + userData: *mut ::libc::c_void, + ), +>; extern "C" { - pub fn cudaGetChannelDesc( - desc: *mut cudaChannelFormatDesc, - array: cudaArray_const_t, + pub fn cudaStreamAddCallback( + stream: cudaStream_t, + callback: cudaStreamCallback_t, + userData: *mut ::libc::c_void, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaCreateChannelDesc( - x: ::libc::c_int, - y: ::libc::c_int, - z: ::libc::c_int, - w: ::libc::c_int, - f: cudaChannelFormatKind, - ) -> cudaChannelFormatDesc; + pub fn cudaStreamSynchronize(stream: cudaStream_t) -> cudaError_t; } extern "C" { - pub fn cudaCreateTextureObject( - pTexObject: *mut cudaTextureObject_t, - pResDesc: *const cudaResourceDesc, - pTexDesc: *const cudaTextureDesc, - pResViewDesc: *const cudaResourceViewDesc, + pub fn cudaStreamQuery(stream: cudaStream_t) -> cudaError_t; +} +extern "C" { + pub fn cudaStreamAttachMemAsync( + stream: cudaStream_t, + devPtr: *mut ::libc::c_void, + length: usize, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaDestroyTextureObject(texObject: cudaTextureObject_t) -> cudaError_t; + pub fn cudaStreamBeginCapture( + stream: cudaStream_t, + mode: cudaStreamCaptureMode, + ) -> cudaError_t; } extern "C" { - pub fn cudaGetTextureObjectResourceDesc( - pResDesc: *mut cudaResourceDesc, - texObject: cudaTextureObject_t, + pub fn cudaStreamBeginCaptureToGraph( + stream: cudaStream_t, + graph: cudaGraph_t, + dependencies: *const cudaGraphNode_t, + dependencyData: *const cudaGraphEdgeData, + numDependencies: usize, + mode: cudaStreamCaptureMode, ) -> cudaError_t; } extern "C" { - pub fn cudaGetTextureObjectTextureDesc( - pTexDesc: *mut cudaTextureDesc, - texObject: cudaTextureObject_t, + pub fn cudaThreadExchangeStreamCaptureMode( + mode: *mut cudaStreamCaptureMode, ) -> cudaError_t; } extern "C" { - pub fn cudaGetTextureObjectResourceViewDesc( - pResViewDesc: *mut cudaResourceViewDesc, - texObject: cudaTextureObject_t, + pub fn cudaStreamEndCapture( + stream: cudaStream_t, + pGraph: *mut cudaGraph_t, ) -> cudaError_t; } extern "C" { - pub fn cudaCreateSurfaceObject( - pSurfObject: *mut cudaSurfaceObject_t, - pResDesc: *const cudaResourceDesc, + pub fn cudaStreamIsCapturing( + stream: cudaStream_t, + pCaptureStatus: *mut cudaStreamCaptureStatus, ) -> cudaError_t; } extern "C" { - pub fn cudaDestroySurfaceObject(surfObject: cudaSurfaceObject_t) -> cudaError_t; + pub fn cudaStreamGetCaptureInfo_v2( + stream: cudaStream_t, + captureStatus_out: *mut cudaStreamCaptureStatus, + id_out: *mut ::libc::c_ulonglong, + graph_out: *mut cudaGraph_t, + dependencies_out: *mut *const cudaGraphNode_t, + numDependencies_out: *mut usize, + ) -> cudaError_t; } extern "C" { - pub fn cudaGetSurfaceObjectResourceDesc( - pResDesc: *mut cudaResourceDesc, - surfObject: cudaSurfaceObject_t, + pub fn cudaStreamGetCaptureInfo_v3( + stream: cudaStream_t, + captureStatus_out: *mut cudaStreamCaptureStatus, + id_out: *mut ::libc::c_ulonglong, + graph_out: *mut cudaGraph_t, + dependencies_out: *mut *const cudaGraphNode_t, + edgeData_out: *mut *const cudaGraphEdgeData, + numDependencies_out: *mut usize, ) -> cudaError_t; } extern "C" { - pub fn cudaDriverGetVersion(driverVersion: *mut ::libc::c_int) -> cudaError_t; + pub fn cudaStreamUpdateCaptureDependencies( + stream: cudaStream_t, + dependencies: *mut cudaGraphNode_t, + numDependencies: usize, + flags: ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudaRuntimeGetVersion(runtimeVersion: *mut ::libc::c_int) -> cudaError_t; + pub fn cudaStreamUpdateCaptureDependencies_v2( + stream: cudaStream_t, + dependencies: *mut cudaGraphNode_t, + dependencyData: *const cudaGraphEdgeData, + numDependencies: usize, + flags: ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudaGraphCreate(pGraph: *mut cudaGraph_t, flags: ::libc::c_uint) -> cudaError_t; + pub fn cudaEventCreate(event: *mut cudaEvent_t) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddKernelNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - pNodeParams: *const cudaKernelNodeParams, + pub fn cudaEventCreateWithFlags( + event: *mut cudaEvent_t, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphKernelNodeGetParams( - node: cudaGraphNode_t, - pNodeParams: *mut cudaKernelNodeParams, - ) -> cudaError_t; + pub fn cudaEventRecord(event: cudaEvent_t, stream: cudaStream_t) -> cudaError_t; } extern "C" { - pub fn cudaGraphKernelNodeSetParams( - node: cudaGraphNode_t, - pNodeParams: *const cudaKernelNodeParams, + pub fn cudaEventRecordWithFlags( + event: cudaEvent_t, + stream: cudaStream_t, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphKernelNodeCopyAttributes( - hSrc: cudaGraphNode_t, - hDst: cudaGraphNode_t, - ) -> cudaError_t; + pub fn cudaEventQuery(event: cudaEvent_t) -> cudaError_t; } extern "C" { - pub fn cudaGraphKernelNodeGetAttribute( - hNode: cudaGraphNode_t, - attr: cudaKernelNodeAttrID, - value_out: *mut cudaKernelNodeAttrValue, - ) -> cudaError_t; + pub fn cudaEventSynchronize(event: cudaEvent_t) -> cudaError_t; } extern "C" { - pub fn cudaGraphKernelNodeSetAttribute( - hNode: cudaGraphNode_t, - attr: cudaKernelNodeAttrID, - value: *const cudaKernelNodeAttrValue, - ) -> cudaError_t; + pub fn cudaEventDestroy(event: cudaEvent_t) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddMemcpyNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - pCopyParams: *const cudaMemcpy3DParms, + pub fn cudaEventElapsedTime( + ms: *mut f32, + start: cudaEvent_t, + end: cudaEvent_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddMemcpyNodeToSymbol( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - symbol: *const ::libc::c_void, - src: *const ::libc::c_void, - count: usize, - offset: usize, - kind: cudaMemcpyKind, + pub fn cudaImportExternalMemory( + extMem_out: *mut cudaExternalMemory_t, + memHandleDesc: *const cudaExternalMemoryHandleDesc, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddMemcpyNodeFromSymbol( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - dst: *mut ::libc::c_void, - symbol: *const ::libc::c_void, - count: usize, - offset: usize, - kind: cudaMemcpyKind, + pub fn cudaExternalMemoryGetMappedBuffer( + devPtr: *mut *mut ::libc::c_void, + extMem: cudaExternalMemory_t, + bufferDesc: *const cudaExternalMemoryBufferDesc, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddMemcpyNode1D( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - dst: *mut ::libc::c_void, - src: *const ::libc::c_void, - count: usize, - kind: cudaMemcpyKind, + pub fn cudaExternalMemoryGetMappedMipmappedArray( + mipmap: *mut cudaMipmappedArray_t, + extMem: cudaExternalMemory_t, + mipmapDesc: *const cudaExternalMemoryMipmappedArrayDesc, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphMemcpyNodeGetParams( - node: cudaGraphNode_t, - pNodeParams: *mut cudaMemcpy3DParms, - ) -> cudaError_t; + pub fn cudaDestroyExternalMemory(extMem: cudaExternalMemory_t) -> cudaError_t; } extern "C" { - pub fn cudaGraphMemcpyNodeSetParams( - node: cudaGraphNode_t, - pNodeParams: *const cudaMemcpy3DParms, + pub fn cudaImportExternalSemaphore( + extSem_out: *mut cudaExternalSemaphore_t, + semHandleDesc: *const cudaExternalSemaphoreHandleDesc, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphMemcpyNodeSetParamsToSymbol( - node: cudaGraphNode_t, - symbol: *const ::libc::c_void, - src: *const ::libc::c_void, - count: usize, - offset: usize, - kind: cudaMemcpyKind, + pub fn cudaSignalExternalSemaphoresAsync_v2( + extSemArray: *const cudaExternalSemaphore_t, + paramsArray: *const cudaExternalSemaphoreSignalParams, + numExtSems: ::libc::c_uint, + stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphMemcpyNodeSetParamsFromSymbol( - node: cudaGraphNode_t, - dst: *mut ::libc::c_void, - symbol: *const ::libc::c_void, - count: usize, - offset: usize, - kind: cudaMemcpyKind, + pub fn cudaWaitExternalSemaphoresAsync_v2( + extSemArray: *const cudaExternalSemaphore_t, + paramsArray: *const cudaExternalSemaphoreWaitParams, + numExtSems: ::libc::c_uint, + stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphMemcpyNodeSetParams1D( - node: cudaGraphNode_t, - dst: *mut ::libc::c_void, - src: *const ::libc::c_void, - count: usize, - kind: cudaMemcpyKind, - ) -> cudaError_t; + pub fn cudaDestroyExternalSemaphore(extSem: cudaExternalSemaphore_t) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddMemsetNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - pMemsetParams: *const cudaMemsetParams, + pub fn cudaLaunchKernel( + func: *const ::libc::c_void, + gridDim: dim3, + blockDim: dim3, + args: *mut *mut ::libc::c_void, + sharedMem: usize, + stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphMemsetNodeGetParams( - node: cudaGraphNode_t, - pNodeParams: *mut cudaMemsetParams, + pub fn cudaLaunchKernelExC( + config: *const cudaLaunchConfig_t, + func: *const ::libc::c_void, + args: *mut *mut ::libc::c_void, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphMemsetNodeSetParams( - node: cudaGraphNode_t, - pNodeParams: *const cudaMemsetParams, + pub fn cudaLaunchCooperativeKernel( + func: *const ::libc::c_void, + gridDim: dim3, + blockDim: dim3, + args: *mut *mut ::libc::c_void, + sharedMem: usize, + stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddHostNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - pNodeParams: *const cudaHostNodeParams, + pub fn cudaLaunchCooperativeKernelMultiDevice( + launchParamsList: *mut cudaLaunchParams, + numDevices: ::libc::c_uint, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphHostNodeGetParams( - node: cudaGraphNode_t, - pNodeParams: *mut cudaHostNodeParams, + pub fn cudaFuncSetCacheConfig( + func: *const ::libc::c_void, + cacheConfig: cudaFuncCache, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphHostNodeSetParams( - node: cudaGraphNode_t, - pNodeParams: *const cudaHostNodeParams, + pub fn cudaFuncGetAttributes( + attr: *mut cudaFuncAttributes, + func: *const ::libc::c_void, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddChildGraphNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - childGraph: cudaGraph_t, + pub fn cudaFuncSetAttribute( + func: *const ::libc::c_void, + attr: cudaFuncAttribute, + value: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphChildGraphNodeGetGraph( - node: cudaGraphNode_t, - pGraph: *mut cudaGraph_t, + pub fn cudaFuncGetName( + name: *mut *const ::libc::c_char, + func: *const ::libc::c_void, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddEmptyNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, + pub fn cudaFuncGetParamInfo( + func: *const ::libc::c_void, + paramIndex: usize, + paramOffset: *mut usize, + paramSize: *mut usize, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddEventRecordNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - event: cudaEvent_t, - ) -> cudaError_t; + pub fn cudaSetDoubleForDevice(d: *mut f64) -> cudaError_t; } extern "C" { - pub fn cudaGraphEventRecordNodeGetEvent( - node: cudaGraphNode_t, - event_out: *mut cudaEvent_t, - ) -> cudaError_t; + pub fn cudaSetDoubleForHost(d: *mut f64) -> cudaError_t; } extern "C" { - pub fn cudaGraphEventRecordNodeSetEvent( - node: cudaGraphNode_t, - event: cudaEvent_t, + pub fn cudaLaunchHostFunc( + stream: cudaStream_t, + fn_: cudaHostFn_t, + userData: *mut ::libc::c_void, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddEventWaitNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - event: cudaEvent_t, + pub fn cudaFuncSetSharedMemConfig( + func: *const ::libc::c_void, + config: cudaSharedMemConfig, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphEventWaitNodeGetEvent( - node: cudaGraphNode_t, - event_out: *mut cudaEvent_t, + pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessor( + numBlocks: *mut ::libc::c_int, + func: *const ::libc::c_void, + blockSize: ::libc::c_int, + dynamicSMemSize: usize, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphEventWaitNodeSetEvent(node: cudaGraphNode_t, event: cudaEvent_t) - -> cudaError_t; + pub fn cudaOccupancyAvailableDynamicSMemPerBlock( + dynamicSmemSize: *mut usize, + func: *const ::libc::c_void, + numBlocks: ::libc::c_int, + blockSize: ::libc::c_int, + ) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddExternalSemaphoresSignalNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - nodeParams: *const cudaExternalSemaphoreSignalNodeParams, + pub fn cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags( + numBlocks: *mut ::libc::c_int, + func: *const ::libc::c_void, + blockSize: ::libc::c_int, + dynamicSMemSize: usize, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExternalSemaphoresSignalNodeGetParams( - hNode: cudaGraphNode_t, - params_out: *mut cudaExternalSemaphoreSignalNodeParams, + pub fn cudaOccupancyMaxPotentialClusterSize( + clusterSize: *mut ::libc::c_int, + func: *const ::libc::c_void, + launchConfig: *const cudaLaunchConfig_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExternalSemaphoresSignalNodeSetParams( - hNode: cudaGraphNode_t, - nodeParams: *const cudaExternalSemaphoreSignalNodeParams, + pub fn cudaOccupancyMaxActiveClusters( + numClusters: *mut ::libc::c_int, + func: *const ::libc::c_void, + launchConfig: *const cudaLaunchConfig_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddExternalSemaphoresWaitNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - nodeParams: *const cudaExternalSemaphoreWaitNodeParams, + pub fn cudaMallocManaged( + devPtr: *mut *mut ::libc::c_void, + size: usize, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExternalSemaphoresWaitNodeGetParams( - hNode: cudaGraphNode_t, - params_out: *mut cudaExternalSemaphoreWaitNodeParams, - ) -> cudaError_t; + pub fn cudaMalloc(devPtr: *mut *mut ::libc::c_void, size: usize) -> cudaError_t; } extern "C" { - pub fn cudaGraphExternalSemaphoresWaitNodeSetParams( - hNode: cudaGraphNode_t, - nodeParams: *const cudaExternalSemaphoreWaitNodeParams, - ) -> cudaError_t; + pub fn cudaMallocHost(ptr: *mut *mut ::libc::c_void, size: usize) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddMemAllocNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - nodeParams: *mut cudaMemAllocNodeParams, + pub fn cudaMallocPitch( + devPtr: *mut *mut ::libc::c_void, + pitch: *mut usize, + width: usize, + height: usize, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphMemAllocNodeGetParams( - node: cudaGraphNode_t, - params_out: *mut cudaMemAllocNodeParams, + pub fn cudaMallocArray( + array: *mut cudaArray_t, + desc: *const cudaChannelFormatDesc, + width: usize, + height: usize, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddMemFreeNode( - pGraphNode: *mut cudaGraphNode_t, - graph: cudaGraph_t, - pDependencies: *const cudaGraphNode_t, - numDependencies: usize, - dptr: *mut ::libc::c_void, - ) -> cudaError_t; + pub fn cudaFree(devPtr: *mut ::libc::c_void) -> cudaError_t; } extern "C" { - pub fn cudaGraphMemFreeNodeGetParams( - node: cudaGraphNode_t, - dptr_out: *mut ::libc::c_void, - ) -> cudaError_t; + pub fn cudaFreeHost(ptr: *mut ::libc::c_void) -> cudaError_t; } extern "C" { - pub fn cudaDeviceGraphMemTrim(device: ::libc::c_int) -> cudaError_t; + pub fn cudaFreeArray(array: cudaArray_t) -> cudaError_t; } extern "C" { - pub fn cudaDeviceGetGraphMemAttribute( - device: ::libc::c_int, - attr: cudaGraphMemAttributeType, - value: *mut ::libc::c_void, + pub fn cudaFreeMipmappedArray(mipmappedArray: cudaMipmappedArray_t) -> cudaError_t; +} +extern "C" { + pub fn cudaHostAlloc( + pHost: *mut *mut ::libc::c_void, + size: usize, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaDeviceSetGraphMemAttribute( - device: ::libc::c_int, - attr: cudaGraphMemAttributeType, - value: *mut ::libc::c_void, + pub fn cudaHostRegister( + ptr: *mut ::libc::c_void, + size: usize, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphClone(pGraphClone: *mut cudaGraph_t, originalGraph: cudaGraph_t) - -> cudaError_t; + pub fn cudaHostUnregister(ptr: *mut ::libc::c_void) -> cudaError_t; } extern "C" { - pub fn cudaGraphNodeFindInClone( - pNode: *mut cudaGraphNode_t, - originalNode: cudaGraphNode_t, - clonedGraph: cudaGraph_t, + pub fn cudaHostGetDevicePointer( + pDevice: *mut *mut ::libc::c_void, + pHost: *mut ::libc::c_void, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphNodeGetType( - node: cudaGraphNode_t, - pType: *mut cudaGraphNodeType, + pub fn cudaHostGetFlags( + pFlags: *mut ::libc::c_uint, + pHost: *mut ::libc::c_void, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphGetNodes( - graph: cudaGraph_t, - nodes: *mut cudaGraphNode_t, - numNodes: *mut usize, + pub fn cudaMalloc3D( + pitchedDevPtr: *mut cudaPitchedPtr, + extent: cudaExtent, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphGetRootNodes( - graph: cudaGraph_t, - pRootNodes: *mut cudaGraphNode_t, - pNumRootNodes: *mut usize, + pub fn cudaMalloc3DArray( + array: *mut cudaArray_t, + desc: *const cudaChannelFormatDesc, + extent: cudaExtent, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphGetEdges( - graph: cudaGraph_t, - from: *mut cudaGraphNode_t, - to: *mut cudaGraphNode_t, - numEdges: *mut usize, + pub fn cudaMallocMipmappedArray( + mipmappedArray: *mut cudaMipmappedArray_t, + desc: *const cudaChannelFormatDesc, + extent: cudaExtent, + numLevels: ::libc::c_uint, + flags: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphNodeGetDependencies( - node: cudaGraphNode_t, - pDependencies: *mut cudaGraphNode_t, - pNumDependencies: *mut usize, + pub fn cudaGetMipmappedArrayLevel( + levelArray: *mut cudaArray_t, + mipmappedArray: cudaMipmappedArray_const_t, + level: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphNodeGetDependentNodes( - node: cudaGraphNode_t, - pDependentNodes: *mut cudaGraphNode_t, - pNumDependentNodes: *mut usize, - ) -> cudaError_t; + pub fn cudaMemcpy3D(p: *const cudaMemcpy3DParms) -> cudaError_t; } extern "C" { - pub fn cudaGraphAddDependencies( - graph: cudaGraph_t, - from: *const cudaGraphNode_t, - to: *const cudaGraphNode_t, - numDependencies: usize, + pub fn cudaMemcpy3DPeer(p: *const cudaMemcpy3DPeerParms) -> cudaError_t; +} +extern "C" { + pub fn cudaMemcpy3DAsync( + p: *const cudaMemcpy3DParms, + stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphRemoveDependencies( - graph: cudaGraph_t, - from: *const cudaGraphNode_t, - to: *const cudaGraphNode_t, - numDependencies: usize, + pub fn cudaMemcpy3DPeerAsync( + p: *const cudaMemcpy3DPeerParms, + stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphDestroyNode(node: cudaGraphNode_t) -> cudaError_t; + pub fn cudaMemGetInfo(free: *mut usize, total: *mut usize) -> cudaError_t; } extern "C" { - pub fn cudaGraphInstantiate( - pGraphExec: *mut cudaGraphExec_t, - graph: cudaGraph_t, - pErrorNode: *mut cudaGraphNode_t, - pLogBuffer: *mut ::libc::c_char, - bufferSize: usize, + pub fn cudaArrayGetInfo( + desc: *mut cudaChannelFormatDesc, + extent: *mut cudaExtent, + flags: *mut ::libc::c_uint, + array: cudaArray_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphInstantiateWithFlags( - pGraphExec: *mut cudaGraphExec_t, - graph: cudaGraph_t, - flags: ::libc::c_ulonglong, + pub fn cudaArrayGetPlane( + pPlaneArray: *mut cudaArray_t, + hArray: cudaArray_t, + planeIdx: ::libc::c_uint, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecKernelNodeSetParams( - hGraphExec: cudaGraphExec_t, - node: cudaGraphNode_t, - pNodeParams: *const cudaKernelNodeParams, + pub fn cudaArrayGetMemoryRequirements( + memoryRequirements: *mut cudaArrayMemoryRequirements, + array: cudaArray_t, + device: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecMemcpyNodeSetParams( - hGraphExec: cudaGraphExec_t, - node: cudaGraphNode_t, - pNodeParams: *const cudaMemcpy3DParms, + pub fn cudaMipmappedArrayGetMemoryRequirements( + memoryRequirements: *mut cudaArrayMemoryRequirements, + mipmap: cudaMipmappedArray_t, + device: ::libc::c_int, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecMemcpyNodeSetParamsToSymbol( - hGraphExec: cudaGraphExec_t, - node: cudaGraphNode_t, - symbol: *const ::libc::c_void, - src: *const ::libc::c_void, - count: usize, - offset: usize, - kind: cudaMemcpyKind, + pub fn cudaArrayGetSparseProperties( + sparseProperties: *mut cudaArraySparseProperties, + array: cudaArray_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecMemcpyNodeSetParamsFromSymbol( - hGraphExec: cudaGraphExec_t, - node: cudaGraphNode_t, - dst: *mut ::libc::c_void, - symbol: *const ::libc::c_void, - count: usize, - offset: usize, - kind: cudaMemcpyKind, + pub fn cudaMipmappedArrayGetSparseProperties( + sparseProperties: *mut cudaArraySparseProperties, + mipmap: cudaMipmappedArray_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecMemcpyNodeSetParams1D( - hGraphExec: cudaGraphExec_t, - node: cudaGraphNode_t, + pub fn cudaMemcpy( dst: *mut ::libc::c_void, src: *const ::libc::c_void, count: usize, @@ -9629,4770 +8629,5186 @@ extern "C" { ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecMemsetNodeSetParams( - hGraphExec: cudaGraphExec_t, - node: cudaGraphNode_t, - pNodeParams: *const cudaMemsetParams, + pub fn cudaMemcpyPeer( + dst: *mut ::libc::c_void, + dstDevice: ::libc::c_int, + src: *const ::libc::c_void, + srcDevice: ::libc::c_int, + count: usize, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecHostNodeSetParams( - hGraphExec: cudaGraphExec_t, - node: cudaGraphNode_t, - pNodeParams: *const cudaHostNodeParams, + pub fn cudaMemcpy2D( + dst: *mut ::libc::c_void, + dpitch: usize, + src: *const ::libc::c_void, + spitch: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecChildGraphNodeSetParams( - hGraphExec: cudaGraphExec_t, - node: cudaGraphNode_t, - childGraph: cudaGraph_t, + pub fn cudaMemcpy2DToArray( + dst: cudaArray_t, + wOffset: usize, + hOffset: usize, + src: *const ::libc::c_void, + spitch: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecEventRecordNodeSetEvent( - hGraphExec: cudaGraphExec_t, - hNode: cudaGraphNode_t, - event: cudaEvent_t, + pub fn cudaMemcpy2DFromArray( + dst: *mut ::libc::c_void, + dpitch: usize, + src: cudaArray_const_t, + wOffset: usize, + hOffset: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecEventWaitNodeSetEvent( - hGraphExec: cudaGraphExec_t, - hNode: cudaGraphNode_t, - event: cudaEvent_t, + pub fn cudaMemcpy2DArrayToArray( + dst: cudaArray_t, + wOffsetDst: usize, + hOffsetDst: usize, + src: cudaArray_const_t, + wOffsetSrc: usize, + hOffsetSrc: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecExternalSemaphoresSignalNodeSetParams( - hGraphExec: cudaGraphExec_t, - hNode: cudaGraphNode_t, - nodeParams: *const cudaExternalSemaphoreSignalNodeParams, + pub fn cudaMemcpyToSymbol( + symbol: *const ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecExternalSemaphoresWaitNodeSetParams( - hGraphExec: cudaGraphExec_t, - hNode: cudaGraphNode_t, - nodeParams: *const cudaExternalSemaphoreWaitNodeParams, + pub fn cudaMemcpyFromSymbol( + dst: *mut ::libc::c_void, + symbol: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphNodeSetEnabled( - hGraphExec: cudaGraphExec_t, - hNode: cudaGraphNode_t, - isEnabled: ::libc::c_uint, + pub fn cudaMemcpyAsync( + dst: *mut ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphNodeGetEnabled( - hGraphExec: cudaGraphExec_t, - hNode: cudaGraphNode_t, - isEnabled: *mut ::libc::c_uint, + pub fn cudaMemcpyPeerAsync( + dst: *mut ::libc::c_void, + dstDevice: ::libc::c_int, + src: *const ::libc::c_void, + srcDevice: ::libc::c_int, + count: usize, + stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecUpdate( - hGraphExec: cudaGraphExec_t, - hGraph: cudaGraph_t, - hErrorNode_out: *mut cudaGraphNode_t, - updateResult_out: *mut cudaGraphExecUpdateResult, + pub fn cudaMemcpy2DAsync( + dst: *mut ::libc::c_void, + dpitch: usize, + src: *const ::libc::c_void, + spitch: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphUpload(graphExec: cudaGraphExec_t, stream: cudaStream_t) -> cudaError_t; + pub fn cudaMemcpy2DToArrayAsync( + dst: cudaArray_t, + wOffset: usize, + hOffset: usize, + src: *const ::libc::c_void, + spitch: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; } extern "C" { - pub fn cudaGraphLaunch(graphExec: cudaGraphExec_t, stream: cudaStream_t) -> cudaError_t; + pub fn cudaMemcpy2DFromArrayAsync( + dst: *mut ::libc::c_void, + dpitch: usize, + src: cudaArray_const_t, + wOffset: usize, + hOffset: usize, + width: usize, + height: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; } extern "C" { - pub fn cudaGraphExecDestroy(graphExec: cudaGraphExec_t) -> cudaError_t; + pub fn cudaMemcpyToSymbolAsync( + symbol: *const ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; } extern "C" { - pub fn cudaGraphDestroy(graph: cudaGraph_t) -> cudaError_t; + pub fn cudaMemcpyFromSymbolAsync( + dst: *mut ::libc::c_void, + symbol: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; } extern "C" { - pub fn cudaGraphDebugDotPrint( - graph: cudaGraph_t, - path: *const ::libc::c_char, - flags: ::libc::c_uint, + pub fn cudaMemset( + devPtr: *mut ::libc::c_void, + value: ::libc::c_int, + count: usize, ) -> cudaError_t; } extern "C" { - pub fn cudaUserObjectCreate( - object_out: *mut cudaUserObject_t, - ptr: *mut ::libc::c_void, - destroy: cudaHostFn_t, - initialRefcount: ::libc::c_uint, - flags: ::libc::c_uint, + pub fn cudaMemset2D( + devPtr: *mut ::libc::c_void, + pitch: usize, + value: ::libc::c_int, + width: usize, + height: usize, ) -> cudaError_t; } extern "C" { - pub fn cudaUserObjectRetain(object: cudaUserObject_t, count: ::libc::c_uint) -> cudaError_t; + pub fn cudaMemset3D( + pitchedDevPtr: cudaPitchedPtr, + value: ::libc::c_int, + extent: cudaExtent, + ) -> cudaError_t; } extern "C" { - pub fn cudaUserObjectRelease(object: cudaUserObject_t, count: ::libc::c_uint) -> cudaError_t; + pub fn cudaMemsetAsync( + devPtr: *mut ::libc::c_void, + value: ::libc::c_int, + count: usize, + stream: cudaStream_t, + ) -> cudaError_t; } extern "C" { - pub fn cudaGraphRetainUserObject( - graph: cudaGraph_t, - object: cudaUserObject_t, - count: ::libc::c_uint, - flags: ::libc::c_uint, + pub fn cudaMemset2DAsync( + devPtr: *mut ::libc::c_void, + pitch: usize, + value: ::libc::c_int, + width: usize, + height: usize, + stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGraphReleaseUserObject( - graph: cudaGraph_t, - object: cudaUserObject_t, - count: ::libc::c_uint, + pub fn cudaMemset3DAsync( + pitchedDevPtr: cudaPitchedPtr, + value: ::libc::c_int, + extent: cudaExtent, + stream: cudaStream_t, ) -> cudaError_t; } extern "C" { - pub fn cudaGetDriverEntryPoint( - symbol: *const ::libc::c_char, - funcPtr: *mut *mut ::libc::c_void, - flags: ::libc::c_ulonglong, + pub fn cudaGetSymbolAddress( + devPtr: *mut *mut ::libc::c_void, + symbol: *const ::libc::c_void, ) -> cudaError_t; } extern "C" { - pub fn cudaGetExportTable( - ppExportTable: *mut *const ::libc::c_void, - pExportTableId: *const cudaUUID_t, + pub fn cudaGetSymbolSize( + size: *mut usize, + symbol: *const ::libc::c_void, ) -> cudaError_t; } extern "C" { - pub fn cudaGetFuncBySymbol( - functionPtr: *mut cudaFunction_t, - symbolPtr: *const ::libc::c_void, + pub fn cudaMemPrefetchAsync( + devPtr: *const ::libc::c_void, + count: usize, + dstDevice: ::libc::c_int, + stream: cudaStream_t, ) -> cudaError_t; } -pub type __int32_t = ::libc::c_int; -pub type __uint32_t = ::libc::c_uint; -pub type __int64_t = ::libc::c_long; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnContext { - _unused: [u8; 0], -} -pub type cudnnHandle_t = *mut cudnnContext; extern "C" { - pub fn cudnnGetVersion() -> usize; + pub fn cudaMemPrefetchAsync_v2( + devPtr: *const ::libc::c_void, + count: usize, + location: cudaMemLocation, + flags: ::libc::c_uint, + stream: cudaStream_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetCudartVersion() -> usize; -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnStatus_t { - CUDNN_STATUS_SUCCESS = 0, - CUDNN_STATUS_NOT_INITIALIZED = 1, - CUDNN_STATUS_ALLOC_FAILED = 2, - CUDNN_STATUS_BAD_PARAM = 3, - CUDNN_STATUS_INTERNAL_ERROR = 4, - CUDNN_STATUS_INVALID_VALUE = 5, - CUDNN_STATUS_ARCH_MISMATCH = 6, - CUDNN_STATUS_MAPPING_ERROR = 7, - CUDNN_STATUS_EXECUTION_FAILED = 8, - CUDNN_STATUS_NOT_SUPPORTED = 9, - CUDNN_STATUS_LICENSE_ERROR = 10, - CUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING = 11, - CUDNN_STATUS_RUNTIME_IN_PROGRESS = 12, - CUDNN_STATUS_RUNTIME_FP_OVERFLOW = 13, - CUDNN_STATUS_VERSION_MISMATCH = 14, + pub fn cudaMemAdvise( + devPtr: *const ::libc::c_void, + count: usize, + advice: cudaMemoryAdvise, + device: ::libc::c_int, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetErrorString(status: cudnnStatus_t) -> *const ::libc::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnRuntimeTag_t { - _unused: [u8; 0], + pub fn cudaMemAdvise_v2( + devPtr: *const ::libc::c_void, + count: usize, + advice: cudaMemoryAdvise, + location: cudaMemLocation, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnErrQueryMode_t { - CUDNN_ERRQUERY_RAWCODE = 0, - CUDNN_ERRQUERY_NONBLOCKING = 1, - CUDNN_ERRQUERY_BLOCKING = 2, +extern "C" { + pub fn cudaMemRangeGetAttribute( + data: *mut ::libc::c_void, + dataSize: usize, + attribute: cudaMemRangeAttribute, + devPtr: *const ::libc::c_void, + count: usize, + ) -> cudaError_t; } extern "C" { - pub fn cudnnQueryRuntimeError( - handle: cudnnHandle_t, - rstatus: *mut cudnnStatus_t, - mode: cudnnErrQueryMode_t, - tag: *mut cudnnRuntimeTag_t, - ) -> cudnnStatus_t; + pub fn cudaMemRangeGetAttributes( + data: *mut *mut ::libc::c_void, + dataSizes: *mut usize, + attributes: *mut cudaMemRangeAttribute, + numAttributes: usize, + devPtr: *const ::libc::c_void, + count: usize, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetProperty(type_: libraryPropertyType, value: *mut ::libc::c_int) - -> cudnnStatus_t; + pub fn cudaMemcpyToArray( + dst: cudaArray_t, + wOffset: usize, + hOffset: usize, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } extern "C" { - pub fn cudnnCreate(handle: *mut cudnnHandle_t) -> cudnnStatus_t; + pub fn cudaMemcpyFromArray( + dst: *mut ::libc::c_void, + src: cudaArray_const_t, + wOffset: usize, + hOffset: usize, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroy(handle: cudnnHandle_t) -> cudnnStatus_t; + pub fn cudaMemcpyArrayToArray( + dst: cudaArray_t, + wOffsetDst: usize, + hOffsetDst: usize, + src: cudaArray_const_t, + wOffsetSrc: usize, + hOffsetSrc: usize, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetStream(handle: cudnnHandle_t, streamId: cudaStream_t) -> cudnnStatus_t; + pub fn cudaMemcpyToArrayAsync( + dst: cudaArray_t, + wOffset: usize, + hOffset: usize, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetStream(handle: cudnnHandle_t, streamId: *mut cudaStream_t) -> cudnnStatus_t; + pub fn cudaMemcpyFromArrayAsync( + dst: *mut ::libc::c_void, + src: cudaArray_const_t, + wOffset: usize, + hOffset: usize, + count: usize, + kind: cudaMemcpyKind, + stream: cudaStream_t, + ) -> cudaError_t; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnTensorStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaMallocAsync( + devPtr: *mut *mut ::libc::c_void, + size: usize, + hStream: cudaStream_t, + ) -> cudaError_t; } -pub type cudnnTensorDescriptor_t = *mut cudnnTensorStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnPoolingStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaFreeAsync( + devPtr: *mut ::libc::c_void, + hStream: cudaStream_t, + ) -> cudaError_t; } -pub type cudnnPoolingDescriptor_t = *mut cudnnPoolingStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnFilterStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaMemPoolTrimTo( + memPool: cudaMemPool_t, + minBytesToKeep: usize, + ) -> cudaError_t; } -pub type cudnnFilterDescriptor_t = *mut cudnnFilterStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnLRNStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaMemPoolSetAttribute( + memPool: cudaMemPool_t, + attr: cudaMemPoolAttr, + value: *mut ::libc::c_void, + ) -> cudaError_t; } -pub type cudnnLRNDescriptor_t = *mut cudnnLRNStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnActivationStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaMemPoolGetAttribute( + memPool: cudaMemPool_t, + attr: cudaMemPoolAttr, + value: *mut ::libc::c_void, + ) -> cudaError_t; } -pub type cudnnActivationDescriptor_t = *mut cudnnActivationStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnSpatialTransformerStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaMemPoolSetAccess( + memPool: cudaMemPool_t, + descList: *const cudaMemAccessDesc, + count: usize, + ) -> cudaError_t; } -pub type cudnnSpatialTransformerDescriptor_t = *mut cudnnSpatialTransformerStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnOpTensorStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaMemPoolGetAccess( + flags: *mut cudaMemAccessFlags, + memPool: cudaMemPool_t, + location: *mut cudaMemLocation, + ) -> cudaError_t; } -pub type cudnnOpTensorDescriptor_t = *mut cudnnOpTensorStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnReduceTensorStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaMemPoolCreate( + memPool: *mut cudaMemPool_t, + poolProps: *const cudaMemPoolProps, + ) -> cudaError_t; } -pub type cudnnReduceTensorDescriptor_t = *mut cudnnReduceTensorStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnCTCLossStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaMemPoolDestroy(memPool: cudaMemPool_t) -> cudaError_t; } -pub type cudnnCTCLossDescriptor_t = *mut cudnnCTCLossStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnTensorTransformStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaMallocFromPoolAsync( + ptr: *mut *mut ::libc::c_void, + size: usize, + memPool: cudaMemPool_t, + stream: cudaStream_t, + ) -> cudaError_t; } -pub type cudnnTensorTransformDescriptor_t = *mut cudnnTensorTransformStruct; -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnDataType_t { - CUDNN_DATA_FLOAT = 0, - CUDNN_DATA_DOUBLE = 1, - CUDNN_DATA_HALF = 2, - CUDNN_DATA_INT8 = 3, - CUDNN_DATA_INT32 = 4, - CUDNN_DATA_INT8x4 = 5, - CUDNN_DATA_UINT8 = 6, - CUDNN_DATA_UINT8x4 = 7, - CUDNN_DATA_INT8x32 = 8, - CUDNN_DATA_BFLOAT16 = 9, - CUDNN_DATA_INT64 = 10, - CUDNN_DATA_BOOLEAN = 11, +extern "C" { + pub fn cudaMemPoolExportToShareableHandle( + shareableHandle: *mut ::libc::c_void, + memPool: cudaMemPool_t, + handleType: cudaMemAllocationHandleType, + flags: ::libc::c_uint, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnMathType_t { - CUDNN_DEFAULT_MATH = 0, - CUDNN_TENSOR_OP_MATH = 1, - CUDNN_TENSOR_OP_MATH_ALLOW_CONVERSION = 2, - CUDNN_FMA_MATH = 3, +extern "C" { + pub fn cudaMemPoolImportFromShareableHandle( + memPool: *mut cudaMemPool_t, + shareableHandle: *mut ::libc::c_void, + handleType: cudaMemAllocationHandleType, + flags: ::libc::c_uint, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnNanPropagation_t { - CUDNN_NOT_PROPAGATE_NAN = 0, - CUDNN_PROPAGATE_NAN = 1, +extern "C" { + pub fn cudaMemPoolExportPointer( + exportData: *mut cudaMemPoolPtrExportData, + ptr: *mut ::libc::c_void, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnDeterminism_t { - CUDNN_NON_DETERMINISTIC = 0, - CUDNN_DETERMINISTIC = 1, +extern "C" { + pub fn cudaMemPoolImportPointer( + ptr: *mut *mut ::libc::c_void, + memPool: cudaMemPool_t, + exportData: *mut cudaMemPoolPtrExportData, + ) -> cudaError_t; } extern "C" { - pub fn cudnnCreateTensorDescriptor(tensorDesc: *mut cudnnTensorDescriptor_t) -> cudnnStatus_t; + pub fn cudaPointerGetAttributes( + attributes: *mut cudaPointerAttributes, + ptr: *const ::libc::c_void, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnTensorFormat_t { - CUDNN_TENSOR_NCHW = 0, - CUDNN_TENSOR_NHWC = 1, - CUDNN_TENSOR_NCHW_VECT_C = 2, +extern "C" { + pub fn cudaDeviceCanAccessPeer( + canAccessPeer: *mut ::libc::c_int, + device: ::libc::c_int, + peerDevice: ::libc::c_int, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetTensor4dDescriptor( - tensorDesc: cudnnTensorDescriptor_t, - format: cudnnTensorFormat_t, - dataType: cudnnDataType_t, - n: ::libc::c_int, - c: ::libc::c_int, - h: ::libc::c_int, - w: ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaDeviceEnablePeerAccess( + peerDevice: ::libc::c_int, + flags: ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetTensor4dDescriptorEx( - tensorDesc: cudnnTensorDescriptor_t, - dataType: cudnnDataType_t, - n: ::libc::c_int, - c: ::libc::c_int, - h: ::libc::c_int, - w: ::libc::c_int, - nStride: ::libc::c_int, - cStride: ::libc::c_int, - hStride: ::libc::c_int, - wStride: ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaDeviceDisablePeerAccess(peerDevice: ::libc::c_int) -> cudaError_t; } extern "C" { - pub fn cudnnGetTensor4dDescriptor( - tensorDesc: cudnnTensorDescriptor_t, - dataType: *mut cudnnDataType_t, - n: *mut ::libc::c_int, - c: *mut ::libc::c_int, - h: *mut ::libc::c_int, - w: *mut ::libc::c_int, - nStride: *mut ::libc::c_int, - cStride: *mut ::libc::c_int, - hStride: *mut ::libc::c_int, - wStride: *mut ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphicsUnregisterResource( + resource: cudaGraphicsResource_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetTensorNdDescriptor( - tensorDesc: cudnnTensorDescriptor_t, - dataType: cudnnDataType_t, - nbDims: ::libc::c_int, - dimA: *const ::libc::c_int, - strideA: *const ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphicsResourceSetMapFlags( + resource: cudaGraphicsResource_t, + flags: ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetTensorNdDescriptorEx( - tensorDesc: cudnnTensorDescriptor_t, - format: cudnnTensorFormat_t, - dataType: cudnnDataType_t, - nbDims: ::libc::c_int, - dimA: *const ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphicsMapResources( + count: ::libc::c_int, + resources: *mut cudaGraphicsResource_t, + stream: cudaStream_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetTensorNdDescriptor( - tensorDesc: cudnnTensorDescriptor_t, - nbDimsRequested: ::libc::c_int, - dataType: *mut cudnnDataType_t, - nbDims: *mut ::libc::c_int, - dimA: *mut ::libc::c_int, - strideA: *mut ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphicsUnmapResources( + count: ::libc::c_int, + resources: *mut cudaGraphicsResource_t, + stream: cudaStream_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetTensorSizeInBytes( - tensorDesc: cudnnTensorDescriptor_t, + pub fn cudaGraphicsResourceGetMappedPointer( + devPtr: *mut *mut ::libc::c_void, size: *mut usize, - ) -> cudnnStatus_t; + resource: cudaGraphicsResource_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroyTensorDescriptor(tensorDesc: cudnnTensorDescriptor_t) -> cudnnStatus_t; -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnFoldingDirection_t { - CUDNN_TRANSFORM_FOLD = 0, - CUDNN_TRANSFORM_UNFOLD = 1, + pub fn cudaGraphicsSubResourceGetMappedArray( + array: *mut cudaArray_t, + resource: cudaGraphicsResource_t, + arrayIndex: ::libc::c_uint, + mipLevel: ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudnnInitTransformDest( - transformDesc: cudnnTensorTransformDescriptor_t, - srcDesc: cudnnTensorDescriptor_t, - destDesc: cudnnTensorDescriptor_t, - destSizeInBytes: *mut usize, - ) -> cudnnStatus_t; + pub fn cudaGraphicsResourceGetMappedMipmappedArray( + mipmappedArray: *mut cudaMipmappedArray_t, + resource: cudaGraphicsResource_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnCreateTensorTransformDescriptor( - transformDesc: *mut cudnnTensorTransformDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGetChannelDesc( + desc: *mut cudaChannelFormatDesc, + array: cudaArray_const_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetTensorTransformDescriptor( - transformDesc: cudnnTensorTransformDescriptor_t, - nbDims: u32, - destFormat: cudnnTensorFormat_t, - padBeforeA: *const i32, - padAfterA: *const i32, - foldA: *const u32, - direction: cudnnFoldingDirection_t, - ) -> cudnnStatus_t; + pub fn cudaCreateChannelDesc( + x: ::libc::c_int, + y: ::libc::c_int, + z: ::libc::c_int, + w: ::libc::c_int, + f: cudaChannelFormatKind, + ) -> cudaChannelFormatDesc; } extern "C" { - pub fn cudnnGetTensorTransformDescriptor( - transformDesc: cudnnTensorTransformDescriptor_t, - nbDimsRequested: u32, - destFormat: *mut cudnnTensorFormat_t, - padBeforeA: *mut i32, - padAfterA: *mut i32, - foldA: *mut u32, - direction: *mut cudnnFoldingDirection_t, - ) -> cudnnStatus_t; + pub fn cudaCreateTextureObject( + pTexObject: *mut cudaTextureObject_t, + pResDesc: *const cudaResourceDesc, + pTexDesc: *const cudaTextureDesc, + pResViewDesc: *const cudaResourceViewDesc, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroyTensorTransformDescriptor( - transformDesc: cudnnTensorTransformDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaDestroyTextureObject(texObject: cudaTextureObject_t) -> cudaError_t; } extern "C" { - pub fn cudnnTransformTensor( - handle: cudnnHandle_t, - alpha: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - beta: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudaGetTextureObjectResourceDesc( + pResDesc: *mut cudaResourceDesc, + texObject: cudaTextureObject_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnTransformTensorEx( - handle: cudnnHandle_t, - transDesc: cudnnTensorTransformDescriptor_t, - alpha: *const ::libc::c_void, - srcDesc: cudnnTensorDescriptor_t, - srcData: *const ::libc::c_void, - beta: *const ::libc::c_void, - destDesc: cudnnTensorDescriptor_t, - destData: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudaGetTextureObjectTextureDesc( + pTexDesc: *mut cudaTextureDesc, + texObject: cudaTextureObject_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnAddTensor( - handle: cudnnHandle_t, - alpha: *const ::libc::c_void, - aDesc: cudnnTensorDescriptor_t, - A: *const ::libc::c_void, - beta: *const ::libc::c_void, - cDesc: cudnnTensorDescriptor_t, - C: *mut ::libc::c_void, - ) -> cudnnStatus_t; -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnOpTensorOp_t { - CUDNN_OP_TENSOR_ADD = 0, - CUDNN_OP_TENSOR_MUL = 1, - CUDNN_OP_TENSOR_MIN = 2, - CUDNN_OP_TENSOR_MAX = 3, - CUDNN_OP_TENSOR_SQRT = 4, - CUDNN_OP_TENSOR_NOT = 5, + pub fn cudaGetTextureObjectResourceViewDesc( + pResViewDesc: *mut cudaResourceViewDesc, + texObject: cudaTextureObject_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnCreateOpTensorDescriptor( - opTensorDesc: *mut cudnnOpTensorDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaCreateSurfaceObject( + pSurfObject: *mut cudaSurfaceObject_t, + pResDesc: *const cudaResourceDesc, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetOpTensorDescriptor( - opTensorDesc: cudnnOpTensorDescriptor_t, - opTensorOp: cudnnOpTensorOp_t, - opTensorCompType: cudnnDataType_t, - opTensorNanOpt: cudnnNanPropagation_t, - ) -> cudnnStatus_t; + pub fn cudaDestroySurfaceObject(surfObject: cudaSurfaceObject_t) -> cudaError_t; } extern "C" { - pub fn cudnnGetOpTensorDescriptor( - opTensorDesc: cudnnOpTensorDescriptor_t, - opTensorOp: *mut cudnnOpTensorOp_t, - opTensorCompType: *mut cudnnDataType_t, - opTensorNanOpt: *mut cudnnNanPropagation_t, - ) -> cudnnStatus_t; + pub fn cudaGetSurfaceObjectResourceDesc( + pResDesc: *mut cudaResourceDesc, + surfObject: cudaSurfaceObject_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroyOpTensorDescriptor(opTensorDesc: cudnnOpTensorDescriptor_t) - -> cudnnStatus_t; + pub fn cudaDriverGetVersion(driverVersion: *mut ::libc::c_int) -> cudaError_t; } extern "C" { - pub fn cudnnOpTensor( - handle: cudnnHandle_t, - opTensorDesc: cudnnOpTensorDescriptor_t, - alpha1: *const ::libc::c_void, - aDesc: cudnnTensorDescriptor_t, - A: *const ::libc::c_void, - alpha2: *const ::libc::c_void, - bDesc: cudnnTensorDescriptor_t, - B: *const ::libc::c_void, - beta: *const ::libc::c_void, - cDesc: cudnnTensorDescriptor_t, - C: *mut ::libc::c_void, - ) -> cudnnStatus_t; -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnReduceTensorOp_t { - CUDNN_REDUCE_TENSOR_ADD = 0, - CUDNN_REDUCE_TENSOR_MUL = 1, - CUDNN_REDUCE_TENSOR_MIN = 2, - CUDNN_REDUCE_TENSOR_MAX = 3, - CUDNN_REDUCE_TENSOR_AMAX = 4, - CUDNN_REDUCE_TENSOR_AVG = 5, - CUDNN_REDUCE_TENSOR_NORM1 = 6, - CUDNN_REDUCE_TENSOR_NORM2 = 7, - CUDNN_REDUCE_TENSOR_MUL_NO_ZEROS = 8, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnReduceTensorIndices_t { - CUDNN_REDUCE_TENSOR_NO_INDICES = 0, - CUDNN_REDUCE_TENSOR_FLATTENED_INDICES = 1, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnIndicesType_t { - CUDNN_32BIT_INDICES = 0, - CUDNN_64BIT_INDICES = 1, - CUDNN_16BIT_INDICES = 2, - CUDNN_8BIT_INDICES = 3, + pub fn cudaRuntimeGetVersion(runtimeVersion: *mut ::libc::c_int) -> cudaError_t; } extern "C" { - pub fn cudnnCreateReduceTensorDescriptor( - reduceTensorDesc: *mut cudnnReduceTensorDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGraphCreate( + pGraph: *mut cudaGraph_t, + flags: ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetReduceTensorDescriptor( - reduceTensorDesc: cudnnReduceTensorDescriptor_t, - reduceTensorOp: cudnnReduceTensorOp_t, - reduceTensorCompType: cudnnDataType_t, - reduceTensorNanOpt: cudnnNanPropagation_t, - reduceTensorIndices: cudnnReduceTensorIndices_t, - reduceTensorIndicesType: cudnnIndicesType_t, - ) -> cudnnStatus_t; + pub fn cudaGraphAddKernelNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + pNodeParams: *const cudaKernelNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetReduceTensorDescriptor( - reduceTensorDesc: cudnnReduceTensorDescriptor_t, - reduceTensorOp: *mut cudnnReduceTensorOp_t, - reduceTensorCompType: *mut cudnnDataType_t, - reduceTensorNanOpt: *mut cudnnNanPropagation_t, - reduceTensorIndices: *mut cudnnReduceTensorIndices_t, - reduceTensorIndicesType: *mut cudnnIndicesType_t, - ) -> cudnnStatus_t; + pub fn cudaGraphKernelNodeGetParams( + node: cudaGraphNode_t, + pNodeParams: *mut cudaKernelNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroyReduceTensorDescriptor( - reduceTensorDesc: cudnnReduceTensorDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGraphKernelNodeSetParams( + node: cudaGraphNode_t, + pNodeParams: *const cudaKernelNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetReductionIndicesSize( - handle: cudnnHandle_t, - reduceTensorDesc: cudnnReduceTensorDescriptor_t, - aDesc: cudnnTensorDescriptor_t, - cDesc: cudnnTensorDescriptor_t, - sizeInBytes: *mut usize, - ) -> cudnnStatus_t; + pub fn cudaGraphKernelNodeCopyAttributes( + hSrc: cudaGraphNode_t, + hDst: cudaGraphNode_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetReductionWorkspaceSize( - handle: cudnnHandle_t, - reduceTensorDesc: cudnnReduceTensorDescriptor_t, - aDesc: cudnnTensorDescriptor_t, - cDesc: cudnnTensorDescriptor_t, - sizeInBytes: *mut usize, - ) -> cudnnStatus_t; + pub fn cudaGraphKernelNodeGetAttribute( + hNode: cudaGraphNode_t, + attr: cudaLaunchAttributeID, + value_out: *mut cudaLaunchAttributeValue, + ) -> cudaError_t; } extern "C" { - pub fn cudnnReduceTensor( - handle: cudnnHandle_t, - reduceTensorDesc: cudnnReduceTensorDescriptor_t, - indices: *mut ::libc::c_void, - indicesSizeInBytes: usize, - workspace: *mut ::libc::c_void, - workspaceSizeInBytes: usize, - alpha: *const ::libc::c_void, - aDesc: cudnnTensorDescriptor_t, - A: *const ::libc::c_void, - beta: *const ::libc::c_void, - cDesc: cudnnTensorDescriptor_t, - C: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudaGraphKernelNodeSetAttribute( + hNode: cudaGraphNode_t, + attr: cudaLaunchAttributeID, + value: *const cudaLaunchAttributeValue, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetTensor( - handle: cudnnHandle_t, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - valuePtr: *const ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudaGraphAddMemcpyNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + pCopyParams: *const cudaMemcpy3DParms, + ) -> cudaError_t; } extern "C" { - pub fn cudnnScaleTensor( - handle: cudnnHandle_t, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - alpha: *const ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudaGraphAddMemcpyNodeToSymbol( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + symbol: *const ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } extern "C" { - pub fn cudnnCreateFilterDescriptor(filterDesc: *mut cudnnFilterDescriptor_t) -> cudnnStatus_t; + pub fn cudaGraphAddMemcpyNodeFromSymbol( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + dst: *mut ::libc::c_void, + symbol: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetFilter4dDescriptor( - filterDesc: cudnnFilterDescriptor_t, - dataType: cudnnDataType_t, - format: cudnnTensorFormat_t, - k: ::libc::c_int, - c: ::libc::c_int, - h: ::libc::c_int, - w: ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphAddMemcpyNode1D( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + dst: *mut ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetFilter4dDescriptor( - filterDesc: cudnnFilterDescriptor_t, - dataType: *mut cudnnDataType_t, - format: *mut cudnnTensorFormat_t, - k: *mut ::libc::c_int, - c: *mut ::libc::c_int, - h: *mut ::libc::c_int, - w: *mut ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphMemcpyNodeGetParams( + node: cudaGraphNode_t, + pNodeParams: *mut cudaMemcpy3DParms, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetFilterNdDescriptor( - filterDesc: cudnnFilterDescriptor_t, - dataType: cudnnDataType_t, - format: cudnnTensorFormat_t, - nbDims: ::libc::c_int, - filterDimA: *const ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphMemcpyNodeSetParams( + node: cudaGraphNode_t, + pNodeParams: *const cudaMemcpy3DParms, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetFilterNdDescriptor( - filterDesc: cudnnFilterDescriptor_t, - nbDimsRequested: ::libc::c_int, - dataType: *mut cudnnDataType_t, - format: *mut cudnnTensorFormat_t, - nbDims: *mut ::libc::c_int, - filterDimA: *mut ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphMemcpyNodeSetParamsToSymbol( + node: cudaGraphNode_t, + symbol: *const ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetFilterSizeInBytes( - filterDesc: cudnnFilterDescriptor_t, - size: *mut usize, - ) -> cudnnStatus_t; + pub fn cudaGraphMemcpyNodeSetParamsFromSymbol( + node: cudaGraphNode_t, + dst: *mut ::libc::c_void, + symbol: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } extern "C" { - pub fn cudnnTransformFilter( - handle: cudnnHandle_t, - transDesc: cudnnTensorTransformDescriptor_t, - alpha: *const ::libc::c_void, - srcDesc: cudnnFilterDescriptor_t, - srcData: *const ::libc::c_void, - beta: *const ::libc::c_void, - destDesc: cudnnFilterDescriptor_t, - destData: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudaGraphMemcpyNodeSetParams1D( + node: cudaGraphNode_t, + dst: *mut ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroyFilterDescriptor(filterDesc: cudnnFilterDescriptor_t) -> cudnnStatus_t; -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnSoftmaxAlgorithm_t { - CUDNN_SOFTMAX_FAST = 0, - CUDNN_SOFTMAX_ACCURATE = 1, - CUDNN_SOFTMAX_LOG = 2, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnSoftmaxMode_t { - CUDNN_SOFTMAX_MODE_INSTANCE = 0, - CUDNN_SOFTMAX_MODE_CHANNEL = 1, + pub fn cudaGraphAddMemsetNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + pMemsetParams: *const cudaMemsetParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSoftmaxForward( - handle: cudnnHandle_t, - algo: cudnnSoftmaxAlgorithm_t, - mode: cudnnSoftmaxMode_t, - alpha: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - beta: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - ) -> cudnnStatus_t; -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnPoolingMode_t { - CUDNN_POOLING_MAX = 0, - CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING = 1, - CUDNN_POOLING_AVERAGE_COUNT_EXCLUDE_PADDING = 2, - CUDNN_POOLING_MAX_DETERMINISTIC = 3, + pub fn cudaGraphMemsetNodeGetParams( + node: cudaGraphNode_t, + pNodeParams: *mut cudaMemsetParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnCreatePoolingDescriptor( - poolingDesc: *mut cudnnPoolingDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGraphMemsetNodeSetParams( + node: cudaGraphNode_t, + pNodeParams: *const cudaMemsetParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetPooling2dDescriptor( - poolingDesc: cudnnPoolingDescriptor_t, - mode: cudnnPoolingMode_t, - maxpoolingNanOpt: cudnnNanPropagation_t, - windowHeight: ::libc::c_int, - windowWidth: ::libc::c_int, - verticalPadding: ::libc::c_int, - horizontalPadding: ::libc::c_int, - verticalStride: ::libc::c_int, - horizontalStride: ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphAddHostNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + pNodeParams: *const cudaHostNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetPooling2dDescriptor( - poolingDesc: cudnnPoolingDescriptor_t, - mode: *mut cudnnPoolingMode_t, - maxpoolingNanOpt: *mut cudnnNanPropagation_t, - windowHeight: *mut ::libc::c_int, - windowWidth: *mut ::libc::c_int, - verticalPadding: *mut ::libc::c_int, - horizontalPadding: *mut ::libc::c_int, - verticalStride: *mut ::libc::c_int, - horizontalStride: *mut ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphHostNodeGetParams( + node: cudaGraphNode_t, + pNodeParams: *mut cudaHostNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetPoolingNdDescriptor( - poolingDesc: cudnnPoolingDescriptor_t, - mode: cudnnPoolingMode_t, - maxpoolingNanOpt: cudnnNanPropagation_t, - nbDims: ::libc::c_int, - windowDimA: *const ::libc::c_int, - paddingA: *const ::libc::c_int, - strideA: *const ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphHostNodeSetParams( + node: cudaGraphNode_t, + pNodeParams: *const cudaHostNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetPoolingNdDescriptor( - poolingDesc: cudnnPoolingDescriptor_t, - nbDimsRequested: ::libc::c_int, - mode: *mut cudnnPoolingMode_t, - maxpoolingNanOpt: *mut cudnnNanPropagation_t, - nbDims: *mut ::libc::c_int, - windowDimA: *mut ::libc::c_int, - paddingA: *mut ::libc::c_int, - strideA: *mut ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphAddChildGraphNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + childGraph: cudaGraph_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetPoolingNdForwardOutputDim( - poolingDesc: cudnnPoolingDescriptor_t, - inputTensorDesc: cudnnTensorDescriptor_t, - nbDims: ::libc::c_int, - outputTensorDimA: *mut ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphChildGraphNodeGetGraph( + node: cudaGraphNode_t, + pGraph: *mut cudaGraph_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetPooling2dForwardOutputDim( - poolingDesc: cudnnPoolingDescriptor_t, - inputTensorDesc: cudnnTensorDescriptor_t, - n: *mut ::libc::c_int, - c: *mut ::libc::c_int, - h: *mut ::libc::c_int, - w: *mut ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphAddEmptyNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroyPoolingDescriptor(poolingDesc: cudnnPoolingDescriptor_t) -> cudnnStatus_t; + pub fn cudaGraphAddEventRecordNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + event: cudaEvent_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnPoolingForward( - handle: cudnnHandle_t, - poolingDesc: cudnnPoolingDescriptor_t, - alpha: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - beta: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudaGraphEventRecordNodeGetEvent( + node: cudaGraphNode_t, + event_out: *mut cudaEvent_t, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnActivationMode_t { - CUDNN_ACTIVATION_SIGMOID = 0, - CUDNN_ACTIVATION_RELU = 1, - CUDNN_ACTIVATION_TANH = 2, - CUDNN_ACTIVATION_CLIPPED_RELU = 3, - CUDNN_ACTIVATION_ELU = 4, - CUDNN_ACTIVATION_IDENTITY = 5, - CUDNN_ACTIVATION_SWISH = 6, +extern "C" { + pub fn cudaGraphEventRecordNodeSetEvent( + node: cudaGraphNode_t, + event: cudaEvent_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnCreateActivationDescriptor( - activationDesc: *mut cudnnActivationDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGraphAddEventWaitNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + event: cudaEvent_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetActivationDescriptor( - activationDesc: cudnnActivationDescriptor_t, - mode: cudnnActivationMode_t, - reluNanOpt: cudnnNanPropagation_t, - coef: f64, - ) -> cudnnStatus_t; + pub fn cudaGraphEventWaitNodeGetEvent( + node: cudaGraphNode_t, + event_out: *mut cudaEvent_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetActivationDescriptor( - activationDesc: cudnnActivationDescriptor_t, - mode: *mut cudnnActivationMode_t, - reluNanOpt: *mut cudnnNanPropagation_t, - coef: *mut f64, - ) -> cudnnStatus_t; + pub fn cudaGraphEventWaitNodeSetEvent( + node: cudaGraphNode_t, + event: cudaEvent_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetActivationDescriptorSwishBeta( - activationDesc: cudnnActivationDescriptor_t, - swish_beta: f64, - ) -> cudnnStatus_t; + pub fn cudaGraphAddExternalSemaphoresSignalNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + nodeParams: *const cudaExternalSemaphoreSignalNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetActivationDescriptorSwishBeta( - activationDesc: cudnnActivationDescriptor_t, - swish_beta: *mut f64, - ) -> cudnnStatus_t; + pub fn cudaGraphExternalSemaphoresSignalNodeGetParams( + hNode: cudaGraphNode_t, + params_out: *mut cudaExternalSemaphoreSignalNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroyActivationDescriptor( - activationDesc: cudnnActivationDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGraphExternalSemaphoresSignalNodeSetParams( + hNode: cudaGraphNode_t, + nodeParams: *const cudaExternalSemaphoreSignalNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnActivationForward( - handle: cudnnHandle_t, - activationDesc: cudnnActivationDescriptor_t, - alpha: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - beta: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudaGraphAddExternalSemaphoresWaitNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + nodeParams: *const cudaExternalSemaphoreWaitNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnCreateLRNDescriptor(normDesc: *mut cudnnLRNDescriptor_t) -> cudnnStatus_t; + pub fn cudaGraphExternalSemaphoresWaitNodeGetParams( + hNode: cudaGraphNode_t, + params_out: *mut cudaExternalSemaphoreWaitNodeParams, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnLRNMode_t { - CUDNN_LRN_CROSS_CHANNEL_DIM1 = 0, +extern "C" { + pub fn cudaGraphExternalSemaphoresWaitNodeSetParams( + hNode: cudaGraphNode_t, + nodeParams: *const cudaExternalSemaphoreWaitNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetLRNDescriptor( - normDesc: cudnnLRNDescriptor_t, - lrnN: ::libc::c_uint, - lrnAlpha: f64, - lrnBeta: f64, - lrnK: f64, - ) -> cudnnStatus_t; + pub fn cudaGraphAddMemAllocNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + nodeParams: *mut cudaMemAllocNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetLRNDescriptor( - normDesc: cudnnLRNDescriptor_t, - lrnN: *mut ::libc::c_uint, - lrnAlpha: *mut f64, - lrnBeta: *mut f64, - lrnK: *mut f64, - ) -> cudnnStatus_t; + pub fn cudaGraphMemAllocNodeGetParams( + node: cudaGraphNode_t, + params_out: *mut cudaMemAllocNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroyLRNDescriptor(lrnDesc: cudnnLRNDescriptor_t) -> cudnnStatus_t; + pub fn cudaGraphAddMemFreeNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + dptr: *mut ::libc::c_void, + ) -> cudaError_t; } extern "C" { - pub fn cudnnLRNCrossChannelForward( - handle: cudnnHandle_t, - normDesc: cudnnLRNDescriptor_t, - lrnMode: cudnnLRNMode_t, - alpha: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - beta: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - ) -> cudnnStatus_t; -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnDivNormMode_t { - CUDNN_DIVNORM_PRECOMPUTED_MEANS = 0, + pub fn cudaGraphMemFreeNodeGetParams( + node: cudaGraphNode_t, + dptr_out: *mut ::libc::c_void, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDivisiveNormalizationForward( - handle: cudnnHandle_t, - normDesc: cudnnLRNDescriptor_t, - mode: cudnnDivNormMode_t, - alpha: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - means: *const ::libc::c_void, - temp: *mut ::libc::c_void, - temp2: *mut ::libc::c_void, - beta: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudaDeviceGraphMemTrim(device: ::libc::c_int) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBatchNormMode_t { - CUDNN_BATCHNORM_PER_ACTIVATION = 0, - CUDNN_BATCHNORM_SPATIAL = 1, - CUDNN_BATCHNORM_SPATIAL_PERSISTENT = 2, +extern "C" { + pub fn cudaDeviceGetGraphMemAttribute( + device: ::libc::c_int, + attr: cudaGraphMemAttributeType, + value: *mut ::libc::c_void, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDeriveBNTensorDescriptor( - derivedBnDesc: cudnnTensorDescriptor_t, - xDesc: cudnnTensorDescriptor_t, - mode: cudnnBatchNormMode_t, - ) -> cudnnStatus_t; + pub fn cudaDeviceSetGraphMemAttribute( + device: ::libc::c_int, + attr: cudaGraphMemAttributeType, + value: *mut ::libc::c_void, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBatchNormOps_t { - CUDNN_BATCHNORM_OPS_BN = 0, - CUDNN_BATCHNORM_OPS_BN_ACTIVATION = 1, - CUDNN_BATCHNORM_OPS_BN_ADD_ACTIVATION = 2, +extern "C" { + pub fn cudaGraphClone( + pGraphClone: *mut cudaGraph_t, + originalGraph: cudaGraph_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnBatchNormalizationForwardInference( - handle: cudnnHandle_t, - mode: cudnnBatchNormMode_t, - alpha: *const ::libc::c_void, - beta: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - bnScaleBiasMeanVarDesc: cudnnTensorDescriptor_t, - bnScale: *const ::libc::c_void, - bnBias: *const ::libc::c_void, - estimatedMean: *const ::libc::c_void, - estimatedVariance: *const ::libc::c_void, - epsilon: f64, - ) -> cudnnStatus_t; + pub fn cudaGraphNodeFindInClone( + pNode: *mut cudaGraphNode_t, + originalNode: cudaGraphNode_t, + clonedGraph: cudaGraph_t, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnNormMode_t { - CUDNN_NORM_PER_ACTIVATION = 0, - CUDNN_NORM_PER_CHANNEL = 1, +extern "C" { + pub fn cudaGraphNodeGetType( + node: cudaGraphNode_t, + pType: *mut cudaGraphNodeType, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnNormAlgo_t { - CUDNN_NORM_ALGO_STANDARD = 0, - CUDNN_NORM_ALGO_PERSIST = 1, +extern "C" { + pub fn cudaGraphGetNodes( + graph: cudaGraph_t, + nodes: *mut cudaGraphNode_t, + numNodes: *mut usize, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDeriveNormTensorDescriptor( - derivedNormScaleBiasDesc: cudnnTensorDescriptor_t, - derivedNormMeanVarDesc: cudnnTensorDescriptor_t, - xDesc: cudnnTensorDescriptor_t, - mode: cudnnNormMode_t, - groupCnt: ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphGetRootNodes( + graph: cudaGraph_t, + pRootNodes: *mut cudaGraphNode_t, + pNumRootNodes: *mut usize, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnNormOps_t { - CUDNN_NORM_OPS_NORM = 0, - CUDNN_NORM_OPS_NORM_ACTIVATION = 1, - CUDNN_NORM_OPS_NORM_ADD_ACTIVATION = 2, +extern "C" { + pub fn cudaGraphGetEdges( + graph: cudaGraph_t, + from: *mut cudaGraphNode_t, + to: *mut cudaGraphNode_t, + numEdges: *mut usize, + ) -> cudaError_t; } extern "C" { - pub fn cudnnNormalizationForwardInference( - handle: cudnnHandle_t, - mode: cudnnNormMode_t, - normOps: cudnnNormOps_t, - algo: cudnnNormAlgo_t, - alpha: *const ::libc::c_void, - beta: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - normScaleBiasDesc: cudnnTensorDescriptor_t, - normScale: *const ::libc::c_void, - normBias: *const ::libc::c_void, - normMeanVarDesc: cudnnTensorDescriptor_t, - estimatedMean: *const ::libc::c_void, - estimatedVariance: *const ::libc::c_void, - zDesc: cudnnTensorDescriptor_t, - z: *const ::libc::c_void, - activationDesc: cudnnActivationDescriptor_t, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - epsilon: f64, - groupCnt: ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphGetEdges_v2( + graph: cudaGraph_t, + from: *mut cudaGraphNode_t, + to: *mut cudaGraphNode_t, + edgeData: *mut cudaGraphEdgeData, + numEdges: *mut usize, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnSamplerType_t { - CUDNN_SAMPLER_BILINEAR = 0, +extern "C" { + pub fn cudaGraphNodeGetDependencies( + node: cudaGraphNode_t, + pDependencies: *mut cudaGraphNode_t, + pNumDependencies: *mut usize, + ) -> cudaError_t; } extern "C" { - pub fn cudnnCreateSpatialTransformerDescriptor( - stDesc: *mut cudnnSpatialTransformerDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGraphNodeGetDependencies_v2( + node: cudaGraphNode_t, + pDependencies: *mut cudaGraphNode_t, + edgeData: *mut cudaGraphEdgeData, + pNumDependencies: *mut usize, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetSpatialTransformerNdDescriptor( - stDesc: cudnnSpatialTransformerDescriptor_t, - samplerType: cudnnSamplerType_t, - dataType: cudnnDataType_t, - nbDims: ::libc::c_int, - dimA: *const ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphNodeGetDependentNodes( + node: cudaGraphNode_t, + pDependentNodes: *mut cudaGraphNode_t, + pNumDependentNodes: *mut usize, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroySpatialTransformerDescriptor( - stDesc: cudnnSpatialTransformerDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGraphNodeGetDependentNodes_v2( + node: cudaGraphNode_t, + pDependentNodes: *mut cudaGraphNode_t, + edgeData: *mut cudaGraphEdgeData, + pNumDependentNodes: *mut usize, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSpatialTfGridGeneratorForward( - handle: cudnnHandle_t, - stDesc: cudnnSpatialTransformerDescriptor_t, - theta: *const ::libc::c_void, - grid: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudaGraphAddDependencies( + graph: cudaGraph_t, + from: *const cudaGraphNode_t, + to: *const cudaGraphNode_t, + numDependencies: usize, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSpatialTfSamplerForward( - handle: cudnnHandle_t, - stDesc: cudnnSpatialTransformerDescriptor_t, - alpha: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - grid: *const ::libc::c_void, - beta: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudaGraphAddDependencies_v2( + graph: cudaGraph_t, + from: *const cudaGraphNode_t, + to: *const cudaGraphNode_t, + edgeData: *const cudaGraphEdgeData, + numDependencies: usize, + ) -> cudaError_t; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnDropoutStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaGraphRemoveDependencies( + graph: cudaGraph_t, + from: *const cudaGraphNode_t, + to: *const cudaGraphNode_t, + numDependencies: usize, + ) -> cudaError_t; } -pub type cudnnDropoutDescriptor_t = *mut cudnnDropoutStruct; extern "C" { - pub fn cudnnCreateDropoutDescriptor( - dropoutDesc: *mut cudnnDropoutDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGraphRemoveDependencies_v2( + graph: cudaGraph_t, + from: *const cudaGraphNode_t, + to: *const cudaGraphNode_t, + edgeData: *const cudaGraphEdgeData, + numDependencies: usize, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroyDropoutDescriptor(dropoutDesc: cudnnDropoutDescriptor_t) -> cudnnStatus_t; + pub fn cudaGraphDestroyNode(node: cudaGraphNode_t) -> cudaError_t; } extern "C" { - pub fn cudnnDropoutGetStatesSize( - handle: cudnnHandle_t, - sizeInBytes: *mut usize, - ) -> cudnnStatus_t; + pub fn cudaGraphInstantiate( + pGraphExec: *mut cudaGraphExec_t, + graph: cudaGraph_t, + flags: ::libc::c_ulonglong, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDropoutGetReserveSpaceSize( - xdesc: cudnnTensorDescriptor_t, - sizeInBytes: *mut usize, - ) -> cudnnStatus_t; + pub fn cudaGraphInstantiateWithFlags( + pGraphExec: *mut cudaGraphExec_t, + graph: cudaGraph_t, + flags: ::libc::c_ulonglong, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetDropoutDescriptor( - dropoutDesc: cudnnDropoutDescriptor_t, - handle: cudnnHandle_t, - dropout: f32, - states: *mut ::libc::c_void, - stateSizeInBytes: usize, - seed: ::libc::c_ulonglong, - ) -> cudnnStatus_t; + pub fn cudaGraphInstantiateWithParams( + pGraphExec: *mut cudaGraphExec_t, + graph: cudaGraph_t, + instantiateParams: *mut cudaGraphInstantiateParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnRestoreDropoutDescriptor( - dropoutDesc: cudnnDropoutDescriptor_t, - handle: cudnnHandle_t, - dropout: f32, - states: *mut ::libc::c_void, - stateSizeInBytes: usize, - seed: ::libc::c_ulonglong, - ) -> cudnnStatus_t; + pub fn cudaGraphExecGetFlags( + graphExec: cudaGraphExec_t, + flags: *mut ::libc::c_ulonglong, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetDropoutDescriptor( - dropoutDesc: cudnnDropoutDescriptor_t, - handle: cudnnHandle_t, - dropout: *mut f32, - states: *mut *mut ::libc::c_void, - seed: *mut ::libc::c_ulonglong, - ) -> cudnnStatus_t; + pub fn cudaGraphExecKernelNodeSetParams( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + pNodeParams: *const cudaKernelNodeParams, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDropoutForward( - handle: cudnnHandle_t, - dropoutDesc: cudnnDropoutDescriptor_t, - xdesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - ydesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, - ) -> cudnnStatus_t; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnAlgorithmStruct { - _unused: [u8; 0], + pub fn cudaGraphExecMemcpyNodeSetParams( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + pNodeParams: *const cudaMemcpy3DParms, + ) -> cudaError_t; } -pub type cudnnAlgorithmDescriptor_t = *mut cudnnAlgorithmStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnAlgorithmPerformanceStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudaGraphExecMemcpyNodeSetParamsToSymbol( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + symbol: *const ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } -pub type cudnnAlgorithmPerformance_t = *mut cudnnAlgorithmPerformanceStruct; -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnConvolutionFwdAlgo_t { - CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_GEMM = 0, - CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM = 1, - CUDNN_CONVOLUTION_FWD_ALGO_GEMM = 2, - CUDNN_CONVOLUTION_FWD_ALGO_DIRECT = 3, - CUDNN_CONVOLUTION_FWD_ALGO_FFT = 4, - CUDNN_CONVOLUTION_FWD_ALGO_FFT_TILING = 5, - CUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD = 6, - CUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD_NONFUSED = 7, - CUDNN_CONVOLUTION_FWD_ALGO_COUNT = 8, +extern "C" { + pub fn cudaGraphExecMemcpyNodeSetParamsFromSymbol( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + dst: *mut ::libc::c_void, + symbol: *const ::libc::c_void, + count: usize, + offset: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnConvolutionBwdFilterAlgo_t { - CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0 = 0, - CUDNN_CONVOLUTION_BWD_FILTER_ALGO_1 = 1, - CUDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT = 2, - CUDNN_CONVOLUTION_BWD_FILTER_ALGO_3 = 3, - CUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD = 4, - CUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD_NONFUSED = 5, - CUDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT_TILING = 6, - CUDNN_CONVOLUTION_BWD_FILTER_ALGO_COUNT = 7, +extern "C" { + pub fn cudaGraphExecMemcpyNodeSetParams1D( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + dst: *mut ::libc::c_void, + src: *const ::libc::c_void, + count: usize, + kind: cudaMemcpyKind, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnConvolutionBwdDataAlgo_t { - CUDNN_CONVOLUTION_BWD_DATA_ALGO_0 = 0, - CUDNN_CONVOLUTION_BWD_DATA_ALGO_1 = 1, - CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT = 2, - CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT_TILING = 3, - CUDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD = 4, - CUDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD_NONFUSED = 5, - CUDNN_CONVOLUTION_BWD_DATA_ALGO_COUNT = 6, +extern "C" { + pub fn cudaGraphExecMemsetNodeSetParams( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + pNodeParams: *const cudaMemsetParams, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnRNNAlgo_t { - CUDNN_RNN_ALGO_STANDARD = 0, - CUDNN_RNN_ALGO_PERSIST_STATIC = 1, - CUDNN_RNN_ALGO_PERSIST_DYNAMIC = 2, - CUDNN_RNN_ALGO_PERSIST_STATIC_SMALL_H = 3, - CUDNN_RNN_ALGO_COUNT = 4, +extern "C" { + pub fn cudaGraphExecHostNodeSetParams( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + pNodeParams: *const cudaHostNodeParams, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnCTCLossAlgo_t { - CUDNN_CTC_LOSS_ALGO_DETERMINISTIC = 0, - CUDNN_CTC_LOSS_ALGO_NON_DETERMINISTIC = 1, +extern "C" { + pub fn cudaGraphExecChildGraphNodeSetParams( + hGraphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + childGraph: cudaGraph_t, + ) -> cudaError_t; } -#[repr(C)] -#[derive(Copy, Clone)] -pub struct cudnnAlgorithmUnionStruct { - pub algo: cudnnAlgorithmUnionStruct_Algorithm, +extern "C" { + pub fn cudaGraphExecEventRecordNodeSetEvent( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + event: cudaEvent_t, + ) -> cudaError_t; } -#[repr(C)] -#[derive(Copy, Clone)] -pub union cudnnAlgorithmUnionStruct_Algorithm { - pub convFwdAlgo: cudnnConvolutionFwdAlgo_t, - pub convBwdFilterAlgo: cudnnConvolutionBwdFilterAlgo_t, - pub convBwdDataAlgo: cudnnConvolutionBwdDataAlgo_t, - pub RNNAlgo: cudnnRNNAlgo_t, - pub CTCLossAlgo: cudnnCTCLossAlgo_t, +extern "C" { + pub fn cudaGraphExecEventWaitNodeSetEvent( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + event: cudaEvent_t, + ) -> cudaError_t; } -#[test] -fn bindgen_test_layout_cudnnAlgorithmUnionStruct_Algorithm() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(cudnnAlgorithmUnionStruct_Algorithm)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!( - "Alignment of ", - stringify!(cudnnAlgorithmUnionStruct_Algorithm) - ) - ); - fn test_field_convFwdAlgo() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).convFwdAlgo) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct_Algorithm), - "::", - stringify!(convFwdAlgo) - ) - ); - } - test_field_convFwdAlgo(); - fn test_field_convBwdFilterAlgo() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).convBwdFilterAlgo) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct_Algorithm), - "::", - stringify!(convBwdFilterAlgo) - ) - ); - } - test_field_convBwdFilterAlgo(); - fn test_field_convBwdDataAlgo() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).convBwdDataAlgo) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct_Algorithm), - "::", - stringify!(convBwdDataAlgo) - ) - ); - } - test_field_convBwdDataAlgo(); - fn test_field_RNNAlgo() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).RNNAlgo) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct_Algorithm), - "::", - stringify!(RNNAlgo) - ) - ); - } - test_field_RNNAlgo(); - fn test_field_CTCLossAlgo() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).CTCLossAlgo) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct_Algorithm), - "::", - stringify!(CTCLossAlgo) - ) - ); - } - test_field_CTCLossAlgo(); +extern "C" { + pub fn cudaGraphExecExternalSemaphoresSignalNodeSetParams( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + nodeParams: *const cudaExternalSemaphoreSignalNodeParams, + ) -> cudaError_t; } -#[test] -fn bindgen_test_layout_cudnnAlgorithmUnionStruct() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(cudnnAlgorithmUnionStruct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(cudnnAlgorithmUnionStruct)) - ); - fn test_field_algo() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).algo) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnAlgorithmUnionStruct), - "::", - stringify!(algo) - ) - ); - } - test_field_algo(); +extern "C" { + pub fn cudaGraphExecExternalSemaphoresWaitNodeSetParams( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + nodeParams: *const cudaExternalSemaphoreWaitNodeParams, + ) -> cudaError_t; } -pub type cudnnAlgorithm_t = cudnnAlgorithmUnionStruct; extern "C" { - pub fn cudnnCreateAlgorithmDescriptor( - algoDesc: *mut cudnnAlgorithmDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGraphNodeSetEnabled( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + isEnabled: ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSetAlgorithmDescriptor( - algoDesc: cudnnAlgorithmDescriptor_t, - algorithm: cudnnAlgorithm_t, - ) -> cudnnStatus_t; + pub fn cudaGraphNodeGetEnabled( + hGraphExec: cudaGraphExec_t, + hNode: cudaGraphNode_t, + isEnabled: *mut ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetAlgorithmDescriptor( - algoDesc: cudnnAlgorithmDescriptor_t, - algorithm: *mut cudnnAlgorithm_t, - ) -> cudnnStatus_t; + pub fn cudaGraphExecUpdate( + hGraphExec: cudaGraphExec_t, + hGraph: cudaGraph_t, + resultInfo: *mut cudaGraphExecUpdateResultInfo, + ) -> cudaError_t; } extern "C" { - pub fn cudnnCopyAlgorithmDescriptor( - src: cudnnAlgorithmDescriptor_t, - dest: cudnnAlgorithmDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGraphUpload( + graphExec: cudaGraphExec_t, + stream: cudaStream_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroyAlgorithmDescriptor(algoDesc: cudnnAlgorithmDescriptor_t) -> cudnnStatus_t; + pub fn cudaGraphLaunch( + graphExec: cudaGraphExec_t, + stream: cudaStream_t, + ) -> cudaError_t; } extern "C" { - pub fn cudnnCreateAlgorithmPerformance( - algoPerf: *mut cudnnAlgorithmPerformance_t, - numberToCreate: ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaGraphExecDestroy(graphExec: cudaGraphExec_t) -> cudaError_t; } extern "C" { - pub fn cudnnSetAlgorithmPerformance( - algoPerf: cudnnAlgorithmPerformance_t, - algoDesc: cudnnAlgorithmDescriptor_t, - status: cudnnStatus_t, - time: f32, - memory: usize, - ) -> cudnnStatus_t; + pub fn cudaGraphDestroy(graph: cudaGraph_t) -> cudaError_t; } extern "C" { - pub fn cudnnGetAlgorithmPerformance( - algoPerf: cudnnAlgorithmPerformance_t, - algoDesc: *mut cudnnAlgorithmDescriptor_t, - status: *mut cudnnStatus_t, - time: *mut f32, - memory: *mut usize, - ) -> cudnnStatus_t; + pub fn cudaGraphDebugDotPrint( + graph: cudaGraph_t, + path: *const ::libc::c_char, + flags: ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudnnDestroyAlgorithmPerformance( - algoPerf: *mut cudnnAlgorithmPerformance_t, - numberToDestroy: ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudaUserObjectCreate( + object_out: *mut cudaUserObject_t, + ptr: *mut ::libc::c_void, + destroy: cudaHostFn_t, + initialRefcount: ::libc::c_uint, + flags: ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudnnGetAlgorithmSpaceSize( - handle: cudnnHandle_t, - algoDesc: cudnnAlgorithmDescriptor_t, - algoSpaceSizeInBytes: *mut usize, - ) -> cudnnStatus_t; + pub fn cudaUserObjectRetain( + object: cudaUserObject_t, + count: ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudnnSaveAlgorithm( - handle: cudnnHandle_t, - algoDesc: cudnnAlgorithmDescriptor_t, - algoSpace: *mut ::libc::c_void, - algoSpaceSizeInBytes: usize, - ) -> cudnnStatus_t; + pub fn cudaUserObjectRelease( + object: cudaUserObject_t, + count: ::libc::c_uint, + ) -> cudaError_t; } extern "C" { - pub fn cudnnRestoreAlgorithm( - handle: cudnnHandle_t, - algoSpace: *mut ::libc::c_void, - algoSpaceSizeInBytes: usize, - algoDesc: cudnnAlgorithmDescriptor_t, - ) -> cudnnStatus_t; + pub fn cudaGraphRetainUserObject( + graph: cudaGraph_t, + object: cudaUserObject_t, + count: ::libc::c_uint, + flags: ::libc::c_uint, + ) -> cudaError_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnSeverity_t { - CUDNN_SEV_FATAL = 0, - CUDNN_SEV_ERROR = 1, - CUDNN_SEV_WARNING = 2, - CUDNN_SEV_INFO = 3, +extern "C" { + pub fn cudaGraphReleaseUserObject( + graph: cudaGraph_t, + object: cudaUserObject_t, + count: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddNode( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + numDependencies: usize, + nodeParams: *mut cudaGraphNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphAddNode_v2( + pGraphNode: *mut cudaGraphNode_t, + graph: cudaGraph_t, + pDependencies: *const cudaGraphNode_t, + dependencyData: *const cudaGraphEdgeData, + numDependencies: usize, + nodeParams: *mut cudaGraphNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphNodeSetParams( + node: cudaGraphNode_t, + nodeParams: *mut cudaGraphNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphExecNodeSetParams( + graphExec: cudaGraphExec_t, + node: cudaGraphNode_t, + nodeParams: *mut cudaGraphNodeParams, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGraphConditionalHandleCreate( + pHandle_out: *mut cudaGraphConditionalHandle, + graph: cudaGraph_t, + defaultLaunchValue: ::libc::c_uint, + flags: ::libc::c_uint, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGetDriverEntryPoint( + symbol: *const ::libc::c_char, + funcPtr: *mut *mut ::libc::c_void, + flags: ::libc::c_ulonglong, + driverStatus: *mut cudaDriverEntryPointQueryResult, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGetExportTable( + ppExportTable: *mut *const ::libc::c_void, + pExportTableId: *const cudaUUID_t, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGetFuncBySymbol( + functionPtr: *mut cudaFunction_t, + symbolPtr: *const ::libc::c_void, + ) -> cudaError_t; +} +extern "C" { + pub fn cudaGetKernel( + kernelPtr: *mut cudaKernel_t, + entryFuncAddr: *const ::libc::c_void, + ) -> cudaError_t; +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudaDataType_t { + CUDA_R_16F = 2, + CUDA_C_16F = 6, + CUDA_R_16BF = 14, + CUDA_C_16BF = 15, + CUDA_R_32F = 0, + CUDA_C_32F = 4, + CUDA_R_64F = 1, + CUDA_C_64F = 5, + CUDA_R_4I = 16, + CUDA_C_4I = 17, + CUDA_R_4U = 18, + CUDA_C_4U = 19, + CUDA_R_8I = 3, + CUDA_C_8I = 7, + CUDA_R_8U = 8, + CUDA_C_8U = 9, + CUDA_R_16I = 20, + CUDA_C_16I = 21, + CUDA_R_16U = 22, + CUDA_C_16U = 23, + CUDA_R_32I = 10, + CUDA_C_32I = 11, + CUDA_R_32U = 12, + CUDA_C_32U = 13, + CUDA_R_64I = 24, + CUDA_C_64I = 25, + CUDA_R_64U = 26, + CUDA_C_64U = 27, + CUDA_R_8F_E4M3 = 28, + CUDA_R_8F_E5M2 = 29, } +pub use self::cudaDataType_t as cudaDataType; +pub const libraryPropertyType_t_MAJOR_VERSION: libraryPropertyType_t = 0; +pub const libraryPropertyType_t_MINOR_VERSION: libraryPropertyType_t = 1; +pub const libraryPropertyType_t_PATCH_LEVEL: libraryPropertyType_t = 2; +pub type libraryPropertyType_t = ::libc::c_uint; +pub use self::libraryPropertyType_t as libraryPropertyType; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cudnnDebugStruct { - pub cudnn_version: ::libc::c_uint, - pub cudnnStatus: cudnnStatus_t, - pub time_sec: ::libc::c_uint, - pub time_usec: ::libc::c_uint, - pub time_delta: ::libc::c_uint, - pub handle: cudnnHandle_t, - pub stream: cudaStream_t, - pub pid: ::libc::c_ulonglong, - pub tid: ::libc::c_ulonglong, - pub cudaDeviceId: ::libc::c_int, - pub reserved: [::libc::c_int; 15usize], +pub struct cudnnContext { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_cudnnDebugStruct() { - assert_eq!( - ::std::mem::size_of::(), - 120usize, - concat!("Size of: ", stringify!(cudnnDebugStruct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(cudnnDebugStruct)) - ); - fn test_field_cudnn_version() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cudnn_version) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(cudnn_version) - ) - ); - } - test_field_cudnn_version(); - fn test_field_cudnnStatus() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cudnnStatus) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(cudnnStatus) - ) - ); - } - test_field_cudnnStatus(); - fn test_field_time_sec() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).time_sec) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(time_sec) - ) - ); - } - test_field_time_sec(); - fn test_field_time_usec() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).time_usec) as usize - ptr as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(time_usec) - ) - ); - } - test_field_time_usec(); - fn test_field_time_delta() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).time_delta) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(time_delta) - ) - ); - } - test_field_time_delta(); - fn test_field_handle() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(handle) - ) - ); - } - test_field_handle(); - fn test_field_stream() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(stream) - ) - ); - } - test_field_stream(); - fn test_field_pid() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(pid) - ) - ); - } - test_field_pid(); - fn test_field_tid() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).tid) as usize - ptr as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(tid) - ) - ); - } - test_field_tid(); - fn test_field_cudaDeviceId() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).cudaDeviceId) as usize - ptr as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(cudaDeviceId) - ) - ); - } - test_field_cudaDeviceId(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 60usize, - concat!( - "Offset of field: ", - stringify!(cudnnDebugStruct), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); +pub type cudnnHandle_t = *mut cudnnContext; +extern "C" { + pub fn cudnnGetVersion() -> usize; } -pub type cudnnDebug_t = cudnnDebugStruct; -pub type cudnnCallback_t = ::std::option::Option< - unsafe extern "C" fn( - sev: cudnnSeverity_t, - udata: *mut ::libc::c_void, - dbg: *const cudnnDebug_t, - msg: *const ::libc::c_char, - ), ->; extern "C" { - pub fn cudnnSetCallback( - mask: ::libc::c_uint, - udata: *mut ::libc::c_void, - fptr: cudnnCallback_t, - ) -> cudnnStatus_t; + pub fn cudnnGetMaxDeviceVersion() -> usize; } extern "C" { - pub fn cudnnGetCallback( - mask: *mut ::libc::c_uint, - udata: *mut *mut ::libc::c_void, - fptr: *mut cudnnCallback_t, - ) -> cudnnStatus_t; + pub fn cudnnGetCudartVersion() -> usize; +} +impl cudnnStatus_t { + pub const CUDNN_STATUS_ALLOC_FAILED: cudnnStatus_t = cudnnStatus_t::CUDNN_STATUS_INTERNAL_ERROR_HOST_ALLOCATION_FAILED; +} +impl cudnnStatus_t { + pub const CUDNN_STATUS_ARCH_MISMATCH: cudnnStatus_t = cudnnStatus_t::CUDNN_STATUS_NOT_SUPPORTED_ARCH_MISMATCH; +} +impl cudnnStatus_t { + pub const CUDNN_STATUS_MAPPING_ERROR: cudnnStatus_t = cudnnStatus_t::CUDNN_STATUS_INTERNAL_ERROR_TEXTURE_CREATION_FAILED; +} +impl cudnnStatus_t { + pub const CUDNN_STATUS_RUNTIME_PREREQUISITE_MISSING: cudnnStatus_t = cudnnStatus_t::CUDNN_STATUS_NOT_SUPPORTED_RUNTIME_PREREQUISITE_MISSING; +} +impl cudnnStatus_t { + pub const CUDNN_STATUS_VERSION_MISMATCH: cudnnStatus_t = cudnnStatus_t::CUDNN_STATUS_SUBLIBRARY_VERSION_MISMATCH; +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnStatus_t { + CUDNN_STATUS_SUCCESS = 0, + CUDNN_STATUS_NOT_INITIALIZED = 1001, + CUDNN_STATUS_SUBLIBRARY_VERSION_MISMATCH = 1002, + CUDNN_STATUS_SERIALIZATION_VERSION_MISMATCH = 1003, + CUDNN_STATUS_DEPRECATED = 1004, + CUDNN_STATUS_LICENSE_ERROR = 1005, + CUDNN_STATUS_RUNTIME_IN_PROGRESS = 1006, + CUDNN_STATUS_RUNTIME_FP_OVERFLOW = 1007, + CUDNN_STATUS_BAD_PARAM = 2000, + CUDNN_STATUS_BAD_PARAM_NULL_POINTER = 2002, + CUDNN_STATUS_BAD_PARAM_MISALIGNED_POINTER = 2003, + CUDNN_STATUS_BAD_PARAM_NOT_FINALIZED = 2004, + CUDNN_STATUS_BAD_PARAM_OUT_OF_BOUND = 2005, + CUDNN_STATUS_BAD_PARAM_SIZE_INSUFFICIENT = 2006, + CUDNN_STATUS_BAD_PARAM_STREAM_MISMATCH = 2007, + CUDNN_STATUS_BAD_PARAM_SHAPE_MISMATCH = 2008, + CUDNN_STATUS_BAD_PARAM_DUPLICATED_ENTRIES = 2009, + CUDNN_STATUS_BAD_PARAM_ATTRIBUTE_TYPE = 2010, + CUDNN_STATUS_NOT_SUPPORTED = 3000, + CUDNN_STATUS_NOT_SUPPORTED_GRAPH_PATTERN = 3001, + CUDNN_STATUS_NOT_SUPPORTED_SHAPE = 3002, + CUDNN_STATUS_NOT_SUPPORTED_DATA_TYPE = 3003, + CUDNN_STATUS_NOT_SUPPORTED_LAYOUT = 3004, + CUDNN_STATUS_NOT_SUPPORTED_INCOMPATIBLE_CUDA_DRIVER = 3005, + CUDNN_STATUS_NOT_SUPPORTED_INCOMPATIBLE_CUDART = 3006, + CUDNN_STATUS_NOT_SUPPORTED_ARCH_MISMATCH = 3007, + CUDNN_STATUS_NOT_SUPPORTED_RUNTIME_PREREQUISITE_MISSING = 3008, + CUDNN_STATUS_NOT_SUPPORTED_SUBLIBRARY_UNAVAILABLE = 3009, + CUDNN_STATUS_NOT_SUPPORTED_SHARED_MEMORY_INSUFFICIENT = 3010, + CUDNN_STATUS_NOT_SUPPORTED_PADDING = 3011, + CUDNN_STATUS_NOT_SUPPORTED_BAD_LAUNCH_PARAM = 3012, + CUDNN_STATUS_INTERNAL_ERROR = 4000, + CUDNN_STATUS_INTERNAL_ERROR_COMPILATION_FAILED = 4001, + CUDNN_STATUS_INTERNAL_ERROR_UNEXPECTED_VALUE = 4002, + CUDNN_STATUS_INTERNAL_ERROR_HOST_ALLOCATION_FAILED = 4003, + CUDNN_STATUS_INTERNAL_ERROR_DEVICE_ALLOCATION_FAILED = 4004, + CUDNN_STATUS_INTERNAL_ERROR_BAD_LAUNCH_PARAM = 4005, + CUDNN_STATUS_INTERNAL_ERROR_TEXTURE_CREATION_FAILED = 4006, + CUDNN_STATUS_EXECUTION_FAILED = 5000, + CUDNN_STATUS_EXECUTION_FAILED_CUDA_DRIVER = 5001, + CUDNN_STATUS_EXECUTION_FAILED_CUBLAS = 5002, + CUDNN_STATUS_EXECUTION_FAILED_CUDART = 5003, + CUDNN_STATUS_EXECUTION_FAILED_CURAND = 5004, + CUDNN_STATUS_INVALID_VALUE = 2001, } extern "C" { - pub fn cudnnOpsInferVersionCheck() -> cudnnStatus_t; + pub fn cudnnGetErrorString(status: cudnnStatus_t) -> *const ::libc::c_char; } extern "C" { - pub fn cudnnSoftmaxBackward( - handle: cudnnHandle_t, - algo: cudnnSoftmaxAlgorithm_t, - mode: cudnnSoftmaxMode_t, - alpha: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *const ::libc::c_void, - dyDesc: cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - beta: *const ::libc::c_void, - dxDesc: cudnnTensorDescriptor_t, - dx: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudnnGetLastErrorString(message: *mut ::libc::c_char, max_size: usize); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnRuntimeTag_t { + _unused: [u8; 0], +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnErrQueryMode_t { + CUDNN_ERRQUERY_RAWCODE = 0, + CUDNN_ERRQUERY_NONBLOCKING = 1, + CUDNN_ERRQUERY_BLOCKING = 2, } extern "C" { - pub fn cudnnPoolingBackward( + pub fn cudnnQueryRuntimeError( handle: cudnnHandle_t, - poolingDesc: cudnnPoolingDescriptor_t, - alpha: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *const ::libc::c_void, - dyDesc: cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - beta: *const ::libc::c_void, - dxDesc: cudnnTensorDescriptor_t, - dx: *mut ::libc::c_void, + rstatus: *mut cudnnStatus_t, + mode: cudnnErrQueryMode_t, + tag: *mut cudnnRuntimeTag_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnActivationBackward( - handle: cudnnHandle_t, - activationDesc: cudnnActivationDescriptor_t, - alpha: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *const ::libc::c_void, - dyDesc: cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - beta: *const ::libc::c_void, - dxDesc: cudnnTensorDescriptor_t, - dx: *mut ::libc::c_void, + pub fn cudnnGetProperty( + type_: libraryPropertyType, + value: *mut ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnLRNCrossChannelBackward( - handle: cudnnHandle_t, - normDesc: cudnnLRNDescriptor_t, - lrnMode: cudnnLRNMode_t, - alpha: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *const ::libc::c_void, - dyDesc: cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - beta: *const ::libc::c_void, - dxDesc: cudnnTensorDescriptor_t, - dx: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudnnCreate(handle: *mut cudnnHandle_t) -> cudnnStatus_t; } extern "C" { - pub fn cudnnDivisiveNormalizationBackward( - handle: cudnnHandle_t, - normDesc: cudnnLRNDescriptor_t, - mode: cudnnDivNormMode_t, - alpha: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - means: *const ::libc::c_void, - dy: *const ::libc::c_void, - temp: *mut ::libc::c_void, - temp2: *mut ::libc::c_void, - beta: *const ::libc::c_void, - dXdMeansDesc: cudnnTensorDescriptor_t, - dx: *mut ::libc::c_void, - dMeans: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudnnDestroy(handle: cudnnHandle_t) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetBatchNormalizationForwardTrainingExWorkspaceSize( + pub fn cudnnSetStream( handle: cudnnHandle_t, - mode: cudnnBatchNormMode_t, - bnOps: cudnnBatchNormOps_t, - xDesc: cudnnTensorDescriptor_t, - zDesc: cudnnTensorDescriptor_t, - yDesc: cudnnTensorDescriptor_t, - bnScaleBiasMeanVarDesc: cudnnTensorDescriptor_t, - activationDesc: cudnnActivationDescriptor_t, - sizeInBytes: *mut usize, + streamId: cudaStream_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetBatchNormalizationBackwardExWorkspaceSize( + pub fn cudnnGetStream( handle: cudnnHandle_t, - mode: cudnnBatchNormMode_t, - bnOps: cudnnBatchNormOps_t, - xDesc: cudnnTensorDescriptor_t, - yDesc: cudnnTensorDescriptor_t, - dyDesc: cudnnTensorDescriptor_t, - dzDesc: cudnnTensorDescriptor_t, - dxDesc: cudnnTensorDescriptor_t, - dBnScaleBiasDesc: cudnnTensorDescriptor_t, - activationDesc: cudnnActivationDescriptor_t, - sizeInBytes: *mut usize, + streamId: *mut cudaStream_t, ) -> cudnnStatus_t; } -extern "C" { - pub fn cudnnGetBatchNormalizationTrainingExReserveSpaceSize( - handle: cudnnHandle_t, - mode: cudnnBatchNormMode_t, - bnOps: cudnnBatchNormOps_t, - activationDesc: cudnnActivationDescriptor_t, - xDesc: cudnnTensorDescriptor_t, - sizeInBytes: *mut usize, - ) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnDataType_t { + CUDNN_DATA_FLOAT = 0, + CUDNN_DATA_DOUBLE = 1, + CUDNN_DATA_HALF = 2, + CUDNN_DATA_INT8 = 3, + CUDNN_DATA_INT32 = 4, + CUDNN_DATA_INT8x4 = 5, + CUDNN_DATA_UINT8 = 6, + CUDNN_DATA_UINT8x4 = 7, + CUDNN_DATA_INT8x32 = 8, + CUDNN_DATA_BFLOAT16 = 9, + CUDNN_DATA_INT64 = 10, + CUDNN_DATA_BOOLEAN = 11, + CUDNN_DATA_FP8_E4M3 = 12, + CUDNN_DATA_FP8_E5M2 = 13, + CUDNN_DATA_FAST_FLOAT_FOR_FP8 = 14, } -extern "C" { - pub fn cudnnBatchNormalizationForwardTraining( - handle: cudnnHandle_t, - mode: cudnnBatchNormMode_t, - alpha: *const ::libc::c_void, - beta: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - bnScaleBiasMeanVarDesc: cudnnTensorDescriptor_t, - bnScale: *const ::libc::c_void, - bnBias: *const ::libc::c_void, - exponentialAverageFactor: f64, - resultRunningMean: *mut ::libc::c_void, - resultRunningVariance: *mut ::libc::c_void, - epsilon: f64, - resultSaveMean: *mut ::libc::c_void, - resultSaveInvVariance: *mut ::libc::c_void, - ) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnMathType_t { + CUDNN_DEFAULT_MATH = 0, + CUDNN_TENSOR_OP_MATH = 1, + CUDNN_TENSOR_OP_MATH_ALLOW_CONVERSION = 2, + CUDNN_FMA_MATH = 3, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnNanPropagation_t { + CUDNN_NOT_PROPAGATE_NAN = 0, + CUDNN_PROPAGATE_NAN = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnCTCGradMode_t { + CUDNN_CTC_ZERO_OOB_GRADIENTS = 0, + CUDNN_CTC_SKIP_OOB_GRADIENTS = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnTensorFormat_t { + CUDNN_TENSOR_NCHW = 0, + CUDNN_TENSOR_NHWC = 1, + CUDNN_TENSOR_NCHW_VECT_C = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnReduceTensorOp_t { + CUDNN_REDUCE_TENSOR_ADD = 0, + CUDNN_REDUCE_TENSOR_MUL = 1, + CUDNN_REDUCE_TENSOR_MIN = 2, + CUDNN_REDUCE_TENSOR_MAX = 3, + CUDNN_REDUCE_TENSOR_AMAX = 4, + CUDNN_REDUCE_TENSOR_AVG = 5, + CUDNN_REDUCE_TENSOR_NORM1 = 6, + CUDNN_REDUCE_TENSOR_NORM2 = 7, + CUDNN_REDUCE_TENSOR_MUL_NO_ZEROS = 8, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnActivationMode_t { + CUDNN_ACTIVATION_SIGMOID = 0, + CUDNN_ACTIVATION_RELU = 1, + CUDNN_ACTIVATION_TANH = 2, + CUDNN_ACTIVATION_CLIPPED_RELU = 3, + CUDNN_ACTIVATION_ELU = 4, + CUDNN_ACTIVATION_IDENTITY = 5, + CUDNN_ACTIVATION_SWISH = 6, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnSeverity_t { + CUDNN_SEV_FATAL = 0, + CUDNN_SEV_ERROR = 1, + CUDNN_SEV_WARNING = 2, + CUDNN_SEV_INFO = 3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnDebugStruct { + pub cudnn_version: ::libc::c_uint, + pub cudnnStatus: cudnnStatus_t, + pub time_sec: ::libc::c_uint, + pub time_usec: ::libc::c_uint, + pub time_delta: ::libc::c_uint, + pub handle: cudnnHandle_t, + pub stream: cudaStream_t, + pub pid: ::libc::c_ulonglong, + pub tid: ::libc::c_ulonglong, + pub cudaDeviceId: ::libc::c_int, + pub reserved: [::libc::c_int; 15usize], +} +#[test] +fn bindgen_test_layout_cudnnDebugStruct() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 120usize, + concat!("Size of: ", stringify!(cudnnDebugStruct)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudnnDebugStruct)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cudnn_version) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(cudnn_version), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cudnnStatus) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(cudnnStatus), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time_sec) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(time_sec), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time_usec) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(time_usec), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time_delta) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(time_delta), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(handle), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).stream) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(stream), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pid) as usize - ptr as usize }, + 40usize, + concat!("Offset of field: ", stringify!(cudnnDebugStruct), "::", stringify!(pid)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tid) as usize - ptr as usize }, + 48usize, + concat!("Offset of field: ", stringify!(cudnnDebugStruct), "::", stringify!(tid)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cudaDeviceId) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(cudaDeviceId), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 60usize, + concat!( + "Offset of field: ", + stringify!(cudnnDebugStruct), + "::", + stringify!(reserved), + ), + ); } +pub type cudnnDebug_t = cudnnDebugStruct; +pub type cudnnCallback_t = ::std::option::Option< + unsafe extern "C" fn( + sev: cudnnSeverity_t, + udata: *mut ::libc::c_void, + dbg: *const cudnnDebug_t, + msg: *const ::libc::c_char, + ), +>; extern "C" { - pub fn cudnnBatchNormalizationForwardTrainingEx( - handle: cudnnHandle_t, - mode: cudnnBatchNormMode_t, - bnOps: cudnnBatchNormOps_t, - alpha: *const ::libc::c_void, - beta: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - xData: *const ::libc::c_void, - zDesc: cudnnTensorDescriptor_t, - zData: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - yData: *mut ::libc::c_void, - bnScaleBiasMeanVarDesc: cudnnTensorDescriptor_t, - bnScale: *const ::libc::c_void, - bnBias: *const ::libc::c_void, - exponentialAverageFactor: f64, - resultRunningMean: *mut ::libc::c_void, - resultRunningVariance: *mut ::libc::c_void, - epsilon: f64, - resultSaveMean: *mut ::libc::c_void, - resultSaveInvVariance: *mut ::libc::c_void, - activationDesc: cudnnActivationDescriptor_t, - workspace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, + pub fn cudnnSetCallback( + mask: ::libc::c_uint, + udata: *mut ::libc::c_void, + fptr: cudnnCallback_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnBatchNormalizationBackward( - handle: cudnnHandle_t, - mode: cudnnBatchNormMode_t, - alphaDataDiff: *const ::libc::c_void, - betaDataDiff: *const ::libc::c_void, - alphaParamDiff: *const ::libc::c_void, - betaParamDiff: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - dyDesc: cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - dxDesc: cudnnTensorDescriptor_t, - dx: *mut ::libc::c_void, - dBnScaleBiasDesc: cudnnTensorDescriptor_t, - bnScale: *const ::libc::c_void, - dBnScaleResult: *mut ::libc::c_void, - dBnBiasResult: *mut ::libc::c_void, - epsilon: f64, - savedMean: *const ::libc::c_void, - savedInvVariance: *const ::libc::c_void, + pub fn cudnnGetCallback( + mask: *mut ::libc::c_uint, + udata: *mut *mut ::libc::c_void, + fptr: *mut cudnnCallback_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnBatchNormalizationBackwardEx( - handle: cudnnHandle_t, - mode: cudnnBatchNormMode_t, - bnOps: cudnnBatchNormOps_t, - alphaDataDiff: *const ::libc::c_void, - betaDataDiff: *const ::libc::c_void, - alphaParamDiff: *const ::libc::c_void, - betaParamDiff: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - xData: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - yData: *const ::libc::c_void, - dyDesc: cudnnTensorDescriptor_t, - dyData: *const ::libc::c_void, - dzDesc: cudnnTensorDescriptor_t, - dzData: *mut ::libc::c_void, - dxDesc: cudnnTensorDescriptor_t, - dxData: *mut ::libc::c_void, - dBnScaleBiasDesc: cudnnTensorDescriptor_t, - bnScaleData: *const ::libc::c_void, - bnBiasData: *const ::libc::c_void, - dBnScaleData: *mut ::libc::c_void, - dBnBiasData: *mut ::libc::c_void, - epsilon: f64, - savedMean: *const ::libc::c_void, - savedInvVariance: *const ::libc::c_void, - activationDesc: cudnnActivationDescriptor_t, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, - ) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnGetNormalizationForwardTrainingWorkspaceSize( - handle: cudnnHandle_t, - mode: cudnnNormMode_t, - normOps: cudnnNormOps_t, - algo: cudnnNormAlgo_t, - xDesc: cudnnTensorDescriptor_t, - zDesc: cudnnTensorDescriptor_t, - yDesc: cudnnTensorDescriptor_t, - normScaleBiasDesc: cudnnTensorDescriptor_t, - activationDesc: cudnnActivationDescriptor_t, - normMeanVarDesc: cudnnTensorDescriptor_t, - sizeInBytes: *mut usize, - groupCnt: ::libc::c_int, - ) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnGetNormalizationBackwardWorkspaceSize( - handle: cudnnHandle_t, - mode: cudnnNormMode_t, - normOps: cudnnNormOps_t, - algo: cudnnNormAlgo_t, - xDesc: cudnnTensorDescriptor_t, - yDesc: cudnnTensorDescriptor_t, - dyDesc: cudnnTensorDescriptor_t, - dzDesc: cudnnTensorDescriptor_t, - dxDesc: cudnnTensorDescriptor_t, - dNormScaleBiasDesc: cudnnTensorDescriptor_t, - activationDesc: cudnnActivationDescriptor_t, - normMeanVarDesc: cudnnTensorDescriptor_t, - sizeInBytes: *mut usize, - groupCnt: ::libc::c_int, - ) -> cudnnStatus_t; + pub fn cudnnGraphVersionCheck() -> cudnnStatus_t; } -extern "C" { - pub fn cudnnGetNormalizationTrainingReserveSpaceSize( - handle: cudnnHandle_t, - mode: cudnnNormMode_t, - normOps: cudnnNormOps_t, - algo: cudnnNormAlgo_t, - activationDesc: cudnnActivationDescriptor_t, - xDesc: cudnnTensorDescriptor_t, - sizeInBytes: *mut usize, - groupCnt: ::libc::c_int, - ) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnConvolutionMode_t { + CUDNN_CONVOLUTION = 0, + CUDNN_CROSS_CORRELATION = 1, } -extern "C" { - pub fn cudnnNormalizationForwardTraining( - handle: cudnnHandle_t, - mode: cudnnNormMode_t, - normOps: cudnnNormOps_t, - algo: cudnnNormAlgo_t, - alpha: *const ::libc::c_void, - beta: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - xData: *const ::libc::c_void, - normScaleBiasDesc: cudnnTensorDescriptor_t, - normScale: *const ::libc::c_void, - normBias: *const ::libc::c_void, - exponentialAverageFactor: f64, - normMeanVarDesc: cudnnTensorDescriptor_t, - resultRunningMean: *mut ::libc::c_void, - resultRunningVariance: *mut ::libc::c_void, - epsilon: f64, - resultSaveMean: *mut ::libc::c_void, - resultSaveInvVariance: *mut ::libc::c_void, - activationDesc: cudnnActivationDescriptor_t, - zDesc: cudnnTensorDescriptor_t, - zData: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - yData: *mut ::libc::c_void, - workspace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, - groupCnt: ::libc::c_int, - ) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnReorderType_t { + CUDNN_DEFAULT_REORDER = 0, + CUDNN_NO_REORDER = 1, } -extern "C" { - pub fn cudnnNormalizationBackward( - handle: cudnnHandle_t, - mode: cudnnNormMode_t, - normOps: cudnnNormOps_t, - algo: cudnnNormAlgo_t, - alphaDataDiff: *const ::libc::c_void, - betaDataDiff: *const ::libc::c_void, - alphaParamDiff: *const ::libc::c_void, - betaParamDiff: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - xData: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - yData: *const ::libc::c_void, - dyDesc: cudnnTensorDescriptor_t, - dyData: *const ::libc::c_void, - dzDesc: cudnnTensorDescriptor_t, - dzData: *mut ::libc::c_void, - dxDesc: cudnnTensorDescriptor_t, - dxData: *mut ::libc::c_void, - dNormScaleBiasDesc: cudnnTensorDescriptor_t, - normScaleData: *const ::libc::c_void, - normBiasData: *const ::libc::c_void, - dNormScaleData: *mut ::libc::c_void, - dNormBiasData: *mut ::libc::c_void, - epsilon: f64, - normMeanVarDesc: cudnnTensorDescriptor_t, - savedMean: *const ::libc::c_void, - savedInvVariance: *const ::libc::c_void, - activationDesc: cudnnActivationDescriptor_t, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, - groupCnt: ::libc::c_int, - ) -> cudnnStatus_t; +pub type cudnnBackendDescriptor_t = *mut ::libc::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnFractionStruct { + pub numerator: i64, + pub denominator: i64, } -extern "C" { - pub fn cudnnSpatialTfGridGeneratorBackward( - handle: cudnnHandle_t, - stDesc: cudnnSpatialTransformerDescriptor_t, - dgrid: *const ::libc::c_void, - dtheta: *mut ::libc::c_void, - ) -> cudnnStatus_t; +#[test] +fn bindgen_test_layout_cudnnFractionStruct() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(cudnnFractionStruct)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudnnFractionStruct)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).numerator) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnFractionStruct), + "::", + stringify!(numerator), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).denominator) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudnnFractionStruct), + "::", + stringify!(denominator), + ), + ); } -extern "C" { - pub fn cudnnSpatialTfSamplerBackward( - handle: cudnnHandle_t, - stDesc: cudnnSpatialTransformerDescriptor_t, - alpha: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - beta: *const ::libc::c_void, - dxDesc: cudnnTensorDescriptor_t, - dx: *mut ::libc::c_void, - alphaDgrid: *const ::libc::c_void, - dyDesc: cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - grid: *const ::libc::c_void, - betaDgrid: *const ::libc::c_void, - dgrid: *mut ::libc::c_void, - ) -> cudnnStatus_t; +pub type cudnnFraction_t = cudnnFractionStruct; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnPointwiseMode_t { + CUDNN_POINTWISE_ADD = 0, + CUDNN_POINTWISE_ADD_SQUARE = 5, + CUDNN_POINTWISE_DIV = 6, + CUDNN_POINTWISE_MAX = 3, + CUDNN_POINTWISE_MIN = 2, + CUDNN_POINTWISE_MOD = 7, + CUDNN_POINTWISE_MUL = 1, + CUDNN_POINTWISE_POW = 8, + CUDNN_POINTWISE_SUB = 9, + CUDNN_POINTWISE_ABS = 10, + CUDNN_POINTWISE_CEIL = 11, + CUDNN_POINTWISE_COS = 12, + CUDNN_POINTWISE_EXP = 13, + CUDNN_POINTWISE_FLOOR = 14, + CUDNN_POINTWISE_LOG = 15, + CUDNN_POINTWISE_NEG = 16, + CUDNN_POINTWISE_RSQRT = 17, + CUDNN_POINTWISE_SIN = 18, + CUDNN_POINTWISE_SQRT = 4, + CUDNN_POINTWISE_TAN = 19, + CUDNN_POINTWISE_ERF = 20, + CUDNN_POINTWISE_IDENTITY = 21, + CUDNN_POINTWISE_RECIPROCAL = 22, + CUDNN_POINTWISE_RELU_FWD = 100, + CUDNN_POINTWISE_TANH_FWD = 101, + CUDNN_POINTWISE_SIGMOID_FWD = 102, + CUDNN_POINTWISE_ELU_FWD = 103, + CUDNN_POINTWISE_GELU_FWD = 104, + CUDNN_POINTWISE_SOFTPLUS_FWD = 105, + CUDNN_POINTWISE_SWISH_FWD = 106, + CUDNN_POINTWISE_GELU_APPROX_TANH_FWD = 107, + CUDNN_POINTWISE_RELU_BWD = 200, + CUDNN_POINTWISE_TANH_BWD = 201, + CUDNN_POINTWISE_SIGMOID_BWD = 202, + CUDNN_POINTWISE_ELU_BWD = 203, + CUDNN_POINTWISE_GELU_BWD = 204, + CUDNN_POINTWISE_SOFTPLUS_BWD = 205, + CUDNN_POINTWISE_SWISH_BWD = 206, + CUDNN_POINTWISE_GELU_APPROX_TANH_BWD = 207, + CUDNN_POINTWISE_CMP_EQ = 300, + CUDNN_POINTWISE_CMP_NEQ = 301, + CUDNN_POINTWISE_CMP_GT = 302, + CUDNN_POINTWISE_CMP_GE = 303, + CUDNN_POINTWISE_CMP_LT = 304, + CUDNN_POINTWISE_CMP_LE = 305, + CUDNN_POINTWISE_LOGICAL_AND = 400, + CUDNN_POINTWISE_LOGICAL_OR = 401, + CUDNN_POINTWISE_LOGICAL_NOT = 402, + CUDNN_POINTWISE_GEN_INDEX = 501, + CUDNN_POINTWISE_BINARY_SELECT = 601, } -extern "C" { - pub fn cudnnDropoutBackward( - handle: cudnnHandle_t, - dropoutDesc: cudnnDropoutDescriptor_t, - dydesc: cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - dxdesc: cudnnTensorDescriptor_t, - dx: *mut ::libc::c_void, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, - ) -> cudnnStatus_t; +impl cudnnResampleMode_t { + pub const CUDNN_RESAMPLE_AVGPOOL_INCLUDE_PADDING: cudnnResampleMode_t = cudnnResampleMode_t::CUDNN_RESAMPLE_AVGPOOL; } -extern "C" { - pub fn cudnnOpsTrainVersionCheck() -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnResampleMode_t { + CUDNN_RESAMPLE_NEAREST = 0, + CUDNN_RESAMPLE_BILINEAR = 1, + CUDNN_RESAMPLE_AVGPOOL = 2, + CUDNN_RESAMPLE_AVGPOOL_EXCLUDE_PADDING = 4, + CUDNN_RESAMPLE_MAXPOOL = 3, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnForwardMode_t { - CUDNN_FWD_MODE_INFERENCE = 0, - CUDNN_FWD_MODE_TRAINING = 1, +pub enum cudnnSignalMode_t { + CUDNN_SIGNAL_SET = 0, + CUDNN_SIGNAL_WAIT = 1, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnRNNMode_t { - CUDNN_RNN_RELU = 0, - CUDNN_RNN_TANH = 1, - CUDNN_LSTM = 2, - CUDNN_GRU = 3, +pub enum cudnnGenStatsMode_t { + CUDNN_GENSTATS_SUM_SQSUM = 0, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnRNNBiasMode_t { - CUDNN_RNN_NO_BIAS = 0, - CUDNN_RNN_SINGLE_INP_BIAS = 1, - CUDNN_RNN_DOUBLE_BIAS = 2, - CUDNN_RNN_SINGLE_REC_BIAS = 3, +pub enum cudnnBnFinalizeStatsMode_t { + CUDNN_BN_FINALIZE_STATISTICS_TRAINING = 0, + CUDNN_BN_FINALIZE_STATISTICS_INFERENCE = 1, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnDirectionMode_t { - CUDNN_UNIDIRECTIONAL = 0, - CUDNN_BIDIRECTIONAL = 1, +pub enum cudnnRngDistribution_t { + CUDNN_RNG_DISTRIBUTION_BERNOULLI = 0, + CUDNN_RNG_DISTRIBUTION_UNIFORM = 1, + CUDNN_RNG_DISTRIBUTION_NORMAL = 2, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnRNNInputMode_t { - CUDNN_LINEAR_INPUT = 0, - CUDNN_SKIP_INPUT = 1, +pub enum cudnnBackendAttributeName_t { + CUDNN_ATTR_POINTWISE_MODE = 0, + CUDNN_ATTR_POINTWISE_MATH_PREC = 1, + CUDNN_ATTR_POINTWISE_NAN_PROPAGATION = 2, + CUDNN_ATTR_POINTWISE_RELU_LOWER_CLIP = 3, + CUDNN_ATTR_POINTWISE_RELU_UPPER_CLIP = 4, + CUDNN_ATTR_POINTWISE_RELU_LOWER_CLIP_SLOPE = 5, + CUDNN_ATTR_POINTWISE_ELU_ALPHA = 6, + CUDNN_ATTR_POINTWISE_SOFTPLUS_BETA = 7, + CUDNN_ATTR_POINTWISE_SWISH_BETA = 8, + CUDNN_ATTR_POINTWISE_AXIS = 9, + CUDNN_ATTR_CONVOLUTION_COMP_TYPE = 100, + CUDNN_ATTR_CONVOLUTION_CONV_MODE = 101, + CUDNN_ATTR_CONVOLUTION_DILATIONS = 102, + CUDNN_ATTR_CONVOLUTION_FILTER_STRIDES = 103, + CUDNN_ATTR_CONVOLUTION_POST_PADDINGS = 104, + CUDNN_ATTR_CONVOLUTION_PRE_PADDINGS = 105, + CUDNN_ATTR_CONVOLUTION_SPATIAL_DIMS = 106, + CUDNN_ATTR_ENGINEHEUR_MODE = 200, + CUDNN_ATTR_ENGINEHEUR_OPERATION_GRAPH = 201, + CUDNN_ATTR_ENGINEHEUR_RESULTS = 202, + CUDNN_ATTR_ENGINEHEUR_SM_COUNT_TARGET = 203, + CUDNN_ATTR_ENGINECFG_ENGINE = 300, + CUDNN_ATTR_ENGINECFG_INTERMEDIATE_INFO = 301, + CUDNN_ATTR_ENGINECFG_KNOB_CHOICES = 302, + CUDNN_ATTR_EXECUTION_PLAN_HANDLE = 400, + CUDNN_ATTR_EXECUTION_PLAN_ENGINE_CONFIG = 401, + CUDNN_ATTR_EXECUTION_PLAN_WORKSPACE_SIZE = 402, + CUDNN_ATTR_EXECUTION_PLAN_COMPUTED_INTERMEDIATE_UIDS = 403, + CUDNN_ATTR_EXECUTION_PLAN_RUN_ONLY_INTERMEDIATE_UIDS = 404, + CUDNN_ATTR_EXECUTION_PLAN_JSON_REPRESENTATION = 405, + CUDNN_ATTR_INTERMEDIATE_INFO_UNIQUE_ID = 500, + CUDNN_ATTR_INTERMEDIATE_INFO_SIZE = 501, + CUDNN_ATTR_INTERMEDIATE_INFO_DEPENDENT_DATA_UIDS = 502, + CUDNN_ATTR_INTERMEDIATE_INFO_DEPENDENT_ATTRIBUTES = 503, + CUDNN_ATTR_KNOB_CHOICE_KNOB_TYPE = 600, + CUDNN_ATTR_KNOB_CHOICE_KNOB_VALUE = 601, + CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_ALPHA = 700, + CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_BETA = 701, + CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_CONV_DESC = 702, + CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_W = 703, + CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_X = 704, + CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_Y = 705, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_ALPHA = 706, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_BETA = 707, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_CONV_DESC = 708, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_W = 709, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_DX = 710, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_DY = 711, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_ALPHA = 712, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_BETA = 713, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_CONV_DESC = 714, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_DW = 715, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_X = 716, + CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_DY = 717, + CUDNN_ATTR_OPERATION_POINTWISE_PW_DESCRIPTOR = 750, + CUDNN_ATTR_OPERATION_POINTWISE_XDESC = 751, + CUDNN_ATTR_OPERATION_POINTWISE_BDESC = 752, + CUDNN_ATTR_OPERATION_POINTWISE_YDESC = 753, + CUDNN_ATTR_OPERATION_POINTWISE_ALPHA1 = 754, + CUDNN_ATTR_OPERATION_POINTWISE_ALPHA2 = 755, + CUDNN_ATTR_OPERATION_POINTWISE_DXDESC = 756, + CUDNN_ATTR_OPERATION_POINTWISE_DYDESC = 757, + CUDNN_ATTR_OPERATION_POINTWISE_TDESC = 758, + CUDNN_ATTR_OPERATION_GENSTATS_MODE = 770, + CUDNN_ATTR_OPERATION_GENSTATS_MATH_PREC = 771, + CUDNN_ATTR_OPERATION_GENSTATS_XDESC = 772, + CUDNN_ATTR_OPERATION_GENSTATS_SUMDESC = 773, + CUDNN_ATTR_OPERATION_GENSTATS_SQSUMDESC = 774, + CUDNN_ATTR_OPERATION_BN_FINALIZE_STATS_MODE = 780, + CUDNN_ATTR_OPERATION_BN_FINALIZE_MATH_PREC = 781, + CUDNN_ATTR_OPERATION_BN_FINALIZE_Y_SUM_DESC = 782, + CUDNN_ATTR_OPERATION_BN_FINALIZE_Y_SQ_SUM_DESC = 783, + CUDNN_ATTR_OPERATION_BN_FINALIZE_SCALE_DESC = 784, + CUDNN_ATTR_OPERATION_BN_FINALIZE_BIAS_DESC = 785, + CUDNN_ATTR_OPERATION_BN_FINALIZE_PREV_RUNNING_MEAN_DESC = 786, + CUDNN_ATTR_OPERATION_BN_FINALIZE_PREV_RUNNING_VAR_DESC = 787, + CUDNN_ATTR_OPERATION_BN_FINALIZE_UPDATED_RUNNING_MEAN_DESC = 788, + CUDNN_ATTR_OPERATION_BN_FINALIZE_UPDATED_RUNNING_VAR_DESC = 789, + CUDNN_ATTR_OPERATION_BN_FINALIZE_SAVED_MEAN_DESC = 790, + CUDNN_ATTR_OPERATION_BN_FINALIZE_SAVED_INV_STD_DESC = 791, + CUDNN_ATTR_OPERATION_BN_FINALIZE_EQ_SCALE_DESC = 792, + CUDNN_ATTR_OPERATION_BN_FINALIZE_EQ_BIAS_DESC = 793, + CUDNN_ATTR_OPERATION_BN_FINALIZE_ACCUM_COUNT_DESC = 794, + CUDNN_ATTR_OPERATION_BN_FINALIZE_EPSILON_DESC = 795, + CUDNN_ATTR_OPERATION_BN_FINALIZE_EXP_AVERATE_FACTOR_DESC = 796, + CUDNN_ATTR_OPERATIONGRAPH_HANDLE = 800, + CUDNN_ATTR_OPERATIONGRAPH_OPS = 801, + CUDNN_ATTR_OPERATIONGRAPH_ENGINE_GLOBAL_COUNT = 802, + CUDNN_ATTR_TENSOR_BYTE_ALIGNMENT = 900, + CUDNN_ATTR_TENSOR_DATA_TYPE = 901, + CUDNN_ATTR_TENSOR_DIMENSIONS = 902, + CUDNN_ATTR_TENSOR_STRIDES = 903, + CUDNN_ATTR_TENSOR_VECTOR_COUNT = 904, + CUDNN_ATTR_TENSOR_VECTORIZED_DIMENSION = 905, + CUDNN_ATTR_TENSOR_UNIQUE_ID = 906, + CUDNN_ATTR_TENSOR_IS_VIRTUAL = 907, + CUDNN_ATTR_TENSOR_IS_BY_VALUE = 908, + CUDNN_ATTR_TENSOR_REORDERING_MODE = 909, + CUDNN_ATTR_TENSOR_RAGGED_OFFSET_DESC = 913, + CUDNN_ATTR_VARIANT_PACK_UNIQUE_IDS = 1000, + CUDNN_ATTR_VARIANT_PACK_DATA_POINTERS = 1001, + CUDNN_ATTR_VARIANT_PACK_INTERMEDIATES = 1002, + CUDNN_ATTR_VARIANT_PACK_WORKSPACE = 1003, + CUDNN_ATTR_LAYOUT_INFO_TENSOR_UID = 1100, + CUDNN_ATTR_LAYOUT_INFO_TYPES = 1101, + CUDNN_ATTR_KNOB_INFO_TYPE = 1200, + CUDNN_ATTR_KNOB_INFO_MAXIMUM_VALUE = 1201, + CUDNN_ATTR_KNOB_INFO_MINIMUM_VALUE = 1202, + CUDNN_ATTR_KNOB_INFO_STRIDE = 1203, + CUDNN_ATTR_ENGINE_OPERATION_GRAPH = 1300, + CUDNN_ATTR_ENGINE_GLOBAL_INDEX = 1301, + CUDNN_ATTR_ENGINE_KNOB_INFO = 1302, + CUDNN_ATTR_ENGINE_NUMERICAL_NOTE = 1303, + CUDNN_ATTR_ENGINE_LAYOUT_INFO = 1304, + CUDNN_ATTR_ENGINE_BEHAVIOR_NOTE = 1305, + CUDNN_ATTR_ENGINE_SM_COUNT_TARGET = 1306, + CUDNN_ATTR_MATMUL_COMP_TYPE = 1500, + CUDNN_ATTR_MATMUL_PADDING_VALUE = 1503, + CUDNN_ATTR_OPERATION_MATMUL_ADESC = 1520, + CUDNN_ATTR_OPERATION_MATMUL_BDESC = 1521, + CUDNN_ATTR_OPERATION_MATMUL_CDESC = 1522, + CUDNN_ATTR_OPERATION_MATMUL_DESC = 1523, + CUDNN_ATTR_OPERATION_MATMUL_IRREGULARLY_STRIDED_BATCH_COUNT = 1524, + CUDNN_ATTR_OPERATION_MATMUL_GEMM_M_OVERRIDE_DESC = 1525, + CUDNN_ATTR_OPERATION_MATMUL_GEMM_N_OVERRIDE_DESC = 1526, + CUDNN_ATTR_OPERATION_MATMUL_GEMM_K_OVERRIDE_DESC = 1527, + CUDNN_ATTR_REDUCTION_OPERATOR = 1600, + CUDNN_ATTR_REDUCTION_COMP_TYPE = 1601, + CUDNN_ATTR_OPERATION_REDUCTION_XDESC = 1610, + CUDNN_ATTR_OPERATION_REDUCTION_YDESC = 1611, + CUDNN_ATTR_OPERATION_REDUCTION_DESC = 1612, + CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_MATH_PREC = 1620, + CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_MEAN_DESC = 1621, + CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_INVSTD_DESC = 1622, + CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_BN_SCALE_DESC = 1623, + CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_X_DESC = 1624, + CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DY_DESC = 1625, + CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_SCALE_DESC = 1626, + CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_BIAS_DESC = 1627, + CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_DY_SCALE_DESC = 1628, + CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_X_SCALE_DESC = 1629, + CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_BIAS = 1630, + CUDNN_ATTR_RESAMPLE_MODE = 1700, + CUDNN_ATTR_RESAMPLE_COMP_TYPE = 1701, + CUDNN_ATTR_RESAMPLE_SPATIAL_DIMS = 1702, + CUDNN_ATTR_RESAMPLE_POST_PADDINGS = 1703, + CUDNN_ATTR_RESAMPLE_PRE_PADDINGS = 1704, + CUDNN_ATTR_RESAMPLE_STRIDES = 1705, + CUDNN_ATTR_RESAMPLE_WINDOW_DIMS = 1706, + CUDNN_ATTR_RESAMPLE_NAN_PROPAGATION = 1707, + CUDNN_ATTR_RESAMPLE_PADDING_MODE = 1708, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_XDESC = 1710, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_YDESC = 1711, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_IDXDESC = 1712, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_ALPHA = 1713, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_BETA = 1714, + CUDNN_ATTR_OPERATION_RESAMPLE_FWD_DESC = 1716, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DXDESC = 1720, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DYDESC = 1721, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_IDXDESC = 1722, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_ALPHA = 1723, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_BETA = 1724, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DESC = 1725, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_XDESC = 1726, + CUDNN_ATTR_OPERATION_RESAMPLE_BWD_YDESC = 1727, + CUDNN_ATTR_OPERATION_CONCAT_AXIS = 1800, + CUDNN_ATTR_OPERATION_CONCAT_INPUT_DESCS = 1801, + CUDNN_ATTR_OPERATION_CONCAT_INPLACE_INDEX = 1802, + CUDNN_ATTR_OPERATION_CONCAT_OUTPUT_DESC = 1803, + CUDNN_ATTR_OPERATION_SIGNAL_MODE = 1900, + CUDNN_ATTR_OPERATION_SIGNAL_FLAGDESC = 1901, + CUDNN_ATTR_OPERATION_SIGNAL_VALUE = 1902, + CUDNN_ATTR_OPERATION_SIGNAL_XDESC = 1903, + CUDNN_ATTR_OPERATION_SIGNAL_YDESC = 1904, + CUDNN_ATTR_OPERATION_NORM_FWD_MODE = 2000, + CUDNN_ATTR_OPERATION_NORM_FWD_PHASE = 2001, + CUDNN_ATTR_OPERATION_NORM_FWD_XDESC = 2002, + CUDNN_ATTR_OPERATION_NORM_FWD_MEAN_DESC = 2003, + CUDNN_ATTR_OPERATION_NORM_FWD_INV_VARIANCE_DESC = 2004, + CUDNN_ATTR_OPERATION_NORM_FWD_SCALE_DESC = 2005, + CUDNN_ATTR_OPERATION_NORM_FWD_BIAS_DESC = 2006, + CUDNN_ATTR_OPERATION_NORM_FWD_EPSILON_DESC = 2007, + CUDNN_ATTR_OPERATION_NORM_FWD_EXP_AVG_FACTOR_DESC = 2008, + CUDNN_ATTR_OPERATION_NORM_FWD_INPUT_RUNNING_MEAN_DESC = 2009, + CUDNN_ATTR_OPERATION_NORM_FWD_INPUT_RUNNING_VAR_DESC = 2010, + CUDNN_ATTR_OPERATION_NORM_FWD_OUTPUT_RUNNING_MEAN_DESC = 2011, + CUDNN_ATTR_OPERATION_NORM_FWD_OUTPUT_RUNNING_VAR_DESC = 2012, + CUDNN_ATTR_OPERATION_NORM_FWD_YDESC = 2013, + CUDNN_ATTR_OPERATION_NORM_FWD_PEER_STAT_DESCS = 2014, + CUDNN_ATTR_OPERATION_NORM_BWD_MODE = 2100, + CUDNN_ATTR_OPERATION_NORM_BWD_XDESC = 2101, + CUDNN_ATTR_OPERATION_NORM_BWD_MEAN_DESC = 2102, + CUDNN_ATTR_OPERATION_NORM_BWD_INV_VARIANCE_DESC = 2103, + CUDNN_ATTR_OPERATION_NORM_BWD_DYDESC = 2104, + CUDNN_ATTR_OPERATION_NORM_BWD_SCALE_DESC = 2105, + CUDNN_ATTR_OPERATION_NORM_BWD_EPSILON_DESC = 2106, + CUDNN_ATTR_OPERATION_NORM_BWD_DSCALE_DESC = 2107, + CUDNN_ATTR_OPERATION_NORM_BWD_DBIAS_DESC = 2108, + CUDNN_ATTR_OPERATION_NORM_BWD_DXDESC = 2109, + CUDNN_ATTR_OPERATION_NORM_BWD_PEER_STAT_DESCS = 2110, + CUDNN_ATTR_OPERATION_RESHAPE_XDESC = 2200, + CUDNN_ATTR_OPERATION_RESHAPE_YDESC = 2201, + CUDNN_ATTR_RNG_DISTRIBUTION = 2300, + CUDNN_ATTR_RNG_NORMAL_DIST_MEAN = 2301, + CUDNN_ATTR_RNG_NORMAL_DIST_STANDARD_DEVIATION = 2302, + CUDNN_ATTR_RNG_UNIFORM_DIST_MAXIMUM = 2303, + CUDNN_ATTR_RNG_UNIFORM_DIST_MINIMUM = 2304, + CUDNN_ATTR_RNG_BERNOULLI_DIST_PROBABILITY = 2305, + CUDNN_ATTR_OPERATION_RNG_YDESC = 2310, + CUDNN_ATTR_OPERATION_RNG_SEED = 2311, + CUDNN_ATTR_OPERATION_RNG_DESC = 2312, + CUDNN_ATTR_OPERATION_RNG_OFFSET_DESC = 2313, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnRNNClipMode_t { - CUDNN_RNN_CLIP_NONE = 0, - CUDNN_RNN_CLIP_MINMAX = 1, +pub enum cudnnBackendAttributeType_t { + CUDNN_TYPE_HANDLE = 0, + CUDNN_TYPE_DATA_TYPE = 1, + CUDNN_TYPE_BOOLEAN = 2, + CUDNN_TYPE_INT64 = 3, + CUDNN_TYPE_FLOAT = 4, + CUDNN_TYPE_DOUBLE = 5, + CUDNN_TYPE_VOID_PTR = 6, + CUDNN_TYPE_CONVOLUTION_MODE = 7, + CUDNN_TYPE_HEUR_MODE = 8, + CUDNN_TYPE_KNOB_TYPE = 9, + CUDNN_TYPE_NAN_PROPOGATION = 10, + CUDNN_TYPE_NUMERICAL_NOTE = 11, + CUDNN_TYPE_LAYOUT_TYPE = 12, + CUDNN_TYPE_ATTRIB_NAME = 13, + CUDNN_TYPE_POINTWISE_MODE = 14, + CUDNN_TYPE_BACKEND_DESCRIPTOR = 15, + CUDNN_TYPE_GENSTATS_MODE = 16, + CUDNN_TYPE_BN_FINALIZE_STATS_MODE = 17, + CUDNN_TYPE_REDUCTION_OPERATOR_TYPE = 18, + CUDNN_TYPE_BEHAVIOR_NOTE = 19, + CUDNN_TYPE_TENSOR_REORDERING_MODE = 20, + CUDNN_TYPE_RESAMPLE_MODE = 21, + CUDNN_TYPE_PADDING_MODE = 22, + CUDNN_TYPE_INT32 = 23, + CUDNN_TYPE_CHAR = 24, + CUDNN_TYPE_SIGNAL_MODE = 25, + CUDNN_TYPE_FRACTION = 26, + CUDNN_TYPE_NORM_MODE = 27, + CUDNN_TYPE_NORM_FWD_PHASE = 28, + CUDNN_TYPE_RNG_DISTRIBUTION = 29, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnRNNDataLayout_t { - CUDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_UNPACKED = 0, - CUDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_PACKED = 1, - CUDNN_RNN_DATA_LAYOUT_BATCH_MAJOR_UNPACKED = 2, +pub enum cudnnBackendDescriptorType_t { + CUDNN_BACKEND_POINTWISE_DESCRIPTOR = 0, + CUDNN_BACKEND_CONVOLUTION_DESCRIPTOR = 1, + CUDNN_BACKEND_ENGINE_DESCRIPTOR = 2, + CUDNN_BACKEND_ENGINECFG_DESCRIPTOR = 3, + CUDNN_BACKEND_ENGINEHEUR_DESCRIPTOR = 4, + CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR = 5, + CUDNN_BACKEND_INTERMEDIATE_INFO_DESCRIPTOR = 6, + CUDNN_BACKEND_KNOB_CHOICE_DESCRIPTOR = 7, + CUDNN_BACKEND_KNOB_INFO_DESCRIPTOR = 8, + CUDNN_BACKEND_LAYOUT_INFO_DESCRIPTOR = 9, + CUDNN_BACKEND_OPERATION_CONVOLUTION_FORWARD_DESCRIPTOR = 10, + CUDNN_BACKEND_OPERATION_CONVOLUTION_BACKWARD_FILTER_DESCRIPTOR = 11, + CUDNN_BACKEND_OPERATION_CONVOLUTION_BACKWARD_DATA_DESCRIPTOR = 12, + CUDNN_BACKEND_OPERATION_POINTWISE_DESCRIPTOR = 13, + CUDNN_BACKEND_OPERATION_GEN_STATS_DESCRIPTOR = 14, + CUDNN_BACKEND_OPERATIONGRAPH_DESCRIPTOR = 15, + CUDNN_BACKEND_VARIANT_PACK_DESCRIPTOR = 16, + CUDNN_BACKEND_TENSOR_DESCRIPTOR = 17, + CUDNN_BACKEND_MATMUL_DESCRIPTOR = 18, + CUDNN_BACKEND_OPERATION_MATMUL_DESCRIPTOR = 19, + CUDNN_BACKEND_OPERATION_BN_FINALIZE_STATISTICS_DESCRIPTOR = 20, + CUDNN_BACKEND_REDUCTION_DESCRIPTOR = 21, + CUDNN_BACKEND_OPERATION_REDUCTION_DESCRIPTOR = 22, + CUDNN_BACKEND_OPERATION_BN_BWD_WEIGHTS_DESCRIPTOR = 23, + CUDNN_BACKEND_RESAMPLE_DESCRIPTOR = 24, + CUDNN_BACKEND_OPERATION_RESAMPLE_FWD_DESCRIPTOR = 25, + CUDNN_BACKEND_OPERATION_RESAMPLE_BWD_DESCRIPTOR = 26, + CUDNN_BACKEND_OPERATION_CONCAT_DESCRIPTOR = 27, + CUDNN_BACKEND_OPERATION_SIGNAL_DESCRIPTOR = 28, + CUDNN_BACKEND_OPERATION_NORM_FORWARD_DESCRIPTOR = 29, + CUDNN_BACKEND_OPERATION_NORM_BACKWARD_DESCRIPTOR = 30, + CUDNN_BACKEND_OPERATION_RESHAPE_DESCRIPTOR = 31, + CUDNN_BACKEND_RNG_DESCRIPTOR = 32, + CUDNN_BACKEND_OPERATION_RNG_DESCRIPTOR = 33, } -pub type cudnnRNNPaddingMode_t = ::libc::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnRNNStruct { - _unused: [u8; 0], +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnBackendNumericalNote_t { + CUDNN_NUMERICAL_NOTE_TENSOR_CORE = 0, + CUDNN_NUMERICAL_NOTE_DOWN_CONVERT_INPUTS = 1, + CUDNN_NUMERICAL_NOTE_REDUCED_PRECISION_REDUCTION = 2, + CUDNN_NUMERICAL_NOTE_FFT = 3, + CUDNN_NUMERICAL_NOTE_NONDETERMINISTIC = 4, + CUDNN_NUMERICAL_NOTE_WINOGRAD = 5, + CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_4x4 = 6, + CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_6x6 = 7, + CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_13x13 = 8, + CUDNN_NUMERICAL_NOTE_TYPE_COUNT = 9, } -pub type cudnnRNNDescriptor_t = *mut cudnnRNNStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnPersistentRNNPlan { - _unused: [u8; 0], -} -pub type cudnnPersistentRNNPlan_t = *mut cudnnPersistentRNNPlan; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnRNNDataStruct { - _unused: [u8; 0], +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnBackendBehaviorNote_t { + CUDNN_BEHAVIOR_NOTE_RUNTIME_COMPILATION = 0, + CUDNN_BEHAVIOR_NOTE_REQUIRES_FILTER_INT8x32_REORDER = 1, + CUDNN_BEHAVIOR_NOTE_REQUIRES_BIAS_INT8x32_REORDER = 2, + CUDNN_BEHAVIOR_NOTE_TYPE_COUNT = 3, } -pub type cudnnRNNDataDescriptor_t = *mut cudnnRNNDataStruct; -extern "C" { - pub fn cudnnCreateRNNDescriptor(rnnDesc: *mut cudnnRNNDescriptor_t) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnBackendKnobType_t { + CUDNN_KNOB_TYPE_SPLIT_K = 0, + CUDNN_KNOB_TYPE_SWIZZLE = 1, + CUDNN_KNOB_TYPE_TILE_SIZE = 2, + CUDNN_KNOB_TYPE_USE_TEX = 3, + CUDNN_KNOB_TYPE_EDGE = 4, + CUDNN_KNOB_TYPE_KBLOCK = 5, + CUDNN_KNOB_TYPE_LDGA = 6, + CUDNN_KNOB_TYPE_LDGB = 7, + CUDNN_KNOB_TYPE_CHUNK_K = 8, + CUDNN_KNOB_TYPE_SPLIT_H = 9, + CUDNN_KNOB_TYPE_WINO_TILE = 10, + CUDNN_KNOB_TYPE_MULTIPLY = 11, + CUDNN_KNOB_TYPE_SPLIT_K_BUF = 12, + CUDNN_KNOB_TYPE_TILEK = 13, + CUDNN_KNOB_TYPE_STAGES = 14, + CUDNN_KNOB_TYPE_REDUCTION_MODE = 15, + CUDNN_KNOB_TYPE_CTA_SPLIT_K_MODE = 16, + CUDNN_KNOB_TYPE_SPLIT_K_SLC = 17, + CUDNN_KNOB_TYPE_IDX_MODE = 18, + CUDNN_KNOB_TYPE_SLICED = 19, + CUDNN_KNOB_TYPE_SPLIT_RS = 20, + CUDNN_KNOB_TYPE_SINGLEBUFFER = 21, + CUDNN_KNOB_TYPE_LDGC = 22, + CUDNN_KNOB_TYPE_SPECFILT = 23, + CUDNN_KNOB_TYPE_KERNEL_CFG = 24, + CUDNN_KNOB_TYPE_WORKSPACE = 25, + CUDNN_KNOB_TYPE_TILE_CGA = 26, + CUDNN_KNOB_TYPE_TILE_CGA_M = 27, + CUDNN_KNOB_TYPE_TILE_CGA_N = 28, + CUDNN_KNOB_TYPE_BLOCK_SIZE = 29, + CUDNN_KNOB_TYPE_OCCUPANCY = 30, + CUDNN_KNOB_TYPE_ARRAY_SIZE_PER_THREAD = 31, + CUDNN_KNOB_TYPE_NUM_C_PER_BLOCK = 32, + CUDNN_KNOB_TYPE_SPLIT_COLS = 33, + CUDNN_KNOB_TYPE_TILE_ROWS = 34, + CUDNN_KNOB_TYPE_TILE_COLS = 35, + CUDNN_KNOB_TYPE_LOAD_SIZE = 36, + CUDNN_KNOB_TYPE_COUNTS = 37, } -extern "C" { - pub fn cudnnDestroyRNNDescriptor(rnnDesc: cudnnRNNDescriptor_t) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnBackendLayoutType_t { + CUDNN_LAYOUT_TYPE_PREFERRED_NCHW = 0, + CUDNN_LAYOUT_TYPE_PREFERRED_NHWC = 1, + CUDNN_LAYOUT_TYPE_PREFERRED_PAD4CK = 2, + CUDNN_LAYOUT_TYPE_PREFERRED_PAD8CK = 3, + CUDNN_LAYOUT_TYPE_COUNT = 4, } -extern "C" { - pub fn cudnnSetRNNDescriptor_v8( - rnnDesc: cudnnRNNDescriptor_t, - algo: cudnnRNNAlgo_t, - cellMode: cudnnRNNMode_t, - biasMode: cudnnRNNBiasMode_t, - dirMode: cudnnDirectionMode_t, - inputMode: cudnnRNNInputMode_t, - dataType: cudnnDataType_t, - mathPrec: cudnnDataType_t, - mathType: cudnnMathType_t, - inputSize: i32, - hiddenSize: i32, - projSize: i32, - numLayers: i32, - dropoutDesc: cudnnDropoutDescriptor_t, - auxFlags: u32, - ) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnBackendHeurMode_t { + CUDNN_HEUR_MODE_INSTANT = 0, + CUDNN_HEUR_MODE_B = 1, + CUDNN_HEUR_MODE_FALLBACK = 2, + CUDNN_HEUR_MODE_A = 3, + CUDNN_HEUR_MODES_COUNT = 4, } -extern "C" { - pub fn cudnnGetRNNDescriptor_v8( - rnnDesc: cudnnRNNDescriptor_t, - algo: *mut cudnnRNNAlgo_t, - cellMode: *mut cudnnRNNMode_t, - biasMode: *mut cudnnRNNBiasMode_t, - dirMode: *mut cudnnDirectionMode_t, - inputMode: *mut cudnnRNNInputMode_t, - dataType: *mut cudnnDataType_t, - mathPrec: *mut cudnnDataType_t, - mathType: *mut cudnnMathType_t, - inputSize: *mut i32, - hiddenSize: *mut i32, - projSize: *mut i32, - numLayers: *mut i32, - dropoutDesc: *mut cudnnDropoutDescriptor_t, - auxFlags: *mut u32, - ) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnBackendTensorReordering_t { + CUDNN_TENSOR_REORDERING_NONE = 0, + CUDNN_TENSOR_REORDERING_INT8x32 = 1, + CUDNN_TENSOR_REORDERING_F16x16 = 2, } -extern "C" { - pub fn cudnnSetRNNDescriptor_v6( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - hiddenSize: ::libc::c_int, - numLayers: ::libc::c_int, - dropoutDesc: cudnnDropoutDescriptor_t, - inputMode: cudnnRNNInputMode_t, - direction: cudnnDirectionMode_t, - cellMode: cudnnRNNMode_t, - algo: cudnnRNNAlgo_t, - mathPrec: cudnnDataType_t, - ) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnPaddingMode_t { + CUDNN_ZERO_PAD = 0, + CUDNN_NEG_INF_PAD = 1, + CUDNN_EDGE_VAL_PAD = 2, } -extern "C" { - pub fn cudnnGetRNNDescriptor_v6( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - hiddenSize: *mut ::libc::c_int, - numLayers: *mut ::libc::c_int, - dropoutDesc: *mut cudnnDropoutDescriptor_t, - inputMode: *mut cudnnRNNInputMode_t, - direction: *mut cudnnDirectionMode_t, - cellMode: *mut cudnnRNNMode_t, - algo: *mut cudnnRNNAlgo_t, - mathPrec: *mut cudnnDataType_t, - ) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnBackendNormMode_t { + CUDNN_LAYER_NORM = 0, + CUDNN_INSTANCE_NORM = 1, + CUDNN_BATCH_NORM = 2, + CUDNN_GROUP_NORM = 3, + CUDNN_RMS_NORM = 4, } -extern "C" { - pub fn cudnnSetRNNMatrixMathType( - rnnDesc: cudnnRNNDescriptor_t, - mType: cudnnMathType_t, - ) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnBackendNormFwdPhase_t { + CUDNN_NORM_FWD_INFERENCE = 0, + CUDNN_NORM_FWD_TRAINING = 1, } extern "C" { - pub fn cudnnGetRNNMatrixMathType( - rnnDesc: cudnnRNNDescriptor_t, - mType: *mut cudnnMathType_t, + pub fn cudnnBackendCreateDescriptor( + descriptorType: cudnnBackendDescriptorType_t, + descriptor: *mut cudnnBackendDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetRNNBiasMode( - rnnDesc: cudnnRNNDescriptor_t, - biasMode: cudnnRNNBiasMode_t, + pub fn cudnnBackendDestroyDescriptor( + descriptor: cudnnBackendDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetRNNBiasMode( - rnnDesc: cudnnRNNDescriptor_t, - biasMode: *mut cudnnRNNBiasMode_t, - ) -> cudnnStatus_t; + pub fn cudnnBackendInitialize(descriptor: cudnnBackendDescriptor_t) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNSetClip_v8( - rnnDesc: cudnnRNNDescriptor_t, - clipMode: cudnnRNNClipMode_t, - clipNanOpt: cudnnNanPropagation_t, - lclip: f64, - rclip: f64, - ) -> cudnnStatus_t; + pub fn cudnnBackendFinalize(descriptor: cudnnBackendDescriptor_t) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNGetClip_v8( - rnnDesc: cudnnRNNDescriptor_t, - clipMode: *mut cudnnRNNClipMode_t, - clipNanOpt: *mut cudnnNanPropagation_t, - lclip: *mut f64, - rclip: *mut f64, + pub fn cudnnBackendSetAttribute( + descriptor: cudnnBackendDescriptor_t, + attributeName: cudnnBackendAttributeName_t, + attributeType: cudnnBackendAttributeType_t, + elementCount: i64, + arrayOfElements: *const ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNSetClip( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - clipMode: cudnnRNNClipMode_t, - clipNanOpt: cudnnNanPropagation_t, - lclip: f64, - rclip: f64, + pub fn cudnnBackendGetAttribute( + descriptor: cudnnBackendDescriptor_t, + attributeName: cudnnBackendAttributeName_t, + attributeType: cudnnBackendAttributeType_t, + requestedElementCount: i64, + elementCount: *mut i64, + arrayOfElements: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNGetClip( + pub fn cudnnBackendExecute( handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - clipMode: *mut cudnnRNNClipMode_t, - clipNanOpt: *mut cudnnNanPropagation_t, - lclip: *mut f64, - rclip: *mut f64, + executionPlan: cudnnBackendDescriptor_t, + variantPack: cudnnBackendDescriptor_t, ) -> cudnnStatus_t; } -extern "C" { - pub fn cudnnSetRNNProjectionLayers( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - recProjSize: ::libc::c_int, - outProjSize: ::libc::c_int, - ) -> cudnnStatus_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnTensorStruct { + _unused: [u8; 0], } -extern "C" { - pub fn cudnnGetRNNProjectionLayers( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - recProjSize: *mut ::libc::c_int, - outProjSize: *mut ::libc::c_int, - ) -> cudnnStatus_t; +pub type cudnnTensorDescriptor_t = *mut cudnnTensorStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnPoolingStruct { + _unused: [u8; 0], } -extern "C" { - pub fn cudnnCreatePersistentRNNPlan( - rnnDesc: cudnnRNNDescriptor_t, - minibatch: ::libc::c_int, - dataType: cudnnDataType_t, - plan: *mut cudnnPersistentRNNPlan_t, - ) -> cudnnStatus_t; +pub type cudnnPoolingDescriptor_t = *mut cudnnPoolingStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnFilterStruct { + _unused: [u8; 0], } -extern "C" { - pub fn cudnnDestroyPersistentRNNPlan(plan: cudnnPersistentRNNPlan_t) -> cudnnStatus_t; +pub type cudnnFilterDescriptor_t = *mut cudnnFilterStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnLRNStruct { + _unused: [u8; 0], } -extern "C" { - pub fn cudnnSetPersistentRNNPlan( - rnnDesc: cudnnRNNDescriptor_t, - plan: cudnnPersistentRNNPlan_t, - ) -> cudnnStatus_t; +pub type cudnnLRNDescriptor_t = *mut cudnnLRNStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnActivationStruct { + _unused: [u8; 0], } -extern "C" { - pub fn cudnnBuildRNNDynamic( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - miniBatch: ::libc::c_int, - ) -> cudnnStatus_t; +pub type cudnnActivationDescriptor_t = *mut cudnnActivationStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnSpatialTransformerStruct { + _unused: [u8; 0], } -extern "C" { - pub fn cudnnGetRNNWorkspaceSize( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - seqLength: ::libc::c_int, - xDesc: *const cudnnTensorDescriptor_t, - sizeInBytes: *mut usize, - ) -> cudnnStatus_t; +pub type cudnnSpatialTransformerDescriptor_t = *mut cudnnSpatialTransformerStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnOpTensorStruct { + _unused: [u8; 0], +} +pub type cudnnOpTensorDescriptor_t = *mut cudnnOpTensorStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnReduceTensorStruct { + _unused: [u8; 0], +} +pub type cudnnReduceTensorDescriptor_t = *mut cudnnReduceTensorStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnCTCLossStruct { + _unused: [u8; 0], +} +pub type cudnnCTCLossDescriptor_t = *mut cudnnCTCLossStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnTensorTransformStruct { + _unused: [u8; 0], +} +pub type cudnnTensorTransformDescriptor_t = *mut cudnnTensorTransformStruct; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnDeterminism_t { + CUDNN_NON_DETERMINISTIC = 0, + CUDNN_DETERMINISTIC = 1, } extern "C" { - pub fn cudnnGetRNNTrainingReserveSize( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - seqLength: ::libc::c_int, - xDesc: *const cudnnTensorDescriptor_t, - sizeInBytes: *mut usize, + pub fn cudnnCreateTensorDescriptor( + tensorDesc: *mut cudnnTensorDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetRNNTempSpaceSizes( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - fMode: cudnnForwardMode_t, - xDesc: cudnnRNNDataDescriptor_t, - workSpaceSize: *mut usize, - reserveSpaceSize: *mut usize, + pub fn cudnnSetTensor4dDescriptor( + tensorDesc: cudnnTensorDescriptor_t, + format: cudnnTensorFormat_t, + dataType: cudnnDataType_t, + n: ::libc::c_int, + c: ::libc::c_int, + h: ::libc::c_int, + w: ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetRNNParamsSize( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - xDesc: cudnnTensorDescriptor_t, - sizeInBytes: *mut usize, + pub fn cudnnSetTensor4dDescriptorEx( + tensorDesc: cudnnTensorDescriptor_t, dataType: cudnnDataType_t, + n: ::libc::c_int, + c: ::libc::c_int, + h: ::libc::c_int, + w: ::libc::c_int, + nStride: ::libc::c_int, + cStride: ::libc::c_int, + hStride: ::libc::c_int, + wStride: ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetRNNWeightSpaceSize( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - weightSpaceSize: *mut usize, + pub fn cudnnGetTensor4dDescriptor( + tensorDesc: cudnnTensorDescriptor_t, + dataType: *mut cudnnDataType_t, + n: *mut ::libc::c_int, + c: *mut ::libc::c_int, + h: *mut ::libc::c_int, + w: *mut ::libc::c_int, + nStride: *mut ::libc::c_int, + cStride: *mut ::libc::c_int, + hStride: *mut ::libc::c_int, + wStride: *mut ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetRNNLinLayerMatrixParams( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - pseudoLayer: ::libc::c_int, - xDesc: cudnnTensorDescriptor_t, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - linLayerID: ::libc::c_int, - linLayerMatDesc: cudnnFilterDescriptor_t, - linLayerMat: *mut *mut ::libc::c_void, + pub fn cudnnSetTensorNdDescriptor( + tensorDesc: cudnnTensorDescriptor_t, + dataType: cudnnDataType_t, + nbDims: ::libc::c_int, + dimA: *const ::libc::c_int, + strideA: *const ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetRNNLinLayerBiasParams( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - pseudoLayer: ::libc::c_int, - xDesc: cudnnTensorDescriptor_t, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - linLayerID: ::libc::c_int, - linLayerBiasDesc: cudnnFilterDescriptor_t, - linLayerBias: *mut *mut ::libc::c_void, + pub fn cudnnSetTensorNdDescriptorEx( + tensorDesc: cudnnTensorDescriptor_t, + format: cudnnTensorFormat_t, + dataType: cudnnDataType_t, + nbDims: ::libc::c_int, + dimA: *const ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetRNNWeightParams( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - pseudoLayer: i32, - weightSpaceSize: usize, - weightSpace: *const ::libc::c_void, - linLayerID: i32, - mDesc: cudnnTensorDescriptor_t, - mAddr: *mut *mut ::libc::c_void, - bDesc: cudnnTensorDescriptor_t, - bAddr: *mut *mut ::libc::c_void, + pub fn cudnnGetTensorNdDescriptor( + tensorDesc: cudnnTensorDescriptor_t, + nbDimsRequested: ::libc::c_int, + dataType: *mut cudnnDataType_t, + nbDims: *mut ::libc::c_int, + dimA: *mut ::libc::c_int, + strideA: *mut ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNForwardInference( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - seqLength: ::libc::c_int, - xDesc: *const cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - cxDesc: cudnnTensorDescriptor_t, - cx: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - yDesc: *const cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - hyDesc: cudnnTensorDescriptor_t, - hy: *mut ::libc::c_void, - cyDesc: cudnnTensorDescriptor_t, - cy: *mut ::libc::c_void, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, + pub fn cudnnGetTensorSizeInBytes( + tensorDesc: cudnnTensorDescriptor_t, + size: *mut usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetRNNPaddingMode( - rnnDesc: cudnnRNNDescriptor_t, - paddingMode: ::libc::c_uint, + pub fn cudnnDestroyTensorDescriptor( + tensorDesc: cudnnTensorDescriptor_t, ) -> cudnnStatus_t; } +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnFoldingDirection_t { + CUDNN_TRANSFORM_FOLD = 0, + CUDNN_TRANSFORM_UNFOLD = 1, +} extern "C" { - pub fn cudnnGetRNNPaddingMode( - rnnDesc: cudnnRNNDescriptor_t, - paddingMode: *mut ::libc::c_uint, + pub fn cudnnInitTransformDest( + transformDesc: cudnnTensorTransformDescriptor_t, + srcDesc: cudnnTensorDescriptor_t, + destDesc: cudnnTensorDescriptor_t, + destSizeInBytes: *mut usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnCreateRNNDataDescriptor( - rnnDataDesc: *mut cudnnRNNDataDescriptor_t, + pub fn cudnnCreateTensorTransformDescriptor( + transformDesc: *mut cudnnTensorTransformDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnDestroyRNNDataDescriptor(rnnDataDesc: cudnnRNNDataDescriptor_t) -> cudnnStatus_t; + pub fn cudnnSetTensorTransformDescriptor( + transformDesc: cudnnTensorTransformDescriptor_t, + nbDims: u32, + destFormat: cudnnTensorFormat_t, + padBeforeA: *const i32, + padAfterA: *const i32, + foldA: *const u32, + direction: cudnnFoldingDirection_t, + ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetRNNDataDescriptor( - rnnDataDesc: cudnnRNNDataDescriptor_t, - dataType: cudnnDataType_t, - layout: cudnnRNNDataLayout_t, - maxSeqLength: ::libc::c_int, - batchSize: ::libc::c_int, - vectorSize: ::libc::c_int, - seqLengthArray: *const ::libc::c_int, - paddingFill: *mut ::libc::c_void, + pub fn cudnnGetTensorTransformDescriptor( + transformDesc: cudnnTensorTransformDescriptor_t, + nbDimsRequested: u32, + destFormat: *mut cudnnTensorFormat_t, + padBeforeA: *mut i32, + padAfterA: *mut i32, + foldA: *mut u32, + direction: *mut cudnnFoldingDirection_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetRNNDataDescriptor( - rnnDataDesc: cudnnRNNDataDescriptor_t, - dataType: *mut cudnnDataType_t, - layout: *mut cudnnRNNDataLayout_t, - maxSeqLength: *mut ::libc::c_int, - batchSize: *mut ::libc::c_int, - vectorSize: *mut ::libc::c_int, - arrayLengthRequested: ::libc::c_int, - seqLengthArray: *mut ::libc::c_int, - paddingFill: *mut ::libc::c_void, + pub fn cudnnDestroyTensorTransformDescriptor( + transformDesc: cudnnTensorTransformDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNForwardInferenceEx( + pub fn cudnnTransformTensor( handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - xDesc: cudnnRNNDataDescriptor_t, + alpha: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, x: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - cxDesc: cudnnTensorDescriptor_t, - cx: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - yDesc: cudnnRNNDataDescriptor_t, + beta: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, y: *mut ::libc::c_void, - hyDesc: cudnnTensorDescriptor_t, - hy: *mut ::libc::c_void, - cyDesc: cudnnTensorDescriptor_t, - cy: *mut ::libc::c_void, - kDesc: cudnnRNNDataDescriptor_t, - keys: *const ::libc::c_void, - cDesc: cudnnRNNDataDescriptor_t, - cAttn: *mut ::libc::c_void, - iDesc: cudnnRNNDataDescriptor_t, - iAttn: *mut ::libc::c_void, - qDesc: cudnnRNNDataDescriptor_t, - queries: *mut ::libc::c_void, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNForward( + pub fn cudnnTransformTensorEx( handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - fwdMode: cudnnForwardMode_t, - devSeqLengths: *const i32, - xDesc: cudnnRNNDataDescriptor_t, - x: *const ::libc::c_void, - yDesc: cudnnRNNDataDescriptor_t, - y: *mut ::libc::c_void, - hDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - hy: *mut ::libc::c_void, - cDesc: cudnnTensorDescriptor_t, - cx: *const ::libc::c_void, - cy: *mut ::libc::c_void, - weightSpaceSize: usize, - weightSpace: *const ::libc::c_void, - workSpaceSize: usize, - workSpace: *mut ::libc::c_void, - reserveSpaceSize: usize, - reserveSpace: *mut ::libc::c_void, + transDesc: cudnnTensorTransformDescriptor_t, + alpha: *const ::libc::c_void, + srcDesc: cudnnTensorDescriptor_t, + srcData: *const ::libc::c_void, + beta: *const ::libc::c_void, + destDesc: cudnnTensorDescriptor_t, + destData: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetRNNAlgorithmDescriptor( + pub fn cudnnAddTensor( handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - algoDesc: cudnnAlgorithmDescriptor_t, + alpha: *const ::libc::c_void, + aDesc: cudnnTensorDescriptor_t, + A: *const ::libc::c_void, + beta: *const ::libc::c_void, + cDesc: cudnnTensorDescriptor_t, + C: *mut ::libc::c_void, ) -> cudnnStatus_t; } +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnOpTensorOp_t { + CUDNN_OP_TENSOR_ADD = 0, + CUDNN_OP_TENSOR_MUL = 1, + CUDNN_OP_TENSOR_MIN = 2, + CUDNN_OP_TENSOR_MAX = 3, + CUDNN_OP_TENSOR_SQRT = 4, + CUDNN_OP_TENSOR_NOT = 5, +} extern "C" { - pub fn cudnnGetRNNForwardInferenceAlgorithmMaxCount( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - count: *mut ::libc::c_int, + pub fn cudnnCreateOpTensorDescriptor( + opTensorDesc: *mut cudnnOpTensorDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnFindRNNForwardInferenceAlgorithmEx( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - seqLength: ::libc::c_int, - xDesc: *const cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - cxDesc: cudnnTensorDescriptor_t, - cx: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - yDesc: *const cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - hyDesc: cudnnTensorDescriptor_t, - hy: *mut ::libc::c_void, - cyDesc: cudnnTensorDescriptor_t, - cy: *mut ::libc::c_void, - findIntensity: f32, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnAlgorithmPerformance_t, - workspace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, + pub fn cudnnSetOpTensorDescriptor( + opTensorDesc: cudnnOpTensorDescriptor_t, + opTensorOp: cudnnOpTensorOp_t, + opTensorCompType: cudnnDataType_t, + opTensorNanOpt: cudnnNanPropagation_t, ) -> cudnnStatus_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnSeqDataAxis_t { - CUDNN_SEQDATA_TIME_DIM = 0, - CUDNN_SEQDATA_BATCH_DIM = 1, - CUDNN_SEQDATA_BEAM_DIM = 2, - CUDNN_SEQDATA_VECT_DIM = 3, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnSeqDataStruct { - _unused: [u8; 0], -} -pub type cudnnSeqDataDescriptor_t = *mut cudnnSeqDataStruct; extern "C" { - pub fn cudnnCreateSeqDataDescriptor( - seqDataDesc: *mut cudnnSeqDataDescriptor_t, + pub fn cudnnGetOpTensorDescriptor( + opTensorDesc: cudnnOpTensorDescriptor_t, + opTensorOp: *mut cudnnOpTensorOp_t, + opTensorCompType: *mut cudnnDataType_t, + opTensorNanOpt: *mut cudnnNanPropagation_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnDestroySeqDataDescriptor(seqDataDesc: cudnnSeqDataDescriptor_t) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnSetSeqDataDescriptor( - seqDataDesc: cudnnSeqDataDescriptor_t, - dataType: cudnnDataType_t, - nbDims: ::libc::c_int, - dimA: *const ::libc::c_int, - axes: *const cudnnSeqDataAxis_t, - seqLengthArraySize: usize, - seqLengthArray: *const ::libc::c_int, - paddingFill: *mut ::libc::c_void, + pub fn cudnnDestroyOpTensorDescriptor( + opTensorDesc: cudnnOpTensorDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetSeqDataDescriptor( - seqDataDesc: cudnnSeqDataDescriptor_t, - dataType: *mut cudnnDataType_t, - nbDims: *mut ::libc::c_int, - nbDimsRequested: ::libc::c_int, - dimA: *mut ::libc::c_int, - axes: *mut cudnnSeqDataAxis_t, - seqLengthArraySize: *mut usize, - seqLengthSizeRequested: usize, - seqLengthArray: *mut ::libc::c_int, - paddingFill: *mut ::libc::c_void, + pub fn cudnnOpTensor( + handle: cudnnHandle_t, + opTensorDesc: cudnnOpTensorDescriptor_t, + alpha1: *const ::libc::c_void, + aDesc: cudnnTensorDescriptor_t, + A: *const ::libc::c_void, + alpha2: *const ::libc::c_void, + bDesc: cudnnTensorDescriptor_t, + B: *const ::libc::c_void, + beta: *const ::libc::c_void, + cDesc: cudnnTensorDescriptor_t, + C: *mut ::libc::c_void, ) -> cudnnStatus_t; } -pub type cudnnAttnQueryMap_t = ::libc::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnAttnStruct { - _unused: [u8; 0], +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnReduceTensorIndices_t { + CUDNN_REDUCE_TENSOR_NO_INDICES = 0, + CUDNN_REDUCE_TENSOR_FLATTENED_INDICES = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnIndicesType_t { + CUDNN_32BIT_INDICES = 0, + CUDNN_64BIT_INDICES = 1, + CUDNN_16BIT_INDICES = 2, + CUDNN_8BIT_INDICES = 3, } -pub type cudnnAttnDescriptor_t = *mut cudnnAttnStruct; extern "C" { - pub fn cudnnCreateAttnDescriptor(attnDesc: *mut cudnnAttnDescriptor_t) -> cudnnStatus_t; + pub fn cudnnCreateReduceTensorDescriptor( + reduceTensorDesc: *mut cudnnReduceTensorDescriptor_t, + ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnDestroyAttnDescriptor(attnDesc: cudnnAttnDescriptor_t) -> cudnnStatus_t; + pub fn cudnnSetReduceTensorDescriptor( + reduceTensorDesc: cudnnReduceTensorDescriptor_t, + reduceTensorOp: cudnnReduceTensorOp_t, + reduceTensorCompType: cudnnDataType_t, + reduceTensorNanOpt: cudnnNanPropagation_t, + reduceTensorIndices: cudnnReduceTensorIndices_t, + reduceTensorIndicesType: cudnnIndicesType_t, + ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetAttnDescriptor( - attnDesc: cudnnAttnDescriptor_t, - attnMode: ::libc::c_uint, - nHeads: ::libc::c_int, - smScaler: f64, - dataType: cudnnDataType_t, - computePrec: cudnnDataType_t, - mathType: cudnnMathType_t, - attnDropoutDesc: cudnnDropoutDescriptor_t, - postDropoutDesc: cudnnDropoutDescriptor_t, - qSize: ::libc::c_int, - kSize: ::libc::c_int, - vSize: ::libc::c_int, - qProjSize: ::libc::c_int, - kProjSize: ::libc::c_int, - vProjSize: ::libc::c_int, - oProjSize: ::libc::c_int, - qoMaxSeqLength: ::libc::c_int, - kvMaxSeqLength: ::libc::c_int, - maxBatchSize: ::libc::c_int, - maxBeamSize: ::libc::c_int, + pub fn cudnnGetReduceTensorDescriptor( + reduceTensorDesc: cudnnReduceTensorDescriptor_t, + reduceTensorOp: *mut cudnnReduceTensorOp_t, + reduceTensorCompType: *mut cudnnDataType_t, + reduceTensorNanOpt: *mut cudnnNanPropagation_t, + reduceTensorIndices: *mut cudnnReduceTensorIndices_t, + reduceTensorIndicesType: *mut cudnnIndicesType_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetAttnDescriptor( - attnDesc: cudnnAttnDescriptor_t, - attnMode: *mut ::libc::c_uint, - nHeads: *mut ::libc::c_int, - smScaler: *mut f64, - dataType: *mut cudnnDataType_t, - computePrec: *mut cudnnDataType_t, - mathType: *mut cudnnMathType_t, - attnDropoutDesc: *mut cudnnDropoutDescriptor_t, - postDropoutDesc: *mut cudnnDropoutDescriptor_t, - qSize: *mut ::libc::c_int, - kSize: *mut ::libc::c_int, - vSize: *mut ::libc::c_int, - qProjSize: *mut ::libc::c_int, - kProjSize: *mut ::libc::c_int, - vProjSize: *mut ::libc::c_int, - oProjSize: *mut ::libc::c_int, - qoMaxSeqLength: *mut ::libc::c_int, - kvMaxSeqLength: *mut ::libc::c_int, - maxBatchSize: *mut ::libc::c_int, - maxBeamSize: *mut ::libc::c_int, + pub fn cudnnDestroyReduceTensorDescriptor( + reduceTensorDesc: cudnnReduceTensorDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetMultiHeadAttnBuffers( + pub fn cudnnGetReductionIndicesSize( handle: cudnnHandle_t, - attnDesc: cudnnAttnDescriptor_t, - weightSizeInBytes: *mut usize, - workSpaceSizeInBytes: *mut usize, - reserveSpaceSizeInBytes: *mut usize, + reduceTensorDesc: cudnnReduceTensorDescriptor_t, + aDesc: cudnnTensorDescriptor_t, + cDesc: cudnnTensorDescriptor_t, + sizeInBytes: *mut usize, ) -> cudnnStatus_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnMultiHeadAttnWeightKind_t { - CUDNN_MH_ATTN_Q_WEIGHTS = 0, - CUDNN_MH_ATTN_K_WEIGHTS = 1, - CUDNN_MH_ATTN_V_WEIGHTS = 2, - CUDNN_MH_ATTN_O_WEIGHTS = 3, - CUDNN_MH_ATTN_Q_BIASES = 4, - CUDNN_MH_ATTN_K_BIASES = 5, - CUDNN_MH_ATTN_V_BIASES = 6, - CUDNN_MH_ATTN_O_BIASES = 7, -} extern "C" { - pub fn cudnnGetMultiHeadAttnWeights( + pub fn cudnnGetReductionWorkspaceSize( handle: cudnnHandle_t, - attnDesc: cudnnAttnDescriptor_t, - wKind: cudnnMultiHeadAttnWeightKind_t, - weightSizeInBytes: usize, - weights: *const ::libc::c_void, - wDesc: cudnnTensorDescriptor_t, - wAddr: *mut *mut ::libc::c_void, + reduceTensorDesc: cudnnReduceTensorDescriptor_t, + aDesc: cudnnTensorDescriptor_t, + cDesc: cudnnTensorDescriptor_t, + sizeInBytes: *mut usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnMultiHeadAttnForward( + pub fn cudnnReduceTensor( handle: cudnnHandle_t, - attnDesc: cudnnAttnDescriptor_t, - currIdx: ::libc::c_int, - loWinIdx: *const ::libc::c_int, - hiWinIdx: *const ::libc::c_int, - devSeqLengthsQO: *const ::libc::c_int, - devSeqLengthsKV: *const ::libc::c_int, - qDesc: cudnnSeqDataDescriptor_t, - queries: *const ::libc::c_void, - residuals: *const ::libc::c_void, - kDesc: cudnnSeqDataDescriptor_t, - keys: *const ::libc::c_void, - vDesc: cudnnSeqDataDescriptor_t, - values: *const ::libc::c_void, - oDesc: cudnnSeqDataDescriptor_t, - out: *mut ::libc::c_void, - weightSizeInBytes: usize, - weights: *const ::libc::c_void, - workSpaceSizeInBytes: usize, - workSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, + reduceTensorDesc: cudnnReduceTensorDescriptor_t, + indices: *mut ::libc::c_void, + indicesSizeInBytes: usize, + workspace: *mut ::libc::c_void, + workspaceSizeInBytes: usize, + alpha: *const ::libc::c_void, + aDesc: cudnnTensorDescriptor_t, + A: *const ::libc::c_void, + beta: *const ::libc::c_void, + cDesc: cudnnTensorDescriptor_t, + C: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnAdvInferVersionCheck() -> cudnnStatus_t; -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnWgradMode_t { - CUDNN_WGRAD_MODE_ADD = 0, - CUDNN_WGRAD_MODE_SET = 1, + pub fn cudnnSetTensor( + handle: cudnnHandle_t, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, + valuePtr: *const ::libc::c_void, + ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNForwardTraining( + pub fn cudnnScaleTensor( handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - seqLength: ::libc::c_int, - xDesc: *const cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - cxDesc: cudnnTensorDescriptor_t, - cx: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - yDesc: *const cudnnTensorDescriptor_t, + yDesc: cudnnTensorDescriptor_t, y: *mut ::libc::c_void, - hyDesc: cudnnTensorDescriptor_t, - hy: *mut ::libc::c_void, - cyDesc: cudnnTensorDescriptor_t, - cy: *mut ::libc::c_void, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, + alpha: *const ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNBackwardData( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - seqLength: ::libc::c_int, - yDesc: *const cudnnTensorDescriptor_t, - y: *const ::libc::c_void, - dyDesc: *const cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - dhyDesc: cudnnTensorDescriptor_t, - dhy: *const ::libc::c_void, - dcyDesc: cudnnTensorDescriptor_t, - dcy: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - cxDesc: cudnnTensorDescriptor_t, - cx: *const ::libc::c_void, - dxDesc: *const cudnnTensorDescriptor_t, - dx: *mut ::libc::c_void, - dhxDesc: cudnnTensorDescriptor_t, - dhx: *mut ::libc::c_void, - dcxDesc: cudnnTensorDescriptor_t, - dcx: *mut ::libc::c_void, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, + pub fn cudnnCreateFilterDescriptor( + filterDesc: *mut cudnnFilterDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNBackwardData_v8( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - devSeqLengths: *const i32, - yDesc: cudnnRNNDataDescriptor_t, - y: *const ::libc::c_void, - dy: *const ::libc::c_void, - xDesc: cudnnRNNDataDescriptor_t, - dx: *mut ::libc::c_void, - hDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - dhy: *const ::libc::c_void, - dhx: *mut ::libc::c_void, - cDesc: cudnnTensorDescriptor_t, - cx: *const ::libc::c_void, - dcy: *const ::libc::c_void, - dcx: *mut ::libc::c_void, - weightSpaceSize: usize, - weightSpace: *const ::libc::c_void, - workSpaceSize: usize, - workSpace: *mut ::libc::c_void, - reserveSpaceSize: usize, - reserveSpace: *mut ::libc::c_void, + pub fn cudnnSetFilter4dDescriptor( + filterDesc: cudnnFilterDescriptor_t, + dataType: cudnnDataType_t, + format: cudnnTensorFormat_t, + k: ::libc::c_int, + c: ::libc::c_int, + h: ::libc::c_int, + w: ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNBackwardWeights( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - seqLength: ::libc::c_int, - xDesc: *const cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - yDesc: *const cudnnTensorDescriptor_t, - y: *const ::libc::c_void, - workSpace: *const ::libc::c_void, - workSpaceSizeInBytes: usize, - dwDesc: cudnnFilterDescriptor_t, - dw: *mut ::libc::c_void, - reserveSpace: *const ::libc::c_void, - reserveSpaceSizeInBytes: usize, + pub fn cudnnGetFilter4dDescriptor( + filterDesc: cudnnFilterDescriptor_t, + dataType: *mut cudnnDataType_t, + format: *mut cudnnTensorFormat_t, + k: *mut ::libc::c_int, + c: *mut ::libc::c_int, + h: *mut ::libc::c_int, + w: *mut ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNBackwardWeights_v8( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - addGrad: cudnnWgradMode_t, - devSeqLengths: *const i32, - xDesc: cudnnRNNDataDescriptor_t, - x: *const ::libc::c_void, - hDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - yDesc: cudnnRNNDataDescriptor_t, - y: *const ::libc::c_void, - weightSpaceSize: usize, - dweightSpace: *mut ::libc::c_void, - workSpaceSize: usize, - workSpace: *mut ::libc::c_void, - reserveSpaceSize: usize, - reserveSpace: *mut ::libc::c_void, + pub fn cudnnSetFilterNdDescriptor( + filterDesc: cudnnFilterDescriptor_t, + dataType: cudnnDataType_t, + format: cudnnTensorFormat_t, + nbDims: ::libc::c_int, + filterDimA: *const ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNForwardTrainingEx( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - xDesc: cudnnRNNDataDescriptor_t, - x: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - cxDesc: cudnnTensorDescriptor_t, - cx: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - yDesc: cudnnRNNDataDescriptor_t, - y: *mut ::libc::c_void, - hyDesc: cudnnTensorDescriptor_t, - hy: *mut ::libc::c_void, - cyDesc: cudnnTensorDescriptor_t, - cy: *mut ::libc::c_void, - kDesc: cudnnRNNDataDescriptor_t, - keys: *const ::libc::c_void, - cDesc: cudnnRNNDataDescriptor_t, - cAttn: *mut ::libc::c_void, - iDesc: cudnnRNNDataDescriptor_t, - iAttn: *mut ::libc::c_void, - qDesc: cudnnRNNDataDescriptor_t, - queries: *mut ::libc::c_void, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, + pub fn cudnnGetFilterNdDescriptor( + filterDesc: cudnnFilterDescriptor_t, + nbDimsRequested: ::libc::c_int, + dataType: *mut cudnnDataType_t, + format: *mut cudnnTensorFormat_t, + nbDims: *mut ::libc::c_int, + filterDimA: *mut ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNBackwardDataEx( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - yDesc: cudnnRNNDataDescriptor_t, - y: *const ::libc::c_void, - dyDesc: cudnnRNNDataDescriptor_t, - dy: *const ::libc::c_void, - dcDesc: cudnnRNNDataDescriptor_t, - dcAttn: *const ::libc::c_void, - dhyDesc: cudnnTensorDescriptor_t, - dhy: *const ::libc::c_void, - dcyDesc: cudnnTensorDescriptor_t, - dcy: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - cxDesc: cudnnTensorDescriptor_t, - cx: *const ::libc::c_void, - dxDesc: cudnnRNNDataDescriptor_t, - dx: *mut ::libc::c_void, - dhxDesc: cudnnTensorDescriptor_t, - dhx: *mut ::libc::c_void, - dcxDesc: cudnnTensorDescriptor_t, - dcx: *mut ::libc::c_void, - dkDesc: cudnnRNNDataDescriptor_t, - dkeys: *mut ::libc::c_void, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, + pub fn cudnnGetFilterSizeInBytes( + filterDesc: cudnnFilterDescriptor_t, + size: *mut usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnRNNBackwardWeightsEx( + pub fn cudnnTransformFilter( handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - xDesc: cudnnRNNDataDescriptor_t, - x: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - yDesc: cudnnRNNDataDescriptor_t, - y: *const ::libc::c_void, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - dwDesc: cudnnFilterDescriptor_t, - dw: *mut ::libc::c_void, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, + transDesc: cudnnTensorTransformDescriptor_t, + alpha: *const ::libc::c_void, + srcDesc: cudnnFilterDescriptor_t, + srcData: *const ::libc::c_void, + beta: *const ::libc::c_void, + destDesc: cudnnFilterDescriptor_t, + destData: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetRNNForwardTrainingAlgorithmMaxCount( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - count: *mut ::libc::c_int, + pub fn cudnnDestroyFilterDescriptor( + filterDesc: cudnnFilterDescriptor_t, ) -> cudnnStatus_t; } +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnSoftmaxAlgorithm_t { + CUDNN_SOFTMAX_FAST = 0, + CUDNN_SOFTMAX_ACCURATE = 1, + CUDNN_SOFTMAX_LOG = 2, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnSoftmaxMode_t { + CUDNN_SOFTMAX_MODE_INSTANCE = 0, + CUDNN_SOFTMAX_MODE_CHANNEL = 1, +} extern "C" { - pub fn cudnnFindRNNForwardTrainingAlgorithmEx( + pub fn cudnnSoftmaxForward( handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - seqLength: ::libc::c_int, - xDesc: *const cudnnTensorDescriptor_t, + algo: cudnnSoftmaxAlgorithm_t, + mode: cudnnSoftmaxMode_t, + alpha: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, x: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - cxDesc: cudnnTensorDescriptor_t, - cx: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - yDesc: *const cudnnTensorDescriptor_t, + beta: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, y: *mut ::libc::c_void, - hyDesc: cudnnTensorDescriptor_t, - hy: *mut ::libc::c_void, - cyDesc: cudnnTensorDescriptor_t, - cy: *mut ::libc::c_void, - findIntensity: f32, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnAlgorithmPerformance_t, - workspace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, ) -> cudnnStatus_t; } +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnPoolingMode_t { + CUDNN_POOLING_MAX = 0, + CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING = 1, + CUDNN_POOLING_AVERAGE_COUNT_EXCLUDE_PADDING = 2, + CUDNN_POOLING_MAX_DETERMINISTIC = 3, +} extern "C" { - pub fn cudnnGetRNNBackwardDataAlgorithmMaxCount( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - count: *mut ::libc::c_int, + pub fn cudnnCreatePoolingDescriptor( + poolingDesc: *mut cudnnPoolingDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnFindRNNBackwardDataAlgorithmEx( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - seqLength: ::libc::c_int, - yDesc: *const cudnnTensorDescriptor_t, - y: *const ::libc::c_void, - dyDesc: *const cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - dhyDesc: cudnnTensorDescriptor_t, - dhy: *const ::libc::c_void, - dcyDesc: cudnnTensorDescriptor_t, - dcy: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - cxDesc: cudnnTensorDescriptor_t, - cx: *const ::libc::c_void, - dxDesc: *const cudnnTensorDescriptor_t, - dx: *mut ::libc::c_void, - dhxDesc: cudnnTensorDescriptor_t, - dhx: *mut ::libc::c_void, - dcxDesc: cudnnTensorDescriptor_t, - dcx: *mut ::libc::c_void, - findIntensity: f32, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnAlgorithmPerformance_t, - workspace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, + pub fn cudnnSetPooling2dDescriptor( + poolingDesc: cudnnPoolingDescriptor_t, + mode: cudnnPoolingMode_t, + maxpoolingNanOpt: cudnnNanPropagation_t, + windowHeight: ::libc::c_int, + windowWidth: ::libc::c_int, + verticalPadding: ::libc::c_int, + horizontalPadding: ::libc::c_int, + verticalStride: ::libc::c_int, + horizontalStride: ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetRNNBackwardWeightsAlgorithmMaxCount( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - count: *mut ::libc::c_int, + pub fn cudnnGetPooling2dDescriptor( + poolingDesc: cudnnPoolingDescriptor_t, + mode: *mut cudnnPoolingMode_t, + maxpoolingNanOpt: *mut cudnnNanPropagation_t, + windowHeight: *mut ::libc::c_int, + windowWidth: *mut ::libc::c_int, + verticalPadding: *mut ::libc::c_int, + horizontalPadding: *mut ::libc::c_int, + verticalStride: *mut ::libc::c_int, + horizontalStride: *mut ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnFindRNNBackwardWeightsAlgorithmEx( - handle: cudnnHandle_t, - rnnDesc: cudnnRNNDescriptor_t, - seqLength: ::libc::c_int, - xDesc: *const cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - hxDesc: cudnnTensorDescriptor_t, - hx: *const ::libc::c_void, - yDesc: *const cudnnTensorDescriptor_t, - y: *const ::libc::c_void, - findIntensity: f32, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnAlgorithmPerformance_t, - workspace: *const ::libc::c_void, - workSpaceSizeInBytes: usize, - dwDesc: cudnnFilterDescriptor_t, - dw: *mut ::libc::c_void, - reserveSpace: *const ::libc::c_void, - reserveSpaceSizeInBytes: usize, + pub fn cudnnSetPoolingNdDescriptor( + poolingDesc: cudnnPoolingDescriptor_t, + mode: cudnnPoolingMode_t, + maxpoolingNanOpt: cudnnNanPropagation_t, + nbDims: ::libc::c_int, + windowDimA: *const ::libc::c_int, + paddingA: *const ::libc::c_int, + strideA: *const ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnMultiHeadAttnBackwardData( - handle: cudnnHandle_t, - attnDesc: cudnnAttnDescriptor_t, - loWinIdx: *const ::libc::c_int, - hiWinIdx: *const ::libc::c_int, - devSeqLengthsDQDO: *const ::libc::c_int, - devSeqLengthsDKDV: *const ::libc::c_int, - doDesc: cudnnSeqDataDescriptor_t, - dout: *const ::libc::c_void, - dqDesc: cudnnSeqDataDescriptor_t, - dqueries: *mut ::libc::c_void, - queries: *const ::libc::c_void, - dkDesc: cudnnSeqDataDescriptor_t, - dkeys: *mut ::libc::c_void, - keys: *const ::libc::c_void, - dvDesc: cudnnSeqDataDescriptor_t, - dvalues: *mut ::libc::c_void, - values: *const ::libc::c_void, - weightSizeInBytes: usize, - weights: *const ::libc::c_void, - workSpaceSizeInBytes: usize, - workSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, + pub fn cudnnGetPoolingNdDescriptor( + poolingDesc: cudnnPoolingDescriptor_t, + nbDimsRequested: ::libc::c_int, + mode: *mut cudnnPoolingMode_t, + maxpoolingNanOpt: *mut cudnnNanPropagation_t, + nbDims: *mut ::libc::c_int, + windowDimA: *mut ::libc::c_int, + paddingA: *mut ::libc::c_int, + strideA: *mut ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnMultiHeadAttnBackwardWeights( - handle: cudnnHandle_t, - attnDesc: cudnnAttnDescriptor_t, - addGrad: cudnnWgradMode_t, - qDesc: cudnnSeqDataDescriptor_t, - queries: *const ::libc::c_void, - kDesc: cudnnSeqDataDescriptor_t, - keys: *const ::libc::c_void, - vDesc: cudnnSeqDataDescriptor_t, - values: *const ::libc::c_void, - doDesc: cudnnSeqDataDescriptor_t, - dout: *const ::libc::c_void, - weightSizeInBytes: usize, - weights: *const ::libc::c_void, - dweights: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - workSpace: *mut ::libc::c_void, - reserveSpaceSizeInBytes: usize, - reserveSpace: *mut ::libc::c_void, + pub fn cudnnGetPoolingNdForwardOutputDim( + poolingDesc: cudnnPoolingDescriptor_t, + inputTensorDesc: cudnnTensorDescriptor_t, + nbDims: ::libc::c_int, + outputTensorDimA: *mut ::libc::c_int, ) -> cudnnStatus_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnLossNormalizationMode_t { - CUDNN_LOSS_NORMALIZATION_NONE = 0, - CUDNN_LOSS_NORMALIZATION_SOFTMAX = 1, +extern "C" { + pub fn cudnnGetPooling2dForwardOutputDim( + poolingDesc: cudnnPoolingDescriptor_t, + inputTensorDesc: cudnnTensorDescriptor_t, + n: *mut ::libc::c_int, + c: *mut ::libc::c_int, + h: *mut ::libc::c_int, + w: *mut ::libc::c_int, + ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnCreateCTCLossDescriptor( - ctcLossDesc: *mut cudnnCTCLossDescriptor_t, + pub fn cudnnDestroyPoolingDescriptor( + poolingDesc: cudnnPoolingDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetCTCLossDescriptor( - ctcLossDesc: cudnnCTCLossDescriptor_t, - compType: cudnnDataType_t, + pub fn cudnnPoolingForward( + handle: cudnnHandle_t, + poolingDesc: cudnnPoolingDescriptor_t, + alpha: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + beta: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetCTCLossDescriptorEx( - ctcLossDesc: cudnnCTCLossDescriptor_t, - compType: cudnnDataType_t, - normMode: cudnnLossNormalizationMode_t, - gradMode: cudnnNanPropagation_t, + pub fn cudnnCreateActivationDescriptor( + activationDesc: *mut cudnnActivationDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetCTCLossDescriptor_v8( - ctcLossDesc: cudnnCTCLossDescriptor_t, - compType: cudnnDataType_t, - normMode: cudnnLossNormalizationMode_t, - gradMode: cudnnNanPropagation_t, - maxLabelLength: ::libc::c_int, + pub fn cudnnSetActivationDescriptor( + activationDesc: cudnnActivationDescriptor_t, + mode: cudnnActivationMode_t, + reluNanOpt: cudnnNanPropagation_t, + coef: f64, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetCTCLossDescriptor( - ctcLossDesc: cudnnCTCLossDescriptor_t, - compType: *mut cudnnDataType_t, + pub fn cudnnGetActivationDescriptor( + activationDesc: cudnnActivationDescriptor_t, + mode: *mut cudnnActivationMode_t, + reluNanOpt: *mut cudnnNanPropagation_t, + coef: *mut f64, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetCTCLossDescriptorEx( - ctcLossDesc: cudnnCTCLossDescriptor_t, - compType: *mut cudnnDataType_t, - normMode: *mut cudnnLossNormalizationMode_t, - gradMode: *mut cudnnNanPropagation_t, + pub fn cudnnSetActivationDescriptorSwishBeta( + activationDesc: cudnnActivationDescriptor_t, + swish_beta: f64, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetCTCLossDescriptor_v8( - ctcLossDesc: cudnnCTCLossDescriptor_t, - compType: *mut cudnnDataType_t, - normMode: *mut cudnnLossNormalizationMode_t, - gradMode: *mut cudnnNanPropagation_t, - maxLabelLength: *mut ::libc::c_int, + pub fn cudnnGetActivationDescriptorSwishBeta( + activationDesc: cudnnActivationDescriptor_t, + swish_beta: *mut f64, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnDestroyCTCLossDescriptor(ctcLossDesc: cudnnCTCLossDescriptor_t) -> cudnnStatus_t; + pub fn cudnnDestroyActivationDescriptor( + activationDesc: cudnnActivationDescriptor_t, + ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnCTCLoss( + pub fn cudnnActivationForward( handle: cudnnHandle_t, - probsDesc: cudnnTensorDescriptor_t, - probs: *const ::libc::c_void, - hostLabels: *const ::libc::c_int, - hostLabelLengths: *const ::libc::c_int, - hostInputLengths: *const ::libc::c_int, - costs: *mut ::libc::c_void, - gradientsDesc: cudnnTensorDescriptor_t, - gradients: *mut ::libc::c_void, - algo: cudnnCTCLossAlgo_t, - ctcLossDesc: cudnnCTCLossDescriptor_t, - workspace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, + activationDesc: cudnnActivationDescriptor_t, + alpha: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + beta: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnCTCLoss_v8( - handle: cudnnHandle_t, - algo: cudnnCTCLossAlgo_t, - ctcLossDesc: cudnnCTCLossDescriptor_t, - probsDesc: cudnnTensorDescriptor_t, - probs: *const ::libc::c_void, - labels: *const ::libc::c_int, - labelLengths: *const ::libc::c_int, - inputLengths: *const ::libc::c_int, - costs: *mut ::libc::c_void, - gradientsDesc: cudnnTensorDescriptor_t, - gradients: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - workspace: *mut ::libc::c_void, + pub fn cudnnCreateLRNDescriptor( + normDesc: *mut cudnnLRNDescriptor_t, ) -> cudnnStatus_t; } +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnLRNMode_t { + CUDNN_LRN_CROSS_CHANNEL_DIM1 = 0, +} extern "C" { - pub fn cudnnGetCTCLossWorkspaceSize( - handle: cudnnHandle_t, - probsDesc: cudnnTensorDescriptor_t, - gradientsDesc: cudnnTensorDescriptor_t, - labels: *const ::libc::c_int, - labelLengths: *const ::libc::c_int, - inputLengths: *const ::libc::c_int, - algo: cudnnCTCLossAlgo_t, - ctcLossDesc: cudnnCTCLossDescriptor_t, - sizeInBytes: *mut usize, + pub fn cudnnSetLRNDescriptor( + normDesc: cudnnLRNDescriptor_t, + lrnN: ::libc::c_uint, + lrnAlpha: f64, + lrnBeta: f64, + lrnK: f64, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetCTCLossWorkspaceSize_v8( - handle: cudnnHandle_t, - algo: cudnnCTCLossAlgo_t, - ctcLossDesc: cudnnCTCLossDescriptor_t, - probsDesc: cudnnTensorDescriptor_t, - gradientsDesc: cudnnTensorDescriptor_t, - sizeInBytes: *mut usize, + pub fn cudnnGetLRNDescriptor( + normDesc: cudnnLRNDescriptor_t, + lrnN: *mut ::libc::c_uint, + lrnAlpha: *mut f64, + lrnBeta: *mut f64, + lrnK: *mut f64, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnAdvTrainVersionCheck() -> cudnnStatus_t; + pub fn cudnnDestroyLRNDescriptor(lrnDesc: cudnnLRNDescriptor_t) -> cudnnStatus_t; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnConvolutionStruct { - _unused: [u8; 0], +extern "C" { + pub fn cudnnLRNCrossChannelForward( + handle: cudnnHandle_t, + normDesc: cudnnLRNDescriptor_t, + lrnMode: cudnnLRNMode_t, + alpha: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + beta: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, + ) -> cudnnStatus_t; } -pub type cudnnConvolutionDescriptor_t = *mut cudnnConvolutionStruct; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnConvolutionMode_t { - CUDNN_CONVOLUTION = 0, - CUDNN_CROSS_CORRELATION = 1, +pub enum cudnnDivNormMode_t { + CUDNN_DIVNORM_PRECOMPUTED_MEANS = 0, +} +extern "C" { + pub fn cudnnDivisiveNormalizationForward( + handle: cudnnHandle_t, + normDesc: cudnnLRNDescriptor_t, + mode: cudnnDivNormMode_t, + alpha: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + means: *const ::libc::c_void, + temp: *mut ::libc::c_void, + temp2: *mut ::libc::c_void, + beta: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, + ) -> cudnnStatus_t; } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnReorderType_t { - CUDNN_DEFAULT_REORDER = 0, - CUDNN_NO_REORDER = 1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnConvolutionFwdAlgoPerfStruct { - pub algo: cudnnConvolutionFwdAlgo_t, - pub status: cudnnStatus_t, - pub time: f32, - pub memory: usize, - pub determinism: cudnnDeterminism_t, - pub mathType: cudnnMathType_t, - pub reserved: [::libc::c_int; 3usize], -} -#[test] -fn bindgen_test_layout_cudnnConvolutionFwdAlgoPerfStruct() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(cudnnConvolutionFwdAlgoPerfStruct)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct) - ) - ); - fn test_field_algo() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).algo) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(algo) - ) - ); - } - test_field_algo(); - fn test_field_status() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(status) - ) - ); - } - test_field_status(); - fn test_field_time() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(time) - ) - ); - } - test_field_time(); - fn test_field_memory() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(memory) - ) - ); - } - test_field_memory(); - fn test_field_determinism() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).determinism) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(determinism) - ) - ); - } - test_field_determinism(); - fn test_field_mathType() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mathType) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(mathType) - ) - ); - } - test_field_mathType(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionFwdAlgoPerfStruct), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); +pub enum cudnnBatchNormMode_t { + CUDNN_BATCHNORM_PER_ACTIVATION = 0, + CUDNN_BATCHNORM_SPATIAL = 1, + CUDNN_BATCHNORM_SPATIAL_PERSISTENT = 2, } -pub type cudnnConvolutionFwdAlgoPerf_t = cudnnConvolutionFwdAlgoPerfStruct; extern "C" { - pub fn cudnnCreateConvolutionDescriptor( - convDesc: *mut cudnnConvolutionDescriptor_t, + pub fn cudnnDeriveBNTensorDescriptor( + derivedBnDesc: cudnnTensorDescriptor_t, + xDesc: cudnnTensorDescriptor_t, + mode: cudnnBatchNormMode_t, ) -> cudnnStatus_t; } +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnBatchNormOps_t { + CUDNN_BATCHNORM_OPS_BN = 0, + CUDNN_BATCHNORM_OPS_BN_ACTIVATION = 1, + CUDNN_BATCHNORM_OPS_BN_ADD_ACTIVATION = 2, +} extern "C" { - pub fn cudnnDestroyConvolutionDescriptor( - convDesc: cudnnConvolutionDescriptor_t, + pub fn cudnnBatchNormalizationForwardInference( + handle: cudnnHandle_t, + mode: cudnnBatchNormMode_t, + alpha: *const ::libc::c_void, + beta: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, + bnScaleBiasMeanVarDesc: cudnnTensorDescriptor_t, + bnScale: *const ::libc::c_void, + bnBias: *const ::libc::c_void, + estimatedMean: *const ::libc::c_void, + estimatedVariance: *const ::libc::c_void, + epsilon: f64, ) -> cudnnStatus_t; } +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnNormMode_t { + CUDNN_NORM_PER_ACTIVATION = 0, + CUDNN_NORM_PER_CHANNEL = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnNormAlgo_t { + CUDNN_NORM_ALGO_STANDARD = 0, + CUDNN_NORM_ALGO_PERSIST = 1, +} extern "C" { - pub fn cudnnSetConvolutionMathType( - convDesc: cudnnConvolutionDescriptor_t, - mathType: cudnnMathType_t, + pub fn cudnnDeriveNormTensorDescriptor( + derivedNormScaleBiasDesc: cudnnTensorDescriptor_t, + derivedNormMeanVarDesc: cudnnTensorDescriptor_t, + xDesc: cudnnTensorDescriptor_t, + mode: cudnnNormMode_t, + groupCnt: ::libc::c_int, ) -> cudnnStatus_t; } +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnNormOps_t { + CUDNN_NORM_OPS_NORM = 0, + CUDNN_NORM_OPS_NORM_ACTIVATION = 1, + CUDNN_NORM_OPS_NORM_ADD_ACTIVATION = 2, +} extern "C" { - pub fn cudnnGetConvolutionMathType( - convDesc: cudnnConvolutionDescriptor_t, - mathType: *mut cudnnMathType_t, + pub fn cudnnNormalizationForwardInference( + handle: cudnnHandle_t, + mode: cudnnNormMode_t, + normOps: cudnnNormOps_t, + algo: cudnnNormAlgo_t, + alpha: *const ::libc::c_void, + beta: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + normScaleBiasDesc: cudnnTensorDescriptor_t, + normScale: *const ::libc::c_void, + normBias: *const ::libc::c_void, + normMeanVarDesc: cudnnTensorDescriptor_t, + estimatedMean: *const ::libc::c_void, + estimatedVariance: *const ::libc::c_void, + zDesc: cudnnTensorDescriptor_t, + z: *const ::libc::c_void, + activationDesc: cudnnActivationDescriptor_t, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, + epsilon: f64, + groupCnt: ::libc::c_int, ) -> cudnnStatus_t; } +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnSamplerType_t { + CUDNN_SAMPLER_BILINEAR = 0, +} extern "C" { - pub fn cudnnSetConvolutionGroupCount( - convDesc: cudnnConvolutionDescriptor_t, - groupCount: ::libc::c_int, + pub fn cudnnCreateSpatialTransformerDescriptor( + stDesc: *mut cudnnSpatialTransformerDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolutionGroupCount( - convDesc: cudnnConvolutionDescriptor_t, - groupCount: *mut ::libc::c_int, + pub fn cudnnSetSpatialTransformerNdDescriptor( + stDesc: cudnnSpatialTransformerDescriptor_t, + samplerType: cudnnSamplerType_t, + dataType: cudnnDataType_t, + nbDims: ::libc::c_int, + dimA: *const ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetConvolutionReorderType( - convDesc: cudnnConvolutionDescriptor_t, - reorderType: cudnnReorderType_t, + pub fn cudnnDestroySpatialTransformerDescriptor( + stDesc: cudnnSpatialTransformerDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolutionReorderType( - convDesc: cudnnConvolutionDescriptor_t, - reorderType: *mut cudnnReorderType_t, + pub fn cudnnSpatialTfGridGeneratorForward( + handle: cudnnHandle_t, + stDesc: cudnnSpatialTransformerDescriptor_t, + theta: *const ::libc::c_void, + grid: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetConvolution2dDescriptor( - convDesc: cudnnConvolutionDescriptor_t, - pad_h: ::libc::c_int, - pad_w: ::libc::c_int, - u: ::libc::c_int, - v: ::libc::c_int, - dilation_h: ::libc::c_int, - dilation_w: ::libc::c_int, - mode: cudnnConvolutionMode_t, - computeType: cudnnDataType_t, + pub fn cudnnSpatialTfSamplerForward( + handle: cudnnHandle_t, + stDesc: cudnnSpatialTransformerDescriptor_t, + alpha: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + grid: *const ::libc::c_void, + beta: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, ) -> cudnnStatus_t; } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnDropoutStruct { + _unused: [u8; 0], +} +pub type cudnnDropoutDescriptor_t = *mut cudnnDropoutStruct; extern "C" { - pub fn cudnnGetConvolution2dDescriptor( - convDesc: cudnnConvolutionDescriptor_t, - pad_h: *mut ::libc::c_int, - pad_w: *mut ::libc::c_int, - u: *mut ::libc::c_int, - v: *mut ::libc::c_int, - dilation_h: *mut ::libc::c_int, - dilation_w: *mut ::libc::c_int, - mode: *mut cudnnConvolutionMode_t, - computeType: *mut cudnnDataType_t, + pub fn cudnnCreateDropoutDescriptor( + dropoutDesc: *mut cudnnDropoutDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetConvolutionNdDescriptor( - convDesc: cudnnConvolutionDescriptor_t, - arrayLength: ::libc::c_int, - padA: *const ::libc::c_int, - filterStrideA: *const ::libc::c_int, - dilationA: *const ::libc::c_int, - mode: cudnnConvolutionMode_t, - computeType: cudnnDataType_t, + pub fn cudnnDestroyDropoutDescriptor( + dropoutDesc: cudnnDropoutDescriptor_t, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolutionNdDescriptor( - convDesc: cudnnConvolutionDescriptor_t, - arrayLengthRequested: ::libc::c_int, - arrayLength: *mut ::libc::c_int, - padA: *mut ::libc::c_int, - strideA: *mut ::libc::c_int, - dilationA: *mut ::libc::c_int, - mode: *mut cudnnConvolutionMode_t, - computeType: *mut cudnnDataType_t, + pub fn cudnnDropoutGetStatesSize( + handle: cudnnHandle_t, + sizeInBytes: *mut usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolution2dForwardOutputDim( - convDesc: cudnnConvolutionDescriptor_t, - inputTensorDesc: cudnnTensorDescriptor_t, - filterDesc: cudnnFilterDescriptor_t, - n: *mut ::libc::c_int, - c: *mut ::libc::c_int, - h: *mut ::libc::c_int, - w: *mut ::libc::c_int, + pub fn cudnnDropoutGetReserveSpaceSize( + xdesc: cudnnTensorDescriptor_t, + sizeInBytes: *mut usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolutionNdForwardOutputDim( - convDesc: cudnnConvolutionDescriptor_t, - inputTensorDesc: cudnnTensorDescriptor_t, - filterDesc: cudnnFilterDescriptor_t, - nbDims: ::libc::c_int, - tensorOuputDimA: *mut ::libc::c_int, + pub fn cudnnSetDropoutDescriptor( + dropoutDesc: cudnnDropoutDescriptor_t, + handle: cudnnHandle_t, + dropout: f32, + states: *mut ::libc::c_void, + stateSizeInBytes: usize, + seed: ::libc::c_ulonglong, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolutionForwardAlgorithmMaxCount( + pub fn cudnnRestoreDropoutDescriptor( + dropoutDesc: cudnnDropoutDescriptor_t, handle: cudnnHandle_t, - count: *mut ::libc::c_int, + dropout: f32, + states: *mut ::libc::c_void, + stateSizeInBytes: usize, + seed: ::libc::c_ulonglong, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolutionForwardAlgorithm_v7( + pub fn cudnnGetDropoutDescriptor( + dropoutDesc: cudnnDropoutDescriptor_t, handle: cudnnHandle_t, - srcDesc: cudnnTensorDescriptor_t, - filterDesc: cudnnFilterDescriptor_t, - convDesc: cudnnConvolutionDescriptor_t, - destDesc: cudnnTensorDescriptor_t, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnConvolutionFwdAlgoPerf_t, + dropout: *mut f32, + states: *mut *mut ::libc::c_void, + seed: *mut ::libc::c_ulonglong, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnFindConvolutionForwardAlgorithm( + pub fn cudnnDropoutForward( handle: cudnnHandle_t, - xDesc: cudnnTensorDescriptor_t, - wDesc: cudnnFilterDescriptor_t, - convDesc: cudnnConvolutionDescriptor_t, - yDesc: cudnnTensorDescriptor_t, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnConvolutionFwdAlgoPerf_t, - ) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnFindConvolutionForwardAlgorithmEx( - handle: cudnnHandle_t, - xDesc: cudnnTensorDescriptor_t, + dropoutDesc: cudnnDropoutDescriptor_t, + xdesc: cudnnTensorDescriptor_t, x: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - convDesc: cudnnConvolutionDescriptor_t, - yDesc: cudnnTensorDescriptor_t, + ydesc: cudnnTensorDescriptor_t, y: *mut ::libc::c_void, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnConvolutionFwdAlgoPerf_t, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, + reserveSpace: *mut ::libc::c_void, + reserveSpaceSizeInBytes: usize, ) -> cudnnStatus_t; } -extern "C" { - pub fn cudnnIm2Col( - handle: cudnnHandle_t, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - convDesc: cudnnConvolutionDescriptor_t, - colBuffer: *mut ::libc::c_void, - ) -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnConvolutionFwdAlgo_t { + CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_GEMM = 0, + CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM = 1, + CUDNN_CONVOLUTION_FWD_ALGO_GEMM = 2, + CUDNN_CONVOLUTION_FWD_ALGO_DIRECT = 3, + CUDNN_CONVOLUTION_FWD_ALGO_FFT = 4, + CUDNN_CONVOLUTION_FWD_ALGO_FFT_TILING = 5, + CUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD = 6, + CUDNN_CONVOLUTION_FWD_ALGO_WINOGRAD_NONFUSED = 7, + CUDNN_CONVOLUTION_FWD_ALGO_COUNT = 8, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnConvolutionBwdFilterAlgo_t { + CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0 = 0, + CUDNN_CONVOLUTION_BWD_FILTER_ALGO_1 = 1, + CUDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT = 2, + CUDNN_CONVOLUTION_BWD_FILTER_ALGO_3 = 3, + CUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD = 4, + CUDNN_CONVOLUTION_BWD_FILTER_ALGO_WINOGRAD_NONFUSED = 5, + CUDNN_CONVOLUTION_BWD_FILTER_ALGO_FFT_TILING = 6, + CUDNN_CONVOLUTION_BWD_FILTER_ALGO_COUNT = 7, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnConvolutionBwdDataAlgo_t { + CUDNN_CONVOLUTION_BWD_DATA_ALGO_0 = 0, + CUDNN_CONVOLUTION_BWD_DATA_ALGO_1 = 1, + CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT = 2, + CUDNN_CONVOLUTION_BWD_DATA_ALGO_FFT_TILING = 3, + CUDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD = 4, + CUDNN_CONVOLUTION_BWD_DATA_ALGO_WINOGRAD_NONFUSED = 5, + CUDNN_CONVOLUTION_BWD_DATA_ALGO_COUNT = 6, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnCTCLossAlgo_t { + CUDNN_CTC_LOSS_ALGO_DETERMINISTIC = 0, + CUDNN_CTC_LOSS_ALGO_NON_DETERMINISTIC = 1, } extern "C" { - pub fn cudnnReorderFilterAndBias( - handle: cudnnHandle_t, - filterDesc: cudnnFilterDescriptor_t, - reorderType: cudnnReorderType_t, - filterData: *const ::libc::c_void, - reorderedFilterData: *mut ::libc::c_void, - reorderBias: ::libc::c_int, - biasData: *const ::libc::c_void, - reorderedBiasData: *mut ::libc::c_void, - ) -> cudnnStatus_t; + pub fn cudnnOpsVersionCheck() -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolutionForwardWorkspaceSize( + pub fn cudnnSoftmaxBackward( handle: cudnnHandle_t, - xDesc: cudnnTensorDescriptor_t, - wDesc: cudnnFilterDescriptor_t, - convDesc: cudnnConvolutionDescriptor_t, + algo: cudnnSoftmaxAlgorithm_t, + mode: cudnnSoftmaxMode_t, + alpha: *const ::libc::c_void, yDesc: cudnnTensorDescriptor_t, - algo: cudnnConvolutionFwdAlgo_t, - sizeInBytes: *mut usize, + y: *const ::libc::c_void, + dyDesc: cudnnTensorDescriptor_t, + dy: *const ::libc::c_void, + beta: *const ::libc::c_void, + dxDesc: cudnnTensorDescriptor_t, + dx: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnConvolutionForward( + pub fn cudnnPoolingBackward( handle: cudnnHandle_t, + poolingDesc: cudnnPoolingDescriptor_t, alpha: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + y: *const ::libc::c_void, + dyDesc: cudnnTensorDescriptor_t, + dy: *const ::libc::c_void, xDesc: cudnnTensorDescriptor_t, x: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - convDesc: cudnnConvolutionDescriptor_t, - algo: cudnnConvolutionFwdAlgo_t, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, beta: *const ::libc::c_void, - yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, + dxDesc: cudnnTensorDescriptor_t, + dx: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnConvolutionBiasActivationForward( + pub fn cudnnActivationBackward( handle: cudnnHandle_t, - alpha1: *const ::libc::c_void, - xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - convDesc: cudnnConvolutionDescriptor_t, - algo: cudnnConvolutionFwdAlgo_t, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - alpha2: *const ::libc::c_void, - zDesc: cudnnTensorDescriptor_t, - z: *const ::libc::c_void, - biasDesc: cudnnTensorDescriptor_t, - bias: *const ::libc::c_void, activationDesc: cudnnActivationDescriptor_t, + alpha: *const ::libc::c_void, yDesc: cudnnTensorDescriptor_t, - y: *mut ::libc::c_void, - ) -> cudnnStatus_t; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnConvolutionBwdDataAlgoPerfStruct { - pub algo: cudnnConvolutionBwdDataAlgo_t, - pub status: cudnnStatus_t, - pub time: f32, - pub memory: usize, - pub determinism: cudnnDeterminism_t, - pub mathType: cudnnMathType_t, - pub reserved: [::libc::c_int; 3usize], -} -#[test] -fn bindgen_test_layout_cudnnConvolutionBwdDataAlgoPerfStruct() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!( - "Size of: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct) - ) - ); - fn test_field_algo() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).algo) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(algo) - ) - ); - } - test_field_algo(); - fn test_field_status() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(status) - ) - ); - } - test_field_status(); - fn test_field_time() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(time) - ) - ); - } - test_field_time(); - fn test_field_memory() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(memory) - ) - ); - } - test_field_memory(); - fn test_field_determinism() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).determinism) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(determinism) - ) - ); - } - test_field_determinism(); - fn test_field_mathType() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mathType) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(mathType) - ) - ); - } - test_field_mathType(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -pub type cudnnConvolutionBwdDataAlgoPerf_t = cudnnConvolutionBwdDataAlgoPerfStruct; -extern "C" { - pub fn cudnnGetConvolutionBackwardDataAlgorithmMaxCount( - handle: cudnnHandle_t, - count: *mut ::libc::c_int, + y: *const ::libc::c_void, + dyDesc: cudnnTensorDescriptor_t, + dy: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + beta: *const ::libc::c_void, + dxDesc: cudnnTensorDescriptor_t, + dx: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnFindConvolutionBackwardDataAlgorithm( + pub fn cudnnLRNCrossChannelBackward( handle: cudnnHandle_t, - wDesc: cudnnFilterDescriptor_t, + normDesc: cudnnLRNDescriptor_t, + lrnMode: cudnnLRNMode_t, + alpha: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + y: *const ::libc::c_void, dyDesc: cudnnTensorDescriptor_t, - convDesc: cudnnConvolutionDescriptor_t, + dy: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + beta: *const ::libc::c_void, dxDesc: cudnnTensorDescriptor_t, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnConvolutionBwdDataAlgoPerf_t, + dx: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnFindConvolutionBackwardDataAlgorithmEx( + pub fn cudnnDivisiveNormalizationBackward( handle: cudnnHandle_t, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - dyDesc: cudnnTensorDescriptor_t, + normDesc: cudnnLRNDescriptor_t, + mode: cudnnDivNormMode_t, + alpha: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + means: *const ::libc::c_void, dy: *const ::libc::c_void, - convDesc: cudnnConvolutionDescriptor_t, - dxDesc: cudnnTensorDescriptor_t, + temp: *mut ::libc::c_void, + temp2: *mut ::libc::c_void, + beta: *const ::libc::c_void, + dXdMeansDesc: cudnnTensorDescriptor_t, dx: *mut ::libc::c_void, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnConvolutionBwdDataAlgoPerf_t, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, + dMeans: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolutionBackwardDataAlgorithm_v7( + pub fn cudnnGetBatchNormalizationForwardTrainingExWorkspaceSize( handle: cudnnHandle_t, - filterDesc: cudnnFilterDescriptor_t, - diffDesc: cudnnTensorDescriptor_t, - convDesc: cudnnConvolutionDescriptor_t, - gradDesc: cudnnTensorDescriptor_t, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnConvolutionBwdDataAlgoPerf_t, + mode: cudnnBatchNormMode_t, + bnOps: cudnnBatchNormOps_t, + xDesc: cudnnTensorDescriptor_t, + zDesc: cudnnTensorDescriptor_t, + yDesc: cudnnTensorDescriptor_t, + bnScaleBiasMeanVarDesc: cudnnTensorDescriptor_t, + activationDesc: cudnnActivationDescriptor_t, + sizeInBytes: *mut usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolutionBackwardDataWorkspaceSize( + pub fn cudnnGetBatchNormalizationBackwardExWorkspaceSize( handle: cudnnHandle_t, - wDesc: cudnnFilterDescriptor_t, + mode: cudnnBatchNormMode_t, + bnOps: cudnnBatchNormOps_t, + xDesc: cudnnTensorDescriptor_t, + yDesc: cudnnTensorDescriptor_t, dyDesc: cudnnTensorDescriptor_t, - convDesc: cudnnConvolutionDescriptor_t, + dzDesc: cudnnTensorDescriptor_t, dxDesc: cudnnTensorDescriptor_t, - algo: cudnnConvolutionBwdDataAlgo_t, + dBnScaleBiasDesc: cudnnTensorDescriptor_t, + activationDesc: cudnnActivationDescriptor_t, sizeInBytes: *mut usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnConvolutionBackwardData( + pub fn cudnnGetBatchNormalizationTrainingExReserveSpaceSize( handle: cudnnHandle_t, - alpha: *const ::libc::c_void, - wDesc: cudnnFilterDescriptor_t, - w: *const ::libc::c_void, - dyDesc: cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - convDesc: cudnnConvolutionDescriptor_t, - algo: cudnnConvolutionBwdDataAlgo_t, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - beta: *const ::libc::c_void, - dxDesc: cudnnTensorDescriptor_t, - dx: *mut ::libc::c_void, - ) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnGetFoldedConvBackwardDataDescriptors( - handle: cudnnHandle_t, - filterDesc: cudnnFilterDescriptor_t, - diffDesc: cudnnTensorDescriptor_t, - convDesc: cudnnConvolutionDescriptor_t, - gradDesc: cudnnTensorDescriptor_t, - transformFormat: cudnnTensorFormat_t, - foldedFilterDesc: cudnnFilterDescriptor_t, - paddedDiffDesc: cudnnTensorDescriptor_t, - foldedConvDesc: cudnnConvolutionDescriptor_t, - foldedGradDesc: cudnnTensorDescriptor_t, - filterFoldTransDesc: cudnnTensorTransformDescriptor_t, - diffPadTransDesc: cudnnTensorTransformDescriptor_t, - gradFoldTransDesc: cudnnTensorTransformDescriptor_t, - gradUnfoldTransDesc: cudnnTensorTransformDescriptor_t, + mode: cudnnBatchNormMode_t, + bnOps: cudnnBatchNormOps_t, + activationDesc: cudnnActivationDescriptor_t, + xDesc: cudnnTensorDescriptor_t, + sizeInBytes: *mut usize, ) -> cudnnStatus_t; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnFusedOpsConstParamStruct { - _unused: [u8; 0], -} -pub type cudnnFusedOpsConstParamPack_t = *mut cudnnFusedOpsConstParamStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnFusedOpsVariantParamStruct { - _unused: [u8; 0], -} -pub type cudnnFusedOpsVariantParamPack_t = *mut cudnnFusedOpsVariantParamStruct; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnFusedOpsPlanStruct { - _unused: [u8; 0], -} -pub type cudnnFusedOpsPlan_t = *mut cudnnFusedOpsPlanStruct; -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnFusedOps_t { - CUDNN_FUSED_SCALE_BIAS_ACTIVATION_CONV_BNSTATS = 0, - CUDNN_FUSED_SCALE_BIAS_ACTIVATION_WGRAD = 1, - CUDNN_FUSED_BN_FINALIZE_STATISTICS_TRAINING = 2, - CUDNN_FUSED_BN_FINALIZE_STATISTICS_INFERENCE = 3, - CUDNN_FUSED_CONV_SCALE_BIAS_ADD_ACTIVATION = 4, - CUDNN_FUSED_SCALE_BIAS_ADD_ACTIVATION_GEN_BITMASK = 5, - CUDNN_FUSED_DACTIVATION_FORK_DBATCHNORM = 6, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnFusedOpsConstParamLabel_t { - CUDNN_PARAM_XDESC = 0, - CUDNN_PARAM_XDATA_PLACEHOLDER = 1, - CUDNN_PARAM_BN_MODE = 2, - CUDNN_PARAM_BN_EQSCALEBIAS_DESC = 3, - CUDNN_PARAM_BN_EQSCALE_PLACEHOLDER = 4, - CUDNN_PARAM_BN_EQBIAS_PLACEHOLDER = 5, - CUDNN_PARAM_ACTIVATION_DESC = 6, - CUDNN_PARAM_CONV_DESC = 7, - CUDNN_PARAM_WDESC = 8, - CUDNN_PARAM_WDATA_PLACEHOLDER = 9, - CUDNN_PARAM_DWDESC = 10, - CUDNN_PARAM_DWDATA_PLACEHOLDER = 11, - CUDNN_PARAM_YDESC = 12, - CUDNN_PARAM_YDATA_PLACEHOLDER = 13, - CUDNN_PARAM_DYDESC = 14, - CUDNN_PARAM_DYDATA_PLACEHOLDER = 15, - CUDNN_PARAM_YSTATS_DESC = 16, - CUDNN_PARAM_YSUM_PLACEHOLDER = 17, - CUDNN_PARAM_YSQSUM_PLACEHOLDER = 18, - CUDNN_PARAM_BN_SCALEBIAS_MEANVAR_DESC = 19, - CUDNN_PARAM_BN_SCALE_PLACEHOLDER = 20, - CUDNN_PARAM_BN_BIAS_PLACEHOLDER = 21, - CUDNN_PARAM_BN_SAVED_MEAN_PLACEHOLDER = 22, - CUDNN_PARAM_BN_SAVED_INVSTD_PLACEHOLDER = 23, - CUDNN_PARAM_BN_RUNNING_MEAN_PLACEHOLDER = 24, - CUDNN_PARAM_BN_RUNNING_VAR_PLACEHOLDER = 25, - CUDNN_PARAM_ZDESC = 26, - CUDNN_PARAM_ZDATA_PLACEHOLDER = 27, - CUDNN_PARAM_BN_Z_EQSCALEBIAS_DESC = 28, - CUDNN_PARAM_BN_Z_EQSCALE_PLACEHOLDER = 29, - CUDNN_PARAM_BN_Z_EQBIAS_PLACEHOLDER = 30, - CUDNN_PARAM_ACTIVATION_BITMASK_DESC = 31, - CUDNN_PARAM_ACTIVATION_BITMASK_PLACEHOLDER = 32, - CUDNN_PARAM_DXDESC = 33, - CUDNN_PARAM_DXDATA_PLACEHOLDER = 34, - CUDNN_PARAM_DZDESC = 35, - CUDNN_PARAM_DZDATA_PLACEHOLDER = 36, - CUDNN_PARAM_BN_DSCALE_PLACEHOLDER = 37, - CUDNN_PARAM_BN_DBIAS_PLACEHOLDER = 38, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnFusedOpsPointerPlaceHolder_t { - CUDNN_PTR_NULL = 0, - CUDNN_PTR_ELEM_ALIGNED = 1, - CUDNN_PTR_16B_ALIGNED = 2, -} -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnFusedOpsVariantParamLabel_t { - CUDNN_PTR_XDATA = 0, - CUDNN_PTR_BN_EQSCALE = 1, - CUDNN_PTR_BN_EQBIAS = 2, - CUDNN_PTR_WDATA = 3, - CUDNN_PTR_DWDATA = 4, - CUDNN_PTR_YDATA = 5, - CUDNN_PTR_DYDATA = 6, - CUDNN_PTR_YSUM = 7, - CUDNN_PTR_YSQSUM = 8, - CUDNN_PTR_WORKSPACE = 9, - CUDNN_PTR_BN_SCALE = 10, - CUDNN_PTR_BN_BIAS = 11, - CUDNN_PTR_BN_SAVED_MEAN = 12, - CUDNN_PTR_BN_SAVED_INVSTD = 13, - CUDNN_PTR_BN_RUNNING_MEAN = 14, - CUDNN_PTR_BN_RUNNING_VAR = 15, - CUDNN_PTR_ZDATA = 16, - CUDNN_PTR_BN_Z_EQSCALE = 17, - CUDNN_PTR_BN_Z_EQBIAS = 18, - CUDNN_PTR_ACTIVATION_BITMASK = 19, - CUDNN_PTR_DXDATA = 20, - CUDNN_PTR_DZDATA = 21, - CUDNN_PTR_BN_DSCALE = 22, - CUDNN_PTR_BN_DBIAS = 23, - CUDNN_SCALAR_SIZE_T_WORKSPACE_SIZE_IN_BYTES = 100, - CUDNN_SCALAR_INT64_T_BN_ACCUMULATION_COUNT = 101, - CUDNN_SCALAR_DOUBLE_BN_EXP_AVG_FACTOR = 102, - CUDNN_SCALAR_DOUBLE_BN_EPSILON = 103, -} -extern "C" { - pub fn cudnnCnnInferVersionCheck() -> cudnnStatus_t; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cudnnConvolutionBwdFilterAlgoPerfStruct { - pub algo: cudnnConvolutionBwdFilterAlgo_t, - pub status: cudnnStatus_t, - pub time: f32, - pub memory: usize, - pub determinism: cudnnDeterminism_t, - pub mathType: cudnnMathType_t, - pub reserved: [::libc::c_int; 3usize], -} -#[test] -fn bindgen_test_layout_cudnnConvolutionBwdFilterAlgoPerfStruct() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!( - "Size of: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct) - ) - ); - fn test_field_algo() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).algo) as usize - ptr as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(algo) - ) - ); - } - test_field_algo(); - fn test_field_status() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(status) - ) - ); - } - test_field_status(); - fn test_field_time() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(time) - ) - ); - } - test_field_time(); - fn test_field_memory() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(memory) - ) - ); - } - test_field_memory(); - fn test_field_determinism() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).determinism) as usize - ptr as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(determinism) - ) - ); - } - test_field_determinism(); - fn test_field_mathType() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).mathType) as usize - ptr as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(mathType) - ) - ); - } - test_field_mathType(); - fn test_field_reserved() { - assert_eq!( - unsafe { - let uninit = - ::std::mem::MaybeUninit::::uninit(); - let ptr = uninit.as_ptr(); - ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), - "::", - stringify!(reserved) - ) - ); - } - test_field_reserved(); -} -pub type cudnnConvolutionBwdFilterAlgoPerf_t = cudnnConvolutionBwdFilterAlgoPerfStruct; extern "C" { - pub fn cudnnGetConvolutionBackwardFilterAlgorithmMaxCount( + pub fn cudnnBatchNormalizationForwardTraining( handle: cudnnHandle_t, - count: *mut ::libc::c_int, + mode: cudnnBatchNormMode_t, + alpha: *const ::libc::c_void, + beta: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, + bnScaleBiasMeanVarDesc: cudnnTensorDescriptor_t, + bnScale: *const ::libc::c_void, + bnBias: *const ::libc::c_void, + exponentialAverageFactor: f64, + resultRunningMean: *mut ::libc::c_void, + resultRunningVariance: *mut ::libc::c_void, + epsilon: f64, + resultSaveMean: *mut ::libc::c_void, + resultSaveInvVariance: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnFindConvolutionBackwardFilterAlgorithm( + pub fn cudnnBatchNormalizationForwardTrainingEx( handle: cudnnHandle_t, + mode: cudnnBatchNormMode_t, + bnOps: cudnnBatchNormOps_t, + alpha: *const ::libc::c_void, + beta: *const ::libc::c_void, xDesc: cudnnTensorDescriptor_t, - dyDesc: cudnnTensorDescriptor_t, - convDesc: cudnnConvolutionDescriptor_t, - dwDesc: cudnnFilterDescriptor_t, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnConvolutionBwdFilterAlgoPerf_t, + xData: *const ::libc::c_void, + zDesc: cudnnTensorDescriptor_t, + zData: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + yData: *mut ::libc::c_void, + bnScaleBiasMeanVarDesc: cudnnTensorDescriptor_t, + bnScale: *const ::libc::c_void, + bnBias: *const ::libc::c_void, + exponentialAverageFactor: f64, + resultRunningMean: *mut ::libc::c_void, + resultRunningVariance: *mut ::libc::c_void, + epsilon: f64, + resultSaveMean: *mut ::libc::c_void, + resultSaveInvVariance: *mut ::libc::c_void, + activationDesc: cudnnActivationDescriptor_t, + workspace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + reserveSpace: *mut ::libc::c_void, + reserveSpaceSizeInBytes: usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnFindConvolutionBackwardFilterAlgorithmEx( + pub fn cudnnBatchNormalizationBackward( handle: cudnnHandle_t, + mode: cudnnBatchNormMode_t, + alphaDataDiff: *const ::libc::c_void, + betaDataDiff: *const ::libc::c_void, + alphaParamDiff: *const ::libc::c_void, + betaParamDiff: *const ::libc::c_void, xDesc: cudnnTensorDescriptor_t, x: *const ::libc::c_void, dyDesc: cudnnTensorDescriptor_t, - y: *const ::libc::c_void, - convDesc: cudnnConvolutionDescriptor_t, - dwDesc: cudnnFilterDescriptor_t, - dw: *mut ::libc::c_void, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnConvolutionBwdFilterAlgoPerf_t, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, + dy: *const ::libc::c_void, + dxDesc: cudnnTensorDescriptor_t, + dx: *mut ::libc::c_void, + dBnScaleBiasDesc: cudnnTensorDescriptor_t, + bnScale: *const ::libc::c_void, + dBnScaleResult: *mut ::libc::c_void, + dBnBiasResult: *mut ::libc::c_void, + epsilon: f64, + savedMean: *const ::libc::c_void, + savedInvVariance: *const ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolutionBackwardFilterAlgorithm_v7( + pub fn cudnnBatchNormalizationBackwardEx( handle: cudnnHandle_t, - srcDesc: cudnnTensorDescriptor_t, - diffDesc: cudnnTensorDescriptor_t, - convDesc: cudnnConvolutionDescriptor_t, - gradDesc: cudnnFilterDescriptor_t, - requestedAlgoCount: ::libc::c_int, - returnedAlgoCount: *mut ::libc::c_int, - perfResults: *mut cudnnConvolutionBwdFilterAlgoPerf_t, + mode: cudnnBatchNormMode_t, + bnOps: cudnnBatchNormOps_t, + alphaDataDiff: *const ::libc::c_void, + betaDataDiff: *const ::libc::c_void, + alphaParamDiff: *const ::libc::c_void, + betaParamDiff: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + xData: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + yData: *const ::libc::c_void, + dyDesc: cudnnTensorDescriptor_t, + dyData: *const ::libc::c_void, + dzDesc: cudnnTensorDescriptor_t, + dzData: *mut ::libc::c_void, + dxDesc: cudnnTensorDescriptor_t, + dxData: *mut ::libc::c_void, + dBnScaleBiasDesc: cudnnTensorDescriptor_t, + bnScaleData: *const ::libc::c_void, + bnBiasData: *const ::libc::c_void, + dBnScaleData: *mut ::libc::c_void, + dBnBiasData: *mut ::libc::c_void, + epsilon: f64, + savedMean: *const ::libc::c_void, + savedInvVariance: *const ::libc::c_void, + activationDesc: cudnnActivationDescriptor_t, + workSpace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + reserveSpace: *mut ::libc::c_void, + reserveSpaceSizeInBytes: usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetConvolutionBackwardFilterWorkspaceSize( + pub fn cudnnGetNormalizationForwardTrainingWorkspaceSize( handle: cudnnHandle_t, + mode: cudnnNormMode_t, + normOps: cudnnNormOps_t, + algo: cudnnNormAlgo_t, xDesc: cudnnTensorDescriptor_t, - dyDesc: cudnnTensorDescriptor_t, - convDesc: cudnnConvolutionDescriptor_t, - gradDesc: cudnnFilterDescriptor_t, - algo: cudnnConvolutionBwdFilterAlgo_t, + zDesc: cudnnTensorDescriptor_t, + yDesc: cudnnTensorDescriptor_t, + normScaleBiasDesc: cudnnTensorDescriptor_t, + activationDesc: cudnnActivationDescriptor_t, + normMeanVarDesc: cudnnTensorDescriptor_t, sizeInBytes: *mut usize, + groupCnt: ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnConvolutionBackwardFilter( + pub fn cudnnGetNormalizationBackwardWorkspaceSize( handle: cudnnHandle_t, - alpha: *const ::libc::c_void, + mode: cudnnNormMode_t, + normOps: cudnnNormOps_t, + algo: cudnnNormAlgo_t, xDesc: cudnnTensorDescriptor_t, - x: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, dyDesc: cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - convDesc: cudnnConvolutionDescriptor_t, - algo: cudnnConvolutionBwdFilterAlgo_t, - workSpace: *mut ::libc::c_void, - workSpaceSizeInBytes: usize, - beta: *const ::libc::c_void, - dwDesc: cudnnFilterDescriptor_t, - dw: *mut ::libc::c_void, + dzDesc: cudnnTensorDescriptor_t, + dxDesc: cudnnTensorDescriptor_t, + dNormScaleBiasDesc: cudnnTensorDescriptor_t, + activationDesc: cudnnActivationDescriptor_t, + normMeanVarDesc: cudnnTensorDescriptor_t, + sizeInBytes: *mut usize, + groupCnt: ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnConvolutionBackwardBias( + pub fn cudnnGetNormalizationTrainingReserveSpaceSize( handle: cudnnHandle_t, - alpha: *const ::libc::c_void, - dyDesc: cudnnTensorDescriptor_t, - dy: *const ::libc::c_void, - beta: *const ::libc::c_void, - dbDesc: cudnnTensorDescriptor_t, - db: *mut ::libc::c_void, - ) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnCreateFusedOpsConstParamPack( - constPack: *mut cudnnFusedOpsConstParamPack_t, - ops: cudnnFusedOps_t, - ) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnDestroyFusedOpsConstParamPack( - constPack: cudnnFusedOpsConstParamPack_t, - ) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnSetFusedOpsConstParamPackAttribute( - constPack: cudnnFusedOpsConstParamPack_t, - paramLabel: cudnnFusedOpsConstParamLabel_t, - param: *const ::libc::c_void, - ) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnGetFusedOpsConstParamPackAttribute( - constPack: cudnnFusedOpsConstParamPack_t, - paramLabel: cudnnFusedOpsConstParamLabel_t, - param: *mut ::libc::c_void, - isNULL: *mut ::libc::c_int, - ) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnCreateFusedOpsVariantParamPack( - varPack: *mut cudnnFusedOpsVariantParamPack_t, - ops: cudnnFusedOps_t, - ) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnDestroyFusedOpsVariantParamPack( - varPack: cudnnFusedOpsVariantParamPack_t, + mode: cudnnNormMode_t, + normOps: cudnnNormOps_t, + algo: cudnnNormAlgo_t, + activationDesc: cudnnActivationDescriptor_t, + xDesc: cudnnTensorDescriptor_t, + sizeInBytes: *mut usize, + groupCnt: ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnSetFusedOpsVariantParamPackAttribute( - varPack: cudnnFusedOpsVariantParamPack_t, - paramLabel: cudnnFusedOpsVariantParamLabel_t, - ptr: *mut ::libc::c_void, + pub fn cudnnNormalizationForwardTraining( + handle: cudnnHandle_t, + mode: cudnnNormMode_t, + normOps: cudnnNormOps_t, + algo: cudnnNormAlgo_t, + alpha: *const ::libc::c_void, + beta: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + xData: *const ::libc::c_void, + normScaleBiasDesc: cudnnTensorDescriptor_t, + normScale: *const ::libc::c_void, + normBias: *const ::libc::c_void, + exponentialAverageFactor: f64, + normMeanVarDesc: cudnnTensorDescriptor_t, + resultRunningMean: *mut ::libc::c_void, + resultRunningVariance: *mut ::libc::c_void, + epsilon: f64, + resultSaveMean: *mut ::libc::c_void, + resultSaveInvVariance: *mut ::libc::c_void, + activationDesc: cudnnActivationDescriptor_t, + zDesc: cudnnTensorDescriptor_t, + zData: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + yData: *mut ::libc::c_void, + workspace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + reserveSpace: *mut ::libc::c_void, + reserveSpaceSizeInBytes: usize, + groupCnt: ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnGetFusedOpsVariantParamPackAttribute( - varPack: cudnnFusedOpsVariantParamPack_t, - paramLabel: cudnnFusedOpsVariantParamLabel_t, - ptr: *mut ::libc::c_void, + pub fn cudnnNormalizationBackward( + handle: cudnnHandle_t, + mode: cudnnNormMode_t, + normOps: cudnnNormOps_t, + algo: cudnnNormAlgo_t, + alphaDataDiff: *const ::libc::c_void, + betaDataDiff: *const ::libc::c_void, + alphaParamDiff: *const ::libc::c_void, + betaParamDiff: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + xData: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + yData: *const ::libc::c_void, + dyDesc: cudnnTensorDescriptor_t, + dyData: *const ::libc::c_void, + dzDesc: cudnnTensorDescriptor_t, + dzData: *mut ::libc::c_void, + dxDesc: cudnnTensorDescriptor_t, + dxData: *mut ::libc::c_void, + dNormScaleBiasDesc: cudnnTensorDescriptor_t, + normScaleData: *const ::libc::c_void, + normBiasData: *const ::libc::c_void, + dNormScaleData: *mut ::libc::c_void, + dNormBiasData: *mut ::libc::c_void, + epsilon: f64, + normMeanVarDesc: cudnnTensorDescriptor_t, + savedMean: *const ::libc::c_void, + savedInvVariance: *const ::libc::c_void, + activationDesc: cudnnActivationDescriptor_t, + workSpace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + reserveSpace: *mut ::libc::c_void, + reserveSpaceSizeInBytes: usize, + groupCnt: ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnCreateFusedOpsPlan( - plan: *mut cudnnFusedOpsPlan_t, - ops: cudnnFusedOps_t, + pub fn cudnnSpatialTfGridGeneratorBackward( + handle: cudnnHandle_t, + stDesc: cudnnSpatialTransformerDescriptor_t, + dgrid: *const ::libc::c_void, + dtheta: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnDestroyFusedOpsPlan(plan: cudnnFusedOpsPlan_t) -> cudnnStatus_t; -} -extern "C" { - pub fn cudnnMakeFusedOpsPlan( + pub fn cudnnSpatialTfSamplerBackward( handle: cudnnHandle_t, - plan: cudnnFusedOpsPlan_t, - constPack: cudnnFusedOpsConstParamPack_t, - workspaceSizeInBytes: *mut usize, + stDesc: cudnnSpatialTransformerDescriptor_t, + alpha: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + beta: *const ::libc::c_void, + dxDesc: cudnnTensorDescriptor_t, + dx: *mut ::libc::c_void, + alphaDgrid: *const ::libc::c_void, + dyDesc: cudnnTensorDescriptor_t, + dy: *const ::libc::c_void, + grid: *const ::libc::c_void, + betaDgrid: *const ::libc::c_void, + dgrid: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnFusedOpsExecute( + pub fn cudnnDropoutBackward( handle: cudnnHandle_t, - plan: cudnnFusedOpsPlan_t, - varPack: cudnnFusedOpsVariantParamPack_t, + dropoutDesc: cudnnDropoutDescriptor_t, + dydesc: cudnnTensorDescriptor_t, + dy: *const ::libc::c_void, + dxdesc: cudnnTensorDescriptor_t, + dx: *mut ::libc::c_void, + reserveSpace: *mut ::libc::c_void, + reserveSpaceSizeInBytes: usize, ) -> cudnnStatus_t; } -extern "C" { - pub fn cudnnCnnTrainVersionCheck() -> cudnnStatus_t; +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnRNNAlgo_t { + CUDNN_RNN_ALGO_STANDARD = 0, + CUDNN_RNN_ALGO_PERSIST_STATIC = 1, + CUDNN_RNN_ALGO_PERSIST_DYNAMIC = 2, + CUDNN_RNN_ALGO_PERSIST_STATIC_SMALL_H = 3, + CUDNN_RNN_ALGO_COUNT = 4, } -pub type cudnnBackendDescriptor_t = *mut ::libc::c_void; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnPointwiseMode_t { - CUDNN_POINTWISE_ADD = 0, - CUDNN_POINTWISE_ADD_SQUARE = 5, - CUDNN_POINTWISE_DIV = 6, - CUDNN_POINTWISE_MAX = 3, - CUDNN_POINTWISE_MIN = 2, - CUDNN_POINTWISE_MOD = 7, - CUDNN_POINTWISE_MUL = 1, - CUDNN_POINTWISE_POW = 8, - CUDNN_POINTWISE_SUB = 9, - CUDNN_POINTWISE_ABS = 10, - CUDNN_POINTWISE_CEIL = 11, - CUDNN_POINTWISE_COS = 12, - CUDNN_POINTWISE_EXP = 13, - CUDNN_POINTWISE_FLOOR = 14, - CUDNN_POINTWISE_LOG = 15, - CUDNN_POINTWISE_NEG = 16, - CUDNN_POINTWISE_RSQRT = 17, - CUDNN_POINTWISE_SIN = 18, - CUDNN_POINTWISE_SQRT = 4, - CUDNN_POINTWISE_TAN = 19, - CUDNN_POINTWISE_RELU_FWD = 100, - CUDNN_POINTWISE_TANH_FWD = 101, - CUDNN_POINTWISE_SIGMOID_FWD = 102, - CUDNN_POINTWISE_ELU_FWD = 103, - CUDNN_POINTWISE_GELU_FWD = 104, - CUDNN_POINTWISE_SOFTPLUS_FWD = 105, - CUDNN_POINTWISE_SWISH_FWD = 106, - CUDNN_POINTWISE_RELU_BWD = 200, - CUDNN_POINTWISE_TANH_BWD = 201, - CUDNN_POINTWISE_SIGMOID_BWD = 202, - CUDNN_POINTWISE_ELU_BWD = 203, - CUDNN_POINTWISE_GELU_BWD = 204, - CUDNN_POINTWISE_SOFTPLUS_BWD = 205, - CUDNN_POINTWISE_SWISH_BWD = 206, - CUDNN_POINTWISE_CMP_EQ = 300, - CUDNN_POINTWISE_CMP_NEQ = 301, - CUDNN_POINTWISE_CMP_GT = 302, - CUDNN_POINTWISE_CMP_GE = 303, - CUDNN_POINTWISE_CMP_LT = 304, - CUDNN_POINTWISE_CMP_LE = 305, - CUDNN_POINTWISE_LOGICAL_AND = 400, - CUDNN_POINTWISE_LOGICAL_OR = 401, - CUDNN_POINTWISE_LOGICAL_NOT = 402, +pub enum cudnnForwardMode_t { + CUDNN_FWD_MODE_INFERENCE = 0, + CUDNN_FWD_MODE_TRAINING = 1, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnResampleMode_t { - CUDNN_RESAMPLE_NEAREST = 0, - CUDNN_RESAMPLE_BILINEAR = 1, - CUDNN_RESAMPLE_AVGPOOL = 2, - CUDNN_RESAMPLE_MAXPOOL = 3, +pub enum cudnnRNNMode_t { + CUDNN_RNN_RELU = 0, + CUDNN_RNN_TANH = 1, + CUDNN_LSTM = 2, + CUDNN_GRU = 3, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnGenStatsMode_t { - CUDNN_GENSTATS_SUM_SQSUM = 0, +pub enum cudnnRNNBiasMode_t { + CUDNN_RNN_NO_BIAS = 0, + CUDNN_RNN_SINGLE_INP_BIAS = 1, + CUDNN_RNN_DOUBLE_BIAS = 2, + CUDNN_RNN_SINGLE_REC_BIAS = 3, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBnFinalizeStatsMode_t { - CUDNN_BN_FINALIZE_STATISTICS_TRAINING = 0, - CUDNN_BN_FINALIZE_STATISTICS_INFERENCE = 1, +pub enum cudnnDirectionMode_t { + CUDNN_UNIDIRECTIONAL = 0, + CUDNN_BIDIRECTIONAL = 1, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBackendAttributeName_t { - CUDNN_ATTR_POINTWISE_MODE = 0, - CUDNN_ATTR_POINTWISE_MATH_PREC = 1, - CUDNN_ATTR_POINTWISE_NAN_PROPAGATION = 2, - CUDNN_ATTR_POINTWISE_RELU_LOWER_CLIP = 3, - CUDNN_ATTR_POINTWISE_RELU_UPPER_CLIP = 4, - CUDNN_ATTR_POINTWISE_RELU_LOWER_CLIP_SLOPE = 5, - CUDNN_ATTR_POINTWISE_ELU_ALPHA = 6, - CUDNN_ATTR_POINTWISE_SOFTPLUS_BETA = 7, - CUDNN_ATTR_POINTWISE_SWISH_BETA = 8, - CUDNN_ATTR_CONVOLUTION_COMP_TYPE = 100, - CUDNN_ATTR_CONVOLUTION_CONV_MODE = 101, - CUDNN_ATTR_CONVOLUTION_DILATIONS = 102, - CUDNN_ATTR_CONVOLUTION_FILTER_STRIDES = 103, - CUDNN_ATTR_CONVOLUTION_POST_PADDINGS = 104, - CUDNN_ATTR_CONVOLUTION_PRE_PADDINGS = 105, - CUDNN_ATTR_CONVOLUTION_SPATIAL_DIMS = 106, - CUDNN_ATTR_ENGINEHEUR_MODE = 200, - CUDNN_ATTR_ENGINEHEUR_OPERATION_GRAPH = 201, - CUDNN_ATTR_ENGINEHEUR_RESULTS = 202, - CUDNN_ATTR_ENGINECFG_ENGINE = 300, - CUDNN_ATTR_ENGINECFG_INTERMEDIATE_INFO = 301, - CUDNN_ATTR_ENGINECFG_KNOB_CHOICES = 302, - CUDNN_ATTR_EXECUTION_PLAN_HANDLE = 400, - CUDNN_ATTR_EXECUTION_PLAN_ENGINE_CONFIG = 401, - CUDNN_ATTR_EXECUTION_PLAN_WORKSPACE_SIZE = 402, - CUDNN_ATTR_EXECUTION_PLAN_COMPUTED_INTERMEDIATE_UIDS = 403, - CUDNN_ATTR_EXECUTION_PLAN_RUN_ONLY_INTERMEDIATE_UIDS = 404, - CUDNN_ATTR_INTERMEDIATE_INFO_UNIQUE_ID = 500, - CUDNN_ATTR_INTERMEDIATE_INFO_SIZE = 501, - CUDNN_ATTR_INTERMEDIATE_INFO_DEPENDENT_DATA_UIDS = 502, - CUDNN_ATTR_INTERMEDIATE_INFO_DEPENDENT_ATTRIBUTES = 503, - CUDNN_ATTR_KNOB_CHOICE_KNOB_TYPE = 600, - CUDNN_ATTR_KNOB_CHOICE_KNOB_VALUE = 601, - CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_ALPHA = 700, - CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_BETA = 701, - CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_CONV_DESC = 702, - CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_W = 703, - CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_X = 704, - CUDNN_ATTR_OPERATION_CONVOLUTION_FORWARD_Y = 705, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_ALPHA = 706, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_BETA = 707, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_CONV_DESC = 708, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_W = 709, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_DX = 710, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_DATA_DY = 711, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_ALPHA = 712, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_BETA = 713, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_CONV_DESC = 714, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_DW = 715, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_X = 716, - CUDNN_ATTR_OPERATION_CONVOLUTION_BWD_FILTER_DY = 717, - CUDNN_ATTR_OPERATION_POINTWISE_PW_DESCRIPTOR = 750, - CUDNN_ATTR_OPERATION_POINTWISE_XDESC = 751, - CUDNN_ATTR_OPERATION_POINTWISE_BDESC = 752, - CUDNN_ATTR_OPERATION_POINTWISE_YDESC = 753, - CUDNN_ATTR_OPERATION_POINTWISE_ALPHA1 = 754, - CUDNN_ATTR_OPERATION_POINTWISE_ALPHA2 = 755, - CUDNN_ATTR_OPERATION_POINTWISE_DXDESC = 756, - CUDNN_ATTR_OPERATION_POINTWISE_DYDESC = 757, - CUDNN_ATTR_OPERATION_POINTWISE_TDESC = 758, - CUDNN_ATTR_OPERATION_GENSTATS_MODE = 770, - CUDNN_ATTR_OPERATION_GENSTATS_MATH_PREC = 771, - CUDNN_ATTR_OPERATION_GENSTATS_XDESC = 772, - CUDNN_ATTR_OPERATION_GENSTATS_SUMDESC = 773, - CUDNN_ATTR_OPERATION_GENSTATS_SQSUMDESC = 774, - CUDNN_ATTR_OPERATION_BN_FINALIZE_STATS_MODE = 780, - CUDNN_ATTR_OPERATION_BN_FINALIZE_MATH_PREC = 781, - CUDNN_ATTR_OPERATION_BN_FINALIZE_Y_SUM_DESC = 782, - CUDNN_ATTR_OPERATION_BN_FINALIZE_Y_SQ_SUM_DESC = 783, - CUDNN_ATTR_OPERATION_BN_FINALIZE_SCALE_DESC = 784, - CUDNN_ATTR_OPERATION_BN_FINALIZE_BIAS_DESC = 785, - CUDNN_ATTR_OPERATION_BN_FINALIZE_PREV_RUNNING_MEAN_DESC = 786, - CUDNN_ATTR_OPERATION_BN_FINALIZE_PREV_RUNNING_VAR_DESC = 787, - CUDNN_ATTR_OPERATION_BN_FINALIZE_UPDATED_RUNNING_MEAN_DESC = 788, - CUDNN_ATTR_OPERATION_BN_FINALIZE_UPDATED_RUNNING_VAR_DESC = 789, - CUDNN_ATTR_OPERATION_BN_FINALIZE_SAVED_MEAN_DESC = 790, - CUDNN_ATTR_OPERATION_BN_FINALIZE_SAVED_INV_STD_DESC = 791, - CUDNN_ATTR_OPERATION_BN_FINALIZE_EQ_SCALE_DESC = 792, - CUDNN_ATTR_OPERATION_BN_FINALIZE_EQ_BIAS_DESC = 793, - CUDNN_ATTR_OPERATION_BN_FINALIZE_ACCUM_COUNT_DESC = 794, - CUDNN_ATTR_OPERATION_BN_FINALIZE_EPSILON_DESC = 795, - CUDNN_ATTR_OPERATION_BN_FINALIZE_EXP_AVERATE_FACTOR_DESC = 796, - CUDNN_ATTR_OPERATIONGRAPH_HANDLE = 800, - CUDNN_ATTR_OPERATIONGRAPH_OPS = 801, - CUDNN_ATTR_OPERATIONGRAPH_ENGINE_GLOBAL_COUNT = 802, - CUDNN_ATTR_TENSOR_BYTE_ALIGNMENT = 900, - CUDNN_ATTR_TENSOR_DATA_TYPE = 901, - CUDNN_ATTR_TENSOR_DIMENSIONS = 902, - CUDNN_ATTR_TENSOR_STRIDES = 903, - CUDNN_ATTR_TENSOR_VECTOR_COUNT = 904, - CUDNN_ATTR_TENSOR_VECTORIZED_DIMENSION = 905, - CUDNN_ATTR_TENSOR_UNIQUE_ID = 906, - CUDNN_ATTR_TENSOR_IS_VIRTUAL = 907, - CUDNN_ATTR_TENSOR_IS_BY_VALUE = 908, - CUDNN_ATTR_TENSOR_REORDERING_MODE = 909, - CUDNN_ATTR_VARIANT_PACK_UNIQUE_IDS = 1000, - CUDNN_ATTR_VARIANT_PACK_DATA_POINTERS = 1001, - CUDNN_ATTR_VARIANT_PACK_INTERMEDIATES = 1002, - CUDNN_ATTR_VARIANT_PACK_WORKSPACE = 1003, - CUDNN_ATTR_LAYOUT_INFO_TENSOR_UID = 1100, - CUDNN_ATTR_LAYOUT_INFO_TYPES = 1101, - CUDNN_ATTR_KNOB_INFO_TYPE = 1200, - CUDNN_ATTR_KNOB_INFO_MAXIMUM_VALUE = 1201, - CUDNN_ATTR_KNOB_INFO_MINIMUM_VALUE = 1202, - CUDNN_ATTR_KNOB_INFO_STRIDE = 1203, - CUDNN_ATTR_ENGINE_OPERATION_GRAPH = 1300, - CUDNN_ATTR_ENGINE_GLOBAL_INDEX = 1301, - CUDNN_ATTR_ENGINE_KNOB_INFO = 1302, - CUDNN_ATTR_ENGINE_NUMERICAL_NOTE = 1303, - CUDNN_ATTR_ENGINE_LAYOUT_INFO = 1304, - CUDNN_ATTR_ENGINE_BEHAVIOR_NOTE = 1305, - CUDNN_ATTR_MATMUL_COMP_TYPE = 1500, - CUDNN_ATTR_OPERATION_MATMUL_ADESC = 1520, - CUDNN_ATTR_OPERATION_MATMUL_BDESC = 1521, - CUDNN_ATTR_OPERATION_MATMUL_CDESC = 1522, - CUDNN_ATTR_OPERATION_MATMUL_DESC = 1523, - CUDNN_ATTR_OPERATION_MATMUL_IRREGULARLY_STRIDED_BATCH_COUNT = 1524, - CUDNN_ATTR_REDUCTION_OPERATOR = 1600, - CUDNN_ATTR_REDUCTION_COMP_TYPE = 1601, - CUDNN_ATTR_OPERATION_REDUCTION_XDESC = 1610, - CUDNN_ATTR_OPERATION_REDUCTION_YDESC = 1611, - CUDNN_ATTR_OPERATION_REDUCTION_DESC = 1612, - CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_MATH_PREC = 1620, - CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_MEAN_DESC = 1621, - CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_INVSTD_DESC = 1622, - CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_BN_SCALE_DESC = 1623, - CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_X_DESC = 1624, - CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DY_DESC = 1625, - CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_SCALE_DESC = 1626, - CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_DBN_BIAS_DESC = 1627, - CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_DY_SCALE_DESC = 1628, - CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_X_SCALE_DESC = 1629, - CUDNN_ATTR_OPERATION_BN_BWD_WEIGHTS_EQ_BIAS = 1630, - CUDNN_ATTR_RESAMPLE_MODE = 1700, - CUDNN_ATTR_RESAMPLE_COMP_TYPE = 1701, - CUDNN_ATTR_RESAMPLE_SPATIAL_DIMS = 1702, - CUDNN_ATTR_RESAMPLE_POST_PADDINGS = 1703, - CUDNN_ATTR_RESAMPLE_PRE_PADDINGS = 1704, - CUDNN_ATTR_RESAMPLE_STRIDES = 1705, - CUDNN_ATTR_RESAMPLE_WINDOW_DIMS = 1706, - CUDNN_ATTR_RESAMPLE_NAN_PROPAGATION = 1707, - CUDNN_ATTR_RESAMPLE_PADDING_MODE = 1708, - CUDNN_ATTR_OPERATION_RESAMPLE_FWD_XDESC = 1710, - CUDNN_ATTR_OPERATION_RESAMPLE_FWD_YDESC = 1711, - CUDNN_ATTR_OPERATION_RESAMPLE_FWD_IDXDESC = 1712, - CUDNN_ATTR_OPERATION_RESAMPLE_FWD_ALPHA = 1713, - CUDNN_ATTR_OPERATION_RESAMPLE_FWD_BETA = 1714, - CUDNN_ATTR_OPERATION_RESAMPLE_FWD_DESC = 1716, - CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DXDESC = 1720, - CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DYDESC = 1721, - CUDNN_ATTR_OPERATION_RESAMPLE_BWD_IDXDESC = 1722, - CUDNN_ATTR_OPERATION_RESAMPLE_BWD_ALPHA = 1723, - CUDNN_ATTR_OPERATION_RESAMPLE_BWD_BETA = 1724, - CUDNN_ATTR_OPERATION_RESAMPLE_BWD_DESC = 1725, +pub enum cudnnRNNInputMode_t { + CUDNN_LINEAR_INPUT = 0, + CUDNN_SKIP_INPUT = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnRNNClipMode_t { + CUDNN_RNN_CLIP_NONE = 0, + CUDNN_RNN_CLIP_MINMAX = 1, +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnRNNDataLayout_t { + CUDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_UNPACKED = 0, + CUDNN_RNN_DATA_LAYOUT_SEQ_MAJOR_PACKED = 1, + CUDNN_RNN_DATA_LAYOUT_BATCH_MAJOR_UNPACKED = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnRNNStruct { + _unused: [u8; 0], +} +pub type cudnnRNNDescriptor_t = *mut cudnnRNNStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnRNNDataStruct { + _unused: [u8; 0], +} +pub type cudnnRNNDataDescriptor_t = *mut cudnnRNNDataStruct; +extern "C" { + pub fn cudnnCreateRNNDescriptor(rnnDesc: *mut cudnnRNNDescriptor_t) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnDestroyRNNDescriptor(rnnDesc: cudnnRNNDescriptor_t) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetRNNDescriptor_v8( + rnnDesc: cudnnRNNDescriptor_t, + algo: cudnnRNNAlgo_t, + cellMode: cudnnRNNMode_t, + biasMode: cudnnRNNBiasMode_t, + dirMode: cudnnDirectionMode_t, + inputMode: cudnnRNNInputMode_t, + dataType: cudnnDataType_t, + mathPrec: cudnnDataType_t, + mathType: cudnnMathType_t, + inputSize: i32, + hiddenSize: i32, + projSize: i32, + numLayers: i32, + dropoutDesc: cudnnDropoutDescriptor_t, + auxFlags: u32, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetRNNDescriptor_v8( + rnnDesc: cudnnRNNDescriptor_t, + algo: *mut cudnnRNNAlgo_t, + cellMode: *mut cudnnRNNMode_t, + biasMode: *mut cudnnRNNBiasMode_t, + dirMode: *mut cudnnDirectionMode_t, + inputMode: *mut cudnnRNNInputMode_t, + dataType: *mut cudnnDataType_t, + mathPrec: *mut cudnnDataType_t, + mathType: *mut cudnnMathType_t, + inputSize: *mut i32, + hiddenSize: *mut i32, + projSize: *mut i32, + numLayers: *mut i32, + dropoutDesc: *mut cudnnDropoutDescriptor_t, + auxFlags: *mut u32, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnRNNSetClip_v8( + rnnDesc: cudnnRNNDescriptor_t, + clipMode: cudnnRNNClipMode_t, + clipNanOpt: cudnnNanPropagation_t, + lclip: f64, + rclip: f64, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnRNNSetClip_v9( + rnnDesc: cudnnRNNDescriptor_t, + clipMode: cudnnRNNClipMode_t, + lclip: f64, + rclip: f64, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnRNNGetClip_v8( + rnnDesc: cudnnRNNDescriptor_t, + clipMode: *mut cudnnRNNClipMode_t, + clipNanOpt: *mut cudnnNanPropagation_t, + lclip: *mut f64, + rclip: *mut f64, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnRNNGetClip_v9( + rnnDesc: cudnnRNNDescriptor_t, + clipMode: *mut cudnnRNNClipMode_t, + lclip: *mut f64, + rclip: *mut f64, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnBuildRNNDynamic( + handle: cudnnHandle_t, + rnnDesc: cudnnRNNDescriptor_t, + miniBatch: ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetRNNTempSpaceSizes( + handle: cudnnHandle_t, + rnnDesc: cudnnRNNDescriptor_t, + fwdMode: cudnnForwardMode_t, + xDesc: cudnnRNNDataDescriptor_t, + workSpaceSize: *mut usize, + reserveSpaceSize: *mut usize, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetRNNWeightSpaceSize( + handle: cudnnHandle_t, + rnnDesc: cudnnRNNDescriptor_t, + weightSpaceSize: *mut usize, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetRNNWeightParams( + handle: cudnnHandle_t, + rnnDesc: cudnnRNNDescriptor_t, + pseudoLayer: i32, + weightSpaceSize: usize, + weightSpace: *const ::libc::c_void, + linLayerID: i32, + mDesc: cudnnTensorDescriptor_t, + mAddr: *mut *mut ::libc::c_void, + bDesc: cudnnTensorDescriptor_t, + bAddr: *mut *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnCreateRNNDataDescriptor( + rnnDataDesc: *mut cudnnRNNDataDescriptor_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnDestroyRNNDataDescriptor( + rnnDataDesc: cudnnRNNDataDescriptor_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetRNNDataDescriptor( + rnnDataDesc: cudnnRNNDataDescriptor_t, + dataType: cudnnDataType_t, + layout: cudnnRNNDataLayout_t, + maxSeqLength: ::libc::c_int, + batchSize: ::libc::c_int, + vectorSize: ::libc::c_int, + seqLengthArray: *const ::libc::c_int, + paddingFill: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetRNNDataDescriptor( + rnnDataDesc: cudnnRNNDataDescriptor_t, + dataType: *mut cudnnDataType_t, + layout: *mut cudnnRNNDataLayout_t, + maxSeqLength: *mut ::libc::c_int, + batchSize: *mut ::libc::c_int, + vectorSize: *mut ::libc::c_int, + arrayLengthRequested: ::libc::c_int, + seqLengthArray: *mut ::libc::c_int, + paddingFill: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnRNNForward( + handle: cudnnHandle_t, + rnnDesc: cudnnRNNDescriptor_t, + fwdMode: cudnnForwardMode_t, + devSeqLengths: *const i32, + xDesc: cudnnRNNDataDescriptor_t, + x: *const ::libc::c_void, + yDesc: cudnnRNNDataDescriptor_t, + y: *mut ::libc::c_void, + hDesc: cudnnTensorDescriptor_t, + hx: *const ::libc::c_void, + hy: *mut ::libc::c_void, + cDesc: cudnnTensorDescriptor_t, + cx: *const ::libc::c_void, + cy: *mut ::libc::c_void, + weightSpaceSize: usize, + weightSpace: *const ::libc::c_void, + workSpaceSize: usize, + workSpace: *mut ::libc::c_void, + reserveSpaceSize: usize, + reserveSpace: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnSeqDataAxis_t { + CUDNN_SEQDATA_TIME_DIM = 0, + CUDNN_SEQDATA_BATCH_DIM = 1, + CUDNN_SEQDATA_BEAM_DIM = 2, + CUDNN_SEQDATA_VECT_DIM = 3, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnSeqDataStruct { + _unused: [u8; 0], +} +pub type cudnnSeqDataDescriptor_t = *mut cudnnSeqDataStruct; +extern "C" { + pub fn cudnnCreateSeqDataDescriptor( + seqDataDesc: *mut cudnnSeqDataDescriptor_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnDestroySeqDataDescriptor( + seqDataDesc: cudnnSeqDataDescriptor_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetSeqDataDescriptor( + seqDataDesc: cudnnSeqDataDescriptor_t, + dataType: cudnnDataType_t, + nbDims: ::libc::c_int, + dimA: *const ::libc::c_int, + axes: *const cudnnSeqDataAxis_t, + seqLengthArraySize: usize, + seqLengthArray: *const ::libc::c_int, + paddingFill: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetSeqDataDescriptor( + seqDataDesc: cudnnSeqDataDescriptor_t, + dataType: *mut cudnnDataType_t, + nbDims: *mut ::libc::c_int, + nbDimsRequested: ::libc::c_int, + dimA: *mut ::libc::c_int, + axes: *mut cudnnSeqDataAxis_t, + seqLengthArraySize: *mut usize, + seqLengthSizeRequested: usize, + seqLengthArray: *mut ::libc::c_int, + paddingFill: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnAttnStruct { + _unused: [u8; 0], +} +pub type cudnnAttnDescriptor_t = *mut cudnnAttnStruct; +extern "C" { + pub fn cudnnCreateAttnDescriptor( + attnDesc: *mut cudnnAttnDescriptor_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnDestroyAttnDescriptor(attnDesc: cudnnAttnDescriptor_t) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetAttnDescriptor( + attnDesc: cudnnAttnDescriptor_t, + attnMode: ::libc::c_uint, + nHeads: ::libc::c_int, + smScaler: f64, + dataType: cudnnDataType_t, + computePrec: cudnnDataType_t, + mathType: cudnnMathType_t, + attnDropoutDesc: cudnnDropoutDescriptor_t, + postDropoutDesc: cudnnDropoutDescriptor_t, + qSize: ::libc::c_int, + kSize: ::libc::c_int, + vSize: ::libc::c_int, + qProjSize: ::libc::c_int, + kProjSize: ::libc::c_int, + vProjSize: ::libc::c_int, + oProjSize: ::libc::c_int, + qoMaxSeqLength: ::libc::c_int, + kvMaxSeqLength: ::libc::c_int, + maxBatchSize: ::libc::c_int, + maxBeamSize: ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetAttnDescriptor( + attnDesc: cudnnAttnDescriptor_t, + attnMode: *mut ::libc::c_uint, + nHeads: *mut ::libc::c_int, + smScaler: *mut f64, + dataType: *mut cudnnDataType_t, + computePrec: *mut cudnnDataType_t, + mathType: *mut cudnnMathType_t, + attnDropoutDesc: *mut cudnnDropoutDescriptor_t, + postDropoutDesc: *mut cudnnDropoutDescriptor_t, + qSize: *mut ::libc::c_int, + kSize: *mut ::libc::c_int, + vSize: *mut ::libc::c_int, + qProjSize: *mut ::libc::c_int, + kProjSize: *mut ::libc::c_int, + vProjSize: *mut ::libc::c_int, + oProjSize: *mut ::libc::c_int, + qoMaxSeqLength: *mut ::libc::c_int, + kvMaxSeqLength: *mut ::libc::c_int, + maxBatchSize: *mut ::libc::c_int, + maxBeamSize: *mut ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetMultiHeadAttnBuffers( + handle: cudnnHandle_t, + attnDesc: cudnnAttnDescriptor_t, + weightSizeInBytes: *mut usize, + workSpaceSizeInBytes: *mut usize, + reserveSpaceSizeInBytes: *mut usize, + ) -> cudnnStatus_t; +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnMultiHeadAttnWeightKind_t { + CUDNN_MH_ATTN_Q_WEIGHTS = 0, + CUDNN_MH_ATTN_K_WEIGHTS = 1, + CUDNN_MH_ATTN_V_WEIGHTS = 2, + CUDNN_MH_ATTN_O_WEIGHTS = 3, + CUDNN_MH_ATTN_Q_BIASES = 4, + CUDNN_MH_ATTN_K_BIASES = 5, + CUDNN_MH_ATTN_V_BIASES = 6, + CUDNN_MH_ATTN_O_BIASES = 7, +} +extern "C" { + pub fn cudnnGetMultiHeadAttnWeights( + handle: cudnnHandle_t, + attnDesc: cudnnAttnDescriptor_t, + wKind: cudnnMultiHeadAttnWeightKind_t, + weightSizeInBytes: usize, + weights: *const ::libc::c_void, + wDesc: cudnnTensorDescriptor_t, + wAddr: *mut *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnMultiHeadAttnForward( + handle: cudnnHandle_t, + attnDesc: cudnnAttnDescriptor_t, + currIdx: ::libc::c_int, + loWinIdx: *const ::libc::c_int, + hiWinIdx: *const ::libc::c_int, + devSeqLengthsQO: *const ::libc::c_int, + devSeqLengthsKV: *const ::libc::c_int, + qDesc: cudnnSeqDataDescriptor_t, + queries: *const ::libc::c_void, + residuals: *const ::libc::c_void, + kDesc: cudnnSeqDataDescriptor_t, + keys: *const ::libc::c_void, + vDesc: cudnnSeqDataDescriptor_t, + values: *const ::libc::c_void, + oDesc: cudnnSeqDataDescriptor_t, + out: *mut ::libc::c_void, + weightSizeInBytes: usize, + weights: *const ::libc::c_void, + workSpaceSizeInBytes: usize, + workSpace: *mut ::libc::c_void, + reserveSpaceSizeInBytes: usize, + reserveSpace: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnAdvVersionCheck() -> cudnnStatus_t; +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnWgradMode_t { + CUDNN_WGRAD_MODE_ADD = 0, + CUDNN_WGRAD_MODE_SET = 1, +} +extern "C" { + pub fn cudnnRNNBackwardData_v8( + handle: cudnnHandle_t, + rnnDesc: cudnnRNNDescriptor_t, + devSeqLengths: *const i32, + yDesc: cudnnRNNDataDescriptor_t, + y: *const ::libc::c_void, + dy: *const ::libc::c_void, + xDesc: cudnnRNNDataDescriptor_t, + dx: *mut ::libc::c_void, + hDesc: cudnnTensorDescriptor_t, + hx: *const ::libc::c_void, + dhy: *const ::libc::c_void, + dhx: *mut ::libc::c_void, + cDesc: cudnnTensorDescriptor_t, + cx: *const ::libc::c_void, + dcy: *const ::libc::c_void, + dcx: *mut ::libc::c_void, + weightSpaceSize: usize, + weightSpace: *const ::libc::c_void, + workSpaceSize: usize, + workSpace: *mut ::libc::c_void, + reserveSpaceSize: usize, + reserveSpace: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnRNNBackwardWeights_v8( + handle: cudnnHandle_t, + rnnDesc: cudnnRNNDescriptor_t, + addGrad: cudnnWgradMode_t, + devSeqLengths: *const i32, + xDesc: cudnnRNNDataDescriptor_t, + x: *const ::libc::c_void, + hDesc: cudnnTensorDescriptor_t, + hx: *const ::libc::c_void, + yDesc: cudnnRNNDataDescriptor_t, + y: *const ::libc::c_void, + weightSpaceSize: usize, + dweightSpace: *mut ::libc::c_void, + workSpaceSize: usize, + workSpace: *mut ::libc::c_void, + reserveSpaceSize: usize, + reserveSpace: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnMultiHeadAttnBackwardData( + handle: cudnnHandle_t, + attnDesc: cudnnAttnDescriptor_t, + loWinIdx: *const ::libc::c_int, + hiWinIdx: *const ::libc::c_int, + devSeqLengthsDQDO: *const ::libc::c_int, + devSeqLengthsDKDV: *const ::libc::c_int, + doDesc: cudnnSeqDataDescriptor_t, + dout: *const ::libc::c_void, + dqDesc: cudnnSeqDataDescriptor_t, + dqueries: *mut ::libc::c_void, + queries: *const ::libc::c_void, + dkDesc: cudnnSeqDataDescriptor_t, + dkeys: *mut ::libc::c_void, + keys: *const ::libc::c_void, + dvDesc: cudnnSeqDataDescriptor_t, + dvalues: *mut ::libc::c_void, + values: *const ::libc::c_void, + weightSizeInBytes: usize, + weights: *const ::libc::c_void, + workSpaceSizeInBytes: usize, + workSpace: *mut ::libc::c_void, + reserveSpaceSizeInBytes: usize, + reserveSpace: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnMultiHeadAttnBackwardWeights( + handle: cudnnHandle_t, + attnDesc: cudnnAttnDescriptor_t, + addGrad: cudnnWgradMode_t, + qDesc: cudnnSeqDataDescriptor_t, + queries: *const ::libc::c_void, + kDesc: cudnnSeqDataDescriptor_t, + keys: *const ::libc::c_void, + vDesc: cudnnSeqDataDescriptor_t, + values: *const ::libc::c_void, + doDesc: cudnnSeqDataDescriptor_t, + dout: *const ::libc::c_void, + weightSizeInBytes: usize, + weights: *const ::libc::c_void, + dweights: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + workSpace: *mut ::libc::c_void, + reserveSpaceSizeInBytes: usize, + reserveSpace: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +#[repr(u32)] +#[non_exhaustive] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub enum cudnnLossNormalizationMode_t { + CUDNN_LOSS_NORMALIZATION_NONE = 0, + CUDNN_LOSS_NORMALIZATION_SOFTMAX = 1, +} +extern "C" { + pub fn cudnnCreateCTCLossDescriptor( + ctcLossDesc: *mut cudnnCTCLossDescriptor_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetCTCLossDescriptor( + ctcLossDesc: cudnnCTCLossDescriptor_t, + compType: cudnnDataType_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetCTCLossDescriptorEx( + ctcLossDesc: cudnnCTCLossDescriptor_t, + compType: cudnnDataType_t, + normMode: cudnnLossNormalizationMode_t, + gradMode: cudnnNanPropagation_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetCTCLossDescriptor_v8( + ctcLossDesc: cudnnCTCLossDescriptor_t, + compType: cudnnDataType_t, + normMode: cudnnLossNormalizationMode_t, + gradMode: cudnnNanPropagation_t, + maxLabelLength: ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetCTCLossDescriptor_v9( + ctcLossDesc: cudnnCTCLossDescriptor_t, + compType: cudnnDataType_t, + normMode: cudnnLossNormalizationMode_t, + ctcGradMode: cudnnCTCGradMode_t, + maxLabelLength: ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetCTCLossDescriptor( + ctcLossDesc: cudnnCTCLossDescriptor_t, + compType: *mut cudnnDataType_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetCTCLossDescriptorEx( + ctcLossDesc: cudnnCTCLossDescriptor_t, + compType: *mut cudnnDataType_t, + normMode: *mut cudnnLossNormalizationMode_t, + gradMode: *mut cudnnNanPropagation_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetCTCLossDescriptor_v8( + ctcLossDesc: cudnnCTCLossDescriptor_t, + compType: *mut cudnnDataType_t, + normMode: *mut cudnnLossNormalizationMode_t, + gradMode: *mut cudnnNanPropagation_t, + maxLabelLength: *mut ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetCTCLossDescriptor_v9( + ctcLossDesc: cudnnCTCLossDescriptor_t, + compType: *mut cudnnDataType_t, + normMode: *mut cudnnLossNormalizationMode_t, + ctcGradMode: *mut cudnnCTCGradMode_t, + maxLabelLength: *mut ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnDestroyCTCLossDescriptor( + ctcLossDesc: cudnnCTCLossDescriptor_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnCTCLoss( + handle: cudnnHandle_t, + probsDesc: cudnnTensorDescriptor_t, + probs: *const ::libc::c_void, + hostLabels: *const ::libc::c_int, + hostLabelLengths: *const ::libc::c_int, + hostInputLengths: *const ::libc::c_int, + costs: *mut ::libc::c_void, + gradientsDesc: cudnnTensorDescriptor_t, + gradients: *mut ::libc::c_void, + algo: cudnnCTCLossAlgo_t, + ctcLossDesc: cudnnCTCLossDescriptor_t, + workspace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnCTCLoss_v8( + handle: cudnnHandle_t, + algo: cudnnCTCLossAlgo_t, + ctcLossDesc: cudnnCTCLossDescriptor_t, + probsDesc: cudnnTensorDescriptor_t, + probs: *const ::libc::c_void, + labels: *const ::libc::c_int, + labelLengths: *const ::libc::c_int, + inputLengths: *const ::libc::c_int, + costs: *mut ::libc::c_void, + gradientsDesc: cudnnTensorDescriptor_t, + gradients: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + workspace: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetCTCLossWorkspaceSize( + handle: cudnnHandle_t, + probsDesc: cudnnTensorDescriptor_t, + gradientsDesc: cudnnTensorDescriptor_t, + labels: *const ::libc::c_int, + labelLengths: *const ::libc::c_int, + inputLengths: *const ::libc::c_int, + algo: cudnnCTCLossAlgo_t, + ctcLossDesc: cudnnCTCLossDescriptor_t, + sizeInBytes: *mut usize, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetCTCLossWorkspaceSize_v8( + handle: cudnnHandle_t, + algo: cudnnCTCLossAlgo_t, + ctcLossDesc: cudnnCTCLossDescriptor_t, + probsDesc: cudnnTensorDescriptor_t, + gradientsDesc: cudnnTensorDescriptor_t, + sizeInBytes: *mut usize, + ) -> cudnnStatus_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnConvolutionStruct { + _unused: [u8; 0], +} +pub type cudnnConvolutionDescriptor_t = *mut cudnnConvolutionStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnConvolutionFwdAlgoPerfStruct { + pub algo: cudnnConvolutionFwdAlgo_t, + pub status: cudnnStatus_t, + pub time: f32, + pub memory: usize, + pub determinism: cudnnDeterminism_t, + pub mathType: cudnnMathType_t, + pub reserved: [::libc::c_int; 3usize], +} +#[test] +fn bindgen_test_layout_cudnnConvolutionFwdAlgoPerfStruct() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(cudnnConvolutionFwdAlgoPerfStruct)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudnnConvolutionFwdAlgoPerfStruct)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).algo) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(algo), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(status), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(time), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(memory), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).determinism) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(determinism), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mathType) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(mathType), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionFwdAlgoPerfStruct), + "::", + stringify!(reserved), + ), + ); +} +pub type cudnnConvolutionFwdAlgoPerf_t = cudnnConvolutionFwdAlgoPerfStruct; +extern "C" { + pub fn cudnnCreateConvolutionDescriptor( + convDesc: *mut cudnnConvolutionDescriptor_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnDestroyConvolutionDescriptor( + convDesc: cudnnConvolutionDescriptor_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetConvolutionMathType( + convDesc: cudnnConvolutionDescriptor_t, + mathType: cudnnMathType_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetConvolutionMathType( + convDesc: cudnnConvolutionDescriptor_t, + mathType: *mut cudnnMathType_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetConvolutionGroupCount( + convDesc: cudnnConvolutionDescriptor_t, + groupCount: ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetConvolutionGroupCount( + convDesc: cudnnConvolutionDescriptor_t, + groupCount: *mut ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetConvolutionReorderType( + convDesc: cudnnConvolutionDescriptor_t, + reorderType: cudnnReorderType_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetConvolutionReorderType( + convDesc: cudnnConvolutionDescriptor_t, + reorderType: *mut cudnnReorderType_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetConvolution2dDescriptor( + convDesc: cudnnConvolutionDescriptor_t, + pad_h: ::libc::c_int, + pad_w: ::libc::c_int, + u: ::libc::c_int, + v: ::libc::c_int, + dilation_h: ::libc::c_int, + dilation_w: ::libc::c_int, + mode: cudnnConvolutionMode_t, + computeType: cudnnDataType_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetConvolution2dDescriptor( + convDesc: cudnnConvolutionDescriptor_t, + pad_h: *mut ::libc::c_int, + pad_w: *mut ::libc::c_int, + u: *mut ::libc::c_int, + v: *mut ::libc::c_int, + dilation_h: *mut ::libc::c_int, + dilation_w: *mut ::libc::c_int, + mode: *mut cudnnConvolutionMode_t, + computeType: *mut cudnnDataType_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetConvolutionNdDescriptor( + convDesc: cudnnConvolutionDescriptor_t, + arrayLength: ::libc::c_int, + padA: *const ::libc::c_int, + filterStrideA: *const ::libc::c_int, + dilationA: *const ::libc::c_int, + mode: cudnnConvolutionMode_t, + computeType: cudnnDataType_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetConvolutionNdDescriptor( + convDesc: cudnnConvolutionDescriptor_t, + arrayLengthRequested: ::libc::c_int, + arrayLength: *mut ::libc::c_int, + padA: *mut ::libc::c_int, + strideA: *mut ::libc::c_int, + dilationA: *mut ::libc::c_int, + mode: *mut cudnnConvolutionMode_t, + computeType: *mut cudnnDataType_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetConvolution2dForwardOutputDim( + convDesc: cudnnConvolutionDescriptor_t, + inputTensorDesc: cudnnTensorDescriptor_t, + filterDesc: cudnnFilterDescriptor_t, + n: *mut ::libc::c_int, + c: *mut ::libc::c_int, + h: *mut ::libc::c_int, + w: *mut ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetConvolutionNdForwardOutputDim( + convDesc: cudnnConvolutionDescriptor_t, + inputTensorDesc: cudnnTensorDescriptor_t, + filterDesc: cudnnFilterDescriptor_t, + nbDims: ::libc::c_int, + tensorOuputDimA: *mut ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetConvolutionForwardAlgorithmMaxCount( + handle: cudnnHandle_t, + count: *mut ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetConvolutionForwardAlgorithm_v7( + handle: cudnnHandle_t, + srcDesc: cudnnTensorDescriptor_t, + filterDesc: cudnnFilterDescriptor_t, + convDesc: cudnnConvolutionDescriptor_t, + destDesc: cudnnTensorDescriptor_t, + requestedAlgoCount: ::libc::c_int, + returnedAlgoCount: *mut ::libc::c_int, + perfResults: *mut cudnnConvolutionFwdAlgoPerf_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnFindConvolutionForwardAlgorithm( + handle: cudnnHandle_t, + xDesc: cudnnTensorDescriptor_t, + wDesc: cudnnFilterDescriptor_t, + convDesc: cudnnConvolutionDescriptor_t, + yDesc: cudnnTensorDescriptor_t, + requestedAlgoCount: ::libc::c_int, + returnedAlgoCount: *mut ::libc::c_int, + perfResults: *mut cudnnConvolutionFwdAlgoPerf_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnFindConvolutionForwardAlgorithmEx( + handle: cudnnHandle_t, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + wDesc: cudnnFilterDescriptor_t, + w: *const ::libc::c_void, + convDesc: cudnnConvolutionDescriptor_t, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, + requestedAlgoCount: ::libc::c_int, + returnedAlgoCount: *mut ::libc::c_int, + perfResults: *mut cudnnConvolutionFwdAlgoPerf_t, + workSpace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnIm2Col( + handle: cudnnHandle_t, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + wDesc: cudnnFilterDescriptor_t, + convDesc: cudnnConvolutionDescriptor_t, + colBuffer: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnReorderFilterAndBias( + handle: cudnnHandle_t, + filterDesc: cudnnFilterDescriptor_t, + reorderType: cudnnReorderType_t, + filterData: *const ::libc::c_void, + reorderedFilterData: *mut ::libc::c_void, + reorderBias: ::libc::c_int, + biasData: *const ::libc::c_void, + reorderedBiasData: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetConvolutionForwardWorkspaceSize( + handle: cudnnHandle_t, + xDesc: cudnnTensorDescriptor_t, + wDesc: cudnnFilterDescriptor_t, + convDesc: cudnnConvolutionDescriptor_t, + yDesc: cudnnTensorDescriptor_t, + algo: cudnnConvolutionFwdAlgo_t, + sizeInBytes: *mut usize, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnConvolutionForward( + handle: cudnnHandle_t, + alpha: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + wDesc: cudnnFilterDescriptor_t, + w: *const ::libc::c_void, + convDesc: cudnnConvolutionDescriptor_t, + algo: cudnnConvolutionFwdAlgo_t, + workSpace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + beta: *const ::libc::c_void, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnConvolutionBiasActivationForward( + handle: cudnnHandle_t, + alpha1: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + wDesc: cudnnFilterDescriptor_t, + w: *const ::libc::c_void, + convDesc: cudnnConvolutionDescriptor_t, + algo: cudnnConvolutionFwdAlgo_t, + workSpace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + alpha2: *const ::libc::c_void, + zDesc: cudnnTensorDescriptor_t, + z: *const ::libc::c_void, + biasDesc: cudnnTensorDescriptor_t, + bias: *const ::libc::c_void, + activationDesc: cudnnActivationDescriptor_t, + yDesc: cudnnTensorDescriptor_t, + y: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnConvolutionBwdDataAlgoPerfStruct { + pub algo: cudnnConvolutionBwdDataAlgo_t, + pub status: cudnnStatus_t, + pub time: f32, + pub memory: usize, + pub determinism: cudnnDeterminism_t, + pub mathType: cudnnMathType_t, + pub reserved: [::libc::c_int; 3usize], +} +#[test] +fn bindgen_test_layout_cudnnConvolutionBwdDataAlgoPerfStruct() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(cudnnConvolutionBwdDataAlgoPerfStruct)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudnnConvolutionBwdDataAlgoPerfStruct)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).algo) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(algo), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(status), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(time), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(memory), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).determinism) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(determinism), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mathType) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(mathType), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdDataAlgoPerfStruct), + "::", + stringify!(reserved), + ), + ); +} +pub type cudnnConvolutionBwdDataAlgoPerf_t = cudnnConvolutionBwdDataAlgoPerfStruct; +extern "C" { + pub fn cudnnGetConvolutionBackwardDataAlgorithmMaxCount( + handle: cudnnHandle_t, + count: *mut ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnFindConvolutionBackwardDataAlgorithm( + handle: cudnnHandle_t, + wDesc: cudnnFilterDescriptor_t, + dyDesc: cudnnTensorDescriptor_t, + convDesc: cudnnConvolutionDescriptor_t, + dxDesc: cudnnTensorDescriptor_t, + requestedAlgoCount: ::libc::c_int, + returnedAlgoCount: *mut ::libc::c_int, + perfResults: *mut cudnnConvolutionBwdDataAlgoPerf_t, + ) -> cudnnStatus_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBackendAttributeType_t { - CUDNN_TYPE_HANDLE = 0, - CUDNN_TYPE_DATA_TYPE = 1, - CUDNN_TYPE_BOOLEAN = 2, - CUDNN_TYPE_INT64 = 3, - CUDNN_TYPE_FLOAT = 4, - CUDNN_TYPE_DOUBLE = 5, - CUDNN_TYPE_VOID_PTR = 6, - CUDNN_TYPE_CONVOLUTION_MODE = 7, - CUDNN_TYPE_HEUR_MODE = 8, - CUDNN_TYPE_KNOB_TYPE = 9, - CUDNN_TYPE_NAN_PROPOGATION = 10, - CUDNN_TYPE_NUMERICAL_NOTE = 11, - CUDNN_TYPE_LAYOUT_TYPE = 12, - CUDNN_TYPE_ATTRIB_NAME = 13, - CUDNN_TYPE_POINTWISE_MODE = 14, - CUDNN_TYPE_BACKEND_DESCRIPTOR = 15, - CUDNN_TYPE_GENSTATS_MODE = 16, - CUDNN_TYPE_BN_FINALIZE_STATS_MODE = 17, - CUDNN_TYPE_REDUCTION_OPERATOR_TYPE = 18, - CUDNN_TYPE_BEHAVIOR_NOTE = 19, - CUDNN_TYPE_TENSOR_REORDERING_MODE = 20, - CUDNN_TYPE_RESAMPLE_MODE = 21, - CUDNN_TYPE_PADDING_MODE = 22, - CUDNN_TYPE_INT32 = 23, +extern "C" { + pub fn cudnnFindConvolutionBackwardDataAlgorithmEx( + handle: cudnnHandle_t, + wDesc: cudnnFilterDescriptor_t, + w: *const ::libc::c_void, + dyDesc: cudnnTensorDescriptor_t, + dy: *const ::libc::c_void, + convDesc: cudnnConvolutionDescriptor_t, + dxDesc: cudnnTensorDescriptor_t, + dx: *mut ::libc::c_void, + requestedAlgoCount: ::libc::c_int, + returnedAlgoCount: *mut ::libc::c_int, + perfResults: *mut cudnnConvolutionBwdDataAlgoPerf_t, + workSpace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + ) -> cudnnStatus_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBackendDescriptorType_t { - CUDNN_BACKEND_POINTWISE_DESCRIPTOR = 0, - CUDNN_BACKEND_CONVOLUTION_DESCRIPTOR = 1, - CUDNN_BACKEND_ENGINE_DESCRIPTOR = 2, - CUDNN_BACKEND_ENGINECFG_DESCRIPTOR = 3, - CUDNN_BACKEND_ENGINEHEUR_DESCRIPTOR = 4, - CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR = 5, - CUDNN_BACKEND_INTERMEDIATE_INFO_DESCRIPTOR = 6, - CUDNN_BACKEND_KNOB_CHOICE_DESCRIPTOR = 7, - CUDNN_BACKEND_KNOB_INFO_DESCRIPTOR = 8, - CUDNN_BACKEND_LAYOUT_INFO_DESCRIPTOR = 9, - CUDNN_BACKEND_OPERATION_CONVOLUTION_FORWARD_DESCRIPTOR = 10, - CUDNN_BACKEND_OPERATION_CONVOLUTION_BACKWARD_FILTER_DESCRIPTOR = 11, - CUDNN_BACKEND_OPERATION_CONVOLUTION_BACKWARD_DATA_DESCRIPTOR = 12, - CUDNN_BACKEND_OPERATION_POINTWISE_DESCRIPTOR = 13, - CUDNN_BACKEND_OPERATION_GEN_STATS_DESCRIPTOR = 14, - CUDNN_BACKEND_OPERATIONGRAPH_DESCRIPTOR = 15, - CUDNN_BACKEND_VARIANT_PACK_DESCRIPTOR = 16, - CUDNN_BACKEND_TENSOR_DESCRIPTOR = 17, - CUDNN_BACKEND_MATMUL_DESCRIPTOR = 18, - CUDNN_BACKEND_OPERATION_MATMUL_DESCRIPTOR = 19, - CUDNN_BACKEND_OPERATION_BN_FINALIZE_STATISTICS_DESCRIPTOR = 20, - CUDNN_BACKEND_REDUCTION_DESCRIPTOR = 21, - CUDNN_BACKEND_OPERATION_REDUCTION_DESCRIPTOR = 22, - CUDNN_BACKEND_OPERATION_BN_BWD_WEIGHTS_DESCRIPTOR = 23, - CUDNN_BACKEND_RESAMPLE_DESCRIPTOR = 24, - CUDNN_BACKEND_OPERATION_RESAMPLE_FWD_DESCRIPTOR = 25, - CUDNN_BACKEND_OPERATION_RESAMPLE_BWD_DESCRIPTOR = 26, +extern "C" { + pub fn cudnnGetConvolutionBackwardDataAlgorithm_v7( + handle: cudnnHandle_t, + filterDesc: cudnnFilterDescriptor_t, + diffDesc: cudnnTensorDescriptor_t, + convDesc: cudnnConvolutionDescriptor_t, + gradDesc: cudnnTensorDescriptor_t, + requestedAlgoCount: ::libc::c_int, + returnedAlgoCount: *mut ::libc::c_int, + perfResults: *mut cudnnConvolutionBwdDataAlgoPerf_t, + ) -> cudnnStatus_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBackendNumericalNote_t { - CUDNN_NUMERICAL_NOTE_TENSOR_CORE = 0, - CUDNN_NUMERICAL_NOTE_DOWN_CONVERT_INPUTS = 1, - CUDNN_NUMERICAL_NOTE_REDUCED_PRECISION_REDUCTION = 2, - CUDNN_NUMERICAL_NOTE_FFT = 3, - CUDNN_NUMERICAL_NOTE_NONDETERMINISTIC = 4, - CUDNN_NUMERICAL_NOTE_WINOGRAD = 5, - CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_4x4 = 6, - CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_6x6 = 7, - CUDNN_NUMERICAL_NOTE_WINOGRAD_TILE_13x13 = 8, - CUDNN_NUMERICAL_NOTE_TYPE_COUNT = 9, +extern "C" { + pub fn cudnnGetConvolutionBackwardDataWorkspaceSize( + handle: cudnnHandle_t, + wDesc: cudnnFilterDescriptor_t, + dyDesc: cudnnTensorDescriptor_t, + convDesc: cudnnConvolutionDescriptor_t, + dxDesc: cudnnTensorDescriptor_t, + algo: cudnnConvolutionBwdDataAlgo_t, + sizeInBytes: *mut usize, + ) -> cudnnStatus_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBackendBehaviorNote_t { - CUDNN_BEHAVIOR_NOTE_RUNTIME_COMPILATION = 0, - CUDNN_BEHAVIOR_NOTE_REQUIRES_FILTER_INT8x32_REORDER = 1, - CUDNN_BEHAVIOR_NOTE_REQUIRES_BIAS_INT8x32_REORDER = 2, - CUDNN_BEHAVIOR_NOTE_TYPE_COUNT = 3, +extern "C" { + pub fn cudnnConvolutionBackwardData( + handle: cudnnHandle_t, + alpha: *const ::libc::c_void, + wDesc: cudnnFilterDescriptor_t, + w: *const ::libc::c_void, + dyDesc: cudnnTensorDescriptor_t, + dy: *const ::libc::c_void, + convDesc: cudnnConvolutionDescriptor_t, + algo: cudnnConvolutionBwdDataAlgo_t, + workSpace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + beta: *const ::libc::c_void, + dxDesc: cudnnTensorDescriptor_t, + dx: *mut ::libc::c_void, + ) -> cudnnStatus_t; } -#[repr(u32)] -#[non_exhaustive] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBackendKnobType_t { - CUDNN_KNOB_TYPE_SPLIT_K = 0, - CUDNN_KNOB_TYPE_SWIZZLE = 1, - CUDNN_KNOB_TYPE_TILE_SIZE = 2, - CUDNN_KNOB_TYPE_USE_TEX = 3, - CUDNN_KNOB_TYPE_EDGE = 4, - CUDNN_KNOB_TYPE_KBLOCK = 5, - CUDNN_KNOB_TYPE_LDGA = 6, - CUDNN_KNOB_TYPE_LDGB = 7, - CUDNN_KNOB_TYPE_CHUNK_K = 8, - CUDNN_KNOB_TYPE_SPLIT_H = 9, - CUDNN_KNOB_TYPE_WINO_TILE = 10, - CUDNN_KNOB_TYPE_MULTIPLY = 11, - CUDNN_KNOB_TYPE_SPLIT_K_BUF = 12, - CUDNN_KNOB_TYPE_TILEK = 13, - CUDNN_KNOB_TYPE_STAGES = 14, - CUDNN_KNOB_TYPE_REDUCTION_MODE = 15, - CUDNN_KNOB_TYPE_CTA_SPLIT_K_MODE = 16, - CUDNN_KNOB_TYPE_SPLIT_K_SLC = 17, - CUDNN_KNOB_TYPE_IDX_MODE = 18, - CUDNN_KNOB_TYPE_SLICED = 19, - CUDNN_KNOB_TYPE_SPLIT_RS = 20, - CUDNN_KNOB_TYPE_SINGLEBUFFER = 21, - CUDNN_KNOB_TYPE_LDGC = 22, - CUDNN_KNOB_TYPE_SPECFILT = 23, - CUDNN_KNOB_TYPE_KERNEL_CFG = 24, - CUDNN_KNOB_TYPE_COUNTS = 25, +extern "C" { + pub fn cudnnGetFoldedConvBackwardDataDescriptors( + handle: cudnnHandle_t, + filterDesc: cudnnFilterDescriptor_t, + diffDesc: cudnnTensorDescriptor_t, + convDesc: cudnnConvolutionDescriptor_t, + gradDesc: cudnnTensorDescriptor_t, + transformFormat: cudnnTensorFormat_t, + foldedFilterDesc: cudnnFilterDescriptor_t, + paddedDiffDesc: cudnnTensorDescriptor_t, + foldedConvDesc: cudnnConvolutionDescriptor_t, + foldedGradDesc: cudnnTensorDescriptor_t, + filterFoldTransDesc: cudnnTensorTransformDescriptor_t, + diffPadTransDesc: cudnnTensorTransformDescriptor_t, + gradFoldTransDesc: cudnnTensorTransformDescriptor_t, + gradUnfoldTransDesc: cudnnTensorTransformDescriptor_t, + ) -> cudnnStatus_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnFusedOpsConstParamStruct { + _unused: [u8; 0], +} +pub type cudnnFusedOpsConstParamPack_t = *mut cudnnFusedOpsConstParamStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnFusedOpsVariantParamStruct { + _unused: [u8; 0], +} +pub type cudnnFusedOpsVariantParamPack_t = *mut cudnnFusedOpsVariantParamStruct; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnFusedOpsPlanStruct { + _unused: [u8; 0], } +pub type cudnnFusedOpsPlan_t = *mut cudnnFusedOpsPlanStruct; #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBackendLayoutType_t { - CUDNN_LAYOUT_TYPE_PREFERRED_NCHW = 0, - CUDNN_LAYOUT_TYPE_PREFERRED_NHWC = 1, - CUDNN_LAYOUT_TYPE_PREFERRED_PAD4CK = 2, - CUDNN_LAYOUT_TYPE_PREFERRED_PAD8CK = 3, - CUDNN_LAYOUT_TYPE_COUNT = 4, +pub enum cudnnFusedOps_t { + CUDNN_FUSED_SCALE_BIAS_ACTIVATION_CONV_BNSTATS = 0, + CUDNN_FUSED_SCALE_BIAS_ACTIVATION_WGRAD = 1, + CUDNN_FUSED_BN_FINALIZE_STATISTICS_TRAINING = 2, + CUDNN_FUSED_BN_FINALIZE_STATISTICS_INFERENCE = 3, + CUDNN_FUSED_CONV_SCALE_BIAS_ADD_ACTIVATION = 4, + CUDNN_FUSED_SCALE_BIAS_ADD_ACTIVATION_GEN_BITMASK = 5, + CUDNN_FUSED_DACTIVATION_FORK_DBATCHNORM = 6, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBackendHeurMode_t { - CUDNN_HEUR_MODE_INSTANT = 0, - CUDNN_HEUR_MODE_B = 1, - CUDNN_HEUR_MODE_FALLBACK = 2, - CUDNN_HEUR_MODE_A = 3, - CUDNN_HEUR_MODES_COUNT = 4, +pub enum cudnnFusedOpsConstParamLabel_t { + CUDNN_PARAM_XDESC = 0, + CUDNN_PARAM_XDATA_PLACEHOLDER = 1, + CUDNN_PARAM_BN_MODE = 2, + CUDNN_PARAM_BN_EQSCALEBIAS_DESC = 3, + CUDNN_PARAM_BN_EQSCALE_PLACEHOLDER = 4, + CUDNN_PARAM_BN_EQBIAS_PLACEHOLDER = 5, + CUDNN_PARAM_ACTIVATION_DESC = 6, + CUDNN_PARAM_CONV_DESC = 7, + CUDNN_PARAM_WDESC = 8, + CUDNN_PARAM_WDATA_PLACEHOLDER = 9, + CUDNN_PARAM_DWDESC = 10, + CUDNN_PARAM_DWDATA_PLACEHOLDER = 11, + CUDNN_PARAM_YDESC = 12, + CUDNN_PARAM_YDATA_PLACEHOLDER = 13, + CUDNN_PARAM_DYDESC = 14, + CUDNN_PARAM_DYDATA_PLACEHOLDER = 15, + CUDNN_PARAM_YSTATS_DESC = 16, + CUDNN_PARAM_YSUM_PLACEHOLDER = 17, + CUDNN_PARAM_YSQSUM_PLACEHOLDER = 18, + CUDNN_PARAM_BN_SCALEBIAS_MEANVAR_DESC = 19, + CUDNN_PARAM_BN_SCALE_PLACEHOLDER = 20, + CUDNN_PARAM_BN_BIAS_PLACEHOLDER = 21, + CUDNN_PARAM_BN_SAVED_MEAN_PLACEHOLDER = 22, + CUDNN_PARAM_BN_SAVED_INVSTD_PLACEHOLDER = 23, + CUDNN_PARAM_BN_RUNNING_MEAN_PLACEHOLDER = 24, + CUDNN_PARAM_BN_RUNNING_VAR_PLACEHOLDER = 25, + CUDNN_PARAM_ZDESC = 26, + CUDNN_PARAM_ZDATA_PLACEHOLDER = 27, + CUDNN_PARAM_BN_Z_EQSCALEBIAS_DESC = 28, + CUDNN_PARAM_BN_Z_EQSCALE_PLACEHOLDER = 29, + CUDNN_PARAM_BN_Z_EQBIAS_PLACEHOLDER = 30, + CUDNN_PARAM_ACTIVATION_BITMASK_DESC = 31, + CUDNN_PARAM_ACTIVATION_BITMASK_PLACEHOLDER = 32, + CUDNN_PARAM_DXDESC = 33, + CUDNN_PARAM_DXDATA_PLACEHOLDER = 34, + CUDNN_PARAM_DZDESC = 35, + CUDNN_PARAM_DZDATA_PLACEHOLDER = 36, + CUDNN_PARAM_BN_DSCALE_PLACEHOLDER = 37, + CUDNN_PARAM_BN_DBIAS_PLACEHOLDER = 38, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnBackendTensorReordering_t { - CUDNN_TENSOR_REORDERING_NONE = 0, - CUDNN_TENSOR_REORDERING_INT8x32 = 1, +pub enum cudnnFusedOpsPointerPlaceHolder_t { + CUDNN_PTR_NULL = 0, + CUDNN_PTR_ELEM_ALIGNED = 1, + CUDNN_PTR_16B_ALIGNED = 2, } #[repr(u32)] #[non_exhaustive] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub enum cudnnPaddingMode_t { - CUDNN_ZERO_PAD = 0, - CUDNN_NEG_INF_PAD = 1, - CUDNN_EDGE_VAL_PAD = 2, +pub enum cudnnFusedOpsVariantParamLabel_t { + CUDNN_PTR_XDATA = 0, + CUDNN_PTR_BN_EQSCALE = 1, + CUDNN_PTR_BN_EQBIAS = 2, + CUDNN_PTR_WDATA = 3, + CUDNN_PTR_DWDATA = 4, + CUDNN_PTR_YDATA = 5, + CUDNN_PTR_DYDATA = 6, + CUDNN_PTR_YSUM = 7, + CUDNN_PTR_YSQSUM = 8, + CUDNN_PTR_WORKSPACE = 9, + CUDNN_PTR_BN_SCALE = 10, + CUDNN_PTR_BN_BIAS = 11, + CUDNN_PTR_BN_SAVED_MEAN = 12, + CUDNN_PTR_BN_SAVED_INVSTD = 13, + CUDNN_PTR_BN_RUNNING_MEAN = 14, + CUDNN_PTR_BN_RUNNING_VAR = 15, + CUDNN_PTR_ZDATA = 16, + CUDNN_PTR_BN_Z_EQSCALE = 17, + CUDNN_PTR_BN_Z_EQBIAS = 18, + CUDNN_PTR_ACTIVATION_BITMASK = 19, + CUDNN_PTR_DXDATA = 20, + CUDNN_PTR_DZDATA = 21, + CUDNN_PTR_BN_DSCALE = 22, + CUDNN_PTR_BN_DBIAS = 23, + CUDNN_SCALAR_SIZE_T_WORKSPACE_SIZE_IN_BYTES = 100, + CUDNN_SCALAR_INT64_T_BN_ACCUMULATION_COUNT = 101, + CUDNN_SCALAR_DOUBLE_BN_EXP_AVG_FACTOR = 102, + CUDNN_SCALAR_DOUBLE_BN_EPSILON = 103, } extern "C" { - pub fn cudnnBackendCreateDescriptor( - descriptorType: cudnnBackendDescriptorType_t, - descriptor: *mut cudnnBackendDescriptor_t, + pub fn cudnnCnnVersionCheck() -> cudnnStatus_t; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cudnnConvolutionBwdFilterAlgoPerfStruct { + pub algo: cudnnConvolutionBwdFilterAlgo_t, + pub status: cudnnStatus_t, + pub time: f32, + pub memory: usize, + pub determinism: cudnnDeterminism_t, + pub mathType: cudnnMathType_t, + pub reserved: [::libc::c_int; 3usize], +} +#[test] +fn bindgen_test_layout_cudnnConvolutionBwdFilterAlgoPerfStruct() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct)), + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct)), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).algo) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(algo), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(status), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(time), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memory) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(memory), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).determinism) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(determinism), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mathType) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(mathType), + ), + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(cudnnConvolutionBwdFilterAlgoPerfStruct), + "::", + stringify!(reserved), + ), + ); +} +pub type cudnnConvolutionBwdFilterAlgoPerf_t = cudnnConvolutionBwdFilterAlgoPerfStruct; +extern "C" { + pub fn cudnnGetConvolutionBackwardFilterAlgorithmMaxCount( + handle: cudnnHandle_t, + count: *mut ::libc::c_int, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnBackendDestroyDescriptor(descriptor: cudnnBackendDescriptor_t) -> cudnnStatus_t; + pub fn cudnnFindConvolutionBackwardFilterAlgorithm( + handle: cudnnHandle_t, + xDesc: cudnnTensorDescriptor_t, + dyDesc: cudnnTensorDescriptor_t, + convDesc: cudnnConvolutionDescriptor_t, + dwDesc: cudnnFilterDescriptor_t, + requestedAlgoCount: ::libc::c_int, + returnedAlgoCount: *mut ::libc::c_int, + perfResults: *mut cudnnConvolutionBwdFilterAlgoPerf_t, + ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnBackendInitialize(descriptor: cudnnBackendDescriptor_t) -> cudnnStatus_t; + pub fn cudnnFindConvolutionBackwardFilterAlgorithmEx( + handle: cudnnHandle_t, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + dyDesc: cudnnTensorDescriptor_t, + y: *const ::libc::c_void, + convDesc: cudnnConvolutionDescriptor_t, + dwDesc: cudnnFilterDescriptor_t, + dw: *mut ::libc::c_void, + requestedAlgoCount: ::libc::c_int, + returnedAlgoCount: *mut ::libc::c_int, + perfResults: *mut cudnnConvolutionBwdFilterAlgoPerf_t, + workSpace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnBackendFinalize(descriptor: cudnnBackendDescriptor_t) -> cudnnStatus_t; + pub fn cudnnGetConvolutionBackwardFilterAlgorithm_v7( + handle: cudnnHandle_t, + srcDesc: cudnnTensorDescriptor_t, + diffDesc: cudnnTensorDescriptor_t, + convDesc: cudnnConvolutionDescriptor_t, + gradDesc: cudnnFilterDescriptor_t, + requestedAlgoCount: ::libc::c_int, + returnedAlgoCount: *mut ::libc::c_int, + perfResults: *mut cudnnConvolutionBwdFilterAlgoPerf_t, + ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnBackendSetAttribute( - descriptor: cudnnBackendDescriptor_t, - attributeName: cudnnBackendAttributeName_t, - attributeType: cudnnBackendAttributeType_t, - elementCount: i64, - arrayOfElements: *const ::libc::c_void, + pub fn cudnnGetConvolutionBackwardFilterWorkspaceSize( + handle: cudnnHandle_t, + xDesc: cudnnTensorDescriptor_t, + dyDesc: cudnnTensorDescriptor_t, + convDesc: cudnnConvolutionDescriptor_t, + gradDesc: cudnnFilterDescriptor_t, + algo: cudnnConvolutionBwdFilterAlgo_t, + sizeInBytes: *mut usize, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnBackendGetAttribute( - descriptor: cudnnBackendDescriptor_t, - attributeName: cudnnBackendAttributeName_t, - attributeType: cudnnBackendAttributeType_t, - requestedElementCount: i64, - elementCount: *mut i64, - arrayOfElements: *mut ::libc::c_void, + pub fn cudnnConvolutionBackwardFilter( + handle: cudnnHandle_t, + alpha: *const ::libc::c_void, + xDesc: cudnnTensorDescriptor_t, + x: *const ::libc::c_void, + dyDesc: cudnnTensorDescriptor_t, + dy: *const ::libc::c_void, + convDesc: cudnnConvolutionDescriptor_t, + algo: cudnnConvolutionBwdFilterAlgo_t, + workSpace: *mut ::libc::c_void, + workSpaceSizeInBytes: usize, + beta: *const ::libc::c_void, + dwDesc: cudnnFilterDescriptor_t, + dw: *mut ::libc::c_void, ) -> cudnnStatus_t; } extern "C" { - pub fn cudnnBackendExecute( + pub fn cudnnConvolutionBackwardBias( handle: cudnnHandle_t, - executionPlan: cudnnBackendDescriptor_t, - variantPack: cudnnBackendDescriptor_t, + alpha: *const ::libc::c_void, + dyDesc: cudnnTensorDescriptor_t, + dy: *const ::libc::c_void, + beta: *const ::libc::c_void, + dbDesc: cudnnTensorDescriptor_t, + db: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnCreateFusedOpsConstParamPack( + constPack: *mut cudnnFusedOpsConstParamPack_t, + ops: cudnnFusedOps_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnDestroyFusedOpsConstParamPack( + constPack: cudnnFusedOpsConstParamPack_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetFusedOpsConstParamPackAttribute( + constPack: cudnnFusedOpsConstParamPack_t, + paramLabel: cudnnFusedOpsConstParamLabel_t, + param: *const ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetFusedOpsConstParamPackAttribute( + constPack: cudnnFusedOpsConstParamPack_t, + paramLabel: cudnnFusedOpsConstParamLabel_t, + param: *mut ::libc::c_void, + isNULL: *mut ::libc::c_int, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnCreateFusedOpsVariantParamPack( + varPack: *mut cudnnFusedOpsVariantParamPack_t, + ops: cudnnFusedOps_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnDestroyFusedOpsVariantParamPack( + varPack: cudnnFusedOpsVariantParamPack_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnSetFusedOpsVariantParamPackAttribute( + varPack: cudnnFusedOpsVariantParamPack_t, + paramLabel: cudnnFusedOpsVariantParamLabel_t, + ptr: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnGetFusedOpsVariantParamPackAttribute( + varPack: cudnnFusedOpsVariantParamPack_t, + paramLabel: cudnnFusedOpsVariantParamLabel_t, + ptr: *mut ::libc::c_void, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnCreateFusedOpsPlan( + plan: *mut cudnnFusedOpsPlan_t, + ops: cudnnFusedOps_t, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnDestroyFusedOpsPlan(plan: cudnnFusedOpsPlan_t) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnMakeFusedOpsPlan( + handle: cudnnHandle_t, + plan: cudnnFusedOpsPlan_t, + constPack: cudnnFusedOpsConstParamPack_t, + workspaceSizeInBytes: *mut usize, + ) -> cudnnStatus_t; +} +extern "C" { + pub fn cudnnFusedOpsExecute( + handle: cudnnHandle_t, + plan: cudnnFusedOpsPlan_t, + varPack: cudnnFusedOpsVariantParamPack_t, ) -> cudnnStatus_t; }